/* =========================================================
   Platform Console — premium light theme, dark sidebar
   ========================================================= */
:root {
  --page: #0c0d0e;          /* behind the floating content panel */
  --side: #0f1012;          /* sidebar */
  --side-2: #17181b;        /* sidebar raised (active item, op card) */
  --side-ink: #9aa0a6;
  --side-ink-strong: #f2f3f5;

  --bg: #f6f7f8;            /* content panel background */
  --surface: #ffffff;      /* cards */
  --surface-2: #f4f5f6;    /* inner tiles, hover */
  --ink: #171a1c;
  --ink-2: #5b6167;        /* secondary text */
  --muted: #8b9198;
  --line: #e7e9ec;
  --line-2: #eef0f2;

  --accent: #16a34a;       /* brand green */
  --accent-hover: #15803d;
  --accent-soft: #e7f6ec;
  --accent-ink: #0f7a37;
  --accent-wash: #f1faf4;  /* very light green card wash */

  --pos: #16a34a;
  --neg: #d92d20;
  --neg-soft: #fdecec;
  --warn-soft: #fff4e5;
  --warn-ink: #b25e00;

  --radius: 16px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .04), 0 1px 3px rgba(16, 24, 40, .06);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  font: 14px/1.55 -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--page);
  -webkit-font-smoothing: antialiased;
  overflow: hidden;                 /* the page never scrolls — only .content-inner does */
}
a { color: var(--accent-ink); text-decoration: none; }
a:hover { text-decoration: underline; }
h1 { font-size: 24px; font-weight: 680; letter-spacing: -.02em; margin: 0; }
h2 { font-size: 15px; font-weight: 640; letter-spacing: -.01em; margin: 0 0 14px; }
h3 { font-size: 13px; font-weight: 620; margin: 0 0 8px; }

/* ---------- app shell ----------
   .content is a fixed-height rounded panel (the "front layer"); the black frame
   around it never changes because only .content-inner scrolls, not the page. */
.app { height: 100vh; display: flex; }

.sidebar {
  width: 238px; flex: none; height: 100vh;
  background: var(--side); color: var(--side-ink);
  display: flex; flex-direction: column; padding: 20px 14px;
  overflow-y: auto;
}
.side-brand { display: flex; align-items: center; gap: 11px; padding: 4px 6px 18px; }
.side-logo {
  width: 34px; height: 34px; border-radius: 9px; flex: none; overflow: hidden;
  background: #000; display: flex; align-items: center; justify-content: center;
}
.side-logo img { width: 100%; height: 100%; object-fit: contain; display: block; }
.side-brand-txt { display: flex; flex-direction: column; color: var(--side-ink-strong); font-weight: 640; font-size: 14px; line-height: 1.25; }
.side-brand-txt small { color: var(--side-ink); font-weight: 400; font-size: 11px; }

