@import url('https://fonts.googleapis.com/css2?family=Inter:wght@300;400;500;600;700&family=JetBrains+Mono:wght@400;500;600&display=swap');
@import url('https://cdnjs.cloudflare.com/ajax/libs/limonte-sweetalert2/11.2.0/sweetalert2.min.css');
@import url("https://cdn.jsdelivr.net/npm/bootstrap-icons@1.10.0/font/bootstrap-icons.css");

/* ========================================
   VANTABLACK - NEON RED CYBERPUNK THEME
   Minimalist Hacker Aesthetic
   ======================================== */

:root {
    /* Vantablack Base Colors */
    --pure-black: #000000;
    --surface-1: #050505;
    --surface-2: #080808;
    --surface-3: #0A0A0A;
    --surface-4: #0D0D0D;
    --surface-5: #111111;
    --surface-6: #141414;
    
    /* Neon Red Accents */
    --neon-red: #FF0033;
    --neon-red-bright: #FF1A1A;
    --neon-red-soft: #FF3355;
    --neon-red-dark: #CC0029;
    --neon-red-dim: #99001F;
    
    /* Glow Effects */
    --glow-red: 0 0 10px rgba(255, 0, 51, 0.5);
    --glow-red-soft: 0 0 20px rgba(255, 0, 51, 0.3);
    --glow-red-strong: 0 0 30px rgba(255, 0, 51, 0.6);
    --glow-inner: inset 0 0 20px rgba(255, 0, 51, 0.1);
    
    /* Text Colors */
    --text-primary: #EAEAEA;
    --text-secondary: #A0A0A0;
    --text-muted: #666666;
    --text-dark: #444444;
    
    /* Borders */
    --border-subtle: #1A1A1A;
    --border-light: #222222;
    --border-neon: rgba(255, 0, 51, 0.5);
    
    /* Effects */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.6);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.8);
    --transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    --radius-sm: 4px;
    --radius-md: 6px;
    --radius-lg: 8px;
    
    /* Fonts */
    --font-main: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
    --font-mono: 'JetBrains Mono', 'Consolas', monospace;
}

/* ========================================
   BASE & RESET
   ======================================== */

* {
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    background: var(--pure-black);
    color: var(--text-primary);
    font-family: var(--font-main);
    font-size: 14px;
    line-height: 1.5;
    min-height: 100vh;
    margin: 0;
    padding: 0;
}

/* Custom Selection */
::selection {
    background: var(--neon-red);
    color: var(--pure-black);
}

/* Custom Scrollbar - Minimal */
::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: var(--surface-1);
}

::-webkit-scrollbar-thumb {
    background: var(--surface-5);
    border-radius: 3px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--neon-red-dim);
}

/* ========================================
   CONTAINER - Compact
   ======================================== */

.container {
    max-width: 1200px;
    padding: 1rem;
}

@media (min-width: 768px) {
    .container {
        padding: 1.5rem;
    }
}

/* ========================================
   NAVBAR - Sticky + Mobile Fixes
   ======================================== */

.sticky-top {
    position: sticky;
    top: 0;
    z-index: 1030;
}

header.sticky-top {
    z-index: 1030;
}

.navbar {
    background: var(--surface-1) !important;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.5rem 1rem;
    min-height: 50px;
    z-index: 1030;
}

/* Nav Icon Images */
.nav-link img,
.dropdown-item img {
    width: 16px;
    height: 16px;
    object-fit: contain;
    filter: brightness(0.9);
    transition: var(--transition);
}

.nav-link:hover img,
.dropdown-item:hover img {
    filter: brightness(1.1);
}

/* User avatar in navbar */
.nav-link .rounded-circle {
    border: 2px solid var(--border-subtle);
    box-shadow: 0 0 0 1px var(--surface-1);
}

/* Mobile Menu Collapse - Dark Theme */
.navbar-collapse {
    background: var(--surface-1);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    margin-top: 0.5rem;
    padding: 0.5rem;
    box-shadow: var(--shadow-lg);
}

.navbar-collapse.show {
    animation: fadeIn 0.2s ease-out;
}

/* Prevent containers from clipping dropdown - ONLY overflow */
.navbar .container,
.navbar-collapse,
.navbar-nav {
    overflow: visible !important;
}

/* ========================================
   SIDEBAR MENU - Modern Slide-out
   ======================================== */

/* Hamburger Toggle Button */
.sidebar-toggle {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 8px;
    gap: 5px;
    transition: var(--transition);
    z-index: 1040;
}

.sidebar-toggle:hover {
    border-color: var(--neon-red);
    box-shadow: var(--glow-red-soft);
}

.sidebar-toggle span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: var(--transition);
}

.sidebar-toggle.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
}

.sidebar-toggle.active span:nth-child(2) {
    opacity: 0;
}

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

