:root {
    --primary: #0066ff;
    --primary-rgb: 0, 102, 255;
    --primary-light: #00d4ff;
    --primary-dark: #0044cc;
    --secondary: #1a1f36;
    --background: #0a0e1a;
    --surface: #151b2e;
    --surface-light: #1f2740;
    --text: #ffffff;
    --text-secondary: #8b92b0;
    --success: #00ff88;
    --warning: #ffaa00;
    --danger: #ff4444;
    --border: rgba(255, 255, 255, 0.1);
    --shadow: rgba(0, 102, 255, 0.3);
    --glow: rgba(0, 212, 255, 0.5);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    background: linear-gradient(135deg, var(--background) 0%, #0d1220 50%, var(--background) 100%);
    background-attachment: fixed;
    color: var(--text);
    line-height: 1.6;
    scroll-behavior: smooth;
    position: relative;
    overflow-x: hidden;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background:
        radial-gradient(circle at 20% 30%, rgba(0, 102, 255, 0.1) 0%, transparent 50%),
        radial-gradient(circle at 80% 70%, rgba(0, 212, 255, 0.08) 0%, transparent 50%),
        radial-gradient(circle at 50% 50%, rgba(0, 153, 255, 0.05) 0%, transparent 70%);
    pointer-events: none;
    z-index: 0;
    animation: backgroundPulse 15s ease-in-out infinite;
}

@keyframes backgroundPulse {
    0%, 100% { opacity: 0.5; }
    50% { opacity: 1; }
}

.dashboard-container {
    position: relative;
    z-index: 1;
}

/* Улучшенный скроллбар */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    box-shadow: 0 0 10px var(--primary-light);
}

/* Login Page */
.login-page {
    min-height: 100vh;
    display: flex;
    align-items: center;
    justify-content: center;
    overflow: hidden;
    position: relative;
}

.login-container {
    position: relative;
    width: 100%;
    max-width: 480px;
    padding: 20px;
    z-index: 10;
}

.login-box {
    background: linear-gradient(135deg, rgba(21, 27, 46, 0.95) 0%, rgba(15, 20, 35, 0.98) 100%);
    border-radius: 24px;
    padding: 50px 45px;
    box-shadow:
        0 25px 70px rgba(0, 0, 0, 0.6),
        0 0 0 1px rgba(0, 212, 255, 0.1),
        inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(0, 212, 255, 0.2);
    position: relative;
    z-index: 10;
    backdrop-filter: blur(20px);
    animation: loginBoxAppear 0.8s cubic-bezier(0.4, 0, 0.2, 1);
}

@keyframes loginBoxAppear {
    from {
        opacity: 0;
        transform: translateY(30px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.login-box::before {
    /* Светящаяся полоска сверху карточки входа убрана по просьбе */
    display: none;
}

.logo-container {
    text-align: center;
    margin-bottom: 45px;
    animation: fadeInDown 0.8s ease-out 0.2s backwards;
}

@keyframes fadeInDown {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.logo-circle {
    width: 110px;
    height: 110px;
    margin: 0 auto 25px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--surface-light), var(--surface));
    border-radius: 50%;
    box-shadow:
        0 0 40px var(--glow),
        0 8px 30px rgba(0, 0, 0, 0.4),
        inset 0 2px 10px rgba(0, 212, 255, 0.2);
    animation: logoFloat 4s ease-in-out infinite;
    position: relative;
}

@keyframes logoFloat {
    0%, 100% {
        transform: translateY(0px) rotate(0deg);
        box-shadow: 0 0 40px var(--glow), 0 8px 30px rgba(0, 0, 0, 0.4);
    }
    50% {
        transform: translateY(-10px) rotate(5deg);
        box-shadow: 0 0 60px var(--glow), 0 15px 40px rgba(0, 0, 0, 0.5);
    }
}

.logo-circle::before {
    content: '';
    position: absolute;
    inset: -3px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    opacity: 0.3;
    filter: blur(10px);
    animation: rotate 8s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.logo-container h1 {
    font-size: 32px;
    margin-bottom: 12px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    font-weight: 800;
    letter-spacing: -0.5px;
    text-shadow: 0 0 30px rgba(0, 212, 255, 0.3);
}

.subtitle {
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 500;
    letter-spacing: 0.3px;
}

.login-form {
    margin-top: 35px;
    animation: fadeInUp 0.8s ease-out 0.4s backwards;
}

.form-group {
    margin-bottom: 28px;
}

.form-group label {
    display: block;
    margin-bottom: 10px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    letter-spacing: 0.3px;
    text-transform: uppercase;
    opacity: 0.9;
}

/* Target audience cards */
.target-card {
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 14px;
    padding: 16px 14px;
    cursor: pointer;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}
.target-card::before {
    content: '';
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: opacity 0.25s ease;
}
.target-card:hover { border-color: var(--primary); transform: translateY(-1px); box-shadow: 0 4px 16px rgba(99, 102, 241, 0.1); }
.target-card.selected { border-color: var(--primary); box-shadow: 0 0 0 2px var(--primary), 0 4px 20px rgba(99, 102, 241, 0.15); }
.target-card.selected::before { opacity: 0.08; }
.target-card .target-icon { 
    position: relative; z-index: 1; width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    background: var(--surface); border-radius: 10px; margin-bottom: 10px;
    color: var(--primary);
    transition: all 0.25s ease;
}
.target-card.selected .target-icon {
    background: var(--primary); color: #fff;
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
    transform: scale(1.05);
}
.target-card .target-label {
    position: relative; z-index: 1;
    font-size: 14px; font-weight: 600; color: var(--text);
    margin-bottom: 4px;
}
.target-card .target-desc {
    position: relative; z-index: 1;
    font-size: 11px; color: var(--text-secondary);
    opacity: 0.8; line-height: 1.3;
}

.input-wrapper {
    position: relative;
    transition: all 0.3s ease;
}

.input-icon {
    position: absolute;
    left: 18px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-secondary);
    pointer-events: none;
    z-index: 2;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

/* Анимация иконок при фокусе.
   Иконка стоит ПЕРЕД <input>, поэтому комбинатор ~ её не выбирает —
   используем :focus-within у обёртки и :has() для заполненного поля.
   Цвет оставляем нейтральным (без голубого), меняется только размер/сдвиг. */
.input-wrapper:focus-within .input-icon,
.input-wrapper:has(input:not(:placeholder-shown)) .input-icon {
    color: var(--text-secondary);
    transform: translateY(-50%) scale(1.1);
}

/* При фокусе поле приподнимается на 2px — двигаем иконки вместе с ним */
.input-wrapper:focus-within .input-icon {
    transform: translateY(calc(-50% - 2px)) scale(1.1);
}
.input-wrapper:focus-within .password-toggle {
    transform: translateY(calc(-50% - 2px));
}
/* У caps-индикатора есть анимация появления (scale в transform), поэтому
   подъём на 2px делаем через top, чтобы transform не конфликтовал. */
.input-wrapper:focus-within .caps-indicator {
    top: calc(50% - 2px);
}

/* Специальные анимации для иконок */
.user-icon {
    animation: iconBounce 0.6s ease-out 0.6s backwards;
}

.lock-icon {
    animation: iconBounce 0.6s ease-out 0.7s backwards;
}

@keyframes iconBounce {
    0% {
        opacity: 0;
        transform: translateY(-50%) scale(0);
    }
    50% {
        transform: translateY(-50%) scale(1.2);
    }
    100% {
        opacity: 1;
        transform: translateY(-50%) scale(1);
    }
}

.input-wrapper input {
    width: 100%;
    padding: 17px 20px 17px 52px;
    background: linear-gradient(135deg, var(--surface-light), var(--surface));
    border: 2px solid var(--border);
    border-radius: 14px;
    color: var(--text);
    font-size: 15px;
    font-weight: 500;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
}

.input-wrapper input::placeholder {
    color: var(--text-secondary);
    opacity: 0.6;
    transition: opacity 0.3s ease;
}

.input-wrapper input:focus::placeholder {
    opacity: 0.3;
}

.input-wrapper input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--surface);
    box-shadow:
        0 0 0 4px rgba(0, 102, 255, 0.1),
        0 8px 25px rgba(0, 102, 255, 0.3),
        inset 0 1px 3px rgba(0, 212, 255, 0.1);
    transform: translateY(-2px);
}

.btn-primary {
    width: 100%;
    padding: 15px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border: none;
    border-radius: 12px;
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 10px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

/* Улучшенная кнопка входа */
.btn-login {
    margin-top: 10px;
    padding: 18px;
    border-radius: 16px;
    font-size: 17px;
    font-weight: 700;
    letter-spacing: 0.5px;
    box-shadow:
        0 8px 25px rgba(0, 102, 255, 0.4),
        0 0 0 1px rgba(0, 212, 255, 0.2),
        inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: buttonAppear 0.8s ease-out 0.8s backwards;
}

@keyframes buttonAppear {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.btn-text {
    position: relative;
    z-index: 2;
}

.btn-arrow {
    position: relative;
    z-index: 2;
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.25);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    z-index: 1;
}

.btn-primary:hover::before {
    width: 400px;
    height: 400px;
}

.btn-primary:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow:
        0 12px 35px rgba(0, 102, 255, 0.6),
        0 0 40px rgba(0, 212, 255, 0.5),
        inset 0 1px 0 rgba(255, 255, 255, 0.2);
}

.btn-primary:hover .btn-arrow {
    transform: translateX(8px) scale(1.1);
}

.btn-primary:active {
    transform: translateY(-2px) scale(0.98);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.5);
}

.btn-glow {
    animation: glow 2s ease-in-out infinite;
}

@keyframes glow {
    0%, 100% { box-shadow: 0 0 20px var(--shadow); }
    50% { box-shadow: 0 0 40px var(--shadow), 0 0 60px var(--glow); }
}

.error-message {
    background: linear-gradient(135deg, rgba(255, 68, 68, 0.15), rgba(255, 68, 68, 0.08));
    border: 2px solid var(--danger);
    border-radius: 12px;
    padding: 14px 18px;
    margin-bottom: 25px;
    display: flex;
    align-items: center;
    gap: 12px;
    color: var(--danger);
    font-size: 14px;
    font-weight: 600;
    box-shadow:
        0 4px 15px rgba(255, 68, 68, 0.2),
        inset 0 1px 0 rgba(255, 68, 68, 0.1);
    animation: errorShake 0.5s ease-out, errorFadeIn 0.4s ease-out;
}

@keyframes errorShake {
    0%, 100% { transform: translateX(0); }
    25% { transform: translateX(-10px); }
    75% { transform: translateX(10px); }
}

@keyframes errorFadeIn {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.error-message svg {
    flex-shrink: 0;
    filter: drop-shadow(0 0 8px var(--danger));
    animation: errorPulse 2s ease-in-out infinite;
}

@keyframes errorPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

.login-footer {
    margin-top: 35px;
    text-align: center;
    color: var(--text-secondary);
    font-size: 13px;
    position: relative;
    padding-top: 25px;
    animation: fadeIn 0.8s ease-out 1s backwards;
}

.login-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 60px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
    border-radius: 10px;
}

