/* Hallmark · component: app-shell · genre: modern-minimal · tone: instrument
 * theme: custom (SCB|PH teal kept from scbphil.com) · type: Fira Code, system stack only
 * layout: sidebar + topbar + tabbar (information architecture unchanged)
 */
/* SCB|PH · FoodPanda Hitter
   Palette lifted from scbphil.com: 174 42% teal, Fira Code, hairline cards.
   Surfaces are flat, structure comes from hairlines, status from colour on the value. */

:root {
  color-scheme: light;
  /* --bg must stay #fafafa: app.js passes it to Telegram's header colour */
  --bg: hsl(0 0% 98%);
  --bg-soft: hsl(0 0% 100%);
  --fg: hsl(240 10% 10%);
  --fg-soft: hsl(240 6% 30%);
  --muted: hsl(240 4% 44%);
  --card: hsl(0 0% 100%);
  --secondary: hsl(240 5% 96%);
  --border: hsl(240 6% 90%);
  --border-strong: hsl(240 6% 82%);
  --input: hsl(0 0% 100%);
  --input-border: hsl(240 6% 74%);
  --primary: #2c7a71;
  --primary-hover: #24655d;
  --primary-fg: #ffffff;
  --brand-mark: #2c7a71;
  --accent: hsl(174 42% 93%);
  --accent-fg: hsl(174 42% 24%);
  --ok: #15803d;
  --ok-bg: rgba(34, 197, 94, 0.12);
  --err: #dc2626;
  --err-bg: rgba(239, 68, 68, 0.11);
  --warn: #b45309;
  --warn-bg: rgba(245, 158, 11, 0.14);
  --info: #0b6f9e;
  --info-bg: rgba(0, 136, 204, 0.1);
  --ring: rgba(44, 122, 113, 0.26);
  --console-bg: #09110f;
  --console-fg: #cfece5;
  --console-muted: #6a8c85;
  --shadow: 0 1px 0 rgba(16, 24, 40, 0.04);
  --shadow-lg: 0 18px 40px -22px rgba(9, 30, 28, 0.32), 0 1px 3px rgba(9, 30, 28, 0.06);
  --radius: 10px;
  --radius-sm: 7px;
  --nav-w: 248px;
  /* bottom tab bar height incl. safe area; toasts, notices and the order footer sit above it */
  --tabbar-h: calc(72px + env(safe-area-inset-bottom));
  --font: "Fira Code", "JetBrains Mono", ui-monospace, SFMono-Regular, "Cascadia Mono", Menlo, Consolas, monospace;
}

[data-theme="dark"] {
  color-scheme: dark;
  --bg: hsl(0 0% 2%);
  --bg-soft: hsl(0 0% 4%);
  --fg: hsl(240 5% 92%);
  --fg-soft: hsl(240 5% 76%);
  --muted: hsl(240 5% 58%);
  --card: hsl(0 0% 5%);
  --secondary: hsl(0 0% 8%);
  --border: hsl(0 0% 13%);
  --border-strong: hsl(0 0% 20%);
  --input: hsl(0 0% 7%);
  --input-border: hsl(0 0% 28%);
  --primary: #6fd0c3;
  --primary-hover: #8adfd4;
  --primary-fg: #04110f;
  --brand-mark: #22635c;
  --accent: hsl(174 42% 12%);
  --accent-fg: #8adfd4;
  --ok: #4ade80;
  --ok-bg: rgba(34, 197, 94, 0.14);
  --err: #f87171;
  --err-bg: rgba(239, 68, 68, 0.14);
  --warn: #fbbf24;
  --warn-bg: rgba(245, 158, 11, 0.14);
  --info: #67c6ef;
  --info-bg: rgba(0, 136, 204, 0.16);
  --ring: rgba(111, 208, 195, 0.3);
  --console-bg: #060b0a;
  --console-muted: #5f817a;
  --shadow: 0 1px 0 rgba(0, 0, 0, 0.5);
  --shadow-lg: 0 24px 60px -28px rgba(0, 0, 0, 0.9);
}

*,
*::before,
*::after { box-sizing: border-box; }

html {
  -webkit-text-size-adjust: 100%;
  scroll-behavior: auto;
}

body {
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  color: var(--fg);
  font-family: var(--font);
  font-size: 13.5px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  overflow-x: clip;
  overscroll-behavior-y: contain;
  background: var(--bg);
}

button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3, h4, p { margin: 0; }
ul { margin: 0; padding: 0; list-style: none; }
svg { display: block; }

::selection { background: var(--accent); color: var(--accent-fg); }

:focus-visible {
  outline: 2px solid var(--primary);
  outline-offset: 2px;
}

.mono { font-family: var(--font); }
.muted { color: var(--muted); }
.tiny { font-size: 11px; }
.nowrap { white-space: nowrap; }
[data-job-slot] { scroll-margin-top: 76px; }
.hidden { display: none !important; }
[hidden] { display: none !important; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
}

/* ---------------------------------------------------------------- boot */
.boot {
  position: fixed;
  inset: 0;
  display: grid;
  place-content: center;
  justify-items: center;
  gap: 16px;
  background: var(--bg);
  z-index: 60;
}
.boot-text {
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}
.boot-text::after {
  content: "";
  display: inline-block;
  width: 6px;
  height: 12px;
  margin-left: 6px;
  background: var(--primary);
  vertical-align: -2px;
  animation: blink 1.1s steps(2, start) infinite;
}
@keyframes blink { to { visibility: hidden; } }

