/* ========================================
   NEXUS ADMIN PANEL - PREMIUM DESIGN SYSTEM
   Ultra Modern | Glassmorphism | Neon Accents
   Created: 2026 | Version 2.0
   ======================================== */

/* ========================================
   CSS VARIABLES - DESIGN TOKENS
   ======================================== */
:root {
    /* Primary Palette - Electric Blue Gradient */
    --primary: #6366f1;
    --primary-hover: #4f46e5;
    --primary-light: rgba(99, 102, 241, 0.12);
    --primary-glow: rgba(99, 102, 241, 0.4);
    --primary-rgb: 99, 102, 241;

    /* Secondary - Cyber Violet */
    --secondary: #8b5cf6;
    --secondary-hover: #7c3aed;
    --secondary-light: rgba(139, 92, 246, 0.12);
    --secondary-glow: rgba(139, 92, 246, 0.4);

    /* Accent - Neon Cyan */
    --accent: #22d3ee;
    --accent-hover: #06b6d4;
    --accent-light: rgba(34, 211, 238, 0.12);
    --accent-glow: rgba(34, 211, 238, 0.4);

    /* Backgrounds - Deep Space */
    --bg-base: #030712;
    --bg-surface: #0a0f1a;
    --bg-card: rgba(15, 23, 42, 0.75);
    --bg-elevated: rgba(30, 41, 59, 0.6);
    --bg-input: rgba(15, 23, 42, 0.9);
    --bg-hover: rgba(99, 102, 241, 0.08);
    --bg-overlay: rgba(0, 0, 0, 0.7);

    /* Glass Effects */
    --glass-border: rgba(255, 255, 255, 0.08);
    --glass-border-hover: rgba(255, 255, 255, 0.15);
    --glass-shine: linear-gradient(135deg, rgba(255,255,255,0.1) 0%, transparent 50%);
    --blur-amount: 20px;

    /* Text Colors */
    --text-primary: #f8fafc;
    --text-secondary: #94a3b8;
    --text-muted: #64748b;
    --text-disabled: #475569;

    /* Status Colors - Vibrant */
    --success: #10b981;
    --success-light: rgba(16, 185, 129, 0.15);
    --success-glow: rgba(16, 185, 129, 0.35);

    --danger: #ef4444;
    --danger-light: rgba(239, 68, 68, 0.15);
    --danger-glow: rgba(239, 68, 68, 0.35);

    --warning: #f59e0b;
    --warning-light: rgba(245, 158, 11, 0.15);
    --warning-glow: rgba(245, 158, 11, 0.35);

    --info: #3b82f6;
    --info-light: rgba(59, 130, 246, 0.15);
    --info-glow: rgba(59, 130, 246, 0.35);

    /* Border Radius */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 12px;
    --radius-lg: 16px;
    --radius-xl: 24px;
    --radius-2xl: 32px;
    --radius-full: 9999px;

    /* Shadows */
    --shadow-sm: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-md: 0 4px 12px rgba(0, 0, 0, 0.25);
    --shadow-lg: 0 8px 30px rgba(0, 0, 0, 0.35);
    --shadow-xl: 0 20px 60px rgba(0, 0, 0, 0.4);
    --shadow-glow: 0 0 40px rgba(99, 102, 241, 0.2);

    /* Animation Timing */
    --transition-fast: 150ms ease;
    --transition-normal: 250ms ease;
    --transition-smooth: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Spacing Scale */
    --header-height: 72px;
    --sidebar-width: 280px;
}

/* ========================================
   BASE RESET & FOUNDATION
   ======================================== */
*, *::before, *::after {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    font-size: 16px;
    scroll-behavior: smooth;
    -webkit-text-size-adjust: 100%;
}

body {
    font-family: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-weight: 400;
    line-height: 1.65;
    color: var(--text-primary);
    background: var(--bg-base);
    min-height: 100vh;
    overflow-x: hidden;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Animated Background Gradient */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: 
        radial-gradient(ellipse 80% 50% at 20% 40%, rgba(99, 102, 241, 0.15), transparent 50%),
        radial-gradient(ellipse 60% 60% at 80% 20%, rgba(139, 92, 246, 0.1), transparent 50%),
        radial-gradient(ellipse 50% 40% at 50% 90%, rgba(34, 211, 238, 0.08), transparent 40%);
    pointer-events: none;
    z-index: -1;
    animation: bgPulse 15s ease-in-out infinite;
}

