/* ==========================================================================
   Folio — "Old Paper" design system
   Light and dark tokens follow Silk's color-mode class on <html> (silk-light / silk-dark).
   ========================================================================== */

:root,
.silk-light {
    --paper: #F2E9D8;
    --sheet: #F8F2E6;
    --ink: #2A2017;
    --muted: #6A5947;
    --rule: #DCCDB3;
    --rule-strong: #B9A584;
    --margin: #C9A39A;
    --wax: #8E2E22;
    --wax-hover: #74241A;
    --wax-ink: #FBF4EA;
    --blue: #2E4A6E;
    --gold: #8A6420;
    --olive: #56662F;
    --plum: #6B3A5B;
    --slate: #4C5A63;
    --tint: rgba(142, 46, 34, .06);
    --shadow: rgba(70, 45, 20, .55);
    --focus: rgba(142, 46, 34, .45);
    --tex-blend: multiply;
    --tex-opacity: .38;
    color-scheme: light;
}

.silk-dark {
    --paper: #1B1712;
    --sheet: #241E18;
    --ink: #ECE1CC;
    --muted: #B4A58C;
    --rule: #3A3128;
    --rule-strong: #5A4C3D;
    --margin: #6E3A31;
    --wax: #D27461;
    --wax-hover: #E08A78;
    --wax-ink: #1B1712;
    --blue: #93B3D8;
    --gold: #D3AC5E;
    --olive: #A9B979;
    --plum: #C79BBB;
    --slate: #A9B7C0;
    --tint: rgba(210, 116, 97, .10);
    --shadow: rgba(0, 0, 0, .9);
    --focus: rgba(210, 116, 97, .55);
    --tex-blend: soft-light;
    --tex-opacity: .5;
    color-scheme: dark;
}

/* Before the app script runs, follow the OS preference. */
@media (prefers-color-scheme: dark) {
    :root:not(.silk-light) {
        --paper: #1B1712;
        --sheet: #241E18;
        --ink: #ECE1CC;
        --muted: #B4A58C;
        --rule: #3A3128;
        --rule-strong: #5A4C3D;
    }
}

/* ---------- Base ---------- */

*, *::before, *::after { box-sizing: border-box; }

html, body {
    margin: 0;
    background: var(--paper);
    color: var(--ink);
}

body {
    font-family: 'IBM Plex Sans', system-ui, sans-serif;
    font-size: 14px;
    line-height: 1.45;
    -webkit-font-smoothing: antialiased;
    min-height: 100vh;
}

/* Paper grain over the whole page. */
body::before {
    content: "";
    position: fixed;
    inset: 0;
    background: url("/paper-grain.jpg") center / cover no-repeat;
    mix-blend-mode: var(--tex-blend);
    opacity: var(--tex-opacity);
    pointer-events: none;
    z-index: 0;
}

#root, #_kobweb-root { position: relative; z-index: 1; }

a { color: var(--wax); }
a:hover { color: var(--wax-hover); }

:focus-visible {
    outline: 2px solid var(--focus);
    outline-offset: 2px;
}

h1, h2, h3 { margin: 0; font-family: 'Cormorant Garamond', Georgia, serif; font-weight: 600; }
h1 { font-size: 52px; line-height: 1; letter-spacing: -.005em; }
h2 { font-size: 28px; line-height: 1.15; }
h3 { font-size: 22px; line-height: 1.2; }
p { margin: 0; }

.mono { font-family: 'IBM Plex Mono', ui-monospace, monospace; font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.wax { color: var(--wax); }
.overline {
    font-size: 12px;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: var(--wax);
    font-weight: 600;
}
.label {
    font-size: 11px;
    letter-spacing: .14em;
    text-transform: uppercase;
    color: var(--muted);
}
.serif-italic { font-family: 'Cormorant Garamond', Georgia, serif; font-style: italic; }

/* ---------- App shell ---------- */

.app {
    display: flex;
    flex-wrap: wrap;
    min-height: 100vh;
}

.sidebar {
    flex: 1 1 232px;
    max-width: 260px;
    padding: 28px 20px 24px;
    border-right: 1px solid var(--rule);
    display: flex;
    flex-direction: column;
    gap: 28px;
}

.brand { display: flex; align-items: center; gap: 12px; text-decoration: none; color: var(--ink); }
.brand-name { font-family: 'Cormorant Garamond', serif; font-size: 30px; font-weight: 600; line-height: 1; }
.brand-tagline { font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-top: 4px; }
.seal {
    width: 40px; height: 40px; border-radius: 50%;
    background: var(--wax); color: var(--wax-ink);
    display: flex; align-items: center; justify-content: center;
    font: italic 700 21px 'Cormorant Garamond', serif;
    box-shadow: inset 0 0 0 4px var(--wax), inset 0 0 0 5px color-mix(in srgb, var(--wax-ink) 40%, transparent);
    flex: none;
}

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav-link {
    display: flex; align-items: center; gap: 12px;
    min-height: 44px; padding: 0 12px;
    border-radius: 3px;
    text-decoration: none;
    color: var(--muted);
}
.nav-link:hover { color: var(--ink); background: var(--tint); }
.nav-link.active { color: var(--ink); background: var(--tint); font-weight: 600; box-shadow: inset 2px 0 0 var(--wax); }
.nav-link .lock { margin-left: auto; opacity: .7; }

.sidebar-foot {
    margin-top: auto;
    display: flex; flex-direction: column; gap: 14px;
    padding-top: 18px;
    border-top: 3px double var(--rule-strong);
}

.lang-switch { display: flex; gap: 6px; }
.lang-switch button {
    min-width: 44px; min-height: 36px; padding: 0 10px;
    border-radius: 3px;
    border: 1px solid var(--rule-strong);
    background: transparent; color: var(--ink);
    font: 600 12px 'IBM Plex Mono', monospace; letter-spacing: .06em;
    cursor: pointer;
}
.lang-switch button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }

