/* ============ SANCHO Aurora Glass ============
   Токены и компоненты перенесены из дизайна
   «SANCHO Aurora Glass.dc.html» (Claude Design handoff).
   Светлая/тёмная темы переключаются data-theme на <html>. */

:root {
  --acc1: #58e8b6;
  --acc2: #31d6ae;
  --acc: #12a389;
  /* аврора · светлая */
  --au-a: rgba(110, 231, 183, 0.5);
  --au-b: rgba(94, 234, 212, 0.4);
  --au-c: rgba(190, 242, 100, 0.24);
  --au-d: rgba(125, 211, 252, 0.28);
  --bg-grad-top: #f2faf6;
  --bg-grad-bottom: #e6f3ed;
  --text: #132321;
  --text-2: #566b67;
  --muted: #7b8f8a;
  --muted-2: #8da09b;
  --mono-strong: #28433c;
  --glass-bg: rgba(255, 255, 255, 0.6);
  --glass-border: rgba(255, 255, 255, 0.85);
  --glass-shadow: 0 16px 36px -18px rgba(23, 84, 68, 0.28), inset 0 1px 0 rgba(255, 255, 255, 0.9);
  --glass-blur: 22px;
  --glass-sat: 180%;
  --divider: rgba(16, 44, 37, 0.08);
  --chip-fg: #0b7f66;
  --chip-bg: rgba(20, 163, 137, 0.09);
  --chip-border: rgba(20, 163, 137, 0.18);
  --pill-bg: rgba(20, 163, 137, 0.06);
  --pill-border: rgba(20, 163, 137, 0.18);
  --mono-fg: #28433c;
  --btn2-bg: rgba(255, 255, 255, 0.5);
  --btn2-border: rgba(18, 163, 137, 0.32);
  --btn2-fg: #0b7f66;
  --radio-off: rgba(18, 163, 137, 0.35);
  --plan-bg: rgba(255, 255, 255, 0.5);
  --plan-border: rgba(255, 255, 255, 0.8);
  --plan-sel-bg: rgba(255, 255, 255, 0.75);
  --icon-tile-bg: rgba(255, 255, 255, 0.5);
  --icon-tile-border: rgba(255, 255, 255, 0.75);
  --ok-fg: #0d7a48; --ok-bg: rgba(18, 160, 95, 0.1); --ok-border: rgba(18, 160, 95, 0.25); --ok-dot: #12a05f;
  --wait-fg: #9a6a00; --wait-bg: rgba(255, 190, 90, 0.24); --wait-border: rgba(240, 175, 80, 0.5); --wait-dot: #e79600;
  --part-fg: #b4520c; --part-bg: rgba(255, 150, 80, 0.24); --part-border: rgba(240, 130, 60, 0.5); --part-dot: #e5680f;
  --dead-fg: #6b7f7a; --dead-bg: rgba(16, 44, 37, 0.06); --dead-border: rgba(16, 44, 37, 0.1); --dead-dot: #93a8a2;
  --amber-strong: #5a3d05; --amber-mid: #8a6b25; --amber-note: #8a5a1a; --amber-deep: #5c320a;
  --green-permo: #12a05f;
  --red: #cf3f4e;   /* опасные действия/ошибки; без неё кнопка «Закрыть подписку» была белой */
  --sheet-bg: rgba(255, 255, 255, 0.92);
  --sheet-border: rgba(255, 255, 255, 0.9);
  --grabber: rgba(16, 44, 37, 0.16);
  --tab-bg: rgba(255, 255, 255, 0.62);
  --tab-border: rgba(255, 255, 255, 0.75);
  --tab-shadow: 0 -8px 22px -14px rgba(23, 84, 68, 0.26);
  --tab-inactive: #8da09b;
  --qr-shadow: 0 10px 24px -10px rgba(23, 84, 68, 0.34), inset 0 0 0 1px rgba(16, 44, 37, 0.05);
  --banner-order-bg: linear-gradient(135deg, rgba(255, 212, 145, 0.55), rgba(255, 186, 116, 0.36));
  --banner-order-border: rgba(240, 175, 95, 0.6);
  --banner-order-shadow: 0 12px 26px -16px rgba(190, 120, 20, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.75);
  --banner-part-bg: linear-gradient(140deg, rgba(255, 185, 120, 0.44), rgba(255, 150, 95, 0.32));
  --banner-part-border: rgba(240, 150, 75, 0.6);
  --info-bg: rgba(20, 163, 137, 0.07);
  --info-border: rgba(20, 163, 137, 0.16);
  --info-icon-bg: rgba(20, 163, 137, 0.16);
  --info-icon-fg: #0f9a80;
  --info-text: #566b67;
}

:root[data-theme="dark"] {
  --acc1: #48e2ab;
  --acc2: #1cc4ad;
  --acc: #34d399;
  --au-a: rgba(52, 211, 153, 0.26);
  --au-b: rgba(16, 185, 129, 0.18);
  --au-c: rgba(13, 148, 136, 0.13);
  --au-d: rgba(4, 120, 87, 0.16);
  --bg-grad-top: #0b1120;
  --bg-grad-bottom: #080d1a;
  --text: #f4f7fb;
  --text-2: rgba(226, 232, 240, 0.85);
  --muted: rgba(148, 163, 184, 0.75);
  --muted-2: rgba(148, 163, 184, 0.75);
  --mono-strong: #e2e8f0;
  --glass-bg: rgba(148, 163, 184, 0.07);
  --glass-border: rgba(148, 163, 184, 0.16);
  --glass-shadow: 0 18px 40px -20px rgba(0, 0, 0, 0.7), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --glass-sat: 160%;
  --divider: rgba(148, 163, 184, 0.12);
  --chip-fg: #7fe9c3;
  --chip-bg: rgba(148, 163, 184, 0.10);
  --chip-border: rgba(148, 163, 184, 0.22);
  --pill-bg: rgba(148, 163, 184, 0.08);
  --pill-border: rgba(148, 163, 184, 0.18);
  --mono-fg: #e2e8f0;
  --btn2-bg: rgba(52, 211, 153, 0.08);
  --btn2-border: rgba(52, 211, 153, 0.42);
  --btn2-fg: #34d399;
  --radio-off: rgba(148, 163, 184, 0.4);
  --plan-bg: rgba(148, 163, 184, 0.06);
  --plan-border: rgba(148, 163, 184, 0.14);
  --plan-sel-bg: rgba(52, 211, 153, 0.10);
  --icon-tile-bg: rgba(148, 163, 184, 0.09);
  --icon-tile-border: rgba(148, 163, 184, 0.14);
  --ok-fg: #6ee0a8; --ok-bg: rgba(18, 160, 95, 0.16); --ok-border: rgba(40, 200, 131, 0.34); --ok-dot: #28c883;
  --wait-fg: #f0c07a; --wait-bg: rgba(255, 180, 90, 0.16); --wait-border: rgba(240, 170, 90, 0.32); --wait-dot: #f0a63d;
  --part-fg: #f0a366; --part-bg: rgba(255, 150, 80, 0.16); --part-border: rgba(240, 130, 60, 0.34); --part-dot: #f07a2e;
  --dead-fg: #b6c2d1; --dead-bg: rgba(148, 163, 184, 0.08); --dead-border: rgba(148, 163, 184, 0.14); --dead-dot: #7c8ba1;
  --amber-strong: #ffd9a8; --amber-mid: #e0af74; --amber-note: #e0af74; --amber-deep: #ffd0a8;
  --green-permo: #6ee0a8;
  --red: #ef5f6b;   /* опасные действия/ошибки (тёмная тема) */
  --sheet-bg: rgba(11, 17, 32, 0.92);
  --sheet-border: rgba(148, 163, 184, 0.14);
  --grabber: rgba(255, 255, 255, 0.2);
  --tab-bg: rgba(11, 17, 32, 0.72);
  --tab-border: rgba(148, 163, 184, 0.14);
  --tab-shadow: 0 -8px 22px -14px rgba(0, 0, 0, 0.6);
  --tab-inactive: #64748b;
  --qr-shadow: 0 12px 28px -10px rgba(0, 0, 0, 0.6);
  --banner-order-bg: linear-gradient(135deg, rgba(255, 182, 110, 0.2), rgba(255, 150, 90, 0.12));
  --banner-order-border: rgba(240, 170, 90, 0.32);
  --banner-order-shadow: 0 12px 26px -18px rgba(0, 0, 0, 0.6), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  --banner-part-bg: linear-gradient(140deg, rgba(255, 170, 100, 0.22), rgba(255, 130, 80, 0.12));
  --banner-part-border: rgba(240, 140, 70, 0.38);
  --info-bg: rgba(148, 163, 184, 0.08);
  --info-border: rgba(148, 163, 184, 0.16);
  --info-icon-bg: rgba(52, 211, 153, 0.18);
  --info-icon-fg: #7fe9c3;
  --info-text: rgba(203, 213, 225, 0.8);
}

