:root {
    --bg: #eef7ff;
    --bg-dark: #8bc3ff;
    --bg-accent: #5aaaff;
    --card: #ffffff;
    --card-soft: rgba(255, 255, 255, 0.82);
    --card-strong: rgba(255, 255, 255, 0.94);
    --text: #0f172a;
    --muted: #516074;
    --border: rgba(86, 122, 168, 0.16);
    --border-strong: rgba(86, 122, 168, 0.24);
    --primary: #9dcbff;
    --primary-dark: #5ea8f5;
    --primary-ink: #0f2744;
    --surface-tint: rgba(111, 181, 255, 0.12);
    --shadow: 0 28px 70px rgba(68, 107, 156, 0.14);
    --shadow-soft: 0 16px 38px rgba(68, 107, 156, 0.1);
    --radius-xl: 34px;
    --radius-lg: 26px;
    --radius-md: 18px;
    --radius-sm: 12px;
    --page-max: 1200px;
}

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
    min-height: 100%;
    background: #d7ebff;
}

body {
    margin: 0;
    min-height: 100vh;
    font-family: "Inter", "Segoe UI", sans-serif;
    color: var(--text);
    background-color: #d7ebff;
    background:
        radial-gradient(circle at top left, rgba(255, 255, 255, 0.98) 0%, rgba(255, 255, 255, 0.98) 22%, rgba(232, 245, 255, 0.86) 54%, rgba(144, 199, 255, 0.72) 100%),
        linear-gradient(135deg, #ffffff 0%, #e8f3ff 42%, #a8d3ff 100%);
    background-attachment: fixed;
    overflow-x: hidden;
}

body::before,
body::after {
    content: "";
    position: fixed;
    inset: auto;
    pointer-events: none;
    z-index: 0;
    filter: blur(10px);
}

body::before {
    top: -120px;
    right: -80px;
    width: 46vw;
    height: 46vw;
    min-width: 320px;
    min-height: 320px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(84, 168, 255, 0.34) 0%, rgba(84, 168, 255, 0.12) 46%, rgba(84, 168, 255, 0) 76%);
}

body::after {
    left: -140px;
    bottom: -180px;
    width: 38vw;
    height: 38vw;
    min-width: 280px;
    min-height: 280px;
    border-radius: 50%;
    background: radial-gradient(circle, rgba(126, 191, 255, 0.22) 0%, rgba(126, 191, 255, 0.08) 50%, rgba(126, 191, 255, 0) 76%);
}

a {
    color: inherit;
    text-decoration: none;
}

button,
input,
textarea,
select {
    font: inherit;
}

.site-shell {
    min-height: 100svh;
    padding: 28px;
    position: relative;
    z-index: 1;
}

.web-auth-page .site-shell {
    display: grid;
    align-content: center;
}

.web-auth-page .flash-banner {
    width: min(560px, 100%);
}

.site-header {
    width: min(var(--page-max), 100%);
    margin: 0 auto 28px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 24px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.brand-mark {
    width: 44px;
    height: 44px;
    border-radius: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.58);
    overflow: hidden;
}

.brand-logo {
    width: 42px;
    height: 42px;
    object-fit: contain;
}

.auth-card-heading,
.dashboard-hero-heading {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    width: fit-content;
    margin-bottom: 14px;
}

.auth-brand-mark {
    width: 38px;
    height: 38px;
    flex: 0 0 38px;
    border-radius: 12px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: #000;
    box-shadow: 0 10px 24px rgba(15, 23, 42, 0.22);
    overflow: hidden;
}

.auth-brand-mark .brand-logo {
    width: 30px;
    height: 30px;
}

.site-nav {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-left: auto;
}

.nav-link,
.nav-button {
    border: 0;
    border-radius: 999px;
    padding: 12px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease, color 0.2s ease;
}

.nav-link {
    color: var(--primary-ink);
}

.nav-button,
.cta-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--primary-ink);
    box-shadow: 0 12px 28px rgba(84, 168, 255, 0.2);
}

.nav-button-light,
.cta-secondary,
.icon-button {
    background: rgba(255, 255, 255, 0.72);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-soft);
}

.nav-button:hover,
.nav-link:hover,
.cta-primary:hover,
.cta-secondary:hover,
.icon-button:hover {
    transform: translateY(-1px);
}

.nav-button:hover,
.cta-primary:hover {
    box-shadow: 0 18px 32px rgba(84, 168, 255, 0.26);
}

.flash-banner {
    max-width: var(--page-max);
    margin: 0 auto 24px;
    padding: 16px 20px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: 20px;
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(16px);
}

.landing,
.dashboard {
    width: min(var(--page-max), 100%);
    margin: 0 auto;
    display: grid;
    gap: 28px;
}

.landing-auth-only {
    min-height: calc(100svh - 56px);
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
}

.auth-single-card {
    width: min(100%, 520px);
    padding: 40px;
    background: var(--card-strong);
    border: 1px solid rgba(255, 255, 255, 0.7);
    border-radius: 36px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    display: grid;
    gap: 20px;
    justify-items: stretch;
}

.auth-single-card .auth-card-heading,
.auth-single-card h1 {
    margin-bottom: 0;
}

.is-hidden {
    display: none !important;
}

/* Переключатель «Вход / Регистрация» */
.auth-mode-slider {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

.auth-segmented-track {
    position: relative;
    display: grid;
    grid-template-columns: 1fr 1fr;
    align-items: stretch;
    padding: 5px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.06);
    border: 1px solid var(--border);
}

.auth-segmented-indicator {
    position: absolute;
    left: 5px;
    right: calc(50% + 2px);
    top: 5px;
    bottom: 5px;
    border-radius: 999px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    box-shadow: 0 8px 18px rgba(84, 168, 255, 0.24);
    transition: left 0.24s ease, right 0.24s ease;
    z-index: 0;
    pointer-events: none;
}

.auth-segmented-track[data-mode="register"] .auth-segmented-indicator {
    left: calc(50% + 2px);
    right: 5px;
}

.auth-segmented-opt {
    position: relative;
    z-index: 1;
    border: none;
    background: transparent;
    padding: 12px 14px;
    border-radius: 999px;
    font-size: 15px;
    font-weight: 700;
    color: rgba(15, 23, 42, 0.55);
    cursor: pointer;
    transition: color 0.2s ease;
}

.auth-segmented-opt.is-active {
    color: var(--primary-ink);
}

