/* merchant.dasurv.app: the Dasurv design system (the "Dasurv" Design System artifact: tokens.json + the kit in
   components/bundle.css) for the web. Grey page, white cards without borders, black pill actions, red only as a
   small accent, one colour per order status. Light and dark use the same token names.
   Phones: the app's bottom tabs. 900 px and wider: a left navigation rail (Claude's number). */

/* ── Tokens ─────────────────────────────────────────────────────────────────────────────────────────── */
:root {
  --bg: #ffffff;
  --page: #f4f4f5;
  --card: #ffffff;
  --sunken: #f4f4f5;
  --track: #e4e4e7;
  --ink: #111111;
  --ink-soft: #52525b;
  --ink-faint: #a1a1aa;
  --rule: #e4e4e7;
  --on-ink: #ffffff;
  --accent: #ff1500;
  --accent-soft: #fff1ee;
  --alarm: #dc2626;
  --alarm-soft: #fef2f2;
  --danger-fill: #dc2626;
  --on-danger: #ffffff;
  --ok: #15803d;
  --ok-soft: #f0fdf4;
  --warn: #b45309;
  --warn-soft: #fffbeb;
  --info: #1d4ed8;
  --info-soft: #eff6ff;
  --points: #f5b301;
  --on-dark: #ffffff;
  --scrim: rgba(0, 0, 0, 0.45);

  --font: 'Lexend', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --space-xs: 4px; --space-sm: 8px; --space-md: 12px; --space-lg: 16px; --space-xl: 24px; --space-2xl: 32px;
  --radius-chip: 8px; --radius-inner: 12px; --radius-card: 16px; --radius-sheet: 20px; --radius-pill: 999px;
  --tap: 48px;
  --dur-fast: 160ms; --dur-base: 220ms; --dur-slide: 280ms; --dur-exit: 200ms;
  --ease-out: cubic-bezier(0.2, 0.8, 0.2, 1);
  --ease-in: cubic-bezier(0.4, 0, 1, 1);
  --rail: 256px;
  --tabs-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0c0c0d; --page: #0c0c0d; --card: #161618; --sunken: #1c1c1f; --track: #2a2a2f; --ink: #f4f4f5;
    --ink-soft: #a1a1aa; --ink-faint: #71717a; --rule: #27272a; --on-ink: #111111; --accent-soft: #2b120d;
    --alarm: #f87171; --alarm-soft: #2a1414; --ok: #4ade80; --ok-soft: #10261a; --warn: #fbbf24; --warn-soft: #2b2009;
    --info: #60a5fa; --info-soft: #0f1d33; --scrim: rgba(0, 0, 0, 0.6); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0c0c0d; --page: #0c0c0d; --card: #161618; --sunken: #1c1c1f; --track: #2a2a2f; --ink: #f4f4f5;
  --ink-soft: #a1a1aa; --ink-faint: #71717a; --rule: #27272a; --on-ink: #111111; --accent-soft: #2b120d;
  --alarm: #f87171; --alarm-soft: #2a1414; --ok: #4ade80; --ok-soft: #10261a; --warn: #fbbf24; --warn-soft: #2b2009;
  --info: #60a5fa; --info-soft: #0f1d33; --scrim: rgba(0, 0, 0, 0.6); color-scheme: dark;
}

/* ── Base ───────────────────────────────────────────────────────────────────────────────────────────── */
* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; padding: 0; }
body {
  min-height: 100vh; min-height: 100dvh; background: var(--page); color: var(--ink);
  font-family: var(--font); font-size: 15px; line-height: 21px; -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { -webkit-tap-highlight-color: transparent; }
img { display: block; max-width: 100%; }
a { color: inherit; }
:focus-visible { outline: 2px solid var(--ink); outline-offset: 2px; border-radius: 6px; }
.num, .value, .price { font-variant-numeric: tabular-nums; }
.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; }

