/* ==========================================================================
   Finance Team Toolkit — "Liquid Glass" design system
   Light + dark themes via [data-theme] on <html>. Readability first: data
   grids sit on high-opacity, low-blur glass; heavy translucency is reserved
   for chrome (sidebar, top bar, modals).
   ========================================================================== */

:root {
  --font: "Inter", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  --radius: 18px;
  --radius-sm: 12px;

  /* Light theme */
  --bg-base: #eef1f6;
  --mesh-a: rgba(99, 125, 255, 0.16);
  --mesh-b: rgba(45, 168, 168, 0.14);
  --mesh-c: rgba(120, 90, 200, 0.10);
  --text: #1a2333;
  --text-soft: #5a6a7c;
  --text-faint: #8a96a8;

  --glass-chrome: rgba(255, 255, 255, 0.52);
  --glass-panel: rgba(255, 255, 255, 0.78);
  --glass-grid: rgba(255, 255, 255, 0.92);
  --glass-hover: rgba(255, 255, 255, 0.65);
  --glass-input: rgba(255, 255, 255, 0.70);

  --border-glass: rgba(255, 255, 255, 0.65);
  --border-soft: rgba(26, 35, 51, 0.10);
  --highlight: rgba(255, 255, 255, 0.85);
  --shadow: 0 12px 40px rgba(26, 35, 51, 0.10);
  --shadow-soft: 0 4px 18px rgba(26, 35, 51, 0.07);

  --accent: #3e63dd;
  --accent-soft: rgba(62, 99, 221, 0.12);
  --accent-text: #2d4dba;
  --on-accent: #ffffff;

  --pos: #1a7f4e;
  --pos-bg: rgba(26, 153, 86, 0.13);
  --neg: #c0392b;
  --neg-bg: rgba(217, 72, 56, 0.12);
  --warn: #9a6b00;
  --warn-bg: rgba(240, 177, 50, 0.16);
  --info-bg: rgba(62, 99, 221, 0.10);
  --info: #2d4dba;
}

[data-theme="dark"] {
  --bg-base: #0b1120;
  --mesh-a: rgba(86, 110, 255, 0.16);
  --mesh-b: rgba(32, 160, 160, 0.13);
  --mesh-c: rgba(130, 90, 220, 0.12);
  --text: #e8edf6;
  --text-soft: #a8b3c7;
  --text-faint: #6c7890;

  --glass-chrome: rgba(17, 25, 42, 0.55);
  --glass-panel: rgba(20, 29, 48, 0.72);
  --glass-grid: rgba(16, 24, 41, 0.90);
  --glass-hover: rgba(40, 52, 80, 0.55);
  --glass-input: rgba(10, 16, 30, 0.55);

  --border-glass: rgba(255, 255, 255, 0.13);
  --border-soft: rgba(255, 255, 255, 0.08);
  --highlight: rgba(255, 255, 255, 0.18);
  --shadow: 0 16px 48px rgba(0, 0, 0, 0.45);
  --shadow-soft: 0 6px 22px rgba(0, 0, 0, 0.30);

  --accent: #849dff;
  --accent-soft: rgba(132, 157, 255, 0.16);
  --accent-text: #a7b8ff;
  --on-accent: #0b1120;

  --pos: #4ade80;
  --pos-bg: rgba(74, 222, 128, 0.14);
  --neg: #f87171;
  --neg-bg: rgba(248, 113, 113, 0.14);
  --warn: #fbbf24;
  --warn-bg: rgba(251, 191, 36, 0.13);
  --info-bg: rgba(132, 157, 255, 0.13);
  --info: #a7b8ff;
}

* { box-sizing: border-box; }

