/* ==========================================
   CryoVPN Portal v2 — Dark Ice Design System
   Mobile-first | Glassmorphism | Cyan accents
   ========================================== */

[hidden] { display: none !important; }

/* --- Design Tokens --- */
:root {
    --bg: #0D0E1A;
    --surface: rgba(255, 255, 255, 0.05);
    --surface-solid: #16172e;
    --surface-hover: rgba(255, 255, 255, 0.08);
    --border: rgba(255, 255, 255, 0.08);
    --border-hover: rgba(255, 255, 255, 0.15);
    --glass-blur: blur(20px);

    --primary: #00E5CC;
    --primary-dim: #00b8a3;
    --primary-glow: rgba(0, 229, 204, 0.2);
    --secondary: #7B61FF;
    --secondary-glow: rgba(123, 97, 255, 0.2);
    --tertiary: #FF3B8B;

    --text: #f0f0f5;
    --text-secondary: rgba(255, 255, 255, 0.55);
    --text-muted: rgba(255, 255, 255, 0.35);

    --success: #34d399;
    --success-bg: rgba(52, 211, 153, 0.12);
    --error: #ff4466;
    --error-bg: rgba(255, 68, 102, 0.12);
    --warning: #f59e0b;
    --warning-bg: rgba(245, 158, 11, 0.1);

    --radius: 12px;
    --radius-sm: 8px;
    --radius-pill: 999px;

    --topbar-h: 56px;
    --nav-h: 68px;

    --font: 'Manrope', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'Space Grotesk', 'JetBrains Mono', monospace;
}

/* --- Reset --- */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; }
body {
    font-family: var(--font-body);
    background: var(--bg);
    color: var(--text);
    min-height: 100dvh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
}
::selection { background: rgba(0, 229, 204, 0.25); color: #fff; }

/* --- Scrollbar --- */
::-webkit-scrollbar { width: 4px; height: 4px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.1); border-radius: 2px; }
* { scrollbar-width: thin; scrollbar-color: rgba(255,255,255,0.1) transparent; }


/* ===================================================
   LOGIN
   =================================================== */
.view { display: none; position: relative; z-index: 1; }
.view.active { display: flex; min-height: 100dvh; }

.login-container {
    display: flex; align-items: center; justify-content: center;
    width: 100%; min-height: 100dvh; padding: 24px;
    background: var(--bg);
}