/* ---------------------------------------------------------------- gate */
.gate {
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  padding: 24px 18px calc(24px + env(safe-area-inset-bottom));
}
.gate-card {
  width: 100%;
  max-width: 430px;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 14px;
  box-shadow: var(--shadow-lg);
  padding: 28px 24px;
  text-align: center;
}
.gate-mark {
  width: 52px;
  height: 52px;
  margin: 0 auto 18px;
  border-radius: 12px;
  display: grid;
  place-items: center;
  color: #fff;
  background: var(--brand-mark);
}
.gate-mark svg { width: 24px; height: 24px; }
.gate-kicker {
  font-size: 11px;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--muted);
}
.gate-title {
  margin: 8px 0 10px;
  font-size: 21px;
  font-weight: 600;
  letter-spacing: -0.02em;
}
.gate-text {
  color: var(--fg-soft);
  font-size: 13px;
  line-height: 1.7;
}
.gate-actions { margin-top: 22px; display: grid; gap: 10px; }
.gate-note {
  margin-top: 18px;
  padding-top: 14px;
  border-top: 1px dashed var(--border);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
  text-align: left;
}

/* ---------------------------------------------------------------- shell */
.shell {
  display: grid;
  grid-template-columns: 1fr;
  min-height: 100vh;
  min-height: 100dvh;
}

.sidebar {
  display: none;
  flex-direction: column;
  gap: 24px;
  width: var(--nav-w);
  padding: 20px 14px 18px;
  border-right: 1px solid var(--border);
  background: var(--card);
  position: sticky;
  top: 0;
  height: 100dvh;
  z-index: 20;
}

.brand { display: flex; align-items: center; gap: 11px; padding: 0 6px; }
.brand-mark {
  width: 38px;
  height: 38px;
  flex: none;
  border-radius: 9px;
  display: grid;
  place-items: center;
  color: #fff;
  background: transparent;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.04em;
  overflow: hidden;
  padding: 0;
}
.brand-mark img { width: 100%; height: 100%; object-fit: cover; display: block; }
.brand-name { font-size: 14px; font-weight: 600; letter-spacing: -0.005em; line-height: 1.2; }
.brand-sub {
  display: block;
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}

.nav { display: grid; gap: 4px; }
.nav-list { display: grid; gap: 2px; }
.nav-label {
  padding: 0 10px 8px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: 11px;
  width: 100%;
  padding: 9px 10px;
  border: 0;
  border-radius: var(--radius-sm);
  background: transparent;
  color: var(--fg-soft);
  font-size: 13px;
  text-align: left;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-item:hover { background: var(--secondary); color: var(--fg); }
.nav-item.is-locked, .tab.is-locked { opacity: 0.45; }
.nav-item.is-locked:hover { background: transparent; color: var(--muted); }
.nav-item.is-active { background: var(--accent); color: var(--accent-fg); font-weight: 600; }
.nav-item.is-active::before {
  content: "";
  position: absolute;
  left: 3px;
  top: 50%;
  transform: translateY(-50%);
  width: 3px;
  height: 18px;
  border-radius: 3px;
  background: var(--primary);
}
.nav-item svg { width: 17px; height: 17px; flex: none; }
.nav-icon { display: grid; place-items: center; }
.nav-count {
  margin-left: auto;
  padding: 1px 7px;
  border-radius: 999px;
  background: var(--secondary);
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.nav-item.is-active .nav-count { background: var(--card); color: var(--accent-fg); }

.sidebar-foot {
  margin-top: auto;
  display: grid;
  gap: 10px;
  padding: 14px 10px 0;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  line-height: 1.7;
}
.sidebar-foot strong { color: var(--fg-soft); font-weight: 600; }

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

.topbar {
  position: sticky;
  top: 0;
  z-index: 25;
  display: flex;
  align-items: center;
  gap: 12px;
  min-height: 56px;
  padding: 9px 16px;
  border-bottom: 1px solid var(--border);
  background: var(--bg);
}
.topbar-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.topbar-brand > div { min-width: 0; }
.topbar-brand .brand-mark { width: 30px; height: 30px; border-radius: 8px; font-size: 8.5px; }
.topbar-title { font-size: 13.5px; font-weight: 600; line-height: 1.25; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar-sub {
  display: block;
  color: var(--muted);
  font-size: 11px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-right { display: flex; align-items: center; gap: 8px; margin-left: auto; flex: none; }

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  height: 26px;
  padding: 0 9px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  white-space: nowrap;
}
.pill--live { color: var(--ok); border-color: color-mix(in srgb, var(--ok) 34%, var(--border)); background: var(--ok-bg); }
.pill--demo { color: var(--warn); border-color: color-mix(in srgb, var(--warn) 34%, var(--border)); background: var(--warn-bg); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; flex: none; }
.dot--live { box-shadow: 0 0 0 0 currentColor; animation: pulse 2.4s ease-out infinite; }
@keyframes pulse {
  0% { box-shadow: 0 0 0 0 rgba(34, 197, 94, 0.5); }
  70%, 100% { box-shadow: 0 0 0 5px rgba(34, 197, 94, 0); }
}

.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  height: 32px;
  padding: 0 10px 0 4px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  font-size: 11.5px;
  color: var(--fg-soft);
  max-width: 40vw;
}
.user-chip .avatar {
  width: 24px; height: 24px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--accent); color: var(--accent-fg);
  font-size: 10px; font-weight: 700; flex: none;
}
.user-chip span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.icon-btn {
  display: inline-grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: none;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--card);
  color: var(--fg-soft);
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.icon-btn:hover { background: var(--secondary); color: var(--fg); border-color: var(--border-strong); }
.icon-btn svg { width: 15px; height: 15px; }
.icon-btn--danger { color: var(--err); }
.icon-btn--danger:hover { background: var(--err-bg); border-color: color-mix(in srgb, var(--err) 30%, var(--border)); color: var(--err); }
.icon-btn--sm { width: 28px; height: 28px; }
.icon-btn--sm svg { width: 13px; height: 13px; }

/* ---------------------------------------------------------------- page */
.view {
  width: 100%;
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 16px calc(var(--tabbar-h) + 20px);
}
.page { display: grid; gap: 16px; min-width: 0; }
@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.page-head {
  display: grid;
  gap: 6px;
  padding: 2px 0 14px;
  border-bottom: 1px solid var(--border);
}
.eyebrow {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--primary);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.02em;
}
.eyebrow::before { content: "//"; color: var(--muted); font-weight: 400; }
.page-title { font-size: clamp(21px, 5vw, 28px); font-weight: 600; letter-spacing: -0.02em; line-height: 1.15; }
.page-desc { color: var(--muted); font-size: 12.5px; max-width: 64ch; line-height: 1.65; }

