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

html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font-ui);
  font-size: 15px;
  line-height: 1.55;
  -webkit-tap-highlight-color: transparent;
}
/* The brand glow is its own fixed, GPU-composited layer. A fixed body background
   (background-attachment: fixed) repaints the whole screen on every scroll frame,
   which made scrolling stutter on slower laptops and phones. */
body::before {
  content: '';
  position: fixed;
  inset: 0;
  z-index: -1;
  background: var(--bg-glow);
  transform: translateZ(0);
  pointer-events: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent-2); text-decoration: none; }
h1, h2, h3 { margin: 0; line-height: 1.3; }
.num { font-variant-numeric: tabular-nums; direction: ltr; unicode-bidi: isolate; }
.muted { color: var(--text-muted); }
.hidden { display: none !important; }

.ic { display: inline-flex; width: 1.25em; height: 1.25em; flex: none; }
.ic svg { width: 100%; height: 100%; }
.ic svg[data-stroke] { fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- brand ---------- */
.brand { display: flex; align-items: center; gap: var(--space-3); color: var(--text); }
.brand-mark { width: 54px; flex: none; }
.brand-mark img, .brand-mark svg { width: 100%; display: block; }
.brand-name { font-family: var(--font-brand); font-weight: 800; font-size: 20px; line-height: 1.1; }
.brand-latin { font-family: var(--font-brand); font-size: 10px; letter-spacing: 0.38em; direction: ltr; color: var(--text-soft); }
.brand-latin b { color: var(--accent); }

.brand-mark img { width: 72px; }
.brand-latin-lg { font-family: var(--font-brand); font-weight: 800; font-size: 17px; letter-spacing: 0.04em; color: #4aa0ff; direction: ltr; line-height: 1.1; }
.brand-sub { font-size: 12px; color: var(--text-soft); line-height: 1.3; }
.lockup .logo-full { width: min(340px, 82vw); display: block; }
.lockup { display: flex; flex-direction: column; align-items: center; text-align: center; }
.lockup .mark { width: 170px; }
.lockup .ar {
  font-family: var(--font-brand); font-weight: 800; font-size: 44px; line-height: 1.15; margin-top: 2px;
  background: linear-gradient(180deg, #fff 45%, #b9c9de); -webkit-background-clip: text; background-clip: text; color: transparent;
}
.lockup .en { font-family: var(--font-brand); font-weight: 500; font-size: 14px; letter-spacing: 0.42em; direction: ltr; margin-top: 4px; padding-inline-start: 0.42em; }
.lockup .en b { color: var(--accent); font-weight: 800; }
.lockup .tag { display: flex; align-items: center; gap: 10px; margin-top: 10px; color: var(--text-soft); font-size: 14px; }
.lockup .tag::before, .lockup .tag::after { content: ''; width: 34px; height: 1px; background: var(--accent); opacity: 0.7; }

/* ---------- shell ---------- */
.shell { min-height: 100dvh; }
.sidebar { display: none; }
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; justify-content: space-between; gap: var(--space-3);
  padding: 10px 16px; padding-top: calc(10px + env(safe-area-inset-top));
  background: rgba(5, 11, 24, 0.97);
  border-bottom: 1px solid var(--border);
}
.topbar .brand-mark { width: 60px; }
.topbar .brand-mark img { width: 60px; }
.topbar .brand-latin-lg { font-size: 15px; }
.topbar-user { display: flex; align-items: center; gap: var(--space-2); color: var(--text-soft); font-size: 13px; }

.page { padding: var(--space-4); padding-bottom: calc(var(--tabbar-h) + 24px + env(safe-area-inset-bottom)); max-width: 1320px; margin-inline: auto; }
.page-head { display: flex; align-items: center; justify-content: space-between; gap: var(--space-3); flex-wrap: wrap; margin-bottom: var(--space-4); }
.page-title { font-family: var(--font-brand); font-weight: 600; font-size: 22px; }
.page-sub { color: var(--text-muted); font-size: 13px; margin-top: 2px; }

.tabbar {
  position: fixed; inset-inline: 0; bottom: 0; z-index: 40;
  display: grid; grid-auto-flow: column; grid-auto-columns: 1fr;
  height: calc(var(--tabbar-h) + env(safe-area-inset-bottom)); padding-bottom: env(safe-area-inset-bottom);
  background: rgba(8, 18, 41, 0.98);
  border-top: 1px solid var(--border);
}
.tabbar a, .tabbar button {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px;
  background: none; border: 0; color: var(--text-muted); font-size: 11.5px; font-weight: 500;
}
.tabbar .ic { width: 23px; height: 23px; }
.tabbar .is-active { color: var(--accent-2); }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a {
  display: flex; align-items: center; gap: var(--space-3);
  padding: 11px 14px; border-radius: 12px; color: var(--text-soft); font-weight: 500;
}
.nav a:hover { background: rgba(255, 255, 255, 0.04); color: var(--text); }
.nav a.is-active { background: linear-gradient(90deg, var(--accent-strong), var(--accent)); color: #fff; box-shadow: 0 8px 22px rgba(47, 134, 255, 0.28); }
.nav .ic { width: 20px; height: 20px; }
.nav-sep { height: 1px; background: var(--border); margin: 8px 6px; }

.drawer-backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(2, 6, 14, 0.6); }
.drawer {
  position: fixed; inset-block: 0; inset-inline-start: 0; z-index: 61; width: min(300px, 86vw);
  display: flex; flex-direction: column; gap: var(--space-4); padding: 20px 14px;
  background: var(--mp-navy-900); border-inline-end: 1px solid var(--border); overflow-y: auto;
}

@media (min-width: 1000px) {
  .shell { display: grid; grid-template-columns: var(--sidebar-w) 1fr; }
  .sidebar {
    display: flex; flex-direction: column; gap: var(--space-5);
    position: sticky; top: 0; height: 100dvh; padding: 22px 14px;
    background: linear-gradient(180deg, var(--mp-navy-900), var(--mp-navy-950));
    border-inline-end: 1px solid var(--border);
  }
  .sidebar .brand { padding: 0 6px 10px; }
  .sidebar-foot { margin-top: auto; }
  .topbar, .tabbar { display: none; }
  .page { padding: 28px 32px 40px; }
}

.user-card { display: flex; align-items: center; gap: var(--space-3); padding: 12px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); }
.avatar { width: 38px; height: 38px; border-radius: 50%; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); font-weight: 700; flex: none; }
.user-card .who { flex: 1; min-width: 0; }
.user-card .who b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .who span { font-size: 12px; color: var(--text-muted); }

