/* ولاء — portal (/) and cashier (/staff). Light, neutral, Arabic first (RTL), phone 360px → desktop. */
:root {
  --ink: #1f2a37;
  --ink-2: #3b4757;
  --muted: #5b6676;
  --line: #dfe3e8;
  --line-2: #eceff3;
  --bg: #f4f6f8;
  --card: #ffffff;
  --accent: #0f766e;
  --on-accent: #ffffff;
  --accent-text: #0f766e;
  --accent-soft: #e7f1f0;
  --accent-line: #b7d6d3;
  --ok: #067647;
  --ok-bg: #ecfdf3;
  --ok-line: #abefc6;
  --bad: #b42318;
  --bad-bg: #fef3f2;
  --bad-line: #fecdca;
  --warn: #93370d;
  --warn-bg: #fffaeb;
  --warn-line: #fedf89;
  --male: #3b6fb6;
  --female: #c2557a;
  --unknown: #a3acb9;
  --radius: 14px;
  --radius-sm: 10px;
  --shadow: 0 1px 2px rgba(16, 24, 40, .05), 0 1px 3px rgba(16, 24, 40, .06);
  --font: -apple-system, BlinkMacSystemFont, "SF Arabic", "Segoe UI", Tahoma, "Noto Sans Arabic", "Noto Sans", sans-serif;
  color-scheme: light;
}
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; min-height: 100dvh;
  background: var(--bg); color: var(--ink);
  font-family: var(--font); font-size: 16px; line-height: 1.6; text-align: right;
  -webkit-font-smoothing: antialiased;
}
body.modal-open { overflow: hidden; }
h1, h2, h3, h4, p { margin: 0; }
h1 { font-size: 1.5rem; line-height: 1.35; }
h2 { font-size: 1.25rem; line-height: 1.4; }
h3 { font-size: 1.05rem; line-height: 1.4; }
a { color: var(--accent-text); }
img { max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.sr-only { position: absolute !important; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
.ltr { direction: ltr; unicode-bidi: isolate; display: inline-block; }
.num { font-variant-numeric: tabular-nums; }
.muted { color: var(--muted); }
.small { font-size: .875rem; }
:focus-visible { outline: 3px solid var(--accent); outline-offset: 2px; }
.skip-link { position: absolute; top: -60px; right: 12px; background: var(--ink); color: #fff; padding: 10px 14px; border-radius: 8px; z-index: 100; }
.skip-link:focus { top: 10px; }

/* ---------- buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 44px; padding: 8px 18px; border-radius: var(--radius-sm);
  border: 1.5px solid transparent; font-weight: 600; font-size: 1rem; line-height: 1.3;
  cursor: pointer; text-decoration: none; touch-action: manipulation; white-space: nowrap;
  transition: background-color .15s, border-color .15s, box-shadow .15s;
}
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn[aria-busy="true"]::before, form[aria-busy="true"] .btn-primary::before {
  content: ""; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid currentColor; border-top-color: transparent; animation: spin .8s linear infinite;
}
.btn-primary { background: var(--accent); color: var(--on-accent); }
.btn-primary:hover:not(:disabled) { box-shadow: inset 0 0 0 100px rgba(0, 0, 0, .08); }
.btn-secondary { background: var(--card); color: var(--ink); border-color: var(--line); }
.btn-secondary:hover:not(:disabled) { border-color: var(--ink-2); }
.btn-ghost { background: transparent; color: var(--accent-text); }
.btn-ghost:hover:not(:disabled) { background: var(--accent-soft); }
.btn-danger { background: var(--bad); color: #fff; }
.btn-danger-outline { background: var(--card); color: var(--bad); border-color: var(--bad-line); }
.btn-danger-outline:hover:not(:disabled) { background: var(--bad-bg); }
.btn-sm { min-height: 40px; padding: 6px 12px; font-size: .9rem; }
.btn-block { width: 100%; }
.btn-lg { min-height: 56px; font-size: 1.1rem; padding: 10px 22px; }
.icon-btn { min-width: 44px; min-height: 44px; border: 0; background: transparent; border-radius: 10px; font-size: 1.6rem; line-height: 1; cursor: pointer; color: var(--muted); }
.icon-btn:hover { background: var(--line-2); color: var(--ink); }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-weight: 600; font-size: .95rem; color: var(--ink-2); }
.hint { color: var(--muted); font-size: .85rem; line-height: 1.5; display: block; }
input[type=text], input[type=password], input[type=search], input[type=url], input[type=number], input[type=date], input[type=tel], input:not([type]), select, textarea {
  width: 100%; min-height: 46px; padding: 10px 12px;
  background: var(--card); color: var(--ink);
  border: 1.5px solid var(--line); border-radius: var(--radius-sm);
  font-size: 1rem; outline: none;
}
textarea { min-height: 88px; resize: vertical; line-height: 1.55; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
input[aria-invalid="true"] { border-color: var(--bad); }
input[type=color] { width: 56px; height: 46px; padding: 3px; border: 1.5px solid var(--line); border-radius: var(--radius-sm); background: var(--card); cursor: pointer; }
input[dir=ltr], .ltr-input { direction: ltr; text-align: left; }
input[dir=ltr]::placeholder { text-align: left; }
.input-row { display: flex; gap: 8px; align-items: stretch; }
.input-row > input, .input-row > select { flex: 1; min-width: 0; }
.input-row > .btn { flex: none; }
.form-grid { display: grid; grid-template-columns: 1fr; gap: 14px; }
@media (min-width: 720px) { .form-grid.two { grid-template-columns: 1fr 1fr; } .form-grid .span-2 { grid-column: 1 / -1; } }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px 16px; margin: 0; min-width: 0; }
legend { font-weight: 700; padding: 0 6px; }
.counter { font-size: .8rem; color: var(--muted); text-align: left; direction: ltr; }
.counter.over { color: var(--bad); font-weight: 700; }

/* switch */
.switch { display: inline-flex; align-items: center; gap: 12px; cursor: pointer; min-height: 44px; position: relative; }
.switch-input { position: absolute; opacity: 0; width: 52px; height: 30px; margin: 0; cursor: pointer; }
.switch-track { width: 52px; height: 30px; flex: none; border-radius: 99px; background: #c5ccd5; position: relative; transition: background-color .15s; }
.switch-track::after { content: ""; position: absolute; top: 3px; right: 3px; width: 24px; height: 24px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .25); transition: transform .15s; }
.switch-input:checked + .switch-track { background: var(--accent); }
.switch-input:checked + .switch-track::after { transform: translateX(-22px); }
.switch-input:focus-visible + .switch-track { outline: 3px solid var(--accent); outline-offset: 2px; }
.switch-input:disabled + .switch-track { opacity: .5; }
.switch-label { font-weight: 600; }
.switch-wrap { display: flex; flex-direction: column; gap: 4px; }

/* ---------- messages ---------- */
.msg-area:empty { display: none; }
.msg { border-radius: var(--radius-sm); padding: 12px 14px; font-weight: 600; border: 1px solid; overflow-wrap: anywhere; }
.msg-error { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.msg-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.msg-info { background: var(--accent-soft); color: var(--ink); border-color: var(--accent-line); }
.msg-warn { background: var(--warn-bg); color: var(--warn); border-color: var(--warn-line); }
.loading { display: flex; align-items: center; justify-content: center; gap: 10px; color: var(--muted); padding: 32px 12px; }
.spinner { width: 20px; height: 20px; border-radius: 50%; border: 2.5px solid var(--line); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.empty { text-align: center; padding: 28px 16px; color: var(--muted); border: 1.5px dashed var(--line); border-radius: var(--radius); }
.empty strong { display: block; color: var(--ink-2); margin-bottom: 4px; }

/* ---------- layout ---------- */
.topbar { position: sticky; top: 0; z-index: 20; background: var(--card); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1180px; margin: 0 auto; padding: 8px 16px; display: flex; align-items: center; gap: 12px; min-height: 60px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 800; font-size: 1.15rem; color: var(--ink); text-decoration: none; min-width: 0; }
.brand img { width: 32px; height: 32px; }
.brand-sub { font-weight: 500; font-size: .9rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.topbar-end { margin-inline-start: auto; display: flex; align-items: center; gap: 8px; min-width: 0; }
.who { font-size: .9rem; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 40vw; }
.tabs { max-width: 1180px; margin: 0 auto; padding: 0 8px; display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; }
.tabs::-webkit-scrollbar { display: none; }
.tab { flex: none; display: inline-flex; align-items: center; min-height: 48px; padding: 0 14px; color: var(--muted); text-decoration: none; font-weight: 600; border-bottom: 3px solid transparent; white-space: nowrap; }
.tab:hover { color: var(--ink); }
.tab[aria-current="page"] { color: var(--accent-text); border-bottom-color: var(--accent); }
.shop-banner { background: var(--accent-soft); border-bottom: 1px solid var(--accent-line); }
.shop-banner-inner { max-width: 1180px; margin: 0 auto; padding: 8px 16px; display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; font-size: .95rem; }
.shop-banner a { font-weight: 700; min-height: 44px; display: inline-flex; align-items: center; }
main.page:focus { outline: none; }
main.page { max-width: 1180px; margin: 0 auto; padding: 20px 16px 64px; display: flex; flex-direction: column; gap: 18px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 12px; }
.page-head p { color: var(--muted); }
.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.grid { display: grid; gap: 16px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .grid.two { grid-template-columns: 1fr 1fr; } .grid.three { grid-template-columns: repeat(3, 1fr); } }
@media (min-width: 1000px) { .grid.wide-narrow { grid-template-columns: 2fr 1fr; } }
.dot { display: inline-block; width: 12px; height: 12px; border-radius: 50%; flex: none; border: 1px solid rgba(0, 0, 0, .12); }
.badge { display: inline-flex; align-items: center; gap: 6px; padding: 2px 10px; border-radius: 99px; font-size: .8rem; font-weight: 700; white-space: nowrap; border: 1px solid; }
.badge-ok { background: var(--ok-bg); color: var(--ok); border-color: var(--ok-line); }
.badge-bad { background: var(--bad-bg); color: var(--bad); border-color: var(--bad-line); }
.badge-muted { background: var(--line-2); color: var(--ink-2); border-color: var(--line); }
.badge-accent { background: var(--accent-soft); color: var(--accent-text); border-color: var(--accent-line); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; margin: 0; font-size: .95rem; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 600; min-width: 0; overflow-wrap: anywhere; }
.code-box { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; background: var(--line-2); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 10px 12px; }
.code-box code { direction: ltr; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1rem; overflow-wrap: anywhere; flex: 1; min-width: 0; text-align: left; }

/* ---------- login ---------- */
.auth { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(100%, 420px); }
.auth-mark { display: flex; align-items: center; gap: 12px; }
.auth-mark img { width: 48px; height: 48px; }

/* ---------- KPIs ---------- */
.kpis { display: grid; gap: 12px; grid-template-columns: repeat(2, minmax(0, 1fr)); }
@media (min-width: 640px) { .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (min-width: 1000px) { .kpis { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.kpi { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 2px; min-width: 0; box-shadow: var(--shadow); }
.kpi-label { color: var(--muted); font-size: .88rem; font-weight: 600; }
.kpi-value { font-size: 1.75rem; font-weight: 800; line-height: 1.25; font-variant-numeric: tabular-nums; }
.kpi-note { color: var(--muted); font-size: .78rem; line-height: 1.4; }
.kpi-accent { border-top: 4px solid var(--accent); }
.segmented { display: inline-flex; background: var(--line-2); border: 1px solid var(--line); border-radius: 12px; padding: 3px; gap: 3px; }
.segmented button { min-height: 40px; min-width: 64px; padding: 4px 14px; border: 0; border-radius: 9px; background: transparent; font-weight: 600; color: var(--muted); cursor: pointer; }
.segmented button[aria-pressed="true"] { background: var(--card); color: var(--ink); box-shadow: var(--shadow); }

/* ---------- charts ---------- */
.chart { display: flex; flex-direction: column; gap: 6px; }
.chart-frame { width: 100%; min-height: 120px; }
.chart-svg { display: block; direction: ltr; overflow: visible; font-family: var(--font); }
.chart-grid { stroke: var(--line-2); stroke-width: 1; }
.chart-axis { stroke: var(--line); stroke-width: 1; }
.chart-tick, .chart-label { fill: var(--muted); font-size: 11px; }
.chart-label { direction: rtl; unicode-bidi: plaintext; }
.chart-value { fill: var(--ink-2); font-size: 10.5px; font-weight: 600; }
.chart-rect { fill: var(--accent); opacity: .78; }
.chart-rect-strong { opacity: 1; }
.chart-hit { fill: transparent; }
.chart-bar { cursor: pointer; outline: none; }
.chart-bar:hover .chart-rect, .chart-bar.is-active .chart-rect { opacity: 1; }
.chart-bar:focus-visible .chart-hit, .chart-bar.is-active .chart-hit { fill: var(--accent-soft); }
.chart-caption { color: var(--muted); font-size: .88rem; min-height: 1.5em; }
.stack { display: flex; height: 18px; border-radius: 99px; overflow: hidden; background: var(--line-2); }
.stack-part { display: block; height: 100%; }
.stack-male { background: var(--male); }
.stack-female { background: var(--female); }
.stack-unknown { background: var(--unknown); }
.stack-wrap { display: flex; flex-direction: column; gap: 10px; }
.legend { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 6px 18px; font-size: .9rem; }
.legend li { display: inline-flex; align-items: center; gap: 6px; }
.legend-dot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; }
.meter { height: 8px; border-radius: 99px; background: var(--line-2); overflow: hidden; min-width: 60px; }
.meter > span { display: block; height: 100%; background: var(--accent); border-radius: 99px; }

/* ---------- tables & lists ---------- */
.table-wrap { width: 100%; overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius-sm); -webkit-overflow-scrolling: touch; }
table { width: 100%; border-collapse: collapse; font-size: .93rem; background: var(--card); }
th, td { padding: 10px 12px; text-align: right; border-bottom: 1px solid var(--line-2); vertical-align: top; }
th { background: #f8fafb; color: var(--muted); font-weight: 700; font-size: .85rem; white-space: nowrap; position: sticky; top: 0; }
tbody tr:last-child td { border-bottom: 0; }
td.nowrap, th.nowrap { white-space: nowrap; }
.list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.list > li { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line-2); }
.list > li:last-child { border-bottom: 0; }
.list-main { display: flex; flex-direction: column; min-width: 0; }
.list-main strong { overflow-wrap: anywhere; }
.list-side { text-align: left; flex: none; display: flex; flex-direction: column; align-items: flex-end; gap: 2px; font-size: .9rem; }
.kind { display: inline-flex; align-items: center; gap: 6px; font-weight: 700; font-size: .85rem; white-space: nowrap; }
.kind::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); }
.kind-redeem::before { background: #b54708; }
.kind-points::before { background: #6941c6; }

/* ---------- shop & branch cards ---------- */
.cards { display: grid; gap: 14px; grid-template-columns: 1fr; }
@media (min-width: 760px) { .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (min-width: 1120px) { .cards.three { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
.entity-title { display: flex; align-items: center; gap: 10px; min-width: 0; }
.entity-title h3 { overflow-wrap: anywhere; }
.entity-logo { width: 40px; height: 40px; border-radius: 10px; object-fit: cover; border: 1px solid var(--line); flex: none; background: var(--line-2); }
.entity-mark { width: 40px; height: 40px; border-radius: 10px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 1.1rem; }
.entity-actions { display: flex; flex-wrap: wrap; gap: 8px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.stopped { opacity: .82; }
.stopped .entity-title h3 { text-decoration: line-through; text-decoration-color: var(--muted); }
.callout { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }

/* ---------- settings: notification preview ---------- */
.notif-stage { background: linear-gradient(160deg, #7f8ea3, #3c4a5e); border-radius: 22px; padding: 22px 14px; display: flex; flex-direction: column; gap: 6px; align-items: stretch; }
.notif-time { color: rgba(255, 255, 255, .92); text-align: center; font-size: 2.4rem; font-weight: 300; line-height: 1.1; direction: ltr; }
.notif-date { color: rgba(255, 255, 255, .85); text-align: center; font-size: .9rem; margin-bottom: 10px; }
.notif { background: rgba(250, 250, 252, .9); border-radius: 18px; padding: 10px 12px; display: grid; grid-template-columns: 38px 1fr; gap: 10px; align-items: start; box-shadow: 0 6px 18px rgba(0, 0, 0, .18); }
.notif-icon { width: 38px; height: 38px; border-radius: 9px; display: grid; place-items: center; font-weight: 800; overflow: hidden; }
.notif-icon img { width: 100%; height: 100%; object-fit: cover; }
.notif-meta { display: flex; justify-content: space-between; gap: 8px; font-size: .78rem; color: #5f6672; }
.notif-app { font-weight: 600; text-transform: uppercase; letter-spacing: .02em; }
.notif-title { font-weight: 700; font-size: .95rem; color: #111; overflow-wrap: anywhere; }
.notif-body { font-size: .92rem; color: #222; overflow-wrap: anywhere; line-height: 1.45; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { min-height: 40px; padding: 4px 14px; border-radius: 99px; border: 1.5px dashed var(--accent-line); background: var(--accent-soft); color: var(--accent-text); font-weight: 700; cursor: pointer; }

/* ---------- dialogs ---------- */
.backdrop { position: fixed; inset: 0; z-index: 60; background: rgba(15, 23, 32, .55); display: flex; align-items: center; justify-content: center; padding: 16px; overflow-y: auto; }
.dialog { width: min(100%, 480px); max-height: calc(100vh - 32px); max-height: calc(100dvh - 32px); overflow-y: auto; background: var(--card); border-radius: 18px; box-shadow: 0 20px 50px rgba(0, 0, 0, .25); display: flex; flex-direction: column; }
.dialog-wide { width: min(100%, 720px); }
.dialog-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; padding: 18px 18px 0; }
.dialog-head h2 { padding-top: 6px; }
.dialog-x { margin: -4px -6px 0 0; }
.dialog-body { padding: 14px 18px; display: flex; flex-direction: column; gap: 14px; }
.dialog-text { color: var(--ink-2); font-size: 1.02rem; overflow-wrap: anywhere; white-space: pre-line; }
.dialog-actions { display: flex; flex-wrap: wrap; gap: 10px; padding: 0 18px 18px; }
.dialog-actions .btn { flex: 1 1 140px; }
.dialog video { width: 100%; max-height: 55vh; border-radius: 12px; background: #111; object-fit: cover; }

/* ---------- cashier (/staff) ---------- */
.staff body, body.staff { font-size: 17px; }
.st-top { position: sticky; top: 0; z-index: 20; background: var(--accent); color: var(--on-accent); }
.st-top-inner { max-width: 1280px; margin: 0 auto; padding: 8px 16px; min-height: 64px; display: flex; align-items: center; gap: 12px; }
.st-logo { width: 42px; height: 42px; border-radius: 10px; object-fit: cover; background: #fff; flex: none; }
.st-mark { width: 42px; height: 42px; border-radius: 10px; flex: none; display: grid; place-items: center; font-weight: 800; font-size: 1.2rem; background: rgba(255, 255, 255, .18); border: 1px solid rgba(255, 255, 255, .35); }
.st-names { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.st-names strong { font-size: 1.2rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-names span { font-size: .92rem; opacity: .92; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.st-out { margin-inline-start: auto; background: transparent; color: inherit; border: 1.5px solid currentColor; opacity: .95; }
.st-out:hover:not(:disabled) { background: rgba(255, 255, 255, .14); }
.st-layout { max-width: 1280px; margin: 0 auto; padding: 16px; display: grid; gap: 16px; grid-template-columns: 1fr; align-items: start; }
@media (min-width: 900px) { .st-layout { grid-template-columns: minmax(0, 1fr) 360px; } .st-side { position: sticky; top: 80px; max-height: calc(100vh - 96px); overflow-y: auto; } }
.st-main { display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.st-scan-label { font-weight: 800; font-size: 1.1rem; }
.st-code { font-size: 1.6rem !important; min-height: 64px !important; text-align: center; letter-spacing: .04em; }
.st-scan .btn { min-height: 64px; }
.st-scan .input-row .btn { min-width: 96px; font-size: 1.1rem; }
.st-customer-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.st-customer-head h2 { font-size: 1.5rem; overflow-wrap: anywhere; }
.st-balance { background: var(--accent-soft); border: 1px solid var(--accent-line); border-radius: var(--radius); padding: 14px 16px; display: flex; flex-direction: column; gap: 10px; }
.st-balance-line { font-size: 1.15rem; }
.st-balance-line b { font-size: 1.9rem; font-variant-numeric: tabular-nums; }
.st-dots { display: flex; flex-wrap: wrap; gap: 10px; }
.st-dots i { width: 30px; height: 30px; border-radius: 50%; border: 2.5px solid var(--accent); background: #fff; display: block; }
.st-dots i.on { background: var(--accent); }
.st-section { display: flex; flex-direction: column; gap: 12px; border-top: 1px solid var(--line); padding-top: 14px; }
.st-stepper { display: flex; align-items: stretch; border: 1.5px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.st-stepper button { width: 84px; min-height: 68px; flex: none; border: 0; background: var(--accent-soft); color: var(--accent-text); font-size: 2rem; font-weight: 700; cursor: pointer; }
.st-stepper button:disabled { opacity: .4; cursor: not-allowed; }
.st-stepper output { flex: 1; display: grid; place-items: center; font-size: 2.1rem; font-weight: 800; font-variant-numeric: tabular-nums; }
.st-amount { font-size: 2.1rem !important; min-height: 76px !important; text-align: center !important; font-weight: 700; }
.st-preview { font-size: 1.3rem; font-weight: 800; text-align: center; min-height: 1.6em; }
.st-preview.is-hint { font-size: .95rem; font-weight: 500; color: var(--muted); }
.st-preview.is-bad { color: var(--bad); }
.st-rewards { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.st-rewards li { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1.5px solid var(--line); border-radius: var(--radius); padding: 10px 12px; }
.st-rewards li .btn { min-width: 104px; min-height: 56px; }
.st-big { min-height: 64px; font-size: 1.2rem; }
.st-alert { font-size: 1.1rem; }
.st-totals { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.st-total { background: var(--line-2); border-radius: var(--radius-sm); padding: 10px 12px; display: flex; flex-direction: column; }
.st-total span { color: var(--muted); font-size: .85rem; font-weight: 600; }
.st-total b { font-size: 1.5rem; font-variant-numeric: tabular-nums; line-height: 1.3; }
@media (max-width: 420px) {
  main.page { padding: 16px 12px 56px; }
  .card { padding: 14px; }
  .kpi-value { font-size: 1.45rem; }
  .st-layout { padding: 12px; }
  .st-stepper button { width: 72px; }
  .topbar-inner { padding: 8px 12px; }
}
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; } }
@media print { .topbar, .tabs, .shop-banner, .btn { display: none !important; } body { background: #fff; } }
