/* ==================== CSS Variables & Themes ==================== */
:root {
    --transition: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --transition-fast: 0.15s ease;
    --radius-sm: 0.5rem;
    --radius-md: 0.75rem;
    --radius-lg: 1rem;
    --radius-xl: 1.5rem;
}

/* Dark Theme (default) - Modern Gradient */
:root[data-theme="dark"] {
    --color-primary: #6366F1;
    --color-primary-hover: #4F46E5;
    --color-primary-light: rgba(99, 102, 241, 0.15);
    --color-bg: #0F172A;
    --color-bg-secondary: #1E293B;
    --color-surface: #1E293B;
    --color-surface-hover: #334155;
    --color-text: #F8FAFC;
    --color-text-secondary: #94A3B8;
    --color-border: #334155;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    --gradient-primary: linear-gradient(135deg, #6366F1 0%, #8B5CF6 100%);
    --gradient-card: linear-gradient(145deg, #1E293B 0%, #0F172A 100%);
    --gradient-glow: radial-gradient(ellipse at top, rgba(99, 102, 241, 0.15) 0%, transparent 50%);
    --shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);
    --nav-bg-rgb: 15, 23, 42;
    --primary: #6366F1;
}

/* Christmas Green Theme - Новогодняя */
:root[data-theme="christmas"] {
    --color-primary: #2D8B4E;
    --color-primary-hover: #236B3C;
    --color-primary-light: rgba(45, 139, 78, 0.15);
    --color-bg: #0A1F13;
    --color-bg-secondary: #122A1C;
    --color-surface: #152E1F;
    --color-surface-hover: #1E3D2A;
    --color-text: #E8F5EC;
    --color-text-secondary: #8BC9A0;
    --color-border: #2D5A3E;
    --color-success: #4ADE80;
    --color-warning: #FBBF24;
    --color-error: #F87171;
    --gradient-primary: linear-gradient(135deg, #2D8B4E 0%, #166534 100%);
    --gradient-card: linear-gradient(145deg, #152E1F 0%, #1A3826 100%);
    --gradient-glow: radial-gradient(ellipse at top, rgba(45, 139, 78, 0.15) 0%, transparent 50%);
    --shadow: 0 4px 20px -2px rgba(0, 0, 0, 0.3);
    --shadow-glow: 0 0 40px rgba(45, 139, 78, 0.2);
    --nav-bg-rgb: 10, 31, 19;
    --primary: #2D8B4E;
}

/* Purple Theme - Cyberpunk */
:root[data-theme="purple"] {
    --color-primary: #A855F7;
    --color-primary-hover: #9333EA;
    --color-primary-light: rgba(168, 85, 247, 0.15);
    --color-bg: #0C0A1D;
    --color-bg-secondary: #1A1333;
    --color-surface: #1A1333;
    --color-surface-hover: #2D2250;
    --color-text: #F5F3FF;
    --color-text-secondary: #A78BFA;
    --color-border: #3B2D6B;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #F43F5E;
    --gradient-primary: linear-gradient(135deg, #A855F7 0%, #EC4899 100%);
    --gradient-card: linear-gradient(145deg, #1A1333 0%, #0C0A1D 100%);
    --gradient-glow: radial-gradient(ellipse at top, rgba(168, 85, 247, 0.2) 0%, transparent 50%);
    --shadow: 0 4px 20px -2px rgba(168, 85, 247, 0.3);
    --shadow-glow: 0 0 60px rgba(168, 85, 247, 0.25);
    --nav-bg-rgb: 12, 10, 29;
    --primary: #A855F7;
}

/* Gold/Sand Theme - Золотисто-песчаная */
:root[data-theme="gold"] {
    --color-primary: #D97706;
    --color-primary-hover: #B45309;
    --color-primary-light: rgba(217, 119, 6, 0.15);
    --color-bg: #1C1917;
    --color-bg-secondary: #292524;
    --color-surface: #292524;
    --color-surface-hover: #3B3633;
    --color-text: #FEF3C7;
    --color-text-secondary: #FCD34D;
    --color-border: #57534E;
    --color-success: #10B981;
    --color-warning: #F59E0B;
    --color-error: #EF4444;
    --gradient-primary: linear-gradient(135deg, #D97706 0%, #F59E0B 100%);
    --gradient-card: linear-gradient(145deg, #292524 0%, #1C1917 100%);
    --gradient-glow: radial-gradient(ellipse at top, rgba(217, 119, 6, 0.2) 0%, transparent 50%);
    --shadow: 0 4px 20px -2px rgba(217, 119, 6, 0.3);
    --shadow-glow: 0 0 40px rgba(217, 119, 6, 0.25);
    --nav-bg-rgb: 28, 25, 23;
    --primary: #D97706;
}

/* Песчаная буря для золотистой темы */
:root[data-theme="gold"] .sandstorm-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

:root[data-theme="gold"] .sandstorm-particle {
    position: absolute;
    width: 2px;
    height: 2px;
    background: rgba(217, 119, 6, 0.5);
    border-radius: 50%;
    box-shadow: 0 0 2px rgba(217, 119, 6, 0.4);
    animation: sandstorm-drift linear infinite;
    will-change: transform;
}

:root[data-theme="gold"] .sandstorm-particle:nth-child(odd) {
    background: rgba(245, 158, 11, 0.45);
    width: 2.5px;
    height: 2.5px;
    box-shadow: 0 0 2px rgba(245, 158, 11, 0.4);
}

:root[data-theme="gold"] .sandstorm-particle:nth-child(3n) {
    background: rgba(251, 191, 36, 0.4);
    width: 1.5px;
    height: 1.5px;
    box-shadow: 0 0 1px rgba(251, 191, 36, 0.3);
}

:root[data-theme="gold"] .sandstorm-particle:nth-child(4n) {
    background: rgba(217, 119, 6, 0.55);
    width: 3px;
    height: 3px;
    box-shadow: 0 0 3px rgba(217, 119, 6, 0.5);
}

@keyframes sandstorm-drift {
    0% {
        transform: translateY(0) translateX(0) rotate(0deg);
        opacity: 0.3;
    }
    2% {
        opacity: 0.6;
    }
    98% {
        opacity: 0.6;
    }
    100% {
        transform: translateY(110vh) translateX(60px) rotate(360deg);
        opacity: 0.3;
    }
}

/* Летающие звезды для фиолетовой темы */
:root[data-theme="purple"] .stars-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 9999;
    overflow: hidden;
}

:root[data-theme="purple"] .star-particle {
    position: absolute;
    width: 4px;
    height: 4px;
    background: rgba(168, 85, 247, 0.8);
    clip-path: polygon(50% 0%, 61% 35%, 98% 35%, 68% 57%, 79% 91%, 50% 70%, 21% 91%, 32% 57%, 2% 35%, 39% 35%);
    animation: star-twinkle linear infinite, star-float linear infinite;
    box-shadow: 0 0 6px rgba(168, 85, 247, 0.6);
}

:root[data-theme="purple"] .star-particle:nth-child(odd) {
    width: 3px;
    height: 3px;
    background: rgba(139, 92, 246, 0.7);
    box-shadow: 0 0 4px rgba(139, 92, 246, 0.5);
    animation-duration: 20s, 25s;
}

:root[data-theme="purple"] .star-particle:nth-child(3n) {
    width: 5px;
    height: 5px;
    background: rgba(192, 132, 252, 0.75);
    box-shadow: 0 0 8px rgba(192, 132, 252, 0.6);
    animation-duration: 18s, 30s;
}

:root[data-theme="purple"] .star-particle:nth-child(4n) {
    width: 2.5px;
    height: 2.5px;
    background: rgba(221, 214, 254, 0.65);
    box-shadow: 0 0 3px rgba(221, 214, 254, 0.5);
    animation-duration: 22s, 28s;
}

:root[data-theme="purple"] .star-particle:nth-child(5n) {
    width: 6px;
    height: 6px;
    background: rgba(168, 85, 247, 0.85);
    box-shadow: 0 0 10px rgba(168, 85, 247, 0.7);
    animation-duration: 16s, 22s;
}

@keyframes star-twinkle {
    0%, 100% {
        opacity: 0.4;
        transform: scale(1);
    }
    50% {
        opacity: 1;
        transform: scale(1.2);
    }
}

@keyframes star-float {
    0% {
        transform: translateY(-5vh) translateX(0) rotate(0deg);
    }
    100% {
        transform: translateY(105vh) translateX(80px) rotate(360deg);
    }
}

/* ==================== Reset & Base ==================== */
*, *::before, *::after {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
    background: var(--color-bg);
    color: var(--color-text);
    line-height: 1.6;
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    height: 100vh;
    background: var(--gradient-glow);
    pointer-events: none;
    z-index: 0;
}

a {
    color: var(--color-primary);
    text-decoration: none;
    transition: color var(--transition);
}

a:hover {
    color: var(--color-primary-hover);
}

/* ==================== Container ==================== */
.container {
    width: 100%;
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 1.5rem;
    position: relative;
    z-index: 1;
}

/* ==================== Navbar ==================== */
.navbar {
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    position: sticky;
    top: 0;
    z-index: 100;
}

.navbar-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.875rem 1.5rem;
    max-width: 1200px;
    margin: 0 auto;
}

.navbar-brand {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 700;
    color: var(--color-text);
    transition: transform var(--transition);
}

.navbar-brand:hover {
    transform: scale(1.02);
    color: var(--color-text);
}

.logo-icon {
    font-size: 1.75rem;
    filter: drop-shadow(0 0 8px rgba(99, 102, 241, 0.5));
}

.navbar-menu {
    display: flex;
    gap: 0.25rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1rem;
    border-radius: var(--radius-md);
    font-weight: 500;
    font-size: 0.9rem;
    transition: all var(--transition);
    position: relative;
}

.nav-link span:not(.nav-icon) {
    color: var(--color-text-secondary);
}

.nav-link:hover {
    background: var(--color-primary-light);
}

.nav-link:hover span:not(.nav-icon) {
    color: var(--color-text);
}

.nav-link.active {
    background: var(--gradient-primary);
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.nav-link.active span:not(.nav-icon) {
    color: white;
}

.nav-icon { 
    font-size: 1.1rem;
    font-style: normal;
}
.navbar-right { display: flex; align-items: center; gap: 1rem; }

/* Theme Switcher - Dropdown */
.theme-dropdown-wrapper {
    position: relative;
}

.theme-toggle-btn {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 40px;
    height: 40px;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition);
    color: var(--color-text);
    font-size: 1.25rem;
}

.theme-toggle-btn:hover {
    background: var(--color-surface-hover);
    transform: scale(1.05);
}

.theme-dropdown {
    position: absolute;
    top: calc(100% + 8px);
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    padding: 0.5rem;
    min-width: 160px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.2s ease;
    z-index: 1000;
}

.theme-dropdown.open {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.theme-dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    width: 100%;
    padding: 0.75rem 1rem;
    background: none;
    border: none;
    border-radius: var(--radius-sm);
    cursor: pointer;
    color: var(--color-text);
    font-size: 0.875rem;
    transition: all var(--transition);
}

.theme-dropdown-item:hover {
    background: var(--color-surface-hover);
}

.theme-dropdown-item.active {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.theme-dropdown-item i {
    font-size: 1.125rem;
}

/* Legacy Theme Switcher (for mobile menu) */
.theme-switcher {
    display: flex;
    gap: 0.25rem;
    background: var(--color-bg);
    padding: 0.25rem;
    border-radius: var(--radius-lg);
    border: 1px solid var(--color-border);
}

.theme-btn {
    background: none;
    border: none;
    padding: 0.5rem;
    cursor: pointer;
    border-radius: var(--radius-sm);
    transition: all var(--transition);
    font-size: 1rem;
    opacity: 0.6;
}

.theme-btn:hover, .theme-btn.active {
    background: var(--color-surface-hover);
    opacity: 1;
    transform: scale(1.1);
}

/* User Menu */
.user-menu { position: relative; }

.user-btn {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    color: var(--color-text);
    cursor: pointer;
    padding: 0.5rem 1rem 0.5rem 0.5rem;
    border-radius: var(--radius-xl);
    transition: all var(--transition);
}

.user-btn:hover {
    border-color: var(--color-primary);
    box-shadow: 0 0 20px var(--color-primary-light);
}

.user-avatar {
    width: 2.25rem;
    height: 2.25rem;
    background: var(--gradient-primary);
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-weight: 600;
    font-size: 0.9rem;
    color: white;
}

.user-email { max-width: 150px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 0.9rem; }
.dropdown-arrow { font-size: 0.625rem; transition: transform var(--transition); opacity: 0.5; }

.user-dropdown {
    position: absolute;
    top: calc(100% + 0.5rem);
    right: 0;
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    min-width: 220px;
    box-shadow: var(--shadow);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px) scale(0.95);
    transition: all var(--transition);
    overflow: hidden;
}

.user-dropdown.show {
    opacity: 1;
    visibility: visible;
    transform: translateY(0) scale(1);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.875rem 1.25rem;
    color: var(--color-text);
    transition: all var(--transition);
    font-size: 0.9rem;
}

.dropdown-item:hover {
    background: var(--color-primary-light);
    color: var(--color-primary);
}

.dropdown-divider { border: none; border-top: 1px solid var(--color-border); margin: 0.25rem 0; }
.text-danger { color: var(--color-error) !important; }
.auth-buttons { display: flex; gap: 0.75rem; }

/* Mobile Menu */
.mobile-menu-btn {
    display: none;
    flex-direction: column;
    gap: 5px;
    background: none;
    border: none;
    cursor: pointer;
    padding: 0.5rem;
    z-index: 101;
}

.mobile-menu-btn span {
    width: 24px;
    height: 2px;
    background: var(--color-text);
    border-radius: 2px;
    transition: all var(--transition);
}

/* Анимация бургер-меню при открытии */
.mobile-menu-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.mobile-menu-btn.active span:nth-child(2) {
    opacity: 0;
}

.mobile-menu-btn.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* ==================== Main Content ==================== */
.main-content { 
    flex: 1; 
    padding: 2.5rem 0; 
    position: relative; 
    z-index: 1;
    /* Для Telegram Mini App - добавляем отступ сверху */
    padding-top: env(safe-area-inset-top, 1rem);
}

/* Telegram Mini App - скрываем navbar если открыто в WebApp */
@supports (padding-top: env(safe-area-inset-top)) {
    .main-content {
        padding-top: max(1rem, env(safe-area-inset-top));
    }
}

/* ==================== Buttons ==================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    border-radius: var(--radius-md);
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all var(--transition);
    border: none;
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

.btn::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.2), transparent);
    transition: left 0.5s;
}

.btn:hover::before { left: 100%; }

.lk-btn-success {
    background: linear-gradient(135deg, #10b981, #059669);
    color: white;
}

.lk-btn-success:hover {
    filter: brightness(1.1);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(16, 185, 129, 0.4);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}

.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.5);
    color: white;
}

.btn-outline {
    background: transparent;
    border: 1px solid var(--color-border);
    color: var(--color-text);
}

.btn-outline:hover {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
    color: var(--color-text);
}

.btn-success { background: var(--color-success); color: white; }
.btn-success:hover { filter: brightness(1.1); transform: translateY(-2px); }
.btn-danger { background: var(--color-error); color: white; }
.btn-danger:hover { filter: brightness(1.1); }
.btn-lg { padding: 1rem 2rem; font-size: 1rem; border-radius: var(--radius-lg); }
.btn-sm { padding: 0.5rem 1rem; font-size: 0.8rem; }
.btn-block { width: 100%; }

/* ==================== Cards ==================== */
.card {
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.75rem;
    box-shadow: var(--shadow);
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
}

.card:hover { border-color: rgba(99, 102, 241, 0.3); }
.card-title { font-size: 1.25rem; font-weight: 600; }

/* ==================== Forms ==================== */
.form-group { margin-bottom: 1.5rem; }
.form-label { display: block; margin-bottom: 0.5rem; font-weight: 500; color: var(--color-text); font-size: 0.9rem; }

.form-input {
    width: 100%;
    padding: 0.875rem 1.25rem;
    background: var(--color-bg);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-md);
    color: var(--color-text);
    font-size: 1rem;
    transition: all var(--transition);
}

.form-input:focus {
    outline: none;
    border-color: var(--color-primary);
    box-shadow: 0 0 0 4px var(--color-primary-light);
}

.form-input::placeholder { color: var(--color-text-secondary); }

/* ==================== Stats Cards ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2.5rem;
}

.stat-card {
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    text-align: center;
    transition: all var(--transition);
    position: relative;
    overflow: hidden;
}

.stat-card::after {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(circle, var(--color-primary-light) 0%, transparent 70%);
    opacity: 0;
    transition: opacity var(--transition);
}

.stat-card:hover::after { opacity: 1; }
.stat-card:hover { transform: translateY(-4px); border-color: var(--color-primary); }
.stat-icon { font-size: 2.5rem; margin-bottom: 0.75rem; position: relative; z-index: 1; }
.stat-value { font-size: 2rem; font-weight: 700; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; position: relative; z-index: 1; }
.stat-label { color: var(--color-text-secondary); font-size: 0.9rem; margin-top: 0.25rem; position: relative; z-index: 1; }

/* ==================== Tariff Cards ==================== */
.tariff-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(160px, 1fr));
    gap: 1rem;
    width: 100%;
    box-sizing: border-box;
    overflow: visible;
}

/* Контейнер для группы тарифов */
.tariff-grid + *,
div:has(.tariff-grid) {
    overflow: visible;
}

.tariff-card {
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: 16px;
    padding: 1.25rem;
    transition: all var(--transition);
    position: relative;
    overflow: visible;
    display: flex;
    flex-direction: column;
    min-height: 200px;
    width: 100%;
    box-sizing: border-box;
}

.tariff-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
    transform: scaleX(0);
    transition: transform var(--transition);
}