/* ---------- surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); padding: var(--space-4); }
.card + .card { margin-top: var(--space-4); }
.card-title { font-weight: 600; font-size: 15px; margin-bottom: var(--space-3); display: flex; align-items: center; gap: var(--space-2); }
.section { margin-bottom: var(--space-5); }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: var(--space-2); margin-bottom: var(--space-3); }
.section-title { display: flex; align-items: center; gap: 10px; font-weight: 600; font-size: 16px; }
.step { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--accent-soft); color: var(--accent-2); border: 1px solid rgba(92, 194, 255, 0.35); }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: var(--space-2);
  min-height: 44px; padding: 0 18px; border-radius: 12px;
  border: 1px solid var(--border-strong); background: var(--surface-2); color: var(--text);
  font-weight: 600; white-space: nowrap; transition: transform 0.08s ease, background 0.15s ease, box-shadow 0.15s ease;
}
.btn:hover { background: var(--surface-3); }
.btn:active { transform: scale(0.98); }
.btn:focus-visible, .choice:focus-visible, .seg button:focus-visible, .chip:focus-visible { outline: none; box-shadow: var(--focus); }
.btn[disabled] { opacity: 0.5; cursor: not-allowed; transform: none; }
.btn-primary { border-color: transparent; background: linear-gradient(135deg, var(--accent), var(--accent-strong)); color: var(--on-accent); box-shadow: 0 10px 24px rgba(47, 134, 255, 0.3); }
.btn-primary:hover { background: linear-gradient(135deg, #4a96ff, var(--accent-strong)); }
.btn-primary[disabled] { box-shadow: none; background: var(--surface-3); color: var(--text-muted); }
.btn-ghost { background: transparent; border-color: transparent; color: var(--text-soft); }
.btn-ghost:hover { background: rgba(255, 255, 255, 0.05); }
.btn-danger { background: rgba(255, 107, 122, 0.12); border-color: rgba(255, 107, 122, 0.35); color: var(--danger); }
.btn-lg { min-height: 56px; font-size: 17px; border-radius: 14px; }
.btn-block { width: 100%; }
.btn-icon { width: 44px; padding: 0; }
.btn .ic { width: 20px; height: 20px; }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > label, .label { font-size: 13px; color: var(--text-soft); font-weight: 500; }
.hint { font-size: 12px; color: var(--text-muted); }
.input, select.input, textarea.input {
  width: 100%; min-height: 46px; padding: 10px 14px; border-radius: 12px;
  background: var(--mp-navy-900); border: 1px solid var(--border-strong); color: var(--text); outline: none;
}
.input:focus { border-color: var(--accent-2); box-shadow: var(--focus); }
.input::placeholder { color: #5d7090; }
.input.num-input { text-align: center; font-weight: 600; font-size: 17px; direction: ltr; }
.form-grid { display: grid; gap: var(--space-4); grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); }
.form-actions { display: flex; gap: var(--space-2); justify-content: flex-end; flex-wrap: wrap; margin-top: var(--space-4); }

.switch { position: relative; display: inline-flex; align-items: center; gap: 10px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { width: 44px; height: 26px; border-radius: 13px; background: var(--surface-3); border: 1px solid var(--border-strong); position: relative; transition: background 0.15s; flex: none; }
.switch .track::after { content: ''; position: absolute; top: 2px; inset-inline-start: 2px; width: 20px; height: 20px; border-radius: 50%; background: #cbd6e6; transition: inset-inline-start 0.15s, background 0.15s; }
.switch input:checked + .track { background: var(--accent); border-color: transparent; }
.switch input:checked + .track::after { inset-inline-start: 20px; background: #fff; }
.switch input:focus-visible + .track { box-shadow: var(--focus); }

/* ---------- choice cards (POS) ---------- */
.choices { display: grid; gap: 10px; grid-template-columns: repeat(3, 1fr); }
.choices.cols-2 { grid-template-columns: repeat(2, 1fr); }
@media (min-width: 700px) {
  .choices { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
  .choices.cols-2 { grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); }
}
.choice {
  position: relative; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px;
  min-height: 112px; padding: 14px 8px 12px; text-align: center;
  background: linear-gradient(180deg, var(--surface-2), var(--surface));
  border: 1px solid var(--border); border-radius: var(--radius);
  color: var(--text); transition: border-color 0.15s, box-shadow 0.15s, transform 0.08s, background 0.15s;
}
.choice:active { transform: scale(0.97); }
.choice:hover { border-color: var(--border-strong); }
.choice .art { width: 72px; height: 38px; color: var(--mp-gray-300); display: grid; place-items: center; }
.choice .art svg { width: 100%; height: 100%; }
.choice .art.round { width: 44px; height: 44px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-2); }
.choice .art.round svg { width: 24px; height: 24px; }
.choice .name { font-weight: 600; font-size: 14.5px; line-height: 1.3; }
.choice .price { font-size: 13px; color: var(--text-muted); }
.choice .price b { color: var(--text); font-size: 17px; font-weight: 700; }
.choice.is-selected { border-color: rgba(92, 194, 255, 0.7); background: linear-gradient(180deg, rgba(47, 134, 255, 0.24), rgba(47, 134, 255, 0.08)); box-shadow: var(--glow); }
.choice.is-selected .art { color: #fff; }
.choice.is-selected .price b { color: #fff; }
.choice .tick { position: absolute; top: 8px; inset-inline-start: 8px; width: 22px; height: 22px; border-radius: 50%; display: none; place-items: center; background: var(--accent); color: #fff; }
.choice .tick .ic { width: 14px; height: 14px; }
.choice.is-selected .tick { display: grid; }
.choice[disabled] { opacity: 0.4; pointer-events: none; }

.addon-row { display: grid; gap: 10px; grid-template-columns: 1fr; }
@media (min-width: 700px) { .addon-row { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); } }
.addon {
  display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 64px;
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-align: start; width: 100%;
}
.addon .art { width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-2); flex: none; }
.addon .art .ic { width: 22px; height: 22px; }
.addon .body { flex: 1; min-width: 0; }
.addon .body b { display: block; font-weight: 600; }
.addon .body span { font-size: 13px; color: var(--text-muted); }
.addon.is-selected { border-color: rgba(92, 194, 255, 0.7); background: linear-gradient(180deg, rgba(47, 134, 255, 0.2), rgba(47, 134, 255, 0.06)); box-shadow: var(--glow); }
.addon .toggle { width: 26px; height: 26px; border-radius: 8px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; flex: none; }
.addon.is-selected .toggle { background: var(--accent); border-color: transparent; }
.addon .toggle .ic { width: 16px; height: 16px; opacity: 0; }
.addon.is-selected .toggle .ic { opacity: 1; }
.addon-group { display: block; }
.addon-group .top { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.chips { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.chip {
  min-height: 48px; padding: 6px 8px; border-radius: 12px; display: flex; flex-direction: column; align-items: center; justify-content: center; line-height: 1.25;
  background: var(--mp-navy-900); border: 1px solid var(--border-strong); color: var(--text); font-weight: 600; font-size: 13.5px;
}
.chip small { font-weight: 500; color: var(--text-muted); font-size: 12px; }
.chip.is-selected { background: var(--accent); border-color: transparent; color: #fff; }
.chip.is-selected small { color: rgba(255, 255, 255, 0.85); }

.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.seg button {
  display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 52px; border-radius: 12px;
  background: var(--mp-navy-900); border: 1px solid var(--border-strong); color: var(--text); font-weight: 600; font-size: 15.5px;
}
.seg button .ic { width: 22px; height: 22px; }
.seg.seg-3 { grid-template-columns: repeat(3, 1fr); max-width: 480px; margin-bottom: var(--space-4); }
.seg.seg-3 button { min-height: 44px; font-size: 14.5px; }
/* Cash / card / split on one row. */
.seg.seg-pay { grid-template-columns: repeat(3, 1fr); gap: 6px; }
.seg.seg-pay button { gap: 6px; padding: 0 6px; font-size: 15px; }
.seg.seg-pay button .ic { width: 20px; height: 20px; }
.seg button.is-selected { background: linear-gradient(135deg, var(--accent), var(--accent-strong)); border-color: transparent; color: #fff; box-shadow: 0 8px 20px rgba(47, 134, 255, 0.28); }

/* ---------- POS layout ---------- */
.pos { display: grid; gap: var(--space-5); }
.pos-aside { display: flex; flex-direction: column; gap: var(--space-4); }
@media (min-width: 1000px) {
  .pos { grid-template-columns: minmax(0, 1fr) 380px; align-items: start; }
  .pos-aside { position: sticky; top: 24px; }
  .pos-bar { display: none !important; }
}
.pos-bar {
  position: fixed; inset-inline: 0; z-index: 35; bottom: calc(var(--tabbar-h) + env(safe-area-inset-bottom));
  display: flex; align-items: center; gap: var(--space-3); padding: 10px 14px;
  background: rgba(11, 23, 51, 0.98);
  border-top: 1px solid var(--border-strong); box-shadow: 0 -10px 30px rgba(0, 0, 0, 0.35);
}
.pos-bar .total { flex: 1; min-width: 0; }
.pos-bar .total > span { display: block; font-size: 12px; color: var(--text-muted); }
.pos-bar .total b { font-size: 22px; font-weight: 700; }
.pos-bar .btn { flex: none; min-width: 170px; }
@media (max-width: 999px) {
  .page:has(.pos-bar) { padding-bottom: calc(var(--tabbar-h) + 110px + env(safe-area-inset-bottom)); }
}

.lines { display: flex; flex-direction: column; gap: 8px; }
.line { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; font-size: 14px; }
.line .n { color: var(--text-soft); }
.line.total { font-size: 18px; font-weight: 700; padding-top: 10px; border-top: 1px dashed var(--border-strong); }
.line.total .n { color: var(--text); }
.line.tip { color: var(--warning); }
.line.tip .n { color: var(--warning); }
.empty { color: var(--text-muted); font-size: 14px; text-align: center; padding: 18px 8px; border: 1px dashed var(--border-strong); border-radius: 14px; }
.inline-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.note { font-size: 12.5px; color: var(--text-muted); display: flex; gap: 6px; align-items: flex-start; }
.note .ic { width: 16px; height: 16px; margin-top: 2px; }
.hint-bad { color: var(--warning); font-size: 13px; text-align: center; }

.linked-card { display: flex; flex-direction: column; gap: 6px; padding: 14px; border-radius: 14px; background: var(--accent-soft); border: 1px solid rgba(92, 194, 255, 0.35); }
.linked-card .t { display: flex; justify-content: space-between; font-weight: 600; }

/* ---------- KPIs / tables ---------- */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, 1fr); }
@media (min-width: 800px) { .kpis { grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); } }
.kpi { padding: 16px; border-radius: 18px; background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--border); }
.kpi .k { font-size: 12.5px; color: var(--text-muted); display: flex; align-items: center; gap: 6px; }
.kpi .k .ic { width: 16px; height: 16px; color: var(--accent-2); }
.kpi .v { font-size: 24px; font-weight: 700; margin-top: 4px; }
.kpi .v small { font-size: 13px; color: var(--text-muted); font-weight: 500; }
.kpi .s { font-size: 12px; color: var(--text-muted); margin-top: 2px; }
.kpi.accent { background: linear-gradient(135deg, rgba(47, 134, 255, 0.28), rgba(11, 79, 196, 0.18)); border-color: rgba(92, 194, 255, 0.35); }

.table-wrap { overflow-x: auto; border-radius: 16px; border: 1px solid var(--border); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; min-width: 480px; }
.table th, .table td { padding: 11px 12px; text-align: start; border-bottom: 1px solid var(--border); white-space: nowrap; }
.table th { background: var(--surface-2); color: var(--text-soft); font-weight: 600; font-size: 12.5px; }
.table td { background: var(--surface); }
.table tr:last-child td { border-bottom: 0; }
.table tfoot td { background: var(--surface-2); font-weight: 700; }
.table .c { text-align: center; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: var(--surface-2); }
.table .cell2 { display: flex; flex-direction: column; line-height: 1.3; }
.table .cell2 small { color: var(--text-muted); font-size: 12px; }
.table input.input { min-height: 38px; padding: 6px 10px; }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; background: var(--surface-3); color: var(--text-soft); }
.badge.blue { background: var(--accent-soft); color: var(--accent-2); }
.badge.green { background: rgba(60, 207, 145, 0.14); color: var(--success); }
.badge.red { background: rgba(255, 107, 122, 0.14); color: var(--danger); }
.badge.amber { background: rgba(245, 189, 79, 0.14); color: var(--warning); }