html, body { height: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 14px;
  color: var(--text);
  background: var(--bg-base);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

/* Slow-drifting gradient mesh behind everything */
body::before {
  content: "";
  position: fixed;
  inset: -20%;
  z-index: -1;
  background:
    radial-gradient(42% 50% at 18% 22%, var(--mesh-a), transparent 70%),
    radial-gradient(40% 48% at 82% 18%, var(--mesh-b), transparent 70%),
    radial-gradient(50% 55% at 55% 85%, var(--mesh-c), transparent 72%);
  animation: mesh-drift 70s ease-in-out infinite alternate;
  pointer-events: none;
}
@keyframes mesh-drift {
  0%   { transform: translate3d(0, 0, 0) scale(1); }
  50%  { transform: translate3d(2.5%, -2%, 0) scale(1.05); }
  100% { transform: translate3d(-2%, 2.5%, 0) scale(1.02); }
}
@media (prefers-reduced-motion: reduce) {
  body::before { animation: none; }
}

a { color: var(--accent-text); text-decoration: none; }
a:hover { text-decoration: underline; }
code { font-family: "Cascadia Code", Consolas, monospace; font-size: 0.92em;
  background: var(--accent-soft); padding: 1px 5px; border-radius: 5px; }
kbd {
  font-family: var(--font); font-size: 10.5px; color: var(--text-soft);
  border: 1px solid var(--border-soft); border-bottom-width: 2px;
  border-radius: 5px; padding: 0 5px; background: var(--glass-input);
}

/* ---- Glass primitives ---------------------------------------------------- */
.glass, .panel, .card, .kpi, .stat, .drop, .totals-bar, .meta-box,
.alert, .filedrop, .qcard {
  border: 1px solid var(--border-glass);
  box-shadow: inset 0 1px 0 var(--highlight), var(--shadow-soft);
}

/* ---- App shell ------------------------------------------------------------ */
.shell { display: flex; min-height: 100vh; }

.sidebar {
  position: sticky; top: 0; align-self: flex-start;
  height: 100vh; width: 224px; flex-shrink: 0;
  padding: 18px 12px;
  background: var(--glass-chrome);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border-right: 1px solid var(--border-glass);
  box-shadow: inset 0 1px 0 var(--highlight);
  display: flex; flex-direction: column; gap: 4px;
  z-index: 40;
}
.side-brand {
  display: flex; align-items: center; gap: 10px;
  padding: 6px 10px 16px;
}
.side-brand .mark {
  width: 34px; height: 34px; border-radius: 10px; flex-shrink: 0;
  display: grid; place-items: center;
  background: linear-gradient(135deg, var(--accent), #6e8bff);
  color: #fff; font-weight: 800; font-size: 13px;
  box-shadow: 0 4px 14px rgba(62, 99, 221, 0.35);
}
.side-brand strong { font-size: 13.5px; display: block; line-height: 1.2; }
.side-brand small { color: var(--text-faint); font-size: 11px; }

.nav-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 12px; border-radius: var(--radius-sm);
  color: var(--text-soft); font-weight: 500; font-size: 13.5px;
  border: 1px solid transparent; min-height: 38px;
}
.nav-item svg { width: 17px; height: 17px; flex-shrink: 0; opacity: .85; }
/* Label takes the slack so it wraps, not the icon or the shortcut chip. */
.nav-item .nav-label { flex: 1; min-width: 0; }
.nav-item:hover { background: var(--glass-hover); text-decoration: none; color: var(--text); }
.nav-item.active {
  background: var(--accent-soft); color: var(--accent-text);
  border-color: var(--border-glass);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.nav-item kbd { margin-left: auto; opacity: .7; flex-shrink: 0; white-space: nowrap; align-self: center; }
.nav-section { font-size: 10.5px; text-transform: uppercase; letter-spacing: .08em;
  color: var(--text-faint); padding: 14px 12px 4px; }
.side-foot { margin-top: auto; padding: 10px 12px; color: var(--text-faint); font-size: 11px; }

.main { flex: 1; min-width: 0; display: flex; flex-direction: column; }

.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: 12px 26px;
  background: var(--glass-chrome);
  backdrop-filter: blur(22px) saturate(1.4);
  -webkit-backdrop-filter: blur(22px) saturate(1.4);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.search {
  flex: 1; max-width: 420px; display: flex; align-items: center; gap: 8px;
  background: var(--glass-input); border: 1px solid var(--border-glass);
  border-radius: 12px; padding: 7px 12px; color: var(--text-faint);
  cursor: text; font-size: 13px;
}
.search:hover { background: var(--glass-hover); }
.search kbd { margin-left: auto; }
.top-ctl {
  display: flex; align-items: center; gap: 7px;
  background: var(--glass-input); border: 1px solid var(--border-glass);
  border-radius: 12px; padding: 7px 12px; font-size: 12.5px; color: var(--text-soft);
  cursor: pointer; white-space: nowrap;
}
.top-ctl:hover { background: var(--glass-hover); }
.top-ctl select { border: 0; background: transparent; color: inherit;
  font: inherit; outline: none; cursor: pointer; }
.top-ctl select option { color: #1a2333; }
.icon-btn {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center;
  background: var(--glass-input); border: 1px solid var(--border-glass);
  color: var(--text-soft); cursor: pointer; position: relative; font-size: 15px;
}
.icon-btn:hover { background: var(--glass-hover); }
.icon-btn .dot { position: absolute; top: 8px; right: 9px; width: 7px; height: 7px;
  border-radius: 50%; background: var(--neg); }
.avatar {
  width: 34px; height: 34px; border-radius: 50%;
  background: linear-gradient(135deg, #6e8bff, var(--accent));
  color: #fff; display: grid; place-items: center; font-size: 12px; font-weight: 700;
  border: 1px solid var(--border-glass);
}

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 26px 26px 70px; }

/* ---- Panels (working surfaces) -------------------------------------------- */
.panel {
  background: var(--glass-panel);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-radius: var(--radius);
  padding: 24px 26px;
  margin-bottom: 18px;
}
.panel h1 { margin: 0 0 6px; font-size: 21px; letter-spacing: -0.01em; }
.panel + .panel { margin-top: 0; }
.lead { color: var(--text-soft); margin: 0 0 16px; font-size: 13.5px; }
.crumbs { font-size: 12.5px; color: var(--text-faint); margin: 2px 0 14px; }
.section-title { margin: 4px 0 12px; font-size: 12px; text-transform: uppercase;
  letter-spacing: .07em; color: var(--text-faint); font-weight: 600; }
.mini-title { font-size: 13px; font-weight: 600; margin: 16px 0 8px; }
.note-small, .note-inline { font-size: 12px; color: var(--text-faint); }
.hint { margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--border-soft);
  color: var(--text-soft); font-size: 13px; }
.hint ol { margin: 8px 0; padding-left: 20px; }

/* ---- KPI cards ------------------------------------------------------------ */
.kpi-strip { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
  gap: 14px; margin: 4px 0 18px; }
.kpi {
  background: var(--glass-panel); backdrop-filter: blur(12px);
  border-radius: var(--radius); padding: 16px 18px; position: relative; overflow: hidden;
}
.kpi::after { content: ""; position: absolute; top: -40%; right: -20%;
  width: 70%; height: 90%; border-radius: 50%;
  background: radial-gradient(closest-side, var(--highlight), transparent);
  opacity: .35; pointer-events: none; }
.kpi-num {
  display: block; font-size: 24px; font-weight: 700; letter-spacing: -0.02em;
  font-variant-numeric: tabular-nums; line-height: 1.15;
}
.kpi-lbl { display: block; font-size: 11.5px; color: var(--text-faint); margin-top: 3px; }
.kpi-warn .kpi-num { color: var(--neg); }
.kpi .spark { position: absolute; right: 12px; bottom: 10px; width: 72px; height: 26px;
  opacity: .8; }
.kpi .spark path { fill: none; stroke: var(--accent); stroke-width: 1.6; }
.kpi .spark .area { fill: var(--accent-soft); stroke: none; }
.delta { display: inline-flex; align-items: center; gap: 3px; font-size: 11px;
  font-weight: 600; border-radius: 999px; padding: 1px 8px; margin-top: 6px; }
.delta.up { color: var(--pos); background: var(--pos-bg); }
.delta.down { color: var(--neg); background: var(--neg-bg); }
.delta.flat { color: var(--text-faint); background: var(--glass-hover); }

.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(130px, 1fr));
  gap: 12px; margin: 14px 0 6px; }
