/* ============================================================
   FlaskVPN — Global Styles
   Оформление по бренд-буку FLASK: тёплая бумага, глубокий синий,
   светло-голубые формы, оранжевые акценты, круглая типографика.

   Палитра (brand guide):
     #2457C5  глубокий синий   — основной цвет, логотип, акценты
     #73B9F5  светлый голубой  — фоновые формы, доп. элементы
     #FF7627  яркий оранжевый  — акценты, элементы графики
     #F7F1E8  тёплый кремовый  — фон, основа композиции
   ============================================================ */

:root {
    /* ---- Brand ---- */
    --brand-blue: #2457C5;
    --brand-blue-deep: #1B44A0;
    --brand-blue-ink: #16326F;
    --brand-sky: #73B9F5;
    --brand-sky-soft: #DCEDFD;
    --brand-orange: #FF7627;
    --brand-orange-deep: #E45E0E;
    --brand-orange-soft: #FFE6D5;
    --brand-cream: #F7F1E8;
    --brand-cream-deep: #EDE4D6;
    --brand-paper: #FFFCF6;
    --brand-ink: #17203A;

    /* ---- Semantic aliases (имена сохранены — их знают шаблоны и JS) ---- */
    --primary: var(--brand-blue);
    --primary-hover: var(--brand-blue-deep);
    --primary-gradient: linear-gradient(135deg, #3A72E4 0%, #2457C5 100%);
    --primary-glow: rgba(36, 87, 197, 0.18);

    /* Backgrounds */
    --bg-dark: var(--brand-cream-deep);
    --bg-body: var(--brand-cream);
    --bg-card: var(--brand-paper);
    --bg-card-hover: #FFFFFF;
    --bg-input: #FFFFFF;
    --bg-input-focus: #FFFFFF;
    --bg-glass: rgba(255, 252, 246, 0.86);

    /* Text */
    --text-primary: var(--brand-ink);
    --text-secondary: #5C6A88;
    --text-muted: #8D97AE;

    /* Borders */
    --border-subtle: rgba(36, 87, 197, 0.10);
    --border-input: rgba(36, 87, 197, 0.20);
    --border-card: rgba(36, 87, 197, 0.16);

    /* Radii — бренд использует щедрое скругление */
    --radius-sm: 10px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 28px;

    /* Shadows — «печатный» офсет вместо неонового свечения */
    --shadow-card: 0 2px 0 rgba(36, 87, 197, 0.07), 0 12px 28px rgba(23, 32, 58, 0.06);
    --shadow-pop: 4px 4px 0 rgba(36, 87, 197, 0.16);
    --shadow-pop-orange: 4px 4px 0 rgba(255, 118, 39, 0.28);
    --shadow-glow: 0 10px 26px rgba(36, 87, 197, 0.18);
    --shadow-input-focus: 0 0 0 3px rgba(115, 185, 245, 0.45);

    /* Transition */
    --transition: 0.18s ease;
    --transition-slow: 0.4s ease;

    /* Semantic colors */
    --success: #1C9A5B;
    --success-bg: rgba(28, 154, 91, 0.12);
    --danger: #DF3B22;
    --danger-bg: rgba(223, 59, 34, 0.12);
    --warning: var(--brand-orange);
    --warning-bg: rgba(255, 118, 39, 0.14);
    --info: var(--brand-blue);
    --info-bg: rgba(36, 87, 197, 0.12);

    /* Typography */
    --font-display: 'Nunito', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-body: 'Inter', 'Segoe UI', Roboto, Helvetica, Arial, sans-serif;
    --font-mono: 'JetBrains Mono', ui-monospace, SFMono-Regular, Menlo, monospace;

    /* Бумажное зерно из бренд-бука (SVG feTurbulence, без внешних файлов) */
    --grain: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='180' height='180'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.85' numOctaves='3' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
    /* Полутоновая заливка (halftone) для декоративных форм */
    --halftone: radial-gradient(circle at center, var(--brand-sky) 1.6px, transparent 1.7px);
}

/* ---- Base ---- */
html {
    background-color: var(--bg-body);
    scroll-behavior: smooth;
}

body {
    background-color: var(--bg-body);
    color: var(--text-primary);
    font-family: var(--font-body);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    -webkit-font-smoothing: antialiased;
}

/* Зерно бумаги поверх всей страницы */
body::before {
    content: '';
    position: fixed;
    inset: 0;
    z-index: 9998;
    pointer-events: none;
    background-image: var(--grain);
    opacity: 0.05;
    mix-blend-mode: multiply;
}

h1, h2, h3, h4, h5, h6,
.hero-title, .section-title, .tariff-price, .stat-value {
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.015em;
}

a { color: var(--primary); transition: color var(--transition); text-underline-offset: 3px; }
a:hover { color: var(--brand-orange); }

::selection { background: var(--brand-sky); color: var(--brand-blue-ink); }

/* ---- Брендовые декоративные утилиты ---- */

/* Подпись-надзаголовок: моно, капс, широкий трекинг (как в бренд-буке) */
.eyebrow {
    font-family: var(--font-mono);
    font-size: 0.7rem;
    font-weight: 500;
    letter-spacing: 0.18em;
    text-transform: uppercase;
    color: var(--brand-blue);
    opacity: 0.75;
    display: inline-block;
    margin-bottom: 0.75rem;
}
.eyebrow-orange { color: var(--brand-orange); opacity: 0.9; }

/* Оранжевый рукописный акцент под заголовком */
.brand-underline {
    position: relative;
    display: inline-block;
}
.brand-underline::after {
    content: '';
    position: absolute;
    left: 0;
    right: -4px;
    bottom: -0.12em;
    height: 0.34em;
    background: var(--brand-orange);
    opacity: 0.28;
    border-radius: 999px;
    transform: rotate(-0.8deg);
    z-index: -1;
}

/* Полутоновое пятно и голубая «клякса» — фоновая графика бренда */
.deco {
    position: absolute;
    pointer-events: none;
    z-index: 0;
}
.deco-blob {
    background: var(--brand-sky);
    opacity: 0.35;
    border-radius: 58% 42% 46% 54% / 52% 46% 54% 48%;
    filter: blur(2px);
}
.deco-halftone {
    background-image: var(--halftone);
    background-size: 10px 10px;
    opacity: 0.45;
    -webkit-mask-image: radial-gradient(circle at center, #000 45%, transparent 72%);
    mask-image: radial-gradient(circle at center, #000 45%, transparent 72%);
}
.deco-stroke {
    border: 2px solid var(--brand-orange);
    opacity: 0.35;
    border-radius: 50%;
}

/* Оранжевая «искра» из графических элементов бренда */
.sparkle {
    display: inline-block;
    width: 0.9em;
    height: 0.9em;
    background: var(--brand-orange);
    -webkit-mask: var(--sparkle-mask) center/contain no-repeat;
    mask: var(--sparkle-mask) center/contain no-repeat;
    --sparkle-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 1.5c.6 0 1 .4 1 1v6.1l4.3-4.3a1 1 0 1 1 1.4 1.4L14.4 10h6.1a1 1 0 1 1 0 2h-6.1l4.3 4.3a1 1 0 0 1-1.4 1.4L13 13.4v6.1a1 1 0 1 1-2 0v-6.1l-4.3 4.3a1 1 0 0 1-1.4-1.4L9.6 12H3.5a1 1 0 1 1 0-2h6.1L5.3 5.7a1 1 0 0 1 1.4-1.4L11 8.6V2.5c0-.6.4-1 1-1z'/%3E%3C/svg%3E");
    vertical-align: -0.1em;
}

/* ---- Navbar ---- */
.navbar {
    background: rgba(247, 241, 232, 0.88) !important;
    backdrop-filter: blur(18px);
    -webkit-backdrop-filter: blur(18px);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.7rem 0;
    transition: background var(--transition);
}

.navbar-brand img {
    width: 34px;
    height: 34px;
}

.navbar-brand span,
.brand-wordmark {
    font-family: var(--font-display);
    font-size: 1.32rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    color: var(--brand-blue);
    -webkit-text-fill-color: currentColor;
}
.brand-wordmark .vpn { color: var(--brand-orange); }

.nav-link {
    color: var(--text-secondary) !important;
    font-weight: 600;
    font-size: 0.93rem;
    transition: color var(--transition) !important;
    padding: 0.5rem 1rem !important;
}
.nav-link:hover { color: var(--brand-blue) !important; }

.logout-link { color: var(--text-secondary) !important; font-weight: 600; }
.logout-link:hover { color: var(--danger) !important; }

.navbar-toggler:focus { box-shadow: none; }

/* ---- Buttons ---- */
.btn-accent {
    background: var(--brand-blue);
    border: 2px solid var(--brand-blue);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
    letter-spacing: -0.01em;
    padding: 11px 26px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-pop);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
    position: relative;
    overflow: hidden;
}
.btn-accent:hover {
    background: var(--brand-blue-deep);
    border-color: var(--brand-blue-deep);
    color: #fff;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(36, 87, 197, 0.22);
}
.btn-accent:active {
    transform: translate(2px, 2px);
    box-shadow: 0 0 0 rgba(36, 87, 197, 0.18);
}

.btn-accent-outline {
    background: transparent;
    border: 2px solid var(--brand-blue);
    color: var(--brand-blue);
    font-family: var(--font-display);
    font-weight: 800;
    padding: 9px 24px;
    border-radius: var(--radius-md);
    transition: all var(--transition);
}
.btn-accent-outline:hover {
    background: var(--brand-blue);
    border-color: var(--brand-blue);
    color: #fff;
    transform: translateY(-2px);
}

/* Оранжевая кнопка — для редких «вау»-действий */
.btn-accent-orange {
    background: var(--brand-orange);
    border: 2px solid var(--brand-orange);
    color: #fff;
    font-family: var(--font-display);
    font-weight: 800;
    padding: 11px 26px;
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-pop-orange);
    transition: transform var(--transition), box-shadow var(--transition), background var(--transition);
}
.btn-accent-orange:hover {
    background: var(--brand-orange-deep);
    border-color: var(--brand-orange-deep);
    color: #fff;
    transform: translate(-2px, -2px);
    box-shadow: 6px 6px 0 rgba(255, 118, 39, 0.34);
}
.btn-accent-orange:active { transform: translate(2px, 2px); box-shadow: none; }

.btn-sm.btn-accent, .btn-sm.btn-accent-outline, .btn-sm.btn-accent-orange {
    padding: 6px 16px;
    font-size: 0.85rem;
    border-radius: var(--radius-sm);
    box-shadow: 3px 3px 0 rgba(36, 87, 197, 0.13);
}
.btn-sm.btn-accent-outline { box-shadow: none; }

/* Loading state for buttons */
.btn-loading {
    position: relative;
    pointer-events: none;
    opacity: 0.85;
}
.btn-loading .btn-text { visibility: hidden; }
.btn-loading::after {
    content: '';
    position: absolute;
    width: 20px; height: 20px;
    top: 50%; left: 50%;
    margin: -10px 0 0 -10px;
    border: 2px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    animation: spin 0.6s linear infinite;
}
.btn-accent-outline.btn-loading::after {
    border-color: rgba(36, 87, 197, 0.25);
    border-top-color: var(--brand-blue);
}

/* ---- Cards ---- */
.card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    box-shadow: var(--shadow-card);
    transition: transform var(--transition), box-shadow var(--transition);
}