.card {
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  overflow: hidden;
  min-width: 0;
}
.card-head {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
}
.card-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 13px;
  font-weight: 600;
  color: var(--fg);
}
.card-title svg { width: 14px; height: 14px; color: var(--muted); }
.card-hint {
  margin-left: auto;
  color: var(--muted);
  font-size: 11.5px;
  max-width: 52%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.card-body { padding: 16px; display: grid; gap: 14px; min-width: 0; }
.card-foot {
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}
.card-foot .muted { font-size: 11.5px; }

.stack { display: grid; gap: 12px; min-width: 0; }
.row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; min-width: 0; }
.row > * { min-width: 0; }
.row--between { justify-content: space-between; }
.grid-2 { display: grid; gap: 14px; grid-template-columns: 1fr; min-width: 0; }
.divider { height: 1px; background: var(--border); border: 0; margin: 2px 0; }

/* ---------------------------------------------------------------- form */
.field { display: grid; gap: 6px; min-width: 0; }
.label {
  display: flex;
  align-items: center;
  gap: 6px;
  color: var(--fg-soft);
  font-size: 11.5px;
  font-weight: 600;
  letter-spacing: 0.01em;
}
.label .opt { color: var(--muted); font-weight: 400; letter-spacing: 0.02em; }
.hint { color: var(--muted); font-size: 11.5px; line-height: 1.6; }
.error-text { color: var(--err); font-size: 11.5px; }
.input {
  width: 100%;
  height: 44px;
  padding: 0 12px;
  border: 1px solid var(--input-border);
  border-radius: var(--radius-sm);
  background: var(--input);
  color: var(--fg);
  font-size: 16px; /* keeps iOS from zooming */
  letter-spacing: 0.01em;
  transition: border-color 0.15s ease;
  appearance: none;
  min-width: 0;
}
textarea.input { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.7; resize: vertical; }
select.input {
  padding-right: 34px;
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%23888f8f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'><path d='m6 9 6 6 6-6'/></svg>");
  background-repeat: no-repeat;
  background-position: right 11px center;
  text-overflow: ellipsis;
}
.input::placeholder { color: var(--muted); opacity: 0.8; }
.input:hover { border-color: var(--muted); }
.input:focus {
  outline: none;
  border-color: var(--primary);
  box-shadow: 0 0 0 3px var(--ring);
}
.input[aria-invalid="true"] { border-color: var(--err); box-shadow: 0 0 0 3px var(--err-bg); }
.input:disabled { background: var(--secondary); color: var(--muted); cursor: not-allowed; }
.input[readonly] { background: var(--secondary); cursor: default; }

