/* 92shop — на токенах дизайн-системы NINE2 (16.11.2026) */
@font-face { font-family: "Onest"; src: url(/static/fonts/onest.woff2) format("woff2"); font-weight: 100 900; font-display: swap; }

:root {
  --brand: #eb0057;
  --brand-l1: color-mix(in oklab, var(--brand) 82%, white);
  --brand-l2: color-mix(in oklab, var(--brand) 68%, white);
  --brand-15: color-mix(in oklab, var(--brand) 15%, transparent);
  --brand-10: color-mix(in oklab, var(--brand) 10%, transparent);
  --brand-20: color-mix(in oklab, var(--brand) 20%, transparent);
  --font-sans: "Onest", -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
}
.app-theme-dark {
  --bg-base: #050505; --bg-card: #111111; --bg-el: #1a1a1a; --bg-input: #0a0a0a; --bg-hover: #222222; --bg-light: #333333;
  --text-main: #ffffff; --text-muted: rgba(255, 255, 255, 0.58);
  --border: rgba(255, 255, 255, 0.05); --border-strong: rgba(255, 255, 255, 0.1);
  --invert-bg: #ffffff; --invert-text: #000000; --overlay: rgba(0, 0, 0, 0.8);
  --on-brand: #ffffff; --brand-green-text: #00c16a; --danger: #ff5c63;
  color-scheme: dark;
}
.app-theme-light {
  --bg-base: #f2f2f7; --bg-card: #ffffff; --bg-el: #e9e9ef; --bg-input: #f5f5f8; --bg-hover: #dedee4; --bg-light: #cfcfd6;
  --text-main: #1c1c1e; --text-muted: rgba(60, 60, 67, 0.75);
  --border: rgba(0, 0, 0, 0.09); --border-strong: rgba(0, 0, 0, 0.16);
  --invert-bg: #1c1c1e; --invert-text: #ffffff; --overlay: rgba(0, 0, 0, 0.35);
  --on-brand: #ffffff; --brand-green-text: #008446; --danger: #d92d35;
  color-scheme: light;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh; background: var(--bg-base); color: var(--text-main);
  font: 400 15px/1.47 var(--font-sans); letter-spacing: -0.006em; -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
}
a { color: inherit; }
button, input { font: inherit; color: inherit; }
svg { display: block; flex-shrink: 0; }
.muted { color: var(--text-muted); }
.num { font-variant-numeric: tabular-nums; }
[hidden] { display: none !important; }

/* ---------- каркас ---------- */
.shell { max-width: 560px; margin: 0 auto; padding: 0 16px 64px; }
.hdr { position: sticky; top: 0; z-index: 20; background: color-mix(in oklab, var(--bg-base) 86%, transparent);
  backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border-bottom: 1px solid var(--border); }