.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(14px);
    -webkit-backdrop-filter: blur(14px);
    border: 1.5px solid var(--border-card);
    box-shadow: var(--shadow-pop), 0 18px 40px rgba(23, 32, 58, 0.08);
    border-radius: var(--radius-lg);
}
.glass-card .card-body { background: transparent; }

.section-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1.25rem;
    box-shadow: var(--shadow-card);
    position: relative;
}

/* Цветной корешок карточки — статус подписки */
.section-card.accent-success { border-left: 5px solid var(--success); }
.section-card.accent-danger  { border-left: 5px solid var(--danger); }
.section-card.accent-brand   { border-left: 5px solid var(--brand-orange); }

/* ---- Form Inputs ---- */
.form-input, .form-control, .form-select {
    background: var(--bg-input);
    border: 1.5px solid var(--border-input);
    color: var(--text-primary);
    border-radius: var(--radius-sm);
    padding: 11px 15px;
    font-size: 0.95rem;
    transition: all var(--transition);
    width: 100%;
}
.form-input:focus, .form-control:focus, .form-select:focus {
    background: var(--bg-input-focus);
    color: var(--text-primary);
    border-color: var(--brand-blue);
    box-shadow: var(--shadow-input-focus);
    outline: none;
}
.form-input::placeholder, .form-control::placeholder {
    color: var(--text-muted);
}