.login-footer p {
    margin: 0;
    font-weight: 500;
    letter-spacing: 0.3px;
    opacity: 0.8;
}

.footer-decoration {
    margin-top: 15px;
    display: flex;
    justify-content: center;
    gap: 8px;
}

.footer-decoration::before,
.footer-decoration::after {
    content: '';
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: var(--primary);
    opacity: 0.4;
    animation: decorationPulse 2s ease-in-out infinite;
}

.footer-decoration::after {
    animation-delay: 1s;
}

@keyframes decorationPulse {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.3);
    }
}

/* ===== Login enhancements (theme toggle / password / caps / loading) ===== */

/* Кнопка смены темы в углу */
.login-theme-toggle {
    position: fixed;
    top: 22px;
    right: 22px;
    z-index: 50;
    width: 44px;
    height: 44px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 12px;
    border: 1px solid rgba(0, 212, 255, 0.25);
    background: rgba(21, 27, 46, 0.7);
    color: var(--primary-light);
    cursor: pointer;
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.login-theme-toggle:hover {
    transform: translateY(-2px) rotate(15deg);
    border-color: var(--primary);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.35), 0 0 20px var(--glow);
}

.login-theme-toggle svg { transition: opacity 0.25s ease; }
/* В синей теме показываем «солнце» (предложение переключиться на seaglass) */
.login-theme-toggle .theme-icon-blue { display: none; }
.login-theme-toggle .theme-icon-seaglass { display: block; }
[data-theme="seaglass"] .login-theme-toggle .theme-icon-blue { display: block; }
[data-theme="seaglass"] .login-theme-toggle .theme-icon-seaglass { display: none; }

/* Кнопка показать/скрыть пароль */
#password { padding-right: 52px; }

.password-toggle {
    position: absolute;
    right: 8px;
    top: 50%;
    transform: translateY(-50%);
    width: 38px;
    height: 38px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    cursor: pointer;
    z-index: 3;
    transition: all 0.25s ease;
}

.password-toggle:hover {
    color: var(--primary-light);
    background: rgba(0, 212, 255, 0.08);
}

/* Индикатор Caps Lock — аккуратная иконка рядом с кнопкой показа пароля */
.caps-indicator {
    position: absolute;
    right: 46px;
    top: 50%;
    transform: translateY(-50%);
    width: 26px;
    height: 26px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 8px;
    color: var(--primary-light);
    background: rgba(0, 212, 255, 0.1);
    box-shadow: inset 0 0 0 1px rgba(0, 212, 255, 0.2);
    z-index: 3;
    cursor: default;
    transform-origin: center right;
    animation: capsPop 0.25s cubic-bezier(0.34, 1.56, 0.64, 1);
    transition: top 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}
.caps-indicator[hidden] { display: none; }

@keyframes capsPop {
    from { opacity: 0; transform: translateY(-50%) scale(0.6); }
    to   { opacity: 1; transform: translateY(-50%) scale(1); }
}

/* Состояние загрузки кнопки входа */
.btn-login.is-loading {
    pointer-events: none;
    opacity: 0.85;
}
.btn-login.is-loading .btn-text { visibility: hidden; }
.btn-login.is-loading .btn-arrow { display: none; }
.btn-login.is-loading::after {
    content: '';
    position: absolute;
    width: 22px;
    height: 22px;
    border: 2.5px solid rgba(255, 255, 255, 0.35);
    border-top-color: #fff;
    border-radius: 50%;
    z-index: 3;
    animation: spin 0.7s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Seaglass-подстройка для новых элементов */
[data-theme="seaglass"] .login-theme-toggle {
    background: rgba(8, 18, 40, 0.5);
    border-color: rgba(255, 255, 255, 0.12);
    color: var(--primary);
}
[data-theme="seaglass"] .password-toggle:hover { background: rgba(56, 189, 248, 0.1); }
[data-theme="seaglass"] .caps-indicator {
    color: var(--primary);
    background: rgba(56, 189, 248, 0.12);
    box-shadow: inset 0 0 0 1px rgba(56, 189, 248, 0.22);
}

/* Background Animation */
.background-animation {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 1;
    overflow: hidden;
    pointer-events: none;
}

.circle {
    position: absolute;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-light), transparent);
    opacity: 0.08;
    animation: float 20s ease-in-out infinite;
    filter: blur(40px);
}

.circle-1 {
    width: 400px;
    height: 400px;
    top: -200px;
    left: -200px;
    animation-delay: 0s;
    background: radial-gradient(circle, var(--primary-light), transparent);
}

.circle-2 {
    width: 500px;
    height: 500px;
    bottom: -250px;
    right: -250px;
    animation-delay: 5s;
    background: radial-gradient(circle, var(--primary), transparent);
}

.circle-3 {
    width: 350px;
    height: 350px;
    top: 50%;
    left: 50%;
    animation-delay: 10s;
    background: radial-gradient(circle, var(--primary-light), transparent);
}

.circle-4 {
    width: 300px;
    height: 300px;
    top: 20%;
    right: 10%;
    animation-delay: 15s;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.6), transparent);
}

@keyframes float {
    0%, 100% {
        transform: translate(0, 0) scale(1) rotate(0deg);
        opacity: 0.08;
    }
    25% {
        transform: translate(80px, -80px) scale(1.1) rotate(90deg);
        opacity: 0.12;
    }
    50% {
        transform: translate(40px, 60px) scale(0.9) rotate(180deg);
        opacity: 0.06;
    }
    75% {
        transform: translate(-60px, 40px) scale(1.05) rotate(270deg);
        opacity: 0.1;
    }
}

/* Dashboard */
.dashboard-container {
    display: flex;
    min-height: 100vh;
}

.sidebar {
    width: 280px;
    background: linear-gradient(180deg, var(--surface) 0%, var(--surface-light) 100%);
    border-right: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    position: fixed;
    height: 100vh;
    z-index: 100;
    box-shadow: 5px 0 30px rgba(0, 0, 0, 0.5);
}

.sidebar-header {
    padding: 30px 20px;
    border-bottom: 1px solid var(--border);
    position: relative;
}

.sidebar-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 20px;
    right: 20px;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

.logo {
    display: flex;
    align-items: center;
    gap: 13px;
}

.logo-mark {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 46px;
    height: 46px;
    border-radius: 13px;
    background: linear-gradient(135deg, var(--surface-light), var(--surface));
    box-shadow:
        0 6px 18px rgba(0, 0, 0, 0.35),
        inset 0 1px 0 rgba(255, 255, 255, 0.06);
    animation: logoGlow 3.5s ease-in-out infinite;
    flex-shrink: 0;
}

.logo-mark svg {
    filter: drop-shadow(0 2px 6px rgba(0, 102, 255, 0.45));
}

.logo-text {
    font-size: 18px;
    font-weight: 700;
    letter-spacing: 0.2px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    word-break: break-all;
    line-height: 1.3;
}

.logo-text b {
    font-weight: 800;
}

@keyframes logoGlow {
    0%, 100% { box-shadow: 0 6px 18px rgba(0,0,0,0.35), 0 0 0 1px rgba(0,212,255,0.10), inset 0 1px 0 rgba(255,255,255,0.06); }
    50% { box-shadow: 0 6px 22px rgba(0,0,0,0.4), 0 0 18px var(--glow), inset 0 1px 0 rgba(255,255,255,0.06); }
}

.sidebar-nav {
    flex: 1;
    padding: 20px 0;
    overflow-y: auto;
    max-height: calc(100vh - 120px);
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
    scroll-behavior: smooth;
}

.sidebar-nav::-webkit-scrollbar {
    width: 5px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
    border-radius: 4px;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
    border-radius: 6px;
    transition: all 0.4s ease;
    min-height: 40px;
}

.sidebar-nav::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
    box-shadow: 0 0 12px var(--primary-light);
}

.sidebar-nav::-webkit-scrollbar-thumb:active {
    background: var(--primary-light);
    box-shadow: 0 0 16px var(--primary-light);
}

.sidebar-nav {
    scrollbar-width: thin;
    scrollbar-color: var(--primary) transparent;
}

.nav-item {
    display: flex;
    align-items: center;
    gap: 15px;
    padding: 16px 20px;
    color: var(--text-secondary);
    text-decoration: none;
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    margin: 5px 15px;
    border-radius: 14px;
    position: relative;
    overflow: hidden;
    font-weight: 500;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 4px;
    height: 100%;
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
    transform: scaleY(0);
    transition: transform 0.3s ease;
}

.nav-item::after {
    content: '';
    position: absolute;
    left: -100%;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.15), transparent);
    transition: left 0.5s ease;
}

.nav-item:hover::before {
    transform: scaleY(1);
}

.nav-item:hover::after {
    left: 100%;
}

.nav-item:hover {
    background: rgba(0, 212, 255, 0.1);
    color: var(--primary-light);
    transform: translateX(8px);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}

.nav-item.active {
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.2), rgba(0, 212, 255, 0.1));
    color: var(--primary-light);
    font-weight: 700;
    box-shadow: 0 4px 20px rgba(0, 102, 255, 0.4), inset 0 0 20px rgba(0, 212, 255, 0.1);
}

.nav-item.active::before {
    transform: scaleY(1);
}

.nav-item svg {
    transition: all 0.3s ease;
}

.nav-item:hover svg,
.nav-item.active svg {
    filter: drop-shadow(0 0 8px var(--primary-light));
    transform: scale(1.1);
}

.nav-item::after {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, rgba(0, 102, 255, 0.15), rgba(0, 212, 255, 0.15));
    border-radius: 12px;
    opacity: 0;
    transition: opacity 0.4s ease;
    z-index: 0;
}

.nav-item:hover::before {
    left: 100%;
}

.nav-item:hover::after {
    opacity: 1;
}

.nav-item:hover {
    background: var(--surface-light);
    color: var(--text);
    transform: translateX(8px) scale(1.02);
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.2);
}

.nav-item:hover svg {
    transform: scale(1.15) rotate(5deg);
    filter: drop-shadow(0 0 8px var(--primary-light));
}

.nav-item svg {
    transition: all 0.4s cubic-bezier(0.34, 1.56, 0.64, 1);
    z-index: 1;
}

.nav-item span {
    position: relative;
    z-index: 1;
}

.nav-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: var(--text);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.5), 0 0 40px rgba(0, 212, 255, 0.3);
    transform: translateX(8px) scale(1.02);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 70%;
    background: var(--primary-light);
    border-radius: 0 4px 4px 0;
    box-shadow: 0 0 15px var(--primary-light);
    animation: pulse-glow 2s ease-in-out infinite;
}

@keyframes pulse-glow {
    0%, 100% {
        box-shadow: 0 0 15px var(--primary-light);
        opacity: 1;
    }
    50% {
        box-shadow: 0 0 25px var(--primary-light), 0 0 35px var(--primary-light);
        opacity: 0.8;
    }
}

.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 700;
    font-size: 18px;
}

.user-details {
    display: flex;
    flex-direction: column;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
}

.user-role {
    font-size: 12px;
    color: var(--text-secondary);
}

.btn-logout {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
}

.btn-logout:hover {
    background: var(--danger);
    color: var(--text);
    border-color: var(--danger);
}