.auth-panel {
    min-height: 1px;
}

.hero-card,
.dashboard-grid {
    display: grid;
    grid-template-columns: 1.2fr 0.9fr;
    gap: 24px;
}

.hero-card,
.panel-card,
.step-card,
.plan-card {
    background: var(--card-soft);
    border: 1px solid rgba(255, 255, 255, 0.72);
    border-radius: var(--radius-xl);
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.hero-card {
    padding: 36px;
    align-items: stretch;
}

.auth-hero {
    width: 100%;
    max-width: 1040px;
    display: grid;
    grid-template-columns: minmax(0, 1.05fr) minmax(340px, 420px);
    gap: 28px;
    align-items: center;
}

.auth-hero-copy,
.auth-card-focused {
    background: var(--card-strong);
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 34px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.auth-hero-copy {
    padding: 44px;
}

.auth-card-focused {
    padding: 32px;
}

.hero-copy {
    padding: 12px 6px 12px 0;
}

.eyebrow {
    display: inline-flex;
    padding: 8px 12px;
    border-radius: 999px;
    background: rgba(112, 178, 250, 0.14);
    color: #2a6cb1;
    font-size: 14px;
    font-weight: 700;
    line-height: 1;
}

h1,
h2,
h3,
p {
    margin-top: 0;
}

h1 {
    font-size: clamp(34px, 5vw, 56px);
    line-height: 1.02;
    letter-spacing: -0.04em;
    margin-bottom: 18px;
}

h2 {
    font-size: clamp(26px, 3vw, 40px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

h3 {
    font-size: 28px;
    line-height: 1.12;
    letter-spacing: -0.03em;
    margin-bottom: 12px;
}

.hero-text,
.section-heading p,
.step-card p,
.microcopy,
.empty-note,
.plan-duration {
    color: var(--muted);
    line-height: 1.6;
}

.hero-actions,
.copy-row,
.status-grid,
.identity-list,
.plan-grid,
.step-grid {
    display: grid;
    gap: 20px;
}

.feature-pills {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 24px;
}

.feature-pill {
    display: inline-flex;
    align-items: center;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(104, 170, 245, 0.1);
    color: #2f669e;
    font-size: 14px;
    font-weight: 600;
}

.cabinet-logo-wrap {
    width: 100%;
    min-height: 110px;
    padding: 20px 28px;
    border-radius: 0 0 28px 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(13, 24, 52, 0.94);
    box-shadow: 0 18px 40px rgba(10, 20, 45, 0.24);
    backdrop-filter: blur(16px);
}

.cabinet-logo {
    width: 86px;
    height: 86px;
    object-fit: contain;
}

#telegram-login-hint a {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    margin-top: 10px;
    padding: 10px 14px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(157, 203, 255, 0.28) 0%, rgba(94, 168, 245, 0.3) 100%);
    color: #1d4f86;
    font-weight: 800;
    text-decoration: none;
    box-shadow: 0 10px 22px rgba(104, 170, 245, 0.18);
}

#telegram-login-hint a:hover {
    background: linear-gradient(135deg, rgba(157, 203, 255, 0.38) 0%, rgba(94, 168, 245, 0.38) 100%);
}

.hero-actions {
    grid-auto-flow: column;
    justify-content: start;
}

.auth-card,
.panel-card,
.plan-card,
.step-card {
    padding: 34px;
}

.dashboard-clone {
    max-width: 760px;
    gap: 34px;
    padding-bottom: calc(124px + env(safe-area-inset-bottom));
}

.panel-hero-card {
    padding: 0;
    overflow: hidden;
    min-width: 0;
}

.dashboard-clone .dashboard-hero-heading {
    display: block;
    width: 100%;
    margin: 0;
}

.dashboard-hero-body {
    display: grid;
    gap: 0;
    padding: 30px 34px 34px;
    min-width: 0;
}

.panel-hero-card .dashboard-hero-body h2 {
    margin: 0;
    max-width: 100%;
    font-size: clamp(24px, 4vw, 36px);
    line-height: 1.08;
    letter-spacing: -0.03em;
    overflow-wrap: anywhere;
    word-break: break-word;
}

.panel-hero-card .dashboard-hero-body .hero-text {
    max-width: 100%;
    overflow-wrap: anywhere;
}

.clone-grid {
    grid-template-columns: 1fr;
}

.dashboard-tab-panel {
    display: none;
    gap: 28px;
    min-width: 0;
}

.dashboard-tab-panel.is-active {
    display: grid;
}

.dashboard-bottom-nav {
    position: fixed;
    left: 50%;
    bottom: max(16px, env(safe-area-inset-bottom));
    z-index: 20;
    width: min(100%, 608px);
    transform: translateX(-50%);
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 10px;
    padding: 10px;
    border-radius: 28px;
    background: rgba(13, 24, 52, 0.94);
    box-shadow: 0 18px 40px rgba(10, 20, 45, 0.28);
    backdrop-filter: blur(16px);
}

.dashboard-tab-button {
    min-height: 56px;
    border: 0;
    border-radius: 20px;
    background: transparent;
    color: rgba(255, 255, 255, 0.72);
    font-size: 15px;
    font-weight: 700;
    cursor: pointer;
    transition: background 0.2s ease, color 0.2s ease, transform 0.2s ease;
}

.dashboard-tab-button.is-active {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--primary-ink);
    transform: translateY(-1px);
    box-shadow: 0 12px 24px rgba(84, 168, 255, 0.22);
}

.subscription-clone {
    display: grid;
    gap: 22px;
}

.subscription-title,
.instruction-title {
    margin: 0;
    color: #0f172a;
    font-size: clamp(28px, 6vw, 42px);
    text-align: left;
    letter-spacing: -0.04em;
}

.subscription-key-card {
    display: grid;
    gap: 18px;
}

.subscription-link-input {
    width: 100%;
    border: 0;
    border-radius: 20px;
    padding: 18px 20px;
    background: rgba(255, 255, 255, 0.92);
    color: #111827;
    font-size: 20px;
    box-shadow: inset 0 0 0 1px rgba(86, 122, 168, 0.14);
}

.subscription-actions {
    display: grid;
    grid-template-columns: 1fr 82px;
    gap: 14px;
}

.copy-main-button,
.clone-action-button,
.qr-action-button {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 62px;
    border: 0;
    border-radius: 20px;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--primary-ink);
    font-size: 18px;
    font-weight: 700;
    cursor: pointer;
    box-shadow: 0 12px 28px rgba(84, 168, 255, 0.2);
}