.user-chip { display: flex; align-items: center; gap: 10px; }
.avatar {
    width: 36px; height: 36px; border-radius: 50%;
    background: var(--blue); color: var(--paper);
    display: flex; align-items: center; justify-content: center;
    font-weight: 600; font-size: 13px; flex: none;
}

.main {
    flex: 999 1 560px;
    min-width: 0;
    padding: 32px 40px 56px;
    display: flex; flex-direction: column; gap: 28px;
}

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; }
.page-head .titles { display: flex; flex-direction: column; gap: 6px; }
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; }

@media (max-width: 760px) {
    .sidebar { max-width: none; border-right: 0; border-bottom: 1px solid var(--rule); gap: 16px; padding: 16px; }
    .nav { flex-direction: row; flex-wrap: wrap; }
    .nav-link span.text { display: none; }
    .sidebar-foot { flex-direction: row; flex-wrap: wrap; align-items: center; border-top: 0; padding-top: 0; }
    .main { padding: 20px 16px 40px; }
    h1 { font-size: 40px; }
}

/* ---------- Buttons ---------- */

.btn {
    display: inline-flex; align-items: center; justify-content: center; gap: 8px;
    height: 44px; padding: 0 16px;
    border-radius: 3px;
    border: 1px solid var(--rule-strong);
    background: transparent; color: var(--ink);
    font: 500 14px 'IBM Plex Sans', sans-serif;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
}
.btn:hover { background: var(--tint); color: var(--ink); }
.btn:disabled { opacity: .45; cursor: not-allowed; filter: saturate(.6); }
.btn-primary { background: var(--wax); border-color: var(--wax); color: var(--wax-ink); font-weight: 600; letter-spacing: .02em; }
.btn-primary:hover { background: var(--wax-hover); border-color: var(--wax-hover); color: var(--wax-ink); }
.btn-outline-wax { border-color: var(--wax); color: var(--wax); font-weight: 600; }
.btn-ghost { border-color: transparent; }
.btn-sm { height: 36px; padding: 0 12px; font-size: 13px; }
.icon-btn { width: 44px; padding: 0; }

.segmented { display: inline-flex; border: 1px solid var(--rule-strong); border-radius: 3px; overflow: hidden; }
.segmented .btn { border: 0; border-radius: 0; }
.segmented .btn + .btn { border-left: 1px solid var(--rule-strong); }
.segmented .btn[aria-pressed="true"] { background: var(--ink); color: var(--paper); }

/* ---------- Surfaces ---------- */

.card {
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: 3px;
    box-shadow: 0 1px 0 var(--rule), 0 14px 28px -22px var(--shadow);
}
.card-pad { padding: 22px; }

.timer-card {
    display: flex; flex-wrap: wrap; align-items: center; gap: 18px 28px;
    padding: 18px 22px;
}
.timer-card .what { flex: 1 1 280px; min-width: 0; display: flex; flex-direction: column; }
.timer-card .what .title { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 600; line-height: 1.2; }
.timer-clock { font: 500 34px 'IBM Plex Mono', monospace; letter-spacing: .02em; font-variant-numeric: tabular-nums; }
.pulse {
    display: inline-flex; align-items: center; gap: 8px;
    font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--wax); font-weight: 600;
}
.pulse::before {
    content: ""; width: 8px; height: 8px; border-radius: 50%;
    background: var(--wax); box-shadow: 0 0 0 4px var(--tint);
}

.stats {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    border-top: 1px solid var(--rule-strong);
    border-bottom: 1px solid var(--rule-strong);
}
.stat { padding: 18px 20px; display: flex; flex-direction: column; gap: 6px; }
.stat + .stat { border-left: 1px solid var(--rule); }
.stat:first-child { padding-left: 0; }
.stat .value { font: 500 30px 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.stat .caption { font-size: 12px; color: var(--muted); }

/* ---------- Ledger table ---------- */

.table-box { overflow-x: auto; }
.ledger { width: 100%; min-width: 860px; border-collapse: collapse; }
.ledger th, .ledger td { padding: 12px 10px; }
.ledger thead tr { border-bottom: 3px double var(--rule-strong); }
.ledger thead th {
    font-size: 12px; font-weight: 600; color: var(--muted); text-align: right;
}
.ledger thead th.first, .ledger thead th.total {
    letter-spacing: .12em; text-transform: uppercase;
}
.ledger .first { text-align: left; padding-left: 18px; border-right: 2px solid var(--margin); font-weight: 400; }
.ledger .total { text-align: right; padding-right: 18px; border-left: 1px solid var(--rule); width: 92px; }
.ledger .action-col { width: 38px; text-align: center; padding: 6px 8px; }
.ledger .action-col .btn { opacity: 0.4; transition: opacity 0.15s ease, color 0.15s ease; }
.ledger tr:hover .action-col .btn { opacity: 1; }
.ledger .action-col .btn:hover { color: var(--wax); }
.ledger tbody tr { border-bottom: 1px solid var(--rule); }
.ledger td { text-align: right; font-family: 'IBM Plex Mono', monospace; font-variant-numeric: tabular-nums; }
.ledger .today { background: var(--tint); }
.ledger thead th.today { color: var(--wax); }
.ledger tfoot tr { border-top: 3px double var(--rule-strong); }
.ledger tfoot th { font-family: 'Cormorant Garamond', serif; font-size: 18px; font-style: italic; font-weight: 600; }
.ledger tfoot td { font-weight: 500; }
.ledger .grand { color: var(--wax); font-weight: 600; }
.ledger .day-num { display: block; font-weight: 400; }

.cell-input {
    width: 64px; height: 34px;
    padding: 0 6px;
    border: 1px solid transparent;
    border-radius: 2px;
    background: transparent;
    color: var(--ink);
    font: 400 14px 'IBM Plex Mono', monospace;
    text-align: right;
}
.cell-input:hover { border-color: var(--rule); }
.cell-input:focus { border-color: var(--rule-strong); background: var(--paper); outline: none; }
.cell-input.saving { opacity: .5; }
.cell-locked { color: var(--muted); }

.row-title { display: flex; align-items: flex-start; gap: 10px; }
.row-title .names { display: flex; flex-direction: column; min-width: 0; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; margin-top: 6px; }
.dot-BLUE { background: var(--blue); }
.dot-WAX { background: var(--wax); }
.dot-OLIVE { background: var(--olive); }
.dot-GOLD { background: var(--gold); }
.dot-PLUM { background: var(--plum); }
.dot-SLATE { background: var(--slate); }
.dot-AMBER { background: var(--gold); }

/* ---------- Lists, bars, badges ---------- */

.list-row {
    display: flex; flex-wrap: wrap; align-items: center; gap: 12px 18px;
    padding: 14px 0;
    border-top: 1px solid var(--rule);
}
.list-row .grow { flex: 1 1 180px; min-width: 0; display: flex; flex-direction: column; }

.bar { height: 6px; background: var(--rule); border-radius: 1px; overflow: hidden; }
.bar > div { height: 100%; background: var(--blue); }
.bar.over > div { background: var(--wax); }

.stamp {
    display: inline-block;
    padding: 3px 10px;
    border: 1px solid currentColor;
    border-radius: 2px;
    font-size: 11px; letter-spacing: .14em; text-transform: uppercase; font-weight: 600;
}
.stamp-gold { color: var(--gold); }
.stamp-olive { color: var(--olive); }
.stamp-blue { color: var(--blue); }
.stamp-wax { color: var(--wax); }

.cols { display: flex; flex-wrap: wrap; gap: 24px; }
.cols > .wide { flex: 3 1 420px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.cols > .narrow { flex: 2 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 4px; }

/* ---------- Forms ---------- */

.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .field > .label-text { font-size: 12px; color: var(--muted); }
.input, .select, textarea.input {
    height: 44px;
    padding: 0 12px;
    border: 1px solid var(--rule-strong);
    border-radius: 3px;
    background: var(--paper);
    color: var(--ink);
    font: 400 14px 'IBM Plex Sans', sans-serif;
    width: 100%;
}
textarea.input { height: auto; min-height: 88px; padding: 10px 12px; resize: vertical; }
/* Browser autofill would otherwise paint fields blue-grey. */
.input:-webkit-autofill,
.input:-webkit-autofill:hover,
.input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--ink);
    -webkit-box-shadow: 0 0 0 1000px var(--paper) inset;
    caret-color: var(--ink);
    transition: background-color 9999s ease-out 0s;
}
.input:focus, .select:focus { outline: 2px solid var(--focus); outline-offset: 0; border-color: var(--wax); }
.check { display: flex; align-items: center; gap: 10px; min-height: 40px; cursor: pointer; }
.check input { width: 18px; height: 18px; accent-color: var(--wax); }