h1, .large-title { font-size: 26px; line-height: 32px; font-weight: 700; margin: 0; letter-spacing: -0.3px; }
h2, .title { font-size: 20px; line-height: 26px; font-weight: 600; margin: 0; }
.heading { font-size: 16px; line-height: 22px; font-weight: 600; margin: 0; }
.meta { font-size: 13px; line-height: 18px; color: var(--ink-soft); margin: 0; }
.micro { font-size: 11px; line-height: 14px; font-weight: 600; letter-spacing: 0.04em; text-transform: uppercase; }
.t-soft { color: var(--ink-soft); } .t-faint { color: var(--ink-faint); } .t-alarm { color: var(--alarm); } .t-ok { color: var(--ok); }
p { margin: 0; }

.ico { width: 22px; height: 22px; fill: currentColor; flex: none; }
.ico.sm { width: 18px; height: 18px; }
.ico.lg { width: 28px; height: 28px; }
.chev { color: var(--ink-faint); }

/* ── Buttons ────────────────────────────────────────────────────────────────────────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-sm);
  min-height: var(--tap); padding: 0 22px; border-radius: var(--radius-pill); border: 1px solid transparent;
  font: 600 15px/21px var(--font); background: var(--ink); color: var(--on-ink); cursor: pointer; white-space: nowrap;
  transition: opacity var(--dur-fast) var(--ease-out), transform var(--dur-fast) var(--ease-out), background var(--dur-fast) var(--ease-out);
}
.btn:hover { opacity: 0.88; }
.btn:active { opacity: 0.7; }
.btn.block { display: flex; width: 100%; }
.btn.secondary { background: var(--card); color: var(--ink); border-color: var(--rule); }
.btn.ghost { background: transparent; color: var(--ink); padding: 0 12px; }
.btn.danger { background: var(--danger-fill); color: var(--on-danger); }
.btn.danger-text { background: transparent; color: var(--alarm); border-color: var(--rule); }
.btn.small { min-height: 36px; padding: 0 14px; font-size: 13px; }
.btn[disabled] { background: var(--track); color: var(--ink-faint); border-color: transparent; cursor: default; opacity: 1; }
.btn .btn-text:empty { display: none; }
.spin { width: 16px; height: 16px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent;
  display: inline-block; animation: spin 0.8s linear infinite; flex: none; }
.spin.big { width: 28px; height: 28px; border-width: 3px; color: var(--ink-soft); }
@keyframes spin { to { transform: rotate(360deg); } }
.link { display: inline-flex; align-items: center; min-height: 40px; padding: 0 4px; border: none; background: none;
  font: 500 14px/18px var(--font); color: var(--ink); text-decoration: underline; text-underline-offset: 3px; cursor: pointer; }
.link.danger { color: var(--alarm); }
.icon-btn { display: inline-flex; align-items: center; justify-content: center; width: 44px; height: 44px; border: none;
  border-radius: var(--radius-pill); background: transparent; color: var(--ink); cursor: pointer; flex: none; }
.icon-btn:hover { background: var(--sunken); }
.icon-btn.round { width: 36px; height: 36px; background: var(--sunken); }

/* ── Card, Section, Row ─────────────────────────────────────────────────────────────────────────────── */
.card { background: var(--card); border-radius: var(--radius-card); padding: var(--space-lg); }
.section { margin-top: var(--space-xl); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: 0 4px var(--space-sm); }
.section-label { font: 700 16px/22px var(--font); color: var(--ink); margin: 0; }
.rows { background: var(--card); border-radius: var(--radius-card); overflow: hidden; }
.sheet .card, .sheet .rows { border: 1px solid var(--rule); }
.row { display: flex; align-items: center; gap: var(--space-md); min-height: 56px; padding: 10px var(--space-lg); width: 100%; text-align: left; }
.row + .row { border-top: 1px solid var(--rule); }
.row-btn { border: none; background: none; cursor: pointer; font: inherit; color: inherit; }
.row-btn:hover { background: var(--sunken); }
.row .main { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.row .label { font: 400 15px/21px var(--font); }
.row .sub { font: 400 13px/18px var(--font); color: var(--ink-soft); }
.row .value { font: 600 15px/21px var(--font); }
.row .value-text { font: 400 14px/20px var(--font); color: var(--ink-soft); text-align: right; max-width: 60%; overflow-wrap: anywhere; }
.row-icon { width: 36px; height: 36px; border-radius: 50%; background: var(--sunken); display: inline-flex; align-items: center; justify-content: center; flex: none; }
.row-icon .ico { width: 20px; height: 20px; }
.row-icon.danger { background: var(--alarm-soft); color: var(--alarm); }
.info-row { display: flex; gap: var(--space-md); align-items: flex-start; padding: 12px 0; }
.info-row + .info-row { border-top: 1px solid var(--rule); }
.info-row .ico { color: var(--ink-faint); width: 20px; height: 20px; margin-top: 1px; }
.info-row .k { font-size: 13px; color: var(--ink-soft); width: 96px; flex: none; }
.info-row .v { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); margin-bottom: var(--space-md); }
.card-head .heading { display: flex; align-items: center; gap: var(--space-sm); }
.stack > * + * { margin-top: var(--space-md); }

