/* =====================================================================
   Satış Kassası — mobile-first PWA stilləri (xarici şrift/kitabxana yoxdur)
   ===================================================================== */
:root {
  --primary: #0f766e;        /* yaşıl-mavi (teal) — ağ mətnlə 5.5:1 */
  --primary-dark: #115e59;
  --primary-50: #e7f5f3;
  --primary-100: #cdebe7;
  --accent: #f59e0b;         /* vurğu (kəhrəba) — yalnız tünd mətnlə */
  --accent-ink: #3d2300;
  --accent-50: #fff7e6;
  --profit: #15803d;         /* mənfəət — 5.0:1 */
  --profit-50: #ecf9f0;
  --debt: #c2410c;           /* borc — 5.2:1 */
  --debt-50: #fff3eb;
  --danger: #b91c1c;
  --danger-50: #fdeeee;
  --text: #10201f;
  --muted: #546765;          /* ağ fonda 5.6:1 */
  --bg: #f2f5f5;
  --card: #ffffff;
  --border: #dfe7e6;
  --radius: 16px;
  --radius-sm: 12px;
  --shadow: 0 1px 2px rgba(16, 32, 31, .05), 0 4px 14px rgba(16, 32, 31, .06);
  --shadow-lg: 0 8px 30px rgba(16, 32, 31, .16);
  --nav-h: 64px;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --font: system-ui, -apple-system, "Segoe UI", Roboto, "Noto Sans", "Helvetica Neue", Arial, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; -webkit-tap-highlight-color: transparent; }
