/**
 * PrimeX IPTV - Enterprise Admin Panel CSS
 * Glassmorphism Design with Professional UI
 */

/* ============================================
   GLASSMORPHISM & THEME VARIABLES
   ============================================ */
:root {
    /* Glassmorphism Variables */
    --glass-bg-dark: rgba(29, 39, 58, 0.4);
    --glass-bg-light: rgba(255, 255, 255, 0.5);
    --glass-border-dark: rgba(255, 255, 255, 0.1);
    --glass-border-light: rgba(0, 0, 0, 0.08);
    --glass-blur: blur(16px);
    
:root {
    /* Premium Gold Brand Colors */
    --primary: #D4AF37;
    --primary-dark: #C5A028;
    --primary-light: #F4D03F;
    --gold-gradient: linear-gradient(135deg, #F4D03F 0%, #D4AF37 50%, #C5A028 100%);
    
    /* Apple-Style Premium Colors */
    --secondary: #5856D6;
    --success: #34C759;
    --warning: #FF9500;
    --danger: #FF3B30;
    --info: #5AC8FA;
    
    /* Premium Neutral Colors - Apple-inspired */
    --bg-primary: #000000;
    --bg-secondary: #1C1C1E;
    --bg-tertiary: #2C2C2E;
    --bg-hover: #3A3A3C;
    --bg-elevated: #1C1C1E;
    
    /* Text Colors - High Contrast */
    --text-primary: #FFFFFF;
    --text-secondary: #EBEBF5;
    --text-muted: #8E8E93;
    
    /* Border - Subtle */
    --border-color: #38383A;
    --border-radius: 12px;
    
    /* Sidebar */
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 70px;
    
    /* Apple-Style Shadows - Soft and Elegant */
    --shadow-sm: 0 1px 3px 0 rgba(0, 0, 0, 0.3);
    --shadow-md: 0 4px 12px 0 rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 10px 24px 0 rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 20px 40px 0 rgba(0, 0, 0, 0.6);
    
    /* Smooth Transitions - Apple-like */
    --transition: all 0.35s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    --transition-fast: all 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    
    /* Unique Sidebar Item Colors - Premium Palette */
    --color-dashboard: #8B7EFF;
    --color-users: #32D74B;
    --color-subscriptions: #5E5CE6;
    --color-plans: #BF5AF2;
    --color-codes: #FF9F0A;
    --color-device-activation: #64D2FF;
    --color-channels: #30D158;
    --color-categories: #FFD60A;
    --color-vod: #FF2D55;
    --color-servers: #FF375F;
    --color-devices: #5AC8FA;
    --color-logs: #AC8E68;
    --color-settings: #8E8E93;
    --color-api-settings: #00C7BE;
    --color-security: #FF453A;
    --color-notifications: #FF9F0A;
    --color-admin-management: #BF5AF2;
    
    /* Gradients - Subtle Apple-style */
    --gradient-primary: linear-gradient(135deg, #007AFF 0%, #5856D6 100%);
    --gradient-success: linear-gradient(135deg, #34C759 0%, #30D158 100%);
    --gradient-warning: linear-gradient(135deg, #FF9500 0%, #FFD60A 100%);
    --gradient-danger: linear-gradient(135deg, #FF3B30 0%, #FF375F 100%);
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    overflow-x: hidden;
    width: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'SF Pro Display', 'SF Pro Text', 'Helvetica Neue', 'Segoe UI', Roboto, sans-serif;
    line-height: 1.5;
    overflow-x: hidden;
    width: 100%;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    letter-spacing: -0.01em;
    transition: background-color 0.5s ease, color 0.3s ease;
}

/* Dark Theme (Default) */
body.dark-theme {
    background: linear-gradient(245deg, #0f172a, #131b31, #2e1a47, #0e1f4a);
    background-size: 400% 400%;
    animation: gradient-flow 25s ease-in-out infinite;
    color: #f8fafc;
}

/* Light Theme */
body.light-theme {
    background: linear-gradient(245deg, #f1f5f9, #f3f6ff, #eaf3ff, #e7ebf2);
    background-size: 400% 400%;
    animation: gradient-flow 25s ease-in-out infinite;
    color: #1e293b;
}

/* Light Theme - Global Text Colors */
.light-theme,
.light-theme * {
    --text-primary: #1e293b;
    --text-secondary: #475569;
    --text-muted: #64748b;
}

.light-theme .sidebar {
    background: rgba(255, 255, 255, 0.3);
    border-right: none;
}

.light-theme #sidebar-collapse-btn {
    background: rgba(255, 255, 255, 1);
    color: rgba(0, 0, 0, 1);
    border: none;
}

.light-theme #sidebar-collapse-btn:hover {
    transform: scale(1.1);
}

.light-theme .nav-item {
    color: rgba(0, 0, 0, 0.6);
}

.light-theme .nav-item:hover,
.light-theme .nav-item:focus {
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 1);
}

.light-theme .nav-item.active {
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 1);
}

.light-theme .nav-item.active i {
    color: rgba(255, 255, 255, 1);
}

.light-theme .sidebar-header {
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.light-theme .logo,
.light-theme .logo-text {
    color: #1e293b;
}

.light-theme .nav-item {
    color: #475569;
}

.light-theme .nav-item:hover {
    color: #1e293b;
    background: rgba(0, 0, 0, 0.05);
}

.light-theme .nav-item i {
    color: #64748b;
}

.light-theme .nav-item:hover i {
    color: #1e293b;
}

.light-theme .user-name,
.light-theme .user-role {
    color: #1e293b;
}

.light-theme .btn-logout {
    color: #1e293b;
    border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .btn-logout:hover {
    background: #ef4444;
    color: white;
}

.light-theme .top-bar {
    background: rgba(255, 255, 255, 0.9);
    border-bottom-color: rgba(0, 0, 0, 0.1);
}

.light-theme .page-title {
    color: #1e293b;
}

.light-theme .stat-label {
    color: #64748b;
}

.light-theme .stat-value {
    color: #1e293b;
}

.light-theme .card-title {
    color: #1e293b;
}

.light-theme .card-body {
    color: #475569;
}

.light-theme .form-label {
    color: #475569;
}

.light-theme .btn-primary {
    background: #6366f1;
    color: white;
}

.light-theme .btn-secondary {
    background: rgba(0, 0, 0, 0.08);
    color: #1e293b;
    border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .btn-secondary:hover {
    background: rgba(0, 0, 0, 0.12);
}

/* Light Theme - Additional Elements */
.light-theme h1,
.light-theme h2,
.light-theme h3,
.light-theme h4,
.light-theme h5,
.light-theme h6 {
    color: #1e293b;
}

.light-theme p,
.light-theme span,
.light-theme div {
    color: inherit;
}

.light-theme .badge {
    color: white;
}

.light-theme .badge-success {
    background: #22c55e;
    color: white;
}

.light-theme .badge-warning {
    background: #f59e0b;
    color: white;
}

.light-theme .badge-danger {
    background: #ef4444;
    color: white;
}

.light-theme .badge-info {
    background: #3b82f6;
    color: white;
}

.light-theme .badge-primary {
    background: #6366f1;
    color: white;
}

.light-theme table {
    color: #1e293b;
}

.light-theme th {
    color: #475569;
}

.light-theme td {
    color: #1e293b;
}

.light-theme .empty-state {
    color: #64748b;
}

.light-theme .empty-state h3 {
    color: #475569;
}

.light-theme .resource-card-title {
    color: #1e293b;
}

.light-theme .resource-card-value {
    color: #1e293b;
}

.light-theme .resource-card-label {
    color: #64748b;
}

.light-theme .modal-title {
    color: #1e293b;
}

.light-theme .modal-body {
    color: #475569;
}

.light-theme input::placeholder,
.light-theme textarea::placeholder {
    color: #94a3b8;
}

.light-theme select {
    color: #1e293b;
}

.light-theme option {
    color: #1e293b;
}

.light-theme .loading-text {
    color: #1e293b;
}

.light-theme .notification-dot {
    background: #ef4444;
}

.light-theme .security-status-indicator {
    background: #22c55e;
}

.light-theme .security-status-indicator.warning {
    background: #f59e0b;
}

.light-theme .security-status-indicator.danger {
    background: #ef4444;
}

/* Session Timer */
.session-timer {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    cursor: help;
    transition: all 0.3s ease;
}

.session-timer i {
    font-size: 16px;
}

.session-timer.caution {
    background: rgba(251, 191, 36, 0.1);
    border-color: rgba(251, 191, 36, 0.3);
    color: #f59e0b;
}

.session-timer.warning {
    background: rgba(239, 68, 68, 0.1);
    border-color: rgba(239, 68, 68, 0.3);
    color: #ef4444;
    animation: pulse-timer 1s infinite;
}

@keyframes pulse-timer {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

.light-theme .session-timer {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.1);
    color: #475569;
}

.light-theme .session-timer.caution {
    background: rgba(251, 191, 36, 0.15);
    border-color: rgba(251, 191, 36, 0.4);
    color: #d97706;
}

.light-theme .session-timer.warning {
    background: rgba(239, 68, 68, 0.15);
    border-color: rgba(239, 68, 68, 0.4);
    color: #dc2626;
}

/* Interactive Charts Grid */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(450px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.chart-card {
    padding: 20px;
    border-radius: 16px;
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.chart-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.3);
}

.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 10px;
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
}

.chart-title i {
    font-size: 20px;
}

.chart-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.chart-container {
    position: relative;
    height: 200px;
    margin: 16px 0;
}

.chart-footer {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding-top: 12px;
    border-top: 1px solid rgba(255, 255, 255, 0.1);
    font-size: 13px;
    color: var(--text-muted);
}

.light-theme .chart-footer {
    border-top-color: rgba(0, 0, 0, 0.1);
}

/* Status Indicator */
.status-indicator {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 16px;
    background: rgba(34, 197, 94, 0.1);
    border: 1px solid rgba(34, 197, 94, 0.3);
    border-radius: 10px;
    font-size: 13px;
    font-weight: 500;
    color: #22c55e;
}

.status-dot {
    width: 8px;
    height: 8px;
    border-radius: 50%;
    background: #22c55e;
}

.status-dot.active {
    animation: pulse-dot 2s infinite;
}

@keyframes pulse-dot {
    0%, 100% {
        opacity: 1;
        transform: scale(1);
    }
    50% {
        opacity: 0.5;
        transform: scale(1.2);
    }
}

.light-theme .status-indicator {
    background: rgba(34, 197, 94, 0.15);
    border-color: rgba(34, 197, 94, 0.4);
}

/* Responsive Charts */
@media (max-width: 1200px) {
    .charts-grid {
        grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
    }
}

@media (max-width: 768px) {
    .sidebar {
        position: fixed;
        left: 0;
        transform: translateX(-100%);
        transition: transform 0.3s ease;
        z-index: 2000;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
    }
    
    .sidebar.collapsed {
        transform: translateX(-100%);
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }
    
    .chart-container {
        height: 180px;
    }
    
    .chart-card {
        padding: 16px;
    }
    
    .chart-title {
        font-size: 14px;
    }
    
    .chart-value {
        font-size: 20px;
    }
}

/* Live Dashboard Cards - Static Display */
.live-stat-card {
    position: relative;
}

/* Mini Charts in Dashboard Cards - Premium Rendering */
.mini-chart-container {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 45px;
    opacity: 0.7;
    pointer-events: none;
    overflow: hidden;
    mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 70%, rgba(0,0,0,0) 100%);
    -webkit-mask-image: linear-gradient(to top, rgba(0,0,0,1) 0%, rgba(0,0,0,0.8) 70%, rgba(0,0,0,0) 100%);
}

.stat-card {
    position: relative;
    padding-bottom: 55px;
    overflow: hidden;
}

.mini-chart-container canvas {
    width: 100% !important;
    height: 100% !important;
    image-rendering: -webkit-optimize-contrast;
    image-rendering: crisp-edges;
}

.stat-card::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    height: 50px;
    background: linear-gradient(to top, 
                rgba(0, 0, 0, 0.1) 0%, 
                transparent 100%);
    pointer-events: none;
    opacity: 0.5;
}

.light-theme .stat-card::after {
    background: linear-gradient(to top, 
                rgba(0, 0, 0, 0.03) 0%, 
                transparent 100%);
}

@keyframes gradient-flow {
    0% { background-position: 0% 50%; }
    50% { background-position: 100% 50%; }
    100% { background-position: 0% 50%; }
}

/* Background Flares */
.flare {
    position: fixed;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0;
    animation: float 35s ease-in-out infinite alternate;
    z-index: -1;
    transition: opacity 1s ease-in-out;
}

.flare.cyan {
    width: 500px;
    height: 500px;
    background: #00ffff;
    top: 10%;
    left: 20%;
    opacity: 0.15;
}

.flare.magenta {
    width: 400px;
    height: 400px;
    background: #ff00ff;
    bottom: 10%;
    right: 15%;
    animation-delay: 3s;
    opacity: 0.2;
}

.light-theme .flare.cyan {
    opacity: 0.2;
}

.light-theme .flare.magenta {
    opacity: 0.25;
    background: #a855f7;
}

@keyframes float {
    0% { transform: translate(0, 0) rotate(0deg); }
    100% { transform: translate(150px, -200px) rotate(180deg); }
}

/* Directional Flare */
.directional-flare {
    position: fixed;
    top: 50%;
    left: 50%;
    width: 350px;
    height: 350px;
    background: radial-gradient(closest-side, rgba(255, 255, 255, 0.025), transparent 80%);
    opacity: 0;
    filter: blur(100px);
    border-radius: 50%;
    pointer-events: none;
    z-index: 1;
    transform: translate(-50%, -50%);
    transition: opacity 0.3s ease-out, transform 0.1s linear;
}

.light-theme .directional-flare {
    background: radial-gradient(closest-side, rgba(0, 0, 0, 0.05), transparent 80%);
}

/* Glassmorphism UI Elements */
.glass-ui {
    backdrop-filter: var(--glass-blur) saturate(180%);
    -webkit-backdrop-filter: var(--glass-blur) saturate(180%);
    background-color: var(--glass-bg-dark);
    border: 1px solid var(--glass-border-dark);
    transition: background-color 0.3s ease, border-color 0.3s ease;
}

.light-theme .glass-ui {
    background-color: var(--glass-bg-light);
    border: 1px solid var(--glass-border-light);
}

.glass-card {
    background: rgba(255, 255, 255, 0.1);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.15);
    transition: background 0.3s ease, border 0.3s ease, transform 0.3s ease;
}

.dark-theme .glass-card {
    background: rgba(15, 23, 42, 0.3);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-bottom: 1px solid rgba(255, 255, 255, 0.2);
    border-top: 1px solid rgba(255, 255, 255, 0.15);
}

.glass-card:hover {
    background: rgba(255, 255, 255, 0.55);
    transform: translateY(-2px);
}

.dark-theme .glass-card:hover {
    background: rgba(15, 23, 42, 0.5);
    border: 1px solid rgba(255, 255, 255, 0.12);
}

/* ============================================
   LOADING OVERLAY
   ============================================ */
.loading-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.95);
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    z-index: 9999;
    opacity: 0;
    visibility: hidden;
    transition: var(--transition);
}

.loading-overlay.active {
    opacity: 1;
    visibility: visible;
}

.loading-spinner {
    width: 50px;
    height: 50px;
    border: 4px solid var(--bg-tertiary);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
}

.loading-text {
    margin-top: 20px;
    color: var(--text-secondary);
    font-size: 14px;
}

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

/* ============================================
   MAIN CONTAINER
   ============================================ */
.admin-container {
    display: flex;
    min-height: 100vh;
    width: 100%;
    overflow: hidden;
}

/* ============================================
   SIDEBAR
   ============================================ */
/* Apple-Style Sidebar */
.sidebar {
    width: 240px;
    min-width: 240px;
    background: rgba(0, 0, 0, 0.3);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border-right: none;
    display: flex;
    flex-direction: column;
    flex-shrink: 0;
    height: 100vh;
    position: sticky;
    top: 0;
    left: 0;
    z-index: 1000;
    transition: width 0.3s ease, min-width 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5),
                0 4px 6px -2px rgba(0, 0, 0, 0.5);
    overflow-y: auto;
    overflow-x: hidden;
    border-radius: 0;
    padding: 16px;
}