* { box-sizing: border-box; margin: 0; }
html { height: 100%; }
body { min-height: 100%; }
:root {
  /* системные отступы: берём больший из iOS safe-area и переменной Telegram */
  --safe-b: max(env(safe-area-inset-bottom, 0px), var(--tg-safe-area-inset-bottom, 0px));
  --safe-t: max(env(safe-area-inset-top, 0px), var(--tg-content-safe-area-inset-top, 0px));
  --tabbar-h: calc(64px + var(--safe-b));
  --header-h: 52px;
}
body {
  /* 14.08, решение владельца: системный шрифт (SF на iPhone, Roboto на Android) —
     как было до ребрендинга 04.08, клиентам он нравился больше. Manrope удалён
     совсем, вместе с файлами; на сайте он остаётся, там это фирменный шрифт. */
  font-family: -apple-system, 'SF Pro Display', 'SF Pro Text', system-ui,
               'Segoe UI', Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
  color: var(--text);
  /* контент не прячется под фикс-хедером сверху и таббаром снизу */
  padding-top: calc(var(--header-h) + var(--safe-t));
  padding-bottom: calc(var(--tabbar-h) + 28px);
  background: var(--bg-grad-bottom);
}

/* верхний хедер: логотип SANCHO + контекстный заголовок экрана + «назад» */
#tgheader {
  position: fixed; top: 0; left: 0; right: 0; z-index: 15;
  max-width: 480px; margin: 0 auto;
  height: calc(var(--header-h) + var(--safe-t)); padding: var(--safe-t) 14px 0;
  display: flex; align-items: center; justify-content: space-between;
  background: var(--tab-bg);
  -webkit-backdrop-filter: blur(20px) saturate(var(--glass-sat));
  backdrop-filter: blur(20px) saturate(var(--glass-sat));
  border-bottom: 1px solid var(--divider);
}
#tgheader .lead { display: flex; align-items: center; gap: 8px; min-width: 64px; z-index: 2; }
#tgheader .back { font-size: 26px; line-height: 1; color: var(--text-2); font-weight: 300; margin-top: -3px; cursor: pointer; background: none; border: 0; padding: 0; font-family: inherit; }
#tgheader .logo { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 11px; background: linear-gradient(180deg, var(--acc1), var(--acc2)); display: flex; align-items: center; justify-content: center; color: #fff; box-shadow: 0 5px 12px -3px rgba(20, 184, 166, 0.55), inset 0 1px 0 rgba(255, 255, 255, 0.4); }
#tgheader .ttl { position: absolute; left: 50%; transform: translateX(-50%); text-align: center; padding-top: var(--safe-t); }
#tgheader .ttl .t { font-size: 15px; font-weight: 700; color: var(--text); letter-spacing: -0.01em; white-space: nowrap; }
#tgheader .ttl .s { font-size: 10.5px; color: var(--muted); margin-top: 1px; }
#tgheader .actions { display: flex; align-items: center; gap: 8px; z-index: 2; }
#tgheader .actions button { width: 30px; height: 30px; flex: 0 0 auto; border-radius: 50%; background: var(--btn2-bg); border: 1px solid var(--tab-border); display: flex; align-items: center; justify-content: center; color: var(--text-2); font-size: 15px; line-height: 1; cursor: pointer; font-family: inherit; padding: 0; }
/* аврора-фон */
#aurora {
  position: fixed; inset: 0; z-index: -1;
  background:
    radial-gradient(90% 58% at 4% -10%, var(--au-a), transparent 55%),
    radial-gradient(86% 58% at 108% -2%, var(--au-b), transparent 55%),
    radial-gradient(94% 70% at 104% 106%, var(--au-c), transparent 60%),
    radial-gradient(96% 72% at -8% 108%, var(--au-d), transparent 60%),
    linear-gradient(180deg, var(--bg-grad-top), var(--bg-grad-bottom));
}
a { color: var(--acc); text-decoration: none; }
#screen { padding: 14px 16px 20px; max-width: 480px; margin: 0 auto; display: flex; flex-direction: column; gap: 13px; }


.h-hero { font-size: 20px; font-weight: 850; letter-spacing: -0.025em; }
.sec-label { font-size: 11.5px; font-weight: 750; color: var(--muted-2); text-transform: uppercase; letter-spacing: 0.06em; padding: 2px 2px 0; }

.glass {
  padding: 15px; border-radius: 24px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  border: 1px solid var(--glass-border);
  box-shadow: var(--glass-shadow);
}
.divider { height: 1px; background: var(--divider); }

.chip {
  display: inline-flex; align-items: center; white-space: nowrap;
  font-size: 11px; font-weight: 650; line-height: 1;
  color: var(--chip-fg); background: var(--chip-bg);
  border: 1px solid var(--chip-border);
  padding: 5px 10px; border-radius: 999px;
}

.icon-tile {
  flex: 0 0 auto; border-radius: 17px;
  background: var(--icon-tile-bg); border: 1px solid var(--icon-tile-border);
  display: flex; align-items: center; justify-content: center;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.5);
}
.icon-tile img { object-fit: contain; filter: drop-shadow(0 6px 11px rgba(20, 166, 140, 0.4)); }

.btn {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; height: 48px; border: 0; border-radius: 16px;
  font-size: 14.5px; font-weight: 750; font-family: inherit; cursor: pointer;
  /* текст на мятном градиенте тёмно-зелёный, как на сайте: белый на мяте не читается.
     Светящийся градиент (правка владельца 04.08) живёт в --acc1/--acc2 и ЕДИН для всех
     акцентных заливок: кнопки, активные чипы, вкладки админки, бейджи, графики */
  /* 180° вместо 135°: на широкой низкой кнопке диагональ клала светлое пятно в угол,
     а верх-середина темнела (замечание владельца 04.08). Вертикальный градиент светлым
     краем вверх одинаков на кнопке ЛЮБОЙ ширины — «Выбрать» и «Написать менеджеру»
     больше не выглядят разноцветными */
  background: linear-gradient(180deg, var(--acc1), var(--acc2)); color: #062b1f;
  box-shadow: 0 16px 30px -10px rgba(20, 184, 166, 0.5), inset 0 1px 0 rgba(255, 255, 255, 0.35);
}
.btn:disabled { opacity: 0.62; cursor: default; }
.btn.secondary {
  background: var(--btn2-bg); border: 1px solid var(--btn2-border);
  color: var(--btn2-fg); box-shadow: none; height: 48px; font-weight: 700; font-size: 14.5px;
}
.btn.ghost { background: transparent; color: var(--text-2); box-shadow: none; height: 48px; font-weight: 700; font-size: 14.5px; }
.btn.small { height: 42px; border-radius: 13px; font-size: 14px; }

