/* ============================================================
   AQUIFER CRM — refined-financial design system (light + dark)
   Bespoke. Navy + teal. Tabular numerals. Quiet depth.
   ============================================================ */
:root {
  --navy-900:#0B1F3A; --navy-800:#102A4C; --navy-700:#163358; --navy-600:#1B3A6B;
  --teal-600:#0891b2; --teal-500:#06b6d4; --teal-400:#22d3ee;  /* cyan ramp to match the neon-cyan logo (2026-07-01) */
  --green:#16A34A; --green-soft:#DCFCE7;
  --amber:#D97706; --amber-soft:#FEF3C7;
  --red:#DC2626;   --red-soft:#FEE2E2;
  --blue:#2563EB;  --blue-soft:#DBEAFE;
  --violet:#7C3AED;--violet-soft:#EDE9FE;

  --r-sm:7px; --r:10px; --r-lg:14px; --r-xl:20px; --r-full:999px;
  --font:'Inter',system-ui,-apple-system,sans-serif;
  --num:'Inter',system-ui; /* tabular via font-feature-settings */
  --ease:cubic-bezier(.16,1,.3,1);
  --maxw:1320px;
}

/* ---- Light (default) ---- */
[data-theme="light"]{
  --bg:#F3F6FB; --bg-grad:radial-gradient(1200px 600px at 80% -10%, #E9F2F1 0%, transparent 60%);
  --surface:#FFFFFF; --surface-2:#F8FAFC; --surface-3:#F1F5F9;
  --line:#E6EBF2; --line-2:#EDF1F7;
  --ink:#0E1B2E; --ink-2:#3D4D63; --muted:#6B7B92; --faint:#9AA8BC;
  --brand:#0B1F3A; --accent:#0891b2; --accent-ink:#0e7490; --accent-rgb:34,211,238;
  --shadow-sm:0 1px 2px rgba(13,30,55,.05), 0 1px 3px rgba(13,30,55,.04);
  --shadow:0 4px 14px rgba(13,30,55,.07), 0 2px 6px rgba(13,30,55,.04);
  --shadow-lg:0 18px 50px rgba(13,30,55,.12);
  --side-bg:#0B1F3A; --side-ink:#CAD6E6; --side-ink-2:#8298B7; --side-line:rgba(255,255,255,.08); --side-active:rgba(255,255,255,.06);
  --chart-grid:#EDF1F7;
}
/* ---- Dark ---- */
[data-theme="dark"]{
  --bg:#070D17; --bg-grad:radial-gradient(1200px 600px at 80% -10%, rgba(var(--accent-rgb),.07) 0%, transparent 60%);
  --surface:#0E1828; --surface-2:#0B1422; --surface-3:#142235;
  --line:#1C2A40; --line-2:#172339;
  --ink:#E7EDF6; --ink-2:#AEBCD0; --muted:#7C8DA6; --faint:#56657E;
  --brand:#E7EDF6; --accent:#22d3ee; --accent-ink:#67e8f9; --accent-rgb:34,211,238;
  --shadow-sm:0 1px 2px rgba(0,0,0,.4); --shadow:0 6px 20px rgba(0,0,0,.45); --shadow-lg:0 24px 60px rgba(0,0,0,.6);
  --side-bg:#0A101D; --side-ink:#AEBCD0; --side-ink-2:#62748F; --side-line:rgba(255,255,255,.06); --side-active:rgba(255,255,255,.05);
  --chart-grid:#172339;
}

/* ============================================================
   WHITE-LABEL BRANDS — one codebase, branded by hostname/?brand
   Aquifer = navy + teal (default, above). ProceedPay = blue.
   Overriding --teal-* recolors the hardcoded chart/indicator teal.
   ============================================================ */
[data-brand="proceedpay"][data-theme="light"]{
  --accent:#0190E6; --accent-ink:#016BB0; --accent-rgb:1,161,254;
  --teal-600:#0190E6; --teal-500:#01A1FE; --teal-400:#36B8FF;
  --side-bg:#0A2C4D;
}
[data-brand="proceedpay"][data-theme="dark"]{
  --accent:#01A1FE; --accent-ink:#7CC9FF; --accent-rgb:1,161,254;
  --teal-600:#0190E6; --teal-500:#01A1FE; --teal-400:#36B8FF;
  --side-bg:#08203A;
}
/* 0030 (crm.0030.io) = the 0030.io brand (rethemed 2026-07-24): near-black blue
   #090c12 + gold #d8b25a, teal #5fd3cf live-accents, JetBrains Mono UI.
   Tokens lifted from 0030.io's :root. Dark-first (brand.js defaultTheme).
   Do NOT revert to the cyan/navy skin. */
[data-brand="zerothirty"]{
  --font:'JetBrains Mono',ui-monospace,SFMono-Regular,Menlo,monospace;
  --num:'JetBrains Mono',ui-monospace;
}
[data-brand="zerothirty"][data-theme="light"]{
  --accent:#b08a36; --accent-ink:#8a6a24; --accent-rgb:216,178,90;
  --teal-600:#2fa7a3; --teal-500:#45c5c1; --teal-400:#5fd3cf;
  --side-bg:#0b0f16;
}
[data-brand="zerothirty"][data-theme="dark"]{
  --bg:#090c12; --surface:#0e131c; --surface-2:#0b0f16; --surface-3:#141b28;
  --line:#1d2534; --line-2:#161d2a;
  --ink:#f2efe8; --ink-2:#c7c3ba; --muted:#9aa0aa; --faint:#5a616c;
  --accent:#d8b25a; --accent-ink:#e7cd91; --accent-rgb:216,178,90;
  --teal-600:#3fb9b5; --teal-500:#5fd3cf; --teal-400:#83dedb;
  --side-bg:#090c12; --chart-grid:#161d2a;
}
/* wordmark logo (white-label brands with an image mark) */
.brand__logo{height:24px;width:auto;max-width:158px;display:block}

*,*::before,*::after{box-sizing:border-box;margin:0;padding:0}
/* Default size for hydrated <i> icons used outside a sized context. Every
   context rule (.nav__link i, .btn i, .kpi__ic i, swatches, …) is more specific
   and overrides this, so it only catches bare inline icons (e.g. Tools views). */
i{width:16px;height:16px;flex:0 0 16px}
html{-webkit-font-smoothing:antialiased;text-rendering:optimizeLegibility}
body{font-family:var(--font);background:var(--bg);background-image:var(--bg-grad);background-attachment:fixed;color:var(--ink);font-size:14px;line-height:1.5;min-height:100vh}
.num,td.n,.stat__val,.kpi__val{font-variant-numeric:tabular-nums;font-feature-settings:"tnum" 1,"cv01" 1}
a{color:inherit;text-decoration:none}
button{font:inherit;cursor:pointer;background:none;border:none;color:inherit}
::selection{background:rgba(var(--accent-rgb),.22)}
h1,h2,h3,h4{letter-spacing:-.01em;line-height:1.2}

/* ============ APP SHELL ============ */
/* clip horizontal overflow at the document root so nothing can produce a page-level
   side-scroll on mobile; overflow-x:clip (not hidden) does NOT break the sticky topbar.
   Inner scrollers (.tbl-wrap, .kanban) keep their own overflow-x:auto. */
html{overflow-x:clip}
.app{display:grid;grid-template-columns:248px 1fr;min-height:100vh;max-width:100%;overflow-x:clip}
/* Onboarding review gate — full-screen wizard, no CRM chrome, until we approve/unlock. */
body.aq-gate .app{grid-template-columns:1fr}
body.aq-gate .sidebar,body.aq-gate .topbar{display:none}
body.aq-gate .view{max-width:920px;margin:0 auto;padding:28px 20px 96px}
/* During onboarding, the wizard's own "Chat with us" button is the single support entry —
   hide the operator chat-widget FAB so the two don't overlap. */