.input-group { display: flex; align-items: stretch; min-width: 0; }
.input-group .input { border-radius: var(--radius-sm) 0 0 var(--radius-sm); flex: 1 1 auto; width: auto; min-width: 0; }
.input-group .suffix {
  display: inline-flex;
  align-items: center;
  padding: 0 12px;
  border: 1px solid var(--input-border);
  border-left: 0;
  border-radius: 0 var(--radius-sm) var(--radius-sm) 0;
  background: var(--secondary);
  color: var(--muted);
  font-size: 12px;
  white-space: nowrap;
  flex: none;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 42px;
  padding: 0 16px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  background: var(--secondary);
  color: var(--fg);
  font-size: 13px;
  font-weight: 600;
  letter-spacing: 0;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease, transform 0.06s ease;
}
.btn:active { transform: translateY(1px); }
.btn svg { width: 15px; height: 15px; }
.btn--primary {
  background: var(--primary);
  color: var(--primary-fg);
}
.btn--primary:hover { background: var(--primary-hover); }
.btn--ghost { background: var(--card); border-color: var(--border-strong); color: var(--fg-soft); }
.btn--ghost:hover { background: var(--secondary); border-color: var(--muted); color: var(--fg); }
.btn--subtle { background: var(--accent); color: var(--accent-fg); }
.btn--subtle:hover { background: color-mix(in srgb, var(--accent) 80%, var(--primary) 8%); }
.btn--danger { background: transparent; border-color: color-mix(in srgb, var(--err) 34%, var(--border)); color: var(--err); }
.btn--danger:hover { background: var(--err-bg); }
.btn--sm { height: 34px; padding: 0 11px; font-size: 12px; }
.btn--block { width: 100%; }
.btn[disabled], .btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none;
}
@media (pointer: coarse) {
  .btn { min-height: 44px; }
  .btn--sm { min-height: 38px; }
  /* bigger tap area for the 28px icon buttons without changing their grid cell */
  .icon-btn--sm { position: relative; }
  .icon-btn--sm::after { content: ""; position: absolute; inset: -6px; }
}

/* switch */
.switch { display: flex; align-items: flex-start; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; width: 0; height: 0; }
.switch-track {
  position: relative;
  width: 38px;
  height: 22px;
  flex: none;
  margin-top: 1px;
  border-radius: 999px;
  background: var(--border-strong);
  transition: background-color 0.16s ease;
}
.switch-track::after {
  content: "";
  position: absolute;
  top: 3px;
  left: 3px;
  width: 16px;
  height: 16px;
  border-radius: 50%;
  background: #fff;
  box-shadow: 0 1px 2px rgba(0, 0, 0, 0.25);
  transition: transform 0.16s ease;
}
.switch input:checked + .switch-track { background: var(--primary); }
.switch input:checked + .switch-track::after { transform: translateX(16px); }
.switch input:focus-visible + .switch-track { box-shadow: 0 0 0 3px var(--ring); }
.switch-text { display: grid; gap: 2px; }
.switch-text strong { font-size: 13px; font-weight: 600; }
.switch-text span { color: var(--muted); font-size: 11.5px; line-height: 1.6; }