.badge-status {
  display: inline-flex; align-items: center; gap: 7px; width: fit-content;
  font-size: 12.5px; font-weight: 700; padding: 6px 12px; border-radius: 999px;
}
.badge-status .dot { width: 7px; height: 7px; border-radius: 50%; }
.b-wait { color: var(--wait-fg); background: var(--wait-bg); border: 1px solid var(--wait-border); }
.b-wait .dot { background: var(--wait-dot); box-shadow: 0 0 0 3px rgba(231, 150, 0, 0.2); }
.b-part { color: var(--part-fg); background: var(--part-bg); border: 1px solid var(--part-border); }
.b-part .dot { background: var(--part-dot); box-shadow: 0 0 0 3px rgba(229, 104, 15, 0.2); }
.b-ok { color: var(--ok-fg); background: var(--ok-bg); border: 1px solid var(--ok-border); }
.b-ok .dot { background: var(--ok-dot); }
.b-dead { color: var(--dead-fg); background: var(--dead-bg); border: 1px solid var(--dead-border); }
.b-dead .dot { background: var(--dead-dot); }
.badge-mini { font-size: 11px; font-weight: 700; padding: 4px 9px; border-radius: 999px; flex: 0 0 auto; }


/* карточка-баннер активной заявки */
.order-banner {
  display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-radius: 20px;
  background: var(--banner-order-bg); border: 1px solid var(--banner-order-border);
  box-shadow: var(--banner-order-shadow); cursor: pointer;
}
.order-banner .ico {
  width: 42px; height: 42px; flex: 0 0 auto; border-radius: 13px;
  background: rgba(255, 255, 255, 0.35); display: flex; align-items: center; justify-content: center; font-size: 20px;
}
.order-banner b.title { display: block; font-size: 13.5px; font-weight: 750; color: var(--amber-strong); }
.order-banner .meta { font-size: 11.5px; color: var(--amber-mid); margin-top: 2px; }
.order-banner .chev { color: var(--amber-mid); font-size: 24px; font-weight: 300; }

/* планы */
.plan {
  display: flex; align-items: center; gap: 13px; padding: 14px; border-radius: 20px;
  background: var(--plan-bg); border: 1.5px solid var(--plan-border);
  cursor: pointer; position: relative;
}
.plan.selected {
  background: var(--plan-sel-bg); border: 2px solid var(--acc1);
  box-shadow: 0 14px 28px -14px rgba(20, 184, 166, 0.45);
}
.plan .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--radio-off); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.plan.selected .radio { border-color: var(--acc1); }
.plan.selected .radio::after { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--acc1); box-shadow: 0 0 8px rgba(52, 211, 153, 0.7); }
.plan .p-title { font-size: 15px; font-weight: 750; }
.plan .p-sub { font-size: 11.5px; color: var(--muted); margin-top: 1px; }
.plan .p-price { font-size: 17px; font-weight: 850; text-align: right; }
.plan .p-permo { font-size: 11px; color: var(--green-permo); font-weight: 700; margin-top: 1px; text-align: right; }
.save-badge {
  position: absolute; top: -9px; right: 16px; font-size: 10px; font-weight: 750; color: #062b1f;
  background: linear-gradient(135deg, var(--acc1), var(--acc2));
  padding: 3px 9px; border-radius: 999px; box-shadow: 0 6px 12px -4px rgba(20, 184, 166, 0.6);
}

/* фичи «что вы получаете» */
.feature { display: flex; gap: 11px; align-items: flex-start; }
.feature .check {
  width: 26px; height: 26px; flex: 0 0 auto; border-radius: 9px; margin-top: 1px;
  background: var(--chip-bg); display: flex; align-items: center; justify-content: center;
  color: var(--acc); font-weight: 800;
}
.feature b { display: block; font-size: 13.5px; font-weight: 700; }
.feature span { font-size: 12px; color: var(--text-2); line-height: 1.35; margin-top: 1px; display: block; }

/* оплата */
.timer-card { text-align: center; padding: 17px; }
.timer-card .cap { font-size: 11px; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted-2); }
.timer-card .time { font-size: 34px; font-weight: 850; letter-spacing: 0.01em; font-variant-numeric: tabular-nums; margin-top: 3px; line-height: 1; }
.progress { height: 6px; border-radius: 3px; background: var(--chip-bg); margin-top: 14px; overflow: hidden; }
.progress > div { height: 100%; border-radius: 3px; background: linear-gradient(90deg, var(--acc1), var(--acc2)); }

.copy-pill {
  display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 14px;
  background: var(--pill-bg); border: 1px solid var(--pill-border); cursor: pointer;
}
.copy-pill .val {
  flex: 1; min-width: 0; font-family: 'SF Mono', ui-monospace, 'Roboto Mono', Menlo, monospace;
  font-size: 12.5px; font-weight: 600; color: var(--mono-fg); word-break: break-all; line-height: 1.45;
}
.copy-pill .cico { flex: 0 0 auto; color: var(--acc); display: flex; flex-direction: column; align-items: center; gap: 2px; }
.copy-pill .cico span { font-size: 9px; font-weight: 700; }
.kv-label { flex: 0 0 auto; font-size: 10.5px; font-weight: 700; color: var(--muted); width: 52px; }

