/* ==========================================================================
   ForgetAPI — кабинет v2, слой «Капсулы» (10.11.2026).
   Язык лендинга v4, перенесённый в кабинет: шрифт Onest, крупные заголовки, карточки с крупным радиусом.
   Капсула — только у кнопок, чипов, меток и сегментов; поля, пункты меню, суммы и вкладки — скруглённые
   прямоугольники. Белая заливка — только у главной кнопки; выбранное отмечено обводкой или лёгкой подложкой.
   Цвет по-прежнему только смысловой (зелёный / жёлтый / красный), синий — в графиках, оранжевый — знак
   Alibaba Cloud. Без градиентов, свечений и теней-«подсветок».

   Файл подключается ПОСЛЕ ui-v2.css (main/v2/_theme.html) и только меняет вид: разметка, классы и скрипты
   те же. Откат — убрать строку подключения и вернуть Inter в _theme.html.
   Разделы идут в том же порядке, что в ui-v2.css. Правила для телефона повторены здесь же: обычное правило
   этого файла сильнее @media из ui-v2.css.
   ========================================================================== */

:root[data-ui="v2"] {
    --fg-sans: Onest, system-ui, -apple-system, "Segoe UI", sans-serif;
    --surface: #0c0c0e;
    --surface-2: #161618;
    --surface-3: #1f1f22;
    --line: rgba(255,255,255,0.12);
    --line-soft: rgba(255,255,255,0.07);
    --line-strong: rgba(255,255,255,0.26);
    --text-2: #dcdce0;
    --text-3: #a3a3a8;
    --text-4: #7b7b81;
    --text-5: #55555b;
    --fg-sidebar-w: 268px;
    --fg-panel: #0c0c0e;
    --fg-panel-hover: #161618;
    --fg-panel-border: rgba(255,255,255,0.12);
    --fg-panel-muted: #a3a3a8;
    --r-card: 24px;
    --r-box: 16px;
    --r-field: 14px;
    --ease: cubic-bezier(0.2, 0.8, 0.2, 1);
}