/* segmented */
.segmented {
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: 1fr;
  gap: 4px;
  padding: 4px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--secondary);
  min-width: 0;
}
.seg {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  height: 38px;
  min-width: 0;
  padding: 0 8px;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: 0;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.seg svg { width: 14px; height: 14px; }
.seg:hover { color: var(--fg-soft); }
.seg.is-active {
  background: var(--card);
  color: var(--fg);
  border-color: var(--border);
  box-shadow: var(--shadow);
}
.seg.is-active svg { color: var(--primary); }

/* ---------------------------------------------------------------- badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 7px;
  border-radius: 5px;
  border: 1px solid transparent;
  font-size: 10.5px;
  font-weight: 600;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  white-space: nowrap;
}
.badge svg { width: 11px; height: 11px; }
.badge--ok { color: var(--ok); background: var(--ok-bg); border-color: color-mix(in srgb, var(--ok) 24%, transparent); }
.badge--warn { color: var(--warn); background: var(--warn-bg); border-color: color-mix(in srgb, var(--warn) 26%, transparent); }
.badge--err { color: var(--err); background: var(--err-bg); border-color: color-mix(in srgb, var(--err) 26%, transparent); }
.badge--info { color: var(--info); background: var(--info-bg); border-color: color-mix(in srgb, var(--info) 24%, transparent); }
.badge--neutral { color: var(--muted); background: var(--secondary); border-color: var(--border); }

/* ---------------------------------------------------------------- console */
.console {
  border: 1px solid #16302b;
  border-radius: var(--radius);
  background: var(--console-bg);
  overflow: hidden;
}
.console-head {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  border-bottom: 1px solid #16302b;
  background: #0c1816;
  color: #7ea39c;
  font-size: 11px;
  letter-spacing: 0.02em;
}
/* the terminal frame is typographic, not a faked window: no traffic lights */
.console-head .lights { display: none; }
.console-head .console-tag { margin-left: auto; color: #4f766f; }
.console-body {
  max-height: 240px;
  overflow: auto;
  padding: 10px 12px;
  font-size: 12px;
  line-height: 1.8;
  color: var(--console-fg);
  scrollbar-width: thin;
  scrollbar-color: #23453f transparent;
}
.console-line { display: flex; gap: 8px; align-items: flex-start; white-space: pre-wrap; overflow-wrap: anywhere; }
.console-line .t { color: var(--console-muted); flex: none; font-variant-numeric: tabular-nums; }
.console-line .p { color: #4f766f; flex: none; }
.console-line--ok { color: #7ee2a8; }
.console-line--err { color: #ff9d9d; }
.console-line--warn { color: #ffd479; }
.console-line--info { color: var(--console-fg); }
.console-empty { color: var(--console-muted); }

/* job */
.job { display: grid; gap: 12px; }
.job-head { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.job-id { color: var(--muted); font-size: 11px; letter-spacing: 0.02em; }
.job-status { margin-left: auto; }
.progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 11.5px;
}
.progress-head > span:first-child {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.progress {
  height: 8px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--secondary);
  border: 1px solid var(--border);
}
.progress-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: var(--primary);
  transition: width 0.35s ease;
}
.progress-fill.is-failed { background: var(--err); }
.progress-fill.is-awaiting { background: var(--warn); }
.progress-fill.is-done { background: var(--ok); }
.activity-list { display: grid; gap: 6px; }
.activity-item {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 9px;
  align-items: center;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--secondary);
}
.activity-item--ok { border-left: 3px solid var(--ok); }
.activity-item--err { border-left: 3px solid var(--err); }
.activity-item--info { border-left: 3px solid var(--info); }
.activity-item--warn { border-left: 3px solid var(--warn); }
.activity-index {
  width: 22px;
  height: 22px;
  display: grid;
  place-items: center;
  border-radius: 5px;
  background: var(--card);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 9.5px;
}
.activity-main { min-width: 0; display: grid; gap: 2px; }
.activity-label { display: flex; align-items: center; gap: 6px; font-size: 11.5px; font-weight: 600; }
.activity-msg { font-size: 10.5px; color: var(--muted); overflow-wrap: anywhere; }
.activity-action, .status-action { justify-self: start; margin-top: 3px; }
.order-cards { display: grid; gap: 6px; margin-top: 2px; }
.order-card-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  padding: 8px 9px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--secondary);
  font-size: 11px;
}
.order-card-index {
  width: 21px;
  height: 21px;
  display: grid;
  place-items: center;
  border: 1px solid var(--border);
  border-radius: 5px;
  background: var(--card);
  color: var(--muted);
  font-size: 9.5px;
  flex: none;
}
.order-card-pan { display: flex; align-items: center; gap: 6px; font-size: 11px; }
.order-card-vendor { color: var(--muted); margin-left: auto; }
.order-card-link { margin-left: auto; }
.order-card-detail {
  flex-basis: 100%;
  margin: 2px 0 0 29px;
  font-size: 10.5px;
  overflow-wrap: anywhere;
}
.order-card-row--ok { border-left: 3px solid var(--ok); }
.order-card-row--err { border-left: 3px solid var(--err); }
.order-card-row--info { border-left: 3px solid var(--info); }
.order-card-row--warn { border-left: 3px solid var(--warn); }
.steps { display: grid; gap: 2px; margin: 0; padding: 0; list-style: none; }
.step {
  display: grid;
  grid-template-columns: 18px 1fr;
  gap: 10px;
  align-items: start;
  padding: 8px 9px;
  border-radius: 7px;
  font-size: 12.5px;
}
.step + .step { border-top: 1px dashed var(--border); }
.step-icon {
  width: 18px;
  height: 18px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1px solid var(--border-strong);
  color: var(--muted);
  font-size: 9px;
  margin-top: 1px;
}
.step-icon svg { width: 10px; height: 10px; }
.step-label { color: var(--muted); line-height: 1.5; }
.step-msg { display: block; color: var(--muted); font-size: 11px; margin-top: 1px; }
.step--active { background: var(--info-bg); }
.step--active .step-icon { border-color: var(--info); color: var(--info); }
.step--active .step-label { color: var(--fg); }
.step--done .step-icon { border-color: color-mix(in srgb, var(--ok) 50%, transparent); background: var(--ok-bg); color: var(--ok); }
.step--done .step-label { color: var(--fg-soft); }
.step--failed .step-icon { border-color: color-mix(in srgb, var(--err) 50%, transparent); background: var(--err-bg); color: var(--err); }
.step--failed .step-label { color: var(--err); }
.step--await { background: var(--warn-bg); }
.step--await .step-icon { border-color: var(--warn); color: var(--warn); }
.step--await .step-label { color: var(--warn); }

.spinner {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  border: 2px solid currentColor;
  border-top-color: transparent;
  animation: spin 0.7s linear infinite;
  display: inline-block;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------------------------------------------------------------- accounts */
.acc-list { display: grid; gap: 10px; }
.acc {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
  transition: border-color 0.15s ease;
}
.acc:hover { border-color: var(--border-strong); }
.acc--pending { border-style: dashed; }
.acc--pending .acc-head { cursor: default; }
.acc-head { display: flex; align-items: center; gap: 12px; padding: 13px 14px; min-width: 0; cursor: pointer; }
.acc-avatar {
  width: 34px; height: 34px; flex: none;
  display: grid; place-items: center;
  border-radius: 8px;
  background: var(--accent); color: var(--accent-fg);
  font-size: 11px; font-weight: 700;
}
.acc-avatar { display: none; }
.acc-id { min-width: 0; flex: 1; display: grid; gap: 3px; }
.acc-email {
  font-size: 13px;
  font-weight: 600;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.acc-meta { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; color: var(--muted); font-size: 11px; }
.acc-meta .sep { width: 1px; height: 9px; background: var(--border-strong); }
.acc-head .badge { flex: none; }
.acc-body { display: none; padding: 0 14px 14px; gap: 10px; border-top: 1px dashed var(--border); padding-top: 12px; }
.acc.is-open .acc-body { display: grid; }
.tokens { display: grid; gap: 6px; }
.token-row {
  display: grid;
  grid-template-columns: 96px minmax(0, 1fr) 28px 28px;
  gap: 6px;
  align-items: center;
  padding: 7px 9px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}
.token-label { color: var(--muted); font-size: 11px; }
.token-value {
  font-size: 11.5px;
  color: var(--fg-soft);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  letter-spacing: 0.01em;
}
.token-value.is-revealed { white-space: normal; word-break: break-all; }
.acc-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.acc-warn {
  display: flex;
  gap: 8px;
  align-items: flex-start;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--warn-bg);
  color: var(--warn);
  font-size: 11.5px;
  line-height: 1.6;
}
.acc-warn svg { width: 13px; height: 13px; flex: none; margin-top: 2px; }
.acc-note {
  display: flex; gap: 8px; align-items: center;
  color: var(--muted); font-size: 11.5px;
}
.acc-note .dot { background: var(--ok); }
.acc-note svg { width: 13px; height: 13px; flex: none; }

/* ---------------------------------------------------------------- order */
.cards-list { display: grid; gap: 8px; }
.card-row {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr) 28px;
  grid-template-areas:
    "idx num del"
    "idx exp exp";
  gap: 6px;
  align-items: center;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  background: var(--bg-soft);
}
.card-row-idx {
  grid-area: idx;
  color: var(--muted);
  font-size: 11px;
  text-align: center;
  font-variant-numeric: tabular-nums;
}
.card-row .num { grid-area: num; }
.card-row .exp { grid-area: exp; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
.card-row .del { grid-area: del; }
.card-row .input { height: 40px; background: var(--card); font-size: 16px; min-width: 0; }
.card-row .exp .input { text-align: center; padding: 0 6px; }

.cards-toolbar { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.count {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 5px;
  background: var(--secondary);
  border: 1px solid var(--border);
  color: var(--muted);
  font-size: 11px;
  font-variant-numeric: tabular-nums;
}
.order-foot {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: nowrap;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  box-shadow: var(--shadow-lg);
  position: sticky;
  bottom: calc(var(--tabbar-h) + 6px);
  z-index: 15;
}
.order-foot .summary-text {
  min-width: 0;
  flex: 1 1 auto;
  overflow: hidden;
  overflow-wrap: anywhere;
  white-space: normal;
  font-size: 12px;
  line-height: 1.45;
}
.order-foot .btn { flex: none; }
.order-foot .summary-text b { color: var(--fg); font-weight: 600; }
.order-foot .spacer { margin-left: auto; }

/* ---------------------------------------------------------------- status */
.summary { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.stat {
  position: relative;
  padding: 13px 14px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
/* status reads from the numeral's colour, not from a coloured edge */
.stat-value {
  font-size: clamp(21px, 5.2vw, 28px);
  font-weight: 600;
  letter-spacing: -0.03em;
  line-height: 1.1;
  font-variant-numeric: tabular-nums;
}
.stat--ok .stat-value { color: var(--ok); }
.stat--err .stat-value { color: var(--err); }
.stat--total .stat-value { color: var(--fg); }
.stat--balance .stat-value { color: var(--primary); font-size: clamp(18px, 4.6vw, 24px); }
.stat-label {
  margin-top: 4px;
  color: var(--muted);
  font-size: 11px;
  letter-spacing: 0.02em;
}
.status-list { display: grid; gap: 10px; }
.kv {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 12px;
  padding: 7px 0;
  border-bottom: 1px dashed var(--border);
  font-size: 11.5px;
  color: var(--muted);
}
.kv b { color: var(--fg); font-weight: 600; }
.table-wrap { overflow-x: auto; }
.fee-table { width: 100%; border-collapse: collapse; font-size: 10.5px; }
.fee-table th, .fee-table td {
  padding: 6px 4px;
  text-align: left;
  border-bottom: 1px solid var(--border);
  white-space: nowrap;
}
.fee-table th { color: var(--muted); font-weight: 500; }
.fee-table tr:last-child td { border-bottom: 0; }
.batch-list { display: grid; gap: 9px; }
.batch-card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
  overflow: hidden;
}
.batch-head {
  display: flex;
  align-items: center;
  gap: 10px;
  width: 100%;
  padding: 12px 14px;
  border: 0;
  background: transparent;
  text-align: left;
}
.batch-title { font-size: 12.5px; font-weight: 600; }
.batch-meta { margin-left: auto; color: var(--muted); font-size: 10.5px; }
.batch-chevron { display: grid; place-items: center; color: var(--muted); transition: transform 0.15s ease; }
.batch-chevron svg { width: 14px; height: 14px; }
.batch-card.is-open .batch-chevron { transform: rotate(90deg); }
.batch-body { display: none; padding: 0 12px 12px; }
.batch-body.is-open { display: block; }
.status-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 14px;
  align-items: center;
  padding: 14px 15px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--card);
}
.status-item:hover { border-color: var(--border-strong); }
.status-item--success { border-left: 3px solid var(--ok); }
.status-item--failed { border-left: 3px solid var(--err); }
.status-item--3ds { border-left: 3px solid var(--warn); }
.status-item--unknown { border-left: 3px solid var(--border-strong); }
.status-main { min-width: 0; display: grid; gap: 5px; }
.status-card { display: flex; align-items: center; gap: 6px; font-size: 13px; letter-spacing: 0.06em; color: var(--fg); }
.brand-logo { display: inline-flex; align-items: center; flex: none; }
.brand-logo svg { width: 30px; height: 19px; display: block; }
.acc-verify-btn { flex: none; }
.acc-verify-btn svg { width: 14px; height: 14px; }
.acc-job {
  display: grid;
  gap: 7px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--secondary);
}
.acc-job-head { display: flex; align-items: center; gap: 7px; min-width: 0; }
.acc-job-step {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  color: var(--fg-soft);
  font-size: 11px;
}
.acc-job-log {
  color: var(--muted);
  font-size: 10.5px;
  overflow-wrap: anywhere;
}
.status-vendor { font-size: 11.5px; color: var(--fg-soft); overflow-wrap: anywhere; }
.status-vendor b { color: var(--fg); font-weight: 600; letter-spacing: 0.06em; }
.status-vendor .vendor-dash { color: var(--muted); }
.status-amount {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: -0.01em;
  font-variant-numeric: tabular-nums;
}
.status-detail {
  font-size: 11px;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.status-detail .ok-id, .status-detail.ok-id { color: var(--ok); }
.status-detail .err-msg, .status-detail.err-msg { color: var(--err); }
.status-right {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 7px;
  flex: none;
}
.status-time { color: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }

.email-tabs { display: flex; gap: 6px; overflow-x: auto; padding-bottom: 2px; scrollbar-width: none; }
.email-tabs::-webkit-scrollbar { display: none; }
.email-tab {
  flex: none;
  max-width: 78vw;
  padding: 6px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  background: var(--card);
  color: var(--muted);
  font-size: 11.5px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  transition: background-color 0.15s ease, color 0.15s ease, border-color 0.15s ease;
}
.email-tab:hover { border-color: var(--border-strong); color: var(--fg-soft); }
.email-tab.is-active { background: var(--accent); border-color: color-mix(in srgb, var(--primary) 26%, var(--border)); color: var(--accent-fg); font-weight: 600; }

/* ---------------------------------------------------------------- empty / skeleton */
.empty {
  display: grid;
  justify-items: center;
  gap: 8px;
  padding: 36px 18px;
  text-align: center;
}
.empty-icon {
  width: 44px; height: 44px;
  display: grid; place-items: center;
  border-radius: 12px;
  background: var(--secondary);
  color: var(--muted);
  margin-bottom: 2px;
}
.empty-icon svg { width: 19px; height: 19px; }
.empty-title { font-size: 13px; font-weight: 600; }
.empty-text { color: var(--muted); font-size: 12px; max-width: 46ch; line-height: 1.7; }
.empty .btn { margin-top: 6px; }

.skeleton {
  position: relative;
  overflow: hidden;
  border-radius: 8px;
  background: var(--secondary);
}
.skeleton::after {
  content: "";
  position: absolute;
  inset: 0;
  transform: translateX(-100%);
  background: linear-gradient(90deg, transparent, color-mix(in srgb, var(--card) 55%, transparent), transparent);
  animation: shimmer 1.3s infinite;
}
@keyframes shimmer { to { transform: translateX(100%); } }
.skeleton-row { height: 58px; }

/* ---------------------------------------------------------------- toast / modal */
.auth-refresh-notice {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 66px);
  transform: translateX(-50%);
  z-index: 75;
  width: min(430px, calc(100vw - 28px));
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid color-mix(in srgb, var(--warn) 35%, var(--border));
  border-radius: 10px;
  background: color-mix(in srgb, var(--warn) 12%, var(--card));
  color: var(--fg-soft);
  box-shadow: 0 8px 24px rgba(0, 0, 0, 0.25);
  font-size: 11.5px;
  line-height: 1.45;
}
.auth-refresh-notice .spinner { flex: none; margin-top: 1px; }
body[data-active-route="order"] .auth-refresh-notice {
  bottom: calc(var(--tabbar-h) + 138px);
}
@media (max-width: 720px) {
  .auth-refresh-notice { bottom: calc(var(--tabbar-h) + 56px); }
}
.toast-root {
  position: fixed;
  left: 50%;
  bottom: calc(var(--tabbar-h) + 6px);
  transform: translateX(-50%);
  z-index: 70;
  display: grid;
  gap: 8px;
  width: min(420px, calc(100vw - 32px));
  pointer-events: none;
}
body[data-active-route="order"] .toast-root { bottom: calc(var(--tabbar-h) + 92px); }
.toast {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 11px 13px;
  border-radius: var(--radius);
  border: 1px solid var(--border);
  background: var(--card);
  color: var(--fg);
  box-shadow: var(--shadow-lg);
  font-size: 12.5px;
  line-height: 1.55;
  animation: toast-in 0.2s ease both;
}
.toast svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }
.toast--ok svg { color: var(--ok); }
.toast--err svg { color: var(--err); }
.toast--warn svg { color: var(--warn); }
.toast--info svg { color: var(--info); }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: center;
  padding: 18px;
  background: rgba(6, 16, 15, 0.52);
  animation: fade 0.15s ease both;
}
@keyframes fade { from { opacity: 0; } }
.modal-card {
  width: 100%;
  max-width: 520px;
  max-height: min(86dvh, 640px);
  display: flex;
  flex-direction: column;
  background: var(--card);
  border: 1px solid var(--border);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  overflow: hidden;
  animation: rise 0.18s ease both;
}
.modal-head {
  display: flex;
  align-items: center;
  gap: 9px;
  padding: 14px 16px;
  border-bottom: 1px solid var(--border);
}
.modal-head > svg { width: 18px; height: 18px; flex: none; color: var(--primary); }
.modal-head h3 { font-size: 13.5px; font-weight: 600; }
.modal-body { padding: 16px; display: grid; gap: 10px; overflow: auto; }
.modal-body textarea.input { font-size: 12px; line-height: 1.6; }
.modal-foot {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  row-gap: 8px;
  padding: 12px 16px;
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}
.modal-foot .spacer { margin-left: auto; }