.sidebar.collapsed {
    width: auto;
    min-width: auto;
}

.sidebar-header {
    padding: 0 0 16px 0;
    border-bottom: none;
    display: flex;
    align-items: center;
    justify-content: space-between;
    min-height: auto;
    position: relative;
    margin-bottom: 20px;
}

.logo {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 18px;
    font-weight: 700;
    color: rgba(255, 255, 255, 1);
    overflow: hidden;
}

.logo-image {
    height: 32px;
    width: 32px;
    min-width: 32px;
    transition: all 0.3s ease;
}

.logo-text {
    white-space: nowrap;
    transition: opacity 0.3s ease, width 0.3s ease;
}

.sidebar.collapsed .logo-text {
    display: none;
}

.sidebar-controls {
    display: flex;
    gap: 8px;
}

.sidebar.collapsed .sidebar-controls {
    justify-content: center;
}

#sidebar-collapse-btn {
    position: absolute;
    top: 20px;
    right: -8px;
    background: rgba(0, 0, 0, 1);
    color: rgba(255, 255, 255, 1);
    border: none;
    width: 24px;
    height: 24px;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: transform 0.3s ease;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5),
                0 4px 6px -2px rgba(0, 0, 0, 0.5);
    z-index: 1001;
    padding: 4px;
}