.input-icon-wrapper {
    position: relative;
}
.input-icon-wrapper .input-icon {
    position: absolute;
    left: 14px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: 0.9rem;
    transition: color var(--transition);
    z-index: 2;
}
.input-icon-wrapper .form-input,
.input-icon-wrapper .form-control {
    padding-left: 42px;
}
.input-icon-wrapper .form-input:focus ~ .input-icon,
.input-icon-wrapper:focus-within .input-icon {
    color: var(--brand-blue);
}

.form-label {
    color: var(--text-secondary);
    font-size: 0.82rem;
    font-weight: 600;
    margin-bottom: 0.4rem;
}

/* Поле ввода 6-значного кода из письма */
.code-input {
    text-align: center;
    font-family: var(--font-mono);
    font-size: 1.35rem;
    font-weight: 600;
    color: var(--brand-blue);
    letter-spacing: 0.4em;
    text-indent: 0.4em;
}
.code-input::placeholder { color: rgba(36, 87, 197, 0.25); }

/* ---- Alerts ---- */
.alert-custom {
    padding: 0.8rem 1rem;
    border-radius: var(--radius-sm);
    font-size: 0.9rem;
    text-align: center;
    margin-bottom: 1rem;
    font-weight: 500;
}

.alert-error {
    background: var(--danger-bg);
    border: 1.5px solid rgba(223, 59, 34, 0.35);
    color: #A82412;
}