.qr-action-button {
    background: rgba(255, 255, 255, 0.82);
    color: #111827;
    box-shadow: var(--shadow-soft);
}

.clone-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.status-chip {
    display: grid;
    gap: 8px;
    min-height: 102px;
    padding: 22px 24px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.8);
    box-shadow: var(--shadow-soft);
}

.status-chip span {
    color: var(--muted);
    font-size: 14px;
}

.status-chip strong {
    font-size: 20px;
}

.success-chip {
    border: 1px solid rgba(66, 173, 117, 0.18);
}

.info-chip {
    border: 1px solid rgba(104, 170, 245, 0.18);
}

.instruction-clone,
.plans-clone,
.support-clone {
    display: grid;
    gap: 24px;
}

.profile-clone {
    display: grid;
    gap: 22px;
}

.profile-section-card {
    gap: 22px;
}

.profile-accordion {
    gap: 0;
}

.profile-accordion-summary {
    list-style: none;
    cursor: pointer;
    margin: 0;
    padding: 0;
}

.profile-accordion-summary::-webkit-details-marker {
    display: none;
}

.profile-accordion-heading {
    display: grid;
    gap: 6px;
    flex: 1;
}

.profile-accordion-summary::after {
    content: "";
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(#2a6cb1 0 0) center / 12px 2px no-repeat,
        linear-gradient(#2a6cb1 0 0) center / 2px 12px no-repeat,
        rgba(112, 178, 250, 0.16);
}

.profile-accordion[open] .profile-accordion-summary::after {
    background:
        linear-gradient(#2a6cb1 0 0) center / 12px 2px no-repeat,
        rgba(112, 178, 250, 0.16);
}

.profile-accordion-body {
    display: grid;
    gap: 22px;
    padding-top: 10px;
}

.clone-step-card {
    min-height: 0;
    display: grid;
    gap: 20px;
    padding-top: 40px;
}

.clone-step-card h3 {
    font-size: 28px;
    margin-bottom: 0;
}

.clone-step-card p {
    margin-bottom: 0;
}

.select-shell {
    position: relative;
}

.pretty-select {
    width: 100%;
    min-height: 62px;
    border-radius: 20px;
    border: 1px solid rgba(86, 122, 168, 0.18);
    background: rgba(255, 255, 255, 0.88);
    color: #111827;
    padding: 0 18px;
    font-size: 18px;
    appearance: auto;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
}

.clone-plan-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.clone-plan-card {
    display: grid;
    gap: 20px;
    background: rgba(255, 255, 255, 0.76);
}

.compact-plan-card {
    position: relative;
    gap: 16px;
    padding: 24px;
}

.plan-card-highlighted.compact-plan-card {
    padding-top: 56px;
}

.plan-card-highlighted {
    border: 1px solid rgba(255, 149, 43, 0.62);
    box-shadow:
        0 14px 28px rgba(255, 167, 74, 0.12),
        inset 0 0 0 1px rgba(255, 201, 143, 0.52);
}

.plan-card-badge {
    position: absolute;
    top: 14px;
    right: 14px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 6px 12px;
    border-radius: 999px;
    background: linear-gradient(135deg, rgba(255, 174, 87, 0.18) 0%, rgba(255, 136, 39, 0.24) 100%);
    color: #c16000;
    border: 1px solid rgba(255, 149, 43, 0.34);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.01em;
}

.compact-plan-header {
    gap: 2px;
}

.compact-plan-header h3 {
    font-size: 20px;
    line-height: 1.2;
}

.compact-plan-price {
    margin: 0;
    font-size: 28px;
}

.plan-card-actions {
    display: grid;
    gap: 12px;
}

.plan-card-actions form {
    margin: 0;
}

.plan-gift-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.plan-header {
    display: grid;
    gap: 4px;
}

.plan-header h3 {
    margin: 0;
    font-size: 28px;
}

.profile-subscription-summary,
.payment-history-grid {
    display: grid;
    gap: 14px;
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-subscription-link {
    margin-top: 6px;
}

.profile-partner-link {
    display: grid;
    gap: 14px;
}

.payment-history-list {
    display: grid;
    gap: 16px;
}

.payment-history-item {
    display: grid;
    gap: 16px;
    padding: 22px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.68);
    border: 1px solid rgba(86, 122, 168, 0.14);
}

.payment-history-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.payment-history-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 30px;
    padding: 0 12px;
    border-radius: 999px;
    background: rgba(112, 178, 250, 0.16);
    color: #2a6cb1;
    font-size: 12px;
    font-weight: 800;
}

.payment-history-grid span {
    color: var(--muted);
    font-size: 14px;
}

.payment-history-grid strong {
    font-size: 16px;
    color: #111827;
}

.payment-history-details {
    color: #111827;
    font-size: 14px;
    word-break: break-word;
}

.partner-stats-grid {
    margin-top: 6px;
}

.inline-bind-form {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.telegram-link-inline {
    margin-top: 8px;
    width: 100%;
}

.trial-button,
.telegram-link-inline {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 58px;
    padding: 0 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.82);
    color: #111827;
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-soft);
    font-weight: 700;
}

.trial-button:hover,
.telegram-link-inline:hover {
    background: rgba(255, 255, 255, 0.94);
}

/* ЛК: пробный как в боте + блок логина/пароля (контраст кнопок на белой карточке) */
.cabinet-trial-block {
    margin-top: 14px;
}

.cabinet-trial-form {
    gap: 8px;
}

.cabinet-trial-submit {
    min-height: 54px;
    font-size: 16px;
}

.cabinet-trial-hint {
    margin: 0;
    text-align: center;
}

.cabinet-credentials-box {
    margin-top: 18px;
    padding: 24px 22px;
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow-soft);
}

.cabinet-credentials-lead {
    margin: 0 0 12px;
    font-size: 15px;
    font-weight: 600;
    color: #111827;
}

.cabinet-credentials-form .cabinet-login-field {
    min-height: 56px;
    max-height: 56px;
    resize: none;
    overflow: hidden;
    line-height: 1.45;
    background: #fff;
    color: #111827;
}

.cabinet-cred-submit {
    min-height: 52px;
}

.auth-email-pending {
    display: grid;
    gap: 14px;
    margin-top: 16px;
}

.auth-copy-row {
    grid-template-columns: 1fr auto;
}

