/* =========================================================================
   admin.css — the owner console.

   Its own compact stylesheet on purpose: packages/gym-booking has to be
   copyable into any client site, so the console imports nothing from the
   marketing engine and nothing from gym-book.css. Same design system, ~600
   lines instead of the widget's theming machinery.
   ========================================================================= */

:root {
  --accent-h: 8; --accent-s: 85%;
  --accent: hsl(var(--accent-h) var(--accent-s) 55%);
  --accent-solid: hsl(var(--accent-h) var(--accent-s) 44%);
  --accent-ink: #fff;
  --accent-text: hsl(var(--accent-h) var(--accent-s) 38%);
  --accent-soft: hsl(var(--accent-h) var(--accent-s) 55% / 0.10);
  --accent-line: hsl(var(--accent-h) var(--accent-s) 55% / 0.34);

  --bg: hsl(60 8% 97%);
  --surface: #fff;
  --surface-2: hsl(60 6% 94%);
  --ink: hsl(220 14% 8%);
  --ink-2: hsl(220 8% 26%);
  --ink-mute: hsl(220 4% 44%);
  --line: hsl(220 10% 88%);
  --line-2: hsl(220 10% 94%);

  --ok: hsl(152 62% 28%);    --ok-soft: hsl(152 60% 38% / 0.13);
  --warn: hsl(32 92% 32%);   --warn-soft: hsl(38 90% 50% / 0.16);
  --bad: hsl(4 72% 42%);     --bad-soft: hsl(4 70% 50% / 0.12);
  --info: hsl(210 72% 36%);  --info-soft: hsl(210 70% 48% / 0.12);

  --display: ui-sans-serif, -apple-system, "Segoe UI Variable Display", "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --sans: ui-sans-serif, -apple-system, "Segoe UI Variable Text", "Segoe UI", system-ui, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, "SFMono-Regular", "SF Mono", Menlo, Consolas, monospace;
  --radius: 10px; --radius-sm: 6px;
  --shadow-1: 0 1px 2px hsl(220 14% 8% / 0.06);
  --shadow-2: 0 12px 32px hsl(220 14% 8% / 0.14), 0 2px 6px hsl(220 14% 8% / 0.06);
  --rail: 232px;
  color-scheme: light;
}

