/* Charrjli Web — "Charge".
   Same navy + gold as the app, each colour given one job:
   navy layers = space, gold = money and the one main action, electric blue (logo speed lines) = links, info, focus. */
:root {
  /* Navy layers (deepest → raised) */
  --ink: #070F24;
  --navy: #0B1633;          /* app background */
  --surface: #16284D;       /* app card colour */
  --raised: #1D3363;
  --field: #0F1D40;
  /* Lines: decorative vs. interactive (≥3:1 on every surface) */
  --hair: #223A6B;          /* app navyBlue — dividers only */
  --line: #6680B5;          /* inputs, outlines, controls */
  /* Brand accents */
  --gold: #E8BE62;          /* app primaryColor */
  --gold-hi: #F6D88E;
  --gold-lo: #D2A445;
  --on-gold: #0B1633;
  --electric: #5AA9FF;      /* from the logo's speed lines */
  /* Text */
  --text: #F2F4F7;
  --muted: #A9B3C6;
  /* Status (all ≥4.5:1 on surface) */
  --ok: #34D399;   --ok-bg: rgba(52, 211, 153, .12);
  --warn: #F5C84B; --warn-bg: rgba(245, 200, 75, .12);
  --bad: #FF7B7B;  --bad-bg: rgba(255, 123, 123, .12);
  --after: #4ADE80; --before: #FF9AAE;
  /* Shape — radius follows hierarchy */
  --r-xl: 28px;   /* charge card, sheets */
  --r-lg: 20px;   /* panels, grouped lists */
  --r-md: 14px;   /* fields, tiles */
  --r-sm: 10px;
  --shadow: 0 18px 40px -18px rgba(0, 0, 0, .6);
  --font: "Readex Pro", "Segoe UI", system-ui, -apple-system, sans-serif;
  --safe-b: env(safe-area-inset-bottom, 0px);
  --safe-t: env(safe-area-inset-top, 0px);
  --nav-h: 68px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
[hidden] { display: none !important; }
html, body { margin: 0; min-height: 100%; }
body {
  background:
    radial-gradient(900px 520px at 50% -180px, rgba(29, 51, 99, .9), transparent 70%),
    var(--navy);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
a { color: var(--electric); text-decoration: none; }
a:hover { text-decoration: underline; text-underline-offset: 3px; }
:focus-visible { outline: 2px solid var(--electric); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.icon { width: 24px; height: 24px; fill: currentColor; flex: none; }
.icon.sm { width: 18px; height: 18px; }
.icon.lg { width: 28px; height: 28px; }
html[dir="rtl"] .flip { transform: scaleX(-1); }
.money { font-variant-numeric: tabular-nums lining-nums; }

/* Type scale: 12 / 14 / 15 / 17 / 20 / 24 / 32 / 40 */
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.01em; }
.muted { color: var(--muted); }
.small { font-size: 14px; }
.tiny { font-size: 12px; }
.center { text-align: center; }
.row { display: flex; align-items: center; gap: 10px; }
.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.gold { color: var(--gold); }
.bold { font-weight: 600; }

/* ---------- Boot ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot img { width: 132px; animation: breathe 1.8s ease-in-out infinite; }
@keyframes breathe { 50% { transform: scale(1.04); opacity: .85; } }

/* ---------- Shell ---------- */
.shell { min-height: 100vh; display: flex; }
.side, .panel { display: none; }
.main { flex: 1; min-width: 0; padding-bottom: calc(var(--nav-h) + var(--safe-b) + 20px); }
.main.no-nav { padding-bottom: 28px; }
.page { max-width: 1080px; margin: 0 auto; }
.content { padding: 16px; }

/* Bottom tabs (mobile) — the app's gold pill on the active tab */
.tabbar {
  position: fixed; inset: auto 0 0 0; z-index: 30;
  height: calc(var(--nav-h) + var(--safe-b)); padding: 8px 10px calc(8px + var(--safe-b));
  display: grid; grid-template-columns: repeat(4, 1fr); align-items: center;
  background: rgba(7, 15, 36, .9); backdrop-filter: blur(16px) saturate(1.2);
  border-top: 1px solid var(--hair);
}
.tab {
  display: flex; align-items: center; justify-content: center; gap: 6px;
  height: 46px; margin: 0 3px; border-radius: 14px; border: 0; background: none;
  color: var(--muted); font-weight: 500; font-size: 14px; cursor: pointer;
  transition: background .25s var(--ease), color .2s;
}
.tab span { display: none; }
.tab.active { background: var(--gold); color: var(--on-gold); font-weight: 600; }
.tab.active span { display: inline; }
.tab:not(.active):hover { color: var(--text); background: rgba(255, 255, 255, .04); }
.tab:active { transform: scale(.97); }

/* Desktop: navigation rail + optional wallet panel */
@media (min-width: 960px) {
  .side {
    display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh;
    width: 236px; flex: none; padding: 22px 14px; background: var(--ink); border-inline-end: 1px solid var(--hair);
  }
  .side .brand { display: flex; align-items: center; gap: 10px; padding: 0 10px 26px; color: var(--text); }
  .side .brand:hover { text-decoration: none; }
  .side .brand img { width: 46px; }
  .side .brand b { color: var(--gold); font-size: 21px; font-weight: 600; letter-spacing: -.01em; }
  .side .tab { justify-content: flex-start; height: 46px; padding: 0 14px; margin: 0; font-size: 15px; }
  .side .tab span { display: inline; }
  .side .spacer { flex: 1; }
  .side a.tab:hover { text-decoration: none; }
  .tabbar { display: none; }
  .main { padding-bottom: 40px; }
  .content { padding: 24px 32px; }
}
@media (min-width: 1240px) {
  .panel {
    display: flex; flex-direction: column; gap: 18px; position: sticky; top: 0; height: 100vh; overflow: auto;
    width: 360px; flex: none; padding: 22px 22px 32px; border-inline-start: 1px solid var(--hair);
    background: linear-gradient(180deg, rgba(7, 15, 36, .55), rgba(7, 15, 36, .2));
    scrollbar-width: thin; scrollbar-color: var(--hair) transparent;
  }
  .has-panel .home-card { display: none; }
}
.panel-title { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; font-size: 17px; font-weight: 600; }
.panel-title a { font-size: 14px; font-weight: 500; }
.quick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }

/* ---------- Header (the app's curved header) ---------- */
.hdr { position: relative; padding-top: var(--safe-t); }
.hdr-bg {
  position: absolute; inset: 0 0 auto 0; height: calc(150px + var(--safe-t));
  background: linear-gradient(180deg, var(--surface), #12224A);
  clip-path: ellipse(92% 100% at 50% 0);
}
.hdr.slim { min-height: calc(80px + var(--safe-t)); }
.hdr.slim .hdr-bg { height: calc(80px + var(--safe-t)); }
.hdr-row { position: relative; display: flex; align-items: center; gap: 8px; height: 58px; padding: 0 8px; max-width: 1080px; margin: 0 auto; }
.hdr-title { flex: 1; text-align: center; font-weight: 600; font-size: 19px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.hdr-title.brandmark { color: var(--gold); font-size: 22px; letter-spacing: -.01em; }
.hdr-spacer { width: 44px; flex: none; }
.hdr-body { position: relative; padding: 2px 16px 6px; max-width: 1080px; margin: 0 auto; }
.hdr-search {
  display: none; align-items: center; gap: 10px; height: 44px; min-width: 280px; padding: 0 16px;
  border-radius: 999px; border: 1px solid var(--line); background: var(--field); color: var(--muted); cursor: text; font-size: 15px;
}
.hdr-search:hover { border-color: var(--electric); color: var(--text); }
.icon-btn {
  position: relative; width: 44px; height: 44px; display: grid; place-items: center; flex: none;
  border-radius: 14px; border: 0; background: none; color: var(--text); cursor: pointer; transition: background .2s;
}
.icon-btn:hover { background: rgba(255, 255, 255, .06); }
.icon-btn:active { transform: scale(.95); }
.icon-btn .dot {
  position: absolute; top: 5px; inset-inline-end: 5px; min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 9px; background: var(--gold); color: var(--on-gold); font-size: 11px; font-weight: 700;
  display: grid; place-items: center; box-shadow: 0 0 0 2px var(--surface);
}
@media (min-width: 960px) {
  .hdr-bg { clip-path: none; height: 100%; background: transparent; border-bottom: 1px solid var(--hair); }
  .hdr.slim, .hdr.slim .hdr-bg { min-height: 74px; height: auto; }
  .hdr-row { height: 74px; padding-inline: 32px; }
  .hdr-row .hdr-title { text-align: start; font-size: 22px; }
  .hdr-row .hdr-title.brandmark { display: none; }
  .hdr-search { display: inline-flex; flex: 0 1 440px; margin-inline-end: auto; }
  .hdr-search + .hdr-title { order: -1; }
  .search-icon-btn { display: none; }
  .hdr-body { padding: 4px 32px 18px; }
  .hide-desk { display: none !important; }
}

/* ---------- Charge card: the signature element ---------- */
.charge {
  position: relative; overflow: hidden; padding: 18px 20px 16px;
  border-radius: var(--r-xl);
  background:
    radial-gradient(420px 180px at 100% 0, rgba(90, 169, 255, .16), transparent 70%),
    linear-gradient(160deg, var(--raised) 0%, #142650 55%, #101F44 100%);
  border: 1px solid rgba(232, 190, 98, .28);
  box-shadow: var(--shadow), inset 0 1px 0 rgba(255, 255, 255, .06);
}
.charge-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.charge-label { color: var(--muted); font-size: 14px; }
.charge-amount {
  margin: 4px 0 12px; font-size: 40px; line-height: 1.1; font-weight: 600; letter-spacing: -.02em;
  color: var(--gold); white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  font-variant-numeric: tabular-nums lining-nums;
}
.charge-line { position: relative; display: flex; align-items: center; gap: 8px; height: 22px; }
/* The line is a meter: the track is the empty part, .fill grows with the balance (--level 0..1, set in JS).
   Tiers recolour it: empty (dim bolt), low (red: time to recharge), mid (electric), high (electric → gold). */
.charge-line .bar {
  position: relative; flex: 1; height: 4px; border-radius: 4px;
  background: rgba(102, 128, 181, .22);
}
.charge-line .fill {
  --tip: var(--gold); --glow: rgba(90, 169, 255, .35);
  position: absolute; inset-block: 0; inset-inline-start: 0; overflow: hidden; border-radius: 4px;
  width: calc(var(--level, 0) * 100%);
  background: linear-gradient(90deg, rgba(90, 169, 255, .25), var(--electric) 45%, var(--tip));
  box-shadow: 0 0 14px var(--glow);
  transition: width .7s var(--ease), box-shadow .4s;
}
html[dir="rtl"] .charge-line .fill { background: linear-gradient(270deg, rgba(90, 169, 255, .25), var(--electric) 45%, var(--tip)); }
.charge-line[data-tier="mid"] .fill { --tip: var(--electric); }
.charge-line[data-tier="low"] .fill { --tip: var(--bad); --glow: rgba(255, 123, 123, .35); background: linear-gradient(90deg, rgba(255, 123, 123, .3), var(--bad)); }
html[dir="rtl"] .charge-line[data-tier="low"] .fill { background: linear-gradient(270deg, rgba(255, 123, 123, .3), var(--bad)); }
.charge-line .fill::after {
  content: ""; position: absolute; inset: 0; width: 40%; transform: translateX(-120%);
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .85), transparent);
}
.charge-line .bolt { width: 20px; height: 20px; fill: var(--gold); filter: drop-shadow(0 0 6px rgba(232, 190, 98, .7)); transition: fill .4s, filter .4s, opacity .4s; }
.charge-line[data-tier="mid"] .bolt { fill: var(--electric); filter: drop-shadow(0 0 6px rgba(90, 169, 255, .6)); }
.charge-line[data-tier="low"] .bolt { fill: var(--bad); filter: drop-shadow(0 0 6px rgba(255, 123, 123, .6)); }
.charge-line[data-tier="empty"] .bolt { fill: var(--line); filter: none; opacity: .7; }
.charge.charging .charge-line .fill::after { animation: sweep .9s var(--ease) 1; }
.charge.charging .charge-line .bolt { animation: zap .9s var(--ease) 1; }
@keyframes sweep { to { transform: translateX(260%); } }
@keyframes zap { 30% { transform: scale(1.35) rotate(-8deg); } }
.charge-foot { display: flex; align-items: center; gap: 8px; margin-top: 12px; }
.charge-foot .acct { flex: 1; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; white-space: nowrap; }
@media (min-width: 960px) { .charge-amount { font-size: 44px; } }
.panel .charge-amount { font-size: 38px; }

.seg { display: inline-flex; padding: 3px; border-radius: 999px; background: var(--field); border: 1px solid var(--line); }
.seg button { border: 0; background: none; min-width: 52px; min-height: 34px; padding: 0 12px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; }
.seg button.on { background: var(--gold); color: var(--on-gold); }
.seg button:not(.on):hover { color: var(--text); }

/* Marquee (pausable — WCAG 2.2.2) */
.marquee { display: flex; align-items: center; gap: 6px; margin-top: 12px; padding: 0 4px 0 14px; border-radius: 999px; background: rgba(7, 15, 36, .55); border: 1px solid var(--hair); }
.marquee-view { flex: 1; overflow: hidden; white-space: nowrap; padding: 9px 0; font-size: 14px; color: var(--text); }
.marquee-track { display: inline-flex; gap: 56px; padding-inline-start: 100%; animation: marquee var(--marquee-dur, 22s) linear infinite; }
.marquee.paused .marquee-track, .marquee:hover .marquee-track, .marquee:focus-within .marquee-track { animation-play-state: paused; }
.marquee .icon-btn { width: 36px; height: 36px; color: var(--muted); }
html[dir="rtl"] .marquee-track { animation-name: marquee-rtl; }
@keyframes marquee { to { transform: translateX(-100%); } }
@keyframes marquee-rtl { to { transform: translateX(100%); } }

/* ---------- Sections ---------- */
.section { margin-top: 26px; }
.section:first-child { margin-top: 0; }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 10px; }
.section-title { font-size: 18px; font-weight: 600; color: var(--text); background: none; border: 0; padding: 0; text-align: start; }
.see-all { display: inline-flex; align-items: center; min-height: 40px; padding: 0 10px; margin-inline-end: -10px; border-radius: 999px; font-size: 14px; font-weight: 500; white-space: nowrap; }
.see-all:hover { background: rgba(90, 169, 255, .1); text-decoration: none; }

/* ---------- Promotions ---------- */
.promo { position: relative; border-radius: var(--r-lg); overflow: hidden; aspect-ratio: 2.4 / 1; background: var(--surface); }
.promo-track { display: flex; height: 100%; overflow-x: auto; scroll-snap-type: x mandatory; scrollbar-width: none; }
.promo-track::-webkit-scrollbar { display: none; }
.promo-track img { flex: 0 0 100%; width: 100%; height: 100%; object-fit: cover; scroll-snap-align: center; }
.promo-dots { position: absolute; bottom: 6px; inset-inline: 0; display: flex; justify-content: center; gap: 2px; }
.promo-dots button { width: 24px; height: 24px; display: grid; place-items: center; background: none; border: 0; padding: 0; cursor: pointer; }
.promo-dots button i { width: 7px; height: 7px; border-radius: 4px; background: rgba(255, 255, 255, .55); transition: width .3s var(--ease), background .3s; }
.promo-dots button.on i { width: 20px; background: var(--gold); }
@media (min-width: 960px) { .promo { aspect-ratio: 3.6 / 1; } }

/* ---------- Category strip (home) ---------- */
.strip { display: flex; gap: 14px; overflow-x: auto; padding: 2px 2px 10px; scroll-snap-type: x proximity; scrollbar-width: none; }
.strip::-webkit-scrollbar { display: none; }
.chip-tile { flex: 0 0 84px; scroll-snap-align: start; background: none; border: 0; padding: 0; cursor: pointer; text-align: center; color: var(--text); border-radius: var(--r-md); }
.chip-tile .thumb { width: 76px; height: 76px; margin: 0 auto; border-radius: 22px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); transition: transform .25s var(--ease), box-shadow .25s; }
.chip-tile:hover .thumb { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--gold), 0 10px 20px -8px rgba(0, 0, 0, .6); }
.chip-tile:active .thumb { transform: scale(.96); }
.chip-tile .thumb img { width: 100%; height: 100%; object-fit: cover; }
.chip-tile .name { margin-top: 7px; font-size: 13px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
@media (min-width: 960px) {
  .strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); overflow: visible; gap: 18px 14px; }
  .chip-tile .thumb { width: 88px; height: 88px; border-radius: 26px; }
}