@keyframes bgPulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.7; }
}

/* Custom Scrollbar */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-surface);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, var(--primary), var(--secondary));
    border-radius: var(--radius-full);
    border: 2px solid var(--bg-surface);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(180deg, var(--primary-hover), var(--secondary-hover));
}

/* Selection */
::selection {
    background: rgba(99, 102, 241, 0.3);
    color: var(--text-primary);
}

/* Links */
a {
    color: inherit;
    text-decoration: none;
    transition: color var(--transition-fast);
}

a:hover {
    color: var(--primary);
}

/* Lists */
ul, ol {
    list-style: none;
}

/* Images */
img {
    max-width: 100%;
    height: auto;
    display: block;
}

/* ========================================
   TYPOGRAPHY
   ======================================== */
h1, h2, h3, h4, h5, h6 {
    font-weight: 700;
    line-height: 1.3;
    color: var(--text-primary);
    letter-spacing: -0.02em;
}

h1 { font-size: clamp(1.75rem, 4vw, 2.5rem); }
h2 { font-size: clamp(1.5rem, 3vw, 2rem); }
h3 { font-size: clamp(1.25rem, 2.5vw, 1.5rem); }
h4 { font-size: 1.125rem; }
h5 { font-size: 1rem; }
h6 { font-size: 0.875rem; }

p {
    color: var(--text-secondary);
    margin-bottom: 1rem;
}

small, .text-sm { font-size: 0.875rem; }
.text-xs { font-size: 0.75rem; }
.text-lg { font-size: 1.125rem; }

/* ========================================
   LAYOUT - CONTAINER & GRID
   ======================================== */
.container {
    width: 100%;
    max-width: 1440px;
    margin: 0 auto;
    padding-left: 1rem;
    padding-right: 1rem;
}

@media (min-width: 640px) {
    .container { padding-left: 1.5rem; padding-right: 1.5rem; }
}

@media (min-width: 1024px) {
    .container { padding-left: 2rem; padding-right: 2rem; }
}

.page-container {
    padding-top: 2rem;
    padding-bottom: 3rem;
}

/* Flexbox Grid */
.row {
    display: flex;
    flex-wrap: wrap;
    margin: -0.75rem;
}

[class*="col-"] {
    padding: 0.75rem;
    width: 100%;
}

.col-1 { flex: 0 0 8.333%; max-width: 8.333%; }
.col-2 { flex: 0 0 16.666%; max-width: 16.666%; }
.col-3 { flex: 0 0 25%; max-width: 25%; }
.col-4 { flex: 0 0 33.333%; max-width: 33.333%; }
.col-5 { flex: 0 0 41.666%; max-width: 41.666%; }
.col-6 { flex: 0 0 50%; max-width: 50%; }
.col-7 { flex: 0 0 58.333%; max-width: 58.333%; }
.col-8 { flex: 0 0 66.666%; max-width: 66.666%; }
.col-9 { flex: 0 0 75%; max-width: 75%; }
.col-10 { flex: 0 0 83.333%; max-width: 83.333%; }
.col-11 { flex: 0 0 91.666%; max-width: 91.666%; }
.col-12 { flex: 0 0 100%; max-width: 100%; }

@media (min-width: 768px) {
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
    .col-md-4 { flex: 0 0 33.333%; max-width: 33.333%; }
    .col-md-5 { flex: 0 0 41.666%; max-width: 41.666%; }
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-7 { flex: 0 0 58.333%; max-width: 58.333%; }
    .col-md-8 { flex: 0 0 66.666%; max-width: 66.666%; }
    .col-md-9 { flex: 0 0 75%; max-width: 75%; }
    .col-md-12 { flex: 0 0 100%; max-width: 100%; }
}

@media (min-width: 1024px) {
    .col-lg-3 { flex: 0 0 25%; max-width: 25%; }
    .col-lg-4 { flex: 0 0 33.333%; max-width: 33.333%; }
    .col-lg-5 { flex: 0 0 41.666%; max-width: 41.666%; }
    .col-lg-6 { flex: 0 0 50%; max-width: 50%; }
    .col-lg-7 { flex: 0 0 58.333%; max-width: 58.333%; }
    .col-lg-8 { flex: 0 0 66.666%; max-width: 66.666%; }
    .col-lg-9 { flex: 0 0 75%; max-width: 75%; }
}