/* Sidebar Overlay */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(0, 0, 0, 0.8);
    backdrop-filter: blur(4px);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}

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

/* ========================================
   PREMIUM SIDEBAR - Cyber Dashboard Style
   ======================================== */

/* Sidebar Panel - Slide from right with scale & fade */
.sidebar {
    position: fixed;
    top: 0;
    right: -320px;
    width: 300px;
    max-width: 85vw;
    height: 100vh;
    background: linear-gradient(180deg, var(--surface-1) 0%, var(--surface-2) 100%);
    border-left: 1px solid var(--border-subtle);
    z-index: 1050;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
    display: flex;
    flex-direction: column;
    box-shadow: -8px 0 32px rgba(0, 0, 0, 0);
    opacity: 0;
    transform: translateX(50px) scale(0.98);
    backdrop-filter: blur(10px);
}

/* Active: Slide in with scale-up and fade */
.sidebar.active {
    right: 0;
    opacity: 1;
    transform: translateX(0) scale(1);
    box-shadow: -8px 0 40px rgba(0, 0, 0, 0.6), -4px 0 20px rgba(255, 0, 51, 0.1);
}

/* Mobile Overlay - Dimmed background */
.sidebar-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(0, 0, 0, 0);
    backdrop-filter: blur(0);
    z-index: 1040;
    opacity: 0;
    visibility: hidden;
    transition: all 0.35s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-overlay.active {
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(3px);
    opacity: 1;
    visibility: visible;
}

/* Sidebar Header - Premium Profile Section */
.sidebar-header {
    display: flex;
    align-items: center;
    gap: 1rem;
    padding: 1.25rem 1rem;
    border-bottom: 1px solid var(--border-subtle);
    background: linear-gradient(135deg, var(--surface-2) 0%, var(--surface-3) 100%);
    position: relative;
    overflow: hidden;
}

/* Header subtle glow effect */
.sidebar-header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 2px;
    background: linear-gradient(90deg, transparent, var(--neon-red), transparent);
    opacity: 0.5;
}

/* Avatar with neon glow on hover */
.sidebar-header img {
    border: 2px solid var(--border-subtle);
    box-shadow: 0 0 0 2px var(--surface-1), 0 0 0 4px transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 50%;
}

.sidebar-header:hover img {
    border-color: var(--neon-red);
    box-shadow: 0 0 0 2px var(--surface-1), 0 0 20px rgba(255, 0, 51, 0.5);
    transform: scale(1.05);
}

.sidebar-user-info {
    flex: 1;
    min-width: 0;
}

.sidebar-username {
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.875rem;
    display: block;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}

/* Sidebar Close Button with Morphing */
.sidebar-close {
    width: 32px;
    height: 32px;
    display: flex;
    align-items: center;
    justify-content: center;
    background: transparent;
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 1rem;
    position: relative;
    overflow: hidden;
}

/* Morphing: Close button rotates and scales on hover */
.sidebar-close:hover {
    border-color: var(--neon-red);
    color: var(--neon-red);
    box-shadow: var(--glow-red-soft);
    transform: rotate(90deg) scale(1.1);
}

.sidebar-close:active {
    transform: rotate(90deg) scale(0.95);
}

/* Sidebar Content with Staggered Animation */
.sidebar-content {
    flex: 1;
    overflow-y: auto;
    padding: 0.75rem 0.5rem;
}

/* Staggered animation for menu items when sidebar opens */
.sidebar.active .sidebar-item {
    animation: slideInItem 0.4s cubic-bezier(0.4, 0, 0.2, 1) forwards;
    opacity: 0;
    transform: translateX(-20px);
}

/* Staggered delays for each item */
.sidebar.active .sidebar-item:nth-child(1) { animation-delay: 0.05s; }
.sidebar.active .sidebar-item:nth-child(2) { animation-delay: 0.1s; }
.sidebar.active .sidebar-item:nth-child(3) { animation-delay: 0.15s; }
.sidebar.active .sidebar-item:nth-child(4) { animation-delay: 0.2s; }
.sidebar.active .sidebar-item:nth-child(5) { animation-delay: 0.25s; }
.sidebar.active .sidebar-item:nth-child(6) { animation-delay: 0.3s; }
.sidebar.active .sidebar-item:nth-child(7) { animation-delay: 0.35s; }
.sidebar.active .sidebar-item:nth-child(8) { animation-delay: 0.4s; }
.sidebar.active .sidebar-item:nth-child(9) { animation-delay: 0.45s; }
.sidebar.active .sidebar-item:nth-child(10) { animation-delay: 0.5s; }