.auth-status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.auth-dark-button {
    background: #ffffff;
    color: #111827;
    border: 1px solid rgba(16, 24, 40, 0.12);
    box-shadow: none;
}

.auth-secondary-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
}

.generated-password-card {
    display: grid;
    gap: 14px;
}

main.dashboard .generated-password-card.cabinet-credentials-once {
    width: min(100%, 560px);
    margin: 0 auto 24px;
    padding: 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 24px;
    box-shadow: var(--shadow);
}

.generated-credentials {
    display: grid;
    gap: 10px;
}

.credential-row {
    display: grid;
    gap: 4px;
    padding: 14px 16px;
    border-radius: 16px;
    background: rgba(112, 178, 250, 0.1);
}

.credential-row span {
    color: var(--muted);
    font-size: 13px;
    font-weight: 600;
}

.credential-row strong {
    font-size: 18px;
    word-break: break-word;
}

.qr-modal {
    position: fixed;
    inset: 0;
    z-index: 50;
}

.qr-modal-backdrop {
    position: absolute;
    inset: 0;
    background: rgba(16, 24, 40, 0.45);
}

.qr-modal-card {
    position: relative;
    width: min(92vw, 360px);
    margin: 10vh auto 0;
    padding: 18px;
    border-radius: 26px;
    background: rgba(255, 255, 255, 0.92);
    box-shadow: var(--shadow);
    z-index: 1;
    backdrop-filter: blur(18px);
}

.qr-modal-close-button {
    position: absolute;
    top: 10px;
    right: 12px;
    border: 0;
    background: transparent;
    font-size: 32px;
    cursor: pointer;
}

#qr-image-wrapper {
    display: flex;
    align-items: center;
    justify-content: center;
    min-height: 280px;
}

.support-card {
    display: grid;
    gap: 22px;
    padding: 30px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    transition: transform 0.22s ease, box-shadow 0.22s ease, background 0.22s ease;
}

.panel-card:hover,
.plan-card:hover,
.step-card:hover,
.support-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 32px 72px rgba(68, 107, 156, 0.16);
}

.support-faq-card {
    gap: 16px;
    align-content: start;
}

.faq-list {
    display: grid;
    gap: 14px;
}

.faq-item {
    border-radius: 22px;
    background: rgba(255, 255, 255, 0.6);
    border: 1px solid rgba(86, 122, 168, 0.14);
    overflow: hidden;
}

.faq-item summary {
    list-style: none;
    cursor: pointer;
    padding: 22px 24px;
    font-size: 17px;
    font-weight: 700;
    color: #0f172a;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.faq-item summary::-webkit-details-marker {
    display: none;
}

.faq-item summary::after {
    content: "";
    flex: none;
    width: 28px;
    height: 28px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background:
        linear-gradient(#2a6cb1 0 0) center / 12px 2px no-repeat,
        linear-gradient(#2a6cb1 0 0) center / 2px 12px no-repeat,
        rgba(112, 178, 250, 0.16);
}

.faq-item[open] summary::after {
    background:
        linear-gradient(#2a6cb1 0 0) center / 12px 2px no-repeat,
        rgba(112, 178, 250, 0.16);
}

.faq-answer {
    padding: 0 24px 24px;
    color: var(--muted);
    line-height: 1.6;
}

.faq-answer p,
.faq-answer ol {
    margin: 0;
}

.faq-answer ol {
    padding-left: 18px;
}

.faq-answer li + li {
    margin-top: 8px;
}

.support-card-header {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 14px;
}

.support-card-title {
    margin: 0;
    font-size: 22px;
    font-weight: 800;
    color: #0f172a;
}

.support-card-caption {
    margin: 6px 0 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
}

.support-messages-frame {
    padding: 18px;
    border-radius: 24px;
    background: rgba(255, 255, 255, 0.52);
    border: 1px solid rgba(86, 122, 168, 0.12);
}

.support-messages {
    display: grid;
    gap: 14px;
    max-height: 360px;
    overflow-y: auto;
    padding-right: 4px;
}

.support-message {
    max-width: 88%;
    padding: 16px 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.9);
    box-shadow: var(--shadow-soft);
}

.support-message-user {
    justify-self: end;
    background: rgba(172, 213, 255, 0.4);
}

.support-message-admin {
    justify-self: start;
    background: rgba(255, 255, 255, 0.92);
}

.support-message-meta {
    margin-bottom: 6px;
    font-size: 12px;
    font-weight: 700;
    color: var(--muted);
}

.support-message-text {
    line-height: 1.5;
    white-space: pre-wrap;
    word-break: break-word;
}

.support-message-attachments {
    display: flex;
    flex-wrap: wrap;
    gap: 10px;
    margin-top: 12px;
}

.support-image-link {
    display: inline-flex;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid rgba(86, 122, 168, 0.16);
    background: rgba(255, 255, 255, 0.92);
}

.support-image-preview {
    display: block;
    width: 168px;
    max-width: min(48vw, 220px);
    aspect-ratio: 1 / 1;
    object-fit: cover;
}

.support-empty {
    padding: 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.7);
    color: var(--muted);
    text-align: center;
}

.support-form {
    display: grid;
    gap: 16px;
}

.support-upload-row {
    display: flex;
    align-items: center;
    gap: 12px;
    flex-wrap: wrap;
}

.support-upload-label,
.support-upload-clear {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 999px;
    font-size: 14px;
    font-weight: 700;
}

.support-upload-label {
    cursor: pointer;
    color: var(--text);
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(86, 122, 168, 0.18);
}

.support-file-input {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    border: 0;
}

.support-upload-clear {
    cursor: pointer;
    border: 0;
    color: #8d2f2f;
    background: rgba(255, 232, 232, 0.9);
}

.support-upload-meta {
    min-height: 20px;
    font-size: 13px;
    color: var(--muted);
}

.support-upload-preview {
    width: fit-content;
    padding: 6px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.72);
    border: 1px solid rgba(86, 122, 168, 0.14);
}

.support-upload-preview-image {
    display: block;
    width: min(220px, 100%);
    max-height: 220px;
    border-radius: 14px;
    object-fit: cover;
}

.support-textarea {
    min-height: 110px;
    resize: vertical;
    border: 1px solid rgba(86, 122, 168, 0.18);
    border-radius: 20px;
    padding: 18px 20px;
    font: inherit;
    background: rgba(255, 255, 255, 0.88);
}

