/* ==========================================================================
   TRITON — оформление Mini App
   Палитра утверждена дизайнером 19.07.2026, менять только по согласованию.
   ========================================================================== */

:root {
  --bg: #141028;            /* фон приложения */
  --card: #1C2138;          /* карточки */
  --surface: #2D3348;       /* подложки: поля ввода, вкладки, шкалы */
  --gold: #F5D146;          /* акцент: кнопки, важные цифры, активная вкладка */
  --gold-dim: rgba(245, 209, 70, .16);
  --ok: #0FC16F;            /* успех */
  --err: #FF4D4F;           /* ошибка */
  --text: #FFFFFF;          /* текст основной */
  --text2: #E0E6E6;         /* текст вторичный */
  --muted: rgba(224, 230, 230, .55);   /* совсем тихие подписи */
  --line: rgba(224, 230, 230, .10);    /* разделители */
  --radius: 16px;
  --radius-sm: 12px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }

body {
  font-family: -apple-system, system-ui, "SF Pro Text", "Segoe UI", Roboto, sans-serif;
  background: var(--bg);
  color: var(--text);
  font-size: 16px;
  line-height: 24px;                     /* типографика: текст 16/24 */
  -webkit-font-smoothing: antialiased;
}

/* ---------- заставка ---------- */

#splash {
  position: fixed; inset: 0; z-index: 1000;
  display: flex; align-items: center; justify-content: center;
  background: var(--bg);
  overflow: hidden;
  transition: opacity .45s ease;
}
#splash.hide { opacity: 0; pointer-events: none; }
/* Волна — ПОД надписью, отдельным элементом.
   Ширина 145%, а не 200%: при двойной ширине дуга обрезалась по краям и было
   видно только её середину. Теперь видно весь размах, как в образце. */
#splash .splash-wave {
  /* Волна — компактный элемент под названием, а не полоса во всю ширину.
     Раньше была 128% и лежала по низу экрана: читалась как фон, а не как знак.
     Свечение начинается на 19% высоты картинки — это учтено в отступе. */
  position: absolute; left: 50%; top: 59%;
  width: 112%; max-width: 520px;
  transform: translate(-50%, -50%);
  mix-blend-mode: lighten;
  opacity: .95;
  pointer-events: none;
  /* Растворение краёв ВПЕЧЕНО В САМ ФАЙЛ картинки: лучи гаснут к краям до
     чистого чёрного, а чёрный при наложении lighten невидим. Маской через CSS
     не получилось — в webview Telegram маска и наложение конфликтуют. */
}

/* полоска загрузки под волной */
#splash .splash-bar {
  position: absolute; left: 50%; bottom: 15%;
  transform: translateX(-50%);
  width: 132px; height: 3px; border-radius: 2px;
  background: rgba(245, 209, 70, .16);
  overflow: hidden;
}
#splash .splash-bar i {
  display: block; height: 100%; width: 38%; border-radius: 2px;
  background: var(--gold);
  animation: splashLoad 1.1s ease-in-out infinite;
}
@keyframes splashLoad {
  0%   { transform: translateX(-120%); }
  100% { transform: translateX(320%); }
}
/* Начертание тонкое и с широкими промежутками — как в образце дизайнера.
   Жирное с ореолом смотрелось тяжело и «дёшево». */
#splash .brand {
  position: absolute; left: 0; right: 0; top: 29%;
  transform: translateY(-50%);
  text-align: center;
  font-size: clamp(31px, 9.5vw, 44px);
  font-weight: 500;               /* было 300 — вышло слишком волосяным */
  letter-spacing: 8px;            /* было 14px — буквы разъезжались */
  text-indent: 8px;               /* компенсация промежутка после последней буквы */
  color: var(--gold);
  text-shadow: 0 0 28px rgba(245, 209, 70, .28);
}

/* ---------- каркас ---------- */

#app { display: flex; flex-direction: column; min-height: 100vh; }
.content { flex: 1; padding: 8px 16px 96px; }
.hidden { display: none !important; }
.loader { text-align: center; padding: 48px 0; color: var(--muted); }

/* типографика по макету: 28/34, 20/28, 16/24, 14/20 */
h1 { font-size: 28px; line-height: 34px; font-weight: 700; margin: 8px 0 16px; }
h2 { font-size: 20px; line-height: 28px; font-weight: 600; margin: 22px 0 10px; }
.sub { font-size: 14px; line-height: 20px; color: var(--muted); }