.tariff-card:hover::before { transform: scaleX(1); }
.tariff-card:hover { transform: translateY(-4px) scale(1.02); box-shadow: var(--shadow-glow); border-color: var(--color-primary); }
.tariff-name { font-size: 1rem; font-weight: 600; margin-bottom: 0.75rem; text-align: center; }
.tariff-price { font-size: 1.75rem; font-weight: 700; background: var(--gradient-primary); -webkit-background-clip: text; -webkit-text-fill-color: transparent; background-clip: text; margin-bottom: 0.75rem; text-align: center; line-height: 1.2; }
.tariff-price span { font-size: 0.75rem; opacity: 0.7; }
.tariff-features { list-style: none; margin-bottom: auto; padding: 0; flex-grow: 1; display: flex; flex-direction: column; justify-content: center; }
.tariff-features li { display: flex; align-items: center; justify-content: center; gap: 0.5rem; padding: 0.375rem 0; color: var(--color-text-secondary); font-size: 0.8125rem; text-align: center; }
.tariff-features li:last-child { border-bottom: none; }
.tariff-features .icon { color: var(--color-success); font-size: 0.9rem; }

@media (min-width: 769px) {
    .tariff-grid {
        grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
        gap: 1.5rem;
        max-width: 1400px;
        margin: 0 auto;
        width: 100%;
    }
    
    .tariff-card {
        padding: 1.5rem;
        min-height: 240px;
        width: 100%;
        max-width: 100%;
        margin: 0;
        box-sizing: border-box;
        overflow: visible;
    }
    
    .tariff-name {
        font-size: 1.1rem;
    }
    
    .tariff-price {
        font-size: 2rem;
    }
    
    .tariff-features li {
        font-size: 0.875rem;
        padding: 0.5rem 0;
    }
}