.login-card {
    width: 100%; max-width: 400px;
    padding: 40px 32px 36px;
    background: rgba(22, 23, 46, 0.8);
    backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    position: relative; overflow: hidden;
    animation: card-appear 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.login-card__accent {
    position: absolute; top: 0; left: 0; right: 0; height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    opacity: 0.6;
}
@keyframes card-appear {
    0% { opacity: 0; transform: translateY(16px) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}

.logo-block { text-align: center; margin-bottom: 32px; }
.logo-img { width: 56px; height: 56px; margin-bottom: 12px; }
.logo-text {
    font-family: var(--font); font-size: 1.75rem; font-weight: 300;
    letter-spacing: 0.04em; color: var(--text);
}
.logo-text span { font-weight: 800; color: var(--primary); }
.logo-sub {
    font-size: 0.8rem; color: var(--text-secondary);
    margin-top: 6px; letter-spacing: 0.12em; text-transform: uppercase;
    font-family: var(--font);
}

.input-group { margin-bottom: 20px; }
.input-label {
    display: block; font-size: 0.8rem; font-weight: 600;
    color: var(--text-secondary); margin-bottom: 8px;
    text-transform: uppercase; letter-spacing: 0.05em;
    font-family: var(--font);
}
.input-field {
    width: 100%; height: 52px; padding: 0 18px;
    font-family: var(--font-mono); font-size: 16px; color: var(--text);
    background: rgba(255,255,255,0.04);
    border: 1px solid var(--border); border-radius: var(--radius-sm);
    outline: none; transition: border-color 0.2s, box-shadow 0.2s;
}
.input-field::placeholder { color: var(--text-muted); font-family: var(--font-body); }
.input-field:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(0, 229, 204, 0.1);
}

.error-msg {
    color: var(--error); font-size: 0.85rem; margin-top: 16px;
    padding: 12px 16px; background: var(--error-bg);
    border: 1px solid rgba(255, 68, 102, 0.2);
    border-radius: var(--radius-sm); line-height: 1.4;
}

.login-divider {
    display: flex; align-items: center; gap: 16px;
    margin: 20px 0;
    color: var(--text-muted); font-size: 0.78rem;
    text-transform: uppercase; letter-spacing: 0.08em;
    font-family: var(--font);
}
.login-divider::before, .login-divider::after {
    content: ''; flex: 1; height: 1px; background: var(--border);
}

.btn--telegram {
    background: #2AABEE; color: #fff;
    box-shadow: 0 0 16px rgba(42, 171, 238, 0.2);
    text-decoration: none;
}
.btn--telegram:hover { background: #229ED9; box-shadow: 0 0 24px rgba(42, 171, 238, 0.3); }

/* Full-width Telegram buttons may wrap on narrow screens */
.btn--telegram.btn--full {
    white-space: normal;
    height: auto;
    min-height: 48px;
    padding: 10px 18px;
    line-height: 1.3;
    text-align: center;
}
.btn--telegram.btn--full svg { flex-shrink: 0; }

.login-footer {
    text-align: center; margin-top: 20px;
    font-size: 0.82rem; color: var(--text-muted);
}
.login-footer a { color: var(--primary); text-decoration: none; }
.login-footer a:hover { text-decoration: underline; }


/* ===================================================
   BUTTONS
   =================================================== */
.btn {
    display: inline-flex; align-items: center; justify-content: center;
    gap: 8px; padding: 0 24px; height: 48px;
    font-family: var(--font); font-size: 0.9rem; font-weight: 700;
    border: none; border-radius: var(--radius-sm); cursor: pointer;
    transition: all 0.2s; text-decoration: none; white-space: nowrap;
}
.btn:active { transform: scale(0.97); }
.btn:disabled { opacity: 0.5; cursor: not-allowed; transform: none !important; }

.btn--primary {
    background: var(--primary); color: var(--bg);
    box-shadow: 0 0 20px var(--primary-glow);
}
.btn--primary:hover { background: var(--primary-dim); box-shadow: 0 0 30px var(--primary-glow); }

.btn--secondary {
    background: var(--secondary); color: #fff;
    box-shadow: 0 0 20px var(--secondary-glow);
}

.btn--full { width: 100%; }

.btn--outline {
    background: transparent; color: var(--primary);
    border: 1px solid rgba(0, 229, 204, 0.3);
}
.btn--outline:hover { background: rgba(0, 229, 204, 0.08); }

.btn--outline-green {
    background: transparent; color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.3);
}
.btn--outline-green:hover { background: rgba(52, 211, 153, 0.08); }

.btn--ghost {
    background: transparent; color: var(--primary);
    border: none; padding: 8px 16px; height: auto;
}
.btn--ghost:hover { background: rgba(0, 229, 204, 0.08); }
.btn--sm { font-size: 0.82rem; height: 36px; padding: 0 14px; }

.btn--cancel {
    background: var(--surface-solid); color: var(--text-secondary);
    border: 1px solid var(--border);
}
.btn--cancel:hover { background: var(--surface-hover); color: var(--text); }


/* ===================================================
   TOPBAR
   =================================================== */
.topbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: var(--topbar-h);
    background: rgba(13, 14, 26, 0.9);
    backdrop-filter: blur(12px); -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid var(--border);
    z-index: 100;
}
.topbar__inner {
    max-width: 600px; margin: 0 auto; height: 100%;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 20px;
}
.topbar__logo {
    display: flex; align-items: center; gap: 8px;
    text-decoration: none; color: var(--text);
    font-family: var(--font); font-size: 1.05rem;
    font-weight: 300; letter-spacing: 0.03em;
}
.topbar__logo b { font-weight: 800; color: var(--primary); }
.topbar__logo-img { width: 24px; height: 24px; }

.topbar__nav { display: none; }