@keyframes slideInItem {
    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.sidebar-content::-webkit-scrollbar {
    width: 4px;
}

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

.sidebar-content::-webkit-scrollbar-thumb {
    background: var(--border-subtle);
    border-radius: 2px;
}

.sidebar-content::-webkit-scrollbar-thumb:hover {
    background: var(--neon-red-dim);
}

/* Sidebar Section */
.sidebar-section {
    padding: 0.5rem 0;
}

.sidebar-divider {
    height: 1px;
    background: var(--border-subtle);
    margin: 0.5rem 0;
}

/* Premium Sidebar Items */
.sidebar-item {
    display: flex;
    align-items: center;
    gap: 0.875rem;
    padding: 0.875rem 1rem;
    color: var(--text-secondary);
    text-decoration: none;
    border-radius: var(--radius-sm);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.875rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
    margin-bottom: 0.25rem;
}

/* Active indicator bar - glowing vertical line */
.sidebar-item::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 0;
    background: var(--neon-red);
    border-radius: 0 2px 2px 0;
    box-shadow: 0 0 10px var(--neon-red);
    transition: height 0.25s cubic-bezier(0.4, 0, 0.2, 1);
}

.sidebar-item.active::before,
.sidebar-item:hover::before {
    height: 60%;
}

/* Active state styling */
.sidebar-item.active {
    background: linear-gradient(90deg, rgba(255, 0, 51, 0.1) 0%, transparent 100%);
    color: var(--text-primary);
    border-left: 3px solid var(--neon-red);
}

/* Hover: Slide right with neon glow */
.sidebar-item:hover {
    background: linear-gradient(90deg, var(--surface-3) 0%, var(--surface-2) 100%);
    color: var(--text-primary);
    transform: translateX(8px);
    box-shadow: -4px 0 16px rgba(255, 0, 51, 0.15);
}

.sidebar-item img {
    width: 20px;
    height: 20px;
    object-fit: contain;
    filter: brightness(0.9);
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    flex-shrink: 0;
}

/* Icon animation on hover */
.sidebar-item:hover img {
    filter: brightness(1.2) drop-shadow(0 0 6px var(--neon-red));
    transform: scale(1.15) rotate(5deg);
}

/* Premium Logout/Danger Button with Strong Pulse */
.sidebar-item-danger {
    color: var(--neon-red);
    border: 1px solid var(--neon-red-dim);
    background: linear-gradient(135deg, rgba(255, 0, 51, 0.08) 0%, rgba(255, 0, 51, 0.02) 100%);
    margin-top: 0.75rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

/* Red glow line at top */
.sidebar-item-danger::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, var(--neon-red), transparent);
    opacity: 0.3;
    transition: opacity 0.3s ease;
}

/* Strong hover with scale and intense pulse */
.sidebar-item-danger:hover {
    background: var(--neon-red);
    color: var(--pure-black);
    border-color: var(--neon-red);
    transform: translateX(8px) scale(1.03);
    box-shadow: 0 0 30px rgba(255, 0, 51, 0.5), 0 0 60px rgba(255, 0, 51, 0.3);
    animation: logoutPulse 1.2s ease-in-out infinite;
}

.sidebar-item-danger:hover::after {
    opacity: 1;
}

@keyframes logoutPulse {
    0%, 100% { 
        box-shadow: 0 0 30px rgba(255, 0, 51, 0.5), 0 0 60px rgba(255, 0, 51, 0.3);
        transform: translateX(8px) scale(1.03);
    }
    50% { 
        box-shadow: 0 0 40px rgba(255, 0, 51, 0.7), 0 0 80px rgba(255, 0, 51, 0.5);
        transform: translateX(8px) scale(1.05);
    }
}

.sidebar-item-danger:active {
    transform: translateX(8px) scale(0.98);
    animation: none;
}

.sidebar-item-danger:hover img {
    filter: brightness(0) invert(0);
    transform: scale(1.25) rotate(-10deg);
}

/* Touch-friendly for all mobile devices */
.sidebar-item {
    min-height: 44px; /* iOS recommended touch target */
}

.sidebar-toggle {
    min-height: 44px;
    min-width: 44px;
}

/* ========================================
   MENU TOGGLE BUTTON - Visible hamburger
   ======================================== */
.menu-toggle-btn {
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    width: 40px;
    height: 40px;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    cursor: pointer;
    padding: 8px;
    gap: 5px;
    transition: var(--transition);
    z-index: 1040;
}

.menu-toggle-btn:hover {
    background: var(--surface-3);
    border-color: var(--neon-red);
    box-shadow: var(--glow-red-soft);
}

.menu-toggle-btn span {
    display: block;
    width: 20px;
    height: 2px;
    background: var(--text-primary);
    border-radius: 2px;
    transition: all 0.4s cubic-bezier(0.68, -0.55, 0.265, 1.55);
    transform-origin: center;
}

/* Morphing: Hamburger to X animation */
.menu-toggle-btn.active span:nth-child(1) {
    transform: rotate(45deg) translate(5px, 5px);
    width: 24px;
}