.alert-success {
    background: var(--success-bg);
    border: 1.5px solid rgba(28, 154, 91, 0.35);
    color: #146B40;
}

.alert-info {
    background: var(--info-bg);
    border: 1.5px solid rgba(36, 87, 197, 0.32);
    color: var(--brand-blue-ink);
}

.alert-warning-custom {
    background: var(--warning-bg);
    border: 1.5px solid rgba(255, 118, 39, 0.4);
    color: #A84907;
}

/* ---- Tariff Cards ---- */
.tariff-card {
    transition: transform var(--transition), box-shadow var(--transition), border-color var(--transition);
    height: 100%;
    position: relative;
    overflow: hidden;
}
.tariff-card::after {
    /* светло-голубая форма в углу карточки — фоновый элемент бренда */
    content: '';
    position: absolute;
    right: -38px;
    bottom: -46px;
    width: 120px;
    height: 120px;
    background: var(--brand-sky);
    opacity: 0.16;
    border-radius: 58% 42% 46% 54% / 52% 46% 54% 48%;
    pointer-events: none;
    transition: opacity var(--transition), transform var(--transition);
}
.tariff-card:hover {
    transform: translateY(-6px);
    border-color: var(--brand-blue);
    box-shadow: var(--shadow-glow);
}
.tariff-card:hover::after { opacity: 0.28; transform: scale(1.12); }

.tariff-card.popular {
    border-color: var(--brand-blue);
    border-width: 2px;
    box-shadow: var(--shadow-pop), 0 14px 30px rgba(36, 87, 197, 0.12);
}
.tariff-card.popular::after { background: var(--brand-orange); opacity: 0.14; }

.tariff-price {
    font-family: var(--font-display);
    font-size: 2.6rem;
    font-weight: 900;
    color: var(--brand-blue);
    line-height: 1;
    letter-spacing: -0.03em;
}
.tariff-price .period {
    font-size: 0.9rem;
    color: var(--text-secondary);
    font-weight: 400;
}

.tariff-badge {
    background: var(--brand-orange);
    color: #fff;
    padding: 4px 13px;
    border-radius: 999px;
    font-family: var(--font-mono);
    font-size: 0.66rem;
    font-weight: 600;
    position: absolute;
    top: 12px;
    right: 12px;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    z-index: 2;
}

.tariff-features {
    list-style: none;
    padding: 0;
    margin: 1rem 0;
    position: relative;
    z-index: 1;
}
.tariff-features li {
    padding: 0.35rem 0;
    color: var(--text-secondary);
    font-size: 0.9rem;
}
.tariff-features li i {
    color: var(--brand-blue);
    margin-right: 8px;
    width: 16px;
}