#sidebar-collapse-btn:hover {
    transform: scale(1.1);
}

#sidebar-collapse-btn i {
    font-size: 10px;
    transition: transform 0.3s ease;
}

.sidebar.collapsed #sidebar-collapse-btn i {
    transform: rotate(180deg);
}

.sidebar-toggle {
    background: none;
    border: none;
    color: var(--text-secondary);
    cursor: pointer;
    padding: 8px;
    border-radius: 6px;
    transition: var(--transition);
}

.sidebar-toggle:hover {
    background: var(--bg-tertiary);
    color: var(--text-primary);
}

/* Sidebar Navigation */
.sidebar-nav {
    flex: 1;
    overflow-y: auto;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Custom Scrollbars */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

.dark-theme ::-webkit-scrollbar-track {
    background: rgba(30, 41, 59, 0.5);
}

.dark-theme ::-webkit-scrollbar-thumb {
    background: rgba(71, 85, 105, 0.7);
    border-radius: 10px;
}

.dark-theme ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.light-theme ::-webkit-scrollbar-track {
    background: rgba(226, 232, 240, 0.5);
}

.light-theme ::-webkit-scrollbar-thumb {
    background: rgba(148, 163, 184, 0.7);
    border-radius: 10px;
}

.light-theme ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

.sidebar-nav::-webkit-scrollbar {
    width: 6px;
}

.sidebar-nav::-webkit-scrollbar-track {
    background: transparent;
}

.sidebar-nav::-webkit-scrollbar-thumb {
    background: rgba(71, 85, 105, 0.5);
    border-radius: 3px;
}

/* Exact Glassmorphism Navigation Items */
.nav-item {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 16px;
    color: rgba(148, 163, 184, 1);
    text-decoration: none;
    transition: all 0.3s ease;
    position: relative;
    margin: 0 0 8px 0;
    border-radius: 12px;
    font-weight: 700;
    font-size: 18px;
    white-space: nowrap;
    overflow: hidden;
}

.nav-item i {
    font-size: 18px;
    width: 18px;
    min-width: 18px;
    text-align: center;
    transition: all 0.3s ease;
}

.nav-item span {
    transition: opacity 0.3s ease, width 0.3s ease;
    overflow: hidden;
}

.sidebar.collapsed .nav-item {
    padding: 16px;
    justify-content: center;
}

.sidebar.collapsed .nav-item span {
    display: none;
}

.nav-item:hover {
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 1);
}

.nav-item:focus {
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 1);
    outline: none;
}

.nav-item.active {
    background: rgba(0, 0, 0, 0.4);
    color: rgba(255, 255, 255, 1);
}

.nav-item.active i {
    color: rgba(255, 255, 255, 1);
}

.nav-item.active {
    background: rgba(255, 255, 255, 0.12);
    color: var(--text-primary);
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
    font-weight: 500;
}

.light-theme .nav-item.active {
    background-color: rgba(226, 232, 240, 0.8);
    color: #1e293b;
}

.nav-item.active i {
    color: #6366f1;
}

.light-theme .nav-item.active i {
    color: #818cf8;
}

.nav-item .badge {
    margin-left: auto;
    background: var(--danger);
    color: white;
    padding: 3px 9px;
    border-radius: 10px;
    font-size: 11px;
    font-weight: 600;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.2);
}

/* Unique Colors for Each Sidebar Item */
.nav-item[href="#dashboard"] i { color: var(--color-dashboard); }
.nav-item[href="#users"] i { color: var(--color-users); }
.nav-item[href="#subscriptions"] i { color: var(--color-subscriptions); }
.nav-item[href="#plans"] i { color: var(--color-plans); }
.nav-item[href="#codes"] i { color: var(--color-codes); }
.nav-item[href="#device-activation"] i { color: var(--color-device-activation); }
.nav-item[href="#channels"] i { color: var(--color-channels); }
.nav-item[href="#categories"] i { color: var(--color-categories); }
.nav-item[href="#vod"] i { color: var(--color-vod); }
.nav-item[href="#servers"] i { color: var(--color-servers); }
.nav-item[href="#devices"] i { color: var(--color-devices); }
.nav-item[href="#logs"] i { color: var(--color-logs); }
.nav-item[href="#settings"] i { color: var(--color-settings); }
.nav-item[href="#api-settings"] i { color: var(--color-api-settings); }
.nav-item[href="#security"] i { color: var(--color-security); }
.nav-item[href="#notifications"] i { color: var(--color-notifications); }
.nav-item[href="#admin-management"] i { color: var(--color-admin-management); }

/* Active State - Icon Glows */
.nav-item.active[href="#dashboard"] i { 
    color: var(--color-dashboard); 
    filter: drop-shadow(0 0 8px var(--color-dashboard));
}
.nav-item.active[href="#users"] i { 
    color: var(--color-users); 
    filter: drop-shadow(0 0 8px var(--color-users));
}
.nav-item.active[href="#subscriptions"] i { 
    color: var(--color-subscriptions); 
    filter: drop-shadow(0 0 8px var(--color-subscriptions));
}
.nav-item.active[href="#plans"] i { 
    color: var(--color-plans); 
    filter: drop-shadow(0 0 8px var(--color-plans));
}
.nav-item.active[href="#codes"] i { 
    color: var(--color-codes); 
    filter: drop-shadow(0 0 8px var(--color-codes));
}
.nav-item.active[href="#device-activation"] i { 
    color: var(--color-device-activation); 
    filter: drop-shadow(0 0 8px var(--color-device-activation));
}
.nav-item.active[href="#channels"] i { 
    color: var(--color-channels); 
    filter: drop-shadow(0 0 8px var(--color-channels));
}
.nav-item.active[href="#categories"] i { 
.nav-item.active[href="#vod"] i { 
    color: var(--color-vod); 
    filter: drop-shadow(0 0 8px var(--color-vod));
}
    color: var(--color-categories); 
    filter: drop-shadow(0 0 8px var(--color-categories));
}
.nav-item.active[href="#servers"] i { 
    color: var(--color-servers); 
    filter: drop-shadow(0 0 8px var(--color-servers));
}
.nav-item.active[href="#devices"] i { 
    color: var(--color-devices); 
    filter: drop-shadow(0 0 8px var(--color-devices));
}
.nav-item.active[href="#logs"] i { 
    color: var(--color-logs); 
    filter: drop-shadow(0 0 8px var(--color-logs));
}
.nav-item.active[href="#settings"] i { 
    color: var(--color-settings); 
    filter: drop-shadow(0 0 8px var(--color-settings));
}
.nav-item.active[href="#api-settings"] i { 
    color: var(--color-api-settings); 
    filter: drop-shadow(0 0 8px var(--color-api-settings));
}
.nav-item.active[href="#security"] i { 
    color: var(--color-security); 
    filter: drop-shadow(0 0 8px var(--color-security));
}
.nav-item.active[href="#notifications"] i { 
    color: var(--color-notifications); 
    filter: drop-shadow(0 0 8px var(--color-notifications));
}
.nav-item.active[href="#admin-management"] i { 
    color: var(--color-admin-management); 
    filter: drop-shadow(0 0 8px var(--color-admin-management));
}

