/* =====================================================================
   HADS Partnership — Client Portal prototype
   1. Base & tokens  2. Shared components  3. Logins  4. Switcher
   5. Dashboards A/B/C  6. Module layouts  7. Responsive
   A · Horizon (light, deadline ruler)   B · Journey (navy band, case journeys)   C · Night Docket (dark, approved)
   ===================================================================== */

/* ---------- 1. Base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; font-family: var(--font); color: var(--ink); background: var(--bg); -webkit-font-smoothing: antialiased; line-height: 1.5; font-size: 14px; overflow-x: hidden; }
img { max-width: 100%; display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; text-align: inherit; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-h); line-height: 1.2; }
p { margin: 0 0 .75em; }
a { color: var(--link); }
.ic { flex: none; display: inline-block; vertical-align: middle; }
.mono { font-family: 'JetBrains Mono', ui-monospace, monospace; font-size: .9em; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.nowrap { white-space: nowrap; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
body.modal-open { overflow: hidden; }
#app { min-height: 100vh; transition: opacity .16s ease; }
#app.switching { opacity: 0; }
.screen { animation: screenIn .38s cubic-bezier(.2, .7, .2, 1); }
.screen.no-anim { animation: none; }
@keyframes screenIn { from { opacity: 0; } to { opacity: 1; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; } }

/* ---------- Tokens per concept ---------- */
/* A · Horizon — default */
body {
  --font: 'Plus Jakarta Sans', system-ui, sans-serif; --font-h: 'Plus Jakarta Sans', system-ui, sans-serif;
  --bg: #F4F6F9; --surface: #fff; --surface-2: #F5F7FA; --ink: #0E1A2B; --ink-2: #3A475A; --muted: #637087; --line: #E2E7EE; --line-2: #EDF0F4;
  --primary: #0B5384; --primary-h: #08426A; --on-primary: #fff; --link: #0B5384; --focus: #3B8FD0;
  --track: #E5EAF0; --ring: #0B5384; --radius: 8px; --radius-lg: 12px; --shadow: 0 1px 2px rgba(14, 26, 43, .04); --shadow-lg: 0 24px 60px -16px rgba(14, 26, 43, .28);
  --c-progress: #1D6FB8; --c-review: #6B4FBB; --c-awaiting: #C2410C; --c-pending: #946200; --c-done: #18794E; --c-danger: #C53030; --c-neutral: #5F6B7A;
  --p-progress: #E8F1FA; --p-review: #F0ECFA; --p-awaiting: #FDEEE5; --p-pending: #FBF3E1; --p-done: #E5F4EC; --p-danger: #FDE8E8; --p-neutral: #EEF1F4;
  --k-case: #0B5384; --k-comp: #0F7B6C; --k-doc: #D9480F; --k-ret: #6B4FBB;
}
/* C · Night Docket (approved) */
body.ds-c {
  --font: 'Inter', system-ui, sans-serif; --font-h: 'Inter', system-ui, sans-serif;
  --bg: #070B14; --surface: rgba(255, 255, 255, .035); --surface-solid: #111827; --surface-2: rgba(255, 255, 255, .06); --ink: #F1F4F9; --ink-2: #C9D2E0; --muted: #8E9AAF; --line: rgba(255, 255, 255, .09); --line-2: rgba(255, 255, 255, .06);
  --primary: #2B74C4; --primary-h: #2F80D8; --link: #6CB4F0; --focus: #6CB4F0;
  --track: rgba(255, 255, 255, .09); --ring: #4F9DD1; --radius: 10px; --radius-lg: 14px; --shadow: none; --shadow-lg: 0 30px 80px -20px rgba(0, 0, 0, .7);
  --c-progress: #6CB4F0; --c-review: #B59CF5; --c-awaiting: #F4A35C; --c-pending: #F2C14E; --c-done: #4FD1A1; --c-danger: #F87171; --c-neutral: #9AA5B8;
  --p-progress: rgba(108, 180, 240, .12); --p-review: rgba(181, 156, 245, .13); --p-awaiting: rgba(244, 163, 92, .13); --p-pending: rgba(242, 193, 78, .12); --p-done: rgba(79, 209, 161, .12); --p-danger: rgba(248, 113, 113, .13); --p-neutral: rgba(154, 165, 184, .13);
  --k-case: #6CB4F0; --k-comp: #4FD1A1; --k-doc: #F4A35C; --k-ret: #B59CF5;
  color-scheme: dark;
}

/* ---------- 2. Shared components ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 40px; padding: 0 16px; border-radius: var(--radius); font-weight: 600; font-size: 14px; border: 1px solid transparent; transition: background .15s, border-color .15s, color .15s, box-shadow .15s, transform .1s; white-space: nowrap; text-decoration: none; }
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--primary); color: var(--on-primary, #fff); }
.btn-primary:hover { background: var(--primary-h); }
.btn-ghost { background: var(--surface); border-color: var(--line); color: var(--ink-2); }
.btn-ghost:hover { border-color: var(--muted); color: var(--ink); }
.btn-danger { background: var(--c-danger); color: #fff; }
.btn-sm { height: 32px; padding: 0 12px; font-size: 13px; }
.btn-lg { height: 48px; font-size: 15px; }
.btn-block { width: 100%; }
.btn.loading { opacity: .85; pointer-events: none; }
.btn.loading .ic { animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.icon-btn { display: inline-grid; place-items: center; width: 36px; height: 36px; border-radius: var(--radius); color: var(--muted); transition: background .15s, color .15s; flex: none; }
.icon-btn:hover { background: var(--surface-2); color: var(--ink); }
.link { color: var(--link); font-weight: 600; font-size: 13px; display: inline-flex; align-items: center; gap: 4px; }
.link:hover { text-decoration: underline; }

.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px 3px 8px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; line-height: 1.4; }
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.pill-progress { color: var(--c-progress); background: var(--p-progress); }
.pill-review { color: var(--c-review); background: var(--p-review); }
.pill-awaiting { color: var(--c-awaiting); background: var(--p-awaiting); }
.pill-pending { color: var(--c-pending); background: var(--p-pending); }
.pill-done { color: var(--c-done); background: var(--p-done); }
.pill-danger { color: var(--c-danger); background: var(--p-danger); }
.pill-neutral { color: var(--c-neutral); background: var(--p-neutral); }
.tag { display: inline-flex; align-items: center; gap: 5px; font-size: 12px; color: var(--muted); padding: 2px 8px; border: 1px solid var(--line); border-radius: 999px; font-weight: 500; white-space: nowrap; }
.count-b { min-width: 22px; height: 22px; padding: 0 7px; border-radius: 999px; background: var(--p-awaiting); color: var(--c-awaiting); font-weight: 700; font-size: 12px; display: inline-grid; place-items: center; }
.due { display: inline-block; font-size: 12px; font-weight: 600; padding: 2px 9px; border-radius: 999px; background: var(--surface-2); color: var(--ink-2); white-space: nowrap; flex: none; }
.due.soon { background: var(--p-awaiting); color: var(--c-awaiting); }
.due.late { background: var(--p-danger); color: var(--c-danger); }
kbd { font: 600 11px var(--font); padding: 1px 6px; border: 1px solid var(--line); border-radius: 5px; color: var(--muted); white-space: nowrap; }

.av { --s: 32px; width: var(--s); height: var(--s); border-radius: 50%; display: inline-grid; place-items: center; font-weight: 700; font-size: calc(var(--s) * .36); flex: none; letter-spacing: .02em; color: #fff; background: #5B6B7F; }
.av-t0 { background: #2F3E4E; } .av-t1 { background: #0B5384; } .av-t2 { background: #7A4E9C; } .av-t3 { background: #A0522D; } .av-t4 { background: #1F7A6D; } .av-t5 { background: #31527A; } .av-t6 { background: #8A5A12; }
.av-stack { display: inline-flex; } .av-stack .av { box-shadow: 0 0 0 2px var(--surface-solid, var(--surface)); } .av-stack .av + .av { margin-left: -8px; }
.who { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.who > span:not(.av) { display: flex; flex-direction: column; min-width: 0; }
.who small { color: var(--muted); font-size: 12px; }

.meter { position: relative; height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; flex: 1; min-width: 48px; display: block; }
.meter > span { position: absolute; inset: 0 auto 0 0; background: var(--ring); border-radius: inherit; transition: width .5s ease; }
.ring { position: relative; display: inline-grid; place-items: center; flex: none; }
.ring svg { position: absolute; inset: 0; }
.ring span { font-size: 11px; font-weight: 700; position: relative; }
.bars { display: flex; align-items: flex-end; gap: 10px; height: calc(var(--h) + 40px); padding-top: 4px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.bar { width: 100%; max-width: 34px; border-radius: 4px 4px 2px 2px; background: color-mix(in srgb, var(--ring) 35%, transparent); transition: height .6s ease; max-height: var(--h); }
.bar-col.is-last .bar { background: var(--ring); }
.bar-v { font-size: 11px; color: var(--muted); font-weight: 600; } .bar-l { font-size: 12px; color: var(--muted); }

/* case journey — one node per stage */
.jr { display: flex; align-items: center; width: 100%; --jr-h: 12px; --jr-d: 10px; }
.jr-s { flex: 1; position: relative; height: var(--jr-h); display: flex; align-items: center; justify-content: center; min-width: 0; }
.jr-s::before { content: ''; position: absolute; left: 0; right: 0; top: 50%; height: 2px; transform: translateY(-50%); background: var(--track); }
.jr-s:first-child::before { left: 50%; } .jr-s:last-child::before { right: 50%; }
.jr-s.done::before { background: var(--ring); }
.jr-s.now::before { background: linear-gradient(90deg, var(--ring) 50%, var(--track) 50%); }
.jr-s:first-child.now::before { background: var(--track); }
.jr-s i { position: relative; z-index: 1; width: var(--jr-d); height: var(--jr-d); border-radius: 50%; background: var(--surface-solid, var(--surface)); border: 2px solid var(--track); }
.jr-s.done i { background: var(--ring); border-color: var(--ring); }
.jr-s.now i { width: calc(var(--jr-d) + 4px); height: calc(var(--jr-d) + 4px); border-color: var(--jr-now, var(--ring)); background: var(--surface-solid, var(--surface)); box-shadow: 0 0 0 4px color-mix(in srgb, var(--jr-now, var(--ring)) 18%, transparent); }
.jr-sm { --jr-h: 10px; --jr-d: 7px; } .jr-sm .jr-s::before { height: 1.5px; } .jr-sm .jr-s.now i { box-shadow: 0 0 0 3px color-mix(in srgb, var(--jr-now, var(--ring)) 18%, transparent); }
.jr-lg { --jr-h: 22px; --jr-d: 13px; margin: 6px 0 18px; } .jr-lg .jr-s::before { height: 3px; }