[data-theme="dark"] {
  color-scheme: dark;
  --accent-solid: hsl(var(--accent-h) var(--accent-s) 67%);
  --accent-ink: hsl(220 28% 9%);
  --accent-text: hsl(var(--accent-h) var(--accent-s) 72%);
  --accent-soft: hsl(var(--accent-h) var(--accent-s) 60% / 0.16);
  --accent-line: hsl(var(--accent-h) var(--accent-s) 62% / 0.40);
  --bg: hsl(222 18% 8%);
  --surface: hsl(222 16% 11.5%);
  --surface-2: hsl(222 14% 16%);
  --ink: hsl(220 22% 96%);
  --ink-2: hsl(220 12% 80%);
  --ink-mute: hsl(220 10% 64%);
  --line: hsl(220 12% 23%);
  --line-2: hsl(220 12% 18%);
  --ok: hsl(152 55% 62%);    --ok-soft: hsl(152 55% 45% / 0.20);
  --warn: hsl(38 92% 66%);   --warn-soft: hsl(38 92% 55% / 0.18);
  --bad: hsl(4 85% 70%);     --bad-soft: hsl(4 75% 55% / 0.18);
  --info: hsl(206 85% 70%);  --info-soft: hsl(206 80% 55% / 0.18);
  --shadow-1: 0 1px 2px hsl(0 0% 0% / 0.4);
  --shadow-2: 0 18px 44px hsl(0 0% 0% / 0.55);
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0; background: var(--bg); color: var(--ink);
  font-family: var(--sans); font-size: 14px; line-height: 1.5;
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0; font-family: var(--display); letter-spacing: -0.02em; line-height: 1.15; }
p, ul, ol, dl, dd { margin: 0; }
ul, ol { padding: 0; list-style: none; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--accent-text); }
:focus-visible { outline: 2px solid var(--accent-solid); outline-offset: 2px; border-radius: 4px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.mono { font-family: var(--mono); font-variant-numeric: tabular-nums; }
.num { font-variant-numeric: tabular-nums; }

.ad-boot { padding: 40px; color: var(--ink-mute); }

/* ------------------------------------------------------------- skeleton */

.ad { display: grid; grid-template-columns: var(--rail) minmax(0, 1fr); min-height: 100vh; }
.ad[data-rail="mini"] { --rail: 64px; }

.side {
  border-right: 1px solid var(--line); background: var(--surface);
  display: flex; flex-direction: column; gap: 4px; padding: 14px 12px;
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
}
.side__brand { display: flex; align-items: center; gap: 10px; padding: 4px 6px 14px; min-width: 0; }
.side__mark {
  width: 32px; height: 32px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: var(--accent-soft); color: var(--accent-text); border: 1px solid var(--accent-line);
}
.side__name { font-size: 14px; font-weight: 700; letter-spacing: -0.015em; line-height: 1.2; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.side__sub { font-size: 11px; color: var(--ink-mute); letter-spacing: 0.06em; text-transform: uppercase; }
.ad[data-rail="mini"] .side__brand > div, .ad[data-rail="mini"] .navitem span, .ad[data-rail="mini"] .side__foot span { display: none; }
.ad[data-rail="mini"] .side { align-items: center; }
.ad[data-rail="mini"] .navitem { justify-content: center; padding: 10px; }

.navitem {
  display: flex; align-items: center; gap: 10px; width: 100%;
  padding: 8px 10px; border: 0; border-radius: 8px; background: transparent;
  color: var(--ink-2); font-size: 14px; font-weight: 600; cursor: pointer; text-align: left;
  transition: background 140ms ease-out, color 140ms ease-out;
}
.navitem:hover { background: var(--surface-2); color: var(--ink); }
.navitem[aria-current="page"] { background: var(--accent-soft); color: var(--accent-text); }
.navitem svg { width: 18px; height: 18px; flex: none; }
.navitem { position: relative; }
.navitem .count {
  margin-left: auto; font-size: 11px; font-weight: 800; padding: 1px 7px; border-radius: 999px;
  background: var(--surface-2); color: var(--ink-mute);
}
.navitem--more { display: none; }
.navitem[aria-current="page"] .count { background: var(--accent-solid); color: var(--accent-ink); }
.side__foot { margin-top: auto; padding-top: 10px; border-top: 1px solid var(--line-2); }

.main { display: flex; flex-direction: column; min-width: 0; }
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 12px; padding: 12px 20px;
  background: color-mix(in srgb, var(--bg) 90%, transparent);
  backdrop-filter: saturate(1.4) blur(8px);
  border-bottom: 1px solid var(--line);
}
.topbar h2 { font-size: 18px; margin-right: auto; }
.topbar__sub { font-size: 12.5px; color: var(--ink-mute); font-weight: 500; margin-left: 8px; }
.view { padding: 20px; display: grid; gap: 18px; align-content: start; }
@media (max-width: 640px) { .view { padding: 14px; } .topbar { padding: 10px 14px; } }

/* --------------------------------------------------------------- pieces */

.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 13px; min-height: 36px; cursor: pointer;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: 13.5px; font-weight: 600;
  white-space: nowrap; text-decoration: none;
  transition: background 140ms ease-out, border-color 140ms ease-out;
}
.btn:hover:not(:disabled) { background: var(--surface-2); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }
.btn--primary { background: var(--accent-solid); color: var(--accent-ink); border-color: transparent; }
.btn--primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent-solid) 88%, #000); }
[data-theme="dark"] .btn--primary:hover:not(:disabled) { background: color-mix(in srgb, var(--accent-solid) 86%, #fff); }
.btn--soft { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }
.btn--ghost { background: transparent; border-color: transparent; color: var(--ink-2); }
.btn--ghost:hover:not(:disabled) { background: var(--surface-2); color: var(--ink); }
.btn--danger { color: var(--bad); border-color: color-mix(in srgb, var(--bad) 32%, transparent); background: transparent; }
.btn--danger:hover:not(:disabled) { background: var(--bad-soft); }
.btn--sm { min-height: 30px; padding: 4px 10px; font-size: 12.5px; }
.btn--icon { width: 34px; padding: 0; }
.btn[data-pending="1"] { opacity: 0.7; pointer-events: none; }

.chip {
  display: inline-flex; align-items: center; gap: 5px; white-space: nowrap;
  padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 700; letter-spacing: 0.01em;
  background: var(--surface-2); color: var(--ink-2);
}
.chip--ok { background: var(--ok-soft); color: var(--ok); }
.chip--warn { background: var(--warn-soft); color: var(--warn); }
.chip--bad { background: var(--bad-soft); color: var(--bad); }
.chip--info { background: var(--info-soft); color: var(--info); }
.chip--accent { background: var(--accent-soft); color: var(--accent-text); }
.chip--line { background: transparent; border: 1px solid var(--line); color: var(--ink-mute); }
.chip svg { width: 12px; height: 12px; }

.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); }
.card__head {
  display: flex; align-items: center; gap: 10px; padding: 13px 16px;
  border-bottom: 1px solid var(--line-2);
}
.card__head h3 { font-size: 14.5px; margin-right: auto; }
.card__body { padding: 16px; }
.card__body--flush { padding: 0; }

