/* StableView. Nexvora family look (navy + teal, Inter, left sidebar), light first. */
:root {
  --bg: #f3f6fa; --side: #ffffff; --surface: #ffffff; --surface-2: #f8fafc; --sunk: #eef2f7; --line: #dde4ec; --line-2: #e9eef4;
  --ink: #102030; --muted: #5a6b7d; --navy: #00203f;
  --accent: #0b8f86; --accent-ink: #087068; --accent-soft: rgba(11, 143, 134, .1); --on-accent: #fff;
  --ok: #15803d; --ok-soft: rgba(21, 128, 61, .1); --warn: #b45309; --warn-soft: rgba(180, 83, 9, .1);
  --crit: #c2331f; --crit-soft: rgba(194, 51, 31, .09); --blue: #1d6fd1; --blue-soft: rgba(29, 111, 209, .1); --idle: #6d28d9; --idle-soft: rgba(109, 40, 217, .1);
  --f-body: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif; --f-brand: "Montserrat", "Inter", sans-serif;
  --r: 12px; --shadow: 0 1px 2px rgba(16, 32, 48, .04), 0 4px 16px rgba(16, 32, 48, .05);
  color-scheme: light;
}
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { background: var(--bg); }
body { margin: 0; color: var(--ink); font: 14px/1.5 var(--f-body); font-feature-settings: "cv11"; background: var(--bg); -webkit-font-smoothing: antialiased; }
h1, h2, h3 { margin: 0; letter-spacing: -.01em; text-wrap: balance; }
h2 { font-size: 1rem; font-weight: 600; }
h3 { font-size: .9rem; font-weight: 600; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-ink); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
svg.i { width: 17px; height: 17px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.eyebrow { font-size: .68rem; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; }

/* Shell */
.app { display: grid; grid-template-columns: 236px minmax(0, 1fr); min-height: 100vh; }
.side { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 14px; padding: 18px 12px; background: var(--side); border-right: 1px solid var(--line); overflow-y: auto; }
.brand { display: grid; gap: 4px; padding: 0 8px 6px; text-decoration: none; color: inherit; }
.brand img { width: 112px; }
.product { font-family: var(--f-brand); font-weight: 800; font-size: 1.1rem; letter-spacing: -.01em; color: var(--navy); }
.product span { color: var(--accent); }
.bizname { margin: 0 4px; padding: 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--line-2); display: flex; gap: 10px; align-items: center; min-width: 0; }
.bizname img, .bizname .ini { width: 30px; height: 30px; border-radius: 50%; object-fit: cover; flex: none; background: var(--accent-soft); display: grid; place-items: center; font-weight: 700; color: var(--accent); font-size: .8rem; }
.bizname b { display: block; font-size: .82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bizname small { color: var(--muted); font-size: .72rem; }
.nav { display: flex; flex-direction: column; gap: 2px; }
.navgroup { font: 600 .66rem/1.4 var(--f-body); text-transform: uppercase; letter-spacing: .09em; color: var(--muted); padding: 12px 10px 4px; }
.tab { display: flex; align-items: center; gap: 10px; border: 0; background: none; padding: 7px 10px; border-radius: 8px; color: var(--muted); font-weight: 500; cursor: pointer; text-align: left; text-decoration: none; white-space: nowrap; }
.tab:hover { color: var(--ink); background: var(--sunk); }
.tab[aria-current="page"] { color: var(--accent-ink); background: var(--accent-soft); font-weight: 600; }
.tab .count { margin-left: auto; font-size: .7rem; padding: 0 7px; border-radius: 99px; background: var(--accent); color: #fff; font-weight: 600; }
.sitecard { margin-top: auto; padding: 14px; border-radius: 12px; background: linear-gradient(160deg, rgba(11, 143, 134, .12), rgba(29, 111, 209, .06)); border: 1px solid rgba(11, 143, 134, .25); display: grid; gap: 8px; font-size: .8rem; }
.sitecard b { font-size: .88rem; }
.sitecard .url { font-family: ui-monospace, Consolas, monospace; font-size: .72rem; word-break: break-all; color: var(--accent-ink); }
.side-foot { font-size: .72rem; color: var(--muted); padding: 0 8px; display: flex; justify-content: space-between; }
.side-foot button { border: 0; background: none; color: var(--muted); cursor: pointer; padding: 0; font-size: .72rem; }
.side-foot button:hover { color: var(--ink); text-decoration: underline; }

.main { min-width: 0; padding: 20px 28px 56px; display: flex; flex-direction: column; gap: 18px; }
.top { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; min-height: 40px; }
.top h1 { font-size: 1.4rem; font-weight: 650; letter-spacing: -.02em; }
.top .sub { color: var(--muted); font-size: .85rem; margin: 2px 0 0; }
.tools { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }

@media (max-width: 900px) {
  .app { display: block; }
  .side { position: sticky; top: 0; z-index: 30; height: auto; flex-direction: row; align-items: center; padding: 10px 12px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
  .brand { padding: 0; flex: none; } .brand img { display: none; }
  .bizname, .navgroup, .sitecard, .side-foot { display: none; }
  .nav { flex-direction: row; gap: 2px; }
  .tab span.lbl { display: none; } .tab { padding: 8px 10px; }
  .tab[aria-current="page"] span.lbl { display: inline; }
  .main { padding: 16px 14px 48px; }
}

/* Controls */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); font-weight: 600; font-size: .85rem; cursor: pointer; white-space: nowrap; text-decoration: none; color: var(--ink); }
.btn:hover { background: var(--surface-2); border-color: #c9d3de; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: var(--on-accent); }
.btn.primary:hover { background: var(--accent-ink); }
.btn.danger { color: var(--crit); }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.sm { height: 30px; padding: 0 10px; font-size: .8rem; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); padding: 2px; }
.seg button { border: 0; background: none; height: 30px; padding: 0 12px; border-radius: 6px; cursor: pointer; font-weight: 500; color: var(--muted); font-size: .84rem; }
.seg button[aria-pressed="true"] { background: var(--sunk); color: var(--ink); font-weight: 600; }
input.in, select.in, textarea.in { height: 36px; padding: 0 10px; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); min-width: 0; }
textarea.in { height: auto; min-height: 84px; padding: 8px 10px; resize: vertical; }
.search { position: relative; } .search svg { position: absolute; left: 10px; top: 10px; color: var(--muted); } .search input { padding-left: 32px; width: 240px; }