/* ========================================
   NAVIGATION BAR - GLASSMORPHISM
   ======================================== */
.navbar {
    position: sticky;
    top: 0;
    left: 0;
    right: 0;
    height: var(--header-height);
    z-index: 1000;
    transition: all var(--transition-normal);
}

.navbar::before {
    content: '';
    position: absolute;
    inset: 0;
    background: rgba(10, 15, 26, 0.85);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border-bottom: 1px solid var(--glass-border);
    z-index: -1;
}

/* Navbar Glow Line */
.navbar::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 200px;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--primary), var(--accent), transparent);
    opacity: 0.6;
}

.nav-content {
    height: 100%;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1.5rem;
}

/* Logo */
.logo {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.25rem;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    text-decoration: none;
    transition: transform var(--transition-fast);
}

.logo:hover {
    transform: scale(1.02);
    color: var(--text-primary);
}

.logo img {
    height: 36px;
    width: auto;
    border-radius: var(--radius-sm);
}

.logo-accent {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Navigation Links */
.nav-links {
    display: flex;
    align-items: center;
    gap: 0.15rem;
}

.nav-item {
    position: relative;
    padding: 0.45rem 0.65rem;
    font-size: 0.8rem;
    font-weight: 500;
    color: var(--text-secondary);
    border-radius: var(--radius-sm);
    transition: all var(--transition-fast);
    white-space: nowrap;
}

.nav-item:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

.nav-item.active {
    color: var(--primary);
    background: var(--primary-light);
}

.nav-item.active::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%);
    width: 16px;
    height: 2px;
    background: var(--primary);
    border-radius: var(--radius-full);
}

/* Laptop Screen Adjustments (1024px - 1440px) */
@media (min-width: 1024px) and (max-width: 1440px) {
    .nav-links {
        gap: 0.1rem;
    }
    
    .nav-item {
        padding: 0.4rem 0.5rem;
        font-size: 0.72rem;
    }
    
    .nav-item.active::before {
        width: 12px;
    }
    
    .logo {
        font-size: 1rem;
    }
    
    .logo img {
        height: 28px;
    }
}

/* Large Desktop (1441px+) */
@media (min-width: 1441px) {
    .nav-links {
        gap: 0.2rem;
    }
    
    .nav-item {
        padding: 0.5rem 0.8rem;
        font-size: 0.82rem;
    }
}

/* Hamburger Menu */
.hamburger {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 44px;
    height: 44px;
    background: var(--bg-elevated);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-md);
    cursor: pointer;
    z-index: 1010;
    transition: all var(--transition-fast);
}

.hamburger:hover {
    background: var(--primary-light);
    border-color: var(--primary);
}

.hamburger span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: var(--radius-full);
    transition: all var(--transition-normal);
    margin: 2px 0;
}

.hamburger.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.hamburger.active span:nth-child(2) {
    opacity: 0;
}

.hamburger.active span:nth-child(3) {
    transform: rotate(-45deg) translate(5px, -5px);
}

/* Mobile Navigation (< 900px) */
@media (max-width: 899px) {
    .hamburger {
        display: flex !important;
    }

    .nav-links {
        position: fixed !important;
        top: 0 !important;
        left: 0 !important;
        right: 0 !important;
        bottom: 0 !important;
        flex-direction: column !important;
        align-items: stretch !important;
        justify-content: flex-start !important;
        padding: calc(var(--header-height) + 1rem) 1.5rem 2rem !important;
        background: rgba(10, 10, 11, 0.98) !important;
        backdrop-filter: blur(20px) !important;
        gap: 0.5rem !important;
        transform: translateX(-100%) !important;
        opacity: 0 !important;
        transition: transform 0.35s cubic-bezier(0.4, 0, 0.2, 1), opacity 0.35s ease !important;
        overflow-y: auto !important;
        overflow-x: hidden !important;
        z-index: 1000 !important;
        max-width: 100% !important;
    }

    .nav-links.active {
        transform: translateX(0) !important;
        opacity: 1 !important;
    }

    .nav-item {
        padding: 1rem 1.25rem !important;
        font-size: 1rem !important;
        background: var(--bg-card) !important;
        border: 1px solid var(--glass-border) !important;
        border-radius: var(--radius-lg) !important;
        flex-shrink: 0 !important;
    }

    .nav-item:hover {
        background: var(--primary-light) !important;
        border-color: var(--primary) !important;
    }
}