.menu-toggle-btn.active span:nth-child(2) {
    opacity: 0;
    transform: translateX(-10px);
}

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

/* ========================================
   QUICK NAV ICONS - Always Visible beside brand (All Screens)
   ======================================== */
.quick-nav-icons {
    display: flex;
    align-items: center;
    gap: 8px;
    margin-left: 12px;
    margin-right: auto;
}

.quick-nav-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-sm);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    text-decoration: none;
    position: relative;
    overflow: hidden;
}

/* Morphing: Icon hover effect with scale and glow */
.quick-nav-icon:hover,
.quick-nav-icon:active {
    background: var(--surface-3);
    border-color: var(--neon-red);
    box-shadow: var(--glow-red-soft);
    transform: scale(1.1);
}

.quick-nav-icon img {
    filter: brightness(1.2);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    transform-origin: center;
}

/* Morphing: Icon image rotation and glow on hover */
.quick-nav-icon:hover img {
    filter: brightness(1) drop-shadow(0 0 6px var(--neon-red));
    transform: rotate(10deg) scale(1.15);
}

/* Morphing: Ripple effect on click */
.quick-nav-icon::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    background: var(--neon-red);
    border-radius: 50%;
    transform: scale(0);
    opacity: 0;
    transition: all 0.5s ease-out;
    pointer-events: none;
}

.quick-nav-icon:active::after {
    transform: scale(2);
    opacity: 0.2;
}

/* Desktop - larger icons and button positioning */
@media (min-width: 992px) {
    .quick-nav-icons {
        gap: 10px;
        margin-left: 15px;
        margin-right: 0;
    }
    
    .quick-nav-icon {
        width: 40px;
        height: 40px;
    }
    
    .quick-nav-icon img {
        width: 22px;
        height: 22px;
    }
    
    /* Push menu button to the right on desktop */
    .menu-toggle-btn {
        margin-left: auto;
    }
}

/* Mobile-specific fixes for small screens */
@media (max-width: 575px) {
    .navbar-brand {
        font-size: 0.85rem;
        max-width: 120px;
        overflow: hidden;
        text-overflow: ellipsis;
        white-space: nowrap;
    }
    
    .quick-nav-icons {
        gap: 6px;
        margin-left: 8px;
    }
    
    .quick-nav-icon {
        width: 32px;
        height: 32px;
    }
    
    .quick-nav-icon img {
        width: 16px;
        height: 16px;
    }
    
    .menu-toggle-btn {
        width: 36px;
        height: 36px;
        padding: 6px;
        margin-left: auto;
    }
    
    .menu-toggle-btn span {
        width: 18px;
    }
}

/* Hide old Bootstrap dropdown styles */
.dropdown-menu,
.dropdown-toggle::after {
    display: none !important;
}

/* Hide old navbar-toggler - we use menu-toggle-btn instead */
.navbar-toggler {
    display: none !important;
}

/* Fix for sticky header scroll issue - allow natural scroll */
html {
    scroll-padding-top: 60px;
}

.navbar-brand {
    font-family: var(--font-mono);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary) !important;
    letter-spacing: 1px;
}

.navbar-brand span,
.navbar-brand .text-red {
    color: var(--neon-red) !important;
    text-shadow: var(--glow-red);
}

.navbar-nav {
    gap: 0.5rem;
}

.navbar .nav-link {
    color: var(--text-secondary) !important;
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.375rem 0.75rem !important;
    border-radius: var(--radius-sm);
    transition: var(--transition);
    position: relative;
}

.navbar .nav-link:hover,
.navbar .nav-link:focus {
    color: var(--neon-red) !important;
    background: var(--surface-3);
}

.navbar .nav-link.active {
    color: var(--neon-red) !important;
    background: var(--surface-3);
    box-shadow: var(--glow-inner);
}

/* Account Info - Compact, Non-Overlapping */
.navbar .account-info {
    display: flex;
    align-items: center;
    gap: 0.75rem;
    font-size: 0.75rem;
    color: var(--text-muted);
}

.navbar .account-expires {
    font-family: var(--font-mono);
    color: var(--neon-red);
    font-size: 0.6875rem;
    letter-spacing: 0.5px;
    white-space: nowrap;
}

/* Dropdown Menu - Always show all items, no internal scroll */
.dropdown-menu {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-lg), 0 0 30px rgba(0, 0, 0, 0.5);
    padding: 0.25rem;
    min-width: 200px;
    max-width: 260px;
    z-index: 1050;
    max-height: none;
    overflow: visible;
}