.support-textarea:focus {
    outline: none;
    border-color: rgba(104, 170, 245, 0.42);
    box-shadow: 0 0 0 4px rgba(104, 170, 245, 0.12);
}

.support-form-footer {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 14px;
}

.support-form-hint {
    font-size: 13px;
    line-height: 1.45;
    color: var(--muted);
}

.support-form-footer .cta-primary {
    min-width: 220px;
}

.admin-support-layout {
    display: grid;
    grid-template-columns: minmax(330px, 390px) minmax(0, 1fr);
    gap: 30px;
    align-items: stretch;
}

.admin-support-sidebar {
    position: sticky;
    top: 20px;
    align-self: start;
}

.admin-support-sidebar-card {
    display: grid;
    gap: 18px;
    min-height: min(80vh, 980px);
    padding: 24px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.admin-support-sidebar-head {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.admin-support-header-copy {
    display: grid;
    gap: 6px;
}

.admin-support-kicker {
    margin: 0;
    font-size: 13px;
    font-weight: 800;
    letter-spacing: 0.08em;
    text-transform: uppercase;
    color: rgba(71, 84, 103, 0.78);
}

.admin-support-subtitle,
.admin-support-sidebar-caption {
    margin: 0;
    font-size: 14px;
    line-height: 1.5;
    color: var(--muted);
}

.admin-thread-list {
    display: grid;
    gap: 12px;
    max-height: min(70vh, 820px);
    overflow-y: auto;
    padding-right: 4px;
}

.admin-thread-item {
    display: grid;
    gap: 10px;
    padding: 16px 17px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.62);
    border: 1px solid rgba(86, 122, 168, 0.14);
    color: #111827;
    text-decoration: none;
    transition: transform 0.18s ease, border-color 0.18s ease, background 0.18s ease, box-shadow 0.18s ease;
}

.admin-thread-item:hover {
    transform: translateY(-1px);
    border-color: rgba(104, 170, 245, 0.22);
    background: rgba(255, 255, 255, 0.82);
    box-shadow: var(--shadow-soft);
}

.admin-thread-main,
.admin-thread-meta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
}

.admin-thread-name {
    min-width: 0;
    font-size: 15px;
    font-weight: 800;
    line-height: 1.35;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.admin-thread-item span {
    color: var(--muted);
    font-size: 12px;
}

.admin-thread-id,
.admin-thread-time {
    display: inline-flex;
    align-items: center;
    min-width: 0;
}

.admin-thread-time {
    white-space: nowrap;
}

.admin-thread-item-active {
    background: rgba(172, 213, 255, 0.45);
    border-color: rgba(104, 170, 245, 0.24);
    box-shadow: 0 12px 28px rgba(104, 170, 245, 0.14);
}

.admin-thread-unread {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 24px;
    height: 24px;
    padding: 0 8px;
    border-radius: 999px;
    font-size: 12px;
    font-weight: 800;
    background: #e53935;
    color: #fff;
    box-shadow: 0 8px 18px rgba(229, 57, 53, 0.2);
}

/* Админ: веб-поддержка (читаемый текст, без белого заголовка на белом фоне) */
.admin-support-page {
    width: min(1440px, calc(100vw - 48px));
    max-width: 1440px;
    margin: 0 auto;
    padding-bottom: 48px;
    gap: 28px;
}

.admin-support-header {
    margin-bottom: 10px;
}

.admin-support-view-switch {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    width: fit-content;
    padding: 8px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.74);
    border: 1px solid rgba(255, 255, 255, 0.74);
    box-shadow: var(--shadow-soft);
    backdrop-filter: blur(18px);
}

.admin-support-view-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 44px;
    padding: 0 18px;
    border-radius: 14px;
    color: var(--muted);
    text-decoration: none;
    font-size: 14px;
    font-weight: 800;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease;
}

.admin-support-view-link:hover {
    background: rgba(112, 178, 250, 0.12);
    color: var(--text);
}

.admin-support-view-link-active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--primary-ink);
    box-shadow: 0 12px 24px rgba(104, 170, 245, 0.2);
}

.admin-support-header-inner {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 20px;
    padding: 24px 28px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 24px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.admin-support-title {
    margin: 0;
    font-size: clamp(30px, 3.8vw, 42px);
    font-weight: 800;
    color: #0f172a;
}

.admin-support-back {
    font-size: 15px;
    font-weight: 600;
    color: #2a6cb1;
    text-decoration: none;
    align-self: center;
    padding: 11px 16px;
    border-radius: 12px;
    background: rgba(112, 178, 250, 0.12);
    border: 1px solid rgba(104, 170, 245, 0.22);
}

.admin-support-back:hover {
    background: rgba(112, 178, 250, 0.2);
}

.admin-plans-layout {
    display: block;
}

.admin-plans-card {
    display: grid;
    gap: 24px;
    padding: 28px;
    background: rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
}

.admin-plans-list {
    display: grid;
    gap: 18px;
}

.admin-plan-item {
    display: flex;
    align-items: flex-end;
    justify-content: space-between;
    gap: 20px;
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(172, 213, 255, 0.26) 0%, rgba(255, 255, 255, 0.82) 100%);
    border: 1px solid rgba(104, 170, 245, 0.14);
}

.admin-plan-item-main {
    display: grid;
    gap: 18px;
    flex: 1 1 auto;
    min-width: 0;
}

.admin-plan-item-head {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
}

.admin-plan-title {
    margin: 0;
    font-size: 21px;
    font-weight: 800;
    color: #0f172a;
}

.admin-plan-toggle {
    display: inline-flex;
    align-items: center;
    gap: 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 700;
}

.admin-plan-toggle input {
    width: 18px;
    height: 18px;
    accent-color: var(--primary);
}

.admin-plan-grid {
    display: grid;
    grid-template-columns: minmax(0, 1.2fr) minmax(160px, 200px) minmax(180px, 220px);
    gap: 16px;
}

.admin-plan-field {
    display: grid;
    gap: 8px;
    min-width: 0;
    color: var(--muted);
    font-size: 13px;
    font-weight: 700;
}

.admin-plan-input {
    width: 100%;
}

.admin-plan-select {
    min-height: 48px;
    appearance: auto;
}

.admin-plan-submit {
    min-width: 148px;
    align-self: center;
}

.support-panel-subtitle {
    margin: 0 0 8px;
    font-size: 24px;
    font-weight: 800;
    color: #0f172a;
}