/* ── Badge, chips, counts ───────────────────────────────────────────────────────────────────────────── */
.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--radius-pill);
  font: 600 11px/14px var(--font); letter-spacing: 0.02em; background: var(--sunken); color: var(--ink-soft); white-space: nowrap; }
.badge .ico { width: 14px; height: 14px; }
.badge.ink { background: var(--ink); color: var(--on-ink); }
.badge.ok { background: var(--ok-soft); color: var(--ok); }
.badge.warn { background: var(--warn-soft); color: var(--warn); }
.badge.alarm { background: var(--alarm-soft); color: var(--alarm); }
.badge.info { background: var(--info-soft); color: var(--info); }
.badge.promo { background: var(--accent-soft); color: var(--ink); }
.badges { display: flex; flex-wrap: wrap; gap: 6px; margin-top: var(--space-sm); }
.chips { display: flex; flex-wrap: wrap; gap: var(--space-sm); }
.chip { display: inline-flex; align-items: center; gap: 6px; height: 36px; padding: 0 14px; border-radius: var(--radius-pill);
  border: 1px solid var(--rule); background: var(--card); font: 500 13px/18px var(--font); color: var(--ink); cursor: pointer; }
.chip.on { background: var(--ink); border-color: var(--ink); color: var(--on-ink); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--accent); display: inline-block; }
.count { min-width: 18px; height: 18px; padding: 0 5px; border-radius: var(--radius-pill); background: var(--accent);
  color: var(--on-dark); font: 700 11px/18px var(--font); text-align: center; }

/* ── Fields ─────────────────────────────────────────────────────────────────────────────────────────── */
.field { display: flex; flex-direction: column; gap: 6px; }
.field + .field { margin-top: var(--space-md); }
.flabel { font: 500 13px/18px var(--font); color: var(--ink-soft); }
.input { min-height: var(--tap); width: 100%; padding: 0 14px; border-radius: var(--radius-inner); border: 1px solid transparent;
  background: var(--sunken); color: var(--ink); font: 400 15px/21px var(--font);
  transition: border-color var(--dur-fast) var(--ease-out), box-shadow var(--dur-fast) var(--ease-out); }