.dropdown-item {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.dropdown-item:hover,
.dropdown-item:focus {
    background: var(--surface-4);
    color: var(--neon-red);
}

.dropdown-divider {
    border-color: var(--border-subtle);
    margin: 0.25rem 0.5rem;
}

/* Make Logout more visible */
.dropdown-item.text-danger {
    background: rgba(255, 0, 51, 0.1);
    border: 1px solid var(--neon-red-dim);
    margin-top: 0.25rem;
    font-weight: 500;
}

.dropdown-item.text-danger:hover {
    background: var(--neon-red);
    color: var(--pure-black) !important;
}

.dropdown-item.text-danger:hover img {
    filter: brightness(0);
}

/* ========================================
   CARDS - Vantablack with Neon Accents & Morphing
   ======================================== */

.card {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-md);
    box-shadow: var(--shadow-sm);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    overflow: hidden;
    position: relative;
}

/* Morphing: Card lift and glow on hover */
.card:hover {
    border-color: var(--neon-red-dim);
    box-shadow: var(--shadow-md), var(--glow-red-soft);
    transform: translateY(-4px) scale(1.01);
}

/* Morphing: Card shine effect */
.card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(
        90deg,
        transparent,
        rgba(255, 255, 255, 0.03),
        transparent
    );
    transition: left 0.5s ease;
    pointer-events: none;
}

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

/* Card Header - Minimal */
.card-header {
    background: var(--surface-3);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    font-weight: 600;
    color: var(--text-primary);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.card-header.bg-dark {
    background: var(--surface-3) !important;
}

.card-header::before {
    content: '';
    width: 3px;
    height: 14px;
    background: var(--neon-red);
    border-radius: 2px;
    box-shadow: var(--glow-red);
}

/* Card Body */
.card-body {
    padding: 1rem;
    color: var(--text-secondary);
}

/* Card Footer - Compact */
.card-footer {
    background: var(--surface-3);
    border-top: 1px solid var(--border-subtle);
    padding: 0.625rem 1rem;
}

/* ========================================
   LIST GROUP - Minimal Dark
   ======================================== */

.list-group {
    border-radius: var(--radius-md);
}

.list-group-item {
    background: transparent;
    border: none;
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.625rem 0;
    color: var(--text-secondary);
    font-size: 0.8125rem;
    display: flex;
    justify-content: space-between;
    align-items: center;
    transition: var(--transition);
}

.list-group-item:last-child {
    border-bottom: none;
}

.list-group-item:hover {
    background: transparent;
    color: var(--text-primary);
    padding-left: 0.5rem;
}

.list-group-item .badge {
    background: var(--surface-4);
    color: var(--text-primary);
    border: 1px solid var(--border-light);
}

/* ========================================
   BUTTONS - Neon Red Accents with Morphing
   ======================================== */

.btn {
    font-family: var(--font-main);
    font-size: 0.8125rem;
    font-weight: 500;
    padding: 0.5rem 1rem;
    border-radius: var(--radius-sm);
    border: 1px solid transparent;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    position: relative;
    overflow: hidden;
}

/* Morphing: Button press effect */
.btn:active {
    transform: scale(0.96);
}

/* Primary - Neon Red with Morphing */
.btn-primary,
.btn-default {
    background: transparent;
    color: var(--neon-red);
    border-color: var(--neon-red);
    position: relative;
    overflow: hidden;
}

/* Morphing: Fill animation from left */
.btn-primary::before,
.btn-default::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: var(--neon-red);
    transition: left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: -1;
}

.btn-primary:hover::before,
.btn-default:hover::before {
    left: 0;
}

.btn-primary:hover,
.btn-default:hover {
    color: var(--pure-black);
    box-shadow: var(--glow-red);
    border-color: var(--neon-red);
    transform: translateY(-2px);
}

/* Dark Button */
.btn-dark {
    background: var(--surface-4);
    color: var(--text-primary);
    border-color: var(--border-light);
}

.btn-dark:hover {
    background: var(--surface-5);
    border-color: var(--neon-red-dim);
    color: var(--neon-red);
}

/* Success - Muted Green */
.btn-success {
    background: transparent;
    color: #00C853;
    border-color: #00C853;
}

.btn-success:hover {
    background: #00C853;
    color: var(--pure-black);
    box-shadow: 0 0 10px rgba(0, 200, 83, 0.4);
}

/* Danger - Neon Red */
.btn-danger {
    background: transparent;
    color: var(--neon-red);
    border-color: var(--neon-red);
}

.btn-danger:hover {
    background: var(--neon-red);
    color: var(--pure-black);
    box-shadow: var(--glow-red);
}

/* Outline Variants */
.btn-outline-primary {
    background: transparent;
    color: var(--neon-red);
    border-color: var(--neon-red-dim);
}

.btn-outline-primary:hover {
    background: var(--neon-red-soft);
    border-color: var(--neon-red);
    color: var(--neon-red);
    box-shadow: var(--glow-red-soft);
}

/* Small Buttons */
.btn-sm {
    padding: 0.375rem 0.625rem;
    font-size: 0.75rem;
}