/* Horizontal Scroll Menu for ALL Desktop Screens (>= 900px) */
@media (min-width: 900px) {
    .hamburger {
        display: none !important;
    }

    .nav-links {
        position: static !important;
        flex-direction: row !important;
        align-items: center !important;
        justify-content: flex-start !important;
        padding: 0 0 5px 0 !important;
        background: transparent !important;
        gap: 0.25rem !important;
        transform: none !important;
        opacity: 1 !important;
        overflow-x: auto !important;
        overflow-y: hidden !important;
        max-width: calc(100vw - 280px) !important;
        scrollbar-width: thin !important;
        scrollbar-color: rgba(99, 102, 241, 0.5) transparent !important;
        -webkit-overflow-scrolling: touch !important;
        scroll-behavior: smooth !important;
        flex-wrap: nowrap !important;
        max-height: none !important;
        bottom: auto !important;
        top: auto !important;
        left: auto !important;
        right: auto !important;
    }

    .nav-links::-webkit-scrollbar {
        height: 4px;
        display: block !important;
    }

    .nav-links::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.1);
        border-radius: 2px;
    }

    .nav-links::-webkit-scrollbar-thumb {
        background: linear-gradient(90deg, var(--primary), var(--secondary));
        border-radius: 2px;
    }

    .nav-links::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(90deg, var(--primary-hover), var(--secondary-hover));
    }

    .nav-item {
        flex-shrink: 0 !important;
        white-space: nowrap !important;
    }

    .nav-divider,
    .nav-section-label {
        display: none !important;
    }
}

/* ========================================
   PAGE HEADER
   ======================================== */
.page-header {
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    margin-bottom: 2rem;
}

.page-header h1 {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 1.75rem;
    font-weight: 700;
}

.page-header h1 span:first-child {
    font-size: 1.5rem;
}

.page-header p {
    color: var(--text-muted);
    font-size: 0.9375rem;
    margin: 0;
}

@media (min-width: 768px) {
    .page-header {
        flex-direction: row;
        align-items: center;
        justify-content: space-between;
    }
}

/* ========================================
   CARDS - GLASSMORPHISM DESIGN
   ======================================== */
.card {
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.75rem;
    margin-bottom: 1.5rem;
    transition: all var(--transition-normal);
    overflow: hidden;
}

/* Card Shine Effect */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.15), transparent);
}

/* Card Hover Effect */
.card:hover {
    border-color: var(--glass-border-hover);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg), var(--shadow-glow);
}

.card h3 {
    font-size: 1.125rem;
    margin-bottom: 1rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-responsive {
    width: 100%;
}

/* Card Variants */
.card.border-primary {
    border-color: rgba(99, 102, 241, 0.3);
}

.card.border-success {
    border-color: rgba(16, 185, 129, 0.3);
}

.card.border-danger {
    border-color: rgba(239, 68, 68, 0.3);
}

/* ========================================
   STATS GRID
   ======================================== */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 1.25rem;
    margin-bottom: 2rem;
}

.stat-card {
    position: relative;
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    transition: all var(--transition-normal);
    overflow: hidden;
}

.stat-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    opacity: 0;
    transition: opacity var(--transition-normal);
}

.stat-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
    box-shadow: var(--shadow-lg);
}

.stat-card:hover::before {
    opacity: 1;
}

.stat-icon {
    width: 52px;
    height: 52px;
    border-radius: var(--radius-lg);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    margin-bottom: 1rem;
}

.stat-value {
    font-size: 2.25rem;
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1.1;
    margin-bottom: 0.375rem;
    letter-spacing: -0.02em;
}

.stat-label {
    font-size: 0.8125rem;
    color: var(--text-muted);
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}

/* ========================================
   FORMS & INPUTS
   ======================================== */
.form-group {
    margin-bottom: 1.5rem;
}

.form-label {
    display: block;
    margin-bottom: 0.625rem;
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-secondary);
}