.field { display: grid; gap: 5px; align-content: start; }
.field > label, .field > .lbl { font-size: .8rem; font-weight: 600; }
.field .hint { font-size: .76rem; color: var(--muted); }
.field input, .field select, .field textarea { width: 100%; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; }
@media (max-width: 640px) { .grid2, .grid3 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 8px; align-items: center; cursor: pointer; font-weight: 500; }
.check input { width: 16px; height: 16px; accent-color: var(--accent); }
.switch { position: relative; width: 36px; height: 20px; flex: none; }
.switch input { opacity: 0; position: absolute; inset: 0; margin: 0; cursor: pointer; z-index: 1; }
.switch i { position: absolute; inset: 0; border-radius: 99px; background: #cbd5e1; transition: background .15s; }
.switch i::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; box-shadow: 0 1px 2px rgba(0, 0, 0, .2); }
.switch input:checked + i { background: var(--accent); }
.switch input:checked + i::after { transform: translateX(16px); }

/* Cards */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card > header { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line-2); }
.card .pad { padding: 16px; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; }
.kpi { padding: 14px 16px; display: grid; gap: 4px; justify-items: center; text-align: center; }
.kpi b { font-size: 1.55rem; font-weight: 650; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--muted); font-size: .78rem; }
@media (max-width: 900px) { .kpis { grid-template-columns: 1fr 1fr; } }
.cols { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .cols { grid-template-columns: 1fr; } }
.stack { display: grid; gap: 16px; }