.list { display: flex; flex-direction: column; gap: 8px; }
.list-item { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 14px; background: var(--surface); border: 1px solid var(--border); color: var(--text); width: 100%; text-align: start; }
.list-item .grow { flex: 1; min-width: 0; }
.list-item .grow b { display: block; }
.list-item .grow span { font-size: 12.5px; color: var(--text-muted); }
.list-item .amt { font-weight: 700; font-size: 16px; }
/* Invoice rows: the whole row opens the receipt, the printer button prints it directly. */
.list-item.list-row { padding: 0; gap: 0; }
.list-row .row-link { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; padding: 12px 14px; color: inherit; }
.list-row .print-quick { margin-inline-end: 10px; flex: none; color: var(--accent-2); }

.filters { display: flex; gap: 10px; flex-wrap: wrap; align-items: flex-end; margin-bottom: var(--space-4); }
.filters .field { min-width: 150px; flex: 1; }
@media (min-width: 800px) { .filters .field { flex: 0 1 190px; } }

.grid-2 { display: grid; gap: var(--space-4); }
@media (min-width: 1000px) { .grid-2 { grid-template-columns: 1fr 1fr; } }

/* ---------- overlays ---------- */
.sheet-backdrop { position: fixed; inset: 0; z-index: 80; background: rgba(2, 6, 14, 0.66); display: flex; align-items: flex-end; justify-content: center; }
.sheet {
  width: 100%; max-width: 560px; max-height: 92dvh; overflow-y: auto;
  background: var(--mp-navy-900); border: 1px solid var(--border-strong); border-bottom: 0;
  border-radius: 24px 24px 0 0; padding: 20px 18px calc(20px + env(safe-area-inset-bottom)); box-shadow: var(--shadow);
}
@media (min-width: 700px) {
  .sheet-backdrop { align-items: center; }
  .sheet { border-radius: 24px; border-bottom: 1px solid var(--border-strong); }
}
.sheet-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: var(--space-4); }
.sheet-head h3 { font-size: 18px; }