.form-control,
.glass-input,
.form-input,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="tel"],
input[type="url"],
input[type="search"],
input[type="date"],
input[type="file"],
select,
textarea {
    width: 100%;
    padding: 0.875rem 1.125rem;
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 0.9375rem;
    font-family: inherit;
    transition: all var(--transition-fast);
    outline: none;
}

.form-control:hover,
.glass-input:hover,
input:hover,
select:hover,
textarea:hover {
    border-color: var(--glass-border-hover);
}

.form-control:focus,
.glass-input:focus,
input:focus,
select:focus,
textarea:focus {
    border-color: var(--primary);
    background: rgba(99, 102, 241, 0.05);
    box-shadow: 0 0 0 4px var(--primary-light), var(--shadow-sm);
}

input::placeholder,
textarea::placeholder {
    color: var(--text-muted);
}

/* Select Arrow */
select {
    appearance: none;
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
    background-repeat: no-repeat;
    background-position: right 1rem center;
    padding-right: 2.5rem;
}

/* Textarea */
textarea {
    min-height: 120px;
    resize: vertical;
}

/* File Input */
input[type="file"] {
    padding: 0.75rem;
    cursor: pointer;
}

/* ========================================
   BUTTONS
   ======================================== */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
    padding: 0.75rem 1.5rem;
    font-size: 0.9375rem;
    font-weight: 600;
    font-family: inherit;
    border-radius: var(--radius-lg);
    border: none;
    cursor: pointer;
    transition: all var(--transition-fast);
    white-space: nowrap;
    text-decoration: none;
}

.btn:active {
    transform: scale(0.97);
}

.btn:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

/* Primary Button - Gradient */
.btn-primary {
    background: linear-gradient(135deg, var(--primary), var(--secondary));
    color: white;
    box-shadow: 0 4px 16px var(--primary-glow);
}

.btn-primary:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 24px var(--primary-glow);
    transform: translateY(-2px);
}

/* Secondary Button */
.btn-secondary {
    background: var(--bg-elevated);
    color: var(--text-primary);
    border: 1px solid var(--glass-border);
}

.btn-secondary:hover {
    background: var(--bg-hover);
    border-color: var(--primary);
    color: var(--primary);
}

/* Success Button */
.btn-success {
    background: linear-gradient(135deg, var(--success), #059669);
    color: white;
    box-shadow: 0 4px 16px var(--success-glow);
}

.btn-success:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 24px var(--success-glow);
}