/* ========================================
   FORMS - Dark Minimal
   ======================================== */

.form-control,
.form-select {
    background: var(--surface-3);
    border: 1px solid var(--border-subtle);
    color: var(--text-primary);
    font-size: 0.8125rem;
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.form-control:focus,
.form-select:focus {
    background: var(--surface-4);
    border-color: var(--neon-red-dim);
    color: var(--text-primary);
    box-shadow: var(--glow-inner);
    outline: none;
}

.form-control::placeholder {
    color: var(--text-dark);
}

.form-label {
    color: var(--text-secondary);
    font-size: 0.75rem;
    font-weight: 500;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-bottom: 0.375rem;
}

.form-text {
    color: var(--text-muted);
    font-size: 0.6875rem;
}

/* Input Groups */
.input-group-text {
    background: var(--surface-4);
    border: 1px solid var(--border-subtle);
    color: var(--text-muted);
    font-size: 0.8125rem;
}

/* ========================================
   BADGES - Minimal
   ======================================== */

.badge {
    font-family: var(--font-mono);
    font-size: 0.6875rem;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    border-radius: var(--radius-sm);
    letter-spacing: 0.5px;
}

.badge.bg-dark,
.badge.text-dark {
    background: var(--surface-4) !important;
    color: var(--text-secondary) !important;
    border: 1px solid var(--border-light);
}

.badge.bg-primary,
.badge.text-primary {
    background: var(--neon-red-soft) !important;
    color: var(--neon-red) !important;
    border: 1px solid var(--neon-red-dim);
}

/* ========================================
   ALERTS - Dark with Accent Borders
   ======================================== */

.alert {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-left: 3px solid var(--border-subtle);
    border-radius: var(--radius-md);
    padding: 0.75rem 1rem;
    font-size: 0.8125rem;
    color: var(--text-secondary);
}

.alert-success {
    border-left-color: #00C853;
    background: rgba(0, 200, 83, 0.05);
}

.alert-danger {
    border-left-color: var(--neon-red);
    background: rgba(255, 0, 51, 0.05);
}

.alert-warning {
    border-left-color: #FFB800;
    background: rgba(255, 184, 0, 0.05);
}

.alert-info {
    border-left-color: #00B8D4;
    background: rgba(0, 184, 212, 0.05);
}

/* ========================================
   TABLES - Dark Minimal
   ======================================== */

.table {
    color: var(--text-secondary);
    font-size: 0.8125rem;
    border-collapse: separate;
    border-spacing: 0;
}

.table thead th {
    background: var(--surface-3);
    color: var(--text-primary);
    font-weight: 600;
    font-size: 0.6875rem;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    padding: 0.625rem;
    border-bottom: 1px solid var(--border-subtle);
    border-top: none;
}

.table tbody td {
    padding: 0.625rem;
    border-bottom: 1px solid var(--border-subtle);
    vertical-align: middle;
}

.table tbody tr:hover td {
    background: var(--surface-3);
    color: var(--text-primary);
}

/* ========================================
   PAGINATION - Minimal
   ======================================== */

.pagination {
    gap: 0.25rem;
}

.page-link {
    background: var(--surface-3);
    border: 1px solid var(--border-subtle);
    color: var(--text-secondary);
    font-size: 0.75rem;
    padding: 0.375rem 0.625rem;
    border-radius: var(--radius-sm);
    transition: var(--transition);
}

.page-link:hover {
    background: var(--surface-4);
    border-color: var(--neon-red-dim);
    color: var(--neon-red);
}

.page-item.active .page-link {
    background: var(--neon-red);
    border-color: var(--neon-red);
    color: var(--pure-black);
    box-shadow: var(--glow-red);
}

.page-item.disabled .page-link {
    background: var(--surface-2);
    color: var(--text-dark);
}

/* ========================================
   MODAL - Dark Theme
   ======================================== */

.modal-content {
    background: var(--surface-2);
    border: 1px solid var(--border-subtle);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-lg);
}

.modal-header {
    background: var(--surface-3);
    border-bottom: 1px solid var(--border-subtle);
    padding: 0.75rem 1rem;
}

.modal-title {
    font-size: 0.875rem;
    font-weight: 600;
    color: var(--text-primary);
}

.modal-body {
    padding: 1rem;
    color: var(--text-secondary);
}

.modal-footer {
    background: var(--surface-3);
    border-top: 1px solid var(--border-subtle);
    padding: 0.75rem 1rem;
}

/* Close Button */
.btn-close {
    filter: invert(1) grayscale(100%);
    opacity: 0.5;
}

.btn-close:hover {
    opacity: 1;
}

/* ========================================
   FOOTER - Compact Minimal Dark
   ======================================== */