.sidebar.collapsed .nav-item span:not(.badge) {
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
}

/* Sidebar Footer */
.sidebar-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
}

.user-info {
    display: flex;
    align-items: center;
    gap: 12px;
    margin-bottom: 15px;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: var(--primary);
    display: flex;
    align-items: center;
    justify-content: center;
    color: white;
    font-size: 18px;
}

.user-details {
    flex: 1;
}

.user-name {
    font-weight: 600;
    font-size: 14px;
    color: var(--text-primary);
}

.user-role {
    font-size: 12px;
    color: var(--text-muted);
}

.sidebar.collapsed .user-details {
    display: none;
}

.btn-logout {
    width: 100%;
    padding: 10px;
    background: var(--bg-tertiary);
    border: none;
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    transition: var(--transition);
    font-size: 14px;
}

.btn-logout:hover {
    background: var(--danger);
    color: white;
}

.sidebar.collapsed .btn-logout span {
    display: none;
}

/* ============================================
   MAIN CONTENT
   ============================================ */
.main-content {
    flex: 1;
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
    min-width: 0;
    overflow-x: hidden;
}

/* Top Bar */
/* Apple-Style Top Bar */
.top-bar {
    background: rgba(28, 28, 30, 0.8);
    backdrop-filter: blur(40px) saturate(180%);
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    padding: 16px 32px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    position: sticky;
    top: 0;
    z-index: 100;
    box-shadow: 0 2px 16px rgba(0, 0, 0, 0.3);
    width: 100%;
}

.top-bar-left {
    display: flex;
    align-items: center;
    gap: 20px;
}

.mobile-menu-toggle {
    display: none;
    background: none;
    border: none;
    color: var(--text-primary);
    font-size: 20px;
    cursor: pointer;
}

.page-title {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
}

.top-bar-right {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Header Icons - Unified Design System */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
    margin-right: 12px;
}

.search-box i {
    position: absolute;
    left: 14px;
    color: var(--text-muted);
    font-size: 16px;
    pointer-events: none;
    transition: var(--transition);
}

.search-box input {
    padding: 10px 14px 10px 40px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    width: 250px;
    height: 40px;
    font-size: 14px;
    transition: var(--transition);
}

.search-box input:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-secondary);
    width: 300px;
}

.search-box input:focus + i {
    color: var(--primary);
}

/* Unified Icon Button Styles */
.icon-btn {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 8px;
    background: var(--bg-tertiary);
    border: 1px solid transparent;
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    position: relative;
    transition: var(--transition);
    margin-left: 8px;
}

.icon-btn i {
    font-size: 18px;
    transition: var(--transition);
}

.icon-btn:hover {
    background: var(--bg-hover);
    border-color: var(--border-color);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.icon-btn:active {
    transform: translateY(0);
}

/* Notification Badge */
.notification-dot {
    position: absolute;
    top: 6px;
    right: 6px;
    width: 10px;
    height: 10px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% {
        opacity: 1;
    }
    50% {
        opacity: 0.6;
    }
}

/* User Avatar - Unified with Icon Buttons */
.user-menu {
    margin-left: 8px;
}

.user-avatar-img {
    width: 40px;
    height: 40px;
    min-width: 40px;
    min-height: 40px;
    border-radius: 8px;
    cursor: pointer;
    border: 1px solid transparent;
    transition: var(--transition);
    object-fit: cover;
}

.user-avatar-img:hover {
    border-color: var(--primary);
    transform: translateY(-1px);
}

.user-avatar-img:active {
    transform: translateY(0);
}

/* Content Area */
.content-area {
    flex: 1;
    padding: 30px;
    overflow-y: auto;
    overflow-x: hidden;
    width: 100%;
}

/* ============================================
   CARDS & COMPONENTS - Apple Style
   ============================================ */
.card {
    background: var(--bg-elevated);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
    margin-bottom: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
    backdrop-filter: blur(20px);
    transition: var(--transition);
}

.card:hover {
    border-color: rgba(255, 255, 255, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.5);
    transform: translateY(-2px);
}

.card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.card-title {
    font-size: 20px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
    letter-spacing: -0.02em;
}

.card-body {
    color: var(--text-secondary);
    font-size: 15px;
}

/* Stats Cards */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 20px;
    margin-bottom: 30px;
}

.stat-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: var(--border-radius);
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 15px;
    transition: var(--transition);
}

.stat-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 22px;
    flex-shrink: 0;
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
}

.stat-card:hover .stat-icon {
    transform: scale(1.05) rotate(5deg);
    box-shadow: 0 6px 20px rgba(0, 0, 0, 0.2),
                inset 0 1px 0 rgba(255, 255, 255, 0.15);
}

.stat-icon.primary { 
    background: linear-gradient(145deg, rgba(212, 175, 55, 0.25), rgba(212, 175, 55, 0.1));
    color: #d4af37;
    border: 1px solid rgba(212, 175, 55, 0.3);
}
.stat-icon.success { 
    background: linear-gradient(145deg, rgba(34, 197, 94, 0.25), rgba(34, 197, 94, 0.1));
    color: #22c55e;
    border: 1px solid rgba(34, 197, 94, 0.3);
}
.stat-icon.warning { 
    background: linear-gradient(145deg, rgba(245, 158, 11, 0.25), rgba(245, 158, 11, 0.1));
    color: #f59e0b;
    border: 1px solid rgba(245, 158, 11, 0.3);
}
.stat-icon.danger { 
    background: linear-gradient(145deg, rgba(239, 68, 68, 0.25), rgba(239, 68, 68, 0.1));
    color: #ef4444;
    border: 1px solid rgba(239, 68, 68, 0.3);
}
.stat-icon.info { 
    background: linear-gradient(145deg, rgba(59, 130, 246, 0.25), rgba(59, 130, 246, 0.1));
    color: #3b82f6;
    border: 1px solid rgba(59, 130, 246, 0.3);
}

.stat-details {
    flex: 1;
}

.stat-label {
    font-size: 13px;
    color: var(--text-muted);
    margin-bottom: 5px;
}

.stat-value {
    font-size: 28px;
    font-weight: 700;
    color: var(--text-primary);
}

.stat-change {
    font-size: 12px;
    margin-top: 5px;
}

.stat-change.positive {
    color: var(--success);
}

.stat-change.negative {
    color: var(--danger);
}

/* Tables */
.table-container {
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
}

.data-table thead {
    background: var(--bg-tertiary);
}

.data-table th {
    padding: 12px;
    text-align: left;
    font-weight: 600;
    font-size: 13px;
    color: var(--text-secondary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.data-table td {
    padding: 12px;
    border-top: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.data-table tbody tr {
    transition: var(--transition);
}

.data-table tbody tr:hover {
    background: var(--bg-tertiary);
}

/* Buttons */
/* Apple-Style Buttons */
.btn {
    padding: 11px 22px;
    border-radius: 10px;
    border: none;
    cursor: pointer;
    font-size: 15px;
    font-weight: 600;
    transition: var(--transition-fast);
    display: inline-flex;
    align-items: center;
    gap: 8px;
    letter-spacing: -0.01em;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.3);
}

.btn:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.4);
}

.btn:active {
    transform: translateY(0);
}

.btn-primary {
    background: var(--gradient-primary);
    color: white;
}

.btn-primary:hover {
    filter: brightness(1.1);
}