.form-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 18px 16px; align-items: start; max-width: 880px; }
.field .hint { font-size: 12px; color: var(--muted); line-height: 1.35; }
.form-actions { display: flex; flex-wrap: wrap; gap: 10px; }
/* Inline form: fields and the button sit on one baseline (button aligned with the inputs, not the labels). */
.form-row { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 14px 16px; }
.form-row > .field { flex: 1 1 240px; max-width: 360px; }
.form-row > .btn { flex: none; }

.notice {
    padding: 12px 16px;
    border: 1px solid var(--rule-strong);
    border-left: 0;
    border-right: 0;
    background: var(--tint);
}
.error-text { color: var(--wax); font-weight: 500; }

/* ---------- Auth pages ---------- */

.auth-wrap {
    min-height: 100vh;
    display: flex; align-items: center; justify-content: center;
    padding: 32px 16px;
}
.auth-card { width: 100%; max-width: 440px; padding: 36px 36px 30px; display: flex; flex-direction: column; gap: 22px; }
.auth-card .head { display: flex; flex-direction: column; gap: 8px; align-items: flex-start; }
.auth-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Empty states & plans ---------- */

.empty {
    padding: 48px 24px;
    text-align: center;
    display: flex; flex-direction: column; align-items: center; gap: 12px;
    border: 1px dashed var(--rule-strong);
    border-radius: 3px;
}
.empty h2 { font-size: 30px; }
.empty p { max-width: 520px; color: var(--muted); }

.plan-table { width: 100%; min-width: 640px; border-collapse: collapse; }
.plan-table th, .plan-table td { padding: 10px 12px; border-bottom: 1px solid var(--rule); text-align: center; }
.plan-table th:first-child, .plan-table td:first-child { text-align: left; }
.plan-table thead th { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 600; border-bottom: 3px double var(--rule-strong); }
.plan-table .current { background: var(--tint); }
.yes { color: var(--olive); font-weight: 600; }
.no { color: var(--rule-strong); }

.spinner-line { height: 2px; background: linear-gradient(90deg, transparent, var(--wax), transparent); background-size: 200% 100%; animation: slide 1.2s linear infinite; }
@keyframes slide { from { background-position: 200% 0; } to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) { .spinner-line { animation: none; } }

/* ---------- Invoice document (always printed on light paper, in both themes) ---------- */