.qr-box { display: flex; justify-content: center; padding: 4px 0 0; }
.qr-box > div { padding: 12px; border-radius: 18px; background: #fff; box-shadow: var(--qr-shadow); }
.qr-box img { width: 148px; height: 148px; display: block; }

.info-banner { display: flex; gap: 10px; padding: 12px 13px; border-radius: 16px; background: var(--info-bg); border: 1px solid var(--info-border); }
.info-banner .i {
  flex: 0 0 auto; width: 20px; height: 20px; border-radius: 50%;
  background: var(--info-icon-bg); color: var(--info-icon-fg);
  font-size: 12px; font-weight: 800; display: flex; align-items: center; justify-content: center;
}
.info-banner p { font-size: 11.5px; line-height: 1.42; color: var(--info-text); }

/* частичная оплата: стеклянная карточка в общем стиле, янтарь — только акцент
   (метка/процент/прогресс), суммы — обычным цветом текста, не «жжёным» */
.partial-banner {
  padding: 15px 16px; border-radius: 22px;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  border: 1px solid var(--part-border);
  box-shadow: var(--glass-shadow);
}
.partial-banner .cap { display: flex; align-items: center; gap: 7px; font-size: 11.5px; font-weight: 750; color: var(--part-fg); text-transform: uppercase; letter-spacing: 0.05em; }
.partial-banner .cap::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--part-dot); box-shadow: 0 0 8px var(--part-dot); }
.partial-banner .pct { font-size: 12.5px; font-weight: 800; color: var(--part-fg); font-variant-numeric: tabular-nums; }
.partial-banner .got { font-size: 25px; font-weight: 850; color: var(--text); letter-spacing: -0.015em; line-height: 1; font-variant-numeric: tabular-nums; }
.partial-banner .of { font-size: 14.5px; font-weight: 700; color: var(--text-2); }
/* width/max-width сбрасываем явно: глобальный .bar чарта админки задаёт max-width 18px */
.partial-banner .bar { width: 100%; max-width: none; height: 7px; border-radius: 4px; background: var(--part-bg); margin-top: 12px; overflow: hidden; }
.partial-banner .bar > div { min-height: 0; }
.partial-banner .bar > div { height: 100%; border-radius: 4px; background: linear-gradient(90deg, #f2a93b, #f07a2e); box-shadow: 0 0 10px rgba(240, 130, 50, 0.45); }
.partial-banner .note { font-size: 12.5px; color: var(--text-2); margin-top: 11px; line-height: 1.45; }
.partial-banner .note b { color: var(--part-fg); }

.amber-note-banner { display: flex; gap: 11px; padding: 14px; border-radius: 20px; background: var(--wait-bg); border: 1px solid var(--wait-border); }
.amber-note-banner .i { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: rgba(229, 150, 0, 0.2); color: var(--wait-fg); font-size: 13px; font-weight: 800; display: flex; align-items: center; justify-content: center; }
.amber-note-banner p { font-size: 12px; line-height: 1.45; color: var(--amber-note); }
.amber-note-banner b { color: var(--amber-deep); }

/* успех */
.success-circle {
  width: 76px; height: 76px; margin: 0 auto; border-radius: 50%;
  background: linear-gradient(140deg, #28c883, #0f9d58);
  display: flex; align-items: center; justify-content: center;
  box-shadow: 0 20px 42px -12px rgba(18, 160, 95, 0.65), inset 0 2px 0 rgba(255, 255, 255, 0.45);
  color: #fff; font-size: 40px;
}

/* сеть · bottom sheet */
#sheet-overlay { position: fixed; inset: 0; background: rgba(12, 10, 26, 0.45); z-index: 20; }
/* модал-подтверждение — в стиле мини-аппа (не нативный диалог Telegram) */
#confirm-overlay { position: fixed; inset: 0; background: rgba(12, 10, 26, 0.5); z-index: 40; animation: cm-fade .16s ease; }
#confirm-modal {
  position: fixed; left: 22px; right: 22px; top: 50%; transform: translateY(-50%);
  max-width: 360px; margin: 0 auto; z-index: 41;
  /* почти непрозрачный фон: читаемость не зависит от backdrop-filter (в вебвью он
     слабоват); blur добавляет «мороза» там, где поддерживается */
  border-radius: 24px; background: rgba(255, 255, 255, 0.985);
  -webkit-backdrop-filter: blur(30px) saturate(var(--glass-sat));
  backdrop-filter: blur(30px) saturate(var(--glass-sat));
  border: 1px solid var(--sheet-border);
  box-shadow: 0 26px 64px -20px rgba(30, 20, 70, 0.55);
  padding: 24px 20px 18px; display: flex; flex-direction: column; gap: 18px;
  animation: cm-pop .2s cubic-bezier(.2, .9, .3, 1.05);
}
:root[data-theme="dark"] #confirm-modal { background: rgba(11, 17, 32, 0.985); }
#confirm-modal .cm-title { font-size: 15px; font-weight: 800; letter-spacing: -0.01em;
  color: var(--text); text-align: center; }
/* заголовок и пояснение — ОДИН блок: иначе к ним применялся ещё и gap:18px самого
   модала, и между строками зияла дыра в 24px (замечание владельца 11.08) */
#confirm-modal .cm-head { display: flex; flex-direction: column; gap: 5px; }
#confirm-modal .cm-title + .cm-text { color: var(--text-2); font-weight: 500; }
#confirm-modal .cm-text { font-size: 13.5px; line-height: 1.45; color: var(--text); font-weight: 600; text-align: center; }
#confirm-modal .cm-actions { display: flex; gap: 10px; }
#confirm-modal .cm-actions .btn { flex: 1; height: 48px; border-radius: 15px; font-size: 14.5px; }
@keyframes cm-fade { from { opacity: 0 } to { opacity: 1 } }
@keyframes cm-pop { from { opacity: 0; transform: translateY(-50%) scale(.93) } to { opacity: 1; transform: translateY(-50%) scale(1) } }

/* ---------- Календарь (кастомный date-picker админки) ---------- */
.cal-overlay {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center;
  justify-content: center; padding: 20px; background: rgba(12, 10, 26, 0.5);
  opacity: 0; transition: opacity .16s ease;
  /* КРИТИЧНО: прозрачность НЕ отключает нажатия. Без этой строки оверлей, не успевший
     получить .show (Telegram сворачивает вебвью — requestAnimationFrame замирает),
     остаётся невидимым, но накрывает весь экран и глушит таббар. Ловили 31.07. */
  pointer-events: none;
}
.cal-overlay.show { opacity: 1; pointer-events: auto; }
.cal-card {
  width: 100%; max-width: 340px; border-radius: 24px; padding: 16px 16px 14px;
  background: rgba(255, 255, 255, 0.985);
  -webkit-backdrop-filter: blur(30px) saturate(var(--glass-sat));
  backdrop-filter: blur(30px) saturate(var(--glass-sat));
  border: 1px solid var(--sheet-border);
  box-shadow: 0 26px 64px -20px rgba(30, 20, 70, 0.55);
  transform: scale(.94); transition: transform .18s cubic-bezier(.2, .9, .3, 1.05);
}
.cal-overlay.show .cal-card { transform: scale(1); }
:root[data-theme="dark"] .cal-card { background: rgba(11, 17, 32, 0.985); }
.cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 10px; }
.cal-title { font-size: 15.5px; font-weight: 800; color: var(--text); letter-spacing: -0.01em; }
.cal-nav {
  width: 34px; height: 34px; border-radius: 11px; border: 0; cursor: pointer;
  background: var(--pill-bg); color: var(--acc1); font-size: 20px; line-height: 1;
  display: flex; align-items: center; justify-content: center;
}
.cal-nav:active { transform: scale(.92); }
.cal-wd { display: grid; grid-template-columns: repeat(7, 1fr); margin-bottom: 4px; }
.cal-wd span { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .03em; }
.cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.cal-day {
  aspect-ratio: 1; border: 0; border-radius: 11px; cursor: pointer; background: transparent;
  color: var(--text); font-size: 14px; font-weight: 650; font-variant-numeric: tabular-nums;
  display: flex; align-items: center; justify-content: center; transition: background .12s;
}
.cal-day:active { transform: scale(.9); }
.cal-day:hover { background: var(--pill-bg); }
.cal-dim { color: var(--muted-2, var(--muted)); opacity: .45; }
.cal-today { box-shadow: inset 0 0 0 1.5px var(--acc1); color: var(--acc1); }
.cal-sel, .cal-sel:hover {
  background: linear-gradient(180deg, var(--acc1), var(--acc2)); color: #062b1f; box-shadow: none;
}
.cal-actions { display: flex; gap: 8px; margin-top: 12px; }

/* Кастомный дропдаун (замена нативного <select> — в Telegram-вебвью тот открывает
   устаревший системный список). Поле + оверлей-карточка со списком, в стиле календаря. */