.stat { background: var(--glass-panel); border-radius: var(--radius-sm);
  padding: 13px 15px; text-align: center; }
.stat-num { display: block; font-size: 21px; font-weight: 700;
  font-variant-numeric: tabular-nums; }
.stat-lbl { display: block; font-size: 11px; color: var(--text-faint); margin-top: 2px; }

/* ---- Tool cards ------------------------------------------------------------ */
.card-grid { display: grid; gap: 14px;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr)); margin-bottom: 8px; }
.card {
  background: var(--glass-panel); backdrop-filter: blur(10px);
  border-radius: var(--radius); padding: 18px;
  display: flex; gap: 13px; align-items: flex-start;
  position: relative; color: var(--text);
  transition: transform .16s ease, box-shadow .16s ease;
}
.card.live:hover { transform: translateY(-2px); text-decoration: none;
  box-shadow: inset 0 1px 0 var(--highlight), var(--shadow); }
.card.soon { opacity: .55; }
.card-icon { font-size: 23px; line-height: 1.2; }
.card-body { flex: 1; }
.card-body h3 { margin: 0 0 5px; padding-right: 76px; font-size: 14.5px; }
.card-body p { margin: 0; font-size: 12.5px; color: var(--text-soft); }
.badge { position: absolute; top: 14px; right: 14px; font-size: 10.5px;
  padding: 3px 9px; border-radius: 999px; font-weight: 600; }