.btn-success {
    background: var(--gradient-success);
    color: white;
}

.btn-success:hover {
    filter: brightness(1.1);
}

.btn-danger {
    background: var(--gradient-danger);
    color: white;
}

.btn-danger:hover {
    filter: brightness(1.1);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.15);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.15);
}

.btn-sm {
    padding: 7px 14px;
    font-size: 13px;
}

.btn-lg {
    padding: 14px 28px;
    font-size: 16px;
}

/* Badges */
.badge {
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

/* Toast Notifications */
.toast-container {
    position: fixed;
    top: 20px;
    right: 20px;
    z-index: 10000;
}

.toast {
    border-radius: 8px;
    padding: 15px 20px;
    margin-bottom: 10px;
    min-width: 300px;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    display: flex;
    align-items: center;
    gap: 12px;
    animation: slideIn 0.3s ease;
    color: white;
    font-weight: 500;
}

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

/* Solid Color Notifications */
.toast.success {
    background: #22c55e;
    border: 1px solid #16a34a;
}

.toast.error {
    background: #ef4444;
    border: 1px solid #dc2626;
}

.toast.warning {
    background: #f59e0b;
    border: 1px solid #d97706;
}

.toast.info {
    background: #3b82f6;
    border: 1px solid #2563eb;
}

/* Modal with Proper Glassmorphism */
.modal-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.6);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    display: none;
    align-items: center;
    justify-content: center;
    z-index: 9998;
    animation: fadeIn 0.2s ease;
}

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

.modal-overlay.active {
    display: flex;
}

.modal {
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 16px;
    max-width: 600px;
    width: 90%;
    max-height: 90vh;
    overflow-y: auto;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5),
                0 8px 24px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px) scale(0.95);
    }
    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.light-theme .modal {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

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

.modal-title {
    font-size: 20px;
    font-weight: 600;
}

.modal-close {
    background: none;
    border: none;
    color: var(--text-muted);
    font-size: 24px;
    cursor: pointer;
}

.modal-body {
    padding: 20px;
}

.modal-footer {
    padding: 20px;
    border-top: 1px solid var(--border-color);
    display: flex;
    gap: 10px;
    justify-content: flex-end;
}

/* Forms */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 10px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-primary);
    font-size: 14px;
    transition: var(--transition);
}

.form-control:focus {
    outline: none;
    border-color: var(--primary);
}

select.form-control {
    cursor: pointer;
}

textarea.form-control {
    resize: vertical;
    min-height: 100px;
}

/* ============================================
   MODULE CONTAINER & HEADER
   ============================================ */
.module-container {
    width: 100%;
}

.module-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 24px;
    padding-bottom: 16px;
    border-bottom: 1px solid var(--border-color);
}

.module-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 4px 0;
    display: flex;
    align-items: center;
    gap: 12px;
}

.module-header h2 i {
    color: var(--primary);
}

.module-description {
    color: var(--text-muted);
    font-size: 14px;
    margin: 0;
}

/* ============================================
   FILTERS BAR
   ============================================ */
.filters-bar {
    display: flex;
    gap: 12px;
    margin-bottom: 20px;
    flex-wrap: wrap;
}

.filters-bar .search-box {
    flex: 1;
    min-width: 250px;
}

.filter-select {
    padding: 10px 14px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 8px;
    color: var(--text-primary);
    font-size: 14px;
    cursor: pointer;
    transition: var(--transition);
    min-width: 150px;
}

.filter-select:focus {
    outline: none;
    border-color: var(--primary);
    background: var(--bg-secondary);
}

.filter-select option {
    background: var(--bg-secondary);
    color: var(--text-primary);
}

/* ============================================
   ACTION BUTTONS
   ============================================ */
.action-buttons {
    display: flex;
    gap: 8px;
    justify-content: flex-end;
}

.btn-icon {
    width: 32px;
    height: 32px;
    border-radius: 6px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: var(--transition);
    font-size: 14px;
}

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

.btn-icon.btn-danger:hover {
    background: var(--danger);
    color: white;
    border-color: var(--danger);
}

/* ============================================
   PAGINATION
   ============================================ */
.pagination {
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 8px;
    padding: 20px 0;
}

.pagination-btn {
    padding: 8px 12px;
    background: var(--bg-tertiary);
    border: 1px solid var(--border-color);
    border-radius: 6px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: var(--transition);
    font-size: 14px;
    min-width: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
}

.pagination-btn:hover:not(:disabled) {
    background: var(--bg-hover);
    color: var(--text-primary);
    border-color: var(--primary);
}

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

.pagination-btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.pagination-ellipsis {
    color: var(--text-muted);
    padding: 0 4px;
}

/* ============================================
   BADGES
   ============================================ */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 500;
    white-space: nowrap;
}

.badge-primary {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.badge-success {
    background: rgba(16, 185, 129, 0.1);
    color: var(--success);
}

.badge-warning {
    background: rgba(245, 158, 11, 0.1);
    color: var(--warning);
}

.badge-danger {
    background: rgba(239, 68, 68, 0.1);
    color: var(--danger);
}

.badge-info {
    background: rgba(59, 130, 246, 0.1);
    color: var(--info);
}

.badge-secondary {
    background: rgba(148, 163, 184, 0.1);
    color: var(--text-muted);
}

/* ============================================
   FORM ROWS
   ============================================ */
.form-row {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(250px, 1fr));
    gap: 16px;
    margin-bottom: 16px;
}

/* ============================================
   DROPDOWN MENUS - Apple Style
   ============================================ */
.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: transparent;
}

.dropdown-menu {
    position: fixed;
    background: rgba(28, 28, 30, 0.95);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 12px;
    box-shadow: 0 8px 32px rgba(0, 0, 0, 0.6);
    min-width: 220px;
    padding: 8px;
    animation: dropdownFadeIn 0.2s cubic-bezier(0.25, 0.46, 0.45, 0.94);
}

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

.dropdown-header {
    padding: 12px 12px 8px 12px;
}

.dropdown-user-info {
    display: flex;
    flex-direction: column;
    gap: 2px;
}

.dropdown-user-name {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    letter-spacing: -0.01em;
}

.dropdown-user-role {
    font-size: 13px;
    color: var(--text-muted);
}

.dropdown-item {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 10px 12px;
    border-radius: 8px;
    cursor: pointer;
    transition: var(--transition-fast);
    color: var(--text-secondary);
    font-size: 14px;
    font-weight: 500;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 15px;
    color: var(--text-muted);
}

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

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.08);
    margin: 6px 0;
}

/* ============================================
   SECURITY MONITOR
   ============================================ */
.security-monitor-btn {
    position: relative;
}

.security-status-indicator {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 10px;
    height: 10px;
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
    transition: var(--transition-fast);
    background: #8E8E93;
    opacity: 0.5;
}

.security-status-indicator.secure {
    background: #34C759;
    box-shadow: 0 0 8px rgba(52, 199, 89, 0.6);
    opacity: 1;
}

.security-status-indicator.warning {
    background: #FF9500;
    box-shadow: 0 0 8px rgba(255, 149, 0, 0.6);
    animation: securityPulse 2s ease-in-out infinite;
    opacity: 1;
}

.security-status-indicator.threat {
    background: #FF3B30;
    box-shadow: 0 0 12px rgba(255, 59, 48, 0.8);
    animation: securityPulse 1s ease-in-out infinite;
    opacity: 1;
}

@keyframes securityPulse {
    0%, 100% {
        transform: scale(1);
        opacity: 1;
    }
    50% {
        transform: scale(1.2);
        opacity: 0.8;
    }
}

.security-panel {
    position: fixed;
    background: rgba(28, 28, 30, 0.98);
    backdrop-filter: blur(40px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 16px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.7);
    width: 420px;
    max-height: 600px;
    padding: 0;
    animation: dropdownFadeIn 0.3s cubic-bezier(0.25, 0.46, 0.45, 0.94);
    overflow: hidden;
}

