/* GROFAST CRM — product UI, light.
   Cool neutral canvas, white surfaces, one brand colour, quiet depth, 150 ms motion. */
/* One Google Fonts request for both families (a second @import cost an extra round trip).
   Bangla: Inter has no Bengali letters, so Bangla text fell back to whatever system font the device had.
   Hind Siliguri sits right after Inter in --font: English stays Inter, Bangla letters use Hind Siliguri
   (Google serves its Bengali part only when a page shows Bangla). Two weights keep the download small;
   500 renders as 400 and 700 as 600 for Bangla text. */
@import url('https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700&family=Hind+Siliguri:wght@400;600&display=swap');

:root {
  --canvas: #F5F6F8;
  --surface: #FFFFFF;
  --surface-2: #F9FAFB;
  --surface-3: #F2F4F7;
  --border: #E4E7EC;
  --border-2: #D0D5DD;
  --text: #101828;
  --text-2: #344054;
  --text-3: #667085;
  --text-4: #98A2B3;

  --brand: #E0284F;
  --brand-600: #C81E45;
  --brand-700: #A3173A;
  --brand-50: #FFF1F3;
  --brand-100: #FFE4E8;
  --brand-200: #FECDD6;

  --success: #067647; --success-bg: #ECFDF3; --success-dot: #17B26A; --success-bd: #ABEFC6;
  --warning: #B54708; --warning-bg: #FFFAEB; --warning-dot: #F79009; --warning-bd: #FEDF89;
  --error: #B42318;   --error-bg: #FEF3F2;   --error-dot: #F04438;   --error-bd: #FECDCA;
  --info: #175CD3;    --info-bg: #EFF8FF;    --info-dot: #2E90FA;    --info-bd: #B2DDFF;
  --gray-bg: #F9FAFB; --gray: #344054; --gray-dot: #98A2B3; --gray-bd: #E4E7EC;

  --font: 'Inter', 'Hind Siliguri', system-ui, -apple-system, 'Segoe UI', Roboto, 'Noto Sans Bengali', sans-serif;
  --r-sm: 6px; --r: 8px; --r-lg: 12px; --r-xl: 16px;
  --sh-xs: 0 1px 2px rgba(16,24,40,.05);
  --sh-sm: 0 1px 3px rgba(16,24,40,.08), 0 1px 2px rgba(16,24,40,.04);
  --sh-md: 0 4px 8px -2px rgba(16,24,40,.08), 0 2px 4px -2px rgba(16,24,40,.04);
  --sh-lg: 0 12px 16px -4px rgba(16,24,40,.08), 0 4px 6px -2px rgba(16,24,40,.03);
  --sh-xl: 0 20px 24px -4px rgba(16,24,40,.08), 0 8px 8px -4px rgba(16,24,40,.03);
  --ring: 0 0 0 4px rgba(224,40,79,.14);
  --ease: cubic-bezier(.2,.8,.2,1);
  --sidebar: 256px; --sidebar-mini: 72px; --topbar: 64px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--font); font-size: 14px; line-height: 20px; color: var(--text); background: var(--canvas);
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale; font-feature-settings: 'cv11', 'ss01', 'ss03'; }
a { color: inherit; text-decoration: none; }
a.link { color: var(--brand-600); font-weight: 600; } a.link:hover { color: var(--brand-700); }
h1, h2, h3, h4 { margin: 0; color: var(--text); }
h1 { font-size: 24px; line-height: 32px; font-weight: 600; letter-spacing: -0.02em; }
h2 { font-size: 16px; line-height: 24px; font-weight: 600; letter-spacing: -0.005em; }
h3 { font-size: 14px; line-height: 20px; font-weight: 600; }
p { margin: 0 0 12px; }
.num, .tnum { font-variant-numeric: tabular-nums; }
.t2 { color: var(--text-2); } .t3 { color: var(--text-3); } .t4 { color: var(--text-4); }
.sm { font-size: 13px; } .xs { font-size: 12px; line-height: 18px; } .w5 { font-weight: 500; } .w6 { font-weight: 600; }
.ok-t { color: var(--success); } .bad-t { color: var(--error); } .warn-t { color: var(--warning); }
.nowrap { white-space: nowrap; } .right { text-align: right; } .mt8 { margin-top: 8px; } .mt16 { margin-top: 16px; } .mt24 { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 8px; } .row.g12 { gap: 12px; } .row.g16 { gap: 16px; } .spacer { flex: 1; }
:focus-visible { outline: none; box-shadow: var(--ring); }
::selection { background: var(--brand-100); }
svg.i { width: 20px; height: 20px; stroke: currentColor; fill: none; stroke-width: 1.75; stroke-linecap: round; stroke-linejoin: round; flex: none; }
svg.i-sm { width: 16px; height: 16px; } svg.i-xs { width: 14px; height: 14px; } svg.i-lg { width: 24px; height: 24px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes pop { from { opacity: 0; transform: translateY(-4px) scale(.98); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes draw { from { stroke-dashoffset: var(--len, 1200); } to { stroke-dashoffset: 0; } }
@keyframes grow { from { transform: scaleY(0); } to { transform: scaleY(1); } }
@keyframes pulse { 0%, 100% { opacity: 1; } 50% { opacity: .35; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }

/* ── shell ───────────────────────────────────────────── */
.app { display: grid; grid-template-columns: var(--sidebar) minmax(0, 1fr); min-height: 100vh; transition: grid-template-columns .22s var(--ease); }
.app.mini { grid-template-columns: var(--sidebar-mini) minmax(0, 1fr); }
.sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; background: var(--surface); border-right: 1px solid var(--border); overflow: hidden; z-index: 40; }
.ws { display: flex; align-items: center; gap: 12px; margin: 16px 16px 4px; padding: 6px 8px 6px 6px; border-radius: var(--r); cursor: pointer; transition: background .15s; position: relative; }
.ws:hover { background: var(--surface-2); }
.ws .meta { min-width: 0; line-height: 18px; }
.ws .name { font-weight: 700; font-size: 15px; letter-spacing: -0.01em; white-space: nowrap; color: var(--text); }
.ws .plan { font-size: 12px; color: var(--text-3); white-space: nowrap; }
.ws .chev { margin-left: auto; color: var(--text-4); }
.logo-mark { width: 36px; height: 36px; flex: none; display: block; }
.side-search { margin: 12px 16px 4px; }
.side-search .iw .input { height: 40px; font-size: 14px; background: var(--surface); }
.nav { flex: 1; overflow-y: auto; padding: 8px 16px 16px; scrollbar-width: thin; scrollbar-color: #E4E7EC transparent; }
.nav-sec + .nav-sec { margin-top: 20px; }
.nav-h { font-size: 12px; font-weight: 600; color: var(--text-4); padding: 0 12px 6px; white-space: nowrap; letter-spacing: .01em; }
.nav a { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px; border-radius: var(--r); color: var(--text-2); font-weight: 600; font-size: 14px; white-space: nowrap;
  transition: background .15s var(--ease), color .15s var(--ease); }
.nav a + a { margin-top: 2px; }
.nav a svg { color: var(--text-4); transition: color .15s; }
.nav a:hover { background: var(--surface-2); color: var(--text); } .nav a:hover svg { color: var(--text-3); }
.nav a[aria-current="page"] { background: var(--surface-3); color: var(--text); } .nav a[aria-current="page"] svg { color: var(--text-2); }
.nav a .cnt { margin-left: auto; min-width: 24px; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--surface-3); font-size: 12px; font-weight: 500; color: var(--text-2); display: grid; place-items: center; font-variant-numeric: tabular-nums; }
.nav a[aria-current="page"] .cnt { background: var(--surface); box-shadow: inset 0 0 0 1px var(--border); }
.nav a .cnt.hot { background: var(--brand-50); color: var(--brand-600); box-shadow: inset 0 0 0 1px var(--brand-100); }
.side-foot { padding: 0 16px 16px; }
.side-card { border-radius: var(--r); padding: 16px; background: var(--surface-2); margin-bottom: 16px; }
.side-card h3 { font-size: 14px; } .side-card p { color: var(--text-3); margin: 4px 0 12px; font-size: 14px; }
.side-card .progress { margin-bottom: 12px; }
.side-foot .me { display: flex; align-items: center; gap: 12px; padding: 16px 8px 0; border-top: 1px solid var(--border); position: relative; }
.side-foot .me .who { min-width: 0; line-height: 20px; flex: 1; } .side-foot .me .who b { font-weight: 600; font-size: 14px; display: block; color: var(--text); } .side-foot .me .who span { font-size: 13px; color: var(--text-3); display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.app.mini .nav-h, .app.mini .nav a span, .app.mini .nav a .cnt, .app.mini .ws .meta, .app.mini .ws .chev, .app.mini .side-card, .app.mini .side-foot .me .who, .app.mini .side-foot .me .btn, .app.mini .side-search { display: none; }
.app.mini .nav a { justify-content: center; padding: 0; } .app.mini .ws { justify-content: center; margin: 16px 12px 4px; padding: 6px; } .app.mini .nav { padding: 8px 12px; } .app.mini .side-foot .me { justify-content: center; padding: 16px 0 0; }
.app.mini .nav-sec + .nav-sec { margin-top: 12px; padding-top: 12px; border-top: 1px solid var(--border); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar { position: sticky; top: 0; z-index: 30; height: var(--topbar); display: flex; align-items: center; gap: 16px; padding: 0 32px;
  background: rgba(245,246,248,.82); backdrop-filter: blur(10px) saturate(1.5); -webkit-backdrop-filter: blur(10px) saturate(1.5); border-bottom: 1px solid transparent; transition: border-color .2s, background .2s, box-shadow .2s; }
.topbar.scrolled { border-bottom-color: var(--border); background: rgba(255,255,255,.88); }
.crumbs { display: flex; align-items: center; gap: 2px; font-size: 14px; color: var(--text-3); white-space: nowrap; min-width: 0; }
.crumbs a { color: var(--text-3); font-weight: 500; padding: 4px 8px; border-radius: 6px; transition: background .15s, color .15s; } .crumbs a:hover { background: var(--surface-3); color: var(--text-2); }
.crumbs a.home { padding: 4px 6px; display: grid; place-items: center; }
.crumbs b { color: var(--brand-600); font-weight: 600; padding: 4px 8px; background: var(--brand-50); border-radius: 6px; }
.crumbs > svg { color: var(--border-2); width: 16px; height: 16px; }
.searchbtn { margin-left: auto; display: flex; align-items: center; gap: 8px; width: 320px; height: 40px; padding: 0 8px 0 12px; border: 1px solid var(--border-2); border-radius: var(--r); background: var(--surface);
  color: var(--text-4); font: 400 14px var(--font); cursor: pointer; box-shadow: var(--sh-xs); transition: border-color .15s, box-shadow .15s; }
.searchbtn:hover { border-color: #B9C0CC; } .searchbtn span { flex: 1; text-align: left; }
kbd { font: 500 12px/18px var(--font); color: var(--text-3); padding: 0 6px; border: 1px solid var(--border); border-radius: 5px; background: var(--surface-2); }
.top-actions { display: flex; align-items: center; gap: 4px; }
.iconbtn { position: relative; width: 40px; height: 40px; display: grid; place-items: center; border: 0; background: transparent; border-radius: var(--r); color: var(--text-3); cursor: pointer; transition: background .15s, color .15s; }
.iconbtn:hover { background: var(--surface-3); color: var(--text-2); }
.iconbtn .pip { position: absolute; top: 8px; right: 9px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 2px var(--canvas); }
.vsep { width: 1px; height: 24px; background: var(--border); margin: 0 8px; }
.content { padding: 24px 32px 56px; width: 100%; max-width: 1440px; animation: rise .3s var(--ease) both; }
.content.narrow { max-width: 1080px; }
.content.full { max-width: none; }

/* ── page header ─────────────────────────────────────── */
.ph { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.ph .lead { color: var(--text-3); font-size: 16px; line-height: 24px; margin-top: 4px; }
.ph .title-row { display: flex; align-items: center; gap: 16px; }
.ph.bordered { padding-bottom: 20px; border-bottom: 1px solid var(--border); }
.actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.hello { font-size: 30px; line-height: 38px; font-weight: 600; letter-spacing: -0.02em; }
.views { display: flex; gap: 0; border-bottom: 1px solid var(--border); margin: 0 0 24px; overflow-x: auto; }
.views a, .views button { position: relative; height: 44px; padding: 0 4px 2px; margin-right: 20px; background: none; border: 0; color: var(--text-3); font: 600 14px var(--font); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; transition: color .15s; }
.views a:hover, .views button:hover { color: var(--text-2); }
.views [aria-selected="true"] { color: var(--brand-600); }
.views [aria-selected="true"]::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--brand); border-radius: 2px 2px 0 0; animation: fade .2s; }
.views .n { font-size: 12px; font-weight: 500; padding: 0 8px; height: 22px; border-radius: 11px; background: var(--surface-3); color: var(--text-2); display: inline-grid; place-items: center; }
.views [aria-selected="true"] .n { background: var(--brand-50); color: var(--brand-600); }
.pills-nav { display: inline-flex; gap: 4px; padding: 4px; border-radius: 10px; background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-xs); margin-bottom: 24px; }
.pills-nav button, .pills-nav a { height: 36px; padding: 0 12px; border: 0; background: none; border-radius: 6px; font: 600 14px var(--font); color: var(--text-3); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; transition: background .15s, color .15s; }
.pills-nav [aria-selected="true"] { background: var(--surface-3); color: var(--text); }

/* ── buttons ─────────────────────────────────────────── */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 14px; border-radius: var(--r); border: 1px solid var(--border-2); background: var(--surface);
  color: var(--text-2); font: 600 14px/20px var(--font); white-space: nowrap; cursor: pointer; box-shadow: var(--sh-xs);
  transition: background .15s var(--ease), border-color .15s var(--ease), box-shadow .15s var(--ease), color .15s var(--ease), transform .08s; }
.btn:hover { background: var(--surface-2); color: var(--text); }
.btn:active { transform: translateY(1px); }
.btn svg.i { width: 20px; height: 20px; }
.btn-primary { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: var(--sh-xs), inset 0 -2px 0 rgba(10,13,18,.06), inset 0 0 0 1px rgba(10,13,18,.12); }
.btn-primary:hover { background: var(--brand-600); border-color: var(--brand-600); color: #fff; }
.btn-secondary { background: var(--brand-50); border-color: var(--brand-200); color: var(--brand-700); box-shadow: var(--sh-xs); } .btn-secondary:hover { background: var(--brand-100); color: var(--brand-700); }
.btn-ghost { background: transparent; border-color: transparent; box-shadow: none; color: var(--text-3); } .btn-ghost:hover { background: var(--surface-3); color: var(--text-2); }
.btn-link { background: none; border: 0; box-shadow: none; padding: 0; height: auto; color: var(--brand-600); } .btn-link:hover { background: none; color: var(--brand-700); }
.btn-link.gray { color: var(--text-3); } .btn-link.gray:hover { color: var(--text-2); }
.btn-danger { color: var(--error); border-color: var(--error-bd); } .btn-danger:hover { background: var(--error-bg); color: var(--error); }
.btn-danger-solid { background: #D92D20; border-color: #D92D20; color: #fff; } .btn-danger-solid:hover { background: #B42318; border-color: #B42318; color: #fff; }
.btn-sm { height: 36px; padding: 0 12px; } .btn-xs { height: 32px; padding: 0 10px; font-size: 13px; gap: 6px; } .btn-xs svg.i { width: 16px; height: 16px; }
.btn-lg { height: 44px; padding: 0 16px; font-size: 16px; } .btn-xl { height: 48px; padding: 0 18px; font-size: 16px; }
.btn-icon { width: 40px; padding: 0; } .btn-sm.btn-icon { width: 36px; } .btn-xs.btn-icon { width: 32px; }
.btn-block { width: 100%; }
.btn-group { display: inline-flex; box-shadow: var(--sh-xs); border-radius: var(--r); }
.btn-group .btn { border-radius: 0; box-shadow: none; margin-left: -1px; } .btn-group .btn:first-child { border-radius: var(--r) 0 0 var(--r); margin-left: 0; } .btn-group .btn:last-child { border-radius: 0 var(--r) var(--r) 0; }
.btn-group .btn.on, .btn-group .btn[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.ibtn { width: 32px; height: 32px; display: inline-grid; place-items: center; border: 0; background: none; border-radius: var(--r-sm); color: var(--text-4); cursor: pointer; transition: background .15s, color .15s; }
.ibtn:hover { background: var(--surface-3); color: var(--text-2); } .ibtn svg.i { width: 18px; height: 18px; }
.ibtn.danger:hover { background: var(--error-bg); color: var(--error); }

/* ── forms ───────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.label { font-size: 14px; font-weight: 500; color: var(--text-2); }
.req::after { content: " *"; color: var(--brand); }
.hint { font-size: 14px; color: var(--text-3); }
.err { font-size: 14px; color: #D92D20; }
.input, .select, .textarea { width: 100%; height: 44px; padding: 0 14px; border: 1px solid var(--border-2); border-radius: var(--r); background: var(--surface); color: var(--text); font: 400 16px/24px var(--font);
  box-shadow: var(--sh-xs); transition: border-color .15s, box-shadow .15s; }
.input.sm, .select.sm { height: 40px; font-size: 14px; padding: 0 12px; }
.textarea { height: auto; min-height: 112px; padding: 12px 14px; resize: vertical; }
.select { appearance: none; padding-right: 40px; background: var(--surface) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%23667085' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; cursor: pointer; }
.select.sm { padding-right: 36px; background-position: right 10px center; }
.input::placeholder, .textarea::placeholder { color: var(--text-4); }
.input:focus, .select:focus, .textarea:focus { outline: none; border-color: #F590A7; box-shadow: var(--sh-xs), var(--ring); }
.input:read-only:not(.ro-ok), .input:disabled { background: var(--surface-2); color: var(--text-3); }
.input.invalid { border-color: #FDA29B; } .input.invalid:focus { box-shadow: 0 0 0 4px rgba(240,68,56,.14); }
.iw { position: relative; display: flex; align-items: center; }
.iw > svg { position: absolute; left: 14px; color: var(--text-4); pointer-events: none; }
.iw.sm > svg { left: 12px; width: 18px; height: 18px; }
.iw > svg + .input { padding-left: 42px; } .iw.sm > svg + .input { padding-left: 38px; }
.iw .suffix { position: absolute; right: 8px; display: flex; align-items: center; gap: 4px; color: var(--text-3); font-size: 14px; }
.ig { display: flex; box-shadow: var(--sh-xs); border-radius: var(--r); }
.ig .pre { display: flex; align-items: center; padding: 0 12px 0 14px; border: 1px solid var(--border-2); border-right: 0; border-radius: var(--r) 0 0 var(--r); color: var(--text-3); background: var(--surface); white-space: nowrap; font-size: 16px; }
.ig .input { border-radius: 0 var(--r) var(--r) 0; box-shadow: none; }
.ig .post { display: flex; align-items: center; padding: 0 14px; border: 1px solid var(--border-2); border-left: 0; border-radius: 0 var(--r) var(--r) 0; color: var(--text-3); white-space: nowrap; }
.ig.has-post .input { border-radius: 0; }
.ig.sm .pre, .ig.sm .post { font-size: 14px; } .ig.sm .input { height: 40px; font-size: 14px; }
.cb { display: inline-flex; align-items: flex-start; gap: 12px; cursor: pointer; font-size: 14px; color: var(--text-2); font-weight: 500; line-height: 20px; }
.cb input, input.ck { appearance: none; width: 16px; height: 16px; margin: 2px 0 0; border: 1px solid var(--border-2); border-radius: 4px; background: var(--surface); display: inline-grid; place-items: center; cursor: pointer; transition: background .12s, border-color .12s; flex: none; vertical-align: middle; }
.cb input:checked, input.ck:checked { background: var(--brand); border-color: var(--brand); }
.cb input:checked::after, input.ck:checked::after { content: ""; width: 8px; height: 4px; border: 1.75px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px,-1px); }
input.ck:indeterminate { background: var(--brand); border-color: var(--brand); } input.ck:indeterminate::after { content: ""; width: 8px; height: 1.75px; background: #fff; }
.cb input[type=radio] { border-radius: 50%; } .cb input[type=radio]:checked::after { width: 6px; height: 6px; border: 0; border-radius: 50%; background: #fff; transform: none; }
.cb small { display: block; font-weight: 400; color: var(--text-3); font-size: 14px; }
.tgl { appearance: none; position: relative; width: 36px; height: 20px; margin: 0; border-radius: 12px; background: var(--surface-3); border: 0; box-shadow: inset 0 0 0 1px var(--border); cursor: pointer; transition: background .2s var(--ease); flex: none; }
.tgl::after { content: ""; position: absolute; top: 2px; left: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(16,24,40,.1), 0 1px 2px rgba(16,24,40,.06); transition: transform .2s var(--ease); }
.tgl:checked { background: var(--brand); box-shadow: none; } .tgl:checked::after { transform: translateX(16px); }
.tgl-row { display: flex; gap: 12px; align-items: flex-start; } .tgl-row .tgl { margin-top: 1px; } .tgl-row b { font-weight: 500; color: var(--text-2); display: block; } .tgl-row span { color: var(--text-3); }
.grid { display: grid; gap: 20px 24px; } .g2 { grid-template-columns: repeat(2, minmax(0,1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0,1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0,1fr)); }
.span2 { grid-column: span 2; } .span3 { grid-column: span 3; } .spanall { grid-column: 1 / -1; }
.fsec { display: grid; grid-template-columns: minmax(200px, 280px) minmax(0, 1fr); gap: 32px; padding: 24px 0; border-top: 1px solid var(--border); }
.fsec:first-child { border-top: 0; padding-top: 0; }
.fsec .about h3 { font-size: 14px; } .fsec .about p { margin-top: 4px; color: var(--text-3); font-size: 14px; }
.fsec .body { max-width: 640px; }
.fbar { display: flex; justify-content: flex-end; gap: 12px; padding-top: 20px; border-top: 1px solid var(--border); }
.dz { border: 1px solid var(--border); border-radius: var(--r-lg); padding: 16px 24px; text-align: center; background: var(--surface); cursor: pointer; transition: border-color .15s, background .15s; }
.dz:hover { border-color: var(--brand-200); background: #FFFAFB; }
.dz .itile { margin: 0 auto 12px; }
.dz b { color: var(--brand-600); font-weight: 600; } .dz p { margin: 0; color: var(--text-3); font-size: 14px; } .dz .xs { margin-top: 4px; }
.radio-cards { display: grid; gap: 12px; }
.rc { display: flex; gap: 12px; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface); cursor: pointer; transition: border-color .15s, box-shadow .15s, background .15s; }
.rc:hover { border-color: var(--border-2); }
.rc.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: #FFFBFC; }
.rc b { display: block; font-weight: 500; color: var(--text-2); } .rc span { color: var(--text-3); font-size: 14px; }
.rc .rdot { width: 16px; height: 16px; border-radius: 50%; border: 1px solid var(--border-2); flex: none; margin-top: 2px; display: grid; place-items: center; }
.rc.on .rdot { border-color: var(--brand); background: var(--brand); } .rc.on .rdot::after { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #fff; }
.tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(116px, 1fr)); gap: 8px; }
.tile-opt { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); cursor: pointer; transition: border-color .15s, background .15s; }
.tile-opt:hover { border-color: var(--border-2); } .tile-opt b { font-size: 14px; font-weight: 600; color: var(--text-2); } .tile-opt span { font-size: 12px; color: var(--text-3); }
.tile-opt.on { border-color: var(--brand); box-shadow: inset 0 0 0 1px var(--brand); background: #FFFBFC; }

/* ── cards ───────────────────────────────────────────── */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-xs); }
.card-h { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--border); }
.card-h.flat { border-bottom: 0; padding-bottom: 0; }
.card-h h2 { font-size: 18px; line-height: 28px; } .card-h h2 + .sub, .card-h .sub { font-size: 14px; color: var(--text-3); margin-top: 2px; font-weight: 400; }
.card-h.sm { padding: 16px 20px; } .card-h.sm h2 { font-size: 16px; line-height: 24px; }
.card-h .actions { gap: 8px; flex-wrap: nowrap; }
.card-b { padding: 20px 24px; }
.card-b.tight { padding: 16px 20px; }
.card-f { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px; border-top: 1px solid var(--border); font-size: 14px; color: var(--text-3); }
.card-f.end { justify-content: flex-end; }
.stack > * + * { margin-top: 24px; }
.stack.s16 > * + * { margin-top: 16px; }
.row2 { display: grid; gap: 24px; grid-template-columns: minmax(0, 1.75fr) minmax(320px, 1fr); align-items: start; }
.row2r { display: grid; gap: 24px; grid-template-columns: minmax(300px, 1fr) minmax(0, 2fr); align-items: start; }
.row-even { display: grid; gap: 24px; grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
.row3 { display: grid; gap: 24px; grid-template-columns: repeat(3, minmax(0,1fr)); align-items: start; }
.mb24 { margin-bottom: 24px; } .mb16 { margin-bottom: 16px; }

/* KPI / metric */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 24px; margin-bottom: 24px; }
.kpis.k3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .kpis.k5 { grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 16px; } .kpis.k2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.kpi { position: relative; padding: 20px 24px; display: flex; flex-direction: column; transition: box-shadow .2s var(--ease), border-color .2s; }
a.kpi:hover { box-shadow: var(--sh-md); border-color: var(--border-2); }
.kpi .lbl { display: flex; align-items: center; justify-content: space-between; gap: 8px; font-size: 14px; font-weight: 500; color: var(--text-3); line-height: 20px; }
.kpi .lbl .ibtn { margin: -6px -8px -6px 0; }
.kpi .val { margin-top: 8px; font-size: 30px; line-height: 38px; font-weight: 600; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; color: var(--text); white-space: nowrap; }
.kpi .val small { font-size: 18px; font-weight: 500; color: var(--text-3); margin-right: 2px; letter-spacing: -0.01em; }
.kpi .val .of { font-size: 16px; font-weight: 500; color: var(--text-4); letter-spacing: 0; margin-left: 2px; }
.kpi .foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: auto; padding-top: 12px; }
.kpi .cmp { font-size: 14px; color: var(--text-3); display: flex; align-items: center; gap: 8px; flex-wrap: wrap; line-height: 20px; }
.kpi svg.spark { width: 112px; height: 44px; flex: none; overflow: visible; }
.kpis.k5 .kpi { padding: 16px 20px; } .kpis.k5 .kpi .val { font-size: 24px; line-height: 32px; } .kpis.k5 .kpi svg.spark { width: 80px; height: 32px; }
.kpi.mini { padding: 16px 20px; } .kpi.mini .val { font-size: 24px; line-height: 32px; margin-top: 4px; }
.delta { display: inline-flex; align-items: center; gap: 2px; height: 22px; padding: 0 8px 0 6px; border-radius: 11px; font-size: 12px; font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; }
.delta.up { color: var(--success); background: var(--success-bg); box-shadow: inset 0 0 0 1px var(--success-bd); }
.delta.down { color: var(--error); background: var(--error-bg); box-shadow: inset 0 0 0 1px var(--error-bd); }
.delta.flat { color: var(--text-2); background: var(--gray-bg); box-shadow: inset 0 0 0 1px var(--gray-bd); padding: 0 8px; }
.delta svg { width: 12px; height: 12px; stroke-width: 2.2; }
.stat-strip { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-xs); margin-bottom: 24px; }
.stat-strip > div { padding: 16px 20px; border-left: 1px solid var(--border); min-width: 0; }
.stat-strip > div:first-child { border-left: 0; }
.stat-strip .l { font-size: 14px; color: var(--text-3); font-weight: 500; display: flex; align-items: center; gap: 8px; white-space: nowrap; }
.stat-strip .v { font-size: 20px; line-height: 30px; font-weight: 600; margin-top: 4px; font-variant-numeric: tabular-nums; letter-spacing: -0.01em; white-space: nowrap; }
.stat-strip .v small { font-size: 14px; color: var(--text-3); font-weight: 500; }
.stat-strip a:hover .v { color: var(--brand-600); }
.dotc { width: 8px; height: 8px; border-radius: 50%; display: inline-block; flex: none; }

/* ── tables ──────────────────────────────────────────── */
.tcard { overflow: hidden; }
.tbar { display: flex; align-items: center; gap: 12px; padding: 12px 16px; flex-wrap: wrap; border-bottom: 1px solid var(--border); }
.tbar .grow { flex: 1; }
.tbar .iw { width: 320px; }
.tbar-h { display: flex; align-items: center; justify-content: space-between; gap: 16px; padding: 20px 24px; border-bottom: 1px solid var(--border); flex-wrap: wrap; }
.tbar-h h2 { font-size: 18px; line-height: 28px; display: flex; align-items: center; gap: 8px; } .tbar-h .sub { color: var(--text-3); font-size: 14px; margin-top: 2px; }
.cnt-badge { display: inline-flex; align-items: center; height: 22px; padding: 0 8px; border-radius: 11px; background: var(--brand-50); color: var(--brand-600); font-size: 12px; font-weight: 500; box-shadow: inset 0 0 0 1px var(--brand-100); }
.addf { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 12px; border-radius: var(--r); border: 1px dashed var(--border-2); background: transparent; color: var(--text-3); font: 600 14px var(--font); cursor: pointer; transition: border-color .15s, color .15s, background .15s; }
.addf:hover { border-color: var(--text-4); color: var(--text-2); background: var(--surface-2); }
.fchip { display: inline-flex; align-items: center; gap: 4px; height: 36px; padding: 0 6px 0 12px; border-radius: var(--r); border: 1px solid var(--border-2); background: var(--surface); color: var(--text-3); font-size: 14px; font-weight: 500; box-shadow: var(--sh-xs); }
.fchip b { font-weight: 600; color: var(--text-2); } .fchip button { border: 0; background: none; width: 24px; height: 24px; display: grid; place-items: center; border-radius: 4px; color: var(--text-4); cursor: pointer; } .fchip button:hover { background: var(--surface-3); color: var(--text-2); }
.tw { overflow-x: auto; }
table.t { width: 100%; border-collapse: separate; border-spacing: 0; }
.t th { height: 44px; padding: 0 24px; text-align: left; background: var(--surface-2); border-bottom: 1px solid var(--border); color: var(--text-3); font-size: 12px; font-weight: 500; white-space: nowrap; }
.t th.sortable { cursor: pointer; user-select: none; } .t th.sortable:hover { color: var(--text-2); } .t th .sorti { vertical-align: -3px; width: 14px; height: 14px; margin-left: 4px; }
.t td { height: 72px; padding: 16px 24px; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text-3); white-space: nowrap; vertical-align: middle; }
.t.dense td { height: 60px; padding: 12px 24px; }
.t td.wrap { white-space: normal; min-width: 220px; }
.t td.strong, .t td .strong { color: var(--text); font-weight: 500; }
.t td.amt { color: var(--text); font-weight: 500; }
.t th.num, .t td.num { text-align: right; font-variant-numeric: tabular-nums; }
.t td.num { color: var(--text-2); }
.t tbody tr { transition: background .12s; }
.t tbody tr:hover { background: var(--surface-2); }
.t tbody tr.sel { background: #FFF8F9; }
.t tbody tr:last-child td { border-bottom: 0; }
.t tfoot td { height: 56px; background: var(--surface-2); color: var(--text); font-weight: 600; border-top: 1px solid var(--border); border-bottom: 0; }
.t .cc { width: 56px; padding-right: 0; }
.t .cc + td, .t .cc + th { padding-left: 12px; }
.t td.ra { width: 1%; text-align: right; padding-right: 16px; }
.t td.ra .rowbtns { display: inline-flex; gap: 2px; }
.t tr.group td { height: 44px; background: var(--surface-2); color: var(--text-2); font-weight: 600; font-size: 13px; padding-top: 0; padding-bottom: 0; }
.t tr.sub td { height: 60px; background: #FCFCFD; }
.t tr.sub td:first-child { box-shadow: inset 3px 0 0 var(--brand-100); }
.cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell .tt { color: var(--text); font-weight: 500; line-height: 20px; display: block; } .cell .st { color: var(--text-3); line-height: 20px; display: block; }
.cell a.tt:hover { color: var(--brand-600); }
.bulk { display: flex; align-items: center; gap: 8px; padding: 0 16px; height: 0; overflow: hidden; background: var(--surface-2); border-bottom: 1px solid transparent; font-size: 14px; color: var(--text-2); transition: height .18s var(--ease), border-color .18s; }
.bulk.on { height: 56px; border-bottom-color: var(--border); }
.bulk b { font-weight: 600; color: var(--text); margin-right: 8px; }
.pg { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 24px 16px; border-top: 1px solid var(--border); }
.pg .pages { display: flex; gap: 2px; } .pg .pages a, .pg .pages span { width: 40px; height: 40px; display: grid; place-items: center; border-radius: var(--r); color: var(--text-3); font-weight: 500; transition: background .15s; }
.pg .pages a:hover { background: var(--surface-2); } .pg .pages a.on { background: var(--surface-3); color: var(--text); }

/* ── badges ──────────────────────────────────────────── */
.pill { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 8px 0 6px; border-radius: 11px; font-size: 12px; font-weight: 500; line-height: 18px; white-space: nowrap;
  background: var(--gray-bg); color: var(--gray); box-shadow: inset 0 0 0 1px var(--gray-bd); }
.pill::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--gray-dot); }
.pill.nodot { padding: 0 8px; } .pill.nodot::before { display: none; }
.pill.ok { background: var(--success-bg); color: var(--success); box-shadow: inset 0 0 0 1px var(--success-bd); } .pill.ok::before { background: var(--success-dot); }
.pill.warn { background: var(--warning-bg); color: var(--warning); box-shadow: inset 0 0 0 1px var(--warning-bd); } .pill.warn::before { background: var(--warning-dot); }
.pill.bad { background: var(--error-bg); color: var(--error); box-shadow: inset 0 0 0 1px var(--error-bd); } .pill.bad::before { background: var(--error-dot); }
.pill.info { background: var(--info-bg); color: var(--info); box-shadow: inset 0 0 0 1px var(--info-bd); } .pill.info::before { background: var(--info-dot); }
.pill.brand { background: var(--brand-50); color: var(--brand-700); box-shadow: inset 0 0 0 1px var(--brand-200); } .pill.brand::before { background: var(--brand); }
.pill.violet { background: #F4F3FF; color: #5925DC; box-shadow: inset 0 0 0 1px #D9D6FE; } .pill.violet::before { background: #7A5AF8; }
.pill.live::before { animation: pulse 1.6s infinite; }
.tag { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 6px; border: 1px solid var(--border-2); background: var(--surface); font-size: 12px; font-weight: 500; color: var(--text-2); white-space: nowrap; }
.tags { display: flex; gap: 6px; flex-wrap: wrap; }
.plat { display: inline-grid; place-items: center; width: 20px; height: 20px; border-radius: 5px; font-size: 11px; font-weight: 700; color: #fff; flex: none; }
.plat.fb { background: #1877F2; } .plat.ig { background: #E1306C; } .plat.wa { background: #25D366; } .plat.tg { background: #229ED9; } .plat.ms { background: #0866FF; }

/* avatars */
.av { width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; font-size: 15px; font-weight: 600; flex: none; color: #475467; background: #F2F4F7; box-shadow: inset 0 0 0 1px rgba(16,24,40,.08); position: relative; letter-spacing: -0.01em; }
.av.s32 { width: 32px; height: 32px; font-size: 13px; } .av.s24 { width: 24px; height: 24px; font-size: 10px; } .av.s48 { width: 48px; height: 48px; font-size: 17px; } .av.s64 { width: 64px; height: 64px; font-size: 22px; } .av.s96 { width: 96px; height: 96px; font-size: 32px; box-shadow: 0 0 0 4px #fff, var(--sh-lg); }
.av.c1 { background: #FFE4E8; color: #C01048; } .av.c2 { background: #E0EAFF; color: #3538CD; } .av.c3 { background: #DCFAE6; color: #067647; } .av.c4 { background: #FEF0C7; color: #B54708; }
.av.c5 { background: #EBE9FE; color: #5925DC; } .av.c6 { background: #D1E9FF; color: #1849A9; } .av.c7 { background: #FCE7F6; color: #C11574; } .av.c8 { background: #CCFBEF; color: #107569; }
.av.sq { border-radius: 10px; } .av.s32.sq { border-radius: 8px; }
.av .on-dot { position: absolute; right: -1px; bottom: -1px; width: 10px; height: 10px; border-radius: 50%; background: #17B26A; box-shadow: 0 0 0 1.5px #fff; }
.av .on-dot.away { background: #F79009; } .av .on-dot.off { background: #98A2B3; }
.avs { display: inline-flex; } .avs .av { box-shadow: 0 0 0 1.5px var(--surface); margin-left: -8px; } .avs .av:first-child { margin-left: 0; }

/* ── segmented ───────────────────────────────────────── */
.seg { display: inline-flex; padding: 0; background: var(--surface); border: 1px solid var(--border-2); border-radius: var(--r); box-shadow: var(--sh-xs); overflow: hidden; flex: none; }
.seg button { height: 38px; padding: 0 14px; border: 0; border-left: 1px solid var(--border-2); background: transparent; font: 600 14px var(--font); color: var(--text-2); cursor: pointer; transition: background .15s, color .15s; white-space: nowrap; }
.seg button:first-child { border-left: 0; }
.seg button:hover { background: var(--surface-2); color: var(--text); }
.seg button[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.seg.sm button { height: 34px; padding: 0 12px; font-size: 13px; }

/* ── menus, popovers, modal, drawer, toast ───────────── */
.mw { position: relative; display: inline-flex; }
.menu { position: absolute; right: 0; top: calc(100% + 6px); min-width: 240px; padding: 4px 0; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); box-shadow: var(--sh-lg); z-index: 60;
  visibility: hidden; opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top right; transition: opacity .14s var(--ease), transform .14s var(--ease), visibility 0s .14s; }
.menu.open { visibility: visible; opacity: 1; transform: none; transition: opacity .14s var(--ease), transform .14s var(--ease); }
.menu.left { right: auto; left: 0; transform-origin: top left; }
.menu.up { top: auto; bottom: calc(100% + 6px); transform-origin: bottom left; }
.menu a, .menu button { display: flex; align-items: center; gap: 8px; width: calc(100% - 12px); margin: 1px 6px; height: 38px; padding: 0 10px; border: 0; background: none; border-radius: 6px; color: var(--text-2); font: 500 14px var(--font); text-align: left; cursor: pointer; transition: background .12s; white-space: nowrap; }
.menu a svg, .menu button svg { color: var(--text-3); width: 16px; height: 16px; }
.menu a:hover, .menu button:hover { background: var(--surface-2); color: var(--text); }
.menu .kb { margin-left: auto; font-size: 12px; color: var(--text-4); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 4px 0; }
.menu .danger, .menu .danger svg { color: #D92D20; }
.menu .mh { display: flex; align-items: center; gap: 12px; padding: 8px 16px 12px; border-bottom: 1px solid var(--border); margin-bottom: 4px; }
.menu .mh b { display: block; font-weight: 600; font-size: 14px; } .menu .mh span { display: block; color: var(--text-3); font-size: 14px; }
.menu .mlabel { font-size: 12px; font-weight: 600; color: var(--text-4); padding: 8px 16px 4px; }
.pop { position: absolute; right: 0; top: calc(100% + 8px); width: 420px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-xl); z-index: 60; overflow: hidden;
  visibility: hidden; opacity: 0; transform: translateY(-4px) scale(.98); transform-origin: top right; transition: opacity .16s var(--ease), transform .16s var(--ease), visibility 0s .16s; }
.pop.open { visibility: visible; opacity: 1; transform: none; transition: opacity .16s var(--ease), transform .16s var(--ease); }
.pop-h { display: flex; align-items: center; justify-content: space-between; padding: 16px 20px 0; }
.pop-h h2 { font-size: 16px; }
.pop .views { margin: 8px 20px 0; }
.pop-b { max-height: 440px; overflow-y: auto; }
.pop-f { display: flex; justify-content: space-between; padding: 12px 20px; border-top: 1px solid var(--border); background: var(--surface-2); }
.notif { display: flex; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); transition: background .12s; position: relative; }
.notif:last-child { border-bottom: 0; }
.notif:hover { background: var(--surface-2); } .notif .body { min-width: 0; flex: 1; font-size: 14px; color: var(--text-3); line-height: 20px; } .notif .body b { color: var(--text-2); font-weight: 600; }
.notif .when { font-size: 12px; color: var(--text-4); margin-top: 2px; }
.notif .acts { display: flex; gap: 12px; margin-top: 8px; }
.notif.unread::after { content: ""; position: absolute; right: 20px; top: 22px; width: 8px; height: 8px; border-radius: 50%; background: var(--brand); }
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(12,17,29,.55); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: flex; align-items: flex-start; justify-content: center; padding: 10vh 16px 16px; overflow-y: auto;
  visibility: hidden; opacity: 0; transition: opacity .18s var(--ease), visibility 0s .18s; }
.scrim.open { visibility: visible; opacity: 1; transition: opacity .18s var(--ease); }
.modal { width: min(480px, 100%); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-xl); transform: translateY(8px) scale(.98); transition: transform .22s var(--ease); }
.modal.wide { width: min(640px, 100%); } .modal.xwide { width: min(800px, 100%); }
.scrim.open .modal, .scrim.open .cmdk { transform: none; }
.modal-h { display: flex; gap: 16px; align-items: flex-start; padding: 24px 24px 0; position: relative; }
.modal-h.row-h { flex-direction: row; } .modal-h.stack-h { flex-direction: column; gap: 16px; }
.modal-h .itile.lg { width: 48px; height: 48px; border-radius: 10px; }
.modal-h h2 { font-size: 18px; line-height: 28px; } .modal-h p { color: var(--text-3); margin: 4px 0 0; font-size: 14px; }
.modal-h .x { position: absolute; right: 16px; top: 16px; width: 44px; height: 44px; }
.modal-b { padding: 20px 24px 0; }
.modal-b .grid { gap: 16px; }
.modal-f { display: flex; gap: 12px; padding: 32px 24px 24px; } .modal-f .btn { flex: 1; } .modal-f.end { justify-content: flex-end; } .modal-f.end .btn { flex: none; }
.modal-f.split { border-top: 1px solid var(--border); padding-top: 16px; margin-top: 24px; }
.drawer-scrim { z-index: 85; }
.drawer { position: fixed; z-index: 90; top: 0; right: 0; bottom: 0; width: min(560px, 100vw); background: var(--surface); box-shadow: var(--sh-xl); border-left: 1px solid var(--border); display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .3s var(--ease); visibility: hidden; }
.drawer.open { transform: none; visibility: visible; }
.drawer.wide { width: min(720px, 100vw); }
.drawer-h { display: flex; align-items: flex-start; gap: 16px; padding: 24px; border-bottom: 1px solid var(--border); }
.drawer-h h2 { font-size: 18px; line-height: 28px; } .drawer-h p { color: var(--text-3); margin: 2px 0 0; font-size: 14px; } .drawer-h .x { margin-left: auto; margin-top: -8px; margin-right: -8px; }
.drawer-b { flex: 1; overflow-y: auto; padding: 24px; } .drawer-f { display: flex; justify-content: flex-end; gap: 12px; padding: 16px 24px; border-top: 1px solid var(--border); }
.toast { position: fixed; z-index: 100; right: 24px; bottom: 24px; display: flex; align-items: flex-start; gap: 16px; width: 400px; padding: 16px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-xl);
  visibility: hidden; opacity: 0; transform: translateY(12px); transition: opacity .2s var(--ease), transform .2s var(--ease), visibility 0s .2s; }
.toast.show { visibility: visible; opacity: 1; transform: none; transition: opacity .2s var(--ease), transform .2s var(--ease); }
.toast .ti { width: 20px; height: 20px; color: var(--success); flex: none; margin: 2px; }
.toast .body { flex: 1; } .toast b { display: block; font-weight: 600; font-size: 14px; } .toast span { color: var(--text-3); font-size: 14px; display: block; margin-top: 2px; }
.toast .acts { display: flex; gap: 12px; margin-top: 12px; }
.cmdk { width: min(640px, 100%); background: var(--surface); border-radius: var(--r-lg); box-shadow: var(--sh-xl); overflow: hidden; transform: translateY(8px) scale(.98); transition: transform .22s var(--ease); }
.cmdk .q { display: flex; align-items: center; gap: 12px; padding: 0 16px 0 20px; height: 64px; border-bottom: 1px solid var(--border); }
.cmdk .q input { flex: 1; border: 0; outline: 0; font: 400 18px var(--font); color: var(--text); background: transparent; }
.cmdk .q input::placeholder { color: var(--text-4); }
.cmdk .q svg { color: var(--text-3); }
.cmdk .res { max-height: 440px; overflow-y: auto; padding: 8px 0; }
.cmdk .grp { font-size: 12px; font-weight: 600; color: var(--text-4); padding: 12px 20px 6px; }
.cmdk .it { display: flex; align-items: center; gap: 12px; height: 48px; padding: 0 12px; margin: 0 8px; border-radius: var(--r); color: var(--text-2); font-weight: 500; cursor: pointer; }
.cmdk .it svg { color: var(--text-4); } .cmdk .it .meta { margin-left: auto; font-size: 13px; color: var(--text-4); font-weight: 400; }
.cmdk .it .st { color: var(--text-4); font-weight: 400; }
.cmdk .it.on { background: var(--surface-2); color: var(--text); } .cmdk .it.on svg { color: var(--text-2); }
.cmdk .none { padding: 40px 20px; text-align: center; color: var(--text-3); display: none; }
.cmdk .ft { display: flex; gap: 20px; padding: 12px 20px; border-top: 1px solid var(--border); font-size: 12px; color: var(--text-3); background: var(--surface-2); }
.cmdk .ft span { display: inline-flex; gap: 6px; align-items: center; }

/* alerts / banners */
.alert { display: flex; gap: 12px; padding: 16px; border-radius: var(--r-lg); border: 1px solid var(--border-2); background: var(--surface); font-size: 14px; color: var(--text-3); box-shadow: var(--sh-xs); align-items: flex-start; }
.alert > svg { flex: none; width: 20px; height: 20px; margin-top: 0; }
.alert .body { flex: 1; min-width: 0; } .alert b { color: var(--text-2); font-weight: 600; display: block; margin-bottom: 4px; } .alert .acts { display: flex; gap: 12px; margin-top: 12px; }
.alert.warn { background: #FFFCF5; border-color: #FEC84B; } .alert.warn > svg { color: #DC6803; } .alert.warn b { color: #B54708; } .alert.warn { color: #B54708; }
.alert.info { background: #F5FAFF; border-color: #84CAFF; } .alert.info > svg { color: #1570EF; } .alert.info b { color: #175CD3; } .alert.info { color: #175CD3; }
.alert.bad { background: #FFFBFA; border-color: #FDA29B; } .alert.bad > svg { color: #D92D20; } .alert.bad b { color: #B42318; } .alert.bad { color: #B42318; }
.alert.ok { background: #F6FEF9; border-color: #75E0A7; } .alert.ok > svg { color: #079455; } .alert.ok b { color: #067647; } .alert.ok { color: #067647; }
.banner { display: flex; align-items: center; gap: 16px; padding: 12px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--border); box-shadow: var(--sh-xs); margin-bottom: 24px; font-size: 14px; color: var(--text-3); }
.banner b { color: var(--text-2); font-weight: 600; }

/* lists / feed / misc */
.ul { list-style: none; margin: 0; padding: 0; }
.ul > li { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--border); transition: background .12s; }
.ul > li:last-child { border-bottom: 0; } .ul > li.hov:hover, .ul > a:hover > li { background: var(--surface-2); }
.ul.tight > li { padding: 12px 20px; }
.ul .grow { flex: 1; min-width: 0; }
.ul .tt { color: var(--text); font-weight: 500; display: block; } .ul .st { color: var(--text-3); display: block; font-size: 14px; }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 12px; padding-bottom: 24px; position: relative; }
.feed li:last-child { padding-bottom: 0; }
.feed li:not(:last-child)::after { content: ""; position: absolute; left: 19px; top: 48px; bottom: 6px; width: 2px; background: var(--border); border-radius: 1px; }
.feed.s32 li:not(:last-child)::after { left: 15px; top: 40px; }
.feed .body { padding-top: 0; min-width: 0; flex: 1; } .feed .head { display: flex; gap: 8px; align-items: baseline; flex-wrap: wrap; } .feed .head b { font-weight: 500; font-size: 14px; color: var(--text-2); } .feed .when { font-size: 12px; color: var(--text-3); }
.feed .txt { color: var(--text-3); font-size: 14px; margin-top: 2px; } .feed .txt b { color: var(--text-2); font-weight: 500; }
.feed .box { margin-top: 8px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 0 8px 8px 8px; background: var(--surface-2); color: var(--text-2); font-size: 14px; line-height: 20px; }
.feed .file { display: flex; gap: 12px; align-items: center; margin-top: 8px; }
.itile { width: 40px; height: 40px; border-radius: var(--r); display: grid; place-items: center; border: 1px solid var(--border); background: var(--surface); color: var(--text-2); box-shadow: var(--sh-xs); flex: none; }
.itile.s32 { width: 32px; height: 32px; border-radius: 6px; } .itile.s32 svg.i { width: 16px; height: 16px; }
.itile.s48 { width: 48px; height: 48px; border-radius: 10px; } .itile.s48 svg.i { width: 24px; height: 24px; }
.itile.round { border-radius: 50%; border: 0; box-shadow: none; }
.itile.brand { background: var(--brand-50); border-color: var(--brand-100); color: var(--brand-600); box-shadow: none; }
.itile.ok { background: var(--success-bg); border-color: var(--success-bd); color: #079455; box-shadow: none; }
.itile.warn { background: var(--warning-bg); border-color: var(--warning-bd); color: #DC6803; box-shadow: none; }
.itile.bad { background: var(--error-bg); border-color: var(--error-bd); color: #D92D20; box-shadow: none; }
.itile.info { background: var(--info-bg); border-color: var(--info-bd); color: #1570EF; box-shadow: none; }
.itile.gray { background: var(--surface-3); border-color: var(--border); box-shadow: none; color: var(--text-3); }
.ring-ok { box-shadow: 0 0 0 6px #ECFDF3 !important; border: 0 !important; } .ring-bad { box-shadow: 0 0 0 6px #FEF3F2 !important; border: 0 !important; } .ring-brand { box-shadow: 0 0 0 6px #FFF1F3 !important; border: 0 !important; } .ring-warn { box-shadow: 0 0 0 6px #FFFAEB !important; border: 0 !important; }
.progress { height: 8px; border-radius: 4px; background: var(--surface-3); overflow: hidden; }
.progress > i { display: block; height: 100%; border-radius: 4px; background: var(--brand); transform-origin: left; animation: barin .8s var(--ease) both; }
@keyframes barin { from { transform: scaleX(0); } to { transform: scaleX(1); } }
.progress.ok > i { background: #17B26A; } .progress.gray > i { background: #667085; } .progress.warn > i { background: #F79009; } .progress.info > i { background: #2E90FA; }
.progress.thin { height: 6px; }
.prow { display: flex; align-items: center; gap: 12px; } .prow .progress { flex: 1; } .prow .pv { font-size: 14px; font-weight: 500; color: var(--text-2); min-width: 40px; text-align: right; font-variant-numeric: tabular-nums; }
.dl { display: grid; grid-template-columns: 160px minmax(0,1fr); gap: 16px; margin: 0; font-size: 14px; }
.dl dt { color: var(--text-3); font-weight: 500; } .dl dd { margin: 0; color: var(--text); overflow-wrap: anywhere; }
.dl.rows { gap: 0; } .dl.rows dt, .dl.rows dd { padding: 14px 0; border-bottom: 1px solid var(--border); } .dl.rows dt:nth-last-child(2), .dl.rows dd:last-child { border-bottom: 0; }
.kv { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 12px 0; border-bottom: 1px solid var(--border); font-size: 14px; color: var(--text-3); }
.kv:last-child { border-bottom: 0; } .kv b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; white-space: nowrap; } .kv.total { padding-top: 16px; } .kv.total b, .kv.total span { color: var(--text); font-weight: 600; font-size: 16px; }
.empty { text-align: center; padding: 48px 24px; }
.empty .art { width: 160px; height: 120px; margin: 0 auto 16px; display: block; }
.empty .itile { margin: 0 auto 16px; }
.empty h3 { font-size: 16px; line-height: 24px; } .empty p { color: var(--text-3); max-width: 352px; margin: 4px auto 24px; }
.empty .actions { justify-content: center; }
.sk { height: 12px; border-radius: 6px; background: linear-gradient(90deg, #F2F4F7 25%, #E9ECF1 37%, #F2F4F7 63%); background-size: 200% 100%; animation: shimmer 1.3s infinite linear; }
.divider { height: 1px; background: var(--border); margin: 20px 0; }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; color: var(--text-3); align-items: center; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 8px; vertical-align: 1px; }
.section-h { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 32px 0 16px; }
.section-h h2 { font-size: 18px; line-height: 28px; } .section-h .sub { color: var(--text-3); font-size: 14px; margin-top: 2px; }
.code { font-family: ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; font-size: 13px; padding: 10px 12px; background: var(--surface-2); border: 1px solid var(--border); border-radius: var(--r); color: var(--text-2); word-break: break-all; }
.copyrow { display: flex; gap: 8px; } .copyrow .input { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }

/* charts */
.chart-wrap { position: relative; }
svg.chart { display: block; width: 100%; height: auto; overflow: visible; }
.chart .grid line { stroke: #F2F4F7; stroke-width: 1; }
.chart .grid line.base { stroke: #E4E7EC; }
.chart .ax text { fill: #667085; font: 400 12px var(--font); }
.chart .ln { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; stroke-dasharray: var(--len, 1200); animation: draw 1.1s var(--ease) both; }
.chart .ln.l2 { stroke: #FDA4B8; } .chart .ln.l3 { stroke: #98A2B3; }
.chart .area { animation: fade .9s .2s var(--ease) both; }
.chart .bar { fill: var(--brand); transform-box: fill-box; transform-origin: bottom; animation: grow .7s var(--ease) both; transition: opacity .15s; }
.chart .bar.b2 { fill: #FDA4B8; } .chart .bar.b3 { fill: #F2F4F7; }
.chart .bars:hover .bar { opacity: .45; } .chart .bars .col:hover .bar { opacity: 1; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart .dot { fill: #fff; stroke: var(--brand); stroke-width: 2; opacity: 0; transition: opacity .12s; }
.chart .guide { stroke: #D0D5DD; stroke-width: 1; opacity: 0; transition: opacity .12s; }
.tip { position: absolute; pointer-events: none; z-index: 5; padding: 8px 12px; background: var(--surface); color: var(--text-3); border: 1px solid var(--border); border-radius: var(--r); font-size: 12px; line-height: 18px; box-shadow: var(--sh-lg); opacity: 0; transform: translate(-50%, calc(-100% - 12px)); transition: opacity .12s; white-space: nowrap; }
.tip b { font-size: 12px; color: var(--text-2); display: block; font-weight: 600; margin-bottom: 2px; }
.tip .r { display: flex; align-items: center; gap: 8px; } .tip .r i { width: 8px; height: 8px; border-radius: 50%; } .tip .r em { font-style: normal; color: var(--text); font-weight: 600; margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.donut-wrap { display: flex; align-items: center; gap: 32px; }
.donut { width: 168px; height: 168px; flex: none; }
.donut circle { fill: none; stroke-width: 18; transition: stroke-width .15s; }
.donut circle:hover { stroke-width: 22; }
.donut .center { font: 600 22px var(--font); fill: var(--text); } .donut .center-l { font: 500 12px var(--font); fill: var(--text-3); }
.hbars > * + * { margin-top: 16px; }
.hbar .top { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; margin-bottom: 8px; } .hbar .top span { color: var(--text-2); font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .hbar .top b { font-weight: 500; color: var(--text); font-variant-numeric: tabular-nums; white-space: nowrap; } .hbar .top b small { color: var(--text-3); font-weight: 400; margin-left: 6px; }

/* inbox / chat */
.split { display: grid; grid-template-columns: 360px minmax(0,1fr); height: calc(100vh - var(--topbar) - 132px); min-height: 560px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; box-shadow: var(--sh-xs); }
.split.three { grid-template-columns: 340px minmax(0,1fr) 320px; }
.split > aside { border-right: 1px solid var(--border); overflow-y: auto; display: flex; flex-direction: column; min-width: 0; }
.split > aside.right { border-right: 0; border-left: 1px solid var(--border); }
.split .aside-h { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; flex-direction: column; gap: 12px; position: sticky; top: 0; background: var(--surface); z-index: 2; }
.conv { display: flex; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); cursor: pointer; transition: background .12s; position: relative; }
.conv:hover { background: var(--surface-2); } .conv.on { background: var(--surface-2); } .conv.on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2px; background: var(--brand); }
.conv .c-body { min-width: 0; flex: 1; }
.conv .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; } .conv .top b { font-weight: 600; font-size: 14px; color: var(--text-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .conv .top span { font-size: 12px; color: var(--text-4); white-space: nowrap; }
.conv .sub { color: var(--text-3); font-size: 13px; }
.conv .pv { color: var(--text-3); font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; margin-top: 4px; }
.conv.unread .top b { color: var(--text); } .conv.unread .pv { color: var(--text-2); }
.conv .udot { width: 8px; height: 8px; border-radius: 50%; background: var(--brand); flex: none; }
.thread { display: flex; flex-direction: column; min-width: 0; }
.th-h { display: flex; align-items: center; gap: 12px; padding: 16px 24px; border-bottom: 1px solid var(--border); }
.th-h .who b { display: block; font-weight: 600; } .th-h .who span { color: var(--text-3); font-size: 14px; }
.msgs { flex: 1; overflow-y: auto; padding: 24px; display: flex; flex-direction: column; gap: 16px; }
.msg { display: flex; gap: 12px; max-width: 70%; } .msg .bwrap { min-width: 0; }
.msg .bubble { padding: 10px 14px; border-radius: 0 8px 8px 8px; background: var(--surface-3); color: var(--text); font-size: 16px; line-height: 24px; border: 1px solid var(--border); }
.msg .meta { display: flex; justify-content: space-between; gap: 16px; font-size: 14px; color: var(--text-3); margin-bottom: 6px; } .msg .meta b { color: var(--text-2); font-weight: 500; } .msg .meta span { font-size: 12px; }
.msg.me { align-self: flex-end; flex-direction: row-reverse; } .msg.me .bubble { background: var(--brand); color: #fff; border-radius: 8px 0 8px 8px; border-color: var(--brand); }
.msg .att { display: flex; align-items: center; gap: 12px; padding: 10px 14px; border: 1px solid var(--border); border-radius: 0 8px 8px 8px; background: var(--surface); }
.day { align-self: center; font-size: 14px; color: var(--text-3); font-weight: 500; display: flex; align-items: center; gap: 8px; width: 100%; } .day::before, .day::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.composer { margin: 0 24px 24px; border: 1px solid var(--border-2); border-radius: var(--r-lg); box-shadow: var(--sh-xs); transition: border-color .15s, box-shadow .15s; }
.composer:focus-within { border-color: #F590A7; box-shadow: var(--ring); }
.composer textarea { width: 100%; border: 0; outline: 0; resize: none; padding: 12px 14px 0; font: 400 16px/24px var(--font); color: var(--text); min-height: 72px; background: transparent; }
.composer textarea::placeholder { color: var(--text-4); }
.composer .cbar { display: flex; align-items: center; gap: 2px; padding: 8px 12px 12px; } .composer .cbar .grow { flex: 1; }

/* auth */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); background: var(--surface); }
.auth-l { display: flex; flex-direction: column; padding: 32px; }
.auth-l .center { flex: 1; display: grid; place-items: center; padding: 48px 0; }
.auth-form { width: 100%; max-width: 360px; animation: rise .4s var(--ease) both; }
.auth-form h1 { font-size: 30px; line-height: 38px; letter-spacing: -0.02em; margin: 0 0 12px; }
.auth-form .lead { color: var(--text-3); font-size: 16px; line-height: 24px; margin-bottom: 32px; }
.auth-form .field + .field { margin-top: 20px; }
.auth-form .meta-row { display: flex; justify-content: space-between; align-items: center; margin: 24px 0; }
.auth-form .foot-note { text-align: center; margin-top: 32px; color: var(--text-3); font-size: 14px; }
.auth-form .itile.s56 { width: 56px; height: 56px; border-radius: 12px; margin-bottom: 24px; } .auth-form .itile.s56 svg { width: 28px; height: 28px; }
.auth-form.center-text { text-align: center; } .auth-form.center-text .itile { margin-left: auto; margin-right: auto; }
.auth-l .legal { display: flex; justify-content: space-between; font-size: 14px; color: var(--text-3); }
.auth-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; font-size: 18px; letter-spacing: -0.02em; }
.auth-r { position: relative; margin: 16px; border-radius: 24px; background: #0C111D; overflow: hidden; display: flex; flex-direction: column; justify-content: flex-end; padding: 64px; color: #fff; isolation: isolate; }
.auth-r .shot { position: absolute; left: 64px; top: 72px; width: 1100px; border-radius: 12px; overflow: hidden; box-shadow: 0 32px 64px -12px rgba(0,0,0,.55); border: 4px solid rgba(255,255,255,.08); background: var(--canvas); z-index: -1; animation: rise .8s .1s var(--ease) both; }
.auth-r .shot img { display: block; width: 100%; }
.auth-r::before { content: ""; position: absolute; inset: 0; background: radial-gradient(900px 500px at 85% -10%, rgba(224,40,79,.38), transparent 60%); z-index: -2; }
.auth-r::after { content: ""; position: absolute; inset: auto 0 0 0; height: 66%; background: linear-gradient(180deg, rgba(12,17,29,0) 0%, rgba(12,17,29,.9) 42%, #0C111D 100%); z-index: -1; }
.auth-r .copy { max-width: 520px; }
.auth-r .stars { display: flex; gap: 4px; margin-bottom: 20px; color: #FDB022; }
.auth-r .copy h2 { color: #fff; font-size: 30px; line-height: 38px; letter-spacing: -0.02em; font-weight: 500; }
.auth-r .copy .by { display: flex; align-items: center; gap: 12px; margin-top: 24px; } .auth-r .copy .by b { display: block; font-weight: 600; font-size: 16px; } .auth-r .copy .by span { color: #94969C; font-size: 14px; }
.or { display: flex; align-items: center; gap: 8px; color: var(--text-3); font-size: 14px; margin: 24px 0; } .or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }
.otp { display: flex; gap: 12px; justify-content: center; margin: 32px 0; } .otp input { width: 64px; height: 64px; text-align: center; font: 500 40px/1 var(--font); color: var(--brand); border: 2px solid var(--brand); border-radius: 10px; box-shadow: var(--sh-xs), var(--ring); }
.otp input:not(:first-child) { color: var(--text-4); border: 1px solid var(--border-2); box-shadow: var(--sh-xs); }
.pw-rules { display: grid; gap: 12px; margin: 20px 0 24px; } .pw-rules div { display: flex; gap: 8px; align-items: center; color: var(--text-3); font-size: 14px; }
.pw-rules .ck-ic { width: 20px; height: 20px; border-radius: 50%; background: var(--surface-3); display: grid; place-items: center; color: var(--text-4); } .pw-rules .on .ck-ic { background: #17B26A; color: #fff; }

/* profile headers */
.cover { height: 160px; border-radius: var(--r-lg); background: linear-gradient(135deg, #FFE4E8 0%, #FFF1F3 40%, #F5F6F8 100%); position: relative; overflow: hidden; }
.cover::after { content: ""; position: absolute; inset: 0; background-image: radial-gradient(rgba(224,40,79,.09) 1px, transparent 1px); background-size: 16px 16px; }
.profile-h { display: flex; align-items: flex-end; gap: 20px; padding: 0 24px; margin-top: -40px; position: relative; flex-wrap: wrap; }
.profile-h .who { flex: 1; min-width: 240px; padding-bottom: 4px; } .profile-h .who h1 { display: flex; align-items: center; gap: 8px; } .profile-h .who .st { color: var(--text-3); font-size: 16px; margin-top: 4px; }
.profile-h .actions { padding-bottom: 4px; }
.entity-h { display: flex; align-items: center; gap: 16px; margin-bottom: 24px; flex-wrap: wrap; }
.entity-h .who { flex: 1; min-width: 240px; } .entity-h .who h1 { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; } .entity-h .who .st { color: var(--text-3); font-size: 14px; margin-top: 4px; display: flex; gap: 16px; flex-wrap: wrap; }
.entity-h .who .st span { display: inline-flex; gap: 6px; align-items: center; } .entity-h .who .st svg { color: var(--text-4); width: 16px; height: 16px; }

/* boards */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(288px, 1fr); gap: 16px; overflow-x: auto; padding-bottom: 8px; align-items: start; }
.lane { background: var(--surface-3); border-radius: var(--r-lg); padding: 12px; min-height: 360px; }
.lane-h { display: flex; align-items: center; gap: 8px; padding: 4px 4px 12px; font-weight: 600; font-size: 14px; color: var(--text-2); }
.lane-h .n { color: var(--text-3); font-weight: 500; } .lane-h .ibtn { margin-left: auto; }
.bcard { background: var(--surface); border: 1px solid var(--border); border-radius: var(--r); padding: 14px; box-shadow: var(--sh-xs); transition: box-shadow .15s, transform .15s; cursor: grab; }
.bcard + .bcard { margin-top: 8px; } .bcard:hover { box-shadow: var(--sh-md); }
.bcard .tt { font-weight: 600; color: var(--text); font-size: 14px; } .bcard .st { color: var(--text-3); font-size: 13px; margin-top: 2px; }
.bcard .bf { display: flex; align-items: center; justify-content: space-between; margin-top: 12px; gap: 8px; }

/* calendar / misc grids */
.cal { display: grid; grid-template-columns: repeat(7, 1fr); border-top: 1px solid var(--border); }
.cal > div { min-height: 104px; padding: 8px; border-right: 1px solid var(--border); border-bottom: 1px solid var(--border); font-size: 12px; }
.cal > div:nth-child(7n) { border-right: 0; } .cal .dn { font-weight: 600; color: var(--text-2); font-size: 13px; } .cal .muted .dn { color: var(--text-4); }
.cal .ev { margin-top: 4px; padding: 2px 6px; border-radius: 4px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal .wh { min-height: 0; padding: 10px 8px; text-align: center; color: var(--text-3); font-weight: 600; background: var(--surface-2); }
.cards-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 24px; }
.cards-grid.c280 { grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); }
.pcard { padding: 20px 24px; display: flex; flex-direction: column; gap: 16px; transition: box-shadow .2s var(--ease), border-color .2s; }
.pcard:hover { box-shadow: var(--sh-md); }
.pcard .top { display: flex; gap: 12px; align-items: flex-start; } .pcard .top .grow { flex: 1; min-width: 0; }
.pcard .tt { font-weight: 600; font-size: 16px; color: var(--text); display: block; } .pcard .st { color: var(--text-3); font-size: 14px; }
.pcard .split-stats { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--border); border-radius: var(--r); }
.pcard .split-stats > div { padding: 10px 12px; border-left: 1px solid var(--border); } .pcard .split-stats > div:first-child { border-left: 0; }
.pcard .split-stats span { display: block; font-size: 12px; color: var(--text-3); } .pcard .split-stats b { font-weight: 600; font-variant-numeric: tabular-nums; }
.pcard .pf { display: flex; gap: 8px; padding-top: 16px; border-top: 1px solid var(--border); margin-top: auto; }
.perm-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 8px; }
.perm { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border: 1px solid var(--border); border-radius: var(--r); font-size: 14px; color: var(--text-2); font-weight: 500; cursor: pointer; transition: border-color .15s, background .15s; }
.perm:hover { border-color: var(--border-2); } .perm.on { background: #FFFBFC; border-color: var(--brand-200); }

/* client portal */
.ptop { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 30; }
.ptop .in { max-width: 1280px; margin: 0 auto; padding: 0 32px; height: 72px; display: flex; align-items: center; gap: 40px; }
.ptop nav { display: flex; gap: 4px; } .ptop nav a { height: 40px; padding: 0 12px; display: flex; align-items: center; border-radius: var(--r); color: var(--text-2); font-weight: 600; transition: background .15s; }
.ptop nav a:hover { background: var(--surface-2); } .ptop nav a[aria-current="page"] { background: var(--surface-3); color: var(--text); }
.pmain { max-width: 1280px; margin: 0 auto; padding: 32px 32px 64px; animation: rise .3s var(--ease) both; }
.public { min-height: 100vh; background: var(--surface); }
.public .in { max-width: 768px; margin: 0 auto; padding: 0 32px; }
.public header { border-bottom: 1px solid var(--border); } .public header .in { height: 72px; display: flex; align-items: center; justify-content: space-between; }
.public .hero { text-align: center; padding: 64px 0 48px; background: var(--surface-2); border-bottom: 1px solid var(--border); }
.public .hero .eyebrow { color: var(--brand-600); font-weight: 600; font-size: 16px; } .public .hero h1 { font-size: 48px; line-height: 60px; letter-spacing: -0.02em; margin: 12px 0 24px; } .public .hero p { color: var(--text-3); font-size: 20px; line-height: 30px; }
.prose { padding: 64px 0 96px; font-size: 18px; line-height: 28px; color: var(--text-3); }
.prose h2 { font-size: 24px; line-height: 32px; margin: 40px 0 16px; color: var(--text); } .prose h2:first-child { margin-top: 0; }
.prose p { margin: 0 0 18px; } .prose ul { padding-left: 24px; margin: 0 0 18px; } .prose li { margin-bottom: 8px; } .prose b { color: var(--text-2); font-weight: 600; }
.prose a { color: var(--brand-600); text-decoration: underline; text-underline-offset: 3px; }

/* document wrapper (invoice/proposal left untouched) */
.doc-frame { background: #E9EBEF; border: 1px solid var(--border); border-radius: var(--r-lg); padding: 32px; display: grid; place-items: center; }
.doc-frame .paper { width: 794px; max-width: 100%; background: #fff; box-shadow: var(--sh-lg); border-radius: 2px; }
.doc-note { display: flex; gap: 8px; align-items: center; color: var(--text-3); font-size: 13px; margin-bottom: 12px; }

/* responsive */
@media (max-width: 1360px) { .kpis.k5 { grid-template-columns: repeat(3, minmax(0,1fr)); } }
@media (max-width: 1280px) { .kpis { grid-template-columns: repeat(2, minmax(0,1fr)); } .split.three { grid-template-columns: 320px minmax(0,1fr); } .split.three > aside.right { display: none; } .searchbtn { width: 240px; } }
@media (max-width: 1100px) { .row2, .row2r, .row-even, .row3 { grid-template-columns: 1fr; } .auth { grid-template-columns: 1fr; } .auth-r { display: none; } .stat-strip { grid-auto-flow: row; grid-template-columns: repeat(2, 1fr); } .stat-strip > div { border-left: 0; border-top: 1px solid var(--border); } }
@media (max-width: 860px) { .app { grid-template-columns: 1fr; } .sidebar { position: fixed; z-index: 70; width: 288px; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--sh-xl); } .app.nav-open .sidebar { transform: none; }
  .topbar, .content { padding-left: 16px; padding-right: 16px; } .searchbtn { width: 40px; padding: 0; justify-content: center; } .searchbtn span, .searchbtn kbd { display: none; } .kpis, .kpis.k3, .kpis.k5 { grid-template-columns: 1fr; }
  .fsec { grid-template-columns: 1fr; gap: 16px; } .g2, .g3, .g4 { grid-template-columns: 1fr; } .span2, .span3 { grid-column: auto; } .split { grid-template-columns: 1fr; } .split > aside { display: none; } .tbar .iw { width: 100%; } .crumbs a { display: none; } }
@media print { .sidebar, .topbar, .actions, .fbar { display: none !important; } .app { display: block; } body { background: #fff; } }

/* nav sections (collapsible) */
.sidebar > .mw { display: block; }
.sidebar > .mw .ws { margin: 16px 16px 4px; }
.sidebar > .mw .menu { left: 16px; right: auto; min-width: 224px; }
.nav-h { display: flex; align-items: center; justify-content: space-between; width: 100%; height: 28px; border: 0; background: none; cursor: pointer; font: 600 12px var(--font); color: var(--text-4); padding: 0 12px; border-radius: 6px; margin-bottom: 4px; transition: color .15s; }
.nav-h:hover { color: var(--text-3); }
.nav-h svg { transition: transform .2s var(--ease); }
.nav-sec.closed .nav-h svg { transform: rotate(-90deg); }
.nav-items { display: grid; grid-template-rows: 1fr; transition: grid-template-rows .22s var(--ease); }
.nav-items > div { overflow: hidden; min-height: 0; }
.nav-sec.closed .nav-items { grid-template-rows: 0fr; }
.nav-sec + .nav-sec { margin-top: 12px; }
.app.mini .nav-h { display: none; } .app.mini .nav-sec.closed .nav-items { grid-template-rows: 1fr; }
.app.mini .sidebar > .mw .ws { margin: 16px 12px 4px; width: 48px !important; padding: 6px; justify-content: center; }
.side-card[hidden] { display: none; }
.auth.solo { grid-template-columns: 1fr; }
.auth.solo .auth-l .center { padding: 64px 0; }
@media (max-width: 860px) { .iconbtn.mob { display: grid !important; } }
.auth-r .copy p { color: #CECFD2; font-size: 18px; line-height: 28px; margin: 16px 0 0; }
.auth-r .copy .by { color: #CECFD2; font-size: 14px; }
.auth-r .copy .by .av { box-shadow: 0 0 0 2px #0C111D; }

/* polish pass 1 */
.ws .meta { display: flex; flex-direction: column; }
.kpi .cmp { flex-direction: column; align-items: flex-start; gap: 6px; }
.kpi svg.spark { width: 104px; }
.stat-strip > * { padding: 16px 20px; border-left: 1px solid var(--border); min-width: 0; display: block; transition: background .15s; }
.stat-strip > *:first-child { border-left: 0; border-radius: var(--r-lg) 0 0 var(--r-lg); }
.stat-strip > a:hover { background: var(--surface-2); }
.crumbs span.c { color: var(--text-3); font-weight: 500; padding: 4px 8px; }
.tcard .views { margin: 0; }
.t th, .t td { padding-left: 16px; padding-right: 16px; }
.t th:first-child, .t td:first-child { padding-left: 24px; }
.t th:last-child, .t td:last-child { padding-right: 24px; }
.t td.ra:last-child { padding-right: 16px; }
.t .cc { width: 52px; }
.donut-wrap.col { flex-direction: column; gap: 20px; align-items: stretch; } .donut-wrap.col .donut { align-self: center; }
.row2.eq, .row3.eq, .row-even.eq { align-items: stretch; } .eq > .card { display: flex; flex-direction: column; } .eq > .card > .card-b { flex: 1; }
.kpi .foot .avs { margin-bottom: 2px; }
@media (max-width: 860px) {
  .crumbs a, .crumbs > svg, .crumbs span.c, .topbar [data-toggle-sidebar], .topbar .vsep { display: none; }
  .topbar { gap: 8px; } .top-actions .mw .pop { position: fixed; left: 8px; right: 8px; top: 64px; width: auto; }
  .ph .actions { width: 100%; } .hello { font-size: 24px; line-height: 32px; }
}

/* ── agents ──────────────────────────────────────────── */
.agv { width: 40px; height: 40px; border-radius: 10px; display: inline-grid; place-items: center; color: #fff; flex: none; position: relative;
  box-shadow: inset 0 0 0 1px rgba(16,24,40,.12), inset 0 -10px 14px -6px rgba(0,0,0,.14); }
.agv svg.i { width: 20px; height: 20px; stroke-width: 2; }
.agv.s24 { width: 24px; height: 24px; border-radius: 6px; } .agv.s24 svg.i { width: 14px; height: 14px; }
.agv.s32 { width: 32px; height: 32px; border-radius: 8px; } .agv.s32 svg.i { width: 16px; height: 16px; }
.agv.s48 { width: 48px; height: 48px; border-radius: 12px; } .agv.s48 svg.i { width: 24px; height: 24px; }
.agv.s64 { width: 64px; height: 64px; border-radius: 16px; } .agv.s64 svg.i { width: 30px; height: 30px; }
.agv .on-dot { position: absolute; right: -3px; bottom: -3px; width: 11px; height: 11px; border-radius: 50%; background: #17B26A; box-shadow: 0 0 0 2px #fff; }
.agv .on-dot.away { background: #F79009; } .agv .on-dot.off { background: #98A2B3; } .agv .on-dot.busy { background: #2E90FA; }
.ag-boss { background: #344054; } .ag-sales { background: #E0284F; } .ag-finance { background: #079455; } .ag-marketer { background: #E8590C; } .ag-technical { background: #1570EF; } .ag-content { background: #7A5AF8; }
.agent-tag { display: inline-flex; align-items: center; height: 18px; padding: 0 6px; border-radius: 4px; background: var(--surface-3); color: var(--text-3); font-size: 11px; font-weight: 600; letter-spacing: .01em; white-space: nowrap; box-shadow: inset 0 0 0 1px var(--border); }
.who-in { display: inline-flex; align-items: center; gap: 8px; white-space: nowrap; } .who-in b { font-weight: 500; color: var(--text); }
.code-chip { display: inline-flex; align-items: center; height: 22px; padding: 0 7px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); font: 500 12px ui-monospace, Menlo, Consolas, monospace; color: var(--text-2); white-space: nowrap; }
.iconbtn .bdg { position: absolute; top: 3px; right: 0; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--brand); color: #fff; font: 600 11px/18px var(--font); text-align: center; box-shadow: 0 0 0 2px var(--canvas); }
.agents-strip { display: flex; align-items: center; gap: 16px; padding: 14px 16px 14px 20px; margin-bottom: 24px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-xs); flex-wrap: wrap; }
.agents-strip .grp { display: flex; gap: 6px; } .agents-strip .txt { flex: 1; min-width: 240px; color: var(--text-3); } .agents-strip .txt b { color: var(--text); font-weight: 600; }

/* approval review */
.review { display: grid; grid-template-columns: 400px minmax(0, 1fr); height: calc(100vh - var(--topbar) - 236px); min-height: 620px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--r-lg); box-shadow: var(--sh-xs); overflow: hidden; }
.review > aside { border-right: 1px solid var(--border); overflow-y: auto; }
.apv-it { display: flex; gap: 12px; padding: 16px 20px; border-bottom: 1px solid var(--border); cursor: pointer; position: relative; transition: background .12s; }
.apv-it:hover { background: var(--surface-2); } .apv-it.on { background: #FFF8F9; } .apv-it.on::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--brand); }
.apv-it .c-body { flex: 1; min-width: 0; } .apv-it .top { display: flex; justify-content: space-between; gap: 8px; align-items: center; }
.apv-it .top b { font-weight: 600; font-size: 14px; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .apv-it .top span { font-size: 12px; color: var(--text-4); white-space: nowrap; }
.apv-it .sub { color: var(--text-3); font-size: 13px; margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.apv-it .meta { display: flex; gap: 6px; margin-top: 8px; flex-wrap: wrap; align-items: center; }
.rv { display: flex; flex-direction: column; min-width: 0; }
.rv[hidden] { display: none; }
.rv-h { padding: 20px 28px; border-bottom: 1px solid var(--border); display: flex; gap: 16px; align-items: flex-start; }
.rv-h h2 { font-size: 18px; line-height: 28px; } .rv-h .st { color: var(--text-3); font-size: 14px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-top: 4px; }
.rv-b { flex: 1; overflow-y: auto; padding: 24px 28px; }
.rv-b > section + section { margin-top: 28px; }
.rv-b h3 { font-size: 13px; font-weight: 600; color: var(--text-3); margin-bottom: 10px; letter-spacing: .01em; }
.rv-f { display: flex; align-items: center; gap: 12px; padding: 16px 28px; border-top: 1px solid var(--border); background: var(--surface-2); }
.rv-f .hint { font-size: 13px; color: var(--text-4); margin-right: auto; display: flex; gap: 8px; align-items: center; }
.diff { width: 100%; border: 1px solid var(--border); border-radius: var(--r); border-collapse: separate; border-spacing: 0; overflow: hidden; font-size: 14px; }
.diff th { text-align: left; font-size: 12px; font-weight: 500; color: var(--text-3); background: var(--surface-2); padding: 10px 14px; border-bottom: 1px solid var(--border); }
.diff td { padding: 12px 14px; border-bottom: 1px solid var(--border); color: var(--text-2); vertical-align: top; }
.diff tr:last-child td { border-bottom: 0; } .diff td:first-child { color: var(--text-3); width: 34%; }
.diff .was { color: #B42318; text-decoration: line-through; text-decoration-color: rgba(180,35,24,.45); margin-right: 8px; }
.diff .now { color: #067647; font-weight: 600; } .diff .arrow { color: var(--text-4); margin-right: 8px; }
.evidence { border: 1px solid var(--border); border-left: 3px solid var(--border-2); border-radius: 0 var(--r) var(--r) 0; background: var(--surface-2); padding: 12px 14px; font: 13px/20px ui-monospace, Menlo, Consolas, monospace; color: var(--text-2); }
.evidence + .evidence { margin-top: 8px; }
.evidence .src { display: block; font: 500 12px var(--font); color: var(--text-4); margin-bottom: 4px; }
.checks { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.checks li { display: flex; gap: 10px; align-items: flex-start; font-size: 14px; color: var(--text-2); }
.checks li svg { width: 18px; height: 18px; margin-top: 1px; flex: none; }
.checks .ok svg { color: #17B26A; } .checks .warn svg { color: #F79009; } .checks .bad svg { color: #F04438; }
.checks li small { display: block; color: var(--text-3); font-size: 13px; }
.reason { font-size: 15px; line-height: 24px; color: var(--text-2); margin: 0; }
.wa-msg { max-width: 460px; padding: 10px 14px 8px; border-radius: 10px 0 10px 10px; background: #E7F8EE; border: 1px solid #BFE9D0; color: var(--text); font-size: 15px; line-height: 22px; margin-left: auto; }
.wa-msg .t { display: block; text-align: right; font-size: 11px; color: var(--text-3); margin-top: 4px; }
.wa-in { max-width: 460px; padding: 10px 14px; border-radius: 0 10px 10px 10px; background: var(--surface); border: 1px solid var(--border); font-size: 15px; line-height: 22px; color: var(--text); }
.chat-prev { display: flex; flex-direction: column; gap: 10px; padding: 16px; border: 1px solid var(--border); border-radius: var(--r-lg); background: var(--surface-2); }
.chat-prev .lbl { font-size: 12px; color: var(--text-4); font-weight: 500; text-align: center; }
.post-prev { max-width: 400px; border: 1px solid var(--border); border-radius: var(--r-lg); overflow: hidden; background: var(--surface); box-shadow: var(--sh-xs); }
.post-prev .ph-h { display: flex; gap: 10px; align-items: center; padding: 12px 14px; } .post-prev .ph-h b { display: block; font-size: 14px; } .post-prev .ph-h span { font-size: 12px; color: var(--text-3); }
.post-prev .cap { padding: 0 14px 12px; font-size: 14px; line-height: 21px; color: var(--text-2); }
.post-prev .art { aspect-ratio: 1 / 1; background: linear-gradient(150deg, #1D2939 0%, #101828 55%, #3B0A1A 100%); position: relative; display: flex; flex-direction: column; justify-content: flex-end; padding: 28px; color: #fff; }
.post-prev .art .k { font-size: 12px; font-weight: 600; letter-spacing: .08em; color: #FDA4B8; } .post-prev .art h4 { color: #fff; font-size: 26px; line-height: 32px; letter-spacing: -0.02em; margin: 8px 0 14px; }
.post-prev .art .pill-w { align-self: flex-start; background: #E0284F; color: #fff; padding: 6px 12px; border-radius: 6px; font-weight: 600; font-size: 13px; }
.post-prev .art .lg { position: absolute; top: 24px; left: 28px; display: flex; gap: 8px; align-items: center; font-weight: 700; font-size: 14px; }
.post-prev .acts { display: flex; justify-content: space-around; padding: 10px; border-top: 1px solid var(--border); font-size: 13px; color: var(--text-3); font-weight: 500; }
.risk { display: inline-flex; align-items: center; gap: 3px; font-size: 12px; font-weight: 500; color: var(--text-3); white-space: nowrap; }
.risk i { width: 5px; height: 10px; border-radius: 1px; background: var(--border); display: inline-block; }
.risk.r1 i:nth-child(-n+1), .risk.r2 i:nth-child(-n+2), .risk.r3 i:nth-child(-n+3) { background: currentColor; }
.risk span { margin-left: 4px; }
.risk.r1 { color: #079455; } .risk.r2 { color: #DC6803; } .risk.r3 { color: #D92D20; }

/* agent cards / matrix / api */
.agcard { padding: 20px; display: flex; flex-direction: column; gap: 16px; transition: box-shadow .2s var(--ease), border-color .2s; }
.agcard:hover { box-shadow: var(--sh-md); }
.agcard .top { display: flex; gap: 14px; align-items: flex-start; } .agcard .top .grow { flex: 1; min-width: 0; }
.agcard .tt { font-weight: 600; font-size: 16px; color: var(--text); display: block; } .agcard .st { color: var(--text-3); font-size: 14px; }
.agcard .now { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-radius: var(--r); background: var(--surface-2); color: var(--text-2); font-size: 14px; }
.pulse { width: 8px; height: 8px; border-radius: 50%; background: #2E90FA; animation: pulse 1.4s infinite; flex: none; display: inline-block; }
.pulse.idle { background: #98A2B3; animation: none; } .pulse.paused { background: #F79009; animation: none; } .pulse.online { background: #17B26A; animation: none; }
.agcard .nums { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.agcard .nums div span { display: block; font-size: 12px; color: var(--text-3); } .agcard .nums div b { font-size: 18px; font-weight: 600; font-variant-numeric: tabular-nums; }
.agcard .af { display: flex; gap: 8px; align-items: center; padding-top: 16px; border-top: 1px solid var(--border); margin-top: auto; font-size: 13px; color: var(--text-3); }
.matrix { width: 100%; border-collapse: separate; border-spacing: 0; }
.matrix th { font-size: 12px; font-weight: 500; color: var(--text-3); padding: 10px 12px; text-align: center; background: var(--surface-2); border-bottom: 1px solid var(--border); white-space: nowrap; }
.matrix th:first-child { text-align: left; padding-left: 24px; }
.matrix td { padding: 12px; border-bottom: 1px solid var(--border); text-align: center; }
.matrix td:first-child { text-align: left; padding-left: 24px; font-weight: 500; color: var(--text); font-size: 14px; } .matrix td:first-child small { display: block; color: var(--text-3); font-weight: 400; font-size: 13px; }
.matrix tr:last-child td { border-bottom: 0; }
.matrix .dot { width: 18px; height: 18px; border-radius: 50%; border: 1px solid var(--border-2); display: inline-block; cursor: pointer; background: #fff; transition: border-color .12s; vertical-align: middle; }
.matrix .dot:hover { border-color: var(--brand); }
.matrix .dot.on { border: 5px solid var(--brand); } .matrix .dot.lock { border-color: var(--border); background: var(--surface-3); cursor: not-allowed; }
.mth { display: inline-flex; align-items: center; justify-content: center; min-width: 56px; height: 22px; padding: 0 6px; border-radius: 5px; font: 600 11px ui-monospace, Menlo, Consolas, monospace; letter-spacing: .02em; }
.mth.get { background: #ECFDF3; color: #067647; } .mth.post { background: #EFF8FF; color: #175CD3; } .mth.patch { background: #FFFAEB; color: #B54708; } .mth.del { background: #FEF3F2; color: #B42318; }
.path { font: 500 13px ui-monospace, Menlo, Consolas, monospace; color: var(--text); }
.flow { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; font-size: 14px; }
.flow .step { display: inline-flex; align-items: center; gap: 6px; height: 28px; padding: 0 10px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); color: var(--text-2); font-weight: 500; white-space: nowrap; font-size: 13px; }
.flow .step svg { width: 14px; height: 14px; color: var(--text-3); } .flow > svg { color: var(--text-4); width: 16px; height: 16px; }
.qcard { padding: 20px 24px; }
.qcard + .qcard { margin-top: 16px; }
.qcard .q { font-size: 16px; line-height: 24px; color: var(--text); font-weight: 500; margin: 12px 0; }
.qcard .opts { display: flex; gap: 8px; flex-wrap: wrap; }
.qcard .ctx { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; color: var(--text-3); font-size: 13px; }
.fact { display: flex; gap: 14px; padding: 16px 24px; border-bottom: 1px solid var(--border); align-items: flex-start; }
.fact:last-child { border-bottom: 0; } .fact .grow { flex: 1; min-width: 0; } .fact .tx { color: var(--text); font-size: 14px; line-height: 21px; } .fact .src { color: var(--text-3); font-size: 13px; margin-top: 6px; display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.rule { display: grid; grid-template-columns: minmax(0, 1fr) 170px 150px 32px; gap: 16px; align-items: center; padding: 16px 24px; border-bottom: 1px solid var(--border); }
.rule:last-child { border-bottom: 0; } .rule .tx b { display: block; font-weight: 500; color: var(--text); font-size: 14px; } .rule .tx span { color: var(--text-3); font-size: 13px; }
.enf { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 500; white-space: nowrap; }
.enf svg { width: 16px; height: 16px; }
.enf.hard { color: #B42318; } .enf.appr { color: #B54708; } .enf.guide { color: var(--text-3); }
.sim { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 12px; }
@media (max-width: 1100px) { .review { grid-template-columns: 1fr; height: auto; } .review > aside { max-height: 360px; border-right: 0; border-bottom: 1px solid var(--border); } .rule { grid-template-columns: 1fr; } }

/* ═════ Responsive layer ═════════════════════════════════════════════
   Breakpoints: 1440 wide desktop · 1280 laptop · 1180 small laptop (sidebar → icons)
   · 860 tablet (sidebar → drawer) · 640 phone (tables → stacked cards). */
img, video { max-width: 100%; height: auto; }
.grid > *, .row2 > *, .row2r > *, .row3 > *, .row-even > *, .kpis > *, .cards-grid > *, .stat-strip > *, .split > *, .review > * { min-width: 0; }
.cards-grid { grid-template-columns: repeat(auto-fill, minmax(min(320px, 100%), 1fr)); }
.cards-grid.c280 { grid-template-columns: repeat(auto-fill, minmax(min(280px, 100%), 1fr)); }
.seg, .pills-nav, .views, .btn-group { max-width: 100%; overflow-x: auto; scrollbar-width: none; }
.seg::-webkit-scrollbar, .pills-nav::-webkit-scrollbar, .views::-webkit-scrollbar { display: none; }
.seg button, .pills-nav button, .pills-nav a { flex: none; }
.btn-group .btn { flex: none; }

/* tables: wrap long text, keep short values on one line, keep row actions in view */
.t td { white-space: normal; overflow-wrap: break-word; }
.t td.nw, .t td.num, .t td.ra, .t .pill, .t .tnum, .t .tag, .t .code-chip, .t .delta, .t .rowbtns, .t .who-in { white-space: nowrap; }
.t .cell { min-width: 168px; }
.t td.wrap { min-width: 200px; }
.t th.ra, .t td.ra { position: sticky; right: 0; z-index: 1; background: var(--surface); }
.t thead th.ra { background: var(--surface-2); }
.t tbody tr:hover td.ra { background: var(--surface-2); }
.t tbody tr.sel td.ra { background: #FFF8F9; }
.t tr.sub td.ra { background: #FCFCFD; }
.tw { overscroll-behavior-x: contain; }
.tw.scrolls .t td.ra, .tw.scrolls .t th.ra { box-shadow: -8px 0 12px -10px rgba(16,24,40,.25); }
.doc-frame { overflow-x: auto; }
.kv b { text-align: right; }

@media (max-width: 1440px) {
  .content { padding: 24px 28px 48px; }
  .topbar { padding: 0 28px; }
  .t th, .t td { padding-left: 14px; padding-right: 14px; }
  .t th:first-child, .t td:first-child { padding-left: 20px; }
  .t th:last-child, .t td:last-child { padding-right: 20px; }
  .t td { height: 64px; padding-top: 12px; padding-bottom: 12px; }
  .kpi { padding: 18px 20px; } .kpi .val { font-size: 28px; line-height: 36px; }
  .kpi svg.spark { width: 88px; }
  .card-h, .card-b, .tbar-h { padding-left: 20px; padding-right: 20px; }
  .card-f, .pg { padding-left: 20px; padding-right: 20px; }
}
@media (max-width: 1280px) {
  .searchbtn { width: 220px; }
  .kpis { gap: 16px; } .row2, .row2r, .row-even, .row3 { gap: 16px; }
  .stack > * + * { margin-top: 16px; } .mb24 { margin-bottom: 16px; }
  .split.three { grid-template-columns: 300px minmax(0, 1fr); }
  .review { grid-template-columns: 340px minmax(0, 1fr); }
  .fsec { grid-template-columns: minmax(180px, 220px) minmax(0, 1fr); gap: 24px; }
}
/* small laptops: the sidebar shrinks to icons (app.js adds .mini) */
@media (max-width: 1180px) {
  .content { padding: 20px 24px 40px; }
  .topbar { padding: 0 24px; gap: 12px; }
  .row3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.k5 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
}
@media (max-width: 1100px) {
  .row3 { grid-template-columns: 1fr; }
  .split { grid-template-columns: 300px minmax(0, 1fr); }
  .donut-wrap { flex-wrap: wrap; justify-content: center; }
}
/* tablets and phones: sidebar becomes a drawer */
@media (max-width: 860px) {
  .app, .app.mini { grid-template-columns: minmax(0, 1fr); }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: 288px; z-index: 70; transform: translateX(-100%); transition: transform .25s var(--ease); box-shadow: var(--sh-xl); }
  .app.nav-open .sidebar { transform: none; }
  .app.nav-open::after { content: ""; position: fixed; inset: 0; background: rgba(12,17,29,.45); z-index: 65; animation: fade .2s; }
  .app.mini .sidebar .nav-h, .app.mini .sidebar .nav a span, .app.mini .sidebar .nav a .cnt, .app.mini .sidebar .ws .meta, .app.mini .sidebar .ws .chev, .app.mini .sidebar .side-card, .app.mini .sidebar .me .who { display: revert; }
  .iconbtn.mob { display: grid !important; }
  .topbar { padding: 0 12px 0 8px; gap: 4px; height: 56px; }
  .topbar .crumbs a, .topbar .crumbs > svg, .topbar .crumbs span.c, .topbar [data-toggle-sidebar], .topbar .vsep { display: none; }
  .crumbs { flex: 1; overflow: hidden; } .crumbs b { overflow: hidden; text-overflow: ellipsis; }
  .searchbtn { width: 40px; padding: 0; justify-content: center; margin-left: 0; border: 0; box-shadow: none; background: transparent; color: var(--text-3); }
  .searchbtn span, .searchbtn kbd { display: none; }
  .top-actions { gap: 0; }
  .content, .content.narrow { padding: 16px 16px 40px; }
  .ph { margin-bottom: 16px; align-items: flex-start; } .ph h1 { font-size: 22px; line-height: 30px; } .ph .lead { font-size: 14px; line-height: 20px; }
  .ph > .actions, .entity-h .actions, .profile-h .actions { width: 100%; }
  .hello { font-size: 22px; line-height: 30px; }
  .kpis, .kpis.k3, .kpis.k5, .kpis.k2 { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; margin-bottom: 16px; }
  .kpi { padding: 14px 16px; } .kpi .val { font-size: 22px; line-height: 30px; margin-top: 4px; } .kpi .val small { font-size: 14px; } .kpi .foot { flex-wrap: wrap; } .kpi svg.spark { display: none; }
  .stat-strip { grid-auto-flow: row; grid-template-columns: repeat(2, minmax(0, 1fr)); margin-bottom: 16px; }
  .stat-strip > * { border-left: 0; border-top: 1px solid var(--border); padding: 12px 16px; }
  .stat-strip > *:nth-child(-n+2) { border-top: 0; } .stat-strip > *:nth-child(even) { border-left: 1px solid var(--border); }
  .row2, .row2r, .row-even, .row3 { grid-template-columns: 1fr; }
  .g2, .g3, .g4 { grid-template-columns: 1fr; } .span2, .span3 { grid-column: auto; }
  [style*="grid-template-columns"]:not(.cal):not(.chart-grid) { grid-template-columns: 1fr !important; }
  .fsec { grid-template-columns: 1fr; gap: 12px; padding: 20px 0; }
  .card-h, .card-b, .tbar-h { padding-left: 16px; padding-right: 16px; }
  .card-h { flex-wrap: wrap; } .card-h .actions { flex-wrap: wrap; }
  .card-f, .pg { padding-left: 16px; padding-right: 16px; flex-wrap: wrap; }
  .tbar { padding: 12px 16px; gap: 8px; } .tbar .iw { width: 100%; } .tbar .grow { display: none; }
  .bulk.on { height: auto; min-height: 56px; flex-wrap: wrap; padding: 10px 16px; gap: 8px; }
  .ul > li { padding-left: 16px; padding-right: 16px; flex-wrap: wrap; }
  .kv { flex-wrap: wrap; } .kv b { white-space: normal; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; } .dl dd { margin-bottom: 12px; } .dl.rows dt { padding-bottom: 0; border-bottom: 0; } .dl.rows dd { padding-top: 4px; }
  .split, .split.three { grid-template-columns: 1fr; height: auto; min-height: 0; }
  .split > aside { display: flex; max-height: 360px; border-right: 0; border-bottom: 1px solid var(--border); }
  .split > aside.right { display: none; }
  .thread { min-height: 70vh; }
  .msg { max-width: 92%; }
  .review { grid-template-columns: 1fr; height: auto; } .review > aside { max-height: 340px; border-right: 0; border-bottom: 1px solid var(--border); }
  .rv-h, .rv-b, .rv-f { padding-left: 16px; padding-right: 16px; } .rv-f { flex-wrap: wrap; } .rv-f .hint { display: none; } .rv-f .btn { flex: 1 1 auto; }
  .rule { grid-template-columns: 1fr; gap: 8px; padding: 14px 16px; }
  .entity-h { gap: 12px; } .profile-h { padding: 0 16px; }
  .cover { height: 112px; }
  .doc-frame { padding: 12px; place-items: start; }
  .board { grid-auto-columns: minmax(260px, 86vw); }
  .cal > div { min-height: 64px; padding: 4px; } .cal .ev { font-size: 11px; padding: 1px 4px; }
  .scrim { padding: 16px 12px; align-items: flex-start; }
  .modal, .modal.wide, .modal.xwide { width: 100%; }
  .modal-h { padding: 20px 16px 0; } .modal-b { padding: 16px 16px 0; } .modal-f { padding: 24px 16px 16px; flex-wrap: wrap; }
  .drawer, .drawer.wide { width: 100vw; border-left: 0; }
  .drawer-h, .drawer-b, .drawer-f { padding-left: 16px; padding-right: 16px; }
  .pop { width: auto; }
  .top-actions .mw .pop { position: fixed; left: 8px; right: 8px; top: 60px; }
  .toast { left: 12px; right: 12px; width: auto; bottom: 12px; }
  .cmdk .ft { display: none; }
  .auth-l { padding: 20px; } .auth-l .center { padding: 32px 0; }
  .ptop .in { padding: 0 16px; gap: 12px; height: 60px; }
  .ptop nav { overflow-x: auto; scrollbar-width: none; flex: 1; } .ptop nav a { flex: none; padding: 0 10px; }
  .ptop .in > .spacer { display: none; }
  .ptop .mw .btn .t2, .ptop .mw .btn > svg:last-child, .ptop .auth-brand .pill { display: none; }
  .pmain { padding: 20px 16px 48px; }
  .public .in { padding: 0 16px; } .public .hero { padding: 40px 0 32px; } .public .hero h1 { font-size: 32px; line-height: 40px; } .public .hero p { font-size: 16px; line-height: 24px; }
  .prose { padding: 40px 0 64px; font-size: 16px; line-height: 26px; }
  .section-h { flex-wrap: wrap; margin-top: 24px; }
  .agents-strip { padding: 12px 14px; }
  .chat-prev, .post-prev, .wa-msg, .wa-in { max-width: 100%; }
}
/* phones */
@media (max-width: 640px) {
  .ph > .actions .btn { flex: 1 1 auto; }
  .top-actions .btn-primary .lbl { display: none; } .top-actions .btn-primary { width: 40px; padding: 0; }
  .top-actions a.iconbtn[href="omni-inbox.html"] { display: none; }
  .kpis, .kpis.k3, .kpis.k5, .kpis.k2 { grid-template-columns: 1fr; }
  .kpi svg.spark { display: block; width: 96px; }
  .pg .pages { display: none; } .pg .btn { flex: 1; }
  .modal-f .btn { flex: 1 1 100%; }
  .modal-h .itile.s48 { display: none; }
  .views a, .views button { margin-right: 14px; }
  .donut { width: 140px !important; height: 140px !important; }
  .otp input { width: 52px; height: 56px; font-size: 32px; }
  .agcard .af { flex-wrap: wrap; }
  /* tables become stacked cards */
  .tcard .tw, .card .tw { overflow: visible; }
  table.t, .t > tbody, .t > tbody > tr, .t > tbody > tr > td, .t > tfoot, .t > tfoot > tr, .t > tfoot > tr > td { display: block; width: 100%; }
  .t > thead { display: none; }
  .t > tbody > tr { position: relative; padding: 14px 16px 12px; border-bottom: 1px solid var(--border); }
  .t > tbody > tr:last-child { border-bottom: 0; }
  .t > tbody > tr > td, .t.dense > tbody > tr > td { height: auto; min-height: 0; padding: 4px 0; border: 0; display: flex; justify-content: space-between; align-items: center; gap: 16px; text-align: right; white-space: normal; }
  .t > tbody > tr > td::before { content: attr(data-label); flex: none; max-width: 45%; text-align: left; color: var(--text-3); font-size: 13px; font-weight: 500; }
  .t > tbody > tr > td[data-label=""]::before, .t > tbody > tr > td.lead::before { display: none; }
  .t > tbody > tr > td.lead { display: block; text-align: left; padding: 0 40px 8px 0; }
  .t > tbody > tr > td.cc { position: absolute; right: 16px; top: 16px; width: auto; padding: 0; display: block; }
  .t > tbody > tr > td.cc::before { display: none; }
  .t > tbody > tr > td.ra { position: static; justify-content: flex-start; padding-top: 10px; background: transparent !important; box-shadow: none !important; }
  .t > tbody > tr > td.ra::before { display: none; } .t td.ra .rowbtns { flex-wrap: wrap; }
  .t > tbody > tr > td:empty { display: none; }
  .t > tbody > tr.group > td { padding: 0; } .t > tbody > tr.group { padding: 10px 16px; background: var(--surface-2); }
  .t > tbody > tr.sub > td:first-child { box-shadow: none; }
  .t .cell { min-width: 0; }
  .t > tfoot > tr { padding: 12px 16px; background: var(--surface-2); }
  .t > tfoot > tr > td { height: auto; padding: 2px 0; border: 0; display: flex; justify-content: space-between; background: transparent; }
  .t > tfoot > tr > td:empty, .t > tfoot > tr > td.cc { display: none; }
  .t > tfoot > tr > td::before { content: attr(data-label); color: var(--text-3); font-weight: 500; }
  .t > tfoot > tr > td.lead::before { display: none; }
  .tcard .tbar-h { padding: 16px; }
}
@media (max-width: 380px) {
  .stat-strip { grid-template-columns: 1fr; } .stat-strip > *:nth-child(even) { border-left: 0; } .stat-strip > *:nth-child(2) { border-top: 1px solid var(--border); }
}

/* column priority helpers for tables (desktop/tablet only; phones show every field as a stacked card) */
@media (min-width: 641px) and (max-width: 1440px) { .t .hide-1440 { display: none; } }
@media (min-width: 641px) and (max-width: 1280px) { .t .hide-1280 { display: none; } }
@media (min-width: 641px) and (max-width: 1100px) { .t .hide-1100 { display: none; } }
@media (min-width: 641px) and (max-width: 860px) { .t .hide-860 { display: none; } }
@media (max-width: 640px) {
  .t > tbody > tr > td, .t.dense > tbody > tr > td { display: block; text-align: right; }
  .t > tbody > tr > td::before { float: left; margin-right: 16px; line-height: 22px; }
  .t > tbody > tr > td::after { content: ""; display: table; clear: both; }
  .t > tbody > tr > td.lead, .t > tbody > tr > td.ra { text-align: left; }
  .t > tbody > tr > td .cell { justify-content: flex-start; }
  .t > tbody > tr > td:not(.lead) .cell { display: inline-flex; text-align: left; }
  .t td.ra .rowbtns { display: inline-flex; flex-wrap: wrap; gap: 4px; }
  .t > tfoot > tr > td { display: block; text-align: right; } .t > tfoot > tr > td::before { float: left; }
}
@media (max-width: 640px) { .t td.ra .rowbtns { display: flex; flex-wrap: wrap; justify-content: flex-start; } .t td.ra .rowbtns .btn { flex: none; } }
.auth { overflow-x: hidden; } .auth-r { min-width: 0; }
.rv-f { flex-wrap: wrap; }
@media (max-width: 1280px) { .rv-f .hint { display: none; } }
.app.mini .side-foot .me .mw { display: none; }
@media (max-width: 860px) { .app.mini .side-foot .me .mw { display: inline-flex; } }
@media (max-width: 640px) {
  .chart-wrap { overflow-x: auto; overflow-y: hidden; margin: 0 -4px; padding: 0 4px; scrollbar-width: thin; }
  .chart-wrap svg.chart { min-width: 600px; }
}
@media (max-width: 860px) {
  .banner { flex-wrap: wrap; align-items: flex-start; }
  .banner > span:not(.itile) { flex: 1 1 calc(100% - 56px) !important; }
  .banner > .btn, .banner > a.btn { margin-left: 48px; }
  .banner > .btn ~ .btn { margin-left: 0; }
  .rv-h .agv.s48 { width: 40px; height: 40px; border-radius: 10px; }
}
@media (max-width: 640px) { .t > tbody > tr > td.ra, .t > tbody > tr > td.cc + td { width: 100%; } .t > tbody > tr > td.cc { width: auto; } }
@media (max-width: 640px) {
  .t > tbody > tr > td:first-child, .t > tbody > tr > td:last-child, .t > tfoot > tr > td:first-child, .t > tfoot > tr > td:last-child { padding-left: 0; padding-right: 0; }
  .t > tbody > tr > td.lead { padding-right: 40px; }
}
.t .flow .step { white-space: normal; height: auto; min-height: 28px; padding-top: 3px; padding-bottom: 3px; }

.secret-saved { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px dashed var(--border-2); border-radius: var(--r); background: var(--surface-2); color: var(--text-3); font-size: 14px; }
.secret-saved svg { color: var(--success-dot); } .secret-saved b { color: var(--text-2); }
.seg a, .seg .seg-a { display: inline-grid; place-items: center; height: 38px; padding: 0 14px; border-left: 1px solid var(--border-2); font: 600 14px var(--font); color: var(--text-2); white-space: nowrap; transition: background .15s, color .15s; flex: none; }
.seg a:first-child { border-left: 0; } .seg a:hover { background: var(--surface-2); color: var(--text); } .seg a[aria-pressed="true"] { background: var(--surface-2); color: var(--text); }
.seg.sm a { height: 34px; padding: 0 12px; font-size: 13px; }

/* row action menus above following rows (bug hunt 2026-10-22) */
.t td.ra:has(.menu.open) { position: relative; z-index: 5; }