/* Danger Button */
.btn-danger {
    background: linear-gradient(135deg, var(--danger), #dc2626);
    color: white;
    box-shadow: 0 4px 16px var(--danger-glow);
}

.btn-danger:hover {
    filter: brightness(1.1);
    box-shadow: 0 6px 24px var(--danger-glow);
}

/* Warning Button */
.btn-warning {
    background: linear-gradient(135deg, var(--warning), #d97706);
    color: #1a1a1a;
    box-shadow: 0 4px 16px var(--warning-glow);
}

.btn-warning:hover {
    filter: brightness(1.1);
}

/* Info Button */
.btn-info {
    background: linear-gradient(135deg, var(--info), #2563eb);
    color: white;
    box-shadow: 0 4px 16px var(--info-glow);
}

.btn-info:hover {
    filter: brightness(1.1);
}

/* Outline Button */
.btn-outline {
    background: transparent;
    color: var(--text-secondary);
    border: 1px solid var(--glass-border);
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: var(--primary-light);
}

/* Button Sizes */
.btn-sm {
    padding: 0.5rem 1rem;
    font-size: 0.8125rem;
    border-radius: var(--radius-md);
}

.btn-lg {
    padding: 1rem 2rem;
    font-size: 1.0625rem;
}

.w-full, .w-100 {
    width: 100%;
}

/* ========================================
   TABLES
   ======================================== */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    border-radius: var(--radius-lg);
}

table {
    width: 100%;
    border-collapse: collapse;
}

thead {
    background: rgba(99, 102, 241, 0.05);
}

th {
    padding: 1rem 1.25rem;
    text-align: left;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: var(--text-muted);
    border-bottom: 1px solid var(--glass-border);
}

td {
    padding: 1rem 1.25rem;
    font-size: 0.9375rem;
    color: var(--text-primary);
    border-bottom: 1px solid rgba(255, 255, 255, 0.04);
    vertical-align: middle;
}

tr:last-child td {
    border-bottom: none;
}

tbody tr {
    transition: background var(--transition-fast);
}

tbody tr:hover {
    background: var(--bg-hover);
}

/* Stacked Table for Mobile */
@media (max-width: 768px) {
    .table-stack thead {
        display: none;
    }

    .table-stack tr {
        display: block;
        background: var(--bg-card);
        border: 1px solid var(--glass-border);
        border-radius: var(--radius-lg);
        margin-bottom: 1rem;
        padding: 0.5rem;
    }

    .table-stack td {
        display: flex;
        justify-content: space-between;
        align-items: center;
        padding: 0.875rem 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.04);
        text-align: right;
    }

    .table-stack td:last-child {
        border-bottom: none;
    }

    .table-stack td::before {
        content: attr(data-label);
        font-weight: 700;
        font-size: 0.75rem;
        color: var(--text-muted);
        text-transform: uppercase;
        letter-spacing: 0.05em;
        text-align: left;
    }
}

/* ========================================
   BADGES
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.25rem;
    padding: 0.375rem 0.75rem;
    font-size: 0.75rem;
    font-weight: 700;
    border-radius: var(--radius-full);
    text-transform: uppercase;
    letter-spacing: 0.03em;
}

.badge-primary {
    background: var(--primary-light);
    color: #a5b4fc;
}

.badge-secondary {
    background: var(--secondary-light);
    color: #c4b5fd;
}

.badge-success {
    background: var(--success-light);
    color: #6ee7b7;
}

.badge-danger {
    background: var(--danger-light);
    color: #fca5a5;
}

.badge-warning {
    background: var(--warning-light);
    color: #fcd34d;
}

.badge-info {
    background: var(--info-light);
    color: #93c5fd;
}

/* ========================================
   ALERTS
   ======================================== */
.alert {
    display: flex;
    align-items: flex-start;
    gap: 0.875rem;
    padding: 1rem 1.25rem;
    border-radius: var(--radius-lg);
    margin-bottom: 1.25rem;
    font-size: 0.9375rem;
    border: 1px solid transparent;
}

.alert-success, .alert.badge-success {
    background: var(--success-light);
    border-color: rgba(16, 185, 129, 0.25);
    color: #6ee7b7;
}

.alert-danger, .alert.badge-danger {
    background: var(--danger-light);
    border-color: rgba(239, 68, 68, 0.25);
    color: #fca5a5;
}

.alert-warning, .alert.badge-warning {
    background: var(--warning-light);
    border-color: rgba(245, 158, 11, 0.25);
    color: #fcd34d;
}

.alert-info, .alert.badge-info {
    background: var(--info-light);
    border-color: rgba(59, 130, 246, 0.25);
    color: #93c5fd;
}

/* ========================================
   ACTIVITY LIST
   ======================================== */
.activity-list {
    display: flex;
    flex-direction: column;
    gap: 0.875rem;
}

.activity-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1rem;
    background: rgba(255, 255, 255, 0.02);
    border: 1px solid transparent;
    border-radius: var(--radius-lg);
    transition: all var(--transition-fast);
}

.activity-item:hover {
    background: var(--bg-hover);
    border-color: var(--glass-border);
}

.activity-icon {
    width: 44px;
    height: 44px;
    border-radius: var(--radius-md);
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.25rem;
    flex-shrink: 0;
}

.activity-content {
    flex: 1;
    min-width: 0;
}