.security-panel-header {
    padding: 20px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.security-panel-title {
    display: flex;
    align-items: center;
    gap: 12px;
}

.security-panel-title h3 {
    font-size: 18px;
    font-weight: 700;
    color: var(--text-primary);
    margin: 0;
}

.security-status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.security-status-badge.secure {
    background: rgba(52, 199, 89, 0.15);
    color: #34C759;
}

.security-status-badge.warning {
    background: rgba(255, 149, 0, 0.15);
    color: #FF9500;
}

.security-status-badge.threat {
    background: rgba(255, 59, 48, 0.15);
    color: #FF3B30;
}

.security-status-badge i {
    font-size: 10px;
}

.security-panel-body {
    max-height: 500px;
    overflow-y: auto;
}

.security-stats-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    padding: 20px;
}

.security-stat-card {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 12px;
    padding: 16px;
    transition: var(--transition-fast);
}

.security-stat-card:hover {
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.12);
}

.security-stat-label {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.security-stat-value {
    font-size: 24px;
    font-weight: 700;
    color: var(--text-primary);
}

.security-stat-value.critical {
    color: #FF3B30;
}

.security-stat-value.warning {
    color: #FF9500;
}

.security-events-list {
    padding: 0 20px 20px 20px;
}

.security-events-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 12px;
}

.security-events-header h4 {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-secondary);
    margin: 0;
    text-transform: uppercase;
    letter-spacing: 0.5px;
}

.security-event-item {
    background: rgba(255, 255, 255, 0.03);
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 10px;
    padding: 12px;
    margin-bottom: 8px;
    transition: var(--transition-fast);
}

.security-event-item:hover {
    background: rgba(255, 255, 255, 0.06);
    border-color: rgba(255, 255, 255, 0.1);
}

.security-event-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 6px;
}

.security-event-type {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 13px;
    font-weight: 600;
    color: var(--text-primary);
}

.security-event-severity {
    padding: 2px 8px;
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
    text-transform: uppercase;
}

.security-event-severity.critical {
    background: rgba(255, 59, 48, 0.15);
    color: #FF3B30;
}

.security-event-severity.high {
    background: rgba(255, 149, 0, 0.15);
    color: #FF9500;
}

.security-event-severity.medium {
    background: rgba(255, 204, 0, 0.15);
    color: #FFCC00;
}

.security-event-severity.low {
    background: rgba(52, 199, 89, 0.15);
    color: #34C759;
}

.security-event-description {
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 6px;
}

.security-event-meta {
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 11px;
    color: var(--text-muted);
}

.security-event-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.security-panel-footer {
    padding: 16px 20px;
    border-top: 1px solid rgba(255, 255, 255, 0.08);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.security-refresh-btn {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 8px 14px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 8px;
    color: var(--text-secondary);
    font-size: 13px;
    font-weight: 500;
    cursor: pointer;
    transition: var(--transition-fast);
}

.security-refresh-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.security-last-update {
    font-size: 11px;
    color: var(--text-muted);
}

/* Responsive */
/* Tablet Responsive */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
        gap: 16px;
    }
    
    .content-area {
        padding: 24px;
    }
    
    .top-bar {
        padding: 12px 20px;
    }
    
    .session-timer {
        padding: 6px 12px;
        font-size: 13px;
    }
}

@media (max-width: 768px) {
    /* Glassmorphism adjustments for mobile */
    .flare {
        width: 300px !important;
        height: 300px !important;
    }
    
    .directional-flare {
        width: 200px;
        height: 200px;
    }
    
    .sidebar {
        position: fixed;
        transform: translateX(-100%);
        z-index: 1000;
        height: 100vh;
    }
    
    .sidebar.mobile-open {
        transform: translateX(0);
        box-shadow: 4px 0 24px rgba(0, 0, 0, 0.3);
    }
    
    .main-content {
        width: 100%;
    }
    
    .mobile-menu-toggle {
        display: block;
    }
    
    .search-box {
        display: none;
    }
    
    .session-timer {
        padding: 4px 8px;
        font-size: 12px;
    }
    
    .session-timer span {
        display: inline;
    }
    
    .top-bar-right {
        gap: 8px;
    }
    
    .icon-btn {
        width: 36px;
        height: 36px;
    }
    
    .page-title {
        font-size: 18px;
    }
    
    .content-area {
        padding: 16px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
        gap: 12px;
    }
    
    .card {
        padding: 16px;
        margin-bottom: 16px;
    }
    
    .module-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 12px;
        padding: 16px;
    }
    
    .table-container {
        overflow-x: auto;
    }
    
    .data-table {
        font-size: 13px;
    }
    
    .data-table th,
    .data-table td {
        padding: 10px 12px;
    }
    
    .search-box input:focus {
        width: 200px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }

    .module-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }

    .filters-bar {
        flex-direction: column;
    }

    .filters-bar .search-box {
        width: 100%;
    }

    .form-row {
        grid-template-columns: 1fr;
    }
}

/* ============================================
   VOD & SERIES MANAGEMENT
   ============================================ */
.vod-manager {
    padding: 20px;
}

.vod-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.tab-btn {
    padding: 12px 24px;
    background: none;
    border: none;
    border-bottom: 3px solid transparent;
    color: var(--text-secondary);
    font-size: 15px;
    font-weight: 600;
    cursor: pointer;
    transition: var(--transition-fast);
    display: flex;
    align-items: center;
    gap: 8px;
}

.tab-btn:hover {
    color: var(--text-primary);
}

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

.vod-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(200px, 1fr));
    gap: 20px;
}

.vod-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
    transition: var(--transition-fast);
}

.vod-card:hover {
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.vod-poster {
    position: relative;
    width: 100%;
    padding-top: 150%;
    background: var(--bg-tertiary);
    overflow: hidden;
}

.vod-poster img {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    object-fit: cover;
}

.no-poster {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 48px;
    color: var(--text-muted);
}

.vod-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    display: flex;
    align-items: center;
    justify-content: center;
    opacity: 0;
    transition: var(--transition-fast);
}

.vod-card:hover .vod-overlay {
    opacity: 1;
}

.vod-info {
    padding: 16px;
}

.vod-info h4 {
    font-size: 15px;
    font-weight: 600;
    color: var(--text-primary);
    margin: 0 0 8px 0;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
}

.vod-meta {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-muted);
    margin-bottom: 8px;
}

.vod-meta span {
    display: flex;
    align-items: center;
    gap: 4px;
}

.vod-stats {
    display: flex;
    gap: 12px;
    font-size: 12px;
    color: var(--text-secondary);
    margin-bottom: 8px;
}

.vod-category {
    display: inline-block;
    padding: 4px 8px;
    background: rgba(212, 175, 55, 0.15);
    color: var(--primary);
    border-radius: 6px;
    font-size: 11px;
    font-weight: 600;
}

.empty-state {
    text-align: center;
    padding: 60px 20px;
}

.empty-state i {
    font-size: 64px;
    color: var(--text-muted);
    margin-bottom: 20px;
}

.empty-state h3 {
    font-size: 24px;
    color: var(--text-primary);
    margin-bottom: 12px;
}

.empty-state p {
    color: var(--text-secondary);
    margin-bottom: 24px;
}

.notification {
    position: fixed;
    top: 80px;
    right: 20px;
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 16px 20px;
    display: flex;
    align-items: center;
    gap: 12px;
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    transform: translateX(400px);
    transition: transform 0.3s cubic-bezier(0.34, 1.56, 0.64, 1);
}

.notification.show {
    transform: translateX(0);
}

.notification.success {
    border-left: 4px solid var(--success);
}

.notification.error {
    border-left: 4px solid var(--danger);
}

.notification.info {
    border-left: 4px solid var(--info);
}

.notification i {
    font-size: 20px;
}

.notification.success i {
    color: var(--success);
}

.notification.error i {
    color: var(--danger);
}

.notification.info i {
    color: var(--info);
}

/* ============================================
   DEVICE ACTIVATION 4K STYLE
   ============================================ */
.device-activation-4k {
    padding: 20px;
}

.info-banner {
    background: rgba(90, 200, 250, 0.1);
    border-left: 4px solid #5AC8FA;
    padding: 16px 20px;
    border-radius: 8px;
    margin-bottom: 24px;
    display: flex;
    gap: 16px;
}

