/* ============================== FONTS ============================== */
/* PP Neue Montreal: UI, nav, invoice info, buttons, numbers. Only shipped as .otf by the
   foundry -- served as format('opentype') directly rather than pulling in a conversion
   toolchain for a 3-file set (ponytail: add woff2 if payload size ever becomes a problem). */
@font-face{font-family:'PP Neue Montreal';src:url('/fonts/pp-neue-montreal/NeueMontreal-Regular.otf') format('opentype');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'PP Neue Montreal';src:url('/fonts/pp-neue-montreal/NeueMontreal-Medium.otf') format('opentype');font-weight:500;font-style:normal;font-display:swap}
/* Foundry only cut Regular/Medium/Bold, so Semibold(600) and Black(900) UI-emphasis/hero
   roles have nowhere to resolve to but the Bold face. Declaring Bold across the whole
   600-900 range (instead of a bare 700) means the browser renders those weights straight
   from the Bold outline instead of algorithmically embolding it on top of itself. */
@font-face{font-family:'PP Neue Montreal';src:url('/fonts/pp-neue-montreal/NeueMontreal-Bold.otf') format('opentype');font-weight:600 900;font-style:normal;font-display:swap}
/* PP Neue Montreal Mono: invoice numbers, amounts, due dates -- financial/metadata micro-info.
   Foundry ships 14 styles; only Regular/Medium/Bold pulled in since nothing here sets mono
   italic or thin text (ponytail: add more cuts if a design actually calls for them). */
@font-face{font-family:'PP Neue Montreal Mono';src:url('/fonts/pp-neue-montreal-mono/NeueMontrealMono-Regular.otf') format('opentype');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'PP Neue Montreal Mono';src:url('/fonts/pp-neue-montreal-mono/NeueMontrealMono-Medium.otf') format('opentype');font-weight:500;font-style:normal;font-display:swap}
@font-face{font-family:'PP Neue Montreal Mono';src:url('/fonts/pp-neue-montreal-mono/NeueMontrealMono-Bold.otf') format('opentype');font-weight:700;font-style:normal;font-display:swap}
/* Editorial New: the personality layer -- short, occasional lines ("You got paid."), never body copy. */
@font-face{font-family:'Editorial New';src:url('/fonts/editorial-new/EditorialNew-Regular.woff2') format('woff2');font-weight:400;font-style:normal;font-display:swap}
@font-face{font-family:'Editorial New';src:url('/fonts/editorial-new/EditorialNew-Medium.woff2') format('woff2');font-weight:500;font-style:normal;font-display:swap}

/* ============================== TOKENS ============================== */
:root{
  --bg:#F7F7F4; --shell:#EFEFEB; --surface:#FFFFFF; --surface-2:#F1F1EE; --surface-3:#E7E7E1;
  --border:#E1E1DA; --border-strong:#CFCFC6;
  --fg:#171713; --fg-muted:#68685F; --fg-subtle:#99998F;
  --primary:#161618; --primary-fg:#FFFFFF;
  --accent:#0E9F6E; --accent-fg:#FFFFFF; --accent-soft:#E8F7F0; --accent-soft-fg:#067A52;
  --red:#C9342E; --red-soft:#FBEDEC; --red-soft-fg:#A12620;
  --amber:#A46714; --amber-soft:#FAF1E4; --amber-soft-fg:#86500C;
  --blue:#3267C6; --blue-soft:#EDF2FC; --blue-soft-fg:#264F99;
  --ambient:none;
  --shadow-sm:0 1px 1px rgba(23,23,19,.04),0 1px 2px rgba(23,23,19,.03);
  --shadow:0 1px 2px rgba(23,23,19,.05),0 8px 22px rgba(23,23,19,.06);
  --shadow-md:0 14px 34px rgba(23,23,19,.10);
  --shadow-lg:0 30px 70px rgba(23,23,19,.20);
  --hi:inset 0 1px 0 rgba(255,255,255,.7);
  --r:8px; --r-sm:6px; --r-lg:12px; --r-pill:999px;
  --sans:'PP Neue Montreal',system-ui,-apple-system,'Segoe UI',Roboto,sans-serif;
  --mono:'PP Neue Montreal',system-ui,sans-serif;
  --display:'PP Neue Montreal',system-ui,sans-serif;
  /* PP Neue Montreal only ships Regular/Medium/Bold -- any weight above 500 (600, 650, 700+)
     resolves to the Bold face. Bold at 0 tracking reads cramped/wonky, so bold text gets a
     touch of positive tracking; all-caps labels need more (matches the .04-.08em already used
     on already-tracked uppercase labels elsewhere in this file). */
  --tracking-bold:0;
  --tracking-caps:0;
  /* The mono is a real geometric monospace (not PP Neue Montreal masquerading as one anymore) --
     its glyphs sit tighter at 0 tracking than the sans does, so tabular figures and codes like
     INV-2026-0824 read a little more open. */
  --tracking-mono:0;
}
[data-theme="dark"]{
  --bg:#10110F; --shell:#151713; --surface:#191B17; --surface-2:#22241F; --surface-3:#2B2E28;
  --border:#2D302B; --border-strong:#42463E;
  --fg:#F7F7F2; --fg-muted:#AAA99F; --fg-subtle:#75756B;
  --primary:#FAFAFA; --primary-fg:#161618;
  --accent:#10B981; --accent-fg:#04231A; --accent-soft:rgba(16,185,129,.14); --accent-soft-fg:#34D399;
  --red:#F87171; --red-soft:rgba(248,113,113,.13); --red-soft-fg:#FCA5A5;
  --amber:#FBBF24; --amber-soft:rgba(251,191,36,.13); --amber-soft-fg:#FBBF24;
  --blue:#60A5FA; --blue-soft:rgba(96,165,250,.13); --blue-soft-fg:#93C5FD;
  --ambient:none;
  --shadow-sm:0 1px 2px rgba(0,0,0,.45);
  --shadow:0 1px 3px rgba(0,0,0,.5);
  --shadow-md:0 12px 32px rgba(0,0,0,.55);
  --shadow-lg:0 28px 64px rgba(0,0,0,.7);
  --hi:inset 0 1px 0 rgba(255,255,255,.05);
}
*{box-sizing:border-box;margin:0;padding:0}
html,body{height:100%}
body{font-family:var(--sans);background:var(--bg);color:var(--fg);font-size:14.5px;line-height:1.55;letter-spacing:var(--tracking-bold);-webkit-font-smoothing:antialiased;transition:background .3s,color .3s;position:relative}
body::before{content:"";position:fixed;inset:0;background:var(--ambient);pointer-events:none;z-index:0}
body::after{display:none}
h1,h2,h3,h4{font-weight:600;line-height:1.12;letter-spacing:var(--tracking-bold);text-wrap:balance}
h1{font-family:var(--display);font-weight:500}
p{text-wrap:pretty}
a{color:inherit;text-decoration:none}
button{font-family:inherit;letter-spacing:inherit;cursor:pointer}
/* keyboard focus is visible on EVERY interactive element, not only .btn */
a:focus-visible,button:focus-visible,select:focus-visible,label.check:has(input:focus-visible),input[type=checkbox]:focus-visible,input[type=file]:focus-visible{outline:2px solid var(--accent);outline-offset:2px;border-radius:6px}
/* keyboard users can jump past the sidebar; visually hidden until focused */
.skip-link{position:fixed;top:10px;left:10px;z-index:10000;background:var(--primary);color:var(--primary-fg);padding:9px 14px;border-radius:var(--r-sm);font-weight:600;font-size:13px;transform:translateY(-64px);transition:transform .15s;box-shadow:var(--shadow-md)}
.skip-link:focus-visible{transform:translateY(0)}
.content:focus{outline:none}
/* visually hidden but present for screen readers (table captions, redundant form labels) */
.sr-only{position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0,0,0,0);white-space:nowrap;border:0}
.ws-switcher{display:inline-flex;align-items:center}
input,select,textarea{font-family:inherit;letter-spacing:inherit;font-size:14.5px}
.mono{font-family:var(--mono);font-variant-numeric:tabular-nums;letter-spacing:var(--tracking-mono)}
::selection{background:var(--accent);color:var(--accent-fg)}

/* Landing-only arc preloader. It is a fixed React overlay, so the existing hero keeps its
   exact dimensions and layout while the curved curtain reveals it underneath. */
.arc-preloader{position:fixed;inset:0;z-index:10000;height:100dvh;overflow:hidden;background:var(--fg);color:var(--bg);isolation:isolate}
.arc-preloader-greeting{position:absolute;inset:0;z-index:1;display:grid;place-items:center;padding:24px;text-align:center;pointer-events:none}
.arc-preloader-greeting span{position:absolute;inset:0;display:grid;place-items:center;padding:24px;font-size:clamp(42px,8vw,78px);font-weight:600;line-height:1;letter-spacing:var(--tracking-bold);user-select:none}
.arc-preloader-curtain{position:absolute;inset:0;z-index:2;width:100%;height:100%;pointer-events:none}
.arc-preloader-curtain path{fill:var(--bg)}

/* ============================== LAYOUT ============================== */
#app{display:flex;min-height:100dvh;position:relative;z-index:1;background:var(--bg)}
.sidebar{width:320px;flex:0 0 320px;background:color-mix(in srgb,var(--shell) 92%,transparent);backdrop-filter:blur(20px) saturate(130%);-webkit-backdrop-filter:blur(20px) saturate(130%);border-right:1px solid var(--border);display:flex;flex-direction:column;position:sticky;top:0;height:100dvh}
.brand{display:flex;align-items:center;gap:11px;padding:20px 18px 16px;border-bottom:1px solid color-mix(in srgb,var(--border) 72%,transparent)}
.brand-mark{width:34px;height:34px;border-radius:8px;background:var(--fg);display:grid;place-items:center;flex:0 0 auto;box-shadow:var(--shadow-sm),var(--hi)}
.brand-mark svg{width:18px;height:18px;color:var(--accent)}
.brand-name{font-weight:600;font-size:15.5px;letter-spacing:var(--tracking-bold)}
.brand-sub{font-size:11.5px;color:var(--fg-subtle)}
.nav{padding:14px 12px;display:flex;flex-direction:column;gap:16px;flex:1;overflow-y:auto}
.nav-section{display:flex;flex-direction:column;gap:4px}
.nav-section-label{padding:0 10px 3px;font-size:11px;line-height:1;color:var(--fg-muted);font-weight:600}
.nav-link{display:grid;grid-template-columns:20px minmax(0,1fr) auto;align-items:center;gap:10px;padding:9px 10px;border-radius:var(--r-sm);color:var(--fg-muted);font-weight:500;font-size:14px;transition:background .16s,color .16s,box-shadow .16s,transform .16s;position:relative}
.nav-link svg{width:17px;height:17px;flex:0 0 auto;color:var(--fg-subtle);transition:color .16s,stroke-width .16s}
.nav-link span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nav-link small{display:block;margin-top:1px;color:var(--fg-subtle);font-size:11px;font-weight:500;line-height:1.2;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.nav-link:hover{background:color-mix(in srgb,var(--surface) 74%,transparent);color:var(--fg);transform:translateX(1px)}
.nav-link:hover svg{color:var(--fg-muted)}
.nav-link.active{background:var(--surface);color:var(--fg);box-shadow:var(--shadow-sm),var(--hi)}
.nav-link.active svg{color:var(--accent-soft-fg);stroke-width:2.15}
.nav-link.active::before{content:"";position:absolute;left:-12px;top:8px;bottom:8px;width:3px;border-radius:0 3px 3px 0;background:var(--accent)}
.nav-link .badge{margin-left:auto;background:var(--red);color:#fff;font-size:10.5px;font-weight:700;min-width:18px;height:18px;border-radius:6px;display:grid;place-items:center;padding:0 5px}
[data-theme="dark"] .nav-link .badge{color:#240808}
.nav-foot{padding:13px 14px;border-top:1px solid var(--border);display:flex;align-items:center;justify-content:space-between;gap:8px;background:color-mix(in srgb,var(--surface) 34%,transparent)}
.nav-foot .who{font-size:12px;color:var(--fg-muted);min-width:0;overflow:hidden}
.nav-foot .who b{color:var(--fg);font-weight:600;display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.theme-btn{flex:0 0 auto;width:34px;height:34px;border-radius:var(--r-sm);border:1px solid var(--border);background:var(--surface);color:var(--fg-muted);display:grid;place-items:center;transition:transform .12s,background .16s,border-color .16s,color .16s,box-shadow .16s}
.theme-btn:hover{color:var(--fg);border-color:var(--border-strong);background:var(--surface-2);box-shadow:var(--shadow-sm)}
.theme-btn:active{transform:scale(.96)}
.theme-btn svg{width:16px;height:16px}
.main{flex:1;min-width:0;display:flex;flex-direction:column}
.topbar{display:none}
.content{padding:36px 44px 84px;max-width:1220px;width:100%;margin:0 auto}
.page-head{display:flex;align-items:flex-start;justify-content:space-between;gap:16px;margin-bottom:24px;flex-wrap:wrap}
.page-head h1{font-size:28px}
.page-head p.sub{color:var(--fg-muted);font-size:14px;margin-top:5px;max-width:64ch}

/* ============================== BUTTONS ============================== */
.btn{display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:34px;padding:7px 13px;border-radius:var(--r-sm);border:1px solid var(--border-strong);background:var(--surface);color:var(--fg);font-weight:600;font-size:13.5px;line-height:1.2;transition:transform .12s,background .16s,border-color .16s,box-shadow .16s,color .16s;white-space:nowrap}
.btn svg{width:15px;height:15px}
.btn:hover{background:var(--surface-2);transform:translateY(-1px);box-shadow:var(--shadow-sm)}
.btn:active{transform:translateY(0) scale(.985)}
.btn:focus-visible{outline:2px solid var(--accent);outline-offset:2px}
.btn-primary{background:var(--primary);border-color:var(--primary);color:var(--primary-fg);font-weight:700;box-shadow:0 1px 0 rgba(255,255,255,.18) inset,0 8px 18px rgba(23,23,19,.12)}
.btn-primary:hover{background:var(--primary);opacity:.92}
.btn-accent{background:var(--accent);border-color:var(--accent);color:var(--accent-fg);font-weight:600}
.btn-accent:hover{background:var(--accent);opacity:.92}
.btn-danger{background:var(--surface);border-color:var(--border-strong);color:var(--red)}
.btn-danger:hover{background:var(--red-soft);border-color:var(--red)}
.btn-ghost{background:transparent;border-color:transparent}
.btn-ghost:hover{background:var(--surface-2);box-shadow:none}
.btn-sm{min-height:30px;padding:5px 10px;font-size:13px}
.btn-block{width:100%;justify-content:center}
.btn:disabled{opacity:.45;cursor:not-allowed;transform:none}
.head-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap}
.icon-only{width:32px;padding:0;min-width:32px}

/* ============================== CARDS ============================== */
.card{background:color-mix(in srgb,var(--surface) 96%,transparent);border:1px solid var(--border);border-radius:var(--r);box-shadow:var(--shadow-sm),var(--hi);overflow:hidden}
.card-pad{padding:18px}
.card-head{display:flex;align-items:center;justify-content:space-between;gap:12px;min-height:52px;padding:14px 16px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--surface-2) 36%,transparent)}
.card-head h3{font-size:14.5px;display:flex;align-items:center;gap:9px;font-weight:650}
.card-head h3 svg{width:16px;height:16px;color:var(--fg-muted)}
.grid{display:grid;gap:16px}
.cols-2{grid-template-columns:repeat(2,1fr)}
.cols-3{grid-template-columns:repeat(3,1fr)}
.cols-4{grid-template-columns:repeat(4,1fr)}
/* between the full desktop width and the 900px point where the sidebar itself disappears,
   3-4 equal columns squeeze uncomfortably narrow with the sidebar still taking 264px — give
   KPI/stat grids one extra step down to 2 columns before that. */
@media (max-width:1180px){.cols-3,.cols-4{grid-template-columns:repeat(2,1fr)}}

/* ============================== KPI ============================== */
.kpi{background:color-mix(in srgb,var(--surface) 96%,transparent);border:1px solid var(--border);border-radius:var(--r);padding:17px 18px 16px;box-shadow:var(--shadow-sm),var(--hi);position:relative;overflow:hidden}
.kpi::before{content:"";position:absolute;inset:0 0 auto;height:3px;background:var(--border)}
.kpi.is-accent::before{background:var(--accent)}
.kpi.is-red::before{background:var(--red)}
.kpi .label{font-size:12px;color:var(--fg-muted);font-weight:600;display:flex;align-items:center;gap:7px}
.kpi .label svg{width:14px;height:14px}
.kpi .val{font-family:var(--mono);font-size:30px;font-weight:650;margin-top:11px;letter-spacing:var(--tracking-bold);line-height:1}
.kpi .cur{font-size:14px;color:var(--fg-subtle);font-weight:500;margin-left:3px}
.kpi .meta{font-size:12.5px;color:var(--fg-subtle);margin-top:6px}
.kpi.is-accent .val{color:var(--accent-soft-fg)}
.kpi.is-red .val{color:var(--red)}

/* ============================== PILLS ============================== */
.pill{display:inline;font-size:12px;font-weight:500;line-height:1.45;white-space:normal;border:0;border-radius:0;padding:0;background:none;color:var(--fg-muted)}
.pill svg{width:11px;height:11px}
.status-dot{width:7px;height:7px;border-radius:50%;display:inline-block;box-shadow:0 0 0 2px color-mix(in srgb,currentColor 12%,transparent)}
.status-dot.neutral{background:var(--fg-subtle);color:var(--fg-subtle)}
.status-dot.accent{background:var(--accent);color:var(--accent)}
.status-dot.red{background:var(--red);color:var(--red)}
.status-dot.amber{background:var(--amber);color:var(--amber)}
.status-dot.blue{background:var(--blue);color:var(--blue)}
.pill-neutral,.pill-accent,.pill-red,.pill-amber,.pill-blue{background:none;color:var(--fg-muted);border-color:transparent}
/* success/warn/danger/info are used throughout the admin panel but were never defined, so every
   status pill rendered the same grey -- "Sent" and "Failed" were indistinguishable. Each aliases
   an existing token rather than introducing a new colour. */
.pill-success{color:var(--accent)}
.pill-warn{color:var(--amber)}
.pill-danger{color:var(--red)}
.pill-info{color:var(--blue)}

/* ============================== TABLES ============================== */
.tbl{width:100%;border-collapse:collapse}
.table-card{overflow-x:auto}
.table-card .tbl{min-width:680px}
.table-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 12px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--surface) 86%,transparent);position:sticky;left:0}
.toolbar-label{font-size:12px;font-weight:650;color:var(--fg-muted)}
.filter-group{display:flex;align-items:center;gap:6px;flex-wrap:wrap}
.filter-chip{border:1px solid var(--border);background:var(--surface);color:var(--fg-muted);border-radius:var(--r-sm);padding:5px 9px;font-size:12px;font-weight:650;transition:background .16s,color .16s,border-color .16s,transform .12s}
.filter-chip:hover{background:var(--surface-2);color:var(--fg)}
.filter-chip.active{background:var(--fg);color:var(--bg);border-color:var(--fg)}
.ax-table th{position:sticky;top:0;z-index:1}
.row-actions{text-align:right;width:42px}
.tbl th{text-align:left;font-size:11px;text-transform:uppercase;letter-spacing:var(--tracking-caps);color:var(--fg-subtle);font-weight:700;padding:11px 16px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--surface-2) 42%,transparent)}
.tbl td{padding:14px 16px;border-bottom:1px solid var(--border);font-size:14px;vertical-align:middle}
.tbl tr:last-child td{border-bottom:none}
.tbl tbody tr.clickable{cursor:pointer;transition:background .12s}
.tbl tbody tr.clickable:hover{background:var(--surface-2)}
.tbl td .sub{color:var(--fg-subtle);font-size:12.5px}
.tbl .num{text-align:right;font-family:var(--mono);font-variant-numeric:tabular-nums}