.main-content {
    flex: 1;
    margin-left: 280px;
    padding: 40px;
    background: transparent;
    min-height: 100vh;
    position: relative;
}

.main-content::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 200px;
    background: linear-gradient(180deg, rgba(0, 102, 255, 0.05) 0%, transparent 100%);
    pointer-events: none;
    border-radius: 0 0 50% 50%;
}

#content-area {
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    will-change: transform, opacity, filter;
    position: relative;
    z-index: 1;
    animation: fadeInUp 0.6s ease-out;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(30px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.content-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 40px;
    padding-bottom: 20px;
    position: relative;
}

.content-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), transparent);
    border-radius: 10px;
    box-shadow: 0 0 15px var(--primary);
}

.content-header h1 {
    font-size: 36px;
    font-weight: 800;
    background: linear-gradient(135deg, var(--text), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    position: relative;
}

.content-header h1::before {
    content: '';
    position: absolute;
    left: -15px;
    top: 50%;
    transform: translateY(-50%);
    width: 5px;
    height: 70%;
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    box-shadow: 0 0 10px var(--primary);
}

.header-actions {
    display: flex;
    gap: 10px;
    align-items: center;
}

.auto-refresh-container {
    position: relative;
}

.auto-refresh-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    min-width: 150px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.menu-item {
    padding: 10px 15px;
    color: var(--text);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
}

.menu-item:hover {
    background: var(--primary);
    transform: translateX(5px);
}

.menu-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.theme-selector-container {
    position: relative;
}

.theme-menu {
    position: absolute;
    top: calc(100% + 10px);
    right: 0;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 8px;
    min-width: 180px;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.5);
    z-index: 1000;
    animation: slideDown 0.3s ease;
}

.theme-item {
    padding: 10px 15px;
    color: var(--text);
    cursor: pointer;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-size: 14px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.theme-item:hover {
    background: var(--surface-light);
    transform: translateX(5px);
}

.theme-item.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    box-shadow: 0 0 15px rgba(0, 212, 255, 0.3);
}

.theme-color {
    width: 24px;
    height: 24px;
    border-radius: 50%;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn-icon {
    width: 48px;
    height: 48px;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--surface), var(--surface-light));
    border: 2px solid var(--border);
    display: flex;
    align-items: center;
    justify-content: center;
    color: var(--text);
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-icon::before {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: 14px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: opacity 0.3s ease;
}

.btn-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.4);
    transform: translate(-50%, -50%);
    transition: width 0.5s ease, height 0.5s ease;
}

.btn-icon:hover::before {
    opacity: 1;
}

.btn-icon:hover::after {
    width: 120px;
    height: 120px;
}

.btn-icon:hover {
    border-color: var(--primary-light);
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.5), 0 0 20px rgba(0, 212, 255, 0.4);
    transform: translateY(-4px) rotate(8deg) scale(1.05);
}

.btn-icon:active {
    transform: translateY(-2px) rotate(0deg) scale(0.95);
}

.btn-icon svg {
    position: relative;
    z-index: 1;
    transition: all 0.3s ease;
}

.btn-icon:hover svg {
    filter: drop-shadow(0 0 10px rgba(255, 255, 255, 0.8));
    transform: scale(1.15);
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 25px;
    margin-bottom: 40px;
    animation: fadeInUp 0.8s ease-out;
}

.stats-grid > * {
    animation: scaleIn 0.5s ease-out backwards;
}

.stats-grid > *:nth-child(1) { animation-delay: 0.1s; }
.stats-grid > *:nth-child(2) { animation-delay: 0.2s; }
.stats-grid > *:nth-child(3) { animation-delay: 0.3s; }
.stats-grid > *:nth-child(4) { animation-delay: 0.4s; }

@keyframes scaleIn {
    from {
        opacity: 0;
        transform: scale(0.8);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

.stat-card {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-light) 100%);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.3);
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 5px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light), var(--primary));
    background-size: 200% 100%;
    animation: shimmer 3s linear infinite;
    box-shadow: 0 0 20px var(--primary-light);
}

@keyframes shimmer {
    0% { background-position: -200% 0; }
    100% { background-position: 200% 0; }
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, rgba(0, 212, 255, 0.15) 0%, transparent 60%);
    opacity: 0;
    transition: all 0.6s ease;
    transform: scale(0.5);
}

.stat-card:hover::after {
    opacity: 1;
    transform: scale(1);
}

.stat-card:hover {
    transform: translateY(-10px) scale(1.03);
    box-shadow: 0 20px 50px rgba(0, 102, 255, 0.5), 0 0 40px rgba(0, 212, 255, 0.3);
    border-color: var(--primary-light);
}

.stat-header {
    display: flex;
    align-items: center;
    justify-content: center;
    margin-bottom: 15px;
}

.stat-icon {
    width: 60px;
    height: 60px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    display: flex;
    align-items: center;
    justify-content: center;
    box-shadow: 0 8px 25px var(--shadow), 0 0 20px var(--glow);
    animation: iconFloat 3s ease-in-out infinite;
    position: relative;
}

@keyframes iconFloat {
    0%, 100% { transform: translateY(0px); }
    50% { transform: translateY(-5px); }
}

.stat-icon::before {
    content: '';
    position: absolute;
    inset: -2px;
    border-radius: 16px;
    background: linear-gradient(135deg, var(--primary-light), var(--primary));
    opacity: 0;
    transition: opacity 0.3s ease;
    z-index: -1;
}

.stat-card:hover .stat-icon::before {
    opacity: 0.5;
    animation: rotate 3s linear infinite;
}

@keyframes rotate {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

.stat-value {
    font-size: 36px;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    letter-spacing: -1px;
    text-align: center;
}

.stat-label {
    color: var(--text-secondary);
    font-size: 14px;
    text-align: center;
}

/* Server Cards */
.servers-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(350px, 1fr));
    gap: 20px;
}

.server-card {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 25px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    cursor: pointer;
    position: relative;
    overflow: hidden;
}

.server-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.1), transparent);
    transition: left 0.6s ease;
}

.server-card:hover::before {
    left: 100%;
}

.server-card:hover {
    transform: translateY(-8px) scale(1.02);
    box-shadow: 0 15px 40px rgba(0, 102, 255, 0.4), 0 0 30px rgba(0, 212, 255, 0.2);
    border-color: var(--primary);
}

.server-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 20px;
}

.server-name {
    font-size: 20px;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
}

.badge-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.server-stats {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 15px;
    margin-bottom: 20px;
}

.stat-item {
    display: flex;
    flex-direction: column;
    gap: 5px;
}

.stat-item-label {
    color: var(--text-secondary);
    font-size: 13px;
}

.stat-item-value {
    font-size: 18px;
    font-weight: 600;
}

.progress-bar {
    width: 100%;
    height: 8px;
    background: var(--surface-light);
    border-radius: 10px;
    overflow: hidden;
    margin-top: 15px;
    box-shadow: inset 0 2px 4px rgba(0, 0, 0, 0.3);
}

.progress-fill {
    height: 100%;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    transition: width 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 0 15px var(--glow);
    position: relative;
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(100%); }
}

.server-actions {
    display: flex;
    gap: 10px;
    margin-top: 20px;
}

.btn-secondary {
    flex: 1;
    padding: 12px 20px;
    background: linear-gradient(135deg, var(--surface-light), var(--surface));
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: radial-gradient(circle, var(--primary-light), var(--primary));
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
    opacity: 0.3;
}

.btn-secondary:hover::before {
    width: 400px;
    height: 400px;
}

.btn-secondary:hover {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-color: var(--primary-light);
    color: white;
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.5), 0 0 20px rgba(0, 212, 255, 0.3);
    transform: translateY(-3px) scale(1.02);
}

.btn-secondary:active {
    transform: translateY(-1px) scale(0.98);
}

/* Warning button (для перезагрузки) */
.btn-warning {
    flex: 1;
    padding: 12px;
    background: linear-gradient(135deg, #ff9500, #ffb800);
    border: 1px solid #ff9500;
    border-radius: 10px;
    color: white;
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-warning::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.5s, height 0.5s;
}

.btn-warning:hover::before {
    width: 300px;
    height: 300px;
}

.btn-warning:hover {
    background: linear-gradient(135deg, #ffb800, #ffd700);
    border-color: #ffb800;
    box-shadow: 0 5px 20px rgba(255, 149, 0, 0.4), 0 0 15px rgba(255, 184, 0, 0.3);
    transform: translateY(-2px);
}

/* Table */
.table-container {
    background: linear-gradient(135deg, var(--surface) 0%, var(--surface-light) 100%);
    border: 1px solid var(--border);
    border-radius: 20px;
    overflow: hidden;
    box-shadow: 0 8px 30px rgba(0, 0, 0, 0.4);
    transition: all 0.3s ease;
}

.table-container:hover {
    box-shadow: 0 12px 40px rgba(0, 102, 255, 0.3), 0 0 30px rgba(0, 212, 255, 0.2);
    border-color: var(--primary);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: linear-gradient(135deg, var(--surface-light), var(--surface));
    position: relative;
}

thead::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--primary), transparent);
}

th {
    padding: 18px 24px;
    text-align: left;
    font-weight: 700;
    color: var(--primary-light);
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 1px;
    position: relative;
}

td {
    padding: 18px 24px;
    border-top: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.3s ease;
    position: relative;
    vertical-align: middle;
}

tbody tr {
    transition: all 0.3s ease;
    position: relative;
}

tbody tr:hover {
    background: rgba(0, 212, 255, 0.05);
    transform: scale(1.01);
}

tbody tr:hover td {
    color: var(--text);
}

tr {
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

tr:hover {
    background: var(--surface-light);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 102, 255, 0.2);
}

/* Loading */
.loading {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 60px;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--border);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 1s linear infinite;
}

@keyframes spin {
    to { transform: rotate(360deg); }
}

/* Disabled state for navigation */
.nav-item.loading {
    pointer-events: none;
    opacity: 0.5;
}

/* Loading overlay */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(10, 14, 26, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    backdrop-filter: blur(5px);
}

.loading-overlay .spinner {
    width: 60px;
    height: 60px;
    border-width: 5px;
}

/* Responsive */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
    }

    .main-content {
        margin-left: 0;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    .servers-grid {
        grid-template-columns: 1fr;
    }
}

/* Form elements */
.form-group {
    margin-bottom: 20px;
}

.form-group label {
    display: block;
    margin-bottom: 8px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

textarea {
    width: 100%;
    padding: 15px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 15px;
    font-family: inherit;
    resize: vertical;
    transition: all 0.3s ease;
}

textarea:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 20px var(--shadow);
}

/* Badge */
.badge {
    display: inline-block;
    padding: 4px 12px;
    border-radius: 20px;
    font-size: 12px;
    font-weight: 600;
}

.badge-success {
    background: var(--success);
    color: var(--background);
}

.badge-warning {
    background: var(--warning);
    color: var(--background);
}

.badge-danger {
    background: var(--danger);
    color: var(--text);
}

/* Alert box */
.alert {
    padding: 15px 20px;
    border-radius: 12px;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    gap: 12px;
}