body.aq-gate .aqcw-fab,body.aq-gate .aqcw{display:none!important}
/* Onboarding on phones: the two-column grid collapses to one, which stacks the 240px
   step-rail (all 12 steps) ABOVE the wizard and eats the whole first screen. Collapse the
   rail to just its progress bar — the wizard card header already names the current step and
   the footer shows "Step N of 12". (Overrides the inline position:sticky on #obRail.) */
@media (max-width:720px){
  #obRail{position:static!important;top:auto!important;padding:12px 14px}
  #obRail .bar{margin-bottom:0!important}
  #obRail [data-go-step]{display:none}
}
.main{display:flex;flex-direction:column;min-width:0}

/* ---- Sidebar ---- */
.sidebar{background:var(--side-bg);color:var(--side-ink);display:flex;flex-direction:column;position:sticky;top:0;height:100vh;border-right:1px solid var(--side-line)}
.brand{display:flex;align-items:center;gap:11px;padding:20px 20px 16px}
.brand__mark{width:30px;height:30px;display:block;filter:drop-shadow(0 2px 6px rgba(0,0,0,.3))}
.brand__name{font-weight:800;font-size:18px;letter-spacing:-.02em;color:#fff}
.nav{flex:1;overflow-y:auto;padding:6px 12px}
.nav__section{font-size:10px;font-weight:700;letter-spacing:.12em;text-transform:uppercase;color:var(--side-ink-2);padding:16px 12px 7px}
.nav__link{display:flex;align-items:center;gap:11px;padding:9px 12px;border-radius:var(--r-sm);color:var(--side-ink);font-weight:500;font-size:13.5px;transition:all .15s var(--ease);cursor:pointer;position:relative}
.nav__link i{width:18px;height:18px;flex:0 0 18px;opacity:.85}
.nav__link em{margin-left:auto;font-style:normal;font-size:9px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--side-ink-2);border:1px solid var(--side-line);padding:1px 6px;border-radius:var(--r-full)}
.nav__link:hover{background:var(--side-active);color:#fff}
.nav__link.is-active{background:var(--side-active);color:#fff}
.nav__link.is-active::before{content:'';position:absolute;left:-12px;top:8px;bottom:8px;width:3px;border-radius:0 3px 3px 0;background:var(--teal-500)}
.nav__link.is-active i{opacity:1;color:var(--teal-400)}
.nav__link.is-soon{opacity:.5;cursor:default}
.nav__link.is-soon:hover{background:none;color:var(--side-ink)}
/* inline-accordion nav */
.nav__solo{margin-bottom:2px}
.nav__group{margin-top:1px}
.nav__parent{display:flex;align-items:center;gap:11px;width:100%;padding:9px 12px;border:0;background:none;border-radius:var(--r-sm);color:var(--side-ink);font-weight:600;font-size:13.5px;cursor:pointer;transition:all .15s var(--ease);font-family:inherit;text-align:left}
.nav__parent>i:first-child{width:18px;height:18px;flex:0 0 18px;opacity:.85}
.nav__parent:hover{background:var(--side-active);color:#fff}
.nav__chev{width:15px;height:15px;margin-left:auto;opacity:.55;transition:transform .2s var(--ease)}
.nav__group.is-open>.nav__parent .nav__chev{transform:rotate(90deg)}
.nav__group.is-active>.nav__parent{color:#fff}
.nav__group.is-active>.nav__parent>i:first-child{opacity:1;color:var(--teal-400)}
.nav__children{overflow:hidden;max-height:0;transition:max-height .22s var(--ease);margin-left:21px;border-left:1px solid var(--side-line);padding-left:4px}
.nav__group.is-open>.nav__children{max-height:560px}
.nav__children .nav__link{padding:8px 12px;font-size:13px}
.nav__children .nav__link.is-active::before{left:-5px}
.sidebar__foot{padding:12px}
.orgcard{background:var(--side-active);border:1px solid var(--side-line);border-radius:var(--r);padding:11px 13px}
.orgcard__title{font-weight:700;font-size:13px;color:#fff}
.orgcard__sub{font-size:11px;color:var(--side-ink-2);margin-top:1px}

/* ---- Topbar ---- */
.topbar{height:62px;display:flex;align-items:center;gap:14px;padding:0 26px;background:color-mix(in srgb, var(--surface) 78%, transparent);backdrop-filter:saturate(180%) blur(12px);border-bottom:1px solid var(--line);position:sticky;top:0;z-index:30}
.topbar__menu{display:none}
.search{flex:1;max-width:440px;display:flex;align-items:center;gap:9px;background:var(--surface-3);border:1px solid var(--line);border-radius:var(--r-sm);padding:0 11px;height:38px;color:var(--muted);transition:border-color .15s,box-shadow .15s}
.search:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(var(--accent-rgb),.12)}
.search i{width:16px;height:16px}
.search input{flex:1;background:none;border:none;outline:none;color:var(--ink);font-size:13.5px;text-overflow:ellipsis}
.search input::placeholder{color:var(--faint)}
.search kbd{font-family:var(--font);font-size:11px;font-weight:600;color:var(--faint);border:1px solid var(--line);border-radius:5px;padding:1px 6px;background:var(--surface)}
.topbar__right{margin-left:auto;display:flex;align-items:center;gap:8px}
.iconbtn{width:38px;height:38px;border-radius:var(--r-sm);display:grid;place-items:center;color:var(--ink-2);border:1px solid transparent;position:relative;transition:all .15s}
.iconbtn:hover{background:var(--surface-3);color:var(--ink)}
.iconbtn i{width:18px;height:18px}
.iconbtn .dot{position:absolute;top:9px;right:10px;width:7px;height:7px;border-radius:50%;background:var(--red);border:2px solid var(--surface)}
.avatar{width:34px;height:34px;border-radius:50%;display:grid;place-items:center;font-weight:700;font-size:12px;color:#fff;background:linear-gradient(135deg,var(--navy-600),var(--teal-600));margin-left:4px;flex:0 0 auto;aspect-ratio:1}
/* Current-workspace badge: the data's tenant, stated next to the brand skin. */
.wsbadge{display:flex;align-items:center;gap:6px;height:30px;padding:0 10px;border-radius:999px;border:1px solid var(--line);background:var(--surface-2);color:var(--ink-2);font-size:12px;font-weight:600;max-width:190px;transition:all .15s}
.wsbadge:hover{background:var(--surface-3);color:var(--ink)}
.wsbadge i{width:13px;height:13px;flex:0 0 auto}
.wsbadge__name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
@media (max-width:720px){.wsbadge{max-width:120px}}

/* ---- View canvas ---- */
/* full-width content: fill the page like the topbar (no centered max-width cap,
   which left a blank gutter on wide monitors) */
.view{flex:1;padding:26px;width:100%}
.page-head{display:flex;align-items:flex-end;justify-content:space-between;gap:18px;margin-bottom:22px;flex-wrap:wrap}
.page-head h1{font-size:25px;font-weight:800;letter-spacing:-.025em}
.page-head .sub{color:var(--muted);font-size:13.5px;margin-top:3px}
.page-head__actions{display:flex;gap:9px;align-items:center}

/* ============ PRIMITIVES ============ */
.card{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow-sm)}
.card--pad{padding:20px 22px}
.card__head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:16px 20px;border-bottom:1px solid var(--line)}
.card__title{font-size:14px;font-weight:700}
.card__sub{font-size:12px;color:var(--muted);font-weight:500}
.grid{display:grid;gap:16px}
.g-2{grid-template-columns:repeat(2,1fr)} .g-3{grid-template-columns:repeat(3,1fr)} .g-4{grid-template-columns:repeat(4,1fr)}
.row{display:flex;gap:16px;flex-wrap:wrap}
.spread{display:flex;align-items:center;justify-content:space-between;gap:12px}

.btn{display:inline-flex;align-items:center;gap:7px;height:38px;padding:0 15px;border-radius:var(--r-sm);font-size:13px;font-weight:600;border:1px solid var(--line);background:var(--surface);color:var(--ink);white-space:nowrap;flex:0 0 auto;transition:all .15s var(--ease)}
.btn:hover{background:var(--surface-3);border-color:var(--line)}
.btn i{width:15px;height:15px}
.btn--primary{background:var(--navy-900);border-color:var(--navy-900);color:#fff}
[data-theme="dark"] .btn--primary{background:var(--teal-600);border-color:var(--teal-600);color:#04201d}
/* variant buttons must re-assert their fill on hover — the generic .btn:hover sets a
   near-white bg (--surface-3), which would leave white label text invisible. */
.btn--primary:hover{background:var(--navy-800);border-color:var(--navy-800);color:#fff;filter:none}
[data-theme="dark"] .btn--primary:hover{background:var(--teal-500);border-color:var(--teal-500);color:#04201d}
.btn--accent{background:var(--teal-600);border-color:var(--teal-600);color:#fff}
.btn--accent:hover{background:var(--teal-500);border-color:var(--teal-500);color:#fff;filter:none}
.btn--ghost{border-color:transparent;background:transparent;color:var(--ink-2)}
.btn--ghost:hover{background:var(--surface-3)}
.btn--sm{height:32px;padding:0 11px;font-size:12.5px}

/* Pills / badges */
.pill{display:inline-flex;align-items:center;gap:5px;font-size:11.5px;font-weight:600;padding:3px 9px;border-radius:var(--r-full);line-height:1.4;white-space:nowrap}
.pill .d{width:6px;height:6px;border-radius:50%;background:currentColor}
.pill--green{color:var(--green);background:var(--green-soft)} .pill--amber{color:var(--amber);background:var(--amber-soft)}
.pill--red{color:var(--red);background:var(--red-soft)} .pill--blue{color:var(--blue);background:var(--blue-soft)}
.pill--violet{color:var(--violet);background:var(--violet-soft)} .pill--gray{color:var(--muted);background:var(--surface-3)}
[data-theme="dark"] .pill--green{background:rgba(22,163,74,.16)} [data-theme="dark"] .pill--amber{background:rgba(217,119,6,.16)}
[data-theme="dark"] .pill--red{background:rgba(220,38,38,.16)} [data-theme="dark"] .pill--blue{background:rgba(37,99,235,.18)}
[data-theme="dark"] .pill--violet{background:rgba(124,58,237,.2)}
.chip{display:inline-flex;align-items:center;gap:6px;font-size:12px;font-weight:600;color:var(--ink-2);background:var(--surface-3);border:1px solid var(--line);border-radius:var(--r-full);padding:4px 11px;cursor:pointer}
.chip.is-on{color:var(--accent-ink);background:rgba(var(--accent-rgb),.1);border-color:rgba(var(--accent-rgb),.3)}

/* KPI stat */
.kpi{padding:18px 20px 38px;display:flex;flex-direction:column;gap:11px;position:relative;overflow:hidden}
.kpi__top{display:flex;align-items:center;justify-content:space-between}
.kpi__label{font-size:12.5px;font-weight:600;color:var(--muted)}
.kpi__ic{width:32px;height:32px;border-radius:9px;display:grid;place-items:center;color:var(--accent);background:rgba(var(--accent-rgb),.11)}
.kpi__ic i{width:17px;height:17px}
.kpi__val{font-size:27px;font-weight:800;letter-spacing:-.03em}
.kpi__delta{font-size:12px;font-weight:600;display:inline-flex;align-items:center;gap:4px;position:relative;z-index:1}
.kpi__delta.up{color:var(--green)} .kpi__delta.down{color:var(--red)}
.kpi__delta i{width:13px;height:13px}
.kpi__spark{position:absolute;right:0;bottom:0;left:0;height:30px;opacity:.85;pointer-events:none}

/* ============ TABLES ============ */
.tbl-wrap{overflow-x:auto}
table.tbl{width:100%;border-collapse:separate;border-spacing:0;font-size:13px}
.tbl thead th{text-align:left;font-size:11px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--faint);padding:11px 16px;border-bottom:1px solid var(--line);white-space:nowrap;position:sticky;top:0;background:var(--surface)}
.tbl tbody td{padding:13px 16px;border-bottom:1px solid var(--line-2);vertical-align:middle}
.tbl tbody tr{transition:background .12s}
.tbl tbody tr:hover{background:var(--surface-2)}
.tbl tbody tr:last-child td{border-bottom:none}
.tbl td.n,.tbl th.n{text-align:right;font-variant-numeric:tabular-nums}
.tbl .lead{font-weight:600;color:var(--ink)}
.tbl .sub{font-size:11.5px;color:var(--muted)}
.cellrow{display:flex;align-items:center;gap:11px}
.mlogo{width:32px;height:32px;border-radius:8px;display:grid;place-items:center;font-weight:700;font-size:12px;color:#fff;flex:0 0 32px}
.linklike{color:var(--accent-ink);font-weight:600;cursor:pointer}
.linklike:hover{text-decoration:underline}

/* progress / bars */
.bar{height:7px;border-radius:var(--r-full);background:var(--surface-3);overflow:hidden;min-width:80px}
.bar > i{display:block;height:100%;border-radius:var(--r-full);background:linear-gradient(90deg,var(--teal-600),var(--teal-400))}
.minibars{display:flex;align-items:flex-end;gap:3px;height:30px}
.minibars > i{width:6px;border-radius:2px;background:var(--surface-3)}
.minibars > i.on{background:var(--teal-500)}

/* misc */
.muted{color:var(--muted)} .faint{color:var(--faint)} .strong{font-weight:700}
.up{color:var(--green)} .down{color:var(--red)}
.divider{height:1px;background:var(--line);margin:0}
.empty{padding:40px;text-align:center;color:var(--muted)}
.section-title{font-size:12px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--faint);margin:6px 0 12px}
.legend{display:flex;gap:16px;flex-wrap:wrap;font-size:12px;color:var(--muted)}
.legend span{display:inline-flex;align-items:center;gap:6px}
.legend i{width:9px;height:9px;border-radius:2px}

/* segmented control */
.seg{display:inline-flex;background:var(--surface-3);border:1px solid var(--line);border-radius:var(--r-sm);padding:3px}
.seg button{padding:5px 12px;border-radius:6px;font-size:12.5px;font-weight:600;color:var(--muted)}
.seg button.is-on{background:var(--surface);color:var(--ink);box-shadow:var(--shadow-sm)}

/* attention list */
.att{display:flex;align-items:center;gap:12px;padding:12px 0;border-bottom:1px solid var(--line-2)}
.att:last-child{border-bottom:none}
.att__ic{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;flex:0 0 34px}
.att__ic i{width:16px;height:16px}
.att__body{min-width:0;flex:1}
.att__t{font-weight:600;font-size:13px}
.att__s{font-size:12px;color:var(--muted)}

/* ============ RESPONSIVE ============ */
@media (max-width:1000px){
  .app{grid-template-columns:1fr}
  .sidebar{position:fixed;left:0;top:0;z-index:60;width:248px;transform:translateX(-100%);transition:transform .25s var(--ease)}
  .sidebar.is-open{transform:none;box-shadow:var(--shadow-lg)}
  .topbar__menu{display:grid}
  .g-4{grid-template-columns:repeat(2,1fr)} .g-3{grid-template-columns:1fr} .g-2{grid-template-columns:1fr}
}
@media (max-width:560px){ .g-4{grid-template-columns:1fr} .view{padding:18px} .search kbd{display:none} }

/* ---- phones (<=720px): collapse desktop multi-column layouts so nothing forces
        a horizontal page scroll. Tables already sit in .tbl-wrap (overflow-x:auto)
        and boards in .kanban (overflow-x:auto), so those scroll inside themselves. ---- */
@media (max-width:720px){
  /* Collapse EVERY content grid (class-based .g-2/3/4, bare .grid, and inline
     grid-template-columns) to a single column. Use minmax(0,1fr) NOT 1fr: a plain
     1fr track = minmax(auto,1fr) whose `auto` floor is the child's min-content, so
     a wide child (a chart, an SVG, a .tbl-wrap table) blows the column — and the
     page — past the viewport (the real iOS side-swipe cause). minmax(0,1fr) lets
     the column shrink below that, and min-width:0 lets the children shrink too, so
     inner scrollers (.tbl-wrap / .kanban) handle their own overflow. */
  .view .grid,
  [style*="grid-template-columns"]{ grid-template-columns:minmax(0,1fr) !important; }
  .view .grid > *{ min-width:0; }
  /* topbar: tighten chrome + let the search shrink instead of pushing the row past
     the viewport. The injected Operator/Merchant-view toggle is a desktop-only
     convenience (it doesn't shrink, so it overflowed the row on phones). */
  .topbar{ padding:0 14px; gap:10px; }
  .portal-toggle{ display:none; }
  .search{ min-width:0; }
  .search input{ min-width:0; }
  /* page-head action clusters wrap onto their own line instead of overflowing */
  .page-head__actions{ flex-wrap:wrap; }
  .page-head h1{ font-size:22px; }
  .tbl-wrap{ -webkit-overflow-scrolling:touch; }
  /* Mobile audit 2026-07-02: tables PAN, they don't CRUSH. Body cells keeping
     natural width (nowrap) lets .tbl-wrap's overflow-x actually engage instead of
     every column word-wrapping into 6-line rubble. */
  .tbl tbody td{ white-space:nowrap; }
  /* ...and scroll shadows so a cut-off table reads as "swipe me", not "broken".
     Cover gradients scroll with the content; shadow layers stay attached. */
  .tbl-wrap{
    background:
      linear-gradient(90deg, var(--surface) 30%, rgba(255,255,255,0)) left/40px 100% no-repeat local,
      linear-gradient(270deg, var(--surface) 30%, rgba(255,255,255,0)) right/40px 100% no-repeat local,
      radial-gradient(farthest-side at 0 50%, rgba(11,31,58,.16), transparent) left/14px 100% no-repeat scroll,
      radial-gradient(farthest-side at 100% 50%, rgba(11,31,58,.16), transparent) right/14px 100% no-repeat scroll;
  }
}

.scrim{position:fixed;inset:0;background:rgba(7,13,23,.45);z-index:55;opacity:0;pointer-events:none;transition:opacity .2s}
.scrim.is-on{opacity:1;pointer-events:auto}

/* ---- slide-over drawer ---- */
.drawer{position:fixed;right:0;top:0;height:100vh;width:420px;max-width:92vw;background:var(--surface);border-left:1px solid var(--line);box-shadow:var(--shadow-lg);z-index:60;transform:translateX(100%);transition:transform .26s var(--ease);display:flex;flex-direction:column}
.drawer.is-open{transform:none}
.drawer__head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:20px 22px;border-bottom:1px solid var(--line)}
.drawer__body{padding:22px;overflow-y:auto;flex:1}
.mini{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r);padding:11px 13px;display:flex;flex-direction:column;gap:5px}
.mini span{font-size:11.5px;color:var(--muted);font-weight:500}
.mini b{font-size:16px;font-weight:700}
.kv{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:9px 0;border-bottom:1px solid var(--line-2);font-size:13px}
.kv:last-child{border-bottom:none}
.kv span{color:var(--muted)}
.kv b{font-weight:600}

/* ---- kanban (pipeline) ---- */
.kanban{display:grid;grid-template-columns:repeat(5,minmax(192px,1fr));gap:14px;overflow-x:auto;padding-bottom:6px}
.kcol{background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-lg);padding:12px}
.kcol__head{display:flex;align-items:center;justify-content:space-between;padding:2px 4px}
.kcol__title{font-size:12.5px;font-weight:700;display:flex;align-items:center;gap:7px}
.kcol__count{font-size:11px;font-weight:700;color:var(--muted);background:var(--surface);border:1px solid var(--line);border-radius:var(--r-full);padding:1px 8px}
.kcard{background:var(--surface);border:1px solid var(--line);border-radius:var(--r);padding:11px 12px;margin-bottom:9px;box-shadow:var(--shadow-sm);cursor:pointer;transition:all .15s var(--ease)}
.kcard:hover{box-shadow:var(--shadow);transform:translateY(-1px)}
.kcard[draggable="true"]{cursor:grab}
.kcard.is-dragging{opacity:.4;cursor:grabbing}
.kcol.drop-on{outline:2px dashed rgba(var(--accent-rgb),.55);outline-offset:-3px}
.kcard__name{font-weight:600;font-size:12.5px;display:flex;align-items:center;gap:8px}
.kcard__meta{display:flex;align-items:center;justify-content:space-between;gap:8px}
@media(max-width:1000px){.kanban{grid-template-columns:repeat(5,minmax(180px,1fr))}}
/* ---- collapsible board (leads + deals): flex variant so a column can shrink ---- */
.kanban--flex{display:flex;flex-wrap:nowrap;grid-template-columns:none}
.kanban--flex .kcol{flex:0 0 200px;display:flex;flex-direction:column;transition:flex-basis .18s var(--ease)}
.kcol__min{margin-left:6px;width:24px;height:24px;flex:0 0 24px;display:grid;place-items:center;border:0;background:none;color:var(--muted);cursor:pointer;border-radius:6px;transition:transform .18s var(--ease),background .15s}
.kcol__min:hover{background:var(--surface);color:var(--ink)}
.kcol__min i{width:14px;height:14px}
.kcol.is-collapsed{flex:0 0 46px;cursor:pointer}
.kcol.is-collapsed .kcol__sub,.kcol.is-collapsed .kcard,.kcol.is-collapsed .empty{display:none}
.kcol.is-collapsed .kcol__head{flex-direction:column;align-items:center;gap:10px;padding-top:4px}
.kcol.is-collapsed .kcol__title{writing-mode:vertical-rl;transform:rotate(180deg);white-space:nowrap}
.kcol.is-collapsed .kcol__min{transform:rotate(180deg)}
/* ---- flashcard grid (List / Card / Board "Card" view) ---- */
.fgrid{display:grid;grid-template-columns:repeat(auto-fill,minmax(244px,1fr));gap:14px}
.fcard{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow-sm);padding:16px;cursor:pointer;transition:box-shadow .15s var(--ease),transform .15s var(--ease);display:flex;flex-direction:column;gap:11px}
.fcard:hover{box-shadow:var(--shadow);transform:translateY(-2px)}
.fcard__top{display:flex;align-items:center;gap:10px}
.fcard__name{font-weight:700;font-size:14px;line-height:1.25}
.fcard__sub{font-size:11.5px;color:var(--muted)}
.fcard__row{display:flex;align-items:center;justify-content:space-between;gap:8px;font-size:12.5px}
.fcard__row .lbl{color:var(--muted);font-size:11.5px}
/* ---- "coming soon" treatment (reuses the nav .is-soon idea on buttons + a corner badge) ---- */
.btn.is-soon{opacity:.6;cursor:default;background:var(--surface-3);border-color:var(--line);color:var(--muted)}
.btn.is-soon:hover{background:var(--surface-3);border-color:var(--line)}
.card.is-soon{opacity:.72}
.badge-soon{display:inline-flex;align-items:center;font-size:10.5px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);background:var(--surface-3);border:1px solid var(--line);border-radius:var(--r-full);padding:2px 9px}

/* ---- org tree (agents) ---- */
.tree{display:flex;flex-direction:column;gap:10px}
.tcard{display:flex;align-items:center;gap:12px;padding:11px 13px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-sm);transition:all .15s;cursor:pointer}
.tcard:hover{box-shadow:var(--shadow);border-color:rgba(var(--accent-rgb),.35)}
.tchildren{margin:10px 0 0 21px;padding-left:18px;border-left:2px solid var(--line);display:flex;flex-direction:column;gap:10px}

/* ---- toast (action feedback) ---- */
.toast-wrap{position:fixed;right:20px;bottom:20px;z-index:120;display:flex;flex-direction:column;gap:9px;pointer-events:none}
.toast{display:flex;align-items:center;gap:11px;background:var(--surface);color:var(--ink);border:1px solid var(--line);border-left:3px solid var(--accent);border-radius:var(--r);box-shadow:var(--shadow-lg);padding:11px 15px;min-width:210px;max-width:340px;transform:translateY(10px);opacity:0;transition:opacity .18s var(--ease),transform .18s var(--ease)}
.toast.is-in{opacity:1;transform:translateY(0)}
.toast i{width:17px;height:17px;color:var(--accent);flex:0 0 17px}
.toast__t{font-size:13px;font-weight:700;line-height:1.25}
.toast__sub{font-size:11.5px;font-weight:500;color:var(--muted);margin-top:1px}

/* agent rows are clickable */
.tbl tr.is-click{cursor:pointer}
.tbl tr.is-click:hover{background:var(--surface-2)}
.kv--click{cursor:pointer;border-radius:7px;margin:0 -8px;padding-left:8px;padding-right:8px;transition:background .12s}
.kv--click:hover{background:var(--surface-2)}

/* ---- statement analyzer ---- */
.field{display:flex;flex-direction:column;gap:6px;margin-bottom:13px}
.field>label{font-size:11px;font-weight:700;color:var(--muted);letter-spacing:.04em;text-transform:uppercase}
.inp{display:flex;align-items:center;gap:8px;height:40px;padding:0 12px;background:var(--surface-3);border:1px solid var(--line);border-radius:var(--r-sm);transition:border-color .15s,box-shadow .15s}
.inp:focus-within{border-color:var(--accent);box-shadow:0 0 0 3px rgba(var(--accent-rgb),.13)}
.inp .pre{color:var(--faint);font-size:13.5px;font-weight:600}
.inp input{flex:1;min-width:0;background:none;border:none;outline:none;color:var(--ink);font-size:14px;font-weight:600;font-variant-numeric:tabular-nums}
.dropzone{display:flex;align-items:center;gap:12px;border:1.5px dashed var(--line);border-radius:var(--r);padding:14px 16px;cursor:pointer;transition:all .15s;color:var(--muted);margin-bottom:16px}
.dropzone:hover{border-color:var(--accent);background:var(--surface-2);color:var(--ink-2)}
.dropzone i{width:22px;height:22px;flex:0 0 22px;color:var(--accent)}
.an-hero{background:linear-gradient(135deg,var(--side-bg),color-mix(in srgb,var(--side-bg) 78%, var(--accent)));color:#fff;border-radius:var(--r-lg);padding:22px 24px}
.an-hero .big{font-size:38px;font-weight:800;letter-spacing:-.02em;line-height:1;font-variant-numeric:tabular-nums}
.an-hero .lbl{font-size:11px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;opacity:.7}
.feebar{display:flex;height:34px;border-radius:8px;overflow:hidden;border:1px solid var(--line);background:var(--surface-3)}
.feebar>div{display:flex;align-items:center;justify-content:center;font-size:11px;font-weight:700;color:#fff;min-width:0;white-space:nowrap;overflow:hidden}
.feeleg{display:flex;flex-wrap:wrap;gap:16px;margin-top:11px}
.feeleg span{display:flex;align-items:center;gap:7px;font-size:12px;color:var(--muted)}
.feeleg b{color:var(--ink);font-variant-numeric:tabular-nums}
.feeleg i{width:11px;height:11px;border-radius:3px;display:inline-block;flex:0 0 11px}
.cmp{display:grid;grid-template-columns:1fr 1fr;gap:12px}
.cmp__col{border:1px solid var(--line);border-radius:var(--r);padding:14px 16px;background:var(--surface)}
.cmp__col.is-win{border-color:color-mix(in srgb,var(--accent) 55%, var(--line));background:color-mix(in srgb,var(--accent) 6%, var(--surface))}
@media(max-width:900px){.cmp{grid-template-columns:1fr}}

/* ---- modal ---- */
.modal-back{position:fixed;inset:0;background:rgba(7,13,23,.5);backdrop-filter:saturate(140%) blur(3px);z-index:200;display:flex;align-items:center;justify-content:center;padding:20px;opacity:0;transition:opacity .18s var(--ease)}
.modal-back.is-in{opacity:1}
.modal{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow-lg);width:100%;max-width:500px;max-height:88vh;display:flex;flex-direction:column;transform:translateY(14px) scale(.98);transition:transform .2s var(--ease)}
.modal-back.is-in .modal{transform:none}
.modal__head{display:flex;align-items:center;justify-content:space-between;gap:12px;padding:17px 20px;border-bottom:1px solid var(--line)}
.modal__title{font-weight:800;font-size:16px;letter-spacing:-.01em}
.modal__x{width:32px;height:32px}
.modal__body{padding:18px 20px;overflow-y:auto}
.modal__foot{display:flex;justify-content:flex-end;gap:8px;padding:14px 20px;border-top:1px solid var(--line)}
.mlabel{display:block;font-size:11px;font-weight:700;color:var(--muted);letter-spacing:.04em;text-transform:uppercase;margin:0 0 6px}
.mfield{width:100%;height:40px;padding:0 12px;background:var(--surface-3);border:1px solid var(--line);border-radius:var(--r-sm);color:var(--ink);font-size:14px;font-family:var(--font);font-weight:500;outline:none;transition:border-color .15s,box-shadow .15s}
textarea.mfield{height:auto;min-height:96px;padding:10px 12px;resize:vertical;line-height:1.5}
.mfield:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(var(--accent-rgb),.13)}
.mrow+.mrow{margin-top:14px}
/* first-run tip "don't show again" footer affordance */
.tip-dismiss{display:flex;align-items:center;gap:8px;margin-top:16px;font-size:12.5px;color:var(--muted);cursor:pointer;user-select:none}
.tip-dismiss input{width:15px;height:15px;cursor:pointer;accent-color:var(--accent)}

/* ---- global search dropdown ---- */
.search{position:relative}
.srch-pop{position:absolute;top:calc(100% + 8px);left:0;right:0;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-lg);padding:6px;z-index:60;display:none;max-height:60vh;overflow-y:auto}
.srch-pop.is-in{display:block}
.srch-row{display:flex;align-items:center;gap:11px;padding:9px 10px;border-radius:8px;cursor:pointer}
.srch-row:hover{background:var(--surface-2)}
.srch-logo{width:30px;height:30px;flex:0 0 30px;border-radius:7px;color:#fff;font-size:11px;font-weight:700;display:flex;align-items:center;justify-content:center}
.srch-main{flex:1;min-width:0}
.srch-label{font-size:13px;font-weight:600;color:var(--ink);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.srch-sub{font-size:11.5px;color:var(--muted);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.srch-type{font-size:10px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--accent);background:rgba(var(--accent-rgb),.1);padding:3px 8px;border-radius:100px;flex:0 0 auto}
.srch-empty{padding:16px;text-align:center;font-size:13px;color:var(--muted)}

/* ---- profile menu ---- */
.pmenu{position:absolute;right:0;top:50px;min-width:230px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-lg);padding:6px;z-index:60;display:none;cursor:default;text-align:left}
.pmenu.is-in{display:block}
.pmenu__id{padding:8px 10px 6px}
.pmenu__name{font-size:13px;font-weight:700;color:var(--ink)}
.pmenu__email{font-size:11.5px;color:var(--muted);margin-top:1px}
.pmenu__label{padding:4px 10px 2px;font-size:10.5px;font-weight:700;letter-spacing:.06em;text-transform:uppercase;color:var(--muted)}
/* Instant-rebate gate: lapsed workspace greys its nav. The Dashboard link stays
   at full strength because that is where the activation-code field lives. */
body.aq-lapsed .nav__link:not([data-route="dashboard"]){opacity:.45}
body.aq-lapsed .nav__group{opacity:.75}
.pmenu__item[aria-current="true"]{color:var(--ink);font-weight:700}
.pmenu__item[aria-current="true"] i{color:var(--brand,var(--ink))}
.pmenu__sep{height:1px;background:var(--line);margin:6px 4px}
.pmenu__item{display:flex;align-items:center;gap:10px;width:100%;padding:9px 10px;border-radius:7px;font-size:13px;font-weight:500;color:var(--ink-2);text-align:left}
.pmenu__item:hover{background:var(--surface-2);color:var(--ink)}
.pmenu__item i{width:15px;height:15px;color:var(--muted)}

/* ---- auth / login screen ---- */
.aq-auth{position:fixed;inset:0;z-index:300;display:flex;align-items:center;justify-content:center;padding:24px;background:radial-gradient(900px 520px at 82% -8%, color-mix(in srgb,var(--accent) 24%, transparent) 0%, transparent 56%), radial-gradient(760px 620px at 6% 112%, color-mix(in srgb,var(--accent) 16%, transparent) 0%, transparent 55%), linear-gradient(158deg, var(--side-bg) 0%, color-mix(in srgb,var(--side-bg) 80%, #000) 100%)}
.aq-auth__card{width:100%;max-width:400px;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);box-shadow:var(--shadow-lg);padding:34px 32px}
.aq-auth__brand{display:flex;align-items:center;gap:10px;margin-bottom:22px}
.aq-auth__brand img{height:30px;width:auto;max-width:170px}
.aq-auth__mark{width:34px;height:34px;border-radius:9px;background:var(--side-bg);color:#fff;display:grid;place-items:center;font-weight:800;font-size:18px}
.aq-auth__name{font-weight:800;font-size:19px;letter-spacing:-.02em;color:var(--ink)}
.aq-auth__h{font-size:21px;font-weight:800;letter-spacing:-.02em;color:var(--ink)}
.aq-auth__sub{font-size:13px;color:var(--muted);margin:5px 0 22px}
.aq-auth__lbl{display:block;font-size:11px;font-weight:700;letter-spacing:.04em;text-transform:uppercase;color:var(--muted);margin:0 0 6px}
.aq-auth__inp{width:100%;height:44px;padding:0 13px;background:var(--surface-3);border:1px solid var(--line);border-radius:var(--r-sm);color:var(--ink);font-size:14.5px;font-family:var(--font);outline:none;margin-bottom:15px;transition:border-color .15s,box-shadow .15s}
.aq-auth__inp:focus{border-color:var(--accent);box-shadow:0 0 0 3px rgba(var(--accent-rgb),.14)}
.aq-auth__err{background:var(--red-soft);color:var(--red);border-radius:var(--r-sm);padding:9px 12px;font-size:12.5px;font-weight:600;margin-bottom:13px}
.aq-auth__btn{width:100%;height:44px;border-radius:var(--r-sm);background:var(--accent);color:#fff;font-weight:700;font-size:14px;border:0;cursor:pointer;transition:filter .15s,opacity .15s}
.aq-auth__btn:hover{filter:brightness(1.06)}
.aq-auth__btn:disabled{opacity:.7;cursor:default}
/* passkey (Face ID / Touch ID) sign-in: secondary button + divider */
.aq-auth__or{display:flex;align-items:center;gap:10px;color:var(--faint);font-size:12px;font-weight:600;margin:16px 0}
.aq-auth__or::before,.aq-auth__or::after{content:'';flex:1;height:1px;background:var(--line)}
.aq-auth__btn--ghost{background:transparent;color:var(--ink);border:1px solid var(--line);display:flex;align-items:center;justify-content:center;gap:9px}
.aq-auth__foot{margin-top:18px;text-align:center;font-size:13px;color:var(--muted)}
.aq-auth__foot a{color:var(--accent);font-weight:600;text-decoration:none;cursor:pointer}
.aq-auth__foot a:hover{text-decoration:underline}
.aq-auth__btn--ghost:hover{background:var(--surface-3);filter:none}
.aq-auth__btn--ghost svg{width:18px;height:18px;flex:0 0 18px}
/* password show/hide */
.aq-auth__pw{position:relative}
.aq-auth__pw .aq-auth__inp{padding-right:44px}
.aq-auth__eye{position:absolute;right:8px;top:22px;transform:translateY(-50%);width:30px;height:30px;display:grid;place-items:center;background:transparent;border:0;border-radius:7px;color:var(--faint);cursor:pointer}
.aq-auth__eye:hover{color:var(--muted);background:var(--surface-3)}
.aq-auth__eye.is-on{color:var(--accent)}
.aq-auth__eye svg{width:18px;height:18px}
/* remember / forgot + terms rows */
.aq-auth__row{display:flex;align-items:center;justify-content:space-between;gap:10px;margin:2px 0 12px;font-size:12.5px;flex-wrap:wrap}
.aq-auth__check{display:flex;align-items:center;gap:7px;color:var(--muted);cursor:pointer;user-select:none}
.aq-auth__check input{width:15px;height:15px;cursor:pointer;accent-color:var(--accent)}
.aq-auth__link{color:var(--accent);font-weight:600;text-decoration:none;cursor:pointer;white-space:nowrap}
.aq-auth__link:hover{text-decoration:underline}
.aq-auth__note{background:var(--surface-3);color:var(--muted);border:1px solid var(--line);border-radius:var(--r-sm);padding:9px 12px;font-size:12.5px;line-height:1.5;margin-bottom:12px}
/* two login buttons */
.aq-auth__btns{display:flex;gap:10px}
.aq-auth__btns .aq-auth__btn{flex:1}

/* ===== Merchant Portal: CRM↔Merchant toggle + merchant-mode chrome ===== */
.portal-toggle{margin-left:auto}
.portal-brand{display:flex;flex-direction:column;line-height:1.1;margin-right:auto}
.portal-brand__name{font-weight:800;font-size:15px;color:var(--ink)}
.portal-brand__tag{font-size:11px;color:var(--muted);font-weight:600}
/* The merchant portal now uses the normal two-column app shell; portal-shell.js
   repopulates the sidebar with the merchant nav (Overview / Transactions / …). */
.psplit{display:grid;grid-template-columns:2fr 1fr;gap:16px;margin-bottom:16px;align-items:start}
.psplit--even{grid-template-columns:1fr 1fr}
@media(max-width:900px){.psplit,.psplit--even{grid-template-columns:1fr}}
/* Merchant notification dropdown (topbar bell) */
.mnotif{position:fixed;z-index:200;width:330px;max-width:calc(100vw - 24px);background:var(--surface);border:1px solid var(--line);border-radius:var(--r);box-shadow:var(--shadow-lg);overflow:hidden}
.mnotif__head{padding:12px 15px;font-weight:700;font-size:13px;border-bottom:1px solid var(--line)}
.mnotif__item{display:flex;gap:11px;align-items:flex-start;padding:11px 15px;border-bottom:1px solid var(--line)}
.mnotif__item:last-child{border-bottom:0}
.mnotif__ic{width:30px;height:30px;border-radius:8px;display:grid;place-items:center;flex:0 0 auto}
.mnotif__ic i{width:16px;height:16px}
.mnotif__t{font-size:13px;font-weight:600}
.mnotif__s{font-size:12px;color:var(--muted);margin-top:2px;line-height:1.4}
.mnotif__empty{padding:24px 15px;text-align:center;color:var(--muted);font-size:13px}
/* Money-flow donut interactivity (hover an arc or legend row to focus it) */
.mf-arc{transition:opacity .16s ease,stroke-width .16s ease;cursor:pointer}
.mf-svg:hover .mf-arc{opacity:.34}
.mf-svg:hover .mf-arc:hover{opacity:1;stroke-width:26}
.mf-svg.mf-dim .mf-arc{opacity:.34}
.mf-svg.mf-dim .mf-arc.mf-on{opacity:1;stroke-width:26}
.mf-leg{cursor:default;transition:background .15s}
.mf-leg:hover{background:rgba(var(--accent-rgb),.09)}

/* ===== Help center articles (Penumbra-style expandable) ===== */
.help-art{transition:border-color .15s,box-shadow .15s}
.help-art:hover{border-color:rgba(var(--accent-rgb),.42)}
.help-art.is-open{border-color:rgba(var(--accent-rgb),.55)}
.help-chev{color:var(--muted);transition:transform .2s ease;flex:0 0 auto}
.help-art.is-open .help-chev{transform:rotate(180deg)}
.help-art .faq-a p{margin:0 0 9px}
.help-art .faq-a p:last-child{margin-bottom:0}
.help-art .faq-a ul{margin:0 0 9px;padding-left:18px;display:flex;flex-direction:column;gap:5px}
.help-art .faq-a b{color:var(--ink)}

/* ===== Calendar (My Office) ===== */
.cal-head{display:grid;grid-template-columns:repeat(7,1fr);gap:6px;margin-bottom:6px}
.cal-dow{font-size:10.5px;font-weight:700;letter-spacing:.05em;text-transform:uppercase;color:var(--faint);text-align:center;padding:2px 0}
.cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:6px}
.cal-cell{min-height:92px;background:var(--surface-2);border:1px solid var(--line);border-radius:var(--r-sm);padding:6px 7px;display:flex;flex-direction:column;gap:3px;overflow:hidden}
.cal-cell--off{background:transparent;border-color:transparent}
.cal-cell--today{border-color:rgba(var(--accent-rgb),.5);box-shadow:0 0 0 1px rgba(var(--accent-rgb),.3) inset}
.cal-num{font-size:12px;font-weight:700;color:var(--ink-2)}
.cal-cell--today .cal-num{color:var(--accent-ink);width:21px;height:21px;display:grid;place-items:center;background:var(--accent);color:#fff;border-radius:50%;font-size:11px}
.cal-ev{font-size:10.5px;font-weight:600;padding:2px 6px;border-radius:5px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;display:flex;align-items:center;gap:5px}
.cal-ev .d{width:5px;height:5px;border-radius:50%;flex:0 0 5px}
.cal-more{font-size:10px;font-weight:600;color:var(--muted);padding-left:2px}
@media(max-width:900px){.cal-cell{min-height:64px}.cal-ev{font-size:9.5px}}

/* ===== Tasks (My Office) ===== */
.task-row{display:flex;align-items:center;gap:13px;padding:13px 4px;border-bottom:1px solid var(--line-2)}
.task-row:last-child{border-bottom:none}
.task-check{width:22px;height:22px;flex:0 0 22px;border:2px solid var(--line);border-radius:6px;display:grid;place-items:center;color:#fff;transition:all .15s}
.task-check:hover{border-color:var(--accent)}
.task-check.on{background:var(--accent);border-color:var(--accent)}
.task-check i{width:14px;height:14px}
.task-main{flex:1;min-width:0}
.task-title{font-weight:600;font-size:13.5px;color:var(--ink)}
.task-row.is-done .task-title{text-decoration:line-through;color:var(--faint)}
.task-due{font-size:12px;font-weight:600;color:var(--muted);min-width:84px;text-align:right}
.task-due.over{color:var(--red)}

/* ===== Comms hub (email / chat / notifications) ===== */
.cm{display:grid;border:1px solid var(--line);border-radius:var(--r-lg);overflow:hidden;background:var(--surface);min-height:560px}
.cm--email{grid-template-columns:184px 326px 1fr}
.cm--chat{grid-template-columns:264px 1fr}
.cm__rail{border-right:1px solid var(--line);background:var(--surface-2);overflow-y:auto;padding:10px}
.cm__list{border-right:1px solid var(--line);overflow-y:auto}
.cm__pane{overflow-y:auto;padding:22px 24px;display:flex;flex-direction:column;min-width:0}
.cm-folder{display:flex;align-items:center;gap:10px;padding:9px 11px;border-radius:var(--r-sm);font-size:13px;font-weight:500;color:var(--ink-2);cursor:pointer}
.cm-folder:hover{background:var(--surface-3)}
.cm-folder.is-on{background:rgba(var(--accent-rgb),.1);color:var(--accent-ink)}
.cm-folder i{width:16px;height:16px}
.cm-folder em{margin-left:auto;font-style:normal;font-size:11px;font-weight:700;color:var(--muted)}
.cm-mail{padding:12px 14px;border-bottom:1px solid var(--line-2);cursor:pointer}
.cm-mail:hover{background:var(--surface-2)}
.cm-mail.is-on{background:rgba(var(--accent-rgb),.07)}
.cm-mail.unread .cm-mail__from{font-weight:800}
.cm-mail.unread .cm-mail__subj{color:var(--ink);font-weight:600}
.cm-mail__top{display:flex;justify-content:space-between;gap:8px}
.cm-mail__from{font-size:13px;font-weight:600;color:var(--ink)}
.cm-mail__time{font-size:11px;color:var(--faint);white-space:nowrap}
.cm-mail__subj{font-size:12.5px;color:var(--ink-2);margin-top:2px}
.cm-mail__prev{font-size:11.5px;color:var(--muted);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.cm-filed{display:inline-flex;align-items:center;gap:5px;font-size:10.5px;font-weight:700;color:var(--accent-ink);background:rgba(var(--accent-rgb),.12);border-radius:var(--r-full);padding:2px 8px;margin-top:6px}
.cm-filed i{width:11px;height:11px}
.chat-sec{font-size:10px;font-weight:700;letter-spacing:.1em;text-transform:uppercase;color:var(--faint);padding:12px 10px 5px}
.chat-ch{display:flex;align-items:center;gap:9px;padding:8px 10px;border-radius:var(--r-sm);font-size:13px;font-weight:500;color:var(--ink-2);cursor:pointer}
.chat-ch:hover{background:var(--surface-3)}
.chat-ch.is-on{background:rgba(var(--accent-rgb),.1);color:var(--accent-ink)}
.chat-ch i{width:15px;height:15px;color:var(--muted)}
.chat-ch .dotu{margin-left:auto;width:7px;height:7px;border-radius:50%;background:var(--accent);flex:0 0 7px}
.chat-thread{display:flex;flex-direction:column;min-height:0}
.chat-head{display:flex;align-items:center;gap:10px;padding:13px 18px;border-bottom:1px solid var(--line)}
.chat-body{flex:1;overflow-y:auto;padding:18px;display:flex;flex-direction:column;gap:10px;min-height:300px}
.chat-msg{max-width:74%;padding:9px 13px;border-radius:12px;font-size:13px;line-height:1.5}
.chat-msg.in{align-self:flex-start;background:var(--surface-2);border:1px solid var(--line);border-bottom-left-radius:4px}
.chat-msg.out{align-self:flex-end;background:rgba(var(--accent-rgb),.13);border-bottom-right-radius:4px}
.chat-msg__who{font-size:11px;font-weight:700;color:var(--muted);margin-bottom:3px}
.chat-msg__time{font-size:10px;color:var(--faint);margin-top:3px;text-align:right}
.chat-composer{border-top:1px solid var(--line);padding:12px 14px;display:flex;gap:10px;align-items:center}
.notif{display:flex;align-items:flex-start;gap:13px;padding:13px 6px;border-bottom:1px solid var(--line-2);cursor:pointer}
.notif:last-child{border-bottom:none}
.notif:hover{background:var(--surface-2)}
.notif.unread{background:rgba(var(--accent-rgb),.05)}
.notif__ic{width:34px;height:34px;border-radius:9px;display:grid;place-items:center;flex:0 0 34px}
.notif__ic i{width:16px;height:16px}
.notif__b{flex:1;min-width:0}
.notif__t{font-weight:600;font-size:13px}
.notif__s{font-size:12px;color:var(--muted);margin-top:1px}
.notif__time{font-size:11px;color:var(--faint);white-space:nowrap;margin-left:auto;padding-left:8px}
.notif__dot{width:8px;height:8px;border-radius:50%;background:var(--accent);flex:0 0 8px;margin-top:6px}
@media(max-width:1000px){.cm--email,.cm--chat{grid-template-columns:1fr}.cm__rail,.cm__list{max-height:240px}}

/* ===== Interactivity affordances (clickable cards / rows) ===== */
.kpi.is-click{cursor:pointer;transition:transform .14s var(--ease),box-shadow .14s var(--ease),border-color .14s var(--ease)}
.kpi.is-click:hover{transform:translateY(-2px);box-shadow:var(--shadow);border-color:rgba(var(--accent-rgb),.45)}
.att.is-click{cursor:pointer;border-radius:8px;margin-left:-8px;margin-right:-8px;padding-left:8px;padding-right:8px;transition:background .12s var(--ease)}
.att.is-click:hover{background:var(--surface-2)}
.dash-row{cursor:pointer;border-radius:8px;transition:background .12s var(--ease)}
.dash-row:hover{background:var(--surface-2)}
.cal-ev{cursor:pointer;transition:filter .12s var(--ease)}
.cal-ev:hover{filter:brightness(.94)}
.cal-more{cursor:pointer;transition:color .12s var(--ease)}
.cal-more:hover{color:var(--accent)}
.task-row.is-click{cursor:pointer;border-radius:8px;margin-left:-6px;margin-right:-6px;padding-left:10px;padding-right:10px;transition:background .12s var(--ease)}
.task-row.is-click:hover{background:var(--surface-2)}

/* ===== Dialpad (Phone) ===== */
.dialpad{display:grid;grid-template-columns:repeat(3,1fr);gap:8px}
.dialkey{height:48px;border-radius:var(--r-sm);border:1px solid var(--line);background:var(--surface-2);font-size:18px;font-weight:700;color:var(--ink);font-variant-numeric:tabular-nums;transition:all .12s var(--ease)}
.dialkey:hover{background:var(--surface-3);border-color:rgba(var(--accent-rgb),.4)}
.dialkey:active{transform:scale(.96)}

/* ===== Integration cards — uniform app-marketplace grid (Settings + Marketplace) ===== */
.intg-card{display:flex;flex-direction:column;height:100%;background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:18px 18px 15px;transition:box-shadow .14s var(--ease),border-color .14s var(--ease),transform .14s var(--ease)}
.intg-card.is-click{cursor:pointer}
.intg-card.is-click:hover{border-color:rgba(var(--accent-rgb),.45);box-shadow:var(--shadow);transform:translateY(-2px)}
.intg-card.is-soon{opacity:.74}
.intg-top{display:flex;align-items:flex-start;justify-content:space-between;gap:10px;margin-bottom:13px}
.intg-logo{width:46px;height:46px;flex:0 0 46px;border-radius:11px;display:grid;place-items:center;position:relative;overflow:hidden}
.intg-logo i{width:24px;height:24px}
.intg-badge{font-size:11px;font-weight:600;color:var(--muted);background:var(--surface-3);padding:3px 9px;border-radius:999px;display:inline-flex;align-items:center;gap:5px;white-space:nowrap}
.intg-badge--on{color:var(--green);background:rgba(22,163,74,.12)}
.intg-badge--on .d{width:6px;height:6px;border-radius:50%;background:var(--green)}
.intg-name{font-size:15px;font-weight:700;letter-spacing:-.01em;color:var(--ink)}
.intg-cat{font-size:12px;color:var(--muted);margin-top:2px}
.intg-desc{font-size:12.5px;color:var(--muted);line-height:1.45;margin-top:9px;display:-webkit-box;-webkit-line-clamp:2;line-clamp:2;-webkit-box-orient:vertical;overflow:hidden;min-height:36px}
.intg-foot{margin-top:auto;padding-top:13px}
.intg-action{font-size:12.5px;font-weight:700;color:var(--accent-ink)}
.intg-card.is-soon .intg-action{display:none}
/* real brand logo: fades in over the icon tile only after it successfully loads
   (.is-on added by onload). On error the img removes itself; the icon tile stays. */
.intg-logo-pic{position:absolute;inset:0;width:100%;height:100%;object-fit:contain;padding:7px;background:#fff;border-radius:inherit;opacity:0;transition:opacity .18s ease}
.intg-logo-pic.is-on{opacity:1}

/* ===== Dashboard — customizable masonry widget board (true zero blank space) =====
   CSS multi-column packs variable-height widgets tight with NO vertical gaps (unlike
   CSS grid, which aligns to rows and leaves holes when row-mates differ in height).
   Full-width widgets (data-w=12, e.g. the KPI row + value panel) span all columns. */
.dash-grid{column-count:2;column-gap:16px;column-fill:balance}
.dwidget{break-inside:avoid;-webkit-column-break-inside:avoid;page-break-inside:avoid;margin:0 0 16px;position:relative;width:100%}
.dwidget[data-w="12"]{column-span:all;-webkit-column-span:all}
@media (min-width:1480px){ .dash-grid{column-count:3} }
@media (max-width:760px){ .dash-grid{column-count:1} }
/* edit chrome */
.dash-grid[data-edit="on"] .dwidget{outline:1px dashed var(--line);outline-offset:3px;border-radius:var(--r-lg)}
.dw-tools{position:absolute;top:8px;right:8px;display:none;gap:4px;z-index:3}
.dash-grid[data-edit="on"] .dw-tools{display:inline-flex}
.dw-tools button{width:28px;height:28px;border-radius:var(--r-sm);background:var(--surface);border:1px solid var(--line);display:grid;place-items:center;box-shadow:var(--shadow-sm);cursor:pointer;color:var(--ink)}
.dw-tools button:hover{background:var(--surface-3)}
.dw-tools i{width:14px;height:14px}
.dash-add{display:none;gap:8px;flex-wrap:wrap;margin-top:16px;align-items:center}
.dash-add.is-on{display:flex}

/* ===== Payments Engine cockpit — full-width stack + a manually-balanced 2-col band ===== */
.eng-stack{display:flex;flex-direction:column;gap:16px}
.eng-cols{display:grid;grid-template-columns:1fr 1fr;gap:16px;align-items:start}
.eng-col{display:flex;flex-direction:column;gap:16px;min-width:0}
@media (max-width:820px){ .eng-cols{grid-template-columns:1fr} }

/* ===== Pay-to-play features shown greyed + locked (Justin 2026-07-01) ===== */
.nav__link.is-locked{opacity:.5}
.nav__link.is-locked .nav__lock{margin-left:auto;flex:0 0 auto;width:auto;height:auto;display:inline-flex;align-items:center;opacity:.8}
.is-locked-view{position:relative;min-height:440px}
.is-locked-view > :not(.lockcard){opacity:.4;pointer-events:none;filter:grayscale(.55);user-select:none}
.lockcard{position:absolute;inset:0;display:flex;justify-content:center;align-items:flex-start;padding-top:76px;z-index:40}
.lockcard__box{background:var(--surface);border:1px solid var(--line);border-radius:var(--r-lg);padding:26px 30px;max-width:390px;text-align:center;box-shadow:0 26px 64px rgba(0,0,0,.22)}
.lockcard__ic{display:inline-grid;place-items:center;width:52px;height:52px;border-radius:14px;background:rgba(var(--accent-rgb),.14);color:var(--accent);margin-bottom:12px}
.lockcard__box h3{margin:0 0 6px;font-size:18px;font-weight:800;color:var(--ink)}
.lockcard__box p{margin:0 0 16px;font-size:13.5px;color:var(--muted);line-height:1.55}