/* ---- Status Badges ---- */
.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 12px;
    border-radius: 999px;
    font-size: 0.78rem;
    font-weight: 700;
    white-space: nowrap;
}
.status-badge-active {
    background: var(--success-bg);
    color: #157A47;
}
.status-badge-expired {
    background: var(--danger-bg);
    color: #B92C16;
}
.status-badge-pending {
    background: var(--warning-bg);
    color: #A84907;
}
.status-badge-muted {
    background: rgba(23, 32, 58, 0.07);
    color: var(--text-muted);
}
.status-badge-info {
    background: var(--info-bg);
    color: var(--brand-blue-ink);
}

/* Pulsing dot */
.pulse-dot {
    width: 8px; height: 8px;
    border-radius: 50%;
    display: inline-block;
}
.pulse-dot-green {
    background: var(--success);
    animation: pulse-green 2s infinite;
}
.pulse-dot-red {
    background: var(--danger);
    animation: pulse-red 2s infinite;
}

/* ---- Avatar Placeholder ---- */
.avatar-placeholder {
    width: 56px; height: 56px;
    border-radius: 18px;
    background: var(--brand-blue);
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-size: 1.4rem;
    font-weight: 900;
    color: #fff;
    flex-shrink: 0;
    box-shadow: 3px 3px 0 rgba(255, 118, 39, 0.35);
}

/* ---- Copy Field ---- */
.copy-field {
    display: flex;
    align-items: center;
    background: var(--bg-input);
    border: 1.5px solid var(--border-input);
    border-radius: var(--radius-sm);
    padding: 0;
    overflow: hidden;
}
.copy-field:focus-within {
    border-color: var(--brand-blue);
    box-shadow: var(--shadow-input-focus);
}
.copy-field input {
    flex: 1;
    min-width: 0;
    background: transparent;
    border: none;
    color: var(--text-primary);
    padding: 10px 14px;
    font-size: 0.85rem;
    font-family: var(--font-mono);
    outline: none;
}
.copy-field .copy-btn {
    background: transparent;
    border: none;
    border-left: 1.5px solid var(--border-input);
    color: var(--brand-blue);
    font-weight: 700;
    padding: 10px 14px;
    cursor: pointer;
    transition: color var(--transition), background var(--transition);
}
.copy-field .copy-btn:hover {
    color: #fff;
    background: var(--brand-blue);
}

/* ---- Stepper ---- */
.stepper {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}
.stepper-item {
    display: flex;
    gap: 1rem;
    align-items: flex-start;
}
.stepper-number {
    width: 36px; height: 36px;
    border-radius: 12px;
    background: var(--brand-blue);
    color: #fff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: var(--font-display);
    font-weight: 900;
    font-size: 0.95rem;
    flex-shrink: 0;
}
.stepper-item:nth-child(2) .stepper-number { background: var(--brand-sky); color: var(--brand-blue-ink); }
.stepper-item:nth-child(3) .stepper-number { background: var(--brand-orange); }
.stepper-content {
    flex: 1;
}
.stepper-content h6 {
    margin-bottom: 0.25rem;
    font-weight: 800;
}
.stepper-content p {
    margin: 0;
    font-size: 0.9rem;
    color: var(--text-secondary);
}

/* ---- Progress Bar ---- */
.progress-custom {
    height: 8px;
    background: rgba(36, 87, 197, 0.12);
    border-radius: 999px;
    overflow: hidden;
}
.progress-custom .bar {
    height: 100%;
    background: var(--primary-gradient);
    border-radius: 999px;
    transition: width var(--transition-slow);
}

/* ---- Password Strength ---- */
.password-strength {
    height: 5px;
    border-radius: 999px;
    background: rgba(36, 87, 197, 0.12);
    margin-top: 6px;
    overflow: hidden;
}
.password-strength .bar {
    height: 100%;
    border-radius: 999px;
    transition: width 0.3s, background 0.3s;
}
.password-strength .bar.weak { width: 33%; background: var(--danger); }
.password-strength .bar.medium { width: 66%; background: var(--brand-orange); }
.password-strength .bar.strong { width: 100%; background: var(--success); }

/* ---- Toast ---- */
.toast-container {
    position: fixed;
    top: 80px;
    right: 20px;
    z-index: 9999;
    display: flex;
    flex-direction: column;
    gap: 10px;
}