.alert-info {
    background: rgba(0, 102, 255, 0.1);
    border: 1px solid var(--primary);
    color: var(--primary-light);
}

.alert-warning {
    background: rgba(255, 170, 0, 0.1);
    border: 1px solid var(--warning);
    color: var(--warning);
}

.alert-danger {
    background: rgba(255, 68, 68, 0.1);
    border: 1px solid var(--danger);
    color: var(--danger);
}

/* Empty state */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-secondary);
}

.empty-state svg {
    margin-bottom: 20px;
    opacity: 0.5;
}

.empty-state h3 {
    margin-bottom: 10px;
    color: var(--text);
}

/* Modal overlay (for future use) */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 1000;
    backdrop-filter: blur(5px);
}

.modal {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 30px;
    max-width: 600px;
    width: 90%;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
    max-height: 80vh;
    overflow-y: auto;
}

/* Контейнер для прокручиваемого списка онлайн пользователей */
.online-users-scrollable {
    max-height: 400px !important;
    min-height: 200px;
    overflow-y: auto !important;
    overflow-x: hidden;
    border: 2px solid var(--primary);
    border-radius: 8px;
    padding: 12px;
    background: var(--surface-light);
    position: relative;
}

.online-users-scrollable::-webkit-scrollbar {
    width: 12px;
}

.online-users-scrollable::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 10px;
}

.online-users-scrollable::-webkit-scrollbar-thumb {
    background: var(--primary);
    border-radius: 10px;
}

.online-users-scrollable::-webkit-scrollbar-thumb:hover {
    background: var(--primary-light);
}

.modal-header {
    margin-bottom: 20px;
}

.modal-header h2 {
    font-size: 24px;
    margin: 0;
}

.modal-body {
    margin-bottom: 20px;
}

.modal-footer {
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

.modal-input {
    width: 100%;
    padding: 12px 15px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 10px;
    color: var(--text);
    font-size: 14px;
    transition: all 0.3s ease;
}

.modal-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(0, 102, 255, 0.3);
}

.modal-input::placeholder {
    color: var(--text-secondary);
}

/* Стили для таблицы истории */
.history-row:hover {
    background: var(--surface-light) !important;
    /* Гасим общие tr:hover/tbody tr:hover (scale + box-shadow) — из-за масштаба
       строки левый акцент-бар мерцал (появлялся и сразу пропадал). */
    transform: none !important;
    box-shadow: none !important;
}

.history-row td {
    transition: background-color 0.2s ease;
}

/* Левый акцент-бар на ховере, прижатый к самому краю строки (работает и при
   border-collapse, в отличие от box-shadow на самой строке).
   Постоянно отрисован, но прозрачен — на ховере плавно проявляется, без мерцания. */
.history-row td:first-child {
    position: relative;
}
.history-row td:first-child::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    bottom: 0;
    width: 3px;
    background: var(--primary-light);
    opacity: 0;
    transition: opacity 0.2s ease;
}
.history-row:hover td:first-child::before {
    opacity: 1;
}

/* Улучшенные кнопки фильтров */
.btn-secondary {
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
}

.btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.1);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.4);
}

.btn-secondary:active {
    transform: translateY(0);
}

/* Анимация для появления строк */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Мигающая зеленая точка для онлайн статуса */
@keyframes pulse-green {
    0%, 100% {
        opacity: 1;
        box-shadow: 0 0 0 0 rgba(0, 255, 136, 0.7);
    }
    50% {
        opacity: 0.3;
        box-shadow: 0 0 0 8px rgba(0, 255, 136, 0);
    }
}

.online-indicator {
    display: inline-block;
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse-green 2s ease-in-out infinite;
    margin-right: 6px;
    vertical-align: middle;
}

.online-indicator-large {
    width: 10px;
    height: 10px;
    margin-right: 8px;
}

/* Без entrance-анимации: при быстром перелистывании страниц строки
   перерисовываются и анимация перезапускалась с прозрачного состояния
   (мерцание «сначала тёмные, потом нормальные»). */

/* Улучшенные бейджи */
table tbody td span[style*="border-radius: 10px"] {
    transition: all 0.3s ease;
}

table tbody tr:hover td span[style*="border-radius: 10px"] {
    transform: scale(1.05);
    box-shadow: 0 4px 12px currentColor;
}

/* ============================================
   УЛУЧШЕННОЕ ОФОРМЛЕНИЕ И АНИМАЦИИ
   ============================================ */

/* Плавные анимации для уведомлений */
@keyframes slideIn {
    from {
        transform: translateX(400px);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

@keyframes slideOut {
    from {
        transform: translateX(0);
        opacity: 1;
    }
    to {
        transform: translateX(400px);
        opacity: 0;
    }
}

/* Улучшенные стили для навигации */
.nav-item {
    position: relative;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.nav-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 3px;
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
    transform: scaleY(0);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item:hover::before,
.nav-item.active::before {
    transform: scaleY(1);
}

.nav-item:hover {
    background: rgba(0, 102, 255, 0.1);
    transform: translateX(4px);
}

.nav-item.active {
    background: linear-gradient(90deg, rgba(0, 102, 255, 0.15), transparent);
}

/* Анимация для drag-handle */
.drag-handle,
.drag-handle-icon {
    transition: all 0.3s ease;
    opacity: 0.5;
}

.nav-item:hover .drag-handle,
.server-card:hover .drag-handle-icon {
    opacity: 1;
    transform: scale(1.2);
}

/* Анимация перетаскивания */
.nav-item[draggable="true"],
.server-card[draggable="true"] {
    cursor: move;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.nav-item[draggable="true"]:hover,
.server-card[draggable="true"]:hover {
    transform: scale(1.02);
    box-shadow: 0 8px 24px rgba(0, 102, 255, 0.3);
}

/* Эффект при перетаскивании */
.dragging {
    opacity: 0.5;
    transform: rotate(2deg) scale(1.05);
    box-shadow: 0 12px 32px rgba(0, 102, 255, 0.5);
}

/* Улучшенные карточки серверов */
.server-card {
    position: relative;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.server-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    transform: scaleX(0);
    transition: transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.server-card:hover::before {
    transform: scaleX(1);
}

.server-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 102, 255, 0.25);
    border-color: var(--primary);
}

/* Анимация для кнопок */
.btn-primary,
.btn-secondary,
.btn-icon {
    position: relative;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.btn-primary::before,
.btn-secondary::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.2);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:hover::before,
.btn-secondary:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary:hover,
.btn-secondary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 24px var(--shadow);
}

.btn-primary:active,
.btn-secondary:active {
    transform: translateY(0);
}

.btn-icon:hover {
    transform: rotate(15deg) scale(1.1);
    background: rgba(0, 102, 255, 0.1);
}

.btn-icon:active {
    transform: rotate(15deg) scale(0.95);
}

/* Анимация для таблиц */
table tbody tr {
    transition: all 0.3s ease;
}

table tbody tr:hover {
    background: rgba(0, 102, 255, 0.05);
    transform: scale(1.01);
    box-shadow: 0 4px 12px rgba(0, 102, 255, 0.1);
}

/* Улучшенные прогресс-бары */
.progress-fill {
    position: relative;
    transition: width 0.6s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
}

.progress-fill::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    bottom: 0;
    right: 0;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.3),
        transparent
    );
    animation: shimmer 2s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%);
    }
    100% {
        transform: translateX(100%);
    }
}

/* Улучшенная статистика */
.stat-item {
    transition: all 0.3s ease;
}

.stat-item:hover {
    transform: translateY(-2px);
}

.stat-item-value {
    transition: all 0.3s ease;
}

.stat-item:hover .stat-item-value {
    color: var(--primary-light);
    text-shadow: 0 0 10px var(--glow);
}

/* Плавное появление контента */
@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

#content-area > * {
    animation: fadeInUp 0.5s ease;
}

/* Улучшенный header */
.content-header {
    position: relative;
    transition: all 0.3s ease;
}

.content-header::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, var(--primary), transparent);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.content-header:hover::after {
    opacity: 1;
}

/* Анимация для badge */
.badge-primary {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% {
        box-shadow: 0 0 0 0 var(--shadow);
    }
    50% {
        box-shadow: 0 0 0 8px transparent;
    }
}

/* Улучшенные модальные окна */
.modal {
    animation: modalFadeIn 0.3s ease;
}

@keyframes modalFadeIn {
    from {
        opacity: 0;
        transform: scale(0.9);
    }
    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* Эффект свечения для активных элементов */
.nav-item.active,
.server-card:hover,
.btn-primary:hover {
    box-shadow: 0 0 20px var(--glow);
}

/* Плавная прокрутка */
* {
    scroll-behavior: smooth;
}

/* Улучшенный scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--surface);
    border-radius: 10px;
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--primary-light));
    border-radius: 10px;
    transition: all 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-light), var(--primary));
    box-shadow: 0 0 10px var(--glow);
}

/* Анимация для графиков */
.chart-bar {
    transition: all 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.chart-bar:hover {
    transform: scaleY(1.05);
    filter: brightness(1.2);
}

/* Эффект ripple для кликов */
@keyframes ripple {
    to {
        transform: scale(4);
        opacity: 0;
    }
}

/* Улучшенные тени */
.card,
.server-card,
.table-container {
    box-shadow: 
        0 4px 6px rgba(0, 0, 0, 0.1),
        0 1px 3px rgba(0, 0, 0, 0.08),
        0 0 0 1px var(--border);
    transition: box-shadow 0.3s ease;
}

.card:hover,
.server-card:hover,
.table-container:hover {
    box-shadow: 
        0 10px 20px rgba(0, 0, 0, 0.15),
        0 3px 6px rgba(0, 0, 0, 0.1),
        0 0 0 1px var(--primary);
}

/* Анимация загрузки */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }
    to {
        transform: rotate(360deg);
    }
}

.spinning {
    animation: spin 1s linear infinite;
}

/* Градиентный текст для заголовков */
h1, h2, h3 {
    background: linear-gradient(135deg, var(--text), var(--primary-light));
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Эффект hover для иконок */
svg {
    transition: all 0.3s ease;
}

.nav-item:hover svg,
.btn-icon:hover svg {
    transform: scale(1.1);
    filter: drop-shadow(0 0 8px var(--primary-light));
}

/* Улучшенные анимации появления */
@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(30px);
    }
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.8;
        transform: scale(1.05);
    }
}

/* Применяем анимации к элементам */
.stat-card {
    animation: fadeInUp 0.5s ease-out;
}

.stat-card:nth-child(1) { animation-delay: 0.1s; }
.stat-card:nth-child(2) { animation-delay: 0.2s; }
.stat-card:nth-child(3) { animation-delay: 0.3s; }
.stat-card:nth-child(4) { animation-delay: 0.4s; }

.server-card {
    animation: fadeInUp 0.5s ease-out;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.server-card:hover {
    transform: translateY(-5px) scale(1.02);
    box-shadow:
        0 20px 40px rgba(0, 0, 0, 0.3),
        0 0 20px var(--shadow),
        0 0 0 2px var(--primary);
}

/* Улучшенные кнопки с градиентом */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    position: relative;
    overflow: hidden;
    transition: all 0.3s ease;
}

