/* GoArk mobile UI. Tokens and measurements follow the "Store Dashboard — Web & Mobile" design. */

@font-face { font-family: "Sora"; font-weight: 500; font-display: swap; src: url("/public/goark/fonts/sora-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 600; font-display: swap; src: url("/public/goark/fonts/sora-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Sora"; font-weight: 700; font-display: swap; src: url("/public/goark/fonts/sora-latin-700-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/public/goark/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/public/goark/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/public/goark/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "IBM Plex Mono"; font-weight: 500; font-display: swap; src: url("/public/goark/fonts/ibm-plex-mono-latin-500-normal.woff2") format("woff2"); }

:root {
  --bg: #F3F2EE;
  --surface: #FFFFFF;
  --ink: #17181C;
  --ink-2: #3C3E45;
  --muted: #5E6068;
  --faint: #74767D;
  --line: #E3E1DA;
  --line-2: #EEECE6;
  --field-line: #D6D4CC;
  --chip-line: #DDDBD3;
  --field: #F7F6F3;
  --tint: #ECEAE4;
  --tint-2: #E9E7E1;
  --dark: #15171C;
  --dark-2: #23262D;
  --dark-line: #2E3139;
  --accent: #0E6B5C;
  --accent-ink: #0A5146;
  --accent-soft: #E3F0EC;
  --accent-wash: #F4FAF8;
  --ok-bg: #E3F0EC; --ok-fg: #0A5146;
  --warn-bg: #FDF1DE; --warn-fg: #8A4B06;
  --info-bg: #E8ECF8; --info-fg: #243A85;
  --bad-bg: #FDEBEA; --bad-fg: #9B1C14;
  --badge: #E5484D;
  --sans: "IBM Plex Sans", "Segoe UI", system-ui, sans-serif;
  --display: "Sora", "IBM Plex Sans", system-ui, sans-serif;
  --mono: "IBM Plex Mono", ui-monospace, monospace;
  --safe-top: max(env(safe-area-inset-top, 0px), var(--safe-area-inset-top, 0px));
  --safe-bottom: max(env(safe-area-inset-bottom, 0px), var(--safe-area-inset-bottom, 0px));
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; height: 100%; overflow: hidden; background: var(--bg); }
body { font-family: var(--sans); color: var(--ink); -webkit-font-smoothing: antialiased; -webkit-tap-highlight-color: transparent; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
h1, h2, h3, p { margin: 0; }
input::placeholder { color: #8A8C93; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
[hidden] { display: none !important; }

/* ---------- Screen frame ---------- */
.screen { height: 100vh; height: 100dvh; display: flex; flex-direction: column; background: var(--bg); position: relative; overflow: hidden; }
.screen > .scroll { flex: 1 1 auto; overflow-y: auto; overscroll-behavior: contain; -webkit-overflow-scrolling: touch; }
.pad { padding: 16px 20px; display: flex; flex-direction: column; gap: 14px; }
.pad-lg { padding: 20px; display: flex; flex-direction: column; gap: 20px; }
.stack { display: flex; flex-direction: column; gap: 8px; }
.row { display: flex; align-items: center; gap: 12px; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.grow { flex: 1 1 auto; min-width: 0; }
.mono { font-family: var(--mono); font-weight: 500; }
.muted { color: var(--muted); }
.caption { font-size: 12px; color: var(--muted); }
.small { font-size: 13px; }
.spacer { flex: 1 1 auto; }
.center { text-align: center; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Headers ---------- */
.topbar { flex-shrink: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: calc(20px + var(--safe-top)) 20px 14px; display: flex; flex-direction: column; gap: 14px; }
.topbar h1 { font-family: var(--display); font-size: 24px; font-weight: 600; }
.navbar { flex-shrink: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: var(--safe-top) 10px 0; min-height: calc(64px + var(--safe-top)); display: flex; align-items: center; gap: 4px; }
.navbar h1 { flex: 1 1 auto; font-family: var(--display); font-size: 17px; font-weight: 600; min-width: 0; }
.navbar .stack-title { flex: 1 1 auto; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.navbar .stack-title h1 { font-size: 18px; }
.plainbar { flex-shrink: 0; padding: calc(20px + var(--safe-top)) 24px 0; display: flex; flex-direction: column; gap: 20px; }

.icon-btn { width: 44px; height: 44px; flex-shrink: 0; border: 0; background: transparent; color: var(--ink); border-radius: 12px; display: inline-flex; align-items: center; justify-content: center; position: relative; text-decoration: none; }
.icon-btn.bordered { border: 1px solid var(--chip-line); background: var(--surface); color: var(--ink-2); }
.icon-btn.back { margin-left: -10px; }
.count-badge { position: absolute; top: -5px; right: -5px; min-width: 20px; height: 20px; padding: 0 5px; border-radius: 10px; border: 2px solid var(--dark); background: var(--badge); color: #fff; font-size: 11px; font-weight: 600; display: flex; align-items: center; justify-content: center; }

/* Wizard header (connect store) */
.wizard { flex-shrink: 0; background: var(--surface); border-bottom: 1px solid var(--line); padding: calc(8px + var(--safe-top)) 20px 16px; display: flex; flex-direction: column; gap: 12px; }
.wizard .row { gap: 4px; }
.step-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 6px; }
.steps span { height: 4px; border-radius: 2px; background: var(--tint); }
.steps span.on { background: var(--accent); }
.wizard h1 { font-family: var(--display); font-size: 24px; font-weight: 600; }

/* ---------- Forms ---------- */
.field { display: flex; flex-direction: column; gap: 8px; }
.field > label, .label { font-size: 14px; font-weight: 600; }
.input { height: 48px; width: 100%; padding: 0 14px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--surface); font-size: 16px; color: var(--ink); outline: none; }
.input:focus, .input-group:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px rgba(14, 107, 92, .14); }
.input.mono { font-family: var(--mono); font-size: 15px; }
.input-group { display: flex; align-items: center; height: 48px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--surface); overflow: hidden; }
.input-group input { flex: 1 1 auto; min-width: 0; height: 46px; border: 0; outline: none; background: transparent; font-size: 16px; padding: 0 14px; }
.input-group .prefix { padding: 0 12px; height: 100%; display: flex; align-items: center; border-right: 1px solid var(--line); background: var(--field); font-family: var(--mono); font-size: 15px; color: var(--ink-2); }
.input-group .icon-btn { color: var(--muted); }
.field .help { font-size: 12px; color: var(--muted); line-height: 1.45; }
.field.invalid .input, .field.invalid .input-group { border-color: var(--bad-fg); }
.field .error { font-size: 12px; color: var(--bad-fg); font-weight: 500; }
.search { height: 44px; border: 1px solid var(--chip-line); border-radius: 12px; background: var(--field); display: flex; align-items: center; gap: 10px; padding: 0 14px; color: var(--faint); }
.search input { flex: 1 1 auto; min-width: 0; border: 0; outline: none; background: transparent; font-size: 16px; color: var(--ink); }
.search input::-webkit-search-cancel-button { display: none; }

.check { display: flex; align-items: center; gap: 8px; min-height: 44px; font-size: 14px; color: var(--ink-2); }
.check input { width: 18px; height: 18px; margin: 0; accent-color: var(--accent); }
.checkbox-btn { display: flex; align-items: flex-start; gap: 12px; padding: 4px 0; border: 0; background: transparent; text-align: left; font-size: 14px; color: var(--ink-2); line-height: 1.45; min-height: 44px; }
.box { width: 22px; height: 22px; flex-shrink: 0; border-radius: 6px; border: 1.5px solid #9A9CA3; background: #fff; color: #fff; display: flex; align-items: center; justify-content: center; }
.box svg { opacity: 0; }
[aria-pressed="true"] .box, [aria-checked="true"] .box { border: 0; background: var(--accent); }
[aria-pressed="true"] .box svg, [aria-checked="true"] .box svg { opacity: 1; }

.strength { display: grid; grid-template-columns: repeat(4, 1fr); gap: 6px; }
.strength span { height: 4px; border-radius: 2px; background: var(--tint); }
.strength[data-level="1"] span:nth-child(-n+1) { background: #B42318; }
.strength[data-level="2"] span:nth-child(-n+2) { background: #B45309; }
.strength[data-level="3"] span:nth-child(-n+3) { background: #1A8F5A; }
.strength[data-level="4"] span { background: var(--accent); }

.otp { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.otp input { height: 56px; width: 100%; border: 1px solid var(--field-line); border-radius: 12px; background: #fff; text-align: center; font-family: var(--mono); font-size: 22px; outline: none; }
.otp input:focus { border: 2px solid var(--accent); }
.otp.invalid input { border-color: var(--bad-fg); }

/* ---------- Buttons ---------- */
.btn { height: 50px; padding: 0 18px; border-radius: 10px; border: 0; display: inline-flex; align-items: center; justify-content: center; gap: 10px; font-size: 16px; font-weight: 600; text-decoration: none; white-space: nowrap; transition: background .15s, opacity .15s, transform .1s; }
.btn:active { transform: scale(.985); }
.btn.lg { height: 52px; border-radius: 12px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--accent); color: #fff; }
.btn.primary:disabled, .btn.primary[aria-disabled="true"] { background: #5F6B68; }
.btn.dark { background: var(--dark); color: #fff; }
.btn.outline { background: #fff; color: var(--ink); border: 1px solid var(--field-line); font-size: 15px; }
.btn.danger { background: #fff; color: var(--bad-fg); border: 1px solid var(--field-line); font-size: 15px; }
.btn.link { height: 44px; background: transparent; color: var(--accent); font-size: 14px; }
.btn[data-busy="true"] { opacity: .7; pointer-events: none; }
.text-btn { min-height: 32px; border: 0; background: transparent; padding: 0; color: var(--accent); font-size: 13px; font-weight: 600; text-decoration: none; display: inline-flex; align-items: center; }
.footer-bar { flex-shrink: 0; background: var(--surface); border-top: 1px solid var(--line); padding: 12px 20px calc(16px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 10px; }
.footer-bar.split { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.footer-plain { flex-shrink: 0; padding: 12px 24px calc(20px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 12px; }

/* ---------- Chips, pills, segments ---------- */
.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; margin: 0 -20px; padding: 0 20px; }
.chips::-webkit-scrollbar { display: none; }
.chip { height: 36px; flex-shrink: 0; padding: 0 14px; border-radius: 999px; border: 1px solid var(--chip-line); background: #fff; color: var(--ink-2); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; gap: 6px; }
.chip[aria-pressed="true"] { background: var(--dark); border-color: var(--dark); color: #fff; }
.chip .n { min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--badge); color: #fff; font-size: 11px; display: inline-flex; align-items: center; justify-content: center; }
.segments { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 4px; padding: 4px; border-radius: 10px; background: var(--tint); }
.segments button { height: 36px; border: 0; border-radius: 7px; background: transparent; color: var(--muted); font-size: 13px; font-weight: 600; }
.segments button[aria-pressed="true"] { background: #fff; color: var(--ink); }
.segments.dark { background: var(--dark-2); }
.segments.dark button { color: #B9BCC4; }
.segments.dark button[aria-pressed="true"] { background: var(--bg); color: var(--dark); }
.pill { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12px; font-weight: 600; white-space: nowrap; align-self: flex-start; }
.pill.sm { padding: 2px 8px; font-size: 11px; }
.pill .dot { width: 6px; height: 6px; border-radius: 3px; background: currentColor; }
.s-paid, .s-ok, .s-synced { background: var(--ok-bg); color: var(--ok-fg); }
.s-pending, .s-warn { background: var(--warn-bg); color: var(--warn-fg); }
.s-refunded, .s-info, .s-syncing { background: var(--info-bg); color: var(--info-fg); }
.s-failed, .s-bad, .s-attention { background: var(--bad-bg); color: var(--bad-fg); }
.s-owner { background: var(--dark); color: #fff; }
.s-staff { background: var(--info-bg); color: var(--info-fg); }
.s-customer { background: var(--tint); color: var(--ink-2); }

/* ---------- Cards and lists ---------- */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: 14px; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.card.tight { padding: 14px; gap: 10px; }
.card h2, .section-title { font-family: var(--display); font-size: 16px; font-weight: 600; }
.overline { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); }
.divider { border-top: 1px solid var(--line-2); padding-top: 12px; }
a.card { text-decoration: none; color: var(--ink); }
.list-row { display: flex; align-items: center; gap: 12px; min-height: 56px; border-top: 1px solid var(--line-2); text-decoration: none; color: var(--ink); }
.thumb { width: 40px; height: 40px; border-radius: 8px; background: var(--tint); flex-shrink: 0; display: flex; align-items: center; justify-content: center; font-size: 12px; font-weight: 600; color: var(--ink-2); }
.thumb.lg { width: 48px; height: 48px; border-radius: 10px; }
.avatar { width: 42px; height: 42px; border-radius: 50%; flex-shrink: 0; background: var(--tint); color: var(--ink-2); display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 600; }
.avatar.team { background: var(--accent-soft); color: var(--accent-ink); }
.tile { width: 44px; height: 44px; border-radius: 12px; flex-shrink: 0; background: var(--tint); color: var(--ink-2); display: flex; align-items: center; justify-content: center; font-family: var(--display); font-weight: 700; font-size: 15px; }
.empty { padding: 48px 24px; display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; color: var(--muted); font-size: 14px; }
.empty .tile { width: 56px; height: 56px; border-radius: 16px; background: var(--accent-soft); color: var(--accent); }
.empty strong { font-size: 16px; color: var(--ink); }

/* Order cards */
.order-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 10px; text-decoration: none; color: var(--ink); }
.order-card .id { font-family: var(--mono); font-size: 13px; font-weight: 500; }
.order-card .name { font-size: 15px; font-weight: 600; }
.order-card .amount { font-family: var(--mono); font-size: 15px; font-weight: 500; white-space: nowrap; }

/* ---------- Tab bar ---------- */
.tabbar { flex-shrink: 0; background: #fff; border-top: 1px solid var(--line); padding: 6px 8px calc(14px + var(--safe-bottom)); display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); min-height: 76px; }
.tabbar a { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; font-size: 11px; font-weight: 500; text-decoration: none; color: var(--muted); }
.tabbar a[aria-current="page"] { color: var(--accent); font-weight: 600; }
.tabbar a[aria-current="page"] svg { stroke-width: 2; }
.fab { position: absolute; right: 20px; bottom: calc(96px + var(--safe-bottom)); width: 56px; height: 56px; border-radius: 18px; border: 0; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; box-shadow: 0 6px 16px rgba(21, 23, 28, .22); z-index: 5; }

/* ---------- Auth ---------- */
.brand { display: flex; align-items: center; gap: 10px; }
.brand-mark { width: 36px; height: 36px; flex-shrink: 0; object-fit: contain; }
.brand-name { font-family: var(--display); font-weight: 600; font-size: 16px; }
.hero-dark { background: var(--dark); color: var(--bg); padding: calc(48px + var(--safe-top)) 24px 32px; display: flex; flex-direction: column; gap: 20px; flex-shrink: 0; }
.hero-dark h1 { font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1.15; }
.display { font-family: var(--display); font-weight: 600; font-size: 28px; line-height: 1.15; }
.lead { font-size: 15px; color: var(--muted); line-height: 1.5; }
.shield { width: 64px; height: 64px; border-radius: 18px; background: var(--accent-soft); color: var(--accent); display: flex; align-items: center; justify-content: center; }
.secure-note { display: flex; align-items: center; justify-content: center; gap: 8px; font-size: 13px; color: var(--muted); padding: 8px 0 calc(8px + var(--safe-bottom)); }

/* Splash */
.splash { align-items: center; justify-content: center; background: var(--dark); color: var(--bg); gap: 16px; }
.splash .brand-mark { width: 64px; height: 64px; }
.splash .brand-name { font-size: 22px; }

/* ---------- Dashboard ---------- */
.dash-head { flex-shrink: 0; background: var(--dark); color: var(--bg); padding: calc(24px + var(--safe-top)) 20px 20px; display: flex; flex-direction: column; gap: 18px; }
.dash-head .avatar { width: 40px; height: 40px; background: var(--accent); color: #fff; font-size: 14px; }
.dash-head .hello { font-size: 13px; color: #9A9DA6; }
.dash-head .who { font-family: var(--display); font-size: 17px; font-weight: 600; }
.dash-head .icon-btn { border: 1px solid var(--dark-line); color: var(--bg); }
.store-switch { height: 44px; border-radius: 10px; border: 1px solid var(--dark-line); padding: 0 12px; display: flex; align-items: center; gap: 10px; text-decoration: none; color: var(--bg); }
.store-switch .grow { font-size: 14px; font-weight: 600; }
.store-switch .state { display: flex; align-items: center; gap: 6px; font-size: 12px; color: #B9BCC4; }
.store-switch .state .ind { width: 7px; height: 7px; border-radius: 4px; background: #3CC48A; }
.store-switch .state .ind.syncing { background: #7C9CF5; }
.store-switch .state .ind.attention { background: var(--badge); }
.quick { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 8px; }
.quick button, .quick a { min-height: 76px; border-radius: 14px; background: #fff; border: 1px solid var(--line); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-decoration: none; color: var(--ink); font-size: 12px; font-weight: 600; text-align: center; padding: 6px 2px; }
.quick .q-ic { width: 36px; height: 36px; border-radius: 10px; display: flex; align-items: center; justify-content: center; }
.kpis { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 12px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 8px; }
.kpi .k { font-size: 13px; color: var(--muted); }
.kpi .v { font-family: var(--mono); font-size: 18px; font-weight: 500; }
.bars { height: 110px; display: flex; align-items: flex-end; gap: 10px; border-bottom: 1px solid var(--line); }
.bars div { flex: 1 1 0; border-radius: 6px 6px 0 0; background: var(--field-line); min-height: 4px; transition: height .3s ease; }
.bars div.on { background: var(--accent); }
.bar-labels { display: flex; gap: 10px; margin-top: -6px; }
.bar-labels span { flex: 1 1 0; text-align: center; font-size: 10px; color: var(--faint); }
.goal { background: var(--dark); color: var(--bg); border-radius: 14px; padding: 16px; display: flex; align-items: center; gap: 16px; }
.ring { position: relative; width: 72px; height: 72px; flex-shrink: 0; }
.ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 14px; }
.ring circle { transition: stroke-dasharray .5s ease; }
.share-bar { display: flex; height: 12px; border-radius: 6px; overflow: hidden; gap: 2px; background: var(--line-2); }
.legend { display: flex; align-items: center; gap: 10px; font-size: 13px; }
.legend .sw { width: 10px; height: 10px; border-radius: 3px; flex-shrink: 0; }
.meter { display: block; height: 5px; border-radius: 3px; background: var(--line-2); overflow: hidden; }
.meter i { display: block; height: 5px; }

/* ---------- Stores and platforms ---------- */
.store-card { background: #fff; border: 1px solid var(--line); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; }
.store-card[data-active="true"] { border: 2px solid var(--accent); padding: 13px; }
.store-pick { border: 0; background: transparent; padding: 0; display: flex; align-items: center; gap: 12px; text-align: left; min-height: 44px; color: var(--ink); width: 100%; }
.radio { width: 22px; height: 22px; border-radius: 11px; border: 2px solid #B9B7AF; flex-shrink: 0; }
[data-active="true"] .radio { border: 7px solid var(--accent); }
.store-foot { border-top: 1px solid var(--line-2); padding-top: 10px; display: flex; align-items: center; gap: 8px; font-size: 12px; }
.add-dashed { min-height: 64px; border-radius: 14px; border: 1.5px dashed #B9B7AF; background: transparent; display: flex; align-items: center; justify-content: center; gap: 10px; text-decoration: none; font-size: 15px; font-weight: 600; color: var(--accent); }
.note { background: var(--tint-2); border-radius: 14px; padding: 14px; display: flex; gap: 12px; font-size: 13px; color: var(--ink-2); line-height: 1.5; }
.platforms { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.platform { position: relative; border: 1px solid var(--line); background: #fff; border-radius: 16px; padding: 13px; display: flex; flex-direction: column; align-items: flex-start; gap: 12px; text-align: left; min-height: 132px; color: var(--ink); transition: border-color .16s ease, background .16s ease, box-shadow .16s ease, transform .16s ease; }
.platform:active { transform: scale(.985); }
.platform:hover { border-color: #C9C6BC; box-shadow: 0 5px 16px #17181C0D; }
.platform.wide { flex-direction: row; align-items: center; min-height: 0; width: 100%; }
.platform[aria-pressed="true"] { border: 2px solid var(--accent); padding: 12px; background: var(--accent-wash); box-shadow: 0 0 0 3px #0E6B5C12; }
.platform .name { font-size: 15px; font-weight: 600; }
.platform .how { font-size: 12px; color: var(--muted); line-height: 1.4; }
.platform-mark { width: 46px; height: 46px; border-radius: 14px; display: inline-flex; align-items: center; justify-content: center; flex: 0 0 46px; color: var(--ink-2); background: var(--tint); }
.platform-mark svg { width: 27px; height: 27px; }
.brand-shopify { color: #5A8429; background: #EDF5E2; }
.brand-woocommerce { color: #7041A6; background: #F0EAF8; }
.brand-magento { color: #D95416; background: #FFF0E5; }
.brand-opencart { color: #D97816; background: #FFF2E1; }
.brand-daraz { color: #D93D48; background: #FCEAEC; }
.brand-bigcommerce { color: #245EB0; background: #EAF1FC; }
.brand-custom { color: var(--accent); background: var(--accent-soft); }
.brand-sample { color: #55534C; background: var(--tint); }
.platform[aria-pressed="true"] .platform-mark { box-shadow: inset 0 0 0 1px currentColor; }
.platform-soon { position: absolute; top: 13px; right: 12px; padding: 3px 7px; border-radius: 999px; background: var(--tint); color: var(--muted); font-size: 10px; font-weight: 600; }
.reset-page { max-width: 520px; width: 100%; margin: 0 auto; padding-top: 32px; }
.reset-icon, .reset-success { width: 56px; height: 56px; border-radius: 18px; display: flex; align-items: center; justify-content: center; color: var(--accent); background: var(--accent-soft); }
.reset-page h2 { font-family: var(--display); font-size: 23px; line-height: 1.3; }
.reset-intro { font-size: 14px; line-height: 1.55; margin-top: -8px; }
.reset-page form { display: flex; flex-direction: column; gap: 16px; }
.reset-sent { padding: 12px 14px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; line-height: 1.5; }
.reset-notice { padding: 12px 14px; border-radius: 12px; font-size: 13px; line-height: 1.5; overflow-wrap: anywhere; }
.reset-notice.info { color: var(--info-fg); background: var(--info-bg); }
.reset-notice.development { color: var(--warn-fg); background: var(--warn-bg); font-family: var(--mono); }
.reset-notice.error { color: var(--bad-fg); background: var(--bad-bg); }
.reset-resend { min-height: 44px; align-self: center; }
.reset-complete { display: flex; flex-direction: column; gap: 14px; }
.reset-complete h3 { font-family: var(--display); font-size: 20px; }
.sync-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px; }
.sync-opt { height: 48px; border-radius: 10px; border: 1px solid var(--field-line); background: #fff; display: flex; align-items: center; gap: 10px; padding: 0 12px; font-size: 14px; font-weight: 600; color: var(--ink); }
.sync-opt[aria-pressed="true"] { border: 1.5px solid var(--accent); background: var(--accent-wash); }
.webhook { display: flex; align-items: center; gap: 8px; border: 1px solid var(--field-line); border-radius: 10px; background: var(--field); padding: 6px 6px 6px 12px; }
.webhook span { flex: 1 1 auto; min-width: 0; font-family: var(--mono); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.webhook button { height: 36px; padding: 0 14px; border-radius: 8px; border: 1px solid var(--field-line); background: #fff; font-size: 13px; font-weight: 600; }
.banner { border-radius: 12px; padding: 12px 14px; display: flex; gap: 10px; align-items: flex-start; font-size: 14px; line-height: 1.45; font-weight: 500; }
.banner.ok { background: var(--ok-bg); color: var(--ok-fg); }
.banner.bad { background: var(--bad-bg); color: var(--bad-fg); }
.big-ring { position: relative; width: 120px; height: 120px; }
.big-ring span { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; font-family: var(--mono); font-size: 24px; }
.sync-step { display: flex; align-items: center; gap: 12px; min-height: 56px; }
.sync-step + .sync-step { border-top: 1px solid var(--line-2); }
.sync-step .mark { width: 24px; height: 24px; border-radius: 12px; border: 2px solid var(--field-line); background: #fff; color: #fff; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.sync-step[data-state="active"] .mark { border-color: var(--accent); }
.sync-step[data-state="done"] .mark { border: 0; background: var(--accent); }
.sync-step[data-state="waiting"] .lbl { color: var(--faint); }
.sync-step .lbl { font-size: 15px; font-weight: 600; }

/* Welcome */
.welcome-top { padding-top: calc(28px + var(--safe-top)); }
.welcome-art { background: var(--dark); border-radius: 18px; height: 170px; display: flex; align-items: center; justify-content: center; }
.welcome-steps { display: flex; flex-direction: column; gap: 14px; }
.welcome-steps div { display: flex; gap: 12px; font-size: 14px; line-height: 1.45; color: var(--ink-2); }
.welcome-steps .num { width: 26px; height: 26px; border-radius: 13px; background: var(--accent-soft); color: var(--accent-ink); font-size: 13px; font-weight: 600; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.welcome-steps strong { color: var(--ink); }
.works-with { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; font-size: 12px; color: var(--muted); }
.works-with .ww { height: 28px; min-width: 32px; padding: 0 8px; border-radius: 8px; background: #fff; border: 1px solid var(--line); display: inline-flex; align-items: center; justify-content: center; font-family: var(--display); font-size: 11px; color: var(--ink-2); }

/* ---------- Settings ---------- */
.settings-group { background: #fff; border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.setting { display: flex; align-items: center; gap: 12px; min-height: 64px; padding: 0 16px; text-decoration: none; color: var(--ink); width: 100%; border: 0; background: transparent; text-align: left; font-size: 15px; }
.setting + .setting { border-top: 1px solid var(--line-2); }
.setting .hint { font-size: 12px; color: var(--muted); }
.setting .chev { color: #9A9CA3; }
.switch { width: 50px; height: 30px; flex-shrink: 0; border: 0; border-radius: 15px; padding: 3px; background: #C9C7C0; display: flex; justify-content: flex-start; transition: background .15s; }
.switch .knob { width: 24px; height: 24px; border-radius: 12px; background: #fff; box-shadow: 0 1px 3px rgba(0,0,0,.25); transition: transform .15s; }
.switch[aria-checked="true"] { background: var(--accent); }
.switch[aria-checked="true"] .knob { transform: translateX(20px); }
.profile-card { background: var(--dark); color: var(--bg); border-radius: 14px; padding: 16px; display: flex; align-items: center; gap: 14px; text-decoration: none; }
.profile-card .avatar { width: 48px; height: 48px; background: var(--accent); color: #fff; font-size: 15px; }
.signout { height: 52px; border-radius: 14px; border: 1px solid var(--line); background: #fff; color: var(--bad-fg); display: flex; align-items: center; justify-content: center; gap: 10px; font-size: 15px; font-weight: 600; }

/* ---------- Notifications ---------- */
.notif-group { font-size: 12px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); padding: 14px 20px 6px; }
.notif { width: 100%; border: 0; border-bottom: 1px solid var(--line); background: var(--bg); padding: 14px 20px; display: flex; gap: 12px; text-align: left; color: var(--ink); position: relative; }
.notif[data-unread="true"] { background: #fff; }
.notif .q-ic { width: 40px; height: 40px; border-radius: 12px; display: flex; align-items: center; justify-content: center; flex-shrink: 0; }
.notif .title { font-size: 15px; font-weight: 500; }
.notif[data-unread="true"] .title { font-weight: 600; }
.notif .time { font-size: 12px; color: var(--faint); white-space: nowrap; }
.notif .body { font-size: 13px; color: var(--muted); line-height: 1.45; }
.notif .cta { align-self: flex-start; margin-top: 4px; height: 32px; padding: 0 12px; border-radius: 8px; border: 1px solid var(--field-line); background: #fff; font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; }
.notif .cta.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.notif .unread-dot { position: absolute; top: 20px; right: 14px; width: 8px; height: 8px; border-radius: 4px; background: var(--accent); }

/* ---------- Toast and sheet ---------- */
.toast { position: fixed; left: 16px; right: 16px; bottom: calc(96px + var(--safe-bottom)); z-index: 50; background: var(--dark); color: #fff; border-radius: 12px; padding: 12px 16px; font-size: 14px; box-shadow: 0 10px 30px rgba(0,0,0,.25); transform: translateY(20px); opacity: 0; transition: transform .2s, opacity .2s; pointer-events: none; }
.toast.show { transform: none; opacity: 1; }
.sheet-backdrop { position: fixed; inset: 0; z-index: 40; background: rgba(21, 23, 28, .45); display: flex; align-items: flex-end; animation: fade .15s ease; }
.sheet { width: 100%; max-height: 88vh; overflow-y: auto; background: var(--bg); border-radius: 20px 20px 0 0; padding: 10px 20px calc(20px + var(--safe-bottom)); display: flex; flex-direction: column; gap: 14px; animation: rise .2s cubic-bezier(.2,.8,.2,1); }
.sheet .grab { width: 40px; height: 4px; border-radius: 2px; background: var(--field-line); align-self: center; }
.sheet h2 { font-family: var(--display); font-size: 20px; font-weight: 600; }
.sheet-actions { display: flex; flex-direction: column; gap: 8px; }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { transform: translateY(40px); opacity: .4; } }
@keyframes spin { to { transform: rotate(360deg); } }
.spin { animation: spin .9s linear infinite; }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation: none !important; transition: none !important; } }

/* Fixes from device-size review */
.card .overline { font-family: var(--sans); font-size: 12px; font-weight: 600; }
.setting .pill { align-self: center; }
.legend .mono { white-space: nowrap; }
.notif[data-unread="true"] .time { margin-right: 12px; }
.notif .unread-dot { right: 12px; }
.wizard .row.title-row { gap: 12px; }
.toast { top: calc(12px + var(--safe-top)); bottom: auto; transform: translateY(-20px); }