.slots { display: inline-flex; gap: 4px; flex: none; }
.slots i { width: 11px; height: 15px; border-radius: 3px; border: 1.5px solid var(--line); background: transparent; }
.slots i.used { background: var(--ring); border-color: var(--ring); }
.slots i.over { background: var(--c-awaiting); border-color: var(--c-awaiting); }
.hbar { display: flex; height: 8px; border-radius: 999px; background: var(--track); overflow: hidden; flex: 1; min-width: 60px; }
.hbar > span { height: 100%; background: var(--ring); }
.hbar > .hbar-over { background: var(--c-awaiting); }
.datebox { width: 44px; height: 48px; border-radius: var(--radius); border: 1px solid var(--line); display: grid; place-content: center; text-align: center; flex: none; background: var(--surface-solid, var(--surface)); line-height: 1.1; }
.datebox small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--muted); } .datebox b { font-size: 18px; font-family: var(--font-h); }

/* inputs */
.form { display: grid; gap: 14px; }
.form label, .field { display: grid; gap: 6px; font-size: 13px; font-weight: 600; color: var(--ink-2); }
.form input:not([type=checkbox]):not([type=radio]):not([type=file]), .form select, .form textarea { width: 100%; min-height: 42px; padding: 9px 12px; border-radius: var(--radius); border: 1px solid var(--line); background: var(--surface-solid, var(--surface)); color: var(--ink); font-weight: 400; transition: border-color .15s, box-shadow .15s; }
.form textarea { resize: vertical; }
.form input:focus, .form select:focus, .form textarea:focus { outline: none; border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.form-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.fine { font-size: 12px; color: var(--muted); display: flex; gap: 6px; align-items: center; margin: 12px 0 0; }
.callout { display: flex; gap: 10px; align-items: flex-start; padding: 11px 14px; border-radius: var(--radius); background: var(--p-progress); color: var(--c-progress); font-size: 13px; font-weight: 500; margin-bottom: 16px; }
.callout .ic { margin-top: 1px; }
.search-field, .select-field { display: flex; align-items: center; gap: 8px; height: 38px; padding: 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-solid, var(--surface)); color: var(--muted); min-width: 0; }
.search-field { flex: 1 1 220px; max-width: 340px; }
.search-field input, .select-field select { border: 0; outline: 0; background: transparent; color: var(--ink); width: 100%; min-width: 0; height: 100%; }
.select-field select { appearance: none; padding-right: 8px; cursor: pointer; }
.select-field select option { background: var(--surface-solid, #fff); color: var(--ink); }
.search-field:focus-within, .select-field:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 20%, transparent); }

.drop { position: relative; border: 1.5px dashed var(--line); border-radius: var(--radius-lg); padding: 24px; text-align: center; display: grid !important; justify-items: center; gap: 6px; cursor: pointer; transition: border-color .15s, background .15s; background: var(--surface-2); }
.drop.over, .drop:hover { border-color: var(--focus); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; }
.drop-i { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--p-progress); color: var(--c-progress); }
.drop small { color: var(--muted); font-weight: 400; }
.up-files { list-style: none; margin: 0; padding: 0; display: grid; gap: 6px; }
.up-files li { display: flex; gap: 8px; align-items: center; font-size: 13px; padding: 6px 10px; background: var(--surface-2); border-radius: var(--radius); }
.up-files small { margin-left: auto; color: var(--muted); }
.up-prog { display: grid; gap: 6px; } .up-prog small { color: var(--muted); }