@media (min-width: 1200px) {
    .tariff-grid {
        grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
        gap: 2rem;
        max-width: 1600px;
    }
    
    .tariff-card {
        padding: 1.75rem;
        min-height: 260px;
        width: 100%;
        max-width: 100%;
        box-sizing: border-box;
        overflow: visible;
    }
}

/* Стили для карточки пробного периода */
.trial-card {
    max-width: 100%;
}

@media (min-width: 769px) {
    .trial-card {
        padding: 2rem;
    }
    
    .trial-card h2 {
        font-size: 1.75rem !important;
    }
    
    .trial-card p {
        font-size: 1.1rem !important;
    }
}

/* ==================== Key Cards ==================== */
.key-card {
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    padding: 1.5rem;
    margin-bottom: 1rem;
    transition: all var(--transition);
}

.key-card:hover { border-color: rgba(99, 102, 241, 0.3); }
.key-header { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 1rem; flex-wrap: wrap; gap: 0.5rem; }
.key-name { font-size: 1.125rem; font-weight: 600; }

.key-status {
    padding: 0.375rem 1rem;
    border-radius: var(--radius-xl);
    font-size: 0.75rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.key-status.active { background: rgba(16, 185, 129, 0.15); color: var(--color-success); border: 1px solid rgba(16, 185, 129, 0.3); }
.key-status.expiring { background: rgba(245, 158, 11, 0.15); color: var(--color-warning); border: 1px solid rgba(245, 158, 11, 0.3); }
.key-status.expired { background: rgba(239, 68, 68, 0.15); color: var(--color-error); border: 1px solid rgba(239, 68, 68, 0.3); }
.key-status.frozen { background: rgba(99, 102, 241, 0.15); color: var(--color-primary); border: 1px solid rgba(99, 102, 241, 0.3); }
.key-info { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1rem; margin-bottom: 1rem; }
.key-info-item { display: flex; flex-direction: column; }
.key-info-label { font-size: 0.75rem; color: var(--color-text-secondary); text-transform: uppercase; letter-spacing: 0.5px; }
.key-info-value { font-weight: 500; margin-top: 0.25rem; }
.key-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ==================== QR Code ==================== */
.qr-container {
    display: flex;
    flex-direction: column;
    align-items: center;
    padding: 1.5rem;
    background: white;
    border-radius: var(--radius-lg);
    margin: 1rem 0;
    box-shadow: inset 0 2px 10px rgba(0,0,0,0.1);
}

/* ==================== Flash Messages ==================== */
.flash-container { position: fixed; top: 90px; right: 1.5rem; z-index: 1000; max-width: 400px; }

.flash {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.75rem;
    animation: slideIn 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255,255,255,0.1);
}

