/* Blink Logistics — internal UI. Minimal surfaces, one accent, quiet motion. */
:root {
  --bg: #f4f4f1;
  --surface: #ffffff;
  --surface-2: #fafaf8;
  --surface-3: #f1f1ee;
  --line: rgba(13, 17, 23, .065);
  --line-2: rgba(13, 17, 23, .11);
  --ink: #0d1117;
  --ink-2: #474e59;
  --ink-3: #8a9099;
  --ink-4: #b4b9c0;
  --accent: #39d62c;
  --accent-2: #2fbf24;
  --accent-ink: #1a7f12;
  --accent-wash: #ecfbe9;
  --navy: #0b0f14;
  --danger: #c93636;
  --danger-wash: #fdeeee;
  --warn-ink: #8f5a00;
  --warn-wash: #fff4df;
  --blue-ink: #1f5fae;
  --blue-wash: #edf4fd;
  --violet-ink: #4a3aa7;
  --violet-wash: #f1effb;
  --r-lg: 18px;
  --r: 12px;
  --r-sm: 9px;
  --sh-1: 0 1px 2px rgba(13, 17, 23, .04);
  --sh-2: 0 1px 2px rgba(13, 17, 23, .04), 0 8px 24px -10px rgba(13, 17, 23, .12);
  --sh-3: 0 30px 60px -20px rgba(13, 17, 23, .35), 0 0 0 1px rgba(13, 17, 23, .06);
  --sb-w: 268px;
  --sb-gap: 12px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  --font: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Geist Mono", ui-monospace, SFMono-Regular, Menlo, monospace;
  /* chart roles (validated: green/blue and green/violet pass CVD + contrast on white) */
  --c-good: #1e8f16;
  --c-late: #2a78d6;
  --c-spend: #4a3aa7;
  --c-open: #cdd2d8;
  --c-critical: #d03b3b;
  --c-grid: #ecece8;
  --c-axis: #d6d6d0;
}

html { -webkit-font-smoothing: antialiased; text-rendering: optimizeLegibility; }
body { font-family: var(--font); background: var(--bg); color: var(--ink); font-size: 14px; letter-spacing: -0.005em; }
::selection { background: rgba(57, 214, 44, .25); }
.mono { font-family: var(--mono); letter-spacing: 0; }
.tnum { font-variant-numeric: tabular-nums; }
.muted { color: var(--ink-3); }
a { color: inherit; text-decoration: none; }
.link { color: var(--accent-ink); font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }
[hidden] { display: none !important; }

