/* Flovent app — layout: top bar, side navigation, workspace */
body { padding-bottom: 60px; }
.topbar { position: sticky; top: 0; z-index: 20; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar .wrap { display: flex; align-items: center; gap: 12px; height: 60px; }
.topbar .brand { margin-inline-end: auto; }
.topbar select { width: auto; max-width: 200px; padding: 6px 10px; }
.user-chip { font-size: 13px; color: var(--muted); max-width: 160px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-banner { background: var(--bad-soft); color: var(--bad); }
.sub-banner .wrap { padding-block: 10px; display: flex; gap: 12px; align-items: center; justify-content: space-between; flex-wrap: wrap; }
.sub-banner.warn { background: var(--warn-soft); color: var(--warn); }

.layout { display: grid; grid-template-columns: 210px minmax(0, 1fr); gap: 24px; padding-block: 24px; align-items: start; }
.sidenav { position: sticky; top: 84px; display: flex; flex-direction: column; gap: 2px; }
.sidenav a { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 9px; text-decoration: none; color: var(--muted); font-weight: 500; }
.sidenav a:hover { background: var(--surface); color: var(--ink); }
.sidenav a.on { background: var(--surface); color: var(--ink); box-shadow: inset -3px 0 0 var(--accent); }
.sidenav svg { width: 18px; height: 18px; flex: none; }
.page-title { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-bottom: 18px; }
.page-title h1 { font-size: 26px; }

/* auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-side { background: var(--accent); color: var(--accent-ink); padding: 48px; display: flex; flex-direction: column; justify-content: space-between; gap: 30px; position: relative; overflow: hidden; }
.auth-side .brand { color: var(--accent-ink); }
.auth-side .mark i { border-color: var(--accent-ink); }
.auth-side .mark i + i { border-color: var(--gold-soft); }
.auth-side h2 { font-size: 34px; max-width: 420px; }
.auth-side ul { margin: 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 10px; opacity: .92; }
.auth-side li::before { content: "◦"; margin-inline-end: 8px; }
.auth-side .rings { position: absolute; inset-inline-start: -80px; bottom: -80px; width: 320px; height: 220px; opacity: .14; }
.auth-side .rings i { position: absolute; width: 220px; height: 220px; border-radius: 50%; border: 18px solid currentColor; }
.auth-side .rings i + i { inset-inline-start: 110px; }
.auth-main { display: flex; align-items: center; justify-content: center; padding: 32px max(16px, env(safe-area-inset-left, 0px)); }
.auth-box { width: min(420px, 100%); display: flex; flex-direction: column; gap: 16px; }
.auth-box h1 { font-size: 26px; }
.seg { display: flex; background: var(--surface-2); border-radius: 10px; padding: 4px; gap: 4px; }
.seg button { flex: 1; border: 0; background: none; padding: 8px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 500; }
.seg button.on { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); }
.linkish { background: none; border: 0; color: var(--accent); cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }

/* home */
.tiles { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.tile { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); padding: 14px 16px; display: flex; flex-direction: column; gap: 6px; }
.tile .big { font-family: var(--f-display); font-size: 26px; font-weight: 700; line-height: 1.15; }
.tile .sub { font-size: 13px; color: var(--muted); }
.two { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 16px; }
.list-plain { list-style: none; margin: 0; padding: 0; }
.list-plain li { display: flex; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.list-plain li:first-child { border-top: 0; }
.list-plain .grow { flex: 1; min-width: 0; }
.next-event { background: var(--accent); color: var(--accent-ink); border-radius: 16px; padding: 22px 24px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; align-items: flex-end; text-decoration: none; }
.next-event h2 { font-size: 24px; }
.next-event .cd b { display: block; font-family: var(--f-display); font-size: 52px; line-height: 1; }

/* events grid */
.ev-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.ev-card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; text-decoration: none; color: var(--ink); display: flex; flex-direction: column; gap: 10px; transition: border-color .15s; }
.ev-card:hover { border-color: var(--accent); }
.ev-card h3 { font-size: 17px; }
.ev-card .meta { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; color: var(--muted); }
.ev-card.past { opacity: .72; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.filters input[type=search] { flex: 1 1 220px; width: auto; }
.filters select { width: auto; }

/* event workspace */
.ev-head { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 22px 24px; display: flex; gap: 20px; align-items: flex-end; flex-wrap: wrap; }
.ev-head .info { flex: 1 1 320px; min-width: 0; }
.ev-head h1 { font-size: clamp(22px, 3.2vw, 32px); margin-top: 8px; }
.ev-head .sub { color: var(--muted); margin-top: 4px; }
.ev-head .cd { text-align: center; min-width: 110px; }
.ev-head .cd b { display: block; font-family: var(--f-display); font-size: 46px; line-height: 1; color: var(--accent); }
.ev-head .cd span { font-size: 13px; color: var(--muted); }
.ev-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.tabs { display: flex; gap: 2px; margin: 16px 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: thin; }
.tab { border: 0; background: none; padding: 10px 13px; cursor: pointer; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab.on { color: var(--ink); border-bottom-color: var(--accent); }
.tab .n { font-size: 11px; background: var(--surface-2); border-radius: 99px; padding: 1px 7px; margin-inline-start: 5px; color: var(--muted); }
.addform { display: flex; gap: 8px; flex-wrap: wrap; align-items: flex-end; }
.addform .fld { flex: 1 1 140px; }
.addform .fld.w2 { flex: 2 1 220px; }
.addform .fld.w0 { flex: 0 1 110px; }
.sumline { display: flex; gap: 24px; flex-wrap: wrap; }
.sumline > div { display: flex; flex-direction: column; }
.sumline b { font-family: var(--f-display); font-size: 21px; }
.catrow { display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; padding: 5px 0; }
.catrow .bar { height: 9px; }

.task { display: grid; grid-template-columns: auto minmax(0, 1fr) 140px 170px auto; gap: 8px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.task:first-of-type { border-top: 0; }
.task input[type=checkbox] { width: 19px; height: 19px; accent-color: var(--accent); }
.task.done .t-title { text-decoration: line-through; color: var(--muted); }
.task input[type=text], .task input[type=date] { border-color: transparent; background: transparent; }
.task input[type=text]:hover, .task input[type=date]:hover { border-color: var(--line); }

/* seating */
.seat-layout { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 16px; align-items: start; }
.pool { position: sticky; top: 84px; max-height: calc(100vh - 110px); overflow-y: auto; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; min-height: 34px; }
.chip-g { display: inline-flex; align-items: center; gap: 6px; background: var(--surface-2); border: 1px solid var(--line); border-radius: 99px; padding: 4px 10px; font-size: 13px; cursor: grab; user-select: none; }
.chip-g.sel { background: var(--accent); color: var(--accent-ink); border-color: var(--accent); }
.chip-g.att { border-color: var(--ok); }
.chip-g b { font-weight: 600; }
.chip-g button { border: 0; background: none; cursor: pointer; color: inherit; padding: 0 2px; font-size: 15px; line-height: 1; }
.tables-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 12px; }
.seat-table { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; cursor: pointer; }
.seat-table.drop { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.seat-table.full .occ { color: var(--bad); }
.seat-table .round { width: 54px; height: 54px; border-radius: 50%; border: 2px solid var(--gold); display: grid; place-items: center; font-family: var(--f-display); font-weight: 700; flex: none; }

/* invites */
.inv-row { display: grid; grid-template-columns: minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.inv-row:first-child { border-top: 0; }
.preview-bubble { background: #DCF8C6; color: #111; border-radius: 12px 12px 2px 12px; padding: 12px 14px; white-space: pre-wrap; font-size: 14px; max-width: 460px; }

/* plans */
.plans { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; }
.plan { background: var(--surface); border: 1px solid var(--line); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 10px; }
.plan.hl { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plan .price { font-family: var(--f-display); font-size: 30px; font-weight: 700; }
.plan ul { margin: 0; padding-inline-start: 18px; color: var(--muted); font-size: 14px; display: flex; flex-direction: column; gap: 4px; }

@media (max-width: 1000px) {
  .tiles { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .two, .seat-layout { grid-template-columns: minmax(0, 1fr); }
  .pool { position: static; max-height: none; }
  .plans { grid-template-columns: minmax(0, 1fr); }
}
@media (max-width: 820px) {
  .layout { grid-template-columns: minmax(0, 1fr); padding-top: 12px; }
  .sidenav { position: static; flex-direction: row; overflow-x: auto; gap: 4px; padding-bottom: 4px; }
  .sidenav a { white-space: nowrap; padding: 8px 12px; }
  .sidenav a.on { box-shadow: inset 0 -2px 0 var(--accent); }
  .auth { grid-template-columns: minmax(0, 1fr); }
  .auth-side { padding: 28px max(16px, env(safe-area-inset-left, 0px)); }
  .auth-side h2 { font-size: 24px; }
  .auth-side ul, .auth-side .rings { display: none; }
  .user-chip { display: none; }
  .task { grid-template-columns: auto minmax(0, 1fr) auto; }
  .task .t-cat { display: none; }
  .task .t-due { grid-column: 2 / 3; }
  .ev-head .cd { text-align: start; }
  .inv-row { grid-template-columns: minmax(0, 1fr); }
}