@keyframes slideIn {
    from { transform: translateX(120%); opacity: 0; }
    to { transform: translateX(0); opacity: 1; }
}

.flash-success { background: rgba(16, 185, 129, 0.9); color: white; }
.flash-error { background: rgba(239, 68, 68, 0.9); color: white; }
.flash-warning { background: rgba(245, 158, 11, 0.9); color: white; }
.flash-info { background: rgba(99, 102, 241, 0.9); color: white; }
.flash-close { background: none; border: none; color: inherit; font-size: 1.5rem; cursor: pointer; padding: 0; margin-left: 1rem; opacity: 0.7; transition: opacity var(--transition); }
.flash-close:hover { opacity: 1; }

/* ==================== Grid ==================== */
.grid { display: grid; gap: 1.5rem; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }

/* ==================== Footer ==================== */
.footer {
    background: var(--color-surface);
    border-top: 1px solid var(--color-border);
    padding: 2rem 0;
    text-align: center;
    color: var(--color-text-secondary);
    font-size: 0.875rem;
    position: relative;
    z-index: 1;
}

/* ==================== Auth Pages ==================== */
.auth-container { min-height: calc(100vh - 200px); display: flex; align-items: center; justify-content: center; padding: 2rem 1rem; }

.auth-card {
    width: 100%;
    max-width: 420px;
    background: var(--gradient-card);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl);
    padding: 2.5rem;
    box-shadow: var(--shadow-glow);
    position: relative;
    overflow: hidden;
}