.topbar__logout {
    background: none; border: none; color: var(--text-muted);
    cursor: pointer; padding: 8px; border-radius: var(--radius-sm);
    transition: color 0.2s; display: flex; align-items: center;
}
.topbar__logout span { display: none; }
.topbar__logout:hover { color: var(--error); }


/* ===================================================
   BOTTOM NAVIGATION (mobile-first, always visible)
   =================================================== */
.mobile-nav {
    position: fixed; bottom: 0; left: 0; right: 0;
    height: var(--nav-h);
    background: rgba(13, 14, 26, 0.95);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border-top: 1px solid var(--border);
    z-index: 100;
    display: flex; justify-content: space-around; align-items: center;
    padding: 0 4px;
    padding-bottom: env(safe-area-inset-bottom);
}
.mobile-nav__item {
    display: flex; flex-direction: column; align-items: center;
    gap: 4px; padding: 6px 16px;
    font-size: 0.65rem; font-weight: 600; letter-spacing: 0.02em;
    color: var(--text-muted); text-decoration: none;
    border-radius: var(--radius-sm); transition: color 0.2s;
    font-family: var(--font);
    -webkit-tap-highlight-color: transparent;
}
.mobile-nav__item.active { color: var(--primary); }
.mobile-nav__item svg { width: 22px; height: 22px; }


/* ===================================================
   APP SHELL & CONTENT
   =================================================== */
.app-shell { position: relative; z-index: 1; }
.content {
    max-width: 600px; margin: 0 auto;
    padding: calc(var(--topbar-h) + 24px) 20px calc(var(--nav-h) + 24px);
    min-height: 100dvh;
}

.page { animation: page-in 0.3s ease-out; }
@keyframes page-in {
    0% { opacity: 0; transform: translateY(8px); }
    100% { opacity: 1; transform: translateY(0); }
}

.page__header { margin-bottom: 24px; }
.page__header h2 {
    font-family: var(--font); font-size: 1.6rem; font-weight: 800;
}
.page__sub {
    color: var(--text-secondary); margin-top: 6px; font-size: 0.9rem;
}