/* ---------- шапка личного кабинета ---------- */

.appheader {
  display: flex; align-items: center; justify-content: space-between;
  gap: 10px; padding: 14px 16px 6px;
}
.hdr-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.ava {
  width: 54px; height: 54px; border-radius: 50%; object-fit: cover; flex-shrink: 0;
  background: var(--surface);
}
.ava-init {
  display: flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 22px; color: var(--gold);
  border: 1px solid var(--gold-dim);
}
.hdr-names { min-width: 0; }
.hdr-name {
  font-size: 19px; line-height: 24px; font-weight: 700; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.hdr-uname {
  font-size: 13px; line-height: 18px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
/* баланс «пилюлей» в золотой рамке */
.hdr-bal {
  flex-shrink: 0; padding: 8px 14px; border-radius: 22px;
  font-size: 13px; font-weight: 700;
  background: rgba(245, 209, 70, .08); color: var(--gold);
  border: 1px solid rgba(245, 209, 70, .45);
}

/* ---------- нижнее меню ---------- */

.tabs {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 100;
  display: flex;
  background: rgba(28, 33, 56, .96);
  backdrop-filter: blur(12px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom);
}
.tab {
  flex: 1; padding: 10px 0 12px; border: 0; background: none; cursor: pointer;
  font-size: 20px; color: var(--muted);
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  transition: color .15s;
}
.tab span { font-size: 11px; line-height: 14px; }
.tab.active { color: var(--gold); }
/* иконки нарисованы линиями и берут цвет вкладки */
.tab svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7;
           stroke-linecap: round; stroke-linejoin: round; }

/* ---------- карточки ---------- */

.card {
  background: var(--card);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 12px;
}
/* заголовок внутри карточки — так на макете, вместо отдельного над ней */
.card-title { font-size: 18px; line-height: 24px; font-weight: 700; margin-bottom: 12px; }

/* ---------- кнопки ---------- */

.btn {
  display: block; width: 100%; padding: 15px; margin-top: 12px;
  border: 0; border-radius: var(--radius-sm);
  font-size: 16px; font-weight: 700; cursor: pointer;
  background: var(--gold); color: #1A1710;          /* на золоте текст тёмный */
  transition: opacity .15s, transform .05s;
}
.btn:active { transform: scale(.99); }
/* Значок внутри кнопки: берёт её цвет текста, поэтому виден и на золотой,
   и на тёмной. Класс ставим явно, а не через :has() — его не знают старые
   телефоны, и кнопка расползлась бы. */
.btn.with-ico { display: flex; align-items: center; justify-content: center; gap: 10px; }
.btn-ico {
  width: 19px; height: 19px; flex-shrink: 0;
  fill: none; stroke: currentColor; stroke-width: 1.7;
  stroke-linecap: round; stroke-linejoin: round;
}
.btn:disabled { opacity: .45; cursor: default; }
.btn.secondary {
  background: transparent; color: var(--text2);
  border: 1px solid var(--line);
}
.btn.small {
  width: auto; display: inline-block; padding: 9px 16px; font-size: 14px;
  margin-right: 8px; margin-bottom: 10px; border-radius: 10px;
}
.btn.danger { background: var(--err); color: #fff; }

/* ---------- карусель баннеров ---------- */

.banners {
  display: flex; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory;
  margin: 4px 0 18px; padding-bottom: 4px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.banners::-webkit-scrollbar { display: none; }
.banner {
  position: relative; flex: 0 0 100%; scroll-snap-align: center;
  border-radius: var(--radius); overflow: hidden;
  aspect-ratio: 2 / 1; background: var(--card);
  border: 0; padding: 0; cursor: pointer; text-align: left;
}
.banner img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.banner-text {
  position: absolute; inset: 0; padding: 18px;
  display: flex; flex-direction: column; justify-content: center; gap: 10px;
}
.banner-text.right { align-items: flex-end; text-align: right; }
.banner-title {
  font-size: 20px; line-height: 25px; font-weight: 700; color: var(--text);
  max-width: 58%; text-shadow: 0 1px 8px rgba(0, 0, 0, .5);
}
.banner-text.right .banner-title { text-align: right; }
.banner-title b { color: var(--gold); font-weight: 700; }
.banner-cta {
  align-self: flex-start; padding: 8px 16px; border-radius: 10px;
  background: var(--gold); color: #1A1710; font-size: 14px; font-weight: 700;
}
.banner-text.right .banner-cta { align-self: flex-end; }
.banner-dots { display: flex; justify-content: center; gap: 6px; margin: -10px 0 16px; }
.banner-dots i {
  width: 6px; height: 6px; border-radius: 50%; background: var(--surface);
  transition: background .2s, width .2s;
}
.banner-dots i.on { background: var(--gold); width: 18px; border-radius: 3px; }

/* ---------- полоска ценностей ---------- */

.values { display: flex; gap: 8px; margin-bottom: 18px; }
.value {
  flex: 1; text-align: center; padding: 12px 4px;
  background: var(--card); border-radius: var(--radius-sm);
}
.value .ico {
  width: 24px; height: 24px; display: block; margin: 0 auto;
  fill: none; stroke: var(--gold); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.value .lbl { font-size: 12px; line-height: 16px; color: var(--text2); margin-top: 4px; }

/* ---------- карточка продукта ---------- */

.prod { padding: 0; overflow: hidden; position: relative; }
/* карточка в списке — целиком кнопка, ведёт на экран продукта */
.prod-link {
  display: block; width: 100%; text-align: left; border: 0; cursor: pointer;
  font-family: inherit; color: inherit;
}
.prod-link:active { opacity: .85; }
/* стрелка ">" — по центру ВСЕЙ карточки, а не только верхнего ряда: из-за
   кнопки «Инструкция» снизу карточка выше, и в потоке стрелка задиралась вверх */
.prod-link { position: relative; }
.prod-link .prod-top { padding-right: 40px; }   /* место под стрелку, текст под неё не лезет */
.prod-link .menu-arrow {
  position: absolute; right: 16px; top: 50%; transform: translateY(-50%);
}
.prod-top { display: flex; gap: 14px; padding: 16px; align-items: center; }
/* чип: чёрный фон картинки убирается наложением, свечение остаётся */
.chip-wrap {
  position: relative; flex-shrink: 0; width: 92px; height: 92px;
}
/* на экране продукта чип крупнее — места хватает */
.chip-wrap.big { width: 118px; height: 118px; }
.chip-wrap.big + .prod-info .prod-title { font-size: 22px; line-height: 28px; }
.chip-wrap.big .chip-letter { font-size: 38px; }
.chip-wrap img { width: 100%; height: 100%; mix-blend-mode: lighten; }
.chip-letter {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  font-size: 30px; font-weight: 800; color: var(--gold);
  text-shadow: 0 2px 10px rgba(245, 209, 70, .5);
  transform: translateY(-4px);          /* визуальный центр верхней грани чипа */
  pointer-events: none;
}
.prod-info { min-width: 0; flex: 1; }
.prod-title { font-size: 20px; line-height: 26px; font-weight: 700; }
.prod-price { font-size: 24px; line-height: 30px; font-weight: 800; color: var(--gold); margin-top: 4px; }
.prod-body { padding: 0 16px 16px; }
/* доходность на экране продукта: Gain крупно золотом */
.gain-box {
  display: flex; align-items: baseline; justify-content: space-between;
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 14px 16px; margin-bottom: 14px;
}
.gain-lbl { font-size: 14px; color: var(--text2); }
.gain-val { font-size: 26px; line-height: 30px; font-weight: 800; color: var(--gold); }
.gain-val.neg { color: var(--err); }
.desc { white-space: pre-wrap; line-height: 22px; color: var(--text2); font-size: 15px; }
/* приглушённо, как и остальные статусы: насыщенная заливка перетягивала
   внимание с продукта и цены */
.bought-badge {
  position: absolute; top: 14px; right: 14px;
  background: rgba(15, 193, 111, .18); color: var(--ok);
  font-size: 12px; font-weight: 700;
  padding: 5px 12px; border-radius: 20px;
}
.bought-badge.pending { background: rgba(245, 209, 70, .18); color: var(--gold); }
.bought-badge.draft { background: var(--surface); color: var(--text2); }

/* кнопка «Инструкция» — той же формы и размера, что плашка «Куплено» */
.prod-instr { padding: 0 16px 14px; }
.instr-btn {
  margin: 0; width: auto; display: inline-block;
  padding: 5px 12px; font-size: 12px; font-weight: 700; border-radius: 20px;
  background: rgba(245, 209, 70, .14); color: var(--gold);
  border: 1px solid rgba(245, 209, 70, .5);
}

/* состояние заявки на экране продукта */
.order-state {
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 14px; margin-top: 14px;
}
.order-state b { display: block; margin-bottom: 4px; }
.order-state.err b { color: var(--err); }

/* ---------- призыв пригласить ---------- */

.cta-invite {
  background: linear-gradient(135deg, rgba(245, 209, 70, .14), rgba(245, 209, 70, .04));
  border: 1px solid var(--gold-dim);
}

/* ---------- статистика ---------- */

/* Плитка: подпись сверху, крупная цифра золотом, единица снизу.
   Раньше было наоборот (цифра, потом подпись) — по макету так. */
/* отступ снизу обязателен: без него ряд плиток слипался со следующим блоком */
.stat-row { display: flex; gap: 8px; margin-bottom: 12px; }
.stat {
  flex: 1; text-align: center; background: var(--card);
  border-radius: var(--radius-sm); padding: 14px 6px 12px; min-width: 0;
}
.stat-lbl {
  font-size: 12px; line-height: 16px; color: var(--muted);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-num {
  font-size: 19px; line-height: 26px; font-weight: 700; color: var(--gold);
  margin-top: 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.stat-unit { font-size: 11px; line-height: 15px; color: var(--muted); margin-top: 2px; }
/* старый вид плиток — остался в админке */
.stat .num { font-size: 20px; line-height: 26px; font-weight: 700; color: var(--gold); }
.stat .lbl { font-size: 12px; line-height: 16px; color: var(--muted); margin-top: 2px; }

/* ---------- кошелёк ---------- */

/* карточка баланса: подпись, крупная сумма, эквивалент — по центру */
.bal-card { text-align: center; padding: 20px 16px 18px; }
.bal-lbl { font-size: 13px; line-height: 18px; color: var(--muted); }
.bal-num {
  font-size: 30px; line-height: 38px; font-weight: 700; color: var(--gold);
  margin-top: 4px;
}
.bal-num span { font-size: 16px; font-weight: 600; }
.bal-approx { font-size: 13px; line-height: 18px; color: var(--muted); margin-top: 2px; }
.bal-extra {
  margin-top: 14px; padding-top: 12px; border-top: 1px solid var(--line);
  display: flex; flex-direction: column; gap: 6px;
}
.bal-extra > div { display: flex; justify-content: space-between; font-size: 14px; }
.bal-extra span { color: var(--muted); }
.bal-extra b { color: var(--text2); font-weight: 600; }

.price { font-size: 24px; font-weight: 800; color: var(--gold); margin: 10px 0; }

/* ---------- списки ---------- */

.list-item {
  padding: 12px 0; border-bottom: 1px solid var(--line);
  font-size: 15px; display: flex; justify-content: space-between; gap: 8px;
}
.list-item:last-child { border-bottom: 0; }
.list-item .sub { color: var(--muted); }
.plus { color: var(--ok); font-weight: 700; }
.minus { color: var(--err); font-weight: 700; }
.msg { padding: 12px 0; color: var(--muted); font-size: 14px; line-height: 20px; }

/* ---------- поля ввода ---------- */

input, textarea, select {
  width: 100%; padding: 13px; margin: 6px 0 12px; border-radius: var(--radius-sm);
  border: 1px solid transparent; background: var(--surface); color: var(--text);
  font-size: 16px; font-family: inherit;
}
input::placeholder, textarea::placeholder { color: var(--muted); }
input:focus, textarea:focus, select:focus { outline: 0; border-color: var(--gold-dim); }
select {
  appearance: none;
  background-image: linear-gradient(45deg, transparent 50%, var(--text2) 50%),
                    linear-gradient(135deg, var(--text2) 50%, transparent 50%);
  background-position: calc(100% - 20px) 50%, calc(100% - 14px) 50%;
  background-size: 6px 6px, 6px 6px;
  background-repeat: no-repeat;
  padding-right: 40px;
}
label { font-size: 14px; line-height: 20px; color: var(--text2); }
input[type="checkbox"] { width: auto; margin: 0; accent-color: var(--gold); }

.mono {
  font-family: ui-monospace, SFMono-Regular, monospace; font-size: 13px; word-break: break-all;
  background: var(--surface); border-radius: 10px; padding: 12px; margin: 8px 0;
  color: var(--text2);
}

/* ---------- бейджи ---------- */

.badge {
  font-size: 12px; padding: 3px 10px; border-radius: 20px;
  background: var(--surface); color: var(--text2); white-space: nowrap;
}
.badge.draft { background: var(--surface); }
.badge.pending { background: rgba(245, 209, 70, .18); color: var(--gold); }
.badge.confirmed, .badge.paid { background: rgba(15, 193, 111, .18); color: var(--ok); }
.badge.rejected { background: rgba(255, 77, 79, .18); color: var(--err); }
.count {
  display: inline-block; margin-left: 6px; min-width: 18px; padding: 1px 6px;
  border-radius: 10px; background: var(--err); color: #fff; font-size: 11px;
  text-align: center; vertical-align: middle;
}

/* ---------- разделы админки ---------- */

.seg {
  display: flex; gap: 6px; overflow-x: auto; margin: 4px 0 16px;
  -webkit-overflow-scrolling: touch; scrollbar-width: none;
}
.seg::-webkit-scrollbar { display: none; }
.seg-btn {
  flex-shrink: 0; padding: 9px 16px; border: 0; border-radius: 20px;
  background: var(--card); color: var(--text2); font-size: 14px; cursor: pointer;
}
.seg-btn.active { background: var(--gold); color: #1A1710; font-weight: 700; }

/* ---------- дерево сети ---------- */

.tree { margin: 4px 0; }
.tnode { position: relative; }
.tnode .tnode { margin-left: 18px; border-left: 1px solid var(--line); padding-left: 12px; }
.trow {
  display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 8px 0; position: relative;
}
.tnode .tnode > .trow::before {
  content: ""; position: absolute; left: -12px; top: 50%; width: 10px;
  border-top: 1px solid var(--line);
}
.tbal { font-size: 13px; color: var(--muted); flex-shrink: 0; }
.pbal { font-weight: 700; flex-shrink: 0; color: var(--gold); }
.ulink { color: var(--gold); text-decoration: none; }

/* ---------- аккордеоны админки (продукты, документы) ---------- */

.prod-head {
  display: flex; align-items: center; justify-content: space-between;
  gap: 8px; padding: 16px; cursor: pointer;
}
.prod-caret { color: var(--muted); transition: transform .2s; }
.prod.open .prod-caret { transform: rotate(180deg); }

/* ---------- сворачиваемые блоки ---------- */

.acc { padding: 0; overflow: hidden; }
.acc-head {
  display: flex; align-items: center; justify-content: space-between;
  padding: 16px; cursor: pointer; font-size: 16px; font-weight: 600;
}
.acc-caret { color: var(--muted); transition: transform .2s; display: inline-block; }
.acc.open .acc-caret { transform: rotate(180deg); }

/* строка линии: иконка и название слева, число золотом справа */
.line-left { display: flex; align-items: center; gap: 12px; min-width: 0; }
.line-ico {
  width: 24px; height: 24px; flex-shrink: 0;
  fill: none; stroke: var(--text2); stroke-width: 1.5;
  stroke-linecap: round; stroke-linejoin: round;
}
.line-right { display: flex; align-items: center; gap: 10px; flex-shrink: 0; }
/* число белым, в тон иконке — золото на этом экране и так занято плитками */
.line-right b { color: var(--text); font-size: 18px; font-weight: 700; }
.acc-body { padding: 0 16px 10px; }

/* сворачиваемый блок ВНУТРИ карточки: своих полей не имеет (они уже у карточки),
   отделяется чертой */
.acc-inline { margin-top: 16px; border-top: 1px solid var(--line); }
.acc-inline .acc-head { padding: 14px 0 0; }
.acc-inline .acc-body { padding: 10px 0 0; }

/* ---------- схема вознаграждений (см. tiersHtml) ---------- */

.tiers { margin: 16px 0; }
.tiers-title { font-size: 14px; color: var(--muted); margin-bottom: 12px; }
.tier { margin-bottom: 14px; }
.tier-head { display: flex; align-items: center; gap: 10px; }
.tier-ico {
  width: 20px; height: 20px; flex-shrink: 0;
  fill: none; stroke: var(--gold); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.tier-name {
  flex: 1; min-width: 0; font-size: 15px; line-height: 20px;
  color: var(--text); font-weight: 600;
}
/* номер линии подсказкой — в приложении эта терминология используется везде */
.tier-line { display: block; font-size: 12px; font-weight: 400; color: var(--muted); }
.tier-sum { flex-shrink: 0; font-size: 15px; font-weight: 700; color: var(--gold); white-space: nowrap; }
.tier-bar {
  height: 8px; border-radius: 5px; background: var(--surface);
  margin-top: 7px; overflow: hidden;
}
.tier-bar i {
  display: block; height: 100%; border-radius: 5px;
  background: linear-gradient(90deg, rgba(245, 209, 70, .55), var(--gold));
}

/* ---------- прогресс бонуса ---------- */

.bonus-progress-label { margin-top: 14px; font-size: 15px; }
.pbar { height: 10px; border-radius: 6px; margin-top: 8px; overflow: hidden; background: var(--surface); }
.pbar-fill {
  height: 100%; border-radius: 6px; transition: width .4s ease;
  background: linear-gradient(90deg, rgba(245, 209, 70, .7), var(--gold));
}

/* ---------- уведомление ---------- */

.toast {
  position: fixed; left: 50%; bottom: 104px; z-index: 2000;
  transform: translateX(-50%) translateY(10px);
  background: var(--surface); color: var(--text); padding: 13px 22px;
  border-radius: 22px; font-size: 14px; line-height: 20px; max-width: 82%;
  text-align: center; box-shadow: 0 8px 32px rgba(0, 0, 0, .45);
  opacity: 0; pointer-events: none; transition: opacity .25s, transform .25s;
}
.toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }

/* ---------- меню раздела «Ещё» ---------- */

.menu-group-title {
  font-size: 12px; color: var(--muted);
  text-transform: uppercase; letter-spacing: .6px; margin: 20px 4px 8px;
}
.menu-row {
  display: flex; align-items: center; justify-content: space-between; width: 100%;
  padding: 16px; border: 0; background: none; cursor: pointer; font-size: 16px;
  color: var(--text); text-align: left; border-bottom: 1px solid var(--line);
  font-family: inherit;
}
.menu-row:last-child { border-bottom: 0; }
.menu-arrow { color: var(--muted); font-size: 20px; }
.menu-left { display: flex; align-items: center; gap: 14px; min-width: 0; }
.menu-ico {
  width: 22px; height: 22px; flex-shrink: 0;
  fill: none; stroke: var(--text2); stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- согласие с офертой / подтверждение реквизитов ---------- */

.offer-accept {
  display: flex; align-items: flex-start; gap: 10px; margin: 14px 0 6px;
  font-size: 14px; line-height: 20px; color: var(--text2);
}
.offer-accept input { margin: 2px 0 0; flex-shrink: 0; }
.offer-accept a { color: var(--gold); }

/* ---------- модальное окно ---------- */

.modal-overlay {
  position: fixed; inset: 0; z-index: 3000; background: rgba(10, 8, 20, .72);
  display: none; align-items: center; justify-content: center; padding: 16px;
  backdrop-filter: blur(4px);
}
.modal-overlay.show { display: flex; }
.modal-box {
  background: var(--card); color: var(--text);
  border-radius: var(--radius); padding: 18px; max-width: 640px; width: 100%;
  max-height: 85vh; overflow-y: auto;
}
.modal-close { margin-bottom: 8px; }

/* ---------- переписка с поддержкой ---------- */

.sup-msg {
  padding: 12px 14px; margin-bottom: 10px; border-radius: 14px; max-width: 88%;
  background: var(--surface);
}
.sup-msg.mine { margin-left: auto; background: var(--gold-dim); }
.sup-who { font-size: 12px; font-weight: 700; color: var(--muted); margin-bottom: 4px; }
.sup-text { font-size: 15px; line-height: 22px; overflow-wrap: anywhere; }
.sup-time { font-size: 11px; color: var(--muted); margin-top: 5px; }
.sup-img {
  display: block; max-width: 100%; border-radius: 10px; margin-top: 8px; cursor: pointer;
  background: var(--card); min-height: 40px;
}
.sup-file {
  display: flex; align-items: center; gap: 8px; margin-top: 8px;
  padding: 10px 12px; border-radius: 10px; background: var(--surface); font-size: 14px;
}
.sup-file-name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sup-file-size { flex-shrink: 0; font-size: 12px; color: var(--muted); }
.sup-file-del {
  flex-shrink: 0; width: 26px; height: 26px; padding: 0; border: 0; cursor: pointer;
  border-radius: 50%; background: var(--card); color: var(--text2); font-size: 13px;
}

/* ---------- документы ---------- */

.doc { line-height: 24px; font-size: 16px; padding: 6px 0 24px; color: var(--text2); }
.doc-h1 { font-size: 24px; line-height: 30px; font-weight: 700; color: var(--text); margin: 16px 0 10px; }
.doc-h2 { font-size: 18px; line-height: 24px; font-weight: 600; color: var(--text); margin: 18px 0 8px; }
.doc b { color: var(--text); }

/* ---------- оплата: выбор сети и QR ---------- */

.pay-block { border-top: 1px solid var(--line); margin-top: 14px; padding-top: 14px; }

/* сети плитками в ряд, выбранная — в золотой рамке */
.net-row { display: flex; gap: 10px; margin: 6px 0 4px; }
.net-pick {
  flex: 1; display: flex; align-items: center; justify-content: center; gap: 8px;
  padding: 14px 8px; border-radius: var(--radius-sm); cursor: pointer;
  background: var(--surface); border: 1px solid transparent;
  color: var(--text); font-size: 15px; font-weight: 600; font-family: inherit;
}
.net-pick.on {
  background: rgba(245, 209, 70, .08);
  border-color: rgba(245, 209, 70, .55);
  color: var(--gold);
}
/* стрелка: подсказывает, что по свёрнутой плитке можно нажать и сменить сеть */
.net-caret { margin-left: 2px; font-size: 12px; opacity: .8; }
/* эмблема сети в фирменном цвете (нарисована линиями, см. NET_ICONS) */
.net-ico { width: 19px; height: 19px; flex-shrink: 0; display: block; }

/* белая рамка вокруг кода: код читается лучше на светлом поле,
   да и выглядит аккуратнее, чем голый квадрат на тёмной карточке */
/* адрес с кнопкой копирования внутри поля */
.addr-box {
  display: flex; align-items: center; gap: 10px;
  background: var(--surface); border-radius: var(--radius-sm);
  padding: 12px 12px 12px 14px; margin: 6px 0 4px;
}
.addr-text {
  flex: 1; min-width: 0; font-family: ui-monospace, SFMono-Regular, monospace;
  font-size: 13px; line-height: 19px; word-break: break-all; color: var(--text2);
}
.addr-copy {
  flex-shrink: 0; width: 38px; height: 38px; padding: 8px; border: 0; cursor: pointer;
  border-radius: 10px; background: transparent; color: var(--text2);
}
.addr-copy svg {
  width: 100%; height: 100%; fill: none; stroke: currentColor; stroke-width: 1.6;
  stroke-linecap: round; stroke-linejoin: round;
}
.addr-copy:active { background: var(--card); }

/* строка с суммой под кодом. Отступ снизу обязателен: без него она упиралась
   в подпись следующего поля и читалась как одна каша. */
.pay-hint {
  text-align: center; font-size: 15px; line-height: 22px; color: var(--text2);
  margin: 2px 0 22px; padding: 0 4px;
}
.pay-hint b { color: var(--gold); }

.qr-box {
  position: relative; width: 208px; margin: 18px auto;
  background: #fff; border-radius: 20px; padding: 14px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, .28);
}
[id^="qr-"] { width: 180px; height: 180px; }
[id^="qr-"] img, [id^="qr-"] canvas { display: block; }
/* Белый квадрат в центре кода со значком USDT. Код печатается с максимальной
   избыточностью, поэтому закрытый центр чтению не мешает — проверено
   расшифровкой (19.07): адрес читается верно. */
.qr-logo {
  position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%);
  width: 46px; height: 46px; border-radius: 6px;
  display: flex; align-items: center; justify-content: center;
  background: #fff; padding: 5px;
}
.qr-logo svg { width: 100%; height: 100%; display: block; }