/* ------------------------------------------------------------------ shell */
.sidebar {
  position: fixed; z-index: 40; top: var(--sb-gap); bottom: var(--sb-gap); left: var(--sb-gap);
  width: var(--sb-w); display: flex; flex-direction: column;
  background:
    radial-gradient(120% 60% at 0% 0%, rgba(57, 214, 44, .12), transparent 55%),
    radial-gradient(80% 40% at 100% 100%, rgba(57, 214, 44, .05), transparent 60%),
    var(--navy);
  color: #a7aeb8; border-radius: 22px; border: 1px solid rgba(255, 255, 255, .06);
  box-shadow: 0 20px 40px -24px rgba(11, 15, 20, .7);
  transition: width .35s var(--ease), transform .35s var(--ease);
}
.sb-head { display: flex; align-items: center; gap: 10px; height: 64px; padding: 0 14px 0 18px; }
.sb-logo { height: 28px; transition: opacity .2s; }
.sb-logo-icon { height: 30px; display: none; }
.sb-collapse { margin-left: auto; display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; color: #6f7782; transition: background .2s, color .2s, transform .35s var(--ease); }
.sb-collapse:hover { background: rgba(255, 255, 255, .06); color: #fff; }
.sb-search {
  margin: 4px 12px 10px; height: 38px; display: flex; align-items: center; gap: 9px; padding: 0 10px 0 12px;
  border-radius: 11px; background: rgba(255, 255, 255, .045); border: 1px solid rgba(255, 255, 255, .06);
  color: #7c848f; font-size: 13px; transition: background .2s, border-color .2s, color .2s;
}
.sb-search:hover { background: rgba(255, 255, 255, .07); color: #c9ced5; border-color: rgba(255, 255, 255, .1); }
.kbd { margin-left: auto; font-family: var(--mono); font-size: 10.5px; padding: 2px 6px; border-radius: 6px; background: rgba(255, 255, 255, .07); color: #8b939e; }
.sb-scroll { flex: 1; overflow-y: auto; padding: 0 10px 10px; scrollbar-width: none; }
.sb-group { margin-top: 14px; }
.sb-group-label { padding: 0 12px 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .14em; text-transform: uppercase; color: #59616c; }
.sb-nav { position: relative; }
.sb-hover { position: absolute; left: 0; right: 0; top: 0; height: 40px; border-radius: 11px; background: rgba(255, 255, 255, .045); opacity: 0; pointer-events: none; transition: transform .28s var(--ease), height .28s var(--ease), opacity .2s; }
.sb-item {
  position: relative; z-index: 1; display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 12px;
  border-radius: 11px; font-size: 13.5px; font-weight: 500; color: #a7aeb8; transition: color .2s;
}
.sb-item svg { width: 19px; height: 19px; flex-shrink: 0; transition: color .2s, transform .3s var(--ease); }
.sb-item:hover { color: #fff; }
.sb-item:hover svg { transform: translateX(1px) scale(1.04); }
.sb-item.active { color: #fff; background: rgba(255, 255, 255, .075); box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05); }
.sb-item.active svg { color: var(--accent); }
.sb-item.active::before {
  content: ""; position: absolute; left: -10px; top: 11px; bottom: 11px; width: 3px; border-radius: 0 3px 3px 0;
  background: var(--accent); box-shadow: 0 0 14px 1px rgba(57, 214, 44, .7); animation: sb-in .45s var(--ease);
}
@keyframes sb-in { from { transform: scaleY(0); opacity: 0; } }
.sb-count { margin-left: auto; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 99px; display: grid; place-items: center; font-size: 11px; font-weight: 600; background: rgba(57, 214, 44, .16); color: #7ff074; }
.sb-label { white-space: nowrap; transition: opacity .2s; }
.sb-foot { padding: 10px; border-top: 1px solid rgba(255, 255, 255, .06); display: flex; gap: 8px; align-items: center; }
.sb-new { flex: 1; height: 38px; display: flex; align-items: center; justify-content: center; gap: 8px; border-radius: 11px; background: var(--accent); color: var(--navy); font-weight: 600; font-size: 13px; box-shadow: 0 8px 20px -10px rgba(57, 214, 44, .8), inset 0 1px 0 rgba(255, 255, 255, .35); transition: transform .2s var(--ease), box-shadow .2s, background .2s; }
.sb-new:hover { background: #4fe043; transform: translateY(-1px); }
.sb-user { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 12px; width: 100%; text-align: left; transition: background .2s; }
.sb-user:hover { background: rgba(255, 255, 255, .05); }
.sb-avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex-shrink: 0; background: linear-gradient(135deg, #2b3542, #18202a); color: var(--accent); font-weight: 600; font-size: 13px; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08); }

/* collapsed rail */
html.sb-collapsed { --sb-w: 76px; }
html.sb-collapsed .sb-label, html.sb-collapsed .sb-group-label, html.sb-collapsed .sb-count,
html.sb-collapsed .sb-search span, html.sb-collapsed .sb-search .kbd, html.sb-collapsed .sb-logo,
html.sb-collapsed .sb-new span, html.sb-collapsed .sb-user-meta { display: none; }
html.sb-collapsed .sb-logo-icon { display: block; }
html.sb-collapsed .sb-head { padding: 0; justify-content: center; flex-direction: column; height: auto; padding-top: 16px; gap: 8px; }
html.sb-collapsed .sb-collapse { margin: 0; transform: rotate(180deg); }
html.sb-collapsed .sb-item, html.sb-collapsed .sb-search { justify-content: center; padding: 0; }
html.sb-collapsed .sb-search { margin: 8px 12px; }
html.sb-collapsed .sb-group { margin-top: 10px; }
html.sb-collapsed .sb-foot { flex-direction: column; }
html.sb-collapsed .sb-new { width: 44px; flex: none; }
html.sb-collapsed .sb-user { justify-content: center; }
html.sb-collapsed [data-tip]:hover::after {
  content: attr(data-tip); position: absolute; left: calc(100% + 14px); top: 50%; transform: translateY(-50%);
  padding: 6px 10px; border-radius: 8px; background: var(--navy); color: #fff; font-size: 12px; font-weight: 500;
  white-space: nowrap; box-shadow: var(--sh-3); pointer-events: none; animation: fade .15s;
}

.main { margin-left: calc(var(--sb-w) + var(--sb-gap) * 2); min-height: 100vh; display: flex; flex-direction: column; transition: margin-left .35s var(--ease); }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 16px; min-height: 72px; padding: 12px 32px 12px 20px;
  background: color-mix(in srgb, var(--bg) 82%, transparent); backdrop-filter: saturate(1.4) blur(14px); -webkit-backdrop-filter: saturate(1.4) blur(14px);
  border-bottom: 1px solid transparent; transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.page-title { font-size: 19px; font-weight: 600; letter-spacing: -0.02em; line-height: 1.25; }
.page-sub { font-size: 12.5px; color: var(--ink-3); margin-top: 2px; }
.content { flex: 1; width: 100%; max-width: 1320px; padding: 8px 32px 40px 20px; }
.footer { padding: 18px 32px 26px 20px; font-size: 11.5px; color: var(--ink-4); }

.mobile-bar { display: none; }
.scrim { position: fixed; inset: 0; z-index: 35; background: rgba(11, 15, 20, .4); backdrop-filter: blur(2px); opacity: 0; pointer-events: none; transition: opacity .3s; }

@media (max-width: 1023px) {
  .sidebar { transform: translateX(calc(-100% - 24px)); --sb-w: 280px; width: 280px; }
  html.sb-open .sidebar { transform: none; }
  html.sb-open .scrim { opacity: 1; pointer-events: auto; }
  .main { margin-left: 0; }
  .sb-collapse { display: none; }
  .mobile-bar { display: flex; align-items: center; gap: 12px; height: 56px; padding: 0 16px; background: var(--navy); }
  .topbar { padding: 12px 16px; }
  .content { padding: 8px 16px 32px; }
  .footer { padding: 16px; }
  html.sb-collapsed { --sb-w: 280px; }
}

/* ------------------------------------------------------------------ surfaces */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--sh-1); }
.card-pad { padding: 20px; }
.card-head { display: flex; align-items: center; gap: 12px; padding: 18px 20px 0; }
.card-title { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }
.card-sub { font-size: 12.5px; color: var(--ink-3); }
.card-hover { transition: transform .25s var(--ease), box-shadow .25s var(--ease), border-color .25s; }
.card-hover:hover { transform: translateY(-2px); box-shadow: var(--sh-2); border-color: var(--line-2); }
.divider { height: 1px; background: var(--line); }

.stat-label { font-size: 12.5px; color: var(--ink-3); display: flex; align-items: center; gap: 6px; }
.stat-value { margin-top: 10px; font-size: 28px; font-weight: 600; letter-spacing: -0.03em; line-height: 1.05; }
.stat-meta { margin-top: 6px; font-size: 12px; color: var(--ink-3); }
.hero {
  position: relative; overflow: hidden; color: #fff; border: 1px solid rgba(255, 255, 255, .06);
  background: radial-gradient(90% 120% at 100% 0%, rgba(57, 214, 44, .22), transparent 50%), linear-gradient(160deg, #121922, #0b0f14 70%);
}
.hero .stat-label { color: #8f98a3; }
.hero .stat-meta { color: #7f8893; }
.hero-value { font-size: 44px; font-weight: 600; letter-spacing: -0.04em; line-height: 1; margin-top: 14px; }

.dot { width: 7px; height: 7px; border-radius: 99px; display: inline-block; flex-shrink: 0; }

/* ------------------------------------------------------------------ controls */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 36px; padding: 0 14px;
  border-radius: 10px; font-size: 13.5px; font-weight: 500; white-space: nowrap; cursor: pointer; user-select: none;
  transition: background .18s, color .18s, box-shadow .18s, transform .18s var(--ease), border-color .18s;
}
.btn:active { transform: scale(.975); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn svg { width: 16px; height: 16px; }
.btn-primary { background: var(--ink); color: #fff; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 1px 2px rgba(13, 17, 23, .2); }
.btn-primary:hover { background: #222a35; }
.btn-accent { background: var(--accent); color: var(--navy); font-weight: 600; box-shadow: inset 0 1px 0 rgba(255, 255, 255, .35), 0 6px 16px -8px rgba(57, 214, 44, .9); }
.btn-accent:hover { background: #4be03f; }
.btn-outline { background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); box-shadow: var(--sh-1); }
.btn-outline:hover { background: var(--surface-2); border-color: rgba(13, 17, 23, .16); }
.btn-ghost { color: var(--ink-2); }
.btn-ghost:hover { background: rgba(13, 17, 23, .05); color: var(--ink); }
.btn-danger { color: var(--danger); }
.btn-danger:hover { background: var(--danger-wash); }
.btn-sm { height: 30px; padding: 0 10px; font-size: 12.5px; border-radius: 8px; }
.btn-icon { width: 36px; padding: 0; }
.btn-block { width: 100%; }
.spinner { width: 14px; height: 14px; border-radius: 99px; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.label { display: block; margin-bottom: 6px; font-size: 12.5px; font-weight: 500; color: var(--ink-2); }
.hint { margin-top: 5px; font-size: 12px; color: var(--ink-3); }
.input, .select, .textarea {
  width: 100%; height: 40px; padding: 0 12px; border-radius: 10px; border: 1px solid var(--line-2); background: var(--surface);
  font-size: 14px; color: var(--ink); transition: border-color .15s, box-shadow .15s, background .15s; outline: none;
}
.textarea { height: auto; min-height: 76px; padding: 10px 12px; resize: vertical; line-height: 1.5; }
.select { appearance: none; padding-right: 34px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%238a9099' stroke-width='1.8' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M4 6l4 4 4-4'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.input::placeholder, .textarea::placeholder { color: var(--ink-4); }
.input:hover, .select:hover, .textarea:hover { border-color: rgba(13, 17, 23, .18); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--accent-ink); box-shadow: 0 0 0 4px rgba(57, 214, 44, .16); }
.input.filled { border-color: rgba(30, 143, 22, .45); background: #f6fdf5; }
.check { width: 16px; height: 16px; accent-color: var(--accent-ink); }
.choice {
  display: inline-flex; align-items: center; gap: 8px; height: 36px; padding: 0 12px; border-radius: 10px; cursor: pointer;
  border: 1px solid var(--line-2); background: var(--surface); font-size: 13.5px; transition: border-color .15s, background .15s, box-shadow .15s;
}
.choice:hover { border-color: rgba(13, 17, 23, .2); }
.choice:has(input:checked) { border-color: var(--accent-ink); background: var(--accent-wash); box-shadow: 0 0 0 3px rgba(57, 214, 44, .12); }
.file { font-size: 13px; color: var(--ink-2); }
.file::file-selector-button { margin-right: 10px; height: 32px; padding: 0 12px; border: 0; border-radius: 8px; background: var(--ink); color: #fff; font: inherit; font-weight: 500; cursor: pointer; }

.seg { display: inline-flex; gap: 2px; padding: 3px; border-radius: 11px; background: var(--surface-3); }
.seg a, .seg button { height: 30px; display: inline-flex; align-items: center; padding: 0 12px; border-radius: 8px; font-size: 13px; color: var(--ink-3); font-weight: 500; transition: background .2s, color .2s, box-shadow .2s; }
.seg a:hover, .seg button:hover { color: var(--ink); }
.seg .on { background: var(--surface); color: var(--ink); box-shadow: 0 1px 2px rgba(13, 17, 23, .08), 0 0 0 1px rgba(13, 17, 23, .04); }

.searchbox { position: relative; }
.searchbox svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-3); }
.searchbox .input { padding-left: 36px; }

/* ------------------------------------------------------------------ data display */
.badge { display: inline-flex; align-items: center; gap: 6px; height: 22px; padding: 0 9px; border-radius: 99px; font-size: 12px; font-weight: 500; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 99px; background: currentColor; opacity: .85; }
.b-green { background: var(--accent-wash); color: var(--accent-ink); }
.b-amber { background: var(--warn-wash); color: var(--warn-ink); }
.b-red { background: var(--danger-wash); color: var(--danger); }
.b-blue { background: var(--blue-wash); color: var(--blue-ink); }
.b-violet { background: var(--violet-wash); color: var(--violet-ink); }
.b-gray { background: var(--surface-3); color: var(--ink-2); }
.chip { display: inline-flex; align-items: center; height: 20px; padding: 0 7px; border-radius: 6px; font-size: 10.5px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; background: var(--surface-3); color: var(--ink-2); }

.tbl { width: 100%; border-collapse: separate; border-spacing: 0; }
.tbl th { padding: 10px 16px; text-align: left; font-size: 12px; font-weight: 500; color: var(--ink-3); border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 13px 16px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.tbl tr:last-child td { border-bottom: 0; }
.tbl tbody tr { transition: background .15s; }
.tbl tbody tr:hover { background: var(--surface-2); }
.tbl tr[data-href] { cursor: pointer; }
.tbl .num { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tbl th:first-child, .tbl td:first-child { padding-left: 20px; }
.tbl th:last-child, .tbl td:last-child { padding-right: 20px; }

.kv dt { font-size: 12px; color: var(--ink-3); }
.kv dd { margin-top: 3px; font-size: 14px; color: var(--ink); word-break: break-word; }

.avatar { border-radius: 12px; object-fit: cover; flex-shrink: 0; box-shadow: 0 0 0 1px var(--line); }
.avatar-fallback { display: grid; place-items: center; border-radius: 12px; flex-shrink: 0; font-weight: 600; color: var(--accent); background: linear-gradient(135deg, #1d2631, #0b0f14); }

.meter { height: 6px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter > i { display: block; height: 100%; border-radius: 99px; background: var(--c-good); transition: width .9s var(--ease); }

.empty { padding: 48px 20px; text-align: center; color: var(--ink-3); font-size: 13.5px; }
.empty-icon { width: 44px; height: 44px; margin: 0 auto 12px; border-radius: 14px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-3); }

.callout { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 13.5px; border: 1px solid; }
.callout-warn { background: var(--warn-wash); border-color: #f6e1b8; color: #6e4700; }
.callout-red { background: var(--danger-wash); border-color: #f6d0d0; color: #8f2424; }
.callout-green { background: var(--accent-wash); border-color: #cdeec8; color: #1b5e14; }

.dropzone { display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 36px 20px; border-radius: 16px; border: 1.5px dashed var(--line-2); background: var(--surface-2); cursor: pointer; transition: border-color .2s, background .2s, transform .2s var(--ease); }
.dropzone:hover, .dropzone.over { border-color: var(--accent-ink); background: #f5fcf4; }
.dropzone.over { transform: scale(1.01); }

/* ------------------------------------------------------------------ overlays */
.toasts { position: fixed; z-index: 90; right: 20px; bottom: 20px; display: flex; flex-direction: column; gap: 10px; width: min(380px, calc(100vw - 40px)); }
.toast {
  position: relative; overflow: hidden; display: flex; gap: 12px; align-items: flex-start; padding: 13px 14px 15px; border-radius: 14px;
  background: var(--navy); color: #e8ebef; font-size: 13.5px; box-shadow: var(--sh-3); animation: toast-in .45s var(--ease);
}
.toast.leaving { animation: toast-out .3s var(--ease) forwards; }
.toast-icon { width: 22px; height: 22px; border-radius: 7px; display: grid; place-items: center; flex-shrink: 0; font-size: 12px; font-weight: 700; }
.toast-ok .toast-icon { background: rgba(57, 214, 44, .18); color: var(--accent); }
.toast-err .toast-icon { background: rgba(240, 90, 90, .18); color: #ff8a8a; }
.toast-close { margin-left: auto; color: #6f7782; padding: 0 2px; }
.toast-close:hover { color: #fff; }
.toast-bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--accent); transform-origin: left; }
.toast-err .toast-bar { background: #ff6b6b; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.97); } }
@keyframes toast-out { to { opacity: 0; transform: translateX(24px); } }

.overlay { position: fixed; inset: 0; z-index: 80; background: rgba(11, 15, 20, .32); backdrop-filter: blur(3px); animation: fade .2s; }
@keyframes fade { from { opacity: 0; } }
.modal { position: fixed; z-index: 81; left: 50%; top: 50%; width: min(420px, calc(100vw - 32px)); transform: translate(-50%, -50%); background: var(--surface); border-radius: 20px; box-shadow: var(--sh-3); padding: 22px; animation: pop .3s var(--ease); }
@keyframes pop { from { opacity: 0; transform: translate(-50%, -46%) scale(.96); } }

.palette { position: fixed; z-index: 81; left: 50%; top: 12vh; width: min(620px, calc(100vw - 32px)); transform: translateX(-50%); background: var(--surface); border-radius: 18px; box-shadow: var(--sh-3); overflow: hidden; animation: pal-in .28s var(--ease); }
@keyframes pal-in { from { opacity: 0; transform: translate(-50%, -8px) scale(.98); } }
.palette-input { width: 100%; height: 56px; padding: 0 18px 0 48px; border: 0; outline: none; font-size: 16px; background: transparent; }
.palette-list { max-height: 380px; overflow-y: auto; padding: 6px; border-top: 1px solid var(--line); }
.palette-group { padding: 10px 12px 4px; font-size: 11px; font-weight: 600; letter-spacing: .1em; text-transform: uppercase; color: var(--ink-4); }
.palette-item { display: flex; align-items: center; gap: 12px; height: 46px; padding: 0 12px; border-radius: 11px; cursor: pointer; }
.palette-item.sel { background: var(--surface-3); }
.palette-item .pi-icon { width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-3); color: var(--ink-2); flex-shrink: 0; }
.palette-item.sel .pi-icon { background: var(--ink); color: var(--accent); }
.palette-foot { display: flex; gap: 14px; padding: 10px 16px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--ink-3); }
.palette-foot kbd, .k { font-family: var(--mono); font-size: 10.5px; padding: 2px 6px; border-radius: 5px; background: var(--surface-3); color: var(--ink-2); border: 1px solid var(--line); }

.sheet { position: fixed; z-index: 81; top: 10px; right: 10px; bottom: 10px; width: min(460px, calc(100vw - 20px)); display: flex; flex-direction: column; background: var(--surface); border-radius: 22px; box-shadow: var(--sh-3); animation: sheet-in .4s var(--ease); }
.sheet.leaving { animation: sheet-out .28s var(--ease) forwards; }
@keyframes sheet-in { from { transform: translateX(40px); opacity: 0; } }
@keyframes sheet-out { to { transform: translateX(40px); opacity: 0; } }
.sheet-head { display: flex; align-items: flex-start; gap: 12px; padding: 22px 22px 14px; }
.sheet-body { flex: 1; overflow-y: auto; padding: 4px 22px 22px; }
.sheet-foot { display: flex; gap: 8px; justify-content: flex-end; padding: 14px 22px; border-top: 1px solid var(--line); }

.pop { position: absolute; z-index: 60; min-width: 220px; padding: 6px; background: var(--surface); border-radius: 14px; box-shadow: var(--sh-3); animation: pop-sm .18s var(--ease); }
@keyframes pop-sm { from { opacity: 0; transform: translateY(4px) scale(.98); } }
.pop-item { display: flex; align-items: center; gap: 10px; width: 100%; height: 38px; padding: 0 10px; border-radius: 9px; font-size: 13.5px; color: var(--ink); text-align: left; }
.pop-item:hover { background: var(--surface-3); }
.pop-item svg { width: 17px; height: 17px; color: var(--ink-3); }

/* ------------------------------------------------------------------ charts */
.chart { position: relative; width: 100%; }
.chart svg { display: block; width: 100%; overflow: visible; }
.chart text { font-family: var(--font); font-size: 11px; fill: var(--ink-3); }
.chart .hit { fill: transparent; cursor: pointer; }
.chart .band { fill: rgba(13, 17, 23, .035); opacity: 0; transition: opacity .15s; }
.chart .band.on { opacity: 1; }
.chart .bar { transition: opacity .2s, filter .2s; }
.chart .dim .bar { opacity: .45; }
.chart .dim .bar.on { opacity: 1; filter: brightness(1.08); }
.chart-tip { position: absolute; z-index: 5; pointer-events: none; min-width: 170px; padding: 10px 12px; border-radius: 12px; background: var(--navy); color: #e8ebef; font-size: 12px; box-shadow: var(--sh-3); transform: translate(-50%, calc(-100% - 10px)); transition: opacity .12s; white-space: nowrap; }
.chart-tip .tt-title { color: #8f98a3; font-size: 11.5px; margin-bottom: 6px; }
.chart-tip .tt-row { display: flex; align-items: center; gap: 8px; margin-top: 3px; }
.chart-tip .tt-row strong { color: #fff; font-weight: 600; font-variant-numeric: tabular-nums; }
.chart-tip .tt-key { width: 10px; height: 2px; border-radius: 2px; flex-shrink: 0; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; font-size: 12px; color: var(--ink-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
.legend i.tick { width: 12px; height: 2px; border-radius: 2px; }
.legend i.ring { width: 9px; height: 9px; border-radius: 99px; background: transparent !important; border: 2px solid var(--c-critical); }
.chart-table { margin-top: 12px; }

/* ------------------------------------------------------------------ motion */
.enter > * { animation: rise .55s var(--ease) both; }
.enter > *:nth-child(2) { animation-delay: .04s; }
.enter > *:nth-child(3) { animation-delay: .08s; }
.enter > *:nth-child(4) { animation-delay: .12s; }
.enter > *:nth-child(5) { animation-delay: .16s; }
.enter > *:nth-child(n+6) { animation-delay: .2s; }
@keyframes rise { from { opacity: 0; transform: translateY(8px); } }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important; }
}

/* generate-account sheet: hide the BVN box while "NIN on file" is chosen */
.gen-sheet:has(input[name="id_type"][value="nin"]:checked) .gen-bvn { display: none; }