.toast-item {
    background: var(--bg-card);
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-sm);
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 0.9rem;
    font-weight: 500;
    box-shadow: var(--shadow-pop), 0 12px 28px rgba(23, 32, 58, 0.10);
    display: flex;
    align-items: center;
    gap: 10px;
    animation: slideInRight 0.3s ease;
    max-width: 360px;
}
.toast-item.success { border-left: 4px solid var(--success); }
.toast-item.error { border-left: 4px solid var(--danger); }
.toast-item.info { border-left: 4px solid var(--brand-blue); }
.toast-item.warning { border-left: 4px solid var(--brand-orange); }

.toast-item.fade-out { animation: slideOutRight 0.3s ease forwards; }

/* ---- Skeleton Loading ---- */
.skeleton {
    background: linear-gradient(90deg, var(--brand-cream-deep) 25%, #F8F3EC 50%, var(--brand-cream-deep) 75%);
    background-size: 200% 100%;
    animation: shimmer 1.5s infinite;
    border-radius: var(--radius-sm);
}
.skeleton-text { height: 14px; margin-bottom: 8px; }
.skeleton-title { height: 22px; width: 60%; margin-bottom: 12px; }
.skeleton-avatar { width: 56px; height: 56px; border-radius: 18px; }
.skeleton-card { height: 120px; }

/* ---- Hero ---- */
.hero-section {
    min-height: 82vh;
    display: flex;
    align-items: center;
    position: relative;
    overflow: hidden;
}
.hero-section > .container { position: relative; z-index: 1; }

.hero-title {
    font-family: var(--font-display);
    font-size: 3.4rem;
    font-weight: 900;
    line-height: 1.06;
    letter-spacing: -0.035em;
    margin-bottom: 1rem;
}
.hero-subtitle {
    font-size: 1.1rem;
    color: var(--text-secondary);
    max-width: 540px;
    line-height: 1.65;
}

.hero-stats {
    display: flex;
    gap: 2rem;
    margin-top: 2rem;
}
.hero-stat {
    text-align: left;
}
.hero-stat-value {
    font-family: var(--font-display);
    font-size: 1.7rem;
    font-weight: 900;
    color: var(--brand-blue);
    letter-spacing: -0.03em;
    line-height: 1;
}
.hero-stat:nth-child(2) .hero-stat-value { color: var(--brand-orange); }
.hero-stat-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: var(--text-muted);
    margin-top: 5px;
}

/* ---- Hero Visual SVG ---- */
.hero-visual {
    position: relative;
    width: 100%;
}
.hero-svg {
    width: 100%;
    height: auto;
    overflow: visible;
}

@keyframes hvRingOuter {
    0%, 100% { opacity: 0.22; }
    50%       { opacity: 0.5; }
}
@keyframes hvRingInner {
    0%, 100% { opacity: 0.35; }
    50%       { opacity: 0.7; }
}
@keyframes hvShield {
    0%, 100% { transform: translateY(0) rotate(0deg); }
    50%       { transform: translateY(-5px) rotate(-1.5deg); }
}
@keyframes hvNode {
    0%, 100% { opacity: 0.75; }
    50%       { opacity: 1;   }
}
@keyframes hvDashFlow {
    to { stroke-dashoffset: -18; }
}
@keyframes hvFloat {
    0%, 100% { transform: translateY(0px);  }
    50%       { transform: translateY(-14px); }
}
@keyframes hvSpark {
    0%, 100% { transform: rotate(0deg)  scale(1);    opacity: 0.85; }
    50%       { transform: rotate(35deg) scale(1.12); opacity: 1;    }
}

.hv-ring-outer { animation: hvRingOuter 4s ease-in-out infinite; }
.hv-ring-inner { animation: hvRingInner 4s ease-in-out infinite 0.9s; }
.hv-shield     { animation: hvShield 4s ease-in-out infinite; transform-origin: 200px 200px; }
.hv-spark      { animation: hvSpark 3.2s ease-in-out infinite; transform-box: fill-box; transform-origin: center; }
.hv-spark-2    { animation-delay: 1.1s; }

.hv-node       { animation: hvNode 2.6s ease-in-out infinite; }
.hv-n1         { animation-delay: 0s;    }
.hv-n2         { animation-delay: 0.5s;  }
.hv-n3         { animation-delay: 1.0s;  }
.hv-n4         { animation-delay: 1.5s;  }
.hv-n5         { animation-delay: 2.0s;  }