/* ============================== ALERTS ============================== */
.alert{display:flex;gap:14px;margin:10px 12px 0;padding:13px 14px;border:1px solid var(--border);border-radius:var(--r);background:var(--surface);align-items:flex-start;box-shadow:var(--shadow-sm)}
.alert:last-child{margin-bottom:12px}
.alert-ico{width:34px;height:34px;border-radius:var(--r-sm);display:grid;place-items:center;flex:0 0 auto;border:1px solid transparent}
.alert-ico svg{width:18px;height:18px}
.alert-ico.red{background:var(--red-soft);color:var(--red-soft-fg);border-color:color-mix(in srgb,var(--red) 18%,transparent)}
.alert-ico.amber{background:var(--amber-soft);color:var(--amber-soft-fg);border-color:color-mix(in srgb,var(--amber) 20%,transparent)}
.alert-ico.blue{background:var(--blue-soft);color:var(--blue-soft-fg);border-color:color-mix(in srgb,var(--blue) 18%,transparent)}
.alert-ico.accent{background:var(--accent-soft);color:var(--accent-soft-fg);border-color:color-mix(in srgb,var(--accent) 18%,transparent)}
.alert-body{flex:1;min-width:0}
.alert-body .t{font-weight:600;font-size:14px;display:flex;align-items:center;gap:9px;flex-wrap:wrap}
.alert-body .d{color:var(--fg-muted);font-size:13px;margin-top:2px}
.alert-money{font-family:var(--mono);font-weight:600;color:var(--accent-soft-fg);font-size:14px}
.alert-actions{display:flex;gap:8px;align-items:center;flex-wrap:wrap;margin-top:11px}

/* ============================== FORMS ============================== */
.field{margin-bottom:14px}
.field label{display:block;font-size:13px;font-weight:500;margin-bottom:6px;color:var(--fg)}
.field label .req{color:var(--red)}
.field .hint{font-size:12.5px;color:var(--fg-muted);margin-top:6px}
.input,select.input,textarea.input{width:100%;padding:9px 11px;border:1px solid var(--border-strong);border-radius:var(--r-sm);background:var(--surface);color:var(--fg);transition:border .15s,box-shadow .15s,background .15s}
.input::placeholder{color:var(--fg-subtle)}
.input:focus,select.input:focus,textarea.input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
textarea.input{resize:vertical;min-height:72px;line-height:1.5}
.field-row{display:flex;gap:12px}
.field-row>*{flex:1}
.check{display:flex;align-items:center;gap:9px;cursor:pointer;font-weight:500;font-size:14px}
.check input{width:16px;height:16px;accent-color:var(--accent);cursor:pointer}
.seg{display:flex;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:3px;gap:3px}
.seg button{flex:1;border:none;background:transparent;padding:7px 10px;border-radius:6px;font-weight:600;font-size:12.5px;color:var(--fg-muted);transition:all .15s}
.seg button.on{background:var(--surface);color:var(--fg);box-shadow:var(--shadow-sm),var(--hi)}

/* ============================== MODAL ============================== */
.modal-scrim{position:fixed;inset:0;background:rgba(10,10,11,.58);-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px);display:flex;align-items:flex-start;justify-content:center;padding:42px 16px;z-index:1000;overflow-y:auto;animation:fadeBlur .16s ease}
.modal{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow-lg);width:100%;max-width:540px;animation:pop .22s cubic-bezier(.2,.9,.3,1);margin:auto 0;overflow:hidden}
.modal.wide{max-width:720px}
.modal-head{display:flex;align-items:center;justify-content:space-between;padding:18px 20px 12px}
.modal-head h3{font-size:17px}
.modal-head .x{border:none;background:var(--surface-2);width:30px;height:30px;border-radius:var(--r-sm);display:grid;place-items:center;color:var(--fg-muted)}
.modal-head .x:hover{background:var(--surface-3);color:var(--fg)}
.modal-head .x svg{width:16px;height:16px}
.modal-body{padding:4px 20px 6px;max-height:64vh;overflow-y:auto}
.modal-foot{padding:14px 20px 18px;display:flex;gap:9px;justify-content:flex-end;border-top:1px solid var(--border);margin-top:10px;flex-wrap:wrap}
@keyframes fade{from{opacity:0}to{opacity:1}}
@keyframes fadeBlur{from{opacity:0;-webkit-backdrop-filter:blur(0);backdrop-filter:blur(0)}to{opacity:1;-webkit-backdrop-filter:blur(4px);backdrop-filter:blur(4px)}}
@keyframes pop{from{opacity:0;transform:translateY(10px) scale(.98)}to{opacity:1;transform:none}}

/* ============================== ASTRYX-STYLE OVERLAYS ============================== */
.boo span,.drawer-mascot span{display:block;width:18px;height:18px;border-radius:50%;background:#F4B69E;position:relative}
.boo span::before,.drawer-mascot span::before{content:"";position:absolute;left:4px;top:7px;width:3px;height:3px;border-radius:50%;background:#171713;box-shadow:7px 0 0 #171713}
.boo span::after,.drawer-mascot span::after{content:"";position:absolute;left:5px;right:5px;bottom:4px;height:2px;border-radius:2px;background:#0E9F6E}

/* The supplied FloatingActionMenu component keeps its original Framer Motion structure and
   utility-class strings. These native rules provide the matching utility behavior without
   adding Tailwind to the existing Resiboo runtime. */
.resiboo-floating-action-menu{position:fixed;right:32px;bottom:32px;z-index:500}
.resiboo-floating-action-menu.is-hidden{display:none}
.rb-ui-button{appearance:none;border:0;color:#fff;font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent}
.resiboo-floating-action-menu>.rb-ui-button{display:grid;width:40px;height:40px;padding:0;place-items:center;border-radius:999px;background:rgba(17,17,17,.596);box-shadow:0 0 20px rgba(0,0,0,.2);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);transition:background .16s ease,box-shadow .16s ease}
.resiboo-floating-action-menu>.rb-ui-button:hover{background:rgba(17,17,17,.82);box-shadow:0 0 24px rgba(0,0,0,.26)}
.resiboo-floating-action-menu>.rb-ui-button svg{display:block;width:24px;height:24px}
.resiboo-floating-action-menu>div{position:absolute;right:0;bottom:48px;margin-bottom:8px}
.resiboo-floating-action-menu>div>div{display:flex;flex-direction:column;align-items:flex-end;gap:8px}
.resiboo-floating-action-menu>div>div>div{display:flex}
.resiboo-floating-action-menu .rb-ui-button--sm{display:flex;min-height:36px;align-items:center;gap:8px;padding:8px 12px;border:0;border-radius:12px;background:rgba(17,17,17,.596);box-shadow:0 0 20px rgba(0,0,0,.2);font-size:13px;font-weight:600;line-height:1;white-space:nowrap;backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);transition:background .16s ease,transform .16s ease}
.resiboo-floating-action-menu .rb-ui-button--sm:hover{background:rgba(17,17,17,.82);transform:translateY(-1px)}
.resiboo-floating-action-menu .rb-ui-button--sm svg{width:16px;height:16px;flex:none}
.resiboo-floating-action-menu .rb-ui-button:focus-visible{outline:2px solid var(--accent);outline-offset:3px}
[data-tip]{position:relative}
[data-tip]::after{content:attr(data-tip);position:absolute;right:calc(100% + 10px);top:50%;transform:translateY(-50%) translateX(4px);opacity:0;pointer-events:none;white-space:nowrap;padding:6px 8px;border-radius:7px;background:var(--fg);color:var(--bg);font-size:11.5px;font-weight:650;box-shadow:var(--shadow-md);transition:opacity .15s,transform .15s;z-index:3000}
[data-tip]:hover::after,[data-tip]:focus-visible::after{opacity:1;transform:translateY(-50%)}
.tip-link{border-bottom:1px dotted currentColor;color:var(--accent-soft-fg);cursor:help}
.ax-command{display:flex;flex-direction:column;gap:12px}
.command-input-wrap{display:flex;align-items:center;gap:10px;padding:10px 12px;border:1px solid var(--border-strong);border-radius:14px;background:var(--surface-2);box-shadow:var(--shadow-sm),var(--hi)}
.command-input-wrap svg{width:17px;height:17px;color:var(--accent-soft-fg);flex:0 0 auto}
.command-input{width:100%;border:0;background:transparent;color:var(--fg);outline:0;font-size:16px;font-weight:500}
.command-input::placeholder{color:var(--fg-subtle)}
.command-hint{display:flex;gap:6px;flex-wrap:wrap;color:var(--fg-subtle);font-size:11.5px}
.command-hint span,.cmd-item kbd{border:1px solid var(--border);background:var(--surface);border-radius:6px;padding:2px 6px;font-family:var(--mono);font-size:10.5px;color:var(--fg-muted)}
.cmd-list,.ps-list{display:flex;flex-direction:column;gap:7px;max-height:420px;overflow-y:auto}
.cmd-item,.ps-item,.assistant-action{display:grid;grid-template-columns:34px minmax(0,1fr) auto;align-items:center;gap:11px;width:100%;text-align:left;border:1px solid var(--border);background:var(--surface);border-radius:12px;padding:10px 11px;color:var(--fg);transition:background .16s,border-color .16s,transform .12s,box-shadow .16s}
.cmd-item:hover,.ps-item:hover,.assistant-action:hover{background:var(--surface-2);border-color:var(--border-strong);transform:translateY(-1px);box-shadow:var(--shadow-sm)}
.cmd-ico{width:34px;height:34px;border-radius:10px;background:var(--accent-soft);color:var(--accent-soft-fg);display:grid;place-items:center}
.cmd-ico svg{width:16px;height:16px}
.cmd-item b,.ps-item b,.assistant-action b{display:block;font-size:13.5px;font-weight:650;letter-spacing:var(--tracking-bold)}
.cmd-item small,.ps-item small,.assistant-action small{display:block;margin-top:1px;font-size:12px;color:var(--fg-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.ps-kind{font-size:10.5px;font-weight:750;text-transform:uppercase;letter-spacing:var(--tracking-caps);color:var(--fg-subtle);border:1px solid var(--border);border-radius:6px;padding:2px 6px}
.search-empty .empty{margin:0}
.ax-drawer-scrim{position:fixed;inset:0;z-index:1200;background:rgba(10,10,11,.42);-webkit-backdrop-filter:blur(5px);backdrop-filter:blur(5px);display:flex;justify-content:flex-end;animation:fade .16s ease}
.ax-drawer{width:min(420px,calc(100vw - 24px));height:100%;background:var(--surface);border-left:1px solid var(--border);box-shadow:var(--shadow-lg);display:flex;flex-direction:column;animation:drawerIn .24s cubic-bezier(.2,.9,.3,1)}
@keyframes drawerIn{from{opacity:0;transform:translateX(18px)}to{opacity:1;transform:none}}
.drawer-head{display:grid;grid-template-columns:44px 1fr 34px;gap:12px;align-items:start;padding:18px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--surface-2) 42%,transparent)}
.drawer-head h3{font-size:17px}
.drawer-head p{font-size:12.5px;color:var(--fg-muted);margin-top:3px;line-height:1.45}
.drawer-head .x{width:32px;height:32px;border:1px solid var(--border);border-radius:9px;background:var(--surface);color:var(--fg-muted);display:grid;place-items:center}
.drawer-mascot{width:44px;height:44px;border-radius:8px;display:grid;place-items:center;background:var(--accent-soft);border:1px solid var(--border)}
.drawer-body{padding:16px;display:flex;flex-direction:column;gap:10px;overflow:auto}
.assistant-action{grid-template-columns:34px 1fr}
.assistant-action>svg{width:18px;height:18px;color:var(--accent-soft-fg);justify-self:center}
.assistant-card{border:1px solid var(--border);border-radius:14px;background:var(--surface-2);padding:13px 14px}
.assistant-card.accent{background:var(--accent-soft);border-color:var(--border)}
.assistant-card b{display:block;font-size:13.5px;margin-bottom:3px}
.assistant-card span{font-size:12.5px;color:var(--fg-muted);line-height:1.5}
.menu-panel{display:flex;flex-direction:column;gap:8px}

/* ============================== TOAST ============================== */
#toast-root{position:fixed;bottom:20px;right:20px;z-index:2000;display:flex;flex-direction:column;gap:9px}
.toast{background:var(--primary);color:var(--primary-fg);padding:12px 16px;border-radius:var(--r-sm);box-shadow:var(--shadow-lg);font-weight:500;font-size:13.5px;display:flex;align-items:center;gap:10px;max-width:360px;animation:slidein .25s cubic-bezier(.2,.9,.3,1)}
.toast svg{width:17px;height:17px;flex:0 0 auto;color:var(--accent)}
@keyframes slidein{from{opacity:0;transform:translateX(16px)}to{opacity:1;transform:none}}

/* ============================== MISC ============================== */
.row-between{display:flex;align-items:center;justify-content:space-between;gap:12px}
.muted{color:var(--fg-muted)}
.empty{text-align:center;padding:34px 20px;color:var(--fg-muted);border:1px dashed var(--border-strong);border-radius:var(--r);background:color-mix(in srgb,var(--surface-2) 58%,transparent)}
.empty svg{width:34px;height:34px;color:var(--fg-subtle);margin-bottom:12px}
.empty h4{font-family:var(--display);font-weight:500;font-size:16px;color:var(--fg);margin-bottom:5px}
.empty p{max-width:42ch;margin:0 auto}
.empty .btn{margin-top:14px}
.mascot-empty{position:relative;overflow:hidden;padding-top:42px}
.mascot-empty::before{display:none}
.boo{width:42px;height:42px;margin:0 auto 12px;border-radius:14px;display:grid;place-items:center;background:var(--surface);border:1px solid var(--border);box-shadow:var(--shadow-sm),var(--hi)}
.mascot-empty>svg{display:none}
.card>.empty{margin:12px}
.tag-row{display:flex;flex-wrap:wrap;gap:6px;align-items:center}
.back-link{display:inline-flex;align-items:center;gap:6px;color:var(--fg-muted);font-weight:500;font-size:13px;margin-bottom:14px}
.back-link:hover{color:var(--fg)}
.back-link svg{width:15px;height:15px}
.li{display:grid;grid-template-columns:1fr auto;gap:10px;padding:11px 0;border-bottom:1px solid var(--border);font-size:14px;align-items:center}
.li:last-child{border-bottom:none}
.li .desc .d2{color:var(--fg-muted);font-size:12.5px;margin-top:2px}
.li .amt{font-family:var(--mono);font-weight:600;text-align:right;white-space:nowrap}
.callout{border-radius:var(--r);padding:11px 13px;font-size:13px;line-height:1.5;border:1px solid transparent}
.callout svg,.hint svg{vertical-align:-.16em}
.callout.red{background:var(--red-soft);color:var(--red-soft-fg);border-color:color-mix(in srgb,var(--red) 18%,transparent)}
.callout.blue{background:var(--blue-soft);color:var(--blue-soft-fg);border-color:color-mix(in srgb,var(--blue) 18%,transparent)}
.callout.amber{background:var(--amber-soft);color:var(--amber-soft-fg);border-color:color-mix(in srgb,var(--amber) 20%,transparent)}
.callout.accent{background:var(--accent-soft);color:var(--accent-soft-fg);border-color:color-mix(in srgb,var(--accent) 18%,transparent)}

/* bars / meters */
.bar{height:8px;border-radius:var(--r-pill);background:var(--surface-3);overflow:hidden;display:flex;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--border-strong) 55%,transparent)}
.bar > span{display:block;height:100%;transition:width .35s cubic-bezier(.16,1,.3,1)}
.bar .used{background:var(--accent)}
.bar .over{background:var(--red)}
.riskmeter{display:flex;gap:4px;margin-top:4px}
.riskmeter i{height:6px;flex:1;border-radius:3px;background:var(--surface-3)}
.riskmeter i.on-accent{background:var(--accent)}
.riskmeter i.on-blue{background:var(--blue)}
.riskmeter i.on-amber{background:var(--amber)}
.riskmeter i.on-red{background:var(--red)}

/* forecast */
.fc{display:flex;align-items:flex-end;gap:14px;height:150px;padding-top:8px}
.fc-col{flex:1;display:flex;flex-direction:column;align-items:center;gap:8px;height:100%;justify-content:flex-end}
.fc-bar{width:100%;max-width:64px;background:var(--accent);border-radius:4px 4px 0 0;min-height:6px;position:relative;transition:height .5s cubic-bezier(.16,1,.3,1)}
.fc-val{font-family:var(--mono);font-size:12px;font-weight:600;color:var(--fg)}
.fc-lbl{font-size:12px;color:var(--fg-muted);font-weight:500}