.sel-field {
  display: flex; align-items: center; gap: 8px; min-width: 0; height: 40px;
  padding: 0 12px; border-radius: 11px; border: 1.5px solid var(--plan-border);
  background: var(--plan-bg); color: var(--text); font-size: 14px; font-family: inherit;
  cursor: pointer; text-align: left;
}
.sel-field:active { border-color: var(--acc1); }
.sel-field .sel-val { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sel-field .sel-chev { flex: none; color: #9a96bc; display: flex; }
.sel-overlay {
  position: fixed; inset: 0; z-index: 60; display: flex; align-items: center;
  justify-content: center; padding: 20px; background: rgba(12, 10, 26, 0.5);
  opacity: 0; transition: opacity .16s ease;
  pointer-events: none;   /* см. комментарий у .cal-overlay — невидимый оверлей не должен ловить тапы */
}
.sel-overlay.show { opacity: 1; pointer-events: auto; }
.sel-card {
  width: 100%; max-width: 340px; border-radius: 22px; padding: 6px;
  background: rgba(255, 255, 255, 0.985);
  -webkit-backdrop-filter: blur(30px) saturate(var(--glass-sat));
  backdrop-filter: blur(30px) saturate(var(--glass-sat));
  border: 1px solid var(--sheet-border);
  box-shadow: 0 26px 64px -20px rgba(30, 20, 70, 0.55);
  transform: scale(.94); transition: transform .18s cubic-bezier(.2, .9, .3, 1.05);
  max-height: 72vh; display: flex; flex-direction: column;
}
.sel-overlay.show .sel-card { transform: scale(1); }
:root[data-theme="dark"] .sel-card { background: rgba(11, 17, 32, 0.985); }
.sel-title { font-size: 11px; font-weight: 800; color: var(--muted); text-transform: uppercase;
  letter-spacing: .05em; padding: 10px 12px 8px; }
.sel-list { overflow-y: auto; display: flex; flex-direction: column; gap: 2px; padding: 2px; }
.sel-opt {
  display: flex; align-items: center; justify-content: space-between; gap: 10px; width: 100%;
  border: 0; background: transparent; cursor: pointer; font-family: inherit; text-align: left;
  padding: 13px 12px; border-radius: 13px; font-size: 14.5px; font-weight: 600; color: var(--text);
}
.sel-opt:active { background: var(--pill-bg); }
.sel-opt.on { background: var(--pill-bg); color: var(--acc1); font-weight: 750; }
.sel-opt .sel-check { flex: none; color: var(--acc1); display: flex; }

#sheet {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 21;
  max-width: 480px; margin: 0 auto;
  border-radius: 30px 30px 0 0; background: var(--sheet-bg);
  -webkit-backdrop-filter: blur(30px) saturate(var(--glass-sat));
  backdrop-filter: blur(30px) saturate(var(--glass-sat));
  border-top: 1px solid var(--sheet-border);
  box-shadow: 0 -22px 54px -22px rgba(30, 20, 70, 0.5);
  padding: 10px 16px calc(20px + var(--safe-b)); display: flex; flex-direction: column; gap: 10px;
  max-height: 86vh; overflow: hidden;
}
/* заголовок и низ (баннер + кнопка) не сжимаются и остаются на месте — скроллится только список сетей */
#sheet > * { flex-shrink: 0; }
/* список сетей — единственная скроллящаяся зона; кнопка «Подтвердить» всегда видна снизу */
#sheet .net-list { flex: 1 1 auto; min-height: 0; overflow-y: auto; -webkit-overflow-scrolling: touch;
  display: flex; flex-direction: column; gap: 10px; margin: 0 -4px; padding: 0 4px; }
#sheet .sheet-foot { display: flex; flex-direction: column; gap: 10px; padding-top: 2px; }
#sheet .grabber { width: 38px; height: 5px; border-radius: 3px; background: var(--grabber); margin: 2px auto 4px; flex: 0 0 auto; }
#sheet h3 { font-size: 18px; font-weight: 850; letter-spacing: -0.015em; }
#sheet .close { width: 30px; height: 30px; border-radius: 50%; background: var(--dead-bg); display: flex; align-items: center; justify-content: center; color: var(--text-2); font-size: 15px; cursor: pointer; }
.net-row { display: flex; align-items: center; gap: 12px; padding: 12px 13px; border-radius: 16px; background: var(--plan-bg); border: 1.5px solid var(--plan-border); cursor: pointer; }
.net-row.selected { background: var(--chip-bg); border: 1.5px solid var(--acc1); box-shadow: 0 10px 22px -14px rgba(20, 184, 166, 0.45); }
.net-row .n-ico { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; object-fit: contain; background: #fff; }
.net-row .n-ico.n-ico-eth { padding: 4px; }
.net-row .n-title { font-size: 14px; font-weight: 750; }
.net-row .n-sub { font-size: 11px; color: var(--muted); margin-top: 1px; }
.net-row .radio { width: 22px; height: 22px; border-radius: 50%; border: 2px solid var(--radio-off); flex: 0 0 auto; display: flex; align-items: center; justify-content: center; }
.net-row.selected .radio { border-color: var(--acc1); }
.net-row.selected .radio::after { content: ""; width: 11px; height: 11px; border-radius: 50%; background: var(--acc1); box-shadow: 0 0 8px rgba(52, 211, 153, 0.7); }

/* профиль: сводка + аккордеон подписок */
.subs-count {
  display: flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700;
  color: var(--chip-fg); background: var(--chip-bg); border: 1px solid var(--chip-border);
  padding: 3px 10px; border-radius: 999px;
}
.subs-list { display: flex; flex-direction: column; border-radius: 22px; overflow: hidden;
  background: var(--glass-bg);
  -webkit-backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  backdrop-filter: blur(var(--glass-blur)) saturate(var(--glass-sat));
  border: 1px solid var(--glass-border); box-shadow: var(--glass-shadow); }
.sub-item + .sub-item { border-top: 1px solid var(--divider); }
.sub-head { display: flex; align-items: center; gap: 12px; padding: 13px 15px; cursor: pointer; }
.sub-head img { width: 38px; height: 38px; flex: 0 0 auto; object-fit: contain; filter: drop-shadow(0 4px 8px rgba(122,92,250,0.35)); }
.sub-head img.pending { opacity: 0.7; }
.sub-head .s-title { font-size: 14px; font-weight: 750; letter-spacing: -0.01em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-head .s-sub { font-size: 11.5px; color: var(--muted); margin-top: 2px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sub-head .chev { flex: 0 0 auto; color: var(--muted-2); display: flex; transition: transform .2s; }
.sub-item.open .sub-head .chev { transform: rotate(180deg); }
.sub-body { display: none; padding: 0 15px 14px; flex-direction: column; gap: 8px; }
.sub-item.open .sub-body { display: flex; }
.sub-body .divider { margin-bottom: 2px; }
.sub-body .copy-pill { padding: 9px 11px; border-radius: 12px; }
.sub-body .copy-pill .val { font-size: 12.5px; }
.sub-actions { display: flex; gap: 8px; margin-top: 2px; }
.sub-actions .btn { height: 42px; border-radius: 13px; font-size: 13.5px; white-space: nowrap; min-width: 0; }

/* история */
.hist-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 0; border-bottom: 1px solid var(--divider); }
.hist-row:last-child { border-bottom: 0; }
/* строка истории с действиями: бейдж в строке, кнопки полосой ПОД ней на всю ширину
   (правка владельца 22.07 — правый стек из трёх этажей разваливал вёрстку) */
.hist-item { padding: 12px 0; border-bottom: 1px solid var(--divider); }
.hist-item:last-child { border-bottom: 0; }
.hist-item .hist-row { padding: 0; border-bottom: 0; }
.hist-actions { display: flex; gap: 8px; margin-top: 11px; }
.hist-actions .btn { flex: 1; height: 34px; border-radius: 10px; font-size: 12.5px; }
.hist-row .t { font-size: 13.5px; font-weight: 700; }
.hist-row .d { font-size: 11px; color: var(--muted-2); margin-top: 2px; }

/* faq */
.faq-card { border-radius: 18px; background: var(--glass-bg); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); border: 1px solid var(--glass-border); overflow: hidden; }
.faq-q { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 15px; cursor: pointer; font-size: 13.5px; font-weight: 700; }
.faq-q > span { flex: 1; min-width: 0; }
.faq-q .pm { flex: 0 0 auto; width: 22px; height: 22px; border-radius: 50%; background: var(--chip-bg); display: flex; align-items: center; justify-content: center; color: var(--acc); font-size: 12px; font-weight: 800; }
.faq-a { padding: 0 15px 15px; font-size: 12.5px; line-height: 1.5; color: var(--text-2); }

.res-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.res-item { display: flex; align-items: center; gap: 10px; padding: 13px; border-radius: 16px; background: var(--glass-bg); border: 1px solid var(--glass-border); font-size: 13px; font-weight: 700; color: var(--text); }
.res-item .r-ico { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 11px; display: flex; align-items: center; justify-content: center; }

/* таббар */
#tabbar {
  position: fixed; bottom: 0; left: 0; right: 0; z-index: 10;
  display: flex; align-items: flex-start; justify-content: space-around;
  height: var(--tabbar-h);
  padding: 8px 14px calc(4px + var(--safe-b));
  background: var(--tab-bg);
  -webkit-backdrop-filter: blur(20px) saturate(var(--glass-sat));
  backdrop-filter: blur(20px) saturate(var(--glass-sat));
  border-top: 1px solid var(--tab-border);
  box-shadow: var(--tab-shadow);
}
.tab {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  border: 0; background: none; cursor: pointer; font-family: inherit;
  color: var(--tab-inactive); font-size: 10px; font-weight: 600; letter-spacing: 0.01em;
  flex: 1;
}
.tab.active { color: var(--acc); }
.tab svg { display: block; }