/* panels / tables / tabs */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px; box-shadow: var(--shadow); min-width: 0; }
.panel-h { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; margin-bottom: 14px; }
.panel-h h2 { font-size: 20px; margin-top: 4px; letter-spacing: -.01em; }
.panel-h h2.h-sm, .h-sm { font-size: 16px; margin: 0; }
.eyebrow { display: flex; align-items: center; gap: 6px; text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 700; color: var(--muted); margin-bottom: 10px; }
.stack { display: grid; gap: 16px; align-content: start; min-width: 0; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.page-title { font-size: 28px; font-weight: 800; letter-spacing: -.02em; }
.page-sub { color: var(--muted); margin: 6px 0 0; max-width: 640px; }
.page-kicker { color: var(--muted); font-size: 13px; font-weight: 600; margin: 0 0 6px; }
.page-actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 16px; }
.tabs { display: flex; gap: 4px; flex-wrap: wrap; }
.tab { display: inline-flex; align-items: center; gap: 6px; padding: 7px 12px; border-radius: var(--radius); font-size: 13px; font-weight: 600; color: var(--muted); transition: background .15s, color .15s; white-space: nowrap; }
.tab em { font-style: normal; font-size: 11.5px; min-width: 18px; padding: 0 5px; border-radius: 999px; background: var(--surface-2); color: var(--muted); text-align: center; }
.tab:hover { color: var(--ink); background: var(--surface-2); }
.tab.on { color: var(--primary); background: var(--p-progress); }
.tab.on em { background: var(--surface-solid, #fff); color: inherit; }
.panel > .tabs { margin-bottom: 12px; }
.table-wrap { overflow-x: auto; margin: 0 -4px; padding: 0 4px; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table td { padding: 13px 12px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
.table tbody tr:last-child td { border-bottom: 0; }
.table .num { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
.td-act { text-align: right; color: var(--muted); width: 1%; }
.td-act .icon-btn { width: 32px; height: 32px; }
.cell-title { font-weight: 600; color: var(--ink); }
.cell-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.doc-link { display: inline-flex; align-items: center; gap: 10px; font-weight: 600; color: var(--ink); text-align: left; min-width: 0; }
.doc-link > span { display: grid; min-width: 0; } .doc-link small { color: var(--muted); font-weight: 500; font-size: 12px; }
.doc-link:hover { color: var(--link); }
.ficon { width: 34px; height: 34px; border-radius: 6px; display: inline-grid; place-items: center; font-size: 9.5px; font-weight: 800; letter-spacing: .04em; flex: none; }
.ficon-pdf { background: #FCE8E6; color: #B42318; } .ficon-doc { background: #E6EFFA; color: #1D5FA8; } .ficon-xls { background: #E4F4EA; color: #1C7445; } .ficon-req { background: var(--p-awaiting); color: var(--c-awaiting); }
.ds-c .ficon-pdf { background: rgba(248, 113, 113, .14); color: #FCA5A5; } .ds-c .ficon-doc { background: rgba(108, 180, 240, .14); color: #93C5FD; } .ds-c .ficon-xls { background: rgba(79, 209, 161, .14); color: #6EE7B7; }
.empty { display: grid; justify-items: center; gap: 8px; padding: 40px 16px; color: var(--muted); text-align: center; }

/* vertical milestone timeline */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.tl { position: relative; display: flex; gap: 14px; padding-bottom: 18px; }
.tl::before { content: ''; position: absolute; left: 11px; top: 24px; bottom: 0; width: 2px; background: var(--line); }
.tl:last-child::before { display: none; }
.tl.is-done::before { background: var(--ring); }
.tl-dot { width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; flex: none; border: 2px solid var(--line); background: var(--surface-solid, var(--surface)); color: #fff; position: relative; z-index: 1; }
.tl.is-done .tl-dot { background: var(--ring); border-color: var(--ring); }
.tl.is-current .tl-dot { border-color: var(--ring); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ring) 20%, transparent); }
.tl.is-current .tl-dot::after { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ring); }
.tl-body small { color: var(--muted); font-size: 12px; } .tl-body p { margin: 2px 0 0; font-weight: 600; }
.tl.is-next .tl-body p { color: var(--muted); font-weight: 500; }
.note { margin: 0 0 14px; padding: 12px 14px; border-radius: var(--radius); background: var(--surface-2); color: var(--ink-2); font-size: 14px; line-height: 1.6; }
.outcome { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius); background: var(--p-done); color: var(--c-done); margin: 0 0 16px; }
.outcome span { display: grid; color: var(--ink); font-weight: 500; } .outcome small { text-transform: uppercase; letter-spacing: .06em; font-size: 11px; font-weight: 700; color: var(--c-done); }

/* modal */
.modal-wrap { position: fixed; inset: 0; z-index: 80; display: grid; place-items: center; padding: 20px; }
.modal-backdrop { position: absolute; inset: 0; background: rgba(8, 15, 28, .5); opacity: 0; transition: opacity .2s; backdrop-filter: blur(2px); }
.modal { position: relative; width: min(560px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; background: var(--surface-solid, var(--surface)); color: var(--ink); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); border: 1px solid var(--line); opacity: 0; transform: translateY(12px) scale(.98); transition: opacity .2s, transform .22s cubic-bezier(.2, .7, .2, 1); }
.modal-lg { width: min(880px, 100%); } .modal-sm { width: min(440px, 100%); }
.modal-wrap.in .modal-backdrop { opacity: 1; } .modal-wrap.in .modal { opacity: 1; transform: none; }
.modal-head { display: flex; justify-content: space-between; gap: 12px; align-items: flex-start; padding: 20px 22px 14px; border-bottom: 1px solid var(--line-2); }
.modal-head h3 { font-size: 19px; font-weight: 700; }
.modal-eyebrow { font-size: 12px; color: var(--muted); font-weight: 600; margin-bottom: 4px; }
.modal-body { padding: 18px 22px; overflow-y: auto; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 14px 22px; border-top: 1px solid var(--line-2); flex-wrap: wrap; }
.md-top { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; align-items: center; }
.md-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 14px; padding: 14px; background: var(--surface-2); border-radius: var(--radius); margin: 14px 0; }
.md-grid > div { display: grid; gap: 4px; align-content: start; justify-items: start; }
.md-grid > div > small { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; }
.md-grid b + small { text-transform: none; letter-spacing: 0; font-weight: 400; font-size: 12px; color: var(--muted); }
.md-cols { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
.md-cols h4 { font-size: 14px; margin-bottom: 12px; }
.md-docs { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.md-docs li { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; }
.success { display: grid; justify-items: center; text-align: center; gap: 8px; padding: 18px 8px; color: var(--c-done); }
.success h4 { font-size: 18px; color: var(--ink); } .success p { color: var(--muted); max-width: 380px; }
.doc-view { display: grid; grid-template-columns: 1fr 220px; gap: 20px; }
.paper { position: relative; overflow: hidden; background: #fff; color: #1F2933; border: 1px solid #E1E6EB; border-radius: 6px; padding: 28px 30px; box-shadow: 0 6px 20px -10px rgba(0, 0, 0, .25); font-family: 'Plus Jakarta Sans', sans-serif; font-size: 13px; }
.paper-wm { position: absolute; right: -20px; top: 40%; transform: rotate(-30deg); font-size: 90px; font-weight: 800; color: rgba(11, 83, 132, .05); letter-spacing: .1em; pointer-events: none; }
.paper-h { display: flex; justify-content: space-between; align-items: center; padding-bottom: 14px; margin-bottom: 18px; border-bottom: 2px solid #0B5384; }
.paper-h img { height: 34px; width: auto; } .paper-h span { font-size: 10px; letter-spacing: .12em; text-transform: uppercase; color: #66727F; font-weight: 700; }
.paper h4 { font-family: 'Plus Jakarta Sans', sans-serif; font-size: 17px; margin-bottom: 6px; color: #0B2A44; }
.paper-meta { color: #66727F; font-size: 12px; }
.paper-lines { display: grid; gap: 9px; margin: 16px 0; } .paper-lines i { height: 7px; background: #EEF1F4; border-radius: 4px; }
.sig-box { display: flex; align-items: center; gap: 8px; margin-top: 18px; padding: 14px; border: 1.5px dashed #B7791F; border-radius: 6px; color: #946200; font-weight: 700; background: #FFFBF0; }
.doc-meta { display: grid; gap: 14px; align-content: start; font-size: 13px; }
.doc-meta > div { display: grid; gap: 4px; justify-items: start; } .doc-meta small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }
.contact-who { margin-bottom: 18px; } .contact-who b { font-size: 16px; }
.contact-l { display: grid; gap: 14px; }
.contact-l > div { display: flex; gap: 12px; align-items: flex-start; } .contact-l .ic { color: var(--link); margin-top: 2px; }
.contact-l span { display: grid; min-width: 0; } .contact-l b, .contact-l a { overflow-wrap: anywhere; font-weight: 600; } .contact-l small { color: var(--muted); font-size: 12.5px; }

/* toast */
#toasts { position: fixed; z-index: 120; left: 50%; bottom: 24px; transform: translateX(-50%); display: grid; gap: 8px; justify-items: center; pointer-events: none; width: max-content; max-width: calc(100vw - 32px); }
.toast { display: flex; align-items: center; gap: 10px; padding: 11px 16px; border-radius: 10px; background: #13202F; color: #fff; font-size: 14px; box-shadow: 0 12px 30px -10px rgba(0, 0, 0, .45); opacity: 0; transform: translateY(10px); transition: opacity .25s, transform .25s; font-family: var(--font); }
.toast.in { opacity: 1; transform: none; }
.toast-ok .ic { color: #6EE7B7; } .toast-warn .ic { color: #FBBF24; } .toast-info .ic { color: #93C5FD; }
.ds-c .toast { background: #1C2638; border: 1px solid rgba(255, 255, 255, .1); }

/* popovers */
.pop-anchor { position: relative; }
.pop { position: absolute; z-index: 60; top: calc(100% + 8px); right: 0; min-width: 240px; background: var(--surface-solid, var(--surface)); border: 1px solid var(--line); border-radius: var(--radius-lg); box-shadow: var(--shadow-lg); padding: 6px; opacity: 0; visibility: hidden; transform: translateY(-6px); transition: opacity .16s, transform .16s, visibility .16s; color: var(--ink); text-align: left; }
.pop.open { opacity: 1; visibility: visible; transform: none; }
.pop-up { top: auto; bottom: calc(100% + 10px); }
.pop-h { display: flex; justify-content: space-between; align-items: center; padding: 8px 10px 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.pop-i { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border-radius: var(--radius); font-size: 14px; font-weight: 500; color: var(--ink-2); }
.pop-i:hover, .pop-i.on { background: var(--surface-2); color: var(--ink); }
.pop-danger { color: var(--c-danger); }
.pop-notif { width: min(360px, calc(100vw - 24px)); }
.notif { display: flex; gap: 10px; width: 100%; padding: 10px; border-radius: var(--radius); text-align: left; position: relative; }
.notif:hover { background: var(--surface-2); }
.notif > span:last-child { display: grid; gap: 1px; font-size: 13px; padding-right: 14px; } .notif small { font-size: 12px; color: var(--ink-2); }
.notif small.muted { color: var(--muted); }
.notif.unread::after { content: ''; position: absolute; right: 10px; top: 14px; width: 8px; height: 8px; border-radius: 50%; background: var(--k-doc); }
.notif-i { width: 32px; height: 32px; border-radius: 50%; background: var(--p-progress); color: var(--c-progress); display: grid; place-items: center; flex: none; }
.pop-user { width: 260px; }
.pop-user-h { display: flex; gap: 10px; align-items: center; padding: 10px; border-bottom: 1px solid var(--line-2); margin-bottom: 4px; }
.pop-user-h > span:not(.av) { display: grid; } .pop-user-h small { color: var(--muted); font-size: 12px; }
.user-btn { display: flex; align-items: center; gap: 8px; padding: 4px 6px 4px 4px; border-radius: 999px; transition: background .15s; }
.user-btn:hover { background: rgba(127, 127, 127, .12); }
.user-n { display: grid; text-align: left; line-height: 1.25; } .user-n small { opacity: .7; font-size: 12px; }
.bell { position: relative; }
.bell-n { position: absolute; top: 3px; right: 2px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 999px; background: #E5484D; color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; box-shadow: 0 0 0 2px var(--bell-ring, #fff); }
.gsearch { position: relative; }
.gsearch label { display: flex; align-items: center; gap: 8px; }
.gsearch input { border: 0; outline: 0; background: transparent; width: 100%; min-width: 0; }
.gsearch label:focus-within { box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 25%, transparent); }
.pop-search { left: 0; right: 0; min-width: 0; max-height: 380px; overflow-y: auto; }
.sr { display: flex; gap: 10px; align-items: center; width: 100%; padding: 9px 10px; border-radius: var(--radius); color: var(--ink-2); }
.sr:hover { background: var(--surface-2); color: var(--ink); }
.sr span { display: grid; min-width: 0; } .sr b { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .sr small { font-size: 12px; color: var(--muted); }
.sr-empty { padding: 12px; color: var(--muted); font-size: 13px; }
.scrim { display: none; }

.check { display: inline-flex !important; align-items: center; gap: 8px; cursor: pointer; font-weight: 500 !important; font-size: 13px; color: var(--ink-2); }
.check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.check-box { width: 18px; height: 18px; border-radius: 4px; border: 1.5px solid var(--line); display: grid; place-items: center; color: transparent; transition: background .15s, border-color .15s; background: var(--surface-solid, #fff); }
.check input:checked + .check-box { background: var(--primary); border-color: var(--primary); color: #fff; }
.check input:focus-visible + .check-box { outline: 2px solid var(--focus); outline-offset: 2px; }

/* ---------- 3. Logins (shared) ---------- */
.login-form { display: grid; gap: 16px; }
.field-l { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.field-in { position: relative; display: flex; align-items: center; gap: 10px; height: 46px; padding: 0 6px 0 12px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface-solid, #fff); color: var(--muted); transition: border-color .15s, box-shadow .15s; }
.field-in:focus-within { border-color: var(--focus); box-shadow: 0 0 0 3px color-mix(in srgb, var(--focus) 22%, transparent); }
.field-in input { flex: 1; min-width: 0; height: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 15px; }
.pw-toggle { width: 36px; height: 36px; display: grid; place-items: center; color: var(--muted); border-radius: 6px; }
.pw-toggle:hover { color: var(--ink); }
.field-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.form-err { color: var(--c-danger); font-size: 13px; font-weight: 600; }
.form-err:empty { display: none; }
.shake { animation: shake .35s; }
@keyframes shake { 25% { transform: translateX(-6px); } 75% { transform: translateX(6px); } }
.issued { display: flex; gap: 10px; align-items: flex-start; margin: 20px 0 0; padding-top: 16px; border-top: 1px solid var(--line-2); font-size: 13px; color: var(--muted); }
.issued .ic { color: var(--c-done); margin-top: 1px; } .issued .link { font-size: 13px; display: inline; }
.demo-note { display: flex; gap: 8px; align-items: center; justify-content: center; font-size: 12px; color: var(--muted); margin-top: 18px; text-align: center; }

/* deadline ruler (dashboard A, preview on login A) */
.ruler { position: relative; min-width: 860px; }
.ruler-lanes { position: relative; height: 190px; }
.rm { --kc: var(--k-case); position: absolute; left: var(--x); bottom: 0; height: 60px; width: 16%; display: flex; flex-direction: column; justify-content: flex-start; gap: 1px; padding: 0 0 0 9px; border-left: 2px solid var(--kc); text-align: left; z-index: 3; }
.rm::after { content: ''; position: absolute; left: -6px; bottom: -6px; width: 10px; height: 10px; border-radius: 50%; background: var(--kc); box-shadow: 0 0 0 3px var(--surface-solid, var(--surface)); }
.rm.lane-1 { height: 122px; z-index: 2; } .rm.lane-2 { height: 184px; z-index: 1; }
.rm.flip { transform: translateX(-100%); border-left: 0; border-right: 2px solid var(--kc); padding: 0 9px 0 0; text-align: right; }
.rm.flip::after { left: auto; right: -6px; }
.rm-d, .rm-t { background: var(--surface-solid, var(--surface)); }
.rm-d { font-size: 11px; font-weight: 700; color: var(--kc); letter-spacing: .01em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rm-t { font-size: 13px; font-weight: 600; color: var(--ink); line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
button.rm:hover .rm-t { color: var(--kc); text-decoration: underline; text-underline-offset: 2px; }
.k-case { --kc: var(--k-case); } .k-comp { --kc: var(--k-comp); } .k-doc { --kc: var(--k-doc); } .k-ret { --kc: var(--k-ret); }
.ruler-axis { position: relative; height: 34px; border-top: 2px solid var(--ink); margin-top: 6px; }
.tk { position: absolute; left: var(--x); top: 0; width: 1px; height: 6px; background: var(--muted); opacity: .45; }
.tk.wk { opacity: .2; }
.tk.lb { height: 10px; opacity: 1; background: var(--muted); }
.tk em { position: absolute; top: 13px; left: 0; transform: translateX(-50%); font-style: normal; font-size: 11.5px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.tk.now { width: 2px; height: 14px; background: var(--k-doc); opacity: 1; }
.tk.now em { color: var(--ink); font-weight: 800; transform: none; left: -1px; }
.rlegend { list-style: none; display: flex; gap: 14px; flex-wrap: wrap; margin: 0; padding: 0; font-size: 12px; color: var(--muted); font-weight: 600; }
.rlegend li { display: inline-flex; align-items: center; gap: 6px; } .rlegend li::before { content: ''; width: 8px; height: 8px; border-radius: 2px; background: var(--kc); }

/* ----- Login A · Horizon ----- */
.lg-a { min-height: 100vh; display: grid; grid-template-columns: minmax(420px, 560px) minmax(0, 1fr); background: #fff; }
.lga-form { display: flex; flex-direction: column; padding: 36px 56px 28px; min-width: 0; }
.lga-logo { height: 38px; width: auto; align-self: flex-start; }
.lga-form-in { margin: auto 0; width: 100%; max-width: 400px; padding: 40px 0; }
.lga-kicker { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--primary); margin-bottom: 10px; }
.lga-form-in h1 { font-size: 36px; font-weight: 800; letter-spacing: -.03em; }
.lga-sub { color: var(--muted); margin: 8px 0 28px; font-size: 15px; }
.lg-a .demo-note { justify-content: flex-start; margin-top: 0; }
.lga-show { --surface-solid: #0B2540; --ink: #fff; --muted: #8FA6C2; --k-case: #7DB8F2; --k-comp: #4FD1B5; --k-doc: #FF9A5C; --k-ret: #B9A6F7; position: relative; overflow: hidden; background: radial-gradient(800px 500px at 100% 0%, rgba(79, 157, 209, .22), transparent 60%), #0B2540; color: #fff; display: grid; align-items: center; padding: 56px; }
.lga-show::before { content: ''; position: absolute; inset: 0; background-image: linear-gradient(90deg, rgba(255, 255, 255, .035) 1px, transparent 1px); background-size: calc(100% / 15) 100%; pointer-events: none; }
.lga-show-in { position: relative; max-width: 720px; }
.lga-show h2 { font-size: clamp(34px, 3.6vw, 52px); font-weight: 800; letter-spacing: -.035em; line-height: 1.04; }
.lga-show p { color: #A9BDD3; font-size: 16px; max-width: 440px; margin: 16px 0 40px; }
.lga-ruler { overflow: hidden; padding: 22px 24px 4px; border-radius: 16px; background: rgba(255, 255, 255, .04); border: 1px solid rgba(255, 255, 255, .1); }
.lga-ruler .ruler { min-width: 0; }
.lga-ruler .ruler-lanes { height: 150px; }
.lga-ruler .rm { height: 40px; width: 24%; } .lga-ruler .rm.lane-1 { height: 86px; } .lga-ruler .rm.lane-2 { height: 132px; }
.lga-ruler .rm-t { font-size: 12.5px; -webkit-line-clamp: 1; background: transparent; }
.lga-ruler .rm::after { box-shadow: 0 0 0 3px #10304D; }
.lga-ruler .ruler-axis { border-top-color: rgba(255, 255, 255, .6); height: 18px; }
.lga-ruler .tk { background: #fff; }
.lga-mods { list-style: none; display: flex; flex-wrap: wrap; gap: 8px; margin: 28px 0 0; padding: 0; }
.lga-mods li { font-size: 13px; color: #C9D7E6; padding: 5px 12px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .14); }

/* ----- Login C · Night Docket ----- */
.lg-c { position: relative; min-height: 100vh; overflow: hidden; background: radial-gradient(900px 600px at 12% 8%, rgba(11, 83, 132, .42), transparent 60%), radial-gradient(700px 500px at 95% 95%, rgba(79, 157, 209, .14), transparent 60%), #070B14; }
.lgc-glow { position: absolute; inset: 0; background-image: linear-gradient(rgba(255, 255, 255, .03) 1px, transparent 1px), linear-gradient(90deg, rgba(255, 255, 255, .03) 1px, transparent 1px); background-size: 56px 56px; -webkit-mask-image: radial-gradient(ellipse at 30% 30%, #000, transparent 70%); mask-image: radial-gradient(ellipse at 30% 30%, #000, transparent 70%); pointer-events: none; }
.lgc-wrap { position: relative; max-width: 1200px; margin: 0 auto; min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, 440px); gap: 64px; align-items: center; padding: 48px 40px; }
.lgc-logo { height: 42px; width: auto; margin-bottom: 52px; }
.lgc-kicker { display: inline-flex; align-items: center; gap: 8px; color: #6CB4F0; font-weight: 600; font-size: 13px; letter-spacing: .12em; text-transform: uppercase; padding: 6px 12px; border-radius: 999px; background: rgba(108, 180, 240, .1); border: 1px solid rgba(108, 180, 240, .2); margin-bottom: 22px; }
.lgc-hero h1 { font-size: clamp(36px, 4.6vw, 56px); font-weight: 700; letter-spacing: -.035em; line-height: 1.04; }
.lgc-hero h1 span { color: #7D8AA3; }
.lgc-lead { color: #A3AEC2; font-size: 17px; max-width: 500px; margin: 20px 0 0; }
.lgc-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 44px; max-width: 620px; }
.kpi-g { display: grid; gap: 4px; padding: 18px; border-radius: 14px; background: rgba(255, 255, 255, .035); border: 1px solid rgba(255, 255, 255, .08); }
.kpi-g small { color: #8E9AAF; margin-top: 10px; } .kpi-g b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.lgc-sample { font-size: 12px; color: #6B778C; margin-top: 12px; }
.kpi-i { width: 40px; height: 40px; border-radius: 10px; display: grid; place-items: center; flex: none; }
.ki-blue { background: rgba(59, 130, 246, .16); color: #7DB8F2; } .ki-amber { background: rgba(245, 158, 11, .15); color: #FBBF24; } .ki-teal { background: rgba(52, 211, 153, .14); color: #4FD1A1; } .ki-violet { background: rgba(167, 139, 250, .15); color: #B59CF5; } .ki-rose { background: rgba(244, 63, 94, .14); color: #FB7185; }
.lgc-card { padding: 32px; border-radius: 18px; background: rgba(17, 24, 39, .72); border: 1px solid rgba(255, 255, 255, .09); box-shadow: 0 40px 80px -30px rgba(0, 0, 0, .8), inset 0 1px 0 rgba(255, 255, 255, .05); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
.lgc-card-h { display: flex; gap: 14px; align-items: center; margin-bottom: 26px; }
.lgc-card-h h2 { font-size: 22px; font-weight: 700; } .lgc-card-h p { margin: 2px 0 0; color: #8E9AAF; font-size: 14px; }
.lgc-mark { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #2F80D8, #0B5384); box-shadow: 0 10px 24px -8px rgba(47, 128, 216, .7); }
.lg-c .field-in { background: rgba(255, 255, 255, .04); border-color: rgba(255, 255, 255, .1); height: 48px; }
.lg-c .btn-primary { box-shadow: 0 12px 28px -10px rgba(47, 128, 216, .85); border-radius: 10px; }
.lgc-foot { display: flex; justify-content: flex-end; gap: 10px; align-items: center; margin-top: 14px; font-size: 12.5px; color: #8E9AAF; flex-wrap: wrap; }
.lgc-foot span { display: inline-flex; gap: 6px; align-items: center; }

/* ---------- 4. Floating design switcher ---------- */
#switcher { position: fixed; right: 20px; bottom: 20px; z-index: 100; font-family: 'Plus Jakarta Sans', system-ui, sans-serif; color: #0E1B2C; }
.sw-fab { display: flex; align-items: center; gap: 8px; height: 52px; padding: 0 16px 0 14px; border-radius: 999px; background: #0E1B2C; color: #fff; box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .5), 0 0 0 1px rgba(255, 255, 255, .08); transition: transform .15s; }
.sw-fab:hover { transform: translateY(-2px); }
.sw-fab span { width: 24px; height: 24px; border-radius: 50%; background: #4F9DD1; display: grid; place-items: center; font-weight: 700; font-size: 12px; }
.sw-pop { position: absolute; right: 0; bottom: 64px; width: 340px; max-width: calc(100vw - 40px); background: #fff; border-radius: 14px; padding: 8px; box-shadow: 0 24px 60px -18px rgba(0, 0, 0, .45), 0 0 0 1px rgba(14, 27, 44, .06); opacity: 0; visibility: hidden; transform: translateY(8px) scale(.98); transform-origin: bottom right; transition: opacity .18s, transform .18s, visibility .18s; }
#switcher.open .sw-pop { opacity: 1; visibility: visible; transform: none; }
.sw-h { display: grid; padding: 8px 10px 10px; } .sw-h b { font-size: 14px; } .sw-h small { color: #66727F; font-size: 12px; }
.sw-opt { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 10px; text-align: left; transition: background .15s; }
.sw-opt:hover { background: #F3F6FA; }
.sw-opt.on { background: #EEF5FC; box-shadow: inset 0 0 0 1.5px #4F9DD1; }
.sw-opt > span:nth-child(2) { display: grid; flex: 1; } .sw-opt b { font-size: 13.5px; } .sw-opt small { color: #66727F; font-size: 12px; }
.sw-check { width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center; color: transparent; border: 1.5px solid #D5DCE4; }
.sw-opt.on .sw-check { background: #0B5384; border-color: #0B5384; color: #fff; }
.th { position: relative; width: 66px; height: 46px; border-radius: 7px; overflow: hidden; flex: none; border: 1px solid #E1E6EB; }
.th i { position: absolute; display: block; }
.th-a { background: #F4F6F9; } .th-a .t1 { left: 0; top: 0; bottom: 0; width: 16px; background: #fff; border-right: 1px solid #E2E7EE; } .th-a .t2 { left: 22px; right: 6px; top: 20px; height: 2px; background: #0E1A2B; } .th-a .t3 { left: 28px; top: 9px; width: 2px; height: 11px; background: #D9480F; box-shadow: 14px 4px 0 #0B5384, 24px -2px 0 #0F7B6C; }
.th-b { background: #fff; } .th-b .t1 { left: 0; top: 0; bottom: 0; width: 18px; background: linear-gradient(#2A4FE0, #1C38B8); } .th-b .t2 { left: 6px; top: 15px; width: 12px; height: 6px; background: #fff; border-radius: 3px 0 0 3px; } .th-b .t3 { left: 24px; top: 8px; right: 6px; height: 12px; background: #EEF2FF; border-radius: 3px; box-shadow: 0 16px 0 2px #F3F5FD; }
.th-c { background: radial-gradient(circle at 20% 20%, #11406A, #070B14 70%); border-color: #1D2738; } .th-c .t1 { left: 7px; top: 12px; width: 24px; height: 4px; background: #E8EEF6; border-radius: 2px; box-shadow: 0 7px 0 #56637A, 0 14px 0 #2A3446; } .th-c .t2 { display: none; } .th-c .t3 { right: 7px; top: 9px; width: 22px; height: 28px; background: rgba(255, 255, 255, .08); border: 1px solid rgba(255, 255, 255, .16); border-radius: 4px; }

/* ---------- 5A. Dashboard A · Horizon ---------- */
.dash-a { display: grid; grid-template-columns: 252px minmax(0, 1fr); min-height: 100vh; background: var(--bg); }
.da-side { position: sticky; top: 0; height: 100vh; background: #fff; border-right: 1px solid var(--line); display: flex; flex-direction: column; padding: 20px 14px 16px; overflow-y: auto; z-index: 20; }
.da-brand { display: flex; align-items: center; justify-content: space-between; padding: 0 6px; }
.da-brand img { height: 32px; width: auto; }
.da-close { display: none; }
.da-org { display: flex; gap: 10px; align-items: center; margin: 20px 0 8px; padding: 10px; border: 1px solid var(--line); border-radius: 10px; }
.da-org > span:last-child { display: grid; min-width: 0; line-height: 1.3; } .da-org b { font-size: 14px; } .da-org small { color: var(--muted); font-size: 11.5px; }
.org-mk { width: 34px; height: 34px; border-radius: 8px; background: var(--primary); color: #fff; font-weight: 800; font-size: 13px; display: grid; place-items: center; flex: none; }
.da-nav { display: grid; gap: 1px; align-content: start; flex: 1; }
.da-g { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 10px 6px; }
.da-link { display: flex; align-items: center; gap: 11px; width: 100%; padding: 8px 10px; border-radius: 8px; color: var(--ink-2); font-size: 14px; font-weight: 500; transition: background .15s, color .15s; }
.da-link .ic { color: var(--muted); }
.da-link:hover { background: var(--surface-2); color: var(--ink); }
.da-link.on { background: #E9F1F8; color: var(--primary); font-weight: 700; } .da-link.on .ic { color: var(--primary); }
.da-link span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.da-link em { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--p-awaiting); color: var(--c-awaiting); font-style: normal; font-size: 11.5px; font-weight: 700; display: grid; place-items: center; }
.da-lead { display: flex; gap: 10px; align-items: center; padding: 14px 6px 0; margin-top: 16px; border-top: 1px solid var(--line-2); }
.da-lead > span:not(.av) { flex: 1; display: grid; min-width: 0; line-height: 1.3; } .da-lead small { color: var(--muted); font-size: 11.5px; } .da-lead b { font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.da-body { min-width: 0; display: flex; flex-direction: column; }
.da-top { position: sticky; top: 0; z-index: 15; height: 64px; display: flex; align-items: center; gap: 16px; padding: 0 32px; background: rgba(244, 246, 249, .88); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); border-bottom: 1px solid var(--line); --bell-ring: var(--bg); }
.da-menu, .da-mlogo { display: none; }
.da-mlogo { height: 26px; width: auto; }
.gsearch.a { flex: 1; max-width: 480px; }
.gsearch.a label { height: 40px; padding: 0 10px 0 12px; border-radius: 10px; background: #fff; border: 1px solid var(--line); color: var(--muted); }
.gsearch.a input { color: var(--ink); }
.da-top-r { margin-left: auto; display: flex; gap: 6px; align-items: center; }
.da-main { padding: 28px 32px 56px; width: 100%; max-width: 1380px; }
.ds-a .page-title { font-size: 30px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); padding: 20px 24px; min-width: 0; box-shadow: var(--shadow); }
.card-t { font-size: 16px; font-weight: 700; letter-spacing: -.005em; }
.card-sub { color: var(--muted); font-size: 13px; margin: 2px 0 0; }
.card-th { display: flex; justify-content: space-between; align-items: flex-start; gap: 16px; margin-bottom: 14px; flex-wrap: wrap; }
.ruler-card { padding-bottom: 12px; }
.ruler-scroll { overflow-x: auto; margin: 0 -24px; padding: 6px 24px 4px; scrollbar-width: thin; }
.overdue-bar { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 12px; margin: 0 0 8px; border-radius: 8px; background: var(--p-danger); color: var(--c-danger); text-align: left; font-size: 13px; }
.overdue-bar span { flex: 1; color: var(--ink-2); min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.overdue-bar:hover span { text-decoration: underline; }
.strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); margin: 16px 0; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; }
.strip-c { display: grid; gap: 2px; padding: 16px 20px; text-align: left; border-left: 1px solid var(--line); transition: background .15s; }
.strip-c:first-child { border-left: 0; }
.strip-c:hover { background: var(--surface-2); }
.strip-c small { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.strip-c b { font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; }
.strip-c b small { font-size: 14px; color: var(--muted); }
.strip-c span { color: var(--muted); font-size: 12.5px; }
.ova-grid { display: grid; grid-template-columns: minmax(0, 1.65fr) minmax(0, 1fr); gap: 16px; align-items: start; }
.ova-grid2 { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; margin-top: 16px; align-items: start; }
.cases-a { display: grid; }
.case-a { display: grid; grid-template-columns: minmax(0, 1.25fr) 110px minmax(0, 1fr) auto 28px; align-items: center; gap: 16px; padding: 13px 8px; margin: 0 -8px; border-bottom: 1px solid var(--line-2); text-align: left; border-radius: 8px; transition: background .12s; }
.case-a:last-child { border-bottom: 0; }
.case-a:hover { background: var(--surface-2); }
.case-a-t { display: grid; min-width: 0; } .case-a-t small { color: var(--muted); font-size: 11.5px; } .case-a-t b { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.case-a-n { display: block; min-width: 0; font-size: 13px; color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.case-a-n small { display: block; font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em; font-weight: 700; color: var(--muted); }
.act-list, .doc-list, .te-list, .day-list { list-style: none; margin: 0; padding: 0; }
.day-list li button { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px 0; border-bottom: 1px solid var(--line-2); text-align: left; }
.day-list li:last-child button { border-bottom: 0; }
.day-list span:not(.act-v) { display: grid; min-width: 0; } .day-list small { font-size: 11.5px; font-weight: 700; color: var(--kc); } .day-list b { font-size: 14px; font-weight: 600; }
.day-list button:hover b { color: var(--link); }
.act-list button { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px 0; border-bottom: 1px solid var(--line-2); text-align: left; }
.act-list li:last-child button { border-bottom: 0; }
.act-list button:hover b { color: var(--link); }
.act-list span:not(.act-v):not(.due) { flex: 1; display: grid; min-width: 0; } .act-list b { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .act-list small { color: var(--muted); font-size: 12px; }
.act-v { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; flex: none; color: var(--kc); background: color-mix(in srgb, var(--kc) 12%, transparent); }
.k-sign, .k-approve { --kc: var(--k-case); } .k-upload { --kc: var(--k-doc); }
.ret-a-row { display: flex; align-items: center; gap: 14px; padding: 6px 0; }
.ret-a-row > span:first-child { display: grid; min-width: 84px; line-height: 1.25; } .ret-a-row small { color: var(--muted); font-size: 12px; font-weight: 600; } .ret-a-row b { font-size: 18px; font-weight: 800; } .ret-a-row b i { font-style: normal; font-size: 13px; color: var(--muted); font-weight: 600; }
.ret-a .card-sub { margin-top: 8px; }
.doc-list li { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.doc-list li:last-child { border-bottom: 0; }
.doc-list .doc-link > span { font-size: 13.5px; } .doc-list .doc-link > span { overflow: hidden; }
.te-list li { display: flex; gap: 12px; align-items: flex-start; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.te-list li:last-child { border-bottom: 0; }
.te-list span:not(.av) { flex: 1; display: grid; min-width: 0; } .te-list b { font-size: 13.5px; font-weight: 600; } .te-list small { color: var(--muted); font-size: 12px; }
.te-list em { font-style: normal; font-weight: 700; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- 5C. Dashboard C · Night Docket ---------- */
.dash-c { position: relative; min-height: 100vh; display: grid; grid-template-columns: 84px minmax(0, 1fr); grid-template-rows: 68px 1fr; }
.dc-bg { position: fixed; inset: 0; background: radial-gradient(900px 520px at 85% -10%, rgba(11, 83, 132, .38), transparent 60%), radial-gradient(600px 400px at 0% 100%, rgba(79, 157, 209, .08), transparent 60%); pointer-events: none; z-index: 0; }
.dc-rail { grid-row: 1 / -1; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; align-items: center; gap: 4px; padding: 12px 0 16px; border-right: 1px solid var(--line); background: rgba(7, 11, 20, .65); z-index: 25; }
.dc-mark { width: 48px; height: 48px; border-radius: 12px; display: grid; place-items: center; color: #fff; background: linear-gradient(140deg, #2F80D8, #0B5384); box-shadow: 0 10px 22px -8px rgba(47, 128, 216, .7); margin-bottom: 14px; flex: none; }
.dc-r { position: relative; width: 48px; height: 44px; border-radius: 10px; display: grid; place-items: center; color: #8E9AAF; transition: background .15s, color .15s; flex: none; }
.dc-r:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.dc-r.on { background: #2F80D8; color: #fff; box-shadow: 0 8px 22px -6px rgba(47, 128, 216, .8); }
.dc-r em { position: absolute; top: 3px; right: 3px; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 999px; background: #F05A5A; color: #fff; font-size: 10px; font-weight: 700; font-style: normal; display: grid; place-items: center; }
.dc-tip { position: absolute; left: calc(100% + 12px); top: 50%; transform: translate(-4px, -50%); background: #1C2638; border: 1px solid var(--line); color: #fff; padding: 6px 10px; border-radius: 6px; font-size: 12px; white-space: nowrap; opacity: 0; pointer-events: none; transition: opacity .15s, transform .15s; z-index: 5; }
.dc-r:hover .dc-tip, .dc-r:focus-visible .dc-tip { opacity: 1; transform: translate(0, -50%); }
.dc-out { margin-top: auto; }
.dc-top { grid-column: 2; position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 0 28px; background: rgba(7, 11, 20, .72); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-bottom: 1px solid var(--line); --bell-ring: #0B101B; }
.dc-logo { height: 26px; width: auto; flex: none; }
.dc-sep { width: 1px; height: 28px; background: var(--line); flex: none; }
.dc-ws { display: grid; line-height: 1.25; white-space: nowrap; } .dc-ws small { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .1em; } .dc-ws b { font-size: 14px; }
.gsearch.c { flex: 1; max-width: 460px; margin-left: auto; }
.gsearch.c label { height: 40px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); padding: 0 12px; color: var(--muted); }
.gsearch.c input { color: var(--ink); } .gsearch.c input::placeholder { color: #7D889C; }
.dc-top-r { display: flex; gap: 6px; align-items: center; }
.dc-main { grid-column: 2; position: relative; z-index: 1; padding: 30px 32px 64px; min-width: 0; }
.dc-tabs { display: none; }
.ds-c .page-title { font-size: 34px; font-weight: 700; letter-spacing: -.025em; }
.date-chip { display: inline-flex; gap: 8px; align-items: center; height: 40px; padding: 0 14px; border: 1px solid var(--line); border-radius: 10px; color: var(--ink-2); font-size: 13.5px; }
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 20px; margin-bottom: 20px; }
.kpi { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding: 22px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); text-align: left; transition: border-color .15s, transform .15s; min-width: 0; }
.kpi:hover { border-color: rgba(255, 255, 255, .2); transform: translateY(-2px); }
.kpi-txt { display: grid; gap: 4px; } .kpi-txt small { color: var(--muted); font-size: 14px; } .kpi-txt b { font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1.1; } .kpi-sub { font-size: 12px; color: var(--muted); }
.kpi .kpi-i { width: 46px; height: 46px; border-radius: 12px; }
.bento { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 20px; align-items: start; }
.glass { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 22px; min-width: 0; }
.g-h { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 14px; }
.g-h h2 { font-size: 16px; font-weight: 600; }
.b-bal { grid-column: span 8; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1.2fr); gap: 28px; background: linear-gradient(135deg, rgba(16, 94, 82, .38), rgba(10, 38, 48, .45)); border-color: rgba(79, 209, 161, .28); }
.b-bal-l { display: grid; gap: 8px; align-content: start; }
.b-bal-l small { color: #7FE0BF; font-size: 14px; } .b-bal-l b { font-size: 32px; font-weight: 700; letter-spacing: -.02em; line-height: 1.15; } .b-bal-l > span { color: #7FE0BF; display: inline-flex; gap: 6px; align-items: center; font-size: 13.5px; }
.b-bal-l .btn { justify-self: start; margin-top: 10px; background: rgba(255, 255, 255, .06); border-color: rgba(79, 209, 161, .3); color: #D7F5EA; }
.b-bal-r small { color: var(--muted); font-size: 12px; } .b-bal .bars { --ring: #4FD1A1; }
.b-act { grid-column: span 4; }
.act-c { display: flex; gap: 12px; align-items: center; width: 100%; padding: 10px; border-radius: 10px; text-align: left; transition: background .15s; }
.act-c:hover { background: var(--surface-2); }
.act-c .kpi-i { width: 34px; height: 34px; border-radius: 9px; }
.act-c > span:last-child { display: grid; min-width: 0; } .act-c b { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .act-c small { color: var(--muted); font-size: 12px; }
.b-mat { grid-column: span 8; min-width: 0; } .b-mat .g-h h2 { font-size: 22px; font-weight: 700; }
.b-week { grid-column: span 4; }
.b-docs { grid-column: span 8; } .b-team { grid-column: span 4; }
.rows { display: grid; gap: 12px; }
.row-m { display: flex; align-items: center; gap: 16px; padding: 18px 22px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; transition: border-color .15s, background .15s; min-width: 0; }
.row-m:hover { border-color: rgba(255, 255, 255, .2); background: rgba(255, 255, 255, .05); }
.row-main { flex: 1; min-width: 0; display: grid; gap: 4px; } .row-main b { font-size: 16px; font-weight: 600; } .row-main small { color: var(--muted); font-size: 13.5px; } .row-main i { font-style: normal; margin: 0 6px; opacity: .6; }
.agenda { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }
.agenda button { display: flex; gap: 12px; align-items: center; width: 100%; padding: 8px; border-radius: 10px; text-align: left; transition: background .15s; }
.agenda button:hover { background: var(--surface-2); }
.agenda button > span:last-child { display: grid; min-width: 0; } .agenda b { font-size: 14px; font-weight: 600; } .agenda small { color: var(--muted); font-size: 12px; }
.ag-d { width: 46px; height: 50px; border-radius: 10px; background: rgba(255, 255, 255, .05); border: 1px solid var(--line); display: grid; place-content: center; text-align: center; flex: none; }
.ag-d small { font-size: 10.5px; text-transform: uppercase; letter-spacing: .06em; } .ag-d b { font-size: 18px; line-height: 1.1; }
.mini-docs { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.mini-doc { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: 10px; border: 1px solid var(--line); text-align: left; min-width: 0; transition: border-color .15s, background .15s; }
.mini-doc:hover { border-color: rgba(255, 255, 255, .2); background: var(--surface-2); }
.mini-doc > span:last-child { display: grid; min-width: 0; } .mini-doc b { font-size: 13px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; } .mini-doc small { color: var(--muted); font-size: 12px; }
.team-c { display: flex; gap: 14px; flex-wrap: wrap; }
.team-c button { display: grid; justify-items: center; gap: 6px; font-size: 12px; color: var(--ink-2); }
.team-c button:hover .av { box-shadow: 0 0 0 2px #6CB4F0; }
.team-note { margin: 16px 0 0; font-size: 12.5px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.ds-c .panel { background: var(--surface); }
.ds-c .btn-ghost { background: transparent; }
.ds-c .tab.on { color: #fff; background: rgba(47, 128, 216, .25); }
.ds-c .card { background: var(--surface); }
.dgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(250px, 100%), 1fr)); gap: 14px; }
.tile { background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 12px; padding: 14px; display: grid; gap: 8px; min-width: 0; transition: border-color .15s, background .15s; }
.tile-d:hover { border-color: rgba(255, 255, 255, .2); }
.tile small { color: var(--muted); font-size: 12px; }
.tile-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tile-d .doc-link { font-size: 14px; line-height: 1.35; }
.tile-foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-2); }
.tile-req { border-style: dashed; border-color: rgba(244, 163, 92, .5); }

/* ---------- 6. Module layouts ---------- */
/* B6 case progress */
.mpicker { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(200px, 100%), 1fr)); gap: 10px; margin-bottom: 20px; }
.mp { display: grid; gap: 6px; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius-lg); background: var(--surface); text-align: left; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.mp:hover { border-color: var(--muted); }
.mp .mono { font-size: 11px; color: var(--muted); } .mp b { font-size: 13px; line-height: 1.3; font-weight: 600; min-height: 34px; }
.mp.on { border-color: var(--primary); box-shadow: 0 0 0 1px var(--primary); }
.ds-c .mp.on { border-color: #4F9DD1; box-shadow: 0 0 0 1px #4F9DD1; }
.progress-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(280px, 1fr); gap: 20px; align-items: start; }
.prog-stats { display: flex; gap: 28px; align-items: center; flex-wrap: wrap; padding: 16px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin-bottom: 22px; }
.prog-stats > div { display: grid; } .prog-stats small { color: var(--muted); font-size: 12px; } .prog-stats .ring span { font-size: 14px; }
.next-card h3 { font-size: 18px; margin-bottom: 6px; } .next-card p { margin: 0; }
.ds-a .next-card { border-top: 3px solid var(--k-doc); }
.ds-c .next-card { background: linear-gradient(135deg, rgba(47, 128, 216, .22), rgba(11, 83, 132, .15)); border-color: rgba(108, 180, 240, .3); }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 14px; }

/* B7 case history */
.hist-grid { display: grid; grid-template-columns: minmax(300px, 380px) minmax(0, 1fr); gap: 20px; align-items: start; }
.hist-side { position: sticky; top: 84px; max-height: calc(100vh - 100px); overflow-y: auto; }
.hist-side .toolbar { gap: 10px; } .hist-side .search-field { max-width: none; flex-basis: 100%; }
.hlist { display: grid; gap: 2px; }
.hcase { display: grid; grid-template-columns: 54px minmax(0, 1fr); gap: 4px 10px; padding: 11px 10px; border-radius: var(--radius); text-align: left; transition: background .12s; align-items: start; }
.hcase .pill { grid-column: 2; justify-self: start; }
.hcase:hover { background: var(--surface-2); }
.hcase.on { background: var(--p-progress); }
.ds-c .hcase.on { background: rgba(47, 128, 216, .18); }
.hcase-y { font-family: 'JetBrains Mono', monospace; font-size: 12px; color: var(--muted); padding-top: 2px; }
.hcase-m { display: grid; min-width: 0; } .hcase-m b { font-size: 14px; font-weight: 600; line-height: 1.3; } .hcase-m small { color: var(--muted); font-size: 12px; }
.hist-sum { color: var(--ink-2); margin-bottom: 14px; }
.facts { display: grid; grid-template-columns: repeat(auto-fit, minmax(120px, 1fr)); gap: 14px; padding: 14px 0; border-top: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); margin: 0 0 20px; }
.facts > div { display: grid; gap: 3px; align-content: start; justify-items: start; } .facts small { color: var(--muted); font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; } .facts b { font-size: 14px; font-weight: 600; }
.hist-tl-h { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 14px; flex-wrap: wrap; }
.hist-tl-h h3 { font-size: 16px; }
.ctl-y { display: grid; grid-template-columns: 54px minmax(0, 1fr); }
.ctl-yl { font-size: 13px; font-weight: 800; color: var(--muted); padding-top: 1px; }
.ctl-y ol { list-style: none; margin: 0; padding: 0 0 6px; border-left: 2px solid var(--line); }
.ctl-y:last-child ol { border-left-style: dashed; }
.ctl-e { position: relative; display: grid; grid-template-columns: 58px minmax(0, 1fr); gap: 10px; padding: 0 0 16px 20px; }
.ctl-d { font-size: 12.5px; font-weight: 600; color: var(--muted); padding-top: 1px; white-space: nowrap; }
.ctl-dot { position: absolute; left: -9px; top: 1px; width: 16px; height: 16px; border-radius: 50%; display: grid; place-items: center; background: var(--ring); color: #fff; box-shadow: 0 0 0 3px var(--surface-solid, var(--surface)); }
.ds-c .ctl-dot { box-shadow: 0 0 0 3px #0D1320; }
.ctl-e.doc .ctl-dot { background: var(--surface-solid, var(--surface)); color: var(--ring); border: 1.5px solid var(--ring); width: 18px; height: 18px; left: -10px; }
.ctl-e.planned .ctl-dot { background: var(--surface-solid, var(--surface)); border: 2px dashed var(--muted); }
.ctl-e.current .ctl-dot { background: var(--surface-solid, var(--surface)); border: 2px solid var(--k-doc); box-shadow: 0 0 0 3px var(--surface-solid, var(--surface)), 0 0 0 6px color-mix(in srgb, var(--k-doc) 22%, transparent); }
.ctl-b { display: grid; min-width: 0; } .ctl-b p { margin: 0; font-weight: 600; font-size: 14.5px; } .ctl-b small { color: var(--muted); font-size: 12.5px; }
.ctl-e.planned p { color: var(--muted); font-weight: 500; }
.ctl-e.current small { color: var(--k-doc); font-weight: 700; }
.ctl-b .doc-link { font-weight: 500; font-size: 14px; }

/* B8 documents */
.ds-a .doc-link small { margin-top: 1px; }

/* B9 compliance */
.comp-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 20px; align-items: start; }
.cgroup-h { display: flex; align-items: center; gap: 8px; font-family: var(--font); font-size: 11.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin: 18px 0 4px; }
.cgroup:first-child .cgroup-h { margin-top: 6px; }
.cgroup-h span { min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--surface-2); display: inline-grid; place-items: center; font-size: 11px; }
.cgroup-h.late { color: var(--c-danger); } .cgroup-h.late span { background: var(--p-danger); }
.crow { display: grid; grid-template-columns: 44px minmax(0, 1fr) 150px 140px 36px; gap: 14px; align-items: center; padding: 12px 10px; margin: 0 -10px; border-bottom: 1px solid var(--line-2); border-radius: var(--radius); cursor: pointer; transition: background .12s; }
.crow:last-child { border-bottom: 0; }
.crow:hover { background: var(--surface-2); }
.crow.s-danger .datebox { border-color: var(--c-danger); background: var(--p-danger); } .crow.s-danger .datebox small, .crow.s-danger .datebox b { color: var(--c-danger); }
.crow.s-done { opacity: .75; }
.crow-m { display: grid; min-width: 0; } .crow-m b { font-size: 14.5px; font-weight: 600; line-height: 1.35; } .crow-m small { color: var(--muted); font-size: 12.5px; }
.crow-o { display: inline-flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--ink-2); font-weight: 500; }
.crow-o .ic { color: var(--muted); }
.crow-s { display: grid; justify-items: start; gap: 3px; } .crow-s small { color: var(--muted); font-size: 12px; }
.remind { color: var(--muted); opacity: .55; } .remind.on { color: var(--primary); opacity: 1; } .ds-c .remind.on { color: var(--link); }
.ticks { margin: 0; padding: 0 0 0 18px; display: grid; gap: 10px; color: var(--ink-2); font-size: 13.5px; }
.own-k { display: flex; justify-content: space-between; align-items: center; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13.5px; }
.own-k span { display: inline-flex; gap: 8px; align-items: center; color: var(--ink-2); }

/* B10 timesheet */
.ts-sum { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)) minmax(0, 1.5fr); margin-bottom: 16px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-lg); overflow: hidden; box-shadow: var(--shadow); }
.ts-sum > div { padding: 16px 20px; border-left: 1px solid var(--line-2); display: grid; gap: 2px; align-content: start; min-width: 0; }
.ts-sum > div:first-child { border-left: 0; }
.ts-sum small { color: var(--muted); font-size: 12.5px; font-weight: 600; } .ts-sum b { font-family: var(--font-h); font-size: 26px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.2; } .ts-sum span { color: var(--muted); font-size: 12.5px; }
.ds-c .ts-sum b { font-weight: 700; }
.ts-by { gap: 5px !important; }
.ts-l { display: grid !important; grid-template-columns: 22px minmax(0, 1fr) 40px; gap: 8px; align-items: center; color: var(--ink) !important; }
.ts-l i { position: relative; height: 6px; border-radius: 999px; background: var(--track); overflow: hidden; }
.ts-l i::after { content: ''; position: absolute; inset: 0 auto 0 0; width: var(--w); background: var(--ring); border-radius: inherit; }
.ts-l em { font-style: normal; font-size: 12.5px; font-weight: 700; text-align: right; font-variant-numeric: tabular-nums; }
.ts-table td { padding: 11px 12px; }
.ts-table tr.nd td { border-top: 1px solid var(--line); }
.ts-table tbody tr:first-child td { border-top: 0; }
.ts-date { white-space: nowrap; width: 1%; } .ts-date b { font-size: 13px; font-weight: 700; }
.ditto { opacity: 0; font-size: 13px; }
.ts-table .cell-title { font-weight: 500; }
.ts-table tfoot td { font-weight: 800; padding: 13px 12px; border-top: 2px solid var(--line); }
.ts-table .tag { margin-left: 4px; }

/* B11 retainer */
.ret-grid { display: grid; grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.ret-now { grid-column: 1; } .ret-hist { grid-column: 2; grid-row: 1; } .ret-entries { grid-column: 1; } .ret-grid > aside { grid-column: 2; }
.ret-now-h p { margin: -4px 0 0; font-size: 13px; }
.ret-meters { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; margin: 16px 0 18px; }
.ret-m { padding: 18px; border: 1px solid var(--line); border-radius: var(--radius-lg); display: grid; gap: 4px; align-content: start; }
.ret-m-h { display: flex; gap: 8px; align-items: center; color: var(--muted); font-size: 13px; font-weight: 600; }
.ret-big { font-family: var(--font-h); font-size: 42px; font-weight: 800; letter-spacing: -.035em; line-height: 1.1; }
.ds-c .ret-big { font-weight: 700; }
.ret-big small { font-family: var(--font); font-size: 15px; font-weight: 600; letter-spacing: 0; color: var(--muted); }
.ret-m .hbar { margin: 10px 0 6px; height: 10px; }
.ret-m .slots { margin: 10px 0 6px; gap: 6px; } .ret-m .slots i { width: 20px; height: 26px; border-radius: 5px; }
.ret-m p { margin: 0; color: var(--muted); font-size: 13px; }
.ret-rules { display: grid; gap: 10px; border-top: 1px solid var(--line-2); padding-top: 16px; }
.ret-rules > div { display: flex; gap: 10px; align-items: flex-start; font-size: 13.5px; color: var(--ink-2); }
.ret-rules .ic { color: var(--muted); margin-top: 2px; } .ret-rules b { color: var(--ink); margin-right: 6px; }
.rchart { margin-top: 26px; }
.rplot { position: relative; height: 170px; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; border-bottom: 1px solid var(--line); }
.rcol { height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; min-width: 0; }
.rcol-v { font-size: 11.5px; font-weight: 700; color: var(--muted); margin-bottom: 4px; font-variant-numeric: tabular-nums; }
.rcol-bar, .rcol-over { width: 62%; max-width: 40px; display: block; }
.rcol-bar { background: color-mix(in srgb, var(--ring) 30%, transparent); border-radius: 0 0 2px 2px; }
.rcol-over { background: var(--c-awaiting); border-radius: 4px 4px 0 0; }
.rcol-v + .rcol-bar { border-radius: 4px 4px 2px 2px; }
.rcol.is-cur .rcol-bar { background: var(--ring); } .rcol.is-cur .rcol-v { color: var(--ink); }
.rchart-cap { position: absolute; left: 0; right: 0; border-top: 1.5px dashed var(--ink-2); opacity: .55; pointer-events: none; z-index: 1; }
.rchart-cap em { position: absolute; right: 0; top: 3px; font-style: normal; font-size: 11px; font-weight: 700; color: var(--ink-2); }
.rlabels { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 12px; margin-top: 8px; }
.rlab { display: grid; justify-items: center; gap: 5px; } .rlab b { font-size: 12px; color: var(--muted); } .rlab.is-cur b { color: var(--ink); }
.rlab .slots { gap: 2px; } .rlab .slots i { width: 6px; height: 9px; border-radius: 2px; border-width: 1px; }
.rlist { list-style: none; margin: 0; padding: 0; }
.rlist li { display: grid; grid-template-columns: 50px 26px minmax(0, 1fr) auto auto; gap: 10px; align-items: center; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.rlist li:last-child { border-bottom: 0; }
.rlist-d { font-size: 12.5px; font-weight: 600; color: var(--muted); }
.rlist-m { display: grid; min-width: 0; } .rlist-m b { font-size: 13.5px; font-weight: 600; } .rlist-m small { color: var(--muted); font-size: 12px; }
.rlist-h { font-variant-numeric: tabular-nums; white-space: nowrap; }
.assume { background: var(--p-pending); border: 1px dashed color-mix(in srgb, var(--c-pending) 55%, transparent); box-shadow: none; }
.assume .eyebrow { color: var(--c-pending); } .assume p { margin: 0; font-size: 13.5px; color: var(--ink-2); }

/* B3 company & users */
.profile-grid { display: grid; grid-template-columns: minmax(0, 1.6fr) minmax(0, 1fr); gap: 20px; align-items: start; }
.users-t .who b { font-size: 14px; display: inline-flex; gap: 6px; align-items: center; }
.users-t .is-off { opacity: .6; }
.org { display: flex; gap: 16px; align-items: center; padding-bottom: 18px; border-bottom: 1px solid var(--line-2); margin-bottom: 18px; }
.org-mark { width: 56px; height: 56px; border-radius: 14px; background: var(--primary); color: #fff; font-weight: 800; font-size: 20px; display: grid; place-items: center; flex: none; }
.ds-c .org-mark { background: #2B74C4; }
.org h2 { font-size: 19px; } .org p { margin: 4px 0 0; }
.kv-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 18px 24px; }
.kv { display: grid; gap: 3px; min-width: 0; } .kv small { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; } .kv b { font-weight: 500; overflow-wrap: anywhere; }
.team { display: grid; gap: 2px; }
.team-m { display: flex; gap: 12px; align-items: center; padding: 8px 0; } .team-m > span:not(.av) { flex: 1; display: grid; min-width: 0; } .team-m small { color: var(--muted); font-size: 12.5px; }
.sec-row { display: flex; gap: 12px; align-items: center; padding: 8px 0; color: var(--muted); } .sec-row span { display: grid; } .sec-row b { color: var(--ink); font-size: 14px; } .sec-row small { font-size: 12.5px; }
.security .btn { margin-top: 12px; }

/* ---------- 7. Responsive ---------- */

@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .b-bal, .b-mat, .b-docs { grid-column: span 12; } .b-act, .b-week { grid-column: span 6; } .b-team { grid-column: span 12; }
  .case-a { grid-template-columns: minmax(0, 1fr) 96px auto 28px; } .case-a-n { display: none; }
  .crow { grid-template-columns: 44px minmax(0, 1fr) 130px 36px; } .crow-o { display: none; }
}
@media (max-width: 1100px) {
  .ova-grid, .ova-grid2, .progress-grid, .hist-grid, .comp-grid, .profile-grid { grid-template-columns: minmax(0, 1fr); }
  .ret-grid { grid-template-columns: minmax(0, 1fr); } .ret-grid > * { grid-column: 1 !important; grid-row: auto !important; }
  .hist-side { position: static; max-height: none; }
  .hlist { max-height: 320px; overflow-y: auto; }
  .strip { grid-template-columns: repeat(2, minmax(0, 1fr)); } .strip-c:nth-child(3) { border-left: 0; } .strip-c:nth-child(n+3) { border-top: 1px solid var(--line); }
  .ts-sum { grid-template-columns: repeat(3, minmax(0, 1fr)); } .ts-by { grid-column: 1 / -1; border-left: 0 !important; border-top: 1px solid var(--line-2); }
  .lgc-wrap { grid-template-columns: minmax(0, 1fr); gap: 36px; max-width: 620px; padding: 40px 24px; }
  .lgc-logo { margin-bottom: 30px; } .lgc-kpis { margin-top: 28px; }
  .lg-a { grid-template-columns: minmax(0, 1fr); }
  .lga-form { min-height: 100vh; padding: 28px 32px; } .lga-form-in { margin: auto; }
  .lg-a .demo-note { justify-content: center; }
  .lga-show { padding: 48px 32px; }
}
@media (max-width: 1024px) {
  .dash-a { grid-template-columns: minmax(0, 1fr); }
  .da-side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 60; transform: translateX(-100%); visibility: hidden; transition: transform .25s ease, visibility .25s; box-shadow: 10px 0 40px -10px rgba(0, 0, 0, .3); }
  .dash-a.drawer-open .da-side { transform: none; visibility: visible; }
  .da-close { display: grid; }
  .da-menu { display: grid; } .da-mlogo { display: block; }
  .da-top { padding: 0 20px; gap: 12px; }
  .da-main { padding: 24px 20px 48px; }
  .scrim { display: block; position: fixed; inset: 0; z-index: 55; background: rgba(8, 15, 28, .45); opacity: 0; pointer-events: none; transition: opacity .25s; }
  .drawer-open .scrim { opacity: 1; pointer-events: auto; }
}
@media (max-width: 760px) {
  .page-title, .ds-a .page-title { font-size: 24px; } .ds-c .page-title { font-size: 26px; }
  .page-head { align-items: flex-start; margin-bottom: 16px; }
  .page-actions { width: 100%; } .page-actions .btn { flex: 1; }
  .da-top { padding: 0 12px; } .gsearch.a { max-width: none; } .gsearch.a kbd { display: none; }
  .da-top .user-n { display: none; }
  .da-main { padding: 18px 14px 40px; }
  .card { padding: 16px; } .ruler-scroll { margin: 0 -16px; padding: 6px 16px 4px; }
  .rlegend { gap: 6px 12px; }
  .case-a { grid-template-columns: minmax(0, 1fr) auto; gap: 8px 12px; } .case-a .jr { grid-column: 1 / -1; grid-row: 2; } .case-a .av { display: none; }
  .dash-c { grid-template-columns: minmax(0, 1fr); grid-template-rows: 60px 1fr; }
  .dc-rail { display: none; }
  .dc-top { grid-column: 1; padding: 0 14px; gap: 10px; }
  .dc-logo { height: 22px; } .dc-sep, .dc-ws { display: none; }
  .gsearch.c { max-width: none; } .gsearch.c label { height: 38px; } .gsearch.c kbd { display: none; }
  .dc-main { grid-column: 1; padding: 20px 14px 110px; }
  .dc-tabs { display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 35; height: 66px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom)); background: rgba(10, 15, 26, .94); -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px); border-top: 1px solid var(--line); }
  .dc-tabs > button, .dc-tabs .pop-anchor > button { flex: 1; display: grid; justify-items: center; gap: 2px; font-size: 11px; color: var(--muted); padding-top: 4px; border-radius: 10px; width: 100%; }
  .dc-tabs .pop-anchor { flex: 1; display: flex; }
  .dc-tabs .on { color: #fff; } .dc-tabs .on .ic { color: #6CB4F0; }
  .dc-tabs .pop-more { right: 4px; }
  .kpis { gap: 12px; } .kpi { padding: 16px; flex-direction: column-reverse; gap: 10px; } .kpi-txt b { font-size: 26px; } .kpi .kpi-i { width: 38px; height: 38px; }
  .bento { gap: 14px; } .b-act, .b-week, .b-team { grid-column: span 12; }
  .b-bal { grid-template-columns: minmax(0, 1fr); gap: 18px; } .b-bal-l b { font-size: 26px; }
  .mini-docs { grid-template-columns: minmax(0, 1fr); }
  .row-m { padding: 14px; gap: 12px; flex-wrap: wrap; } .row-m .row-main { flex-basis: calc(100% - 62px); } .row-m .pill { margin-left: 58px; }
  .panel { padding: 16px; }
  .toolbar { gap: 10px; } .search-field { max-width: none; flex-basis: 100%; }
  .toolbar .select-field { flex: 1 1 160px; }
  .tabs { flex-wrap: nowrap; overflow-x: auto; scrollbar-width: none; margin: 0 -4px; padding: 0 4px; width: calc(100% + 8px); } .tabs::-webkit-scrollbar { display: none; }
  .table thead { display: none; }
  .table, .table tbody, .table tfoot, .table tr, .table td { display: block; width: 100%; }
  .table tr { padding: 12px 0; border-bottom: 1px solid var(--line); position: relative; }
  .table tbody tr:last-child { border-bottom: 0; }
  .table td, .ts-table td { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 0; border: 0 !important; text-align: right; }
  .table td[data-l]::before { content: attr(data-l); font-size: 12px; font-weight: 700; color: var(--muted); text-align: left; flex: none; }
  .table td:first-child { display: block; text-align: left; padding-bottom: 8px; } .table td:first-child::before { display: none; }
  .table td.td-act { justify-content: flex-end; width: 100%; }
  .ts-table td:first-child { padding-bottom: 2px; } .ts-date { width: 100%; } .ditto { opacity: 1; color: var(--muted); font-weight: 600; }
  .ts-table td[data-l="Work done"] { display: block; text-align: left; } .ts-table td[data-l="Work done"]::before { display: none; }
  .ts-table tfoot tr { border-top: 2px solid var(--line); } .ts-table tfoot td { display: flex; padding: 4px 0; }
  .ts-sum > div { padding: 14px; } .ts-sum b { font-size: 21px; } .ts-sum span { font-size: 12px; }
  .table td[data-l]::before { margin-right: auto; } .table td { justify-content: flex-end; }
  .form-2, .md-cols, .doc-view, .kv-grid { grid-template-columns: minmax(0, 1fr); }
  .modal-wrap { padding: 0; align-items: end; }
  .modal, .modal-lg, .modal-sm { width: 100%; max-height: 92vh; border-radius: 16px 16px 0 0; }
  .modal-head { padding: 16px 16px 12px; } .modal-body { padding: 16px; } .modal-foot { padding: 12px 16px calc(12px + env(safe-area-inset-bottom)); }
  .modal-foot .btn { flex: 1; }
  .paper { padding: 20px 18px; }
  .md-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .doc-meta { grid-template-columns: 1fr 1fr; }
  .prog-stats { gap: 16px 24px; }
  .crow { grid-template-columns: 44px minmax(0, 1fr) 36px; gap: 6px 12px; } .crow-s { grid-column: 2; grid-row: 2; display: flex; gap: 8px; align-items: center; } .crow .remind { grid-column: 3; grid-row: 1; }
  .ret-meters { grid-template-columns: minmax(0, 1fr); } .ret-big { font-size: 36px; }
  .rlist li { grid-template-columns: 44px minmax(0, 1fr) auto; } .rlist li .av, .rlist li .tag { display: none; }
  .ctl-y { grid-template-columns: 40px minmax(0, 1fr); } .ctl-e { grid-template-columns: minmax(0, 1fr); gap: 0; } .ctl-d { font-size: 11.5px; }
  .lga-form { padding: 24px 20px; } .lga-form-in h1 { font-size: 30px; }
  .lga-show { padding: 36px 20px; } .lga-show p { margin-bottom: 28px; }
  .lga-ruler { overflow-x: auto; } .lga-ruler .ruler { min-width: 560px; }
  .lgc-wrap { padding: 28px 16px 90px; gap: 26px; }
  .lgc-logo { height: 34px; margin-bottom: 22px; }
  .lgc-lead { font-size: 15px; }
  .lgc-kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; } .kpi-g { padding: 12px; } .kpi-g b { font-size: 15px; } .kpi-g small { font-size: 11px; margin-top: 6px; } .kpi-g .kpi-i { width: 32px; height: 32px; }
  .lgc-card { padding: 24px 18px; }
  #switcher { right: 14px; bottom: 14px; } .sw-fab { height: 48px; } .sw-pop { bottom: 58px; }
  .lg .demo-note { padding-right: 70px; justify-content: flex-start; text-align: left; }
  #toasts { bottom: 84px; }
}
@media (max-width: 400px) {
  .lgc-kpis { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .lgc-kpis .kpi-g:last-child { display: none; }
  .strip { grid-template-columns: minmax(0, 1fr); } .strip-c { border-left: 0 !important; } .strip-c + .strip-c { border-top: 1px solid var(--line); }
}

/* ---------- 8. Sign-in pages fit one screen (100dvh) ----------
   Spacing scales with the viewport height; on narrow screens the decorative panels step aside so the
   form alone fills the screen. Content is never clipped: a very small screen can still scroll. */
.lg, .lg-a, .lg-c, .lgc-wrap, .lga-form { min-height: 100vh; min-height: 100dvh; }
.lga-form { padding-block: clamp(16px, 4vh, 36px) clamp(12px, 3vh, 28px); }
.lga-form-in { padding: clamp(12px, 4vh, 40px) 0; }
.lga-sub { margin-bottom: clamp(16px, 3.4vh, 28px); }
.lga-show { padding-block: clamp(24px, 6vh, 56px); }
.lga-show p { margin: clamp(10px, 2vh, 16px) 0 clamp(18px, 4vh, 40px); }
.lgc-wrap { padding-block: clamp(20px, 5vh, 48px); }
.lgc-logo { margin-bottom: clamp(18px, 5vh, 52px); }
.lgc-kicker { margin-bottom: clamp(12px, 2.4vh, 22px); }
.lgc-kpis { margin-top: clamp(18px, 4.4vh, 44px); }
.lgc-card-h { margin-bottom: clamp(14px, 2.6vh, 26px); }
@media (max-height: 820px) {
  .login-form { gap: 12px; }
  .lg .field-in { height: 42px; }
  .lg .btn-lg { height: 44px; }
  .issued { margin-top: 14px; padding-top: 12px; }
  .lg .demo-note { margin-top: 10px; }
  .lga-form-in h1 { font-size: 30px; }
  .lga-ruler .ruler-lanes { height: 120px; } .lga-ruler .rm { height: 34px; } .lga-ruler .rm.lane-1 { height: 70px; } .lga-ruler .rm.lane-2 { height: 106px; }
  .lga-mods { margin-top: 18px; }
  .lgc-lead { font-size: 15.5px; margin-top: 14px; }
  .lgc-card { padding: 24px 28px; }
  .kpi-g { padding: 14px; } .kpi-g small { margin-top: 6px; }
}
@media (max-width: 1100px) {
  /* one column: the sign-in form takes the screen */
  .lga-show { display: none; }
  .lga-form-in { margin: auto; }
  .lgc-wrap { align-content: center; gap: clamp(12px, 2.4vh, 28px); }
  .lgc-kpis, .lgc-sample, .lgc-lead, .lgc-kicker { display: none; }
  .lgc-logo { margin-bottom: clamp(10px, 2vh, 20px); }
  .lgc-hero h1 { font-size: clamp(24px, 3.6vh, 36px); }
}
@media (max-width: 760px) {
  .lga-form { padding: 20px 20px 16px; }
  .lga-form-in { padding: 16px 0; }
  .lgc-wrap { padding: 16px 16px 64px; }
  .lgc-hero h1 { display: none; }
  .lgc-card { padding: 22px 18px; } .lgc-card-h { margin-bottom: 16px; } .lgc-mark { width: 40px; height: 40px; }
}