body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.45;
  color: var(--text);
  background: var(--bg);
  overscroll-behavior-y: none;
}
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--primary); }
img { max-width: 100%; display: block; }
.sprite { position: absolute; width: 0; height: 0; overflow: hidden; }
.noscript { padding: 24px; text-align: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

.icon {
  width: 1.25em; height: 1.25em; flex: none;
  stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

:focus-visible { outline: 3px solid rgba(15, 118, 110, .4); outline-offset: 2px; border-radius: 10px; }

.num, .amount { font-variant-numeric: tabular-nums; }
.amount { font-weight: 650; white-space: nowrap; }
.text-profit { color: var(--profit); }
.text-debt { color: var(--debt); }
.text-danger { color: var(--danger); }
.text-muted { color: var(--muted); }

/* ---------------------------------------------------------------- boot */
.boot { min-height: 100dvh; display: grid; place-content: center; justify-items: center; gap: 12px; }
.boot-logo, .brand-logo {
  width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center;
  background: var(--primary); color: #fff; font-size: 30px; box-shadow: var(--shadow-lg);
}
.boot-text { color: var(--muted); margin: 0; }

/* -------------------------------------------------------------- layout */
.topbar {
  position: sticky; top: 0; z-index: 20;
  display: flex; align-items: center; gap: 8px;
  min-height: calc(56px + var(--safe-t));
  padding: var(--safe-t) 8px 0 16px;
  background: rgba(242, 245, 245, .92);
  backdrop-filter: saturate(1.4) blur(10px);
  -webkit-backdrop-filter: saturate(1.4) blur(10px);
}
.topbar.has-back { padding-left: 4px; }
.topbar h1 { flex: 1; margin: 0; font-size: 21px; font-weight: 750; letter-spacing: -.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .sub { display: block; font-size: 13px; font-weight: 500; color: var(--muted); letter-spacing: 0; }
.icon-btn {
  width: 44px; height: 44px; border: 0; border-radius: 12px; background: transparent;
  display: grid; place-items: center; color: var(--text); font-size: 22px;
  transition: background .15s, transform .12s;
}
.icon-btn:active { background: rgba(16, 32, 31, .07); transform: scale(.94); }

.view {
  padding: 4px 16px calc(var(--nav-h) + var(--safe-b) + 28px);
  max-width: 640px; margin: 0 auto;
  animation: view-in .22s ease-out;
}
.view.with-cartbar { padding-bottom: calc(var(--nav-h) + var(--safe-b) + 100px); }
@keyframes view-in { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

.stack { display: grid; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.mt { margin-top: 20px; }
.mt-sm { margin-top: 12px; }
.mt-xs { margin-top: 6px; gap: 6px; }
.text-teal { color: var(--primary-dark); }
.plain-link { color: inherit; text-decoration: none; display: block; min-width: 0; }
a.stat { transition: transform .12s; }
a.stat:active { transform: scale(.98); }
.spin-once .icon { animation: spin .6s ease; }
.section-title {
  display: flex; align-items: center; justify-content: space-between;
  margin: 22px 4px 10px; font-size: 15px; font-weight: 700; color: var(--text);
}
.section-title .hint { font-size: 13px; font-weight: 500; color: var(--muted); }

/* -------------------------------------------------------------- tabbar */
.tabbar {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 30;
  display: grid; grid-template-columns: repeat(5, 1fr);
  height: calc(var(--nav-h) + var(--safe-b));
  padding-bottom: var(--safe-b);
  background: rgba(255, 255, 255, .96);
  backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
  border-top: 1px solid var(--border);
  box-shadow: 0 -4px 18px rgba(16, 32, 31, .05);
}
.tab {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  color: var(--muted); text-decoration: none; font-size: 11.5px; font-weight: 600;
  min-height: 48px; transition: color .15s;
}
.tab .tab-ic {
  width: 52px; height: 30px; border-radius: 15px; display: grid; place-items: center;
  font-size: 22px; transition: background .2s, transform .12s;
}
.tab:active .tab-ic { transform: scale(.92); }
.tab.active { color: var(--primary); }
.tab.active .tab-ic { background: var(--primary-50); }

/* --------------------------------------------------------------- cards */
.card {
  background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 16px;
}
.card.flat { box-shadow: none; border: 1px solid var(--border); }
.card + .card { margin-top: 12px; }
.card-title { margin: 0 0 10px; font-size: 15px; font-weight: 700; }

.list { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); overflow: hidden; }
.list:empty { display: none; }
.item {
  display: flex; align-items: center; gap: 12px; width: 100%;
  min-height: 64px; padding: 12px 14px; border: 0; background: transparent; text-align: left;
  text-decoration: none; color: inherit; transition: background .15s;
}
.item + .item { border-top: 1px solid var(--border); }
button.item:active, a.item:active { background: var(--primary-50); }
.item-title { font-weight: 650; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-sub { font-size: 13.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.item-end { text-align: right; display: grid; justify-items: end; gap: 3px; }
.item .chev { color: #9aaaa8; font-size: 18px; }

.avatar {
  width: 42px; height: 42px; flex: none; border-radius: 13px; display: grid; place-items: center;
  background: var(--primary-50); color: var(--primary); font-weight: 750; font-size: 16px;
}
.avatar.orange { background: var(--debt-50); color: var(--debt); }
.avatar.gray { background: #eef1f1; color: var(--muted); }
.avatar .icon { font-size: 20px; }
.avatar.big { width: 56px; height: 56px; border-radius: 17px; font-size: 20px; }
.avatar.danger { background: var(--danger-50); color: var(--danger); }

/* ------------------------------------------------------------- buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 50px; padding: 0 20px; border: 0; border-radius: 14px;
  font-size: 16px; font-weight: 650; text-decoration: none; white-space: nowrap;
  transition: transform .12s ease, background .2s, box-shadow .2s, opacity .2s;
  user-select: none;
}
.btn:active:not([disabled]) { transform: scale(.97); }
.btn[disabled] { opacity: .5; cursor: not-allowed; }
.btn .icon { font-size: 20px; }
.btn-block { width: 100%; }
.btn-primary { background: var(--primary); color: #fff; box-shadow: 0 4px 14px rgba(15, 118, 110, .28); }
.btn-primary:active:not([disabled]) { background: var(--primary-dark); }
.btn-accent { background: var(--accent); color: var(--accent-ink); box-shadow: 0 4px 14px rgba(245, 158, 11, .3); }
.btn-secondary { background: var(--primary-50); color: var(--primary-dark); }
.btn-ghost { background: transparent; color: var(--primary); }
.btn-danger { background: var(--danger-50); color: var(--danger); }
.btn-danger-solid { background: var(--danger); color: #fff; }
.btn-sm { min-height: 40px; padding: 0 14px; font-size: 14.5px; border-radius: 11px; }
.btn.loading { color: transparent !important; position: relative; pointer-events: none; }
.btn.loading::after {
  content: ""; position: absolute; width: 22px; height: 22px; border-radius: 50%;
  border: 2.5px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: spin .7s linear infinite;
}
.btn-secondary.loading::after, .btn-danger.loading::after, .btn-ghost.loading::after {
  border-color: rgba(15, 118, 110, .25); border-top-color: var(--primary);
}
@keyframes spin { to { transform: rotate(360deg); } }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

.fab {
  position: fixed; right: 16px; bottom: calc(var(--nav-h) + var(--safe-b) + 16px); z-index: 25;
  width: 58px; height: 58px; border-radius: 18px; border: 0;
  background: var(--primary); color: #fff; font-size: 26px; display: grid; place-items: center;
  box-shadow: 0 8px 22px rgba(15, 118, 110, .38); transition: transform .12s;
}
.fab:active { transform: scale(.93); }

/* --------------------------------------------------------------- forms */
.field { display: grid; gap: 6px; }
.field > label, .label { font-size: 14px; font-weight: 600; color: var(--text); }
.field .help { font-size: 13px; color: var(--muted); }
.field .error-text { font-size: 13px; color: var(--danger); }
.input, .textarea, .select {
  width: 100%; min-height: 52px; padding: 0 14px;
  border: 1.5px solid var(--border); border-radius: var(--radius-sm); background: #fff;
  font-size: 16px; transition: border-color .15s, box-shadow .15s; appearance: none;
}
.textarea { min-height: 88px; padding: 12px 14px; resize: vertical; }
.input:focus, .textarea:focus, .select:focus { outline: 0; border-color: var(--primary); box-shadow: 0 0 0 4px rgba(15, 118, 110, .14); }
.input.invalid { border-color: var(--danger); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.input-wrap .suffix, .input-wrap .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.input-wrap .suffix { right: 16px; color: var(--muted); font-weight: 650; pointer-events: none; }
.input.money { font-size: 22px; font-weight: 700; font-variant-numeric: tabular-nums; }
.form { display: grid; gap: 16px; }
.two { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

.search { position: relative; }
.search .icon { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--muted); font-size: 20px; pointer-events: none; }
.search .input { padding-left: 46px; background: #fff; border-color: transparent; box-shadow: var(--shadow); }
.search .input:focus { border-color: var(--primary); }

.switch { position: relative; display: inline-flex; align-items: center; gap: 12px; cursor: pointer; min-height: 44px; }
.switch input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.switch .track { width: 50px; height: 30px; border-radius: 15px; background: #cfd9d8; position: relative; transition: background .2s; flex: none; }
.switch .track::after {
  content: ""; position: absolute; top: 3px; left: 3px; width: 24px; height: 24px; border-radius: 50%;
  background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .2s;
}
.switch input:checked + .track { background: var(--primary); }
.switch input:checked + .track::after { transform: translateX(20px); }
.switch input:focus-visible + .track { outline: 3px solid rgba(15, 118, 110, .4); outline-offset: 2px; }

/* --------------------------------------------------------------- chips */
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; margin: 0 -2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip {
  flex: none; min-height: 38px; padding: 0 15px; border-radius: 999px;
  border: 1.5px solid var(--border); background: #fff; color: var(--text);
  font-size: 14.5px; font-weight: 600; transition: background .15s, color .15s, transform .12s;
}
.chip:active { transform: scale(.96); }
.chip.active { background: var(--primary); border-color: var(--primary); color: #fff; }

.badge {
  display: inline-flex; align-items: center; gap: 4px; padding: 3px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 700; white-space: nowrap;
}
.badge-green { background: var(--profit-50); color: var(--profit); }
.badge-orange { background: var(--debt-50); color: var(--debt); }
.badge-red { background: var(--danger-50); color: var(--danger); }
.badge-gray { background: #edf1f1; color: var(--muted); }
.badge-teal { background: var(--primary-50); color: var(--primary-dark); }
.badge-amber { background: var(--accent-50); color: #8a4b00; }

/* --------------------------------------------------------- stat cards */
.stats { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.stat { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 14px 13px; min-width: 0; }
.stat.wide { grid-column: 1 / -1; }
.stat-label { display: flex; align-items: center; gap: 6px; font-size: 13.5px; font-weight: 600; color: var(--muted); }
.stat-label .icon { font-size: 17px; }
.stat-value { margin-top: 6px; font-size: 25px; font-weight: 780; letter-spacing: -.02em; font-variant-numeric: tabular-nums; line-height: 1.15; overflow-wrap: anywhere; }
.stat.wide .stat-value { font-size: 32px; }
.stat-hint { margin-top: 3px; font-size: 12.5px; color: var(--muted); }
.stat.profit .stat-value { color: var(--profit); }
.stat.profit .stat-label .icon { color: var(--profit); }
.stat.debt { background: linear-gradient(135deg, #fff6ef, #fff); border: 1px solid #fde1cf; }
.stat.debt .stat-value { color: var(--debt); }
.stat.debt .stat-label .icon { color: var(--debt); }
.stat.teal .stat-label .icon { color: var(--primary); }

.hero {
  border-radius: 20px; padding: 18px; color: #fff;
  background: linear-gradient(135deg, var(--primary) 0%, #0e7490 100%);
  box-shadow: 0 10px 26px rgba(15, 118, 110, .28);
}
.hero.debt { background: linear-gradient(135deg, #c2410c 0%, #b45309 100%); box-shadow: 0 10px 26px rgba(194, 65, 12, .26); }
.hero-label { font-size: 14px; font-weight: 600; opacity: .92; }
.hero-value { margin-top: 4px; font-size: 34px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.hero-hint { margin-top: 2px; font-size: 13.5px; opacity: .9; }

/* ------------------------------------------------------------ products */
.product { display: flex; align-items: center; gap: 12px; padding: 12px 14px; min-height: 72px; }
.product + .product { border-top: 1px solid var(--border); }
.product.out { opacity: .55; }
.product-tap { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; border: 0; background: none; padding: 0; text-align: left; }
.price { font-weight: 750; color: var(--primary-dark); font-variant-numeric: tabular-nums; }
.add-btn {
  width: 44px; height: 44px; border-radius: 13px; border: 0; flex: none;
  background: var(--primary-50); color: var(--primary); font-size: 22px; display: grid; place-items: center;
  transition: transform .12s, background .15s;
}
.add-btn:active { transform: scale(.9); background: var(--primary-100); }
.stepper { display: inline-flex; align-items: center; background: var(--primary-50); border-radius: 13px; flex: none; }
.stepper button {
  width: 42px; height: 44px; border: 0; background: none; color: var(--primary); font-size: 20px;
  display: grid; place-items: center; border-radius: 13px; transition: background .15s;
}
.stepper button:active { background: var(--primary-100); }
.stepper .qty { min-width: 30px; text-align: center; font-weight: 750; font-variant-numeric: tabular-nums; }

.cartbar {
  position: fixed; left: 12px; right: 12px; z-index: 26;
  bottom: calc(var(--nav-h) + var(--safe-b) + 10px);
  max-width: 616px; margin: 0 auto;
  display: flex; align-items: center; gap: 12px; min-height: 62px; padding: 8px 8px 8px 16px;
  border: 0; border-radius: 18px; background: var(--primary); color: #fff; text-align: left;
  box-shadow: 0 10px 28px rgba(15, 118, 110, .42);
  animation: pop-in .22s ease-out; transition: transform .12s;
}
.cartbar:active { transform: scale(.98); }
.cartbar .count {
  min-width: 30px; height: 30px; padding: 0 8px; border-radius: 15px; display: grid; place-items: center;
  background: var(--accent); color: var(--accent-ink); font-weight: 800; font-size: 14px;
}
.cartbar .total { flex: 1; font-size: 19px; font-weight: 780; font-variant-numeric: tabular-nums; }
.cartbar .go { display: inline-flex; align-items: center; gap: 4px; padding: 0 14px; min-height: 46px; border-radius: 13px; background: rgba(255, 255, 255, .16); font-weight: 700; }
@keyframes pop-in { from { transform: translateY(16px); opacity: 0; } to { transform: none; opacity: 1; } }

/* ------------------------------------------------------------ key/val */
.kv { display: grid; gap: 10px; }
.kv-row { display: flex; justify-content: space-between; gap: 12px; align-items: baseline; }
.kv-row .k { color: var(--muted); font-size: 14.5px; }
.kv-row .v { font-weight: 650; text-align: right; }
.kv-row.total { padding-top: 10px; border-top: 1px dashed var(--border); font-size: 18px; }
.kv-row.total .k { color: var(--text); font-weight: 700; }
.divider { height: 1px; background: var(--border); margin: 12px 0; }

/* ------------------------------------------------------------ skeleton */
.sk {
  background: linear-gradient(90deg, #e6ecec 25%, #f3f6f6 37%, #e6ecec 63%);
  background-size: 400% 100%; animation: shimmer 1.3s ease infinite; border-radius: 10px;
}
.sk-line { height: 14px; }
.sk-line.w40 { width: 40%; } .sk-line.w60 { width: 60%; } .sk-line.w80 { width: 80%; }
.sk-title { height: 18px; width: 55%; }
.sk-big { height: 30px; width: 70%; margin-top: 8px; }
.sk-avatar { width: 42px; height: 42px; border-radius: 13px; flex: none; }
.sk-item { display: flex; align-items: center; gap: 12px; padding: 14px; }
.sk-item + .sk-item { border-top: 1px solid var(--border); }
.sk-item .grow { display: grid; gap: 8px; }
@keyframes shimmer { 0% { background-position: 100% 50%; } 100% { background-position: 0 50%; } }

/* --------------------------------------------------------------- empty */
.empty { text-align: center; padding: 44px 24px 36px; }
.empty-icon {
  width: 76px; height: 76px; margin: 0 auto 16px; border-radius: 24px; display: grid; place-items: center;
  background: var(--primary-50); color: var(--primary); font-size: 34px;
}
.empty-title { margin: 0; font-size: 18px; font-weight: 750; }
.empty-text { margin: 6px auto 0; max-width: 300px; color: var(--muted); font-size: 15px; }
.empty .btn { margin-top: 18px; }

.error-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--danger-50); color: var(--danger); font-size: 14.5px; font-weight: 550; }
.info-box { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); background: var(--accent-50); color: #7a4300; font-size: 14.5px; font-weight: 550; }
.error-box .icon, .info-box .icon { margin-top: 1px; }

/* --------------------------------------------------------------- toast */
.toasts {
  position: fixed; left: 12px; right: 12px; top: calc(var(--safe-t) + 10px); z-index: 100;
  display: grid; gap: 8px; justify-items: center; pointer-events: none;
}
.toast {
  display: flex; align-items: center; gap: 10px; max-width: 520px; width: 100%;
  padding: 13px 16px; border-radius: 14px; background: #10201f; color: #fff; font-weight: 600; font-size: 15px;
  box-shadow: var(--shadow-lg); animation: toast-in .25s ease-out; pointer-events: auto;
}
.toast.success { background: var(--primary-dark); }
.toast.error { background: var(--danger); }
.toast.hide { animation: toast-out .2s ease-in forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-10px); } to { opacity: 1; transform: none; } }
@keyframes toast-out { to { opacity: 0; transform: translateY(-10px); } }

/* --------------------------------------------------------------- sheet */
.sheet-backdrop {
  position: fixed; inset: 0; z-index: 60; background: rgba(10, 22, 21, .45);
  animation: fade-in .2s ease-out;
}
.sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 61;
  max-width: 640px; margin: 0 auto; max-height: 90dvh; overflow-y: auto; overscroll-behavior: contain;
  background: #fff; border-radius: 22px 22px 0 0; padding: 8px 16px calc(18px + var(--safe-b));
  box-shadow: 0 -8px 30px rgba(0, 0, 0, .18); animation: sheet-up .26s cubic-bezier(.2, .9, .3, 1);
}
.sheet-handle { width: 40px; height: 5px; border-radius: 3px; background: #d5dddc; margin: 4px auto 10px; }
.sheet-head { display: flex; align-items: center; gap: 8px; margin-bottom: 12px; }
.sheet-head h2 { flex: 1; margin: 0; font-size: 19px; font-weight: 750; }
.sheet.closing { animation: sheet-down .2s ease-in forwards; }
.sheet-backdrop.closing { animation: fade-out .2s ease-in forwards; }
.receipt-sk { height: 260px; border-radius: 14px; }
.sheet .receipt-img { width: 100%; border-radius: 14px; background: #f2f5f5; min-height: 120px; object-fit: contain; max-height: 70dvh; }
@keyframes sheet-up { from { transform: translateY(100%); } to { transform: none; } }
@keyframes sheet-down { to { transform: translateY(100%); } }
@keyframes fade-in { from { opacity: 0; } }
@keyframes fade-out { to { opacity: 0; } }

/* ------------------------------------------------------------- success */
.success { text-align: center; padding: 28px 8px 8px; }
.success-check {
  width: 88px; height: 88px; margin: 0 auto 18px; border-radius: 50%; display: grid; place-items: center;
  background: var(--profit-50); color: var(--profit); font-size: 46px; animation: pop .45s cubic-bezier(.2, 1.4, .4, 1);
}
.success-check .icon { stroke-width: 2.6; }
.success h2 { margin: 0; font-size: 22px; }
.success .big { margin: 6px 0 2px; font-size: 36px; font-weight: 800; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
@keyframes pop { 0% { transform: scale(.4); opacity: 0; } 100% { transform: none; opacity: 1; } }

/* ---------------------------------------------------------------- auth */
.auth { min-height: 100dvh; padding: calc(var(--safe-t) + 40px) 20px calc(var(--safe-b) + 24px); max-width: 460px; margin: 0 auto; display: grid; align-content: start; gap: 22px; }
.brand { display: grid; justify-items: center; text-align: center; gap: 12px; }
.brand h1 { margin: 0; font-size: 27px; font-weight: 800; letter-spacing: -.02em; }
.brand p { margin: 0; color: var(--muted); }
.auth .switch-link { text-align: center; color: var(--muted); font-size: 15px; }
.auth .switch-link button { border: 0; background: none; color: var(--primary); font-weight: 700; padding: 10px 4px; }

.offline-banner {
  position: sticky; top: calc(56px + var(--safe-t)); z-index: 19; margin: 0 16px 8px;
  display: flex; gap: 8px; align-items: center; padding: 10px 14px; border-radius: 12px;
  background: #10201f; color: #fff; font-size: 14px; font-weight: 600;
}

.load-more { display: flex; justify-content: center; margin-top: 14px; }
.footer-note { text-align: center; color: var(--muted); font-size: 13px; margin-top: 24px; }

@media (min-width: 560px) {
  .stats { grid-template-columns: repeat(2, 1fr); }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