.grid { display: grid; gap: 14px; }
.grid--2 { grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); }
.grid--3 { grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(148px, 1fr)); gap: 12px; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 13px 15px; }
.stat__label { font-size: 11px; font-weight: 800; letter-spacing: 0.07em; text-transform: uppercase; color: var(--ink-mute); }
.stat__value { font-family: var(--display); font-size: 25px; font-weight: 800; letter-spacing: -0.03em; margin-top: 4px; font-variant-numeric: tabular-nums; }
.stat__sub { font-size: 12px; color: var(--ink-mute); margin-top: 2px; }
.stat__value.money { font-family: var(--mono); font-size: 22px; letter-spacing: -0.02em; }

.toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.toolbar .spacer { margin-left: auto; }
.toolbar .select, .toolbar .input { width: auto; min-width: 150px; }
.toolbar .search .input { width: 260px; max-width: 100%; }
@media (max-width: 560px) { .toolbar .search, .toolbar .search .input, .toolbar .select { width: 100%; } }
.input, .select {
  padding: 7px 11px; min-height: 36px; border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface); color: var(--ink); font-size: 13.5px; width: 100%;
}
.select { cursor: pointer; padding-right: 28px;
  background-image: linear-gradient(45deg, transparent 50%, currentColor 50%), linear-gradient(135deg, currentColor 50%, transparent 50%);
  background-position: right 12px center, right 7px center; background-size: 5px 5px, 5px 5px; background-repeat: no-repeat; }
.field { display: grid; gap: 4px; margin-bottom: 12px; }
.label { font-size: 12px; font-weight: 700; color: var(--ink-2); }
.hint { font-size: 12px; color: var(--ink-mute); }
.search { position: relative; min-width: 200px; }
.search svg { position: absolute; left: 10px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--ink-mute); pointer-events: none; }
.search .input { padding-left: 32px; }

/* ---------------------------------------------------------------- table */

.tablewrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13.5px; }
table.t th {
  text-align: left; font-size: 11px; font-weight: 800; letter-spacing: 0.06em; text-transform: uppercase;
  color: var(--ink-mute); padding: 9px 14px; border-bottom: 1px solid var(--line);
  position: sticky; top: 0; background: var(--surface); z-index: 1; white-space: nowrap;
}
table.t th button { background: none; border: 0; padding: 0; font: inherit; color: inherit; cursor: pointer; display: inline-flex; gap: 4px; align-items: center; }
table.t td { padding: 10px 14px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
table.t tbody tr { cursor: pointer; }
table.t tbody tr:hover { background: var(--surface-2); }
table.t tbody tr:last-child td { border-bottom: 0; }
table.t td.right, table.t th.right { text-align: right; }
.cellmain { font-weight: 600; }
.cellsub { font-size: 12px; color: var(--ink-mute); }

.avatar {
  width: 28px; height: 28px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  font-size: 11px; font-weight: 800; background: hsl(var(--hue, 8) 45% 92%); color: hsl(var(--hue, 8) 55% 26%);
}
[data-theme="dark"] .avatar { background: hsl(var(--hue, 8) 28% 26%); color: hsl(var(--hue, 8) 70% 86%); }
.who { display: flex; align-items: center; gap: 9px; min-width: 0; }

.spark { display: block; height: 22px; width: 84px; }
.bar { height: 6px; border-radius: 3px; background: var(--surface-2); overflow: hidden; min-width: 60px; }
.bar > span { display: block; height: 100%; border-radius: 3px; background: var(--accent-solid); }
.bar--full > span { background: var(--warn); }
.bar--quiet > span { background: var(--ink-mute); }

/* ------------------------------------------------------------- timetable */

.tt { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.tt__col { min-width: 0; display: grid; gap: 6px; align-content: start; }
.tt__head {
  display: flex; align-items: baseline; gap: 6px; padding: 7px 9px;
  background: var(--surface-2); border-radius: var(--radius-sm); font-size: 12.5px; font-weight: 700;
}
.tt__head small { margin-left: auto; font-weight: 600; color: var(--ink-mute); font-size: 11px; }
.tt__col.drop { outline: 2px dashed var(--accent-solid); outline-offset: 3px; border-radius: var(--radius-sm); }
.tt__slot {
  text-align: left; width: 100%; cursor: grab; touch-action: none;
  padding: 8px 9px; border: 1px solid var(--line); border-left: 3px solid var(--ct, var(--accent));
  border-radius: var(--radius-sm); background: var(--surface); font-size: 12.5px;
}
.tt__slot:hover { border-color: var(--ink-mute); border-left-color: var(--ct, var(--accent)); }
.tt__slot[data-dragging="1"] { opacity: 0.35; }
.tt__slot b { display: block; font-size: 12.5px; font-weight: 700; }
.tt__slot span { display: block; color: var(--ink-mute); font-size: 11.5px; }
.tt__slot .time { font-variant-numeric: tabular-nums; font-weight: 700; color: var(--ink-2); }
.tt__slot[data-published="0"] { opacity: 0.5; border-style: dashed; }
.tt__add {
  border: 1px dashed var(--line); border-radius: var(--radius-sm); background: transparent;
  color: var(--ink-mute); padding: 7px; font-size: 12px; cursor: pointer; width: 100%;
}
.tt__add:hover { border-color: var(--accent-solid); color: var(--accent-text); background: var(--accent-soft); }
.tt__ghost {
  position: fixed; z-index: 500; pointer-events: none; opacity: 0.92;
  box-shadow: var(--shadow-2); border-radius: var(--radius-sm);
}
@media (max-width: 900px) { .tt { grid-template-columns: repeat(3, minmax(180px, 1fr)); overflow-x: auto; } }

/* ---------------------------------------------------------------- roster */

.roster { display: grid; gap: 6px; }
.rosterrow {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 10px; align-items: center;
  padding: 8px 10px; border: 1px solid var(--line-2); border-radius: var(--radius-sm); background: var(--surface);
}
.rosterrow[data-status="attended"] { border-color: color-mix(in srgb, var(--ok) 30%, transparent); }
.rosterrow[data-status="no-show"] { border-color: color-mix(in srgb, var(--bad) 30%, transparent); }
.rosteracts { display: flex; gap: 6px; }

.classrow {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto auto; gap: 12px; align-items: center;
  padding: 11px 14px; border-bottom: 1px solid var(--line-2); cursor: pointer; width: 100%;
  background: transparent; border-left: 0; border-right: 0; border-top: 0; text-align: left;
}
.classrow:last-child { border-bottom: 0; }
.classrow:hover { background: var(--surface-2); }
.classrow .time { font-weight: 700; font-variant-numeric: tabular-nums; width: 66px; }
.classrow .fill { display: grid; gap: 3px; min-width: 96px; }
.classrow .fill small { font-size: 11px; color: var(--ink-mute); font-variant-numeric: tabular-nums; }

/* --------------------------------------------------------------- drawer */

.scrim {
  position: fixed; inset: 0; z-index: 400; background: hsl(220 25% 8% / 0.45);
  display: flex; justify-content: flex-end; animation: fade 150ms ease-out;
}
@keyframes fade { from { opacity: 0; } }
.drawer {
  width: min(520px, 100%); height: 100%; background: var(--bg); display: flex; flex-direction: column;
  box-shadow: var(--shadow-2); animation: slide 160ms cubic-bezier(.22,.8,.3,1);
}
@keyframes slide { from { transform: translateX(26px); opacity: .4; } }
.drawer__head { display: flex; gap: 12px; align-items: flex-start; padding: 15px 16px 13px; border-bottom: 1px solid var(--line); background: var(--surface); }
.drawer__title { font-size: 16px; }
.drawer__sub { font-size: 12.5px; color: var(--ink-mute); margin-top: 2px; }
.drawer__body { flex: 1; overflow-y: auto; padding: 16px; display: grid; gap: 16px; align-content: start; }
.drawer__foot { padding: 12px 16px; border-top: 1px solid var(--line); background: var(--surface); display: flex; gap: 8px; }
.drawer__foot .btn--primary { flex: 1; }
@media (max-width: 640px) {
  .scrim { align-items: flex-end; }
  .drawer { width: 100%; height: auto; max-height: 92vh; border-radius: 16px 16px 0 0; }
}

.kv { display: grid; grid-template-columns: auto 1fr; gap: 7px 16px; font-size: 13.5px; }
.kv dt { color: var(--ink-mute); }
.kv dd { font-weight: 600; }

.note {
  display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: var(--radius-sm);
  font-size: 13px; background: var(--surface-2); color: var(--ink-2); border: 1px solid var(--line-2);
}
.note svg { width: 16px; height: 16px; flex: none; margin-top: 1px; }
.note--ok { background: var(--ok-soft); color: var(--ok); border-color: color-mix(in srgb, var(--ok) 24%, transparent); }
.note--warn { background: var(--warn-soft); color: var(--warn); border-color: color-mix(in srgb, var(--warn) 28%, transparent); }
.note--bad { background: var(--bad-soft); color: var(--bad); border-color: color-mix(in srgb, var(--bad) 24%, transparent); }
.note--accent { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-line); }

.empty {
  display: grid; justify-items: center; text-align: center; gap: 8px; padding: 34px 20px;
  border: 1px dashed var(--line); border-radius: var(--radius); background: var(--surface);
}
.empty__icon { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--surface-2); color: var(--ink-mute); }
.empty h3 { font-size: 14.5px; }
.empty p { font-size: 13px; color: var(--ink-mute); max-width: 44ch; }