.info-banner i {
    font-size: 24px;
    color: #5AC8FA;
    flex-shrink: 0;
}

.info-banner ol {
    margin: 8px 0 0 0;
    padding-left: 20px;
}

.info-banner li {
    margin: 4px 0;
    color: var(--text-secondary);
}

.activation-tabs {
    display: flex;
    gap: 12px;
    margin-bottom: 24px;
    border-bottom: 1px solid var(--border-color);
}

.devices-grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
    gap: 20px;
}

.device-card {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    padding: 20px;
    transition: var(--transition-fast);
}

.device-card:hover {
    transform: translateY(-2px);
    box-shadow: var(--shadow-lg);
    border-color: var(--primary);
}

.device-card.pending {
    border-left: 4px solid #FF9500;
}

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

.device-key {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 24px;
    font-weight: 700;
    color: var(--primary);
    font-family: 'Courier New', monospace;
}

.device-key i {
    font-size: 20px;
}

.status-badge {
    padding: 4px 12px;
    border-radius: 12px;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
}

.status-badge.pending {
    background: rgba(255, 149, 0, 0.15);
    color: #FF9500;
}

.status-badge.active {
    background: rgba(52, 199, 89, 0.15);
    color: #34C759;
}

.status-badge.expired {
    background: rgba(255, 59, 48, 0.15);
    color: #FF3B30;
}

.status-badge.suspended {
    background: rgba(142, 142, 147, 0.15);
    color: #8E8E93;
}

.device-info {
    margin-bottom: 16px;
}

.info-row {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 8px 0;
    color: var(--text-secondary);
    font-size: 14px;
}

.info-row i {
    width: 20px;
    color: var(--text-muted);
}

.devices-table {
    background: var(--bg-secondary);
    border: 1px solid var(--border-color);
    border-radius: 12px;
    overflow: hidden;
}

.devices-table table {
    width: 100%;
    border-collapse: collapse;
}

.devices-table th {
    background: var(--bg-tertiary);
    padding: 12px 16px;
    text-align: left;
    font-size: 12px;
    font-weight: 600;
    text-transform: uppercase;
    color: var(--text-muted);
    border-bottom: 1px solid var(--border-color);
}

.devices-table td {
    padding: 12px 16px;
    border-bottom: 1px solid var(--border-color);
    color: var(--text-secondary);
}

.devices-table tr:last-child td {
    border-bottom: none;
}

.devices-table tr:hover {
    background: var(--bg-hover);
}

.btn-block {
    width: 100%;
}

/* ============================================
   COMPREHENSIVE UI FIXES
   ============================================ */

/* Enhanced Card Depth and Shadows */
.card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15), 
                0 1px 3px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
}

.dark-theme .card {
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.95), rgba(44, 44, 46, 0.9));
}

.light-theme .card {
    background: linear-gradient(135deg, rgba(255, 255, 255, 0.95), rgba(248, 250, 252, 0.9));
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08), 
                0 1px 3px rgba(0, 0, 0, 0.05);
}

/* Enhanced Stat Cards - Premium Design */
.stat-card {
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.15),
                0 1px 3px rgba(0, 0, 0, 0.1),
                inset 0 1px 0 rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.08);
    background: linear-gradient(145deg, 
                rgba(30, 35, 45, 0.95) 0%, 
                rgba(20, 25, 35, 0.92) 50%,
                rgba(15, 20, 30, 0.95) 100%);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
}

.stat-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.25),
                0 4px 12px rgba(0, 0, 0, 0.15),
                inset 0 1px 0 rgba(255, 255, 255, 0.12),
                0 0 0 1px rgba(212, 175, 55, 0.3);
    border-color: rgba(212, 175, 55, 0.4);
}

.light-theme .stat-card {
    background: linear-gradient(145deg, 
                rgba(255, 255, 255, 0.98) 0%, 
                rgba(250, 252, 255, 0.95) 50%,
                rgba(248, 250, 252, 0.98) 100%);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.08),
                0 1px 3px rgba(0, 0, 0, 0.05),
                inset 0 1px 0 rgba(255, 255, 255, 0.8);
    border: 1px solid rgba(0, 0, 0, 0.06);
}

.light-theme .stat-card:hover {
    box-shadow: 0 12px 40px rgba(0, 0, 0, 0.12),
                0 4px 12px rgba(0, 0, 0, 0.08),
                inset 0 1px 0 rgba(255, 255, 255, 1),
                0 0 0 1px rgba(212, 175, 55, 0.3);
}

/* Top Bar Button Enhancements */
.icon-btn {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    position: relative;
}

.icon-btn:hover {
    background: rgba(255, 255, 255, 0.1);
    border-color: rgba(255, 255, 255, 0.15);
    color: var(--text-primary);
    transform: translateY(-1px);
}

.icon-btn:active {
    transform: translateY(0);
}

.light-theme .icon-btn {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    color: #1e293b;
}

.light-theme .icon-btn:hover {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
    color: #0f172a;
}

.light-theme .icon-btn i {
    color: #475569;
}

.light-theme .icon-btn:hover i {
    color: #1e293b;
}

/* Notification Dot */
.notification-dot {
    position: absolute;
    top: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--danger);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
    display: none;
}

.notification-dot.active {
    display: block;
    animation: pulse 2s infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.5; }
}

/* Security Status Indicator */
.security-status-indicator {
    position: absolute;
    bottom: 8px;
    right: 8px;
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    border: 2px solid var(--bg-secondary);
}

.security-status-indicator.warning {
    background: var(--warning);
}

.security-status-indicator.danger {
    background: var(--danger);
}

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

.user-avatar-img {
    width: 40px;
    height: 40px;
    border-radius: 10px;
    border: 2px solid rgba(255, 255, 255, 0.1);
    transition: all 0.2s ease;
}

.user-avatar-img:hover {
    border-color: rgba(255, 255, 255, 0.2);
    transform: scale(1.05);
}

/* Search Box Enhancement */
.search-box {
    position: relative;
    display: flex;
    align-items: center;
}

.search-box input {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    padding: 10px 40px 10px 16px;
    color: var(--text-primary);
    font-size: 14px;
    width: 250px;
    transition: all 0.3s ease;
}

.search-box input:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: rgba(255, 255, 255, 0.15);
    width: 300px;
}

.search-box i {
    position: absolute;
    right: 14px;
    color: var(--text-muted);
    pointer-events: none;
}

.light-theme .search-box input {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
    color: var(--text-primary);
}

.light-theme .search-box input:focus {
    background: rgba(0, 0, 0, 0.05);
    border-color: rgba(0, 0, 0, 0.12);
}

/* Sidebar Collapse Enhancement */
.sidebar {
    overflow: visible;
}

.sidebar.collapsed .nav-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    display: none;
}

.sidebar.collapsed .nav-item {
    justify-content: center;
    padding: 12px 0;
    margin: 3px 8px;
}

.sidebar.collapsed .nav-item i {
    margin: 0;
    font-size: 20px;
}

.sidebar.collapsed .nav-item .badge {
    position: absolute;
    top: 4px;
    right: 4px;
    min-width: 18px;
    height: 18px;
    padding: 0 4px;
    font-size: 10px;
}

.sidebar.collapsed .sidebar-footer {
    padding: 16px 10px;
}

.sidebar.collapsed .user-info {
    flex-direction: column;
    align-items: center;
}

.sidebar.collapsed .user-details {
    display: none;
}

.sidebar.collapsed .btn-logout span {
    display: none;
}

.sidebar.collapsed .btn-logout {
    padding: 10px;
    justify-content: center;
}

/* Content Area Spacing */
.content-area {
    background: transparent;
    padding: 32px;
}

.light-theme .content-area {
    background: transparent;
}

/* Module Header Enhancement */
.module-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 24px;
    padding: 20px;
    background: rgba(255, 255, 255, 0.02);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.05);
}

.light-theme .module-header {
    background: rgba(0, 0, 0, 0.02);
    border-color: rgba(0, 0, 0, 0.05);
}