.toasts { position: fixed; z-index: 100; top: calc(12px + env(safe-area-inset-top)); inset-inline: 12px; display: flex; flex-direction: column; align-items: center; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; max-width: 480px; padding: 12px 16px; border-radius: 14px; background: var(--surface-3); border: 1px solid var(--border-strong); box-shadow: var(--shadow); font-weight: 500; }
.toast.error { background: #3a1522; border-color: rgba(255, 107, 122, 0.5); color: #ffd6db; }
.toast.ok { background: #0f3327; border-color: rgba(60, 207, 145, 0.45); color: #c9f5e2; }

/* ---------- auth ---------- */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: 100%; max-width: 400px; display: flex; flex-direction: column; gap: var(--space-5); }
.auth-card .card { padding: 22px; display: flex; flex-direction: column; gap: var(--space-4); }

.loading { display: grid; place-items: center; min-height: 40vh; color: var(--text-muted); }
.spinner { width: 34px; height: 34px; border-radius: 50%; border: 3px solid var(--border-strong); border-top-color: var(--accent-2); animation: spin 0.8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- connection strip ---------- */
.net-banner { display: flex; align-items: center; gap: 8px; padding: 9px 16px; font-size: 13.5px; font-weight: 600; border-bottom: 1px solid var(--border); }
.net-banner .ic { width: 18px; height: 18px; flex: none; }
.net-banner.info { background: rgba(47, 134, 255, 0.14); color: var(--accent-2); }
.net-banner.warn { background: rgba(245, 189, 79, 0.16); color: var(--warning); }
.net-banner.error { background: rgba(255, 107, 122, 0.14); color: var(--danger); }
@media (min-width: 1000px) { .net-banner { position: sticky; top: 0; z-index: 20; } }

/* ---------- language ---------- */
.lang-btn { gap: 6px; }
.auth-lang { position: fixed; top: calc(12px + env(safe-area-inset-top)); inset-inline-end: 12px; z-index: 5; }
.topbar .lang-btn { min-height: 36px; padding: 0 10px; font-size: 13px; }
.topbar-name { display: inline-flex; align-items: center; gap: 6px; }
@media (max-width: 420px) { .topbar-name { display: none; } }
.sidebar-foot { display: flex; flex-direction: column; gap: 8px; }
/* Vehicles face the direction of reading; directional icons mirror in English. */
[dir='ltr'] .art.vehicle svg,
[dir='ltr'] .ic[data-icon='back'] svg { transform: scaleX(-1); }
[dir='ltr'] .brand-latin, [dir='ltr'] .lockup .en { padding-inline-start: 0; }

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