/* SMS HUB — плоская тема: графит, тёплый белый и одна латунная краска. Без градиентов и свечения. */
:root {
  --bg: #0c0e11;
  --surface: #13161a;
  --surface-2: #181c21;
  --line: #23282f;
  --line-strong: #353b45;
  --text: #edeae3;
  --muted: #8c919b;
  --accent: #c9a96b;
  --accent-hover: #d8bb82;
  --accent-ink: #15110a;
  --accent-soft: rgba(201, 169, 107, .1);
  --ok: #86b596;
  --danger: #d9776f;
  --radius: 14px;
  --radius-sm: 10px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --serif: "Iowan Old Style", "Palatino Linotype", Palatino, "Book Antiqua", Georgia, serif;
  --mono: ui-monospace, SFMono-Regular, "SF Mono", Menlo, Consolas, monospace;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; -webkit-text-size-adjust: 100%; text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.6;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--accent); text-decoration: none; transition: color .15s ease; }
a:hover { color: var(--accent-hover); }

h1, h2, h3 { margin: 0 0 .5em; line-height: 1.18; font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; }
h1 { font-size: clamp(1.9rem, 3.6vw, 2.75rem); }
h2 { font-size: clamp(1.4rem, 2.4vw, 1.8rem); }
h3 { font-size: 1.15rem; }
p { margin: 0 0 1em; }

.muted { color: var(--muted); }
.small { font-size: .86rem; }
.mono { font-family: var(--mono); }
.link { color: var(--accent); }

.wrap { width: 100%; max-width: 1140px; margin: 0 auto; padding: 0 22px; }
.narrow { max-width: 540px; }

/* --- верхняя панель --- */
.topbar {
  position: sticky;
  top: 0;
  z-index: 30;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 16px 28px;
  border-bottom: 1px solid var(--line);
  background: var(--bg);
}
.brand { display: flex; align-items: center; color: var(--text); font-family: var(--serif); font-size: 1.3rem; font-weight: 500; letter-spacing: .02em; }
.brand:hover { color: var(--text); }
.nav { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; }
.nav a { color: var(--muted); padding: 8px 12px; border-radius: var(--radius-sm); transition: color .15s ease, background .15s ease; }
.nav a:hover { color: var(--text); background: var(--surface-2); }
.nav a.btn-primary { color: var(--accent-ink); }
.nav a.btn-primary:hover { color: var(--accent-ink); background: var(--accent-hover); }

/* --- кнопки --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 11px 20px;
  border: 1px solid transparent;
  border-radius: var(--radius-sm);
  font: inherit; font-weight: 600;
  cursor: pointer; white-space: nowrap;
  transition: background .15s ease, border-color .15s ease, color .15s ease;
}
.btn:active { transform: translateY(1px); }
.btn-primary { background: var(--accent); color: var(--accent-ink); }
.btn-primary:hover { background: var(--accent-hover); color: var(--accent-ink); }
.btn-ghost { background: transparent; border-color: var(--line-strong); color: var(--text); }
.btn-ghost:hover { border-color: var(--muted); background: var(--surface-2); color: var(--text); }
.btn-sm { padding: 8px 14px; font-size: .87rem; }
.btn-lg { padding: 14px 26px; font-size: 1.02rem; }
.btn-block { width: 100%; }
.btn:disabled { opacity: .4; cursor: not-allowed; }
.btn:disabled:active { transform: none; }

:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 6px; }

/* --- карточки --- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 24px;
}
.empty { text-align: center; padding: 44px 22px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }

@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
  html { scroll-behavior: auto; }
}

/* --- лендинг --- */
.hero { padding: 88px 22px 52px; text-align: center; }
.hero-inner { max-width: 840px; margin: 0 auto; }
.eyebrow { margin: 0 0 22px; color: var(--accent); font-size: .92rem; }
.lead { font-size: 1.1rem; color: var(--muted); max-width: 640px; margin: 0 auto 32px; }
.hero-actions { display: flex; gap: 12px; justify-content: center; flex-wrap: wrap; }
.hero-stats {
  display: flex; justify-content: center; flex-wrap: wrap;
  margin: 56px auto 0; max-width: 700px;
  border-top: 1px solid var(--line);
}
.hero-stats .stat { flex: 1 1 200px; display: flex; flex-direction: column; gap: 2px; padding: 22px 12px 0; }
.hero-stats b { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; }
.hero-stats span { color: var(--muted); font-size: .86rem; }