.doc {
    position: relative;
    max-width: 820px;
    padding: 52px 56px 44px;
    background: #FBF6EC;
    color: #2A2017;
    border: 1px solid #D9C9AE;
    box-shadow: 0 2px 0 #E6D9C2, 0 4px 0 -1px #D9C9AE, 0 30px 50px -30px rgba(40, 25, 10, .6);
    display: flex; flex-direction: column; gap: 26px;
    font-size: 14px;
    overflow: hidden;
}
.doc .mono { font-family: 'IBM Plex Mono', monospace; }
.doc-muted { color: #6A5947; }
.doc-label { display: block; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: #6A5947; }
.doc-strong { display: block; font-weight: 600; font-size: 15px; }
.doc-head {
    display: flex; flex-wrap: wrap; justify-content: space-between; gap: 24px;
    padding-bottom: 22px; border-bottom: 3px double #B9A584;
}
.doc-seller { display: flex; flex-direction: column; gap: 3px; font-size: 13px; max-width: 60%; }
.doc-seller-name { font-family: 'Cormorant Garamond', serif; font-size: 38px; font-weight: 600; line-height: 1.05; color: #2A2017; }
.doc-title-block { display: flex; flex-direction: column; align-items: flex-end; gap: 4px; text-align: right; }
.doc-title { font-family: 'Cormorant Garamond', serif; font-size: 34px; font-style: italic; font-weight: 500; letter-spacing: .03em; color: #8E2E22; }
.doc-number { font-family: 'IBM Plex Mono', monospace; font-size: 13px; }
.doc-stamp-gold { color: #8A6420; margin-top: 6px; }
.doc-stamp-olive { color: #56662F; margin-top: 6px; }
.doc-meta { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 20px; font-size: 13px; }
.doc-meta > div { display: flex; flex-direction: column; gap: 3px; }
.doc-table-box { overflow-x: auto; }
.doc-lines { width: 100%; min-width: 520px; border-collapse: collapse; }
.doc-lines th {
    text-align: left; padding: 10px 0; font-size: 11px; letter-spacing: .14em; text-transform: uppercase;
    color: #6A5947; font-weight: 600; border-bottom: 1px solid #B9A584;
}
.doc-lines td { padding: 12px 0; border-bottom: 1px solid #E3D6BF; vertical-align: top; }
.doc-lines .num { text-align: right; font-family: 'IBM Plex Mono', monospace; white-space: nowrap; padding-left: 14px; }
.doc-bottom { display: flex; flex-wrap: wrap; justify-content: space-between; gap: 28px; }
.doc-pay { flex: 1 1 240px; display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: #4A3D30; }
.doc-totals { flex: 0 1 300px; display: flex; flex-direction: column; gap: 8px; }
.doc-total-row { display: flex; justify-content: space-between; gap: 16px; }
.doc-grand { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; padding-top: 10px; border-top: 3px double #B9A584; }
.doc-grand-caption { font-family: 'Cormorant Garamond', serif; font-size: 22px; font-weight: 600; font-style: italic; }
.doc-grand-value { font-size: 22px; font-weight: 500; color: #8E2E22; }
.doc-foot { display: flex; justify-content: space-between; align-items: center; gap: 20px; padding-top: 18px; border-top: 1px solid #D9C9AE; }
.doc-thanks { font-family: 'Cormorant Garamond', serif; font-style: italic; font-size: 17px; color: #6A5947; }
.doc-seal {
    width: 64px; height: 64px; border-radius: 50%; flex: none;
    background: #8E2E22; color: #FBF4EA;
    display: flex; align-items: center; justify-content: center;
    font: italic 600 22px 'Cormorant Garamond', serif;
    box-shadow: inset 0 0 0 5px #8E2E22, inset 0 0 0 6px rgba(251, 244, 234, .45);
}
@media (max-width: 760px) {
    .doc { padding: 28px 20px; }
    .doc-seller { max-width: none; }
    .doc-meta { grid-template-columns: 1fr; }
}

/* ---------- Invoice editor ---------- */

.editor { display: flex; flex-wrap: wrap; gap: 32px; align-items: flex-start; }
.editor > .doc { flex: 999 1 560px; min-width: 0; }
.editor > .panel { flex: 1 1 300px; min-width: 0; display: flex; flex-direction: column; gap: 16px; padding: 22px; }
.panel .form-grid { max-width: none; grid-template-columns: repeat(auto-fill, minmax(130px, 1fr)); }
.line-edit { display: grid; grid-template-columns: minmax(0, 1fr) 110px 44px; gap: 8px; align-items: center; }
.line-edit .fixed-price { text-align: right; }
.line-edit .time-meta { font-size: 12px; color: var(--muted); grid-column: 1 / -1; margin-top: -4px; }
.status-line { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }

/* ---------- Invoice list ---------- */

.filters { display: inline-flex; flex-wrap: wrap; gap: 6px; }
.filters button {
    min-height: 36px; padding: 0 14px; border-radius: 3px;
    border: 1px solid var(--rule-strong); background: transparent; color: var(--ink);
    font: 500 13px 'IBM Plex Sans', sans-serif; cursor: pointer;
}
.filters button[aria-pressed="true"] { background: var(--ink); color: var(--paper); border-color: var(--ink); }
.ledger a.row-link { color: var(--ink); text-decoration: none; font-weight: 600; }
.ledger a.row-link:hover { color: var(--wax); }

/* ---------- Public client page ---------- */

.public-wrap { min-height: 100vh; padding: 40px 16px 60px; display: flex; flex-direction: column; align-items: center; gap: 20px; }
.public-wrap > .doc { width: 100%; }
.public-bar { width: 100%; max-width: 820px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }

/* ---------- Reports ---------- */

.card-title { font: 600 italic 22px 'Cormorant Garamond', serif; margin: 0; padding: 18px 18px 6px; }
.stat .note { font-size: 12px; }
.chart-card { display: flex; flex-direction: column; gap: 14px; }
.chart-head { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 10px; }
.chart-head h2 { margin: 0; }
.chart-legend { display: flex; flex-wrap: wrap; gap: 16px; font-size: 12px; color: var(--muted); }
.chart-legend > span { display: inline-flex; align-items: center; gap: 6px; }
.swatch { width: 12px; height: 12px; border-radius: 2px; display: inline-block; }
.swatch.billable, .seg.billable { background: var(--blue); }
.swatch.non-billable, .seg.non-billable { background: var(--rule-strong); }
.chart {
    display: flex; align-items: stretch; gap: 4px; height: 220px;
    border-bottom: 1px solid var(--rule-strong);
    background-image: repeating-linear-gradient(to top, transparent 0 calc(25% - 1px), var(--rule) calc(25% - 1px) 25%);
}
.chart-col { flex: 1 1 0; min-width: 16px; display: flex; flex-direction: column; justify-content: flex-end; }
.chart-stack { flex: 1; display: flex; flex-direction: column-reverse; justify-content: flex-start; }
.chart-stack .seg { width: 70%; margin: 0 auto; min-height: 0; }
.chart-stack .seg.billable { border-radius: 2px 2px 0 0; }
.chart-col:hover .seg { filter: brightness(1.12); }
.chart-label { height: 0; overflow: visible; font-size: 11px; color: var(--muted); text-align: center; white-space: nowrap; transform: translateY(6px); }
.chart-card .chart { margin-bottom: 18px; }
.report-table { min-width: 620px; }
.report-name { display: flex; gap: 10px; align-items: flex-start; }
.report-name .sub, .planning-grid .sub, .booking-name .sub { font-size: 12px; }
.bar.share { margin-top: 6px; width: 160px; max-width: 100%; height: 4px; }
.util { display: inline-flex; align-items: center; gap: 10px; justify-content: flex-end; }
.util .bar { width: 90px; }

/* ---------- Planning ---------- */

.planning-grid { min-width: 920px; }
.planning-grid td { padding: 6px; vertical-align: top; }
.planning-grid thead th { text-align: center; font-weight: 500; }
.planning-grid thead th .day-num { font-weight: 600; color: var(--ink); }
.planning-grid thead th.today .day-num { color: var(--wax); }
.plan-cell {
    width: 100%; min-height: 64px; padding: 8px; display: flex; flex-direction: column; gap: 5px; align-items: stretch;
    border: 1px solid var(--rule); border-radius: 3px; background: transparent; color: var(--ink);
    font: 500 13px 'IBM Plex Mono', monospace; cursor: pointer; text-align: left;
}
.plan-cell:hover { border-color: var(--rule-strong); }
.plan-cell.selected { outline: 2px solid var(--ink); outline-offset: -1px; }
.plan-cell .bar { display: block; height: 4px; }
.plan-cell .bar > span { background: var(--blue); }
.plan-cell.load-full .bar > span { background: var(--olive); }
.plan-cell .bar.over > span { background: var(--wax); }
.plan-cell .dots { display: flex; gap: 3px; }
.plan-cell .dots .dot { width: 7px; height: 7px; margin: 0; }
.plan-cell .logged { font: 400 11px 'IBM Plex Sans', sans-serif; color: var(--muted); }
.plan-cell.load-empty .planned { color: var(--muted); }
.plan-cell.load-free, .swatch.load-free { background: color-mix(in srgb, var(--blue) 8%, transparent); }
.plan-cell.load-full, .swatch.load-full { background: color-mix(in srgb, var(--olive) 16%, transparent); }
.plan-cell.load-over, .swatch.load-over { background: color-mix(in srgb, var(--wax) 16%, transparent); }
.swatch.load-free { border: 1px solid var(--blue); }
.swatch.load-full { border: 1px solid var(--olive); }
.swatch.load-over { border: 1px solid var(--wax); }
.booking-editor { display: flex; flex-direction: column; gap: 12px; }
.booking-editor p { margin: 0; }
.booking-row { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--rule); }
.booking-row .dot { margin-top: 0; }
.booking-name { flex: 1; min-width: 0; }
.booking-row.add { border-bottom: 0; flex-wrap: wrap; }
.booking-row.add .select { flex: 1 1 260px; min-width: 0; }
.cell-input { text-align: right; }
.dev-tools { margin-top: 6px; padding-top: 14px; border-top: 1px dashed var(--rule-strong); display: flex; flex-direction: column; gap: 8px; }
.dev-tools p { margin: 0; }

/* ---------- Printed document (shared markup from InvoiceHtml) ---------- */

.doc-preview { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.editor > .doc-preview { flex: 999 1 560px; }
.doc-scroll { overflow-x: auto; max-width: 100%; }
.doc-sheet {
    min-width: 600px; max-width: 820px;
    padding: 48px 52px 44px;
    background: #FBF6EC; color: #2A2017;
    border: 1px solid #D9C9AE;
    box-shadow: 0 2px 0 #E6D9C2, 0 4px 0 -1px #D9C9AE, 0 30px 50px -30px rgba(40, 25, 10, .6);
}
.doc-sheet-classic { background: #FFFFFF; border-color: #CFCFCF; box-shadow: 0 20px 40px -28px rgba(0, 0, 0, .55); }
@media (max-width: 760px) { .doc-sheet { padding: 28px 22px; } }

/* ---------- Templates & details ---------- */

.docs-section { display: flex; flex-direction: column; gap: 10px; }
.docs-section > p { margin: 0; }
.doc-row { justify-content: space-between; }
.doc-row-main { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 10px; min-width: 0; flex: 1 1 260px; }
.doc-row-main .sub { flex-basis: 100%; font-size: 12px; }
.template-editor > .panel { flex: 1 1 360px; max-width: 480px; gap: 12px; }
.panel h3, .profile-editor h3, .card h3 {
    font: italic 600 19px 'Cormorant Garamond', serif;
    margin: 8px 0 0; padding-top: 12px; border-top: 1px solid var(--rule);
}
.profile-editor { display: flex; flex-direction: column; gap: 14px; }
.profile-editor .form-grid, .profile-editor .cols { max-width: 880px; }
.extra-row { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.6fr) 40px; gap: 8px; align-items: center; margin-top: 6px; }
.captions-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.collapsible { border-top: 1px dashed var(--rule-strong); padding-top: 8px; }
.collapsible-head {
    display: inline-flex; align-items: center; gap: 8px;
    background: none; border: 0; padding: 4px 0; cursor: pointer;
    color: var(--ink); font: 600 13px 'IBM Plex Sans', sans-serif;
}
.collapsible-head:hover { color: var(--wax); }
.collapsible-head .chevron { width: 12px; color: var(--muted); }
.collapsible-body { display: flex; flex-direction: column; gap: 10px; padding: 8px 0 4px; }

/* ===== Landing / invite-only onboarding ===== */
.landing {
    max-width: 1040px;
    margin: 0 auto;
    padding: 24px 24px 80px;
    display: flex;
    flex-direction: column;
    gap: 60px;
}
.landing-nav {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 10px 0;
    border-bottom: 1px solid var(--rule);
    flex-wrap: wrap;
}
.landing-nav-links {
    display: flex;
    align-items: center;
    gap: 20px;
    font-size: 14px;
}
.landing-nav-links a {
    color: var(--muted);
    text-decoration: none;
    font-weight: 500;
    transition: color 0.15s;
}
.landing-nav-links a:hover {
    color: var(--ink);
}
.landing-nav-actions {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}
.landing-hero {
    display: flex;
    flex-direction: column;
    gap: 20px;
    text-align: left;
    padding-top: 12px;
}
.landing-badge {
    align-self: flex-start;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 14px;
    border-radius: 999px;
    background: var(--tint);
    border: 1px solid var(--rule-strong);
    color: var(--wax);
    font: 600 13px 'IBM Plex Sans', sans-serif;
    letter-spacing: 0.02em;
}
.landing-hero .seal {
    width: 56px; height: 56px;
    border-radius: 50%;
    background: var(--wax);
    color: var(--wax-ink);
    display: inline-flex; align-items: center; justify-content: center;
    font: 700 28px 'Cormorant Garamond', serif;
    box-shadow: 0 4px 14px var(--shadow);
}
.landing-hero h1 {
    font: italic 600 52px/1.08 'Cormorant Garamond', serif;
    margin: 0;
    color: var(--ink);
    letter-spacing: -0.5px;
    max-width: 820px;
}
.landing-hero p {
    font: 400 18px/1.6 'IBM Plex Sans', sans-serif;
    color: var(--muted);
    max-width: 680px;
    margin: 0;
}
.landing-cta {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
    margin-top: 6px;
}
.landing-cta .btn { min-height: 44px; }

.landing-section-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
    margin-bottom: -16px;
}
.landing-section-head h2 {
    font: italic 600 36px 'Cormorant Garamond', serif;
    margin: 0;
    color: var(--ink);
}
.landing-section-head .sub {
    font: 400 15px/1.5 'IBM Plex Sans', sans-serif;
    color: var(--muted);
    max-width: 620px;
    margin: 0;
}

.landing-features {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 18px;
}
.landing-feature {
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 22px 20px;
    display: flex;
    flex-direction: column;
    gap: 8px;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.landing-feature:hover {
    transform: translateY(-2px);
    border-color: var(--rule-strong);
    box-shadow: 0 6px 18px var(--shadow);
}
.landing-feature .feat-icon {
    width: 38px; height: 38px;
    border-radius: 8px;
    background: var(--tint);
    color: var(--wax);
    display: inline-flex; align-items: center; justify-content: center;
    margin-bottom: 4px;
}
.landing-feature h3 {
    font: 600 16px 'IBM Plex Sans', sans-serif;
    margin: 0;
    color: var(--ink);
}
.landing-feature p {
    font: 400 13.5px/1.55 'IBM Plex Sans', sans-serif;
    color: var(--muted);
    margin: 0;
}

/* Workflow steps */
.landing-steps {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
    gap: 20px;
}
.landing-step {
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: 12px;
    padding: 24px;
    display: flex;
    flex-direction: column;
    gap: 12px;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease;
}
.landing-step:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 18px var(--shadow);
}
.landing-step-num {
    width: 32px; height: 32px;
    border-radius: 50%;
    background: var(--tint);
    color: var(--wax);
    font: 600 15px/32px 'IBM Plex Mono', monospace;
    text-align: center;
    border: 1px solid var(--rule-strong);
}
.landing-step h3 {
    font: 600 17px 'IBM Plex Sans', sans-serif;
    margin: 0;
    color: var(--ink);
}
.landing-step p {
    font: 400 13.5px/1.55 'IBM Plex Sans', sans-serif;
    color: var(--muted);
    margin: 0;
}

/* Demo sandbox banner */
.landing-demo-banner {
    background: linear-gradient(135deg, var(--tint) 0%, var(--sheet) 100%);
    border: 1px solid var(--rule-strong);
    border-radius: 14px;
    padding: 32px 36px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 24px;
    flex-wrap: wrap;
    box-shadow: 0 4px 20px var(--shadow);
}
.landing-demo-banner-content {
    flex: 1 1 360px;
    display: flex;
    flex-direction: column;
    gap: 8px;
}
.landing-demo-banner-content h2 {
    font: italic 600 30px 'Cormorant Garamond', serif;
    margin: 0;
    color: var(--ink);
}
.landing-demo-banner-content p {
    font: 400 14.5px/1.55 'IBM Plex Sans', sans-serif;
    color: var(--muted);
    margin: 0;
}

.landing-pricing {
    display: flex;
    flex-direction: column;
    gap: 24px;
}
.landing-pricing-head {
    display: flex;
    flex-direction: column;
    align-items: center;
    text-align: center;
    gap: 8px;
}
.landing-pricing h2 {
    font: italic 600 34px 'Cormorant Garamond', serif;
    margin: 0;
    color: var(--ink);
}
.landing-pricing .sub {
    font: 400 15px/1.5 'IBM Plex Sans', sans-serif;
    color: var(--muted);
    max-width: 580px;
    margin: 0;
}
.pricing-interval-toggle {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    background: var(--sheet);
    padding: 3px;
    border-radius: 8px;
    border: 1px solid var(--rule);
    margin-top: 6px;
}
.pricing-interval-toggle .btn {
    border: none;
    background: transparent;
    padding: 6px 14px;
    font-size: 13px;
    border-radius: 6px;
    color: var(--muted);
    cursor: pointer;
    transition: background 0.15s, color 0.15s;
}
.pricing-interval-toggle .btn.active {
    background: var(--tint);
    color: var(--wax);
    font-weight: 600;
}
.pricing-discount-badge {
    display: inline-block;
    background: var(--wax);
    color: var(--wax-ink);
    font-size: 11px;
    font-weight: 600;
    padding: 2px 6px;
    border-radius: 4px;
    margin-left: 4px;
    letter-spacing: 0.2px;
}
.pricing-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(215px, 1fr));
    gap: 16px;
    align-items: stretch;
}
.pricing-card {
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: 12px;
    padding: 24px 20px;
    display: flex;
    flex-direction: column;
    gap: 16px;
    position: relative;
    transition: transform 0.15s ease, box-shadow 0.15s ease, border-color 0.15s ease;
}
.pricing-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px var(--shadow);
}
.pricing-card.featured {
    border: 2px solid var(--wax);
    box-shadow: 0 4px 18px var(--shadow);
}
.pricing-badge {
    position: absolute;
    top: -11px;
    right: 16px;
    background: var(--wax);
    color: var(--wax-ink);
    font: 600 11px/1 'IBM Plex Sans', sans-serif;
    padding: 4px 9px;
    border-radius: 999px;
    letter-spacing: 0.4px;
    text-transform: uppercase;
}
.pricing-header {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.pricing-name {
    font: 600 20px 'IBM Plex Sans', sans-serif;
    color: var(--ink);
    margin: 0;
}
.pricing-desc {
    font: 400 13px/1.4 'IBM Plex Sans', sans-serif;
    color: var(--muted);
    min-height: 36px;
    margin: 0;
}
.pricing-price-box {
    display: flex;
    flex-direction: column;
    gap: 4px;
    padding: 12px 0;
    border-top: 1px dashed var(--rule);
    border-bottom: 1px dashed var(--rule);
}
.pricing-amount-row {
    display: flex;
    align-items: baseline;
    gap: 6px;
    flex-wrap: wrap;
}
.pricing-amount {
    font: 700 32px 'Cormorant Garamond', serif;
    color: var(--ink);
    line-height: 1;
}
.pricing-interval {
    font: 400 13px 'IBM Plex Sans', sans-serif;
    color: var(--muted);
}
.pricing-billed-note {
    font: 400 11.5px 'IBM Plex Sans', sans-serif;
    color: var(--muted);
}
.pricing-features {
    list-style: none;
    padding: 0;
    margin: 0;
    display: flex;
    flex-direction: column;
    gap: 9px;
    flex: 1;
}
.pricing-feature-item {
    display: flex;
    align-items: flex-start;
    gap: 8px;
    font: 400 13px/1.4 'IBM Plex Sans', sans-serif;
    color: var(--ink);
}
.pricing-feature-check {
    color: var(--wax);
    font-weight: 700;
    font-size: 14px;
    line-height: 1.2;
    flex-shrink: 0;
}
.pricing-cta {
    margin-top: auto;
}
.pricing-cta .btn {
    width: 100%;
    justify-content: center;
}

.request-form {
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: 12px;
    padding: 32px;
    display: flex;
    flex-direction: column;
    gap: 16px;
}
.request-form h2 {
    font: italic 600 28px 'Cormorant Garamond', serif;
    margin: 0;
    color: var(--ink);
}
.request-form .sub {
    font: 400 14px/1.5 'IBM Plex Sans', sans-serif;
    color: var(--muted);
    margin: 0;
}
.request-form form {
    display: flex;
    flex-direction: column;
    gap: 14px;
}
.request-form textarea.input {
    min-height: 96px;
    resize: vertical;
    font-family: 'IBM Plex Sans', sans-serif;
}
.request-success {
    text-align: center;
    padding: 24px 8px;
}
.request-success h2 {
    font: italic 600 26px 'Cormorant Garamond', serif;
    color: var(--ink);
    margin: 0 0 8px;
}
.request-success p {
    color: var(--muted);
    margin: 0;
}

.landing-foot {
    text-align: center;
    color: var(--muted);
    font-size: 13px;
    padding-top: 8px;
    border-top: 1px solid var(--rule);
}
.landing-foot a { color: var(--wax); }

/* Admin: access requests list */
.request-card {
    background: var(--sheet);
    border: 1px solid var(--rule);
    border-radius: 10px;
    padding: 18px 20px;
    display: flex;
    flex-direction: column;
    gap: 10px;
}
.request-card .req-head {
    display: flex;
    justify-content: space-between;
    align-items: flex-start;
    gap: 12px;
    flex-wrap: wrap;
}
.request-card .req-name {
    font: 600 16px 'IBM Plex Sans', sans-serif;
    color: var(--ink);
}
.request-card .req-email {
    font-size: 13px;
    color: var(--muted);
}
.request-card .req-meta {
    font-size: 12.5px;
    color: var(--muted);
}
.request-card .req-message {
    font-size: 13.5px;
    color: var(--ink);
    background: var(--tint);
    border-radius: 6px;
    padding: 10px 12px;
}
.request-card .req-actions {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
}
.invite-link-box {
    display: flex;
    gap: 8px;
    align-items: center;
    background: var(--paper);
    border: 1px solid var(--rule);
    border-radius: 6px;
    padding: 8px 12px;
    font-family: 'IBM Plex Mono', monospace;
    font-size: 12.5px;
    word-break: break-all;
}
.stamp {
    display: inline-flex;
    align-items: center;
    padding: 2px 10px;
    border-radius: 999px;
    font: 600 11px 'IBM Plex Sans', sans-serif;
    letter-spacing: 0.3px;
    text-transform: uppercase;
}
.stamp-pending { background: var(--tint); color: var(--wax); }
.stamp-approved { background: rgba(86,102,47,.12); color: var(--olive); }
.stamp-rejected { background: rgba(142,46,34,.12); color: var(--wax); }

.filter-bar {
    display: flex;
    gap: 6px;
    flex-wrap: wrap;
    margin-bottom: 16px;
}
.filter-bar button {
    padding: 5px 14px;
    border-radius: 999px;
    border: 1px solid var(--rule);
    background: transparent;
    color: var(--muted);
    font: 500 12.5px 'IBM Plex Sans', sans-serif;
    cursor: pointer;
}
.filter-bar button.active {
    background: var(--wax);
    color: var(--wax-ink);
    border-color: var(--wax);
}

/* ---------- AI assistant widget & setup checklist ---------- */
.assistant-fab {
    position: fixed; right: 20px; bottom: 20px; z-index: 900;
    display: inline-flex; align-items: center; gap: 8px;
    height: 48px; padding: 0 18px; border-radius: 24px;
    background: var(--wax); color: var(--wax-ink); border: 1px solid var(--wax);
    font: 600 14px/1 inherit; cursor: pointer;
    box-shadow: 0 6px 18px -6px var(--shadow);
}
.assistant-fab:hover { background: var(--wax-hover); }
.assistant-fab:focus-visible { outline: 3px solid var(--focus); outline-offset: 2px; }
.assistant-panel {
    position: fixed; right: 20px; bottom: 20px; z-index: 900;
    width: min(400px, calc(100vw - 24px)); height: min(600px, calc(100vh - 40px));
    display: flex; flex-direction: column;
    background: var(--sheet); color: var(--ink);
    border: 1px solid var(--rule-strong); border-radius: 12px;
    box-shadow: 0 18px 48px -12px var(--shadow);
}
.assistant-head {
    display: flex; align-items: center; justify-content: space-between; gap: 8px;
    padding: 10px 12px 10px 16px; border-bottom: 1px solid var(--rule);
}
.assistant-title { display: inline-flex; align-items: center; gap: 8px; font: 600 italic 20px 'Cormorant Garamond', serif; color: var(--wax); }
.assistant-head-actions { display: flex; align-items: center; gap: 4px; }
.assistant-scroll { flex: 1; overflow-y: auto; padding: 14px 14px 6px; display: flex; flex-direction: column; gap: 10px; }
.assistant-msg { max-width: 92%; padding: 10px 12px; border-radius: 10px; font-size: 14px; line-height: 1.45; overflow-wrap: anywhere; }
.assistant-msg p { margin: 0 0 6px; }
.assistant-msg p:last-child { margin-bottom: 0; }
.assistant-msg ul, .assistant-msg ol { margin: 4px 0 6px; padding-left: 20px; }
.assistant-msg code { font-size: 12.5px; padding: 1px 4px; background: var(--tint); border-radius: 3px; }
.assistant-msg-user { align-self: flex-end; background: var(--wax); color: var(--wax-ink); white-space: pre-wrap; }
.assistant-msg-bot { align-self: flex-start; background: var(--paper); border: 1px solid var(--rule); }
.assistant-msg-bot.streaming::after { content: "▍"; color: var(--wax); animation: assistant-blink 1s steps(2) infinite; }
@keyframes assistant-blink { 50% { opacity: 0; } }
.assistant-msg-bot .btn { margin: 4px 6px 0 0; }
.assistant-error { align-self: stretch; max-width: none; background: var(--tint); border: 1px solid var(--wax); color: var(--ink); }
.assistant-suggestions { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; }
.assistant-chip {
    text-align: left; font: inherit; font-size: 13px; color: var(--ink); cursor: pointer;
    background: transparent; border: 1px solid var(--rule-strong); border-radius: 16px; padding: 6px 12px;
}
.assistant-chip:hover { background: var(--tint); border-color: var(--wax); }
.assistant-rate { display: flex; gap: 6px; margin-top: 6px; font-size: 12px; }
.assistant-rate-btn { font: inherit; font-size: 12px; color: var(--muted); cursor: pointer; background: transparent; border: 1px solid transparent; border-radius: 10px; padding: 2px 8px; }
.assistant-rate-btn:hover { color: var(--ink); border-color: var(--rule-strong); }
.assistant-input { display: flex; gap: 8px; align-items: flex-end; padding: 8px 12px; border-top: 1px solid var(--rule); }
.assistant-input textarea { flex: 1; resize: none; min-height: 42px; max-height: 120px; }
.assistant-foot { display: flex; justify-content: space-between; gap: 8px; padding: 0 14px 10px; font-size: 11px; color: var(--muted); line-height: 1.35; }
.assistant-left { white-space: nowrap; }
@media (max-width: 560px) {
    .assistant-fab { right: 12px; bottom: 12px; }
    .assistant-fab-label { display: none; }
    .assistant-fab { width: 48px; padding: 0; justify-content: center; }
    .assistant-panel { right: 0; bottom: 0; width: 100vw; height: 85vh; border-radius: 12px 12px 0 0; }
}
@media print { .assistant-fab, .assistant-panel { display: none; } }

.onboarding-card { margin-bottom: 18px; }
.onboarding-head { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.onboarding-title { font: 600 italic 20px 'Cormorant Garamond', serif; }
.onboarding-bar { height: 6px; background: var(--rule); border-radius: 3px; margin: 10px 0 12px; overflow: hidden; }
.onboarding-bar-fill { height: 100%; background: var(--olive); transition: width .3s; }
.onboarding-steps { display: flex; flex-direction: column; gap: 4px; }
.onboarding-step { display: flex; align-items: center; gap: 10px; min-height: 36px; }
.onboarding-mark {
    flex: none; width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--rule-strong);
    display: inline-flex; align-items: center; justify-content: center; color: var(--wax-ink);
}
.onboarding-step.done .onboarding-mark { background: var(--olive); border-color: var(--olive); }
.onboarding-step.done .onboarding-label { color: var(--muted); text-decoration: line-through; }
.onboarding-label { flex: 1; min-width: 0; }

/* Admin dashboard */
.admin-tabs { display: flex; gap: 6px; margin-bottom: 18px; flex-wrap: wrap; }
.admin-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 12px; }
.admin-section { margin-bottom: 22px; }
.admin-section h2 { font: 600 italic 24px 'Cormorant Garamond', serif; margin: 0 0 12px; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 13px; }
.admin-table th, .admin-table td { text-align: left; padding: 6px 8px; border-bottom: 1px solid var(--rule); }
.admin-table th { color: var(--muted); font-weight: 500; font-size: 12px; }
.admin-table td.num, .admin-table th.num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-feedback { border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px; margin-bottom: 8px; background: var(--paper); }
.admin-feedback .meta { font-size: 12px; color: var(--muted); }
.admin-feedback .q { font-weight: 600; margin: 4px 0; overflow-wrap: anywhere; }
.admin-feedback .a { font-size: 13px; white-space: pre-wrap; overflow-wrap: anywhere; }
.admin-tabs a.btn.active { background: var(--wax); color: var(--wax-ink); border-color: var(--wax); }
