/* Стиль — по макетам: Manrope + Unbounded, фон #F3F4F6, акцент #1E4FE0, белые карточки с радиусом 16. */
@font-face { font-family: "Manrope"; font-weight: 400 700; font-display: swap;
  src: url("/static/fonts/manrope-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Manrope"; font-weight: 400 700; font-display: swap;
  src: url("/static/fonts/manrope-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Unbounded"; font-weight: 500 600; font-display: swap;
  src: url("/static/fonts/unbounded-cyrillic.woff2") format("woff2");
  unicode-range: U+0301, U+0400-045F, U+0490-0491, U+04B0-04B1, U+2116; }
@font-face { font-family: "Unbounded"; font-weight: 500 600; font-display: swap;
  src: url("/static/fonts/unbounded-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }

:root {
  --bg: #F3F4F6; --card: #FFFFFF; --ink: #0E1116; --ink-2: #3B414C; --ink-3: #5B6270; --line: #D5D8DE;
  --soft: #EEF0F3; --soft-2: #E3E5EA; --accent: #1E4FE0; --accent-dark: #163BA8; --accent-soft: #E8EDFC;
  --warn-bg: #FFF4E5; --warn-ink: #8A3F06; --muted: #B9BEC8; --ok: #12784A; --ok-bg: #E6F5EC;
  --nav-h: 64px;
}
* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }
html, body { margin: 0; background: var(--bg); color: var(--ink); }
body { font: 15px/1.5 "Manrope", system-ui, -apple-system, sans-serif; -webkit-text-size-adjust: 100%; }
button, input { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--accent); }
h1 { margin: 8px 0 0; font: 600 24px/1.25 "Unbounded", sans-serif; }
h2 { margin: 0; font: 600 18px/1.3 "Unbounded", sans-serif; }
p { margin: 0; }
.boot { padding: 48px 20px; text-align: center; color: var(--ink-3); }

.page { max-width: 480px; margin: 0 auto; min-height: 100vh; padding: 24px 20px calc(24px + env(safe-area-inset-bottom));
  display: flex; flex-direction: column; gap: 16px; }
.page.with-nav { padding-bottom: calc(var(--nav-h) + 28px + env(safe-area-inset-bottom)); }
.page.with-bar { padding-bottom: calc(var(--nav-h) + 100px + env(safe-area-inset-bottom)); }
.grow { margin-top: auto; }
.row { display: flex; align-items: center; gap: 12px; }
.row.top { align-items: flex-start; }
.col { display: flex; flex-direction: column; min-width: 0; }
.fill { flex: 1; min-width: 0; }
.muted { color: var(--ink-3); }
.small { font-size: 13px; line-height: 1.45; }
.strong { font-weight: 700; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.clip { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.card { background: var(--card); border-radius: 16px; padding: 20px; display: flex; flex-direction: column; gap: 14px; }
.card.tight { padding: 14px 16px; gap: 10px; }
.card.warn { background: var(--warn-bg); color: var(--warn-ink); }
.card.accent { background: var(--accent-soft); }

.tile { width: 44px; height: 44px; flex-shrink: 0; border-radius: 12px; background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center; font: 600 12px/1 "Unbounded", sans-serif;
  overflow: hidden; text-transform: uppercase; letter-spacing: -0.02em; }
.tile img { width: 100%; height: 100%; object-fit: cover; display: block; }
.tile.soft { background: var(--soft); color: var(--ink-2); }

.field { display: flex; flex-direction: column; gap: 6px; }
.field label { font-size: 13px; font-weight: 600; color: var(--ink-2); }
.input { height: 48px; width: 100%; border: 1px solid var(--line); border-radius: 12px; padding: 0 14px;
  font-size: 16px; background: #fff; outline: none; }
.input:focus { border-color: var(--accent); }
.code { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 8px; }
.code input { height: 52px; text-align: center; border: 1px solid var(--line); border-radius: 12px; font-size: 20px;
  padding: 0; background: #fff; outline: none; }
.code input:focus { border-color: var(--accent); }

.btn { height: 52px; border: 0; border-radius: 14px; background: var(--accent); color: #fff; font-size: 16px;
  font-weight: 700; padding: 0 18px; width: 100%; display: flex; align-items: center; justify-content: center; gap: 8px; }
.btn:active { background: var(--accent-dark); }
.btn:disabled { background: var(--muted); }
.btn.ghost { background: var(--soft); color: var(--ink); }
.btn.ghost:active { background: var(--soft-2); }
.btn.small { height: 40px; border-radius: 12px; font-size: 14px; width: auto; padding: 0 14px; }
.btn.danger { background: transparent; color: var(--warn-ink); font-weight: 600; height: 40px; }
.link { background: none; border: 0; padding: 0; color: var(--accent); font-weight: 600; }
.link.muted { color: var(--ink-3); font-weight: 500; }

.chips { display: flex; gap: 8px; overflow-x: auto; scrollbar-width: none; }
.chips::-webkit-scrollbar { display: none; }
.chip { flex-shrink: 0; height: 36px; padding: 0 14px; border-radius: 999px; border: 0; background: var(--soft);
  color: var(--ink-2); font-size: 14px; font-weight: 600; }
.chip.on { background: var(--ink); color: #fff; }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; background: var(--soft); border-radius: 12px; padding: 4px; }
.seg button { height: 36px; border: 0; border-radius: 10px; background: transparent; font-weight: 600; color: var(--ink-3); }
.seg button.on { background: #fff; color: var(--ink); }
.badge { display: inline-flex; align-items: center; height: 24px; padding: 0 10px; border-radius: 999px;
  background: var(--soft); color: var(--ink-2); font-size: 12px; font-weight: 700; white-space: nowrap; }
.badge.ok { background: var(--ok-bg); color: var(--ok); }
.badge.warn { background: var(--warn-bg); color: var(--warn-ink); }
.badge.accent { background: var(--accent-soft); color: var(--accent-dark); }

.big { font: 600 40px/1 "Unbounded", sans-serif; }
.tariffs { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.tariff { border: 1px solid var(--soft-2); background: #fff; border-radius: 14px; padding: 14px 8px; text-align: center;
  display: flex; flex-direction: column; gap: 4px; }
.tariff:active { border-color: var(--accent); }
.tariff b { font: 600 20px/1 "Unbounded", sans-serif; }

.list { background: var(--card); border-radius: 16px; overflow: hidden; }
.item { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border: 0; width: 100%; background: none; text-align: left; }
.item + .item { border-top: 1px solid var(--soft); }
.check { width: 24px; height: 24px; flex-shrink: 0; border-radius: 8px; border: 2px solid var(--line); display: flex;
  align-items: center; justify-content: center; color: #fff; font-weight: 700; font-size: 14px; }
.check.on { background: var(--accent); border-color: var(--accent); }
.bar { height: 6px; border-radius: 999px; background: var(--soft); overflow: hidden; }
.bar i { display: block; height: 100%; background: var(--accent); border-radius: 999px; transition: width .4s; }

.sticky { position: fixed; left: 0; right: 0; bottom: calc(var(--nav-h) + env(safe-area-inset-bottom)); padding: 10px 20px 12px;
  background: linear-gradient(to top, var(--bg) 70%, transparent); }
.sticky > div { max-width: 440px; margin: 0 auto; }
.nav { position: fixed; left: 0; right: 0; bottom: 0; height: calc(var(--nav-h) + env(safe-area-inset-bottom));
  padding-bottom: env(safe-area-inset-bottom); background: #fff; border-top: 1px solid var(--soft-2); display: flex; justify-content: center; }
.nav > div { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; width: 100%; max-width: 480px; }
.nav button { border: 0; background: none; font-size: 12px; font-weight: 600; color: var(--ink-3); position: relative; }
.nav button.on { color: var(--accent); }
.nav button .dot { position: absolute; top: 12px; right: calc(50% - 34px); min-width: 18px; height: 18px; padding: 0 5px;
  border-radius: 999px; background: var(--accent); color: #fff; font-size: 11px; line-height: 18px; }
.toast { position: fixed; left: 20px; right: 20px; top: 16px; z-index: 5; max-width: 440px; margin: 0 auto; padding: 12px 16px;
  border-radius: 14px; background: var(--ink); color: #fff; font-size: 14px; font-weight: 600; text-align: center; }
.toast.err { background: var(--warn-ink); }
.footer { text-align: center; font-size: 12px; color: var(--muted); padding-top: 8px; }
.footer a { color: var(--ink-3); text-decoration: none; }
.mono { font: 600 18px/1.3 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: 0.02em; word-break: break-all; }
.hide { display: none; }

/* Кабинет партнёра и админка */
.input.price { width: 110px; height: 40px; text-align: right; flex-shrink: 0; }
.toggle { width: 48px; height: 28px; flex-shrink: 0; border: 0; border-radius: 999px; background: var(--soft-2); padding: 3px; display: flex; }
.toggle i { width: 22px; height: 22px; border-radius: 50%; background: #fff; transition: transform .15s; }
.toggle.on { background: var(--accent); }
.toggle.on i { transform: translateX(20px); }
.big.small-big { font-size: 28px; }
.big.low, .warn-text { color: var(--warn-ink); }
.pre { white-space: pre-wrap; overflow-wrap: anywhere; }
.small.mono { font-size: 13px; }