.chip { display: inline-flex; align-items: center; gap: 4px; padding: 1px 8px; border-radius: 99px; font-size: .72rem; font-weight: 600; white-space: nowrap; background: var(--sunk); color: var(--muted); }
.chip.confirmed { background: var(--blue-soft); color: var(--blue); }
.chip.completed, .chip.paid, .chip.in { background: var(--ok-soft); color: var(--ok); }
.chip.no_show { background: var(--warn-soft); color: var(--warn); }
.chip.cancelled { background: var(--crit-soft); color: var(--crit); }
.chip.unpaid { background: var(--sunk); color: var(--muted); }
.chip.web { background: var(--accent-soft); color: var(--accent-ink); }
.chip.acct { background: var(--blue-soft); color: var(--blue); }

/* Today timeline */
.timeline { display: grid; }
.trow { display: grid; grid-template-columns: 74px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.trow:last-child { border-bottom: 0; }
.trow:hover { background: var(--surface-2); }
.trow.past { opacity: .6; }
.trow.now { box-shadow: inset 3px 0 0 var(--accent); background: rgba(11, 143, 134, .04); }
.trow time { font-weight: 650; font-variant-numeric: tabular-nums; font-size: .95rem; }
.trow time small { display: block; color: var(--muted); font-weight: 500; font-size: .72rem; }
.trow .who b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.trow .who span { color: var(--muted); font-size: .82rem; }
.trow .acts { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
@media (max-width: 640px) { .trow { grid-template-columns: 56px 1fr; } .trow .acts { grid-column: 1 / -1; justify-content: flex-start; } }
.empty { padding: 36px 16px; text-align: center; color: var(--muted); display: grid; gap: 10px; justify-items: center; }

/* Tables */
.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: .86rem; }
table.t th { text-align: left; font-weight: 600; color: var(--muted); font-size: .74rem; text-transform: uppercase; letter-spacing: .05em; padding: 10px 14px; border-bottom: 1px solid var(--line); background: var(--surface-2); white-space: nowrap; }
table.t td { padding: 11px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tr.click { cursor: pointer; } table.t tr.click:hover td { background: var(--surface-2); }
table.t td.r, table.t th.r { text-align: right; }

/* Drawer */
.scrim { position: fixed; inset: 0; background: rgba(10, 20, 35, .35); z-index: 40; animation: fade .15s; }
@keyframes fade { from { opacity: 0; } }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(480px, 100%); background: var(--surface); z-index: 41; display: flex; flex-direction: column; box-shadow: -20px 0 60px rgba(16, 32, 48, .18); animation: slide .2s cubic-bezier(.2, .8, .2, 1); }
@keyframes slide { from { transform: translateX(30px); opacity: 0; } }
.drawer > header { display: flex; align-items: center; gap: 10px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer > header h2 { flex: 1; font-size: 1.05rem; }
.drawer .body { padding: 18px; overflow-y: auto; flex: 1; display: grid; gap: 14px; align-content: start; }
.drawer > footer { padding: 12px 18px; border-top: 1px solid var(--line); display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.iconbtn { width: 34px; height: 34px; border-radius: 8px; border: 0; background: var(--sunk); display: grid; place-items: center; cursor: pointer; }
.kv { display: grid; grid-template-columns: 110px 1fr; gap: 8px 12px; font-size: .88rem; }
.kv dt { color: var(--muted); } .kv dd { margin: 0; font-weight: 500; }
.err { color: var(--crit); background: var(--crit-soft); padding: 9px 12px; border-radius: 8px; font-size: .85rem; }
.note { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 10px; padding: 12px 14px; font-size: .84rem; color: var(--muted); }
.note b { color: var(--ink); }
.soon { display: inline-flex; padding: 1px 7px; border-radius: 99px; font-size: .66rem; font-weight: 700; background: var(--idle-soft); color: var(--idle); text-transform: uppercase; letter-spacing: .05em; vertical-align: 1px; }
.slotpick { display: grid; grid-template-columns: repeat(auto-fill, minmax(78px, 1fr)); gap: 6px; }
.slotpick button { height: 34px; border-radius: 7px; border: 1px solid var(--line); background: var(--surface); cursor: pointer; font-weight: 600; font-size: .8rem; font-variant-numeric: tabular-nums; }
.slotpick button[aria-pressed="true"] { background: var(--accent); color: #fff; border-color: var(--accent); }

.toast { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); background: var(--navy); color: #fff; padding: 10px 16px; border-radius: 10px; font-size: .86rem; z-index: 60; box-shadow: 0 10px 30px rgba(0, 0, 0, .2); animation: fade .15s; }
.loading { padding: 48px; text-align: center; color: var(--muted); }

/* Login */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1fr 1fr; }
.auth .art { background: radial-gradient(1200px 600px at 20% 10%, rgba(34, 179, 169, .35), transparent 60%), linear-gradient(160deg, #00203f, #013a4a); color: #fff; padding: 48px; display: flex; flex-direction: column; justify-content: space-between; }
.auth .art h1 { font-size: 2.2rem; line-height: 1.15; max-width: 14ch; letter-spacing: -.02em; }
.auth .art p { opacity: .8; max-width: 40ch; }
.auth .art ul { padding: 0; list-style: none; display: grid; gap: 10px; opacity: .92; }
.auth .art li { display: flex; gap: 10px; align-items: center; }
.auth .form { display: grid; place-items: center; padding: 32px 20px; }
.auth form { width: min(380px, 100%); display: grid; gap: 14px; }
.auth form h2 { font-size: 1.4rem; }
.auth .btn { height: 42px; }
@media (max-width: 860px) { .auth { grid-template-columns: 1fr; } .auth .art { display: none; } }

.dropzone { border: 2px dashed var(--line); border-radius: 10px; display: grid; place-items: center; text-align: center; padding: 18px; color: var(--muted); cursor: pointer; min-height: 160px; gap: 6px; }
.dropzone:hover, .dropzone.over { border-color: var(--accent); color: var(--accent-ink); background: var(--accent-soft); }
.connect { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.connect .logo { width: 36px; height: 36px; border-radius: 9px; display: grid; place-items: center; color: #fff; flex: none; }
.connect div { flex: 1; } .connect small { color: var(--muted); display: block; font-size: .78rem; }
.drawer.wide { width: min(640px, 100%); }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 6px 12px; }
.chip.pending { background: var(--warn-soft); color: var(--warn); }
.connect input[type="radio"] { flex: none; width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }

/* ---------- StableView ---------- */
.chip.in, .chip.done, .chip.approved, .chip.paid { background: var(--ok-soft); color: var(--ok); }
.chip.away, .chip.scheduled, .chip.planned { background: var(--blue-soft); color: var(--blue); }
.chip.expected, .chip.open, .chip.due { background: var(--warn-soft); color: var(--warn); }
.chip.left, .chip.cancelled, .chip.withdrawn { background: var(--sunk); color: var(--muted); }
.chip.declined, .chip.overdue, .chip.failed, .chip.owes { background: var(--crit-soft); color: var(--crit); }
.chip.quarantine { background: var(--idle-soft); color: var(--idle); }
.tab .count.warn { background: var(--warn); }

.list { display: grid; }
.lrow { display: flex; gap: 12px; align-items: center; padding: 11px 16px; border-bottom: 1px solid var(--line-2); min-width: 0; }
.lrow:last-child { border-bottom: 0; }
.lrow.click { cursor: pointer; } .lrow.click:hover { background: var(--surface-2); }
.lrow .grow { flex: 1; min-width: 0; }
.lrow .grow b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; font-weight: 600; }
.lrow .grow span { color: var(--muted); font-size: .82rem; display: block; overflow-wrap: anywhere; }
.lrow .when { flex: none; width: 84px; font-variant-numeric: tabular-nums; font-weight: 600; font-size: .82rem; white-space: nowrap; }
.lrow > .chip, .lrow > .money, .lrow > .btn { flex: none; }
.lrow .when small { display: block; color: var(--muted); font-weight: 500; }
.card .empty { padding: 22px 16px; }

.av { width: 40px; height: 40px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; object-fit: cover; flex: none; font-size: .85rem; }
.av.lg { width: 96px; height: 96px; border-radius: 16px; font-size: 1.6rem; }

.horsegrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 12px; }
.hcard { display: flex; gap: 12px; padding: 12px; cursor: pointer; align-items: center; min-width: 0; text-decoration: none; color: inherit; }
.hcard:hover { border-color: #c4ced9; }
.hcard .av { width: 56px; height: 56px; }
.hcard b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcard small { display: block; color: var(--muted); font-size: .78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hcard .meta { min-width: 0; flex: 1; display: grid; gap: 3px; }

.hero { display: flex; gap: 18px; align-items: center; padding: 16px; flex-wrap: wrap; }
.hero h1 { font-size: 1.5rem; letter-spacing: -.02em; }
.hero .facts { display: flex; gap: 6px 16px; flex-wrap: wrap; color: var(--muted); font-size: .85rem; margin-top: 4px; }
.hero .facts b { color: var(--ink); font-weight: 600; }
.hero .grow { flex: 1; min-width: 220px; }
.subtabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.subtabs button { border: 0; background: none; padding: 10px 14px; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.subtabs button[aria-pressed="true"] { color: var(--accent-ink); border-bottom-color: var(--accent); }
.kv.wide { grid-template-columns: 150px 1fr; }
.kv dd.mono, .mono { font-family: ui-monospace, Consolas, monospace; font-size: .84rem; letter-spacing: .02em; }
.alert { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; border-radius: 10px; font-size: .85rem; background: var(--warn-soft); color: #7c3d06; }
.alert.crit { background: var(--crit-soft); color: var(--crit); }
.alert.info { background: var(--blue-soft); color: #164e94; }

/* Passport scan */
.scanbox { display: grid; gap: 12px; }
.scanbox .shot { width: 100%; max-height: 260px; object-fit: contain; background: var(--sunk); border-radius: 10px; border: 1px solid var(--line); }
.cmp { width: 100%; border-collapse: collapse; font-size: .84rem; }
.cmp th { text-align: left; font-size: .7rem; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 6px 6px; border-bottom: 1px solid var(--line); }
.cmp td { padding: 7px 6px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.cmp td:first-child { width: 26px; }
.cmp td.lbl { color: var(--muted); width: 110px; }
.cmp td.old { color: var(--muted); text-decoration: line-through; }
.cmp tr.same td { opacity: .55; }
.cmp input[type=text] { width: 100%; height: 30px; border: 1px solid var(--line); border-radius: 6px; padding: 0 8px; background: var(--surface); }
.spinner { width: 28px; height: 28px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Stall map */
.blocks { display: grid; gap: 16px; }
.stalls { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 8px; padding: 14px; }
.stall { border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-height: 76px; display: grid; gap: 2px; align-content: start; background: var(--surface); }
.stall.free { background: repeating-linear-gradient(135deg, var(--surface-2), var(--surface-2) 6px, var(--surface) 6px, var(--surface) 12px); color: var(--muted); }
.stall.busy { cursor: pointer; border-left: 3px solid var(--accent); } .stall.busy:hover { background: var(--surface-2); }
.stall.iso { border-left-color: var(--idle); }
.stall small { color: var(--muted); font-size: .72rem; }
.stall b { font-size: .86rem; }

/* Feed sheet */
.sheet td { vertical-align: top; }
.sheet .feedline { display: block; white-space: nowrap; font-size: .82rem; }
.sheet .feedline em { font-style: normal; color: var(--warn); font-weight: 600; }
.bar { height: 6px; border-radius: 99px; background: var(--sunk); overflow: hidden; min-width: 80px; }
.bar i { display: block; height: 100%; background: var(--ok); }
.bar.low i { background: var(--crit); } .bar.mid i { background: var(--warn); }
.feedrow { display: grid; grid-template-columns: 1fr 86px 76px 34px 34px; gap: 6px; align-items: center; }
.feedrow .in { height: 32px; }
.money { font-variant-numeric: tabular-nums; white-space: nowrap; }
.money.neg { color: var(--ok); } .money.pos { color: var(--crit); }

@media print {
  .side, .tools, .noprint, .toast { display: none !important; }
  .app { display: block; } .main { padding: 0; } .card { box-shadow: none; border: 0; }
  body, html { background: #fff; }
  table.t td, table.t th { padding: 6px 8px; }
}

/* Settings: categories on the left, one at a time on the right */
.setlayout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 16px; align-items: start; }
.setnav { display: grid; gap: 2px; position: sticky; top: 16px; }
.setnav a { position: relative; display: grid; gap: 1px; padding: 9px 12px; border-radius: 10px; text-decoration: none; color: var(--ink); border: 1px solid transparent; }
.setnav a span { font-size: .76rem; color: var(--muted); }
.setnav a:hover { background: var(--sunk); }
.setnav a[aria-current="page"] { background: var(--surface); border-color: var(--line); box-shadow: var(--shadow); }
.setnav a[aria-current="page"] b { color: var(--accent-ink); }
.setnav .dot { position: absolute; top: 12px; right: 12px; width: 8px; height: 8px; border-radius: 50%; background: var(--crit); }
.setbody { display: grid; gap: 16px; max-width: 760px; }
@media (max-width: 900px) {
  .setlayout { grid-template-columns: 1fr; }
  .setnav { position: static; display: flex; overflow-x: auto; scrollbar-width: none; gap: 6px; }
  .setnav a { flex: none; padding: 7px 12px; border-color: var(--line); background: var(--surface); }
  .setnav a span { display: none; }
}

/* Plan page + Nexvora console */
.meters { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; }
.meter { display: grid; gap: 6px; } .meter > div:first-child { display: flex; justify-content: space-between; gap: 8px; font-size: .85rem; } .meter span { color: var(--muted); font-variant-numeric: tabular-nums; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }
.plangrid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; padding: 16px; }
.plancard { text-align: left; border: 1px solid var(--line); background: var(--surface); border-radius: 12px; padding: 14px; cursor: pointer; display: grid; gap: 6px; align-content: start; font: inherit; color: inherit; }
.plancard:hover { border-color: #c4ced9; } .plancard[aria-pressed="true"] { border-color: var(--accent); box-shadow: 0 0 0 1px var(--accent); }
.plancard .price { font-size: 1.4rem; font-weight: 700; font-variant-numeric: tabular-nums; } .plancard .price small { font-size: .8rem; font-weight: 500; color: var(--muted); }
.plancard ul { margin: 0; padding-left: 18px; font-size: .84rem; color: var(--muted); }
table.planed { table-layout: fixed; min-width: 860px; }
table.planed td { padding: 10px 12px; vertical-align: middle; }
table.planed th.c, table.planed td.c { text-align: center; }
table.planed input.in { height: 34px; width: 100%; min-width: 0; }
table.planed input.num, .rmin input { text-align: right; font-variant-numeric: tabular-nums; }
table.planed .switch { display: inline-block; vertical-align: middle; }
table.planed tr.changed td { background: var(--accent-soft); }
.plancell { display: flex; align-items: center; gap: 8px; }
.plancell input { flex: 1; }
.plancell code { flex: none; font-size: .7rem; color: var(--muted); background: var(--sunk); border-radius: 6px; padding: 2px 6px; }
.rmin { position: relative; display: block; }
.rmin span { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); font-size: .78rem; color: var(--muted); pointer-events: none; }
.rmin input { padding-left: 34px; }
#planbar:empty { display: none; }

.yearcalc { display: inline-flex; align-items: center; gap: 6px; font-size: .8rem; color: var(--muted); white-space: nowrap; }
.yearcalc input { width: 52px; height: 30px; text-align: center; }
.freeon { display: flex; flex-wrap: wrap; gap: 4px 14px; }
