:root {
  --bg: #f7f8f5;
  --surface: #ffffff;
  --surface-soft: #f0f3ee;
  --ink: #18201c;
  --muted: #69736d;
  --line: #dfe5df;
  --green: #167a4a;
  --green-dark: #0d5d37;
  --green-soft: #e3f3e9;
  --blue: #2468a2;
  --blue-soft: #e7f0f8;
  --amber: #9a6206;
  --amber-soft: #fbf0d8;
  --red: #b63a3a;
  --red-soft: #f9e7e5;
  --sidebar: #17251e;
  --green-hover: #0d5d37;
  --danger-border: #ecc2bf;
  --mobile-nav: rgba(255, 255, 255, .96);
  --shadow: 0 12px 36px rgba(24, 32, 28, .08);
  color-scheme: light;
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  color: var(--ink);
  background: var(--bg);
}

html[data-theme="dark"] {
  --bg: #0d1310;
  --surface: #151d19;
  --surface-soft: #1d2822;
  --ink: #eef4f0;
  --muted: #9aa8a0;
  --line: #2d3a33;
  --green: #208c58;
  --green-dark: #64d99b;
  --green-soft: #173b29;
  --green-hover: #176f47;
  --blue: #76b4e5;
  --blue-soft: #172f42;
  --amber: #e6ad4a;
  --amber-soft: #3a2d17;
  --red: #ee8585;
  --red-soft: #3c2020;
  --sidebar: #080d0a;
  --danger-border: #674141;
  --mobile-nav: rgba(15, 22, 18, .96);
  --shadow: 0 16px 42px rgba(0, 0, 0, .32);
  color-scheme: dark;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
html { min-width: 320px; background: var(--bg); }
body { margin: 0; min-height: 100vh; background: var(--bg); letter-spacing: 0; }
button, input { font: inherit; letter-spacing: 0; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .48; }
img { display: block; max-width: 100%; }

.boot-screen {
  position: fixed; inset: 0; display: grid; place-content: center; justify-items: center;
  gap: 18px; padding: 24px; background: var(--bg); z-index: 100;
}
.boot-logo { width: 82px; height: 82px; object-fit: contain; border-radius: 6px; }
.boot-copy { display: grid; gap: 5px; text-align: center; }
.boot-copy strong { font-size: 21px; }
.boot-copy span { color: var(--muted); font-size: 14px; }
.boot-loader { width: 120px; height: 3px; overflow: hidden; background: var(--line); border-radius: 2px; }
.boot-loader::after { content: ""; display: block; width: 45%; height: 100%; background: var(--green); animation: loading 1.1s infinite ease-in-out; }
@keyframes loading { from { transform: translateX(-110%); } to { transform: translateX(250%); } }

.maintenance-screen {
  position: fixed; inset: 0; z-index: 90; display: grid; place-content: center; justify-items: center;
  gap: 13px; padding: 28px; background: var(--bg); text-align: center;
}
.maintenance-screen > img { width: 72px; height: 72px; object-fit: contain; margin-bottom: 4px; }
.maintenance-icon { width: 46px; height: 46px; display: grid; place-items: center; border-radius: 50%; color: var(--amber); background: var(--amber-soft); }
.maintenance-icon svg { width: 22px; }
.maintenance-screen h1 { margin: 2px 0 0; font-size: 24px; }
.maintenance-screen p { max-width: 430px; margin: 0; color: var(--muted); font-size: 13px; line-height: 1.6; }
.maintenance-state { display: flex; align-items: center; gap: 8px; margin-top: 8px; color: var(--muted); font-size: 11px; font-weight: 700; }
.maintenance-state span { width: 7px; height: 7px; border-radius: 50%; background: var(--amber); animation: maintenance-pulse 1.3s infinite ease-in-out; }
@keyframes maintenance-pulse { 50% { opacity: .35; } }

.app-shell { min-height: 100vh; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; z-index: 20; width: 250px; padding: 24px 16px 18px;
  background: var(--sidebar); color: #fff; display: flex; flex-direction: column;
}
.brand { display: flex; align-items: center; gap: 11px; min-height: 48px; padding: 0 8px; }
.brand img { width: 42px; height: 42px; object-fit: contain; border-radius: 5px; background: #fff; }
.brand div { display: grid; gap: 2px; min-width: 0; }
.brand strong { font-size: 17px; }
.brand span { color: #a8b9af; font-size: 11px; }
.side-nav { display: grid; gap: 4px; margin-top: 40px; }
.nav-item {
  display: flex; align-items: center; gap: 12px; width: 100%; min-height: 46px; padding: 0 13px;
  border: 0; border-radius: 6px; background: transparent; color: #aebdb4; text-align: left;
}
.nav-item svg { width: 19px; height: 19px; }
.nav-item:hover { color: #fff; background: rgba(255,255,255,.06); }
.nav-item.active { color: #fff; background: #286c4a; }
.sidebar-user { display: grid; grid-template-columns: 36px minmax(0,1fr) 34px 34px; gap: 8px; align-items: center; margin-top: auto; padding: 14px 6px 0; border-top: 1px solid rgba(255,255,255,.11); }
.avatar { width: 36px; height: 36px; display: grid; place-items: center; border-radius: 50%; background: #e5f2e9; color: #0d5d37; font-weight: 800; }
.user-copy { display: grid; min-width: 0; gap: 2px; }
.user-copy strong, .user-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-copy strong { font-size: 12px; }
.user-copy span { color: #9aaca1; font-size: 10px; }

.main-content { margin-left: 250px; min-height: 100vh; padding: 0 38px 70px; }
.topbar { min-height: 92px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); }
.topbar h1 { margin: 2px 0 0; font-size: 25px; line-height: 1.2; }
.eyebrow, .section-heading > div > span { color: var(--muted); font-size: 11px; text-transform: uppercase; font-weight: 700; }
.top-actions { display: flex; align-items: center; gap: 10px; }
.live-state { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 11px; margin-right: 4px; }
.live-state span { width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 0 4px var(--green-soft); }
.live-state.offline span { background: var(--amber); box-shadow: 0 0 0 4px var(--amber-soft); }
.balance-chip { min-height: 38px; display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); color: var(--ink); padding: 0 12px; font-weight: 750; }
.balance-chip svg { width: 17px; color: var(--green); }

.view { display: none; padding-top: 30px; }
.view.active { display: block; }
.welcome-row { display: flex; align-items: center; justify-content: space-between; gap: 20px; margin-bottom: 20px; }
.welcome-row p { margin: 0 0 5px; font-size: 17px; }
.welcome-row > div > span { color: var(--muted); font-size: 13px; }

.balance-band { display: flex; align-items: flex-end; justify-content: space-between; gap: 28px; min-height: 184px; padding: 30px; background: var(--sidebar); color: #fff; border-radius: 6px; overflow: hidden; position: relative; }
.balance-band::after { content: ""; position: absolute; width: 230px; height: 230px; border: 48px solid rgba(255,255,255,.055); border-radius: 50%; right: -70px; top: -100px; }
.balance-main, .balance-actions { position: relative; z-index: 1; }
.balance-main { display: grid; gap: 7px; }
.balance-main > span { color: #b8c8bf; font-size: 13px; }
.balance-main strong { font-size: 38px; line-height: 1.1; overflow-wrap: anywhere; }
.balance-main small { color: #94a79b; }
.balance-actions { display: flex; gap: 9px; flex-wrap: wrap; }

.primary-button, .secondary-button, .light-button, .outline-light-button {
  min-height: 42px; display: inline-flex; justify-content: center; align-items: center; gap: 8px; padding: 0 16px;
  border: 1px solid transparent; border-radius: 6px; font-weight: 750; font-size: 13px;
}
.primary-button { color: #fff; background: var(--green); }
.primary-button:hover { background: var(--green-hover); }
.primary-button.compact { min-height: 38px; padding: 0 13px; }
.secondary-button { color: var(--ink); background: var(--surface); border-color: var(--line); }
.secondary-button:hover { border-color: #aeb9b1; }
.light-button { color: var(--sidebar); background: #fff; }
.outline-light-button { color: #fff; background: transparent; border-color: rgba(255,255,255,.27); }
.primary-button svg, .secondary-button svg, .light-button svg, .outline-light-button svg { width: 17px; height: 17px; }
.full-width { width: 100%; }
.icon-button { width: 34px; height: 34px; padding: 0; display: grid; place-items: center; border: 0; border-radius: 5px; background: transparent; color: inherit; }
.icon-button:hover { background: rgba(127,127,127,.1); }
.icon-button svg { width: 18px; }
.theme-toggle { color: #c5d2ca; }
.top-theme-toggle { display: none; border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.admin-maintenance-button { border: 1px solid var(--line); background: var(--surface); color: var(--muted); }
.admin-maintenance-button.active { color: var(--amber); border-color: #e5c98f; background: var(--amber-soft); }
.admin-credit-button { border: 1px solid var(--line); background: var(--surface); color: var(--green); }

.stats-grid { display: grid; grid-template-columns: repeat(3, 1fr); border-bottom: 1px solid var(--line); }
.stat-item { min-height: 108px; display: flex; align-items: center; gap: 14px; padding: 20px 24px; border-right: 1px solid var(--line); }
.stat-item:last-child { border-right: 0; }
.stat-item > div { display: grid; gap: 2px; }
.stat-item strong { font-size: 23px; }
.stat-item > div span { color: var(--muted); font-size: 12px; }
.stat-icon { width: 39px; height: 39px; display: grid; place-items: center; border-radius: 6px; }
.stat-icon svg { width: 19px; }
.stat-icon.green { color: var(--green); background: var(--green-soft); }
.stat-icon.blue { color: var(--blue); background: var(--blue-soft); }
.stat-icon.amber { color: var(--amber); background: var(--amber-soft); }

.section-block { margin-top: 34px; }
.section-block.no-top-margin { margin-top: 0; }
.section-heading { min-height: 52px; display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 15px; }
.section-heading h2 { margin: 3px 0 0; font-size: 18px; }
.section-heading.page-heading { margin-bottom: 22px; }
.text-button { display: inline-flex; align-items: center; gap: 3px; border: 0; background: transparent; color: var(--green); padding: 7px 0; font-size: 12px; font-weight: 750; }
.text-button svg { width: 15px; }

.product-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; }
.product-card { min-width: 0; overflow: hidden; background: var(--surface); border: 1px solid var(--line); border-radius: 6px; }
.product-media { aspect-ratio: 16 / 9; background: var(--surface-soft); overflow: hidden; position: relative; }
.product-media img { width: 100%; height: 100%; object-fit: cover; }
.product-type { position: absolute; left: 9px; top: 9px; padding: 5px 8px; border-radius: 4px; background: rgba(24,32,28,.88); color: #fff; font-size: 10px; font-weight: 750; }
.product-body { display: grid; gap: 11px; padding: 14px; }
.product-copy { min-width: 0; }
.product-copy h3 { margin: 0 0 5px; font-size: 14px; overflow-wrap: anywhere; }
.product-copy p { min-height: 34px; margin: 0; color: var(--muted); font-size: 11px; line-height: 1.5; }
.stock-line { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 11px; }
.stock-line svg { width: 14px; }
.stock-line.out { color: var(--red); }
.product-buy-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.product-buy-row strong { font-size: 15px; color: var(--green-dark); overflow-wrap: anywhere; }
.buy-button { min-width: 38px; height: 36px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; border: 0; border-radius: 5px; padding: 0 10px; background: var(--green); color: #fff; font-size: 11px; font-weight: 750; }
.buy-button svg { width: 15px; }

.list-surface { border-top: 1px solid var(--line); }
.list-row { min-height: 70px; display: grid; grid-template-columns: minmax(0,1fr) auto; gap: 15px; align-items: center; border-bottom: 1px solid var(--line); padding: 12px 4px; }
.list-main { display: flex; align-items: center; gap: 12px; min-width: 0; }
.list-icon { flex: 0 0 auto; width: 36px; height: 36px; display: grid; place-items: center; border-radius: 6px; color: var(--green); background: var(--green-soft); }
.list-icon svg { width: 17px; }
.list-copy { display: grid; gap: 3px; min-width: 0; }
.list-copy strong, .list-copy span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.list-copy strong { font-size: 12px; }
.list-copy span { color: var(--muted); font-size: 10px; }
.list-value { display: grid; justify-items: end; gap: 4px; text-align: right; }
.list-value strong { font-size: 12px; }
.list-value span { color: var(--muted); font-size: 10px; }
.amount-positive { color: var(--green); }
.amount-negative { color: var(--red); }

.store-toolbar { display: flex; justify-content: space-between; gap: 15px; margin-bottom: 22px; }
.segmented { display: inline-grid; grid-auto-flow: column; gap: 3px; padding: 3px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.segmented button { min-height: 34px; min-width: 82px; padding: 0 12px; border: 0; border-radius: 4px; background: transparent; color: var(--muted); font-size: 12px; font-weight: 700; }
.segmented button.active { color: #fff; background: var(--sidebar); }
.search-box { width: min(300px, 100%); min-height: 42px; display: flex; align-items: center; gap: 9px; padding: 0 12px; border: 1px solid var(--line); border-radius: 6px; background: var(--surface); }
.search-box svg { width: 17px; color: var(--muted); }
.search-box input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 13px; }

.wallet-summary { min-height: 134px; display: flex; align-items: center; justify-content: space-between; gap: 24px; border-bottom: 1px solid var(--line); padding: 4px 0 25px; }
.wallet-summary > div { display: grid; gap: 5px; }
.wallet-summary span { color: var(--muted); font-size: 12px; }
.wallet-summary strong { font-size: 34px; overflow-wrap: anywhere; }
.wallet-summary small { color: var(--muted); }
.split-layout { display: grid; grid-template-columns: 1fr 1fr; gap: 48px; padding-top: 25px; }

.order-list, .key-list { display: grid; gap: 12px; }
.order-card, .key-card { background: var(--surface); border: 1px solid var(--line); border-radius: 6px; padding: 17px; }
.order-top, .key-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; }
.order-id, .key-title { display: grid; gap: 4px; min-width: 0; }
.order-id strong, .key-title strong { font-size: 13px; overflow-wrap: anywhere; }
.order-id span, .key-title span { color: var(--muted); font-size: 10px; }
.status-badge { display: inline-flex; align-items: center; min-height: 25px; padding: 0 8px; border-radius: 4px; font-size: 10px; font-weight: 750; white-space: nowrap; }
.status-badge.completed, .status-badge.active { color: var(--green-dark); background: var(--green-soft); }
.status-badge.inactive, .status-badge.pending { color: var(--amber); background: var(--amber-soft); }
.status-badge.expired { color: var(--red); background: var(--red-soft); }
.order-items { display: grid; gap: 10px; margin-top: 15px; padding-top: 13px; border-top: 1px solid var(--line); }
.order-item-line { display: flex; justify-content: space-between; gap: 12px; color: var(--muted); font-size: 12px; }
.order-item-line strong { color: var(--ink); }
.account-credential { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding: 10px; background: var(--surface-soft); border-radius: 5px; }
.credential-field { display: grid; gap: 3px; min-width: 0; }
.credential-field span { color: var(--muted); font-size: 9px; text-transform: uppercase; font-weight: 750; }
.credential-field strong { font-size: 11px; overflow-wrap: anywhere; }
.key-secret { display: flex; align-items: center; gap: 8px; margin: 14px 0; padding: 12px; background: var(--surface-soft); border-radius: 5px; }
.key-secret code { flex: 1; min-width: 0; font-size: 12px; overflow-wrap: anywhere; }
.key-bottom { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.key-bottom span { color: var(--muted); font-size: 11px; }
.danger-button { min-height: 34px; display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--danger-border); border-radius: 5px; padding: 0 11px; background: var(--surface); color: var(--red); font-size: 11px; font-weight: 750; }
.danger-button svg { width: 14px; }

.empty-state { min-height: 130px; display: grid; place-content: center; justify-items: center; gap: 9px; color: var(--muted); text-align: center; border-bottom: 1px solid var(--line); }
.empty-state svg { width: 25px; }
.empty-state strong { color: var(--ink); font-size: 13px; }
.empty-state span { font-size: 11px; }

.bottom-nav { display: none; }
.app-dialog { width: min(460px, calc(100% - 28px)); max-height: calc(100dvh - 28px); padding: 0; border: 0; border-radius: 7px; color: var(--ink); background: var(--surface); box-shadow: var(--shadow); }
.app-dialog::backdrop { background: rgba(12,20,16,.56); backdrop-filter: blur(2px); }
.dialog-shell { padding: 22px; overflow-y: auto; }
.dialog-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 15px; margin-bottom: 20px; }
.dialog-head > div { display: grid; gap: 3px; }
.dialog-head span { color: var(--muted); font-size: 10px; text-transform: uppercase; font-weight: 750; }
.dialog-head h2 { margin: 0; font-size: 19px; }
.field-label { display: block; margin-bottom: 7px; color: var(--muted); font-size: 11px; font-weight: 700; }
.money-input { height: 54px; display: flex; align-items: center; gap: 10px; padding: 0 15px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.money-input span { color: var(--green); font-size: 21px; font-weight: 800; }
.money-input input { width: 100%; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 21px; font-weight: 800; }
.content-input { width: 100%; min-height: 112px; resize: vertical; margin-bottom: 16px; padding: 12px; border: 1px solid var(--line); border-radius: 6px; outline: none; background: var(--bg); color: var(--ink); font: inherit; font-size: 13px; line-height: 1.5; letter-spacing: 0; }
.content-input:focus { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.amount-presets { display: grid; grid-template-columns: repeat(4, 1fr); gap: 7px; margin: 10px 0 18px; }
.amount-presets button { min-height: 34px; border: 1px solid var(--line); border-radius: 5px; background: var(--surface); color: var(--muted); font-size: 10px; font-weight: 700; }
.amount-presets button:hover { color: var(--green); border-color: var(--green); }
.qr-wrap { width: min(250px, 80%); aspect-ratio: 1; margin: 0 auto 14px; padding: 8px; border: 1px solid var(--line); border-radius: 6px; background: #fff; }
.qr-wrap img { width: 100%; height: 100%; object-fit: contain; }
.payment-status { display: flex; align-items: center; gap: 11px; padding: 12px; background: var(--amber-soft); border-radius: 6px; color: var(--amber); }
.payment-status.success { background: var(--green-soft); color: var(--green-dark); }
.payment-status > div { display: grid; gap: 2px; }
.payment-status strong { font-size: 12px; }
.payment-status small { font-size: 10px; }
.pulse-dot { width: 9px; height: 9px; border-radius: 50%; background: currentColor; box-shadow: 0 0 0 5px rgba(154,98,6,.12); }
.bank-details { display: grid; margin: 14px 0; }
.bank-details > div { display: grid; grid-template-columns: 120px minmax(0,1fr); gap: 12px; align-items: center; min-height: 42px; border-bottom: 1px solid var(--line); }
.bank-details dt { color: var(--muted); font-size: 10px; }
.bank-details dd { margin: 0; display: flex; align-items: center; justify-content: flex-end; gap: 6px; text-align: right; font-size: 11px; font-weight: 750; overflow-wrap: anywhere; }
.bank-details .transfer-code dd { color: var(--green-dark); font-size: 14px; }
.copy-button { width: 28px; height: 28px; display: grid; place-items: center; flex: 0 0 auto; border: 0; border-radius: 4px; background: var(--green-soft); color: var(--green); }
.copy-button svg { width: 14px; }
.purchase-preview { display: grid; grid-template-columns: 84px 1fr; gap: 13px; align-items: center; padding-bottom: 17px; border-bottom: 1px solid var(--line); }
.purchase-preview img { width: 84px; aspect-ratio: 1; object-fit: cover; border-radius: 5px; background: var(--surface-soft); }
.purchase-preview div { display: grid; gap: 5px; }
.purchase-preview strong { color: var(--green-dark); }
.purchase-preview span { color: var(--muted); font-size: 11px; line-height: 1.45; }
.key-days-row { padding: 17px 0 7px; border-bottom: 1px solid var(--line); }
.days-input { height: 50px; display: flex; align-items: center; gap: 10px; padding: 0 14px; border: 1px solid var(--line); border-radius: 6px; background: var(--bg); }
.days-input:focus-within { border-color: var(--green); box-shadow: 0 0 0 3px var(--green-soft); }
.days-input input { width: 100%; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--ink); font-size: 19px; font-weight: 800; }
.days-input span { color: var(--muted); font-size: 12px; font-weight: 700; }
.key-days-row small { display: block; min-height: 16px; margin-top: 6px; color: var(--muted); font-size: 10px; }
.quantity-row, .purchase-total { min-height: 60px; display: flex; align-items: center; justify-content: space-between; gap: 15px; border-bottom: 1px solid var(--line); font-size: 12px; }
.stepper { display: grid; grid-template-columns: 32px 40px 32px; align-items: center; border: 1px solid var(--line); border-radius: 5px; overflow: hidden; }
.stepper button { width: 32px; height: 32px; display: grid; place-items: center; border: 0; background: var(--surface-soft); color: var(--ink); }
.stepper button svg { width: 14px; }
.stepper output { text-align: center; font-weight: 750; }
.purchase-total { margin-bottom: 16px; border-bottom: 0; }
.purchase-total strong { color: var(--green-dark); font-size: 19px; }

.toast-region { position: fixed; z-index: 200; right: 20px; bottom: 20px; display: grid; gap: 8px; width: min(340px, calc(100% - 32px)); }
.toast { display: grid; grid-template-columns: 20px 1fr; gap: 9px; align-items: start; padding: 13px; color: #fff; background: var(--sidebar); border-radius: 6px; box-shadow: var(--shadow); font-size: 12px; animation: toast-in .2s ease-out; }
.toast.error { background: #7d2828; }
.toast svg { width: 17px; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px); } }

@media (max-width: 1180px) {
  .product-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .compact-grid .product-card:nth-child(4) { display: none; }
}

@media (max-width: 900px) {
  body { padding-bottom: calc(72px + env(safe-area-inset-bottom)); }
  .sidebar { display: none; }
  .main-content { margin-left: 0; padding: 0 20px 28px; }
  .topbar { min-height: 76px; }
  .topbar h1 { font-size: 21px; }
  .live-state, .top-actions > .primary-button { display: none; }
  .top-theme-toggle { display: grid; }
  .product-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .compact-grid .product-card:nth-child(4) { display: block; }
  .split-layout { grid-template-columns: 1fr; gap: 24px; }
  .bottom-nav {
    position: fixed; z-index: 30; left: 0; right: 0; bottom: 0; min-height: calc(64px + env(safe-area-inset-bottom));
    padding: 6px 10px env(safe-area-inset-bottom); display: grid; grid-template-columns: repeat(5, 1fr);
    border-top: 1px solid var(--line); background: var(--mobile-nav); backdrop-filter: blur(12px);
  }
  .bottom-nav > button { min-width: 0; border: 0; background: transparent; color: var(--muted); display: grid; place-content: center; justify-items: center; gap: 3px; font-size: 9px; }
  .bottom-nav > button svg { width: 19px; }
  .bottom-nav > button.active { color: var(--green); }
  .bottom-nav .deposit-fab { width: 48px; height: 48px; align-self: start; justify-self: center; margin-top: -18px; border-radius: 50%; background: var(--green); color: #fff; box-shadow: 0 8px 22px rgba(22,122,74,.27); }
  .bottom-nav .deposit-fab svg { width: 23px; }
  .toast-region { bottom: calc(78px + env(safe-area-inset-bottom)); }
}

@media (max-width: 620px) {
  .main-content { padding-inline: 14px; }
  .topbar { gap: 10px; }
  .top-actions { gap: 7px; }
  .eyebrow { display: none; }
  .balance-chip { min-height: 35px; padding-inline: 10px; font-size: 12px; }
  .view { padding-top: 20px; }
  .welcome-row { align-items: flex-start; }
  .welcome-row .secondary-button { display: none; }
  .balance-band { min-height: 200px; padding: 22px; flex-direction: column; align-items: stretch; justify-content: space-between; }
  .balance-main strong { font-size: 32px; }
  .balance-actions { display: grid; grid-template-columns: 1fr 1fr; }
  .light-button, .outline-light-button { min-width: 0; padding: 0 9px; font-size: 10px; }
  .stats-grid { grid-template-columns: 1fr; }
  .stat-item { min-height: 77px; border-right: 0; border-bottom: 1px solid var(--line); padding: 14px 4px; }
  .stat-item:last-child { border-bottom: 0; }
  .product-grid { gap: 10px; }
  .product-card { display: grid; grid-template-rows: auto 1fr; }
  .product-body { padding: 11px; gap: 9px; }
  .product-copy h3 { font-size: 12px; }
  .product-copy p { font-size: 10px; min-height: 45px; }
  .product-buy-row { align-items: end; }
  .product-buy-row strong { font-size: 13px; }
  .buy-button { width: 34px; min-width: 34px; padding: 0; }
  .buy-button span { display: none; }
  .store-toolbar { display: grid; }
  .segmented { width: 100%; grid-template-columns: repeat(3, 1fr); }
  .segmented button { min-width: 0; }
  .search-box { width: 100%; }
  .wallet-summary { align-items: flex-start; flex-direction: column; }
  .wallet-summary strong { font-size: 29px; }
  .order-top, .key-top { gap: 10px; }
  .account-credential { grid-template-columns: 1fr; }
  .key-bottom { align-items: flex-start; flex-direction: column; }
  .danger-button { width: 100%; justify-content: center; }
  .amount-presets { grid-template-columns: repeat(2, 1fr); }
  .dialog-shell { padding: 18px; }
  .bank-details > div { grid-template-columns: 105px minmax(0,1fr); }
}

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