.activity-title {
    font-weight: 600;
    font-size: 0.9375rem;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.activity-time {
    font-size: 0.8125rem;
    color: var(--text-muted);
}

/* ========================================
   QUICK ACTIONS
   ======================================== */
.quick-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.quick-actions .btn {
    flex: 1 1 auto;
    min-width: 120px;
}

@media (max-width: 640px) {
    .quick-actions .btn {
        flex: 1 1 calc(50% - 0.5rem);
    }
}

/* ========================================
   MODAL
   ======================================== */
.modal {
    display: none;
    position: fixed;
    inset: 0;
    background: var(--bg-overlay);
    backdrop-filter: blur(8px);
    -webkit-backdrop-filter: blur(8px);
    z-index: 2000;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.modal.active, .modal[style*="flex"] {
    display: flex;
}

.modal-content {
    background: var(--bg-surface);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    width: 100%;
    max-width: 560px;
    max-height: 90vh;
    overflow-y: auto;
    padding: 2rem;
    position: relative;
    animation: modalSlideIn 0.3s ease;
}

@keyframes modalSlideIn {
    from {
        opacity: 0;
        transform: translateY(-20px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.close {
    position: absolute;
    top: 1rem;
    right: 1rem;
    width: 36px;
    height: 36px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.5rem;
    color: var(--text-muted);
    background: var(--bg-elevated);
    border: none;
    border-radius: var(--radius-md);
    cursor: pointer;
    transition: all var(--transition-fast);
}

.close:hover {
    color: var(--text-primary);
    background: var(--danger-light);
}

/* ========================================
   UTILITIES
   ======================================== */
/* Flexbox */
.flex { display: flex; }
.inline-flex { display: inline-flex; }
.flex-col { flex-direction: column; }
.flex-wrap { flex-wrap: wrap; }
.items-center { align-items: center; }
.items-start { align-items: flex-start; }
.items-end { align-items: flex-end; }
.justify-center { justify-content: center; }
.justify-between { justify-content: space-between; }
.justify-end { justify-content: flex-end; }
.gap-1 { gap: 0.25rem; }
.gap-2 { gap: 0.5rem; }
.gap-3 { gap: 0.75rem; }
.gap-4 { gap: 1rem; }
.gap-5 { gap: 1.25rem; }
.gap-6 { gap: 1.5rem; }

/* Spacing */
.m-0 { margin: 0 !important; }
.mt-1 { margin-top: 0.25rem !important; }
.mt-2 { margin-top: 0.5rem !important; }
.mt-3 { margin-top: 0.75rem !important; }
.mt-4 { margin-top: 1rem !important; }
.mb-0 { margin-bottom: 0 !important; }
.mb-1 { margin-bottom: 0.25rem !important; }
.mb-2 { margin-bottom: 0.5rem !important; }
.mb-3 { margin-bottom: 0.75rem !important; }
.mb-4 { margin-bottom: 1rem !important; }
.mx-auto { margin-left: auto; margin-right: auto; }

.p-0 { padding: 0 !important; }
.p-1 { padding: 0.25rem !important; }
.p-2 { padding: 0.5rem !important; }
.p-3 { padding: 0.75rem !important; }
.p-4 { padding: 1rem !important; }

/* Text */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }
.text-primary { color: var(--primary) !important; }
.text-secondary { color: var(--text-secondary) !important; }
.text-success { color: var(--success) !important; }
.text-danger { color: var(--danger) !important; }
.text-warning { color: var(--warning) !important; }
.text-muted { color: var(--text-muted) !important; }
.text-white { color: white !important; }

.font-bold { font-weight: 700; }
.font-semibold { font-weight: 600; }
.font-medium { font-weight: 500; }

/* Display */
.block { display: block; }
.inline-block { display: inline-block; }
.hidden { display: none; }

/* Position */
.relative { position: relative; }
.absolute { position: absolute; }
.fixed { position: fixed; }

/* Border */
.rounded { border-radius: var(--radius-md) !important; }
.rounded-lg { border-radius: var(--radius-lg) !important; }
.rounded-xl { border-radius: var(--radius-xl) !important; }
.rounded-full { border-radius: var(--radius-full) !important; }

.border { border: 1px solid var(--glass-border) !important; }
.border-primary { border-color: var(--primary) !important; }
.border-success { border-color: var(--success) !important; }
.border-danger { border-color: var(--danger) !important; }

/* Background */
.bg-glass {
    background: var(--bg-card);
    backdrop-filter: blur(var(--blur-amount));
    -webkit-backdrop-filter: blur(var(--blur-amount));
}

.bg-elevated { background: var(--bg-elevated); }
.bg-primary { background: var(--primary); }
.bg-success { background: var(--success); }
.bg-danger { background: var(--danger); }

/* Width */
.w-100, .w-full { width: 100%; }
.w-auto { width: auto; }

/* Cursor */
.cursor-pointer { cursor: pointer; }

/* Overflow */
.overflow-auto { overflow: auto; }
.overflow-hidden { overflow: hidden; }

/* Animations */
.fade-in {
    animation: fadeIn 0.5s ease;
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(10px); }
    to { opacity: 1; transform: translateY(0); }
}

.pulse {
    animation: pulse 2s ease-in-out infinite;
}

@keyframes pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}

/* ========================================
   CODE BLOCKS
   ======================================== */
code {
    font-family: 'JetBrains Mono', 'Fira Code', Consolas, monospace;
    font-size: 0.875em;
    padding: 0.2em 0.5em;
    background: rgba(99, 102, 241, 0.1);
    border-radius: var(--radius-sm);
    color: var(--accent);
}

pre {
    background: var(--bg-input);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-lg);
    padding: 1.25rem;
    overflow-x: auto;
}

pre code {
    background: none;
    padding: 0;
}

/* ========================================
   RESPONSIVE HELPERS
   ======================================== */
@media (max-width: 640px) {
    .hide-mobile { display: none !important; }
}

@media (min-width: 641px) and (max-width: 1023px) {
    .hide-tablet { display: none !important; }
}

@media (min-width: 1024px) {
    .hide-desktop { display: none !important; }
}

@media (min-width: 1201px) {
    .hide-desktop { display: none !important; }
}

/* Mobile adjustments */
@media (max-width: 640px) {
    .card {
        padding: 1.25rem;
        border-radius: var(--radius-lg);
    }

    .stat-card {
        padding: 1.25rem;
    }

    .stat-value {
        font-size: 1.75rem;
    }

    .btn {
        padding: 0.625rem 1.25rem;
    }
}

/* Print styles */
@media print {
    body {
        background: white;
        color: black;
    }

    .navbar, .hamburger {
        display: none;
    }

    .card {
        border: 1px solid #ddd;
        box-shadow: none;
    }
}

/* ========================================
   ENHANCED MENU STYLING
   ======================================== */
/* Menu Divider */
.nav-divider {
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(255,255,255,0.1), transparent);
    margin: 8px 0;
    display: none;
}