.toast {
  position: fixed; left: 50%; bottom: 22px; transform: translateX(-50%); z-index: 500;
  display: flex; align-items: center; gap: 9px; padding: 11px 16px; border-radius: 999px;
  background: hsl(220 22% 12%); color: #fff; font-size: 13.5px; font-weight: 600; box-shadow: var(--shadow-2);
  animation: toastin 160ms cubic-bezier(.22,.8,.3,1);
}
.toast--bad { background: hsl(4 62% 30%); }
.toast--ok { background: hsl(158 55% 19%); }
@keyframes toastin { from { transform: translate(-50%, 12px); opacity: 0; } }

.menu { position: relative; }
.menu__pop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 30; min-width: 214px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius);
  box-shadow: var(--shadow-2); padding: 5px; display: grid; gap: 2px;
}
.menu__pop button {
  display: flex; align-items: center; gap: 9px; width: 100%; text-align: left;
  padding: 8px 10px; border: 0; border-radius: var(--radius-sm); background: transparent;
  font-size: 13.5px; font-weight: 600; color: var(--ink-2); cursor: pointer;
}
.menu__pop button:hover { background: var(--surface-2); color: var(--ink); }
.menu__pop hr { border: 0; border-top: 1px solid var(--line-2); margin: 4px 2px; }
.menu__pop svg { width: 16px; height: 16px; }