/* stepper */
.stepper{display:flex;flex-direction:column}
.step{display:flex;gap:13px;position:relative;padding-bottom:16px}
.step:last-child{padding-bottom:0}
.step:not(:last-child)::before{content:"";position:absolute;left:14px;top:30px;bottom:-2px;width:1.5px;background:var(--border-strong)}
.step.done:not(:last-child)::before{background:var(--accent)}
.step-dot{width:29px;height:29px;border-radius:50%;flex:0 0 auto;display:grid;place-items:center;background:var(--surface-2);color:var(--fg-subtle);font-weight:600;font-size:12px;border:1.5px solid var(--border-strong);z-index:1}
.step.done .step-dot{background:var(--accent);border-color:var(--accent);color:var(--accent-fg)}
.step.done .step-dot svg{width:14px;height:14px}
.step.active .step-dot{background:var(--surface);border-color:var(--accent);color:var(--accent-soft-fg);box-shadow:0 0 0 4px var(--accent-soft)}
.step-body{flex:1;padding-top:3px;min-width:0}
.step-body .st{font-weight:600;font-size:13.5px;display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.step-body .sd{font-size:12.5px;color:var(--fg-muted);margin-top:1px}

/* deliverable gate */
.gate{border:1px solid var(--border);border-radius:var(--r-sm);overflow:hidden}
.gate-vis{height:128px;display:grid;place-items:center;position:relative}
.gate-vis.locked{background:var(--surface-2)}
.gate-vis.unlocked{background:var(--accent-soft)}
.gate-vis .lockwrap{text-align:center;color:var(--fg-muted);z-index:2}
.gate-vis.unlocked .lockwrap{color:var(--accent-soft-fg)}
.gate-vis .lockwrap svg{width:28px;height:28px;margin-bottom:6px}
.gate-wm{position:absolute;inset:0;display:grid;place-items:center;pointer-events:none;overflow:hidden}
.gate-wm span{font-weight:700;font-size:24px;color:rgba(120,120,128,.18);transform:rotate(-16deg);letter-spacing:var(--tracking-bold);white-space:nowrap}
.gate-foot{padding:12px 14px;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}

/* invoice doc */
.doc{background:var(--surface);border:1px solid var(--border);border-radius:var(--r);padding:40px 42px;max-width:760px;margin:0 auto;box-shadow:var(--shadow)}
.doc-top{display:flex;justify-content:space-between;align-items:flex-start;gap:24px;flex-wrap:wrap}
.doc h2{font-size:26px}
.doc .biz{font-size:13px;color:var(--fg-muted);line-height:1.55}
.doc .biz strong{color:var(--fg);font-size:15px;font-weight:600}
.doc-meta{text-align:right;font-size:13px;color:var(--fg-muted)}
.doc-meta .n{font-family:var(--mono);font-weight:600;color:var(--fg);font-size:16px}
.bill-grid{display:grid;grid-template-columns:1fr 1fr;gap:22px;margin:26px 0 20px}
.bill-grid .lbl{font-size:10.5px;text-transform:uppercase;letter-spacing:var(--tracking-caps);color:var(--fg-subtle);font-weight:600;margin-bottom:5px}
.li-group{margin-top:16px}
.li-group .gh{font-size:11px;text-transform:uppercase;letter-spacing:var(--tracking-caps);font-weight:600;color:var(--fg);padding:8px 0 7px;border-bottom:1.5px solid var(--fg);display:flex;justify-content:space-between}
.li-group .gh .mono{color:var(--fg-muted);font-weight:600}
.totals{margin-top:18px;margin-left:auto;max-width:300px}
.totals .tr{display:flex;justify-content:space-between;padding:5px 0;font-size:13.5px;color:var(--fg-muted)}
.totals .tr .mono{color:var(--fg)}
.totals .tr.grand{border-top:1.5px solid var(--fg);margin-top:6px;padding-top:11px;font-weight:600;font-size:18px;color:var(--fg)}
.totals .tr.grand .mono{font-size:18px}
.doc-note{font-size:12.5px;color:var(--fg-muted);margin-top:22px;border-top:1px dashed var(--border-strong);padding-top:14px}

/* entrance motion */
@media (prefers-reduced-motion:no-preference){
  .stagger>*{animation:rise .45s cubic-bezier(.16,1,.3,1) both}
  .stagger>*:nth-child(1){animation-delay:.02s}.stagger>*:nth-child(2){animation-delay:.06s}
  .stagger>*:nth-child(3){animation-delay:.10s}.stagger>*:nth-child(4){animation-delay:.14s}
  .stagger>*:nth-child(5){animation-delay:.18s}.stagger>*:nth-child(6){animation-delay:.22s}
  .stagger>*:nth-child(7){animation-delay:.26s}.stagger>*:nth-child(8){animation-delay:.30s}
  /* table rows reveal one at a time instead of the whole table fading in as a single block */
  .tbl tbody tr{animation:rowIn .35s cubic-bezier(.16,1,.3,1) both}
  .tbl tbody tr:nth-child(1){animation-delay:.02s}.tbl tbody tr:nth-child(2){animation-delay:.05s}
  .tbl tbody tr:nth-child(3){animation-delay:.08s}.tbl tbody tr:nth-child(4){animation-delay:.11s}
  .tbl tbody tr:nth-child(5){animation-delay:.14s}.tbl tbody tr:nth-child(6){animation-delay:.17s}
  .tbl tbody tr:nth-child(7){animation-delay:.20s}.tbl tbody tr:nth-child(8){animation-delay:.23s}
  .tbl tbody tr:nth-child(9){animation-delay:.26s}.tbl tbody tr:nth-child(10){animation-delay:.29s}
  .tbl tbody tr:nth-child(n+11){animation-delay:.32s}
}
@keyframes rise{from{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}
@keyframes rowIn{from{opacity:0;transform:translateY(6px)}to{opacity:1;transform:none}}
@media (prefers-reduced-motion:reduce){*{animation:none!important;transition:none!important}}
@media (prefers-reduced-transparency:reduce){
  .sidebar,.topbar,.mobile-nav,.modal-scrim,.ax-drawer-scrim,.ob-scrim,.dashboard-main .topbar{backdrop-filter:none!important;-webkit-backdrop-filter:none!important}
}

/* ============================== RESPONSIVE ============================== */
@media (max-width:900px){
  .cols-2,.cols-3,.cols-4{grid-template-columns:1fr}
  #app{background:var(--bg)}
  .sidebar{display:none}
  .topbar{display:flex;align-items:center;justify-content:space-between;padding:11px 16px;background:color-mix(in srgb,var(--surface) 86%,transparent);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border-bottom:1px solid var(--border);position:sticky;top:0;z-index:50}
  .content{padding:18px 16px 88px}
  .doc{padding:24px 18px}
  .bill-grid{grid-template-columns:1fr}
  .field-row{flex-direction:column;gap:0}
  .mobile-nav{display:flex!important}
}
.mobile-nav{display:none;position:fixed;bottom:0;left:0;right:0;background:color-mix(in srgb,var(--surface) 90%,transparent);-webkit-backdrop-filter:blur(16px);backdrop-filter:blur(16px);border-top:1px solid var(--border);z-index:100;justify-content:space-around;padding:7px 4px 9px}
.mobile-nav a{display:flex;flex-direction:column;align-items:center;gap:3px;color:var(--fg-subtle);font-size:10px;font-weight:500;padding:4px 8px;border-radius:var(--r-sm);flex:1}
.mobile-nav a svg{width:20px;height:20px}
.mobile-nav a.active{color:var(--accent-soft-fg);background:var(--accent-soft)}
.topbar-l{display:flex;align-items:center;gap:9px}
.topbar-r{display:flex;align-items:center;gap:8px}
.topbar-mark{width:28px;height:28px;border-radius:6px;background:var(--accent);display:grid;place-items:center}
.topbar-mark svg{width:15px;height:15px;color:#fff}

/* payment panel + QR reconciler */
.paygrid{display:grid;grid-template-columns:auto 1fr;gap:26px;align-items:center}
.qrwrap{display:flex;flex-direction:column;align-items:center}
.qrwrap svg,.qrwrap img{box-shadow:var(--shadow-sm);border:1px solid var(--border);border-radius:12px}
.paydetails{min-width:0}
.payrow{display:flex;flex-direction:column;gap:1px;padding:9px 0;border-bottom:1px solid var(--border)}
.payrow:first-child{padding-top:0}
.payrow>span.muted{font-size:11px;text-transform:uppercase;letter-spacing:0}
.payrow b{font-family:var(--mono);font-size:15px;font-variant-numeric:tabular-nums;letter-spacing:var(--tracking-bold)}
.paysub{font-size:12px;color:var(--fg-subtle)}
@media (max-width:560px){.paygrid{grid-template-columns:1fr;justify-items:center}.paydetails{width:100%}}

/* print: remove the app chrome from the flow and print ONLY the invoice document, clean and on
   white in both light and dark theme (Print -> Save as PDF). Using display:none (not visibility)
   means hidden content reserves no space, so there are no blank pages or overlap. */
@media print{
  /* No @page here on purpose (Design/Data Split §12 5b): the kernel emits its own, naming the
     real sheet and margin:0, because the template owns the page box. This block keeps what it
     always owned, which is hiding app chrome. */
  html,body{background:#fff!important;margin:0!important;padding:0!important}
  body::before,body::after{display:none!important}          /* kill ambient glow + film grain */
  /* Everything that is position:fixed must be listed here explicitly — fixed elements ignore
     the normal document flow, so they keep floating on top of every printed page otherwise.
     This is what caused the stray floating icon cluster and the near-black square (the
     toolbelt's primary button, background:var(--fg)) on printed/PDF-exported invoices. */
  .sidebar,.topbar,.mobile-nav,.nav-foot,.back-link,.page-head,.alert,.kpi,.grid,.stepper,.card:not(.doc),
  .resiboo-floating-action-menu,#toast-root,#modal-root,#ld-orb-bg,.skip-link,[data-tip]::after{display:none!important}
  #app{display:block!important}
  .main,.content{display:block!important;margin:0!important;padding:0!important;max-width:none!important;width:auto!important}
  /* Strips the on-screen "card floating on a colored page" chrome from the OTHER surfaces that
     still use .doc as a sheet of paper (the report and legal pages). The invoice document itself
     no longer lives here: since Phase 5b the kernel renders it into .doc-kernel and owns its own
     print geometry, so nothing below competes with it. --surface/--border/--fg stay pinned to
     their light values because printing while the app is in dark mode used to leave sub-elements
     rendering with the dark palette. --doc-accent is left alone; that one is the user's own brand
     colour and is meant to print as chosen. */
  .doc{margin:0!important;border:0!important;border-radius:0!important;box-shadow:none!important;max-width:none!important;width:auto!important;background:#fff!important;animation:none!important;
    --surface:#fff!important;--surface-2:#f4f4f1!important;--surface-3:#eaeae4!important;
    --border:#e1e1da!important;--border-strong:#cfcfc6!important;
    --fg:#111!important;--fg-muted:#555!important;--fg-subtle:#888!important}
  .doc,.doc *{color:#1a1a1a!important;-webkit-print-color-adjust:exact;print-color-adjust:exact}
  .doc .muted,.doc .lbl,.doc .doc-note,.doc .doc-meta,.doc .biz,.doc .d2,.doc .totals .tr{color:#555!important}
  .doc strong,.doc .biz strong,.doc .doc-meta .n,.doc .li-group .gh,.doc .totals .tr .mono,.doc .totals .tr.grand{color:#111!important}
  .doc .li-group .gh,.doc .totals .tr.grand{border-color:#111!important}
  .doc .doc-note{border-color:#ccc!important}
  .doc .pill{border:1px solid #ccc!important;background:#fff!important;color:#444!important}
  /* the viral footer prints in their brand colour, not the pinned black -- same intent as --doc-accent above */
  .doc .doc-viral a{color:var(--doc-accent)!important}
  .doc .li-group,.doc .totals,.doc .doc-top,.doc .bill-grid{break-inside:avoid}
}
/* hidden file-input wrapped in a button-styled label */
.btn input[type=file]{position:absolute;width:1px;height:1px;opacity:0}

/* Orb shader background — mounted once in index.html (outside #root, so it survives every
   auth.js re-render of #app), shown only while the unauthenticated landing page is up. */
/* ============================== LANDING (unauthenticated view) ============================== */
#app.auth-shell{display:block;background:var(--bg)}
#app.auth-shell::before{display:none}
.landing{max-width:1180px;margin:0 auto;padding:0 clamp(18px,4vw,36px);position:relative;z-index:1}
.ld-nav{position:sticky;top:0;z-index:50;display:flex;align-items:center;justify-content:space-between;gap:14px;padding:14px 0;margin:0 -8px;padding-left:8px;padding-right:8px;
  background:color-mix(in srgb,var(--bg) 84%,transparent);backdrop-filter:blur(14px) saturate(130%);-webkit-backdrop-filter:blur(14px) saturate(130%);border-bottom:1px solid color-mix(in srgb,var(--border) 62%,transparent)}
.ld-brand{display:flex;align-items:center;gap:10px;font-weight:600;font-size:15.5px;letter-spacing:var(--tracking-bold)}
.ld-mark{width:32px;height:32px;border-radius:6px;background:var(--accent);display:grid;place-items:center}
.ld-mark svg{width:17px;height:17px;color:#fff}
.ld-nav-r{display:flex;align-items:center;gap:6px}
.ld-link{padding:8px 12px;border-radius:var(--r-sm);font-size:13.5px;font-weight:500;color:var(--fg-muted);transition:color .15s,background .15s}
.ld-link:hover{color:var(--fg);background:var(--surface-2)}
.ld-hero{display:grid;grid-template-columns:minmax(0,1.02fr) minmax(420px,.98fr);gap:clamp(34px,5vw,64px);align-items:center;padding:clamp(44px,6vw,70px) 0 clamp(34px,5vw,58px)}
.ld-hero-label{font-size:13px;font-weight:650;color:var(--accent-soft-fg);margin-bottom:16px;display:flex;align-items:center;gap:10px}
.ld-hero-label::before{content:"";width:28px;height:1px;background:var(--accent)}
.ld-hero h1{font-size:clamp(38px,5.2vw,64px);letter-spacing:0;line-height:1.02;max-width:13ch}
.ld-hero-copy>p{margin-top:16px;max-width:52ch;font-size:15.5px;color:var(--fg-muted);line-height:1.6}
.ld-cta{display:flex;align-items:center;gap:10px;margin-top:26px;flex-wrap:wrap}
.btn-hero{width:auto;margin-top:0;padding:14px 24px;display:inline-flex;align-items:center;justify-content:center;min-width:180px;text-align:center}
.btn-lg{padding:13px 20px;font-size:14.5px;border-radius:var(--r)}
/* hero entrance: same opt-in gate as scroll-reveal (.reveal-on = observer running + motion OK),
   so headless/reduced-motion visitors always see the hero instantly */
.reveal-on .ld-hero-copy>*{opacity:0;animation:rise .6s cubic-bezier(.16,1,.3,1) forwards}
.reveal-on .ld-hero-copy>*:nth-child(1){animation-delay:.04s}
.reveal-on .ld-hero-copy>*:nth-child(2){animation-delay:.12s}
.reveal-on .ld-hero-copy>*:nth-child(3){animation-delay:.20s}
.reveal-on .ld-hero-copy>*:nth-child(4){animation-delay:.28s}
/* The headline uses the supplied word-level SlideUpReveal motion instead of the
   generic whole-element rise. Default state stays visible for no-JS/reduced-motion. */
.hero-word-reveal{display:flex;flex-wrap:wrap;align-items:baseline}
.hero-word-reveal__clip{display:inline-flex;overflow:hidden}
.hero-word-reveal__word{display:inline-block;white-space:pre-wrap}
.reveal-on .ld-hero-copy>.hero-word-reveal{opacity:1;animation:none}
@media (prefers-reduced-motion:no-preference){
  .reveal-on .hero-word-reveal__word{
    transform:translateY(100%);
    animation:heroWordReveal .5s cubic-bezier(.625,.05,0,1) forwards;
    animation-delay:calc(var(--word-index) * .1s);
  }
}
@keyframes heroWordReveal{to{transform:translateY(0)}}
.reveal-on .ld-hero-visual .mock{opacity:0;animation:mockIn .7s cubic-bezier(.16,1,.3,1) forwards}
.reveal-on .mock-a{animation-delay:.26s}
.reveal-on .mock-b{animation-delay:.40s}
.reveal-on .mock-c{animation-delay:.54s}
@keyframes mockIn{from{opacity:0;transform:translateY(20px)}to{opacity:1}}
/* the overdue dot pulses: real semantic state (money past due), not decoration */
.reveal-on .mock-alert i.red{animation:duePulse 2.6s ease-in-out infinite}
@keyframes duePulse{0%,100%{box-shadow:0 0 0 0 color-mix(in srgb,var(--red) 34%,transparent)}50%{box-shadow:0 0 0 5px transparent}}
/* hero visual: reference-style stacked product vignettes */
.ld-hero-visual{position:relative;width:100%;min-height:430px;max-width:560px;margin-left:auto}
.mock{position:absolute;background:color-mix(in srgb,var(--surface) 88%,transparent);border:1px solid color-mix(in srgb,var(--border) 82%,transparent);border-radius:12px;box-shadow:0 18px 44px rgba(3,12,8,.16),0 1px 0 rgba(255,255,255,.05) inset;padding:16px 18px;backdrop-filter:blur(12px) saturate(115%);-webkit-backdrop-filter:blur(12px) saturate(115%);transform-origin:50% 50%}
[data-theme="dark"] .mock{background:color-mix(in srgb,var(--surface) 78%,transparent);box-shadow:0 18px 44px rgba(0,0,0,.28),0 1px 0 rgba(255,255,255,.05) inset}
.mock-a{top:34px;left:18px;width:min(420px,94%);min-height:72px;transform:rotate(-1.15deg)}
.mock-b{top:132px;right:0;width:min(474px,100%);z-index:2;transform:rotate(.45deg)}
.mock-c{top:308px;left:116px;width:min(360px,75%);min-height:82px;transform:rotate(-.35deg)}
.mock-kpis{display:grid;grid-template-columns:repeat(3,minmax(0,1fr));gap:18px}
.mock-kpis>div{display:flex;flex-direction:column;gap:3px}
.mock-kpis span{font-size:10.5px;font-weight:600;text-transform:uppercase;letter-spacing:var(--tracking-caps);color:var(--fg-subtle);white-space:nowrap}
.mock-kpis b{font-size:17px;letter-spacing:var(--tracking-bold)}
.mock-kpis .is-red{color:var(--red)}
.mock-kpis .is-grn{color:var(--accent-soft-fg)}
.mock-alert{display:flex;align-items:flex-start;gap:11px;padding:9px 2px}
.mock-alert+.mock-alert{border-top:1px solid var(--border)}
.mock-alert i{flex:0 0 auto;width:9px;height:9px;border-radius:50%;margin-top:6px;background:var(--fg-subtle)}
.mock-alert i.red{background:var(--red)}
.mock-alert i.amber{background:var(--amber)}
.mock-alert i.blue{background:var(--blue)}
.mock-alert b{display:block;font-size:13px;letter-spacing:var(--tracking-bold);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mock-alert span{display:block;font-size:11.5px;color:var(--fg-muted);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.mock-alert em{font-style:normal;font-weight:600;font-size:12.5px;color:var(--accent-soft-fg);white-space:nowrap;margin-left:auto}
.mock-alert>div{flex:1;min-width:0}
.mock-tax>div{display:flex;align-items:baseline;justify-content:space-between;gap:12px}
.mock-tax span{font-size:12px;font-weight:600;color:var(--fg-muted);white-space:nowrap}
.mock-tax b{font-size:20px;letter-spacing:var(--tracking-bold)}
.mock-tax .d{display:block;margin-top:4px;font-weight:400;font-size:11.5px;color:var(--fg-subtle);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
/* section scaffolding */
.ld-sec-head{max-width:60ch;margin:0 auto clamp(28px,4vw,44px);text-align:center}
.ld-sec-head h2{font-size:clamp(24px,3vw,34px)}
.ld-sec-head p{margin-top:10px;color:var(--fg-muted);font-size:14.5px;line-height:1.6}
.ld-feats{padding:clamp(36px,6vw,64px) 0}
.feat{display:grid;grid-template-columns:minmax(0,.88fr) minmax(360px,1.12fr);gap:clamp(24px,4vw,52px);align-items:center;padding:clamp(24px,3.4vw,38px) 0}
.feat+.feat{border-top:1px solid var(--border)}
.feat.flip .feat-copy{order:2}
.feat.flip .feat-vig{order:1}
.feat-ico{width:36px;height:36px;border-radius:8px;background:transparent;color:var(--accent-soft-fg);border:1px solid color-mix(in srgb,var(--accent) 24%,transparent);display:grid;place-items:center;margin-bottom:14px}
.feat-ico svg{width:18px;height:18px}
.feat h3{font-size:20px;letter-spacing:var(--tracking-bold)}
.feat p{margin-top:9px;color:var(--fg-muted);font-size:14px;line-height:1.65;max-width:48ch}
.feat-vig{background:color-mix(in srgb,var(--surface) 96%,transparent);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:0 14px 34px rgba(0,0,0,.10),0 1px 0 rgba(255,255,255,.05) inset;padding:16px 18px;transition:transform .25s cubic-bezier(.16,1,.3,1),box-shadow .25s,border-color .25s}
.feat:hover .feat-vig,.feat-duo-card:hover .feat-vig{transform:translateY(-3px);border-color:color-mix(in srgb,var(--accent) 22%,var(--border));box-shadow:0 20px 42px rgba(0,0,0,.13),0 1px 0 rgba(255,255,255,.05) inset}
/* duo: the last two features share a row instead of extending the zigzag */
.feat-duo{display:grid;grid-template-columns:1fr 1fr;gap:clamp(16px,2.6vw,26px);padding:clamp(24px,3.4vw,38px) 0;border-top:1px solid var(--border)}
.feat-duo-card{min-width:0;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:clamp(18px,2.4vw,26px);box-shadow:var(--shadow-sm);display:flex;flex-direction:column}
.feat-duo-card h3{font-size:18px;letter-spacing:var(--tracking-bold)}
.feat-duo-card p{margin-top:8px;color:var(--fg-muted);font-size:13.5px;line-height:1.6}
.feat-duo-card .feat-vig{margin-top:16px;box-shadow:none;background:var(--surface-2)}
[data-theme="dark"] .feat-duo-card .feat-vig{background:color-mix(in srgb,var(--surface-2) 72%,transparent)}
.vig-rows{display:flex;flex-direction:column}
.vig-row{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:10px 2px;font-size:13px}
.vig-row+.vig-row{border-top:1px solid var(--border)}
.vig-row span{color:var(--fg-muted)}
.vig-row b{font-size:13.5px;display:flex;align-items:center;gap:8px}
.vig-pill{font-style:normal;font-size:10.5px;font-weight:700;letter-spacing:var(--tracking-caps);text-transform:uppercase;color:var(--accent-soft-fg);background:var(--accent-soft);padding:2px 7px;border-radius:var(--r-pill)}
.vig-ok{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--accent-soft-fg)}
.vig-ok svg{width:13px;height:13px}
.vig-draft p{font-size:13.5px;line-height:1.6;color:var(--fg);background:var(--surface-2);border:1px solid var(--border);border-radius:12px 12px 12px 3px;padding:12px 14px}
.vig-draft .vig-ok{margin-top:10px}
.ld-steps{display:grid;grid-template-columns:repeat(3,1fr);gap:16px;padding:clamp(10px,2vw,20px) 0 clamp(40px,6vw,64px)}
.step{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);padding:20px;box-shadow:var(--shadow-sm)}
.step-n{font-size:12px;font-weight:600;color:var(--accent-soft-fg)}
.step h4{margin-top:10px;font-size:15.5px;letter-spacing:var(--tracking-bold)}
.step p{margin-top:7px;font-size:13px;color:var(--fg-muted);line-height:1.6}
/* activation card internals (shared with the limit / re-auth states, and the auth screen) */
.login-card{width:100%;max-width:430px;justify-self:center}
.login-card h2{font-size:22px;letter-spacing:var(--tracking-bold)}
.login-sub{color:var(--fg-muted);margin:6px 0 18px;font-size:13.5px}
.login-label{display:block;font-size:12px;font-weight:600;text-transform:uppercase;letter-spacing:var(--tracking-caps);color:var(--fg-subtle);margin-bottom:7px}
.login-input{width:100%;padding:14px 15px;border:1px solid var(--border-strong);border-radius:var(--r);background:var(--surface);color:var(--fg);
  font-family:var(--mono);font-size:15px;letter-spacing:var(--tracking-mono);transition:border-color .15s,box-shadow .15s;box-shadow:var(--shadow-sm)}
.login-input:focus{outline:none;border-color:var(--accent);box-shadow:0 0 0 3px var(--accent-soft)}
.login-input::placeholder{color:var(--fg-subtle);letter-spacing:var(--tracking-mono)}
.login-go{width:100%;margin-top:16px;padding:14px;border:0;border-radius:var(--r);background:var(--accent);color:var(--accent-fg);
  font-weight:600;font-size:15px;box-shadow:var(--shadow),var(--hi);transition:transform .12s,filter .15s;cursor:pointer}
.login-go.btn-hero{width:auto;margin-top:0;box-shadow:0 12px 28px color-mix(in srgb,var(--accent) 22%,transparent),var(--hi)}
.login-go:hover{filter:brightness(1.05)}
.login-go.btn-hero:hover{transform:translateY(-1px)}
.login-go:active{transform:translateY(1px) scale(.99)}
.login-go:disabled{opacity:.6;cursor:default}
.login-msg{background:var(--blue-soft);color:var(--blue-soft-fg);border:1px solid color-mix(in srgb,var(--blue) 22%,transparent);border-radius:var(--r-sm);padding:10px 12px;font-size:13px;margin-bottom:16px}
.login-setup{display:flex;gap:10px;align-items:flex-start;background:var(--amber-soft);color:var(--amber-soft-fg);border:1px solid color-mix(in srgb,var(--amber) 30%,transparent);border-radius:var(--r-sm);padding:10px 12px;font-size:12.5px;line-height:1.55;margin-bottom:16px}
.login-setup svg{flex:0 0 auto;margin-top:2px}
.login-err{color:var(--red);font-size:13px;min-height:18px;margin-top:8px}
/* Consent row on signup + migrate forms — links to /privacy and /terms (see auth.js). */
.login-consent{display:flex;align-items:center;gap:8px;font-size:12.5px;line-height:1.4;color:var(--fg-muted);cursor:pointer}
.login-consent input[type=checkbox]{flex:0 0 auto;width:14px;height:14px;accent-color:var(--accent)}
.login-consent a{font-weight:600;text-decoration:none}
.login-consent a:hover{color:var(--accent-soft-fg)}
.login-foot{margin-top:16px;font-size:12.5px;color:var(--fg-subtle);text-align:center}
.login-foot b{color:var(--fg-muted);font-weight:600}
.lg-devices{margin-top:14px;border:1px solid var(--border);border-radius:var(--r);overflow:hidden}
.lg-devices-h{background:var(--surface-2);padding:10px 12px;font-size:12.5px;font-weight:600;color:var(--fg-muted);border-bottom:1px solid var(--border)}
.lg-dev{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:10px 12px;border-bottom:1px solid var(--border)}
.lg-dev:last-child{border-bottom:0}
.lg-dev b{display:block;font-size:13.5px}
.lg-dev span{display:block;font-size:11.5px;color:var(--fg-subtle)}
/* FAQ: single-open accordion, answer text blur-reveals letter by letter on expand */
.ld-faq{padding:0 0 clamp(44px,6vw,72px)}
.faq-acc{display:flex;flex-direction:column;gap:10px;max-width:640px;margin:0 auto}
.faq-item{background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);overflow:hidden;transition:border-color .2s}
.faq-item:hover{border-color:color-mix(in srgb,var(--accent) 20%,var(--border))}
.faq-item.open{border-color:color-mix(in srgb,var(--accent) 30%,var(--border))}
.faq-trigger{display:flex;align-items:center;justify-content:space-between;gap:16px;width:100%;padding:18px 20px;background:none;border:0;font:inherit;text-align:left;font-size:14.5px;font-weight:500;color:var(--fg);cursor:pointer}
.faq-icon{flex:none;display:flex;color:var(--fg-muted);transition:transform .25s ease,color .25s ease}
.faq-icon svg{display:block}
.faq-item.open .faq-icon{transform:rotate(45deg);color:var(--accent)}
.faq-panel{max-height:0;overflow:hidden;padding:0 20px;transition:max-height .35s ease,padding .35s ease}
.faq-item.open .faq-panel{max-height:400px;padding:0 20px 18px}
.faq-answer{margin:0;font-size:13px;color:var(--fg-muted);line-height:1.6}
.faq-answer span{display:inline-block;opacity:0;filter:blur(10px);animation:faqLetterIn .3s ease forwards}
@keyframes faqLetterIn{to{opacity:1;filter:blur(0)}}
@media (prefers-reduced-motion: reduce){.faq-answer span{opacity:1;filter:none;animation:none}}

/* Consent banner — subtle footer-level notice with pre-checked analytics */
.ld-consent-banner{
  background:var(--surface);
  border:1px solid var(--border);
  border-radius:var(--r-lg);
  padding:20px 24px;
  max-width:640px;
  margin:0 auto clamp(32px,5vw,56px);
  text-align:center;
}
.ld-consent-banner p{
  font-size:13.5px;
  color:var(--fg-muted);
  line-height:1.5;
  margin-bottom:14px;
}
.consent-item{
  display:inline-flex;
  align-items:center;
  gap:8px;
  font-size:12.5px;
  color:var(--fg);
  cursor:pointer;
  margin-right:16px;
}
.consent-item input[type=checkbox]{
  width:14px;
  height:14px;
  accent-color:var(--accent);
}
.consent-accept{
  margin-top:12px;
}

.ld-foot{position:relative;z-index:2;margin:clamp(56px,8vw,104px) 0 24px}

/* Reference-matched footer scene: a deep-green ticket frame, oversized cream wordmark, and
   a full-opacity Open Peeps crowd that walks across the lower edge without clipping heads. */
#app.auth-shell{overflow-x:clip}
.resiboo-footer-box{position:relative;isolation:isolate;height:clamp(740px,calc(100svh - 64px),1040px);width:100%;margin:clamp(72px,10vw,132px) 0 0;color:#FAFDEE}
.resiboo-footer-box::before{display:none}
.resiboo-footer__panel{position:absolute;top:23.5%;left:50%;z-index:1;width:min(87vw,1680px);height:556px;transform:translateX(calc(-50% + 20px));overflow:hidden;border:1px solid #2D6648;border-radius:8px;background:#06251a}
.resiboo-footer__panel::after{display:none}
.resiboo-footer__ticket-inner{position:absolute;inset:28px 48px 28px 28px;z-index:0;border:1px solid rgba(190,255,213,.34);border-radius:60px 24px 76px 60px;box-shadow:inset 0 0 0 1px rgba(0,0,0,.5),inset 0 16px 50px rgba(62,255,132,.035)}
.resiboo-footer__ticket-inner::before{content:"";position:absolute;inset:-14px -20px;border:1px dotted rgba(183,255,206,.18);border-radius:68px 27px 84px 68px}
.resiboo-footer__meta{position:absolute;top:70px;left:8%;right:10%;z-index:2;height:25px;font-size:16px;font-weight:520;color:rgba(250,253,238,.88)}
.resiboo-footer__meta p{position:absolute;top:0;right:0;transform:translateX(-33px);white-space:nowrap}
.resiboo-footer__nav{position:absolute;top:0;left:50%;display:flex;align-items:center;gap:0;transform:translateX(calc(-50% - 22px))}
.resiboo-footer__nav a{display:inline-flex;align-items:center;color:inherit;text-decoration:none;transition:color .18s ease,text-shadow .18s ease}
.resiboo-footer__nav a+a::before{content:"";width:1px;height:17px;margin:0 25px;background:rgba(190,255,213,.3)}
.resiboo-footer__nav a:hover,.resiboo-footer__nav a:focus-visible{color:#fff;text-shadow:0 0 12px rgba(103,255,169,.5)}
.resiboo-footer__rule{position:absolute;top:122px;left:4.8%;right:4.8%;z-index:2;height:1px;background:rgba(213,255,222,.42)}
.resiboo-footer__word{position:absolute;top:57%;left:50%;z-index:1;transform:translate(calc(-50% + 25px),-50%);font-size:clamp(72px,12vw,180px);font-weight:600;line-height:1;text-align:center;white-space:nowrap;color:#FAFDEE}
.resiboo-footer__connector{position:absolute;top:calc(23.5% - 48px);left:19.5%;z-index:0;width:150px;height:52px;display:flex;justify-content:space-between;pointer-events:none;opacity:.16}
.resiboo-footer__connector::before,.resiboo-footer__connector i{display:block;width:1px;height:52px;border:0;background:var(--accent)}
.resiboo-footer__crowd{position:absolute;right:50%;bottom:0;z-index:3;width:100vw;height:430px;transform:translateX(50%);overflow:hidden;opacity:1;contain:layout paint}
.resiboo-crowd-canvas{position:absolute;inset:auto 0 0;width:100%;height:100%;contain:strict}

@media (max-width:880px){
  .resiboo-footer-box{height:820px;margin-top:72px}
  .resiboo-footer__panel{top:17%;width:calc(100vw - 30px);height:520px;transform:translateX(-50%);border-radius:54px 24px 68px 54px}
  .resiboo-footer__ticket-inner{inset:22px 34px 22px 22px;border-radius:40px 18px 54px 40px}
  .resiboo-footer__meta{top:52px;left:9%;right:9%;height:auto;display:flex;flex-direction:column;align-items:center;gap:14px;font-size:14px;text-align:center}
  .resiboo-footer__meta p{position:static;transform:none}
  .resiboo-footer__nav{position:static;transform:none}
  .resiboo-footer__nav a+a::before{margin:0 12px}
  .resiboo-footer__rule{top:124px;left:7%;right:7%}
  .resiboo-footer__word{top:59%;transform:translate(-50%,-50%);font-size:clamp(104px,25vw,202px)}
  .resiboo-footer__connector{top:calc(17% - 38px);height:40px}
  .resiboo-footer__crowd{height:360px}
}
@media (max-width:560px){
  .ld-foot{margin-top:56px}
  .resiboo-footer-box{height:780px;margin-top:56px}
  .resiboo-footer__panel{top:15%;width:calc(100vw - 24px);height:450px;border-radius:42px 20px 58px 42px}
  .resiboo-footer__panel::after{top:40px;height:138px;background-size:16px 21px}
  .resiboo-footer__ticket-inner{inset:18px 26px 18px 18px;border-radius:31px 15px 45px 31px}
  .resiboo-footer__meta{top:36px;left:8%;right:8%;gap:12px;font-size:12px}
  .resiboo-footer__meta p{white-space:normal}
  .resiboo-footer__nav{flex-wrap:wrap;justify-content:center;row-gap:7px}
  .resiboo-footer__nav a+a::before{height:13px;margin:0 8px}
  .resiboo-footer__rule{top:118px}
  .resiboo-footer__word{top:59%;font-size:18vw}
  .resiboo-footer__connector{top:calc(15% - 30px);left:18%;height:32px}
  .resiboo-footer__crowd{height:300px}
}
/* scroll reveal — only when the observer is running (root gets .reveal-on), never hides content otherwise */
.reveal-on .reveal{opacity:0;transform:translateY(14px);transition:opacity .55s ease,transform .55s ease}
.reveal-on .reveal.in{opacity:1;transform:none}
@media (max-width:880px){
  .ld-hero{grid-template-columns:1fr;min-height:auto;padding-top:36px}
  .ld-hero-visual{display:none}
  .feat,.feat.flip{grid-template-columns:1fr}
  .feat.flip .feat-copy{order:1}
  .feat.flip .feat-vig{order:2}
  .feat-duo{grid-template-columns:1fr}
  .ld-steps{grid-template-columns:1fr}
  .ld-link{display:none}
}
@media (max-width:900px){
  .resiboo-floating-action-menu{right:16px;bottom:calc(82px + env(safe-area-inset-bottom,0px))}
  [data-tip]::after{display:none}
  .cmd-list,.ps-list{max-height:48vh}
}

/* ============================== ONBOARDING (first run) ============================== */
.ob-scrim{position:fixed;inset:0;z-index:600;display:grid;place-items:center;padding:18px;background:color-mix(in srgb,var(--bg) 55%,transparent);backdrop-filter:blur(7px);-webkit-backdrop-filter:blur(7px)}
.ob{width:100%;max-width:540px;background:var(--surface);border:1px solid var(--border);border-radius:var(--r-lg);box-shadow:var(--shadow-lg);overflow:hidden;animation:obIn .3s cubic-bezier(.2,.9,.3,1)}
@keyframes obIn{from{opacity:0;transform:translateY(12px) scale(.985)}to{opacity:1;transform:none}}
.ob-head{display:flex;align-items:center;gap:10px;padding:14px 18px;border-bottom:1px solid var(--border)}
.ob-head svg{width:16px;height:16px;color:var(--accent)}
.ob-head b{font-size:14px;letter-spacing:var(--tracking-bold)}
.ob-dots{margin-left:auto;display:flex;gap:5px;align-items:center}
.ob-dots i{width:7px;height:7px;border-radius:50%;background:var(--border-strong);transition:background .2s}
.ob-dots i.on{background:var(--accent)}
.ob-skip{border:0;background:none;color:var(--fg-subtle);font-size:12px;padding:4px 6px;border-radius:6px}
.ob-skip:hover{color:var(--fg-muted)}
.ob-body{padding:20px 18px}
.ob-body h3{font-size:19px;letter-spacing:var(--tracking-bold)}
.ob-body>p{margin-top:7px;font-size:13.5px;color:var(--fg-muted);line-height:1.6}
.ob-choice{display:grid;gap:10px;margin-top:16px}
.ob-choice button{text-align:left;padding:14px 15px;border:1px solid var(--border-strong);border-radius:var(--r);background:var(--surface);transition:border-color .15s,background .15s;display:flex;gap:12px;align-items:flex-start}
.ob-choice button:hover{border-color:var(--accent);background:var(--surface-2)}
.ob-choice svg{width:16px;height:16px;flex:0 0 auto;margin-top:2px;color:var(--accent-soft-fg)}
.ob-choice b{display:block;font-size:14px;letter-spacing:var(--tracking-bold)}
.ob-choice span{display:block;margin-top:2px;font-size:12.5px;color:var(--fg-muted);line-height:1.5}
.ob-fields{margin-top:16px}
.ob-orient{list-style:none;display:flex;flex-direction:column;gap:12px;margin-top:16px}
.ob-orient li{display:flex;gap:11px;align-items:flex-start;font-size:13.5px;line-height:1.55;color:var(--fg-muted)}
.ob-orient b{color:var(--fg)}
.ob-orient svg{width:15px;height:15px;flex:0 0 auto;margin-top:2px;color:var(--accent-soft-fg)}
.ob-foot{display:flex;justify-content:space-between;align-items:center;gap:8px;padding:14px 18px;border-top:1px solid var(--border)}
/* license device list (Settings) */
.dev-list{border:1px solid var(--border);border-radius:var(--r);overflow:hidden}
.dev-row{display:flex;align-items:center;justify-content:space-between;gap:10px;padding:11px 13px;border-bottom:1px solid var(--border)}
.dev-row:last-child{border-bottom:0}
.dev-row b{display:block;font-size:13.5px;font-weight:600}
.dev-row b span{display:block;margin-top:1px}

/* subtle preview-mode ribbon (localhost / file://, no backend gate) */
[data-preview] .sidebar .brand::after{content:"PREVIEW";margin-left:auto;font-size:9px;font-weight:700;letter-spacing:var(--tracking-caps);color:var(--amber-soft-fg);background:var(--amber-soft);border:1px solid color-mix(in srgb,var(--amber) 30%,transparent);padding:2px 6px;border-radius:var(--r-pill);align-self:center}

/* ============================== SURFACE TABS + GET PAID ============================== */
.surface-tabs{display:flex;gap:4px;margin-bottom:18px;border-bottom:1px solid var(--border)}
.surface-tab{padding:9px 14px;font-size:13.5px;font-weight:600;color:var(--fg-muted);border-bottom:2px solid transparent;margin-bottom:-1px;transition:color .15s,border-color .15s}
.surface-tab:hover{color:var(--fg)}
.surface-tab.on{color:var(--fg);border-bottom-color:var(--accent)}
.getpaid-grid{display:grid;grid-template-columns:minmax(0,1.9fr) minmax(280px,1fr);gap:16px;align-items:start}
@media (max-width:1000px){.getpaid-grid{grid-template-columns:1fr}}

/* ============================== SHARE BAR / QR EMPTY / ADVANCED EXPANDER ============================== */
.sharebar{display:flex;align-items:center;justify-content:space-between;gap:10px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:8px 10px;margin-bottom:4px}
.sharebar .mono{font-size:12.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;min-width:0}
.qr-empty{width:148px;height:148px;border:1px dashed var(--border-strong);border-radius:12px;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:8px;padding:12px;text-align:center;color:var(--fg-subtle);font-size:11px;line-height:1.4;background:var(--surface-2)}
.qr-empty svg{width:22px;height:22px}
details.adv{border:1px solid var(--border);border-radius:var(--r-sm);padding:0 12px;margin-top:4px;background:color-mix(in srgb,var(--surface-2) 44%,transparent)}
details.adv summary{cursor:pointer;padding:10px 0;font-size:13px;font-weight:600;color:var(--fg-muted);list-style:none;display:flex;align-items:center;gap:7px}
details.adv summary::before{content:"";width:7px;height:7px;border-right:1.5px solid var(--fg-subtle);border-bottom:1.5px solid var(--fg-subtle);transform:rotate(-45deg);transition:transform .15s;flex:0 0 auto}
details.adv[open] summary::before{transform:rotate(45deg)}
details.adv[open]{padding-bottom:12px}
details.adv summary::-webkit-details-marker{display:none}
details.adv::details-content{opacity:0;transform:translateY(-4px);transition:opacity .2s ease,transform .2s ease,content-visibility .2s allow-discrete,display .2s allow-discrete}
details.adv[open]::details-content{opacity:1;transform:none}
.ai-fb{display:inline-flex;gap:6px;margin-left:8px;vertical-align:middle}

/* ============================== INVOICE DESIGNER ============================== */
.ds-grid{display:grid;grid-template-columns:minmax(240px,.8fr) minmax(0,1.2fr);gap:18px;align-items:start}
.ds-preview{max-height:64vh;overflow:auto;border:1px solid var(--border);border-radius:var(--r);padding:14px;background:var(--surface-2)}
.ds-preview .doc{margin:0;box-shadow:var(--shadow-sm);max-width:none}
/* Kernel-rendered document (Design/Data Split S10). The kernel emits its own page box at a fixed
   pixel width, so this wrapper only centres it and lets a wide/landscape page scroll instead of
   blowing out the column. No padding, no background: the page IS the paper. */
.doc-kernel{margin:0 auto;max-width:100%;overflow-x:auto;display:flex;justify-content:center}
.doc-kernel .rk-page{box-shadow:var(--shadow);border-radius:var(--r);margin:0 auto 16px}
.ds-preview .doc-kernel .rk-page{box-shadow:var(--shadow-sm)}
@media print{
  .doc-kernel{overflow:visible!important;display:block!important;margin:0!important;max-width:none!important}
  .doc-kernel .rk-doc{zoom:1!important}   /* paper is the real size on paper; the on-screen fit is off */
  .doc-kernel .rk-page{box-shadow:none!important;border-radius:0!important;margin:0!important}
}
.tpl-grid{display:grid;grid-template-columns:repeat(2,1fr);gap:8px}
.tpl-chip{position:relative;display:flex;align-items:center;justify-content:center;gap:6px;padding:12px 8px;border:1px solid var(--border-strong);border-radius:var(--r-sm);background:var(--surface);font-size:12px;font-weight:600;color:var(--fg-muted);transition:border-color .15s,background .15s,color .15s;text-align:center}
.tpl-chip:hover{border-color:var(--accent);color:var(--fg)}
.tpl-chip.on{border-color:var(--accent);background:var(--accent-soft);color:var(--accent-soft-fg)}
.tpl-chip.locked{opacity:.62}
.tpl-chip svg{width:12px;height:12px;flex:0 0 auto}
@media (max-width:760px){.ds-grid{grid-template-columns:1fr}.ds-preview{max-height:40vh}}
.plan-upsell{display:flex;align-items:center;justify-content:space-between;gap:12px;border:1px solid var(--border);border-radius:var(--r);padding:12px 14px;margin-bottom:10px;background:color-mix(in srgb,var(--surface-2) 44%,transparent)}
.plan-upsell b{display:block;font-size:14px}
.plan-upsell .plan-price{display:block;font-size:13px;color:var(--accent-soft-fg);font-weight:600;margin-top:2px}
.plan-upsell .plan-price s{color:var(--fg-subtle);font-weight:500}
.plan-upsell .plan-note{display:block;font-size:12px;color:var(--fg-muted);margin-top:3px;line-height:1.5}
/* Plan & billing feature comparison -- Free/Pro/Studio Team side by side, since the page used to
   show usage stats and upsell copy but never what each tier actually included. */
.plan-grid{margin-bottom:20px;align-items:stretch}
.plan-tier-card{display:flex;flex-direction:column;transition:box-shadow .16s,border-color .16s}
.plan-tier-card.is-current{border-color:color-mix(in srgb,var(--accent) 38%,var(--border));box-shadow:0 0 0 1px color-mix(in srgb,var(--accent) 24%,transparent),var(--shadow-sm)}
.plan-tier-card .card-pad{display:flex;flex-direction:column;flex:1;gap:2px}
.plan-tier-head{display:flex;align-items:center;justify-content:space-between;gap:8px}
.plan-tier-head b{font-size:15px}
.plan-tier-price{margin-top:6px;font-size:22px;font-weight:650;letter-spacing:0}
.plan-tier-price small{display:block;margin-top:2px;font-size:11px;font-weight:500;color:var(--fg-subtle);letter-spacing:0}
.plan-tier-features{list-style:none;margin:16px 0 18px;display:flex;flex-direction:column;gap:9px;flex:1}
.plan-tier-features li{display:flex;align-items:flex-start;gap:8px;font-size:12.5px;color:var(--fg-muted);line-height:1.4}
.plan-tier-features li svg{width:14px;height:14px;flex:0 0 auto;margin-top:1px;color:var(--accent-soft-fg)}
.plan-tier-current{justify-content:center;width:100%;padding:8px;box-sizing:border-box}
@media (max-width:1180px){.plan-grid{grid-template-columns:1fr}}

/* ============================== DOCUMENT: shared upgrades ============================== */
.doc{font-size:calc(14.5px*var(--doc-scale,1))}
.doc .biz,.doc .doc-meta{font-size:.9em}
.doc .biz strong{font-size:1.05em}
.doc .li{font-size:.97em;grid-template-columns:1fr auto auto}
.doc .li .qty{grid-column:2;color:var(--fg-muted);font-size:.88em;white-space:nowrap}
.doc .li .amt{grid-column:3}
.doc .li .desc{grid-column:1}
.doc .li .desc .d2{font-size:.87em}
.doc .li-group .gh{font-size:.76em}
.doc .bill-grid .lbl{font-size:.73em}
.doc .totals .tr{font-size:.93em}
.doc .totals .tr.grand{font-size:1.24em}
.doc .totals .tr.grand .mono{font-size:1em}
.doc .doc-note{font-size:.86em}
.doc-title-row{display:flex;align-items:baseline;justify-content:space-between;gap:16px;margin-bottom:18px}
.doc-title{font-size:1.55em;font-weight:700;letter-spacing:.14em}
.doc-title-no{font-size:1.05em;font-weight:600;color:var(--fg-muted)}
.doc-logo{display:block;max-height:44px;max-width:180px;object-fit:contain;margin-bottom:8px}
.doc-compliance{margin-top:10px;font-size:.78em;color:var(--fg-subtle);border-top:1px solid var(--border);padding-top:8px}
/* Viral footer (F90): an ad wearing the user's brand -- rides each document's own font, scale and accent so clients read it as part of their invoice, not a grey watermark */
.doc-viral{margin-top:14px;text-align:center;font-size:.78em}
.doc-viral a{color:var(--doc-accent);text-decoration:none}
.doc-viral a:hover{text-decoration:underline}
.doc-sign{margin-top:20px;max-width:280px}
.doc-sign .sig-name{font-family:'Segoe Script','Brush Script MT',cursive;font-size:1.5em;border-bottom:1.5px solid var(--fg);padding-bottom:4px}
.doc-sign .sig-meta{font-size:.8em;color:var(--fg-muted);margin-top:5px}
.doc-intl{font-size:.85em;color:var(--fg-muted);margin-top:8px;display:flex;gap:14px;flex-wrap:wrap}
.doc-intl b{color:var(--fg)}

/* The ten built-in document designs are TEMPLATES now, not CSS: templates/builtin/*.json,
   generated by scripts/build-builtins.mjs and drawn by rkkernel.js. Their .tpl-* skins were
   deleted in Design/Data Split Phase 5b. .tpl-chip / .tpl-grid below are the PICKER's own classes
   and are still in use. */

/* ============================== LANDING: HERO INVOICE + LOOP + TRUST + PRICING ============================== */
.ld-hero-visual{min-height:480px}
.ld-inv{position:absolute;top:0;left:0;width:min(430px,92%);background:var(--surface);border:1px solid var(--border);border-radius:14px;box-shadow:0 22px 54px rgba(3,12,8,.18),0 1px 0 rgba(255,255,255,.06) inset;padding:22px 24px;transform:rotate(-1deg);z-index:1}
[data-theme="dark"] .ld-inv{box-shadow:0 22px 54px rgba(0,0,0,.4)}
.ld-inv-head{display:flex;justify-content:space-between;align-items:flex-start;gap:14px;border-bottom:1.5px solid var(--fg);padding-bottom:10px;margin-bottom:6px}
.ld-inv-title{display:block;font-size:11px;font-weight:700;letter-spacing:.22em;color:var(--fg-subtle)}
.ld-inv-head b{font-size:16px}
.ld-inv-biz{text-align:right;font-size:12.5px;font-weight:600}
.ld-inv-biz span{display:block;font-weight:400;font-size:10.5px;color:var(--fg-subtle);margin-top:2px}
.ld-inv-row{display:flex;justify-content:space-between;gap:12px;padding:8px 0;border-bottom:1px solid var(--border);font-size:13px}
.ld-inv-row b{font-weight:600}
.ld-inv-row.dim span,.ld-inv-row.dim b{color:var(--fg-muted)}
.ld-inv-total{display:flex;justify-content:space-between;align-items:center;gap:14px;padding-top:12px}
.ld-inv-total>div:first-child span{display:block;font-size:11px;text-transform:uppercase;letter-spacing:.06em;color:var(--fg-subtle);font-weight:600}
.ld-inv-total>div:first-child b{font-size:24px}
.ld-inv-qr{display:flex;align-items:center;gap:9px}
.ld-inv-qr svg{border:1px solid var(--border);border-radius:8px}
.ld-inv-qr span{font-size:10.5px;line-height:1.45;color:var(--fg-muted);font-weight:500}
.ld-chat{position:absolute;top:242px;right:0;width:min(330px,84%);z-index:2}
.ld-chat-b{background:var(--blue-soft);color:var(--blue-soft-fg);border:1px solid color-mix(in srgb,var(--blue) 22%,transparent);border-radius:14px 14px 3px 14px;padding:12px 14px;font-size:12.5px;line-height:1.55;box-shadow:var(--shadow)}
.ld-chat-m{display:flex;align-items:center;gap:6px;justify-content:flex-end;margin-top:7px;font-size:11px;font-weight:600;color:var(--fg-muted)}
.ld-chat-m svg{width:12px;height:12px}
.ld-paid{position:absolute;top:392px;left:34px;display:flex;gap:11px;align-items:center;background:var(--surface);border:1px solid color-mix(in srgb,var(--accent) 30%,var(--border));border-radius:12px;padding:12px 16px;box-shadow:0 16px 40px rgba(3,12,8,.16);z-index:3;width:min(360px,88%)}
.ld-paid i{width:10px;height:10px;border-radius:50%;background:var(--accent);flex:0 0 auto;animation:duePulse 2.6s ease-in-out infinite}
.ld-paid b{display:block;font-size:13px;color:var(--accent-soft-fg)}
.ld-paid span{display:block;font-size:11.5px;color:var(--fg-muted);margin-top:1px}
/* loop vignettes inside the 3 steps */
.loop-vig{margin-top:14px;border-top:1px solid var(--border);padding-top:12px;display:flex;flex-direction:column;gap:9px}
.lv-bubble{background:var(--surface-2);border:1px solid var(--border);border-radius:12px 12px 12px 3px;padding:9px 12px;font-size:12px;line-height:1.5;color:var(--fg)}
.lv-arrow{display:grid;place-items:center;color:var(--accent-soft-fg)}
.lv-arrow svg{width:14px;height:14px;transform:rotate(90deg)}
.lv-lines>div{display:flex;justify-content:space-between;gap:10px;font-size:12.5px;padding:5px 0;border-bottom:1px dashed var(--border)}
.lv-lines>div:last-child{border-bottom:0}
.lv-link{background:var(--surface-2);border:1px solid var(--border-strong);border-radius:8px;padding:9px 12px;font-size:12.5px;text-align:center;font-weight:600}
.lv-caps{display:flex;gap:6px;justify-content:center;flex-wrap:wrap}
.lv-caps span{display:inline-flex;align-items:center;gap:5px;font-size:11px;font-weight:600;color:var(--fg-muted);background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-pill);padding:4px 9px}
.lv-caps svg{width:11px;height:11px}
.lv-note{font-size:11.5px;color:var(--fg-subtle);text-align:center}
.lv-pay{flex-direction:row;align-items:center;gap:12px}
.lv-pay .lv-note{text-align:left}
.lv-qr svg{border:1px solid var(--border);border-radius:8px}
.lv-paidline{display:flex;align-items:center;gap:7px;font-size:13px}
.lv-paidline i{width:8px;height:8px;border-radius:50%;background:var(--accent)}
.lv-paidline b{color:var(--accent-soft-fg)}
.ld-steps{grid-template-columns:repeat(3,minmax(0,1fr));gap:clamp(16px,2vw,24px);align-items:stretch;padding-top:clamp(18px,3vw,32px);scroll-margin-top:88px}
.ld-steps .step{display:flex;flex-direction:column;gap:0;min-width:0;overflow:hidden;padding:clamp(22px,2.4vw,28px);border-radius:8px;background:var(--surface)}
.ld-steps .step::before{display:none}
.ld-steps .step-n{align-self:flex-start;padding:5px 8px;border:1px solid color-mix(in srgb,var(--accent) 26%,var(--border));border-radius:7px;background:var(--accent-soft);font-size:11px;line-height:1;font-weight:700;letter-spacing:.08em}
.ld-steps .step h4{margin-top:16px;font-size:20px;line-height:1.12;text-wrap:balance}
.ld-steps .step p{min-height:7.4em;margin-top:11px;font-size:14px;line-height:1.62;text-wrap:pretty}
.ld-steps .loop-vig{justify-content:center;min-width:0;min-height:10rem;margin-top:22px;padding-top:18px}
.ld-steps .lv-link{overflow-wrap:anywhere}
.ld-steps .lv-lines b,.ld-steps .lv-paidline b{white-space:nowrap}
@media (max-width:880px){
  .ld-steps{grid-template-columns:1fr;gap:14px;padding-top:16px}
  .ld-steps .step{padding:22px}
  .ld-steps .step p{min-height:0;max-width:62ch}
  .ld-steps .loop-vig{min-height:0;margin-top:18px;padding-top:16px}
}
@media (max-width:480px){
  .ld-steps .step{padding:20px;border-radius:15px}
  .ld-steps .step h4{font-size:18px}
  .ld-steps .lv-pay{align-items:center}
}
/* feature vignettes */
.vig-chat{display:flex;flex-direction:column;gap:10px}
.vig-extract{border:1px solid color-mix(in srgb,var(--accent) 24%,var(--border));border-radius:10px;padding:4px 12px 8px;background:color-mix(in srgb,var(--accent-soft) 44%,transparent)}
.ve-h{display:flex;align-items:center;gap:6px;font-size:11px;font-weight:700;color:var(--accent-soft-fg);text-transform:uppercase;letter-spacing:.04em;padding:8px 0 4px}
.ve-h svg{width:12px;height:12px}
/* chat message identity: avatar + name + timestamp, reused wherever the landing shows a message */
.vig-msg{display:flex;gap:8px;align-items:flex-start}
.vig-ava{flex:0 0 auto;width:24px;height:24px;border-radius:50%;background:var(--surface-3);color:var(--fg-muted);display:grid;place-items:center;font-size:10.5px;font-weight:700}
.vig-ava-sm{width:18px;height:18px;background:var(--accent-soft);color:var(--accent-soft-fg)}
.vig-ava-sm svg{width:10px;height:10px}
.vig-msg-body{min-width:0;flex:1}
.vig-msg-meta{display:flex;align-items:center;gap:7px;margin-bottom:4px;font-size:11px}
.vig-msg-name{font-weight:650;color:var(--fg)}
.vig-msg-time{color:var(--fg-subtle);font-weight:500}
.vig-tones{display:flex;gap:6px;margin-bottom:10px}
.vig-tones span{font-size:12px;font-weight:600;padding:5px 12px;border-radius:var(--r-pill);border:1px solid var(--border-strong);color:var(--fg-muted)}
.vig-tones span.on{background:var(--fg);color:var(--bg);border-color:var(--fg)}
.vig-tpls{display:grid;grid-template-columns:repeat(4,1fr);gap:7px}
.vig-tpls span{display:grid;place-items:center;text-align:center;font-size:9.5px;font-weight:600;line-height:1.25;height:64px;border-radius:7px;border:1px solid var(--border-strong);color:var(--fg-muted);background:var(--surface)}
.vig-tpls .t-editorial{font-family:Georgia,serif;font-weight:400}
.vig-tpls .t-poster{background:var(--fg);color:var(--bg);font-weight:800;font-size:10px}
.vig-tpls .t-mono{font-family:var(--mono);letter-spacing:var(--tracking-mono);border-style:dashed}
/* trust strip */
.ld-trust{padding:clamp(8px,2vw,18px) 0 clamp(36px,5vw,56px);text-align:center}
.trust-badges{display:flex;flex-wrap:wrap;gap:8px;justify-content:center;margin-bottom:14px}
.trust-badge{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--fg-muted);border:1px solid var(--border);border-radius:var(--r-pill);padding:6px 12px;background:var(--surface)}
.trust-badge svg{width:12px;height:12px;color:var(--accent-soft-fg)}
.trust-line{font-size:13px;color:var(--fg-muted);max-width:74ch;margin:0 auto;line-height:1.65}
/* pricing is implemented as the React island in src/Pricing.jsx */
.ld-pricing{padding:0 0 clamp(20px,3vw,36px)}
/* auth card tabs */
.auth-tabs{display:flex;gap:4px;background:var(--surface-2);border:1px solid var(--border);border-radius:var(--r-sm);padding:3px;margin-bottom:16px}
.auth-tab{flex:1;border:0;background:transparent;border-radius:5px;padding:8px 10px;font-size:13px;font-weight:600;color:var(--fg-muted);transition:background .15s,color .15s}
.auth-tab.on{background:var(--surface);color:var(--fg);box-shadow:var(--shadow-sm)}
.login-input.txt{font-family:var(--sans);letter-spacing:0}
.auth-links{display:flex;justify-content:space-between;gap:10px;margin-top:14px;flex-wrap:wrap}
.auth-links a{font-size:12.5px;color:var(--fg-muted);font-weight:500}
.auth-links a:hover{color:var(--accent-soft-fg)}

/* ============================== APP SHELL 2 ============================== */
/* Efferd App Shell 2 structure, mapped onto Resiboo's established route and action layer. */
#app:not(.auth-shell){background:var(--bg)}
.dashboard-sidebar{width:320px;flex-basis:320px;padding:12px;background:var(--shell);border-right:1px solid var(--border);overflow:visible;z-index:80;transition:width .26s cubic-bezier(.16,1,.3,1),flex-basis .26s cubic-bezier(.16,1,.3,1),padding .26s cubic-bezier(.16,1,.3,1)}
.dashboard-sidebar .brand{min-height:58px;padding:8px 8px 16px;border:0;gap:10px}
.dashboard-sidebar .brand-mark{width:32px;height:32px;background:var(--primary);border-radius:9px;box-shadow:none}
.dashboard-sidebar .brand-mark svg{color:var(--primary-fg)}
.dashboard-sidebar .brand-sub{font-size:11px;color:var(--fg-subtle)}
.dashboard-sidebar .nav{padding:8px 2px 10px;gap:22px}
.dashboard-sidebar .nav-section{gap:3px}
.dashboard-sidebar .nav-section-label{padding:0 10px 7px;font-size:10px;letter-spacing:.08em;color:var(--fg-subtle)}
.dashboard-sidebar .nav-link{grid-template-columns:20px minmax(0,1fr) auto;min-height:38px;padding:8px 10px;border-radius:8px;font-size:13.5px}
.dashboard-sidebar .nav-link small{display:none}.dashboard-sidebar .nav-link .nav-meta{display:block;color:var(--fg-subtle);font-size:9px;font-weight:600;text-transform:uppercase;letter-spacing:var(--tracking-caps)}
.dashboard-sidebar .nav-link.active{background:var(--surface);box-shadow:none}
.dashboard-sidebar .nav-link.active::before{display:none}
.dashboard-sidebar .nav-link.active svg{color:var(--accent-soft-fg)}
.dashboard-sidebar .nav-link .badge{border-radius:999px;background:var(--red);color:#fff}
.dashboard-sidebar #studio-ws-switcher-slot{padding:0 2px 10px}
.dashboard-sidebar .nav-foot{padding:10px 2px 2px;border:0;background:transparent;display:block}
/* Admin panel sidebar (views.js adminShell) -- deliberately its own class, not .dashboard-sidebar:
   that one is a two-column row layout (rail + detail, see "Two-level sidebar" below), and the
   admin panel is a plain single-column brand/nav/footer stack. Sharing the class put brand, nav
   and footer into three side-by-side row cells instead of a vertical stack. .sidebar/.brand/.nav/
   .nav-link/.nav-foot base rules above already give this the right look on their own. */
.admin-sidebar .nav-link .nav-path{display:block;margin-top:1px;font-family:var(--mono);font-size:10px;color:var(--fg-subtle);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.admin-account-foot{display:flex;align-items:center;justify-content:space-between;gap:10px}
.admin-account-who{min-width:0;overflow:hidden}
.admin-account-who b{display:block;font-size:12.5px;font-weight:600;color:var(--fg);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.admin-account-who small{font-size:11px;color:var(--fg-subtle)}
.admin-account-foot .account-signout{flex:0 0 auto;display:flex;align-items:center;gap:6px;padding:7px 10px;border:1px solid var(--border);border-radius:8px;background:transparent;color:var(--red);font:600 12px var(--sans);white-space:nowrap;transition:background .16s,border-color .16s}
.admin-account-foot .account-signout:hover{background:var(--surface);border-color:var(--border-strong)}
.admin-account-foot .account-signout svg{width:14px;height:14px}

/* Admin hub pages - tabbed layout for consolidated views */
.hub-tabs-container{margin-top:16px}
.hub-tab-bar{display:flex;flex-wrap:wrap;gap:8px;padding:8px;background:var(--surface);border-radius:10px;border:1px solid var(--border)}
.hub-tab{padding:10px 14px;border:none;border-radius:8px;background:transparent;color:var(--fg-muted);font-size:13px;font-weight:500;cursor:pointer;display:flex;align-items:center;gap:6px;transition:background .15s,color .15s}
.hub-tab svg{width:14px;height:14px}
.hub-tab:hover{background:var(--surface-2);color:var(--fg)}
.hub-tab.active{background:var(--primary);color:var(--primary-fg)}
.hub-content{margin-top:16px}

.topbar-path{font-family:var(--mono);font-size:11.5px;color:var(--fg-subtle)}
.dashboard-main{background:var(--bg);min-height:100dvh}
/* Invoice Studio mounts inside the classic shell's content slot now (unified sidebar) instead of
   replacing #app wholesale -- it owns a definite-height box to lay its own canvas engine out in,
   same as it did full-viewport before, just bounded to this box instead of the true viewport. */
.dashboard-main:has(.invoice-studio-slot){height:100dvh;min-height:0}
.dashboard-main:has(.invoice-studio-slot) .topbar{display:none}
.dashboard-main:has(.invoice-studio-slot) .content{padding:0;max-width:none;flex:1;min-height:0;overflow:hidden;display:flex}
.invoice-studio-slot{flex:1;min-height:0;width:100%;display:flex}
.dashboard-main .topbar{display:flex;align-items:center;justify-content:space-between;min-height:56px;padding:8px 20px;border-bottom:1px solid var(--border);background:color-mix(in srgb,var(--bg) 90%,transparent);backdrop-filter:blur(18px);-webkit-backdrop-filter:blur(18px);position:sticky;top:0;z-index:50}
.dashboard-main .topbar-mark{background:var(--primary)}
.dashboard-main .topbar-mark svg{color:var(--primary-fg)}
.topbar-l,.topbar-r{display:flex;align-items:center;gap:10px}
.mobile-brand{display:none;border:0;background:transparent;color:inherit;align-items:center;gap:9px}
.topbar-separator{width:1px;height:18px;background:var(--border)}
.topbar-page{font-size:13.5px;font-weight:600;color:var(--fg-muted)}
.topbar-search{height:34px;min-width:176px;padding:0 8px 0 10px;display:flex;align-items:center;gap:8px;border:1px solid var(--border);border-radius:8px;background:var(--surface);color:var(--fg-muted);font-size:12.5px;text-align:left}
.topbar-search:hover{border-color:var(--border-strong);color:var(--fg)}
.topbar-search span{flex:1}
.topbar-search svg{width:14px;height:14px}
.topbar-search kbd{font:600 10px var(--sans);padding:2px 5px;border:1px solid var(--border);border-radius:5px;background:var(--surface-2);color:var(--fg-subtle)}
.dashboard-main .content{width:100%;max-width:none;padding:24px 36px 96px}
.dashboard-main .page-head{align-items:center;margin-bottom:20px;padding-bottom:16px}
.dashboard-main .page-head h1{font-size:25px;font-weight:650}
.dashboard-main .page-head p.sub{font-size:13.5px}
.dashboard-main .card,.dashboard-main .kpi{border-radius:10px;box-shadow:none}
.dashboard-main .kpi{padding:16px}
.dashboard-main .kpi::before{height:2px}
.dashboard-main .kpi .val{font-size:26px}
.mobile-account{display:none}
.desktop-header-actions{display:flex;align-items:center;gap:12px}
.header-icon-button{width:32px;height:32px;display:grid;place-items:center;border:1px solid var(--border);border-radius:8px;background:var(--bg);color:var(--fg-muted);transition:background .16s,border-color .16s,color .16s,transform .16s}
.header-icon-button:hover{background:var(--surface);border-color:var(--border-strong);color:var(--fg)}
.header-icon-button:active{transform:scale(.94)}
.header-icon-button svg{width:14px;height:14px}
#app.sidebar-collapsed .dashboard-sidebar{width:58px;flex-basis:58px;padding:8px 7px;border-right:1px solid var(--border)}
#app.sidebar-collapsed .dashboard-sidebar .brand{min-height:48px;padding:5px 1px 11px;justify-content:center}
#app.sidebar-collapsed .dashboard-sidebar .brand-mark{visibility:hidden}
[data-preview] #app.sidebar-collapsed .dashboard-sidebar .brand::after{display:none}
#app.sidebar-collapsed .dashboard-sidebar .brand>div:last-child,#app.sidebar-collapsed .dashboard-sidebar .nav-section-label,#app.sidebar-collapsed .dashboard-sidebar .nav-link>span,#app.sidebar-collapsed .dashboard-sidebar .nav-link small,#app.sidebar-collapsed .dashboard-sidebar .nav-link .badge,#app.sidebar-collapsed .dashboard-sidebar #studio-ws-switcher-slot,#app.sidebar-collapsed .dashboard-sidebar .latest-change,#app.sidebar-collapsed .sidebar-resources span,#app.sidebar-collapsed .account-copy,#app.sidebar-collapsed .account-menu>summary>svg{display:none}
#app.sidebar-collapsed .dashboard-sidebar .brand-mark{width:30px;height:30px;border-radius:8px}
#app.sidebar-collapsed .dashboard-sidebar .nav{padding:2px 0 8px;gap:10px;overflow:visible}
#app.sidebar-collapsed .dashboard-sidebar .nav-link{display:grid;grid-template-columns:1fr;place-items:center;width:34px;min-height:34px;padding:0;border-radius:8px}
#app.sidebar-collapsed .dashboard-sidebar .nav-link svg{width:15px;height:15px}
#app.sidebar-collapsed .dashboard-sidebar .nav-foot{padding:7px 0 1px}
#app.sidebar-collapsed .sidebar-resources{align-items:center;padding-bottom:7px;margin-bottom:7px}
#app.sidebar-collapsed .sidebar-resources a{display:grid;place-items:center;width:34px;min-height:34px;padding:0;grid-template-columns:1fr}
#app.sidebar-collapsed .account-menu>summary{width:34px;height:38px;padding:3px 1px;justify-content:center}
#app.sidebar-collapsed .account-avatar{width:28px;height:28px;font-size:9px}
#app.sidebar-collapsed .efferd-dashboard{animation:dashboard-reflow .3s cubic-bezier(.16,1,.3,1)}
@keyframes dashboard-reflow{from{opacity:.94;transform:scale(.998)}to{opacity:1;transform:none}}

/* Two-level sidebar (icon rail + contextual detail panel), unified across the classic app and
   Invoice Studio's Editor -- one sidebar, not a different one per surface. The rail is always
   icon-only and always visible; the existing whole-sidebar collapse (App.toggleSidebar, ⌘B)
   still hides both columns down to 49px, unchanged. */
.dashboard-sidebar{flex-direction:row;padding:0;align-items:stretch}
.rail{flex:0 0 58px;width:58px;display:flex;flex-direction:column;align-items:center;padding:16px 9px;gap:9px;border-right:1px solid var(--border)}
.rail-brand{display:grid;place-items:center;width:38px;height:38px;margin-bottom:10px;border-radius:10px;color:var(--fg)}
.rail-brand svg{width:19px;height:19px}
.rail-icon{display:grid;place-items:center;width:40px;height:40px;border-radius:10px;color:var(--fg-subtle);transition:background .16s,color .16s}
.rail-icon svg{width:19px;height:19px}
.rail-icon:hover{background:var(--surface);color:var(--fg-muted)}
.rail-icon.active{background:var(--surface);color:var(--accent-soft-fg)}
.rail-spacer{flex:1}
.sidebar-toggle-arrow{transform:rotate(45deg);transition:transform .2s cubic-bezier(.16,1,.3,1)}
#app.sidebar-collapsed .sidebar-toggle-arrow{transform:rotate(-135deg)}
.detail{flex:1;min-width:0;display:flex;flex-direction:column;padding:14px 14px 0;overflow:hidden}
.detail-brand{display:flex;align-items:center;gap:9px;margin-bottom:14px;color:var(--fg)}
.detail-brand .brand-mark{width:26px;height:26px;background:var(--primary);border-radius:8px;display:grid;place-items:center;flex:0 0 auto}
.detail-brand .brand-mark svg{width:14px;height:14px;color:var(--primary-fg)}
.detail-brand span{font-weight:600;font-size:14.5px}
.detail-title-row{display:flex;align-items:center;justify-content:space-between;margin-bottom:12px}
.detail-title-row h2{font-family:var(--sans);font-size:15.5px;font-weight:600;letter-spacing:var(--tracking-bold)}
.detail-search{margin-bottom:14px}
.detail-search .input{padding:8px 10px;font-size:13px}
.detail-body{flex:1;min-height:0;overflow-y:auto;display:flex;flex-direction:column;gap:16px;padding-bottom:8px}
.detail-group{display:flex;flex-direction:column;gap:1px}
.detail-group-label{padding:0 10px 5px;font-size:12.5px;font-weight:600;color:var(--blue-soft-fg)}
.detail-link{display:grid;grid-template-columns:16px minmax(0,1fr) auto;align-items:center;gap:9px;padding:8px 10px;border-radius:8px;font-size:13.5px;color:var(--fg-muted)}
.detail-link svg{width:15px;height:15px;color:var(--fg-subtle)}
.detail-link:hover{background:var(--surface);color:var(--fg)}
.detail-link.active{background:var(--surface);color:var(--fg);font-weight:600}
.detail-link.active svg{color:var(--accent-soft-fg)}
.detail-expand{width:100%}
.detail-expand>summary{list-style:none;display:grid;grid-template-columns:16px minmax(0,1fr) auto;align-items:center;gap:9px;padding:8px 10px;border-radius:8px;font-size:13.5px;color:var(--fg-muted);cursor:pointer}
.detail-expand>summary::-webkit-details-marker{display:none}
.detail-expand>summary:hover{background:var(--surface)}
.detail-expand>summary svg{width:15px;height:15px}
.detail-expand>summary .chevron-toggle{transform:rotate(180deg);transition:transform .16s;color:var(--fg-subtle)}
.detail-expand[open]>summary .chevron-toggle{transform:rotate(0)}
.detail-children{display:flex;flex-direction:column;gap:1px;padding:2px 0 4px 25px}
.detail-sublink{padding:7px 9px;border-radius:7px;font-size:13px;color:var(--fg-muted)}
.detail-sublink:hover{background:var(--surface);color:var(--fg)}
.detail-sublink.active{background:var(--surface);color:var(--fg);font-weight:600}
.detail-empty{padding:6px 9px;font-size:12px;color:var(--fg-subtle)}
.detail-foot{margin-top:auto;padding-bottom:10px}
#app.sidebar-collapsed .detail{display:none}
#app.sidebar-collapsed .rail{border-right:0}
.sidebar-resources{display:flex;flex-direction:column;gap:2px;padding:0 0 10px;margin-bottom:8px;border-bottom:1px solid var(--border)}
.sidebar-resources a{min-height:34px;padding:7px 9px;display:grid;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:8px;border-radius:7px;color:var(--fg-muted);font-size:12.5px;font-weight:500}
.sidebar-resources a:hover{background:var(--surface);color:var(--fg)}
.sidebar-resources svg{width:14px;height:14px;color:var(--fg-subtle)}
.sidebar-resources small{padding:2px 5px;border-radius:999px;background:var(--accent-soft);color:var(--accent-soft-fg);font-size:9px;font-weight:700;text-transform:uppercase;letter-spacing:.04em}
.latest-change{position:relative;min-height:108px;padding:12px 14px 9px;margin:0 0 8px;border-top:1px solid var(--border);border-bottom:1px solid var(--border);display:flex;flex-direction:column;align-items:flex-start;gap:4px;overflow:hidden;transition:opacity .18s,transform .18s,max-height .18s,padding .18s,margin .18s}
.latest-change>span{font:400 9.5px var(--mono);color:var(--fg-subtle)}
.latest-change>b{max-width:240px;font-size:12px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.latest-change>p{max-width:240px;color:var(--fg-subtle);font-size:10px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.latest-change>a{font-size:11px;color:var(--fg-muted);text-decoration:underline;text-underline-offset:3px}
.latest-change>a:hover{color:var(--fg)}
.latest-change>button{position:absolute;top:7px;right:7px;width:24px;height:24px;display:grid;place-items:center;border:0;border-radius:50%;background:transparent;color:var(--fg-subtle);opacity:0;transition:opacity .16s,background .16s,color .16s}
.latest-change:hover>button,.latest-change>button:focus-visible{opacity:1}.latest-change>button:hover{background:var(--surface-2);color:var(--fg)}.latest-change>button svg{width:13px;height:13px}
.latest-change.is-dismissing{max-height:0;min-height:0;padding-top:0;padding-bottom:0;margin:0;opacity:0;transform:translateY(6px)}

/* Account avatar and menu */
.account-menu{position:relative;width:100%}
.account-menu>summary{list-style:none;display:flex;align-items:center;gap:9px;min-width:0;padding:7px;border-radius:9px;cursor:pointer;color:var(--fg)}
.account-menu>summary::-webkit-details-marker{display:none}
.account-menu>summary:hover{background:var(--surface)}
.account-menu>summary>svg{width:13px;height:13px;margin-left:auto;color:var(--fg-subtle);transform:rotate(-135deg);transition:transform .16s}
.account-menu[open]>summary>svg{transform:rotate(45deg)}
.account-avatar{position:relative;width:32px;height:32px;flex:0 0 auto;display:grid;place-items:center;border-radius:50%;background:var(--primary);color:var(--primary-fg);font-size:11px;font-weight:750;letter-spacing:.02em}
.account-avatar-lg{width:70px;height:70px;font-size:17px}
.avatar-presence{position:absolute;right:-2px;bottom:-1px;width:14px;height:14px;display:grid;place-items:center;border:3px solid var(--surface);border-radius:50%;color:#fff;box-sizing:border-box;pointer-events:none}
.avatar-presence svg{width:7px!important;height:7px!important;stroke-width:3}
.avatar-presence.presence-active{background:#20a76b}.avatar-presence.presence-quiet{background:#d54b57}.avatar-presence.presence-away{background:#d7972d}
.account-avatar-lg .avatar-presence{right:0;bottom:2px;width:18px;height:18px;border-width:3px}
.account-avatar-lg .avatar-presence svg{width:9px!important;height:9px!important}
.account-copy{display:flex;flex-direction:column;min-width:0;line-height:1.25}
.account-copy b{max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:12.5px}
.account-copy small{max-width:190px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:10.5px;color:var(--fg-subtle)}
.account-popover{position:absolute;z-index:220;width:234px;max-height:calc(100dvh - 24px);overflow-x:hidden;overflow-y:auto;padding:7px;border:1px solid var(--border);border-radius:11px;background:var(--surface);box-shadow:var(--shadow-lg);scrollbar-width:thin;transform-origin:top right;transition:opacity .16s ease-out,transform .16s cubic-bezier(.2,.9,.3,1)}
.dashboard-sidebar .account-popover{transform-origin:bottom left}
.account-menu[open] .account-popover{opacity:1;transform:scale(1) translateY(0)}
@starting-style{.account-menu[open] .account-popover{opacity:0;transform:scale(.96) translateY(-4px)}}
.account-status{padding:8px 9px;margin-bottom:2px;font-size:12px;line-height:1.4;color:var(--fg-muted);border-radius:7px}
.account-status b{color:var(--fg)}
.account-status.warn{background:var(--amber-soft);color:var(--amber-soft-fg)}
.account-status.info{background:var(--blue-soft);color:var(--blue-soft-fg)}
.dashboard-sidebar .account-popover{left:0;bottom:calc(100% + 8px)}
#app.sidebar-collapsed .dashboard-sidebar .account-popover{left:0}
.topbar .account-menu{width:auto}
.topbar .account-menu>summary{padding:1px}
.topbar .account-copy,.topbar .account-menu>summary>svg{display:none}
.topbar .account-popover{right:0;top:calc(100% + 8px)}
/* Popover head: a small preview banner (Discord's "peek" of the profile it links to) with the
   avatar overlapping its bottom edge, same idea as the full #/account page, scaled to 234px. */
.account-popover>a.account-popover-head{display:block;width:calc(100% + 10px);min-height:0;margin:-5px -5px 5px;padding:0;border-radius:8px 8px 0 0;color:var(--fg);overflow:hidden}
.account-popover>a.account-popover-head:hover .popover-profile{background:var(--surface-2)}
.popover-mini-banner{height:77px;background:#fff center/cover no-repeat}
.popover-profile{position:relative;display:block;min-height:93px;padding:0 8px 10px;margin-top:-39px}
.popover-profile>.account-avatar{margin-bottom:5px}
.popover-profile>svg{position:absolute;right:8px;top:77px;width:13px;height:13px;color:var(--fg-subtle)}
.popover-identity{min-width:0;display:flex;flex-direction:column;line-height:1.28}
.chevron-right{transform:rotate(90deg)}
.account-popover-head .account-avatar-lg{border:4px solid var(--surface);box-shadow:0 0 0 1px var(--border)}
.account-popover-head b,.account-popover-head small{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.account-popover-head b{font-size:13.5px;line-height:1.2}.account-popover-head small{font-size:10.5px;color:var(--fg-subtle)}
.account-popover>a,.account-popover>button{width:100%;min-height:36px;padding:8px 9px;display:grid;grid-template-columns:18px minmax(0,1fr) auto;align-items:center;gap:8px;border:0;border-radius:7px;background:transparent;color:var(--fg-muted);font:500 12.5px var(--sans);text-align:left}
.account-popover>a:hover,.account-popover>button:hover{background:var(--surface-2);color:var(--fg)}
.account-popover svg{width:15px;height:15px}.account-popover small{font-size:10.5px;color:var(--fg-subtle)}
.account-popover .account-signout{margin-top:5px;border-top:1px solid var(--border);border-radius:0 0 7px 7px;color:var(--red)}
.account-avatar.has-photo{background-size:cover;background-position:center;background-color:var(--surface-2)}
/* The top-ranked alert (B12), restyled as its own small card: a severity-tinted icon chip plus
   a real two-tier hierarchy (what, then who) instead of one long string left to wrap wherever
   the popover's width happens to break it. */
.account-popover>button.popover-alert{display:flex;align-items:center;gap:10px;min-height:48px;padding:8px 9px;margin:2px 0 10px;border-radius:9px;background:var(--surface-2);color:var(--fg)}
.account-popover>button.popover-alert:hover{background:var(--surface-3)}
.popover-alert-icon{width:30px;height:30px;flex:0 0 auto;display:grid;place-items:center;border-radius:9px;background:var(--red-soft);color:var(--red-soft-fg)}
.popover-alert-icon svg{width:15px;height:15px}
.popover-alert.sev-amber .popover-alert-icon{background:var(--amber-soft);color:var(--amber-soft-fg)}
.popover-alert.sev-blue .popover-alert-icon{background:var(--blue-soft);color:var(--blue-soft-fg)}
.popover-alert.sev-accent .popover-alert-icon{background:var(--accent-soft);color:var(--accent-soft-fg)}
.popover-alert-copy{min-width:0;text-align:left}
.popover-alert-copy b{display:block;font-size:11.5px;font-weight:650;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--fg)}
.popover-alert-copy small{display:block;margin-top:2px;font-size:10px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--fg-subtle)}
/* Status selector: quiet + away combined into one single-choice row, replacing the two former
   full-width toggle buttons -- same footprint as one of the old buttons, not both. Sits with
   clear separation below the alert card above it, not crowded against it. */
.status-row{display:flex;gap:4px;margin:0 16px 8px;padding:3px;border:1px solid var(--border);border-radius:9px;background:var(--bg)}
.status-pill{flex:1;display:flex;flex-direction:column;align-items:center;gap:3px;min-height:0;padding:6px 2px;border:0;border-radius:7px;background:transparent;color:var(--fg-subtle);font:600 9.5px var(--sans)}
.status-pill svg{width:13px;height:13px}
.status-pill.on{background:var(--surface-2);color:var(--fg);box-shadow:inset 0 0 0 1px var(--border)}
.status-detail{display:block;padding:0 4px 6px;color:var(--fg-subtle);font-size:10.5px}

/* In-product guides */
.resource-page{max-width:1120px;margin:0 auto}
.docs-intro{display:flex;align-items:flex-end;justify-content:space-between;gap:30px;padding:28px;margin-bottom:18px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.resource-kicker{display:block;margin-bottom:8px;font-size:12px;font-weight:500;color:var(--fg-muted)}
.docs-intro h2,.help-callout h2{font-size:24px;margin-bottom:8px}.docs-intro p,.help-callout p{max-width:62ch;color:var(--fg-muted);font-size:13.5px}
.docs-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
.doc-topic{position:relative;min-height:220px;padding:20px;border:1px solid var(--border);border-radius:10px;background:var(--surface);display:flex;flex-direction:column}
.doc-topic-icon{width:34px;height:34px;display:grid;place-items:center;border-radius:8px;background:var(--accent-soft);color:var(--accent-soft-fg)}
.doc-topic h3{margin-top:28px;font-size:16px}.doc-topic p{margin-top:8px;color:var(--fg-muted);font-size:13px;line-height:1.6}
.resource-link{margin-top:auto;padding-top:18px;display:flex;align-items:center;gap:7px;border:0;background:transparent;color:var(--accent-soft-fg);font:650 12.5px var(--sans)}
.resource-link svg{width:13px;height:13px;transform:rotate(45deg)}
.help-layout{display:grid;grid-template-columns:minmax(0,1fr) 260px;gap:16px;align-items:start}
.help-primary,.help-aside{min-width:0}.help-callout{padding:24px;border:1px solid var(--border);border-radius:12px;background:var(--surface)}
.help-callout{display:grid;grid-template-columns:auto 1fr;gap:14px}.help-actions{grid-column:2;display:flex;gap:8px;flex-wrap:wrap;margin-top:4px}
.faq-list{margin-top:14px;border:1px solid var(--border);border-radius:10px;background:var(--surface);overflow:hidden}
.faq-list details+details{border-top:1px solid var(--border)}
.faq-list summary{list-style:none;display:flex;align-items:center;justify-content:space-between;gap:16px;padding:16px 18px;cursor:pointer;font-weight:600;font-size:13.5px}
.faq-list summary::-webkit-details-marker{display:none}.faq-list summary svg{width:14px;height:14px;transform:rotate(45deg);transition:transform .16s}.faq-list details[open] summary svg{transform:rotate(135deg)}
.faq-list p{padding:0 18px 17px;color:var(--fg-muted);font-size:13px;line-height:1.65;max-width:75ch}
.help-aside{padding:16px;border:1px solid var(--border);border-radius:10px;background:var(--surface)}
.help-aside h3{font-size:13px;padding:2px 6px 10px}.help-aside a,.help-aside button{width:100%;display:flex;align-items:center;gap:9px;padding:9px 6px;border:0;background:transparent;color:var(--fg-muted);font:500 12.5px var(--sans);text-align:left;border-radius:7px}.help-aside a:hover,.help-aside button:hover{background:var(--surface-2);color:var(--fg)}.help-aside svg{width:15px;height:15px}.help-aside .hint{margin:12px 6px 2px}

/* Deep-Link Help Bubble */
.help-bubble{display:inline-grid;place-items:center;width:19px;height:19px;border-radius:999px;border:1px solid var(--border-strong);background:var(--surface-2);color:var(--fg-muted);font-size:11px;font-weight:700;line-height:1;vertical-align:middle;margin-left:4px;transition:background .16s,color .16s,transform .12s}
.help-bubble:hover{background:var(--accent-soft);color:var(--accent-soft-fg);transform:translateY(-1px)}
@keyframes helpFlash{0%,100%{box-shadow:none}30%{box-shadow:0 0 0 3px var(--accent-soft)}}
.help-deeplink-flash{animation:helpFlash 2s ease}

/* Plain-Language BIR Glossary */
.glossary-grid{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:14px 20px}
.glossary-row b{display:block;font-size:13px;margin-bottom:3px}
.glossary-row p{color:var(--fg-muted);font-size:12.5px;line-height:1.55}
@media print{.glossary-grid{grid-template-columns:1fr}}

/* Guide Feedback Thumbs */
.thumbs{margin-top:12px;padding-top:12px;border-top:1px solid var(--border);display:flex;align-items:center;gap:8px}
.thumbs span{font-size:12px;color:var(--fg-subtle)}
.thumbs .btn{padding:5px 9px;min-height:auto}
.thumbs-done{margin-top:12px;padding-top:12px;border-top:1px solid var(--border)}

/* Public Feature Roadmap */
.roadmap-card p{margin-top:2px}

/* Ask Assistant chat: threaded follow-ups + escalation */
.assistant-chat{margin-top:16px;border-top:1px solid var(--border);padding-top:14px}
.assistant-thread{display:flex;flex-direction:column;gap:8px;max-height:260px;overflow-y:auto;margin-bottom:10px}
.chat-bubble{display:flex;gap:8px;align-items:flex-start;padding:9px 11px;border-radius:11px;font-size:13px;line-height:1.5;max-width:92%}
.chat-bubble p{margin:0}
.chat-bubble.user{align-self:flex-end;background:var(--accent);color:var(--accent-fg)}
.chat-bubble.assistant{align-self:flex-start;background:var(--surface-2);border:1px solid var(--border)}
.chat-bubble.escalate{align-self:flex-start;background:var(--red-soft);color:var(--red-soft-fg);border:1px solid color-mix(in srgb,var(--red) 30%,transparent);flex-direction:column;max-width:100%}
.chat-bubble.escalate button{margin-top:8px}
.chat-bubble svg{width:15px;height:15px;flex:0 0 auto;margin-top:2px}
.assistant-ask-row{display:flex;gap:8px}
.assistant-ask-row .input{flex:1}
.release-list{border-top:1px solid var(--border)}
.release{display:grid;grid-template-columns:190px minmax(0,1fr);gap:30px;padding:28px 0;border-bottom:1px solid var(--border)}
.release-meta{display:flex;align-items:flex-start;gap:8px;flex-wrap:wrap}.release time{font:600 11.5px var(--mono);color:var(--fg-muted)}
.release-body h2{font-size:18px;margin-bottom:12px}.release-body ul{list-style:none;display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:9px 22px}.release-body li{display:flex;align-items:flex-start;gap:8px;color:var(--fg-muted);font-size:13px}.release-body li svg{width:14px;height:14px;flex:0 0 auto;margin-top:2px;color:var(--accent-soft-fg)}
.runtime-error{position:fixed;inset:20px;z-index:10001;display:grid;place-content:center;text-align:center;padding:30px;border-radius:12px;background:var(--surface);color:var(--fg)}
.settings-single{max-width:760px}
/* Settings: Account / Features / Backup and data, each a labeled group around the existing
   cards -- no new cards invented, just organized so the page reads as three jobs, not eight
   loose panels. */
.settings-section{margin-bottom:28px}
.settings-section+.settings-section{padding-top:24px;border-top:1px solid var(--border)}
.settings-section-head{margin-bottom:14px}
.settings-section-head h2{font-size:16px;font-weight:700}
.settings-section-head p{margin-top:3px;color:var(--fg-subtle);font-size:12.5px}
/* Discord-style profile header: a tall banner with the avatar overlapping its bottom edge --
   the #/account page's own hero, not squeezed into a Settings card. */
.profile-header-card{margin-bottom:16px}
.profile-banner{position:relative;height:184px;display:flex;justify-content:flex-end;align-items:flex-start;padding:14px;background:var(--surface-2)}
.profile-banner::after{display:none}
.profile-banner .btn{position:relative;z-index:1}
.profile-header-body{position:relative;padding:0 24px 22px;display:flex;align-items:flex-end;gap:16px;flex-wrap:wrap}
.profile-header-body>div{padding-bottom:8px}
.profile-header-body>div>b{display:block;font-size:18px}
.profile-header-body>div>small{display:block;color:var(--fg-subtle);font-size:12px;margin-top:2px}
.profile-avatar-wrap{position:relative;flex:0 0 auto;margin-top:-54px}
.profile-avatar-edit{position:absolute;right:0;bottom:2px;width:26px;height:26px;display:grid;place-items:center;border-radius:50%;background:var(--fg);color:var(--bg);cursor:pointer;border:3px solid var(--surface)}
.profile-avatar-edit svg{width:12px;height:12px}
.account-avatar-xl{width:96px;height:96px;font-size:28px;border:4px solid var(--surface);box-shadow:0 0 0 1px var(--border),var(--shadow-md)}

/* Efferd Dashboard 2: dense gap-px grid with Resiboo's real billing context. */
.efferd-dashboard{display:grid;grid-template-columns:repeat(4,minmax(0,1fr));gap:1px;padding:1px;background:var(--border)}
.efferd-card{min-width:0;background:var(--surface);color:var(--fg)}
.efferd-card>header{min-height:82px;padding:18px 20px;display:flex;align-items:flex-start;justify-content:space-between;gap:16px;border-bottom:1px solid var(--border)}
.chart-card{position:relative}
.chart-card>header{min-height:96px;border-bottom:0}
.efferd-card>header h2{font-size:14px;font-weight:650}
.efferd-card>header p{margin-top:5px;color:var(--fg-subtle);font-size:11.5px;line-height:1.45}
.stat-card{min-height:162px;padding:26px 24px;display:flex;flex-direction:column;justify-content:space-between}
.stat-label{display:flex;align-items:center;gap:8px;color:var(--fg-muted);font-size:11px;font-weight:600;text-transform:uppercase;letter-spacing:.055em}
.stat-label svg{width:14px;height:14px}
.stat-card strong{margin-top:18px;font-size:25px;font-weight:600;line-height:1;font-variant-numeric:tabular-nums;letter-spacing:0}
.stat-meta{margin-top:8px;font-size:11px;color:var(--fg-subtle)}
.stat-meta.positive{color:var(--accent-soft-fg)}.stat-meta.negative{color:var(--red)}
.net-revenue-card,.channel-sales-card,.invoices-card{grid-column:span 2}
.chart-title-row{display:flex;align-items:center;gap:8px;flex-wrap:wrap}
.delta-badge{display:inline-flex;align-items:center;gap:4px;padding:4px 8px;border-radius:8px;background:var(--accent-soft);color:var(--accent-soft-fg);font:650 10px var(--mono)}
.delta-badge svg{width:11px;height:11px}
.delta-badge.down{background:color-mix(in srgb,var(--red) 13%,transparent);color:var(--red)}
.delta-badge.down svg{transform:scaleY(-1)}
.revenue-chart{height:328px;padding:10px 26px 30px;display:flex;align-items:stretch;gap:20px;cursor:crosshair;background:var(--surface)}
.revenue-bar-col{position:relative;z-index:1;flex:1;min-width:0;display:flex;flex-direction:column;justify-content:flex-end;align-items:center;gap:10px}
.revenue-bar{position:relative;z-index:2;width:100%;max-width:96px;background:var(--fg);border-top:0;transition:height .25s ease,filter .12s ease}.revenue-bar[style*="height:0%"]{border-top:0}.revenue-bar-col.is-active .revenue-bar{filter:brightness(1.12)}
/* Reference: soft shadow gradient grounding each bar at the baseline instead of a hard edge. */
.revenue-bar-col.has-value::after{display:none}
.revenue-bar-col span,.line-labels span{color:var(--fg-subtle);font:500 9.5px var(--mono);white-space:nowrap}
.line-chart{height:328px;padding:14px 26px 30px}.line-chart svg{display:block;width:100%;height:270px;overflow:visible}
.chart-grid-line{fill:none;stroke:color-mix(in srgb,var(--border) 76%,transparent);stroke-width:1}.channel-line{fill:none;stroke-width:1.7;stroke-linejoin:miter;stroke-linecap:square}.channel-line.delivered{stroke:color-mix(in srgb,var(--fg) 52%,transparent)}.channel-line.paid{stroke:var(--fg);stroke-width:2}
/* A13: milestone markers on the track-record line (10th/50th/100th invoice). */
.track-milestone{fill:var(--surface);stroke:var(--accent-soft-fg);stroke-width:2}
.track-milestone-label{fill:var(--fg-subtle);font:650 8px var(--mono)}
.timing-hit{fill:transparent;pointer-events:all;cursor:crosshair}.track-hover-dot{opacity:0;pointer-events:none;transition:opacity .1s}.track-hit-group:hover .track-hover-dot,.track-hit-group.is-active .track-hover-dot{opacity:1}.delivered-dot{fill:color-mix(in srgb,var(--fg) 58%,transparent)}.paid-dot{fill:var(--fg)}
.line-labels{display:flex;justify-content:space-between;padding:0 4px}
.chart-control-stack{display:flex;flex-direction:column;align-items:flex-end;gap:7px}
.chart-control-row{display:flex;align-items:center;gap:7px}
.chart-switch{display:flex;padding:2px;border:1px solid var(--border);border-radius:7px;background:var(--bg)}
.chart-switch button,.chart-explain{height:26px;padding:0 9px;border:0;border-radius:5px;background:transparent;color:var(--fg-subtle);font:600 10px var(--sans);white-space:nowrap}
.chart-switch button.on{background:var(--surface-2);color:var(--fg);box-shadow:inset 0 0 0 1px var(--border)}
.chart-switch.compact button{padding:0 7px;font-size:9px}
.chart-explain{display:flex;align-items:center;gap:5px;border:1px solid var(--border);color:var(--fg-muted)}.chart-explain:hover{background:var(--surface-2);color:var(--fg)}.chart-explain svg{width:11px;height:11px}
.chart-float-tip{position:absolute;z-index:10;min-width:110px;padding:7px 10px;border:1px solid color-mix(in srgb,var(--fg) 16%,transparent);border-radius:8px;background:color-mix(in srgb,var(--bg) 92%,#000);color:var(--fg);box-shadow:0 8px 24px rgba(0,0,0,.26);opacity:0;pointer-events:none;transform:translate(-50%,-100%) scale(.96);transition:opacity .12s,transform .12s;font-size:9px}
.chart-float-tip.show{opacity:1;transform:translate(-50%,-100%) scale(1)}.chart-float-tip>small{display:block;margin-bottom:5px;color:var(--fg-subtle);font:500 8.5px var(--mono)}.chart-float-tip>b{display:flex;align-items:center;gap:6px;font-size:10px;white-space:nowrap}.chart-float-tip>b+b{margin-top:4px}.chart-float-tip span{color:var(--fg-subtle)}.chart-float-tip em{margin-left:auto;font-style:normal;font-weight:700;font-family:var(--mono)}.chart-float-tip i{width:7px;height:7px;border-radius:2px;background:var(--fg);flex:0 0 auto}.chart-float-tip i.delivered{background:color-mix(in srgb,var(--fg) 55%,transparent)}.chart-float-tip i.paid{background:var(--fg)}
.dashboard-table{min-height:240px}.dashboard-tr{min-height:48px;padding:0 20px;display:grid;grid-template-columns:minmax(0,1.4fr) .7fr minmax(90px,.9fr);align-items:center;gap:12px;border-bottom:1px solid var(--border);font-size:12px}
.dashboard-tr:not(.dashboard-th):hover{background:var(--surface-2)}.dashboard-th{min-height:38px;color:var(--fg-subtle);font-size:10px;text-transform:uppercase;letter-spacing:.05em}
.dashboard-tr>span{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.dashboard-tr>span:last-child{text-align:right}.dashboard-tr b{display:block;font-weight:600}.dashboard-tr small{display:block;margin-top:1px;font-size:9.5px;text-transform:capitalize;color:var(--fg-subtle)}.dashboard-tr .status-overdue{color:var(--red)}.dashboard-tr .status-paid{color:var(--accent-soft-fg)}
.dashboard-view-all{position:relative;z-index:4;min-height:48px;padding:0 20px;display:flex;align-items:center;justify-content:center;background:var(--surface);color:var(--fg-muted);font-size:11.5px;font-weight:600}.dashboard-view-all::before{display:none}.dashboard-view-all>span{position:relative;z-index:1;display:inline-flex;align-items:center;justify-content:center;gap:7px;min-height:31px;padding:0;transition:color .14s}.dashboard-view-all:hover,.dashboard-view-all:focus-visible{color:var(--fg)}.dashboard-view-all svg{width:12px;height:12px;transform:rotate(45deg)}
.dashboard-empty{min-height:190px;display:grid;place-items:center;color:var(--fg-subtle);font-size:12px}
.invoices-card,.attention-card{position:relative}
/* A soft bottom fade on Net revenue, Recent invoices, and Needs your attention -- purely a depth
   cue, sits above the content and never blocks clicks under it. */
.attention-card{grid-column:span 2;min-height:386px}
.attention-count{min-width:24px;height:24px;padding:0 7px;display:grid;place-items:center;border-radius:999px;background:var(--red);color:#fff;font:700 10px var(--mono)}
.attention-card ol{list-style:none}.attention-card li{min-height:72px;padding:11px 16px;display:grid;grid-template-columns:28px minmax(0,1fr) auto;align-items:center;gap:12px;border-bottom:1px solid var(--border)}
.attention-card li.attention-first{background:color-mix(in srgb,var(--accent) 5%,var(--surface))}
.attention-rank{width:26px;height:26px;display:grid;place-items:center;border:1px solid var(--border);border-radius:50%;color:var(--fg-subtle);font:650 10px var(--mono)}.attention-first .attention-rank{border-color:color-mix(in srgb,var(--accent) 42%,var(--border));color:var(--accent-soft-fg)}
.attention-title-row{display:flex;align-items:center;gap:7px;min-width:0}.attention-title-row b{font-size:11.5px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.attention-title-row small{padding:2px 5px;border-radius:999px;background:var(--accent-soft);color:var(--accent-soft-fg);font-size:8.5px;font-weight:700;text-transform:uppercase;letter-spacing:var(--tracking-caps);white-space:nowrap}
.attention-card li p{margin-top:4px;color:var(--fg-subtle);font-size:10px;line-height:1.45;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.attention-card li>.btn{white-space:nowrap}.attention-card li>.btn svg{width:12px;height:12px;transform:rotate(45deg)}
.attention-empty{min-height:287px;padding:28px;display:flex;flex-direction:column;align-items:center;justify-content:center;text-align:center}.attention-empty>span{width:42px;height:42px;display:grid;place-items:center;border-radius:10px;background:var(--accent-soft);color:var(--accent-soft-fg);animation:checkPop .42s cubic-bezier(.34,1.56,.64,1) both}.attention-empty>span svg{width:18px;height:18px}.attention-empty h3{font-family:var(--display);font-weight:500;margin-top:14px;font-size:16px;animation:rise .4s cubic-bezier(.16,1,.3,1) .08s both}.attention-empty p{max-width:310px;margin-top:6px;color:var(--fg-subtle);font-size:11px;line-height:1.5;animation:rise .4s cubic-bezier(.16,1,.3,1) .12s both}.attention-empty .btn{margin-top:15px;animation:rise .4s cubic-bezier(.16,1,.3,1) .16s both}
@keyframes checkPop{from{opacity:0;transform:scale(.5)}to{opacity:1;transform:scale(1)}}
.attention-pulse{animation:attention-pulse .85s ease both!important}@keyframes attention-pulse{0%,100%{box-shadow:none}30%{box-shadow:inset 0 0 0 2px color-mix(in srgb,var(--accent) 65%,transparent),0 0 24px color-mix(in srgb,var(--accent) 16%,transparent)}}
.editor-soon-card{min-height:420px;padding:44px;border:1px solid var(--border);border-radius:12px;background:var(--surface);display:flex;flex-direction:column;align-items:flex-start;justify-content:center}.editor-soon-card .resource-kicker{margin:22px 0 10px}.editor-soon-card h2{max-width:660px;font-size:clamp(26px,4vw,46px);line-height:1.05;letter-spacing:-.035em}.editor-soon-card p{max-width:660px;margin-top:18px;color:var(--fg-muted);font-size:14px;line-height:1.7}
.billing-health-card,.activity-card{min-height:370px}
.health-score{padding:28px 20px 12px;display:flex;align-items:end;gap:8px}.health-score strong{font-size:38px;line-height:1;font-weight:600}.health-score span{padding-bottom:4px;color:var(--fg-subtle);font-size:11px}
.health-track{height:5px;margin:0 20px 24px;border-radius:999px;background:var(--surface-3);overflow:hidden}.health-track i{display:block;height:100%;background:var(--accent)}
.billing-health-card dl{padding:0 20px}.billing-health-card dl div{padding:9px 0;display:flex;justify-content:space-between;border-bottom:1px solid var(--border);font-size:11.5px}.billing-health-card dt{color:var(--fg-muted)}.billing-health-card dd{font-weight:650;font-variant-numeric:tabular-nums}
.activity-card ul{list-style:none}.activity-card li{min-height:64px;padding:11px 18px;display:flex;align-items:center;gap:11px;border-bottom:1px solid var(--border)}.activity-icon{width:34px;height:34px;flex:0 0 auto;display:grid;place-items:center;color:var(--fg-muted)}.activity-icon svg{width:15px;height:15px}.activity-card li div{min-width:0}.activity-card li b,.activity-card li small{display:block;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.activity-card li b{font-size:11.5px;font-weight:600}.activity-card li small{margin-top:3px;color:var(--fg-subtle);font-size:10px}

@media (max-width:1100px){
  .dashboard-sidebar{width:276px;flex-basis:276px}
  .dashboard-main .content{padding-left:24px;padding-right:24px}
  .topbar-search{min-width:150px}
  .efferd-dashboard{grid-template-columns:repeat(2,minmax(0,1fr))}
}
@media (max-width:900px){
  .dashboard-sidebar{display:none}
  .dashboard-main .topbar{padding:9px 14px;min-height:58px}
  .mobile-brand{display:flex}.topbar-separator{display:none}.topbar-page{font-size:12.5px}
  .desktop-account{display:none!important}.mobile-account{display:flex}
  .desktop-header-actions{gap:7px}.topbar-r{gap:7px}
  .topbar-search{min-width:34px;width:34px;padding:0;justify-content:center}.topbar-search span,.topbar-search kbd{display:none}
  .dashboard-main .content{padding:20px 16px 96px}
  .docs-grid{grid-template-columns:1fr}.docs-intro{align-items:flex-start;flex-direction:column}
  .help-layout{grid-template-columns:1fr}.help-aside{order:-1}
  .glossary-grid{grid-template-columns:1fr}
  .release{grid-template-columns:1fr;gap:12px}.release-body ul{grid-template-columns:1fr}
}
@media (max-width:560px){
  .topbar .account-menu>summary .account-avatar{width:30px;height:30px}
  .topbar-page{display:none}
  .docs-intro,.help-callout{padding:18px}.help-callout{grid-template-columns:1fr}.help-actions{grid-column:1}
  .doc-topic{min-height:auto}.doc-topic h3{margin-top:22px}.release{padding:22px 0}
  .efferd-dashboard{grid-template-columns:1fr}.net-revenue-card,.channel-sales-card,.invoices-card,.attention-card{grid-column:span 1}
  .efferd-card>header{padding:16px}.chart-card>header{min-height:142px;flex-direction:column}.stat-card{min-height:124px;padding:16px}.revenue-chart,.line-chart{height:236px;padding:12px 14px 26px;gap:7px}.line-chart svg{height:184px}.chart-control-stack{align-items:flex-start;width:100%}.chart-control-row{width:100%;justify-content:space-between}.chart-switch:first-child{width:100%}.chart-switch:first-child button{flex:1}.revenue-bar-col span,.line-labels span{font-size:8px}
  .attention-card li{grid-template-columns:26px minmax(0,1fr);padding:13px 14px}.attention-card li>.btn{grid-column:2;width:max-content}.attention-title-row{align-items:flex-start;flex-direction:column;gap:4px}.attention-title-row b{white-space:normal}.editor-soon-card{min-height:360px;padding:24px}
  .mobile-nav a{padding-left:3px;padding-right:3px;font-size:9px}
  .dashboard-tr{padding:0 14px;grid-template-columns:minmax(0,1.3fr) .65fr minmax(76px,.8fr)}
}

/* ============================== AUTH SCREEN (dedicated sign in / create account) ============================== */
.auth-screen{min-height:100vh;display:grid;grid-template-columns:minmax(0,1.05fr) minmax(340px,1fr)}
.auth-visual{position:relative;overflow:hidden;display:flex;flex-direction:column;padding:28px 44px 44px;color:#EAFBF3;background:#075439}
.auth-visual::after{display:none}
.auth-visual-brand{position:relative;z-index:1;display:flex;align-items:center;gap:10px;font-weight:600;font-size:15.5px;color:#fff}
.auth-stage{position:relative;z-index:1;flex:1;display:flex;flex-direction:column;justify-content:center;align-items:center;width:100%;max-width:400px;margin:0 auto}
.auth-slide{position:absolute;inset:0;display:flex;flex-direction:column;align-items:center;justify-content:center;gap:24px;opacity:0;transform:scale(.96) translateY(8px);pointer-events:none;transition:opacity .6s ease,transform .6s cubic-bezier(.16,1,.3,1)}
.auth-slide.on{position:relative;inset:auto;opacity:1;transform:none;pointer-events:auto}
.auth-slide svg{width:100%;max-width:230px;height:auto;overflow:visible}
.auth-lower{width:100%;background:rgba(4,20,14,.5);backdrop-filter:blur(8px);-webkit-backdrop-filter:blur(8px);border:1px solid rgba(255,255,255,.14);border-radius:14px;padding:14px 18px}
.auth-lower b{display:block;font-size:15px;color:#fff;letter-spacing:var(--tracking-bold)}
.auth-lower span{display:block;margin-top:4px;font-size:12.5px;color:rgba(234,251,243,.8);line-height:1.5}
.auth-dots{position:relative;z-index:1;display:flex;gap:6px;justify-content:center;margin-top:22px}
.auth-dots i{width:6px;height:6px;border-radius:50%;background:rgba(255,255,255,.32);transition:background .3s,width .3s}
.auth-dots i.on{background:#fff;width:18px;border-radius:3px}
@media (prefers-reduced-motion:no-preference){
  .auth-slide svg .draw{stroke-dasharray:460;stroke-dashoffset:460}
  .auth-slide.on svg .draw{animation:authDraw 1.2s cubic-bezier(.16,1,.3,1) .1s forwards}
}
@keyframes authDraw{to{stroke-dashoffset:0}}
.auth-panel{position:relative;display:flex;align-items:center;justify-content:center;padding:44px 28px}
.auth-home{position:absolute;top:20px;left:20px}
.auth-panel-inner{width:100%;max-width:400px}
.auth-panel-brand{display:none;align-items:center;gap:10px;font-weight:600;font-size:15.5px;margin-bottom:22px}
.auth-google{width:100%;position:relative}
.auth-or{display:flex;align-items:center;gap:10px;margin:16px 0;font-size:12px;color:var(--fg-subtle)}
.auth-or::before,.auth-or::after{content:"";flex:1;height:1px;background:var(--border)}
@media (max-width:880px){
  .auth-screen{grid-template-columns:1fr;min-height:auto}
  .auth-visual{display:none}
  .auth-panel-brand{display:flex}
  .auth-panel{padding:70px 22px 40px}
  .auth-home{top:14px;left:14px}
}

/* Admin panel -- phone layout (≤560px): the sidebar becomes a full-width top band above the content,
   nav sections wrap as chip rows, and the topbar keeps its page name instead of the raw hash path.
   The global 560 rules above hide .topbar-page for the invoice app; the admin shell re-shows it here
   (scoped to #app.admin-shell so nothing leaks into the regular dashboard layout). */
@media(max-width:560px){
  #app.admin-shell{display:block;background:none}
  .admin-sidebar{position:relative;width:auto;height:auto;border-right:0;border-bottom:1px solid var(--border)}
  .admin-sidebar .nav{flex-direction:row;flex-wrap:wrap;gap:8px;padding:8px 12px}
  .admin-sidebar .nav-section{flex-direction:row;flex-wrap:wrap;gap:4px}
  .admin-sidebar .nav-link{grid-template-columns:auto auto;min-height:auto;padding:6px 8px;font-size:13px}
  .admin-sidebar .nav-link svg{display:none}
  .admin-sidebar .nav-path{display:none}
  #app.admin-shell .brand-sub{display:none}
  #app.admin-shell .topbar-page{display:block}
  #app.admin-shell .topbar-path{display:none}
}