.admin-support-main .support-panel-subtitle {
    margin-bottom: 16px;
}

.support-empty-panel {
    padding: 32px 24px;
    text-align: center;
    background: rgba(248, 250, 252, 0.95);
    border-radius: 20px;
    border: 1px dashed rgba(15, 23, 42, 0.15);
}

.support-empty-title {
    margin: 0 0 8px;
    font-size: 18px;
    font-weight: 700;
    color: #0f172a;
}

.support-empty-text {
    margin: 0;
    color: var(--muted);
    font-size: 15px;
    line-height: 1.5;
}

.support-card.admin-support-main {
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.74);
    border-radius: 28px;
    padding: 28px;
    box-shadow: var(--shadow);
    backdrop-filter: blur(18px);
    min-height: min(80vh, 980px);
    grid-template-rows: auto minmax(0, 1fr) auto;
}

.admin-support-main-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px 24px;
    padding-bottom: 8px;
}

.admin-support-main-heading {
    display: grid;
    gap: 4px;
}

.admin-support-main-user {
    display: inline-flex;
    align-items: center;
    max-width: 100%;
    padding: 10px 14px;
    border-radius: 999px;
    background: rgba(112, 178, 250, 0.12);
    color: #334155;
    font-size: 14px;
    font-weight: 700;
}

.admin-support-messages-frame {
    padding: 18px;
    min-height: 100%;
}

.admin-support-messages {
    max-height: none;
    min-height: 560px;
    padding: 4px 8px 4px 2px;
}

.admin-support-main .support-form {
    margin-top: 8px;
}

.admin-support-textarea {
    min-height: 164px;
}

.admin-support-submit {
    min-width: 260px;
}

.admin-user-item {
    gap: 12px;
}

.admin-user-item-inactive {
    opacity: 0.72;
}

.admin-user-search-form {
    display: flex;
    gap: 12px;
    align-items: center;
}

.admin-user-search-input {
    flex: 1 1 auto;
    min-width: 0;
}

.admin-user-search-button {
    min-width: 112px;
}

.admin-user-scope-switch {
    display: flex;
    flex-wrap: wrap;
    gap: 8px;
}

.admin-user-scope-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-height: 40px;
    padding: 0 14px;
    border-radius: 999px;
    background: rgba(255, 255, 255, 0.66);
    border: 1px solid rgba(255, 255, 255, 0.78);
    color: var(--muted);
    font-size: 13px;
    font-weight: 800;
    transition: background 0.18s ease, color 0.18s ease, box-shadow 0.18s ease, transform 0.18s ease;
}

.admin-user-scope-link:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.86);
    color: var(--text);
    box-shadow: var(--shadow-soft);
}

.admin-user-scope-link-active {
    background: linear-gradient(135deg, var(--primary), var(--primary-dark));
    color: var(--primary-ink);
    box-shadow: 0 12px 24px rgba(104, 170, 245, 0.18);
}

.admin-user-pagination {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding-top: 4px;
}

.admin-user-pagination-text {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
}

.admin-user-pagination-link {
    min-height: 40px;
    padding: 0 16px;
}

.admin-user-days-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 68px;
    min-height: 28px;
    padding: 0 10px;
    border-radius: 999px;
    background: rgba(15, 23, 42, 0.08);
    color: #475467;
    font-size: 12px;
    font-weight: 800;
    line-height: 1;
}

.admin-user-days-badge-active {
    background: rgba(30, 148, 105, 0.12);
    color: #0f7a55;
}

.admin-user-stat-grid,
.admin-user-details-grid {
    display: grid;
    gap: 18px;
}

.admin-user-stat-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
}

.admin-user-details-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.admin-user-stat-card,
.admin-user-panel {
    padding: 22px;
    border-radius: 24px;
    background: linear-gradient(180deg, rgba(172, 213, 255, 0.24) 0%, rgba(255, 255, 255, 0.82) 100%);
    border: 1px solid rgba(104, 170, 245, 0.14);
}

.admin-user-stat-card {
    display: grid;
    gap: 8px;
}

.admin-user-stat-label {
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.06em;
    text-transform: uppercase;
    color: rgba(71, 84, 103, 0.86);
}

.admin-user-stat-value {
    font-size: 30px;
    line-height: 1;
    color: #0f172a;
}

.admin-user-stat-note {
    color: var(--muted);
    font-size: 13px;
    line-height: 1.45;
}

.admin-user-panel {
    display: grid;
    gap: 18px;
}

.admin-user-panel-wide {
    margin-top: 4px;
}

.admin-user-panel-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
}

.admin-user-panel-title {
    margin: 0;
    font-size: 20px;
    font-weight: 800;
    color: #0f172a;
}

.admin-user-thread-link {
    min-height: 44px;
}

.admin-user-secondary-action {
    background: rgba(112, 178, 250, 0.12);
    color: #2a6cb1;
    border: 1px solid rgba(104, 170, 245, 0.22);
    box-shadow: none;
}

.admin-user-secondary-action:hover {
    background: rgba(112, 178, 250, 0.2);
    color: #225c95;
    border-color: rgba(104, 170, 245, 0.32);
}

.admin-user-info-list {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 14px 18px;
    margin: 0;
}

.admin-user-info-list div {
    display: grid;
    gap: 6px;
    min-width: 0;
}

.admin-user-info-list dt {
    margin: 0;
    color: rgba(71, 84, 103, 0.86);
    font-size: 12px;
    font-weight: 800;
    letter-spacing: 0.05em;
    text-transform: uppercase;
}

.admin-user-info-list dd {
    margin: 0;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.5;
    word-break: break-word;
}

.admin-user-adjust-form {
    display: flex;
    flex-wrap: wrap;
    align-items: end;
    gap: 16px;
}

.admin-user-adjust-form .admin-plan-field {
    flex: 0 0 220px;
}

.admin-user-adjust-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 12px;
}

.admin-user-adjust-button {
    min-width: 168px;
}

.admin-user-list {
    display: grid;
    gap: 12px;
}

.admin-user-list-item {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    gap: 16px;
    padding: 16px 18px;
    border-radius: 18px;
    background: rgba(255, 255, 255, 0.92);
    border: 1px solid rgba(15, 23, 42, 0.08);
}

.admin-user-list-item-muted {
    background: rgba(248, 250, 252, 0.95);
}

.admin-user-list-item strong {
    display: block;
    color: #0f172a;
    font-size: 15px;
    line-height: 1.4;
}

