/* ============================================================
   M-VPN — личный кабинет
   App-like: экран не листается, прокручивается только контент.
   Mobile-first, оптимизация под iPhone (safe-area, 100dvh).

   Визуальный слой: полупрозрачные «материалы» поверх фирменного
   свечения, волосяные границы, мягкие тени, единые кривые движения.
   Анимируем только transform и opacity — так плавно на любом iPhone.
   ============================================================ */

:root {
    --lk-bg: #f5f5f7;
    --lk-desk-bg: #e9e9ee;

    --lk-card: rgba(255, 255, 255, .78);
    --lk-card-solid: #ffffff;
    --lk-card-press: rgba(255, 255, 255, .94);
    --lk-sheet: rgba(255, 255, 255, .88);

    --lk-ink: #1d1d1f;
    --lk-ink-2: #6e6e73;
    --lk-ink-3: #aeaeb2;

    --lk-line: rgba(0, 0, 0, .08);
    --lk-hairline: rgba(0, 0, 0, .10);

    /* полупрозрачные заливки (как systemFill в iOS) */
    --lk-fill: rgba(120, 120, 128, .14);
    --lk-fill-press: rgba(120, 120, 128, .22);
    --lk-soft-btn: var(--lk-fill);
    --lk-soft-btn-press: var(--lk-fill-press);

    --lk-accent: #0071e3;
    --lk-accent-press: #0062c7;
    --lk-accent-ring: rgba(0, 113, 227, .22);
    --lk-primary-grad: linear-gradient(180deg, #2a8dff 0%, #0071e3 100%);
    --lk-primary-grad-press: linear-gradient(180deg, #1e7fe8 0%, #005bb8 100%);
    --lk-primary-shadow: 0 8px 20px -6px rgba(0, 113, 227, .45);

    --lk-brand-grad: linear-gradient(135deg, #5aa5ff, #1b64ff);

    --lk-ok-soft: rgba(52, 199, 89, .14);
    --lk-ok-text: #1d8a3e;
    --lk-warn-soft: rgba(255, 159, 10, .16);
    --lk-warn-text: #b25000;
    --lk-danger: #e02d23;
    --lk-danger-soft: rgba(255, 59, 48, .12);
    --lk-danger-text: #d70015;

    --lk-card-shadow: 0 1px 2px rgba(0, 0, 0, .04), 0 12px 32px -14px rgba(0, 0, 0, .14);
    --lk-card-inset: inset 0 1px 0 rgba(255, 255, 255, .75);
    --lk-tabbar-bg: rgba(249, 249, 251, .72);

    --lk-radius: 22px;
    --lk-radius-sm: 14px;

    /* движение */
    --ease: cubic-bezier(.28, .11, .32, 1);
    --ease-out: cubic-bezier(.22, .61, .36, 1);
    --ease-spring: cubic-bezier(.22, 1.2, .36, 1);
    --ease-sheet: cubic-bezier(.32, .72, 0, 1);
    --dur-fast: .12s;
    --dur: .24s;
    --dur-slow: .45s;

    --lk-grid: rgba(0, 0, 0, .035);
    --lk-glow-1: rgba(0, 113, 227, .09);
    --lk-glow-2: rgba(27, 100, 255, .08);
}

@media (prefers-color-scheme: dark) {
    :root {
        --lk-bg: #000000;
        --lk-desk-bg: #050506;

        --lk-card: rgba(28, 28, 30, .74);
        --lk-card-solid: #1c1c1e;
        --lk-card-press: rgba(44, 44, 46, .82);
        --lk-sheet: rgba(28, 28, 30, .86);

        --lk-ink: #f5f5f7;
        --lk-ink-2: #98989d;
        --lk-ink-3: #636366;

        --lk-line: rgba(255, 255, 255, .10);
        --lk-hairline: rgba(255, 255, 255, .12);

        --lk-fill: rgba(120, 120, 128, .26);
        --lk-fill-press: rgba(120, 120, 128, .36);

        --lk-accent: #0a84ff;
        --lk-accent-press: #2997ff;
        --lk-accent-ring: rgba(10, 132, 255, .28);
        --lk-primary-grad: linear-gradient(180deg, #2b93ff 0%, #0a6fe0 100%);
        --lk-primary-grad-press: linear-gradient(180deg, #1f86f5 0%, #0860c4 100%);
        --lk-primary-shadow: 0 8px 22px -6px rgba(10, 132, 255, .5);

        --lk-ok-soft: rgba(48, 209, 88, .16);
        --lk-ok-text: #30d158;
        --lk-warn-soft: rgba(255, 159, 10, .18);
        --lk-warn-text: #ffb340;
        --lk-danger: #ff453a;
        --lk-danger-soft: rgba(255, 69, 58, .16);
        --lk-danger-text: #ff6961;

        --lk-card-shadow: 0 12px 32px -16px rgba(0, 0, 0, .65);
        --lk-card-inset: inset 0 1px 0 rgba(255, 255, 255, .06);
        --lk-tabbar-bg: rgba(18, 18, 20, .72);

        --lk-grid: rgba(255, 255, 255, .05);
        --lk-glow-1: rgba(41, 151, 255, .15);
        --lk-glow-2: rgba(27, 100, 255, .14);
    }
}

*, *::before, *::after { box-sizing: border-box; }

/* Атрибут hidden должен побеждать любые display из классов (шторка, подсказки по платформам). */
[hidden] { display: none !important; }

html.lk-html { height: 100%; -webkit-text-size-adjust: 100%; }

.lk-body {
    height: 100%;
    margin: 0;
    overflow: hidden;
    overscroll-behavior: none;
    background: var(--lk-bg);
    color: var(--lk-ink);
    font-family: -apple-system, BlinkMacSystemFont, "SF Pro Display", "SF Pro Text",
        "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    font-size: 17px;
    line-height: 1.45;
    letter-spacing: -.01em;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    -webkit-tap-highlight-color: transparent;
}

svg { display: block; }

::selection { background: var(--lk-accent-ring); }

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

/* ---------- Переходы между экранами (View Transitions, где поддерживается) ----------
   Страницы кабинета перетекают одна в другую вместо мигания; таб-бар остаётся на месте. */
@view-transition { navigation: auto; }

::view-transition-old(root) { animation: lk-vt-out .16s var(--ease-out) both; }
::view-transition-new(root) { animation: lk-vt-in .24s var(--ease-out) both; }

@keyframes lk-vt-out { to { opacity: 0; } }
@keyframes lk-vt-in { from { opacity: 0; } }

/* ---------- Каркас приложения ---------- */
.app {
    position: relative;
    height: 100vh;
    height: 100dvh;
    max-width: 560px;
    margin-inline: auto;
    display: flex;
    flex-direction: column;
    background: var(--lk-bg);
}

/* Фоновая фактура: едва заметная клетка, тающая книзу… */
.app::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background-image:
        linear-gradient(var(--lk-grid) 1px, transparent 1px),
        linear-gradient(90deg, var(--lk-grid) 1px, transparent 1px);
    background-size: 48px 48px;
    -webkit-mask-image: radial-gradient(130% 58% at 50% 0%, #000 0%, transparent 78%);
    mask-image: radial-gradient(130% 58% at 50% 0%, #000 0%, transparent 78%);
}

/* …и мягкое фирменное свечение сверху (сине-фиолетовое, как на лендинге). */
.app::after {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(420px 300px at 14% -80px, var(--lk-glow-1), transparent 70%),
        radial-gradient(500px 320px at 90% -100px, var(--lk-glow-2), transparent 70%);
}

.app__screen {
    position: relative;
    z-index: 1;
    flex: 1;
    min-height: 0;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
    overscroll-behavior: contain;
    scrollbar-width: none;
    padding: calc(16px + env(safe-area-inset-top)) 20px calc(110px + env(safe-area-inset-bottom));
}
.app__screen::-webkit-scrollbar { display: none; }

/* Появление экрана: блоки всплывают каскадом, как при push в нативном приложении.
   backwards — после анимации элемент возвращается к обычным стилям, transition'ы работают. */
@keyframes lk-rise {
    from { opacity: 0; transform: translateY(10px); }
    to   { opacity: 1; transform: none; }
}

.app__screen > * { animation: lk-rise .5s var(--ease-out) backwards; }
.app__screen > :nth-child(2) { animation-delay: 40ms; }
.app__screen > :nth-child(3) { animation-delay: 80ms; }
.app__screen > :nth-child(4) { animation-delay: 120ms; }
.app__screen > :nth-child(5) { animation-delay: 160ms; }
.app__screen > :nth-child(6) { animation-delay: 200ms; }
.app__screen > :nth-child(7) { animation-delay: 240ms; }
.app__screen > :nth-child(n+8) { animation-delay: 280ms; }

/* ---------- Десктоп: кабинет в «рамке телефона» на мягком фоне ---------- */
@media (min-width: 600px) {
    .lk-body {
        display: grid;
        place-items: center;
        background:
            radial-gradient(720px 520px at 18% 0%, var(--lk-glow-1), transparent 62%),
            radial-gradient(720px 520px at 88% 100%, var(--lk-glow-2), transparent 62%),
            var(--lk-desk-bg);
    }

    .app {
        width: min(100%, 440px);
        height: min(100dvh - 48px, 900px);
        border-radius: 44px;
        border: 1px solid var(--lk-line);
        box-shadow:
            0 40px 90px -30px rgba(0, 0, 0, .45),
            0 0 0 1px rgba(255, 255, 255, .06) inset;
        overflow: hidden;
    }
}

/* ---------- Нижний таб-бар ---------- */
.tabbar {
    position: absolute;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 50;
    display: flex;
    padding: 8px 10px calc(7px + env(safe-area-inset-bottom));
    background: var(--lk-tabbar-bg);
    -webkit-backdrop-filter: blur(28px) saturate(180%);
    backdrop-filter: blur(28px) saturate(180%);
    view-transition-name: tabbar;
}

/* тонкая градиентная линия сверху вместо сплошной границы */
.tabbar::before {
    content: "";
    position: absolute;
    left: 0;
    right: 0;
    top: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--lk-hairline) 18%, var(--lk-hairline) 82%, transparent);
    pointer-events: none;
}

.tabbar__item {
    flex: 1;
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 3px;
    padding: 3px 0 2px;
    color: var(--lk-ink-3);
    text-decoration: none;
    font-size: 10.5px;
    font-weight: 500;
    letter-spacing: .01em;
    transition: color var(--dur) var(--ease);
}

.tabbar__item.is-active { color: var(--lk-accent); font-weight: 600; }

/* две иконки — контурная и залитая — плавно сменяют друг друга */
.tabbar__icons {
    position: relative;
    width: 26px;
    height: 26px;
    transition: transform .4s var(--ease-spring);
}
.tabbar__item:active .tabbar__icons { transform: scale(.84); transition-duration: .08s; }

.tabbar__icon {
    position: absolute;
    inset: 0;
    transition: opacity var(--dur) var(--ease), transform .4s var(--ease-spring);
}
.tabbar__icon--fill { opacity: 0; transform: scale(.8); }
.tabbar__item.is-active .tabbar__icon--fill { opacity: 1; transform: none; }
.tabbar__item.is-active .tabbar__icon--outline { opacity: 0; transform: scale(1.12); }

/* ---------- Типографика экрана ---------- */
.screen-head { padding: 10px 0 2px; }

.screen-title {
    margin: 0;
    font-size: 34px;
    font-weight: 700;
    line-height: 1.08;
    letter-spacing: -.026em;
}

.screen-sub {
    margin: 6px 0 0;
    font-size: 15px;
    color: var(--lk-ink-2);
}

.section-label {
    margin: 28px 0 10px 4px;
    font-size: 13px;
    font-weight: 600;
    letter-spacing: .06em;
    text-transform: uppercase;
    color: var(--lk-ink-2);
}

.backlink {
    display: inline-flex;
    align-items: center;
    gap: 2px;
    margin: 2px 0 6px -8px;
    padding: 6px 8px;
    color: var(--lk-accent);
    text-decoration: none;
    font-size: 17px;
    border-radius: 10px;
    transition: opacity var(--dur) var(--ease);
}
.backlink svg { transition: transform .35s var(--ease-spring); }
.backlink:active { opacity: .6; }
.backlink:active svg { transform: translateX(-3px); transition-duration: .08s; }

/* ---------- Кнопки ---------- */
/* Нажатие быстрое, отпускание пружинистое — так ощущаются нативные контролы. */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: .5em;
    font-family: inherit;
    font-size: 17px;
    font-weight: 500;
    line-height: 1;
    padding: 16px 22px;
    border-radius: 980px;
    border: 1px solid transparent;
    text-decoration: none;
    cursor: pointer;
    white-space: nowrap;
    letter-spacing: -.01em;
    transition:
        transform .38s var(--ease-spring),
        background-color var(--dur) var(--ease),
        color var(--dur) var(--ease),
        box-shadow var(--dur) var(--ease),
        opacity var(--dur) var(--ease);
}

.btn:active { transform: scale(.965); transition-duration: .08s; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.is-loading { opacity: .6; pointer-events: none; }

.btn--primary {
    background: var(--lk-primary-grad);
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), var(--lk-primary-shadow);
}
.btn--primary:active {
    background: var(--lk-primary-grad-press);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .1), 0 4px 10px -4px rgba(0, 113, 227, .4);
}

.btn--soft { background: var(--lk-fill); color: var(--lk-ink); }
.btn--soft:active { background: var(--lk-fill-press); }

.btn--danger { background: var(--lk-danger-soft); color: var(--lk-danger-text); }

/* кнопка «Скопировать» подсвечивается зелёным на секунду */
.btn.is-copied { background: var(--lk-ok-soft); color: var(--lk-ok-text); opacity: 1; }

.btn--block { display: flex; width: 100%; }
.btn--sm { font-size: 15px; padding: 10px 16px; }

.mt { margin-top: 14px; }

/* ---------- Карточки и списки ---------- */
/* Материал: полупрозрачная поверхность с размытием, волосяная граница, мягкая тень. */
.card {
    background: var(--lk-card);
    border: 1px solid var(--lk-line);
    border-radius: var(--lk-radius);
    padding: 18px 20px;
    box-shadow: var(--lk-card-shadow), var(--lk-card-inset);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
}

@media (-webkit-min-device-pixel-ratio: 2), (min-resolution: 2dppx) {
    .card, .balance, .form-card { border-width: .5px; }
}

.stack { display: grid; gap: 12px; margin-top: 16px; }

a.card {
    display: block;
    color: inherit;
    text-decoration: none;
    transition: transform .38s var(--ease-spring), background-color var(--dur) var(--ease);
}
a.card:active { transform: scale(.98); background: var(--lk-card-press); transition-duration: .08s; }

.card.sub-card, .sub-card { display: flex; align-items: center; gap: 12px; }
.sub-card__body { flex: 1; min-width: 0; }

.sub-card__name {
    margin: 0;
    font-size: 17px;
    font-weight: 600;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

.sub-card__meta { margin: 3px 0 0; font-size: 13px; color: var(--lk-ink-2); }

.chevron { flex: none; color: var(--lk-ink-3); opacity: .7; transition: transform .35s var(--ease-spring); }
a.card:active .chevron { transform: translateX(2px); transition-duration: .08s; }

/* строки внутри карточки — разделители с отступом слева, как в Настройках iOS */
.rows { padding: 4px 0; }

.row {
    position: relative;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
    padding: 13px 20px;
    font-size: 16px;
}

.row + .row::before {
    content: "";
    position: absolute;
    left: 20px;
    right: 0;
    top: 0;
    height: 1px;
    background: var(--lk-hairline);
    transform: scaleY(.5);
    transform-origin: top;
}

.row__label { color: var(--lk-ink-2); flex: none; }
.row__value { text-align: right; min-width: 0; overflow-wrap: anywhere; font-variant-numeric: tabular-nums; }

.card--flush { padding: 0; overflow: hidden; }

/* ---------- Бейджи ---------- */
.pill {
    flex: none;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px 4px 9px;
    border-radius: 980px;
    font-size: 12px;
    font-weight: 600;
    letter-spacing: .01em;
    white-space: nowrap;
}

.pill::before {
    content: "";
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: currentColor;
    opacity: .9;
}

.pill--ok { background: var(--lk-ok-soft); color: var(--lk-ok-text); }
.pill--soon { background: var(--lk-warn-soft); color: var(--lk-warn-text); }
.pill--expired { background: var(--lk-danger-soft); color: var(--lk-danger-text); }

/* ---------- Баланс ---------- */
/* Герой экрана: тот же материал плюс едва заметная фирменная заливка. */
.balance {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    margin-top: 16px;
    padding: 20px 20px;
    background:
        linear-gradient(135deg, rgba(41, 151, 255, .13), rgba(27, 100, 255, .10)),
        var(--lk-card);
    border: 1px solid var(--lk-line);
    border-radius: var(--lk-radius);
    box-shadow: var(--lk-card-shadow), var(--lk-card-inset);
    -webkit-backdrop-filter: blur(20px) saturate(170%);
    backdrop-filter: blur(20px) saturate(170%);
    text-decoration: none;
    color: inherit;
    transition: transform .38s var(--ease-spring);
}
.balance:active { transform: scale(.98); transition-duration: .08s; }

.balance__label { margin: 0 0 4px; font-size: 13px; font-weight: 500; letter-spacing: .02em; color: var(--lk-ink-2); }

.balance__value {
    margin: 0;
    font-size: 34px;
    font-weight: 700;
    line-height: 1;
    letter-spacing: -.03em;
    font-variant-numeric: tabular-nums;
}

/* стеклянная капсула «Пополнить» */
.balance .btn--soft {
    background: rgba(255, 255, 255, .62);
    border-color: rgba(255, 255, 255, .5);
    box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .12);
}
@media (prefers-color-scheme: dark) {
    .balance .btn--soft {
        background: rgba(255, 255, 255, .12);
        border-color: rgba(255, 255, 255, .12);
        box-shadow: 0 4px 12px -4px rgba(0, 0, 0, .4);
    }
}

.balance--hero { margin-top: 18px; padding: 24px 22px; }
.balance--hero .balance__value { font-size: 44px; }

/* ---------- Формы ---------- */
.form-card {
    background: var(--lk-card);
    border: 1px solid var(--lk-line);
    border-radius: var(--lk-radius);
    overflow: hidden;
    margin-top: 16px;
    box-shadow: var(--lk-card-shadow), var(--lk-card-inset);
    -webkit-backdrop-filter: blur(18px) saturate(160%);
    backdrop-filter: blur(18px) saturate(160%);
    transition: box-shadow var(--dur) var(--ease), border-color var(--dur) var(--ease);
}
/* мягкое кольцо фокуса вокруг всей группы полей */
.form-card:focus-within {
    border-color: var(--lk-accent);
    box-shadow: 0 0 0 4px var(--lk-accent-ring), var(--lk-card-shadow);
}

.form-row { position: relative; padding: 12px 20px 13px; }

.form-row + .form-row::before {
    content: "";
    position: absolute;
    left: 20px;
    right: 0;
    top: 0;
    height: 1px;
    background: var(--lk-hairline);
    transform: scaleY(.5);
    transform-origin: top;
}

.form-row label {
    display: block;
    margin-bottom: 3px;
    font-size: 12px;
    font-weight: 500;
    color: var(--lk-ink-2);
    transition: color var(--dur) var(--ease);
}
.form-row:focus-within label { color: var(--lk-accent); }

.input {
    width: 100%;
    padding: 2px 0;
    border: 0;
    outline: none;
    background: transparent;
    font-family: inherit;
    font-size: 17px;
    letter-spacing: -.01em;
    color: var(--lk-ink);
    caret-color: var(--lk-accent);
}
.input::placeholder { color: var(--lk-ink-3); }

/* сумма пополнения — крупно, табличными цифрами */
#topup-amount {
    font-size: 26px;
    font-weight: 600;
    letter-spacing: -.02em;
    font-variant-numeric: tabular-nums;
    -moz-appearance: textfield;
}
#topup-amount::-webkit-outer-spin-button,
#topup-amount::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
#topup-amount::placeholder { font-size: 17px; font-weight: 400; letter-spacing: -.01em; }

.form-actions { margin-top: 14px; display: grid; gap: 10px; }

.form-errors { margin-top: 14px; }
.form-errors ul { margin: 0; padding: 0; list-style: none; display: grid; gap: 6px; }
.form-errors li {
    padding: 12px 16px;
    border-radius: var(--lk-radius-sm);
    background: var(--lk-danger-soft);
    color: var(--lk-danger-text);
    font-size: 14px;
    animation: lk-toast-in .55s var(--ease-spring) backwards;
}
.validation-summary-valid { display: none; }

.field-error { display: block; margin-top: 6px; font-size: 13px; color: var(--lk-danger-text); }

/* инлайн-форма (переименование, промокод) */
.inline-form { display: flex; gap: 10px; align-items: stretch; }
.inline-form .form-card { flex: 1; margin-top: 0; }
.inline-form .btn { flex: none; }

/* ---------- Суммы-чипы ---------- */
.chips { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 14px; }

.chip {
    padding: 10px 18px;
    border-radius: 980px;
    border: 1px solid var(--lk-line);
    background: var(--lk-card);
    color: var(--lk-ink);
    font-family: inherit;
    font-size: 15px;
    font-weight: 500;
    font-variant-numeric: tabular-nums;
    cursor: pointer;
    box-shadow: var(--lk-card-inset);
    transition:
        background-color var(--dur) var(--ease),
        color var(--dur) var(--ease),
        border-color var(--dur) var(--ease),
        box-shadow var(--dur) var(--ease),
        transform .38s var(--ease-spring);
}
.chip:active { transform: scale(.94); transition-duration: .08s; }

@keyframes lk-pop {
    0%   { transform: scale(.94); }
    60%  { transform: scale(1.05); }
    100% { transform: none; }
}
.chip.is-active {
    background: var(--lk-primary-grad);
    border-color: transparent;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .22), var(--lk-primary-shadow);
    animation: lk-pop .36s var(--ease-out);
}