.auth-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-primary);
}

.auth-title { font-size: 1.75rem; font-weight: 700; text-align: center; margin-bottom: 2rem; }
.auth-footer { text-align: center; margin-top: 1.5rem; color: var(--color-text-secondary); }
.auth-divider { display: flex; align-items: center; margin: 1.5rem 0; color: var(--color-text-secondary); }
.auth-divider::before, .auth-divider::after { content: ''; flex: 1; height: 1px; background: var(--color-border); }
.auth-divider span { padding: 0 1rem; font-size: 0.85rem; }

/* Telegram Login Section */
.telegram-login-section {
    text-align: center;
    padding: 1rem;
    background: var(--color-primary-light);
    border-radius: var(--radius-md);
    margin-bottom: 1rem;
}

.telegram-login-hint {
    color: var(--color-text-secondary);
    font-size: 0.9rem;
    margin-bottom: 1rem;
}

.telegram-login-section iframe {
    margin: 0 auto;
}

/* ==================== Empty State ==================== */
.empty-state { text-align: center; padding: 3rem 1.5rem; }
.empty-icon { font-size: 4rem; margin-bottom: 1rem; filter: grayscale(0.3); }
.empty-title { font-size: 1.25rem; font-weight: 600; margin-bottom: 0.5rem; }
.empty-text { color: var(--color-text-secondary); margin-bottom: 1.5rem; }

/* ==================== Page Header ==================== */
.page-header { margin-bottom: 2.5rem; }
.page-title { font-size: 2rem; font-weight: 700; margin-bottom: 0.5rem; color: var(--color-text); }
.page-subtitle { color: var(--color-text-secondary); font-size: 1.1rem; }

/* ==================== Alerts ==================== */
.alert { padding: 1rem 1.25rem; border-radius: var(--radius-md); margin-bottom: 1.5rem; border: 1px solid; }
.alert-success { background: rgba(16, 185, 129, 0.1); border-color: rgba(16, 185, 129, 0.3); color: var(--color-success); }
.alert-error { background: rgba(239, 68, 68, 0.1); border-color: rgba(239, 68, 68, 0.3); color: var(--color-error); }
.alert-warning { background: rgba(245, 158, 11, 0.1); border-color: rgba(245, 158, 11, 0.3); color: var(--color-warning); }
.alert-info { background: rgba(99, 102, 241, 0.1); border-color: rgba(99, 102, 241, 0.3); color: var(--color-primary); }

/* ==================== Text Colors ==================== */
.text-success { color: var(--color-success) !important; }
.text-warning { color: var(--color-warning) !important; }
.text-error { color: var(--color-error) !important; }

/* ==================== Tables ==================== */
.table-container { overflow-x: auto; border-radius: var(--radius-md); }
.table { width: 100%; border-collapse: collapse; }
.table th, .table td { padding: 1rem 1.25rem; text-align: left; border-bottom: 1px solid var(--color-border); }
.table th { background: var(--color-bg); font-weight: 600; color: var(--color-text-secondary); font-size: 0.8rem; text-transform: uppercase; letter-spacing: 0.5px; }
.table tr { transition: background var(--transition); }
.table tr:hover { background: var(--color-primary-light); }

