/* Prabal Asset Verify — corporate design system with switchable skins */
:root, [data-skin="prabal-classic"] {
  --brand: #C8102E; --brand-2: #F4511E; --brand-ink: #fff; --brand-soft: #FDECEC;
  --bg: #F4F1F0; --surface: #FFFFFF; --surface-2: #FAF7F6; --border: #E7E0DE; --text: #1E1A19; --muted: #6E6563;
  --side-bg: linear-gradient(180deg, #5A0B12 0%, #7D0E18 55%, #8F1A12 100%); --side-text: #F6E4E2; --side-muted: #D9A9A4; --side-active: rgba(255,255,255,.14); --side-accent: #FF7A45;
  --top-bg: #FFFFFF; --top-text: #1E1A19; --head-bg: #F7F2F1;
  --good: #1E8E5A; --warn: #C27803; --bad: #C8102E; --info: #2563EB; --neutral: #6B7280;
  --c1: #C8102E; --c2: #F4511E; --c3: #F59E0B; --c4: #7A1020; --c5: #94A3B8; --c6: #2563EB;
  --shadow: 0 1px 2px rgba(40,10,10,.06), 0 4px 16px rgba(40,10,10,.06); --radius: 10px;
  --font: "Segoe UI", "Inter", system-ui, -apple-system, Roboto, "Helvetica Neue", Arial, sans-serif;
}
[data-skin="prabal-ember"] {
  --brand: #F0512A; --brand-2: #FF8A3D; --brand-ink: #fff; --brand-soft: #3A1E17;
  --bg: #121010; --surface: #1C1817; --surface-2: #231E1C; --border: #342C2A; --text: #F2ECEA; --muted: #A8A09D;
  --side-bg: linear-gradient(180deg, #0D0A09, #1A0C0A); --side-text: #EFE3E0; --side-muted: #9A8580; --side-active: rgba(240,81,42,.18); --side-accent: #FF8A3D;
  --top-bg: #1C1817; --top-text: #F2ECEA; --head-bg: #241F1D;
  --good: #34C27E; --warn: #F5A524; --bad: #FF5A5F; --info: #60A5FA; --neutral: #9CA3AF;
  --c1: #F0512A; --c2: #FF8A3D; --c3: #FBBF24; --c4: #FF5A5F; --c5: #57534E; --c6: #60A5FA;
  --shadow: 0 1px 2px rgba(0,0,0,.4), 0 6px 18px rgba(0,0,0,.35);
}
[data-skin="corporate-navy"] {
  --brand: #12355B; --brand-2: #C8102E; --brand-ink: #fff; --brand-soft: #E7EEF7;
  --bg: #EEF2F7; --surface: #FFFFFF; --surface-2: #F7F9FC; --border: #DCE3EC; --text: #14213D; --muted: #5B6B82;
  --side-bg: linear-gradient(180deg, #0B1F3A, #12355B); --side-text: #E6EDF7; --side-muted: #93A6C2; --side-active: rgba(255,255,255,.12); --side-accent: #F4511E;
  --top-bg: #FFFFFF; --top-text: #14213D; --head-bg: #F1F5FA;
  --c1: #12355B; --c2: #2E6DB4; --c3: #F4A100; --c4: #C8102E; --c5: #A3B1C4; --c6: #0EA5E9;
}
[data-skin="graphite"] {
  --brand: #2F343B; --brand-2: #E8401C; --brand-ink: #fff; --brand-soft: #ECEDEF;
  --bg: #EFF0F2; --surface: #FFFFFF; --surface-2: #F7F7F8; --border: #DEE0E3; --text: #1D2024; --muted: #646A73;
  --side-bg: linear-gradient(180deg, #1B1E22, #2A2E34); --side-text: #E9EBEE; --side-muted: #9097A1; --side-active: rgba(232,64,28,.22); --side-accent: #E8401C;
  --top-bg: #FFFFFF; --top-text: #1D2024; --head-bg: #F3F4F6;
  --c1: #E8401C; --c2: #2F343B; --c3: #F59E0B; --c4: #9CA3AF; --c5: #CBD0D6; --c6: #3B82F6;
}
[data-skin="emerald-ledger"] {
  --brand: #0F6B5C; --brand-2: #C8102E; --brand-ink: #fff; --brand-soft: #E3F2EE;
  --bg: #EEF4F2; --surface: #FFFFFF; --surface-2: #F6FAF9; --border: #D7E5E1; --text: #0F2924; --muted: #557069;
  --side-bg: linear-gradient(180deg, #0B3A32, #0F5247); --side-text: #E3F3EF; --side-muted: #8DB5AB; --side-active: rgba(255,255,255,.13); --side-accent: #F4C152;
  --top-bg: #FFFFFF; --top-text: #0F2924; --head-bg: #F0F7F5;
  --c1: #0F6B5C; --c2: #22A38A; --c3: #F4C152; --c4: #C8102E; --c5: #A8C3BC; --c6: #2563EB;
}
[data-skin="royal-indigo"] {
  --brand: #4338CA; --brand-2: #C8102E; --brand-ink: #fff; --brand-soft: #EDEBFC;
  --bg: #F1F0F8; --surface: #FFFFFF; --surface-2: #F8F7FD; --border: #E0DEF0; --text: #1B1838; --muted: #625E83;
  --side-bg: linear-gradient(180deg, #1E1B4B, #312E81); --side-text: #ECEBFB; --side-muted: #A5A2D8; --side-active: rgba(255,255,255,.13); --side-accent: #FDBA74;
  --top-bg: #FFFFFF; --top-text: #1B1838; --head-bg: #F4F3FB;
  --c1: #4338CA; --c2: #8B5CF6; --c3: #F59E0B; --c4: #C8102E; --c5: #B4B1D6; --c6: #0EA5E9;
}
[data-skin="sandstone"] {
  --brand: #A4421A; --brand-2: #C8102E; --brand-ink: #fff; --brand-soft: #F8EDE4;
  --bg: #F6F1EA; --surface: #FFFDFA; --surface-2: #FBF7F1; --border: #E8DED1; --text: #2B2118; --muted: #77695A;
  --side-bg: linear-gradient(180deg, #3B2A20, #57402F); --side-text: #F6EBDD; --side-muted: #C2AC93; --side-active: rgba(255,255,255,.12); --side-accent: #F59E0B;
  --top-bg: #FFFDFA; --top-text: #2B2118; --head-bg: #F7F0E6;
  --c1: #A4421A; --c2: #D97706; --c3: #EAB308; --c4: #7C2D12; --c5: #CBB9A4; --c6: #2563EB;
}
[data-skin="midnight"] {
  --brand: #3B82F6; --brand-2: #F4511E; --brand-ink: #fff; --brand-soft: #172540;
  --bg: #0A1120; --surface: #111A2E; --surface-2: #15203A; --border: #22304D; --text: #E5ECF8; --muted: #93A2BD;
  --side-bg: linear-gradient(180deg, #070C18, #0D1630); --side-text: #DCE5F5; --side-muted: #7A8BAA; --side-active: rgba(59,130,246,.2); --side-accent: #F4511E;
  --top-bg: #111A2E; --top-text: #E5ECF8; --head-bg: #16223C;
  --good: #34D399; --warn: #FBBF24; --bad: #F87171; --info: #60A5FA; --neutral: #94A3B8;
  --c1: #3B82F6; --c2: #F4511E; --c3: #FBBF24; --c4: #F87171; --c5: #334155; --c6: #34D399;
  --shadow: 0 1px 2px rgba(0,0,0,.45), 0 6px 18px rgba(0,0,0,.35);
}
[data-skin="high-contrast"] {
  --brand: #000000; --brand-2: #B00020; --brand-ink: #fff; --brand-soft: #FFF3B0;
  --bg: #FFFFFF; --surface: #FFFFFF; --surface-2: #F5F5F5; --border: #000000; --text: #000000; --muted: #222222;
  --side-bg: #000000; --side-text: #FFFFFF; --side-muted: #E5E5E5; --side-active: #FFE600; --side-accent: #FFE600;
  --top-bg: #FFFFFF; --top-text: #000; --head-bg: #EDEDED;
  --good: #006B2E; --warn: #8A4B00; --bad: #B00020; --info: #0033CC; --neutral: #333;
  --c1: #000; --c2: #B00020; --c3: #8A4B00; --c4: #0033CC; --c5: #9E9E9E; --c6: #006B2E;
  --shadow: none;
}
[data-skin="high-contrast"] .nav a.active { color: #000 !important; }
[data-skin="high-contrast"] .nav a.active .ico { color: #000; }

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { font-family: var(--font); background: var(--bg); color: var(--text); font-size: 14px; line-height: 1.45; -webkit-font-smoothing: antialiased; }
[data-density="compact"] body { font-size: 13px; }
a { color: var(--brand); text-decoration: none; } a:hover { text-decoration: underline; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; } h4 { font-size: 13px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
:focus-visible { outline: 3px solid var(--brand-2); outline-offset: 2px; border-radius: 4px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.muted { color: var(--muted); } .small { font-size: 12px; } .nowrap { white-space: nowrap; } .right { text-align: right; } .center { text-align: center; }
.mono { font-family: ui-monospace, "Cascadia Mono", Consolas, monospace; font-size: 12px; }
.row { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; } .row.between { justify-content: space-between; } .grow { flex: 1; }
.stack > * + * { margin-top: 16px; } .mt { margin-top: 16px; } .mb { margin-bottom: 16px; } .mt-s { margin-top: 8px; }
.grid { display: grid; gap: 16px; } .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)); }
.g6 { grid-template-columns: repeat(6, minmax(0,1fr)); } .g-2-1 { grid-template-columns: 2fr 1fr; } .g-1-2 { grid-template-columns: 1fr 2fr; }

/* ---------- Shell ---------- */
.shell { display: grid; grid-template-columns: 264px 1fr; min-height: 100vh; }
.shell.collapsed { grid-template-columns: 76px 1fr; }
.side { background: var(--side-bg); color: var(--side-text); position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; overflow: hidden; z-index: 20; }
.side .brand { padding: 18px 16px 14px; border-bottom: 1px solid rgba(255,255,255,.08); }
.side .brand img { width: 100%; max-width: 228px; display: block; border-radius: 8px; box-shadow: 0 2px 10px rgba(0,0,0,.25); }
.side .brand .app { margin-top: 10px; font-size: 11.5px; letter-spacing: .14em; text-transform: uppercase; color: var(--side-muted); font-weight: 600; }
.shell.collapsed .side .brand img { content: url("assets/icon.png"); width: 44px; height: 44px; }
.shell.collapsed .side .brand .app, .shell.collapsed .nav .lbl, .shell.collapsed .nav h5, .shell.collapsed .side-foot .lbl { display: none; }
.nav { flex: 1; overflow-y: auto; padding: 8px 10px 16px; scrollbar-width: thin; }
.nav h5 { margin: 16px 10px 6px; font-size: 10.5px; text-transform: uppercase; letter-spacing: .14em; color: var(--side-muted); font-weight: 600; }
.nav a { display: flex; align-items: center; gap: 12px; padding: 9px 12px; border-radius: 8px; color: var(--side-text); font-weight: 500; position: relative; text-decoration: none; margin: 1px 0; }
.nav a:hover { background: rgba(255,255,255,.07); }
.nav a.active { background: var(--side-active); font-weight: 650; }
.nav a.active::before { content: ""; position: absolute; left: -10px; top: 8px; bottom: 8px; width: 4px; border-radius: 0 4px 4px 0; background: var(--side-accent); }
.nav .ico { width: 20px; height: 20px; flex: none; opacity: .92; }
.nav .count { margin-left: auto; background: var(--side-accent); color: #fff; font-size: 11px; border-radius: 10px; padding: 0 7px; font-weight: 700; }
.side-foot { padding: 12px 16px; border-top: 1px solid rgba(255,255,255,.08); font-size: 11.5px; color: var(--side-muted); display: flex; align-items: center; gap: 8px; }
.main { min-width: 0; display: flex; flex-direction: column; }
.top { background: var(--top-bg); color: var(--top-text); border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 14px; padding: 10px 24px; position: sticky; top: 0; z-index: 15; min-height: 64px; }
.top .title { min-width: 0; } .top .title h1 { font-size: 18px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; } .top .crumb { font-size: 12px; color: var(--muted); }
.top .logo-mini { height: 30px; border-radius: 5px; display: none; }
.icon-btn { background: transparent; border: 1px solid transparent; color: inherit; width: 38px; height: 38px; border-radius: 9px; display: inline-grid; place-items: center; cursor: pointer; position: relative; }
.icon-btn:hover { background: var(--surface-2); border-color: var(--border); }
.icon-btn svg { width: 20px; height: 20px; }
.icon-btn .dot { position: absolute; top: 4px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; background: var(--bad); color: #fff; font-size: 10.5px; font-weight: 700; display: grid; place-items: center; }
.cycle-pick { display: flex; align-items: center; gap: 10px; border: 1px solid var(--border); background: var(--surface-2); border-radius: 10px; padding: 5px 6px 5px 12px; }
.cycle-pick label { font-size: 10.5px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 650; }
.cycle-pick select { border: 0; background: transparent; font-weight: 650; color: var(--text); max-width: 340px; padding: 4px 2px; font-size: 13.5px; }
.user-chip { display: flex; align-items: center; gap: 10px; padding: 4px 8px 4px 4px; border-radius: 22px; cursor: pointer; border: 1px solid transparent; background: none; color: inherit; font: inherit; }
.user-chip:hover { border-color: var(--border); background: var(--surface-2); }
.avatar { width: 34px; height: 34px; border-radius: 50%; background: linear-gradient(135deg, var(--brand), var(--brand-2)); color: var(--brand-ink); display: grid; place-items: center; font-weight: 700; font-size: 13px; flex: none; }
.user-chip .who { text-align: left; line-height: 1.15; } .user-chip .who b { font-size: 13px; display: block; } .user-chip .who span { font-size: 11.5px; color: var(--muted); }
.content { padding: 22px 24px 40px; max-width: 1560px; width: 100%; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head .sub { color: var(--muted); margin-top: 4px; }
.footer { margin-top: auto; padding: 14px 24px; color: var(--muted); font-size: 11.5px; border-top: 1px solid var(--border); display: flex; justify-content: space-between; align-items: center; gap: 12px; background: var(--surface); }
.footer img { height: 22px; border-radius: 4px; vertical-align: middle; }

/* ---------- Components ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); }
.card > .hd { padding: 14px 18px; border-bottom: 1px solid var(--border); display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.card > .bd { padding: 16px 18px; } .card > .bd.flush { padding: 0; } .card > .ft { padding: 12px 18px; border-top: 1px solid var(--border); background: var(--surface-2); border-radius: 0 0 var(--radius) var(--radius); }
.kpi { padding: 16px 18px; position: relative; overflow: hidden; }
.kpi .lbl { font-size: 12px; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .05em; }
.kpi .val { font-size: 28px; font-weight: 720; margin-top: 4px; letter-spacing: -.02em; }
.kpi .val small { font-size: 14px; color: var(--muted); font-weight: 600; margin-left: 4px; }
.kpi .meta { font-size: 12px; color: var(--muted); margin-top: 2px; }
.kpi::after { content: ""; position: absolute; top: 0; left: 0; right: 0; height: 3px; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.kpi.clickable { cursor: pointer; } .kpi.clickable:hover { border-color: var(--brand); }
.bar { height: 8px; border-radius: 6px; background: var(--surface-2); border: 1px solid var(--border); overflow: hidden; margin-top: 10px; display: flex; }
.bar > span { display: block; height: 100%; background: linear-gradient(90deg, var(--brand), var(--brand-2)); }
.mini-bar { display: inline-flex; align-items: center; gap: 8px; min-width: 120px; } .mini-bar .bar { margin: 0; flex: 1; height: 6px; min-width: 60px; }
.btn { display: inline-flex; align-items: center; gap: 8px; border-radius: 8px; border: 1px solid var(--border); background: var(--surface); color: var(--text); padding: 8px 14px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap; line-height: 1.2; }
.btn:hover { border-color: var(--brand); text-decoration: none; }
.btn svg { width: 16px; height: 16px; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: var(--brand-ink); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.accent { background: linear-gradient(135deg, var(--brand), var(--brand-2)); border: 0; color: #fff; }
.btn.danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 40%, var(--border)); } .btn.danger:hover { background: var(--bad); color: #fff; }
.btn.good { background: var(--good); border-color: var(--good); color: #fff; }
.btn.ghost { border-color: transparent; background: transparent; } .btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 5px 10px; font-size: 12.5px; } .btn[disabled] { opacity: .5; cursor: not-allowed; }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent;
  background: color-mix(in srgb, var(--tone, var(--neutral)) 13%, transparent); color: var(--tone, var(--neutral)); border-color: color-mix(in srgb, var(--tone, var(--neutral)) 25%, transparent); }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.t-good { --tone: var(--good); } .t-warn { --tone: var(--warn); } .t-bad { --tone: var(--bad); } .t-info { --tone: var(--info); } .t-neutral { --tone: var(--neutral); } .t-brand { --tone: var(--brand); }
.banner { border-radius: 10px; padding: 12px 16px; display: flex; gap: 12px; align-items: flex-start; border: 1px solid; background: color-mix(in srgb, var(--tone) 9%, var(--surface)); border-color: color-mix(in srgb, var(--tone) 30%, transparent); }
.banner svg { width: 20px; height: 20px; flex: none; color: var(--tone); margin-top: 1px; }
.banner b { color: var(--tone); }

table.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { background: var(--head-bg); text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); font-weight: 650; padding: 10px 12px; border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 1; white-space: nowrap; }
.tbl td { padding: 10px 12px; border-bottom: 1px solid var(--border); vertical-align: top; }
[data-density="compact"] .tbl td { padding: 6px 10px; } [data-density="compact"] .tbl th { padding: 7px 10px; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr:hover td { background: var(--surface-2); }
.tbl tr.click { cursor: pointer; }
.tbl td.num, .tbl th.num { text-align: right; font-variant-numeric: tabular-nums; }
.tbl tfoot td { font-weight: 700; background: var(--head-bg); border-top: 2px solid var(--border); }
.tbl-wrap { overflow: auto; max-height: 640px; border-radius: 0 0 var(--radius) var(--radius); }
.tbl .err td { background: color-mix(in srgb, var(--bad) 6%, transparent); }
.empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.empty svg { width: 42px; height: 42px; opacity: .45; display: block; margin: 0 auto 8px; }

.tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--border); margin-bottom: 16px; overflow-x: auto; }
.tabs button { background: none; border: 0; padding: 10px 16px; font: inherit; font-weight: 600; color: var(--muted); cursor: pointer; border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.tabs button.on { color: var(--brand); border-bottom-color: var(--brand); }
.tabs button .n { background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 0 7px; margin-left: 6px; font-size: 11px; }

label.f { display: block; } label.f > span { display: block; font-size: 12.5px; font-weight: 600; margin-bottom: 5px; color: var(--text); } label.f > span i { color: var(--bad); font-style: normal; }
label.f small { display: block; color: var(--muted); font-size: 11.5px; margin-top: 4px; }
input, select, textarea { font: inherit; color: var(--text); background: var(--surface); border: 1px solid var(--border); border-radius: 8px; padding: 8px 10px; width: 100%; }
input:focus, select:focus, textarea:focus { border-color: var(--brand); outline: 3px solid color-mix(in srgb, var(--brand) 18%, transparent); outline-offset: 0; }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--brand); }
textarea { min-height: 80px; resize: vertical; }
.form { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0,1fr)); } .form .full { grid-column: 1 / -1; }
.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; }
.filters > * { min-width: 150px; } .filters input[type=search] { min-width: 220px; }
.filters select, .filters input { padding: 7px 10px; }
.check-list { max-height: 260px; overflow: auto; border: 1px solid var(--border); border-radius: 8px; padding: 8px 12px; background: var(--surface-2); }
.check-list label { display: flex; gap: 8px; align-items: center; padding: 3px 0; font-size: 13px; }
.check-list .grp { font-weight: 700; margin-top: 6px; }

.drop { border: 2px dashed var(--border); border-radius: 12px; padding: 22px; text-align: center; background: var(--surface-2); cursor: pointer; transition: .15s; }
.drop:hover, .drop.over { border-color: var(--brand); background: var(--brand-soft); }
.drop svg { width: 34px; height: 34px; color: var(--brand); }
.drop .fn { font-weight: 650; margin-top: 6px; }

.steps { display: flex; gap: 0; counter-reset: s; flex-wrap: wrap; }
.steps .st { flex: 1; min-width: 120px; position: relative; padding: 0 8px 0 0; }
.steps .st .dotn { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; font-weight: 700; font-size: 13px; background: var(--surface-2); border: 2px solid var(--border); color: var(--muted); position: relative; z-index: 1; }
.steps .st::after { content: ""; position: absolute; top: 14px; left: 30px; right: 0; height: 2px; background: var(--border); }
.steps .st:last-child::after { display: none; }
.steps .st.done .dotn { background: var(--good); border-color: var(--good); color: #fff; }
.steps .st.now .dotn { background: var(--brand); border-color: var(--brand); color: #fff; box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }
.steps .st.skip .dotn { opacity: .45; }
.steps .st .t { font-size: 12px; font-weight: 650; margin-top: 6px; } .steps .st .d { font-size: 11.5px; color: var(--muted); }

.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { position: relative; padding: 0 0 16px 26px; }
.timeline li::before { content: ""; position: absolute; left: 6px; top: 6px; width: 10px; height: 10px; border-radius: 50%; background: var(--brand); box-shadow: 0 0 0 3px var(--brand-soft); }
.timeline li::after { content: ""; position: absolute; left: 10px; top: 18px; bottom: 0; width: 2px; background: var(--border); }
.timeline li:last-child::after { display: none; }
.timeline .when { font-size: 11.5px; color: var(--muted); }

.task { display: flex; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--border); align-items: flex-start; color: inherit; text-decoration: none; }
.task:hover { background: var(--surface-2); text-decoration: none; }
.task .ti { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; flex: none; background: color-mix(in srgb, var(--tone) 14%, transparent); color: var(--tone); }
.task .ti svg { width: 18px; height: 18px; }
.task:last-child { border-bottom: 0; }

.chart-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12px; color: var(--muted); }
.chart-legend i { display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: -1px; }
.donut-wrap { display: flex; gap: 22px; align-items: center; flex-wrap: wrap; }
.hbar { display: grid; grid-template-columns: 130px 1fr 60px; gap: 10px; align-items: center; font-size: 12.5px; margin: 7px 0; }
.hbar .trk { height: 12px; background: var(--surface-2); border-radius: 6px; overflow: hidden; display: flex; border: 1px solid var(--border); }
.hbar .trk span { display: block; height: 100%; }

/* ---------- Modal / toast / menu ---------- */
.modal-bg { position: fixed; inset: 0; background: rgba(15,10,10,.48); display: grid; place-items: center; z-index: 100; padding: 20px; animation: fade .12s; }
.modal { background: var(--surface); color: var(--text); border-radius: 14px; width: min(640px, 100%); max-height: calc(100vh - 40px); display: flex; flex-direction: column; box-shadow: 0 24px 64px rgba(0,0,0,.3); border: 1px solid var(--border); }
.modal.wide { width: min(1000px, 100%); } .modal.xl { width: min(1240px, 100%); height: calc(100vh - 40px); }
.modal .mh { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.modal .mh img { height: 26px; border-radius: 4px; } .modal .mh h2 { flex: 1; }
.modal .mb { padding: 18px 20px; overflow: auto; flex: 1; }
.modal .mf { padding: 12px 20px; border-top: 1px solid var(--border); display: flex; justify-content: flex-end; gap: 10px; background: var(--surface-2); border-radius: 0 0 14px 14px; }
.toasts { position: fixed; right: 20px; bottom: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--surface); color: var(--text); border: 1px solid var(--border); border-left: 4px solid var(--tone, var(--good)); border-radius: 10px; padding: 12px 16px; box-shadow: var(--shadow); max-width: 420px; animation: slide .2s; }
.menu { position: absolute; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 12px; box-shadow: 0 16px 40px rgba(0,0,0,.18); min-width: 260px; z-index: 60; padding: 6px; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 8px; color: var(--text); width: 100%; text-align: left; border: 0; background: none; font: inherit; cursor: pointer; text-decoration: none; }
.menu a:hover, .menu button:hover { background: var(--surface-2); }
.menu hr { border: 0; border-top: 1px solid var(--border); margin: 6px 0; }
.menu .notif { display: block; padding: 10px 12px; border-radius: 8px; } .menu .notif.unread { background: var(--brand-soft); }
.skin-sw { display: inline-block; width: 22px; height: 22px; border-radius: 6px; border: 1px solid rgba(0,0,0,.15); flex: none; }
@keyframes fade { from { opacity: 0; } } @keyframes slide { from { transform: translateY(10px); opacity: 0; } }

/* ---------- Skin gallery ---------- */
.skins { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 14px; }
.skin-card { border: 2px solid var(--border); border-radius: 12px; overflow: hidden; cursor: pointer; background: var(--surface); text-align: left; padding: 0; font: inherit; color: inherit; }
.skin-card.on { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in srgb, var(--brand) 20%, transparent); }
.skin-card .pv { height: 108px; display: grid; grid-template-columns: 52px 1fr; }
.skin-card .pv .s { padding: 8px 6px; } .skin-card .pv .s i { display: block; height: 6px; border-radius: 3px; margin: 6px 0; opacity: .6; background: currentColor; }
.skin-card .pv .m { padding: 10px; } .skin-card .pv .m .k { height: 22px; border-radius: 5px; margin-bottom: 7px; }
.skin-card .nm { padding: 10px 12px; font-weight: 650; display: flex; justify-content: space-between; align-items: center; }

/* ---------- Auth pages ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.auth .art { background: var(--side-bg); color: #fff; padding: 48px 56px; display: flex; flex-direction: column; justify-content: space-between; position: relative; overflow: hidden; }
.auth .art::after { content: ""; position: absolute; right: -120px; bottom: -120px; width: 420px; height: 420px; border-radius: 50%; background: radial-gradient(circle, rgba(255,122,69,.35), transparent 70%); }
.auth .art img.logo { width: min(420px, 90%); border-radius: 12px; box-shadow: 0 10px 40px rgba(0,0,0,.35); }
.auth .art h2 { font-size: 30px; margin-top: 36px; line-height: 1.2; max-width: 520px; }
.auth .art p { color: var(--side-text); opacity: .85; max-width: 500px; font-size: 15px; }
.auth .art ul { padding: 0; list-style: none; margin: 24px 0 0; } .auth .art li { padding: 6px 0 6px 28px; position: relative; color: var(--side-text); }
.auth .art li::before { content: "✓"; position: absolute; left: 0; color: var(--side-accent); font-weight: 800; }
.auth .form-side { display: grid; place-items: center; padding: 40px; background: var(--surface); }
.auth .box { width: min(420px, 100%); }
.auth .box img.mlogo { display: none; width: 260px; margin-bottom: 24px; border-radius: 8px; }
.auth .box h1 { font-size: 26px; } .auth .box .sub { color: var(--muted); margin: 6px 0 24px; }
.auth .box .stack > label { display: block; }
.auth .err { color: var(--bad); font-weight: 600; min-height: 20px; }
.auth .skinbar { display: flex; gap: 8px; margin-top: 28px; align-items: center; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.auth .skinbar button { border: 2px solid transparent; border-radius: 8px; padding: 0; cursor: pointer; background: none; }
.auth .skinbar button.on { border-color: var(--brand); }

/* ---------- Print ---------- */
.print-only { display: none; }
@media print {
  .side, .top, .footer, .no-print, .btn { display: none !important; }
  .shell { display: block; } .content { padding: 0; } .card { box-shadow: none; break-inside: avoid; }
  .print-only { display: block; } .print-only img { height: 40px; }
}

/* ---------- Responsive ---------- */
@media (max-width: 1200px) { .g6 { grid-template-columns: repeat(3, 1fr); } .g4 { grid-template-columns: repeat(2, 1fr); } .g-2-1, .g-1-2 { grid-template-columns: 1fr; } }
@media (max-width: 900px) {
  .shell, .shell.collapsed { grid-template-columns: 1fr; }
  .side { position: fixed; left: 0; top: 0; bottom: 0; width: 270px; transform: translateX(-100%); transition: transform .2s; box-shadow: 0 0 40px rgba(0,0,0,.4); }
  .shell.mobile-open .side { transform: none; }
  .top { padding: 8px 12px; flex-wrap: wrap; } .top .logo-mini { display: block; } .top .title .crumb { display: none; }
  .cycle-pick { order: 10; width: 100%; } .cycle-pick select { max-width: none; flex: 1; }
  .user-chip .who { display: none; }
  .content { padding: 16px 12px 32px; }
  .g2, .g3, .form { grid-template-columns: 1fr; } .g4, .g6 { grid-template-columns: repeat(2, 1fr); }
  .auth { grid-template-columns: 1fr; } .auth .art { display: none; } .auth .box img.mlogo { display: block; }
  .hbar { grid-template-columns: 90px 1fr 50px; }
  .footer { flex-direction: column; align-items: flex-start; }
}
@media (min-width: 901px) { .only-mobile { display: none !important; } }

/* ---------- Polish ---------- */
.icon-btn .dot[hidden] { display: none; }
.top .title { flex: 1; overflow: hidden; }
.top .crumb { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
.filters select, .filters input { width: auto; min-width: 150px; max-width: 280px; }
.filters input[type=search] { min-width: 240px; }
.page-head .filters { flex-wrap: nowrap; }
.tbl td b.ref, .nowrap-cell { white-space: nowrap; }
.card > .hd > .filters { flex: 1; justify-content: flex-end; }
@media (max-width: 900px) { .filters select, .filters input { max-width: none; flex: 1; } .page-head .filters { flex-wrap: wrap; } }

/* Region access checklist */
.chk-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:6px 14px;margin-top:8px;padding:10px 12px;border:1px solid var(--border);border-radius:var(--radius);background:var(--surface-2)}
.chk-grid label{margin:0}

/* ---------------- BB Chat ---------------- */
.chat { display: grid; grid-template-columns: 330px 1fr; height: calc(100vh - 190px); min-height: 480px; overflow: hidden; padding: 0; }
.chat-list { border-right: 1px solid var(--border); display: flex; flex-direction: column; min-height: 0; background: var(--surface); }
.chat-lh { display: flex; align-items: center; justify-content: space-between; padding: 14px 14px 8px; }
.chat-search { display: flex; align-items: center; gap: 8px; margin: 0 14px 8px; padding: 0 10px; border: 1px solid var(--border); border-radius: var(--radius); background: var(--surface-2); }
.chat-search svg { width: 16px; height: 16px; flex: none; color: var(--muted); }
.chat-search input { height: 36px !important; min-height: 0 !important; border: 0 !important; background: transparent !important; box-shadow: none !important; padding: 8px 0 !important; flex: 1; outline: none; color: var(--text); }
.chat-threads { flex: 1; overflow: auto; }
.chat-th { display: flex; gap: 10px; align-items: center; padding: 10px 14px; cursor: pointer; border-left: 3px solid transparent; color: inherit; text-decoration: none; }
.chat-th:hover { background: var(--surface-2); }
.chat-th.on { background: var(--brand-soft); border-left-color: var(--brand); }
.chat-th.unread b { font-weight: 800; }
.chat-th .row-between, .chat .row-between { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.chat .ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; min-width: 0; }
.chat .pill { background: var(--brand); color: var(--brand-ink); border-radius: 10px; padding: 0 7px; font-size: 11px; font-weight: 700; flex: none; }
.avatar.grp { background: var(--surface-2); color: var(--brand); border: 1px solid var(--border); }
.avatar.grp svg { width: 18px; height: 18px; }
.chat-foot { padding: 10px 14px; border-top: 1px solid var(--border); display: flex; gap: 6px; align-items: flex-start; }
.chat-foot .ico { flex: none; width: 15px; height: 15px; margin-top: 1px; }
.chat-pane { display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
.chat-h { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--border); background: var(--surface); }
.chat-msgs { flex: 1; overflow: auto; padding: 16px 20px; display: flex; flex-direction: column; gap: 2px; }
.chat-m { display: flex; flex-direction: column; align-items: flex-start; margin-top: 8px; max-width: 72%; }
.chat-m.cont { margin-top: 2px; }
.chat-m.mine { align-self: flex-end; align-items: flex-end; }
.chat-by { font-size: 12px; font-weight: 700; color: var(--brand); margin: 0 0 2px 4px; }
.bubble { background: var(--surface); border: 1px solid var(--border); padding: 8px 12px 6px; border-radius: 14px 14px 14px 4px; box-shadow: var(--shadow); overflow-wrap: anywhere; line-height: 1.45; }
.chat-m.mine .bubble { background: var(--brand); color: var(--brand-ink); border-color: transparent; border-radius: 14px 14px 4px 14px; }
.chat-m.mine .bubble a { color: inherit; }
.chat-t { display: block; text-align: right; font-size: 10.5px; opacity: .65; margin-top: 2px; }
.chat-file { display: flex; gap: 8px; align-items: center; padding: 6px 8px; margin-bottom: 4px; border-radius: 8px; background: rgba(127,127,127,.12); color: inherit; text-decoration: none; }
.chat-file > span { display: flex; flex-direction: column; min-width: 150px; }
.chat-file svg { width: 26px; height: 26px; flex: none; }
.chat-img { max-width: 260px; max-height: 200px; border-radius: 8px; display: block; margin: 4px 0; }
.chat-sys { align-self: center; font-size: 12px; color: var(--muted); background: var(--surface-2); padding: 3px 10px; border-radius: 10px; margin: 8px 0; }
.chat-day { align-self: center; margin: 12px 0 4px; font-size: 11.5px; color: var(--muted); font-weight: 600; }
.chat-more { align-self: center; margin-bottom: 8px; }
.chat-comp { display: flex; align-items: flex-end; gap: 8px; padding: 10px 14px; border-top: 1px solid var(--border); background: var(--surface); }
.chat-comp textarea { width: 100%; resize: none; min-height: 40px; max-height: 160px; }
.chat-comp label.icon-btn { cursor: pointer; }
#cfilechip { margin-bottom: 4px; display: flex; gap: 6px; align-items: center; }
#cfilechip[hidden] { display: none; }
.chat-empty { margin: auto; text-align: center; padding: 30px; max-width: 420px; }
.chat-empty .ico.big { width: 54px; height: 54px; color: var(--brand); }
.chat-picklist { max-height: 46vh; overflow: auto; border: 1px solid var(--border); border-radius: var(--radius); }
.chat-pick { display: flex; gap: 10px; align-items: center; padding: 8px 12px; border-bottom: 1px solid var(--border); cursor: pointer; }
.chat-pick:hover { background: var(--surface-2); }
.chat-pick:last-child { border-bottom: 0; }
@media (max-width: 900px) {
  .chat { grid-template-columns: 1fr; height: calc(100vh - 150px); }
  .chat .chat-pane { display: none; } .chat.has-thread .chat-list { display: none; } .chat.has-thread .chat-pane { display: flex; }
  .chat-m { max-width: 88%; }
}

.modal .chat-search { margin: 0 0 10px; }
.chat-m.mine .chat-file .muted { color: inherit; opacity: .8; }