.btn-primary::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-primary:hover::before {
    left: 100%;
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 25px var(--shadow);
}

.btn-primary:active {
    transform: translateY(0);
}

/* Улучшенные карточки статистики */
.stat-card {
    position: relative;
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: -50%;
    right: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--primary-light) 0%, transparent 70%);
    opacity: 0;
    transition: opacity 0.3s ease;
}

.stat-card:hover::before {
    opacity: 0.1;
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow:
        0 15px 35px rgba(0, 0, 0, 0.2),
        0 0 15px var(--shadow);
}

/* Анимация для таблиц */
table tbody tr {
    animation: fadeIn 0.3s ease-out;
    transition: all 0.2s ease;
}

table tbody tr:hover {
    background: var(--surface-light);
    transform: scale(1.01);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

/* Улучшенный модальный фон */
.modal-overlay {
    backdrop-filter: blur(10px);
    animation: fadeIn 0.3s ease-out;
}

.modal {
    animation: fadeInUp 0.3s ease-out;
}

/* Эффект свечения для активных элементов */
.nav-item.active {
    box-shadow:
        inset 3px 0 0 var(--primary),
        0 0 15px var(--shadow);
}

/* Улучшенные инпуты с фокусом */
input:focus,
textarea:focus,
select:focus {
    border-color: var(--primary);
    box-shadow:
        0 0 0 3px rgba(0, 102, 255, 0.1),
        0 0 15px var(--shadow);
    transform: scale(1.01);
}

/* Градиентные бордеры для карточек */
.card,
.server-card {
    position: relative;
    background: var(--surface);
}

.card::after,
.server-card::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: inherit;
    padding: 1px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity 0.3s ease;
    pointer-events: none;
}

.card:hover::after,
.server-card:hover::after {
    opacity: 1;
}

/* Анимация для графиков */
canvas {
    animation: fadeIn 0.5s ease-out;
}

/* Улучшенный header */
.content-header {
    animation: slideInRight 0.5s ease-out;
}

/* Эффект ripple для кнопок */
.btn-primary,
.btn-secondary,
.btn-icon {
    position: relative;
    overflow: hidden;
}

.btn-primary::after,
.btn-secondary::after,
.btn-icon::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn-primary:active::after,
.btn-secondary:active::after,
.btn-icon:active::after {
    width: 300px;
    height: 300px;
}

/* Плавная прокрутка */
html {
    scroll-behavior: smooth;
}

/* Улучшенные тени для текста */
.stat-value {
    text-shadow: 0 2px 10px var(--shadow);
}

/* Анимация загрузки данных */
@keyframes shimmer {
    0% {
        background-position: -1000px 0;
    }
    100% {
        background-position: 1000px 0;
    }
}

.loading-skeleton {
    background: linear-gradient(90deg, var(--surface) 0%, var(--surface-light) 50%, var(--surface) 100%);
    background-size: 1000px 100%;
    animation: shimmer 2s infinite;
}

.btn-icon:hover svg {
    filter: drop-shadow(0 0 8px var(--glow));
}

/* Стили для вкладок */
.tab-button {
    padding: 14px 28px;
    background: linear-gradient(135deg, var(--surface-light), var(--surface));
    border: 2px solid var(--border);
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    font-weight: 600;
    font-size: 15px;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
    border-radius: 12px 12px 0 0;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.tab-button::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(0, 212, 255, 0.2), transparent);
    transition: left 0.6s ease;
}

.tab-button:hover::before {
    left: 100%;
}

.tab-button:hover {
    background: linear-gradient(135deg, var(--surface), var(--surface-light));
    border-color: var(--primary);
    color: var(--primary-light);
    transform: translateY(-3px);
    box-shadow: 0 6px 20px rgba(0, 102, 255, 0.3);
}

.tab-button.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-color: var(--primary-light);
    border-bottom-color: var(--primary);
    color: white;
    box-shadow: 0 8px 25px rgba(0, 102, 255, 0.5), 0 0 20px rgba(0, 212, 255, 0.3);
    transform: translateY(-2px);
}

.tab-button.active::after {
    content: '';
    position: absolute;
    bottom: -3px;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary-light), var(--primary), var(--primary-light));
    box-shadow: 0 0 15px var(--primary-light);
}

/* Красивый tooltip для отображения времени последнего онлайн */
.custom-tooltip {
    position: fixed;
    background: linear-gradient(135deg, var(--surface), var(--surface-light));
    border: 2px solid var(--primary);
    border-radius: 12px;
    padding: 12px 16px;
    color: var(--text);
    font-size: 13px;
    font-weight: 500;
    box-shadow: 0 8px 32px rgba(0, 102, 255, 0.4), 0 0 0 1px var(--border);
    z-index: 10000;
    pointer-events: none;
    opacity: 0;
    transform: translateY(10px) scale(0.95);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    white-space: nowrap;
}

.custom-tooltip.show {
    opacity: 1;
    transform: translateY(0) scale(1);
}

.custom-tooltip::before {
    content: '';
    position: absolute;
    top: -6px;
    left: 50%;
    transform: translateX(-50%);
    width: 0;
    height: 0;
    border-left: 6px solid transparent;
    border-right: 6px solid transparent;
    border-bottom: 6px solid var(--primary);
}

.custom-tooltip .tooltip-email {
    display: block;
    color: var(--primary-light);
    font-weight: 600;
    margin-bottom: 4px;
    font-size: 14px;
}

.custom-tooltip .tooltip-time {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
}

.custom-tooltip .tooltip-status {
    display: inline-block;
    margin-left: 8px;
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.custom-tooltip .tooltip-status.online {
    background: rgba(0, 255, 136, 0.2);
    color: var(--success);
    border: 1px solid var(--success);
}

.custom-tooltip .tooltip-status.offline {
    background: rgba(139, 146, 176, 0.2);
    color: var(--text-secondary);
    border: 1px solid var(--text-secondary);
}

/* Стиль для количества рефералов с тултипом */
.referral-count-tooltip {
    cursor: pointer;
    color: var(--primary-light);
    font-weight: 600;
    text-decoration: underline;
    text-decoration-style: dotted;
    text-underline-offset: 3px;
    transition: all 0.2s ease;
}

.referral-count-tooltip:hover {
    color: var(--primary);
    text-decoration-style: solid;
}

/* Settings Page */
.settings-page {
    max-width: 900px;
    margin: 0 auto;
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.settings-section {
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 16px;
    overflow: hidden;
    transition: all 0.2s ease;
}

.settings-section:hover {
    border-color: rgba(0, 212, 255, 0.15);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.2);
}

.settings-section-header {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 18px 24px;
    background: var(--surface-light);
    border-bottom: 1px solid var(--border);
    color: var(--text);
    font-size: 16px;
    font-weight: 600;
}

.settings-section-header svg {
    color: var(--primary-light);
    flex-shrink: 0;
}

.settings-section-body {
    padding: 20px 24px;
}

.settings-hint {
    color: var(--text-secondary);
    font-size: 13px;
    margin-bottom: 16px;
    line-height: 1.5;
}

/* Admin accounts */
.settings-empty {
    color: var(--text-secondary);
    font-size: 14px;
    padding: 12px 0;
    text-align: center;
    font-style: italic;
}

.settings-admin-row {
    display: flex;
    align-items: flex-end;
    gap: 12px;
    margin-bottom: 12px;
    padding: 12px;
    background: var(--surface-light);
    border-radius: 12px;
    border: 1px solid var(--border);
}

.settings-admin-fields {
    display: flex;
    gap: 12px;
    flex: 1;
}

.settings-admin-field {
    flex: 1;
}

.settings-admin-field label {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 4px;
}

.settings-admin-field input {
    width: 100%;
    padding: 9px 12px;
    background: var(--surface);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.settings-admin-field input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1);
}

.settings-remove-btn {
    flex-shrink: 0;
    padding: 9px 12px;
    background: rgba(255, 71, 87, 0.1);
    border: 1px solid rgba(255, 71, 87, 0.2);
    border-radius: 8px;
    color: #ff4757;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.2s;
    margin-bottom: 0;
    align-self: center;
}

.settings-remove-btn:hover {
    background: rgba(255, 71, 87, 0.2);
    border-color: #ff4757;
}

.settings-add-btn {
    margin-top: 4px;
    padding: 9px 16px;
    background: transparent;
    border: 1px dashed var(--border);
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    font-size: 13px;
    display: inline-flex;
    align-items: center;
    gap: 6px;
    transition: all 0.2s;
}

.settings-add-btn:hover {
    border-color: var(--primary-light);
    color: var(--primary-light);
    background: rgba(0, 212, 255, 0.05);
}

/* Prices grid */
.settings-prices-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

.settings-price-field label {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 4px;
}

.settings-price-field input {
    width: 100%;
    padding: 9px 12px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 14px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.settings-price-field input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1);
}

/* Payment methods grid */
.settings-payment-grid {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
    gap: 16px;
}

@media (max-width: 700px) {
    .settings-payment-grid {
        grid-template-columns: repeat(2, 1fr);
    }
    .settings-prices-grid {
        grid-template-columns: 1fr;
    }
    .settings-admin-fields {
        flex-direction: column;
        gap: 8px;
    }
}

.settings-payment-field label {
    display: block;
    color: var(--text-secondary);
    font-size: 12px;
    margin-bottom: 4px;
    font-weight: 600;
}

.settings-payment-field input {
    width: 100%;
    padding: 9px 12px;
    background: var(--surface-light);
    border: 1px solid var(--border);
    border-radius: 8px;
    color: var(--text);
    font-size: 13px;
    outline: none;
    transition: border-color 0.2s;
    box-sizing: border-box;
}

.settings-payment-field input:focus {
    border-color: var(--primary-light);
    box-shadow: 0 0 0 2px rgba(0, 212, 255, 0.1);
}

/* Save button row */
.settings-save-row {
    display: flex;
    justify-content: flex-end;
    padding-top: 4px;
}

.settings-save-row .btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 8px;
    padding: 12px 32px;
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: white;
    border: none;
    border-radius: 10px;
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s;
    box-shadow: 0 4px 15px rgba(0, 212, 255, 0.3);
}

.settings-save-row .btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 20px rgba(0, 212, 255, 0.4);
}

.settings-save-row .btn-primary:active {
    transform: translateY(0);
}

/* Auto-refresh countdown inside button */
.btn-icon.auto-refresh-active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    border-color: var(--primary-light);
    box-shadow: 0 0 20px rgba(0, 212, 255, 0.4);
    font-size: 15px;
    font-weight: 700;
    color: #fff;
    letter-spacing: 0;
}

.btn-icon.auto-refresh-active::before {
    opacity: 0 !important;
}