.badge-live { background: var(--accent-soft); color: var(--accent-text); }
.badge-draft { background: var(--warn-bg); color: var(--warn); }
.badge-soon { background: var(--glass-hover); color: var(--text-faint); }

/* ---- Buttons ---------------------------------------------------------------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  border: 1px solid var(--border-glass);
  background: var(--glass-input); color: var(--text);
  padding: 9px 16px; border-radius: 12px; font-size: 13px; font-weight: 600;
  cursor: pointer; font-family: var(--font);
  box-shadow: inset 0 1px 0 var(--highlight);
  transition: background .14s ease;
}
.btn:hover { background: var(--glass-hover); text-decoration: none; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn-primary {
  background: var(--accent); border-color: transparent; color: var(--on-accent);
  box-shadow: 0 4px 16px rgba(62, 99, 221, 0.30), inset 0 1px 0 rgba(255,255,255,.25);
}
.btn-primary:hover { filter: brightness(1.07); background: var(--accent); }
.btn-small { padding: 5px 11px; font-size: 12px; border-radius: 9px; }

/* ---- Alerts ------------------------------------------------------------------ */
.alert { padding: 12px 15px; border-radius: var(--radius-sm); margin: 12px 0;
  font-size: 13px; backdrop-filter: blur(8px); }
.alert-error { background: var(--neg-bg); color: var(--neg); }
.alert-ok { background: var(--pos-bg); color: var(--pos); }
.alert-info { background: var(--info-bg); color: var(--info); }

/* ---- Forms -------------------------------------------------------------------- */
.upload-form { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin: 12px 0 6px; }
.upload-form-stack { display: flex; flex-direction: column; gap: 12px; margin: 12px 0 6px; }
.upload-form-stack .btn { align-self: flex-start; }
.filedrop {
  flex: 1; min-width: 260px; border: 1.5px dashed var(--border-glass);
  border-radius: var(--radius-sm); padding: 16px; cursor: pointer;
  background: var(--glass-input); display: block;
}
.filedrop:hover { border-color: var(--accent); background: var(--glass-hover); }
.filedrop input { display: block; margin-bottom: 7px; font-family: var(--font);
  color: var(--text); font-size: 12.5px; }