#toast[hidden] { display: none; }
#toast {
  position: fixed; left: 50%; bottom: calc(var(--tabbar-h) + 18px); transform: translateX(-50%); z-index: 30;
  background: rgba(18, 14, 40, 0.92); color: #fff; padding: 11px 20px; border-radius: 14px;
  font-size: 14px; font-weight: 650; box-shadow: 0 18px 44px -12px rgba(0, 0, 0, 0.5);
  -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
  display: flex; align-items: center; gap: 8px; max-width: 88vw; text-align: center;
}

/* админка */
.admin-tabs { display: flex; gap: 6px; background: var(--plan-bg); border: 1px solid var(--plan-border); border-radius: 14px; padding: 4px; }
.admin-tabs button { flex: 1; border: 0; border-radius: 11px; padding: 9px 0; cursor: pointer; font-family: inherit; font-size: 12.5px; font-weight: 700; color: var(--text-2); background: transparent; }
.admin-tabs button.on { color: #062b1f; background: linear-gradient(135deg, var(--acc1), var(--acc2)); box-shadow: 0 8px 18px -8px rgba(20, 184, 166, 0.55); }
.adm-input { flex: 1; min-width: 0; padding: 9px 12px; border-radius: 11px; border: 1.5px solid var(--plan-border); background: var(--plan-bg); color: var(--text); font-size: 14px; font-family: inherit; }
.adm-input:focus { outline: none; border-color: var(--acc1); }
textarea.adm-input { line-height: 1.45; }
/* нативные стрелки-спиннеры у number-инпутов не вписываются в дизайн — прячем */
.adm-input[type="number"] { -moz-appearance: textfield; }
.adm-input[type="number"]::-webkit-outer-spin-button, .adm-input[type="number"]::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
select.adm-input { -webkit-appearance: none; appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='14' height='14' viewBox='0 0 24 24' fill='none' stroke='%239a96bc' stroke-width='2.4' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 14px center; }
/* поле цены: пилюля с $ внутри, без нативных стрелок-спиннеров (в стиле мини-аппа) */
.price-field { display: inline-flex; align-items: center; gap: 4px; flex: none; height: 34px;
  padding: 0 10px; border-radius: 10px; border: 1.5px solid var(--plan-border); background: var(--plan-bg); }
.price-field:focus-within { border-color: var(--acc1); }
.price-field .cur { color: var(--muted); font-size: 12.5px; font-weight: 600; }
.price-field input { border: 0; background: transparent; outline: none; width: 66px; text-align: right;
  padding: 0; font-size: 14px; font-weight: 700; color: var(--text); font-family: inherit; -moz-appearance: textfield; }
.price-field input::-webkit-outer-spin-button, .price-field input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.switch { width: 48px; height: 28px; border-radius: 999px; background: var(--plan-border); border: 1px solid var(--divider); position: relative; cursor: pointer; flex: 0 0 auto; padding: 0; transition: background .2s; }
.switch::after { content: ""; position: absolute; top: 2px; left: 2px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 5px rgba(0, 0, 0, 0.35); transition: transform .2s; }
.switch.on { background: linear-gradient(135deg, var(--acc1), var(--acc2)); border-color: transparent; }
.switch.on::after { transform: translateX(20px); }
.chip-btn { border: 1px solid var(--plan-border); background: var(--plan-bg); color: var(--text-2); border-radius: 999px; padding: 6px 12px; font-size: 12px; font-weight: 700; cursor: pointer; font-family: inherit; }
.chip-btn.on { color: #062b1f; background: linear-gradient(135deg, var(--acc1), var(--acc2)); border-color: transparent; }
/* overflow-x: много столбцов (напр. 30 дней) скроллятся ВНУТРИ карточки, а не разъезжают
   страницу; фикс-ширина столбца — иначе подпись «$2.2k» распирает флекс и ломает вёрстку */
.chart { display: flex; align-items: flex-end; gap: 4px; height: 110px; overflow-x: auto; overflow-y: hidden; padding-bottom: 2px; }
.bar-col { flex: 0 0 22px; min-width: 22px; display: flex; flex-direction: column; align-items: center; justify-content: flex-end; gap: 4px; }
.bar { width: 100%; max-width: 18px; border-radius: 4px 4px 0 0; background: linear-gradient(180deg, var(--acc1), var(--acc2)); min-height: 2px; }
/* бар «сегодня» — акцент + свечение; остальные в режиме «Сегодня» приглушены для контраста */
.bar.past { opacity: 0.5; }
.bar.today { box-shadow: 0 0 0 1.5px rgba(52, 211, 153, 0.5), 0 7px 16px -6px rgba(20, 184, 166, 0.7); }
.bar-lbl { font-size: 9px; color: var(--muted); }
.bar-lbl.today { color: var(--acc1); font-weight: 800; }

/* сегмент выбора темы */
.theme-seg { display: flex; gap: 6px; background: var(--plan-bg); border: 1px solid var(--plan-border); border-radius: 14px; padding: 4px; }
.theme-seg button {
  flex: 1; border: 0; border-radius: 11px; padding: 9px 0; cursor: pointer; font-family: inherit;
  font-size: 13px; font-weight: 700; color: var(--text-2); background: transparent;
}
.theme-seg button.on {
  color: #062b1f; background: linear-gradient(180deg, var(--acc1), var(--acc2));
  box-shadow: 0 8px 18px -8px rgba(20, 184, 166, 0.55);
}

/* анимированные эмодзи (Lottie/WebM вместо статичных символов) */
.tg-anim {
  display: inline-block; width: 1.25em; height: 1.25em;
  vertical-align: -0.25em; overflow: hidden;
}
.tg-anim svg, .tg-anim video, .tg-anim img { width: 100%; height: 100%; display: block; }

/* именованные эмодзи (waiting, медали тарифов) — контейнер с fallback-символом */
.named-emoji { display: inline-flex; align-items: center; line-height: 1; }
.named-emoji .tg-anim { width: 1.15em; height: 1.15em; vertical-align: middle; }
.order-banner .ico .named-emoji .tg-anim { width: 1.3em; height: 1.3em; }
.badge-status .named-emoji { margin-right: -1px; }

.row { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.muted { color: var(--muted); font-size: 11.5px; }
.center { text-align: center; }


/* ---------- Иконки продуктов: «серебро с мятным отливом» (вариант M, 04.08.2026) ----------
   3D-стикеры нарисованы в фиолетовых тонах; фильтр приглушает цвет и даёт мятный подтон,
   чтобы они не спорили с салатовым акцентом. Селектор ТОЛЬКО по трём файлам продуктов:
   иконки сетей (папка assets/networks) и монет трогать нельзя. */
/* Иконки «в цвет аватарки» (правка владельца 04.08): целевой тон 162° — середина
   мятного градиента acc1/acc2. Замер: course/premium попадают туда на -85°, analytics
   (исходник в другом фиолетовом) — на -120°. Насыщенность 0.9 («мягче», финальный выбор владельца из трёх степеней сочности). */
img[src*="icon-course"], img[src*="icon-premium"] {
  filter: hue-rotate(-85deg) saturate(0.9) brightness(1.05)
          drop-shadow(0 5px 9px rgba(15, 23, 42, 0.3));
}
img[src*="icon-analytics"] {
  filter: hue-rotate(-120deg) saturate(0.9) brightness(1.05)
          drop-shadow(0 5px 9px rgba(15, 23, 42, 0.3));
}
:root:not([data-theme="dark"]) img[src*="icon-course"],
:root:not([data-theme="dark"]) img[src*="icon-premium"] {
  filter: hue-rotate(-85deg) saturate(0.9) brightness(1.03)
          drop-shadow(0 5px 9px rgba(15, 23, 42, 0.2));
}
:root:not([data-theme="dark"]) img[src*="icon-analytics"] {
  filter: hue-rotate(-120deg) saturate(0.9) brightness(1.03)
          drop-shadow(0 5px 9px rgba(15, 23, 42, 0.2));
}

/* ---------- Платёжное окно для сайта (checkout.html во фрейме) ----------
   Отдельного хедера и таббара тут нет — рамку рисует страница сайта, а высота
   окна фиксирована ею же. Поэтому снимаем отступы под несуществующие панели. */
body.checkout-frame { padding-top: 14px; padding-bottom: 18px; }
body.checkout-frame #screen { padding: 0 14px; display: flex; flex-direction: column; gap: 12px; }
body.checkout-frame .net-row { display: block; margin-bottom: 6px; padding: 11px 13px;
  border-radius: 13px; border: 1px solid var(--plan-border); background: var(--plan-bg);
  color: var(--text); font-family: inherit; font-size: 13.5px; cursor: pointer; }
body.checkout-frame .net-row:disabled { opacity: .6; }

/* ---------- Широкая раскладка платёжного окна (макеты владельца 14.08) ----------
   Только страница checkout: мини-аппы эти правила не касаются (класс checkout-frame
   есть лишь у неё). Узкие экраны складываются в одну колонку — прежний вид. */
body.checkout-frame #screen { max-width: 1160px; margin: 0 auto; }
.co-head { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; padding: 6px 2px 4px; }
.co-head h1 { font-size: 26px; font-weight: 850; letter-spacing: -0.02em; }
.co-head .sub { color: var(--muted); font-size: 13px; }
.co-head .badge-status { margin-left: auto; }
.co-grid { display: grid; gap: 18px; }
@media (min-width: 900px) {
  .co-grid { grid-template-columns: 1.25fr 1fr; align-items: stretch; }
  /* колонки одной высоты: правая короче левой, поэтому её запас уходит
     вокруг QR-кода, а инструкция остаётся прижатой к нижнему краю */
  .co-grid > .glass { display: flex; flex-direction: column; }
  .co-grid > .glass:last-child .qr-box { flex: 1 0 auto; align-items: center; }
}
.co-closed { max-width: 520px; margin: 26px auto 4px; }
.co-closed .btn { margin-top: 16px; height: 46px; font-size: 14px; }
.co-cap { font-size: 11.5px; font-weight: 750; letter-spacing: 0.07em; text-transform: uppercase; color: var(--muted-2); }
.co-time { display: flex; align-items: center; gap: 16px; margin-top: 8px; }
.co-time .t { font-size: 34px; font-weight: 850; font-variant-numeric: tabular-nums; letter-spacing: 0.01em; line-height: 1; }
.co-progress { flex: 1; height: 6px; border-radius: 99px; background: var(--pill-bg); overflow: hidden; }
.co-progress i { display: block; height: 100%; border-radius: 99px;
  background: linear-gradient(90deg, var(--acc1), var(--acc2)); transition: width 1s linear; }
.co-div { border: 0; border-top: 1px solid var(--divider); margin: 15px 0; }
.co-prod { display: flex; gap: 12px; align-items: center; }
.co-prod img { width: 46px; height: 46px; flex: 0 0 auto; border-radius: 14px;
  background: var(--icon-tile-bg); border: 1px solid var(--icon-tile-border); padding: 5px; object-fit: contain; }
.co-sum { display: flex; align-items: flex-end; justify-content: space-between; gap: 12px; margin-top: 12px; }
.co-sum .v { font-size: 30px; font-weight: 850; letter-spacing: -0.015em; line-height: 1; }
.co-sum .v span { font-size: 15px; font-weight: 700; color: var(--text-2); }
.co-note { display: flex; gap: 10px; align-items: flex-start; border-radius: 14px;
  background: var(--info-bg); border: 1px solid var(--info-border); padding: 11px 13px;
  font-size: 12.5px; line-height: 1.45; color: var(--info-text); margin-top: 14px; }
.co-note .i { width: 20px; height: 20px; flex: 0 0 auto; border-radius: 50%;
  background: var(--info-icon-bg); color: var(--info-icon-fg); display: flex;
  align-items: center; justify-content: center; font-size: 11px; font-weight: 800; }
.co-cancel { background: none; border: 0; width: 100%; padding: 12px 0 2px; cursor: pointer;
  font-family: inherit; font-size: 14px; font-weight: 700; color: var(--text-2); }
.co-qr-cap { font-size: 12px; color: var(--muted); text-align: center; margin-top: 10px; line-height: 1.5; }
.co-instr { display: flex; justify-content: center; gap: 6px; margin-top: 14px;
  font-size: 13.5px; font-weight: 700; color: var(--acc); }
.co-instr a { text-decoration: none; padding-bottom: 2px;
  background: linear-gradient(currentColor, currentColor) no-repeat 0 100% / 0 1.5px;
  transition: background-size 0.25s ease; }
.co-instr a:hover { background-size: 100% 1.5px; }
/* экран успеха */
.co-done { max-width: 880px; margin: 0 auto; }
.co-done-head { display: flex; align-items: center; gap: 14px; padding: 10px 0 4px; }
.co-done-head .success-circle { width: 44px; height: 44px; margin: 0; box-shadow: none; }
.co-done-head h1 { font-size: 24px; font-weight: 850; letter-spacing: -0.02em; }
.co-done-sub { font-size: 14px; color: var(--text-2); margin: 2px 0 18px 58px; }
.co-done-sub b { color: var(--acc); }
.co-step { display: grid; grid-template-columns: 34px 1fr; gap: 14px; margin-bottom: 20px; }
.co-step .n { width: 28px; height: 28px; border-radius: 50%; display: flex; align-items: center;
  justify-content: center; font-size: 13px; font-weight: 800; color: #062b1f;
  background: linear-gradient(180deg, var(--acc1), var(--acc2)); }
.co-step h3 { font-size: 16px; font-weight: 800; margin-bottom: 3px; }
.co-step .hint { font-size: 12.5px; color: var(--muted); margin-bottom: 10px; }
.co-shield { display: flex; gap: 11px; align-items: flex-start; border-radius: 14px;
  background: var(--plan-bg); border: 1px solid var(--plan-border); padding: 12px 14px; margin-top: 10px; }
.co-shield b { display: block; font-size: 13.5px; margin-bottom: 2px; }
.co-shield p { font-size: 12.5px; color: var(--muted); line-height: 1.45; }
.co-was { display: flex; align-items: center; justify-content: space-between; gap: 14px;
  border-radius: 18px; background: var(--plan-bg); border: 1px solid var(--plan-border);
  padding: 16px 18px; margin-bottom: 14px; flex-wrap: wrap; }
.co-was .cell .lab { font-size: 11.5px; color: var(--muted); margin-bottom: 4px; }
.co-was .old { font-size: 16px; font-weight: 700; color: var(--muted); text-decoration: line-through; }
.co-was .new { font-size: 19px; font-weight: 850; color: var(--acc); }
.co-was .delta { padding: 6px 13px; border-radius: 99px; font-size: 12.5px; font-weight: 800;
  color: #062b1f; background: linear-gradient(180deg, var(--acc1), var(--acc2)); white-space: nowrap; }
.co-muted-row { display: flex; gap: 12px; align-items: center; border-radius: 16px;
  background: var(--plan-bg); border: 1px solid var(--plan-border); padding: 13px 15px;
  margin-bottom: 14px; color: var(--text-2); }
.co-muted-row b { display: block; font-size: 13.5px; color: var(--text); }
.co-muted-row p { font-size: 12px; color: var(--muted); }
.co-muted-row .arr { margin-left: auto; color: var(--muted); }
.co-foot { display: flex; align-items: center; justify-content: space-between; gap: 18px;
  border-top: 1px solid var(--divider); padding-top: 16px; margin-top: 6px; flex-wrap: wrap; }
.co-foot p { font-size: 12.5px; color: var(--text-2); line-height: 1.5; max-width: 520px; }
.co-foot .btn { width: auto; padding: 0 20px; }

/* оверлей выбора сети в платёжном окне */
.co-ov { position: fixed; inset: 0; background: rgba(8, 13, 26, 0.55); z-index: 30;
  display: flex; align-items: flex-start; justify-content: center; padding: 28px 16px; }
.co-sheet { width: 100%; max-width: 560px; border-radius: 22px; background: var(--sheet-bg);
  border: 1px solid var(--sheet-border); box-shadow: 0 30px 80px -30px rgba(0, 0, 0, 0.6);
  padding: 18px; }
.co-net-grid { display: grid; gap: 8px; }
@media (min-width: 560px) { .co-net-grid { grid-template-columns: 1fr 1fr; } }
.co-net { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  padding: 12px 14px; border-radius: 13px; border: 1px solid var(--plan-border);
  background: var(--plan-bg); cursor: pointer; font-family: inherit; font-size: 13.5px;
  color: var(--text); text-align: left; }
.co-net .tok { color: var(--muted); font-size: 12px; white-space: nowrap; }
.co-net.on { border-color: var(--acc); background: var(--plan-sel-bg); }
.co-net:disabled { opacity: 0.55; cursor: default; }

/* селектор сети: якорная выпадашка у плашки «Сеть» (референс 15.08) */
.co-net-wrap { position: relative; display: inline-block; }
.co-pop { position: absolute; top: calc(100% + 8px); right: 0; z-index: 40; width: 296px;
  border-radius: 16px; background: var(--sheet-bg); border: 1px solid var(--sheet-border);
  box-shadow: 0 24px 60px -24px rgba(0, 0, 0, 0.65); padding: 8px;
  display: grid; grid-template-columns: 106px 1fr; gap: 6px; }
.co-tokcol { display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--divider); padding-right: 8px; }
.co-tok { display: flex; align-items: center; gap: 8px; padding: 9px 10px; border-radius: 11px;
  border: 1px solid transparent; background: transparent; font-family: inherit; font-size: 13px;
  font-weight: 800; color: var(--text-2); cursor: pointer; text-align: left; }
.co-tok.on { background: var(--plan-sel-bg); border-color: var(--plan-border); color: var(--text); }
.co-coin { width: 20px; height: 20px; border-radius: 50%; flex: 0 0 auto; display: flex;
  align-items: center; justify-content: center; font-size: 10px; font-weight: 900; color: #fff; }
.co-coin.usdt { background: #26a17b; }
.co-coin.usdc { background: #2775ca; }
.co-chains { display: flex; flex-direction: column; gap: 2px; }
.co-chain { display: flex; justify-content: space-between; align-items: center; gap: 8px;
  padding: 9px 12px; border-radius: 11px; border: 0; background: transparent;
  font-family: inherit; font-size: 13.5px; font-weight: 700; color: var(--text);
  cursor: pointer; text-align: left; }
.co-chain:hover { background: var(--plan-bg); }
.co-chain.on { background: var(--plan-sel-bg); }
.co-chain .ck { color: var(--acc); font-weight: 900; }
.co-chain:disabled { opacity: 0.55; cursor: default; }
.co-pop .warn { grid-column: 1 / -1; display: flex; gap: 7px; align-items: flex-start;
  font-size: 11px; color: var(--amber-mid); line-height: 1.4; padding: 8px 10px 4px;
  border-top: 1px solid var(--divider); margin-top: 2px; }

/* индикатор статуса в окне мигает (референс 15.08); мини-аппу не трогаем — селектор
   ограничен checkout-frame */
@keyframes co-blink { 0%, 100% { opacity: 1; } 50% { opacity: 0.2; } }
.checkout-frame .badge-status .dot { animation: co-blink 1.6s ease-in-out infinite; }
/* янтарная полоса частичной оплаты */
.co-part-bar { height: 6px; border-radius: 99px; background: rgba(240, 175, 80, 0.22);
  overflow: hidden; margin-top: 10px; }
.co-part-bar i { display: block; height: 100%; border-radius: 99px; background: #e79600; }

/* плашка «Сеть» — тихий чип по референсу, а не акцентная кнопка */
.co-net-btn { display: inline-flex; align-items: center; gap: 7px; height: 42px;
  padding: 0 15px; border-radius: 12px; cursor: pointer; font-family: inherit;
  background: var(--plan-bg); border: 1px solid var(--plan-border);
  font-size: 13.5px; color: var(--muted); transition: border-color 0.15s, background 0.15s; }
.co-net-btn b { color: var(--text); font-weight: 800; }
.co-net-btn .chev { font-size: 10px; color: var(--muted); }
.co-net-btn:hover { border-color: var(--btn2-border); background: var(--plan-sel-bg); }
.co-net-static { display: inline-flex; align-items: center; gap: 7px; height: 38px;
  padding: 0 14px; border-radius: 12px; background: var(--plan-bg);
  border: 1px solid var(--plan-border); font-size: 13px; color: var(--muted); }
.co-net-static b { color: var(--text); font-weight: 800; }

/* высота окна = высоте содержимого: глобальный min-height:100% растягивал страницу
   до размера iframe, и сообщаемая сайту высота никогда не ужималась (храповик) */
body.checkout-frame { min-height: 0; }