.side-menu { display: flex; flex-direction: column; gap: 2px; }
.side-label { font-size: 10.5px; letter-spacing: .09em; text-transform: uppercase; color: #5f656b; padding: 14px 10px 6px; }
.side-item {
  display: flex; align-items: center; gap: 11px;
  padding: 9px 10px; border-radius: var(--radius-sm);
  color: var(--side-ink); font-size: 13.5px; font-weight: 500;
}
.side-item:hover { text-decoration: none; color: var(--side-ink-strong); background: #131417; }
.side-item.is-active { background: var(--side-2); color: var(--side-ink-strong); }
.side-item .ico { opacity: .85; flex: none; }
.side-item.is-active .ico { color: var(--accent); opacity: 1; }
.side-item span { flex: 1; }
.side-badge {
  flex: none; font-style: normal; font-size: 11px; font-weight: 700; line-height: 1;
  background: var(--accent); color: #08240f; border-radius: 999px; padding: 3px 7px; min-width: 18px; text-align: center;
}

.side-foot { margin-top: auto; padding-top: 14px; }
.side-op {
  display: flex; align-items: center; gap: 10px;
  background: var(--side-2); border-radius: 12px; padding: 11px 12px; margin-bottom: 8px;
}
.side-op-id { display: flex; flex-direction: column; min-width: 0; }
.side-op-id strong {
  color: var(--side-ink-strong); font-size: 13px; font-weight: 600;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.side-dot { color: #7b8188; font-size: 11px; display: flex; align-items: center; gap: 5px; }
.side-dot::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--accent); }
.side-logout { width: 100%; justify-content: center; }
.sidebar .btn-ghost { background: transparent; color: var(--side-ink); border-color: #2a2c30; }
.sidebar .btn-ghost:hover { background: #131417; color: var(--side-ink-strong); }

.content {
  flex: 1; min-width: 0;
  margin: 12px 14px 12px 6px;
  background: var(--bg);
  border-radius: 18px;
  overflow: hidden;
  display: flex; flex-direction: column;
}
.content-inner {
  flex: 1; min-height: 0;
  overflow-y: auto;
  padding: 26px 32px 40px;
}
.content-inner > * { max-width: 1320px; }
.appfoot { color: var(--muted); font-size: 12px; margin-top: 36px; }

@media (max-width: 820px) {
  html, body { overflow: auto; height: auto; }
  .app { flex-direction: column; height: auto; }
  .sidebar { width: 100%; height: auto; flex-direction: row; align-items: center; flex-wrap: wrap; gap: 8px; overflow: visible; }
  .side-brand { padding: 4px 6px; }
  .side-menu { flex-direction: row; flex-wrap: wrap; }
  .side-label { display: none; }
  .side-foot { margin: 0; padding: 0; display: flex; align-items: center; gap: 8px; }
  .side-op { margin: 0; }
  .side-logout { width: auto; }
  .content { margin: 0; border-radius: 0; overflow: visible; }
  .content-inner { overflow: visible; padding: 20px; }
}

/* ---------- page header ---------- */
.page-head, .dash-head {
  display: flex; align-items: flex-start; justify-content: space-between;
  gap: 18px; margin-bottom: 22px; flex-wrap: wrap;
}
.page-head .subtle, .dash-head .subtle { margin-top: 5px; }
.dash-head-actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.subtle { color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }

/* ---------- cards / layout ---------- */
.card {
  background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--radius); padding: 20px; box-shadow: var(--shadow);
}
.card + .card { margin-top: 16px; }
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: 1fr 1fr; }
@media (max-width: 900px) { .grid.cols-2 { grid-template-columns: 1fr; } }
.stack > * + * { margin-top: 14px; }
hr.sep { border: 0; border-top: 1px solid var(--line-2); margin: 16px 0; }

/* ---------- flashes ---------- */
.flash { padding: 11px 14px; border-radius: var(--radius-sm); margin-bottom: 14px; font-size: 13px; border: 1px solid transparent; }
.flash-ok  { background: var(--accent-soft); color: var(--accent-ink); border-color: #cfe8d8; }
.flash-err { background: var(--neg-soft); color: var(--neg); border-color: #f6d5d2; }
.flash-warn{ background: var(--warn-soft); color: var(--warn-ink); border-color: #f3e0c2; }

/* ---------- stat cards (matched to the storefront KPI cards) ---------- */
.stat-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(232px, 1fr)); gap: 16px; margin-bottom: 20px; }
.stat {
  background: #fff; border: 1px solid #ececf0; border-radius: 14px; padding: 18px 20px;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .04), 0 10px 22px -14px rgba(17, 24, 39, .12);
}
.stat-head { display: flex; align-items: center; gap: 9px; margin-bottom: 14px; }
.stat-ic { display: inline-flex; flex: none; }
.stat-ic .ico { width: 19px; height: 19px; }
.stat-ic.ic-green  { color: #12a150; }
.stat-ic.ic-purple { color: #7a5af0; }
.stat-ic.ic-blue   { color: #2f6fed; }
.stat-ic.ic-amber  { color: #e8890c; }
.stat-ic.ic-red    { color: #e5484d; }
.stat-label { font-size: 13.5px; font-weight: 640; color: #3a3f4b; letter-spacing: -.01em; }
.stat-head .chip { margin-left: auto; }
.stat-val { display: flex; align-items: baseline; gap: 5px; white-space: nowrap; }
.stat-num { font-size: 27px; font-weight: 750; letter-spacing: -.025em; color: #181b28; font-variant-numeric: tabular-nums; }
.stat-unit { font-size: 12.5px; font-weight: 650; color: #9aa1ac; }
.stat-val.accent .stat-num { color: #12a150; }
.stat-val.neg .stat-num { color: #e5484d; }
.stat-note { margin-top: 9px; font-size: 12px; color: #9aa1ac; }
.chip { background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line); border-radius: 999px; padding: 2px 9px; font-size: 10px; font-weight: 600; letter-spacing: .02em; }

/* ---------- date-range filter drawer ---------- */
.datefilter { display: inline-block; }
.df-trigger .ico { width: 16px; height: 16px; }
.df-backdrop {
  position: fixed; inset: 0; background: rgba(15, 18, 23, .35);
  opacity: 0; pointer-events: none; transition: opacity .2s; z-index: 80;
}
.df-drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: 392px; max-width: 92vw;
  background: #fff; z-index: 81; display: flex; flex-direction: column;
  transform: translateX(100%); transition: transform .24s cubic-bezier(.4, 0, .2, 1);
  box-shadow: -16px 0 44px -20px rgba(0, 0, 0, .3);
}
.datefilter.is-open .df-backdrop { opacity: 1; pointer-events: auto; }
.datefilter.is-open .df-drawer { transform: none; }
.df-form { display: flex; flex-direction: column; height: 100%; }
.df-head { display: flex; align-items: center; justify-content: space-between; padding: 17px 20px; border-bottom: 1px solid var(--line-2); }
.df-head strong { font-size: 15px; }
.df-x { border: 0; background: var(--surface-2); width: 30px; height: 30px; border-radius: 50%; font-size: 18px; line-height: 1; color: var(--ink-2); cursor: pointer; }
.df-x:hover { background: var(--line); }
.df-current { display: flex; align-items: center; gap: 9px; padding: 14px 20px 10px; color: var(--ink-2); font-size: 13px; font-weight: 550; }
.df-current .ico { width: 17px; height: 17px; color: var(--muted); flex: none; }
.df-presets { padding: 0 12px 6px; display: flex; flex-direction: column; gap: 2px; }
.df-preset {
  display: flex; align-items: center; gap: 11px; width: 100%; text-align: left;
  border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 13.5px;
  padding: 10px 12px; border-radius: 10px; color: var(--ink);
}
.df-preset .ico { width: 18px; height: 18px; color: var(--muted); flex: none; }
.df-preset > span { flex: 1; }
.df-preset em { color: var(--muted); font-style: normal; font-size: 12.5px; }
.df-preset:hover { background: var(--surface-2); }
.df-preset.is-active { background: var(--accent-soft); color: var(--accent-ink); }
.df-preset.is-active .ico { color: var(--accent); }
.df-cal { padding: 6px 16px 12px; flex: 1; overflow-y: auto; }
.df-cal-head { display: flex; align-items: center; justify-content: space-between; padding: 6px 2px 10px; }
.df-cal-head strong { font-size: 13.5px; }
.df-nav { border: 0; background: transparent; font-size: 20px; line-height: 1; color: var(--ink-2); cursor: pointer; width: 30px; height: 30px; border-radius: 8px; }
.df-nav:hover { background: var(--surface-2); }
.df-dow { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; margin-bottom: 3px; }
.df-dow span { text-align: center; font-size: 10.5px; font-weight: 600; color: var(--muted); padding: 4px 0; }
.df-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px 0; }
.df-day {
  border: 0; background: transparent; cursor: pointer; font: inherit; font-size: 12.5px;
  min-height: 38px; border-radius: 9px; color: var(--ink); font-variant-numeric: tabular-nums;
}
.df-day:hover { background: var(--surface-2); }
.df-day.is-out { color: var(--muted); opacity: .5; }
.df-day.is-today { font-weight: 700; box-shadow: inset 0 0 0 1px var(--line); }
.df-day.is-in { background: var(--accent-soft); border-radius: 0; }
.df-day.is-start, .df-day.is-end { background: var(--accent); color: #fff; font-weight: 650; }
.df-day.is-start { border-radius: 9px 0 0 9px; }
.df-day.is-end { border-radius: 0 9px 9px 0; }
.df-day.is-start.is-end { border-radius: 9px; }
.df-foot { display: flex; gap: 10px; padding: 14px 20px; border-top: 1px solid var(--line-2); }
.df-foot .btn { flex: 1; }

/* ---------- split: ranking + detail ---------- */
.split { display: grid; grid-template-columns: 1.05fr 1fr; gap: 16px; margin-bottom: 16px; align-items: start; }
@media (max-width: 980px) { .split { grid-template-columns: 1fr; } }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 6px; }

/* selected-client detail card: subtle green wash + soft green border (no edge line) */
.detail-card.is-selected {
  background: var(--accent-wash);
  border-color: #cfe8d6;
  box-shadow: var(--shadow);
}
.detail-card.is-selected .detail-grid > div { background: #fff; border-color: #e2efe6; }

/* ranking list */
.rank { list-style: none; margin: 6px 0 0; padding: 0; }
.rank li + li { border-top: 1px solid var(--line-2); }
.rank-link {
  display: grid; grid-template-columns: 24px 1fr auto; align-items: center; gap: 12px;
  padding: 11px 10px; color: var(--ink); border-radius: 10px;
}
.rank-n {
  width: 22px; height: 22px; border-radius: 7px; background: var(--surface-2);
  border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center;
}
.rank li:first-child .rank-n { background: var(--accent-soft); border-color: #cfe8d8; color: var(--accent-ink); }
.rank-link:hover { text-decoration: none; background: var(--surface-2); }
.rank li.is-sel { border-color: transparent; }
.rank li.is-sel + li { border-color: transparent; }
.rank li.is-sel .rank-link { background: var(--accent-soft); }
.rank-n { color: var(--muted); font-size: 11px; font-weight: 600; font-variant-numeric: tabular-nums; }
.rank-name { min-width: 0; }
.rank-name strong { display: block; font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rank-name small { color: var(--muted); font-size: 11.5px; }
.rank-val { font-weight: 650; font-variant-numeric: tabular-nums; font-size: 13px; }

/* avatar */
.av {
  width: 34px; height: 34px; border-radius: 50%; flex: none;
  display: inline-flex; align-items: center; justify-content: center;
  font-size: 12px; font-weight: 700; color: #fff;
  background: hsl(var(--h, 150) 42% 45%);
}
.av-lg { width: 46px; height: 46px; font-size: 15px; }

/* detail card */
.detail-top { display: flex; align-items: center; gap: 13px; margin-bottom: 16px; }
.detail-name { font-size: 16px; font-weight: 680; letter-spacing: -.01em; }
.detail-top .badge { margin-left: auto; }
.detail-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 16px; }
.detail-grid > div { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 11px; padding: 9px 11px; }
.detail-grid span { display: block; font-size: 10px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; margin-bottom: 2px; }
.detail-grid b { font-size: 14px; font-weight: 640; font-variant-numeric: tabular-nums; }
.detail-grid b.accent { color: var(--accent); }
.detail-grid b.neg { color: var(--neg); }
.detail-actions { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }

/* ---------- tables ---------- */
table { width: 100%; border-collapse: collapse; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--line-2); }
thead th {
  font-size: 11px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 600;
  background: var(--surface-2); border-bottom: 1px solid var(--line); white-space: nowrap;
}
.table-wrap tbody td:first-child { white-space: nowrap; }
thead th:first-child { border-top-left-radius: 10px; }
thead th:last-child { border-top-right-radius: 10px; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr[data-href] { cursor: pointer; }
tbody tr[data-href]:hover { background: var(--surface-2); }
tr.row-offline td { color: var(--muted); background: #fafbfb; }
tr.row-danger td { background: #fef4f3; }
tfoot td { font-weight: 700; border-top: 2px solid var(--line); border-bottom: 0; }
.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.table-wrap table { border-collapse: separate; border-spacing: 0; }
.table-wrap th, .table-wrap td { border-bottom: 1px solid var(--line-2); }

/* ---------- badges ---------- */
.badge { display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px; font-size: 11px; font-weight: 600; border: 1px solid transparent; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; opacity: .9; }
.badge-active    { background: var(--accent-soft); color: var(--accent-ink); border-color: #cfe8d8; }
.badge-suspended { background: var(--warn-soft); color: var(--warn-ink); border-color: #f3e0c2; }
.badge-closed    { background: var(--neg-soft); color: var(--neg); border-color: #f6d5d2; }
.badge-offline   { background: var(--surface-2); color: var(--muted); border-color: var(--line); }
.warn-icon { color: var(--neg); font-weight: 700; }

/* ---------- forms ---------- */
label.field { display: block; margin-bottom: 12px; }
label.field > span { display: block; font-size: 12px; color: var(--ink-2); font-weight: 550; margin-bottom: 5px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], textarea, select {
  width: 100%; padding: 8px 11px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  font: inherit; background: var(--surface); color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px rgba(22, 163, 74, .12); }
textarea { min-height: 68px; resize: vertical; }
input:disabled { background: var(--surface-2); color: var(--muted); }
::placeholder { color: #aab0b6; }

.btn {
  display: inline-flex; align-items: center; gap: 7px; justify-content: center;
  padding: 9px 16px; border: 1px solid #101216; color: #fff;
  background: linear-gradient(180deg, #2b2e37 0%, #1b1d24 100%);
  border-radius: var(--radius-sm); cursor: pointer; font: inherit; font-weight: 600; font-size: 13px;
  letter-spacing: -.005em;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .18), 0 4px 12px -4px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .08);
  transition: transform .12s ease, box-shadow .12s ease, background .12s ease;
}
.btn:hover {
  text-decoration: none; transform: translateY(-1px);
  background: linear-gradient(180deg, #34373f 0%, #23262e 100%);
  box-shadow: 0 2px 5px rgba(0, 0, 0, .2), 0 10px 22px -6px rgba(0, 0, 0, .28), inset 0 1px 0 rgba(255, 255, 255, .1);
}
.btn:active { transform: translateY(0); box-shadow: inset 0 1px 3px rgba(0, 0, 0, .35); }
.btn-ghost {
  background: var(--surface); color: var(--ink); border: 1px solid #e0e3e8;
  box-shadow: 0 1px 2px rgba(17, 24, 39, .045);
}
.btn-ghost:hover { background: #f7f8fa; border-color: #d6dae0; color: var(--ink); box-shadow: 0 1px 2px rgba(17, 24, 39, .06); }
.btn-danger {
  border-color: #cf3c41; color: #fff;
  background: linear-gradient(180deg, #ec5257 0%, #e5484d 100%);
  box-shadow: 0 1px 2px rgba(150, 40, 40, .28), 0 6px 16px -7px rgba(229, 72, 77, .5), inset 0 1px 0 rgba(255, 255, 255, .16);
}
.btn-danger:hover { background: linear-gradient(180deg, #ef5f64 0%, #e5484d 100%); }
.btn-sm { padding: 6px 12px; font-size: 12px; box-shadow: 0 1px 2px rgba(0, 0, 0, .16), inset 0 1px 0 rgba(255, 255, 255, .07); }
.btn-ghost.btn-sm { box-shadow: 0 1px 2px rgba(17, 24, 39, .045); }
.btn-lg { padding: 11px 20px; font-size: 13.5px; border-radius: 11px; }

/* ---------- Panneau de contrôle (Shopify-style) ---------- */
.ctrl-split { display: grid; grid-template-columns: 1fr 1fr; }
.ctrl-col { min-width: 0; }
.ctrl-col:first-child { padding-right: 30px; }
.ctrl-col:last-child { padding-left: 30px; border-left: 1px solid var(--line); }
@media (max-width: 800px) {
  .ctrl-split { grid-template-columns: 1fr; }
  .ctrl-col:first-child { padding: 0 0 22px; border-bottom: 1px solid var(--line); }
  .ctrl-col:last-child { padding: 22px 0 0; border-left: 0; }
}
.ctrl-field { display: block; margin-bottom: 20px; }
.ctrl-field:last-child { margin-bottom: 0; }
.ctrl-label { display: block; font-size: 12.5px; font-weight: 600; color: var(--ink); margin-bottom: 7px; }
.ctrl-row { display: flex; gap: 8px; align-items: center; }
.ctrl-row input, .ctrl-row select { flex: 1; min-width: 0; }
.ctrl-row .btn, .ctrl-row .btn-danger { flex: none; white-space: nowrap; }
.ctrl-hint { display: block; margin-top: 6px; font-size: 11.5px; color: var(--muted); line-height: 1.45; }
.segbtns { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.segbtns form { display: inline-flex; }
.segbtn {
  border: 0; background: transparent; padding: 6px 15px; border-radius: 7px;
  font: inherit; font-size: 12.5px; font-weight: 550; color: var(--ink-2); cursor: pointer;
}
.segbtn:hover { color: var(--ink); }
.segbtn.is-on { background: #fff; color: var(--ink); font-weight: 640; box-shadow: 0 1px 2px rgba(17, 24, 39, .08), 0 1px 3px rgba(17, 24, 39, .06); }
.inline { display: inline; }
.form-row { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; }
.form-row label.field { margin-bottom: 0; }
.toolbar { display: flex; gap: 10px; align-items: flex-end; flex-wrap: wrap; margin-bottom: 16px; }
.linkbtn { background: none; border: 0; color: var(--accent-ink); cursor: pointer; font: inherit; padding: 0; }
.linkbtn:hover { text-decoration: underline; }

/* segmented control */
.segmented { display: inline-flex; background: var(--surface-2); border: 1px solid var(--line); border-radius: 999px; padding: 3px; }
.segmented a, .segmented button {
  border: 0; background: transparent; color: var(--ink-2); padding: 6px 13px; cursor: pointer;
  font: inherit; font-size: 12px; font-weight: 550; border-radius: 999px;
}
.segmented a:hover { text-decoration: none; color: var(--ink); }
.segmented a.is-current, .segmented button.is-current { background: var(--surface); color: var(--ink); box-shadow: var(--shadow); font-weight: 640; }

/* ---------- key / metric display ---------- */
.kv { display: grid; grid-template-columns: max-content 1fr; gap: 8px 20px; font-size: 13px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-variant-numeric: tabular-nums; }
.metric-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.metric { background: var(--surface-2); border: 1px solid var(--line-2); border-radius: 12px; padding: 12px 13px; }
.metric .label { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; }
.metric .value { font-size: 17px; font-weight: 660; font-variant-numeric: tabular-nums; margin-top: 3px; }
.metric.neg .value { color: var(--neg); }

code, .mono { font-family: "SFMono-Regular", Consolas, "Liberation Mono", monospace; font-size: 12px; }
.reveal-box { background: #0f1012; border: 1px solid #23252a; color: #e9edf0; padding: 12px; border-radius: var(--radius-sm); margin: 8px 0; word-break: break-all; }
.reveal-box .mono { color: #7ee0a3; }
pre.json { background: #0f1012; border: 1px solid #23252a; color: #cdd6df; padding: 14px; border-radius: var(--radius-sm); overflow: auto; font-size: 12px; max-height: 420px; }
.spark { display: block; width: 100%; height: 52px; }

/* ---------- login ---------- */
.login-shell { max-width: 380px; margin: 12vh auto; padding: 0 20px; }
.login-shell .card { padding: 28px; }
.login-shell h1 { text-align: center; margin-bottom: 6px; font-size: 20px; }
.login-shell .login-sub { text-align: center; color: var(--muted); font-size: 13px; margin: 0 0 20px; }