textarea.input { padding: 12px 14px; min-height: 96px; resize: vertical; }
.input::placeholder { color: var(--ink-faint); }
.input:focus { outline: none; border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.input.error { border-color: var(--alarm); box-shadow: 0 0 0 1px var(--alarm); }
.input:disabled { opacity: 0.6; }
.page-field .input { background: var(--card); }
.help { font: 400 13px/18px var(--font); color: var(--ink-soft); min-height: 0; }
.help:empty { display: none; }
.help.err { color: var(--alarm); }
.help.ok { color: var(--ok); }
.input-prefix { display: flex; align-items: center; border-radius: var(--radius-inner); background: var(--sunken); }
.input-prefix .prefix { padding-left: 14px; color: var(--ink-soft); }
.input-prefix .input { background: transparent; }
.check { display: flex; align-items: center; gap: 10px; min-height: 44px; font-size: 15px; cursor: pointer; }
.check input { width: 20px; height: 20px; accent-color: var(--ink); flex: none; }
.seg { display: inline-flex; padding: 3px; border-radius: var(--radius-pill); background: var(--sunken); gap: 2px; flex-wrap: wrap; }
.seg button { min-height: 38px; padding: 0 18px; border: 1px solid transparent; border-radius: var(--radius-pill); background: transparent;
  font: 500 13px/18px var(--font); color: var(--ink-soft); cursor: pointer; transition: background var(--dur-fast) var(--ease-out); }
.seg button.on { background: var(--card); color: var(--ink); border-color: var(--rule); font-weight: 600; }

/* Phone number field with the flag button */
.phone-row { display: flex; align-items: stretch; gap: 0; border-radius: var(--radius-inner); background: var(--sunken);
  border: 1px solid transparent; transition: border-color var(--dur-fast) var(--ease-out); }
.phone-row:focus-within { border-color: var(--ink); box-shadow: 0 0 0 1px var(--ink); }
.phone-row .flag-btn { display: inline-flex; align-items: center; gap: 6px; padding: 0 12px 0 14px; border: none; background: none;
  cursor: pointer; border-right: 1px solid var(--rule); min-height: var(--tap); font-weight: 500; }
.phone-row .flag { font-size: 20px; line-height: 1; }
.phone-row .input { background: transparent; border: none; box-shadow: none; }
.country-list { display: flex; flex-direction: column; max-height: 60vh; overflow: auto; }
.country-list .row .flag { font-size: 22px; }

/* PIN and code boxes: one real input drawn as boxes */
.code-input { letter-spacing: 0.6em; text-align: center; font: 600 24px/32px var(--font); min-height: 56px; padding-left: 0.6em; }
.code-input.pin { -webkit-text-security: disc; }

/* ── Banners, empty, skeleton ───────────────────────────────────────────────────────────────────────── */
.banner { display: flex; align-items: center; gap: var(--space-md); border-radius: var(--radius-card); padding: 12px var(--space-lg);
  font: 400 13px/18px var(--font); color: var(--ink); }
.banner .ico { width: 20px; height: 20px; }
.banner.alarm { background: var(--alarm-soft); } .banner.alarm .ico, .banner.alarm .lead { color: var(--alarm); }
.banner.warn { background: var(--warn-soft); } .banner.warn .ico, .banner.warn .lead { color: var(--warn); }
.banner.info { background: var(--info-soft); } .banner.info .ico, .banner.info .lead { color: var(--info); }
.banner.ok { background: var(--ok-soft); } .banner.ok .ico, .banner.ok .lead { color: var(--ok); }
.banner .grow { flex: 1; }
.banner .lead { font-weight: 600; }
.banner .link { min-height: 32px; }
.empty { text-align: center; padding: var(--space-2xl) var(--space-lg); display: flex; flex-direction: column; align-items: center; gap: var(--space-sm); }
.empty .ring { width: 56px; height: 56px; border-radius: 50%; background: var(--sunken); display: flex; align-items: center;
  justify-content: center; color: var(--ink-soft); margin-bottom: var(--space-sm); }
.empty .meta { max-width: 360px; }
.empty .btn { margin-top: var(--space-sm); }
.sk { background: var(--sunken); border-radius: var(--radius-chip); display: block; animation: shimmer 1.6s ease-in-out infinite; }
.sk-dot { width: 40px; height: 40px; border-radius: 50%; flex: none; }
.sk-line { height: 12px; width: 70%; margin: 4px 0; }
.sk-line.short { width: 40%; }
.sk-block { height: 120px; border-radius: var(--radius-card); }
@keyframes shimmer { 0%, 100% { opacity: 1; } 50% { opacity: 0.55; } }

/* ── Sheet (bottom on phones, right panel on desktops), dialog, toast ───────────────────────────────── */
.scrim { position: fixed; inset: 0; background: var(--scrim); opacity: 0; transition: opacity var(--dur-exit) var(--ease-in); }
.sheet-layer { position: fixed; inset: 0; z-index: 40; }
.sheet { position: fixed; left: 0; right: 0; bottom: 0; max-height: 92vh; display: flex; flex-direction: column;
  background: var(--card); border-radius: var(--radius-sheet) var(--radius-sheet) 0 0; padding: 10px 0 0;
  transform: translateY(100%); transition: transform var(--dur-exit) var(--ease-in); outline: none; }
.sheet-layer.open .scrim { opacity: 1; transition: opacity var(--dur-slide) var(--ease-out); }
.sheet-layer.open .sheet { transform: none; transition: transform var(--dur-slide) var(--ease-out); }
.grab { width: 40px; height: 4px; border-radius: 999px; background: var(--track); margin: 0 auto 10px; flex: none; }
.sheet-head { display: flex; align-items: flex-start; justify-content: space-between; gap: var(--space-md); padding: 0 var(--space-lg) var(--space-md); }
.sheet-head .main { min-width: 0; }
.sheet-head .meta { margin-top: 2px; }
.sheet-body { flex: 1; overflow: auto; padding: 0 var(--space-lg) var(--space-lg); }
.sheet-foot { display: flex; flex-direction: column; gap: var(--space-sm); padding: var(--space-md) var(--space-lg) calc(var(--space-lg) + var(--safe-b));
  border-top: 1px solid var(--rule); }
@media (min-width: 900px) {
  .sheet { left: auto; top: 0; bottom: 0; width: 440px; max-height: none; border-radius: var(--radius-sheet) 0 0 var(--radius-sheet);
    transform: translateX(100%); padding-top: var(--space-lg); }
  .grab { display: none; }
}
#dialog-host { position: fixed; inset: 0; z-index: 60; pointer-events: none; }
#dialog-host:not(:empty) { pointer-events: auto; }
.dialog { position: fixed; left: 50%; top: 50%; width: min(400px, calc(100vw - 48px)); background: var(--card);
  border-radius: var(--radius-sheet); padding: var(--space-xl) var(--space-lg) var(--space-lg); text-align: center;
  transform: translate(-50%, -50%) scale(0.96); opacity: 0; transition: opacity var(--dur-exit) var(--ease-in), transform var(--dur-exit) var(--ease-in); }
#dialog-host.open .scrim { opacity: 1; transition: opacity var(--dur-base) var(--ease-out); }
#dialog-host.open .dialog { opacity: 1; transform: translate(-50%, -50%) scale(1); transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.dialog .dialog-text { margin-top: var(--space-sm); font-size: 14px; line-height: 20px; }
.dialog .actions { display: flex; gap: var(--space-sm); margin-top: var(--space-lg); }
.dialog .actions .btn { flex: 1; padding: 0 12px; }
.dialog .actions.stacked { flex-direction: column-reverse; }
#toast-host { position: fixed; left: 50%; bottom: calc(var(--tabs-h) + 16px + var(--safe-b)); z-index: 70; transform: translate(-50%, 16px);
  opacity: 0; pointer-events: none; transition: opacity var(--dur-exit) var(--ease-in), transform var(--dur-exit) var(--ease-in); }