.admin-user-list-meta {
    margin-top: 4px;
    color: var(--muted);
    font-size: 13px;
    line-height: 1.5;
    word-break: break-word;
}

.admin-user-list-side {
    display: grid;
    gap: 4px;
    justify-items: end;
    color: #475467;
    font-size: 13px;
    text-align: right;
    white-space: nowrap;
}

/* Кабинет: логин + пароль в одной плашке */
.identity-pill-wide {
    grid-column: 1 / -1;
    flex-direction: column;
    align-items: stretch;
    gap: 10px;
}

.identity-pill-body {
    display: flex;
    flex-direction: column;
    gap: 10px;
    width: 100%;
}

.identity-inline-password {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px 12px;
    padding: 10px 12px;
    border-radius: 14px;
    background: rgba(112, 178, 250, 0.1);
    font-size: 14px;
}

.identity-inline-label {
    color: var(--muted);
    font-weight: 600;
}

.identity-inline-password code {
    flex: 1;
    min-width: 0;
    padding: 6px 10px;
    border-radius: 10px;
    background: #fff;
    border: 1px solid rgba(15, 23, 42, 0.1);
    font-size: 15px;
    word-break: break-all;
}

.cred-copy-chip {
    border: 0;
    border-radius: 10px;
    padding: 8px 12px;
    font-size: 13px;
    font-weight: 700;
    cursor: pointer;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--primary-ink);
}

.auth-form {
    display: grid;
    gap: 14px;
}

.telegram-login-shell {
    display: flex;
    justify-content: center;
    min-height: 54px;
}

.input-label {
    font-size: 14px;
    font-weight: 700;
}

.text-input {
    width: 100%;
    border: 1px solid rgba(86, 122, 168, 0.18);
    border-radius: 18px;
    padding: 16px 18px;
    background: rgba(255, 255, 255, 0.88);
    color: var(--text);
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.48);
}

.cta-primary,
.cta-secondary,
.icon-button {
    border: 0;
    border-radius: 18px;
    padding: 15px 18px;
    font-weight: 700;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease, background 0.2s ease;
}

.cta-full {
    width: 100%;
}

.auth-divider {
    position: relative;
    text-align: center;
    margin: 18px 0;
}

.auth-divider span {
    display: inline-block;
    padding: 0 12px;
    background: var(--card-soft);
    color: var(--muted);
    position: relative;
    z-index: 1;
}

.auth-divider::before {
    content: "";
    position: absolute;
    top: 50%;
    left: 0;
    right: 0;
    height: 1px;
    background: rgba(16, 24, 40, 0.12);
}

.telegram-widget-host iframe {
    width: 100% !important;
}

.microcopy-tight {
    margin-bottom: 0;
}

.telegram-direct-login {
    background: rgba(255, 255, 255, 0.82);
    color: var(--text);
    border: 1px solid rgba(255, 255, 255, 0.78);
    box-shadow: var(--shadow-soft);
}

.telegram-direct-login:hover {
    background: rgba(255, 255, 255, 0.94);
}

.section-heading {
    max-width: 760px;
}

.instruction-section,
.plans-section {
    display: grid;
    gap: 20px;
}

.step-grid,
.plan-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.step-card {
    position: relative;
    min-height: 210px;
    background: rgba(255, 255, 255, 0.8);
}

.step-badge {
    position: absolute;
    top: -18px;
    left: 20px;
    width: 48px;
    height: 48px;
    border-radius: 999px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    color: var(--primary-ink);
    font-weight: 800;
    font-size: 24px;
    box-shadow: 0 12px 24px rgba(104, 170, 245, 0.2);
}

.panel-gradient {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.84) 0%, rgba(240, 248, 255, 0.88) 46%, rgba(222, 239, 255, 0.9) 100%);
}

.identity-list,
.status-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
}

.profile-identity-list {
    grid-template-columns: 1fr;
}

.identity-pill,
.status-box {
    padding: 18px;
    border-radius: 20px;
    background: rgba(255, 255, 255, 0.78);
    border: 1px solid rgba(255, 255, 255, 0.76);
    box-shadow: var(--shadow-soft);
}

.identity-pill span,
.status-box span {
    display: block;
    margin-bottom: 6px;
    font-size: 14px;
    color: var(--muted);
}

.identity-pill strong,
.status-box strong {
    font-size: 20px;
}

.dashboard-clone .identity-pill strong {
    font-size: 16px;
    line-height: 1.35;
    word-break: break-word;
}

.dashboard-clone .panel-gradient h1 {
    font-size: clamp(28px, 5.8vw, 42px);
    margin-bottom: 14px;
    line-height: 1.08;
    overflow-wrap: anywhere;
}

.identity-pill-active {
    border-color: rgba(40, 190, 105, 0.24);
    background: rgba(40, 190, 105, 0.08);
}

.copy-row {
    grid-template-columns: 1fr auto;
    align-items: center;
}

.plan-price {
    margin-bottom: 8px;
    font-size: 38px;
    font-weight: 800;
}

.compact-section .step-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr));
}

.subscription-page .dashboard-grid {
    grid-template-columns: 1fr;
}