.filedrop-text { color: var(--text-soft); font-size: 12.5px; }
.inline-fields { display: flex; gap: 14px; flex-wrap: wrap; }
.field { display: flex; flex-direction: column; gap: 5px; min-width: 220px; }
.field span { font-size: 12px; color: var(--text-faint); }
.field input, .field textarea, .bulk-input, .email-input, .name-input,
.email-inline input, .threshold-form input {
  padding: 9px 12px; border: 1px solid var(--border-glass);
  border-radius: 10px; font-size: 13px; font-family: var(--font);
  background: var(--glass-input); color: var(--text);
}
.field input:focus, .field textarea:focus, .bulk-input:focus,
.name-input:focus, .email-input:focus {
  outline: 2px solid var(--accent-soft); border-color: var(--accent);
}
.bulk-input { width: 100%; }
.confirm-row { display: flex; gap: 14px; flex-wrap: wrap; margin: 14px 0; }
.threshold-form { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 10px; }
.threshold-form .field { min-width: 300px; }
.email-inline { display: inline-flex; gap: 8px; align-items: center; }
.send-link-form { display: flex; gap: 6px; align-items: center; }
.email-input { width: 168px; padding: 6px 9px; font-size: 12px; }
.row-form { display: inline; margin: 0; }
.send-row { display: flex; flex-wrap: wrap; gap: 16px; align-items: flex-end;
  justify-content: space-between; margin-top: 16px; }
.actions { display: flex; gap: 10px; }
.select-hint { font-size: 13px; color: var(--text-soft); margin: 12px 0 8px; }
.download-row { display: flex; gap: 10px; margin: 14px 0; flex-wrap: wrap; align-items: center; }
.next-row { margin-top: 8px; font-size: 13px; }

/* ---- Data grids: high-opacity glass, sharp figures --------------------------- */
.table-wrap {
  overflow: auto; max-height: 72vh;
  border: 1px solid var(--border-glass); border-radius: var(--radius-sm);
  background: var(--glass-grid);
  box-shadow: inset 0 1px 0 var(--highlight);
}
.tx-table { border-collapse: separate; border-spacing: 0; width: 100%; font-size: 12.8px; }
.tx-table th, .tx-table td {
  border-bottom: 1px solid var(--border-soft);
  padding: 8px 12px; text-align: left; white-space: nowrap; vertical-align: top;
}
.tx-table td { font-variant-numeric: tabular-nums; }
.tx-table thead th {
  position: sticky; top: 0; z-index: 5;
  background: var(--glass-grid);
  backdrop-filter: blur(8px);
  font-size: 11px; text-transform: uppercase; letter-spacing: .05em;
  color: var(--text-faint); font-weight: 600; cursor: pointer; user-select: none;
}
.tx-table thead th::after { content: ""; margin-left: 5px; opacity: .6; }
.tx-table thead th.sort-asc::after { content: "▲"; font-size: 9px; }
.tx-table thead th.sort-desc::after { content: "▼"; font-size: 9px; }
.tx-table tbody tr:hover td { background: var(--glass-hover); }
.tx-table td.num, .tx-table th.num { text-align: right; }
.col-pick { width: 42px; text-align: center; }
.col-name { min-width: 175px; }
.name-input { width: 100%; padding: 6px 9px; font-size: 12.5px; }
.name-input.known { border-color: var(--accent); background: var(--accent-soft); }
.key-hint { font-size: 10.5px; color: var(--text-faint); margin-top: 3px; }
.rowpick, .pay-cb, .inv-cb { width: 16px; height: 16px; accent-color: var(--accent); }
.msg-cell { max-width: 250px; white-space: normal; }
.link-cell { display: flex; gap: 7px; align-items: center; min-width: 320px; }
.link-input { flex: 1; padding: 6px 9px; border: 1px solid var(--border-glass);
  border-radius: 8px; font-size: 11.5px; font-family: Consolas, monospace;
  background: var(--glass-input); color: var(--text-soft); }

/* ---- Pills (semantic colour only for financial status) ----------------------- */
.pill { display: inline-block; font-size: 10.5px; font-weight: 600;
  border-radius: 999px; padding: 2px 9px; letter-spacing: .02em; }
.pill-stop { background: var(--neg-bg); color: var(--neg); }
.pill-hold { background: var(--warn-bg); color: var(--warn); }
.pill-watch { background: var(--warn-bg); color: var(--warn); }
.pill-ok { background: var(--pos-bg); color: var(--pos); }
.pill-auto { background: var(--info-bg); color: var(--info); }
.pill-manual { background: var(--accent-soft); color: var(--accent-text); }
.row-auto td { color: var(--text-faint); }
.muted-tag { font-size: 11px; color: var(--text-faint); }