/* ===== SETTINGS TABS ===== */
.settings-tabs {
    display: flex;
    gap: 8px;
    margin-bottom: 24px;
    background: var(--surface);
    border-radius: 14px;
    padding: 6px;
    border: 1px solid var(--border);
}
.settings-tab {
    flex: 1;
    padding: 12px 20px;
    background: transparent;
    border: none;
    border-radius: 10px;
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.25s;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}
.settings-tab:hover { background: var(--surface-light); color: var(--text); }
.settings-tab.active {
    background: linear-gradient(135deg, var(--primary), var(--primary-light));
    color: #fff;
    box-shadow: 0 4px 15px rgba(0, 102, 255, 0.3);
}
.settings-tab.active svg { color: #fff; }

.settings-tab-content {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

/* Blocked user rows */
#blocked-users-list {
    display: flex;
    flex-direction: column;
    gap: 6px;
}
.blocked-user-row {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 12px 16px;
    background: var(--surface-light);
    border-radius: 12px;
    border: 1px solid var(--border);
    gap: 12px;
    transition: all 0.2s ease;
}
.blocked-user-row:hover {
    border-color: rgba(255, 68, 68, 0.2);
    box-shadow: 0 4px 16px rgba(255, 68, 68, 0.08);
}
.blocked-user-main {
    display: flex;
    flex-direction: column;
    gap: 4px;
    flex: 1;
    min-width: 0;
}
.blocked-user-id {
    font-weight: 600;
    font-size: 15px;
    color: var(--text);
}
.blocked-user-username {
    font-weight: 400;
    font-size: 13px;
    color: var(--text-secondary);
}
.blocked-user-meta {
    display: flex;
    gap: 8px;
    flex-wrap: wrap;
    align-items: center;
}
.blocked-user-until {
    font-size: 12px;
    color: var(--warning);
    background: rgba(255, 170, 0, 0.1);
    padding: 2px 8px;
    border-radius: 6px;
}
.blocked-user-reason {
    font-size: 12px;
    color: var(--text-secondary);
    background: var(--surface);
    padding: 2px 8px;
    border-radius: 6px;
    max-width: 300px;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}
.block-duration-select {
    padding: 12px 16px;
    background: var(--surface-light);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text);
    font-size: 14px;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    min-width: 180px;
    appearance: none;
    -webkit-appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b92b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 14px center;
    padding-right: 40px;
}
.block-duration-select:hover {
    border-color: var(--primary);
    box-shadow: 0 0 12px rgba(0, 102, 255, 0.15);
}
.block-duration-select:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 16px rgba(0, 102, 255, 0.25);
}
.block-duration-select option {
    background: var(--surface);
    color: var(--text);
    padding: 8px;
}
@media (max-width: 600px) {
    .settings-tabs { flex-direction: column; }
}

