/* Quintleaf demo: same tokens and motion rules as the landing page. */
@font-face {
  font-family: "Inter Tight";
  src: url("../fonts/inter-tight-cyrillic-wght-normal.woff2") format("woff2-variations"), url("../fonts/inter-tight-cyrillic-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116;
}
@font-face {
  font-family: "Inter Tight";
  src: url("../fonts/inter-tight-latin-wght-normal.woff2") format("woff2-variations"), url("../fonts/inter-tight-latin-wght-normal.woff2") format("woff2");
  font-weight: 100 900; font-display: swap;
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --bg: #F4F6F1;
  --surface: #FFFFFF;
  --ink: #0C1F14;
  --ink-2: #2E3F35;
  --muted: #64716A;
  --line: rgba(12, 31, 20, .09);
  --line-2: rgba(12, 31, 20, .14);
  --green-950: #06180D;
  --green-900: #0A2A16;
  --green-800: #123A22;
  --green-600: #2A6B44;
  --green-500: #3C8A5A;
  --green-100: #E2EFE5;
  --green-50: #F0F7F2;
  --gold: #DAA950;
  --gold-600: #A9781F;
  --gold-100: #F6EBD2;
  --ok: #1F6B3F;   --ok-bg: #E2F0E6;
  --warn: #A3610D; --warn-bg: #FCEFD9;
  --none: #66716B; --none-bg: #ECEFEC;
  /* channels */
  --ch-email: #3B6588;   --ch-email-bg: #E5EDF4;
  --ch-viber: #6D4BB0;   --ch-viber-bg: #EEE8F8;
  --ch-drive: #1D7A70;   --ch-drive-bg: #DEF0EC;
  --ch-scan: #94661A;    --ch-scan-bg: #F6EBD2;
  --ch-courier: #B0532B; --ch-courier-bg: #F8E6DC;
  --ch-link: #123A22;    --ch-link-bg: #E2EFE5;
  --ch-portal: #8C3E5E;  --ch-portal-bg: #F6E5EC;
  --ease-out: cubic-bezier(0.23, 1, 0.32, 1);
  --ease-in-out: cubic-bezier(0.77, 0, 0.175, 1);
  --ease-drawer: cubic-bezier(0.32, 0.72, 0, 1);
  --side: 372px;
  --gut: 24px;
}

*, *::before, *::after { box-sizing: border-box; }
* { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: "Inter Tight", ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  font-size: 15px;
  line-height: 1.45;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  font-variant-numeric: tabular-nums;
}
svg { display: block; width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
img { display: block; }
button, select, input, textarea { font: inherit; color: inherit; }
button { background: none; border: 0; cursor: pointer; }
button:disabled { cursor: default; }
ul, ol { list-style: none; }
fieldset { border: 0; min-width: 0; }
b, strong { font-weight: 600; }
.muted { color: var(--muted); }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
:focus-visible { outline: 2px solid var(--gold-600); outline-offset: 2px; border-radius: 8px; }
[hidden] { display: none !important; }

/* ---------- Buttons ---------- */
.btn {
  position: relative;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 22px; border-radius: 999px;
  font-weight: 500; white-space: nowrap;
  transition: transform 160ms var(--ease-out), opacity 200ms ease;
}
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .45; transform: none; }
.btn--sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn--dark { color: #fff; background: linear-gradient(180deg, #1D3D2A, #0A2416); box-shadow: inset 0 1px 0 rgba(255,255,255,.14), 0 8px 18px -10px rgba(6,24,13,.6); }
.btn--ghost { color: var(--ink); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2); }
.btn svg { width: 16px; height: 16px; }
.btn-s {
  display: inline-flex; align-items: center; gap: 6px;
  height: 32px; padding: 0 12px; border-radius: 999px;
  font-size: 13px; font-weight: 500; white-space: nowrap;
  background: var(--surface); box-shadow: inset 0 0 0 1px var(--line-2);
  transition: transform 160ms var(--ease-out), background-color 200ms ease;
}
.btn-s svg { width: 15px; height: 15px; }
.btn-s:active { transform: scale(.97); }
.btn-s--dark { color: #fff; background: var(--green-900); box-shadow: none; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; color: var(--ink-2); transition: transform 160ms var(--ease-out), background-color 200ms ease; }
.icon-btn:active { transform: scale(.94); }
.link-btn { font-size: 13px; font-weight: 500; color: var(--green-800); text-decoration: underline; text-underline-offset: 3px; transition: opacity 160ms ease; }
.link-btn:disabled { opacity: .45; text-decoration: none; }
.chip { display: inline-flex; align-items: center; height: 24px; padding: 0 9px; border-radius: 999px; font-size: 12px; color: var(--ink-2); background: var(--bg); white-space: nowrap; }
.chip-btn {
  display: inline-flex; align-items: center; gap: 6px;
  min-height: 34px; padding: 0 13px; border-radius: 999px;
  font-size: 13.5px; font-weight: 500; color: var(--ink-2); white-space: nowrap;
  box-shadow: inset 0 0 0 1px var(--line-2);
  transition: background-color 180ms ease, color 180ms ease, transform 160ms var(--ease-out);
}
.chip-btn svg { width: 15px; height: 15px; }
.chip-btn small { font-size: 11px; opacity: .7; }
.chip-btn:active { transform: scale(.97); }
.chip-btn.is-on, .chip-btn.is-active { color: #fff; background: var(--green-900); box-shadow: none; }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

@media (hover: hover) and (pointer: fine) {
  .btn--dark:hover { opacity: .92; }
  .btn--ghost:hover, .btn-s:not(.btn-s--dark):hover { background: var(--green-50); }
  .btn-s--dark:hover { background: var(--green-800); }
  .icon-btn:hover { background: rgba(12,31,20,.06); }
  .chip-btn:not(.is-on):not(.is-active):hover { background: var(--green-50); }
  .clients tbody tr:hover, .inbox-table tbody tr:hover { background: #FAFBF8; }
  .office:hover { box-shadow: inset 0 0 0 1px var(--line-2), 0 10px 24px -18px rgba(6,24,13,.4); }
  .kpi--link:hover { box-shadow: inset 0 0 0 1px var(--line-2); }
  .fi:hover { background: #FAFBF8; }
  .link-btn:hover { opacity: .75; }
  .step:not(:disabled):hover { background: var(--green-50); }
  .demo-menu > button:hover, .demo-sims button:hover { background: var(--green-100); }
}

/* ---------- Top bar ---------- */
.top {
  position: sticky; top: 0; z-index: 20;
  display: grid; grid-template-columns: auto auto minmax(0, 1fr); align-items: center; gap: 16px 32px;
  height: 64px; padding: 0 var(--gut);
  background: rgba(244, 246, 241, .88);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 var(--line);
}
.top-brand { display: flex; align-items: center; gap: 12px; min-width: 0; }
.firm-badge { display: grid; place-items: center; flex: none; width: 38px; height: 38px; border-radius: 12px; font-size: 13px; font-weight: 700; color: #F3DFB4; background: linear-gradient(150deg, #1D4A2F, #0A2A16); }
.firm-badge--wide { width: 46px; font-size: 12px; letter-spacing: -.01em; }
.top-brand > div { min-width: 0; }
.top-brand b { display: block; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.top-brand small { display: flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); }
.top-right { display: flex; justify-content: flex-end; align-items: center; gap: 10px; min-width: 0; }
.login { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); white-space: nowrap; }
.login select { max-width: 270px; }
select {
  height: 40px; padding: 0 34px 0 14px; border: 0; border-radius: 999px;
  font-size: 14px; font-weight: 500; color: var(--ink);
  background: var(--surface) url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%232E3F35' stroke-width='2' stroke-linecap='round'><path d='m7 10 5 5 5-5'/></svg>") right 12px center / 16px no-repeat;
  box-shadow: inset 0 0 0 1px var(--line-2);
  appearance: none; cursor: pointer; text-overflow: ellipsis;
}

/* ---------- Segmented controls (tabs, filters): a clip-path copy marks the active one ---------- */
.seg { position: relative; display: inline-flex; gap: 2px; padding: 4px; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); max-width: 100%; }
.seg-btn { display: inline-flex; align-items: center; gap: 7px; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 14px; font-weight: 500; color: var(--ink-2); white-space: nowrap; transition: transform 160ms var(--ease-out); }
.seg-btn svg { width: 16px; height: 16px; }
button.seg-btn:active { transform: scale(.97); }
.seg-btn em { font-style: normal; font-size: 12px; color: var(--muted); }
.seg-btn em.em-gold { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; font-size: 11.5px; font-weight: 700; color: #5A3D07; background: var(--gold); }
.seg-overlay {
  position: absolute; inset: 4px; display: flex; gap: 2px; pointer-events: none;
  border-radius: 999px; background: var(--green-900);
  clip-path: inset(0 100% 0 0 round 999px);
  transition: clip-path 380ms var(--ease-out);
}
.seg-overlay .seg-btn { color: #fff; }
.seg-overlay .seg-btn em { color: rgba(255,255,255,.65); }
.seg-overlay .seg-btn em.em-gold { color: #5A3D07; }
.seg--wrap { flex-wrap: wrap; border-radius: 22px; }
.seg--wrap .seg-overlay { flex-wrap: wrap; }
.tabs .seg-btn { height: 38px; padding: 0 16px; font-size: 14.5px; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: minmax(0, 1fr) var(--side); gap: var(--gut); max-width: 1800px; margin: 0 auto; padding: var(--gut); align-items: start; }
.app--single { grid-template-columns: minmax(0, 1fr); }
.app--single .side { display: none; }
.work { min-width: 0; }
.view { transition: opacity 260ms var(--ease-out), transform 320ms var(--ease-out); }
@starting-style { .view { opacity: 0; transform: translateY(6px); } }

.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px 32px; }
.page-head h1 { font-size: 30px; font-weight: 500; letter-spacing: -0.03em; line-height: 1.1; }
.h-sub { margin-left: 6px; font-size: 18px; letter-spacing: -0.01em; color: var(--muted); }
.cycle { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 10px; margin-top: 10px; font-size: 14.5px; color: var(--ink-2); }
.cycle b { color: var(--ink); }
.dot-sep { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: var(--line-2); }
.tag { display: inline-flex; align-items: center; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 600; color: var(--ink-2); background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.tag--warn { color: var(--warn); background: var(--warn-bg); box-shadow: none; }
.lead { max-width: 560px; font-size: 14.5px; color: var(--muted); }
.lead b { color: var(--ink-2); }

/* ---------- KPIs ---------- */
.kpis { display: grid; grid-template-columns: 1.15fr .8fr .8fr .9fr 1.75fr; gap: 12px; margin-top: 20px; }
.kpi { display: flex; flex-direction: column; gap: 6px; min-width: 0; padding: 16px 18px; border-radius: 20px; background: var(--surface); text-align: left; transition: transform 160ms var(--ease-out), box-shadow 200ms ease, opacity 200ms ease; }
.kpi-k { font-size: 13px; font-weight: 500; color: var(--muted); }
.kpi-k small { font-weight: 400; }
.kpi-v { display: flex; align-items: baseline; gap: 6px; font-size: 36px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; }
.kpi-of { font-size: 17px; letter-spacing: 0; color: var(--muted); }
.kpi-pct { margin-left: auto; font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--ok); }
.kpi-v--warn { color: var(--warn); }
.kpi-v--gold { color: var(--gold-600); }
.kpi-foot { margin-top: auto; font-size: 12.5px; color: var(--muted); }
.kpi-foot b { color: var(--ink); }
.kpi-bar { height: 6px; border-radius: 99px; overflow: hidden; background: var(--green-100); }
.kpi-bar i { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--green-600), var(--green-500)); transform-origin: left; transform: scaleX(var(--p, 0)); transition: transform 700ms var(--ease-out); }
.kpi--link { cursor: pointer; }
.kpi--link:active, .kpi--btn:active { transform: scale(.98); }
.kpi--btn { cursor: pointer; box-shadow: inset 0 0 0 1px rgba(169,120,31,.25); background: linear-gradient(160deg, #FFFDF7, #FBF3E1); }
.kpi--btn:disabled { opacity: .6; transform: none; }
.kpi--btn .kpi-foot { color: var(--gold-600); }

/* Cycle chart: complete clients by day, bells on reminder days */
.kpi--chart { gap: 4px; }
.chart { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); align-items: end; gap: 6px; height: 84px; margin-top: auto; }
.bar { position: relative; display: flex; flex-direction: column; align-items: stretch; justify-content: flex-end; height: 100%; min-width: 0; }
.bar em { font-style: normal; font-size: 10.5px; font-weight: 600; line-height: 1; text-align: center; color: var(--muted); margin-bottom: 3px; }
.bar i { display: block; height: calc(var(--h) * 40px + 3px); border-radius: 4px; background: var(--green-500); opacity: .7; transition: height 600ms var(--ease-out); }
.bar.is-today i { background: var(--green-800); opacity: 1; }
.bar.is-today em { color: var(--ink); }
.bar.is-future i { height: 3px; background: var(--line-2); opacity: 1; }
.bar.is-deadline.is-future i { height: 40px; background: repeating-linear-gradient(135deg, rgba(163,97,13,.16) 0 4px, transparent 4px 8px); box-shadow: inset 0 0 0 1px rgba(163,97,13,.35); }
.bar b { margin-top: 4px; font-size: 10.5px; font-weight: 500; line-height: 1.1; text-align: center; color: var(--muted); white-space: nowrap; }
.bar.is-today b { color: var(--ink); font-weight: 700; }
.bar.is-deadline b { color: var(--warn); font-weight: 700; }
.rem { display: grid; place-items: center; height: 14px; margin-top: 2px; color: var(--muted); }
.rem svg { width: 11px; height: 11px; stroke-width: 2; }
.rem.is-done { color: var(--gold-600); }
.chart-foot { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 11.5px; color: var(--muted); }
.chart-foot span { display: inline-flex; align-items: center; gap: 4px; }
.chart-foot svg { width: 11px; height: 11px; color: var(--gold-600); }

/* Odometer */
.odo { display: inline-flex; height: 1em; overflow: hidden; }
.odo-d { display: block; height: 1em; overflow: hidden; }
.odo-strip { display: flex; flex-direction: column; transform: translateY(calc(var(--n, 0) * -10%)); transition: transform 900ms var(--ease-out); }
.odo-strip span { display: block; height: 1em; line-height: 1; }

/* ---------- Offices ---------- */
.offices { margin-top: 20px; }
.offices-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.offices-head h2 { font-size: 15px; font-weight: 600; }
.office-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 10px; }
.office-grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.office {
  display: grid; gap: 5px; padding: 12px 14px; border-radius: 16px; text-align: left; min-width: 0;
  background: var(--surface); box-shadow: inset 0 0 0 1px transparent;
  transition: box-shadow 200ms ease, transform 160ms var(--ease-out);
}
.office:active { transform: scale(.98); }
.office.is-active { box-shadow: inset 0 0 0 2px var(--green-800); }
.office-top { display: flex; align-items: center; gap: 8px; min-width: 0; }
.office-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.office-tag { display: inline-flex; align-items: center; gap: 4px; margin-left: auto; padding: 2px 7px 2px 5px; border-radius: 99px; font-size: 11px; font-weight: 600; color: var(--ch-scan); background: var(--ch-scan-bg); white-space: nowrap; }
.office-tag svg { width: 13px; height: 13px; }
.office-tag--lang { color: var(--ch-email); background: var(--ch-email-bg); }
#officesTitle small { font-size: 12.5px; font-weight: 400; letter-spacing: 0; }
.office-num { font-size: 13px; color: var(--muted); }
.office-num b { font-size: 15px; color: var(--ink); }
.office-bar { height: 5px; border-radius: 99px; overflow: hidden; background: var(--green-100); }
.office-bar i { display: block; height: 100%; background: var(--green-600); transform-origin: left; transform: scaleX(var(--p)); transition: transform 600ms var(--ease-out); }
.office-late { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.office-late.is-warn { color: var(--warn); }
.office-late.is-ok { color: var(--ok); }

.scope-note { display: flex; align-items: center; gap: 10px; margin-top: 18px; padding: 12px 16px; border-radius: 14px; font-size: 14px; color: var(--green-800); background: var(--green-100); }
.scope-note svg { color: var(--green-600); }

/* ---------- Toolbar ---------- */
.toolbar { display: flex; flex-wrap: wrap; align-items: center; gap: 10px 12px; margin-top: 22px; }
.search { flex: 1 1 200px; min-width: 0; height: 42px; padding: 0 16px; border: 0; border-radius: 999px; background: var(--surface); box-shadow: inset 0 0 0 1px var(--line); }
.search::placeholder { color: var(--muted); }
#bulkBtn { margin-left: auto; }

/* ---------- Tables ---------- */
.table-wrap { margin-top: 14px; border-radius: 22px; background: var(--surface); overflow: hidden; }
.clients, .inbox-table { width: 100%; border-collapse: collapse; }
.clients th, .inbox-table th { padding: 12px 14px; font-size: 12px; font-weight: 500; letter-spacing: .03em; text-align: left; color: var(--muted); border-bottom: 1px solid var(--line); white-space: nowrap; }
.clients td, .inbox-table td { position: relative; z-index: 0; padding: 12px 14px; vertical-align: middle; border-bottom: 1px solid var(--line); }
.clients tbody tr, .inbox-table tbody tr { cursor: pointer; transition: background-color 300ms ease; }
.clients tbody tr:last-child td, .inbox-table tbody tr:last-child td { border-bottom: 0; }
.clients tbody tr.is-phone td:first-child { box-shadow: inset 3px 0 0 var(--gold); }
/* One-shot highlight on update: an overlay that only fades (opacity) */
.is-updated > td::before { content: ""; position: absolute; inset: 0; z-index: -1; background: #E4F3E8; opacity: 0; animation: flash 1400ms ease; pointer-events: none; }
@keyframes flash { 0%, 30% { opacity: 1; } 100% { opacity: 0; } }
.c-name { display: flex; align-items: center; gap: 12px; min-width: 220px; }
.av { display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: 50%; font-size: 12px; font-weight: 600; color: var(--green-800); background: var(--green-100); }
.av svg { width: 18px; height: 18px; }
.av--lg { width: 48px; height: 48px; font-size: 15px; }
.av--lg svg { width: 22px; height: 22px; }
.av--gold { color: var(--gold-600); background: var(--gold-100); }
.av--ok { color: #fff; background: var(--green-600); }
.nm { display: flex; flex-direction: column; min-width: 0; line-height: 1.3; }
.nm b { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nm small, .c-status small, .c-rem small { font-size: 12.5px; color: var(--muted); }
.new-tag { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 99px; font-size: 11px; font-weight: 700; vertical-align: 1px; color: #5A3D07; background: var(--gold); }
.lang { margin-left: auto; padding: 3px 7px; border-radius: 6px; font-size: 11px; font-weight: 700; letter-spacing: .04em; color: var(--green-800); background: var(--green-100); }
.c-status { min-width: 190px; }
.c-status small { display: block; margin-top: 3px; max-width: 250px; }
.c-docs { white-space: nowrap; }
.c-docs b { display: inline-block; min-width: 34px; }
.tdots { display: inline-flex; flex-wrap: wrap; gap: 3px; max-width: 72px; margin-left: 4px; vertical-align: middle; }
.tdot { width: 7px; height: 7px; border-radius: 50%; box-shadow: inset 0 0 0 1.5px rgba(163,97,13,.55); }
.tdot.on { background: var(--green-500); box-shadow: none; }
.chs { display: inline-flex; gap: 3px; }
.c-ch .ch { width: 24px; height: 24px; }
.c-ch .ch svg { width: 13px; height: 13px; }
.c-rem { white-space: nowrap; font-size: 14px; }
.c-rem small { display: block; }
.opened { color: var(--ok); }
.c-act { white-space: nowrap; text-align: right; }
.c-act .btn-s + .icon-btn { margin-left: 2px; }
.empty { padding: 28px; text-align: center; }

.pill { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; transition: opacity 250ms var(--ease-out), transform 300ms var(--ease-out); }
@starting-style { .pill { opacity: 0; transform: scale(.94); } }
.pill--ok { color: var(--ok); background: var(--ok-bg); }
.pill--warn { color: var(--warn); background: var(--warn-bg); }
.pill--none { color: var(--none); background: var(--none-bg); }
.pill--gold { color: #7A5410; background: var(--gold-100); }
.pill--read { color: var(--ch-email); background: var(--ch-email-bg); }

/* ---------- Channels ---------- */
.ch { display: inline-grid; place-items: center; flex: none; width: 30px; height: 30px; border-radius: 50%; }
.ch svg { width: 16px; height: 16px; }
.ch--email { color: var(--ch-email); background: var(--ch-email-bg); }
.ch--viber { color: var(--ch-viber); background: var(--ch-viber-bg); }
.ch--drive { color: var(--ch-drive); background: var(--ch-drive-bg); }
.ch--scan { color: var(--ch-scan); background: var(--ch-scan-bg); }
.ch--courier { color: var(--ch-courier); background: var(--ch-courier-bg); }
.ch--link { color: var(--ch-link); background: var(--ch-link-bg); }
.ch--portal { color: var(--ch-portal); background: var(--ch-portal-bg); }
.ch-chip { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px 2px 2px; border-radius: 99px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); background: var(--bg); white-space: nowrap; }
.ch-chip .ch { width: 22px; height: 22px; }
.ch-chip .ch svg { width: 12px; height: 12px; }

/* ---------- Side panel ---------- */
.side { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.side-switch { width: 100%; }
.side-switch .seg-btn { flex: 1; justify-content: center; padding: 0 10px; font-size: 13.5px; }
.side-switch .seg-overlay .seg-btn { flex: 1; }
.side-inbox { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 22px; background: var(--surface); }
.live-head { display: flex; align-items: center; gap: 8px; }
.live-head b { font-size: 15px; }
.live-head .link-btn { margin-left: auto; }
.live-head small { font-size: 12.5px; color: var(--muted); }
.live-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--green-500); box-shadow: 0 0 0 4px var(--green-100); }
.live-sub { font-size: 13px; color: var(--muted); }
.chan-strip { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 4px; padding: 8px 6px; border-radius: 14px; background: var(--bg); }
.cs { display: inline-flex; align-items: center; justify-content: center; gap: 4px; font-size: 12.5px; }
.cs .ch { width: 22px; height: 22px; }
.cs .ch svg { width: 12px; height: 12px; }
.feed { display: grid; grid-template-columns: minmax(0, 1fr); }
.fi { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; padding: 10px 6px; border-top: 1px solid var(--line); border-radius: 10px; cursor: pointer; transition: opacity 300ms var(--ease-out), transform 420ms var(--ease-out), background-color 200ms ease; }
@starting-style { .fi { opacity: 0; transform: translateY(-8px); } }
.fi:first-child { border-top: 0; }
.fi-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 2px; min-width: 0; }
.fi-top { display: flex; align-items: baseline; gap: 8px; min-width: 0; }
.fi-top b { flex: 1; min-width: 0; font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi-top time { flex: none; font-size: 12px; color: var(--muted); }
.fi-main > small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fi-route { display: flex; align-items: flex-start; gap: 6px; margin-top: 2px; font-size: 12.5px; color: var(--ok); }
.fi-route svg { width: 14px; height: 14px; margin-top: 1px; }
.fi-route b { color: var(--ink); }
.fi-route--gold { color: var(--gold-600); }
.fi-route--muted { color: var(--muted); }
.fi-route span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
@starting-style { .fi-route { opacity: 0; transform: translateX(-4px); } }
.fi-route { transition: opacity 300ms var(--ease-out), transform 400ms var(--ease-out); }
.fi-reading { display: grid; gap: 4px; margin-top: 2px; font-size: 12.5px; color: var(--ch-email); }
.scanbar { display: block; height: 3px; border-radius: 99px; overflow: hidden; background: var(--ch-email-bg); }
.scanbar::after { content: ""; display: block; width: 40%; height: 100%; border-radius: inherit; background: var(--ch-email); animation: scan 1100ms linear infinite; }
.sim-row { display: grid; gap: 6px; padding-top: 10px; border-top: 1px dashed var(--line-2); }
.sim-row > span { font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.sim-btns { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; }
.sim-btns button { display: grid; justify-items: center; gap: 3px; padding: 6px 0 5px; border-radius: 12px; font-size: 11px; font-weight: 500; color: var(--ink-2); background: var(--bg); transition: transform 160ms var(--ease-out), background-color 200ms ease; }
.sim-btns button:active { transform: scale(.95); }
.sim-btns .ch { width: 26px; height: 26px; }
.sim-btns .ch svg { width: 14px; height: 14px; }

.side-phone { display: flex; flex-direction: column; align-items: center; gap: 12px; }
.side-head { width: 100%; display: grid; gap: 6px; }
.side-head select { width: 100%; }
.side-head p { font-size: 13px; }
.side-note { font-size: 12.5px; text-align: center; color: var(--muted); }
#phoneSlot { width: 100%; display: flex; justify-content: center; }

/* ---------- Inbox view ---------- */
.chan-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; margin-top: 20px; }
.chan-card { display: flex; flex-direction: column; gap: 8px; min-width: 0; padding: 16px; border-radius: 20px; background: var(--surface); }
.chan-head { display: flex; align-items: center; gap: 10px; min-width: 0; }
.chan-head > b { font-size: 15.5px; }
.chan-n { display: inline-flex; align-items: center; gap: 6px; margin-left: auto; font-size: 12.5px; color: var(--muted); white-space: nowrap; }
.chan-n b { color: var(--ink); }
.chan-card p { font-size: 13.5px; color: var(--ink-2); }
.chan-foot { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px; margin-top: auto; padding-top: 6px; }
.chan-foot code { min-width: 0; font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chan-btns { display: inline-flex; align-items: center; gap: 10px; margin-left: auto; }
.inbox-stats { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 18px; margin-top: 16px; font-size: 13.5px; color: var(--muted); }
.inbox-stats b { color: var(--ink); }
.inbox-table td { font-size: 14px; }
.ir { transition: opacity 320ms var(--ease-out); }
@starting-style { .ir { opacity: 0; } }
.i-when { white-space: nowrap; color: var(--muted); font-size: 13px !important; }
.i-doc, .i-to { max-width: 320px; }
.i-doc b, .i-to b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.i-doc small, .i-to small { display: block; font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.i-note { font-size: 13px; color: var(--muted); }
.more { display: flex; justify-content: center; margin-top: 14px; }

/* ---------- New clients ---------- */
#viewIntake .page-head { align-items: center; }
.intake-grid { display: grid; grid-template-columns: minmax(0, 1fr) 360px; gap: var(--gut); align-items: start; margin-top: 20px; }
.site-card { border-radius: 24px; background: var(--surface); box-shadow: 0 30px 60px -45px rgba(6,24,13,.45); overflow: hidden; }
.site-bar { display: flex; align-items: center; gap: 6px; height: 40px; padding: 0 16px; background: #EEF1EC; box-shadow: inset 0 -1px 0 var(--line); }
.site-bar i { width: 10px; height: 10px; border-radius: 50%; background: rgba(12,31,20,.14); }
.site-bar span { margin-left: 10px; padding: 3px 12px; border-radius: 99px; font-size: 12px; color: var(--muted); background: var(--surface); }
.site-bar em { margin-left: auto; font-style: normal; font-size: 11.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.site-body { padding: 24px 28px 28px; }
.site-intro { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.site-intro h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.site-intro p { margin-top: 6px; font-size: 14.5px; }
.q-sec { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); display: grid; gap: 12px; }
.q-sec legend { display: flex; align-items: center; gap: 10px; float: left; width: 100%; margin-bottom: 2px; font-size: 15.5px; font-weight: 600; }
.q-sec legend span { display: grid; place-items: center; width: 24px; height: 24px; border-radius: 50%; font-size: 12px; font-weight: 700; color: var(--green-800); background: var(--green-100); }
.q-field { display: grid; gap: 6px; font-size: 13.5px; color: var(--ink-2); }
.q-field > span { font-weight: 500; }
.q-field input, .q-field textarea { width: 100%; padding: 10px 14px; border: 0; border-radius: 14px; font-size: 15px; color: var(--ink); background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); resize: vertical; }
.q-field input { height: 44px; border-radius: 999px; }
.q-field input::placeholder, .q-field textarea::placeholder { color: var(--muted); }
.q-row { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 16px; font-size: 14.5px; }
.q-row > span:first-child { display: grid; color: var(--ink-2); }
.q-row small { font-size: 12px; color: var(--muted); }
.q-two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.q-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px 40px; }
.q-row--start { justify-content: flex-start; }
.q-hint, .q-note { font-size: 12.5px; color: var(--muted); }
.q-note { display: inline-flex; align-items: center; gap: 6px; color: var(--ch-scan); }
.q-note svg { width: 15px; height: 15px; }
.office-pick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.office-pick .chip-btn { justify-content: center; flex-direction: column; gap: 0; min-height: 46px; padding: 4px 8px; border-radius: 14px; line-height: 1.15; }
.office-pick .chip-btn small { display: inline-flex; align-items: center; gap: 3px; margin-top: 2px; font-size: 10.5px; }
.office-pick .chip-btn small svg { width: 12px; height: 12px; }
.q-submit { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--line); }
.q-submit small { font-size: 13px; }

.stepper { display: inline-flex; align-items: center; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.step { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 50%; color: var(--ink-2); background: var(--surface); box-shadow: 0 1px 2px rgba(6,24,13,.08); transition: transform 140ms var(--ease-out), opacity 160ms ease, background-color 160ms ease; }
.step:active { transform: scale(.92); }
.step:disabled { opacity: .35; transform: none; }
.step svg { width: 15px; height: 15px; stroke-width: 2.2; }
.stepper input, .stepper b { width: 46px; height: 32px; border: 0; font-size: 15px; font-weight: 600; text-align: center; background: none; -moz-appearance: textfield; display: grid; place-items: center; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.stepper--sm .step { width: 28px; height: 28px; }
.stepper--sm b { width: 32px; height: 28px; font-size: 14px; }
.yn { display: inline-flex; gap: 2px; padding: 3px; border-radius: 999px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line); }
.yn button { min-width: 54px; height: 32px; padding: 0 12px; border-radius: 999px; font-size: 13.5px; font-weight: 500; color: var(--ink-2); transition: background-color 180ms ease, color 180ms ease, transform 140ms var(--ease-out); }
.yn button:active { transform: scale(.96); }
.yn button.is-on { color: #fff; background: var(--green-900); }
.yn--sm button { min-width: 44px; height: 28px; font-size: 13px; }

.price-card { position: sticky; top: 88px; display: flex; flex-direction: column; gap: 6px; padding: 22px; border-radius: 24px; color: #E9F0EA; background: linear-gradient(170deg, #12321F, #071A0E 70%); box-shadow: 0 40px 70px -40px rgba(6,24,13,.7); }
.price-k { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: rgba(233,240,234,.6); }
.price-v { display: flex; align-items: baseline; gap: 4px; margin-top: 4px; font-size: 54px; font-weight: 500; letter-spacing: -0.04em; line-height: 1; color: #fff; }
.price-v .cur { font-size: 30px; color: #F3DFB4; }
.price-v .per { margin-left: 8px; font-size: 15px; letter-spacing: 0; color: rgba(233,240,234,.7); }
.price-card > .muted { color: rgba(233,240,234,.55); font-size: 12.5px; }
.price-lines { display: grid; gap: 2px; margin-top: 14px; padding-top: 12px; border-top: 1px solid rgba(255,255,255,.1); }
.pl { display: flex; justify-content: space-between; gap: 12px; padding: 4px 0; font-size: 13.5px; color: rgba(233,240,234,.82); transition: opacity 260ms var(--ease-out), transform 360ms var(--ease-out); }
@starting-style { .pl { opacity: 0; transform: translateY(-4px); } }
.pl b { flex: none; color: #fff; font-weight: 600; }
.sample-note { display: grid; gap: 3px; margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-size: 12.5px; color: #5A3D07; background: #F3DFB4; }
.sample-note b { font-size: 11.5px; letter-spacing: .06em; text-transform: uppercase; }
.price-expect { display: grid; gap: 8px; margin-top: 16px; }
.price-expect ul { display: flex; flex-wrap: wrap; gap: 5px; }
.pe { display: inline-flex; align-items: center; gap: 5px; padding: 4px 10px 4px 7px; border-radius: 99px; font-size: 12.5px; color: #fff; background: rgba(255,255,255,.08); transition: opacity 260ms var(--ease-out), transform 360ms var(--ease-out); }
@starting-style { .pe { opacity: 0; transform: translateX(-4px); } }
.pe svg { width: 12px; height: 12px; color: #9ED0AE; stroke-width: 2.6; }
.price-expect > .muted { color: rgba(233,240,234,.55); font-size: 12px; }

.q-done { display: grid; justify-items: start; gap: 10px; padding-top: 36px; padding-bottom: 40px; }
.q-done-ic { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 50%; color: #fff; background: var(--green-600); transition: transform 500ms var(--ease-out), opacity 300ms ease; }
@starting-style { .q-done-ic { transform: scale(.7); opacity: 0; } }
.q-done-ic svg { width: 26px; height: 26px; stroke-width: 2.6; }
.q-done h2 { font-size: 24px; font-weight: 600; letter-spacing: -0.02em; }
.q-done p { font-size: 15px; }
.q-done-act { display: flex; flex-wrap: wrap; gap: 10px; margin-top: 8px; }

.q-list-lead { margin-top: 18px; font-size: 14.5px; color: var(--muted); max-width: 760px; }
.q-list-lead b { color: var(--ink); }
.q-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; margin-top: 14px; }
.q-card { display: flex; flex-direction: column; gap: 12px; min-width: 0; padding: 18px; border-radius: 22px; background: var(--surface); transition: opacity 300ms var(--ease-out), transform 420ms var(--ease-out); }
@starting-style { .q-card { opacity: 0; transform: translateY(8px) scale(.98); } }
.q-card.is-client { background: #FBFCFA; box-shadow: inset 0 0 0 1px var(--line); }
.q-card header { display: flex; align-items: center; gap: 12px; }
.q-card header > div { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; flex: 1; }
.q-card header b { font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-card header small { font-size: 12.5px; color: var(--muted); }
.q-activity { font-size: 14px; color: var(--ink-2); }
.q-facts { display: flex; flex-wrap: wrap; gap: 5px; }
.q-meta { display: grid; grid-template-columns: repeat(auto-fit, minmax(0, 1fr)); gap: 10px; padding: 12px 14px; border-radius: 16px; background: var(--bg); }
.q-meta span { display: grid; min-width: 0; }
.q-meta small { font-size: 11.5px; color: var(--muted); }
.q-meta b { font-size: 14.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.q-meta em { font-style: normal; font-weight: 500; font-size: 12px; color: var(--muted); }
.q-card footer { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 8px; margin-top: auto; }
.q-price { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-top: 20px; padding: 16px 18px; border-radius: 18px; color: #E9F0EA; background: var(--green-900); }
.q-price span { display: grid; font-size: 13px; }
.q-price span small { font-size: 12px; color: rgba(233,240,234,.6); }
.q-price b { font-size: 30px; font-weight: 500; letter-spacing: -0.03em; color: #fff; }
.q-price b small { font-size: 14px; letter-spacing: 0; color: rgba(233,240,234,.7); }
.q-dl { display: grid; border-radius: 16px; background: var(--surface); overflow: hidden; }
.q-dl div { display: grid; grid-template-columns: 44% 1fr; gap: 12px; padding: 10px 14px; border-top: 1px solid var(--line); font-size: 14px; }
.q-dl div:first-child { border-top: 0; }
.q-dl dt { color: var(--muted); }
.q-dl dd { font-weight: 500; }
.dr-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.m-items { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px; }
.m-items li { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 12px; font-size: 13.5px; background: var(--bg); }
.m-items svg { width: 15px; height: 15px; color: var(--green-600); }
.dr-sec .m-items li { background: var(--surface); }

/* ---------- Layers: drawer, modal, phone overlay ---------- */
.layer { position: fixed; inset: 0; z-index: 50; }
.layer-scrim { position: absolute; inset: 0; background: rgba(6, 24, 13, .32); opacity: 0; transition: opacity 300ms ease; }
.layer.is-open .layer-scrim { opacity: 1; }

.drawer-panel {
  position: absolute; top: 0; right: 0; bottom: 0;
  width: min(600px, 100%); overflow-y: auto; overscroll-behavior: contain;
  padding: 24px 26px 32px;
  background: var(--bg);
  box-shadow: -30px 0 60px -30px rgba(6,24,13,.4);
  transform: translateX(100%);
  transition: transform 420ms var(--ease-drawer);
}
.layer--drawer.is-open .drawer-panel { transform: none; }
.dr-head { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: start; }
.dr-head h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.2; }
.dr-head p { margin-top: 4px; font-size: 13.5px; }
.dr-k { font-size: 12px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase; color: var(--muted); }
.dr-ways { display: grid; gap: 8px; margin-top: 18px; padding: 14px 16px; border-radius: 18px; background: var(--surface); }
.dr-pickup { display: flex; flex-wrap: wrap; align-items: center; gap: 10px; margin-top: 4px; padding: 10px 12px; border-radius: 14px; color: var(--ch-scan); background: var(--ch-scan-bg); }
.dr-pickup > span { display: grid; flex: 1; min-width: 180px; }
.dr-pickup b { font-size: 13.5px; color: #5A3D07; }
.dr-pickup small { font-size: 12.5px; }
.dr-sec { margin-top: 24px; }
.dr-sec h3 { margin-bottom: 10px; font-size: 15.5px; font-weight: 600; }
.dr-sec h3 .muted { font-weight: 400; }
.prof { display: grid; grid-template-columns: 1fr 1fr; border-radius: 18px; background: var(--surface); overflow: hidden; }
.prof-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; min-height: 52px; padding: 8px 14px; font-size: 13.5px; border-top: 1px solid var(--line); }
.prof-row:nth-child(even) { border-left: 1px solid var(--line); }
.prof-row > span:first-child { display: grid; min-width: 0; color: var(--ink-2); }
.prof-row small { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.prof-row--wide { grid-column: 1 / -1; border-top: 0; align-items: flex-start; flex-direction: column; gap: 2px; }
.prof-row--wide + .prof-row { border-left: 0; }
.prof-row--wide ~ .prof-row:nth-child(even) { border-left: 0; }
.prof-row--wide ~ .prof-row:nth-child(odd) { border-left: 1px solid var(--line); }
.prof-row--wide > span:first-child { font-size: 12px; color: var(--muted); }
.prof-row--wide b { font-size: 14px; font-weight: 500; }
.dr-rule { display: flex; gap: 8px; margin-bottom: 10px; font-size: 13px; color: var(--green-800); }
.dr-rule svg { width: 15px; height: 15px; margin-top: 2px; color: var(--gold-600); }
.dr-list { display: grid; gap: 6px; }
.dr-type { padding: 10px 14px; border-radius: 14px; background: var(--surface); }
details.dr-type > summary { list-style: none; cursor: pointer; }
details.dr-type > summary::-webkit-details-marker { display: none; }
.dr-chs { display: inline-flex; gap: 2px; margin-left: auto; }
.dr-chs .ch { width: 22px; height: 22px; }
.dr-chs .ch svg { width: 12px; height: 12px; }
.dr-count { min-width: 86px; font-size: 12.5px; text-align: right; color: var(--muted); }
.dr-caret { color: var(--muted); }
.dr-caret svg { width: 16px; height: 16px; transition: transform 200ms var(--ease-out); }
details[open] .dr-caret svg { transform: rotate(90deg); }
.dr-type.is-missing { box-shadow: inset 0 0 0 1px rgba(163,97,13,.3); background: #FFFCF6; }
.dr-type.is-added { animation: added 1600ms var(--ease-out); }
@keyframes added { 0% { opacity: 0; transform: translateY(-6px) scale(.98); } 30% { opacity: 1; transform: none; } }
.dr-type-head { display: flex; align-items: center; gap: 10px; }
.dr-type-head b { font-size: 14.5px; }
.dr-type-head .pill { margin-left: auto; }
.dr-type-head .link-btn { margin-left: 4px; }
.tick { display: grid; place-items: center; flex: none; width: 22px; height: 22px; border-radius: 50%; color: #fff; background: var(--green-600); }
.tick svg { width: 13px; height: 13px; stroke-width: 2.6; }
.dr-type.is-missing .tick { background: none; box-shadow: inset 0 0 0 1.5px var(--warn); }
.dr-type ul { display: grid; gap: 2px; margin-top: 8px; }
.dr-doc { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 10px; align-items: center; padding: 8px 2px; border-top: 1px solid var(--line); }
.dr-doc .ch { width: 28px; height: 28px; }
.dr-doc .ch svg { width: 14px; height: 14px; }
.dr-doc-main { display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; line-height: 1.3; }
.dr-doc-main b { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-doc-main small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.dr-doc-main .dr-via { color: var(--ink-2); }
.dr-more { padding: 6px 2px 0 42px; font-size: 12.5px; color: var(--muted); border-top: 1px solid var(--line); }
.dr-rem { display: grid; gap: 6px; padding-left: 16px; border-left: 2px solid var(--green-100); }
.dr-rem li { font-size: 14px; color: var(--ink-2); }
.dr-next { margin-top: 10px; font-size: 13.5px; }
.dr-tip { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; color: var(--warn); background: var(--warn-bg); }
.dr-tip b { color: #6E3F05; }
.dr-link { display: grid; gap: 8px; margin-top: 24px; padding: 16px; border-radius: 18px; background: var(--surface); }
.dr-link-k { font-size: 12.5px; color: var(--muted); }
.dr-link code { font-family: ui-monospace, "SFMono-Regular", Consolas, monospace; font-size: 15px; color: var(--green-800); }
.dr-link-act { display: flex; flex-wrap: wrap; gap: 8px; }
.dr-note { display: flex; gap: 10px; align-items: flex-start; margin-top: 20px; padding: 14px 16px; border-radius: 14px; font-size: 13px; color: var(--green-800); background: var(--green-100); }
.dr-empty { margin-top: 24px; }

/* Review cards */
.rv { display: grid; grid-template-columns: 96px 1fr; gap: 16px; margin-top: 16px; padding: 16px; border-radius: 18px; background: var(--surface); }
.rv-paper { display: flex; flex-direction: column; gap: 7px; padding: 14px 12px; height: 124px; border-radius: 8px; background: #FBFBF7; box-shadow: inset 0 0 0 1px var(--line), 0 6px 14px -10px rgba(6,24,13,.4); transform: rotate(-2deg); }
.rv-paper i { height: 5px; border-radius: 3px; background: rgba(12,31,20,.12); }
.rv-paper i.short { width: 55%; }
.rv-main { display: grid; grid-template-columns: minmax(0, 1fr); gap: 8px; align-content: start; min-width: 0; }
.rv-main > b { font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-main .ch-chip { justify-self: start; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.rv-main p { font-size: 13px; }
.rv-conf { display: flex; align-items: center; gap: 10px; }
.rv-conf span { position: relative; flex: 1; height: 6px; border-radius: 99px; overflow: hidden; background: var(--gold-100); }
.rv-conf span::after { content: ""; position: absolute; inset: 0; background: var(--gold); transform-origin: left; transform: scaleX(var(--p)); border-radius: inherit; }
.rv-conf small { font-size: 12px; color: var(--gold-600); font-weight: 600; }
.rv-main label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.rv-main select { width: 100%; }
.rv-act { display: flex; justify-content: flex-end; }

/* Modal */
.layer--modal { display: grid; place-items: center; padding: 20px; }
.modal-panel {
  position: relative; width: min(640px, 100%); max-height: calc(100vh - 40px); overflow-y: auto;
  padding: 28px; border-radius: 28px; background: var(--surface);
  box-shadow: 0 40px 80px -30px rgba(6,24,13,.5);
  opacity: 0; transform: scale(.96);
  transition: opacity 200ms var(--ease-out), transform 260ms var(--ease-out);
}
.layer--modal.is-open .modal-panel { opacity: 1; transform: none; }
.modal-panel h2 { font-size: 22px; font-weight: 600; letter-spacing: -0.02em; }
.modal-panel > p.muted { margin-top: 6px; }
.m-head { display: grid; grid-template-columns: auto 1fr; gap: 14px; align-items: start; margin-bottom: 6px; }
.m-head .ch { width: 44px; height: 44px; }
.m-head .ch svg { width: 22px; height: 22px; }
.m-head p { margin-top: 4px; font-size: 14px; }
.m-row { display: flex; align-items: center; gap: 14px; margin-top: 16px; }
.m-k { display: inline-flex; align-items: center; gap: 6px; min-width: 76px; font-size: 13px; color: var(--muted); }
.m-k svg { width: 15px; height: 15px; }
.m-field { display: grid; gap: 8px; margin-top: 18px; font-size: 13px; color: var(--muted); }
.m-field > span { font-weight: 500; color: var(--ink-2); }
.m-field select { width: 100%; }
.check { display: flex; align-items: flex-start; gap: 12px; margin-top: 18px; padding: 12px 14px; border-radius: 14px; background: var(--ch-scan-bg); cursor: pointer; }
.check input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--green-800); }
.check span { display: grid; gap: 2px; }
.check b { display: inline-flex; align-items: center; gap: 6px; font-size: 14px; color: #5A3D07; }
.check b svg { width: 16px; height: 16px; }
.check small { font-size: 12.5px; color: var(--ch-scan); }
.msg {
  margin-top: 18px; padding: 16px 18px; border-radius: 18px 18px 18px 6px;
  font-size: 15px; line-height: 1.5; color: var(--green-950); background: #F3E6C6;
}
@starting-style { .msg { opacity: 0; filter: blur(3px); } }
.msg { transition: opacity 260ms var(--ease-out), filter 260ms var(--ease-out); }
.m-sample { margin-top: 16px; font-size: 13px; color: var(--muted); }
.m-sched { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 8px; margin-top: 14px; font-size: 12.5px; color: var(--muted); }
.m-sched-k { margin-right: 2px; font-weight: 600; color: var(--ink-2); }
.m-sched span:not(.m-sched-k) { display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 99px; background: var(--bg); }
.m-sched span svg { width: 12px; height: 12px; stroke-width: 2.4; }
.m-sched span small { font-size: 11.5px; opacity: .8; }
.m-sched span.is-done { color: var(--ok); background: var(--ok-bg); }
.m-sched span.is-next { color: var(--warn); background: var(--warn-bg); font-weight: 600; }
.m-sched em { flex-basis: 100%; font-style: normal; }
.m-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; margin-top: 24px; }
.modal-panel .m-items { margin-top: 14px; }

/* Viber: how the button behaves, the email/Viber split and the one-click queue */
.m-viber { display: flex; gap: 10px; align-items: flex-start; margin-top: 12px; padding: 10px 14px; border-radius: 14px; font-size: 12.5px; line-height: 1.5; color: #4A2F80; background: var(--ch-viber-bg); }
.m-viber svg { width: 16px; height: 16px; margin-top: 1px; color: var(--ch-viber); }
kbd { display: inline-block; padding: 0 6px; border-radius: 6px; font: inherit; font-size: 11.5px; font-weight: 600; color: var(--ink); background: #fff; box-shadow: inset 0 -1px 0 var(--line-2), inset 0 0 0 1px var(--line); }
.m-split { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }
.m-split span { display: inline-flex; align-items: center; gap: 6px; padding: 6px 12px; border-radius: 99px; font-size: 13px; }
.m-split svg { width: 15px; height: 15px; }
.m-split-email { color: var(--ch-email); background: var(--ch-email-bg); }
.m-split-viber { color: var(--ch-viber); background: var(--ch-viber-bg); }
.vq { display: grid; gap: 6px; max-height: 340px; margin-top: 16px; overflow-y: auto; }
.vq-row { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 14px; background: var(--bg); transition: background-color 200ms ease, opacity 200ms ease; }
.vq-row.is-cur { background: var(--ch-viber-bg); }
.vq-row.is-done { opacity: .72; }
.vq-main { display: grid; min-width: 0; line-height: 1.3; }
.vq-main b { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vq-main small { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vq .pill { display: inline-flex; align-items: center; gap: 4px; }
.vq .pill svg { width: 13px; height: 13px; stroke-width: 2.4; }
.vq-count { align-self: center; margin-right: auto; font-size: 13px; color: var(--muted); }

/* Phone (sizes in cqw of .device) */
/* The phone always fits the viewport height: width follows the height left under the panel header */
.device { width: min(320px, 100%, calc((100vh - 290px) * 9 / 18.6)); container-type: inline-size; }
.device-frame {
  position: relative; aspect-ratio: 9 / 18.6;
  padding: 3.2cqw; border-radius: 16cqw;
  background: linear-gradient(145deg, #2b312d, #0c0f0d 40%, #1d221f);
  box-shadow: inset 0 0 0 0.6cqw #3a413c, inset 0 0 0 1.4cqw #0b0d0c, 0 40px 70px -40px rgba(6,24,13,.55);
}
.device-island { position: absolute; z-index: 5; top: 5.6cqw; left: 50%; width: 28cqw; height: 8cqw; border-radius: 99px; background: #050605; translate: -50% 0; }
.screen {
  position: relative; height: 100%; overflow: hidden; border-radius: 13cqw;
  background: radial-gradient(120% 45% at 100% 0%, rgba(218,169,80,.22), transparent 60%), linear-gradient(180deg, #F1F5EF, #F7F2E6 60%, #F3F5F0);
}
.cp-status { position: relative; z-index: 4; display: flex; justify-content: space-between; align-items: center; height: 13cqw; padding: 1.4cqw 8cqw 0; font-size: 4cqw; font-weight: 600; }
.cp-sys { display: flex; gap: 1cqw; align-items: flex-end; }
.cp-sys i { width: 1.2cqw; border-radius: 1px; background: var(--ink); }
.cp-sys i:nth-child(1) { height: 1.6cqw; } .cp-sys i:nth-child(2) { height: 2.4cqw; } .cp-sys i:nth-child(3) { height: 3.2cqw; }
.cp-scroll { position: absolute; inset: 13cqw 0 0; overflow-y: auto; padding: 3cqw 5.5cqw 12cqw; scrollbar-width: none; }
.cp-scroll::-webkit-scrollbar { display: none; }
.cp-firm { display: flex; align-items: center; gap: 2.4cqw; font-size: 3.4cqw; color: var(--ink-2); }
.cp-firm img { width: 6.5cqw; height: 6.5cqw; }
.cp-title { margin-top: 4cqw; font-size: 7.4cqw; font-weight: 500; line-height: 1.1; letter-spacing: -0.03em; }
.cp-client { margin-top: 1.4cqw; font-size: 3.6cqw; color: var(--muted); }
.cp-prog { display: grid; gap: 2cqw; margin-top: 4cqw; padding: 3.6cqw; border-radius: 4.6cqw; background: rgba(255,255,255,.85); }
.cp-prog span { display: flex; justify-content: space-between; align-items: baseline; font-size: 3.6cqw; }
.cp-prog small { font-size: 3cqw; color: var(--warn); font-weight: 600; }
.cp-prog i { display: block; height: 1.6cqw; border-radius: 99px; background: linear-gradient(90deg, var(--green-600), var(--green-500)); transform-origin: left; transform: scaleX(var(--p)); transition: transform 700ms var(--ease-out); }
.cp-done { display: grid; justify-items: center; gap: 1.4cqw; margin-top: 4cqw; padding: 5cqw; border-radius: 4.6cqw; text-align: center; color: var(--ok); background: var(--ok-bg); }
.cp-done-ic { display: grid; place-items: center; width: 11cqw; height: 11cqw; border-radius: 50%; color: #fff; background: var(--green-600); transition: transform 500ms var(--ease-out), opacity 300ms ease; }
@starting-style { .cp-done-ic { transform: scale(.7); opacity: 0; } }
.cp-done-ic svg { width: 6cqw; height: 6cqw; stroke-width: 2.6; }
.cp-done b { font-size: 4.2cqw; }
.cp-done small { font-size: 3.2cqw; color: var(--ink-2); }
.cp-list { display: grid; gap: 1.8cqw; margin-top: 4cqw; }
.cp-list li { display: grid; grid-template-columns: 7cqw 1fr auto; align-items: center; gap: 2.6cqw; padding: 3cqw; border-radius: 4cqw; font-size: 3.5cqw; background: rgba(255,255,255,.85); }
.cp-ic { display: grid; place-items: center; width: 7cqw; height: 7cqw; border-radius: 50%; box-shadow: inset 0 0 0 0.45cqw rgba(163,97,13,.55); }
.cp-list li.is-ok .cp-ic { color: #fff; background: var(--green-600); box-shadow: none; }
.cp-ic svg { width: 4cqw; height: 4cqw; stroke-width: 2.6; transition: transform 360ms var(--ease-out), opacity 200ms ease; }
@starting-style { .cp-list li.is-ok .cp-ic svg { transform: scale(.5); opacity: 0; } }
.cp-list em { font-style: normal; font-size: 3cqw; font-weight: 600; color: var(--warn); }
.cp-list li.is-ok em { color: var(--ok); }
.cp-actions { display: grid; gap: 2.2cqw; margin-top: 4.4cqw; }
.cp-btn {
  display: flex; align-items: center; justify-content: center; gap: 2.4cqw;
  height: 13cqw; border-radius: 99px; font-size: 3.9cqw; font-weight: 500; cursor: pointer;
  background: #fff; box-shadow: inset 0 0 0 1px var(--line-2);
  transition: transform 160ms var(--ease-out);
}
.cp-btn svg { width: 5cqw; height: 5cqw; }
.cp-btn:active { transform: scale(.97); }
.cp-btn--dark { color: #fff; background: linear-gradient(180deg, #1D3D2A, #0A2416); box-shadow: none; }
.cp-link { justify-self: center; padding: 1.6cqw 3cqw; font-size: 3.3cqw; font-weight: 500; color: var(--green-800); text-decoration: underline; text-underline-offset: 0.8cqw; }
.cp-uploads { display: grid; gap: 1.8cqw; margin-top: 4cqw; }
.cp-k { font-size: 3cqw; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.cp-up { display: grid; grid-template-columns: 10cqw 1fr; gap: 2.6cqw; align-items: center; padding: 2.6cqw; border-radius: 4cqw; background: #fff; transition: opacity 300ms var(--ease-out), transform 400ms var(--ease-out); }
@starting-style { .cp-up { opacity: 0; transform: translateY(2cqw); } }
.cp-thumb { display: grid; place-items: center; width: 10cqw; height: 10cqw; overflow: hidden; border-radius: 2.4cqw; color: var(--green-600); background: var(--green-100); }
.cp-thumb img { width: 100%; height: 100%; object-fit: cover; }
.cp-thumb svg { width: 5cqw; height: 5cqw; }
.cp-up-main { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); min-width: 0; line-height: 1.3; }
.cp-up-main b { font-size: 3.3cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cp-up-main small { font-size: 3cqw; color: var(--muted); }
.cp-up.is-done .cp-up-main small { color: var(--ok); font-weight: 600; }
.cp-scan { display: block; height: 0.9cqw; margin-top: 1.4cqw; border-radius: 99px; overflow: hidden; background: var(--green-100); }
.cp-scan::after { content: ""; display: block; width: 40%; height: 100%; border-radius: inherit; background: var(--green-500); animation: scan 1100ms linear infinite; }
@keyframes scan { from { transform: translateX(-100%); } to { transform: translateX(250%); } }
.cp-also { margin-top: 4.4cqw; padding: 3cqw 3.4cqw; border-radius: 4cqw; font-size: 3.2cqw; text-align: center; color: var(--ink-2); background: rgba(255,255,255,.6); box-shadow: inset 0 0 0 1px var(--line); }
.cp-secure { display: flex; align-items: center; justify-content: center; gap: 1.6cqw; margin-top: 3.4cqw; font-size: 2.9cqw; color: var(--muted); }
.cp-secure svg { width: 3.6cqw; height: 3.6cqw; }
.cp-home { position: absolute; z-index: 4; left: 50%; bottom: 2.4cqw; width: 34cqw; height: 1.3cqw; translate: -50% 0; border-radius: 99px; background: var(--ink); }

/* Phone, firms with their own portal: the reminder in Viber or email, and what the client does next */
.vb-head { position: absolute; z-index: 3; top: 13cqw; left: 0; right: 0; display: flex; align-items: center; gap: 2.6cqw; padding: 2.4cqw 5cqw; background: rgba(255,255,255,.78); box-shadow: inset 0 -1px 0 var(--line); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.vb-head > svg { width: 5cqw; height: 5cqw; color: var(--muted); }
.vb-av { display: grid; place-items: center; flex: none; width: 9cqw; height: 9cqw; border-radius: 50%; font-size: 3.4cqw; font-weight: 600; color: #fff; background: var(--ch-viber); }
.vb-av--mail { background: var(--ch-email); }
.vb-av svg { width: 4.8cqw; height: 4.8cqw; }
.vb-who { display: grid; min-width: 0; line-height: 1.25; }
.vb-who b { font-size: 3.7cqw; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vb-who small { font-size: 2.9cqw; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.vb-scroll { top: 27cqw; bottom: 36cqw; padding: 3cqw 4.5cqw 4cqw; }
.vb-day { width: max-content; margin: 0 auto 3cqw; padding: 1cqw 3cqw; border-radius: 99px; font-size: 2.8cqw; color: var(--muted); background: rgba(255,255,255,.75); }
.vb-msg { max-width: 90%; padding: 3cqw 3.4cqw 2cqw; border-radius: 4.4cqw 4.4cqw 4.4cqw 1.2cqw; font-size: 3.3cqw; line-height: 1.42; background: #fff; box-shadow: 0 1px 0 var(--line); }
.vb-msg time { display: block; margin-top: 1cqw; font-size: 2.6cqw; text-align: right; color: var(--muted); }
.vb-msg--mail { max-width: none; border-radius: 3.4cqw; }
.vb-subj { display: block; margin-bottom: 1.4cqw; font-size: 3.5cqw; }
.vb-out { display: flex; align-items: center; gap: 2cqw; width: max-content; max-width: 82%; margin: 2.4cqw 0 0 auto; padding: 2.4cqw 3cqw; border-radius: 4.4cqw 4.4cqw 1.2cqw 4.4cqw; font-size: 3cqw; color: #fff; background: var(--ch-viber); transition: opacity 300ms var(--ease-out), transform 400ms var(--ease-out); }
.vb-out span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-out svg { width: 3.8cqw; height: 3.8cqw; }
.vb-note { display: flex; align-items: center; gap: 1.6cqw; width: max-content; max-width: 100%; margin: 2.4cqw auto 0; padding: 1.4cqw 3cqw; border-radius: 99px; font-size: 2.9cqw; color: var(--ok); background: var(--ok-bg); transition: opacity 300ms var(--ease-out), transform 400ms var(--ease-out); }
.vb-note span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.vb-note svg { width: 3.4cqw; height: 3.4cqw; stroke-width: 2.4; }
.vb-note.is-reading { color: var(--muted); background: rgba(255,255,255,.8); }
.vb-note--all { margin-top: 4cqw; padding: 2.4cqw 3.4cqw; border-radius: 4cqw; font-weight: 600; white-space: normal; }
.vb-note--all span { white-space: normal; }
@starting-style { .vb-out, .vb-note { opacity: 0; transform: translateY(2cqw); } }
.vb-actions { position: absolute; z-index: 3; left: 5cqw; right: 5cqw; bottom: 7cqw; display: grid; gap: 2.2cqw; }

/* Phone overlay */
.layer--phone { display: grid; place-items: center; padding: 16px; }
.phone-layer-panel { position: relative; width: min(340px, 100%, calc((100vh - 90px) * 9 / 18.6)); opacity: 0; transform: translateY(24px) scale(.98); transition: opacity 240ms var(--ease-out), transform 420ms var(--ease-drawer); }
.layer--phone.is-open .phone-layer-panel { opacity: 1; transform: none; }
.phone-close { position: absolute; z-index: 2; top: -44px; right: 0; color: #fff; background: rgba(6,24,13,.5); }
.phone-layer-panel .device { width: 100%; }

/* Toasts */
.toasts { position: fixed; z-index: 70; left: 20px; bottom: 62px; display: flex; flex-direction: column; align-items: flex-start; gap: 8px; pointer-events: none; }
.toast {
  display: flex; align-items: flex-start; gap: 12px;
  width: min(380px, calc(100vw - 48px)); padding: 14px 16px; border-radius: 18px;
  color: #EAF0EA; background: var(--green-950);
  box-shadow: 0 20px 40px -20px rgba(6,24,13,.6);
  opacity: 0; transform: translateY(14px) scale(.98);
  transition: opacity 260ms ease, transform 420ms var(--ease-drawer);
}
.toast.is-in { opacity: 1; transform: none; }
.toast.is-out { opacity: 0; transform: translateY(6px); transition-duration: 200ms; }
.toast b { display: block; font-size: 14px; color: #fff; }
.toast small { display: block; margin-top: 2px; font-size: 12.5px; color: rgba(234,240,234,.7); }
.toast-ic { display: grid; place-items: center; flex: none; width: 28px; height: 28px; border-radius: 50%; color: var(--green-950); background: #9ED0AE; }
.toast--remind .toast-ic { background: var(--gold); }
.toast--info .toast-ic { background: #F3DFB4; }
.toast--new .toast-ic { background: var(--gold); }
.toast--in .toast-ic { background: #BFD6E8; }
.toast-ic svg { width: 15px; height: 15px; stroke-width: 2.4; }

/* Presenter controls */
.demo { position: fixed; z-index: 60; left: 16px; bottom: 16px; }
.demo-btn { display: inline-flex; align-items: center; gap: 8px; height: 34px; padding: 0 14px; border-radius: 999px; font-size: 12.5px; font-weight: 600; color: var(--muted); background: rgba(255,255,255,.8); box-shadow: inset 0 0 0 1px var(--line-2); -webkit-backdrop-filter: blur(8px); backdrop-filter: blur(8px); transition: transform 160ms var(--ease-out); }
.demo-btn:active { transform: scale(.96); }
.demo-live { display: none; width: 7px; height: 7px; border-radius: 50%; background: var(--green-500); }
.demo-btn.is-live .demo-live { display: block; }
.demo-menu { position: absolute; left: 0; bottom: 44px; display: grid; gap: 6px; width: 280px; padding: 14px; border-radius: 18px; background: var(--surface); box-shadow: 0 20px 50px -20px rgba(6,24,13,.4), inset 0 0 0 1px var(--line); transform-origin: bottom left; transition: opacity 180ms var(--ease-out), transform 220ms var(--ease-out); }
@starting-style { .demo-menu { opacity: 0; transform: scale(.96); } }
.demo-k { margin-top: 4px; font-size: 11.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.demo-profiles { display: grid; gap: 4px; }
.demo-profiles a, .demo-menu > button { display: flex; align-items: center; gap: 8px; padding: 8px 10px; border-radius: 10px; font-size: 13.5px; text-align: left; color: var(--ink); text-decoration: none; transition: background-color 160ms ease, transform 140ms var(--ease-out); }
.demo-profiles a.is-on { color: #fff; background: var(--green-900); }
.demo-menu > button { background: var(--bg); }
.demo-menu > button:active, .demo-sims button:active { transform: scale(.98); }
.demo-menu > button svg { width: 15px; height: 15px; }
.demo-sims { display: grid; grid-template-columns: repeat(3, 1fr); gap: 4px; }
.demo-sims button { display: flex; align-items: center; gap: 6px; padding: 7px 8px; border-radius: 10px; font-size: 12.5px; background: var(--bg); transition: background-color 160ms ease, transform 140ms var(--ease-out); }
.demo-sims svg { width: 14px; height: 14px; color: var(--green-600); }
.demo-menu small { font-size: 11.5px; color: var(--muted); }
.demo-field { display: grid; gap: 4px; }
.demo-field input { height: 34px; padding: 0 10px; border: 0; border-radius: 10px; font-size: 13.5px; background: var(--bg); box-shadow: inset 0 0 0 1px var(--line-2); }
.demo-field input:focus-visible { outline-offset: 0; }

/* Startup: fade the work area in once, then stay still */
.work, .side { opacity: 0; transform: translateY(8px); transition: opacity 500ms var(--ease-out), transform 600ms var(--ease-out); }
.is-ready .work, .is-ready .side { opacity: 1; transform: none; }
.is-ready .side { transition-delay: 120ms; }

/* ---------- Responsive ---------- */
@media (max-width: 1500px) {
  :root { --side: 344px; }
  .clients td, .clients th { padding-left: 12px; padding-right: 12px; }
}
@media (max-width: 1380px) {
  .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .kpi--chart { grid-column: 1 / -1; flex-direction: row; align-items: center; gap: 18px; }
  .kpi--chart > .kpi-k { flex: none; width: 150px; display: grid; }
  .kpi--chart .chart { flex: 1; height: 70px; margin-top: 0; }
  .kpi--chart .chart-foot { flex: none; width: 170px; display: grid; }
  .bar i { height: calc(var(--h) * 30px + 3px); }
  .bar.is-deadline.is-future i { height: 30px; }
  .chan-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 1180px) {
  .app { grid-template-columns: 1fr; }
  .side { display: none; }
  .top { grid-template-columns: minmax(0, 1fr) auto; height: auto; padding-top: 10px; padding-bottom: 10px; row-gap: 10px; }
  .top .tabs { grid-column: 1 / -1; grid-row: 2; justify-self: start; }
  .top-right { grid-column: 2; grid-row: 1; }
  .top { column-gap: 16px; }
  .intake-grid { grid-template-columns: minmax(0, 1fr) 320px; }
  .office-pick { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .side { top: 128px; }
  .price-card { top: 128px; }
}
@media (max-width: 900px) {
  .office-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .intake-grid { grid-template-columns: 1fr; }
  .price-card { position: static; }
  .q-list { grid-template-columns: 1fr; }
  .kpi--chart { flex-direction: column; align-items: stretch; }
  .kpi--chart > .kpi-k, .kpi--chart .chart-foot { width: auto; }
}
@media (max-width: 760px) {
  :root { --gut: 16px; }
  .kpis { grid-template-columns: 1fr 1fr; }
  .chan-grid { grid-template-columns: 1fr; }
  .clients thead, .inbox-table thead { display: none; }
  .clients td, .inbox-table td { display: block; padding: 6px 14px; border: 0; }
  .clients tr, .inbox-table tr { display: block; padding: 8px 0; border-bottom: 1px solid var(--line); }
  .c-name { min-width: 0; }
  .c-act { text-align: left; }
  #exportBtn span { display: none; }
  .login > span { display: none; }
  .prof { grid-template-columns: 1fr; }
  .prof-row { border-left: 0 !important; }
  .q-two, .m-items, .q-grid { grid-template-columns: 1fr; }
  .office-pick { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .site-body { padding: 20px; }
  .site-intro { flex-direction: column; }
}

@media (prefers-reduced-motion: reduce) {
  .drawer-panel, .modal-panel, .toast, .phone-layer-panel, .work, .side, .view, .fi, .q-card, .pl, .pe, .fi-route { transform: none !important; }
  .odo-strip, .kpi-bar i, .bar i, .office-bar i, .cp-prog i, .seg-overlay { transition-duration: 1ms; }
  .cp-scan::after, .scanbar::after { animation: none; }
  .is-updated > td::before, .dr-type.is-added { animation: none; }
}