/* ---- Dropdown cards / disclosure ---------------------------------------------- */
.drop { border-radius: var(--radius-sm); margin: 10px 0;
  background: var(--glass-panel); backdrop-filter: blur(8px); }
.drop > summary { cursor: pointer; padding: 12px 16px; display: flex;
  justify-content: space-between; align-items: center; gap: 12px;
  list-style: none; font-size: 13.5px; }
.drop > summary::-webkit-details-marker { display: none; }
.drop > summary::before { content: "▸"; color: var(--accent); margin-right: 8px;
  transition: transform .14s; }
.drop[open] > summary::before { transform: rotate(90deg); display: inline-block; }
.drop[open] > summary { border-bottom: 1px solid var(--border-soft); }
.drop-title { font-weight: 600; flex: 1; }
.drop-val { color: var(--accent-text); font-weight: 700; white-space: nowrap;
  font-variant-numeric: tabular-nums; }
.drop .table-wrap { border: 0; border-radius: 0 0 var(--radius-sm) var(--radius-sm);
  box-shadow: none; }
.drop > p { padding: 10px 16px; margin: 0; }
.meta-box { background: var(--glass-panel); border-radius: var(--radius-sm);
  padding: 11px 15px; margin: 12px 0; }
.meta-box summary { cursor: pointer; font-weight: 600; font-size: 13px; }
.meta-box ul, .map-list { margin: 8px 0 0; padding-left: 18px;
  color: var(--text-soft); font-size: 12.5px; }

/* ---- Misc surfaces -------------------------------------------------------------- */
.totals-bar { position: sticky; bottom: 12px; margin-top: 16px;
  display: flex; gap: 26px; justify-content: center; flex-wrap: wrap;
  background: var(--glass-chrome); backdrop-filter: blur(20px);
  border-radius: var(--radius); padding: 12px 20px; font-size: 13px; z-index: 20; }
.totals-bar strong { font-size: 15.5px; font-variant-numeric: tabular-nums; }
.flow-steps { margin: 6px 0 0; padding-left: 20px; }
.flow-steps li { margin-bottom: 9px; }
.two-col { display: grid; grid-template-columns: 1fr 1fr; gap: 24px; }
@media (max-width: 760px) { .two-col { grid-template-columns: 1fr; } }
.whats-new { background: var(--warn-bg); border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm); padding: 10px 14px; font-size: 12.5px; max-width: 640px; }

/* ---- Dashboard widgets ------------------------------------------------------------ */
.dash-grid { display: grid; grid-template-columns: 1.5fr 1fr; gap: 16px; margin-bottom: 16px; }
@media (max-width: 980px) { .dash-grid { grid-template-columns: 1fr; } }
.qcard { background: var(--glass-panel); backdrop-filter: blur(10px);
  border-radius: var(--radius); padding: 18px 20px; }
.qcard h2 { margin: 0 0 12px; font-size: 13px; font-weight: 600; }
.task-row { display: flex; align-items: center; gap: 11px; padding: 9px 4px;
  border-bottom: 1px solid var(--border-soft); font-size: 13px; }
.task-row:last-child { border-bottom: 0; }
.task-row .t-ico { width: 28px; height: 28px; border-radius: 9px; flex-shrink: 0;
  display: grid; place-items: center; background: var(--accent-soft); font-size: 13px; }
.task-row .t-main { flex: 1; min-width: 0; }
.task-row .t-sub { font-size: 11px; color: var(--text-faint); }
.task-row .count { font-weight: 700; font-variant-numeric: tabular-nums;
  background: var(--glass-hover); border-radius: 999px; padding: 1px 10px; font-size: 12px; }
.progress { height: 7px; border-radius: 999px; background: var(--glass-hover);
  overflow: hidden; margin: 8px 0 4px; }