/* ---------- Тосты ---------- */
@keyframes lk-toast-in {
    from { opacity: 0; transform: translateY(-14px) scale(.96); }
    to   { opacity: 1; transform: none; }
}

.toast {
    display: flex;
    align-items: center;
    gap: 10px;
    margin: 6px 0 10px;
    padding: 13px 16px;
    border-radius: 16px;
    font-size: 15px;
    transition: opacity .35s var(--ease), transform .35s var(--ease);
}
.app__screen > .toast { animation: lk-toast-in .6s var(--ease-spring) backwards; }
.toast.is-hide { opacity: 0; transform: translateY(-8px) scale(.98); }
.toast svg { flex: none; }

.toast--ok { background: var(--lk-ok-soft); color: var(--lk-ok-text); }
.toast--err { background: var(--lk-danger-soft); color: var(--lk-danger-text); }

/* ---------- Пустое состояние ---------- */
.empty { text-align: center; padding: 46px 18px 30px; }

/* иконка на фирменной градиентной плитке с мягким свечением */
.empty__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 76px;
    height: 76px;
    margin: 0 auto 18px;
    border-radius: 24px;
    background: var(--lk-brand-grad);
    color: #fff;
    box-shadow: 0 16px 34px -12px rgba(41, 151, 255, .65), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.empty__title { margin: 0 0 6px; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.empty__text { margin: 0 auto 22px; max-width: 300px; font-size: 15px; color: var(--lk-ink-2); }

/* ---------- Тарифы ---------- */
.card.tariff, .tariff { display: flex; align-items: center; gap: 12px; }
.tariff__body { flex: 1; min-width: 0; }
.tariff__title { margin: 0; font-size: 17px; font-weight: 600; }
.tariff__per { margin: 3px 0 0; font-size: 13px; color: var(--lk-ink-2); }
.tariff__price { font-size: 17px; font-weight: 700; white-space: nowrap; font-variant-numeric: tabular-nums; letter-spacing: -.01em; }

/* ---------- История платежей ---------- */
.history__amount { font-weight: 600; font-variant-numeric: tabular-nums; }
.history__date { font-size: 13px; color: var(--lk-ink-2); margin-top: 2px; }

/* ---------- Экран авторизации ---------- */
.auth {
    min-height: 100%;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 10px 2px 30px;
}

.auth__logo { display: flex; justify-content: center; margin-bottom: 16px; }
.auth__logo svg { filter: drop-shadow(0 12px 26px rgba(41, 151, 255, .38)); }

.auth__title {
    margin: 0;
    text-align: center;
    font-size: 30px;
    font-weight: 700;
    letter-spacing: -.024em;
}

.auth__sub { margin: 6px 0 4px; text-align: center; font-size: 15px; color: var(--lk-ink-2); }

.auth__switch { margin: 20px 0 0; text-align: center; font-size: 15px; color: var(--lk-ink-2); }
.auth__switch a { color: var(--lk-accent); text-decoration: none; font-weight: 500; }

.auth__hint { margin: 14px 0 0; text-align: center; font-size: 13px; color: var(--lk-ink-3); }

.auth__home {
    position: absolute;
    top: calc(10px + env(safe-area-inset-top));
    left: 14px;
    z-index: 10;
}

/* ---------- Переход к оплате ---------- */
.pay-wait { text-align: center; padding-top: 18vh; }

.spinner {
    width: 34px;
    height: 34px;
    margin: 0 auto 22px;
    border-radius: 50%;
    border: 2.5px solid var(--lk-line);
    border-top-color: var(--lk-accent);
    animation: lk-spin .8s linear infinite;
}

@keyframes lk-spin { to { transform: rotate(360deg); } }

/* ---------- Прочее ---------- */
.fine {
    margin-top: 26px;
    text-align: center;
    font-size: 12px;
    line-height: 1.5;
    color: var(--lk-ink-3);
}
.fine a { color: var(--lk-ink-2); text-decoration: none; }
.fine--left { text-align: left; margin-top: 12px; }

.card__lead { margin: 0 0 10px; font-size: 15px; color: var(--lk-ink-2); }

.link-accent { color: var(--lk-accent); text-decoration: none; font-weight: 500; }

.copy-value {
    display: block;
    font-size: 14px;
    color: var(--lk-ink-2);
    overflow-wrap: anywhere;
    margin-top: 4px;
}

/* ---------- Нативные ощущения на тач-экранах ---------- */
/* Без задержки двойного тапа и без системного превью ссылки при долгом нажатии. */
.btn, .chip, .tabbar__item, a.card, .balance, .backlink {
    touch-action: manipulation;
    -webkit-touch-callout: none;
}
.btn, .chip, .tabbar__item { -webkit-user-select: none; user-select: none; }

/* В установленном приложении ссылка «Сайт» на экране входа не нужна. */
html.is-standalone .auth__home { display: none; }
@media (display-mode: standalone) { .auth__home { display: none; } }

/* ---------- Плотный список карточек ---------- */
.stack--tight { margin-top: 0; gap: 10px; }

/* иконка слева в карточке-ссылке */
.sub-card__icon {
    flex: none;
    display: flex;
    align-items: center;
    justify-content: center;
    width: 38px;
    height: 38px;
    border-radius: 11px;
    color: #fff;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, .25);
}
.sub-card__icon--tg { background: linear-gradient(160deg, #37bbfe, #1e96d1); }
.sub-card__icon--support { background: var(--lk-brand-grad); }

/* ---------- «Добавить на экран Домой» ---------- */
/* Градиентная рамка через маску псевдоэлемента — работает и на полупрозрачной карточке. */
.install { position: relative; padding: 18px 18px 16px; }
.install::before {
    content: "";
    position: absolute;
    inset: -1px;
    border-radius: inherit;
    padding: 1.5px;
    background: linear-gradient(135deg, rgba(90, 165, 255, .9), rgba(27, 100, 255, .9));
    -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    -webkit-mask-composite: xor;
    mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0);
    mask-composite: exclude;
    pointer-events: none;
}

.install__head { display: flex; align-items: flex-start; gap: 14px; }

.install__icon {
    flex: none;
    width: 56px;
    height: 56px;
    border-radius: 13px;
    box-shadow: 0 8px 18px -6px rgba(0, 0, 0, .35);
}

.install__title { margin: 2px 0 0; font-size: 17px; font-weight: 700; letter-spacing: -.015em; }
.install__text { margin: 4px 0 0; font-size: 14px; line-height: 1.4; color: var(--lk-ink-2); }

.install__steps {
    margin: 14px 0 0;
    padding-left: 22px;
    display: grid;
    gap: 8px;
    font-size: 15px;
    line-height: 1.45;
}
.install__steps li::marker { color: var(--lk-accent); font-weight: 600; }

.install__glyph {
    display: inline-block;
    width: 20px;
    height: 20px;
    vertical-align: -5px;
    color: var(--lk-accent);
}

.install__note {
    margin: 12px 0 0;
    padding: 10px 12px;
    border-radius: 12px;
    background: var(--lk-warn-soft);
    color: var(--lk-warn-text);
    font-size: 13px;
    line-height: 1.4;
}
.install__note--soft { background: var(--lk-fill); color: var(--lk-ink-2); }

.install__done {
    display: flex;
    align-items: center;
    gap: 10px;
    margin-top: 14px;
    padding: 12px 14px;
    border-radius: var(--lk-radius-sm);
    background: var(--lk-ok-soft);
    color: var(--lk-ok-text);
    font-size: 15px;
    font-weight: 500;
}
.install__done svg { flex: none; }
.install .form-actions { margin-top: 12px; }

/* ---------- Нижняя шторка (одноразовое приглашение в канал) ---------- */
.sheet {
    position: fixed;
    inset: 0;
    z-index: 100;
    display: flex;
    align-items: flex-end;
    justify-content: center;
}

.sheet__backdrop {
    position: absolute;
    inset: 0;
    background: rgba(0, 0, 0, .42);
    opacity: 0;
    transition: opacity .35s var(--ease-out);
}

.sheet__panel {
    position: relative;
    width: 100%;
    max-width: 560px;
    padding: 10px 20px calc(20px + env(safe-area-inset-bottom));
    background: var(--lk-sheet);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    backdrop-filter: blur(30px) saturate(180%);
    border-radius: 28px 28px 0 0;
    box-shadow: 0 -12px 40px rgba(0, 0, 0, .18), inset 0 1px 0 rgba(255, 255, 255, .35);
    transform: translateY(100%);
    transition: transform .55s var(--ease-sheet);
}

.sheet.is-open .sheet__backdrop { opacity: 1; }
.sheet.is-open .sheet__panel { transform: none; }

.sheet__grabber {
    width: 36px;
    height: 5px;
    margin: 0 auto 16px;
    border-radius: 3px;
    background: var(--lk-ink-3);
    opacity: .45;
}

.sheet__icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 60px;
    height: 60px;
    margin: 6px auto 14px;
    border-radius: 19px;
    background: linear-gradient(160deg, #37bbfe, #1e96d1);
    color: #fff;
    box-shadow: 0 10px 24px -8px rgba(30, 150, 209, .6), inset 0 1px 0 rgba(255, 255, 255, .3);
}

.sheet__title { margin: 0; text-align: center; font-size: 22px; font-weight: 700; letter-spacing: -.02em; }

.sheet__text {
    margin: 8px auto 18px;
    max-width: 320px;
    text-align: center;
    font-size: 15px;
    line-height: 1.45;
    color: var(--lk-ink-2);
}
.sheet .form-actions { margin-top: 0; }

@media (min-width: 600px) {
    .sheet { align-items: center; }
    .sheet__panel {
        max-width: 400px;
        margin: 0 20px;
        padding-bottom: 20px;
        border-radius: 28px;
        opacity: 0;
        transform: translateY(16px) scale(.97);
        transition: transform .4s var(--ease-spring), opacity .3s var(--ease-out);
    }
    .sheet.is-open .sheet__panel { opacity: 1; transform: none; }
    .sheet__grabber { display: none; }
}

/* ---------- Фирменный знак и надпись M-VPN ---------- */
/* Знак содержит два варианта окраски; auto выбирает по теме системы. */
.brand-mark { display: block; flex: none; }
.brand-mark__glow { opacity: .28; }
.brand-mark--dark .brand-mark__light,
.brand-mark--light .brand-mark__dark { display: none; }
.brand-mark--light .brand-mark__glow { opacity: .16; }
.brand-mark--auto .brand-mark__dark { display: none; }
.brand-mark--auto .brand-mark__glow { opacity: .16; }
@media (prefers-color-scheme: dark) {
    .brand-mark--auto .brand-mark__dark { display: inline; }
    .brand-mark--auto .brand-mark__light { display: none; }
    .brand-mark--auto .brand-mark__glow { opacity: .28; }
}

/* надпись: «M-» цветом текста, «VPN» синим, широкая разрядка как в логотипе */
.brand-word {
    display: inline-flex;
    align-items: baseline;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    white-space: nowrap;
}
.brand-word__a { color: var(--lk-ink); }
.brand-word__b { color: var(--lk-accent); }

.auth__brand { margin: 0 0 18px; text-align: center; font-size: 20px; letter-spacing: .2em; }
.auth__brand .brand-word__a { color: var(--lk-ink-2); }
.auth__logo { margin-bottom: 14px; }
.auth__logo .brand-mark { filter: drop-shadow(0 14px 28px rgba(27, 100, 255, .35)); }

/* логотип пользователя как плитка приложения iOS: скругление, тонкий кант, мягкая тень и синее свечение */
.auth__appicon {
    display: block;
    width: 84px;
    height: 84px;
    border-radius: 22.5%;
    box-shadow:
        0 0 0 .5px rgba(255, 255, 255, .10),
        0 16px 34px -14px rgba(0, 0, 0, .55),
        0 0 44px -8px rgba(27, 100, 255, .45);
}
@media (prefers-color-scheme: light) {
    .auth__appicon {
        box-shadow:
            0 0 0 .5px rgba(0, 0, 0, .12),
            0 16px 34px -14px rgba(0, 0, 0, .45),
            0 0 40px -10px rgba(27, 100, 255, .30);
    }
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation: none !important;
        transition-duration: .01ms !important;
    }
    ::view-transition-old(root), ::view-transition-new(root) { animation: none !important; }
}