.section { padding: 44px 22px; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; margin: 28px 0 18px; flex-wrap: wrap; }
.section-title { margin-bottom: 18px; }
.section-head .section-title { margin-bottom: 0; }

.steps { display: grid; grid-template-columns: repeat(3, 1fr); gap: 16px; }
.step { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 26px; }
.step-num {
  width: 34px; height: 34px; margin-bottom: 16px;
  display: grid; place-items: center;
  border: 1px solid var(--accent);
  border-radius: 50%;
  color: var(--accent);
  font-family: var(--serif);
  font-size: 1rem;
}

.features { display: grid; grid-template-columns: repeat(4, 1fr); gap: 0; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.feature { padding: 26px 24px; border-left: 1px solid var(--line); }
.feature:first-child { border-left: none; padding-left: 0; }
.feature h3 { font-size: 1.05rem; }
.feature p { margin: 0; font-size: .94rem; }

.price-list { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); column-gap: 48px; border-top: 1px solid var(--line); }
.price-row { display: flex; align-items: baseline; justify-content: space-between; gap: 16px; padding: 15px 2px; border-bottom: 1px solid var(--line); }
.price-name { min-width: 0; overflow-wrap: anywhere; }
.price-value { font-variant-numeric: tabular-nums; color: var(--accent); font-weight: 600; }

.faq { display: grid; gap: 10px; }
.faq details { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius-sm); padding: 16px 20px; transition: border-color .15s ease; }
.faq details[open] { border-color: var(--line-strong); }
.faq summary { cursor: pointer; font-weight: 600; list-style: none; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: "+"; float: right; color: var(--muted); }
.faq details[open] summary::after { content: "−"; }
.faq p { margin: 12px 0 0; color: var(--muted); }

.cta {
  margin: 48px auto 72px;
  max-width: 780px;
  padding: 52px 26px;
  text-align: center;
  border-radius: var(--radius);
  border: 1px solid var(--line-strong);
  background: var(--surface);
}
.cta h2 { margin-bottom: 10px; }

/* --- выбор сервиса --- */
.picker { max-width: 560px; margin: 0 auto 40px; padding: 28px; }
.picker .picker-form { margin-top: 0; gap: 14px; }
.picker .hint { margin: 0 0 6px; text-align: center; }
.head-center { flex-direction: column; align-items: center; text-align: center; gap: 4px; }
.select {
  width: 100%;
  padding: 14px 44px 14px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background-color: var(--bg);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 14 14' fill='none'%3E%3Cpath d='M3 5.25 7 9.25l4-4' stroke='%238c919b' stroke-width='1.6' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-repeat: no-repeat;
  background-position: right 16px center;
  color: var(--text);
  font: inherit;
  cursor: pointer;
  appearance: none;
  -webkit-appearance: none;
  transition: border-color .15s ease;
}
.select:hover { border-color: var(--muted); }
.select:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.select option { background: var(--surface-2); color: var(--text); }