.footer,
footer,
footer.bg-body,
footer.fixed-bottom {
    background: var(--surface-1) !important;
    border-top: 1px solid var(--border-subtle) !important;
    padding: 0.5rem 1rem !important;
    font-size: 0.6875rem;
    color: var(--text-muted) !important;
    text-align: center;
    margin-top: auto;
}

.footer small,
footer small {
    color: var(--text-muted) !important;
}

.footer a {
    color: var(--text-secondary);
    text-decoration: none;
    transition: var(--transition);
}

.footer a:hover {
    color: var(--neon-red);
}

/* ========================================
   PAGE LAYOUT - Ensure Footer at Bottom
   ======================================== */

/* Force footer to bottom with flexbox */
html, body {
    height: 100%;
    min-height: 100vh;
}

body.d-flex.flex-column.min-vh-100 {
    display: flex !important;
    flex-direction: column !important;
    min-height: 100vh !important;
    height: 100%;
}

body > main.flex-grow-1 {
    flex: 1 0 auto !important;
    display: flex;
    flex-direction: column;
    min-height: 0;
}

body > main > .container {
    flex: 1;
    display: flex;
    flex-direction: column;
}

body > footer,
body > footer.mt-auto {
    flex-shrink: 0 !important;
    margin-top: auto !important;
    position: relative;
    bottom: 0;
    width: 100%;
}

/* Ensure content fills available space */
#content {
    flex: 1;
    min-height: calc(100vh - 120px);
}

/* Allow scrolling on all pages */
html, body {
    overflow-y: auto;
    overflow-x: hidden;
}

/* For login/register pages with less content - ensure they don't cause extra scroll */
main .row.justify-content-center {
    min-height: calc(100vh - 150px);
    align-items: center;
}

/* ========================================
   UTILITIES & HELPERS
   ======================================== */

/* Key Sensitivity Blur */
.key-sensi {
    filter: blur(3px);
    transition: filter 0.3s ease;
}

.key-sensi:hover {
    filter: blur(0);
}

/* Neon Text */
.text-neon {
    color: var(--neon-red);
    text-shadow: var(--glow-red);
}

/* Gradient Text */
.text-gradient {
    background: linear-gradient(90deg, var(--neon-red), var(--neon-red-soft));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

/* Monospace Text */
.text-mono {
    font-family: var(--font-mono);
}

/* Card Hover Glow */
.card-glow:hover {
    box-shadow: var(--shadow-md), var(--glow-red-soft);
    border-color: var(--neon-red-dim);
}

/* Status Indicators */
.status-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    display: inline-block;
}

.status-dot.active {
    background: #00C853;
    box-shadow: 0 0 8px #00C853;
}

.status-dot.inactive {
    background: var(--text-muted);
}

.status-dot.expired {
    background: var(--neon-red);
    box-shadow: var(--glow-red);
}

/* ========================================
   ANIMATIONS
   ======================================== */

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

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

@keyframes glow {
    0%, 100% { box-shadow: var(--glow-red); }
    50% { box-shadow: var(--glow-red-strong); }
}

/* Entrance Animation */
.card,
.alert,
.table {
    animation: fadeIn 0.3s ease-out;
}

/* Loading Pulse */
.loading-pulse {
    animation: pulse 1.5s ease-in-out infinite;
}

/* Neon Glow Animation */
.glow-animated {
    animation: glow 2s ease-in-out infinite;
}

/* ========================================
   RESPONSIVE DESIGN - Laptop Optimized
   ======================================== */

@media (max-width: 991px) {
    .navbar {
        padding: 0.5rem;
    }
    
    .navbar .account-info {
        flex-direction: column;
        gap: 0.25rem;
        align-items: flex-start;
    }
    
    .container {
        padding: 0.75rem;
    }
    
    .card {
        margin-bottom: 0.75rem;
    }
    
    .card-header {
        padding: 0.625rem 0.75rem;
    }
    
    .card-body {
        padding: 0.75rem;
    }
}