/* ==================== Link Code ==================== */
.link-code {
    font-size: 2rem;
    font-weight: 700;
    letter-spacing: 0.5rem;
    text-align: center;
    padding: 1.25rem;
    background: var(--color-bg);
    border-radius: var(--radius-md);
    font-family: 'JetBrains Mono', monospace;
    background: var(--gradient-primary);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* ==================== Responsive ==================== */
@media (max-width: 768px) {
    .navbar-menu {
        display: none;
        position: fixed;
        top: 60px;
        left: 0;
        right: 0;
        bottom: 0;
        background: var(--color-surface);
        flex-direction: column;
        padding: 1rem;
        padding-bottom: 2rem;
        border-bottom: 1px solid var(--color-border);
        box-shadow: var(--shadow);
        backdrop-filter: blur(20px);
        z-index: 99;
        overflow-y: auto;
    }
    
    .navbar-menu.show { display: flex; }
    .mobile-menu-btn { display: flex; }
    .user-email, .dropdown-arrow { display: none; }
    
    /* Скрываем десктопный theme-dropdown на мобильных */
    .navbar-right .theme-dropdown-wrapper { display: none; }
    
    .grid-2, .grid-3 { grid-template-columns: 1fr; }
    .key-info { grid-template-columns: 1fr; }
    .tariff-grid { grid-template-columns: repeat(2, 1fr); gap: 0.75rem; }
    .stats-grid { grid-template-columns: repeat(2, 1fr); }
    .page-title { font-size: 1.5rem; }
    .card { padding: 1.25rem; }
    .btn-lg { padding: 0.875rem 1.5rem; font-size: 0.95rem; }
    .main-content { padding: 1.5rem 0; }
    .container { padding: 0 1rem; }
    
    /* Mobile Theme Section */
    .mobile-theme-section {
        margin-top: 1.5rem;
        padding-top: 1rem;
        border-top: 1px solid var(--color-border);
    }
    
    .mobile-theme-label {
        display: block;
        font-size: 0.85rem;
        color: var(--color-text-secondary);
        margin-bottom: 0.75rem;
        text-align: center;
    }
    
    .theme-switcher-mobile {
        display: flex;
        justify-content: center;
        gap: 0.5rem;
        background: var(--color-bg);
        padding: 0.5rem;
        border-radius: var(--radius-lg);
        border: 1px solid var(--color-border);
    }
    
    .theme-switcher-mobile .theme-btn {
        padding: 0.75rem 1rem;
        font-size: 1.25rem;
    }
    
    .user-dropdown {
        position: fixed;
        top: auto;
        bottom: 0;
        left: 0;
        right: 0;
        margin: 0;
        border-radius: var(--radius-xl) var(--radius-xl) 0 0;
        min-width: 100%;
    }
    
    .flash-container { left: 1rem; right: 1rem; max-width: none; }
    
    /* Кнопки авторизации на мобильных */
    .auth-buttons {
        display: flex;
        gap: 0.5rem;
    }
    
    .auth-buttons .btn-sm-mobile {
        padding: 0.5rem 0.75rem;
        font-size: 0.8rem;
    }
    
    /* Navbar для неавторизованных */
    .navbar-right {
        gap: 0.5rem;
    }
}

/* Скрываем мобильный theme-switcher на десктопе */
.mobile-theme-section {
    display: none;
}

@media (max-width: 768px) {
    .mobile-theme-section {
        display: block;
    }
}

/* Стили для кнопки пополнить в тарифах */
.tariff-topup-btn {
    white-space: normal;
    word-wrap: break-word;
    line-height: 1.4;
    padding: 0.75rem 0.5rem;
    font-size: 0.875rem;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.25rem;
    min-height: 3rem;
}

.tariff-topup-text {
    font-weight: 600;
    font-size: 0.875rem;
}

.tariff-topup-amount {
    font-size: 0.75rem;
    opacity: 0.9;
    font-weight: 400;
}

@media (max-width: 480px) {
    .auth-card { padding: 1.5rem; margin: 0 0.5rem; }
    .stat-card { padding: 1rem; }
    .stat-value { font-size: 1.5rem; }
    .stat-icon { font-size: 2rem; }
    .stats-grid { gap: 0.75rem; }
    .navbar-brand .logo-text { display: none; }
    .tariff-card { 
        padding: 1rem; 
        min-height: 220px;
        overflow: visible;
    }
    .tariff-price { font-size: 1.5rem; }
    .tariff-name { font-size: 0.95rem; }
    .tariff-features li { font-size: 0.75rem; padding: 0.25rem 0; }
    .tariff-features .icon { font-size: 0.85rem; }
    .page-header { margin-bottom: 1.5rem; }
    
    .tariff-topup-btn {
        min-height: 3.5rem;
        padding: 0.625rem 0.375rem;
        font-size: 0.8125rem;
    }
    
    .tariff-topup-text {
        font-size: 0.8125rem;
    }
    
    .tariff-topup-amount {
        font-size: 0.6875rem;
    }
    
    .tariff-topup-btn {
        padding: 0.625rem 0.375rem;
        font-size: 0.8125rem;
        min-height: 2.75rem;
    }
    
    .tariff-topup-text {
        font-size: 0.8125rem;
    }
    
    .tariff-topup-amount {
        font-size: 0.6875rem;
    }
    
    /* Ещё компактнее кнопки авторизации */
    .auth-buttons .btn-sm-mobile {
        padding: 0.4rem 0.6rem;
        font-size: 0.75rem;
    }
    
    /* Auth container на маленьких экранах */
    .auth-container {
        padding: 1rem 0.5rem;
        min-height: calc(100vh - 150px);
    }
    
    .auth-card {
        padding: 1.25rem;
        margin: 0;
        border-radius: var(--radius-lg);
    }
    
    .auth-title {
        font-size: 1.4rem;
        margin-bottom: 1.5rem;
    }
    
    .form-group {
        margin-bottom: 1rem;
    }
    
    .form-input {
        padding: 0.75rem 1rem;
    }
}

/* ==================== Animations ==================== */
@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

@keyframes float {
    0%, 100% { transform: translateY(0); }
    50% { transform: translateY(-10px); }
}

.animate-pulse { animation: pulse 2s infinite; }
.animate-float { animation: float 3s ease-in-out infinite; }

/* ==================== Scrollbar ==================== */
::-webkit-scrollbar { width: 8px; height: 8px; }
::-webkit-scrollbar-track { background: var(--color-bg); }
::-webkit-scrollbar-thumb { background: var(--color-border); border-radius: 4px; }
::-webkit-scrollbar-thumb:hover { background: var(--color-primary); }

/* ==================== Selection ==================== */
::selection { background: var(--color-primary); color: white; }

/* ==================== Telegram Mini App ==================== */
/* Стили для корректного отображения в Telegram WebApp */
body.tg-webapp {
    padding-top: 0;
}

body.tg-webapp .navbar {
    display: none;
}

body.tg-webapp .main-content {
    padding-top: 1rem;
    padding-bottom: 5rem; /* Место для нижней навигации */
}

body.tg-webapp .footer {
    display: none;
}

/* Нижняя навигация для Telegram Mini App - Glass Pill */
.bottom-nav {
    display: none;
    position: fixed;
    bottom: 0;
    left: 0;
    right: 0;
    padding: 12px 16px;
    padding-bottom: calc(12px + env(safe-area-inset-bottom, 0px));
    z-index: 100;
    justify-content: center;
}

body.tg-webapp .bottom-nav {
    display: flex;
}

.bottom-nav-inner {
    display: flex;
    gap: 6px;
    background: rgba(var(--nav-bg-rgb, 22, 22, 22), 0.75);
    border: none;
    border-radius: 50px;
    padding: 8px 12px;
    backdrop-filter: blur(24px) saturate(180%);
    -webkit-backdrop-filter: blur(24px) saturate(180%);
    box-shadow: 0 4px 24px rgba(0,0,0,0.3);
    position: relative;
}

.bottom-nav-item {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 3px;
    padding: 10px 14px;
    border-radius: 30px;
    color: rgba(255,255,255,0.5);
    text-decoration: none;
    font-size: 10px;
    font-weight: 500;
    background: none;
    border: none;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    z-index: 1;
    min-width: auto;
}

.bottom-nav-item:hover {
    color: rgba(255,255,255,0.8);
    background: none;
}

.bottom-nav-item.active {
    background: var(--primary);
    color: #fff;
    box-shadow: 0 4px 16px rgba(139, 92, 246, 0.4);
    transform: scale(1.02);
}

.bottom-nav-icon {
    font-size: 20px;
    filter: drop-shadow(0 2px 4px rgba(0,0,0,0.3));
}

.bottom-nav-item.active .bottom-nav-icon {
    filter: drop-shadow(0 0 8px rgba(255,255,255,0.5));
}

.bottom-nav-text {
    font-size: 10px;
    font-weight: 500;
}

/* ==================== Christmas Garland ==================== */
.garland {
    position: relative;
    width: 100%;
    height: 20px;
    overflow: hidden;
    z-index: 100;
}

.garland-wire {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, 
        transparent 0%, 
        #2d5a3e 10%, 
        #2d5a3e 90%, 
        transparent 100%
    );
}