.hv-conn       { animation: hvDashFlow 1.6s linear infinite; }
.hv-c1         { animation-delay: 0s;    }
.hv-c2         { animation-delay: -0.5s; }
.hv-c3         { animation-delay: -1.0s; }
.hv-c4         { animation-delay: -0.3s; }
.hv-c5         { animation-delay: -0.8s; }

.hero-visual   { animation: hvFloat 5s ease-in-out infinite; }

/* ---- Features Grid ---- */
.feature-card {
    background: var(--bg-card);
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-lg);
    padding: 2rem 1.5rem;
    text-align: center;
    box-shadow: var(--shadow-card);
    transition: transform var(--transition), border-color var(--transition), box-shadow var(--transition);
}
.feature-card:hover {
    transform: translate(-2px, -4px);
    border-color: var(--brand-blue);
    box-shadow: var(--shadow-pop), 0 14px 30px rgba(36, 87, 197, 0.10);
}
.feature-icon {
    width: 58px; height: 58px;
    border-radius: 18px;
    background: var(--brand-sky-soft);
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 1rem;
    font-size: 1.4rem;
    color: var(--brand-blue);
}
.feature-card:nth-child(odd) .feature-icon { background: var(--brand-sky-soft); }
.feature-card h5 { font-weight: 800; margin-bottom: 0.5rem; }
.feature-card p { color: var(--text-secondary); font-size: 0.9rem; margin: 0; }

/* Вторая и четвёртая карточки — оранжевый акцент (ритм бренд-бука) */
.col:nth-child(even) .feature-icon,
[class*="col-"]:nth-child(even) .feature-icon {
    background: var(--brand-orange-soft);
    color: var(--brand-orange-deep);
}

/* ---- Section Titles ---- */
.section-title {
    font-family: var(--font-display);
    font-size: 2.25rem;
    font-weight: 900;
    letter-spacing: -0.03em;
    text-align: center;
    margin-bottom: 0.5rem;
}
.section-subtitle {
    color: var(--text-secondary);
    text-align: center;
    margin-bottom: 2.5rem;
    font-size: 1rem;
}
.section-head { text-align: center; margin-bottom: 2.5rem; }
.section-head .section-subtitle { margin-bottom: 0; }

/* ---- Footer ---- */
footer {
    margin-top: auto;
    background: var(--brand-blue);
    padding: 2.25rem 0;
    color: rgba(255, 255, 255, 0.72);
}
footer a { color: rgba(255, 255, 255, 0.8); }
footer a:hover { color: var(--brand-orange); }
footer .brand-wordmark { color: #fff; }
footer .brand-wordmark .vpn { color: var(--brand-sky); }
footer .footer-tagline {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: rgba(255, 255, 255, 0.6);
}

/* ---- Data table ---- */
.data-table {
    width: 100%;
    border-collapse: collapse;
}
.data-table th {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    text-transform: uppercase;
    letter-spacing: 0.12em;
    color: var(--text-muted);
    padding: 0.75rem;
    border-bottom: 1.5px solid var(--border-subtle);
    font-weight: 500;
}
.data-table td {
    padding: 0.75rem;
    font-size: 0.9rem;
    border-bottom: 1px solid var(--border-subtle);
    color: var(--text-secondary);
}
.data-table tr:hover td {
    background: rgba(115, 185, 245, 0.10);
}

/* ---- Stat Value ---- */
.stat-value {
    font-family: var(--font-display);
    font-size: 1.9rem;
    font-weight: 900;
    color: var(--text-primary);
    letter-spacing: -0.03em;
}
.stat-label {
    font-family: var(--font-mono);
    font-size: 0.68rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.12em;
}

/* ---- Utility: text colors ---- */
.text-gray { color: var(--text-secondary) !important; }
.text-accent { color: var(--brand-blue) !important; }
.text-orange { color: var(--brand-orange) !important; }
.text-success-custom { color: var(--success) !important; }
.text-danger-custom { color: var(--danger) !important; }

/* Bootstrap-утилиты, которые используются в шаблонах — под палитру бренда */
.text-primary { color: var(--brand-blue) !important; }
.text-success { color: var(--success) !important; }
.text-danger  { color: var(--danger) !important; }
.bg-cream     { background: var(--brand-cream) !important; }
.bg-sky-soft  { background: var(--brand-sky-soft) !important; }

/* Блок-выделение «на бумаге» (пунктирная рамка бренд-бука) */
.panel-dashed {
    border: 2px dashed rgba(36, 87, 197, 0.32);
    border-radius: var(--radius-md);
    background: rgba(115, 185, 245, 0.10);
}
.panel-outlined {
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-md);
    background: rgba(255, 252, 246, 0.7);
}