/* --------------------------------------------------------------- alerts */

.alert {
  display: grid; grid-template-columns: auto minmax(0, 1fr) auto; gap: 14px; align-items: start;
  padding: 14px 16px; border-bottom: 1px solid var(--line-2);
}
.alert:last-child { border-bottom: 0; }
.alert__name { font-weight: 700; font-size: 14px; }
.alert__meta { font-size: 12.5px; color: var(--ink-mute); margin-top: 1px; }
.alert__msg {
  margin-top: 10px; padding: 11px 13px; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--line-2);
  font-size: 13px; line-height: 1.5; white-space: pre-wrap;
}
.alert__acts { display: grid; gap: 6px; justify-items: stretch; }
.seg { display: inline-flex; padding: 2px; gap: 2px; background: var(--surface-2); border-radius: 999px; }
.seg button { border: 0; background: transparent; padding: 4px 11px; border-radius: 999px; font-size: 12.5px; font-weight: 700; color: var(--ink-2); cursor: pointer; }
.seg button[aria-pressed="true"] { background: var(--surface); color: var(--ink); box-shadow: var(--shadow-1); }
@media (max-width: 720px) { .alert { grid-template-columns: 1fr; } .alert__acts { grid-auto-flow: column; } }

/* -------------------------------------------------------------- charts */

.chart { width: 100%; height: auto; display: block; overflow: visible; }
.chart text { font-family: var(--sans); font-size: 10.5px; fill: var(--ink-mute); }
.chart .track { fill: var(--surface-2); }
.chart .barfill { fill: var(--accent-solid); }
.chart .barfill--quiet { fill: var(--ink-mute); opacity: 0.5; }
.chart .line { fill: none; stroke: var(--accent-solid); stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.chart .area { fill: var(--accent-soft); }
.chart .dot { fill: var(--accent-solid); }
.chart .grid { stroke: var(--line-2); stroke-width: 1; }
.chart.spark { width: 84px; height: 22px; }
.chartrow { display: grid; grid-template-columns: 120px minmax(0, 1fr) 54px; gap: 10px; align-items: center; font-size: 12.5px; padding: 4px 0; }
.chartrow .lbl { color: var(--ink-2); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chartrow .val { text-align: right; font-variant-numeric: tabular-nums; color: var(--ink-mute); }

/* ------------------------------------------------------------- responsive */

@media (max-width: 900px) {
  .ad { grid-template-columns: 1fr; }
  .side {
    position: fixed; bottom: 0; left: 0; right: 0; top: auto; height: auto;
    flex-direction: row; gap: 2px; padding: 6px 6px calc(6px + env(safe-area-inset-bottom, 0px));
    border-right: 0; border-top: 1px solid var(--line); z-index: 30; overflow-x: auto;
  }
  .side__brand, .side__foot { display: none; }
  .navitem { flex-direction: column; gap: 3px; padding: 7px 4px; font-size: 10.5px; font-weight: 700; min-width: 0; text-align: center; flex: 1; }
  .navitem--secondary { display: none; }
  .navitem--secondary.navitem--activesecondary { display: flex; }
  .navitem--more { display: flex; }
  .side .navitem .count {
    position: absolute; top: 2px; left: 50%; margin-left: 6px;
    min-width: 17px; padding: 0 4px; line-height: 16px; font-size: 10px;
    background: var(--accent-solid); color: var(--accent-ink);
  }
  .drawer .navitem { flex-direction: row; font-size: 14px; padding: 10px 12px; text-align: left; }
  .drawer .navitem .count { position: static; margin-left: auto; background: var(--surface-2); color: var(--ink-mute); }
  .navitem svg { width: 20px; height: 20px; }
  .main { padding-bottom: 74px; }
  .grid--2, .grid--3 { grid-template-columns: 1fr; }
  table.t th:nth-child(n+4), table.t td:nth-child(n+4) { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  * { animation-duration: 1ms !important; transition-duration: 1ms !important; }
}