.garland-lights {
    display: flex;
    justify-content: space-around;
    padding: 0 20px;
}

.garland .light {
    width: 8px;
    height: 12px;
    border-radius: 50% 50% 50% 50% / 30% 30% 70% 70%;
    position: relative;
    top: 2px;
    background: radial-gradient(circle at 30% 30%, #d4a84b, #8b7335);
    box-shadow: 0 0 4px rgba(212, 168, 75, 0.3);
    opacity: 0.3;
}

.garland .light::before {
    content: '';
    position: absolute;
    top: -3px;
    left: 50%;
    transform: translateX(-50%);
    width: 3px;
    height: 3px;
    background: #444;
    border-radius: 2px;
}

/* Мобильная версия гирлянды */
@media (max-width: 768px) {
    .garland .light {
        width: 8px;
        height: 11px;
    }
    .garland-lights {
        padding: 0 10px;
    }
}

/* ==================== Theme Modal ==================== */
.theme-modal-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(4px);
    z-index: 1001;
    align-items: flex-end;
    justify-content: center;
}

.theme-modal-overlay.show {
    display: flex;
}

.theme-modal {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-xl) var(--radius-xl) 0 0;
    width: 100%;
    max-width: 400px;
    padding: 1.5rem;
    padding-bottom: calc(1.5rem + env(safe-area-inset-bottom, 0px));
    animation: slideUp 0.3s ease;
}

@keyframes slideUp {
    from {
        transform: translateY(100%);
        opacity: 0;
    }
    to {
        transform: translateY(0);
        opacity: 1;
    }
}

.theme-modal-title {
    text-align: center;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.25rem;
    color: var(--color-text);
}

.theme-options {
    display: flex;
    justify-content: center;
    gap: 1rem;
}

.theme-option {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    padding: 1rem 1.5rem;
    background: var(--color-bg);
    border: 2px solid var(--color-border);
    border-radius: var(--radius-lg);
    cursor: pointer;
    transition: all var(--transition);
    min-width: 90px;
}

.theme-option:hover {
    border-color: var(--color-primary);
    transform: translateY(-2px);
}

.theme-option.active {
    border-color: var(--color-primary);
    background: var(--color-primary-light);
}

.theme-option-icon {
    font-size: 2rem;
}

.theme-option-name {
    font-size: 0.8rem;
    color: var(--color-text-secondary);
    font-weight: 500;
}


/* ==================== Telegram Mini App Styles ==================== */
body.tg-webapp .navbar {
    display: none;
}

body.tg-webapp .footer {
    display: none;
}

body.tg-webapp .main-content {
    padding-top: 1rem;
}

/* ==================== Notifications Modal ==================== */
.notifications-backdrop,
.notifications-modal-overlay {
    display: none !important;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    height: 100% !important;
    background: rgba(0, 0, 0, 0.6) !important;
    backdrop-filter: blur(4px);
    z-index: 99999 !important;
    align-items: center !important;
    justify-content: center !important;
    padding: 1rem !important;
    overflow: auto !important;
}

.notifications-backdrop.show,
.notifications-modal-overlay.show {
    display: flex !important;
}

body.tg-webapp .notifications-backdrop.show {
    display: flex !important;
    z-index: 99999 !important;
    align-items: center !important;
    justify-content: center !important;
    padding-top: 0 !important;
}

@media (max-width: 768px) {
    .notifications-backdrop.show {
        align-items: center !important;
        justify-content: center !important;
        padding-top: 1rem !important;
    }
    
    .notifications-modal {
        width: calc(100% - 1rem) !important;
        max-width: 100% !important;
        margin: 0 auto !important;
    }
}

.notifications-modal {
    background: var(--color-surface) !important;
    border: 1px solid var(--color-border) !important;
    border-radius: var(--radius-lg) !important;
    width: calc(100% - 2rem) !important;
    max-width: 400px !important;
    max-height: 70vh !important;
    min-height: 200px !important;
    overflow: hidden !important;
    animation: fadeIn 0.2s ease;
    position: relative !important;
    z-index: 100000 !important;
    margin: 0 auto !important;
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    transform: translateY(0) !important;
    color: var(--color-text) !important;
}

body.tg-webapp .notifications-modal {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 100000 !important;
    background: var(--color-surface) !important;
    color: var(--color-text) !important;
}

body.tg-webapp .notifications-backdrop.show .notifications-modal {
    display: block !important;
    opacity: 1 !important;
    visibility: visible !important;
    position: relative !important;
    z-index: 100000 !important;
    background: var(--color-surface) !important;
    color: var(--color-text) !important;
    transform: translateY(0) !important;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

.notifications-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1rem 1.25rem;
    border-bottom: 1px solid var(--color-border);
}