.module-header h2 {
    font-size: 24px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 12px;
}

/* Stats Grid Enhancement */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

/* Table Enhancement */
.data-table {
    border-collapse: separate;
    border-spacing: 0;
}

.data-table thead th {
    background: rgba(255, 255, 255, 0.03);
    border-bottom: 2px solid rgba(255, 255, 255, 0.08);
    padding: 14px 16px;
    font-weight: 600;
    font-size: 13px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    color: var(--text-muted);
}

.data-table tbody tr {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    transition: all 0.2s ease;
}

.data-table tbody tr:hover {
    background: rgba(255, 255, 255, 0.02);
}

.data-table tbody td {
    padding: 14px 16px;
    color: var(--text-secondary);
}

.light-theme .data-table thead th {
    background: rgba(0, 0, 0, 0.02);
    border-bottom-color: rgba(0, 0, 0, 0.08);
}

.light-theme .data-table tbody tr {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}

.light-theme .data-table tbody tr:hover {
    background: rgba(0, 0, 0, 0.02);
}

/* Badge Enhancement */
.badge {
    padding: 6px 12px;
    border-radius: 6px;
    font-size: 12px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 4px;
}

.badge-success {
    background: rgba(52, 199, 89, 0.15);
    color: var(--success);
    border: 1px solid rgba(52, 199, 89, 0.3);
}

.badge-warning {
    background: rgba(255, 149, 0, 0.15);
    color: var(--warning);
    border: 1px solid rgba(255, 149, 0, 0.3);
}

.badge-danger {
    background: rgba(255, 59, 48, 0.15);
    color: var(--danger);
    border: 1px solid rgba(255, 59, 48, 0.3);
}

.badge-info {
    background: rgba(90, 200, 250, 0.15);
    color: var(--info);
    border: 1px solid rgba(90, 200, 250, 0.3);
}

.badge-primary {
    background: rgba(99, 102, 241, 0.15);
    color: var(--primary);
    border: 1px solid rgba(99, 102, 241, 0.3);
}

/* Button Enhancement */
.btn {
    padding: 10px 20px;
    border-radius: 10px;
    font-size: 14px;
    font-weight: 600;
    display: inline-flex;
    align-items: center;
    gap: 8px;
    cursor: pointer;
    transition: all 0.2s ease;
    border: none;
}

.btn-primary {
    background: var(--primary);
    color: white;
    box-shadow: 0 2px 8px rgba(212, 175, 55, 0.3);
}

.btn-primary:hover {
    background: var(--primary-dark);
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(212, 175, 55, 0.4);
}

.btn-secondary {
    background: rgba(255, 255, 255, 0.08);
    color: var(--text-primary);
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.btn-secondary:hover {
    background: rgba(255, 255, 255, 0.12);
    border-color: rgba(255, 255, 255, 0.15);
}

.btn-success {
    background: var(--success);
    color: white;
}

.btn-danger {
    background: var(--danger);
    color: white;
}

.btn-sm {
    padding: 6px 14px;
    font-size: 13px;
}

/* Form Enhancement */
.form-group {
    margin-bottom: 20px;
}

.form-label {
    display: block;
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 500;
    color: var(--text-secondary);
}

.form-control {
    width: 100%;
    padding: 12px 16px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.08);
    border-radius: 10px;
    color: var(--text-primary);
    font-size: 14px;
    transition: all 0.2s ease;
}

.form-control:focus {
    outline: none;
    background: rgba(255, 255, 255, 0.08);
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(212, 175, 55, 0.1);
}

.light-theme .form-control {
    background: rgba(0, 0, 0, 0.03);
    border-color: rgba(0, 0, 0, 0.08);
}

.light-theme .form-control:focus {
    background: rgba(0, 0, 0, 0.05);
}

/* Progress Bar */
.progress-bar {
    height: 8px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 4px;
    overflow: hidden;
    margin-top: 8px;
}

.progress-fill {
    height: 100%;
    background: var(--primary);
    border-radius: 4px;
    transition: width 0.3s ease;
}

.progress-fill.success {
    background: var(--success);
}

.progress-fill.warning {
    background: var(--warning);
}

.progress-fill.danger {
    background: var(--danger);
}

/* Chart Container */
.chart-container {
    position: relative;
    height: 300px;
    margin: 20px 0;
}

/* Resource Cards */
.resource-card {
    background: linear-gradient(135deg, rgba(28, 28, 30, 0.9), rgba(44, 44, 46, 0.85));
    border: 1px solid rgba(255, 255, 255, 0.06);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.2);
}

.resource-card-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 16px;
}

.resource-card-title {
    font-size: 16px;
    font-weight: 600;
    color: var(--text-primary);
    display: flex;
    align-items: center;
    gap: 10px;
}

.resource-card-value {
    font-size: 32px;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.resource-card-label {
    font-size: 13px;
    color: var(--text-muted);
}

/* Dropdown Overlay */
.dropdown-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    z-index: 9999;
    background: transparent;
}

/* Dropdown Menu */
.dropdown-menu {
    position: fixed;
    background: rgba(15, 23, 42, 0.95);
    backdrop-filter: blur(30px) saturate(180%);
    -webkit-backdrop-filter: blur(30px) saturate(180%);
    border: 1px solid rgba(255, 255, 255, 0.15);
    border-radius: 12px;
    padding: 8px;
    min-width: 220px;
    box-shadow: 0 12px 48px rgba(0, 0, 0, 0.5),
                0 4px 16px rgba(0, 0, 0, 0.3),
                inset 0 1px 0 rgba(255, 255, 255, 0.1);
    animation: dropdownFadeIn 0.2s ease;
    z-index: 10000;
    opacity: 1;
    visibility: visible;
}

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

.dropdown-header {
    padding: 12px 14px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    margin-bottom: 8px;
}

.dropdown-user-info {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.dropdown-user-name {
    font-size: 14px;
    font-weight: 600;
    color: var(--text-primary);
}

.dropdown-user-role {
    font-size: 12px;
    color: var(--text-muted);
}

.dropdown-item {
    padding: 10px 14px;
    border-radius: 8px;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
    display: flex;
    align-items: center;
    gap: 12px;
    font-size: 14px;
}

.dropdown-item i {
    width: 18px;
    text-align: center;
    font-size: 14px;
}

.dropdown-item:hover {
    background: rgba(255, 255, 255, 0.1);
    color: var(--text-primary);
}

.dropdown-divider {
    height: 1px;
    background: rgba(255, 255, 255, 0.1);
    margin: 8px 0;
}

.light-theme .dropdown-menu {
    background: rgba(255, 255, 255, 0.95);
    border-color: rgba(0, 0, 0, 0.1);
}

.light-theme .dropdown-item {
    color: var(--text-secondary);
}

.light-theme .dropdown-item:hover {
    background: rgba(0, 0, 0, 0.05);
    color: var(--text-primary);
}

.light-theme .dropdown-divider {
    background: rgba(0, 0, 0, 0.1);
}

/* Empty State */
.empty-state {
    text-align: center;
    padding: 60px 20px;
    color: var(--text-muted);
}

.empty-state i {
    font-size: 64px;
    margin-bottom: 20px;
    opacity: 0.3;
}

.empty-state h3 {
    font-size: 20px;
    margin-bottom: 10px;
    color: var(--text-secondary);
}

.empty-state p {
    font-size: 14px;
}

/* Loading State */
.loading-state {
    text-align: center;
    padding: 40px 20px;
}

.loading-state .spinner {
    width: 40px;
    height: 40px;
    border: 3px solid rgba(255, 255, 255, 0.1);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    margin: 0 auto 16px;
}

/* Responsive Enhancements */
@media (max-width: 1024px) {
    .stats-grid {
        grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
        gap: 16px;
    }
    
    .content-area {
        padding: 24px;
    }
}

@media (max-width: 768px) {
    .search-box input {
        width: 180px;
    }
    
    .search-box input:focus {
        width: 220px;
    }
    
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .content-area {
        padding: 16px;
    }
    
    .module-header {
        flex-direction: column;
        align-items: flex-start;
        gap: 16px;
    }
}