/* Seaglass overrides for settings tabs and blocked rows */
[data-theme="seaglass"] .settings-tabs {
    background: rgba(8,18,40,0.35);
    backdrop-filter: blur(20px);
    border: 1px solid rgba(255,255,255,0.08);
    border-radius: 20px;
}
[data-theme="seaglass"] .settings-tab:hover { background: rgba(255,255,255,0.06); }
[data-theme="seaglass"] .settings-tab.active {
    background: rgba(56,189,248,0.15) !important;
    color: #38bdf8 !important;
    box-shadow: none !important;
}
[data-theme="seaglass"] .settings-tab.active svg { color: #38bdf8 !important; }
[data-theme="seaglass"] .blocked-user-row {
    background: rgba(255,255,255,0.04);
    border: 1px solid rgba(255,255,255,0.06);
    border-radius: 14px;
}
[data-theme="seaglass"] .blocked-user-until {
    background: rgba(245,158,11,0.12);
}
[data-theme="seaglass"] .blocked-user-reason {
    background: rgba(255,255,255,0.04);
}

[data-theme="seaglass"] {
  --accent: #38bdf8;
  --accent2: #7dd3fc;
  --accent3: #0ea5e9;
  --accent-rgb: 56, 189, 248;
  --primary: #38bdf8;
  --primary-rgb: 56, 189, 248;
  --primary-light: #7dd3fc;
  --primary-dark: #0284c7;
  --shadow: rgba(56, 189, 248, 0.2);
  --glow: rgba(56, 189, 248, 0.35);
  --success: #10b981;
  --warning: #f59e0b;
  --danger: #ef4444;
  --text: #f0f8ff;
  --text-secondary: #a0c4e2;
  --border: rgba(255, 255, 255, 0.18);
  --background: transparent;
  --surface: transparent;
  --surface-light: transparent;
}

[data-theme="seaglass"] body {
  background: #020614;
  min-height: 100vh;
}
[data-theme="seaglass"] body::before {
  content: '';
  position: fixed;
  inset: 0;
  background: url('https://images.unsplash.com/photo-1518837695005-2083093ee35b?auto=format&fit=crop&w=1920&q=80') center/cover no-repeat;
  pointer-events: none;
  z-index: 0;
}

[data-theme="seaglass"] .dashboard-container { position: relative; z-index: 1; }

/* ===== SIDEBAR ===== */
[data-theme="seaglass"] .sidebar {
  background: rgba(8,18,40,0.55);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border-right: 1px solid rgba(255,255,255,0.08);
  border-radius: 0 24px 24px 0;
  box-shadow: 4px 0 40px rgba(0,0,0,0.3);
}

[data-theme="seaglass"] .sidebar-header { border-bottom: 1px solid rgba(255,255,255,0.06); }
[data-theme="seaglass"] .sidebar-header::after { display: none; }

[data-theme="seaglass"] .logo-text {
  background: linear-gradient(135deg, #38bdf8, #7dd3fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="seaglass"] .logo-mark {
  background: linear-gradient(135deg, rgba(255,255,255,0.10), rgba(255,255,255,0.04));
}

[data-theme="seaglass"] .nav-item {
  border-radius: 16px;
  margin: 3px 10px;
  color: var(--text-secondary);
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="seaglass"] .nav-item:hover {
  background: rgba(56,189,248,0.08);
  color: #fff;
}
[data-theme="seaglass"] .nav-item.active {
  background: linear-gradient(135deg, rgba(56,189,248,0.22), rgba(56,189,248,0.05));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(56,189,248,0.22), 0 6px 20px rgba(56,189,248,0.10);
}
[data-theme="seaglass"] .nav-item.active svg { color: var(--primary); filter: drop-shadow(0 0 6px rgba(56,189,248,0.45)); }

[data-theme="seaglass"] .sidebar-footer { border-top: 1px solid rgba(255,255,255,0.06); }
[data-theme="seaglass"] .user-name { color: var(--text); }
[data-theme="seaglass"] .user-role { color: var(--text-secondary); }

/* ===== CONTENT HEADER (more rounded) ===== */
[data-theme="seaglass"] .content-header {
  background: rgba(8,18,40,0.35);
  backdrop-filter: blur(24px) saturate(180%);
  -webkit-backdrop-filter: blur(24px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 22px;
  margin: 0 0 24px 0;
  padding: 18px 30px;
  position: relative;
  z-index: 5;
}
[data-theme="seaglass"] .content-header h1 {
  background: linear-gradient(135deg, #38bdf8, #7dd3fc);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
}
[data-theme="seaglass"] .content-header h1::before { display: none; }
[data-theme="seaglass"] .content-header::after { display: none; }

[data-theme="seaglass"] #content-area { background: transparent; backdrop-filter: none; }

/* ===== ALL BUTTONS — frosted glass, extra rounded ===== */
[data-theme="seaglass"] .btn-primary,
[data-theme="seaglass"] .btn-secondary,
[data-theme="seaglass"] .btn-warning,
[data-theme="seaglass"] .btn-icon,
[data-theme="seaglass"] .btn-logout,
[data-theme="seaglass"] .tab-button,
[data-theme="seaglass"] .interval-btn,
[data-theme="seaglass"] .settings-add-btn,
[data-theme="seaglass"] .btn-sm {
  background: rgba(255,255,255,0.025) !important;
  background-image: none !important;
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 16px !important;
  box-shadow: 0 2px 12px rgba(0,0,0,0.15) !important;
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  color: var(--text) !important;
  transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
  cursor: pointer;
}
[data-theme="seaglass"] .btn-primary:hover,
[data-theme="seaglass"] .btn-secondary:hover,
[data-theme="seaglass"] .btn-warning:hover,
[data-theme="seaglass"] .btn-icon:hover,
[data-theme="seaglass"] .btn-logout:hover,
[data-theme="seaglass"] .tab-button:hover,
[data-theme="seaglass"] .interval-btn:hover,
[data-theme="seaglass"] .settings-add-btn:hover,
[data-theme="seaglass"] .btn-sm:hover {
  background: rgba(56,189,248,0.12) !important;
  transform: translateY(-1px);
  border-color: rgba(56,189,248,0.25) !important;
}
[data-theme="seaglass"] .btn-primary:active,
[data-theme="seaglass"] .btn-secondary:active { transform: translateY(0); }
[data-theme="seaglass"] .btn-primary:focus,
[data-theme="seaglass"] .btn-primary:focus-visible,
[data-theme="seaglass"] .btn-secondary:focus,
[data-theme="seaglass"] .btn-secondary:focus-visible,
[data-theme="seaglass"] .btn-warning:focus,
[data-theme="seaglass"] .btn-warning:focus-visible,
[data-theme="seaglass"] .btn-logout:focus,
[data-theme="seaglass"] .btn-logout:focus-visible,
[data-theme="seaglass"] .tab-button:focus,
[data-theme="seaglass"] .tab-button:focus-visible,
[data-theme="seaglass"] .interval-btn:focus,
[data-theme="seaglass"] .interval-btn:focus-visible,
[data-theme="seaglass"] .settings-add-btn:focus,
[data-theme="seaglass"] .settings-add-btn:focus-visible,
[data-theme="seaglass"] .btn-sm:focus,
[data-theme="seaglass"] .btn-sm:focus-visible { outline: none !important; }

[data-theme="seaglass"] .btn-icon {
  width: 44px;
  height: 44px;
  padding: 10px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary) !important;
}
[data-theme="seaglass"] .btn-icon:hover { color: var(--primary) !important; }
[data-theme="seaglass"] .btn-icon.active,
[data-theme="seaglass"] .btn-icon.auto-refresh-active { background: rgba(56,189,248,0.12) !important; color: var(--primary) !important; }
[data-theme="seaglass"] .btn-icon::before,
[data-theme="seaglass"] .btn-icon::after { display: none !important; }

[data-theme="seaglass"] .btn-logout {
  width: 40px;
  height: 40px;
  padding: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--text-secondary) !important;
}
[data-theme="seaglass"] .btn-logout:hover { color: var(--danger) !important; border-color: rgba(239,68,68,0.3) !important; background: rgba(239,68,68,0.1) !important; }

[data-theme="seaglass"] .btn-warning { color: #fbbf24 !important; }
[data-theme="seaglass"] .btn-warning:hover { background: rgba(245,158,11,0.12) !important; border-color: rgba(245,158,11,0.25) !important; }

[data-theme="seaglass"] .tab-button {
  backdrop-filter: blur(14px);
  -webkit-backdrop-filter: blur(14px);
  padding: 10px 20px;
  color: var(--text-secondary) !important;
  border-radius: 16px !important;
}
[data-theme="seaglass"] .tab-button.active {
  background: rgba(56,189,248,0.12) !important;
  color: var(--primary) !important;
  border-color: rgba(56,189,248,0.25) !important;
}

[data-theme="seaglass"] .settings-add-btn {
  padding: 10px 20px;
  border-style: dashed !important;
  color: var(--text-secondary) !important;
  width: auto;
}

/* ===== STAT CARDS ===== */
[data-theme="seaglass"] .stat-card {
  background: rgba(8,18,40,0.4) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 26px !important;
  box-shadow: 0 4px 30px rgba(0,0,0,0.15) !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="seaglass"] .stat-card::before { display: none !important; }
[data-theme="seaglass"] .stat-card::after { display: none !important; }
[data-theme="seaglass"] .stat-card:hover {
  transform: translateY(-4px) !important;
  background: rgba(8,18,40,0.5) !important;
  border-color: rgba(56,189,248,0.15) !important;
  box-shadow: 0 8px 40px rgba(56,189,248,0.06) !important;
}
[data-theme="seaglass"] .stat-card .stat-value { color: var(--text); text-shadow: 0 0 30px rgba(56,189,248,0.15); }
[data-theme="seaglass"] .stat-card .stat-label { color: var(--text-secondary); }

/* ===== SERVER CARDS ===== */
[data-theme="seaglass"] .server-card {
  background: rgba(8,18,40,0.4) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 26px !important;
  box-shadow: 0 4px 30px rgba(0,0,0,0.15) !important;
  transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}
[data-theme="seaglass"] .server-card::before { display: none !important; }
[data-theme="seaglass"] .server-card:hover {
  transform: translateY(-4px) !important;
  background: rgba(8,18,40,0.5) !important;
  border-color: rgba(56,189,248,0.15) !important;
  box-shadow: 0 8px 40px rgba(56,189,248,0.06) !important;
}

/* ===== TABLE CONTAINER ===== */
[data-theme="seaglass"] .table-container {
  background: rgba(8,18,40,0.35) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 24px !important;
  box-shadow: 0 4px 30px rgba(0,0,0,0.12) !important;
}
[data-theme="seaglass"] .table-container:hover {
  border-color: rgba(56,189,248,0.12) !important;
  box-shadow: 0 8px 40px rgba(56,189,248,0.04) !important;
}
[data-theme="seaglass"] thead::after { display: none !important; }
[data-theme="seaglass"] thead { background: transparent !important; }
[data-theme="seaglass"] table { background: transparent; }
[data-theme="seaglass"] table thead th {
  background: rgba(255,255,255,0.04);
  color: var(--primary-light);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  text-transform: uppercase;
  font-size: 11px;
  letter-spacing: 0.8px;
  padding: 16px 22px;
}
[data-theme="seaglass"] table td {
  color: var(--text);
  border-bottom: 1px solid rgba(255,255,255,0.04);
  padding: 14px 22px;
}
[data-theme="seaglass"] tr:hover td {
  background: rgba(56,189,248,0.03);
  transition: background 0.3s;
}

/* ===== MODALS ===== */
[data-theme="seaglass"] .modal-overlay {
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  background: rgba(0,0,0,0.3);
}
[data-theme="seaglass"] .modal {
  background: rgba(8,18,40,0.55);
  backdrop-filter: blur(35px) saturate(180%);
  -webkit-backdrop-filter: blur(35px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 28px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.25);
}
[data-theme="seaglass"] .modal-header h2 { color: var(--text); }
[data-theme="seaglass"] .modal-body { color: var(--text); }
[data-theme="seaglass"] .modal-footer { padding: 20px 30px; gap: 12px; }

/* ===== INPUTS ===== */
[data-theme="seaglass"] input,
[data-theme="seaglass"] textarea,
[data-theme="seaglass"] .modal-input,
[data-theme="seaglass"] .admin-login-input,
[data-theme="seaglass"] .admin-password-input {
  background: rgba(255,255,255,0.06) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 16px !important;
  color: var(--text) !important;
  transition: all 0.25s ease;
}
[data-theme="seaglass"] input:focus,
[data-theme="seaglass"] textarea:focus,
[data-theme="seaglass"] .modal-input:focus {
  background: rgba(255,255,255,0.1) !important;
  border-color: rgba(56,189,248,0.3) !important;
  box-shadow: 0 0 0 4px rgba(56,189,248,0.06);
  outline: none;
}
[data-theme="seaglass"] input::placeholder { color: var(--text-secondary); opacity: 0.4; }

[data-theme="seaglass"] .block-duration-select {
  background: rgba(255,255,255,0.06) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.1) !important;
  border-radius: 14px !important;
  color: var(--text) !important;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%238b92b0' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpolyline points='6 9 12 15 18 9'%3E%3C/polyline%3E%3C/svg%3E") !important;
  background-repeat: no-repeat !important;
  background-position: right 14px center !important;
  padding-right: 40px !important;
}
[data-theme="seaglass"] .block-duration-select:hover {
  border-color: rgba(56,189,248,0.25) !important;
}
[data-theme="seaglass"] .block-duration-select:focus {
  border-color: rgba(56,189,248,0.35) !important;
  box-shadow: 0 0 0 4px rgba(56,189,248,0.08) !important;
}
[data-theme="seaglass"] .block-duration-select option {
  background: rgba(8,18,40,0.95);
  color: var(--text);
}

/* ===== DROPDOWN MENUS ===== */
[data-theme="seaglass"] .theme-menu,
[data-theme="seaglass"] .auto-refresh-menu {
  background: rgba(8,18,40,0.6);
  backdrop-filter: blur(35px) saturate(180%);
  -webkit-backdrop-filter: blur(35px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 20px;
  box-shadow: 0 16px 60px rgba(0,0,0,0.2);
}
[data-theme="seaglass"] .theme-item {
  border-radius: 14px;
  color: var(--text);
  transition: all 0.25s ease;
}
[data-theme="seaglass"] .theme-item:hover { background: rgba(56,189,248,0.08); }
[data-theme="seaglass"] .theme-item.active { background: rgba(56,189,248,0.12); }

[data-theme="seaglass"] .menu-item {
  border-radius: 12px;
  color: var(--text);
  transition: all 0.25s ease;
}
[data-theme="seaglass"] .menu-item:hover { background: rgba(56,189,248,0.08); }
[data-theme="seaglass"] .menu-item.active { background: rgba(56,189,248,0.12); color: var(--primary); }

/* ===== SETTINGS PAGE ===== */
[data-theme="seaglass"] .settings-section {
  background: rgba(8,18,40,0.35);
  backdrop-filter: blur(20px) saturate(180%);
  -webkit-backdrop-filter: blur(20px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 24px;
  box-shadow: 0 4px 30px rgba(0,0,0,0.12);
}
[data-theme="seaglass"] .settings-section-header {
  background: rgba(255,255,255,0.03);
  border-bottom: 1px solid rgba(255,255,255,0.06);
  color: var(--text);
}
[data-theme="seaglass"] .settings-section-header svg { color: var(--primary); }
[data-theme="seaglass"] .settings-section-body { color: var(--text); }
[data-theme="seaglass"] .settings-hint { color: var(--text-secondary); }
[data-theme="seaglass"] .settings-admin-row {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
}
[data-theme="seaglass"] .settings-remove-btn { color: var(--danger) !important; }

/* ===== BADGES ===== */
[data-theme="seaglass"] .badge-primary { background: rgba(56,189,248,0.12); color: var(--primary); border: 1px solid rgba(56,189,248,0.15); }
[data-theme="seaglass"] .badge-success { background: rgba(16,185,129,0.12); color: #34d399; }
[data-theme="seaglass"] .badge-warning { background: rgba(245,158,11,0.12); color: #fbbf24; }
[data-theme="seaglass"] .badge-danger { background: rgba(239,68,68,0.12); color: #f87171; }

/* ===== LOADING ===== */
[data-theme="seaglass"] .loading { background: transparent; }
[data-theme="seaglass"] .spinner { border-color: rgba(56,189,248,0.08); border-top-color: var(--primary); }

/* ===== ALERTS ===== */
[data-theme="seaglass"] .alert-info { background: rgba(56,189,248,0.08); border-color: rgba(56,189,248,0.12); color: var(--text); }
[data-theme="seaglass"] .alert-warning { background: rgba(245,158,11,0.08); border-color: rgba(245,158,11,0.12); color: #fbbf24; }
[data-theme="seaglass"] .alert-danger { background: rgba(239,68,68,0.08); border-color: rgba(239,68,68,0.12); color: #f87171; }

/* ===== PROGRESS BAR ===== */
[data-theme="seaglass"] .progress-bar { background: rgba(255,255,255,0.06); }
[data-theme="seaglass"] .progress-fill { background: linear-gradient(90deg, var(--primary), var(--primary-light)); }

/* ===== TOOLTIP ===== */
[data-theme="seaglass"] .custom-tooltip {
  background: rgba(8,18,40,0.6);
  backdrop-filter: blur(28px) saturate(180%);
  -webkit-backdrop-filter: blur(28px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.1);
  box-shadow: 0 8px 40px rgba(0,0,0,0.15);
  border-radius: 16px;
}

/* ===== ONLINE INDICATOR ===== */
[data-theme="seaglass"] .online-indicator { background: #10b981; box-shadow: 0 0 10px rgba(16,185,129,0.5); }

/* ===== SCROLLBAR ===== */
[data-theme="seaglass"] ::-webkit-scrollbar { width: 5px; }
[data-theme="seaglass"] ::-webkit-scrollbar-track { background: transparent; }
[data-theme="seaglass"] ::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }
[data-theme="seaglass"] ::-webkit-scrollbar-thumb:hover { background: rgba(255,255,255,0.15); }

/* ===== LOGIN PAGE ===== */
[data-theme="seaglass"] .login-box {
  background: rgba(8,18,40,0.45);
  backdrop-filter: blur(35px) saturate(180%);
  -webkit-backdrop-filter: blur(35px) saturate(180%);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 30px;
  box-shadow: 0 20px 80px rgba(0,0,0,0.2);
}
[data-theme="seaglass"] .logo-container h1 { color: var(--text); }
[data-theme="seaglass"] .login-footer { color: var(--text-secondary); }

/* ===== EMPTY STATE ===== */
[data-theme="seaglass"] .empty-state { color: var(--text-secondary); }

/* ===== HISTORY ROWS ===== */
[data-theme="seaglass"] .history-row {
  background: rgba(255,255,255,0.03);
  border-radius: 14px;
  transition: all 0.3s ease;
}
[data-theme="seaglass"] .history-row:hover { background: rgba(56,189,248,0.04); }

/* ===== AUTO-REFRESH COUNTDOWN ===== */
[data-theme="seaglass"] .btn-icon.auto-refresh-active {
  background: rgba(56,189,248,0.12) !important;
  border-color: rgba(56,189,248,0.25) !important;
  color: var(--primary) !important;
  box-shadow: 0 0 20px rgba(56,189,248,0.1) !important;
}

/* ===== INLINE STYLE FIXES ===== */
[data-theme="seaglass"] .stats-grid { gap: 20px; }
[data-theme="seaglass"] .servers-grid { gap: 20px; }

/* ===== BUTTON VARIANTS ===== */
[data-theme="seaglass"] .btn-primary {
  background: linear-gradient(135deg, rgba(56,189,248,0.95), rgba(14,165,233,0.95)) !important;
  border-color: rgba(125,211,252,0.45) !important;
  color: #fff !important;
  font-weight: 600;
  box-shadow: 0 6px 22px rgba(56,189,248,0.28) !important;
}
[data-theme="seaglass"] .btn-primary:hover {
  background: linear-gradient(135deg, #7dd3fc, #38bdf8) !important;
  border-color: rgba(125,211,252,0.7) !important;
  box-shadow: 0 8px 30px rgba(56,189,248,0.42) !important;
}

[data-theme="seaglass"] .btn-secondary { background: rgba(255,255,255,0.04) !important; }

[data-theme="seaglass"] .btn-warning { color: #fbbf24 !important; }
[data-theme="seaglass"] .btn-warning:hover { background: rgba(245,158,11,0.12) !important; }

/* ===== SUBSCRIPTION NAME ===== */
[data-theme="seaglass"] .subscription-name { color: var(--text); }

/* ===== CONNECTION EMAIL ===== */
[data-theme="seaglass"] .connection-email { color: var(--text-secondary); }
[data-theme="seaglass"] .connection-email[style*="color: rgb(0, 255, 136)"] { color: #34d399 !important; }
[data-theme="seaglass"] .connection-email[style*="color: #ff4444"] { color: #f87171 !important; }

/* ===== SIDEBAR NAV ===== */
[data-theme="seaglass"] .sidebar-nav { padding: 14px 10px; }

/* ===== SECTION TITLE ===== */
[data-theme="seaglass"] .section-title { color: var(--text); border-bottom-color: rgba(255,255,255,0.06); }

/* ===== FORM GROUP ===== */
[data-theme="seaglass"] .form-group label { color: var(--text); }

/* ===== MAIN CONTENT OVERLAY ===== */
[data-theme="seaglass"] .main-content::before { display: none; }

/* ===== INLINE DIVS WITH VARIANTS ===== */
[data-theme="seaglass"] div[style*="background: var(--surface)"],
[data-theme="seaglass"] div[style*="background: var(--surface-light)"] {
  background: rgba(8,18,40,0.35) !important;
  backdrop-filter: blur(24px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(24px) saturate(180%) !important;
  border-color: rgba(255,255,255,0.08) !important;
}
[data-theme="seaglass"] div[style*="border-radius: 12px"] {
  border-radius: 20px !important;
}
[data-theme="seaglass"] div[style*="border-radius: 16px"] {
  border-radius: 22px !important;
}
[data-theme="seaglass"] div[style*="background: var(--warning)"] {
  background: rgba(245,158,11,0.08) !important;
  backdrop-filter: blur(8px) !important;
  -webkit-backdrop-filter: blur(8px) !important;
  color: #fbbf24 !important;
}

/* ===== REVENUE CARDS ===== */
[data-theme="seaglass"] .revenue-card {
  background: rgba(8,18,40,0.35) !important;
  backdrop-filter: blur(20px) saturate(180%) !important;
  -webkit-backdrop-filter: blur(20px) saturate(180%) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  border-radius: 24px !important;
}

/* ===== INLINE MODAL INPUTS ===== */
[data-theme="seaglass"] input[style*="background: var(--surface-light)"] {
  background: rgba(255,255,255,0.06) !important;
  backdrop-filter: blur(10px) !important;
  -webkit-backdrop-filter: blur(10px) !important;
  border-color: rgba(255,255,255,0.1) !important;
}

/* ===== INLINE TR BACKGROUND ===== */
[data-theme="seaglass"] tr[style*="background: var(--surface-light)"] {
  background: rgba(255,255,255,0.03) !important;
}

/* ===== LOGIN ANIMATIONS ===== */
[data-theme="seaglass"] .background-animation { display: none; }

/* ===== CHART BARS ===== */
[data-theme="seaglass"] .chart-bar { background: rgba(56,189,248,0.25); border-radius: 6px; }

/* ===== REFERRAL TOOLTIP ===== */
[data-theme="seaglass"] .referral-count-tooltip { color: var(--primary); border-bottom: 1px dashed var(--primary); }

/* ===== ONLINE USERS SCROLLABLE ===== */
[data-theme="seaglass"] .online-users-scrollable {
  background: rgba(255,255,255,0.04);
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border: 1px solid rgba(255,255,255,0.06);
  border-radius: 16px;
}

/* ===== USER AVATAR ===== */
[data-theme="seaglass"] .user-avatar {
  background: linear-gradient(135deg, var(--primary), var(--primary-light));
  color: white;
}

/* ===== BACKUP SETTINGS MODAL ===== */
[data-theme="seaglass"] .interval-btn {
  border-radius: 14px !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  font-weight: 500;
}
[data-theme="seaglass"] .interval-btn.active {
  background: rgba(56,189,248,0.15) !important;
  border-color: rgba(56,189,248,0.3) !important;
  color: var(--primary) !important;
}

/* ===== ALERT BOXES ===== */
[data-theme="seaglass"] .alert { border-radius: 16px; backdrop-filter: blur(8px); }

/* ===== ERROR MESSAGE ===== */
[data-theme="seaglass"] .error-message {
  background: rgba(239,68,68,0.1);
  border: 1px solid rgba(239,68,68,0.2);
  border-radius: 14px;
  color: #f87171;
}

/* ===== THEME SELECTOR LOGO SWATCH ===== */
[data-theme="seaglass"] .theme-color { border-radius: 8px; }

/* ===== POLISH: атмосферный оверлей фона (глубина + читаемость) ===== */
[data-theme="seaglass"] body {
  background: #020614;
}
[data-theme="seaglass"] body::before {
  filter: saturate(115%) brightness(0.92);
}
[data-theme="seaglass"] body::after {
  content: '';
  position: fixed;
  inset: 0;
  pointer-events: none;
  z-index: 0;
  background:
    radial-gradient(1100px 620px at 12% -5%, rgba(56,189,248,0.20), transparent 60%),
    radial-gradient(1000px 700px at 105% 110%, rgba(14,165,233,0.16), transparent 55%),
    linear-gradient(180deg, rgba(2,6,20,0.58) 0%, rgba(2,6,20,0.30) 38%, rgba(2,6,20,0.70) 100%);
}

/* ===== POLISH: подсветка выделения текста ===== */
[data-theme="seaglass"] ::selection { background: rgba(56,189,248,0.32); color: #ffffff; }

/* ===== POLISH: значения статистики — градиентный акцент ===== */
[data-theme="seaglass"] .stat-card .stat-value {
  background: linear-gradient(135deg, #eaf7ff, #7dd3fc);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  text-shadow: none;
}

/* ===== POLISH: подсветка выбранной вторичной кнопки (страховка к JS-фиксу фильтров) ===== */
[data-theme="seaglass"] .btn-secondary.active {
  background: linear-gradient(135deg, rgba(56,189,248,0.95), rgba(14,165,233,0.95)) !important;
  color: #fff !important;
  border-color: rgba(125,211,252,0.5) !important;
  box-shadow: 0 4px 16px rgba(56,189,248,0.28) !important;
}

/* ===== POLISH: чуть заметнее ховер строк таблицы и заголовок ===== */
[data-theme="seaglass"] tr:hover td { background: rgba(56,189,248,0.06); }
[data-theme="seaglass"] table thead th { color: #9bdcff; }

/* ===== TOGGLE SWITCH ===== */
.toggle-switch {
    position: relative;
    display: inline-block;
    width: 44px;
    height: 24px;
    cursor: pointer;
}
.toggle-switch input {
    opacity: 0;
    width: 0;
    height: 0;
}
.toggle-slider {
    position: absolute;
    inset: 0;
    background: var(--text-secondary);
    border-radius: 24px;
    transition: 0.3s;
}
.toggle-slider::before {
    content: "";
    position: absolute;
    width: 18px;
    height: 18px;
    left: 3px;
    bottom: 3px;
    background: #fff;
    border-radius: 50%;
    transition: 0.3s;
}
.toggle-switch input:checked + .toggle-slider {
    background: var(--success);
}
.toggle-switch input:checked + .toggle-slider::before {
    transform: translateX(20px);
}

/* Компактный тумблер для карточек авто-рассылок */
.toggle-switch-sm {
    width: 36px;
    height: 20px;
}
.toggle-switch-sm .toggle-slider::before {
    width: 14px;
    height: 14px;
}
.toggle-switch-sm input:checked + .toggle-slider::before {
    transform: translateX(16px);
}

/* ===== Campaign type selector buttons ===== */
.campaign-type-btn {
    flex: 1;
    padding: 11px 10px;
    border: 2px solid var(--border);
    border-radius: 10px;
    background: transparent;
    font-weight: 500;
    cursor: pointer;
    transition: all 0.2s ease;
    box-shadow: none;
    color: var(--text);
    font-size: 14px;
}
.campaign-type-btn:hover {
    border-color: color-mix(in srgb, var(--primary) 50%, transparent);
    background: rgba(var(--primary-rgb), 0.04);
}
.campaign-type-btn.active {
    border-color: var(--primary) !important;
    background: rgba(var(--primary-rgb), 0.1) !important;
    font-weight: 600 !important;
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.15), 0 2px 8px rgba(var(--primary-rgb), 0.1) !important;
}


/* ===== Единый блок авто-рассылок: карточки выбора ===== */
.auto-bc-option {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 8px;
    padding: 18px 16px;
    background: var(--surface-light);
    border: 1.5px solid var(--border);
    border-radius: 14px;
    cursor: pointer;
    transition: all 0.25s ease;
    position: relative;
    overflow: hidden;
}
.auto-bc-option::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--primary-light));
    opacity: 0;
    transition: opacity 0.25s ease;
}
.auto-bc-option:hover {
    border-color: color-mix(in srgb, var(--primary) 40%, transparent);
    background: rgba(var(--primary-rgb), 0.04);
    transform: translateY(-2px);
    box-shadow: 0 4px 16px rgba(var(--primary-rgb), 0.1);
}
.auto-bc-option.active {
    border-color: var(--primary);
    background: rgba(var(--primary-rgb), 0.08);
    box-shadow: 0 0 0 3px rgba(var(--primary-rgb), 0.12), 0 4px 16px rgba(var(--primary-rgb), 0.15);
}
.auto-bc-option.active::before {
    opacity: 1;
}
.auto-bc-option-icon {
    width: 38px;
    height: 38px;
    border-radius: 10px;
    background: rgba(var(--primary-rgb), 0.1);
    color: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    transition: all 0.25s ease;
}
.auto-bc-option.active .auto-bc-option-icon {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 3px 10px rgba(var(--primary-rgb), 0.35);
}
.auto-bc-option-title {
    font-size: 15px;
    font-weight: 700;
    color: var(--text);
}
.auto-bc-option-desc {
    font-size: 12px;
    color: var(--text-secondary);
    line-height: 1.4;
}
.auto-bc-content {
    animation: autoBcFadeIn 0.3s ease;
}
@keyframes autoBcFadeIn {
    from { opacity: 0; transform: translateY(6px); }
    to { opacity: 1; transform: translateY(0); }
}