/* ---------------------------------------------------------------- tabbar */
.tabbar {
  position: fixed;
  left: 0;
  right: 0;
  bottom: 0;
  z-index: 40;
  display: grid;
  grid-auto-flow: column;
  grid-auto-columns: minmax(0, 1fr);
  height: var(--tabbar-h);
  padding: 6px 8px calc(6px + env(safe-area-inset-bottom));
  border-top: 1px solid var(--border);
  background: var(--bg-soft);
}
.tab {
  position: relative;
  display: grid;
  align-content: center;
  justify-items: center;
  gap: 4px;
  padding: 6px 4px 5px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--muted);
  font-size: 10.5px;
  font-weight: 500;
  line-height: 1.2;
  text-align: center;
  min-width: 0;
  letter-spacing: 0.01em;
  transition: color 0.15s ease;
}
.tab svg { width: 19px; height: 19px; }
.tab.is-active { color: var(--primary); font-weight: 600; }
.tab.is-active::before {
  content: "";
  position: absolute;
  top: 0;
  width: 18px;
  height: 2px;
  border-radius: 2px;
  background: var(--primary);
}
.tab:active { background: var(--secondary); }

/* ---------------------------------------------------------------- responsive */
@media (min-width: 720px) {
  .grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .view { padding: 26px 24px calc(var(--tabbar-h) + 20px); }
  .card-body { padding: 18px; }
  .card-row {
    grid-template-columns: 30px minmax(0, 1fr) 72px 72px 84px 32px;
    grid-template-areas: "idx num exp1 exp2 exp3 del";
  }
  .card-row .exp { display: contents; }
  .card-row .exp .input:nth-child(1) { grid-area: exp1; }
  .card-row .exp .input:nth-child(2) { grid-area: exp2; }
  .card-row .exp .input:nth-child(3) { grid-area: exp3; }
  .card-row .input { height: 40px; font-size: 12px; }
  .acc-head { padding: 14px 16px; }
  .acc-body { padding: 0 16px 16px; padding-top: 13px; }
  .token-row { grid-template-columns: 110px minmax(0, 1fr) 28px 28px; }
}