/* Menu Section Label */
.nav-section-label {
    font-size: 10px;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    padding: 8px 12px 4px;
    opacity: 0.7;
    display: none;
}

/* Show dividers and labels only on mobile */
@media (max-width: 1200px) {
    .nav-divider:not(.hide-desktop),
    .nav-section-label:not(.hide-desktop) {
        display: block;
    }
}

/* Important Menu Item Highlight */
.nav-item.important {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.15), rgba(139, 92, 246, 0.1));
    border: 1px solid rgba(99, 102, 241, 0.25);
    font-weight: 600;
}

.nav-item.important:hover {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.25), rgba(139, 92, 246, 0.2));
    border-color: var(--primary);
    box-shadow: 0 0 15px rgba(99, 102, 241, 0.25);
}

/* Enhanced Active Menu State */
.nav-item.active {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.2), rgba(139, 92, 246, 0.12)) !important;
    color: #a5b4fc !important;
    font-weight: 600;
    box-shadow: 0 0 20px rgba(99, 102, 241, 0.2);
    border: 1px solid rgba(99, 102, 241, 0.35);
}

/* Mobile scrollable menu */
@media (max-width: 1200px) {
    .nav-links {
        max-height: calc(100vh - 80px);
        overflow-y: auto;
        scrollbar-width: thin;
        scrollbar-color: rgba(99, 102, 241, 0.5) transparent;
    }

    .nav-links::-webkit-scrollbar {
        width: 6px;
    }

    .nav-links::-webkit-scrollbar-track {
        background: rgba(0, 0, 0, 0.2);
        border-radius: 3px;
    }

    .nav-links::-webkit-scrollbar-thumb {
        background: linear-gradient(180deg, var(--primary), var(--secondary));
        border-radius: 3px;
    }

    .nav-links::-webkit-scrollbar-thumb:hover {
        background: linear-gradient(180deg, #818cf8, #a78bfa);
    }

    /* Active indicator line */
    .nav-item.active {
        position: relative;
        overflow: hidden;
    }

    .nav-item.active::after {
        content: '';
        position: absolute;
        left: 0;
        top: 0;
        bottom: 0;
        width: 3px;
        background: linear-gradient(180deg, var(--primary), var(--accent));
        border-radius: 0 3px 3px 0;
    }
}