#toast-host.show { opacity: 1; transform: translate(-50%, 0); transition: opacity var(--dur-base) var(--ease-out), transform var(--dur-base) var(--ease-out); }
.toast { display: inline-flex; align-items: center; gap: 10px; background: var(--ink); color: var(--on-ink); border-radius: var(--radius-pill);
  padding: 12px 18px; font: 500 13px/18px var(--font); white-space: nowrap; }
.toast .ico { width: 18px; height: 18px; }
@media (min-width: 900px) { #toast-host { bottom: 24px; left: calc(50% + var(--rail) / 2); } }

/* ── App shell ──────────────────────────────────────────────────────────────────────────────────────── */
.boot { min-height: 100vh; display: flex; align-items: center; justify-content: center; flex-direction: column; gap: var(--space-lg); }
.logo { font: 700 22px/28px var(--font); letter-spacing: -0.4px; display: inline-flex; align-items: baseline; }
.logo i { display: inline-block; width: 7px; height: 7px; margin-left: 2px; border-radius: 50%; background: var(--accent); }
.logo small { font: 500 13px/18px var(--font); color: var(--ink-soft); margin-left: 8px; letter-spacing: 0; }

.topbar { position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: var(--space-sm); min-height: 64px;
  padding: 8px var(--space-sm) 8px var(--space-lg); background: var(--bg); border-bottom: 1px solid var(--rule); }
.branch-btn { flex: 1; min-width: 0; display: flex; align-items: center; gap: var(--space-md); border: none; background: none; padding: 4px 0;
  cursor: pointer; text-align: left; border-radius: var(--radius-inner); }
.branch-btn .main { min-width: 0; display: flex; flex-direction: column; }
.branch-btn .name { font: 600 16px/22px var(--font); display: flex; align-items: center; gap: 4px; min-width: 0; }
.branch-btn .name-text { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.branch-btn .badge-ico { flex: none; }
.branch-btn .addr { font: 400 13px/18px var(--font); color: var(--ink-soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.branch-btn .badge-ico { color: var(--accent); width: 18px; height: 18px; }
.store-logo { width: 40px; height: 40px; border-radius: 50%; overflow: hidden; background: var(--sunken); display: inline-flex;
  align-items: center; justify-content: center; color: var(--ink-soft); flex: none; }
.store-logo img { width: 100%; height: 100%; object-fit: cover; }
.store-logo.lg { width: 56px; height: 56px; border-radius: var(--radius-inner); }
.avatar { width: 56px; height: 56px; border-radius: 50%; overflow: hidden; background: var(--ink); color: var(--on-ink);
  display: inline-flex; align-items: center; justify-content: center; font: 700 20px/1 var(--font); flex: none; }
.avatar img { width: 100%; height: 100%; object-fit: cover; }
.avatar.sm { width: 36px; height: 36px; font-size: 14px; }

.tabs { position: fixed; left: 0; right: 0; bottom: 0; z-index: 20; display: flex; background: var(--bg); border-top: 1px solid var(--rule);
  height: calc(var(--tabs-h) + var(--safe-b)); padding-bottom: var(--safe-b); }
.tabs a { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; text-decoration: none;
  font: 500 11px/14px var(--font); color: var(--ink-faint); position: relative; min-width: 0; }
.tabs a.on { color: var(--ink); font-weight: 600; }
.tabs a .count { position: absolute; top: 8px; left: 54%; }

main#view { display: block; padding: var(--space-lg) var(--space-lg) calc(var(--tabs-h) + var(--space-2xl) + var(--safe-b)); max-width: 760px; margin: 0 auto; outline: none; }
main#view.wide { max-width: 1200px; }
.page-title { display: flex; align-items: flex-end; justify-content: space-between; gap: var(--space-md); margin: var(--space-sm) 0 var(--space-lg); }
.page-title .meta { margin-top: 4px; }
.screen-header { display: flex; align-items: center; gap: var(--space-sm); margin: 0 0 var(--space-lg) -8px; }
.screen-header h1 { font-size: 20px; line-height: 26px; font-weight: 600; }

.rail { display: none; }
@media (min-width: 900px) {
  .shell { display: grid; grid-template-columns: var(--rail) 1fr; min-height: 100vh; }
  .topbar, .tabs { display: none; }
  .rail { display: flex; flex-direction: column; gap: var(--space-lg); position: sticky; top: 0; height: 100vh; overflow: auto;
    padding: var(--space-xl) var(--space-lg); background: var(--bg); border-right: 1px solid var(--rule); }
  .rail .branch-btn { flex: none; padding: 10px; background: var(--sunken); }
  .rail nav { display: flex; flex-direction: column; gap: 2px; }
  .rail nav .group-label { margin: var(--space-lg) 12px var(--space-sm); color: var(--ink-faint); }
  .rail nav a { display: flex; align-items: center; gap: var(--space-md); min-height: 44px; padding: 0 12px; border-radius: var(--radius-inner);
    text-decoration: none; color: var(--ink-soft); font: 500 15px/21px var(--font); }
  .rail nav a:hover { background: var(--sunken); color: var(--ink); }
  .rail nav a.on { background: var(--ink); color: var(--on-ink); font-weight: 600; }
  .rail .rail-foot { margin-top: auto; }
  main#view { padding: var(--space-2xl) var(--space-xl) var(--space-2xl); }
}

/* ── Login ──────────────────────────────────────────────────────────────────────────────────────────── */
.auth { min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center;
  padding: var(--space-xl) var(--space-lg); gap: var(--space-xl); }
.auth .card { width: 100%; max-width: 420px; padding: var(--space-xl); }
.auth h1 { font-size: 22px; line-height: 28px; }
.auth .lead-text { margin: 6px 0 var(--space-xl); }
.auth .who-card { display: flex; align-items: center; justify-content: space-between; gap: var(--space-md); padding: 12px 14px;
  border-radius: var(--radius-inner); background: var(--sunken); margin-bottom: var(--space-lg); }
.auth .who-card .main { display: flex; flex-direction: column; min-width: 0; }
.auth .foot-links { display: flex; gap: var(--space-lg); justify-content: center; }
.auth .shake { animation: shake 320ms var(--ease-out); }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }
.auth .btn.block { margin-top: var(--space-lg); }
.auth .row-actions { display: flex; justify-content: space-between; align-items: center; margin-top: var(--space-sm); }

/* ── Branches ───────────────────────────────────────────────────────────────────────────────────────── */
.branch-row { align-items: flex-start; }
.branch-row .store-logo { width: 48px; height: 48px; border-radius: var(--radius-inner); }
.branch-row .name { font-weight: 600; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.open-dot { display: inline-flex; align-items: center; gap: 6px; font-size: 13px; color: var(--ink-soft); }
.open-dot::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--ok); }
.open-dot.closed::before { background: var(--ink-faint); }

/* ── Account ────────────────────────────────────────────────────────────────────────────────────────── */
.profile { display: flex; align-items: center; gap: var(--space-lg); }
.profile .main { min-width: 0; flex: 1; }
.profile .name { font: 600 20px/26px var(--font); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.store-head { display: flex; align-items: center; gap: var(--space-md); padding-bottom: var(--space-md); border-bottom: 1px solid var(--rule); }
.store-head .main { min-width: 0; }
.store-head .name { font-weight: 600; display: flex; align-items: center; gap: 6px; }
.store-head .name .ico { color: var(--accent); width: 18px; height: 18px; }
.method { display: flex; align-items: center; gap: var(--space-md); padding-bottom: var(--space-sm); }
.note { font-size: 13px; line-height: 18px; color: var(--ink-soft); margin-top: var(--space-md); }
.note.warn { color: var(--warn); }
.card .btn.secondary { background: var(--sunken); border-color: transparent; }
.social-row { display: flex; align-items: center; gap: var(--space-md); }
.social-row + .social-row { margin-top: var(--space-sm); }
.social-row .ico { color: var(--ink); }
.social-row .input { flex: 1; }
.footer-meta { text-align: center; margin-top: var(--space-xl); display: flex; flex-direction: column; gap: 4px; align-items: center; }
.footer-meta .links { display: flex; gap: var(--space-lg); }

@media (max-width: 480px) {
  body { font-size: 14px; line-height: 20px; }
  h1, .large-title { font-size: 22px; line-height: 28px; }
  .row .label { font-size: 14px; line-height: 20px; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation: none !important; transition: none !important; }
}

/* Small spacing helpers */
.mt { margin-top: var(--space-md); }
.mt-lg { margin-top: var(--space-lg); }