.hdr .in { max-width: 560px; margin: 0 auto; padding: 10px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.hl { display: flex; flex-direction: column; gap: 2px; min-width: 0; text-decoration: none; }
.hl img { height: 22px; width: auto; max-width: 150px; object-fit: contain; object-position: left; }
.hl small { font-size: 11px; font-weight: 600; color: var(--text-muted); display: flex; align-items: center; gap: 5px; }
.hl small i { width: 6px; height: 6px; border-radius: 9px; background: var(--brand-green-text); }
.logo-l { display: none; }
.app-theme-light .logo-d { display: none; } .app-theme-light .logo-l { display: block; }
.hr { display: flex; align-items: center; gap: 4px; flex-shrink: 0; }
.ib { width: 36px; height: 36px; display: grid; place-items: center; color: var(--text-muted); border-radius: 12px;
  border: 0; background: transparent; cursor: pointer; text-decoration: none; }
.ib:hover { background: var(--bg-el); color: var(--text-main); }

.hero { padding: 28px 0 4px; }
.hero h1 { font-size: 30px; line-height: 1.2; letter-spacing: -0.022em; font-weight: 800; margin: 0 0 8px; }
.hero h1 b { color: var(--brand); font-weight: 800; }
.hero p { margin: 0; color: var(--text-muted); font-size: 15px; }
.perks { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }

section.step { margin-top: 20px; }
.glabel { font-size: 12px; line-height: 1.33; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted);
  margin: 0 6px 8px; display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.glabel .n { color: var(--brand); }
.card { background: var(--bg-card); border: 1px solid var(--border); border-radius: 22px; overflow: hidden; }
.pad { padding: 16px; }
.note { font-size: 12px; line-height: 1.33; color: var(--text-muted); margin: 8px 6px 0; }
.note a { color: var(--text-main); font-weight: 600; text-decoration: none; border-bottom: 1px solid var(--border-strong); }

/* ---------- строки и плашки ---------- */
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-top: 1px solid var(--border); }
.row:first-child { border-top: 0; }
button.row, label.row { width: 100%; background: transparent; border-left: 0; border-right: 0; border-bottom: 0; text-align: left; cursor: pointer; }
button.row:first-child, label.row:first-child { border-top: 0; }
button.row:hover, label.row:hover { background: var(--bg-hover); }
.rt { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.rt b { font-size: 14px; line-height: 1.43; font-weight: 700; }
.rt small { font-size: 12px; line-height: 1.33; color: var(--text-muted); margin-top: 1px; }
.tile { width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex-shrink: 0; }
.t-brand { background: var(--brand-15); color: var(--brand); }
.t-green { background: rgba(0, 193, 106, .15); color: var(--brand-green-text); }
.t-blue { background: rgba(59, 130, 246, .15); color: #3b82f6; }
.t-violet { background: rgba(139, 92, 246, .15); color: #8b5cf6; }
.t-amber { background: rgba(245, 158, 11, .15); color: #f59e0b; }
.t-gray { background: var(--bg-el); color: var(--text-muted); }
.t-red { background: color-mix(in oklab, var(--danger) 15%, transparent); color: var(--danger); }

.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 700; padding: 4px 8px; border-radius: 8px; line-height: 1.33; }
.chip.ok { background: rgba(0, 193, 106, .12); color: var(--brand-green-text); }
.chip.muted { background: var(--bg-el); color: var(--text-muted); }
.chip.warn { background: rgba(245, 158, 11, .15); color: #e08a00; }
.chip.bad { background: color-mix(in oklab, var(--danger) 14%, transparent); color: var(--danger); }
.chip.brandchip { background: var(--brand-15); color: var(--brand); }
.chip.plain { background: var(--bg-card); border: 1px solid var(--border); color: var(--text-muted); font-weight: 600; }
.badge { background: var(--brand); color: var(--on-brand); font-size: 11px; font-weight: 800; border-radius: 99px; padding: 2px 8px; line-height: 1.36; }

/* ---------- кнопки и поля ---------- */
.btn { font: 700 15px/1.47 var(--font-sans); border: 0; border-radius: 16px; padding: 14px 16px; display: flex; align-items: center;
  justify-content: center; gap: 8px; cursor: pointer; width: 100%; text-decoration: none; transition: opacity .15s, transform .05s; }
.btn:active { transform: scale(.99); }
.btn.primary { background: var(--brand); color: var(--on-brand); }
.btn.primary:disabled { opacity: .5; cursor: default; transform: none; }
.btn.soft { background: var(--brand-10); border: 1px solid var(--brand-20); color: var(--brand); }
.btn.ghost { background: transparent; color: var(--text-muted); font-size: 13px; padding: 8px; width: auto; }
.btn.neutral { background: var(--bg-el); color: var(--text-main); }
.btn.sm { padding: 10px 14px; border-radius: 12px; font-size: 14px; width: auto; }

.field { display: flex; gap: 8px; }
.input { background: var(--bg-input); border: 1px solid var(--border); border-radius: 16px; padding: 14px 16px; font-weight: 700;
  width: 100%; min-width: 0; outline: none; font-variant-numeric: tabular-nums; transition: border-color .15s; }
.input::placeholder { color: var(--text-muted); font-weight: 600; }
.input:focus { border-color: color-mix(in oklab, var(--brand) 55%, transparent); }
.input.big { font-size: 30px; line-height: 1.2; letter-spacing: -0.022em; font-weight: 800; text-align: center; padding: 14px; }
.err { color: var(--danger); font-size: 13px; font-weight: 600; margin: 8px 6px 0; }

/* ---------- профиль покупателя ---------- */
.me { display: flex; align-items: center; gap: 14px; padding: 16px; }
.ava { width: 48px; height: 48px; border-radius: 99px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 20px; flex-shrink: 0;
  background: linear-gradient(135deg, #ff4d8d, var(--brand) 55%, #a3003c); }
.mt { min-width: 0; flex: 1; display: flex; flex-direction: column; align-items: flex-start; }
.mt b { font-size: 17px; line-height: 1.41; font-weight: 800; letter-spacing: -0.011em; }
.mt small { font-size: 12px; color: var(--text-muted); margin: 0 0 6px; }

/* ---------- переключатель ---------- */
.seg { display: grid; grid-template-columns: 1fr 1fr; gap: 4px; padding: 4px; background: var(--bg-card); border: 1px solid var(--border); border-radius: 16px; }
.seg button { border: 0; background: transparent; border-radius: 12px; padding: 10px; font-weight: 700; font-size: 14px; color: var(--text-muted); cursor: pointer;
  display: flex; align-items: center; justify-content: center; gap: 8px; }
.seg button.on { background: var(--bg-el); color: var(--text-main); }

/* ---------- тарифы ---------- */
.tariffs { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.tcard { position: relative; text-align: left; cursor: pointer; background: var(--bg-card); border: 1px solid var(--border); border-radius: 22px; padding: 14px;
  display: flex; flex-direction: column; gap: 2px; min-height: 112px; transition: border-color .15s, background .15s; }
.tcard:hover { border-color: var(--border-strong); }
.tcard.on { border-color: var(--brand); background: color-mix(in oklab, var(--brand) 6%, var(--bg-card)); box-shadow: inset 0 0 0 1px var(--brand); }
.tcard .tn { font-size: 14px; font-weight: 700; }
.tcard .tp { font-size: 24px; line-height: 1.25; letter-spacing: -0.019em; font-weight: 800; margin-top: auto; font-variant-numeric: tabular-nums; }
.tcard .tm { font-size: 12px; color: var(--text-muted); font-variant-numeric: tabular-nums; }
.tcard .badge { position: absolute; top: 12px; right: 12px; }

.stepper { display: flex; align-items: center; gap: 2px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 12px; padding: 3px; flex-shrink: 0; }
.stepper button { width: 32px; height: 32px; border: 0; border-radius: 9px; background: transparent; color: var(--text-main); display: grid; place-items: center; cursor: pointer; }
.stepper button:hover:not(:disabled) { background: var(--bg-el); }
.stepper button:disabled { color: var(--text-muted); opacity: .45; cursor: default; }
.stepper output { min-width: 58px; text-align: center; font-weight: 800; font-size: 14px; font-variant-numeric: tabular-nums; }

.presets { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 12px; justify-content: center; }
.presets button { border: 1px solid var(--border); background: var(--bg-input); border-radius: 99px; padding: 7px 14px; font-weight: 700; font-size: 14px; cursor: pointer;
  font-variant-numeric: tabular-nums; }
.presets button.on { border-color: var(--brand); color: var(--brand); background: var(--brand-10); }

/* ---------- способ оплаты ---------- */
.radio { width: 22px; height: 22px; border-radius: 99px; border: 2px solid var(--bg-light); flex-shrink: 0; display: grid; place-items: center; color: var(--on-brand); }
.on > .radio { border-color: var(--brand); background: var(--brand); }

/* ---------- итог ---------- */
.total { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; padding: 16px 16px 12px; }
.total .sum { font-size: 30px; line-height: 1.2; letter-spacing: -0.022em; font-weight: 800; font-variant-numeric: tabular-nums; }
.total small { font-size: 13px; color: var(--text-muted); }
.paybox { padding: 0 16px 16px; }
.lines { padding: 0 16px; }
.line { display: flex; justify-content: space-between; gap: 12px; font-size: 13px; color: var(--text-muted); padding: 3px 0; }
.line span:last-child { color: var(--text-main); font-weight: 600; font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- заказ ---------- */
.status-hero { padding: 28px 16px 20px; display: flex; flex-direction: column; align-items: center; text-align: center; gap: 10px; }
.status-hero .tile { width: 64px; height: 64px; border-radius: 22px; }
.status-hero h1 { font-size: 24px; line-height: 1.25; letter-spacing: -0.019em; font-weight: 800; margin: 4px 0 0; }
.status-hero p { margin: 0; color: var(--text-muted); font-size: 14px; max-width: 380px; }
.copybox { display: flex; align-items: center; gap: 8px; background: var(--bg-input); border: 1px solid var(--border); border-radius: 16px; padding: 6px 6px 6px 14px; }
.copybox code { flex: 1; min-width: 0; font: 600 13px/1.38 ui-monospace, SFMono-Regular, Menlo, monospace; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.stack { display: flex; flex-direction: column; gap: 10px; }
.spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .55; } }

.toast { position: fixed; left: 50%; bottom: 28px; transform: translate(-50%, 20px); opacity: 0; pointer-events: none; z-index: 50;
  background: var(--invert-bg); color: var(--invert-text); font-size: 13px; font-weight: 700; padding: 10px 16px; border-radius: 99px;
  box-shadow: 0 8px 28px rgba(0, 0, 0, .25); transition: opacity .2s, transform .2s; }
.toast.show { opacity: 1; transform: translate(-50%, 0); }

.foot { margin-top: 40px; text-align: center; font-size: 12px; color: var(--text-muted); }
.foot a { text-decoration: none; font-weight: 600; }

.skel { background: var(--bg-el); border-radius: 22px; min-height: 112px; }
.skel.pulse { animation: pulse 1.2s ease-in-out infinite; }

@media (max-width: 380px) {
  .hero h1 { font-size: 24px; }
  .tcard .tp { font-size: 20px; }
  .stepper output { min-width: 48px; }
}

/* ---------- админка ---------- */
.admin .shell { max-width: 1100px; }
.admin .hdr .in { max-width: 1100px; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.tbl th, .tbl td { padding: 10px 12px; text-align: left; border-top: 1px solid var(--border); vertical-align: top; }
.tbl th { border-top: 0; font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-muted); font-weight: 700; }
.tbl td a { text-decoration: none; font-weight: 700; }
.tbl tr:hover td { background: var(--bg-hover); }
.scroll { overflow-x: auto; }
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 8px; }
.kpi { background: var(--bg-card); border: 1px solid var(--border); border-radius: 22px; padding: 14px 16px; }
.kpi b { display: block; font-size: 24px; font-weight: 800; letter-spacing: -0.019em; font-variant-numeric: tabular-nums; }
.kpi small { color: var(--text-muted); font-size: 12px; }
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.filters a { text-decoration: none; }
pre.ev { margin: 4px 0 0; white-space: pre-wrap; word-break: break-all; font: 12px/1.5 ui-monospace, Menlo, monospace; color: var(--text-muted);
  background: var(--bg-input); border: 1px solid var(--border); border-radius: 12px; padding: 10px; }
a.row { color: inherit; }
a.row:hover { background: var(--bg-hover); }