.dot { width: 8px; height: 8px; border-radius: 50%; display: inline-block; }
.dot-ok { background: var(--ok); }
.dot-off { background: #4a5260; }

/* --- кабинет --- */
.balance-bar {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 28px 0 22px; padding: 16px 22px;
  border: 1px solid var(--line); border-radius: var(--radius);
  background: var(--surface);
}
.balance { display: flex; flex-direction: column; }
.balance b { font-family: var(--serif); font-weight: 500; font-size: 1.5rem; }
.balance-big { font-family: var(--serif); font-size: 2.6rem; font-weight: 500; margin: 6px 0 20px; }

.order-panel { margin-bottom: 8px; border-color: var(--accent); }
.order-head { display: flex; align-items: center; gap: 14px; flex-wrap: wrap; margin-bottom: 18px; }
.order-phone { font-family: var(--mono); font-size: 1.06rem; }
.order-price { margin-left: auto; color: var(--muted); }
.order-body { display: flex; flex-direction: column; gap: 12px; }
.code-wrap { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.code { font-family: var(--mono); font-size: 2.5rem; font-weight: 700; letter-spacing: .2em; color: var(--accent); }
.waiting { display: flex; align-items: center; gap: 16px; }
.waiting-title { font-weight: 600; }
.spinner {
  width: 28px; height: 28px; border-radius: 50%;
  border: 2px solid var(--line-strong);
  border-top-color: var(--accent);
  animation: spin .85s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.order-actions { display: flex; gap: 10px; margin-top: 18px; flex-wrap: wrap; }

/* --- таблицы --- */
.table-wrap { padding: 0; overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: .92rem; }
.table th, .table td { padding: 14px 16px; text-align: left; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table th { color: var(--muted); font-weight: 500; font-size: .84rem; background: var(--surface-2); white-space: nowrap; }
.table tbody tr { transition: background .15s ease; }
.table tbody tr:hover { background: var(--surface-2); }
.table tr:last-child td { border-bottom: none; }
.code-cell { color: var(--accent); font-weight: 700; letter-spacing: .1em; }

.badge {
  display: inline-block; padding: 3px 11px; border-radius: 999px;
  font-size: .78rem; font-weight: 600;
  border: 1px solid var(--line-strong); color: var(--muted);
}
.badge-accent { color: var(--accent); border-color: var(--accent); }
.badge-waiting, .badge-pending { color: var(--accent); border-color: rgba(201, 169, 107, .45); background: var(--accent-soft); }
.badge-done, .badge-paid { color: var(--ok); border-color: rgba(134, 181, 150, .45); background: rgba(134, 181, 150, .1); }
.badge-cancelled, .badge-failed { color: var(--muted); }
.badge-expired, .badge-error { color: var(--danger); border-color: rgba(217, 119, 111, .45); background: rgba(217, 119, 111, .1); }
.badge-approved, .badge-refunded { color: var(--ok); border-color: rgba(134, 181, 150, .45); background: rgba(134, 181, 150, .1); }
.badge-rejected { color: var(--danger); border-color: rgba(217, 119, 111, .45); background: rgba(217, 119, 111, .1); }

/* --- формы --- */
.form { display: flex; flex-direction: column; gap: 16px; margin-top: 16px; }
.field { display: flex; flex-direction: column; gap: 8px; }
.field > span { font-size: .88rem; color: var(--muted); }
.input {
  width: 100%;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.input-xs { width: 96px; padding: 8px 10px; font-size: .85rem; }
.input-note { width: 130px; }
.hint { color: var(--muted); font-size: .82rem; font-style: normal; }
.countdown { font-variant-numeric: tabular-nums; color: var(--accent); }
.countdown.expired { color: var(--danger); }
.muted.negative { color: var(--danger); }
.topup-timer-line { margin: 16px 0; }
.danger { color: var(--danger); border-color: rgba(217, 119, 111, .5); }
.danger:hover { color: var(--danger); border-color: var(--danger); background: rgba(217, 119, 111, .08); }
.row-actions { display: flex; flex-direction: column; gap: 8px; }
.details-card { padding: 0; margin-bottom: 18px; }
.details-card > summary {
  padding: 16px 22px; cursor: pointer; font-weight: 600; list-style: none;
}
.details-card > summary::-webkit-details-marker { display: none; }
.details-card > summary::after { content: "+"; float: right; color: var(--muted); }
.details-card[open] > summary::after { content: "−"; }
.details-card .table-wrap { border-top: 1px solid var(--line); }
.topup-history .pay-history { padding: 0 16px 16px; margin-bottom: 0; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip {
  padding: 8px 16px;
  border: 1px solid var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--text);
  font: inherit; font-size: .86rem;
  cursor: pointer;
  transition: border-color .15s ease, color .15s ease;
}
.chip:hover { border-color: var(--accent); color: var(--accent); }
.chip:active { transform: scale(.97); }
.inline-form { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.check { display: flex; align-items: center; gap: 6px; font-size: .82rem; color: var(--muted); }
.check input, .pay-method input { accent-color: var(--accent); }
.auth-card { margin: 48px 0; padding: 32px; }

/* --- способы оплаты --- */
.pay-methods { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.pay-method {
  display: flex; align-items: center; gap: 10px;
  padding: 13px 15px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  cursor: pointer;
  font-size: .92rem;
  transition: border-color .15s ease, background .15s ease;
}
.pay-method:hover { border-color: var(--muted); }
.pay-method:has(input:checked) { border-color: var(--accent); background: var(--accent-soft); }

/* --- пополнение: визуальный экран --- */
.pay-page { padding-bottom: 40px; }
.pay-page .section-head { margin-bottom: 12px; }
.link-back { display: inline-flex; align-items: center; gap: 6px; }
.link-back::before { content: "←"; }

@media (max-width: 680px) {
  .topbar .link-back { font-size: 0; padding: 7px 10px; }
  .topbar .link-back::before { content: "←"; font-size: 1rem; }
}

.pay-box {
  display: flex; flex-direction: column; gap: 18px;
  padding: 20px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}

.pay-balance {
  display: flex; flex-direction: column; gap: 2px;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface-2);
}
.pay-balance b { font-family: var(--serif); font-weight: 500; font-size: 1.7rem; }

.pay-amount { display: flex; flex-direction: column; gap: 6px; }
.pay-amount-label { font-size: .92rem; color: var(--muted); }
.pay-amount-input {
  display: flex; align-items: center; gap: 4px;
  padding: 6px 16px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.pay-amount-input:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.pay-amount-sign { color: var(--accent); font-family: var(--serif); font-size: 1.9rem; line-height: 1; }
.pay-amount-field {
  flex: 1; min-width: 0; width: 100%;
  padding: 4px 0;
  border: none; outline: none; background: transparent;
  color: var(--text);
  font-family: var(--serif); font-size: 2rem; font-weight: 500;
  -moz-appearance: textfield;
  appearance: textfield;
}
.pay-amount-field::-webkit-outer-spin-button,
.pay-amount-field::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.quick-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.quick-btn {
  min-height: 52px;
  padding: 10px 6px;
  border: 1px solid var(--line-strong);
  border-radius: var(--radius-sm);
  background: var(--bg);
  color: var(--text);
  font: inherit; font-weight: 600; font-size: 1.05rem;
  cursor: pointer;
  transition: border-color .12s ease, background .12s ease, color .12s ease, transform .08s ease;
}
.quick-btn:active { transform: scale(.97); }
.quick-btn:hover { border-color: var(--accent); }
.quick-btn.selected {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--accent-ink);
}
.quick-repeat { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; margin-top: -6px; }
.repeat-btn {
  padding: 6px 12px;
  border: 1px dashed var(--line-strong);
  border-radius: 999px;
  background: transparent;
  color: var(--muted);
  font: inherit; font-size: .85rem;
  cursor: pointer;
}
.repeat-btn:hover { border-color: var(--accent); color: var(--accent); }

.pay-methods-big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.pay-method-card {
  position: relative;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
  min-height: 96px;
  padding: 14px;
}
.pay-method-card input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pay-method-card.is-active { border-color: var(--accent); background: var(--accent-soft); }
.pay-logo {
  display: inline-grid; place-items: center;
  width: 38px; height: 38px;
  border-radius: 10px;
  background: var(--accent);
  color: var(--accent-ink);
  font-weight: 700; font-size: .9rem; letter-spacing: .02em;
}
.pay-logo-lg { width: 48px; height: 48px; font-size: 1.05rem; }
.pay-method-name { font-weight: 600; font-size: .95rem; }
.pay-radio {
  position: absolute; top: 12px; right: 12px;
  width: 18px; height: 18px;
  border: 2px solid var(--line-strong);
  border-radius: 50%;
}
.pay-method-card.is-active .pay-radio { border-color: var(--accent); background: radial-gradient(circle, var(--accent) 45%, transparent 46%); }

.pay-summary {
  display: flex; flex-direction: column; gap: 8px;
  padding: 14px 16px;
  border-radius: var(--radius-sm);
  background: var(--surface-2);
  border: 1px solid var(--line);
}
.pay-summary-line { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: .95rem; }
.pay-summary-line b { font-family: var(--serif); font-weight: 500; font-size: 1.25rem; }
.pay-summary-bar {
  height: 8px;
  border-radius: 999px;
  background: var(--line);
  overflow: hidden;
}
.pay-summary-bar i {
  display: block; height: 100%; width: 6%;
  border-radius: inherit;
  background: var(--accent);
  transition: width .2s ease;
}

.pay-submit { min-height: 56px; font-size: 1.05rem; }
.pay-error { display: none; margin: 0; color: var(--danger); font-size: .9rem; }
.pay-error.visible { display: block; }
.pay-note { display: flex; gap: 8px; align-items: flex-start; margin: 0; color: var(--muted); font-size: .88rem; line-height: 1.45; }
.pay-note-icon {
  flex: none;
  display: inline-grid; place-items: center;
  width: 20px; height: 20px;
  border-radius: 50%;
  background: rgba(134, 181, 150, .15);
  color: var(--ok);
  font-size: .8rem; font-weight: 700;
}
.pay-note-icon.amber { background: var(--accent-soft); color: var(--accent); }

.pay-steps {
  display: flex; align-items: center; justify-content: space-between; gap: 8px;
  margin-top: 16px; padding: 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  background: var(--surface);
}
.pay-step { display: flex; align-items: center; gap: 8px; font-size: .84rem; color: var(--muted); min-width: 0; }
.pay-step-icon {
  flex: none;
  display: inline-grid; place-items: center;
  width: 26px; height: 26px;
  border-radius: 50%;
  border: 1px solid var(--accent);
  color: var(--accent);
  font-family: var(--serif); font-size: .9rem;
}
.pay-step-arrow { color: var(--line-strong); }
.pay-steps-vertical { flex-direction: column; align-items: flex-start; gap: 12px; margin: 12px 0 16px; padding: 0; border: none; background: none; }

.pay-history { display: flex; flex-direction: column; gap: 8px; margin-bottom: 12px; }
.pay-tile {
  display: flex; align-items: center; gap: 12px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: var(--radius-sm);
  background: var(--surface);
  color: var(--text);
  transition: border-color .15s ease;
}
.pay-tile:hover { border-color: var(--line-strong); color: var(--text); }
.pay-tile-icon {
  flex: none;
  display: inline-grid; place-items: center;
  width: 34px; height: 34px;
  border-radius: 50%;
  font-size: .95rem; font-weight: 700;
}
.pay-tile-main { display: flex; flex-direction: column; min-width: 0; flex: 1; }
.pay-tile-main b { font-size: 1.05rem; }
.pay-tile-status { display: flex; flex-direction: column; align-items: flex-end; font-size: .85rem; white-space: nowrap; }
.pay-tile-paid { border-color: rgba(134, 181, 150, .35); }
.pay-tile-paid .pay-tile-icon { background: rgba(134, 181, 150, .15); color: var(--ok); }
.pay-tile-pending { border-color: rgba(201, 169, 107, .4); }
.pay-tile-pending .pay-tile-icon { background: var(--accent-soft); color: var(--accent); }
.pay-tile-expired, .pay-tile-failed { opacity: .75; }
.pay-tile-expired .pay-tile-icon, .pay-tile-failed .pay-tile-icon { background: rgba(217, 119, 111, .12); color: var(--danger); }

.balance-cta {
  display: flex; align-items: center; justify-content: space-between; gap: 16px;
  margin: 4px 0 18px;
  color: var(--text);
}
.balance-cta:hover { color: var(--text); border-color: var(--line-strong); }
.balance-cta-main { display: flex; flex-direction: column; gap: 2px; }
.balance-cta-sum { font-family: var(--serif); font-weight: 500; font-size: 2.2rem; }
.balance-cta-btn { gap: 6px; }
.plus-icon { font-size: 1.2rem; line-height: 1; }
.wallet-grid { align-items: start; }

.txn-list { display: flex; flex-direction: column; }
.txn-row { display: flex; align-items: center; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.txn-row:last-child { border-bottom: none; }
.txn-icon {
  flex: none;
  display: inline-grid; place-items: center;
  width: 30px; height: 30px;
  border-radius: 50%;
  font-weight: 700;
}
.txn-icon.in { background: rgba(134, 181, 150, .15); color: var(--ok); }
.txn-icon.out { background: rgba(217, 119, 111, .12); color: var(--danger); }
.txn-main { display: flex; flex-direction: column; flex: 1; min-width: 0; font-size: .92rem; }
.txn-amount { white-space: nowrap; font-variant-numeric: tabular-nums; }
.txn-amount.in { color: var(--ok); }

/* --- экран счёта --- */
.invoice-box { gap: 16px; }
.invoice-top { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.invoice-top-main { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.invoice-amount { font-family: var(--serif); font-size: 2.1rem; font-weight: 500; line-height: 1.1; }
.invoice-status {
  padding: 4px 12px;
  border-radius: 999px;
  font-size: .82rem; font-weight: 600;
  white-space: nowrap;
}
.invoice-status-paid { color: var(--ok); background: rgba(134, 181, 150, .12); border: 1px solid rgba(134, 181, 150, .4); }
.invoice-status-pending { color: var(--accent); background: var(--accent-soft); border: 1px solid rgba(201, 169, 107, .45); }
.invoice-status-expired, .invoice-status-failed { color: var(--danger); background: rgba(217, 119, 111, .12); border: 1px solid rgba(217, 119, 111, .4); }

.invoice-timer { display: flex; flex-direction: column; gap: 8px; }
.invoice-timer-row { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; }
.invoice-timer-value { font-family: var(--serif); font-size: 1.6rem; font-weight: 500; }
.invoice-timer-bar { height: 8px; border-radius: 999px; background: var(--line); overflow: hidden; }
.invoice-timer-fill {
  display: block; height: 100%; width: 100%;
  border-radius: inherit;
  background: var(--accent);
  transition: width 1s linear, background .3s ease;
}
.invoice-timer-fill.low { background: var(--danger); }

.invoice-flow { display: flex; align-items: center; justify-content: space-between; gap: 6px; font-size: .8rem; color: var(--muted); flex-wrap: wrap; }
.invoice-flow-step { padding: 5px 10px; border: 1px solid var(--line-strong); border-radius: 999px; }
.invoice-flow-step.done { border-color: var(--ok); color: var(--ok); }
.invoice-flow-arrow { color: var(--line-strong); }
.invoice-check { margin-top: 2px; }

.invoice-result {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 18px;
  border-radius: var(--radius-sm);
  text-align: center;
}
.invoice-result-icon { display: grid; place-items: center; width: 44px; height: 44px; border-radius: 50%; font-size: 1.3rem; font-weight: 700; }
.invoice-result.ok { background: rgba(134, 181, 150, .08); border: 1px solid rgba(134, 181, 150, .35); }
.invoice-result.ok .invoice-result-icon { background: rgba(134, 181, 150, .18); color: var(--ok); }
.invoice-result.bad { background: rgba(217, 119, 111, .08); border: 1px solid rgba(217, 119, 111, .35); }
.invoice-result.bad .invoice-result-icon { background: rgba(217, 119, 111, .15); color: var(--danger); }

.mock-box {
  display: flex; align-items: center; gap: 10px;
  padding: 12px 14px;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius-sm);
}
.mock-box .pay-note-icon { background: var(--accent-soft); color: var(--accent); }

/* --- админка --- */
.stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin: 20px 0 28px; }
.stat-card {
  display: flex; flex-direction: column; gap: 4px;
  padding: 16px;
  border: 1px solid var(--line); border-radius: var(--radius-sm);
  background: var(--surface);
}
.stat-card b { font-family: var(--serif); font-weight: 500; font-size: 1.4rem; }
.stat-card.accent { border-color: rgba(201, 169, 107, .4); }
.stat-card.accent b { color: var(--accent); }
.kv { display: flex; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); }
.kv:last-of-type { border-bottom: none; }

.steps-list { color: var(--muted); padding-left: 20px; }
.steps-list li { margin-bottom: 9px; }

.mock-invoice {
  display: flex; flex-direction: column; gap: 4px;
  margin: 18px 0; padding: 15px;
  border: 1px dashed var(--line-strong); border-radius: var(--radius-sm);
  background: var(--bg);
}
.prose { padding-top: 36px; padding-bottom: 48px; }
.prose h2 { margin-top: 1.7em; font-size: 1.25rem; }
.prose ul { color: var(--muted); }

/* --- флеш --- */
.flash {
  margin: 18px auto 0; width: calc(100% - 44px); max-width: 1096px;
  padding: 13px 20px;
  border-radius: var(--radius-sm);
  font-size: .92rem;
}
.flash.ok { background: rgba(134, 181, 150, .1); border: 1px solid rgba(134, 181, 150, .4); color: var(--ok); }
.flash.err { background: rgba(217, 119, 111, .1); border: 1px solid rgba(217, 119, 111, .4); color: var(--danger); }
.admin-flash { width: 100%; max-width: none; margin: 0 0 16px; }

/* --- подвал --- */
.footer { margin-top: auto; padding: 32px 22px; border-top: 1px solid var(--line); }
.footer-inner { max-width: 1140px; margin: 0 auto; display: flex; justify-content: space-between; gap: 24px; flex-wrap: wrap; }
.footer-brand { font-family: var(--serif); font-size: 1.1rem; margin-bottom: 4px; }
.footer-links { display: flex; gap: 22px; flex-wrap: wrap; }
.footer-links a { color: var(--muted); }
.footer-links a:hover { color: var(--text); }

@media (max-width: 980px) {
  .grid-3, .grid-4, .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .feature:nth-child(3) { border-left: none; padding-left: 0; }
  .feature:nth-child(n+3) { border-top: 1px solid var(--line); }
}
@media (max-width: 680px) {
  .grid-2, .grid-3, .grid-4, .stats, .pay-methods, .steps, .features, .price-list { grid-template-columns: 1fr; }
  .feature, .feature:nth-child(3) { border-left: none; padding-left: 0; }
  .feature:nth-child(n+2) { border-top: 1px solid var(--line); }
  .hero { padding: 52px 18px 32px; }
  .code { font-size: 1.95rem; }
  .balance-big { font-size: 2rem; }
  .topbar { padding: 14px 16px; }
  .card, .picker, .auth-card { padding: 20px; }
}

/* --- работа с телефона: меньше лагов и «прыжков» --- */
.btn, .chip, .nav a, .pay-method, .select, .input { touch-action: manipulation; }
.table-wrap { -webkit-overflow-scrolling: touch; overscroll-behavior-x: contain; }
.work-stopped {
  display: flex; flex-direction: column; gap: 4px;
  margin-bottom: 20px; padding: 16px 20px;
  border-color: rgba(217, 119, 111, .45);
  background: rgba(217, 119, 111, .08);
}

@media (max-width: 680px) {
  html { scroll-behavior: auto; }
  body { font-size: 15px; }
  .topbar {
    position: static;               /* sticky-шапка — главный источник дёрганий на iOS */
    padding: 12px 14px;
    gap: 10px;
    flex-wrap: wrap;
  }
  .brand { font-size: 1.15rem; }
  .nav {
    width: 100%;
    flex-wrap: wrap;
    gap: 2px;
    overflow: visible;
  }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { padding: 8px 10px; font-size: .9rem; white-space: nowrap; }
  .nav a.btn { padding: 7px 12px; }
  .wrap { padding: 0 14px; }
  .card, .picker, .auth-card { padding: 16px; }
  .section-head { margin: 20px 0 12px; }
  .table { font-size: .84rem; }
  .table th, .table td { padding: 10px 12px; }
  /* 16px не даёт iOS зумить страницу при фокусе на поле */
  .input, .select, textarea { font-size: 16px; }
  .input-xs { width: 92px; padding: 8px; font-size: 16px; }
  .input-note { width: 120px; }
  .row-actions .inline-form { flex-wrap: wrap; }
  .stats { gap: 8px; }
  .stat-card { padding: 12px; }
  .stat-card b { font-size: 1.2rem; }
  .flash { width: calc(100% - 28px); }
  .details-card > summary { padding: 14px 16px; }
  /* мелкий текст на телефоне читается, а не превращается в точку */
  .small { font-size: .9rem; }
  .hint { font-size: .88rem; }
  .pay-note { font-size: .9rem; }
  .pay-tile-status { font-size: .82rem; }
}

/* --- пополнение на телефоне: крупные кнопки под большой палец --- */
@media (max-width: 680px) {
  .pay-page { padding-bottom: 96px; }          /* место под липкую кнопку */
  .pay-box { padding: 16px; gap: 14px; }
  .pay-amount-field { font-size: 2.2rem; }
  .quick-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
  .quick-btn { min-height: 56px; font-size: 1.15rem; }
  .pay-methods-big { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .pay-method-card { min-height: 104px; }
  .pay-summary-line b { font-size: 1.15rem; }
  .pay-steps { display: none; }               /* на телефоне шаги дублируют кнопки */
  .balance-cta { padding: 16px; }
  .balance-cta-sum { font-size: 1.9rem; }
  .pay-tile { padding: 12px; }
  .invoice-amount { font-size: 1.9rem; }
  .invoice-top { flex-wrap: nowrap; }
  .invoice-status { position: static; }

  /* Кнопка «Пополнить» всегда под рукой, пока листаешь суммы */
  .pay-page #topup-submit,
  .pay-page .invoice-check .btn,
  .pay-page .btn-block {
    position: sticky;
    bottom: 8px;
    z-index: 5;
    box-shadow: 0 -8px 18px rgba(12, 14, 17, .85);
  }
  .pay-page .invoice-check { position: sticky; bottom: 8px; margin: 0; }
}

/* несколько номеров одновременно */
.orders { display: grid; gap: 14px; margin-bottom: 22px; }
.order-panel .order-head { flex-wrap: wrap; gap: 10px; align-items: center; }
.order-phone.mono { font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 1.25rem; letter-spacing: .02em; }
.order-actions { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.sms-box { margin: 10px 0 4px; padding: 10px 12px; border: 1px solid var(--line, rgba(255,255,255,.12)); border-radius: 10px; word-break: break-word; white-space: pre-wrap; }