@media (max-width: 980px) {
    .hero-card,
    .dashboard-grid,
    .step-grid,
    .plan-grid,
    .compact-section .step-grid {
        grid-template-columns: 1fr;
    }

    .auth-hero {
        grid-template-columns: 1fr;
        max-width: 640px;
    }

    .clone-plan-grid {
        grid-template-columns: 1fr 1fr;
    }

    .admin-support-layout {
        grid-template-columns: 1fr;
    }

    .admin-plan-item {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-plan-submit {
        width: 100%;
        min-width: 0;
    }

    .admin-user-stat-grid,
    .admin-user-details-grid,
    .admin-user-info-list {
        grid-template-columns: 1fr;
    }

    .admin-user-adjust-form .admin-plan-field,
    .admin-user-adjust-button {
        width: 100%;
    }

    .admin-user-search-form {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-user-search-button {
        width: 100%;
    }

    .admin-user-pagination {
        flex-direction: column;
        align-items: stretch;
    }

    .admin-user-pagination-link {
        width: 100%;
        justify-content: center;
    }

    .admin-user-list-item {
        flex-direction: column;
    }

    .admin-user-list-side {
        justify-items: start;
        text-align: left;
        white-space: normal;
    }

    .admin-support-sidebar {
        position: static;
        top: auto;
    }

    .admin-support-sidebar-card,
    .support-card.admin-support-main {
        min-height: auto;
    }

    .admin-thread-list {
        max-height: none;
        overflow: visible;
        padding-right: 0;
    }

    .admin-support-page {
        width: min(1040px, calc(100vw - 32px));
    }

    .hero-actions {
        grid-auto-flow: row;
    }
}

@media (max-width: 640px) {
    .site-shell {
        padding: 16px;
    }

    .dashboard-clone {
        gap: 24px;
        padding-bottom: calc(196px + env(safe-area-inset-bottom));
    }

    .dashboard-tab-panel {
        gap: 22px;
    }

    .site-header {
        flex-direction: column;
        align-items: stretch;
    }

    .site-nav {
        justify-content: space-between;
        flex-wrap: wrap;
    }

    .hero-card,
    .auth-card,
    .auth-hero-copy,
    .auth-card-focused,
    .panel-card,
    .step-card,
    .plan-card {
        border-radius: 28px;
    }

    .identity-list,
    .status-grid,
    .copy-row,
    .clone-status-grid {
        grid-template-columns: 1fr;
    }

    .profile-subscription-summary,
    .payment-history-grid {
        grid-template-columns: 1fr;
    }

    .auth-status-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
    }

    .auth-copy-row {
        grid-template-columns: 1fr auto;
    }

    h1 {
        font-size: 34px;
    }

    .auth-hero-copy,
    .auth-card-focused {
        padding: 24px;
    }

    .auth-single-card {
        padding: 24px;
        border-radius: 28px;
    }

    .landing-auth-only {
        min-height: calc(100svh - 32px);
    }

    .dashboard-bottom-nav {
        left: 16px;
        right: 16px;
        bottom: max(12px, env(safe-area-inset-bottom));
        width: auto;
        transform: none;
        border-radius: 24px;
        gap: 8px;
        padding: 8px;
        box-shadow: 0 16px 34px rgba(10, 20, 45, 0.18);
    }

    .dashboard-tab-button {
        min-height: 52px;
        border-radius: 18px;
        font-size: 14px;
    }

    .subscription-link-input {
        font-size: 16px;
    }

    .subscription-actions {
        grid-template-columns: minmax(0, 1fr) 82px;
    }

    .clone-plan-grid {
        grid-template-columns: repeat(2, minmax(0, 1fr));
        gap: 12px;
    }

    .dashboard-clone .panel-gradient h1 {
        font-size: 24px;
        line-height: 1.12;
    }

    .dashboard-hero-heading {
        margin: 0;
    }

    .cabinet-logo-wrap {
        min-height: 96px;
        padding: 18px 22px;
        border-radius: 0 0 24px 24px;
    }

    .cabinet-logo {
        width: 74px;
        height: 74px;
    }

    .dashboard-hero-body {
        padding: 22px 18px 24px;
        gap: 2px;
    }

    .panel-hero-card .dashboard-hero-body h2 {
        font-size: 20px;
        line-height: 1.15;
    }

    .auth-card-heading,
    .dashboard-hero-heading {
        margin-bottom: 12px;
    }

    .panel-hero-card .dashboard-hero-body .hero-text {
        margin-top: 10px;
        font-size: 14px;
        line-height: 1.45;
    }

    .telegram-link-inline {
        min-height: 52px;
        padding: 12px 14px;
        border-radius: 16px;
        line-height: 1.25;
        white-space: normal;
        text-align: center;
    }

    .admin-support-header-inner,
    .admin-plans-card,
    .admin-support-sidebar-card,
    .support-card.admin-support-main {
        padding: 18px;
        border-radius: 22px;
    }

    .admin-thread-item {
        padding: 14px;
    }

    .admin-support-view-switch {
        width: 100%;
        display: grid;
        grid-template-columns: 1fr;
    }

    .admin-support-view-link {
        min-width: 0;
        padding: 0 12px;
    }

    .admin-plan-item {
        padding: 18px;
        border-radius: 20px;
    }

    .admin-plan-item-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-plan-grid {
        grid-template-columns: 1fr;
    }

    .admin-user-adjust-actions {
        width: 100%;
        flex-direction: column;
    }

    .support-form-footer {
        flex-direction: column;
        align-items: stretch;
    }

    .support-form-footer .cta-primary {
        min-width: 0;
        width: 100%;
    }

    .admin-thread-main,
    .admin-thread-meta,
    .admin-support-main-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .admin-support-messages {
        min-height: 360px;
    }

    .support-card {
        padding: 20px;
    }

    .dashboard-clone .panel-card,
    .clone-step-card,
    .clone-plan-card,
    .profile-section-card {
        padding: 20px;
    }

    .dashboard-clone .panel-hero-card {
        padding: 0;
        overflow: hidden;
        border-radius: 28px;
    }

    .clone-step-card {
        padding-top: 58px;
    }

    .step-badge {
        top: 14px;
        left: 18px;
        width: 42px;
        height: 42px;
        font-size: 21px;
        box-shadow: 0 10px 20px rgba(104, 170, 245, 0.16);
    }

    .support-messages-frame {
        padding: 14px;
        border-radius: 20px;
    }

    .admin-support-page {
        width: 100%;
    }

    .admin-support-title {
        font-size: 30px;
    }

    .admin-support-subtitle,
    .admin-support-sidebar-caption {
        font-size: 13px;
    }

    .support-panel-subtitle {
        font-size: 20px;
    }

    .dashboard-clone .panel-card,
    .subscription-key-card,
    .clone-step-card,
    .clone-plan-card {
        border-radius: 28px;
    }

    .dashboard-clone .identity-list {
        grid-template-columns: 1fr 1fr;
    }

    .profile-identity-list,
    .dashboard-clone .profile-identity-list {
        grid-template-columns: 1fr;
    }

    .compact-plan-card {
        padding: 16px;
    }

    .plan-card-highlighted.compact-plan-card {
        padding-top: 50px;
    }

    .profile-accordion-body {
        gap: 18px;
    }

    .compact-plan-header h3 {
        font-size: 16px;
    }

    .compact-plan-price {
        font-size: 20px;
    }

    .plan-card-actions .cta-primary,
    .plan-card-actions .cta-secondary {
        min-height: 42px;
        padding: 10px;
        font-size: 13px;
    }

    .payment-history-head {
        align-items: flex-start;
        flex-direction: column;
    }

    .payment-history-item {
        padding: 18px;
    }
}