@media (min-width: 960px) {
  .shell { grid-template-columns: var(--nav-w) minmax(0, 1fr); }
  .sidebar { display: flex; }
  .tabbar { display: none; }
  .segmented { max-width: 440px; }
  .topbar { min-height: 60px; padding: 10px 28px; }
  .topbar-brand .brand-mark { display: none; }
  .topbar-sub { font-size: 11.5px; }
  .view { padding: 32px 32px 56px; }
  .toast-root { bottom: 30px; }
  body[data-active-route="order"] .toast-root { bottom: 96px; }
  .order-foot { bottom: calc(6px + env(safe-area-inset-bottom)); }
  .status-item { padding: 12px 15px; }
}

@media (min-width: 1240px) {
  .grid-2 { gap: 18px; }
}

@media (max-width: 560px) {
  .acc-meta .sep { display: none; }
  .acc-head .badge-text { display: none; }
  .acc-head .badge { padding: 3px 5px; }
  .acc-email { font-size: 12px; white-space: normal; overflow-wrap: anywhere; line-height: 1.4; }
  /* header: the name takes its own full row, verify / status / chevron sit below it */
  .acc-head { flex-wrap: wrap; row-gap: 10px; }
  .acc-id { flex: 1 1 100%; }
  .acc-head > .icon-btn { margin-left: auto; }
  .sum-email { display: none; }
  /* account actions: equal columns, an odd last button spans the full row */
  .acc-actions { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
  .acc-actions .btn { min-width: 0; padding: 0 8px; gap: 6px; }
  .acc-actions .btn:last-child:nth-child(odd) { grid-column: 1 / -1; }
  .summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .stat--balance .stat-value { font-size: 19px; }
}

@media (max-width: 380px) {
  .page-title { font-size: 19px; }
  .stat { padding: 11px; }
  .stat-value { font-size: 20px; }
  .status-time { display: none; }
  .user-chip span { max-width: 90px; }
  .seg { font-size: 11.5px; padding: 0 4px; }
  .topbar-sub { display: none; }
  .pill { font-size: 9.5px; padding: 0 7px; }
  .acc-actions .btn { font-size: 11px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}