.progress > i { display: block; height: 100%; border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), #6e8bff); }
.feed-row { display: flex; gap: 10px; padding: 8px 2px; font-size: 12.5px;
  border-bottom: 1px solid var(--border-soft); }
.feed-row:last-child { border-bottom: 0; }
.feed-row .when { color: var(--text-faint); white-space: nowrap; font-size: 11.5px;
  font-variant-numeric: tabular-nums; }

/* ---- Floating bulk action bar ------------------------------------------------------ */
.bulkbar {
  position: fixed; left: 50%; bottom: 26px; transform: translateX(-50%) translateY(90px);
  display: flex; align-items: center; gap: 14px;
  background: var(--glass-chrome); backdrop-filter: blur(22px) saturate(1.4);
  border: 1px solid var(--border-glass); border-radius: 16px;
  box-shadow: inset 0 1px 0 var(--highlight), var(--shadow);
  padding: 10px 16px; z-index: 60; font-size: 13px;
  transition: transform .22s ease; pointer-events: none; opacity: 0;
}
.bulkbar.show { transform: translateX(-50%) translateY(0); pointer-events: auto; opacity: 1; }
.bulkbar strong { font-variant-numeric: tabular-nums; }

/* ---- Command palette ----------------------------------------------------------------- */
.palette-overlay { position: fixed; inset: 0; z-index: 90;
  background: rgba(10, 15, 28, 0.35); backdrop-filter: blur(3px);
  display: none; align-items: flex-start; justify-content: center; padding-top: 14vh; }
.palette-overlay.open { display: flex; }
.palette { width: min(560px, 92vw);
  background: var(--glass-chrome); backdrop-filter: blur(26px) saturate(1.5);
  border: 1px solid var(--border-glass); border-radius: 18px;
  box-shadow: inset 0 1px 0 var(--highlight), var(--shadow); overflow: hidden; }
.palette input { width: 100%; border: 0; outline: 0; padding: 15px 18px;
  font: 500 14.5px var(--font); background: transparent; color: var(--text); }
.palette-list { max-height: 320px; overflow: auto; border-top: 1px solid var(--border-soft);
  padding: 6px; }
.palette-item { display: flex; align-items: center; gap: 11px; padding: 9px 12px;
  border-radius: 10px; font-size: 13.5px; cursor: pointer; color: var(--text); }
.palette-item .pi-ico { font-size: 15px; width: 22px; text-align: center; }
.palette-item kbd { margin-left: auto; }
.palette-item.sel, .palette-item:hover { background: var(--accent-soft); }
.palette-hint { padding: 8px 14px; font-size: 11px; color: var(--text-faint);
  border-top: 1px solid var(--border-soft); display: flex; gap: 14px; }

/* ---- Footer ----------------------------------------------------------------------------- */
.footer { text-align: center; color: var(--text-faint); font-size: 11.5px;
  padding: 18px 26px 26px; margin-top: auto; }

/* ---- Customer portal (standalone, no sidebar) -------------------------------------------- */
.portal-top { position: sticky; top: 0; z-index: 30; display: flex; align-items: center;
  gap: 12px; padding: 14px 26px; background: var(--glass-chrome);
  backdrop-filter: blur(22px) saturate(1.4);
  border-bottom: 1px solid var(--border-glass);
  box-shadow: inset 0 1px 0 var(--highlight); }
.portal-top .mark { width: 34px; height: 34px; border-radius: 10px;
  display: grid; place-items: center; font-weight: 800; font-size: 13px;
  background: linear-gradient(135deg, var(--accent), #6e8bff); color: #fff; }
.portal-top strong { display: block; font-size: 14px; }
.portal-top small { color: var(--text-faint); font-size: 11.5px; }

/* Legacy ids kept for the static preview nav */
.preview-nav { background: var(--warn-bg); border: 1px solid var(--border-glass);
  border-radius: var(--radius-sm); padding: 10px 14px; margin-bottom: 18px;
  font-size: 12px; line-height: 2; }
.preview-nav strong { color: var(--warn); margin-right: 6px; }
.preview-nav a { margin-right: 10px; white-space: nowrap; }