/* ===== LOADER ===== */
.page-loader { display: flex; align-items: center; justify-content: center; min-height: 50vh; }
.page-loader[hidden] { display: none; }
.spinner { width: 36px; height: 36px; }
.spinner__ring {
    width: 100%; height: 100%;
    border: 2px solid var(--border); border-top-color: var(--primary);
    border-radius: 50%; animation: spin 0.8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ===== SKELETON ===== */
.skeleton, .skeleton-block {
    background: linear-gradient(90deg, var(--surface-solid) 25%, #22233e 50%, var(--surface-solid) 75%);
    background-size: 200% 100%; animation: skeleton-shimmer 1.5s infinite; border-radius: 6px;
}
@keyframes skeleton-shimmer { 0% { background-position: 200% 0; } 100% { background-position: -200% 0; } }


/* ===================================================
   CARD (glassmorphism base)
   =================================================== */
.card {
    background: var(--surface);
    backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    padding: 20px;
    transition: border-color 0.2s;
}

.card-label {
    font-size: 0.72rem; font-weight: 700; color: var(--text-secondary);
    text-transform: uppercase; letter-spacing: 0.06em;
    font-family: var(--font);
}


/* ===================================================
   DASHBOARD
   =================================================== */
.dashboard-grid { display: flex; flex-direction: column; gap: 16px; }

/* Status card */
.card-status__top { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; gap: 8px; }
.card-status__divider { height: 1px; background: var(--border); margin: 16px 0; }
.card-status__expiry { display: flex; flex-direction: column; gap: 4px; }

.card-value { font-size: 1rem; font-weight: 600; }
.card-value--big { font-size: 1.5rem; font-weight: 800; margin-top: 6px; font-family: var(--font); }
.card-value--cyan { color: var(--primary); }

.status-badge {
    display: inline-flex; align-items: center; gap: 6px;
    padding: 6px 14px; border-radius: var(--radius-pill);
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
    letter-spacing: 0.05em; font-family: var(--font);
}
.status-badge--active { background: var(--success-bg); color: var(--success); }
.status-badge--active::before {
    content: ''; width: 7px; height: 7px; background: var(--success);
    border-radius: 50%; box-shadow: 0 0 6px var(--success);
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot { 0%, 100% { opacity: 0.6; } 50% { opacity: 1; } }

.status-badge--expired { background: var(--error-bg); color: var(--error); }
.status-badge--expired::before {
    content: ''; width: 7px; height: 7px; background: var(--error); border-radius: 50%;
}

.discount-badge {
    display: inline-block; padding: 5px 12px; font-size: 0.72rem; font-weight: 700;
    background: rgba(0, 229, 204, 0.1); color: var(--primary);
    border-radius: var(--radius-pill); font-family: var(--font);
}

.expiry-date { font-size: 1rem; font-weight: 600; color: var(--text); }
.expiry-days { font-size: 0.82rem; color: var(--text-secondary); }

/* UUID / Key blocks */
.key-block {
    display: flex; align-items: center; gap: 8px; margin-top: 10px;
    background: rgba(0,0,0,0.2);
    border-radius: var(--radius-sm); padding: 12px 14px;
    overflow: hidden;
}
.key-block__code {
    flex: 1; font-family: var(--font-mono); font-size: 0.8rem;
    color: var(--text); white-space: nowrap;
    overflow: hidden; text-overflow: ellipsis;
    line-height: 1.4;
}
.key-block__copy {
    flex-shrink: 0; background: rgba(255,255,255,0.06);
    border: 1px solid var(--border); color: var(--text-secondary);
    cursor: pointer; padding: 8px 14px; border-radius: var(--radius-sm);
    transition: all 0.2s; display: flex; align-items: center; gap: 6px;
    font-family: var(--font); font-size: 0.75rem; font-weight: 600;
    min-height: 36px;
}
.key-block__copy:hover { color: var(--primary); border-color: rgba(0, 229, 204, 0.3); }
.key-block__copy:active { transform: scale(0.95); }

.copy-toast {
    display: inline-flex; align-items: center; gap: 6px;
    font-size: 0.78rem; color: var(--bg); background: var(--primary);
    padding: 6px 14px; border-radius: var(--radius-sm);
    margin-top: 8px; font-weight: 600; animation: toast-in 0.2s ease;
    font-family: var(--font);
}
@keyframes toast-in { 0% { opacity: 0; transform: translateY(4px); } 100% { opacity: 1; transform: translateY(0); } }

.uuid-warning {
    margin-top: 14px; font-size: 0.78rem; color: var(--warning);
    line-height: 1.5; display: flex; align-items: flex-start; gap: 8px;
    padding: 12px 14px; border-radius: var(--radius-sm);
    background: var(--warning-bg);
    border: 1px solid rgba(245, 158, 11, 0.15);
}


/* ===================================================
   CONNECTION / PLATFORM SELECT
   =================================================== */
.platform-grid {
    display: flex; flex-wrap: wrap; gap: 14px;
    max-width: 400px; margin: 0 auto;
    justify-content: center;
}
.platform-card {
    display: flex; flex-direction: column; align-items: center; justify-content: center;
    gap: 12px; padding: 20px;
    width: calc(50% - 7px); aspect-ratio: 1;
    color: var(--text-secondary); cursor: pointer;
    transition: all 0.2s; text-align: center;
    -webkit-tap-highlight-color: transparent;
}
.platform-card svg.platform-card__icon {
    width: 44px; height: 44px; flex-shrink: 0;
}
.platform-card span {
    font-weight: 600; font-size: 0.88rem; font-family: var(--font);
}
.platform-card:hover,
.platform-card:active {
    color: var(--primary); border-color: rgba(0, 229, 204, 0.25);
    box-shadow: 0 0 20px var(--primary-glow);
}
.platform-card--single {
    /* same size, flexbox auto-centers it */
}

.platform-instructions { animation: page-in 0.3s ease-out; }
.platform-instructions h3 {
    font-family: var(--font); font-size: 1.3rem;
    margin: 20px 0 16px; font-weight: 700;
}
.instruction-step { display: flex; gap: 14px; margin-bottom: 16px; align-items: flex-start; }
.instruction-step__num {
    flex-shrink: 0; width: 32px; height: 32px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0, 229, 204, 0.1); color: var(--primary);
    border-radius: 50%; font-size: 0.82rem; font-weight: 700;
    font-family: var(--font);
}
.instruction-step__text { font-size: 0.9rem; line-height: 1.5; color: var(--text); padding-top: 4px; }
.instruction-step__text a { color: var(--primary); text-decoration: none; }
.instruction-step__text a:hover { text-decoration: underline; }


/* ===================================================
   PLANS / PRICING
   =================================================== */
.plans-grid {
    display: flex; flex-direction: column; gap: 14px;
}

.plan-card { padding: 24px 20px; position: relative; transition: all 0.2s; }

.plan-card__header {
    display: flex; justify-content: space-between; align-items: center;
    margin-bottom: 2px;
}
.plan-card__name { font-family: var(--font); font-size: 1.05rem; font-weight: 700; }
.plan-card__days { font-size: 0.82rem; color: var(--text-secondary); font-weight: 500; }

.plan-card__price-row {
    display: flex; align-items: baseline; gap: 10px; margin: 14px 0 18px;
}
.plan-card__price {
    font-family: var(--font); font-size: 2rem; font-weight: 800; color: var(--text);
}
.plan-card__price--free { color: var(--success); font-size: 1.6rem; }
.plan-card__original {
    font-size: 0.9rem; color: var(--text-muted);
    text-decoration: line-through;
}
.plan-card__discounted {
    font-family: var(--font); font-size: 2rem; font-weight: 800; color: var(--primary);
}
.plan-card__currency { font-size: 1rem; color: var(--text-secondary); font-weight: 400; }

.plan-card .btn { width: 100%; }

.plan-card--free { border-color: rgba(52, 211, 153, 0.2); }
.plan-card--featured {
    border-color: rgba(123, 97, 255, 0.4);
    box-shadow: 0 0 24px var(--secondary-glow);
    background: rgba(123, 97, 255, 0.06);
}
.plan-card--featured .plan-card__name { color: var(--secondary); }

.discount-tag {
    display: inline-flex; align-items: center;
    padding: 3px 10px; font-size: 0.7rem; font-weight: 700;
    background: rgba(0, 229, 204, 0.12); color: var(--primary);
    border-radius: var(--radius-pill); font-family: var(--font);
}

.popular-tag {
    display: inline-flex; padding: 3px 10px; font-size: 0.7rem; font-weight: 700;
    background: rgba(123, 97, 255, 0.15); color: var(--secondary);
    border-radius: var(--radius-pill); font-family: var(--font);
}


/* ===================================================
   REFERRAL
   =================================================== */
.ref-stats-grid {
    display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 20px;
}
.ref-stat {
    background: var(--surface);
    backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius); padding: 18px;
}
.ref-stat__header {
    display: flex; justify-content: space-between; align-items: center; margin-bottom: 6px;
}
.ref-stat__icon { color: var(--text-muted); width: 16px; height: 16px; }
.ref-stat--balance { border-color: rgba(0, 229, 204, 0.2); }
.ref-stat--balance .card-value--big { color: var(--primary); }

.ref-link-card {
    background: var(--surface);
    backdrop-filter: var(--glass-blur); -webkit-backdrop-filter: var(--glass-blur);
    border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px; margin-bottom: 20px;
}
.ref-actions { margin-top: 14px; }
.ref-actions .btn { width: 100%; }

/* How it works */
.how-it-works {
    background: var(--surface); border: 1px solid var(--border);
    border-radius: var(--radius); padding: 20px;
}
.how-it-works__title {
    font-family: var(--font); font-size: 0.95rem; font-weight: 700;
    margin-bottom: 16px;
}
.how-it-works__grid {
    display: flex; flex-direction: column; gap: 16px;
}
.how-it-works__step {
    display: flex; align-items: flex-start; gap: 14px;
}
.how-it-works__num {
    width: 32px; height: 32px; border-radius: 50%; flex-shrink: 0;
    background: rgba(0, 229, 204, 0.1); color: var(--primary);
    display: flex; align-items: center; justify-content: center;
    font-weight: 700; font-size: 0.82rem; font-family: var(--font);
}
.how-it-works__text { padding-top: 4px; }
.how-it-works__step-title {
    font-family: var(--font); font-size: 0.88rem; font-weight: 600;
    color: var(--text); margin-bottom: 2px;
}
.how-it-works__step-desc {
    font-size: 0.78rem; color: var(--text-secondary); line-height: 1.4;
}


/* ===================================================
   PAYMENT CONFIRM MODAL
   =================================================== */
.modal-overlay {
    position: fixed; inset: 0; z-index: 200;
    background: rgba(0, 0, 0, 0.65);
    backdrop-filter: blur(4px); -webkit-backdrop-filter: blur(4px);
    display: flex; align-items: flex-end; justify-content: center;
    padding: 0;
    animation: modal-fade-in 0.2s ease;
}
@keyframes modal-fade-in { 0% { opacity: 0; } 100% { opacity: 1; } }

.modal-card {
    background: var(--surface-solid); border: 1px solid var(--border);
    border-radius: var(--radius) var(--radius) 0 0;
    padding: 28px 24px calc(24px + env(safe-area-inset-bottom));
    width: 100%; max-width: 600px;
    animation: modal-slide-up 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
@keyframes modal-slide-up {
    0% { transform: translateY(100%); }
    100% { transform: translateY(0); }
}
.modal-card__title {
    font-family: var(--font); font-size: 1.1rem; font-weight: 700;
    margin-bottom: 6px;
}
.modal-card__text {
    color: var(--text-secondary); font-size: 0.9rem; margin-bottom: 20px;
}
.modal-card__price {
    font-family: var(--font); font-size: 1.6rem; font-weight: 800;
    color: var(--primary); margin-bottom: 24px;
}
.modal-card__actions { display: flex; gap: 12px; }
.modal-card__actions .btn { flex: 1; }

/* ===================================================
   REGISTRATION + HEADLESS STATES
   =================================================== */
.btn--register { margin-top: 12px; }

.register-panel {
    margin-top: 14px;
    padding: 16px;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}
.register-panel__title {
    font-family: var(--font);
    font-size: 0.9rem;
    font-weight: 700;
    margin-bottom: 4px;
}
.register-panel__text {
    color: var(--text-secondary);
    font-size: 0.8rem;
    line-height: 1.45;
    margin-bottom: 12px;
}
.turnstile-box {
    min-height: 66px;
    border: 1px dashed rgba(255, 255, 255, 0.14);
    border-radius: var(--radius-sm);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 8px;
}

.register-msg {
    margin-top: 10px;
    padding: 10px 12px;
    border-radius: var(--radius-sm);
    font-size: 0.82rem;
    line-height: 1.4;
}
.register-msg--info {
    color: var(--text-secondary);
    border: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.03);
}
.register-msg--error {
    color: var(--error);
    border: 1px solid rgba(255, 68, 102, 0.2);
    background: var(--error-bg);
}
.register-msg--success {
    color: var(--success);
    border: 1px solid rgba(52, 211, 153, 0.2);
    background: var(--success-bg);
}

.feature-info {
    margin: 0 auto 18px;
    padding: 14px 16px;
    border-radius: var(--radius-sm);
    border: 1px solid rgba(245, 158, 11, 0.28);
    background: var(--warning-bg);
    color: #fbbf24;
    font-size: 0.88rem;
    line-height: 1.45;
}
.feature-info strong { color: #ffd271; }


/* ===================================================
   DESKTOP (768px+)
   =================================================== */
@media (min-width: 769px) {
    .topbar__inner { max-width: 960px; padding: 0 32px; }
    .topbar__nav { display: flex; gap: 4px; flex: 1; margin-left: 32px; }
    .topbar__logout span { display: inline; }
    .topbar__logout {
        padding: 8px 14px; gap: 6px;
        font-family: var(--font); font-size: 0.82rem;
    }
    .mobile-nav { display: none; }
    .content {
        max-width: 960px;
        padding: calc(var(--topbar-h) + 48px) 32px 48px;
    }

    .nav-link {
        display: flex; align-items: center; gap: 8px;
        padding: 8px 16px; font-size: 0.85rem; font-weight: 600;
        color: var(--text-secondary); text-decoration: none;
        border-radius: var(--radius-sm); transition: all 0.2s;
        font-family: var(--font);
    }
    .nav-link:hover { color: var(--text); background: rgba(255,255,255,0.05); }
    .nav-link.active { color: var(--primary); background: rgba(0, 229, 204, 0.08); }
    .nav-link svg { flex-shrink: 0; }

    .platform-grid { max-width: 560px; gap: 16px; }
    .platform-card { width: calc(33.33% - 11px); }
    .plans-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 20px; }
    .how-it-works__grid { flex-direction: row; gap: 20px; }
    .how-it-works__step { flex-direction: column; align-items: center; text-align: center; flex: 1; }
    .how-it-works__text { text-align: center; }

    .modal-overlay { align-items: center; padding: 24px; }
    .modal-card { border-radius: var(--radius); max-width: 400px; padding: 32px; }

    .ref-stats-grid { grid-template-columns: repeat(4, 1fr); }
}

/* ===================================================
   TELEGRAM LINK CARD
   =================================================== */
.card-link-tg {
    display: flex;
    align-items: center;
    gap: 16px;
    padding: 18px 20px;
    border: 1px solid rgba(42, 171, 238, 0.35);
    background: linear-gradient(135deg, rgba(42, 171, 238, 0.08), rgba(42, 171, 238, 0.02));
}
.card-link-tg__icon {
    flex-shrink: 0;
    width: 48px;
    height: 48px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    background: rgba(42, 171, 238, 0.18);
    color: #2AABEE;
}
.card-link-tg__text { flex: 1; min-width: 0; }
.card-link-tg__title { font-weight: 600; font-size: 15px; color: var(--text-primary); margin-bottom: 2px; }
.card-link-tg__desc { font-size: 13px; color: var(--text-secondary); line-height: 1.4; }
.card-link-tg .btn--sm { flex-shrink: 0; padding: 8px 16px; font-size: 13px; }
.card-link-tg .btn--sm svg { margin-right: 6px; }

@media (max-width: 600px) {
    .card-link-tg { flex-direction: column; align-items: flex-start; text-align: left; }
    .card-link-tg .btn--sm { width: 100%; justify-content: center; }
}

/* ===================================================
   GLOBAL TOAST
   =================================================== */
.global-toast {
    position: fixed;
    left: 50%;
    bottom: 32px;
    transform: translateX(-50%);
    max-width: 420px;
    padding: 14px 20px;
    border-radius: 12px;
    font-size: 14px;
    font-weight: 500;
    line-height: 1.4;
    z-index: 10000;
    box-shadow: 0 12px 32px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(12px);
    border: 1px solid;
    animation: toastIn 0.25s ease;
}
.global-toast--success {
    background: rgba(16, 185, 129, 0.15);
    border-color: rgba(16, 185, 129, 0.45);
    color: #34d399;
}
.global-toast--error {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.45);
    color: #f87171;
}
.global-toast--info {
    background: rgba(42, 171, 238, 0.15);
    border-color: rgba(42, 171, 238, 0.45);
    color: #7dd3fc;
}
@keyframes toastIn {
    from { opacity: 0; transform: translate(-50%, 12px); }
    to { opacity: 1; transform: translate(-50%, 0); }
}

@media (max-width: 420px) {
    .login-card { padding: 32px 20px 28px; }
    .btn--telegram.btn--full { font-size: 0.92rem; padding: 10px 14px; gap: 10px; }
}

@media (max-width: 600px) {
    .global-toast {
        left: 16px;
        right: 16px;
        bottom: 16px;
        transform: none;
        max-width: none;
    }
    @keyframes toastIn {
        from { opacity: 0; transform: translateY(12px); }
        to { opacity: 1; transform: translateY(0); }
    }
}