/* 1. База ------------------------------------------------------------------ */
html[data-ui="v2"] body { font-size: 15px; line-height: 1.55; font-feature-settings: normal; text-rendering: optimizeLegibility; }
html[data-ui="v2"] ::selection { background: #fff; color: #000; }

/* 2. Каркас ---------------------------------------------------------------- */
.app-sidebar-head { height: 70px; padding: 0 14px 0 26px; }
.app-mark { flex: none; width: 24px; height: 24px; color: #fff; }
.app-name { font-size: 19px; line-height: 1; font-weight: 700; letter-spacing: -0.02em; }
.app-nav { padding: 0 14px 16px; }
.app-sidebar-foot { gap: 8px; padding: 14px; }

.nav-item { height: 38px; gap: 12px; padding: 0 13px; border: 1px solid transparent; border-radius: 12px; font-size: 15px; }
.nav-item + .nav-item { margin-top: 2px; }
.nav-item:hover { background: rgba(255,255,255,0.06); }
.nav-item .ui-icon { width: 17px; height: 17px; }
.nav-item.active, .nav-item.active:hover { background: transparent; border-color: rgba(255,255,255,0.3); color: #fff; font-weight: 500; }
.nav-item:focus-visible { outline: 2px solid #fff; outline-offset: 2px; }
.nav-tag { height: 22px; padding: 0 9px; border-radius: 999px; display: inline-flex; align-items: center; font-size: 12px; }
.nav-count { min-width: 22px; height: 22px; font-size: 12px; }
.nav-section { padding: 18px 14px 6px; }
.nav-section-title { font-size: 13px; font-weight: 400; }

.sidebar-toggle { width: 40px; height: 40px; border-radius: 12px; }

.side-balance { gap: 10px; padding: 12px 12px 12px 16px; border-radius: 16px; background: transparent; }
.side-balance .settings-btn.small { padding: 0 12px; }
.side-balance.active { border-color: var(--line-strong); background: transparent; }
.side-balance-label { font-size: 13px; }
.side-balance-amount { margin-top: 2px; font-size: 16px; letter-spacing: -0.02em; }

.profile-trigger { height: 48px; gap: 12px; padding: 0 12px 0 8px; border-radius: 14px; }
.profile-trigger:hover { background: rgba(255,255,255,0.06); }
.profile-avatar { width: 32px; height: 32px; background: var(--surface-3); border-color: var(--line); font-size: 13.5px; }
.profile-avatar.large { width: 52px; height: 52px; font-size: 20px; }
.profile-trigger-name { font-size: 15px; }
/* Меню шире сайдбара: «Профиль и безопасность» помещается в одну строку */
.profile-menu { right: auto; width: 292px; max-width: calc(100vw - 28px); bottom: calc(100% + 8px); border-radius: 18px; background: #111113; box-shadow: 0 24px 64px rgba(0,0,0,0.7); }
.profile-menu-head { gap: 12px; padding: 16px 16px 14px; }
.profile-name { font-size: 15px; font-weight: 600; }
.profile-email { font-size: 13px; }
.profile-menu-items { padding: 8px; }
.profile-item { min-height: 40px; gap: 12px; padding: 8px 12px; border-radius: 10px; font-size: 14.5px; }
.profile-item:hover { background: rgba(255,255,255,0.06); }
.profile-item .ui-icon { width: 16px; height: 16px; }
.profile-item-end { font-size: 13px; }
.profile-group-title { padding: 6px 12px 4px; font-size: 13px; }

.app-topbar { height: 60px; padding: 0 14px 0 10px; }
.topbar-balance { height: 38px; padding: 0 16px 0 14px; border-color: var(--line-strong); background: transparent; font-size: 14.5px; }

.page { max-width: 1180px; padding: 56px 48px 104px; }
.page.narrow { max-width: 820px; }
.page-head { gap: 20px 28px; margin-bottom: 40px; }
.page-title { font-size: 40px; line-height: 1.08; letter-spacing: -0.035em; }
.page-sub { margin-top: 12px; max-width: 680px; font-size: 16.5px; line-height: 1.5; }
.page-actions { gap: 10px; }
.page-back { gap: 8px; margin-bottom: 22px; font-size: 14.5px; }
@media (max-width: 1279px) { .page { padding: 44px 32px 88px; } }
@media (max-width: 639px) {
    .page { padding: 26px 16px 64px; }
    .page-head { margin-bottom: 28px; }
    .page-title { font-size: 31px; }
    .page-sub { margin-top: 10px; font-size: 15.5px; }
}

/* 3. Разделы, карточки, итоги ------------------------------------------------ */
* + .sec, .sec + .notice, .sec + .card { margin-top: 60px; }
.sec-head { gap: 12px 20px; margin-bottom: 18px; }
.sec-title { gap: 10px; font-size: 23px; line-height: 1.2; letter-spacing: -0.03em; }
.sec-count { font-weight: 400; }
.sec-desc { margin-top: 7px; font-size: 15px; }
@media (max-width: 639px) {
    * + .sec, .sec + .notice, .sec + .card { margin-top: 44px; }
    .sec-title { font-size: 21px; }
}

.card { border-radius: var(--r-card); }
.card-body { padding: 26px 28px; }
.card-title { font-size: 17px; letter-spacing: -0.015em; }
.card-desc { margin-top: 6px; font-size: 14.5px; }
.card-foot { padding: 16px 28px; font-size: 14.5px; }
@media (max-width: 639px) {
    .card { border-radius: 20px; }
    .card-body { padding: 20px 18px; }
    .card-foot { padding: 14px 18px; }
}

.stats.s2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.stat { padding: 24px 26px 26px; border-radius: var(--r-card); }
a.stat:hover { border-color: var(--line-strong); background: var(--surface-2); }
.stat-label { font-size: 14.5px; }
.stat-label .ui-icon { width: 16px; height: 16px; margin-top: 2px; }
.stat-value { margin-top: 14px; font-size: 36px; line-height: 1.05; letter-spacing: -0.04em; }
.stat-value small { font-size: 18px; letter-spacing: -0.01em; }
.stat-meta { margin-top: 10px; font-size: 14px; }
.stat .fg-progress { margin-top: 14px; }
/* Одна колонка шириной с плитку: кнопка или длинная подпись не раздвигают её */
@supports (grid-template-rows: subgrid) { .stats > .stat { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 559px) {
    .stat { padding: 18px 16px 20px; border-radius: 20px; }
    .stat-label { font-size: 13.5px; overflow-wrap: anywhere; }
    .stat-label .ui-icon { width: 15px; height: 15px; }
    .stat-foot .settings-btn { width: 100%; padding: 0 8px; }
    .stat-value { margin-top: 10px; font-size: 25px; }
    .stat-value small { font-size: 14px; }
    .stat-meta { font-size: 13px; }
}

/* Полоса с главным числом страницы (баланс на «Обзоре»): крупное число и одна главная кнопка */
.band {
    display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: end; gap: 20px 32px;
    padding: 28px 32px 30px; border: 1px solid var(--line); border-radius: var(--r-card); background: var(--surface);
}
.band-label { font-size: 15px; color: var(--text-3); }
.band-value {
    margin-top: 8px; font-size: clamp(40px, 4.6vw, 60px); line-height: 1; font-weight: 600; letter-spacing: -0.045em;
    color: #fff; font-variant-numeric: tabular-nums; white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.band-meta { margin-top: 14px; min-height: 1.5em; font-size: 15px; line-height: 1.5; color: var(--text-3); }
.band-meta b { font-weight: 600; color: #fff; }
.band + .stats { margin-top: 16px; }
@media (max-width: 639px) {
    .band { grid-template-columns: minmax(0, 1fr); padding: 22px 20px 22px; border-radius: 20px; }
    .band-value { font-size: clamp(36px, 11vw, 46px); }
    .band .settings-btn { width: 100%; }
    .band + .stats { margin-top: 10px; }
}

/* Быстрый старт на «Обзоре»: слева — адрес, ключ и модель строками, справа — пример кода */
.qs { display: grid; grid-template-columns: minmax(0, 1fr); }
.qs-rows { padding: 6px 28px; }
.qs-row { padding: 20px 0; }
.qs-row + .qs-row { border-top: 1px solid var(--line-soft); }
.qs-label { font-size: 14px; color: var(--text-4); }
.qs-value { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 16px; margin-top: 10px; font-size: 15px; color: #fff; }
.qs-value .code-field { flex: 1 1 260px; }
.qs-code { min-width: 0; padding: 0 28px 28px; }
.qs-code .code-block { height: 100%; }
@media (min-width: 1100px) {
    .qs { grid-template-columns: minmax(0, 0.9fr) minmax(0, 1.25fr); }
    .qs-code { padding: 24px 24px 24px 0; }
}
@media (max-width: 639px) {
    .qs-rows { padding: 2px 18px; }
    .qs-row { padding: 18px 0; }
    .qs-code { padding: 0 18px 20px; }
}

/* 4. Кнопки, ссылки, поля ------------------------------------------------------ */
.settings-btn {
    height: 40px; padding: 0 18px; border-radius: 999px; border-color: rgba(255,255,255,0.22); background: transparent;
    color: #fff; font-size: 14.5px;
    transition: background-color .15s, color .15s, border-color .15s, opacity .15s, transform .2s var(--ease);
}
.settings-btn:hover:not(:disabled) { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.55); }
.settings-btn:active:not(:disabled) { transform: scale(0.97); }
.settings-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.settings-btn .ui-icon { width: 15px; height: 15px; opacity: .9; }
.settings-btn.primary { border-color: #fff; background: #fff; color: #000; font-weight: 600; }
.settings-btn.primary:hover:not(:disabled) { border-color: #dcdce0; background: #dcdce0; }
.settings-btn.ghost { border-color: transparent; background: transparent; color: var(--text-3); }
.settings-btn.ghost:hover:not(:disabled) { border-color: transparent; background: rgba(255,255,255,0.08); color: #fff; }
.settings-btn.danger { border-color: rgba(248,113,113,0.34); background: rgba(248,113,113,0.08); color: #fca5a5; }
.settings-btn.danger:hover:not(:disabled) { border-color: rgba(248,113,113,0.6); background: rgba(248,113,113,0.16); }
.settings-btn.small { height: 32px; gap: 7px; padding: 0 14px; border-radius: 999px; font-size: 13.5px; }
.settings-btn.small .ui-icon { width: 13px; height: 13px; }
.settings-btn.lg { height: 50px; padding: 0 26px; border-radius: 999px; font-size: 15.5px; font-weight: 600; }
.settings-btn.icon { width: 40px; padding: 0; }
.settings-btn.icon.small { width: 32px; }

.btn-primary, .btn-ghost, .btn-danger {
    height: 46px; padding: 0 22px; border-radius: 999px; font-size: 15px; font-weight: 600;
    transition: background-color .15s, color .15s, border-color .15s, opacity .15s, transform .2s var(--ease);
}
.btn-primary:hover:not(:disabled) { background: #dcdce0; }
.btn-primary:active:not(:disabled), .btn-ghost:active, .btn-danger:active:not(:disabled) { transform: scale(0.97); }
.btn-ghost { border-color: rgba(255,255,255,0.22); color: #fff; }
.btn-ghost:hover { border-color: rgba(255,255,255,0.55); background: rgba(255,255,255,0.08); }
.btn-primary:focus-visible, .btn-ghost:focus-visible, .btn-danger:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }

.link-more { gap: 7px; font-size: 15px; }
.link-more .ui-icon { width: 14px; height: 14px; transition: transform .2s var(--ease); }
.link-more:hover .ui-icon { transform: translateX(3px); }
.settings-link { font-size: 14px; }

.fg-input, .amount-input {
    height: 46px; padding: 0 16px; border-radius: var(--r-field); border-color: var(--line); background: var(--surface); font-size: 15px;
}
.fg-input:hover, .amount-input:hover { border-color: var(--line-strong); }
.fg-input:focus, .amount-input:focus { border-color: rgba(255,255,255,0.7); background: var(--surface); }
.fg-input.mono { font-size: 14px; }
select.fg-input, .fg-select { background-position: calc(100% - 21px) 50%, calc(100% - 16px) 50%; padding-right: 40px; }
textarea.fg-input { height: auto; padding: 13px 16px; border-radius: 16px; }
.fg-label { margin-bottom: 9px; font-size: 14.5px; }
.fg-hint { margin-top: 8px; font-size: 13.5px; }
.fg-field + .fg-field { margin-top: 20px; }
.setting-label { font-size: 14.5px; }
.pz-textarea { min-height: 108px; padding: 13px 16px; border-radius: 16px; border-color: var(--line); background: var(--surface); font-size: 15px; }
.pz-textarea:hover { border-color: var(--line-strong); }
.pz-textarea:focus { border-color: rgba(255,255,255,0.7); }
.search-field > .ui-icon { left: 16px; width: 16px; height: 16px; }
.search-field .fg-input { padding-left: 43px; }
@media (max-width: 639px) { .fg-input, .amount-input, .pz-textarea { font-size: 16px; } }

.code-field { height: 46px; padding: 0 6px 0 16px; border-radius: var(--r-field); border-color: var(--line); background: var(--surface); }
.code-field code { font-size: 14px; }
.copy-chip { height: 36px; gap: 9px; padding: 0 10px 0 13px; border-radius: 10px; background: transparent; font-size: 13.5px; }
.copy-chip:hover { border-color: var(--line-strong); background: rgba(255,255,255,0.06); }
.copy-id { font-size: 13px; }

/* 5. Метки, чипы, сегменты, переключатели ------------------------------------------ */
.fg-badge { height: 26px; gap: 7px; padding: 0 11px; font-size: 13px; }
.fg-badge.small { height: 22px; padding: 0 9px; font-size: 12px; }
.status-dot { width: 8px; height: 8px; }
.status-line { font-size: 14.5px; }

.pz-chip { height: 38px; padding: 0 17px; font-size: 14.5px; transition: background-color .15s, border-color .15s, color .15s, transform .2s var(--ease); }
.pz-chip:hover:not(:disabled) { background: transparent; border-color: var(--line-strong); }
.pz-chip:active:not(:disabled) { transform: scale(0.97); }
.pz-chip.small { height: 32px; padding: 0 14px; font-size: 13.5px; }
.pz-chip .chip-count { font-size: 13px; }
.pz-chip.on, .pz-chip.on:hover:not(:disabled) { background: rgba(255,255,255,0.1); border-color: rgba(255,255,255,0.6); color: #fff; }
.pz-chip.on .chip-count { color: var(--text-3); }

.pz-segment { gap: 2px; padding: 4px; border-radius: 999px; background: transparent; }
.pz-segment-opt { height: 36px; padding: 0 17px; border-radius: 999px; font-size: 14.5px; }
.pz-segment-opt.selected, .pz-segment-opt.selected:hover { background: rgba(255,255,255,0.13); color: #fff; }
.pz-segment-opt .chip-count { font-size: 13px; }
.pz-segment-opt.selected .chip-count { color: var(--text-3); }

.switch { width: 40px; height: 24px; background: rgba(255,255,255,0.16); }
.switch::after { top: 3px; left: 3px; width: 18px; height: 18px; }
.switch.on { background: #fff; }
.switch.on::after { transform: translateX(16px); background: #000; }
.pz-switch { font-size: 14.5px; }

.pz-option { gap: 5px; padding: 15px 18px; border-radius: var(--r-box); border-color: var(--line); }
.pz-option:hover { background: transparent; border-color: var(--line-strong); }
.pz-option.selected { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.85); }
.pz-option-name { font-size: 15px; }
.pz-option-desc { font-size: 13.5px; }

.fg-progress { height: 6px; background: rgba(255,255,255,0.12); }

/* 6. Таблицы, «подпись — значение», шаги, плитки ---------------------------------- */
.tbl-wrap, .usage-table-wrap { border-radius: inherit; }
.tbl, .usage-table { font-size: 14.5px; }
.tbl th, .usage-table th { padding: 16px 16px 14px; font-size: 13.5px; font-weight: 400; color: var(--text-4); border-bottom-color: var(--line); }
.tbl td, .usage-table td { padding: 16px; }
.tbl th:first-child, .tbl td:first-child, .usage-table th:first-child, .usage-table td:first-child { padding-left: 28px; }
.tbl th:last-child, .tbl td:last-child, .usage-table th:last-child, .usage-table td:last-child { padding-right: 28px; }
.tbl tbody tr:hover, .usage-table tbody tr:hover { background: rgba(255,255,255,0.03); }
.tbl .mono, .usage-table .mono { font-size: 13.5px; }
.tbl-sub { font-size: 13.5px; }
.tbl-group td { font-size: 13.5px; }
@media (max-width: 639px) {
    .tbl th:first-child, .tbl td:first-child, .usage-table th:first-child, .usage-table td:first-child { padding-left: 18px; }
    .tbl th:last-child, .tbl td:last-child, .usage-table th:last-child, .usage-table td:last-child { padding-right: 18px; }
}
@media (max-width: 720px) {
    .tbl.stackable tr { padding: 16px 18px; }
    .tbl.stackable td[data-label]::before { font-size: 13.5px; }
}

.kv-row { min-height: 62px; padding: 16px 28px; }
.kv-row dt, .kv-row dd { font-size: 15px; }
@media (max-width: 639px) { .kv-row { padding: 14px 18px; } }

.step { grid-template-columns: 32px minmax(0, 1fr); gap: 18px; padding-bottom: 30px; }
.step::before { left: 15.5px; top: 40px; }
.step-num { width: 32px; height: 32px; background: transparent; font-size: 14px; }
.step-title { padding-top: 4px; font-size: 16.5px; letter-spacing: -0.015em; }
.step-desc { margin-top: 6px; font-size: 14.5px; }
.step-body { margin-top: 14px; }

.how-item { padding: 26px 28px 28px; border-radius: var(--r-card); }
.how-num { width: 34px; height: 34px; background: transparent; font-size: 14.5px; }
.how-title { margin-top: 20px; font-size: 17px; letter-spacing: -0.015em; }
.how-desc { margin-top: 7px; font-size: 14.5px; }

.tile { gap: 18px; padding: 24px 26px 26px; border-radius: var(--r-card); }
.tile-icon { width: 44px; height: 44px; border-radius: 999px; border-color: var(--line); background: transparent; color: #fff; }
.tile-icon .ui-icon { width: 18px; height: 18px; }
.tile-title { gap: 8px; font-size: 16.5px; letter-spacing: -0.015em; }
.tile-desc { margin-top: 6px; font-size: 14.5px; }
@media (max-width: 479px) { .tile { gap: 16px; padding: 18px; border-radius: 20px; } }

.notice, .settings-note, .error-notice { gap: 14px; padding: 16px 20px; border-radius: var(--r-box); font-size: 14.5px; }
.notice > .ui-icon, .settings-note > .ui-icon, .error-notice > .ui-icon { width: 17px; height: 17px; margin-top: 3px; }
.notice.flat { padding: 0; }

.usage-empty { gap: 8px; padding: 60px 28px; }
.usage-empty > .ui-icon { width: 20px; height: 20px; margin-bottom: 12px; padding: 14px; border: 1px solid var(--line); background: transparent; color: #fff; }
.usage-empty-title { font-size: 17px; letter-spacing: -0.015em; }
.usage-empty-hint { font-size: 14.5px; }
.usage-empty .settings-btn { margin-top: 16px; }

.faq summary { padding: 20px 28px; font-size: 16px; }
.faq-a { padding: 0 28px 22px; font-size: 15px; }
.faq summary:focus-visible { outline-color: #fff; border-radius: var(--r-box); }
@media (max-width: 639px) { .faq summary { padding: 17px 18px; } .faq-a { padding: 0 18px 18px; } }

/* 7. Расходы: график и доли ----------------------------------------------------------- */
.usage-stat { padding: 24px 26px 26px; border-radius: var(--r-card); }
.usage-stat-label { font-size: 14.5px; }
.usage-stat-value { margin-top: 14px; font-size: 34px; letter-spacing: -0.04em; }
.usage-stat-sub { margin-top: 10px; font-size: 14px; }
@media (max-width: 639px) { .usage-stat { padding: 18px 18px 20px; border-radius: 20px; } .usage-stat-value { font-size: 24px; } }

.usage-types { gap: 18px; padding: 26px 28px 28px; }
.usage-types-title { font-size: 14px; font-weight: 400; color: var(--text-4); }
.usage-type-name, .usage-type-cost { font-size: 15px; }
.usage-type-track { height: 6px; margin: 9px 0 7px; background: rgba(255,255,255,0.1); }
.usage-type-meta { font-size: 13.5px; }
.usage-tag { height: 24px; padding: 0 9px; border-radius: 8px; border-color: var(--line); background: transparent; font-size: 13px; }
.usage-more { padding: 8px 28px 22px; }
.usage-chart { padding: 28px 28px 22px; }
.usage-band { border-radius: 10px; }
.usage-bar { border-radius: 7px 7px 0 0; }
.usage-tick, .usage-xlabel { font-size: 13px; }
.usage-tooltip { padding: 10px 14px; border-radius: 12px; background: #1b1b1e; border-color: var(--line-strong); }
.usage-tooltip-value { font-size: 15px; }
.usage-tooltip-label { font-size: 13px; }
@media (max-width: 639px) {
    .usage-types { padding: 20px 18px 22px; }
    .usage-chart { padding: 22px 18px 16px; }
    .usage-xlabel { font-size: 11px; }
}

/* 8. Пополнение ------------------------------------------------------------------- */
.topup-main { gap: 44px; }
.topup-section-title { margin-bottom: 18px; font-size: 23px; letter-spacing: -0.03em; }
.topup-balance { padding: 22px 24px; border-radius: var(--r-card); }
.topup-balance-label { font-size: 14.5px; }
.topup-balance-value { margin-top: 8px; font-size: 40px; line-height: 1.05; letter-spacing: -0.04em; }
.topup-balance-after { margin-top: 10px; font-size: 14.5px; }
.topup-amounts { gap: 10px; }
.topup-amount, .topup-method { border-color: var(--line); background: transparent; }
.topup-amount { height: 58px; border-radius: 16px; font-size: 17px; font-weight: 500; }
.topup-amount-note { font-size: 12px; }
.topup-amount:hover, .topup-method:hover { background: transparent; border-color: var(--line-strong); }
.topup-amount.selected { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.85); color: #fff; font-weight: 600; }
.topup-amount.selected .topup-amount-note { color: var(--text-3); }
.topup-method.selected { background: rgba(255,255,255,0.07); border-color: rgba(255,255,255,0.85); }
.topup-amount:has(:focus-visible), .topup-method:has(:focus-visible) { outline: 2px solid #fff; outline-offset: 3px; }
.topup-custom { margin-top: 10px; }
.topup-custom input { height: 58px; padding: 0 48px 0 20px; border-radius: 16px; border-color: var(--line); background: transparent; font-size: 17px; }
.topup-custom input:hover { border-color: var(--line-strong); }
.topup-custom input:focus { border-color: rgba(255,255,255,0.7); background: transparent; }
.topup-custom.filled input { border-color: rgba(255,255,255,0.85); background: rgba(255,255,255,0.07); }
.topup-currency { right: 20px; font-size: 17px; }
.topup-hint, .topup-warn { margin-top: 12px; font-size: 14px; }
.topup-group + .topup-group { margin-top: 24px; }
.topup-group-label { margin-bottom: 12px; font-size: 14px; font-weight: 400; color: var(--text-4); }
.topup-methods { gap: 10px; }
.topup-method { gap: 14px; min-height: 78px; padding: 14px 18px 14px 16px; border-radius: 18px; }
.topup-method-icon { width: 44px; height: 44px; border-radius: 999px; border: 1px solid var(--line); background: transparent; color: #fff; }
.topup-method-icon .ui-icon { width: 18px; height: 18px; }
.topup-method.selected .topup-method-icon { border-color: rgba(255,255,255,0.6); background: transparent; color: #fff; }
.topup-method-name { font-size: 15.5px; font-weight: 600; }
.topup-method-desc { font-size: 13.5px; }
.topup-radio { width: 20px; height: 20px; border-color: rgba(255,255,255,0.3); }
.topup-note { gap: 12px; font-size: 14px; }
.topup-pay-btn { height: 56px; border-radius: 999px; font-size: 16px; transition: background-color .15s, opacity .15s, transform .2s var(--ease); }
.topup-pay-btn:hover:not(:disabled) { background: #dcdce0; }
.topup-pay-btn:active:not(:disabled) { transform: scale(0.98); }
.topup-pay-btn:focus-visible { outline: 2px solid #fff; outline-offset: 3px; }
.topup-via { margin-top: 12px; font-size: 13.5px; }
.topup-error { padding: 12px 16px; border-radius: 16px; font-size: 14px; }
@media (min-width: 1100px) {
    .topup-layout { grid-template-columns: minmax(0, 1fr) 360px; gap: 48px; }
    .topup-side { top: 40px; border-radius: var(--r-card); }
    .topup-balance { padding: 26px 26px 22px; border-radius: 0; }
    .topup-pay { padding: 20px 26px 24px; }
}
@media (max-width: 639px) {
    .topup-main { gap: 34px; }
    .topup-amount { height: 52px; font-size: 15.5px; }
    .topup-custom input { height: 52px; font-size: 16px; }
    .topup-balance { border-radius: 20px; }
    .topup-balance-value { font-size: 34px; }
    .topup-method { border-radius: 16px; }
}

/* 9. Код, окна, меню, тосты --------------------------------------------------------- */
.code-block { border-radius: 18px; border-color: var(--line); background: var(--surface); }
.card .code-block { background: #050506; }
.code-head { min-height: 58px; padding: 10px 10px 10px 12px; border-bottom: 1px solid var(--line-soft); }
.code-lang { gap: 10px; padding-left: 12px; font-size: 14.5px; }
.code-btn { width: 38px; height: 38px; border-radius: 10px; }
.code-btn:hover { background: rgba(255,255,255,0.1); }
.code-block pre { padding: 20px 24px 24px; }
.code-block pre code, .code-block pre { font-size: 13.5px; line-height: 1.75; }
.code-tabs { gap: 4px; }
.code-tab { height: 34px; padding: 0 14px; border-radius: 9px; font-size: 14px; }
.code-tab.active, .code-tab.active:hover { background: rgba(255,255,255,0.12); color: #fff; }
.hljs-comment { color: #8b949e; }
.hljs-keyword, .hljs-built_in { color: #ff7b72; }
.hljs-string { color: #a5d6ff; }
.hljs-number, .hljs-literal { color: #ffa657; }
.hljs-title { color: #7ee787; }
.hljs-attr { color: #ffa657; }
.inline-code { padding: 0.15em 0.4em; border-radius: 6px; background: rgba(255,255,255,0.1); }

.pop-menu { padding: 6px; border-radius: 16px; background: #111113; box-shadow: 0 24px 64px rgba(0,0,0,0.7); }
.pop-item { min-height: 40px; gap: 12px; padding: 8px 12px; border-radius: 10px; font-size: 14.5px; }
.pop-item:hover:not(:disabled) { background: rgba(255,255,255,0.06); }
.pop-sep { margin: 6px 10px; }

.modal-overlay { padding: 16px; background: rgba(0,0,0,0.76); }
.modal-card { max-width: 460px; border-radius: 24px; background: #0f0f11; box-shadow: 0 32px 80px rgba(0,0,0,0.7); }
.modal-card.wide { max-width: 600px; }
.modal-card.xwide { max-width: 800px; }
.modal-head { padding: 28px 28px 6px; font-size: 21px; line-height: 1.25; letter-spacing: -0.03em; }
.modal-sub { padding: 0 28px 18px; font-size: 15px; }
.modal-body { padding: 0 28px 20px; }
.modal-foot { gap: 10px; padding: 6px 28px 28px; }
.modal-top { padding: 28px 28px 6px; }
.modal-close { width: 36px; height: 36px; margin: -6px -10px 0 0; }
.modal-close:hover { background: rgba(255,255,255,0.1); }
.modal-close .ui-icon { width: 14px; height: 14px; }
.modal-error { padding: 12px 16px; border-radius: 16px; font-size: 14px; }
@media (max-width: 639px) {
    .modal-card { border-radius: 20px; }
    .modal-head, .modal-top { padding-left: 22px; padding-right: 22px; }
    .modal-sub, .modal-body { padding-left: 22px; padding-right: 22px; }
    .modal-foot { padding: 6px 22px 22px; }
}

.toast { gap: 14px; padding: 12px 12px 12px 18px; border-radius: 16px; border-color: var(--line-strong); background: #1b1b1e; font-size: 14.5px; }
.toast-dot { width: 8px; height: 8px; }
.toast-close { width: 30px; height: 30px; border-radius: 8px; }
.toast-close:hover { background: rgba(255,255,255,0.1); }

/* 10. Строки настроек: профиль, Telegram, админка -------------------------------------- */
.settings-section { border-radius: var(--r-card); }
.settings-section + .settings-section { margin-top: 24px; }
.settings-section-head { padding: 24px 28px 8px; }
.settings-section-head.with-action { padding-bottom: 14px; }
.settings-section-title { font-size: 18px; letter-spacing: -0.02em; }
.settings-section-hint { margin-top: 6px; font-size: 14.5px; }
.settings-row { padding: 18px 28px; }
.settings-row-label { font-size: 15px; }
.settings-row-hint { margin-top: 4px; font-size: 14px; }
.settings-row-control { gap: 10px; }
.settings-error { padding: 12px 16px; border-radius: 16px; font-size: 14.5px; }
@media (max-width: 639px) {
    .settings-section { border-radius: 20px; }
    .settings-section-head { padding: 18px 18px 6px; }
    .settings-row { padding: 16px 18px; }
}
.account-card { gap: 18px; padding: 26px 28px; }
.account-name { font-size: 19px; letter-spacing: -0.02em; }
.account-email { margin-top: 3px; font-size: 14.5px; }
.account-balance { font-size: 24px; letter-spacing: -0.03em; }
@media (max-width: 639px) { .account-card { padding: 20px 18px; } }

/* 11. Мелочи и совместимость --------------------------------------------------------- */
.skeleton { border-radius: 12px; }
.toolbar { gap: 12px 14px; margin-bottom: 22px; }

/* API-пакеты (разметку строит main/js/packages.js, базовые стили — packages.css) */
html[data-ui="v2"] #pkgMine:not(:empty) + #pkgShop { margin-top: 60px; }
html[data-ui="v2"] .pkg-section-head { margin-bottom: 18px; }
html[data-ui="v2"] .pkg-section-title { font-size: 23px; letter-spacing: -0.03em; }
html[data-ui="v2"] .pkg-section-hint { margin-top: 7px; font-size: 15px; }
html[data-ui="v2"] .pkg-card { padding: 26px 28px 28px; border-radius: var(--r-card); }
html[data-ui="v2"] .pkg-card.done { padding: 18px 24px; }
html[data-ui="v2"] .pkg-name { font-size: 18px; letter-spacing: -0.02em; }
html[data-ui="v2"] .pkg-meta { font-size: 14px; }
html[data-ui="v2"] .pkg-stat { padding: 16px 18px; border-radius: var(--r-box); background: transparent; border-color: var(--line); }
html[data-ui="v2"] .pkg-stat-label { font-size: 13.5px; }
html[data-ui="v2"] .pkg-stat-value { font-size: 26px; font-weight: 600; letter-spacing: -0.03em; }
html[data-ui="v2"] .pkg-stat-sub, html[data-ui="v2"] .pkg-block-hint, html[data-ui="v2"] .pkg-group-desc { font-size: 13.5px; }
html[data-ui="v2"] .pkg-block { margin-top: 20px; padding-top: 18px; border-top-color: var(--line-soft); }
html[data-ui="v2"] .pkg-block-title { font-size: 15px; }
html[data-ui="v2"] .pkg-model { padding: 5px 10px; border-radius: 8px; border-color: var(--line); background: transparent; font-size: 13.5px; }
html[data-ui="v2"] .pkg-key-name { font-size: 14.5px; }
html[data-ui="v2"] .pkg-key-line, html[data-ui="v2"] .pkg-connect-label { font-size: 13.5px; }
html[data-ui="v2"] .pkg-groups { gap: 36px; margin-top: 22px; }
html[data-ui="v2"] .pkg-group-name { font-size: 18px; letter-spacing: -0.02em; }
html[data-ui="v2"] .pkg-group-desc { margin-top: 5px; font-size: 14.5px; color: var(--text-3); }
html[data-ui="v2"] .pkg-offers { grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 16px; }
html[data-ui="v2"] .pkg-offer { gap: 18px; padding: 24px 24px 22px; border-radius: var(--r-card); }
html[data-ui="v2"] .pkg-offer:hover { border-color: var(--line-strong); }
html[data-ui="v2"] .pkg-offer.out:hover { border-color: var(--fg-panel-border); }
html[data-ui="v2"] .pkg-offer-tokens { font-size: 34px; letter-spacing: -0.04em; }
html[data-ui="v2"] .pkg-offer-tokens span { font-size: 15px; }
html[data-ui="v2"] .pkg-offer-term { margin-top: 9px; font-size: 14px; }
html[data-ui="v2"] .pkg-chip { height: 26px; padding: 0 10px; border-radius: 8px; border-color: var(--line); background: transparent; font-size: 13px; }
html[data-ui="v2"] .pkg-offer-foot { padding-top: 18px; border-top-color: var(--line-soft); }
html[data-ui="v2"] .pkg-offer-price b { font-size: 24px; letter-spacing: -0.03em; }
html[data-ui="v2"] .pkg-offer-stock { font-size: 13px; }
html[data-ui="v2"] .pkg-banner { gap: 12px; padding: 14px 18px; border-radius: var(--r-box); font-size: 14.5px; }
html[data-ui="v2"] .pkg-card > .pkg-banner { font-size: 14px; }
html[data-ui="v2"] .pkg-summary { padding: 16px 18px; border-radius: var(--r-box); background: transparent; border-color: var(--line); }
html[data-ui="v2"] .pkg-summary-row { font-size: 14.5px; }
html[data-ui="v2"] .pkg-modal-note { font-size: 13.5px; }
html[data-ui="v2"] .pkg-modal-note.preorder { padding: 12px 16px; border-radius: 16px; font-size: 13.5px; }
html[data-ui="v2"] .pkg-done-list summary { font-size: 14.5px; }
@media (max-width: 639px) {
    html[data-ui="v2"] .pkg-card { padding: 20px 18px; border-radius: 20px; }
    html[data-ui="v2"] .pkg-offers { grid-template-columns: minmax(0, 1fr); }
    html[data-ui="v2"] .pkg-offer { padding: 20px 18px; border-radius: 20px; }
}

/* Подсказки (tips.css общий с классикой) */
html[data-ui="v2"] .fa-tip { padding: 12px 16px 13px; border-radius: 14px; font-size: 13.5px; }
html[data-ui="v2"] .fa-tip-title { font-size: 14px; font-weight: 600; }

/* 12. Вход -------------------------------------------------------------------------- */
.login-pill { height: 36px; gap: 9px; padding: 0 16px; border-color: var(--line); background: transparent; font-size: 14px; }

/* 13. Alibaba Cloud ------------------------------------------------------------------- */
.ali-partner { height: 32px; gap: 8px; padding: 0 10px; border-radius: 10px; font-size: 13.5px; }
.side-ali { padding: 0 2px 2px; }

/* 14. Свои элементы страниц ----------------------------------------------------------- */
/* Их стили лежат в <style> шаблонов и идут после этого файла, поэтому селекторы здесь сильнее. Цвета состояний
   (наведение, выбранное) не трогаем — только форма и размеры. */
html[data-ui="v2"] .mcp-card { padding: 26px 26px 24px; border-radius: var(--r-card); }
html[data-ui="v2"] .mcp-logo { border-radius: 16px; }
html[data-ui="v2"] .mcp-modal-title .mcp-logo { border-radius: 12px; }
html[data-ui="v2"] .mcp-connect { height: 44px; border-radius: 999px; font-size: 14.5px; }
html[data-ui="v2"] .mcp-new { border-radius: var(--r-card); }

html[data-ui="v2"] .tk-row { padding: 18px 24px 18px 28px; }
html[data-ui="v2"] .tk-row:first-child { border-radius: var(--r-card) var(--r-card) 0 0; }
html[data-ui="v2"] .tk-row:last-child { border-radius: 0 0 var(--r-card) var(--r-card); }
html[data-ui="v2"] .tk-row:only-child { border-radius: var(--r-card); }
html[data-ui="v2"] .tk-unread { left: 12px; }

html[data-ui="v2"] .tk-card { border-radius: 18px; }
html[data-ui="v2"] .tk-card-head { min-height: 48px; padding: 9px 20px; border-radius: 17px 17px 0 0; }
html[data-ui="v2"] .tk-body { padding: 16px 20px 18px; }
html[data-ui="v2"] .tk-reply:focus-within { border-color: rgba(255,255,255,0.6); }
html[data-ui="v2"] .tk-input { padding: 16px 20px; border-radius: 18px 18px 0 0; }
html[data-ui="v2"] .tk-reply-foot { padding: 10px 10px 10px 20px; }
html[data-ui="v2"] .tk-reply-hint kbd { padding: 3px 8px; border-radius: 8px; background: transparent; }
@media (max-width: 639px) {
    html[data-ui="v2"] .tk-card { border-radius: 16px; }
    html[data-ui="v2"] .tk-card-head { min-height: 42px; padding: 8px 14px; border-radius: 15px 15px 0 0; }
    html[data-ui="v2"] .tk-body { padding: 12px 14px 14px; }
    html[data-ui="v2"] .tk-input { padding: 14px; border-radius: 16px 16px 0 0; }
    html[data-ui="v2"] .tk-reply-foot { padding: 8px 8px 8px 14px; }
}

html[data-ui="v2"] .ref-code-input { height: 46px; padding: 0 16px; border-radius: var(--r-field); border-color: var(--line); background: var(--surface); }
html[data-ui="v2"] .ref-preview { padding: 14px 18px; border-radius: var(--r-box); border-color: var(--line); background: transparent; }
html[data-ui="v2"] .ref-qr-box { border-radius: 20px; }

html[data-ui="v2"] .topup-tier { padding: 16px 26px 18px; }
html[data-ui="v2"] .topup-tier-text { font-size: 14px; }
@media (max-width: 1099px) { html[data-ui="v2"] .topup-tier { padding: 16px 24px 18px; border-radius: 20px; } }

html[data-ui="v2"] .m-uptime { height: 32px; border-radius: 8px; }
html[data-ui="v2"] .m-pager-btn { min-width: 38px; height: 38px; padding: 0 12px; border-radius: 10px; font-size: 14px; }
html[data-ui="v2"] .m-pager-btn.active { background: rgba(255,255,255,0.12); border-color: rgba(255,255,255,0.45); color: #fff; }

html[data-ui="v2"] .tg-connect { padding: 18px 20px 18px 22px; }
html[data-ui="v2"] .tg-connect-title { font-size: 15.5px; font-weight: 600; }
html[data-ui="v2"] .tg-connect-hint { font-size: 14px; color: var(--text-3); }
html[data-ui="v2"] .tg-avatar { width: 44px; height: 44px; border: 1px solid var(--line); background: transparent; color: #fff; }
html[data-ui="v2"] .tg-avatar.ok { color: var(--ok); }

/* Админские страницы (каталог, Telegram): «назад», заголовок и описание — столбиком, а не в ряд */
html[data-ui="v2"] .cat-page .page-head, html[data-ui="v2"] .tga-page .page-head { display: block; }
html[data-ui="v2"] .cat-back { margin-bottom: 22px; font-size: 14.5px; }

/* Плашка «Подключите Telegram» на «Обзоре» и в «Поддержке» — второстепенная: её кнопка без белой заливки */
html[data-ui="v2"] [data-tg-wrap] .settings-btn.primary { border-color: rgba(255,255,255,0.22); background: transparent; color: #fff; font-weight: 500; }
html[data-ui="v2"] [data-tg-wrap] .settings-btn.primary:hover:not(:disabled) { border-color: rgba(255,255,255,0.55); background: rgba(255,255,255,0.08); }

/* Кнопки в строках таблиц повторяются десятки раз — им спокойная форма и тонкая рамка, а не капсула */
.tbl .settings-btn.small:not(.primary):not(.danger), .usage-table .settings-btn.small:not(.primary):not(.danger) { border-radius: 10px; border-color: var(--line); }