/* ---- Bootstrap: модалки/селекты под светлую тему ---- */
.modal-content {
    background: var(--bg-card);
    border: 1.5px solid var(--border-card);
    border-radius: var(--radius-lg);
    box-shadow: 0 24px 60px rgba(23, 32, 58, 0.18);
}
.modal-header, .modal-footer { border-color: var(--border-subtle); }
.modal-title { font-family: var(--font-display); font-weight: 900; }
hr { border-color: var(--border-subtle); opacity: 1; }

/* ============================================================
   Animations
   ============================================================ */

@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

@keyframes fadeIn {
    from { opacity: 0; }
    to { opacity: 1; }
}

@keyframes slideInRight {
    from { opacity: 0; transform: translateX(100px); }
    to { opacity: 1; transform: translateX(0); }
}

@keyframes slideOutRight {
    from { opacity: 1; transform: translateX(0); }
    to { opacity: 0; transform: translateX(100px); }
}

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

@keyframes shimmer {
    0% { background-position: 200% 0; }
    100% { background-position: -200% 0; }
}

@keyframes pulse-green {
    0%, 100% { box-shadow: 0 0 0 0 rgba(28, 154, 91, 0.45); }
    50% { box-shadow: 0 0 0 6px rgba(28, 154, 91, 0); }
}

@keyframes pulse-red {
    0%, 100% { box-shadow: 0 0 0 0 rgba(223, 59, 34, 0.45); }
    50% { box-shadow: 0 0 0 6px rgba(223, 59, 34, 0); }
}

@keyframes pulseGlow {
    0%, 100% { box-shadow: 0 0 0 0 rgba(36, 87, 197, 0.25); }
    50% { box-shadow: 0 0 0 10px rgba(36, 87, 197, 0); }
}

/* Page load animation */
.animate-in {
    animation: fadeInUp 0.5s ease forwards;
    opacity: 0;
}
.animate-in-delay-1 { animation-delay: 0.1s; }
.animate-in-delay-2 { animation-delay: 0.2s; }
.animate-in-delay-3 { animation-delay: 0.3s; }
.animate-in-delay-4 { animation-delay: 0.4s; }

/* ============================================================
   Responsive
   ============================================================ */

@media (max-width: 768px) {
    .hero-title { font-size: 2.4rem; }
    .hero-subtitle { font-size: 1rem; }
    .hero-stats { gap: 1.25rem; }
    .tariff-price { font-size: 2.1rem; }
    .section-title { font-size: 1.75rem; }
    .stat-value { font-size: 1.5rem; }

    .glass-container {
        padding-left: 12px;
        padding-right: 12px;
    }

    .toast-container {
        right: 10px;
        left: 10px;
    }
    .toast-item { max-width: 100%; }

    .deco { display: none; }
}

@media (max-width: 576px) {
    .hero-title { font-size: 2rem; }
    .hero-stats { flex-direction: column; gap: 0.75rem; align-items: flex-start; }

    /* Larger touch targets on mobile */
    .btn-accent, .btn-accent-outline, .btn-accent-orange { padding: 13px 22px; min-height: 48px; }
    .form-input, .form-control { padding: 13px 15px; min-height: 48px; }
    .nav-link { padding: 0.75rem 1rem !important; }
}

@media (prefers-reduced-motion: reduce) {
    .hero-visual, .hv-shield, .hv-spark, .hv-conn, .hv-node,
    .hv-ring-outer, .hv-ring-inner, .pulse-dot { animation: none !important; }
    .animate-in { animation-duration: 0.01s; opacity: 1; }
}

/* ---- Hover effect utility ---- */
.hover-effect { transition: color var(--transition); }
.hover-effect:hover { color: var(--brand-orange) !important; }
