/* fonts are bundled locally (SIL Open Font License) so the app looks right offline too */
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/unbounded-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/unbounded-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Unbounded'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/unbounded-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 400; font-display: swap; src: url('/fonts/manrope-latin-400-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 500; font-display: swap; src: url('/fonts/manrope-latin-500-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 600; font-display: swap; src: url('/fonts/manrope-latin-600-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 700; font-display: swap; src: url('/fonts/manrope-latin-700-normal.woff2') format('woff2'); }
@font-face { font-family: 'Manrope'; font-style: normal; font-weight: 800; font-display: swap; src: url('/fonts/manrope-latin-800-normal.woff2') format('woff2'); }

/* =========================================================
   PayPilot: "midnight cockpit" theme
   Dark aurora desk, frosted glass panels, white paper invoices.
   ========================================================= */
:root {
  color-scheme: dark;
  --bg: #060914;
  --bg-2: #0b1122;
  --glass: rgba(255, 255, 255, 0.045);
  --glass-2: rgba(255, 255, 255, 0.075);
  --glass-line: rgba(255, 255, 255, 0.09);
  --glass-line-2: rgba(255, 255, 255, 0.16);

  /* text (dark theme) - names kept from v1 so the JS keeps working */
  --ink: #eef1ff;
  --ink-2: #aab3d3;
  --ink-3: #6f7a9e;
  --rule: rgba(255, 255, 255, 0.1);
  --desk: rgba(255, 255, 255, 0.05);
  --desk-2: rgba(255, 255, 255, 0.08);
  --paper: rgba(255, 255, 255, 0.045);

  --violet: #8b5cf6;
  --sky: #38bdf8;
  --cobalt: #8a7dff;
  --cobalt-dark: #6d5ff5;
  --grad: linear-gradient(120deg, #8b5cf6 0%, #6366f1 45%, #38bdf8 100%);
  --grad-text: linear-gradient(100deg, #ffffff 0%, #d8ccff 40%, #7dd3fc 100%);

  --paid: #34d399;
  --paid-bg: rgba(52, 211, 153, 0.14);
  --due: #fbbf24;
  --due-bg: rgba(251, 191, 36, 0.14);
  --late: #fb7185;
  --late-bg: rgba(251, 113, 133, 0.14);

  --radius-lg: 18px;
  --radius-sm: 10px;
  --font: 'Manrope', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --display: 'Unbounded', 'Manrope', system-ui, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  position: relative;
}
/* aurora glow behind everything */
body::before {
  content: '';
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 520px at 8% -8%, rgba(139, 92, 246, 0.28), transparent 60%),
    radial-gradient(760px 480px at 100% 0%, rgba(56, 189, 248, 0.18), transparent 60%),
    radial-gradient(900px 600px at 50% 120%, rgba(99, 102, 241, 0.16), transparent 60%),
    var(--bg);
}
a { color: #a5b4fc; }
a:hover { color: #c7d2fe; }
button, input, textarea, select { font: inherit; color: inherit; }
option { background: #0d1326; color: var(--ink); }
:focus-visible { outline: 2px solid #a5b4fc; outline-offset: 2px; }
.num { font-variant-numeric: lining-nums; }
.muted { color: var(--ink-3); }
.hidden { display: none !important; }
::selection { background: rgba(139, 92, 246, 0.45); }

/* ---------- top bar ---------- */
.topbar {
  position: sticky; top: 0; z-index: 15;
  display: flex; align-items: center; gap: 26px;
  padding: 12px 28px;
  background: rgba(6, 9, 20, 0.62);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-bottom: 1px solid var(--glass-line);
}
.brand { display: flex; align-items: center; gap: 11px; text-decoration: none; }
.brand svg { width: 34px; height: 34px; flex: none; filter: drop-shadow(0 6px 16px rgba(139, 92, 246, 0.45)); }
.wordmark {
  font-family: var(--display); font-weight: 700; font-size: 21px; letter-spacing: -0.035em; line-height: 1;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
  background-size: 200% 100%; background-position: 0 0; transition: background-position .8s ease;
}
.brand:hover .wordmark { background-position: 100% 0; }
.nav { display: flex; gap: 4px; }
.nav a {
  color: var(--ink-2); text-decoration: none; padding: 7px 13px; border-radius: 999px; font-weight: 600; font-size: 14.5px;
  border: 1px solid transparent; transition: background .15s, color .15s;
}
.nav a:hover { color: #fff; background: var(--glass-2); }
.nav a[aria-current='page'] { color: #fff; background: var(--glass-2); border-color: var(--glass-line-2); }
.nav .badge { display: inline-block; min-width: 18px; padding: 0 5px; margin-left: 5px; border-radius: 9px; background: var(--late); color: #1a0710; font-size: 11.5px; font-weight: 800; text-align: center; }
.nav .nav-cta { background: var(--grad); color: #fff; margin-left: 8px; box-shadow: 0 6px 22px -8px rgba(139, 92, 246, 0.9); }
.nav .nav-cta:hover { filter: brightness(1.1); color: #fff; background: var(--grad); }
.nav a.nav-cta[aria-current=page] { background: var(--grad); color: #fff; border-color: rgba(255, 255, 255, 0.55); }
.modes { margin-left: auto; display: flex; align-items: center; gap: 8px; font-size: 13px; }
.mode { padding: 5px 11px; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--ink-2); }
.mode b { font-weight: 700; color: #fff; }
.mode.warn { border-color: rgba(251, 191, 36, 0.45); color: #fde68a; }
.mode.ok { border-color: rgba(52, 211, 153, 0.4); color: #a7f3d0; }
a.mode-link { text-decoration: none; transition: background .15s, border-color .15s; }
a.mode-link:hover { background: var(--glass-2); }
.mode.gear { display: grid; place-items: center; padding: 6px 8px; color: var(--ink-2); text-decoration: none; }
.mode.gear:hover, .mode.gear.on { color: #fff; background: var(--glass-2); border-color: var(--glass-line-2); }

main { max-width: 1240px; margin: 0 auto; padding: 32px 28px 60px; }
h1 { font-family: var(--display); font-size: 30px; line-height: 1.15; letter-spacing: -0.035em; margin: 0 0 8px; font-weight: 600; }
h2 { font-size: 18px; letter-spacing: -0.01em; margin: 0 0 12px; font-weight: 800; }
h3 { font-weight: 800; }
.lede { color: var(--ink-2); margin: 0 0 24px; max-width: 64ch; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 0; border-radius: var(--radius-sm); padding: 10px 18px;
  font-weight: 700; cursor: pointer; text-decoration: none;
  background: var(--grad); color: #fff;
  box-shadow: 0 8px 24px -10px rgba(139, 92, 246, 0.85), inset 0 1px 0 rgba(255, 255, 255, 0.25);
  transition: transform .12s ease, filter .15s ease;
}
.btn:hover { filter: brightness(1.12); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .55; cursor: progress; }
.btn.ghost { background: var(--glass); color: var(--ink); box-shadow: inset 0 0 0 1px var(--glass-line-2); }
.btn.ghost:hover { background: var(--glass-2); }
.btn.danger { background: linear-gradient(120deg, #f43f5e, #fb7185); box-shadow: 0 8px 24px -10px rgba(244, 63, 94, 0.8); }
.btn.small { padding: 6px 11px; font-size: 13px; border-radius: 8px; }
.linkbtn { border: 0; background: none; color: #a5b4fc; cursor: pointer; padding: 0; font: inherit; text-decoration: underline; }

/* ---------- glass surfaces ---------- */
.panel, .chat, .fig, .figures {
  background: var(--glass);
  border: 1px solid var(--glass-line);
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
}
.panel { border-radius: var(--radius-lg); padding: 22px 24px; }

/* ---------- chat page ---------- */
.workspace { display: grid; grid-template-columns: minmax(0, 1fr) 440px; gap: 28px; align-items: start; }
.chat { border-radius: var(--radius-lg); display: flex; flex-direction: column; height: calc(100vh - 140px); min-height: 520px; overflow: hidden; }
.chat-head { padding: 18px 22px 14px; border-bottom: 1px solid var(--glass-line); display: flex; align-items: baseline; gap: 12px; }
.chat-head h1 { font-size: 20px; margin: 0; }
.chat-head .btn { margin-left: auto; }
.log { flex: 1; overflow-y: auto; padding: 22px; display: flex; flex-direction: column; gap: 14px; }
.msg { max-width: 78%; padding: 11px 15px; border-radius: 16px; white-space: normal; overflow-wrap: anywhere; }
.msg p { margin: 0 0 6px; } .msg p:last-child { margin: 0; }
.msg ul { margin: 4px 0; padding-left: 20px; }
.msg.user { align-self: flex-end; background: var(--grad); color: #fff; border-bottom-right-radius: 5px; box-shadow: 0 10px 28px -14px rgba(139, 92, 246, 0.9); }
.msg.user img { display: block; max-width: 220px; border-radius: 10px; margin-bottom: 6px; }
.msg.bot { align-self: flex-start; background: var(--glass-2); border: 1px solid var(--glass-line); border-bottom-left-radius: 5px; }
.msg.err { align-self: flex-start; background: var(--late-bg); color: #fecdd3; border: 1px solid rgba(251, 113, 133, 0.3); }
.msg .tools { display: block; margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.typing { align-self: flex-start; color: var(--ink-3); font-size: 14px; }
.typing::after { content: '…'; animation: blink 1s steps(3) infinite; }
@keyframes blink { 50% { opacity: .3; } }

.welcome { margin: auto 0; padding: 8px 4px; }
.welcome h2 {
  font-family: var(--display); font-weight: 600; font-size: 26px; line-height: 1.2; letter-spacing: -0.035em; max-width: 20ch;
  background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.welcome p { color: var(--ink-2); max-width: 54ch; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 16px; }
.chip {
  border: 1px solid var(--glass-line); background: var(--glass); border-radius: 999px;
  padding: 8px 14px; cursor: pointer; text-align: left; font-size: 14px; color: var(--ink-2);
  transition: border-color .15s, color .15s, background .15s;
}
.chip:hover { border-color: rgba(167, 139, 250, 0.7); color: #fff; background: rgba(139, 92, 246, 0.12); }

.composer { border-top: 1px solid var(--glass-line); padding: 12px; display: flex; gap: 8px; align-items: flex-end; background: rgba(6, 9, 20, 0.35); }
.composer textarea {
  flex: 1; resize: none; border: 1px solid var(--glass-line-2); border-radius: 12px; padding: 11px 13px;
  min-height: 46px; max-height: 160px; background: rgba(255, 255, 255, 0.04); color: var(--ink);
}
.composer textarea::placeholder { color: var(--ink-3); }
.composer textarea:focus { outline: none; border-color: rgba(167, 139, 250, 0.8); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15); }
.attach { width: 46px; height: 46px; border-radius: 12px; border: 1px solid var(--glass-line-2); background: var(--glass); cursor: pointer; display: grid; place-items: center; color: var(--ink-2); }
.attach:hover { color: #fff; border-color: rgba(167, 139, 250, 0.8); }
.preview-img { display: flex; align-items: center; gap: 8px; padding: 8px 12px 0; font-size: 13px; color: var(--ink-2); }
.preview-img img { height: 44px; border-radius: 8px; }

.tray h2 { display: flex; align-items: baseline; gap: 8px; }
.tray h2 .muted { font-weight: 600; font-size: 14px; }
.tray-empty { border: 1.5px dashed var(--glass-line-2); border-radius: var(--radius-lg); padding: 28px; color: var(--ink-3); text-align: center; background: rgba(255, 255, 255, 0.02); }
.stack { display: flex; flex-direction: column; gap: 22px; }

/* ---------- the paper slip (stays white paper on the dark desk) ---------- */
.slip {
  color-scheme: light;
  --ink: #141a33; --ink-2: #4a5373; --ink-3: #7b84a3; --rule: #d9deea; --desk: #eef1f7; --desk-2: #e3e8f2;
  --paper: #ffffff; --cobalt: #5b4ef0; --cobalt-dark: #4436d8;
  --paid: #0f8a58; --paid-bg: #def5ea; --due: #a8650c; --due-bg: #fdf1d9; --late: #c2283f; --late-bg: #fde4e8;
  position: relative; background: #fff; color: var(--ink); padding: 22px 24px 24px;
  border-radius: 6px 6px 0 0;
  box-shadow: 0 30px 60px -28px rgba(0, 0, 0, 0.85), 0 0 0 1px rgba(255, 255, 255, 0.06), 0 0 60px -20px rgba(139, 92, 246, 0.45);
  margin-bottom: 12px;
}
.slip::after {
  content: ''; position: absolute; left: 0; right: 0; bottom: -10px; height: 10px;
  background:
    linear-gradient(135deg, #fff 50%, transparent 50%) 0 0 / 14px 10px repeat-x,
    linear-gradient(-135deg, #fff 50%, transparent 50%) 0 0 / 14px 10px repeat-x;
}
.slip a { color: var(--cobalt); }
.slip .btn.ghost { background: transparent; color: var(--ink-2); box-shadow: inset 0 0 0 1px var(--rule); }
.slip .btn.ghost:hover { background: var(--desk); color: var(--ink); }
.slip-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.slip-kind { font-family: var(--display); font-weight: 600; font-size: 16px; letter-spacing: -0.03em; }
.slip-from { font-size: 13px; color: var(--ink-3); }
.slip label { display: block; font-size: 12px; color: var(--ink-3); margin: 10px 0 3px; }
.slip input, .slip textarea { width: 100%; border: 0; border-bottom: 1px solid var(--rule); padding: 5px 0; background: transparent; border-radius: 0; color: var(--ink); }
.slip textarea { resize: vertical; min-height: 110px; border: 1px solid var(--rule); border-radius: 6px; padding: 8px; line-height: 1.45; }
.slip input:focus, .slip textarea:focus { outline: none; border-color: var(--cobalt); }
.slip .row2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.items { width: 100%; border-collapse: collapse; margin-top: 14px; font-size: 14px; }
.items th { text-align: left; font-weight: 600; color: var(--ink-3); font-size: 12px; padding-bottom: 4px; border-bottom: 1.5px solid var(--ink); }
.items td { padding: 4px 6px 4px 0; border-bottom: 1px dashed var(--rule); }
.items td input { border: 0; padding: 3px 0; }
.items .q { width: 52px; } .items .p { width: 86px; } .items .amt { text-align: right; width: 84px; white-space: nowrap; }
.items .x { width: 22px; }
.items .x button { border: 0; background: none; color: var(--ink-3); cursor: pointer; font-size: 16px; line-height: 1; }
.items .x button:hover { color: var(--late); }
.add-line { border: 0; background: none; color: var(--cobalt); cursor: pointer; padding: 6px 0; font-size: 13px; font-weight: 700; }
.sums { margin-top: 12px; font-size: 14px; color: var(--ink-2); }
.sums div { display: flex; justify-content: space-between; padding: 2px 0; }
.total { display: flex; justify-content: space-between; align-items: baseline; margin-top: 10px; padding-top: 8px; border-top: 1.5px solid var(--ink); }
.total b { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -0.03em; }
.deposit-line { font-size: 13px; color: var(--paid); margin-top: 6px; min-height: 1px; }
.risk { margin-top: 12px; padding: 9px 11px; border-radius: 8px; font-size: 13px; }
.risk.medium { background: var(--due-bg); color: var(--due); }
.risk.high { background: var(--late-bg); color: var(--late); }
.slip-actions { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 18px; }
.slip-error { margin-top: 10px; color: var(--late); font-size: 13px; }
.slip-meta { font-size: 13px; color: var(--ink-2); }
.slip.done input, .slip.done textarea, .slip.done .add-line, .slip.done .x button { pointer-events: none; }
.slip.done .slip-actions, .slip.done .x button, .slip.done .add-line { visibility: hidden; }
.slip.done .slip-actions { display: none; }
.slip.rejected { opacity: .45; }
.slip-result { margin-top: 14px; font-size: 14px; }
.stamp {
  position: absolute; top: 34%; left: 50%;
  padding: 6px 16px; border: 4px solid currentColor; border-radius: 8px;
  font-family: var(--display); font-weight: 700; font-size: 32px; letter-spacing: 0.04em; color: #0f8a58;
  transform: translate(-50%, -50%) rotate(-11deg); opacity: .85; pointer-events: none; mix-blend-mode: multiply;
  animation: stamp .38s cubic-bezier(.2, 1.6, .4, 1) both;
}
.stamp.void { color: #c2283f; }
@keyframes stamp {
  from { transform: translate(-50%, -50%) rotate(-11deg) scale(2.4); opacity: 0; }
  to { transform: translate(-50%, -50%) rotate(-11deg) scale(1); opacity: .85; }
}

/* ---------- status pills ---------- */
.pill { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 700; white-space: nowrap; border: 1px solid transparent; }
.pill.PAID, .pill.MARKED_AS_PAID, .pill.none, .pill.low, .pill.PARTIALLY_PAID { background: var(--paid-bg); color: var(--paid); border-color: rgba(52, 211, 153, 0.25); }
.pill.SENT, .pill.UNPAID, .pill.medium, .pill.friendly { background: var(--due-bg); color: var(--due); border-color: rgba(251, 191, 36, 0.25); }
.pill.OVERDUE, .pill.high, .pill.final { background: var(--late-bg); color: var(--late); border-color: rgba(251, 113, 133, 0.28); }
.pill.firm { background: rgba(251, 146, 60, 0.15); color: #fdba74; border-color: rgba(251, 146, 60, 0.3); }
.pill.SCHEDULED, .pill.weekly, .pill.monthly { background: rgba(139, 92, 246, 0.16); color: #c4b5fd; border-color: rgba(139, 92, 246, 0.3); }
.pill.CANCELLED, .pill.DRAFT { background: var(--glass-2); color: var(--ink-2); }
.pill.top { background: linear-gradient(120deg, rgba(251, 191, 36, 0.25), rgba(251, 146, 60, 0.2)); color: #fde68a; border-color: rgba(251, 191, 36, 0.35); margin-left: 4px; }

/* ---------- dashboard ---------- */
.dash-top { display: flex; align-items: flex-end; gap: 16px; margin-bottom: 24px; }
.dash-top .btn { margin-left: auto; }
.figures { display: grid; grid-template-columns: 1.4fr 1fr 1fr 1fr; gap: 0; border-radius: var(--radius-lg); overflow: hidden; margin-bottom: 26px; }
.fig { padding: 20px 22px; border: 0; border-right: 1px solid var(--glass-line); border-radius: 0; background: transparent; backdrop-filter: none; }
.fig:last-child { border-right: 0; }
.fig .k { font-size: 13px; color: var(--ink-2); font-weight: 600; }
.fig .v { font-family: var(--display); font-size: 27px; font-weight: 600; letter-spacing: -0.04em; line-height: 1.2; margin-top: 6px; }
.fig:first-child { background: radial-gradient(420px 200px at 0% 0%, rgba(139, 92, 246, 0.3), transparent 70%); }
.fig:first-child .v { font-size: 40px; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.fig .s { font-size: 13px; color: var(--ink-3); }
.fig.late .v { color: var(--late); }
button.fig { text-align: left; font: inherit; color: inherit; cursor: pointer; position: relative; transition: background .15s; }
button.fig:hover { background-color: rgba(255, 255, 255, 0.04); }
button.fig.active { background-color: rgba(139, 92, 246, 0.12); box-shadow: inset 0 -3px 0 #a78bfa; }
.grid2 { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 26px; margin-bottom: 26px; align-items: start; }
.chart svg { width: 100%; height: auto; display: block; }
.chart .bar { cursor: pointer; }
.chart .bar:hover rect:nth-child(2) { filter: brightness(1.25); }
.chart .bar:focus-visible { outline: none; }
.chart .bar:focus-visible rect:nth-child(2) { stroke: #fff; stroke-width: 2; }
.legend { display: flex; gap: 16px; font-size: 13px; color: var(--ink-2); margin-top: 8px; }
.month-detail { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--glass-line); }
.md-head { display: flex; align-items: center; gap: 10px; }
.md-head h3 { margin: 0; font-size: 16px; }
.md-head .btn { margin-left: auto; }
.feed { list-style: none; margin: 0; padding: 0; font-size: 14px; }
.feed li { padding: 9px 0; border-bottom: 1px solid var(--glass-line); display: flex; gap: 10px; color: var(--ink-2); }
.feed li:last-child { border-bottom: 0; }
.feed time { color: var(--ink-3); white-space: nowrap; font-size: 12.5px; min-width: 62px; }

ol.leader { list-style: none; margin: 0; padding: 0; }
ol.leader li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--glass-line); }
ol.leader li:last-child { border-bottom: 0; }
.rank { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; font-weight: 800; font-size: 13px; background: var(--glass-2); color: var(--ink-2); flex: none; border: 1px solid var(--glass-line); }
.rank.first { background: linear-gradient(135deg, #fde68a, #f59e0b); color: #3b2500; border: 0; box-shadow: 0 0 18px -4px rgba(251, 191, 36, 0.7); }
.who { flex: 1; display: flex; flex-direction: column; font-size: 14px; min-width: 0; }
.who .muted { font-size: 12.5px; }
.share { height: 5px; background: var(--glass-2); border-radius: 3px; margin-top: 6px; overflow: hidden; }
.share i { display: block; height: 100%; background: var(--grad); border-radius: 3px; }
.amt { font-weight: 800; }

table.data { width: 100%; border-collapse: collapse; font-size: 14px; }
table.data th { text-align: left; font-weight: 600; font-size: 12.5px; color: var(--ink-3); padding: 0 10px 10px 0; border-bottom: 1px solid var(--glass-line-2); }
table.data td { padding: 12px 10px 12px 0; border-bottom: 1px solid var(--glass-line); vertical-align: middle; }
table.data tbody tr { transition: background .12s; }
table.data tbody tr:hover { background: rgba(255, 255, 255, 0.025); }
table.data td.r, table.data th.r { text-align: right; }
table.data td.num, table.data td.r { white-space: nowrap; }
.table-wrap { overflow-x: auto; }
.table-tools { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.table-tools input[type=search] { margin-left: auto; border: 1px solid var(--glass-line-2); background: rgba(255, 255, 255, 0.04); border-radius: 10px; padding: 7px 12px; min-width: 220px; color: var(--ink); }
.seg { display: inline-flex; border: 1px solid var(--glass-line-2); border-radius: 10px; overflow: hidden; background: rgba(255, 255, 255, 0.03); }
.seg button { border: 0; background: transparent; padding: 7px 13px; cursor: pointer; font-size: 13.5px; color: var(--ink-2); font-weight: 600; }
.seg button + button { border-left: 1px solid var(--glass-line); }
.seg button[aria-pressed=true] { background: var(--grad); color: #fff; }
button.sort { border: 0; background: none; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
button.sort .arrow { font-size: 10px; opacity: .5; }
th[aria-sort=ascending] button.sort, th[aria-sort=descending] button.sort { color: #fff; }
th[aria-sort=ascending] .arrow, th[aria-sort=descending] .arrow { opacity: 1; color: #a78bfa; }
.empty { padding: 30px; text-align: center; color: var(--ink-3); }
.empty .btn { margin-top: 10px; }
.toast {
  position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%);
  background: rgba(17, 22, 44, 0.92); color: #fff; padding: 11px 18px; border-radius: 12px; font-size: 14px; z-index: 40;
  border: 1px solid var(--glass-line-2); backdrop-filter: blur(12px); box-shadow: 0 16px 40px -14px rgba(0, 0, 0, 0.8);
}

/* ---------- money brief ---------- */
.brief { font-size: 15px; }
.brief-head { display: flex; align-items: baseline; gap: 12px; margin-bottom: 4px; flex-wrap: wrap; }
.brief-head .btn { margin-left: auto; }
ol.bsteps { list-style: none; margin: 16px 0 0; padding: 0; display: grid; position: relative; }
#briefBody:empty { display: none; }
#briefBody { margin-top: 18px; display: flex; flex-direction: column; gap: 16px; font-size: 14px; }
.br-ai { padding: 16px 18px; border-radius: 12px; background: #0e0d12; border: 1px solid #262233; }
.br-ai-tag { display: inline-block; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: #c4b5fd; margin-bottom: 6px; }
.br-ai-h p { margin: 0; font-size: 16px; font-weight: 550; line-height: 1.45; color: var(--ink); letter-spacing: -0.01em; }
.br-ai.off p { font-size: 13.5px; font-weight: 400; margin: 0; }
.br-acts { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 8px; }
.br-acts li { display: grid; grid-template-columns: 22px 1fr; gap: 10px; align-items: start; color: var(--ink-2); line-height: 1.5; font-size: 13.5px; }
.br-acts li > span { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; color: #ddd6fe; background: #1d1830; }
.br-acts b { color: var(--ink); font-weight: 600; }
.br-inv { color: inherit; text-decoration: underline; text-decoration-color: #52525b; text-underline-offset: 3px; }
.br-inv:hover { text-decoration-color: currentColor; }
.br-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--glass-line); border-radius: 12px; overflow: hidden; }
.br-kpis > div { display: flex; flex-direction: column; gap: 3px; padding: 14px 16px; border-right: 1px solid var(--glass-line); min-width: 0; }
.br-kpis > div:last-child { border-right: 0; }
.br-kpis span { font-size: 12px; color: var(--ink-3); }
.br-kpis b { font-size: 20px; font-weight: 650; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.br-kpis em { font-style: normal; font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.br-d { margin-left: 4px; font-size: 11.5px; padding: 1px 6px; border-radius: 6px; background: #18181b; color: var(--ink-2); white-space: nowrap; }
.br-d.up { color: var(--paid); background: var(--paid-bg); } .br-d.down { color: var(--late); background: var(--late-bg); }
.late-t { color: var(--late) !important; }
.br-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.br-col { padding: 14px 16px; border-radius: 12px; border: 1px solid var(--glass-line); }
.br-col h3 { margin: 0 0 10px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.br-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.br-list li { display: flex; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--glass-line); }
.br-list li:first-child { border-top: 0; }
.br-rank { width: 22px; height: 22px; border-radius: 7px; flex: none; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; background: #18181b; color: var(--ink-2); }
.br-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--late); flex: none; margin: 0 7px; }
.br-who { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; position: relative; }
.br-who b { font-weight: 600; font-size: 13.5px; }
.br-who span { font-size: 12px; color: var(--ink-3); }
.br-who i { display: block; height: 3px; border-radius: 2px; background: #3f3f46; margin-top: 4px; max-width: 100%; }
.br-amt { font-weight: 600; font-size: 13.5px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (max-width: 900px) { .br-kpis { grid-template-columns: 1fr 1fr; } .br-kpis > div:nth-child(2) { border-right: 0; } .br-kpis > div:nth-child(-n+2) { border-bottom: 1px solid var(--glass-line); } .br-cols { grid-template-columns: 1fr; } }
.bstep { display: grid; grid-template-columns: 36px 1fr; gap: 14px; padding: 14px 0; border-top: 1px solid var(--glass-line); }
.bstep:first-child { border-top: 0; }
.bstep h3 { margin: 2px 0 4px; font-size: 15px; }
.bstep p { margin: 2px 0; color: var(--ink-2); }
.bstep p b { color: var(--ink); }
.bnum { width: 28px; height: 28px; border-radius: 50%; background: var(--grad); color: #fff; display: grid; place-items: center; font-size: 13px; font-weight: 800; box-shadow: 0 0 18px -4px rgba(139, 92, 246, 0.8); }
.big { font-family: var(--display); font-weight: 600; font-size: 22px; letter-spacing: -0.035em; color: #fff; }
.headline { font-size: 17px; font-weight: 800; margin: 2px 0 8px; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.mini { margin: 4px 0 0; padding-left: 20px; color: var(--ink-2); }
.mini li { margin: 4px 0; }
.mini b { color: var(--ink); }

/* ---------- forms ---------- */
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form-grid label { font-size: 12px; color: var(--ink-3); display: block; margin-bottom: 4px; font-weight: 600; }
.form-grid input, .form-grid select, .form-grid textarea {
  width: 100%; border: 1px solid var(--glass-line-2); border-radius: 10px; padding: 9px 12px;
  background: rgba(255, 255, 255, 0.04); color: var(--ink);
}
.form-grid input::placeholder, .form-grid textarea::placeholder { color: var(--ink-3); }
.form-grid input:focus, .form-grid select:focus, .form-grid textarea:focus { outline: none; border-color: rgba(167, 139, 250, 0.8); box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.15); }
.form-grid input[readonly] { opacity: .75; }
.form-grid .full { grid-column: 1 / -1; }
fieldset { border: 0; padding: 0; margin: 0 0 24px; }
legend { font-weight: 800; font-size: 16px; margin-bottom: 12px; padding: 0; }
.ni-grid { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 28px; align-items: start; }
.ni-grid aside { position: sticky; top: 84px; }
.ni-items { color: var(--ink); }
.ni-items th { color: var(--ink-3); border-bottom-color: var(--glass-line-2); }
.ni-items td { border-bottom-color: var(--glass-line); }
.ni-items td input { width: 100%; border: 0; border-bottom: 1px solid var(--glass-line-2); padding: 7px 0; background: transparent; color: var(--ink); }
.ni-items td input:focus { outline: none; border-color: #a78bfa; }
.ni-items .x button { color: var(--ink-3); }
.panel .add-line { color: #a5b4fc; }
.pv-to { font-size: 14px; margin: 4px 0 10px; line-height: 1.45; }
.pv-dates { display: flex; flex-wrap: wrap; gap: 14px; font-size: 13px; color: var(--ink-2); padding-bottom: 6px; }
.done-card { margin-top: 26px; }
.done-card p { margin: 6px 0 0; }
.panel .slip-error { color: var(--late); }
.login { max-width: 400px; margin: 14vh auto; }
.login input { width: 100%; border: 1px solid var(--rule); border-radius: 8px; padding: 10px 12px; margin: 8px 0 12px; }
.login .brand-big { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; justify-content: center; }
.login .brand-big svg { width: 44px; height: 44px; }
.login .brand-big .wordmark { font-size: 30px; }
.fu-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(380px, 100%), 1fr)); gap: 26px; align-items: start; }

/* ---------- live clock + notifications ---------- */
.live-clock { white-space: nowrap; }
.live-clock .clock-time { font-variant-numeric: tabular-nums; color: #fff; }
.bell-wrap { position: relative; }
.bell { position: relative; width: 36px; height: 32px; border-radius: 999px; border: 1px solid var(--glass-line); background: var(--glass); color: var(--ink-2); cursor: pointer; display: grid; place-items: center; }
.bell:hover { color: #fff; border-color: var(--glass-line-2); }
.bell-count { position: absolute; top: -6px; right: -6px; min-width: 19px; height: 19px; padding: 0 5px; border-radius: 10px; background: var(--late); color: #1a0710; font-size: 11px; font-weight: 800; display: grid; place-items: center; box-shadow: 0 0 14px rgba(251, 113, 133, 0.8); }
.bell-panel { position: absolute; right: 0; top: 44px; width: 370px; max-height: 460px; overflow-y: auto; background: rgba(13, 19, 38, 0.96); color: var(--ink); border: 1px solid var(--glass-line-2); border-radius: 16px; box-shadow: 0 24px 60px -18px rgba(0, 0, 0, 0.9); z-index: 20; backdrop-filter: blur(18px); }
.bell-head { display: flex; justify-content: space-between; align-items: center; padding: 13px 15px; border-bottom: 1px solid var(--glass-line); font-size: 14px; }
.bell-panel ul { list-style: none; margin: 0; padding: 0; }
.bell-panel li a { display: flex; gap: 11px; padding: 11px 15px; text-decoration: none; color: inherit; border-bottom: 1px solid var(--glass-line); font-size: 13.5px; }
.bell-panel li a:hover { background: rgba(255, 255, 255, 0.04); }
.bell-panel li.unread a { background: rgba(139, 92, 246, 0.1); }
.bell-panel .ni { font-size: 18px; line-height: 1.2; }
.bell-panel .nt { display: flex; flex-direction: column; gap: 1px; color: var(--ink-2); }
.bell-panel .nt b { color: var(--ink); }
.bell-panel .nt time { color: var(--ink-3); font-size: 12px; }
.empty-note { padding: 18px 15px; color: var(--ink-3); font-size: 13.5px; }
.note-toast {
  position: fixed; top: 80px; right: 24px; z-index: 40; display: flex; gap: 12px; align-items: flex-start; max-width: 370px;
  padding: 15px 17px; border-radius: 16px; background: rgba(13, 19, 38, 0.95); color: var(--ink-2);
  border: 1px solid rgba(52, 211, 153, 0.35); box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.9), 0 0 40px -10px rgba(52, 211, 153, 0.45);
  backdrop-filter: blur(16px); font-size: 14px;
  animation: slidein .4s cubic-bezier(.2, 1.2, .4, 1) both; transition: opacity .35s, transform .35s;
}
.note-toast b { color: #fff; }
.note-toast.approval { border-color: rgba(139, 92, 246, 0.45); box-shadow: 0 24px 60px -16px rgba(0, 0, 0, 0.9), 0 0 40px -10px rgba(139, 92, 246, 0.5); }
.note-toast .ni { font-size: 24px; }
.note-toast.out { opacity: 0; transform: translateX(20px); }
@keyframes slidein { from { opacity: 0; transform: translateX(40px); } }

/* ---------- responsive / motion ---------- */
@media (max-width: 1100px) { .live-clock { display: none; } }
@media (max-width: 980px) {
  .workspace, .grid2, .ni-grid { grid-template-columns: 1fr; }
  .ni-grid aside { position: static; }
  .chat { height: 70vh; }
  .figures { grid-template-columns: 1fr 1fr; }
  .fig { border-bottom: 1px solid var(--glass-line); }
  .topbar { flex-wrap: wrap; gap: 10px; padding: 12px 16px; }
  .nav { order: 3; width: 100%; overflow-x: auto; }
  .nav a { white-space: nowrap; }
  .modes { margin-left: auto; font-size: 12px; }
  .chat-head .muted { display: none; }
  .form-grid { grid-template-columns: 1fr; }
  .table-tools input[type=search] { margin-left: 0; }
  main { padding: 18px 16px 40px; }
  h1 { font-size: 23px; }
  .dash-top { flex-wrap: wrap; align-items: flex-start; }
  .dash-top .btn { margin-left: 0; }
  .fig { padding: 16px; min-width: 0; }
  .fig .v { font-size: 20px; overflow-wrap: anywhere; }
  .fig:first-child .v { font-size: 26px; }
  .brief-head .btn { margin-left: 0; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* ---------- settings ---------- */
.set-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(340px, 100%), 1fr)); gap: 22px; align-items: start; }
.set-status { display: flex; gap: 14px; align-items: center; padding: 14px 16px; border-radius: 14px; background: rgba(255, 255, 255, 0.03); box-shadow: inset 0 0 0 1px var(--glass-line); margin-bottom: 16px; }
.set-status .dot { width: 12px; height: 12px; border-radius: 50%; flex: none; }
.set-status.on .dot { background: var(--paid); box-shadow: 0 0 14px var(--paid); }
.set-status.off .dot { background: var(--due); box-shadow: 0 0 14px var(--due); }
.set-status b { display: block; }
.set-status span { color: var(--ink-2); font-size: 13px; }
.set-help { font-size: 13px; color: var(--ink-2); margin: 0 0 14px; }
.panel h2 .tag { font-family: var(--font); font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 999px; background: var(--glass-2); color: var(--ink-2); margin-left: 8px; vertical-align: middle; }
.ok-text { color: var(--paid); font-size: 13px; min-height: 18px; margin-top: 8px; }

/* ---------- invoice drawer + timeline ---------- */
.drawer-back { position: fixed; inset: 0; background: rgba(3, 5, 12, 0.55); backdrop-filter: blur(3px); z-index: 60; opacity: 0; transition: opacity .2s; }
.drawer-back.open { opacity: 1; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(440px, 100vw); z-index: 61; overflow-y: auto; padding: 26px 26px 40px;
  background: linear-gradient(180deg, #0d1328, #080c1b); box-shadow: -30px 0 80px -20px rgba(0, 0, 0, 0.7), inset 1px 0 0 var(--glass-line-2);
  transform: translateX(100%); transition: transform .25s cubic-bezier(.2, .8, .2, 1); }
.drawer.open { transform: none; }
.drawer .x { position: absolute; top: 16px; right: 16px; background: var(--glass); border: 1px solid var(--glass-line); color: var(--ink-2); width: 34px; height: 34px; border-radius: 10px; cursor: pointer; font-size: 16px; }
.drawer .x:hover { color: #fff; background: var(--glass-2); }
.dr-num { font-size: 12px; color: var(--ink-3); font-weight: 700; letter-spacing: .08em; text-transform: uppercase; }
.dr-amt { font-family: var(--display); font-size: 34px; font-weight: 700; margin: 4px 0 2px; }
.dr-who { color: var(--ink-2); margin-bottom: 14px; }
.dr-lines { width: 100%; border-collapse: collapse; font-size: 13px; margin: 6px 0 18px; }
.dr-lines td { padding: 6px 0; border-bottom: 1px solid var(--glass-line); }
.dr-lines td:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.dr-lines tr.fee td { color: var(--late); }
.dr-actions { display: flex; flex-wrap: wrap; gap: 8px; margin: 4px 0 24px; }
.timeline { list-style: none; margin: 0; padding: 0 0 0 4px; position: relative; }
.timeline::before { content: ''; position: absolute; left: 13px; top: 8px; bottom: 8px; width: 2px; background: linear-gradient(var(--violet), rgba(56, 189, 248, 0.25)); border-radius: 2px; }
.timeline li { position: relative; display: flex; gap: 14px; padding: 0 0 18px; }
.timeline .tdot { position: relative; z-index: 1; flex: none; width: 20px; height: 20px; margin-left: 0; border-radius: 50%; display: grid; place-items: center; font-size: 11px;
  background: #0d1328; box-shadow: 0 0 0 2px var(--violet); color: #fff; }
.timeline li.paid .tdot { box-shadow: 0 0 0 2px var(--paid); background: var(--paid-bg); }
.timeline li.late .tdot { box-shadow: 0 0 0 2px var(--late); background: var(--late-bg); }
.timeline li.future .tdot { box-shadow: 0 0 0 2px var(--glass-line-2); }
.timeline li.future { opacity: .6; }
.timeline b { display: block; font-size: 14px; }
.timeline time { font-size: 12px; color: var(--ink-3); }
.timeline .tsub { font-size: 13px; color: var(--ink-2); }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: rgba(255, 255, 255, 0.03); }

/* ---------- payment celebration ---------- */
.confetti { position: fixed; inset: 0; pointer-events: none; z-index: 90; overflow: hidden; }
.confetti i { position: absolute; top: -12px; width: 9px; height: 14px; border-radius: 2px; opacity: .95; animation: pp-fall linear forwards; }
@keyframes pp-fall { to { transform: translate3d(var(--dx), 105vh, 0) rotate(var(--rot)); opacity: .9; } }
@media (prefers-reduced-motion: reduce) { .confetti { display: none; } .drawer, .drawer-back { transition: none; } }

.fee-pct { width: 64px !important; display: inline-block !important; margin: 0 2px 0 8px !important; padding: 2px 6px !important; text-align: right; }

/* restored chat: a screenshot was attached to this message */
.msg .att-note { display: inline-block; margin: 0 0 6px; padding: 2px 9px; border-radius: 999px; font-size: 12px; font-weight: 700; background: rgba(255, 255, 255, 0.14); }
.nudge { margin: 12px auto 0; max-width: 1180px; width: calc(100% - 48px); padding: 9px 14px; border-radius: 11px; font-size: 13px; color: #fde68a; background: rgba(245, 158, 11, 0.1); box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.28); }
.nudge a { color: #fcd34d; font-weight: 700; }
.slip-notice { margin-top: 8px; padding: 8px 10px; border-radius: 9px; font-size: 12.5px; line-height: 1.45; color: #92400e; background: #fef3c7; }
.panel.chart { display: flex; flex-direction: column; }
.chart-stats { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 18px; padding-top: 16px; border-top: 1px solid var(--glass-line); }
.cstat { display: flex; flex-direction: column; gap: 2px; font-size: 12.5px; }
.cstat b { font-family: var(--display); font-size: 20px; font-weight: 600; color: var(--ink); letter-spacing: -0.01em; }
@media (max-width: 560px) { .chart-stats { grid-template-columns: 1fr 1fr; } }
/* approved / discarded slips fold away */
.slip.leaving { overflow: hidden; opacity: 0; transform: translateX(24px) scale(0.98); margin-top: 0 !important; margin-bottom: 0 !important; padding-top: 0 !important; padding-bottom: 0 !important; transition: height .45s ease, opacity .35s ease, transform .45s ease, margin .45s ease, padding .45s ease; }

/* ================= Collections board ================= */
.col-hero { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.4fr); gap: 32px; align-items: center; padding: 26px 28px; margin-bottom: 26px; border-radius: 20px; background: linear-gradient(150deg, rgba(139, 92, 246, 0.14), rgba(56, 189, 248, 0.04) 55%), var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line-2); }
.ch-main { display: flex; flex-direction: column; gap: 4px; }
.ch-big { font-family: var(--display); font-size: clamp(32px, 4vw, 46px); font-weight: 700; letter-spacing: -0.02em; line-height: 1.1; }
.ch-late { color: #fca5a5; font-weight: 600; }
.seg-bar { display: flex; gap: 4px; height: 16px; border-radius: 999px; overflow: hidden; background: rgba(255, 255, 255, 0.05); }
.seg-part { border-radius: 999px; min-width: 10px; }
.seg-legend { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 14px; font-size: 13px; color: var(--ink-2); }
.seg-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 7px; }
.seg-legend b { color: var(--ink); margin-left: 4px; }

.board { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 16px; align-items: start; }
.bcol { border-radius: 18px; padding: 14px; background: rgba(255, 255, 255, 0.025); box-shadow: inset 0 0 0 1px var(--glass-line); min-height: 220px; }
.bcol-head { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.bcol-head .dot { width: 9px; height: 9px; border-radius: 50%; }
.bcol-sum { margin-left: auto; font-weight: 700; font-variant-numeric: tabular-nums; }
.bcol-hint { margin: 4px 0 12px; font-size: 12px; color: var(--ink-3); }
.bcol-cards { display: grid; gap: 12px; }
.bcol-empty { padding: 26px 10px; text-align: center; font-size: 13px; color: var(--ink-3); border-radius: 12px; border: 1px dashed var(--glass-line-2); }

.ccard { position: relative; padding: 14px; border-radius: 14px; background: var(--glass-2, rgba(255,255,255,.05)); box-shadow: inset 0 0 0 1px var(--glass-line-2); transition: transform .15s ease, box-shadow .15s ease; overflow: hidden; }
.ccard::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--paid); }
.ccard.late::before { background: #fbbf24; }
.ccard.later::before { background: #fb923c; }
.ccard.critical::before { background: var(--late); }
.ccard:hover { transform: translateY(-2px); box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.35), 0 14px 30px -18px rgba(0, 0, 0, 0.8); }
.cc-top { display: flex; align-items: center; gap: 10px; }
.avatar { flex: none; width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; font-size: 12px; font-weight: 800; letter-spacing: .03em; color: #e9e5ff; background: linear-gradient(140deg, rgba(139, 92, 246, 0.55), rgba(56, 189, 248, 0.35)); }
.cc-who { min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.cc-who b { font-size: 14px; }
.cc-who .muted { font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cc-amt { margin-left: auto; font-family: var(--display); font-weight: 700; font-size: 16px; white-space: nowrap; }
.cc-work { margin: 10px 0 8px; font-size: 12.5px; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.cc-work .num { color: var(--ink-3); }
.cc-tags { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 10px; }
.chip-late { font-size: 11.5px; font-weight: 800; padding: 3px 9px; border-radius: 999px; background: var(--paid-bg); color: var(--paid); }
.chip-late.late { background: rgba(251, 191, 36, 0.14); color: #fcd34d; }
.chip-late.later { background: rgba(251, 146, 60, 0.15); color: #fdba74; }
.chip-late.critical { background: rgba(248, 113, 113, 0.16); color: #fca5a5; }
.chip-soft { font-size: 11.5px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(255, 255, 255, 0.06); color: var(--ink-2); }
.chip-soft.risk-high { color: #fca5a5; }
.chip-soft.risk-medium { color: #fcd34d; }
.tl { display: flex; flex-direction: column; gap: 3px; margin: 0 0 12px; padding-left: 2px; }
.tl-step { display: flex; align-items: center; gap: 7px; font-size: 11.5px; color: var(--ink-3); }
.tl-step i { width: 6px; height: 6px; border-radius: 50%; background: #8b93b5; }
.tl-step i.friendly { background: #fcd34d; }
.tl-step i.firm { background: #fdba74; }
.tl-step i.final { background: #fca5a5; }
.cc-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; }
.cc-link { margin-left: auto; font-size: 12px; color: #c4b5fd; text-decoration: none; }
.cc-link:hover { text-decoration: underline; }
.small { font-size: 12px; }

.sent-list { list-style: none; margin: 0; padding: 0; }
.sent-list li { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--glass-line); font-size: 14px; }
.sent-list li:last-child { border-bottom: 0; }
.sent-list li .muted:last-child { margin-left: auto; }

/* review drawer */
.cdrawer { position: fixed; inset: 0; z-index: 60; display: flex; justify-content: flex-end; }
.cdrawer.hidden { display: none; }
.cdrawer-scrim { position: absolute; inset: 0; background: rgba(3, 5, 12, 0.6); backdrop-filter: blur(3px); animation: fadeIn .2s ease; }
.cdrawer-panel { position: relative; width: min(520px, 100%); height: 100%; overflow-y: auto; padding: 22px; background: #0b1020; box-shadow: -30px 0 60px -20px rgba(0, 0, 0, 0.8), inset 1px 0 0 var(--glass-line-2); animation: slideIn .25s ease; }
.cdrawer-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 16px; }
/* slip fills the drawer */
.cdrawer-panel .slip { width: 100%; max-width: none; }
.cdrawer-panel textarea { min-height: 220px; }
@keyframes slideIn { from { transform: translateX(40px); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

@media (max-width: 1100px) { .board { grid-template-columns: repeat(2, minmax(0, 1fr)); } .col-hero { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .board { grid-template-columns: 1fr; } }
/* live PayPal status (replaces the old Sync button) */
.live-pill { display: flex; align-items: center; gap: 6px; }
.lp { display: inline-flex; align-items: center; gap: 8px; padding: 8px 13px; border-radius: 999px; font-size: 13px; color: var(--ink-2); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line-2); text-decoration: none; }
.lp.demo { color: #fde68a; box-shadow: inset 0 0 0 1px rgba(245, 158, 11, 0.3); }
.lp.demo b { color: #fcd34d; }
.lp-dot { width: 8px; height: 8px; border-radius: 50%; background: #f59e0b; }
.lp-dot.on { background: var(--paid); box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.6); animation: pulse 2s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0.55); } 70% { box-shadow: 0 0 0 8px rgba(52, 211, 153, 0); } 100% { box-shadow: 0 0 0 0 rgba(52, 211, 153, 0); } }
.lp-btn { width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; border: 0; cursor: pointer; color: var(--ink-2); background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line-2); }
.lp-btn:hover { color: #fff; }
.lp-btn.spin svg { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ================= notification centre ================= */
.bell-panel { width: 400px; max-height: 560px; }
.bell-summary { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 8px; padding: 12px 15px; border-bottom: 1px solid var(--glass-line); }
.bell-summary .bs { display: flex; flex-direction: column; gap: 2px; padding: 9px 11px; border-radius: 12px; text-decoration: none; background: rgba(255, 255, 255, 0.04); box-shadow: inset 0 0 0 1px var(--glass-line); }
.bell-summary .bs:hover { background: rgba(255, 255, 255, 0.07); }
.bell-summary .bs span { font-size: 11px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.bell-summary .bs b { font-family: var(--display); font-size: 16px; color: var(--ink); }
.bell-summary .bs b.bad { color: #fca5a5; }
.bell-summary .bs b.warn { color: #fcd34d; }
.bell-panel li.ngroup { padding: 10px 15px 4px; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); }
.bell-panel li a { align-items: flex-start; border-bottom: 0; border-radius: 12px; margin: 2px 8px; padding: 10px 10px; }
.bell-panel li.unread a { background: rgba(139, 92, 246, 0.1); }
.bell-panel li.unread a::after { content: ''; position: absolute; }
.bell-panel .ni, .note-toast .ni { flex: none; width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; font-size: 0; background: rgba(139, 92, 246, 0.16); color: #c4b5fd; }
.k-payment .ni, .ni.k-payment { background: var(--paid-bg); color: var(--paid); }
.k-overdue .ni, .ni.k-overdue { background: rgba(248, 113, 113, 0.15); color: #fca5a5; }
.k-due .ni, .ni.k-due { background: rgba(251, 191, 36, 0.14); color: #fcd34d; }
.k-import .ni, .ni.k-import { background: rgba(56, 189, 248, 0.14); color: #7dd3fc; }
.bell-panel .nt { flex: 1; min-width: 0; }
.ncta { flex: none; align-self: center; font-size: 12px; font-weight: 700; color: #c4b5fd; padding: 5px 10px; border-radius: 999px; background: rgba(139, 92, 246, 0.14); text-decoration: none; }
.bell-panel li a:hover .ncta { background: rgba(139, 92, 246, 0.28); color: #fff; }
.empty-note { text-align: center; padding: 28px 20px !important; line-height: 1.6; }
.empty-note b { color: var(--ink); }
.note-toast { display: flex; align-items: center; gap: 12px; }
.note-toast .ncta { margin-left: 6px; }
.bell.ring svg { animation: ring .9s ease; transform-origin: 50% 10%; }
@keyframes ring { 0%, 100% { transform: rotate(0); } 15% { transform: rotate(16deg); } 30% { transform: rotate(-14deg); } 45% { transform: rotate(10deg); } 60% { transform: rotate(-6deg); } 75% { transform: rotate(3deg); } }
@media (max-width: 520px) { .bell-panel { width: calc(100vw - 24px); right: -60px; } }
.pill.new { background: rgba(56, 189, 248, 0.12); color: #7dd3fc; border-color: rgba(56, 189, 248, 0.25); }
.rm-client { border: 0; background: none; color: var(--ink-3); font: inherit; font-size: 12.5px; cursor: pointer; padding: 4px 8px; border-radius: 8px; opacity: 0; transition: opacity .15s; }
tr:hover .rm-client, .rm-client:focus-visible, .rm-client.sure { opacity: 1; }
.rm-client:hover { color: #fca5a5; background: rgba(248, 113, 113, 0.1); }
.rm-client.sure { color: #fca5a5; background: rgba(248, 113, 113, 0.12); font-weight: 700; }
@media (hover: none) { .rm-client { opacity: 1; } }

/* ================= Collections v3 (Autopilot) ================= */
.coll .lede { max-width: 620px; }
.ap-toggle { display: inline-flex; align-items: center; gap: 10px; padding: 7px 16px 7px 7px; border: 0; border-radius: 999px; cursor: pointer; font: inherit; font-weight: 700; font-size: 14px; color: #d1fae5; background: rgba(16, 185, 129, 0.14); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.35); transition: all .2s; }
.ap-toggle .ap-knob { width: 38px; height: 22px; border-radius: 999px; background: var(--paid); position: relative; transition: background .2s; }
.ap-toggle .ap-knob::after { content: ''; position: absolute; top: 3px; left: 19px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: left .2s; box-shadow: 0 1px 4px rgba(0,0,0,.4); }
.ap-toggle.off { color: var(--ink-2); background: rgba(255, 255, 255, 0.05); box-shadow: inset 0 0 0 1px var(--glass-line-2); }
.ap-toggle.off .ap-knob { background: #3b4260; }
.ap-toggle.off .ap-knob::after { left: 3px; }

.coll-stats { position: relative; display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 28px; border-radius: 20px; overflow: hidden; background: var(--glass); box-shadow: inset 0 0 0 1px var(--glass-line-2); }
.cs { display: flex; flex-direction: column; gap: 3px; padding: 22px 24px 26px; border-right: 1px solid var(--glass-line); }
.cs:last-of-type { border-right: 0; }
.cs:first-child { background: linear-gradient(150deg, rgba(139, 92, 246, 0.16), transparent 70%); }
.cs-l { font-size: 12.5px; color: var(--ink-3); font-weight: 600; }
.cs-v { font-family: var(--display); font-size: clamp(22px, 2.4vw, 30px); font-weight: 700; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.cs-s { font-size: 12.5px; color: var(--ink-3); }
.cs.bad .cs-v { color: #fda4af; }
.cs-bar { position: absolute; left: 0; right: 0; bottom: 0; height: 4px; display: flex; background: rgba(255,255,255,.04); }
.cs-bar span { height: 100%; }
.sb-upcoming { background: var(--paid); } .sb-late { background: #fbbf24; } .sb-later { background: #fb923c; } .sb-critical { background: var(--late); }

.coll-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(300px, 1fr); gap: 28px; align-items: start; }
.coll-side { display: grid; gap: 18px; position: sticky; top: 84px; }
.coll-side .panel { margin: 0; padding: 20px; }
.sec-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; }
.sec-head h2 { margin: 0; font-size: 17px; }
.sec-head > .muted { font-weight: 700; font-size: 13px; padding: 1px 8px; border-radius: 999px; background: rgba(255,255,255,.06); }
.sec-head > .muted:empty { display: none; }

.attn-list { display: grid; gap: 12px; }
.acard { display: grid; grid-template-columns: 190px minmax(0, 1fr) auto; gap: 18px; align-items: start; padding: 18px; border-radius: 16px; background: rgba(255, 255, 255, 0.035); box-shadow: inset 0 0 0 1px var(--glass-line-2); position: relative; overflow: hidden; transition: box-shadow .15s, transform .15s; }
.acard::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--paid); }
.acard.s-late::before { background: #fbbf24; } .acard.s-later::before { background: #fb923c; } .acard.s-critical::before { background: var(--late); }
.acard:hover { box-shadow: inset 0 0 0 1px rgba(167, 139, 250, 0.35), 0 18px 40px -24px rgba(0, 0, 0, 0.9); }
.ac-who { display: flex; gap: 11px; align-items: center; min-width: 0; }
.ac-who > div { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.ac-who b { font-size: 15px; }
.ac-who .muted { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ac-mid { min-width: 0; display: grid; gap: 7px; }
.ac-line { display: flex; flex-wrap: wrap; gap: 6px; }
.ac-work { font-size: 13.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ac-work .num { color: var(--ink-3); }
.ac-last { font-size: 12.5px; color: var(--ink-3); }
.ac-right { display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.ac-amt { font-family: var(--display); font-size: 21px; font-weight: 700; letter-spacing: -0.01em; white-space: nowrap; }
.ac-acts { display: flex; flex-wrap: wrap; gap: 6px; justify-content: flex-end; align-items: center; }
.linkbtn.small { font-size: 12.5px; color: #c4b5fd; }

/* three-step tracker per invoice */
.trk { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(3, 1fr); position: relative; max-width: 380px; }
.trk::before { content: ''; position: absolute; top: 10px; left: 16%; right: 16%; height: 2px; background: rgba(255, 255, 255, 0.08); }
.trk li { position: relative; display: flex; flex-direction: column; align-items: center; gap: 3px; font-size: 11.5px; text-align: center; }
.t-dot { width: 21px; height: 21px; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 900; background: #161c33; box-shadow: inset 0 0 0 2px #3a4263; color: #fff; position: relative; z-index: 1; }
.t-name { font-weight: 700; color: var(--ink-2); }
.t-date { color: var(--ink-3); }
.t-done .t-dot { background: var(--paid); box-shadow: none; color: #052e1f; }
.t-waiting .t-dot { background: #8b5cf6; box-shadow: 0 0 0 4px rgba(139, 92, 246, 0.25); }
.t-due .t-dot { background: #f59e0b; color: #1f1300; box-shadow: 0 0 0 4px rgba(245, 158, 11, 0.22); }
.t-due .t-date { color: #fcd34d; font-weight: 700; }
.t-skipped { opacity: .45; }
.t-skipped .t-dot { background: transparent; }

.all-clear { display: flex; gap: 14px; align-items: center; padding: 20px; border-radius: 16px; background: rgba(16, 185, 129, 0.07); box-shadow: inset 0 0 0 1px rgba(52, 211, 153, 0.25); }
.all-clear .ac-icon { flex: none; width: 42px; height: 42px; border-radius: 12px; display: grid; place-items: center; background: var(--paid-bg); color: var(--paid); }

.track-list { border-radius: 16px; box-shadow: inset 0 0 0 1px var(--glass-line); overflow: hidden; }
.trow { display: grid; grid-template-columns: 30px minmax(0, 1.3fr) 96px minmax(0, 1.5fr) 80px auto; gap: 14px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--glass-line); font-size: 13.5px; }
.trow:last-child { border-bottom: 0; }
.trow:hover { background: rgba(255, 255, 255, 0.025); }
.avatar.sm { width: 28px; height: 28px; border-radius: 8px; font-size: 10.5px; }
.tr-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.tr-who .muted { font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-due { color: var(--paid); font-weight: 700; font-size: 12.5px; }
.tr-next { font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tr-amt { font-weight: 800; text-align: right; font-variant-numeric: tabular-nums; }

/* autopilot plan card */
.ap-steps { list-style: none; margin: 0; padding: 0; display: grid; gap: 0; position: relative; }
.ps { display: flex; gap: 12px; padding: 0 0 16px; position: relative; }
.ps:not(:last-child)::before { content: ''; position: absolute; left: 6px; top: 16px; bottom: 0; width: 2px; background: rgba(255,255,255,.08); }
.ps-dot { flex: none; width: 14px; height: 14px; margin-top: 3px; border-radius: 50%; background: #fcd34d; box-shadow: 0 0 0 4px rgba(252, 211, 77, 0.14); }
.firm .ps-dot { background: #fb923c; box-shadow: 0 0 0 4px rgba(251, 146, 60, 0.15); }
.final .ps-dot { background: #f87171; box-shadow: 0 0 0 4px rgba(248, 113, 113, 0.15); }
.ps > div { display: flex; flex-direction: column; gap: 4px; font-size: 13px; color: var(--ink-2); }
.ps b { color: var(--ink); font-size: 14px; }
.ps em { font-style: normal; color: var(--ink); font-weight: 700; }
.ps input[type=number] { width: 52px; padding: 3px 6px; margin-right: 4px; border-radius: 8px; border: 1px solid var(--glass-line-2); background: rgba(6, 9, 20, 0.6); color: var(--ink); font: inherit; font-weight: 800; text-align: center; }
.ps input[type=number]:focus { outline: none; border-color: #a78bfa; }
.ps-fee { display: flex; align-items: center; gap: 7px; font-size: 12.5px; color: var(--ink-2); cursor: pointer; }
.saved { margin-left: auto; color: var(--paid) !important; font-size: 12px; }

.upcoming { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.up-date { display: block; font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); margin-bottom: 6px; }
.up-day ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.up-item { display: flex; gap: 10px; font-size: 13px; line-height: 1.4; }
.up-item .ps-dot { width: 10px; height: 10px; margin-top: 5px; }
.up-item.firm .ps-dot { background: #fb923c; } .up-item.final .ps-dot { background: #f87171; }
.up-item .muted { font-size: 12px; }

@media (max-width: 1100px) { .coll-grid { grid-template-columns: 1fr; } .coll-side { position: static; } .coll-stats { grid-template-columns: repeat(2, 1fr); } .cs:nth-child(2) { border-right: 0; } }
@media (max-width: 760px) { .acard { grid-template-columns: 1fr; } .ac-right { align-items: flex-start; } .ac-acts { justify-content: flex-start; } .trow { grid-template-columns: 28px minmax(0, 1fr) auto; } .tr-next, .tr-due { display: none; } }
@media (max-width: 760px) { .trow .linkbtn { display: none; } }
.mark-paid.sure { color: #052e1f !important; background: var(--paid) !important; box-shadow: none !important; font-weight: 800; }
.row-acts { display: flex; gap: 10px; justify-content: flex-end; align-items: center; }
.paid-form { display: grid; gap: 4px; margin: 0 0 22px; padding: 14px; border-radius: 12px; background: rgba(255,255,255,.03); box-shadow: inset 0 0 0 1px var(--glass-line); font-size: 13px; }
.pf-row { display: flex; gap: 8px; margin-top: 8px; flex-wrap: wrap; }
.pf-row select, .pf-row input { padding: 6px 9px; border-radius: 8px; border: 1px solid var(--glass-line-2); background: rgba(0,0,0,.25); color: var(--ink); font-size: 13px; }

/* =====================================================================
   v4 "Studio" theme: neutral near-black, quiet cards, left sidebar.
   (Overrides the earlier aurora theme; class names are unchanged.)
   ===================================================================== */
:root {
  --bg: #09090b;
  --bg-2: #0e0e11;
  --surface: #111113;
  --surface-2: #17171a;
  --glass: #111113;
  --glass-2: #18181b;
  --glass-line: #1f1f23;
  --glass-line-2: #2a2a30;
  --ink: #f4f4f5;
  --ink-2: #a1a1aa;
  --ink-3: #8a8a93;
  --rule: rgba(255, 255, 255, 0.08);
  --display: var(--font);
  --grad: linear-gradient(180deg, #fafafa, #e4e4e7);
  --grad-text: linear-gradient(100deg, #ffffff, #d4d4d8);
  --accent: #a78bfa;
  --radius-lg: 14px;
  --radius-sm: 9px;
  --sbw: 252px;
}
body { font-size: 14.5px; background: var(--bg); }
body::before { display: none; }
a { color: #d4d4d8; }
a:hover { color: #fff; }
::selection { background: rgba(167, 139, 250, 0.35); }
:focus-visible { outline: 2px solid #a1a1aa; outline-offset: 2px; }
h1 { font-family: var(--font); font-size: 24px; font-weight: 700; letter-spacing: -0.025em; margin: 0 0 6px; }
h2 { font-size: 15px; font-weight: 700; letter-spacing: -0.01em; }
.lede { color: var(--ink-3); font-size: 14px; }
.muted { color: var(--ink-3); }

/* cards */
.panel, .chat, .fig, .figures { background: var(--surface); border: 1px solid var(--glass-line); backdrop-filter: none; -webkit-backdrop-filter: none; box-shadow: none; }
.panel { border-radius: var(--radius-lg); padding: 20px 22px; }

/* buttons: white primary, quiet secondary */
.btn { background: #fafafa; color: #09090b; box-shadow: none; font-weight: 700; border-radius: var(--radius-sm); padding: 9px 16px; }
.btn:hover { filter: none; background: #e4e4e7; color: #09090b; }
.btn.ghost { background: var(--surface-2); color: var(--ink); box-shadow: inset 0 0 0 1px var(--glass-line-2); }
.btn.ghost:hover { background: #1f1f23; color: #fff; }
.btn.danger { background: #f43f5e; color: #fff; box-shadow: none; }
.btn.small { padding: 6px 11px; font-size: 12.5px; border-radius: 8px; }
.linkbtn { color: #d4d4d8; text-decoration: underline; text-decoration-color: #52525b; text-underline-offset: 3px; }
.linkbtn:hover { color: #fff; }
.seg { border-color: var(--glass-line-2); }
.seg button[aria-pressed=true] { background: #27272a; color: #fff; }
input[type=search], .table-tools input[type=search] { background: var(--surface-2) !important; border-color: var(--glass-line-2) !important; }

/* ---------------- app shell ---------------- */
body.shell main, body.shell .topbar, body.shell .nudge { margin-left: var(--sbw); transition: margin-left .2s ease; }
body.shell.sb-collapsed { --sbw: 68px; }
body.shell main { max-width: none; padding: 26px 34px 60px; }
body.shell main > * { max-width: 1280px; margin-left: auto; margin-right: auto; }
body.shell main.workspace { max-width: none; }

.sidebar { position: fixed; z-index: 40; top: 0; left: 0; bottom: 0; width: var(--sbw); display: flex; flex-direction: column; gap: 4px; padding: 14px 12px; background: #0b0b0d; border-right: 1px solid var(--glass-line); transition: width .2s ease, transform .25s ease; overflow-x: hidden; overflow-y: auto; overscroll-behavior: contain; scrollbar-width: thin; scrollbar-color: #2a2a30 transparent; }
.sidebar > * { flex-shrink: 0; }
.sidebar > .sb-fill { flex: 1 0 8px; }
.sidebar::-webkit-scrollbar { width: 6px; }
.sidebar::-webkit-scrollbar-thumb { background: #2a2a30; border-radius: 3px; }
.sb-top { display: flex; align-items: center; justify-content: space-between; padding: 2px 4px 10px; }
.sidebar .brand { gap: 10px; min-width: 0; }
.sidebar .brand svg { width: 30px; height: 30px; filter: none; }
.sidebar .wordmark { font-family: 'Unbounded', var(--font); font-size: 18px; background: var(--grad-text); -webkit-background-clip: text; background-clip: text; color: transparent; }
.sb-icon { width: 32px; height: 32px; flex: none; display: grid; place-items: center; border: 0; border-radius: 8px; background: transparent; color: var(--ink-3); cursor: pointer; }
.sb-icon:hover { background: var(--surface-2); color: #fff; }
.sb-search { display: flex; align-items: center; gap: 9px; width: 100%; padding: 8px 10px; margin: 2px 0 4px; border-radius: 9px; border: 1px solid var(--glass-line-2); background: var(--surface); color: var(--ink-3); font-size: 13.5px; cursor: pointer; text-align: left; }
.sb-search:hover { border-color: #3f3f46; color: var(--ink-2); }
.sb-search kbd, .cmdk kbd { margin-left: auto; font: 600 11px var(--font); color: var(--ink-3); padding: 2px 6px; border-radius: 6px; background: #1c1c20; border: 1px solid var(--glass-line-2); }
.sb-new { display: flex; align-items: center; gap: 9px; padding: 9px 10px; margin: 2px 0 8px; border-radius: 9px; background: #fafafa; color: #09090b; font-weight: 700; font-size: 13.5px; text-decoration: none; }
.sb-new:hover { background: #e4e4e7; color: #09090b; }
.sb-label { padding: 14px 10px 6px; font-size: 11.5px; font-weight: 600; color: #5d5d66; }
.sb-nav { display: flex; flex-direction: column; gap: 2px; }
.sb-link { position: relative; display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; border: 0; border-radius: 8px; background: none; color: var(--ink-2); font: 500 14px var(--font); text-decoration: none; cursor: pointer; text-align: left; }
.sb-link svg { flex: none; color: #8b8b94; }
.sb-link:hover { background: #151518; color: #fff; }
.sb-link[aria-current=page] { background: #1b1b1f; color: #fff; box-shadow: inset 0 0 0 1px #26262b; }
.sb-link[aria-current=page] svg { color: #fff; }
.sb-badge { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 800; background: #fafafa; color: #09090b; }
.sb-fill { flex: 1; }
.sb-card { display: block; margin: 8px 0; padding: 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--glass-line); text-decoration: none; color: var(--ink-2); font-size: 12.5px; line-height: 1.45; }
.sb-card:hover { border-color: #33333a; color: var(--ink-2); }
.sb-card-h { display: flex; align-items: center; gap: 7px; color: var(--ink); font-weight: 700; font-size: 13px; margin-bottom: 4px; }
.sb-card-h i { margin-left: auto; width: 8px; height: 8px; border-radius: 50%; background: #52525b; }
.sb-card-h i.on { background: var(--paid); box-shadow: 0 0 0 3px rgba(52, 211, 153, 0.18); }
.sb-card-b { display: block; color: var(--ink-3); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 9px 8px; margin-top: 4px; border-radius: 10px; text-decoration: none; border: 1px solid var(--glass-line); background: var(--surface); }
.sb-user:hover { border-color: #33333a; }
.sb-avatar { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; font-size: 12px; font-weight: 800; color: #09090b; background: linear-gradient(135deg, #e9d5ff, #a5b4fc); }
.sb-user-t { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.sb-user-t b { color: var(--ink); font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-user-t span { color: var(--ink-3); font-size: 11.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-text { white-space: nowrap; }

/* collapsed: icons only, labels as tooltips */
body.sb-collapsed .sb-text, body.sb-collapsed .sb-label, body.sb-collapsed .sb-card-b { display: none; }
body.sb-collapsed .sb-top { flex-direction: column; gap: 8px; }
body.sb-collapsed .sb-search, body.sb-collapsed .sb-new, body.sb-collapsed .sb-link, body.sb-collapsed .sb-user { justify-content: center; padding-left: 0; padding-right: 0; }
body.sb-collapsed .sb-card { padding: 10px 0; display: flex; justify-content: center; }
body.sb-collapsed .sb-card-h { margin: 0; }
body.sb-collapsed .sb-card-h i { display: none; }
body.sb-collapsed .sb-badge { position: absolute; top: 2px; right: 6px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; }
body.sb-collapsed [data-tip]:hover::after { content: attr(data-tip); position: fixed; left: 74px; margin-top: 0; padding: 5px 9px; border-radius: 7px; background: #fafafa; color: #09090b; font-size: 12px; font-weight: 700; white-space: nowrap; z-index: 60; pointer-events: none; }
body.sb-collapsed .sidebar { overflow-x: hidden; overflow-y: auto; }

/* top bar */
body.shell .topbar { position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 14px; padding: 10px 34px; background: rgba(9, 9, 11, 0.82); backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px); border-bottom: 1px solid var(--glass-line); }
.crumb { display: flex; align-items: center; gap: 8px; font-size: 13.5px; min-width: 0; }
.crumb .sep { color: #3f3f46; }
.crumb b { font-weight: 600; }
body.shell .modes { margin-left: auto; gap: 8px; }
body.shell .mode { border-color: var(--glass-line-2); background: var(--surface); color: var(--ink-2); font-size: 12.5px; display: inline-flex; align-items: center; gap: 7px; }
body.shell .mode .dot { width: 7px; height: 7px; border-radius: 50%; background: #f59e0b; }
body.shell .mode.ok { color: var(--ink-2); border-color: var(--glass-line-2); }
body.shell .mode.ok .dot { background: var(--paid); }
body.shell .mode.warn { color: #fcd34d; }
body.shell .bell { width: 34px; height: 32px; border-color: var(--glass-line-2); background: var(--surface); border-radius: 9px; }
.mobile-only { display: none; }
body.shell .nudge { width: auto; max-width: none; margin: 12px 34px 0 calc(var(--sbw) + 34px); }
.sb-scrim { display: none; }

@media (max-width: 900px) {
  body.shell main, body.shell .topbar { margin-left: 0; }
  body.shell .nudge { margin-left: 16px; margin-right: 16px; }
  body.shell main { padding: 18px 16px 50px; }
  body.shell .topbar { padding: 10px 14px; }
  .sidebar { transform: translateX(-100%); width: 272px; box-shadow: 20px 0 60px rgba(0,0,0,.6); }
  body.sb-open .sidebar { transform: none; }
  body.sb-open .sb-scrim { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0,0,0,.55); }
  body.sb-collapsed .sb-text, body.sb-collapsed .sb-label, body.sb-collapsed .sb-card-b { display: initial; }
  .mobile-only { display: grid; }
  .crumb .muted, .crumb .sep { display: none; }
  .live-clock { display: none !important; }
}

/* ---------------- search palette ---------------- */
#cmdk { position: fixed; inset: 0; z-index: 90; }
.cmdk-scrim { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.6); backdrop-filter: blur(2px); }
.cmdk { position: relative; width: min(620px, calc(100vw - 24px)); margin: 12vh auto 0; border-radius: 14px; background: #121214; border: 1px solid #2a2a30; box-shadow: 0 40px 100px -20px rgba(0,0,0,.9); overflow: hidden; animation: fadeIn .15s ease; }
.cmdk-in { display: flex; align-items: center; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--glass-line); color: var(--ink-3); }
.cmdk-in input { flex: 1; border: 0; background: none; color: var(--ink); font-size: 15.5px; outline: none; }
.cmdk-list { max-height: 420px; overflow-y: auto; padding: 6px; }
.cmdk-sec { padding: 10px 10px 4px; font-size: 11.5px; font-weight: 600; color: #5d5d66; }
.cmdk-item { display: flex; align-items: center; gap: 11px; padding: 9px 10px; border-radius: 8px; color: var(--ink-2); text-decoration: none; font-size: 14px; }
.cmdk-item svg { color: #8b8b94; flex: none; }
.cmdk-item em { margin-left: auto; font-style: normal; font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.cmdk-item.sel, .cmdk-item:hover { background: #1d1d21; color: #fff; }

/* ---------------- component touch-ups for the new theme ---------------- */
.fig:first-child { background: var(--surface); }
.fig:first-child .v { background: none; -webkit-background-clip: initial; background-clip: initial; color: var(--ink); }
.fig .v { font-family: var(--font); font-weight: 700; letter-spacing: -0.03em; }
button.fig.active { background-color: #18181b; box-shadow: inset 0 -2px 0 #fafafa; }
.msg.user { background: #fafafa; color: #09090b; }
.msg.bot { background: var(--surface-2); border-color: var(--glass-line); }
.chip { background: var(--surface-2); border-color: var(--glass-line-2); color: var(--ink-2); }
.chip:hover { border-color: #52525b; background: #1f1f23; color: #fff; }
.composer textarea { background: var(--surface-2); border-color: var(--glass-line-2); }
.composer textarea:focus { border-color: #52525b; box-shadow: none; }
.share i { background: #d4d4d8; }
.rank.first { background: #fafafa; color: #09090b; box-shadow: none; }
.bell-panel { background: #121214; border-color: #2a2a30; backdrop-filter: none; }
.toast, .note-toast { background: #fafafa !important; color: #09090b !important; border: 0 !important; }
.note-toast b { color: #09090b !important; }
.cs:first-child, .col-hero, .w-card { background: var(--surface); }
.coll-stats, .cs { background: var(--surface); }
.ap-toggle { color: #d1fae5; }
.acard, .bcol, .ccard, .track-list { background: var(--surface); box-shadow: inset 0 0 0 1px var(--glass-line); }
.avatar { background: linear-gradient(135deg, #3f3f46, #27272a); color: #f4f4f5; }
.cdrawer-panel, .drawer { background: #0f0f11 !important; }
.ac-amt, .cs-v, .ch-big, .slip-kind, .total b, .dr-amt { font-family: var(--font) !important; }
.slip { box-shadow: 0 20px 50px -24px rgba(0, 0, 0, 0.9); }
.sb-card-b { white-space: normal !important; }
.ap-mini { display: grid; gap: 10px; text-decoration: none; color: var(--ink-2); }
.ap-mini:hover { border-color: #33333a; color: var(--ink-2); }
.apm-h { display: flex; align-items: center; justify-content: space-between; }
.apm-h b { color: var(--ink); font-size: 15px; }
.apm-h .muted { font-size: 12.5px; }
.apm-steps { display: grid; gap: 6px; font-size: 13px; }
.apm-steps span { display: flex; align-items: center; gap: 8px; }
.apm-steps i { width: 8px; height: 8px; border-radius: 50%; background: #fcd34d; }
.apm-steps .firm i { background: #fb923c; } .apm-steps .final i { background: #f87171; }

/* ================= Settings v2 ================= */
.set-layout { display: grid; grid-template-columns: 190px minmax(0, 1fr); gap: 32px; align-items: start; }
.set-nav { position: sticky; top: 76px; display: flex; flex-direction: column; gap: 2px; }
.set-nav a { padding: 7px 11px; border-radius: 8px; color: var(--ink-3); text-decoration: none; font-size: 14px; font-weight: 500; }
.set-nav a:hover { color: #fff; background: #141417; }
.set-nav a[aria-current] { color: #fff; background: #1b1b1f; box-shadow: inset 0 0 0 1px #26262b; }
.set-body { display: grid; gap: 18px; max-width: 820px; }
.set-sec { padding: 0 !important; scroll-margin-top: 76px; overflow: hidden; }
.set-h { padding: 20px 22px 16px; border-bottom: 1px solid var(--glass-line); }
.set-h h2 { margin: 0 0 4px; font-size: 16px; }
.set-h p { margin: 0; color: var(--ink-3); font-size: 13.5px; max-width: 62ch; }
.set-h.with-toggle { display: flex; gap: 20px; align-items: flex-start; justify-content: space-between; }
.set-row { display: grid; grid-template-columns: minmax(180px, 0.9fr) minmax(0, 1.3fr); gap: 18px; align-items: center; padding: 14px 22px; border-bottom: 1px solid var(--glass-line); }
.set-row.top { align-items: start; }
.set-row > label, .set-row .lbl { display: flex; flex-direction: column; gap: 2px; font-size: 14px; font-weight: 600; color: var(--ink); }
.set-row > label span, .set-row .lbl span { font-weight: 400; font-size: 12.5px; color: var(--ink-3); }
.set-row input:not([type=checkbox]):not([type=radio]), .set-row select, .set-row textarea { width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--glass-line-2); background: #0c0c0e; color: var(--ink); font: inherit; font-size: 14px; }
.set-row input:focus, .set-row select:focus, .set-row textarea:focus { outline: none; border-color: #52525b; box-shadow: 0 0 0 3px rgba(161, 161, 170, 0.12); }
.set-row textarea { resize: vertical; }
.with-unit { display: flex; align-items: center; gap: 8px; max-width: 200px; }
.with-unit span { color: var(--ink-3); font-size: 13px; }
.set-foot { display: flex; align-items: center; justify-content: flex-end; gap: 10px; padding: 14px 22px; background: #0e0e10; }
.set-ok { margin-right: auto; font-size: 13px; color: var(--paid); }
.set-ok.err { color: #fca5a5; }
form.dirty .set-foot .btn[type=submit] { box-shadow: 0 0 0 3px rgba(250, 250, 250, 0.12); }
.set-sec .ap-steps { padding: 18px 22px 4px; }
.set-sec.ap-off .ap-steps { opacity: .45; }
.set-sec #ppStatus { padding: 16px 22px 0; }
.set-status { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; background: #0c0c0e; border: 1px solid var(--glass-line); }
.set-status .dot { width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; background: #f59e0b; flex: none; }
.set-status.on .dot { background: var(--paid); box-shadow: 0 0 0 4px rgba(52, 211, 153, 0.15); }
.set-status div { display: flex; flex-direction: column; gap: 2px; }
.set-status span { color: var(--ink-3); font-size: 13px; }
.set-facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(170px, 100%), 1fr)); gap: 0; margin: 0; padding: 16px 22px; }
.set-facts:empty { display: none; }
.set-facts div { padding: 8px 0; }
.set-facts dt { font-size: 12px; color: var(--ink-3); }
.set-facts dd { margin: 2px 0 0; font-weight: 700; font-size: 14px; }
.set-foot:empty { display: none; }
.switch-row { cursor: pointer; }
input.switch { appearance: none; -webkit-appearance: none; justify-self: end; width: 40px; height: 23px; border-radius: 999px; background: #3f3f46; position: relative; cursor: pointer; transition: background .15s; }
input.switch::after { content: ''; position: absolute; top: 3px; left: 3px; width: 17px; height: 17px; border-radius: 50%; background: #fff; transition: left .15s; }
input.switch:checked { background: var(--paid); }
input.switch:checked::after { left: 20px; }
.style-cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.sc { display: flex; flex-direction: column; gap: 4px; padding: 12px; border-radius: 11px; border: 1px solid var(--glass-line-2); background: #0c0c0e; cursor: pointer; font-size: 12.5px; color: var(--ink-3); }
.sc input { position: absolute; opacity: 0; pointer-events: none; }
.sc b { color: var(--ink); font-size: 14px; }
.sc:has(input:checked) { border-color: #a1a1aa; background: #18181b; box-shadow: 0 0 0 3px rgba(161, 161, 170, 0.12); }
.mail-preview { margin: 0 22px 20px; padding: 16px; border-radius: 12px; background: #fafafa; color: #18181b; font-size: 14px; line-height: 1.55; }
.mail-preview .mp-head { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 10px; font-size: 12px; }
.mail-preview .muted { color: #71717a; }
.mail-preview p { margin: 8px 0 0; }
.data-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; padding: 4px 22px 22px; }
.dact { display: flex; flex-direction: column; gap: 3px; padding: 14px; border-radius: 12px; border: 1px solid var(--glass-line-2); background: #0c0c0e; color: var(--ink); text-decoration: none; text-align: left; cursor: pointer; font: inherit; }
.dact:hover { border-color: #52525b; color: #fff; }
.dact:disabled { opacity: .5; cursor: default; }
.dact b { font-size: 14px; }
.dact span { font-size: 12.5px; color: var(--ink-3); }
.dact.danger b { color: #fca5a5; }
@media (max-width: 900px) { .set-layout { grid-template-columns: 1fr; } .set-nav { position: static; flex-direction: row; overflow-x: auto; } .set-row { grid-template-columns: 1fr; gap: 8px; } .style-cards, .data-actions { grid-template-columns: 1fr; } }

/* ================= Calendar ================= */
.cal-stats, .an-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.cal-stats .cs, .an-kpis .cs { border: 1px solid var(--glass-line); border-radius: 14px; padding: 16px 18px; }
.cal-stats .cs-v, .an-kpis .cs-v { font-size: 22px; }
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.cal-panel { padding: 16px !important; }
.cal-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.cal-nav { display: flex; align-items: center; gap: 6px; }
.cal-nav h2 { margin: 0 6px; min-width: 150px; text-align: center; font-size: 16px; }
.cal-nav .sb-icon { font-size: 20px; border: 1px solid var(--glass-line-2); }
.cal-filters { display: flex; flex-wrap: wrap; gap: 6px; }
.cal-filters button { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border-radius: 999px; border: 1px solid var(--glass-line-2); background: transparent; color: var(--ink-3); font-size: 12.5px; cursor: pointer; }
.cal-filters button[aria-pressed=true] { color: var(--ink); background: #18181b; }
.cal-filters i { width: 8px; height: 8px; border-radius: 50%; }
.k-due { --k: #fbbf24; } .k-overdue { --k: #f87171; } .k-paid { --k: #34d399; } .k-planned { --k: #a78bfa; } .k-reminded { --k: #60a5fa; } .k-recurring { --k: #a1a1aa; }
.cal-filters i, .cd-dot { background: var(--k); }
.cal-dow { display: grid; grid-template-columns: repeat(7, 1fr); padding: 0 2px 6px; font-size: 11.5px; font-weight: 600; color: var(--ink-3); }
.cal-dow span { padding-left: 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; background: var(--glass-line); border: 1px solid var(--glass-line); border-radius: 12px; overflow: hidden; }
.cal-cell { min-height: 112px; display: flex; flex-direction: column; gap: 3px; padding: 7px; background: var(--surface); border: 0; text-align: left; font: inherit; color: var(--ink); cursor: pointer; min-width: 0; }
.cal-cell.pad { background: #0d0d0f; cursor: default; }
.cal-cell:hover:not(.pad) { background: #151518; }
.cal-cell.past .cal-n { color: var(--ink-3); }
.cal-cell.sel { background: #18181b; box-shadow: inset 0 0 0 1.5px #a1a1aa; }
.cal-n { display: flex; align-items: center; justify-content: space-between; font-size: 12.5px; font-weight: 700; margin-bottom: 2px; }
.cal-n em { font-style: normal; font-size: 11px; color: var(--paid); font-weight: 700; }
.cal-cell.today .cal-n { color: #09090b; }
.cal-cell.today .cal-n::before { content: ''; }
.cal-cell.today .cal-n { position: relative; }
.cal-cell.today .cal-n > :first-child { }
.cal-cell.today { background: #141416; }
.cal-cell.today .cal-n { color: var(--ink); }
.cal-cell.today .cal-n::after { content: 'Today'; font-size: 10px; font-weight: 800; color: #09090b; background: #fafafa; padding: 1px 6px; border-radius: 999px; margin-left: auto; }
.cal-cell.today .cal-n em { order: 3; margin-left: 6px; }
.cal-ev { display: block; font-size: 11px; line-height: 1.35; padding: 2px 6px; border-radius: 5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink); background: color-mix(in srgb, var(--k) 16%, transparent); box-shadow: inset 2px 0 0 var(--k); }
.cal-more { font-size: 11px; color: var(--ink-3); padding-left: 4px; }
.cal-day { position: sticky; top: 76px; padding: 18px !important; }
.cd-h h2 { margin: 2px 0 14px; font-size: 16px; }
.cd-h .muted { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; }
.cd-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.cd-list li { display: flex; gap: 11px; }
.cd-dot { flex: none; width: 9px; height: 9px; margin-top: 6px; border-radius: 50%; }
.cd-body { display: flex; flex-direction: column; gap: 2px; font-size: 13.5px; min-width: 0; }
.cd-body > span { color: var(--ink-2); }
.cd-acts { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; margin-top: 6px; }
.cd-empty { padding: 24px 8px; text-align: center; color: var(--ink-3); font-size: 13.5px; border: 1px dashed var(--glass-line-2); border-radius: 12px; }
@media (max-width: 1100px) { .cal-layout { grid-template-columns: 1fr; } .cal-day { position: static; } .cal-stats, .an-kpis { grid-template-columns: repeat(2, 1fr); } }
@media (max-width: 640px) { .cal-cell { min-height: 64px; padding: 5px; } .cal-ev { font-size: 0; height: 6px; padding: 0; border-radius: 3px; background: var(--k); box-shadow: none; } .cal-more { display: none; } }

/* ================= Analytics ================= */
.an-kpis .kpi { display: flex; flex-direction: column; gap: 4px; background: var(--surface); }
.kpi-top { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.an-kpis .cs-v small { font-size: 14px; color: var(--ink-3); font-weight: 600; }
.dl { font-size: 11.5px; font-weight: 700; padding: 2px 7px; border-radius: 999px; white-space: nowrap; }
.dl.up { color: #34d399; background: rgba(52, 211, 153, 0.12); }
.dl.down { color: #f87171; background: rgba(248, 113, 113, 0.12); }
.dl.flat { color: var(--ink-3); background: #1c1c20; }
.dl.none { color: var(--ink-3); font-weight: 500; padding: 0; }
.an-trend { margin-bottom: 18px; }
.an-trend-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.an-big { font-size: 26px; font-weight: 700; letter-spacing: -0.02em; margin-top: 2px; }
.an-big .small { font-weight: 500; letter-spacing: 0; }
.small-seg button { padding: 5px 11px !important; font-size: 12.5px !important; }
.an-chart { position: relative; height: 280px; }
.an-chart svg { width: 100%; height: 100%; display: block; }
.an-tip { position: absolute; z-index: 2; display: flex; flex-direction: column; gap: 1px; padding: 8px 11px; border-radius: 10px; background: #18181b; border: 1px solid #2f2f35; font-size: 12px; pointer-events: none; white-space: nowrap; box-shadow: 0 10px 30px -10px rgba(0,0,0,.8); }
.an-tip b { font-size: 15px; }
.an-xpill { position: absolute; bottom: 2px; transform: translateX(-50%); padding: 3px 10px; border-radius: 999px; background: #fafafa; color: #09090b; font-size: 11.5px; font-weight: 800; pointer-events: none; }
.an-grid3 { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 18px; }
.stack-bar { display: flex; height: 12px; border-radius: 999px; overflow: hidden; gap: 3px; background: #1c1c20; margin-bottom: 14px; }
.stack-bar span { height: 100%; border-radius: 999px; }
.dist { list-style: none; margin: 0; padding: 0; display: grid; gap: 9px; font-size: 13.5px; }
.dist li { display: grid; grid-template-columns: 10px 1fr auto 44px; gap: 10px; align-items: center; }
.dist i { width: 9px; height: 9px; border-radius: 50%; }
.dist em, .hbars em { font-style: normal; color: var(--ink-3); text-align: right; font-size: 12.5px; }
.hbars { list-style: none; margin: 0; padding: 0; display: grid; gap: 11px; font-size: 13.5px; }
.hbars li { display: grid; grid-template-columns: 100px 1fr 84px 30px; gap: 10px; align-items: center; }
.hbars.svc li { grid-template-columns: minmax(140px, 1.2fr) 2fr 100px 36px; }
.hbars li > span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; color: var(--ink-2); }
.hbars div { height: 8px; border-radius: 999px; background: #1c1c20; overflow: hidden; }
.hbars i { display: block; height: 100%; border-radius: 999px; background: #d4d4d8; min-width: 2px; }
.hbars b { text-align: right; font-variant-numeric: tabular-nums; }
.an-insights ul { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.an-insights li { position: relative; padding: 10px 12px 10px 34px; border-radius: 10px; background: #0d0d0f; border: 1px solid var(--glass-line); font-size: 13.5px; line-height: 1.45; color: var(--ink-2); }
.an-insights li::before { content: ''; position: absolute; left: 13px; top: 15px; width: 8px; height: 8px; border-radius: 2px; transform: rotate(45deg); background: #a78bfa; }
.an-table td { vertical-align: middle; }
.share-bar { display: inline-block; width: 70px; height: 6px; border-radius: 999px; background: #1c1c20; overflow: hidden; vertical-align: middle; margin-right: 6px; }
.share-bar i { display: block; height: 100%; background: #d4d4d8; }
.ok-t { color: var(--paid); } .warn-t { color: #fcd34d; } .bad-t { color: #fca5a5; }
@media (max-width: 1100px) { .an-grid3 { grid-template-columns: 1fr; } }
.wordmark { font-family: 'Unbounded', var(--font) !important; }
.w-hero h1 { font-family: var(--font); }
.w-hero h1 em { background: linear-gradient(100deg, #c4b5fd 0%, #a5b4fc 45%, #7dd3fc 100%) !important; -webkit-background-clip: text !important; background-clip: text !important; color: transparent !important; }
.w-card .btn:not(.ghost) { background: #fafafa; color: #09090b; }

/* =====================================================================
   v5 refinement: Geist type, calmer weights, softer colour, wider pages
   ===================================================================== */
@font-face { font-family: 'Geist'; font-weight: 400; font-display: swap; src: url('/fonts/Geist-Regular.woff2') format('woff2'); }
@font-face { font-family: 'Geist'; font-weight: 500; font-display: swap; src: url('/fonts/Geist-Medium.woff2') format('woff2'); }
@font-face { font-family: 'Geist'; font-weight: 600; font-display: swap; src: url('/fonts/Geist-SemiBold.woff2') format('woff2'); }
@font-face { font-family: 'Geist'; font-weight: 700; font-display: swap; src: url('/fonts/Geist-Bold.woff2') format('woff2'); }
@font-face { font-family: 'Geist Mono'; font-weight: 500; font-display: swap; src: url('/fonts/geist-mono-500.woff2') format('woff2'); }
:root {
  --font: 'Geist', ui-sans-serif, system-ui, -apple-system, 'Segoe UI', sans-serif;
  --mono: 'Geist Mono', ui-monospace, 'SFMono-Regular', Menlo, monospace;
  --display: var(--font);
  --ink: #ededef;
  --ink-2: #a1a1a9;
  --ink-3: #6e6e77;
  --paid: #5ccf9e;
  --paid-bg: rgba(92, 207, 158, 0.1);
  --due: #d9b25c;
  --due-bg: rgba(217, 178, 92, 0.1);
  --late: #e58a8a;
  --late-bg: rgba(229, 138, 138, 0.1);
}
html { -webkit-text-size-adjust: 100%; }
body { font-family: var(--font); font-size: 14px; line-height: 1.5; letter-spacing: -0.006em; color: var(--ink); font-feature-settings: 'ss01', 'cv11'; }
button, input, select, textarea { font-family: var(--font); letter-spacing: inherit; }
b, strong { font-weight: 600; }
h1 { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.2; }
h2 { font-size: 14.5px; font-weight: 600; letter-spacing: -0.012em; }
h3 { font-weight: 600; }
.lede { font-size: 13.5px; color: var(--ink-3); }
.num, .cs-v, .fig .v, .ac-amt, .amt, .an-big, .total b, .tr-amt, .dr-amt, table.data td.num, table.data td.r { font-variant-numeric: tabular-nums; }
.cs-v, .fig .v, .ac-amt, .an-big, .dr-amt, .total b, .ch-big { font-weight: 600 !important; letter-spacing: -0.03em !important; }
.fig .v { font-size: 26px; }
.fig:first-child .v { font-size: 32px; }
.cs-v { font-size: 26px; }
.btn { font-weight: 500; letter-spacing: -0.005em; }
.btn.small { font-weight: 500; }
.sb-link { font-weight: 450; font-size: 13.5px; }
.sb-new, .sb-search { font-size: 13px; font-weight: 500; }
.sb-label { font-weight: 500; letter-spacing: 0; }
.pill { font-weight: 500; font-size: 11.5px; padding: 2px 9px; border: 1px solid transparent; }
.pill.PAID, .pill.MARKED_AS_PAID, .pill.none, .pill.low, .pill.PARTIALLY_PAID { background: var(--paid-bg); color: var(--paid); border-color: rgba(92, 207, 158, 0.18); }
.pill.SENT, .pill.UNPAID, .pill.medium, .pill.friendly { background: var(--due-bg); color: var(--due); border-color: rgba(217, 178, 92, 0.18); }
.pill.OVERDUE, .pill.high, .pill.final { background: var(--late-bg); color: var(--late); border-color: rgba(229, 138, 138, 0.2); }
.pill.firm { background: rgba(224, 150, 100, 0.1); color: #e0a070; border-color: rgba(224, 150, 100, 0.2); }
.pill.CANCELLED, .pill.DRAFT, .pill.new { background: #18181b; color: var(--ink-2); border-color: #26262b; }
table.data th { font-weight: 500; font-size: 12px; color: var(--ink-3); }
table.data td { font-size: 13.5px; }
.fig .k, .cs-l { font-weight: 500; }
.fig.late .v, .cs.bad .cs-v { color: var(--late); }
.muted { color: var(--ink-3); }
.wordmark { font-family: var(--font) !important; font-weight: 600; font-size: 17px !important; letter-spacing: -0.04em; background: none !important; -webkit-text-fill-color: currentColor; color: #fafafa !important; }
.wordmark span { color: #8b8b94; }
.sidebar .brand svg { width: 28px; height: 28px; }
.sb-avatar { background: linear-gradient(145deg, #3a3a40, #18181b); color: #fafafa; box-shadow: inset 0 0 0 1px rgba(255,255,255,.12); }

/* wider, airier pages */
body.shell main { padding: 30px 44px 72px; }
body.shell main > * { max-width: 1520px; }
body.shell .topbar { padding: 10px 44px; }
.panel { padding: 22px 24px; }
.dash-top { margin-bottom: 26px; }
@media (max-width: 900px) { body.shell main { padding: 18px 16px 56px; } body.shell .topbar { padding: 10px 14px; } }

/* ================= Collections v4 (list) ================= */
.mono { font-family: var(--mono); font-size: .92em; letter-spacing: -0.01em; color: var(--ink-2); }
.stat-strip { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); margin-bottom: 22px; border: 1px solid var(--glass-line); border-radius: 14px; background: var(--surface); }
.stat-strip > div { display: flex; flex-direction: column; gap: 2px; padding: 16px 20px; border-right: 1px solid var(--glass-line); }
.stat-strip > div:last-child { border-right: 0; }
.stat-strip span { font-size: 12.5px; color: var(--ink-3); font-weight: 500; }
.stat-strip b { font-size: 21px; font-weight: 600; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.stat-strip b.bad { color: var(--late); }
.stat-strip em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.col3-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.list-panel { padding: 0 !important; overflow: visible; }
.tabs { display: flex; gap: 2px; padding: 8px 10px 0; border-bottom: 1px solid var(--glass-line); }
.tabs button { position: relative; padding: 10px 12px 12px; border: 0; background: none; color: var(--ink-3); font-size: 13.5px; font-weight: 500; cursor: pointer; }
.tabs button span { margin-left: 4px; font-size: 12px; color: var(--ink-3); font-variant-numeric: tabular-nums; }
.tabs button:hover { color: var(--ink); }
.tabs button[aria-selected=true] { color: var(--ink); }
.tabs button[aria-selected=true]::after { content: ''; position: absolute; left: 10px; right: 10px; bottom: -1px; height: 2px; border-radius: 2px; background: #fafafa; }
.crow { display: grid; grid-template-columns: 32px minmax(150px, 1.1fr) minmax(160px, 1.5fr) 118px 150px 96px 196px; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--glass-line); cursor: pointer; }
.crow:last-child { border-bottom: 0; }
.crow:not(.head):hover { background: #141416; }
.crow.head { cursor: default; padding-top: 10px; padding-bottom: 10px; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.crow.head .r { text-align: right; }
.crow .avatar { width: 32px; height: 32px; border-radius: 9px; font-size: 11px; font-weight: 600; }
.cr-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.cr-who b { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-who span, .cr-work { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-work { color: var(--ink-2); font-size: 13px; }
.st { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap; }
.st i { width: 7px; height: 7px; border-radius: 50%; background: var(--paid); }
.st.late i, .st.due i { background: var(--due); }
.st.later i { background: #e0a070; }
.st.critical i { background: var(--late); }
.st.late, .st.later, .st.critical { color: var(--ink); }
.prog { display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.prog .bars { display: grid; grid-template-columns: repeat(3, 1fr); gap: 3px; width: 72px; }
.prog .bars i { height: 4px; border-radius: 2px; background: #27272a; }
.prog .b-done { background: #d4d4d8; }
.prog .b-waiting { background: #a78bfa; }
.prog .b-due { background: var(--due); }
.prog .b-skipped { background: #1c1c1f; }
.prog .pl { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cr-amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: flex-end; }
.cr-amt em { font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.cr-act { display: flex; align-items: center; justify-content: flex-end; gap: 4px; }
.more { position: relative; }
.more .sb-icon { width: 30px; height: 30px; font-size: 16px; letter-spacing: 1px; }
.menu { position: absolute; right: 0; top: 34px; z-index: 20; min-width: 180px; display: flex; flex-direction: column; padding: 5px; border-radius: 11px; background: #161618; border: 1px solid #2a2a30; box-shadow: 0 18px 40px -12px rgba(0,0,0,.8); }
.menu button { text-align: left; border: 0; background: none; color: var(--ink-2); padding: 8px 10px; border-radius: 7px; font-size: 13px; cursor: pointer; box-shadow: none !important; justify-content: flex-start; }
.menu button:hover { background: #222226; color: #fff; }
.menu .mark-paid { background: none; }
.list-empty { display: flex; flex-direction: column; gap: 4px; align-items: center; text-align: center; padding: 48px 20px; color: var(--ink-3); font-size: 13.5px; }
.list-empty b { color: var(--ink); font-size: 15px; font-weight: 600; }
.sent-rows .srow { display: grid; grid-template-columns: 90px 1fr auto; gap: 14px; align-items: center; padding: 12px 18px; border-bottom: 1px solid var(--glass-line); font-size: 13.5px; color: var(--ink-2); }
.rail { position: sticky; top: 76px; padding: 18px 18px 8px !important; }
.rail-h { display: flex; align-items: baseline; justify-content: space-between; margin-bottom: 10px; }
.rail-h h2 { margin: 0; }
.rail-list { list-style: none; margin: 0; padding: 0; }
.rail-list > li { padding: 10px 0; border-top: 1px solid var(--glass-line); }
.rail-list > li:first-child { border-top: 0; }
.rd { display: block; font-size: 11.5px; font-weight: 500; color: var(--ink-3); margin-bottom: 6px; }
.ri { display: flex; gap: 10px; padding: 4px 0; font-size: 13px; }
.ri i { flex: none; width: 7px; height: 7px; margin-top: 6px; border-radius: 50%; background: var(--due); }
.ri.firm i { background: #e0a070; } .ri.final i { background: var(--late); }
.ri > span { display: flex; flex-direction: column; min-width: 0; }
.ri b { font-weight: 550; }
.ri > span > span { color: var(--ink-3); font-size: 12px; }
.ri em { font-style: normal; color: #c4b5fd; }
.rail-empty { color: var(--ink-3); font-size: 13px; padding: 8px 0 14px !important; border: 0 !important; }
@media (max-width: 1280px) { .crow { grid-template-columns: 32px minmax(140px, 1fr) minmax(120px, 1fr) 110px 96px 170px; } .cr-prog, .crow.head span:nth-child(5) { display: none; } }
@media (max-width: 1100px) { .col3-grid { grid-template-columns: 1fr; } .rail { position: static; } .stat-strip { grid-template-columns: repeat(2, 1fr); } .stat-strip > div { border-bottom: 1px solid var(--glass-line); } }
@media (max-width: 720px) { .crow { grid-template-columns: 32px minmax(0, 1fr) auto; } .cr-work, .cr-st, .crow.head { display: none; } .cr-act { grid-column: 2 / 4; justify-content: flex-start; } }

/* ================= Clients + Retainers ================= */
.sec-pad { display: flex; align-items: center; gap: 12px; padding: 16px 22px; border-bottom: 1px solid var(--glass-line); }
.sec-pad h2 { margin: 0; }
.sec-pad input[type=search] { margin-left: auto; width: 240px; padding: 8px 11px; border-radius: 9px; border: 1px solid var(--glass-line-2); color: var(--ink); font-size: 13.5px; }
.cl-table td:first-child, .cl-table th:first-child { padding-left: 22px; }
.cl-table td:last-child, .cl-table th:last-child { padding-right: 22px; }
.cl-who { display: flex; align-items: center; gap: 12px; }
.cl-who .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 11.5px; font-weight: 600; flex: none; }
.cl-table tr.flash { background: rgba(167, 139, 250, 0.08); }
.pill.top { background: rgba(217, 178, 92, 0.1); color: var(--due); border-color: rgba(217, 178, 92, 0.2); }
.ret-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 14px; margin-top: 4px; }
.ret { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--glass-line); }
.ret.paused { opacity: .6; }
.ret-top { display: flex; align-items: center; gap: 11px; }
.ret-top .avatar { width: 34px; height: 34px; border-radius: 10px; font-size: 11.5px; font-weight: 600; flex: none; }
.ret-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.ret-who b { font-weight: 550; }
.ret-who span { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ret-state { margin-left: auto; display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--ink-3); white-space: nowrap; }
.ret-state i { width: 7px; height: 7px; border-radius: 50%; background: #52525b; }
.ret-state i.on { background: var(--paid); } .ret-state i.w { background: #a78bfa; }
.ret-amt b { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
.ret-amt span { color: var(--ink-3); margin-left: 4px; }
.ret-facts { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin: 0; padding: 12px 0; border-top: 1px solid var(--glass-line); border-bottom: 1px solid var(--glass-line); }
.ret-facts dt { font-size: 11.5px; color: var(--ink-3); }
.ret-facts dd { margin: 2px 0 0; font-weight: 550; font-size: 13.5px; }
.ret-facts dd span { color: var(--ink-3); font-weight: 400; font-size: 12px; }
.ret-dates { display: flex; gap: 6px; flex-wrap: wrap; }
.ret-dates span { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #18181b; color: var(--ink-3); border: 1px solid #26262b; }
.ret-dates span.first { color: var(--ink); border-color: #3f3f46; }
.ret-acts { display: flex; align-items: center; gap: 8px; }
.ret-acts .linkbtn { margin-left: auto; color: var(--ink-3); }
.ret-empty { grid-column: 1 / -1; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 40px 20px; text-align: center; border: 1px dashed var(--glass-line-2); border-radius: 14px; color: var(--ink-3); font-size: 13.5px; }
.ret-empty b { color: var(--ink); font-size: 15px; font-weight: 600; }
.ret-empty .btn { margin-top: 8px; }
.ret-form { display: flex; flex-direction: column; gap: 6px; }
.ret-form label { font-size: 12.5px; color: var(--ink-3); font-weight: 500; margin-top: 8px; }
.ret-form input, .ret-form select { width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--glass-line-2); background: #0c0c0e; color: var(--ink); font-size: 14px; }
.ret-form input:focus, .ret-form select:focus { outline: none; border-color: #52525b; }
.ret-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ret-form .two > div { display: flex; flex-direction: column; gap: 6px; }
.ret-form .btn { margin-top: 14px; }
.ret-preview { margin-top: 14px; padding: 14px; border-radius: 12px; background: #0c0c0e; border: 1px solid var(--glass-line); font-size: 12.5px; color: var(--ink-3); display: flex; flex-direction: column; gap: 8px; }
.ret-preview div { display: flex; gap: 6px; flex-wrap: wrap; }
.ret-preview b { font-size: 12.5px; font-weight: 500; color: var(--ink); padding: 3px 9px; border-radius: 999px; background: #18181b; border: 1px solid #2a2a30; }
.ret-preview em { font-style: normal; }
.sb-userrow { display: flex; align-items: center; gap: 6px; margin-top: 4px; }
.sb-userrow .sb-user { flex: 1; min-width: 0; margin: 0; }
.sb-out { width: 36px; height: 50px; border: 1px solid var(--glass-line); background: var(--surface); }
.sb-out:hover { color: #fca5a5; border-color: #3f3f46; }
body.sb-collapsed .sb-userrow { flex-direction: column; }
body.sb-collapsed .sb-out { height: 34px; width: 44px; }
.sec-status { padding: 16px 22px 4px; }

/* ================= Auth pages (welcome + sign in) ================= */
body.auth { min-height: 100vh; background: #09090b; }
.auth-split { display: grid; grid-template-columns: 1.05fr 1fr; min-height: 100vh; }
.auth-art { position: relative; display: flex; flex-direction: column; padding: 40px 56px; border-right: 1px solid var(--glass-line); background:
  radial-gradient(700px 420px at 15% 0%, rgba(255,255,255,0.06), transparent 60%),
  linear-gradient(#0b0b0d, #09090b); overflow: hidden; }
.auth-art::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.035) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.035) 1px, transparent 1px); background-size: 44px 44px; mask-image: radial-gradient(600px 500px at 30% 30%, #000, transparent 75%); pointer-events: none; }
.auth-brand { position: relative; display: flex; align-items: center; gap: 11px; }
.auth-brand svg { width: 34px; height: 34px; }
.auth-brand .wordmark { font-size: 20px !important; }
.auth-copy { position: relative; margin: auto 0; max-width: 520px; }
.auth-copy h1 { font-size: clamp(34px, 4vw, 48px); font-weight: 600; letter-spacing: -0.045em; line-height: 1.05; margin: 0 0 18px; }
.auth-copy h1 span { color: #71717a; }
.auth-copy p { color: var(--ink-2); font-size: 15.5px; line-height: 1.6; margin: 0 0 30px; max-width: 470px; }
.auth-points { list-style: none; margin: 0; padding: 0; display: grid; gap: 16px; }
.auth-points li { display: flex; gap: 14px; align-items: flex-start; color: var(--ink-3); font-size: 13.5px; line-height: 1.5; }
.auth-points li b { display: block; color: var(--ink); font-weight: 550; font-size: 14px; }
.ap-ic { flex: none; width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; color: #e4e4e7; background: #151518; border: 1px solid #26262b; }
.auth-foot { position: relative; font-size: 12.5px; color: var(--ink-3); }
.auth-form { display: grid; place-items: center; padding: 40px 24px; }
.auth-card { width: min(440px, 100%); }
.auth-card h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.03em; margin: 0 0 6px; }
.auth-card .sub { color: var(--ink-3); font-size: 14px; margin: 0 0 22px; }
.auth-card label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin: 14px 0 6px; }
.auth-card label .opt { color: var(--ink-3); font-weight: 400; margin-left: 4px; }
.auth-card input[type=text], .auth-card input[type=password], .auth-card input:not([type]) { width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--glass-line-2); background: #0e0e10; color: var(--ink); font-size: 14px; }
.auth-card select { width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--glass-line-2); background: #0e0e10; color: var(--ink); font-size: 14px; appearance: none; background-image: linear-gradient(45deg, transparent 50%, #71717a 50%), linear-gradient(135deg, #71717a 50%, transparent 50%); background-position: calc(100% - 18px) 50%, calc(100% - 13px) 50%; background-size: 5px 5px; background-repeat: no-repeat; }
.auth-card select:focus { outline: none; border-color: #52525b; }
.auth-card input:focus { outline: none; border-color: #52525b; box-shadow: 0 0 0 3px rgba(161, 161, 170, 0.12); }
.auth-card .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.auth-card .hint { margin: 6px 0 0; font-size: 12px; color: var(--ink-3); }
.auth-card .help { margin: 10px 0 0; font-size: 12.5px; color: var(--ink-3); }
.auth-card .help summary { cursor: pointer; color: var(--ink-2); }
.auth-card .help ol { margin: 8px 0 0; padding-left: 18px; line-height: 1.6; }
.auth-card .check { display: flex !important; align-items: center; gap: 8px; margin: 16px 0 4px !important; color: var(--ink-2) !important; font-weight: 400 !important; }
.btn.wide { width: 100%; justify-content: center; padding: 11px; margin-top: 16px; font-size: 14px; }
.auth-card .err { min-height: 18px; margin-top: 10px; color: var(--late); font-size: 13px; }
.auth-card .or { display: flex; align-items: center; gap: 12px; margin: 14px 0 0; color: var(--ink-3); font-size: 12px; }
.auth-card .or::before, .auth-card .or::after { content: ''; flex: 1; height: 1px; background: var(--glass-line); }
.auth-card .note { display: flex; gap: 8px; align-items: flex-start; margin: 18px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.auth-card .note svg { flex: none; margin-top: 2px; }
.auth-card .ok { text-align: center; }
.auth-card .ok .tick { width: 56px; height: 56px; margin: 0 auto 16px; border-radius: 16px; display: grid; place-items: center; background: #151518; border: 1px solid #2a2a30; color: var(--paid); }
.auth-center { min-height: 100vh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 28px; padding: 24px; }
.auth-card.narrow { width: min(380px, 100%); padding: 28px; border-radius: 16px; background: var(--surface); border: 1px solid var(--glass-line); }
.auth-center .auth-foot { text-align: center; max-width: 380px; }
@media (max-width: 900px) { .auth-split { grid-template-columns: 1fr; } .auth-art { padding: 28px 22px 34px; border-right: 0; border-bottom: 1px solid var(--glass-line); } .auth-copy { margin: 34px 0 10px; } .auth-foot { display: none; } }
.crow { grid-template-columns: 32px minmax(120px, 1fr) minmax(0, 1.25fr) 150px 88px auto; }
.cr-st { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.prog { flex-direction: row; align-items: center; gap: 8px; }
.prog .bars { width: 42px; flex: none; }
.prog .bars i.b-done { background: #d4d4d8; }
.prog .bars i.b-waiting { background: #a78bfa; }
.prog .bars i.b-due { background: var(--due); }
.prog .bars i.b-skipped { background: #1c1c1f; box-shadow: inset 0 0 0 1px #2a2a30; }
.col3-grid { grid-template-columns: minmax(0, 1fr) 280px; }
.list-panel { min-width: 0; }
@media (max-width: 1280px) { .crow { grid-template-columns: 32px minmax(120px, 1fr) minmax(0, 1fr) 140px 84px auto; } .cr-prog { display: initial; } }
@media (max-width: 1180px) { .col3-grid { grid-template-columns: 1fr; } .rail { position: static; } }
.tabs { overflow-x: auto; scrollbar-width: none; }
.tabs button { white-space: nowrap; flex: none; }
.btn { white-space: nowrap; }
@media (max-width: 720px) {
  .crow { grid-template-columns: 32px minmax(0, 1fr) auto; row-gap: 8px; }
  .cr-st { grid-column: 2 / 3; }
  .cr-amt { grid-column: 3; grid-row: 1; }
  .cr-act { grid-column: 2 / 4; }
  .stat-strip > div { padding: 14px 16px; }
  .dash-top { flex-wrap: wrap; }
}

/* =========================================================
   Budget Estimator
   ========================================================= */
.bg-grid { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 18px; align-items: start; margin-top: 18px; }
.bg-form { position: sticky; top: 76px; display: flex; flex-direction: column; }
.bg-form h2 { margin: 0 0 4px; }
.bg-form label { display: block; font-size: 12.5px; font-weight: 500; color: var(--ink-2); margin: 14px 0 6px; }
.bg-form label .opt { color: var(--ink-3); font-weight: 400; margin-left: 4px; }
.bg-form input { width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--glass-line-2); background: #0c0c0e; color: var(--ink); font: inherit; font-size: 14px; font-variant-numeric: tabular-nums; }
.bg-form input:focus { outline: none; border-color: #52525b; box-shadow: 0 0 0 3px rgba(161, 161, 170, 0.12); }
.bg-form .two { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.bg-form .hint { margin: 10px 0 0; font-size: 12px; color: var(--ink-3); line-height: 1.5; }
.bg-form .slip-error { min-height: 16px; margin-top: 8px; color: var(--late); font-size: 13px; }
.bg-form .btn.wide { margin-top: 8px; }
.bg-chips { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.bg-chips button { border: 1px solid #26262b; background: #111113; color: var(--ink-3); font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.bg-chips button:hover { color: var(--ink); border-color: #3f3f46; }
.bg-chips button[aria-pressed=true] { color: #09090b; background: #e4e4e7; border-color: #e4e4e7; }
.bg-sep { display: flex; align-items: center; gap: 10px; margin: 22px 0 2px; font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; color: var(--ink-3); }
.bg-sep::after { content: ''; flex: 1; height: 1px; background: var(--glass-line); }
.bg-cash { display: flex; flex-direction: column; gap: 4px; }
.bg-cash .linkbtn { align-self: flex-start; font-size: 12px; }

.bg-result { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.bg-empty { display: flex; flex-direction: column; align-items: center; gap: 8px; text-align: center; padding: 64px 28px !important; color: var(--ink-3); font-size: 13.5px; }
.bg-empty svg { width: 40px; height: 40px; padding: 9px; border-radius: 11px; background: #151518; border: 1px solid #26262b; color: #d4d4d8; }
.bg-empty b { color: var(--ink); font-size: 15px; font-weight: 600; margin-top: 6px; }
.bg-empty span { max-width: 440px; line-height: 1.55; }

.bg-verdict { display: flex; align-items: center; gap: 26px; padding: 22px 26px !important; }
.bg-gauge { width: 170px; flex: none; }
.bg-gauge .g-num { font-size: 21px; font-weight: 700; fill: #fafafa; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.bg-gauge .g-sub { font-size: 8.5px; fill: #71717a; }
.bg-gauge .g-yes { stroke: var(--paid); }
.bg-gauge .g-maybe { stroke: var(--due); }
.bg-gauge .g-no { stroke: var(--late); }
.bg-v-text { min-width: 0; }
.bg-tag { display: inline-block; font-size: 12px; color: var(--ink-3); margin-bottom: 6px; }
.bg-v-text h2 { font-size: 20px; letter-spacing: -0.02em; margin: 0 0 6px; }
.bg-v-text p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.55; max-width: 640px; }
.bg-verdict.lvl-yes .bg-tag { color: var(--paid); }
.bg-verdict.lvl-maybe .bg-tag { color: var(--due); }
.bg-verdict.lvl-no .bg-tag { color: var(--late); }

.bg-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--glass-line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.bg-stats > div { display: flex; flex-direction: column; gap: 3px; padding: 16px 18px; border-right: 1px solid var(--glass-line); min-width: 0; }
.bg-stats > div:last-child { border-right: 0; }
.bg-stats span { font-size: 12px; color: var(--ink-3); }
.bg-stats b { font-size: 22px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bg-stats em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.bad-t { color: var(--late) !important; }

.bg-chart-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 14px; margin-bottom: 6px; }
.bg-chart-h h2 { margin: 0 0 2px; }
.bg-chart-h p { margin: 0; }
.bg-chart { height: 260px; }

.bg-two { display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 18px; }
.bg-range { position: relative; height: 54px; margin: 6px 4px 8px; }
.bg-range-track { position: absolute; left: 0; right: 0; top: 20px; height: 8px; border-radius: 999px; background: #18181b; }
.bg-range-band { position: absolute; top: 20px; height: 8px; border-radius: 999px; background: linear-gradient(90deg, #52525b, #d4d4d8 50%, #52525b); }
.bg-range-mid { position: absolute; top: 14px; width: 3px; height: 20px; margin-left: -1.5px; border-radius: 2px; background: #fafafa; box-shadow: 0 0 0 3px var(--surface); }
.bg-range-line { position: absolute; top: 6px; bottom: 6px; width: 0; border-left: 1px dashed #a78bfa; }
.bg-range-line span { position: absolute; top: 34px; left: 0; transform: translateX(-50%); white-space: nowrap; font-size: 11px; color: #c4b5fd; }
.bg-facts { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 18px; margin: 18px 0 0; padding-top: 14px; border-top: 1px solid var(--glass-line); }
.bg-facts dt { font-size: 12px; color: var(--ink-3); }
.bg-facts dd { margin: 2px 0 0; font-weight: 600; font-variant-numeric: tabular-nums; }
.bg-nw { display: flex; align-items: baseline; gap: 10px; margin-bottom: 14px; }
.bg-nw b { font-size: 30px; font-weight: 650; letter-spacing: -0.03em; color: #c4b5fd; }
.bg-nw span { font-size: 13px; color: var(--ink-3); }
.bg-nwl { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.bg-nwl li { display: flex; justify-content: space-between; gap: 12px; padding: 9px 12px; border-radius: 10px; background: #0d0d0f; border: 1px solid var(--glass-line); font-size: 13px; }
.bg-nwl em { font-style: normal; color: var(--ink-3); }
.bg-table td { vertical-align: middle; }
.bg-bar { display: inline-block; vertical-align: middle; width: 70px; height: 6px; border-radius: 999px; background: #1c1c1f; margin-right: 8px; overflow: hidden; }
.bg-bar i { display: block; height: 100%; border-radius: 999px; }
.bg-bar i.ok { background: var(--paid); } .bg-bar i.mid { background: var(--due); } .bg-bar i.low { background: var(--late); }
.swing-hi { color: #c4b5fd; }
.bg-ret { padding: 12px 22px 16px; margin: 0; border-top: 1px solid var(--glass-line); }
.bg-how summary { display: flex; align-items: baseline; gap: 12px; cursor: pointer; list-style: none; }
.bg-how summary::-webkit-details-marker { display: none; }
.bg-how summary::before { content: '+'; color: var(--ink-3); width: 12px; }
.bg-how[open] summary::before { content: '−'; }
.bg-how ol { margin: 16px 0 0; padding-left: 20px; display: grid; gap: 10px; color: var(--ink-2); font-size: 13.5px; line-height: 1.6; }
.bg-how ol b { color: var(--ink); font-weight: 600; }
.bg-warn { margin: 14px 0 0; padding: 10px 12px; border-radius: 10px; background: var(--due-bg); color: var(--due); font-size: 13px; }
@media (max-width: 1100px) { .bg-grid { grid-template-columns: 1fr; } .bg-form { position: static; } .bg-two { grid-template-columns: 1fr; } }
@media (max-width: 720px) { .bg-stats { grid-template-columns: 1fr 1fr; } .bg-stats > div:nth-child(2) { border-right: 0; } .bg-stats > div:nth-child(-n+2) { border-bottom: 1px solid var(--glass-line); } .bg-verdict { flex-direction: column; align-items: flex-start; gap: 12px; } .bg-gauge { width: 140px; } }

/* Suggested retainers */
.of-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(420px, 100%), 1fr)); gap: 14px; margin-top: 4px; }
.of { display: flex; flex-direction: column; gap: 14px; padding: 18px; border-radius: 14px; background: var(--surface); border: 1px solid var(--glass-line); }
.of.offered { border-color: #2e2a3d; }
.of-why { margin: 0; font-size: 13.5px; color: var(--ink-2); line-height: 1.5; }
.of-why b { color: var(--ink); font-weight: 600; }
.of-mid { display: grid; grid-template-columns: minmax(0, 1fr) 220px; gap: 18px; align-items: end; }
.of-price span { display: block; font-size: 12px; color: var(--ink-3); }
.of-price b { display: block; font-size: 28px; font-weight: 650; letter-spacing: -0.03em; margin: 2px 0; }
.of-price b small { font-size: 13px; font-weight: 500; color: var(--ink-3); letter-spacing: 0; }
.of-price em { font-style: normal; font-size: 12.5px; color: #c4b5fd; }
.of-chart { display: flex; flex-direction: column; gap: 4px; }
.of-chart span { font-size: 11px; color: var(--ink-3); text-align: right; }
.of-bars { width: 100%; height: 66px; display: block; }
.of-facts { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.good-t { color: var(--paid) !important; }
.of-acts { display: flex; align-items: center; gap: 8px; margin-top: 10px; }
.of-acts .linkbtn { margin-left: auto; }
.of-loading { padding: 40px 0; text-align: center; color: var(--ink-3); }
.ret-form textarea { width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--glass-line-2); background: #0c0c0e; color: var(--ink); font: inherit; font-size: 13.5px; line-height: 1.55; resize: vertical; }
.bg-table th:first-child, .bg-table td:first-child { padding-left: 22px; }
.bg-table th:last-child, .bg-table td:last-child { padding-right: 22px; }
@media (max-width: 720px) { .of-grid { grid-template-columns: 1fr; } .of-mid { grid-template-columns: 1fr; } .of-facts { grid-template-columns: 1fr 1fr; } }
.of-key { display: inline-block; width: 12px; border-top: 1.5px dashed #a78bfa; vertical-align: middle; margin: 0 2px; }

/* business type */
.bt-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.bt { position: relative; display: flex; flex-direction: column; gap: 2px; padding: 11px 12px; border-radius: 10px; border: 1px solid var(--glass-line-2); background: #0c0c0e; cursor: pointer; }
.bt:hover { border-color: #3f3f46; }
.bt input { position: absolute; opacity: 0; pointer-events: none; }
.bt b { font-size: 13.5px; font-weight: 600; }
.bt span { font-size: 11.5px; color: var(--ink-3); line-height: 1.4; }
.bt.on { border-color: #d4d4d8; background: #141416; box-shadow: 0 0 0 1px #d4d4d8; }
.bt:has(input:focus-visible) { outline: 2px solid #a1a1aa; outline-offset: 2px; }
.bt-preset { margin-top: 10px; padding: 12px 14px; border-radius: 10px; background: #0c0c0e; border: 1px solid var(--glass-line); font-size: 13px; }
.bt-p-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.bt-p-h b { font-weight: 600; }
.bt-preset dl { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; margin: 10px 0; }
.bt-preset dt { font-size: 11.5px; color: var(--ink-3); }
.bt-preset dd { margin: 1px 0 0; font-weight: 550; }
.bt-preset p { margin: 0 0 10px; color: var(--ink-3); font-size: 12.5px; }
.bt-items { display: flex; flex-wrap: wrap; gap: 6px; }
.bt-items span { font-size: 11.5px; padding: 3px 9px; border-radius: 999px; background: #18181b; border: 1px solid #26262b; color: var(--ink-2); }
@media (max-width: 720px) { .bt-grid { grid-template-columns: 1fr 1fr; } }
.quick-items { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; }
.qi-label { font-size: 12px; color: var(--ink-3); margin-left: 6px; }
.qi { display: flex; flex-wrap: wrap; gap: 6px; }
.qi button { border: 1px solid #26262b; background: #111113; color: var(--ink-2); font: inherit; font-size: 12px; padding: 4px 10px; border-radius: 999px; cursor: pointer; }
.qi button:hover { color: var(--ink); border-color: #3f3f46; }
@media (max-width: 720px) { .bg-chart-h { flex-wrap: wrap; } .bg-chart { height: 210px; } .bg-table { min-width: 720px; } }
.bt-other { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; font-size: 12.5px; color: var(--ink-2); }
.bt-other input { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--glass-line-2); background: #09090b; color: var(--ink); font: inherit; font-size: 13.5px; }

/* analytics v2 */
.an-sum { margin: 18px 0 16px; padding: 18px 22px !important; }
.an-sum-h { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; flex-wrap: wrap; }
.an-health { display: inline-flex; align-items: center; gap: 7px; font-size: 12.5px; font-weight: 600; padding: 3px 10px; border-radius: 999px; background: #18181b; }
.an-health i { width: 7px; height: 7px; border-radius: 50%; }
.an-health.good { color: var(--paid); } .an-health.good i { background: var(--paid); }
.an-health.fair { color: var(--due); } .an-health.fair i { background: var(--due); }
.an-health.poor { color: var(--late); } .an-health.poor i { background: var(--late); }
.an-sum-p { margin: 0; font-size: 15px; line-height: 1.7; color: var(--ink-2); max-width: 980px; }
.an-sum-p b { color: var(--ink); font-weight: 600; }
.an-help { margin: -6px 0 14px !important; line-height: 1.5; }
.an-trend-ctl { display: flex; gap: 8px; align-items: center; }
.an-legend { display: flex; gap: 16px; font-size: 12px; color: var(--ink-2); margin: 4px 0 2px; }
.an-legend:empty { display: none; }
.an-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.lg-r { background: #e4e4e7; } .lg-i { background: #3f3f46; }
.an-steady { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-bottom: 14px; }
.an-steady div { padding: 10px 12px; border-radius: 10px; background: #0d0d0f; border: 1px solid var(--glass-line); }
.an-steady span { display: block; font-size: 11.5px; color: var(--ink-3); }
.an-steady b { font-size: 18px; font-weight: 650; letter-spacing: -0.02em; }
.an-ins { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fill, minmax(min(340px, 100%), 1fr)); gap: 10px; }
.an-ins li { display: flex; align-items: flex-start; gap: 10px; padding: 12px 14px; border-radius: 11px; background: #0d0d0f; border: 1px solid var(--glass-line); font-size: 13.5px; line-height: 1.5; color: var(--ink-2); }
.an-ins li i { flex: none; width: 8px; height: 8px; border-radius: 50%; margin-top: 7px; background: #71717a; }
.an-ins li.good i { background: var(--paid); } .an-ins li.warn i { background: var(--due); } .an-ins li.info i { background: #a78bfa; }
.an-ins li span { flex: 1; }
.an-ins li a { flex: none; color: var(--ink); font-size: 12.5px; font-weight: 500; text-decoration: none; white-space: nowrap; margin-top: 1px; }
.an-ins li a:hover { text-decoration: underline; }
.cs.kpi .cs-s a { color: var(--ink-2); }
/* budget v2 */
.bg-form select { width: 100%; padding: 9px 11px; border-radius: 9px; border: 1px solid var(--glass-line-2); background: #0c0c0e; color: var(--ink); font: inherit; font-size: 14px; }
.bg-bills { display: flex; flex-direction: column; gap: 6px; margin-top: 10px; }
.bg-bill { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 70px 26px; gap: 6px; align-items: center; }
.bg-bill input, .bg-bill select { padding: 7px 9px !important; font-size: 13px !important; }
.bg-x { width: 26px; height: 30px; border: 0; background: none; color: var(--ink-3); font-size: 17px; cursor: pointer; border-radius: 7px; }
.bg-x:hover { color: var(--ink); background: #18181b; }
.bg-check { display: flex !important; align-items: flex-start; gap: 8px; margin-top: 34px !important; cursor: pointer; }
.bg-check input { width: auto !important; margin: 2px 0 0; accent-color: #e4e4e7; }
.bg-check span { display: flex; flex-direction: column; font-size: 12.5px; color: var(--ink-2); }
.bg-check em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.bg-wait { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 12.5px; color: var(--ink-3); }
.bg-wait > span { margin-right: 4px; }
.bg-wait button { display: flex; align-items: baseline; gap: 6px; padding: 7px 12px; border-radius: 10px; border: 1px solid var(--glass-line); background: var(--surface); color: var(--ink-2); font: inherit; cursor: pointer; }
.bg-wait button b { font-size: 14px; color: var(--ink); font-weight: 650; }
.bg-wait button em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.bg-wait button.on { border-color: #52525b; }
.bg-wait button:hover { border-color: #3f3f46; }
.bg-billlist { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 6px; }
.bg-billlist li { display: grid; grid-template-columns: 1fr auto auto; gap: 14px; font-size: 13px; padding: 7px 10px; border-radius: 9px; background: #0d0d0f; }
.bg-billlist em { font-style: normal; color: var(--ink-3); }
.bg-billlist b { font-weight: 600; font-variant-numeric: tabular-nums; }
.bg-sub-h { font-size: 13px; font-weight: 600; color: var(--ink-2); margin: 18px 0 8px; padding-top: 14px; border-top: 1px solid var(--glass-line); }
.bg-nw.small b { font-size: 22px; }
.bg-off td { opacity: .55; }
.bg-table input[type=checkbox] { accent-color: #e4e4e7; width: 15px; height: 15px; cursor: pointer; }
/* forecast working popover */
.figures { overflow: visible !important; }
.figures > .fig:first-child { border-radius: var(--radius-lg) 0 0 var(--radius-lg); }
.fig-wrap { position: relative; display: flex; }
.fig-wrap > .fig { flex: 1; text-align: left; border-right: 0; border-radius: 0 var(--radius-lg) var(--radius-lg) 0; }
.fig-info { position: absolute; top: 16px; right: 16px; width: 20px; height: 20px; border-radius: 50%; border: 1px solid #3f3f46; background: #111113; color: var(--ink-2); font: 600 11px/1 var(--font, inherit); font-style: italic; cursor: help; display: grid; place-items: center; padding: 0; }
.fig-info:hover, .fig-info:focus-visible { color: var(--ink); border-color: #71717a; }
.fig-pop { position: absolute; z-index: 40; top: calc(100% + 8px); right: 0; width: 420px; max-width: calc(100vw - 32px); padding: 14px 16px; border-radius: 12px; background: #0e0e10; border: 1px solid #2a2a30; box-shadow: 0 18px 50px rgba(0,0,0,.55); font-size: 12.5px; color: var(--ink-2); opacity: 0; visibility: hidden; transform: translateY(-4px); transition: opacity .15s, transform .15s, visibility .15s; pointer-events: none; }
.fig-info:hover + .fig-pop, .fig-info:focus-visible + .fig-pop, .fig-info:focus + .fig-pop { opacity: 1; visibility: visible; transform: none; }
.fig-pop b { color: var(--ink); font-weight: 600; }
.fig-pop > b { display: block; font-size: 13px; margin-bottom: 4px; }
.fig-pop p { margin: 0 0 10px; line-height: 1.5; }
.fig-pop table { width: 100%; border-collapse: collapse; font-variant-numeric: tabular-nums; }
.fig-pop td { padding: 5px 0; border-top: 1px solid var(--glass-line); }
.fig-pop td span { color: var(--ink-3); }
.fig-pop td.r { text-align: right; padding-left: 8px; }
.fig-pop td.x { text-align: center; color: var(--ink-3); padding: 0 6px; }
.fig-pop tfoot td { border-top: 1px solid #3f3f46; padding-top: 8px; color: var(--ink); }
.fig-pop-n { margin: 10px 0 0 !important; color: var(--ink-3); }
.md { display: block; white-space: nowrap; }
.md.exp { color: #c4b5fd; }
.md-s { display: block; font-size: 11.5px; color: var(--ink-3); white-space: nowrap; }
.md-s.late { color: var(--due); }
.dr-when { display: grid; grid-template-columns: auto 1fr; column-gap: 10px; align-items: baseline; margin: 10px 0 14px; padding: 10px 12px; border-radius: 10px; background: #0d0d0f; border: 1px solid var(--glass-line); font-size: 13px; }
.dr-when span { color: var(--ink-3); }
.dr-when b { font-weight: 600; }
.dr-when em { grid-column: 1 / -1; font-style: normal; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.dr-when.exp b { color: #c4b5fd; }
.slip-voice { margin: -2px 0 10px; font-size: 12px; color: #52525b; }
.slip-voice b { color: #18181b; font-weight: 600; }
.timeline .tdot:empty::after { content: ''; width: 7px; height: 7px; border-radius: 50%; background: currentColor; display: block; }
/* budget story */
.bg-story { display: flex; flex-direction: column; gap: 12px; padding: 18px 22px !important; }
.bg-pills { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.bg-pl { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); margin-right: 4px; }
.bg-pill { display: inline-flex; align-items: center; gap: 8px; padding: 6px 14px; border-radius: 999px; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.bg-pill i { width: 8px; height: 8px; border-radius: 50%; }
.bg-pill.safe { color: var(--paid); background: var(--paid-bg); } .bg-pill.safe i { background: var(--paid); }
.bg-pill.risky { color: var(--late); background: var(--late-bg); } .bg-pill.risky i { background: var(--late); }
.bg-story > p { margin: 0; font-size: 14.5px; line-height: 1.65; color: var(--ink-2); max-width: 900px; }
.bg-path summary { cursor: pointer; font-size: 13.5px; font-weight: 600; list-style: none; display: flex; gap: 10px; align-items: baseline; flex-wrap: wrap; }
.bg-path summary::-webkit-details-marker { display: none; }
.bg-path summary::before { content: '+'; color: var(--ink-3); width: 10px; }
.bg-path[open] summary::before { content: '−'; }
.bg-path table { margin-top: 10px; }
.bg-path td, .bg-path th { padding-top: 8px !important; padding-bottom: 8px !important; }
.bg-path tr.k-bill td:nth-child(2), .bg-path tr.k-buy td:nth-child(2) { color: var(--ink); }
.bg-path tr.k-buy td:nth-child(2) { font-weight: 600; }
.bg-path tr.below td:last-child { color: var(--late); }
.bg-path tr.lowest td { background: rgba(251, 113, 133, 0.07); }
.bg-path .bg-p-start td { color: var(--ink-3); }
.ok-t { color: var(--paid); }
.bg-upcoming { align-items: stretch !important; text-align: left !important; padding: 22px !important; }
.bg-up-h { display: flex; justify-content: space-between; gap: 16px; margin-bottom: 12px; }
.bg-up-h b { display: block; color: var(--ink); font-size: 15px; font-weight: 600; margin: 0 0 4px !important; }
.bg-up-h span { font-size: 13px; color: var(--ink-3); line-height: 1.5; max-width: 520px; display: block; }
.bg-up-t { text-align: right; flex: none; }
.bg-up-t em { display: block; font-style: normal; font-size: 12px; color: var(--ink-3); }
.bg-up-t b { font-size: 22px !important; }
.bg-up { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.bg-up li { display: grid; grid-template-columns: 64px 1fr 80px 40px 90px; gap: 12px; align-items: center; padding: 9px 12px; border-radius: 10px; background: #0d0d0f; border: 1px solid var(--glass-line); font-size: 13px; color: var(--ink-2); }
.bg-up li time { color: #c4b5fd; font-weight: 600; }
.bg-up li b { color: var(--ink); font-weight: 600; }
.bg-up li em { font-style: normal; font-size: 12px; color: var(--ink-3); text-align: right; }
.bg-up li > b:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.bg-up .bg-bar { width: 100%; margin: 0; }

/* tax summary */
.tx-ctl { margin-left: auto; display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.tx-ctl select { padding: 8px 12px; border-radius: 9px; border: 1px solid var(--glass-line-2); background: #0c0c0e; color: var(--ink); font: inherit; font-size: 13.5px; }
.tx-report { display: flex; flex-direction: column; gap: 18px; margin-top: 18px; }
.tx-head { display: grid; grid-template-columns: repeat(3, 1fr); gap: 18px; padding: 18px 22px !important; }
.tx-head div { display: flex; flex-direction: column; gap: 2px; }
.tx-k { font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); }
.tx-head b { font-size: 15px; font-weight: 600; }
.tx-head span:not(.tx-k) { font-size: 12.5px; color: var(--ink-3); }
.tx-sum { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); border: 1px solid var(--glass-line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.tx-sum > div { padding: 16px 18px; border-right: 1px solid var(--glass-line); display: flex; flex-direction: column; gap: 3px; }
.tx-sum > div:last-child { border-right: 0; }
.tx-sum span { font-size: 12px; color: var(--ink-3); }
.tx-sum b { font-size: 22px; font-weight: 650; letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.tx-sum em { font-style: normal; font-size: 11.5px; color: var(--ink-3); }
.tx-sum .hl { background: #111014; }
.tx-sum .hl b { color: #ddd6fe; }
.tx-grid { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 18px; }
.tx-help { margin: -6px 0 12px !important; }
.tx-table td, .tx-table th { white-space: nowrap; }
.tx-table th:first-child, .tx-table td:first-child { padding-left: 22px; }
.tx-table th:last-child, .tx-table td:last-child { padding-right: 22px; }
.panel:not([style]) .tx-table td:first-child, .panel:not([style]) .tx-table th:first-child { padding-left: 0; }
.tx-barcell { width: 30%; }
.tx-barcell i { display: block; height: 6px; border-radius: 999px; background: #52525b; min-width: 2px; }
.tx-table tfoot td { border-top: 1px solid #3f3f46; padding-top: 10px; }
.tx-est { margin: 0; display: grid; gap: 12px; }
.tx-est div { display: grid; grid-template-columns: 1fr auto; gap: 2px 12px; padding: 10px 12px; border-radius: 10px; background: #0d0d0f; border: 1px solid var(--glass-line); }
.tx-est dt { font-size: 13px; font-weight: 600; }
.tx-est dd { margin: 0; font-weight: 650; font-variant-numeric: tabular-nums; }
.tx-est p { grid-column: 1 / -1; margin: 0; font-size: 12px; color: var(--ink-3); line-height: 1.45; }
.tx-forms { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; margin-top: 10px; }
.tx-forms div { padding: 14px 16px; border-radius: 12px; background: #0d0d0f; border: 1px solid var(--glass-line); }
.tx-forms div > b { font-size: 14px; }
.tx-forms p { margin: 6px 0 0; font-size: 13px; line-height: 1.6; color: var(--ink-2); }
.tx-forms p b { color: var(--ink); }
.tx-note { margin: 0; padding: 10px 14px; border-radius: 10px; background: var(--due-bg); color: var(--due); font-size: 13px; }
.tx-disc { margin: 0 0 30px; font-size: 12px; color: var(--ink-3); line-height: 1.6; max-width: 900px; }
@media (max-width: 900px) { .tx-head, .tx-grid, .tx-forms { grid-template-columns: 1fr; } .tx-sum { grid-template-columns: 1fr 1fr; } }
@media print {
  .sidebar, .topbar, .tx-ctl, .sb, header, nav { display: none !important; }
  body, main { background: #fff !important; color: #111 !important; }
  main { margin: 0 !important; padding: 0 !important; max-width: none !important; }
  .panel, .tx-sum, .tx-forms div, .tx-est div { background: #fff !important; border-color: #ddd !important; box-shadow: none !important; color: #111 !important; }
  .tx-sum .hl { background: #f4f4f5 !important; } .tx-sum .hl b { color: #111 !important; }
  .muted, .tx-sum span, .tx-sum em, .tx-help, .tx-disc, .tx-est p, .tx-head span:not(.tx-k) { color: #555 !important; }
  .tx-forms p, .tx-forms p b, h1, h2, b, td, th, dd, dt, .lede { color: #111 !important; }
  .tx-barcell i { background: #999 !important; }
  .data td, .data th { border-color: #e5e5e5 !important; }
  .tx-report { gap: 12px; }
  section { break-inside: avoid; }
}
@media print { body.shell main { margin-left: 0 !important; padding: 0 !important; } .toast, .cmdk, .ncenter { display: none !important; } }
.slip-hint { margin: -4px 0 10px; font-size: 12px; color: #52525b; }
.slip-hint b { color: #18181b; }
.slip select { width: 100%; }
.slip select { border: 0; border-bottom: 1px solid var(--rule); padding: 5px 0; background: transparent; color: var(--ink); font: inherit; font-size: 13.5px; border-radius: 0; }
/* drawer: pay to unlock + early pay */
.dr-dl { margin: 0 0 16px; padding: 12px 14px; border-radius: 12px; border: 1px solid var(--glass-line); background: #0d0d0f; display: flex; flex-direction: column; gap: 10px; font-size: 13px; }
.dr-dl > div:first-child { display: flex; flex-direction: column; gap: 2px; }
.dr-dl b { font-weight: 600; }
.dr-dl span { color: var(--ink-3); line-height: 1.45; }
.dr-dl em { font-style: normal; font-size: 12px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dr-dl.open { border-color: rgba(52, 211, 153, .35); }
.dr-dl.open b { color: var(--paid); }
.dr-dl-acts { display: flex; gap: 8px; align-items: center; }
.dr-dl-acts .linkbtn { margin-left: auto; }
.dr-dl .pf-row { display: flex; gap: 8px; }
.dr-dl .pf-row input { flex: 1; min-width: 0; padding: 8px 10px; border-radius: 8px; border: 1px solid var(--glass-line-2); background: #09090b; color: var(--ink); font: inherit; font-size: 13px; }
.dr-ep { margin: 0 0 12px; padding: 10px 12px; border-radius: 10px; background: #0f0d14; border: 1px solid #262233; font-size: 13px; display: flex; flex-direction: column; gap: 2px; }
.dr-ep b { color: #c4b5fd; font-weight: 600; }
.dr-ep span { color: var(--ink-2); }
.dr-ep.expired b { color: var(--ink-3); }
.dr-ep.used b { color: var(--paid); }
.form-grid .hint { display: block; font-size: 12px; color: var(--ink-3); margin-top: 6px; line-height: 1.45; }
.form-grid .hint b { color: var(--ink-2); }
#invoices td:nth-child(4), #invoices td:nth-child(5), #invoices td:nth-child(7) { white-space: nowrap; }
#invoices td:nth-child(3) { max-width: 260px; }
/* dialog */
.dlg-back { position: fixed; inset: 0; z-index: 90; background: rgba(0,0,0,.6); display: grid; place-items: center; padding: 20px; }
.dlg { width: 100%; max-width: 440px; padding: 22px; border-radius: 16px; background: #0f0f11; border: 1px solid #26262b; box-shadow: 0 24px 70px rgba(0,0,0,.6); display: flex; flex-direction: column; }
.dlg h2 { margin: 0 0 6px; font-size: 17px; }
.dlg p { margin: 0 0 16px; color: var(--ink-2); font-size: 13.5px; line-height: 1.55; }
.dlg-acts { display: grid; gap: 8px; margin-bottom: 14px; }
.dlg-opt { text-align: left; padding: 12px 14px; border-radius: 11px; border: 1px solid #26262b; background: #141417; color: var(--ink); font: inherit; cursor: pointer; display: flex; flex-direction: column; gap: 3px; }
.dlg-opt:hover, .dlg-opt:focus-visible { border-color: #52525b; background: #18181b; outline: none; }
.dlg-opt b { font-size: 14px; font-weight: 600; }
.dlg-opt span { font-size: 12.5px; color: var(--ink-3); line-height: 1.45; }
.dlg-cancel { align-self: flex-end; }

/* receipts */
.rx-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin-top: 18px; border: 1px solid var(--glass-line); border-radius: var(--radius-lg); background: var(--surface); overflow: hidden; }
.rx-stats > div { padding: 16px 18px; border-right: 1px solid var(--glass-line); display: flex; flex-direction: column; gap: 3px; }
.rx-stats > div:last-child { border-right: 0; }
.rx-stats span { font-size: 12px; color: var(--ink-3); }
.rx-stats b { font-size: 24px; font-weight: 650; letter-spacing: -0.03em; }
.rx-stats em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.rx-stats .warn b { color: var(--due); }
.rx-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.rx-q { padding: 8px 12px; border-radius: 9px; border: 1px solid var(--glass-line-2); background: #0c0c0e; color: var(--ink); font: inherit; font-size: 13px; min-width: 240px; }
.rx-table th:first-child, .rx-table td:first-child { padding-left: 22px; }
.rx-table th:last-child, .rx-table td:last-child { padding-right: 22px; }
.rx-acts { white-space: nowrap; }
.rx-acts .btn { margin-left: 4px; }
.rx-focus td { background: rgba(167, 139, 250, .07); }
@media (max-width: 800px) { .rx-stats { grid-template-columns: 1fr 1fr; } }
.pill.rx-needed { color: var(--due); background: var(--due-bg); }
.pill.rx-auto { color: var(--ink-2); background: #18181b; }
.pill.rx-sent { color: #c4b5fd; background: rgba(167,139,250,.14); }
.pill.rx-viewed { color: var(--paid); background: var(--paid-bg); }

/* client view */
.cv-steps { list-style: none; margin: 22px 0 0; padding: 0; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(200px, 100%), 1fr)); gap: 10px; }
.cv-steps button { all: unset; cursor: pointer; box-sizing: border-box; width: 100%; display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--glass-line); background: var(--surface); transition: border-color .15s; }
.cv-steps button:hover { border-color: #3f3f46; }
.cv-steps button[aria-selected=true] { border-color: #d4d4d8; box-shadow: 0 0 0 1px #d4d4d8; }
.cv-steps button:focus-visible { outline: 2px solid #a1a1aa; outline-offset: 2px; }
.cv-steps span { width: 24px; height: 24px; border-radius: 8px; flex: none; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: #18181b; color: var(--ink-2); }
.cv-steps button[aria-selected=true] span { background: #fafafa; color: #09090b; }
.cv-steps b { display: block; font-size: 14px; font-weight: 600; }
.cv-steps em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.cv-stage { margin: 22px auto 40px; max-width: 620px; }
.cv-mail { border-radius: 16px; border: 1px solid var(--glass-line); background: var(--surface); padding: 18px; }
.cv-mail-h { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; }
.cv-mail-h b { display: block; font-size: 14px; }
.cv-mail-h span, .cv-mail-h em { color: var(--ink-3); font-style: normal; }
.cv-mail-s { font-size: 16px; font-weight: 600; margin: 12px 0 16px; }
.cv-paper { position: relative; overflow: hidden; background: #fff; color: #18181b; border-radius: 14px; padding: 26px 28px; display: flex; flex-direction: column; gap: 8px; box-shadow: 0 24px 70px rgba(0,0,0,.45); }
.cv-from { font-size: 13px; color: #71717a; font-weight: 600; }
.cv-big { font-size: 34px; font-weight: 700; letter-spacing: -0.03em; }
.cv-due { color: #52525b; font-size: 13.5px; }
.cv-offer { font-size: 12.5px; color: #6d28d9; background: #f3efff; padding: 8px 10px; border-radius: 8px; }
.cv-btn { align-self: stretch; text-align: center; padding: 12px; border-radius: 10px; background: #18181b; color: #fafafa; font-weight: 600; font-size: 14px; margin: 8px 0; }
.cv-lines { width: 100%; border-collapse: collapse; font-size: 13.5px; margin-top: 6px; }
.cv-lines td { padding: 8px 0; border-bottom: 1px solid #f0f0f2; }
.cv-lines .r { text-align: right; font-variant-numeric: tabular-nums; }
.cv-lines .cv-s td { color: #52525b; }
.cv-lines .cv-t td { font-weight: 700; border-bottom: 0; border-top: 1px solid #18181b; font-size: 15px; }
.cv-q { color: #a1a1aa; }
.cv-note { margin: 8px 0 0; font-size: 12.5px; color: #52525b; line-height: 1.55; }
.cv-cap { margin: 14px 2px; font-size: 13px; color: var(--ink-3); line-height: 1.55; }
.cv-pay { display: flex; flex-direction: column; align-items: flex-start; }
.cv-pay .cv-paper { align-self: stretch; }
.cv-pay-h { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; margin-bottom: 4px; }
.cv-pay-h b { font-size: 16px; }
.cv-pay-h span { font-size: 12.5px; color: #71717a; }
.cv-methods { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-top: 10px; }
.cv-methods span { padding: 11px; border-radius: 10px; border: 1px solid #e4e4e7; text-align: center; font-size: 13px; color: #3f3f46; }
.cv-tick { width: 36px; height: 36px; border-radius: 50%; display: grid; place-items: center; background: #dcfce7; color: #15803d; }
.cv-receipt.preview .cv-tick { background: #f4f4f5; }
.cv-wm { position: absolute; top: 18px; right: -34px; transform: rotate(35deg); background: #f4f4f5; color: #71717a; font-size: 11px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 4px 40px; }
.cv-row { display: flex; gap: 8px; flex-wrap: wrap; }
.cv-files { align-items: center; text-align: center; padding: 34px 28px; }
.cv-files p { margin: 0; color: #52525b; font-size: 13.5px; }
.cv-lock { width: 48px; height: 48px; border-radius: 14px; display: grid; place-items: center; background: #f4f4f5; color: #3f3f46; margin-bottom: 6px; }
.cv-lock.open { background: #dcfce7; color: #15803d; }

/* growth */
.gr-plan { margin-top: 18px; padding: 22px 24px !important; background: linear-gradient(180deg, #111114, #0c0c0e) !important; }
.gr-plan-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; }
.gr-eyebrow { font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.gr-head { margin: 6px 0 0; font-size: 19px; line-height: 1.45; font-weight: 600; letter-spacing: -0.015em; max-width: 72ch; color: var(--ink); }
.gr-steps { margin: 16px 0 0; padding: 0; list-style: none; counter-reset: st; display: grid; grid-template-columns: repeat(auto-fit, minmax(min(240px, 100%), 1fr)); gap: 10px; }
.gr-steps li { counter-increment: st; position: relative; padding: 14px 14px 14px 46px; border-radius: 12px; border: 1px solid var(--glass-line); background: #0a0a0c; font-size: 13.5px; line-height: 1.55; color: var(--ink-2); }
.gr-steps li::before { content: counter(st); position: absolute; left: 14px; top: 13px; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; font-weight: 600; background: #fafafa; color: #09090b; }
.gr-src { margin: 12px 0 0 !important; }
.gr-kpis { margin-top: 18px; }
.gr-opps { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(300px, 100%), 1fr)); gap: 12px; }
.gr-opp { display: flex; flex-direction: column; gap: 8px; padding: 16px 18px; border-radius: 14px; border: 1px solid var(--glass-line); background: #0c0c0e; transition: border-color .15s, transform .15s; }
.gr-opp:hover { border-color: #3f3f46; transform: translateY(-1px); }
.gr-opp-n { font-size: 11.5px; color: var(--ink-3); font-variant-numeric: tabular-nums; letter-spacing: .06em; }
.gr-opp h3 { margin: 0; font-size: 15px; font-weight: 600; letter-spacing: -0.01em; }
.gr-opp p { margin: 0; font-size: 13px; line-height: 1.55; color: var(--ink-2); flex: 1; }
.gr-opp-amt b { font-size: 20px; font-weight: 600; letter-spacing: -0.02em; color: var(--paid); font-variant-numeric: tabular-nums; }
.gr-opp-amt span { font-size: 12px; color: var(--ink-3); }
.gr-opp-f { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding-top: 10px; border-top: 1px solid var(--glass-line); font-size: 12px; color: var(--ink-3); }
.gr-opp-f a { color: var(--ink); text-decoration: none; font-weight: 500; white-space: nowrap; }
.gr-opp-f a:hover { text-decoration: underline; }
.gr-table td { vertical-align: middle; }
.gr-focus td { background: rgba(52, 211, 153, .045); }
.gr-bar { height: 6px; border-radius: 4px; background: #1c1c20; margin-bottom: 6px; overflow: hidden; min-width: 120px; }
.gr-bar i { display: block; height: 100%; border-radius: 4px; background: #d4d4d8; }
.gr-bar.thin { height: 4px; margin: 8px 0; }
.gr-score { width: 70px; height: 6px; border-radius: 4px; background: #1c1c20; overflow: hidden; }
.gr-score i { display: block; height: 100%; background: linear-gradient(90deg, #71717a, #e4e4e7); }
.gr-v, .gr-trend, .gr-seg-pill { display: inline-block; padding: 2px 9px; border-radius: 999px; font-size: 11.5px; font-weight: 500; white-space: nowrap; background: #18181b; color: var(--ink-2); border: 1px solid #26262b; }
.gr-v.focus { background: var(--paid-bg); color: var(--paid); border-color: rgba(92, 207, 158, .2); }
.gr-v.rising, .gr-trend.up { color: var(--paid); }
.gr-v.slow, .gr-v.cooling, .gr-trend.down { color: var(--due); }
.gr-trend.plan { color: #c4b5fd; }
.gr-trend { background: transparent; border-color: transparent; padding-left: 0; }
.gr-tr { display: flex; align-items: center; gap: 10px; }
.gr-pair { display: inline-flex; align-items: flex-end; gap: 3px; height: 22px; }
.gr-pair i { width: 8px; min-height: 2px; border-radius: 2px; background: #3f3f46; }
.gr-pair i.now { background: #e4e4e7; }
.gr-grid2 { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; margin-top: 18px; }
@media (max-width: 1100px) { .gr-grid2 { grid-template-columns: 1fr; } }
.gr-map { position: relative; }
.gr-map svg { width: 100%; height: auto; display: block; }
.gr-dot { cursor: default; }
.gr-dot:hover circle { stroke: #fafafa; }
.gr-tip { width: 220px; white-space: normal; line-height: 1.5; }
.gr-tip b { font-size: 13px; }
.gr-segs { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.gr-segs li { padding: 12px 14px; border-radius: 11px; border: 1px solid var(--glass-line); background: #0c0c0e; }
.gr-seg-h { display: flex; align-items: center; gap: 8px; }
.gr-seg-h i { width: 8px; height: 8px; border-radius: 50%; background: #71717a; flex: none; }
.gr-seg-h b { font-size: 13.5px; font-weight: 600; }
.gr-seg-v { margin-left: auto; font-size: 13.5px; font-weight: 600; }
.gr-segs li.good .gr-seg-h i, .gr-seg-pill.good::before { background: var(--paid); }
.gr-segs li.warn .gr-seg-h i, .gr-seg-pill.warn::before { background: var(--due); }
.gr-segs li.calm .gr-seg-h i, .gr-seg-pill.calm::before { background: #a1a1aa; }
.gr-segs li.good .gr-bar i { background: var(--paid); }
.gr-segs li.warn .gr-bar i { background: var(--due); }
.gr-segs p { margin: 0; font-size: 12.5px; line-height: 1.5; color: var(--ink-2); }
.gr-seg-pill { display: inline-flex; align-items: center; gap: 6px; }
.gr-seg-pill::before { content: ''; width: 6px; height: 6px; border-radius: 50%; background: #52525b; }
.gr-ind { width: 170px; padding: 6px 9px; border-radius: 8px; border: 1px solid #26262b; background: #0c0c0e; color: var(--ink); font: inherit; font-size: 13px; }
.gr-ind:focus { outline: none; border-color: #52525b; }
.gr-ind::-webkit-calendar-picker-indicator { opacity: .4; }
@media (max-width: 700px) { .gr-plan-h { flex-direction: column; } }

/* budget: clearer inputs and upcoming detail */
.bg-bill-h { display: grid; grid-template-columns: minmax(0, 1.3fr) minmax(0, 1fr) 70px 26px; gap: 6px; font-size: 11.5px; color: var(--ink-3); margin: 4px 0 4px; }
.bg-up2 li { display: block !important; }
.bg-up-main { display: grid; grid-template-columns: 64px minmax(0, 1fr) 80px 40px 90px; align-items: center; gap: 12px; }
.bg-up-main time { color: #c4b5fd; font-weight: 600; }
.bg-up-main em { font-style: normal; font-size: 12px; color: var(--ink-3); text-align: right; }
.bg-up-main > b:last-child { text-align: right; font-variant-numeric: tabular-nums; }
.bg-up-why em { font-style: normal; }
.bg-up-why { display: flex; flex-wrap: wrap; gap: 4px 16px; margin: 8px 0 0 76px; font-size: 12px; color: var(--ink-3); }
.bg-up-why span { white-space: nowrap; }
@media (max-width: 700px) { .bg-up-why { margin-left: 0; } .bg-up-why span + span::before { display: none; } .bg-up-main { grid-template-columns: 54px minmax(0,1fr) auto; } .bg-up-main .bg-bar, .bg-up-main em { display: none; } }
.bg-covered { margin: 0 20px 14px; padding: 12px 14px; border-radius: 10px; background: var(--paid-bg); border: 1px solid rgba(92, 207, 158, .2); display: flex; flex-direction: column; gap: 3px; font-size: 13px; }
.bg-covered b { color: var(--paid); }
.bg-covered span { color: var(--ink-2); }

/* invoices page */
.iv-top-actions { margin-left: auto; display: flex; gap: 8px; align-items: center; }
.iv-bar { display: flex; align-items: flex-end; gap: 12px; border-bottom: 1px solid var(--glass-line); padding-right: 14px; }
.iv-bar .tabs { border-bottom: 0; flex: 1; min-width: 0; }
.iv-bar input { width: 220px; margin: 8px 0; padding: 8px 11px; border-radius: 9px; border: 1px solid #26262b; background: #0c0c0e; color: var(--ink); font: inherit; font-size: 13px; }
.iv-help { margin: 0 !important; padding: 10px 20px; border-bottom: 1px solid var(--glass-line); }
.ivrow { display: grid; grid-template-columns: 32px minmax(130px, .9fr) minmax(0, 1.6fr) 140px 96px auto; gap: 14px; align-items: center; padding: 13px 18px; border-bottom: 1px solid var(--glass-line); }
.ivrow[data-inv] { cursor: pointer; }
.ivrow:last-child { border-bottom: 0; }
.ivrow:not(.head):hover { background: #141416; }
.ivrow.head { padding-top: 10px; padding-bottom: 10px; font-size: 12px; color: var(--ink-3); font-weight: 500; }
.ivrow.head .r { text-align: right; }
.ivrow .avatar { width: 32px; height: 32px; border-radius: 9px; font-size: 11px; font-weight: 600; }
.iv-who { display: flex; flex-direction: column; min-width: 0; line-height: 1.35; }
.iv-who b { font-weight: 550; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-who span { font-size: 12.5px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-work { min-width: 0; font-size: 13px; color: var(--ink-2); display: flex; flex-direction: column; gap: 3px; }
.iv-work, .iv-work em { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.iv-work em { font-style: normal; font-size: 12px; color: var(--ink-3); }
.iv-work em b { font-weight: 500; }
.iv-amt { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; display: flex; flex-direction: column; align-items: flex-end; }
.iv-amt em { font-style: normal; font-size: 11.5px; font-weight: 500; color: var(--ink-3); }
.iv-act { display: flex; align-items: center; justify-content: flex-end; gap: 4px; min-width: 128px; }
.iv-act .menu a { display: block; padding: 8px 12px; color: var(--ink); text-decoration: none; font-size: 13px; border-radius: 7px; }
.iv-act .menu a:hover { background: #1c1c20; }
.st.plan i { background: #a78bfa; }
.st.paid i { background: var(--paid); }
.warn-t { color: var(--due); }
.iv-cal { display: inline-block; margin: 6px 0 0; }
@media (max-width: 1100px) { .iv-bar { flex-wrap: wrap; padding: 0 14px 0 0; } .iv-bar input { width: 100%; margin: 0 0 10px 14px; } }
@media (max-width: 760px) {
  .ivrow { grid-template-columns: 32px minmax(0, 1fr) auto; row-gap: 8px; }
  .ivrow.head { display: none; }
  .iv-work { grid-column: 2 / 4; }
  .iv-st { grid-column: 2; }
  .iv-amt { grid-column: 3; grid-row: 1; }
  .iv-act { grid-column: 2 / 4; justify-content: flex-start; min-width: 0; }
}
.iv-more { display: block; padding: 12px 4px 2px; font-size: 13px; color: var(--ink-2); text-decoration: none; } .iv-more:hover { color: var(--ink); }
.iv-l1 { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .stat-strip.four { grid-template-columns: repeat(4, minmax(0, 1fr)); } @media (max-width: 900px) { .stat-strip.four { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
a.cv-btn { display: block; text-decoration: none; transition: background .15s; } a.cv-btn:hover { background: #27272a; }
.rx-explain { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; margin: 18px 0; }
.rx-explain > div { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; border: 1px solid var(--glass-line); background: #0c0c0e; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.rx-explain b { flex: none; width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; font-size: 12px; background: #1c1c20; color: var(--ink); }
.rx-explain strong { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; }
.rx-explain em { font-style: normal; color: var(--ink); }
@media (max-width: 900px) { .rx-explain { grid-template-columns: 1fr; } }
/* welcome: account type */
.acct { border: 0; padding: 0; margin: 0 0 18px; display: grid; gap: 8px; }
.acct legend { font-size: 13px; font-weight: 600; margin-bottom: 8px; color: var(--ink); padding: 0; }
.acct-opt { display: flex; gap: 12px; padding: 13px 14px; border-radius: 12px; border: 1px solid #27272a; background: #0c0c0e; cursor: pointer; transition: border-color .15s; }
.acct-opt:has(input:checked) { border-color: #d4d4d8; background: #131316; }
.acct-opt input { margin: 3px 0 0; accent-color: #fafafa; flex: none; width: auto; }
.acct-opt b { display: block; font-size: 14px; font-weight: 600; color: var(--ink); }
.acct-opt em { display: block; font-style: normal; font-size: 12.5px; color: var(--ink-3); line-height: 1.45; margin-top: 2px; }
.gr-biz-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; }
@media (max-width: 1000px) { .gr-biz-grid { grid-template-columns: 1fr; } }
.gr-h3 { margin: 0 0 12px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.gr-aging { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.gr-aging li { display: grid; grid-template-columns: 130px minmax(0, 1fr) 90px 24px; gap: 12px; align-items: center; font-size: 13px; color: var(--ink-2); }
.gr-aging .gr-bar { margin: 0; min-width: 0; }
.gr-aging b { text-align: right; font-variant-numeric: tabular-nums; font-weight: 600; color: var(--ink); }
.gr-aging em { font-style: normal; color: var(--ink-3); font-size: 12px; text-align: right; }
.gr-aging li.current .gr-bar i { background: var(--paid); }
.gr-aging li.d30 .gr-bar i { background: var(--due); }
.gr-aging li.d60 .gr-bar i, .gr-aging li.d90 .gr-bar i, .gr-aging li.d90p .gr-bar i { background: var(--late); }
.gr-cstats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.gr-cstats div { padding: 10px 12px; border-radius: 10px; background: #0c0c0e; border: 1px solid var(--glass-line); }
.gr-cstats b { display: block; font-size: 18px; font-weight: 600; }
.gr-cstats span { font-size: 11.5px; color: var(--ink-3); line-height: 1.35; display: block; }
@media (max-width: 700px) { .gr-cstats { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
.gr-co td, .gr-co th { padding-top: 8px !important; padding-bottom: 8px !important; }
.gr-auto { margin-left: 6px; font-size: 10.5px; padding: 1px 6px; border-radius: 5px; background: #1c1c20; color: var(--ink-3); vertical-align: middle; }
.gr-up { font-size: 12px; color: var(--paid); }
.mode-block:empty { display: none; }
.mode-block { margin-bottom: 26px; }
.mb-biz { display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; }
@media (max-width: 1000px) { .mb-biz { grid-template-columns: 1fr; } }
.mb-h { display: flex; justify-content: space-between; align-items: baseline; margin-bottom: 12px; }
.mb-h h2 { margin: 0; }
.mb-opps { margin: 0; padding: 0; list-style: none; counter-reset: o; display: flex; flex-direction: column; gap: 8px; }
.mb-opps li { counter-increment: o; position: relative; padding: 11px 12px 11px 44px; border-radius: 10px; background: #0c0c0e; border: 1px solid var(--glass-line); display: flex; flex-direction: column; gap: 2px; }
.mb-opps li::before { content: counter(o); position: absolute; left: 13px; top: 12px; width: 20px; height: 20px; border-radius: 6px; display: grid; place-items: center; font-size: 11.5px; font-weight: 600; background: #fafafa; color: #09090b; }
.mb-opps b { font-size: 13.5px; font-weight: 600; }
.mb-opps span { font-size: 12px; color: var(--ink-3); }
.mb-quick { display: flex; flex-direction: column; gap: 12px; }
.mb-quick h2 { margin: 0 0 2px; }
.mb-quick p { margin: 0; }
.mb-row { display: flex; gap: 10px; }
.mb-row input { flex: 1; min-width: 0; padding: 12px 14px; border-radius: 11px; border: 1px solid #27272a; background: #0c0c0e; color: var(--ink); font: inherit; font-size: 14px; }
.mb-row input:focus { outline: none; border-color: #52525b; }
@media (max-width: 640px) { .mb-row { flex-direction: column; } }
/* settings refresh */
.set-nav-g { display: block; margin: 14px 0 4px; padding: 0 12px; font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--ink-3); font-weight: 600; }
.set-nav-g:first-child { margin-top: 0; }
.acct-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 16px 22px; border-bottom: 1px solid var(--glass-line); }
@media (max-width: 760px) { .acct-cards { grid-template-columns: 1fr; } }
.acct-card { position: relative; display: flex; flex-direction: column; gap: 6px; padding: 16px 16px 14px; border-radius: 13px; border: 1px solid #27272a; background: #0c0c0e; cursor: pointer; transition: border-color .15s, background .15s; }
.acct-card input { position: absolute; opacity: 0; pointer-events: none; }
.acct-card b { font-size: 14.5px; font-weight: 600; }
.acct-card span { font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.acct-card em { font-style: normal; font-size: 11.5px; color: var(--ink-3); margin-top: 4px; }
.acct-card.on { border-color: #d4d4d8; background: #131316; }
.acct-card.on::after { content: ''; position: absolute; top: 16px; right: 16px; width: 9px; height: 9px; border-radius: 50%; background: var(--paid); }
.acct-card:focus-within { outline: 2px solid #52525b; outline-offset: 2px; }
.set-foot .check.small { margin-right: auto; font-size: 12.5px; color: var(--ink-3); display: flex; gap: 6px; align-items: center; }
#btSelect { width: 100%; }
.bt-other-in { margin-top: 8px; width: 100%; }
.bt-preset { margin-top: 10px; padding: 0 !important; border: 0 !important; background: none !important; }
.bt-sum { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 14px; font-size: 12.5px; color: var(--ink-3); }
.bt-sum b { color: var(--ink-2); font-weight: 500; }
.bt-sum em { font-style: normal; font-size: 11.5px; padding: 1px 7px; border-radius: 5px; background: var(--paid-bg); color: var(--paid); }
.bt-more { margin-top: 8px; font-size: 12.5px; color: var(--ink-3); }
.bt-more summary { cursor: pointer; }
.bt-more .bt-items { margin-top: 8px; }
.cal-stats.three { grid-template-columns: repeat(3, minmax(0, 1fr)) !important; }
.cal-stats .cs-s { display: block; font-size: 12px; color: var(--ink-3); margin-top: 2px; }
.cal-legend { display: flex; flex-wrap: wrap; align-items: center; gap: 14px; font-size: 12.5px; color: var(--ink-3); }
.cal-legend span, .cal-rem { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.cal-legend i.k-due { background: var(--due); } .cal-legend i.k-paid { background: var(--paid); } .cal-legend i.k-recurring { background: #a1a1aa; } .cal-legend i.k-planned { background: #a78bfa; }
.cal-rem { margin-left: auto; padding: 6px 12px; border-radius: 999px; border: 1px solid #27272a; background: #0c0c0e; color: var(--ink-2); font: inherit; font-size: 12.5px; cursor: pointer; }
.cal-rem[aria-pressed=true] { border-color: #a78bfa; color: var(--ink); }
.auth-card .acct-opt { display: flex !important; flex-direction: row; align-items: flex-start; margin: 0 !important; font-weight: 400; }
.auth-card .acct-opt input[type=radio] { width: 16px !important; height: 16px; padding: 0 !important; margin: 3px 0 0 !important; flex: none; }
.auth-card .acct-opt > span { display: block; }
.auth-card .acct { gap: 8px; }
.mb-col { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.mb-col li a { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 10px; background: #0c0c0e; border: 1px solid var(--glass-line); color: inherit; text-decoration: none; } .mb-col li a:hover { border-color: #3f3f46; }
.mb-col li div { display: flex; flex-direction: column; min-width: 0; }
.mb-col li b { font-size: 13.5px; font-weight: 600; }
.mb-col li span { font-size: 12px; color: var(--ink-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mb-col li em { font-style: normal; }
.mb-quick { justify-content: flex-start; }

/* phones: nothing may push the page sideways; wide tables scroll inside their own box */
.panel, main > *, .grid > *, .rail, .col3-grid > * { min-width: 0; }
@media (max-width: 640px) {
  main { overflow-x: hidden; }
  .panel { max-width: 100%; }
  table.data { display: block; max-width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  table.data td, table.data th { white-space: nowrap; }
  .an-lists li, ul li.warn, ul li.good, ul li.info { max-width: 100%; box-sizing: border-box; }
}
/* phone: big money figures shrink to fit instead of wrapping a digit onto its own line */
@media (max-width: 640px) { .fig .v { font-size: clamp(20px, 6.4vw, 28px); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } }
.auth-card textarea { width: 100%; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--glass-line-2); background: #0e0e10; color: var(--ink); font-size: 14px; line-height: 1.45; resize: vertical; min-height: 64px; box-sizing: border-box; }
.auth-card textarea:focus { outline: none; border-color: #52525b; box-shadow: 0 0 0 3px rgba(161, 161, 170, 0.12); }
.auth-card textarea::placeholder { color: var(--ink-3); }
/* Settings: a business's own description and what the AI read from it */
#bizDesc { width: 100%; box-sizing: border-box; padding: 10px 12px; border-radius: 9px; border: 1px solid var(--glass-line-2); background: #0e0e10; color: var(--ink); font-size: 14px; line-height: 1.45; resize: vertical; min-height: 64px; }
#bizDesc:focus { outline: none; border-color: #52525b; }
.bp-read { margin-top: 12px; padding: 12px 14px; border-radius: 10px; border: 1px solid var(--glass-line); background: #0c0c0e; }
.bp-top { display: flex; flex-wrap: wrap; align-items: baseline; gap: 4px 8px; font-size: 13px; color: var(--ink-3); }
.bp-top b { color: var(--ink); font-weight: 600; font-size: 14px; }
.bp-top em { font-style: normal; }
.bp-read dl { display: grid; grid-template-columns: 1fr; gap: 12px; margin: 12px 0 10px; }
.bp-read dt { font-size: 11.5px; color: var(--ink-3); margin-bottom: 5px; }
.bp-read dd { margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.bp-read dd span { font-size: 12px; padding: 3px 9px; border-radius: 999px; background: #18181b; border: 1px solid #26262b; color: var(--ink-2); }
.bp-read p { margin: 0; }
/* hosted demo: the visitor's own private copy */
.nudge.space-note { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; color: var(--ink-2); background: #0e0e11; box-shadow: inset 0 0 0 1px var(--glass-line); }
.nudge.space-note a { color: var(--ink); font-weight: 600; }
.space-acts { display: flex; gap: 14px; align-items: center; }
.space-acts .linkbtn { font-size: 13px; color: var(--ink-3); }
.mb-ex { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; margin-top: 4px; }
.mb-ex .chip { text-align: left; font-size: 12.5px; padding: 7px 11px; border-radius: 9px; background: #121215; border: 1px solid var(--glass-line); color: var(--ink-2); cursor: pointer; }
.mb-ex .chip:hover { color: var(--ink); border-color: var(--glass-line-2); }
.auth-card .space-hint { margin: -6px 0 16px; padding: 10px 12px; border-radius: 9px; background: #0e0e11; box-shadow: inset 0 0 0 1px var(--glass-line); color: var(--ink-2); font-size: 13px; line-height: 1.5; }