.notifications-title {
    font-size: 1rem;
    font-weight: 600;
}

.notifications-body {
    padding: 1rem;
    overflow-y: auto;
    max-height: calc(70vh - 60px);
}

.notifications-empty {
    text-align: center;
    padding: 2rem 1rem;
    color: var(--color-text-secondary);
}

.notifications-empty-icon {
    font-size: 3rem;
    display: block;
    margin-bottom: 0.75rem;
}

.notifications-empty p {
    margin: 0;
    font-size: 0.9rem;
}

.payment-notifications-section {
    margin-bottom: 1rem;
}

.payment-notifications-section:last-child {
    margin-bottom: 0;
}

.payment-notifications-section-title {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9375rem;
    margin-bottom: 0.75rem;
    padding-bottom: 0.5rem;
    border-bottom: 1px solid var(--color-border);
}

.payment-notifications-section-title i {
    color: var(--color-primary);
    font-size: 1.125rem;
}

.payment-notifications-list {
    padding: 0;
    max-height: none;
    overflow-y: visible;
}

.payment-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    background: var(--color-bg-secondary);
    transition: all var(--transition-fast);
}

.payment-notification-item:last-child {
    margin-bottom: 0;
}

.payment-notification-item:hover {
    background: var(--color-surface-hover);
}

.payment-notification-icon {
    color: var(--color-success);
    font-size: 1.125rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.payment-notification-content {
    flex: 1;
    min-width: 0;
}

.payment-notification-text {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.payment-notification-time {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

.notifications-close {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    font-size: 1.25rem;
    width: 2rem;
    height: 2rem;
}

.notifications-close:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}


/* ==================== Admin Tabs ==================== */
.tabs-container {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
    margin-bottom: 1.5rem;
}

.tab-btn {
    padding: 0.5rem 1rem;
    border-radius: 2rem;
    border: 1px solid var(--color-border);
    background: transparent;
    color: var(--color-text);
    font-size: 0.875rem;
    cursor: pointer;
    transition: var(--transition-fast);
    text-decoration: none;
    display: inline-block;
}

.tab-btn:hover {
    background: var(--color-surface-hover);
    border-color: var(--color-primary);
}

.tab-btn.active {
    background: var(--color-primary);
    border-color: var(--color-primary);
    color: white;
}

/* ==================== Admin Stats Cards ==================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 1rem;
    margin-bottom: 1.5rem;
}

@media (min-width: 768px) {
    .stats-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

.stat-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--color-border);
}

.stat-label {
    color: var(--color-text-secondary);
    font-size: 0.75rem;
    margin-bottom: 0.5rem;
}

.stat-value {
    font-size: 1.75rem;
    font-weight: 700;
    color: var(--color-text);
}

.stat-compare {
    font-size: 0.75rem;
    color: var(--color-text-secondary);
    margin-top: 0.25rem;
}

/* ==================== Admin Charts ==================== */
.chart-card {
    background: var(--color-surface);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    border: 1px solid var(--color-border);
    margin-bottom: 1.5rem;
}

.chart-title {
    font-size: 0.875rem;
    color: var(--color-text-secondary);
    margin-bottom: 1rem;
}

.chart-container {
    height: 120px;
    position: relative;
}

/* ==================== Payment Notifications ==================== */
.payment-notifications {
    background: var(--color-surface);
    border: 1px solid var(--color-border);
    border-radius: var(--radius-lg);
    margin-bottom: 1.5rem;
    box-shadow: var(--shadow);
    overflow: hidden;
    animation: slideDown 0.3s ease-out;
}

@keyframes slideDown {
    from {
        opacity: 0;
        transform: translateY(-10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

@keyframes slideUp {
    from {
        opacity: 1;
        transform: translateY(0);
    }
    to {
        opacity: 0;
        transform: translateY(-10px);
    }
}

.payment-notifications-header {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1.25rem;
    background: var(--color-bg-secondary);
    border-bottom: 1px solid var(--color-border);
}

.payment-notifications-header i {
    color: var(--color-primary);
    font-size: 1.25rem;
}

.payment-notifications-header span {
    flex: 1;
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9375rem;
}

.payment-notifications-close {
    background: none;
    border: none;
    color: var(--color-text-secondary);
    cursor: pointer;
    padding: 0.25rem;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
}

.payment-notifications-close:hover {
    background: var(--color-surface-hover);
    color: var(--color-text);
}

.payment-notifications-list {
    padding: 0.75rem;
    max-height: 300px;
    overflow-y: auto;
}

.payment-notification-item {
    display: flex;
    align-items: flex-start;
    gap: 0.75rem;
    padding: 0.75rem;
    border-radius: var(--radius-md);
    margin-bottom: 0.5rem;
    background: var(--color-bg-secondary);
    transition: all var(--transition-fast);
}

.payment-notification-item:last-child {
    margin-bottom: 0;
}

.payment-notification-item:hover {
    background: var(--color-surface-hover);
}

.payment-notification-icon {
    color: var(--color-success);
    font-size: 1.125rem;
    margin-top: 0.125rem;
    flex-shrink: 0;
}

.payment-notification-content {
    flex: 1;
    min-width: 0;
}

.payment-notification-text {
    font-weight: 600;
    color: var(--color-text);
    font-size: 0.9375rem;
    margin-bottom: 0.25rem;
}

.payment-notification-time {
    font-size: 0.8125rem;
    color: var(--color-text-secondary);
}

@media (max-width: 768px) {
    .payment-notifications {
        margin-bottom: 1rem;
        border-radius: var(--radius-md);
    }
    
    .payment-notifications-header {
        padding: 0.875rem 1rem;
    }
    
    .payment-notifications-list {
        padding: 0.5rem;
        max-height: 250px;
    }
    
    .payment-notification-item {
        padding: 0.625rem;
    }
}