@media (max-width: 576px) {
    body {
        font-size: 13px;
    }
    
    .navbar-brand {
        font-size: 0.875rem;
    }
    
    .navbar-brand img {
        width: 20px;
        height: 20px;
    }
    
    .card-header {
        font-size: 0.75rem;
    }
    
    .btn {
        padding: 0.4375rem 0.75rem;
        font-size: 0.75rem;
    }
    
    .table {
        font-size: 0.75rem;
    }
    
    /* Mobile sidebar adjustments - Full overlay mode */
    .sidebar {
        width: 280px;
        max-width: 85vw;
        right: -100%;
        transform: translateX(100%) scale(0.95);
    }
    
    .sidebar.active {
        right: 0;
        transform: translateX(0) scale(1);
    }
    
    /* Larger touch targets for mobile */
    .sidebar-item {
        padding: 1rem 0.875rem;
        font-size: 0.9375rem;
        min-height: 52px;
        margin-bottom: 0.375rem;
    }
    
    .sidebar-item img {
        width: 24px;
        height: 24px;
    }
    
    .sidebar-header {
        padding: 1rem;
    }
    
    .sidebar-header img {
        width: 44px;
        height: 44px;
    }
    
    .sidebar-username {
        font-size: 0.9375rem;
    }
    
    .sidebar-close {
        width: 40px;
        height: 40px;
    }
    
    /* Faster staggered animation on mobile */
    .sidebar.active .sidebar-item:nth-child(1) { animation-delay: 0.03s; }
    .sidebar.active .sidebar-item:nth-child(2) { animation-delay: 0.06s; }
    .sidebar.active .sidebar-item:nth-child(3) { animation-delay: 0.09s; }
    .sidebar.active .sidebar-item:nth-child(4) { animation-delay: 0.12s; }
    .sidebar.active .sidebar-item:nth-child(5) { animation-delay: 0.15s; }
    .sidebar.active .sidebar-item:nth-child(6) { animation-delay: 0.18s; }
    .sidebar.active .sidebar-item:nth-child(7) { animation-delay: 0.21s; }
    .sidebar.active .sidebar-item:nth-child(8) { animation-delay: 0.24s; }
}

/* Tablet Optimization (577px - 991px) */
@media (min-width: 577px) and (max-width: 991px) {
    .sidebar {
        width: 300px;
    }
    
    .sidebar-toggle {
        width: 38px;
        height: 38px;
    }
    
    /* Medium touch targets for tablet */
    .sidebar-item {
        padding: 0.875rem 1rem;
        min-height: 48px;
    }
}

/* Laptop Optimization (992px - 1920px) */
@media (min-width: 992px) and (max-width: 1920px) {
    .container {
        max-width: 1100px;
    }
    
    .card {
        margin-bottom: 1rem;
    }
}

/* Large Screens / 4K (1921px+) */
@media (min-width: 1921px) {
    .container {
        max-width: 1400px;
    }
    
    body {
        font-size: 15px;
    }
}

/* ========================================
   COLLAPSED SIDEBAR MODE - Icons Only
   ======================================== */

/* Collapsed state - narrow sidebar showing only icons */
.sidebar.collapsed {
    width: 70px;
    transform: translateX(0) scale(1) !important;
}

.sidebar.collapsed .sidebar-header {
    justify-content: center;
    padding: 1rem 0.5rem;
}

.sidebar.collapsed .sidebar-header img {
    margin: 0 auto;
}

.sidebar.collapsed .sidebar-user-info,
.sidebar.collapsed .sidebar-close {
    display: none;
}

/* Hide text labels, show only icons */
.sidebar.collapsed .sidebar-item {
    justify-content: center;
    padding: 0.875rem 0.5rem;
}

.sidebar.collapsed .sidebar-item span {
    opacity: 0;
    width: 0;
    overflow: hidden;
    transition: all 0.3s ease;
}

.sidebar.collapsed .sidebar-item img {
    margin: 0;
    transform: none;
}

/* Show text on hover in collapsed mode */
.sidebar.collapsed .sidebar-item:hover span {
    opacity: 1;
    width: auto;
    margin-left: 0.75rem;
}

/* Tooltip-style popup for collapsed items */
.sidebar.collapsed .sidebar-item::after {
    content: attr(title);
    position: absolute;
    left: 100%;
    top: 50%;
    transform: translateY(-50%);
    background: var(--surface-2);
    color: var(--text-primary);
    padding: 0.5rem 0.75rem;
    border-radius: var(--radius-sm);
    border: 1px solid var(--border-subtle);
    font-size: 0.75rem;
    white-space: nowrap;
    opacity: 0;
    visibility: hidden;
    transition: all 0.2s ease;
    margin-left: 10px;
    box-shadow: var(--shadow-md);
    z-index: 1060;
}

.sidebar.collapsed .sidebar-item:hover::after {
    opacity: 1;
    visibility: visible;
    margin-left: 15px;
}

/* Divider in collapsed mode */
.sidebar.collapsed .sidebar-divider {
    margin: 0.5rem;
    opacity: 0.3;
}

/* ========================================
   CONTENT AREA
   ======================================== */

#content {
    animation: fadeIn 0.3s ease-out;
}

/* ========================================
   FIXES FOR VISUAL BUGS
   ======================================== */

/* Prevent horizontal overflow */
.container,
.card,
.table-responsive {
    max-width: 100%;
    overflow-x: hidden;
}

/* Fix account expires overlapping */
.navbar-collapse {
    flex-basis: auto;
}

/* Compact navbar items */
.navbar-nav .nav-item {
    white-space: nowrap;
}

/* Prevent body scroll when mobile menu is open */
body.navbar-open {
    overflow: hidden;
}

/* Fix main content not being pushed by footer */
main {
    min-height: calc(100vh - 100px);
}