/* ---------- Grids ---------- */
.grid { display: grid; gap: 16px 12px; grid-template-columns: repeat(3, minmax(0, 1fr)); }
@media (min-width: 600px) { .grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 22px 16px; } }
.grid.cards { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 600px) { .grid.cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 960px) { .grid.cards { grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); } }

/* Group / category cards — the app's CatalogCardStyle gradients */
.gcard {
  display: flex; flex-direction: column; align-items: center; gap: 10px; padding: 14px 12px;
  border-radius: 22px; border: 1px solid rgba(255, 255, 255, .1); cursor: pointer; color: var(--text); text-align: center;
  transition: transform .25s var(--ease), box-shadow .25s;
}
.gcard:hover { transform: translateY(-3px); box-shadow: 0 16px 30px -14px rgba(0, 0, 0, .7); }
.gcard:active { transform: scale(.98); }
.gcard .thumb { width: 100%; max-width: 150px; aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: rgba(0, 0, 0, .2); }
.gcard .thumb img { width: 100%; height: 100%; object-fit: cover; }
.gcard .name { font-weight: 600; font-size: 15px; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.g0 { background: linear-gradient(135deg, #1E4A55, #12333C); }
.g1 { background: linear-gradient(135deg, #3A2F5C, #251E42); }
.g2 { background: linear-gradient(135deg, #2A3447, #1C2433); }
.g3 { background: linear-gradient(135deg, #3D4530, #2A3022); }
.g4 { background: linear-gradient(135deg, #1A2540, #121A2E); }
.g5 { background: linear-gradient(135deg, #4A2A3D, #301A28); }
.g6 { background: linear-gradient(135deg, #1F3D4F, #152A38); }
.g7 { background: linear-gradient(135deg, #2E3A5C, #1E2840); }

/* Item tiles */
.item { background: none; border: 0; padding: 0; cursor: pointer; color: var(--text); text-align: center; min-width: 0; border-radius: var(--r-md); }
.item .thumb { aspect-ratio: 1; border-radius: 20px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); transition: transform .25s var(--ease), box-shadow .25s; }
.item:hover .thumb { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--gold), 0 12px 24px -10px rgba(0, 0, 0, .7); }
.item:active .thumb { transform: scale(.97); }
.item .thumb img { width: 100%; height: 100%; object-fit: cover; }
.item .name { margin-top: 8px; font-size: 13px; font-weight: 500; line-height: 1.35; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.item .price { margin-top: 2px; color: var(--gold); font-weight: 600; font-size: 14px; font-variant-numeric: tabular-nums; }
.item[disabled] { cursor: not-allowed; }
.item[disabled] .thumb { filter: grayscale(1) brightness(.6); transform: none; box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); }
.item[disabled] .name, .item[disabled] .price { color: var(--muted); }
.item .soldout { display: inline-block; margin-top: 4px; padding: 1px 8px; border-radius: 999px; font-size: 12px; color: var(--muted); border: 1px solid var(--hair); }

/* ---------- Surfaces ---------- */
.card { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-lg); padding: 18px; }
.list { display: grid; gap: 12px; }
@media (min-width: 900px) { .list.two { grid-template-columns: 1fr 1fr; } }
/* Grouped rows: one panel with dividers instead of a pile of identical cards */
.rows { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-lg); overflow: hidden; }
.rows > * + * { border-top: 1px solid var(--hair); }
.kv { display: flex; align-items: center; gap: 14px; padding: 13px 0; }
.kv + .kv { border-top: 1px solid var(--hair); }
.kv > .icon { color: var(--muted); }
.kv .k { color: var(--muted); font-size: 13px; }
.kv .v { font-weight: 500; word-break: break-word; }
a.kv:hover { text-decoration: none; }
a.kv:hover .v { color: var(--electric); }

.menu { background: var(--surface); border: 1px solid var(--hair); border-radius: var(--r-lg); overflow: hidden; }
.menu-item {
  display: flex; align-items: center; gap: 14px; width: 100%; min-height: 56px; padding: 12px 18px; text-align: start;
  background: none; border: 0; cursor: pointer; font-weight: 500; font-size: 15px; transition: background .2s;
}
.menu-item + .menu-item { border-top: 1px solid var(--hair); }
.menu-item:hover { background: rgba(255, 255, 255, .04); }
.menu-item > .icon:first-child { color: var(--muted); }
.menu-item .chev { margin-inline-start: auto; color: var(--muted); font-size: 14px; }
.menu-item .chev.on { color: var(--ok); }
.menu-item.danger, .menu-item.danger > .icon:first-child { color: var(--bad); }

/* ---------- Forms ---------- */
.field { position: relative; display: block; margin-bottom: 20px; }
.field > .lbl { position: absolute; top: -9px; inset-inline-start: 16px; padding: 0 6px; font-size: 13px; font-weight: 500; color: var(--muted); background: var(--navy); border-radius: 4px; z-index: 1; transition: color .2s; }
.field:focus-within > .lbl { color: var(--electric); }
.modal .field > .lbl, .card .field > .lbl { background: var(--surface); }
.input {
  width: 100%; height: 54px; padding: 0 18px; border-radius: 999px; outline: none;
  background: var(--field); border: 1.5px solid var(--line); transition: border-color .2s, box-shadow .2s;
}
.input.box { border-radius: var(--r-md); }
.input:focus { border-color: var(--electric); box-shadow: 0 0 0 4px rgba(90, 169, 255, .22); }
.input::placeholder { color: #8390A8; }
.input:-webkit-autofill, .input:-webkit-autofill:focus { -webkit-box-shadow: 0 0 0 100px var(--field) inset; -webkit-text-fill-color: var(--text); caret-color: var(--text); transition: background-color 9999s; }
.input[aria-invalid="true"], .input-wrap:has([aria-invalid="true"]) { border-color: var(--bad); }
.input-wrap { display: flex; align-items: center; height: 54px; border-radius: 999px; background: var(--field); border: 1.5px solid var(--line); transition: border-color .2s, box-shadow .2s; }
.input-wrap.box { border-radius: var(--r-md); }
.input-wrap:focus-within { border-color: var(--electric); box-shadow: 0 0 0 4px rgba(90, 169, 255, .22); }
.input-wrap .input { border: 0; background: none; height: 100%; box-shadow: none; padding-inline: 0; }
.input-wrap .pre { padding-inline: 18px 6px; color: var(--muted); font-weight: 500; white-space: nowrap; direction: ltr; display: flex; align-items: center; }
.input-wrap .suf { min-width: 44px; height: 44px; margin-inline-end: 5px; color: var(--muted); display: grid; place-items: center; background: none; border: 0; border-radius: 999px; cursor: pointer; }
.input-wrap button.suf:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.input-wrap > .input:first-child { padding-inline-start: 18px; }
select.input { appearance: none; background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%); background-position: calc(100% - 22px) 24px, calc(100% - 16px) 24px; background-size: 6px 6px; background-repeat: no-repeat; }
html[dir="rtl"] select.input { background-position: 16px 24px, 22px 24px; }
.err { color: var(--bad); font-size: 13px; margin: -12px 8px 16px; display: flex; gap: 6px; align-items: center; }
input[type="date"]::-webkit-calendar-picker-indicator { filter: invert(.75); cursor: pointer; }
.code-inputs { display: flex; gap: 10px; justify-content: center; direction: ltr; }
.code-inputs input { width: 52px; height: 60px; text-align: center; font-size: 24px; font-weight: 600; border-radius: var(--r-md); border: 1.5px solid var(--line); background: var(--field); outline: none; font-variant-numeric: tabular-nums; }
.code-inputs input:focus { border-color: var(--electric); box-shadow: 0 0 0 4px rgba(90, 169, 255, .22); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 50px; padding: 0 22px;
  border-radius: 999px; border: 1.5px solid var(--line); background: var(--raised); color: var(--text);
  font-weight: 600; font-size: 15px; cursor: pointer; text-align: center; white-space: nowrap;
  transition: transform .12s, filter .2s, background .2s, border-color .2s, opacity .2s;
}
.btn:hover { text-decoration: none; filter: brightness(1.12); }
.btn:active { transform: scale(.98); }
.btn[disabled] { opacity: .45; cursor: not-allowed; transform: none; filter: none; }
.btn.block { width: 100%; }
.btn.primary {
  border-color: transparent; color: var(--on-gold);
  background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  box-shadow: 0 10px 24px -10px rgba(232, 190, 98, .55), inset 0 1px 0 rgba(255, 255, 255, .45);
}
.btn.ghost { background: none; border-color: transparent; color: var(--electric); }
.btn.ghost:hover { background: rgba(90, 169, 255, .1); filter: none; }
.btn.outline { background: none; }
.btn.sm { min-height: 40px; padding: 0 16px; font-size: 14px; }
.btn.xs { min-height: 34px; padding: 0 12px; font-size: 13px; }
.btn .spin { width: 18px; height: 18px; border-width: 2px; }
.link-btn { background: none; border: 0; color: var(--electric); font-weight: 500; cursor: pointer; padding: 4px; }

.spin { width: 28px; height: 28px; border-radius: 50%; border: 3px solid rgba(232, 190, 98, .25); border-top-color: var(--gold); animation: rot .8s linear infinite; display: inline-block; }
.btn.primary .spin { border-color: rgba(11, 22, 51, .2); border-top-color: var(--on-gold); }
@keyframes rot { to { transform: rotate(360deg); } }

/* Quantity stepper */
.stepper { display: flex; align-items: center; justify-content: center; gap: 22px; margin: 8px 0 20px; }
.stepper button { width: 52px; height: 52px; border-radius: 50%; border: 1.5px solid var(--line); background: var(--raised); color: var(--text); display: grid; place-items: center; cursor: pointer; transition: transform .12s, background .2s; }
.stepper button:hover { border-color: var(--gold); }
.stepper button:active { transform: scale(.94); }
.stepper button[disabled] { opacity: .35; cursor: not-allowed; }
.stepper output { min-width: 64px; text-align: center; font-size: 28px; font-weight: 600; font-variant-numeric: tabular-nums; }

/* ---------- Auth ---------- */
.auth.page { max-width: none; }
.auth { min-height: 100vh; display: grid; place-items: center; padding: 28px 20px calc(28px + var(--safe-b)); }
.auth > .auth-pane { width: 100%; display: grid; place-items: center; }
.auth-card { width: 100%; max-width: 400px; }
.auth-logo { width: 150px; margin: 0 auto -4px; filter: drop-shadow(0 14px 30px rgba(90, 169, 255, .25)); }
.auth-brand { text-align: center; color: var(--gold); font-size: 34px; font-weight: 600; letter-spacing: -.01em; }
.auth-title { text-align: center; font-size: 24px; font-weight: 500; margin: 2px 0 28px; }
.auth-sub { text-align: center; color: var(--muted); margin: -20px 0 28px; }
.auth-links { margin-top: 18px; display: grid; gap: 10px; justify-items: center; color: var(--muted); }
.auth-links a { font-weight: 500; }
.get-app { margin-top: 28px; padding-top: 20px; border-top: 1px solid var(--hair); display: grid; gap: 12px; }
.get-app .row { justify-content: center; }
.auth-hero { display: none; }
@media (min-width: 960px) {
  .auth { grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); padding: 0; place-items: stretch; }
  .auth > .auth-pane { padding: 48px; }
  .auth-pane .auth-logo { display: none; } /* the hero already shows the logo */
  .auth-hero {
    display: flex; flex-direction: column; justify-content: center; gap: 20px; padding: 72px 64px; position: relative; overflow: hidden;
    background: radial-gradient(640px 420px at 25% 30%, rgba(90, 169, 255, .14), transparent 70%), var(--ink);
    border-inline-end: 1px solid var(--hair);
  }
  .auth-hero img { width: 240px; filter: drop-shadow(0 24px 50px rgba(90, 169, 255, .25)); }
  .auth-hero h2 { font-size: 40px; line-height: 1.15; font-weight: 600; max-width: 14ch; letter-spacing: -.02em; }
  .auth-hero p { color: var(--muted); font-size: 17px; max-width: 42ch; margin: 0; }
  .auth-hero ul { list-style: none; padding: 0; margin: 6px 0 0; display: grid; gap: 12px; }
  .auth-hero li { display: flex; gap: 10px; align-items: center; }
  .auth-hero li .icon { color: var(--gold); }
}

/* ---------- Checkout ---------- */
.checkout { max-width: 540px; margin: 0 auto; }
.co-head { display: flex; gap: 16px; align-items: center; margin-bottom: 20px; }
.co-head .thumb { width: 80px; height: 80px; border-radius: 22px; overflow: hidden; box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); flex: none; background: var(--surface); }
.co-head .thumb img { width: 100%; height: 100%; object-fit: cover; }
.co-name { font-size: 22px; font-weight: 600; line-height: 1.25; }
.total-box { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; padding: 16px 20px; margin: 4px 0 8px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid rgba(232, 190, 98, .35); }
.total-box .v { font-size: 28px; font-weight: 600; color: var(--gold); font-variant-numeric: tabular-nums; }
.bal-line { display: flex; justify-content: space-between; color: var(--muted); font-size: 14px; margin: 0 6px 22px; font-variant-numeric: tabular-nums; }
.summary { display: grid; gap: 10px; margin: 4px 0 20px; }
.summary div { display: flex; justify-content: space-between; gap: 12px; }
.summary span:first-child { color: var(--muted); }
.summary span:last-child { font-weight: 500; text-align: end; word-break: break-word; }
.summary .total span:last-child { color: var(--gold); font-weight: 600; font-size: 18px; }

/* ---------- Orders ---------- */
.toolbar { display: grid; gap: 10px; margin-bottom: 14px; grid-template-columns: 1fr 1fr auto; align-items: end; }
.toolbar > :first-child { grid-column: 1 / -1; }
@media (min-width: 720px) { .toolbar { grid-template-columns: 1fr 170px 170px auto; } .toolbar > :first-child { grid-column: auto; } }
.date-field { display: grid; gap: 4px; font-size: 13px; color: var(--muted); }
.date-field .input { height: 48px; border-radius: var(--r-md); padding: 0 12px; }
/* Orders filters: search + sort, quick dates, status with counts, summary */
.filters { display: grid; grid-template-columns: minmax(0, 1fr); gap: 10px; margin-bottom: 16px; } /* minmax(0,…) lets the chip rows scroll instead of widening the page */
.filter-top { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.filter-top .input-wrap { height: 48px; flex: 1 1 100%; min-width: 0; }
.sort-select { width: auto; height: 44px; padding-inline-end: 40px; flex: 1 1 auto; }
@media (min-width: 720px) {
  .filter-top { flex-wrap: nowrap; }
  .filter-top .input-wrap { flex: 1 1 auto; }
  .sort-select { flex: none; height: 48px; }
}
.chips { display: flex; gap: 8px; overflow-x: auto; padding: 2px; margin: -2px; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
@media (min-width: 720px) { .chips { flex-wrap: wrap; overflow: visible; } }
.chip {
  display: inline-flex; align-items: center; gap: 8px; flex: none; min-height: 40px; padding: 0 14px;
  border-radius: 999px; border: 1.5px solid var(--hair); background: var(--surface); color: var(--muted);
  font-size: 14px; font-weight: 500; cursor: pointer; white-space: nowrap; transition: border-color .2s, background .2s, color .2s;
}
.chip:hover { color: var(--text); border-color: var(--line); }
.chip.on { color: var(--text); background: var(--raised); border-color: var(--electric); }
.chip .n { min-width: 22px; height: 22px; padding: 0 6px; border-radius: 11px; display: grid; place-items: center; font-size: 12px; font-variant-numeric: tabular-nums; background: var(--field); color: var(--muted); }
.chip.on .n { background: var(--electric); color: var(--ink); }
.custom-dates { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; max-width: 420px; }
.orders-summary { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 34px; color: var(--muted); font-size: 14px; font-variant-numeric: tabular-nums; }
.filter-note { display: flex; align-items: center; justify-content: space-between; gap: 8px; color: var(--muted); font-size: 14px; margin: 0 2px 12px; }
.order {
  position: relative; background: var(--surface); border: 1px solid var(--hair); border-radius: 18px; padding: 15px 18px 15px 20px;
  display: grid; gap: 8px; cursor: pointer; transition: border-color .2s, background .2s; overflow: hidden;
}
.order::before { content: ""; position: absolute; inset-block: 0; inset-inline-start: 0; width: 4px; background: var(--st, var(--hair)); }
.order[data-st="wait"], .order[data-st="pending_cod"] { --st: var(--warn); }
.order[data-st="completed"] { --st: var(--ok); }
.order[data-st="rejected"] { --st: var(--bad); }
.order:hover { border-color: var(--line); background: #192D57; }
.order-top { display: flex; align-items: flex-start; gap: 10px; }
.order-name { flex: 1; font-weight: 600; font-size: 16px; }
.order-total { color: var(--gold); font-weight: 600; font-size: 17px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.order-meta { display: flex; flex-wrap: wrap; gap: 4px 16px; color: var(--muted); font-size: 14px; }
.order-meta b { color: var(--text); font-weight: 500; font-variant-numeric: tabular-nums; }
.order-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.snap { display: inline-flex; gap: 6px; font-size: 13px; font-weight: 500; font-variant-numeric: tabular-nums; }
.snap .a { color: var(--after); }
.snap .b { color: var(--before); text-decoration: line-through; }
.note { display: flex; align-items: flex-start; gap: 10px; padding: 10px 12px; border-radius: var(--r-md); background: rgba(90, 169, 255, .08); border-inline-start: 3px solid var(--electric); font-size: 14px; white-space: pre-wrap; word-break: break-word; }
.copy-btn { flex: none; width: 40px; height: 40px; display: grid; place-items: center; border-radius: 12px; border: 0; background: rgba(255, 255, 255, .06); color: var(--text); cursor: pointer; transition: background .2s; }
.copy-btn:hover { background: rgba(90, 169, 255, .18); color: var(--electric); }
.copy-btn.done { color: var(--ok); }
.status { display: inline-flex; align-items: center; gap: 7px; padding: 4px 12px; border-radius: 999px; font-weight: 500; font-size: 13px; }
.status::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.status.wait, .status.pending_cod { color: var(--warn); background: var(--warn-bg); }
.status.wait::before { animation: blink 1.4s ease-in-out infinite; }
@keyframes blink { 50% { opacity: .25; } }
.status.completed { color: var(--ok); background: var(--ok-bg); }
.status.rejected { color: var(--bad); background: var(--bad-bg); }
.cards-list { display: grid; gap: 10px; }
.code-card { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r-md); background: var(--field); border: 1px solid var(--hair); }
.code-card pre { margin: 4px 0 0; font-family: ui-monospace, "Cascadia Mono", Menlo, Consolas, monospace; font-size: 16px; white-space: pre-wrap; word-break: break-all; color: var(--gold-hi); letter-spacing: .02em; }

/* Recent orders (desktop panel) */
.recent { display: grid; }
.recent a { display: flex; align-items: center; gap: 10px; padding: 11px 2px; color: var(--text); border-top: 1px solid var(--hair); }
.recent a:first-child { border-top: 0; }
.recent a:hover { text-decoration: none; background: rgba(255, 255, 255, .03); }
.recent .r-name { flex: 1; min-width: 0; font-size: 14px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.recent .r-total { font-size: 14px; color: var(--gold); font-variant-numeric: tabular-nums; }
.recent .status { padding: 2px 8px; font-size: 12px; }

/* Transactions / notifications / agents rows */
.tx { display: flex; gap: 14px; align-items: center; padding: 14px 18px; }
.tx-ico { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; flex: none; background: var(--raised); color: var(--muted); }
.tx-amt { font-weight: 600; white-space: nowrap; direction: ltr; font-variant-numeric: tabular-nums; }
.tx-amt.plus { color: var(--ok); }
.tx-amt.minus { color: var(--bad); }
.noti { display: flex; gap: 14px; padding: 14px 18px; }
.noti.unread { background: linear-gradient(90deg, rgba(90, 169, 255, .1), transparent 60%); }
.noti.unread .tx-ico { color: var(--electric); background: rgba(90, 169, 255, .14); }
.noti .msg { white-space: pre-wrap; word-break: break-word; }
.avatar { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; flex: none; background: linear-gradient(135deg, var(--gold-hi), var(--gold-lo)); color: var(--on-gold); font-weight: 600; font-size: 18px; }
.round-btn { width: 44px; height: 44px; border-radius: 14px; display: grid; place-items: center; color: var(--text); background: var(--raised); border: 1px solid var(--hair); }
.round-btn:hover { color: var(--electric); border-color: var(--line); }

/* Wallet */
.methods { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.method { display: grid; place-items: center; gap: 8px; padding: 18px 10px 14px; border-radius: var(--r-lg); cursor: pointer; background: #FFFFFF; border: 2px solid transparent; color: #0B1633; font-weight: 600; transition: transform .15s var(--ease), border-color .2s, box-shadow .2s; }
.method:hover { transform: translateY(-2px); border-color: var(--gold); box-shadow: 0 14px 28px -14px rgba(0, 0, 0, .7); }
.method:active { transform: scale(.98); }
.method img { height: 52px; width: auto; max-width: 100%; object-fit: contain; }
.pay-number { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: var(--r-md); background: var(--field); border: 1px solid var(--hair); margin-bottom: 18px; }
.pay-number b { font-size: 19px; font-weight: 600; color: var(--gold); direction: ltr; display: inline-block; font-variant-numeric: tabular-nums; }
.receipt-drop { display: grid; place-items: center; gap: 6px; padding: 20px; border-radius: var(--r-md); border: 1.5px dashed var(--line); color: var(--muted); cursor: pointer; text-align: center; margin-bottom: 18px; transition: border-color .2s, background .2s; }
.receipt-drop:hover, .receipt-drop.drag, .receipt-drop:focus-within { border-color: var(--electric); color: var(--text); background: rgba(90, 169, 255, .06); }
.receipt-drop img { max-height: 180px; border-radius: var(--r-sm); }

/* ---------- States ---------- */
.empty { display: grid; place-items: center; gap: 8px; padding: 52px 20px; text-align: center; color: var(--muted); }
.empty .empty-ico { width: 64px; height: 64px; border-radius: 22px; display: grid; place-items: center; background: var(--surface); color: var(--line); margin-bottom: 6px; }
.empty .empty-ico .icon { width: 30px; height: 30px; }
.empty .empty-title { color: var(--text); font-weight: 500; font-size: 16px; }
.empty .btn { margin-top: 10px; }
.skel { background: linear-gradient(90deg, var(--surface) 0%, #1F3465 50%, var(--surface) 100%); background-size: 200% 100%; animation: shimmer 1.4s infinite linear; border-radius: var(--r-md); }
@keyframes shimmer { to { background-position: -200% 0; } }
.skel-line { height: 14px; border-radius: 7px; }

/* ---------- Toast ---------- */
.toasts { position: fixed; z-index: 100; left: 50%; transform: translateX(-50%); bottom: calc(var(--nav-h) + var(--safe-b) + 14px); display: grid; gap: 8px; width: min(92vw, 420px); pointer-events: none; }
@media (min-width: 960px) { .toasts { bottom: 28px; } }
.toast { display: flex; align-items: center; gap: 10px; padding: 13px 16px; border-radius: 16px; background: var(--raised); border: 1px solid var(--line); box-shadow: var(--shadow); font-weight: 500; animation: toast-in .3s var(--ease) both; pointer-events: auto; }
.toast.ok .icon { color: var(--ok); }
.toast.bad { border-color: rgba(255, 123, 123, .6); }
.toast.bad .icon { color: var(--bad); }
.toast.out { animation: toast-out .25s ease both; }
@keyframes toast-in { from { opacity: 0; transform: translateY(12px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Sheet / dialog ---------- */
.scrim { position: fixed; inset: 0; z-index: 80; background: rgba(4, 9, 22, .7); backdrop-filter: blur(4px); display: flex; align-items: flex-end; justify-content: center; animation: fade .2s ease both; }
@keyframes fade { from { opacity: 0; } }
.modal { width: 100%; max-width: 500px; max-height: 92vh; overflow: auto; background: var(--surface); border: 1px solid var(--hair); border-bottom: 0; border-radius: var(--r-xl) var(--r-xl) 0 0; padding: 10px 20px calc(22px + var(--safe-b)); animation: sheet-in .35s var(--ease) both; }
.modal::before { content: ""; display: block; width: 40px; height: 5px; border-radius: 3px; background: var(--line); margin: 0 auto 14px; opacity: .7; }
@keyframes sheet-in { from { transform: translateY(48px); opacity: 0; } }
@media (min-width: 640px) {
  .scrim { align-items: center; }
  .modal { border-radius: 24px; border-bottom: 1px solid var(--hair); padding: 24px; animation-name: dialog-in; }
  .modal::before { display: none; }
}
@keyframes dialog-in { from { transform: translateY(14px) scale(.98); opacity: 0; } }
.modal-head { display: flex; align-items: center; gap: 8px; margin-bottom: 18px; }
.modal-title { flex: 1; font-size: 20px; font-weight: 600; }
.modal-actions { display: flex; gap: 10px; margin-top: 10px; }
.modal-actions .btn { flex: 1; }

/* ---------- Order "charging" moment ---------- */
.charging-overlay { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 24px; background: rgba(4, 9, 22, .82); backdrop-filter: blur(6px); animation: fade .25s ease both; }
.charging-box { display: grid; justify-items: center; gap: 14px; text-align: center; max-width: 340px; }
.charging-box:focus { outline: none; } /* focus is moved here for screen readers; nothing to activate */
.charging-ring { position: relative; width: 132px; height: 132px; display: grid; place-items: center; border-radius: 50%; background: radial-gradient(circle, rgba(90, 169, 255, .18), transparent 70%); }
.charging-ring::before { content: ""; position: absolute; inset: 0; border-radius: 50%; border: 2px solid rgba(90, 169, 255, .25); border-top-color: var(--electric); animation: rot 1.1s linear infinite; }
.charging-bolt { width: 64px; height: 64px; overflow: visible; }
.charging-bolt path { fill: transparent; stroke: var(--gold); stroke-width: 1.3; stroke-linejoin: round; stroke-dasharray: 60; stroke-dashoffset: 60; animation: draw 1.4s var(--ease) infinite; }
@keyframes draw { 55% { stroke-dashoffset: 0; fill: transparent; } 75%, 100% { stroke-dashoffset: 0; fill: rgba(232, 190, 98, .35); } }
.charging-overlay.done .charging-ring::before { animation: none; border-color: var(--gold); }
.charging-overlay.done .charging-bolt path { animation: none; stroke-dashoffset: 0; fill: var(--gold); }
.charging-overlay.done .charging-ring { animation: pop .5s var(--ease) both; background: radial-gradient(circle, rgba(232, 190, 98, .28), transparent 70%); }
@keyframes pop { 40% { transform: scale(1.12); } }
.charging-title { font-size: 20px; font-weight: 600; }
.charging-hint { color: var(--muted); font-size: 14px; min-height: 2.6em; }

/* Install / push banner */
.banner-slot { padding: 12px 16px 0; }
.banner-slot:has(> div:empty) { display: none; }
@media (min-width: 960px) { .banner-slot { padding: 16px 32px 0; } }
.install-banner { display: flex; align-items: flex-start; gap: 14px; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--hair); border-inline-start: 3px solid var(--electric); }
.install-banner .tx-ico { color: var(--electric); background: rgba(90, 169, 255, .14); }
.ios-steps { display: grid; gap: 14px; margin: 6px 0 18px; padding: 0; list-style: none; counter-reset: s; }
.ios-steps li { display: flex; align-items: center; gap: 12px; counter-increment: s; }
.ios-steps li::before { content: counter(s); width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); border: 1px solid var(--line); font-weight: 600; flex: none; }
.ios-steps .icon { color: var(--electric); }
.store-btn { display: inline-flex; align-items: center; gap: 10px; min-height: 48px; padding: 0 18px; border-radius: var(--r-md); background: #000; border: 1px solid #3A3A3A; color: #fff; font-weight: 500; }
.store-btn:hover { text-decoration: none; border-color: #666; }
.store-btn small { display: block; font-size: 10px; opacity: .8; line-height: 1; }
.store-btn span { line-height: 1.15; text-align: start; }

/* ---------- Charrjli Assistant (chat) ----------
   Same language as the charge card: navy layers, an electric→gold "energy" ring, gold only for money and the main action. */
.chat-fab {
  position: fixed; z-index: 60; inset-inline-end: 16px; bottom: 20px;
  width: 58px; height: 58px; border-radius: 50%; border: 0; cursor: pointer; display: grid; place-items: center;
  color: var(--gold); background: radial-gradient(circle at 30% 25%, var(--raised), var(--ink) 75%);
  box-shadow: 0 14px 30px -10px rgba(0, 0, 0, .75), 0 0 0 1px rgba(255, 255, 255, .06) inset;
  transition: transform .2s var(--ease), box-shadow .2s;
}
body:has(.tabbar) .chat-fab { bottom: calc(var(--nav-h) + var(--safe-b) + 14px); }
.chat-fab .icon { width: 27px; height: 27px; filter: drop-shadow(0 0 6px rgba(232, 190, 98, .55)); position: relative; }
.chat-fab-ring {
  position: absolute; inset: -2px; border-radius: 50%; padding: 2px;
  background: conic-gradient(from 200deg, var(--electric), var(--gold), rgba(90, 169, 255, .2), var(--electric));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
  animation: rot 6s linear infinite;
}
.chat-fab::after { content: ""; position: absolute; inset: -6px; border-radius: 50%; border: 2px solid rgba(90, 169, 255, .45); animation: fab-pulse 2.6s var(--ease) 3; pointer-events: none; opacity: 0; }
@keyframes fab-pulse { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.25); opacity: 0; } }
.chat-fab:hover { transform: translateY(-2px) scale(1.04); box-shadow: 0 18px 36px -10px rgba(0, 0, 0, .8), 0 0 22px rgba(90, 169, 255, .25); }
.chat-fab:active { transform: scale(.96); }
@media (min-width: 960px) { .chat-fab, body:has(.tabbar) .chat-fab { bottom: 24px; inset-inline-end: 24px; width: 62px; height: 62px; } }

.chat-panel {
  position: fixed; z-index: 70; inset: 0; display: flex; flex-direction: column;
  background: radial-gradient(520px 260px at 80% -60px, rgba(90, 169, 255, .14), transparent 70%), var(--navy);
  padding-top: var(--safe-t); animation: chat-in .32s var(--ease) both;
}
@keyframes chat-in { from { opacity: 0; transform: translateY(24px); } }
html.chat-open, html.chat-open body { overflow: hidden; }
@media (min-width: 641px) {
  html.chat-open, html.chat-open body { overflow: visible; }
  html.chat-open body { overflow-x: hidden; }
  .chat-panel {
    inset: auto; inset-inline-end: 24px; bottom: 24px; width: 400px; height: min(680px, calc(100vh - 48px));
    border-radius: 24px; border: 1px solid var(--hair); overflow: hidden; padding-top: 0;
    box-shadow: 0 30px 70px -20px rgba(0, 0, 0, .85), 0 0 0 1px rgba(90, 169, 255, .06);
  }
}

.chat-head { display: flex; align-items: center; gap: 10px; padding-block: 12px; padding-inline: 14px 8px; border-bottom: 1px solid var(--hair); background: rgba(7, 15, 36, .55); backdrop-filter: blur(10px); }
.chat-head .icon-btn { width: 40px; height: 40px; color: var(--muted); }
.chat-head .icon-btn:hover { color: var(--text); }
.chat-title { font-size: 16px; font-weight: 600; line-height: 1.2; }
.chat-sub { margin: 2px 0 0; font-size: 12.5px; color: var(--muted); display: flex; align-items: center; gap: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chat-sub .online { width: 7px; height: 7px; border-radius: 50%; background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 211, 153, .18); flex: none; }

.chat-avatar {
  position: relative; width: 40px; height: 40px; flex: none; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle at 30% 25%, var(--raised), var(--ink) 80%); color: var(--gold);
}
.chat-avatar::before {
  content: ""; position: absolute; inset: -2px; border-radius: 50%; padding: 2px;
  background: conic-gradient(from 200deg, var(--electric), var(--gold), rgba(90, 169, 255, .2), var(--electric));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.chat-avatar .icon { width: 20px; height: 20px; filter: drop-shadow(0 0 5px rgba(232, 190, 98, .6)); }
.chat-avatar.lg { width: 72px; height: 72px; }
.chat-avatar.lg .icon { width: 34px; height: 34px; }
.chat-avatar.lg::before { animation: rot 5s linear infinite; }

.chat-log { flex: 1; overflow-y: auto; overscroll-behavior: contain; padding: 16px 14px 8px; display: flex; flex-direction: column; gap: 10px; scrollbar-width: thin; scrollbar-color: var(--hair) transparent; }

.chat-welcome { margin: auto 0; display: grid; justify-items: center; text-align: center; gap: 10px; padding: 16px 6px; }
.chat-welcome h3 { font-size: 20px; font-weight: 600; margin-top: 6px; }
.chat-welcome p { margin: 0; color: var(--muted); font-size: 14px; max-width: 32ch; }
.chat-chips { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 10px; }
.chat-chip {
  min-height: 38px; padding: 0 14px; border-radius: 999px; border: 1px solid var(--line); background: var(--field);
  color: var(--text); font-size: 13.5px; font-weight: 500; cursor: pointer; transition: border-color .2s, background .2s, transform .12s;
}
.chat-chip:hover { border-color: var(--electric); background: rgba(90, 169, 255, .1); }
.chat-chip:active { transform: scale(.97); }

.chat-msg { display: flex; flex-direction: column; gap: 8px; max-width: 88%; animation: msg-in .25s var(--ease) both; }
@keyframes msg-in { from { opacity: 0; transform: translateY(6px); } }
.chat-msg.user { align-self: flex-end; align-items: flex-end; }
.chat-msg.bot { align-self: flex-start; align-items: flex-start; }
.chat-msg .bubble { padding: 10px 14px; border-radius: 18px; font-size: 14.5px; line-height: 1.55; word-break: break-word; }
.chat-msg.user .bubble {
  background: linear-gradient(180deg, #22407D, #1B3468); border: 1px solid rgba(90, 169, 255, .35);
  border-end-end-radius: 6px; white-space: pre-wrap;
}
.chat-msg.bot .bubble { background: var(--surface); border: 1px solid var(--hair); border-end-start-radius: 6px; }
.chat-msg.bot .bubble p { margin: 0; white-space: pre-wrap; }
.chat-msg.bot .bubble p + p, .chat-msg.bot .bubble p + ul, .chat-msg.bot .bubble ul + p, .chat-msg.bot .bubble p + ol, .chat-msg.bot .bubble ol + p { margin-top: 8px; }
.chat-msg.bot .bubble ul, .chat-msg.bot .bubble ol { margin: 4px 0; padding-inline-start: 20px; }
.chat-msg.bot .bubble li + li { margin-top: 3px; }
.chat-msg.bot .bubble strong { font-weight: 600; color: var(--gold-hi); }
.chat-msg.bot .bubble a { font-weight: 500; }
.chat-msg.err .bubble { border-color: rgba(255, 123, 123, .5); background: var(--bad-bg); }
.chat-msg.pending .bubble { color: var(--muted); font-style: italic; }
.voice-tag { display: inline-flex; vertical-align: -3px; margin-inline-end: 6px; color: var(--electric); }
.chat-msg.typing .bubble { display: flex; gap: 5px; padding: 14px 16px; }
.chat-msg.typing i { width: 7px; height: 7px; border-radius: 50%; background: var(--electric); animation: dots 1.2s ease-in-out infinite; }
.chat-msg.typing i:nth-child(2) { animation-delay: .15s; }
.chat-msg.typing i:nth-child(3) { animation-delay: .3s; }
@keyframes dots { 0%, 60%, 100% { transform: translateY(0); opacity: .45; } 30% { transform: translateY(-5px); opacity: 1; } }

/* Product tiles under a reply */
.chat-products { display: flex; gap: 10px; overflow-x: auto; max-width: 100%; padding: 2px 2px 6px; scroll-snap-type: x proximity; scrollbar-width: none; }
.chat-products::-webkit-scrollbar { display: none; }
.chat-prod { flex: 0 0 104px; scroll-snap-align: start; color: var(--text); text-align: center; border-radius: var(--r-md); }
.chat-prod:hover { text-decoration: none; }
.chat-prod .thumb { aspect-ratio: 1; border-radius: 16px; overflow: hidden; background: var(--surface); box-shadow: 0 0 0 1px rgba(255, 255, 255, .08); transition: transform .2s var(--ease), box-shadow .2s; }
.chat-prod:hover .thumb { transform: translateY(-2px); box-shadow: 0 0 0 2px var(--gold); }
.chat-prod .thumb img { width: 100%; height: 100%; object-fit: cover; }
.chat-prod .name { margin-top: 6px; font-size: 12.5px; font-weight: 500; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.chat-prod .price { font-size: 13px; font-weight: 600; color: var(--gold); font-variant-numeric: tabular-nums; }
.chat-prod.off .thumb { filter: grayscale(1) brightness(.6); }
.chat-prod.off .price { color: var(--muted); font-weight: 500; }

/* "Opened: PUBG Mobile" — the page the assistant opened; tap to open it again */
.chat-nav {
  display: inline-flex; align-items: center; gap: 6px; min-height: 34px; padding: 0 14px 0 10px; border-radius: 999px;
  border: 1px solid rgba(90, 169, 255, .45); background: rgba(90, 169, 255, .1); color: var(--electric); font-size: 13px; font-weight: 500;
}
html[dir="rtl"] .chat-nav { padding: 0 10px 0 14px; }
.chat-nav:hover { text-decoration: none; background: rgba(90, 169, 255, .18); }

/* Confirmation card: looks like the charge card, so it reads as "money moves here" */
.chat-confirm {
  position: relative; overflow: hidden; width: min(320px, 100%); padding: 16px 14px 12px; border-radius: var(--r-lg);
  background: radial-gradient(260px 120px at 100% 0, rgba(90, 169, 255, .14), transparent 70%), linear-gradient(160deg, var(--raised), #132449);
  border: 1px solid rgba(232, 190, 98, .4); box-shadow: var(--shadow);
}
.chat-confirm::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 3px; background: linear-gradient(90deg, rgba(90, 169, 255, .3), var(--electric) 45%, var(--gold)); }
.chat-confirm.working::after {
  content: ""; position: absolute; inset: 0 auto auto 0; height: 3px; width: 40%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, .9), transparent); animation: cc-sweep 1.1s linear infinite;
}
@keyframes cc-sweep { from { transform: translateX(-100%); } to { transform: translateX(260%); } }
.chat-confirm.cancelled, .chat-confirm.expired { opacity: .7; border-color: var(--hair); }
.chat-confirm.done { border-color: rgba(52, 211, 153, .55); }
.chat-confirm.failed, .chat-confirm.uncertain { border-color: rgba(255, 123, 123, .55); }
.cc-head { display: flex; align-items: center; gap: 12px; margin-bottom: 10px; }
.cc-head .thumb { width: 52px; height: 52px; border-radius: 14px; overflow: hidden; flex: none; background: var(--surface); box-shadow: 0 0 0 1px rgba(255, 255, 255, .1); }
.cc-head .thumb img { width: 100%; height: 100%; object-fit: cover; }
.cc-head .thumb.ico { display: grid; place-items: center; color: var(--gold); }
.cc-label { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; letter-spacing: .02em; text-transform: uppercase; color: var(--gold); }
.cc-label .icon { width: 14px; height: 14px; }
.cc-name { font-weight: 600; font-size: 15px; line-height: 1.3; }
.cc-rows { display: grid; gap: 6px; padding: 10px 0; border-top: 1px solid var(--hair); border-bottom: 1px solid var(--hair); }
.cc-row { display: flex; justify-content: space-between; gap: 12px; font-size: 13.5px; }
.cc-row span:first-child { color: var(--muted); }
.cc-row span:last-child { font-weight: 500; text-align: end; word-break: break-word; font-variant-numeric: tabular-nums; }
.cc-row.total span:last-child { color: var(--gold); font-weight: 600; font-size: 16px; }
.cc-foot { display: flex; gap: 8px; margin-top: 12px; }
.cc-foot > .btn { flex: 1; }
.cc-status { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; font-size: 13.5px; font-weight: 500; width: 100%; }
.cc-status .spin { width: 18px; height: 18px; border-width: 2px; }
.cc-status.ok { color: var(--ok); }
.cc-status.bad { color: var(--bad); }
.cc-status.muted { color: var(--muted); font-weight: 400; }
.cc-status .btn { margin-inline-start: auto; color: var(--text); }

/* Composer: one round button that is the mic when empty and Send once you type (like voice-note apps) */
.chat-composer { padding: 10px 12px 4px; }
.chat-type, .chat-rec {
  display: flex; align-items: flex-end; gap: 6px; padding-block: 5px; padding-inline: 16px 5px; border-radius: 26px;
  background: var(--field); border: 1.5px solid var(--line); transition: border-color .2s, box-shadow .2s;
}
.chat-type:focus-within { border-color: var(--electric); box-shadow: 0 0 0 4px rgba(90, 169, 255, .2); }
.chat-input {
  flex: 1; min-width: 0; resize: none; border: 0; outline: none; background: none; padding: 10px 0; max-height: 132px;
  font-size: 15px; line-height: 1.45; scrollbar-width: thin;
}
.chat-input::placeholder { color: #8390A8; }
.chat-action {
  flex: none; width: 42px; height: 42px; border-radius: 50%; border: 0; display: grid; place-items: center; cursor: pointer;
  color: var(--on-gold); background: linear-gradient(180deg, var(--gold-hi), var(--gold) 55%, var(--gold-lo));
  box-shadow: 0 8px 18px -8px rgba(232, 190, 98, .6), inset 0 1px 0 rgba(255, 255, 255, .45);
  transition: transform .12s, filter .2s, opacity .2s;
}
.chat-action .icon { width: 21px; height: 21px; }
.chat-action.mic { color: var(--text); background: var(--raised); box-shadow: inset 0 0 0 1px var(--line); }
.chat-action.mic:hover { color: var(--electric); }
.chat-action:hover { filter: brightness(1.08); }
.chat-action:active { transform: scale(.94); }
.chat-action[disabled] { opacity: .45; cursor: not-allowed; transform: none; }
.chat-rec { align-items: center; padding: 5px; border-color: rgba(255, 123, 123, .55); }
.chat-rec .icon-btn { width: 42px; height: 42px; color: var(--muted); }
.rec-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--bad); flex: none; animation: blink 1s ease-in-out infinite; }
.rec-label { font-size: 13.5px; color: var(--muted); white-space: nowrap; }
.rec-bars { flex: 1; min-width: 0; height: 28px; display: flex; align-items: center; justify-content: center; gap: 3px; overflow: hidden; }
.rec-bars i { width: 3px; height: 100%; border-radius: 2px; background: linear-gradient(180deg, var(--electric), var(--gold)); transform: scaleY(.08); transition: transform .08s linear; }
.rec-time { font-variant-numeric: tabular-nums; font-size: 14px; font-weight: 600; min-width: 36px; text-align: center; }
@media (max-width: 380px) { .rec-label { display: none; } }
.chat-fine { margin: 0; padding: 2px 16px calc(10px + var(--safe-b)); text-align: center; font-size: 11.5px; color: var(--muted); }
@media (min-width: 641px) { .chat-fine { padding-bottom: 10px; } }

/* Respect "reduce motion": keep state changes, drop movement */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; scroll-behavior: auto !important; }
  .marquee-track { animation: none !important; padding: 0; white-space: normal; flex-wrap: wrap; gap: 4px 24px; }
  .charging-bolt path { stroke-dashoffset: 0; fill: rgba(232, 190, 98, .5); }
}
