/* ======================================================================================
 * YTSEO ENTERPRISE - QUANTUM DESIGN SYSTEM (v25.0 TITANIUM)
 * ======================================================================================
 * Project: YTSEO Enterprise Intelligence Suite
 * Author:  YTSEO Development Team
 * Version: 25.0.0 (Nebula Titanium Extended)
 * Theme:   Deep Space Purple + Neon Orange (High Contrast Visibility Fix)
 * Status:  Production Ready
 * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * * TABLE OF CONTENTS:
 * --------------------------------------------------------------------------------------
 * 1.   CORE VARIABLES & COLOR PALETTE
 * 2.   GLOBAL RESET & TYPOGRAPHY STANDARDS
 * 3.   DARK MODE ENFORCER (CRITICAL OVERRIDES)
 * 4.   QUANTUM BACKGROUND ENGINE (ANIMATED)
 * 5.   LAYOUT ARCHITECTURE & GRID SYSTEM
 * 6.   HEADER & PRISM NAVIGATION
 * 7.   SOLAR FLARE SIDEBAR SYSTEM
 * 8.   GLASS COMPONENT LIBRARY (CARDS & PANELS)
 * 9.   FORM INTELLIGENCE (INPUTS, SELECTS, TOGGLES)
 * 10.  BUTTONS & INTERACTIVE ELEMENTS
 * 11.  VIDEO GRID ARCHITECTURE
 * 12.  FORENSIC AUDIT UI (CODE BLOCKS & LOGS)
 * 13.  PERFORMANCE TIME MACHINE (TABLES & PAGINATION)
 * 14.  DATA VISUALIZATION (TAGS, PILLS, PROGRESS)
 * 15.  ADMIN DASHBOARD WIDGETS (STATS, CHARTS)
 * 16.  ALERTS, TOASTS & NOTIFICATIONS
 * 17.  MODAL & OVERLAY SYSTEM
 * 18.  UTILITY CLASSES (SPACING, TEXT, COLOR)
 * 19.  ANIMATION CONTROLLER (KEYFRAMES)
 * 20.  RESPONSIVE MEDIA QUERIES
 * 21.  FOOTER STYLING
 * ======================================================================================
 */

/* ======================================================================================
   1. CORE VARIABLES & COLOR PALETTE
   ====================================================================================== */
:root {
    /* --- LAYOUT DIMENSIONS --- */
    --header-height: 80px;
    --sidebar-width: 280px;
    --sidebar-collapsed-width: 80px;
    --container-max-width: 1920px;
    
    /* --- BORDER RADIUS --- */
    --radius-xs: 4px;
    --radius-sm: 8px;
    --radius-md: 14px;
    --radius-lg: 20px;
    --radius-xl: 30px;
    --radius-full: 9999px;

    /* --- BASE COLORS (NEBULA THEME - DEEP SPACE) --- */
    --bg-app: #51E2F0;           /* Deepest Space Purple - Main Background */
    --bg-surface: #C8E9FA;       /* Rich Violet - Cards/Panels */
    --bg-surface-alt: #1e1b4b;   /* Deep Indigo - Inputs/Secondary Areas */
	--bg-surface-hover: #2e2652; /* Lighter Violet - Hover States */
    --bg-modal: #110e24;         /* Modal Background */
    --bg-tooltip: #312e81;       /* Tooltip Background */
    
    --border-color: #3b2d63;     /* Visible Purple Border Lines */
    --border-light: #5b4d85;     /* Lighter Border for Inputs */
    --border-focus: #ff7b00;     /* Orange Focus Border */
    
    /* --- TYPOGRAPHY PALETTE (HIGH CONTRAST) --- */
    --text-primary: #FFFFFF;     /* Pure White - Headings (Critical for readability) */
    --text-body: #140E0E;        /* Soft Lavender - Body Text */
    --text-secondary: #000000;   /* Light Indigo - Meta/Labels */
    --text-muted: #F50F0F;       /* Deep Indigo - Disabled */
    --text-inverse: #FFFFFF;     /* Dark Text for Light Buttons */
    --text-link: #F7F9FA;        /* Link Color */

    /* --- BRAND ACCENTS (SUNSET POP) --- */
    --accent-primary: #8b5cf6;   /* Electric Violet */
    --accent-secondary: #d946ef; /* Magenta */
    --accent-orange: #ff7b00;    /* Neon Sunset Orange (HERO COLOR) */
    --accent-blue: #3b82f6;      /* Laser Blue */
    --accent-cyan: #06b6d4;      /* Cyber Cyan */
    --accent-pink: #ec4899;      /* Hot Pink */
    
    /* --- SEMANTIC COLORS --- */
    --status-success: #10b981;   /* Emerald */
    --status-success-bg: rgba(16, 185, 129, 0.15);
    --status-warning: #f59e0b;   /* Amber */
    --status-warning-bg: rgba(245, 158, 11, 0.15);
    --status-error: #ef4444;     /* Red */
    --status-error-bg: rgba(239, 68, 68, 0.15);
    --status-info: #3b82f6;      /* Blue */
    --status-info-bg: rgba(59, 130, 246, 0.15);

    /* --- GRADIENTS --- */
    /* Sidebar: The "Solar Flare" (Orange to Pink/Red) */
    --grad-sidebar: linear-gradient(180deg, #ff512f 0%, #dd2476 100%);
    
    /* Header Border: The "Prism" */
    --grad-header-border: linear-gradient(90deg, #ff7b00, #ec4899, #8b5cf6, #3b82f6, #06b6d4);
    
    /* Logo Brand */
    --grad-logo: linear-gradient(135deg, #ff7b00 0%, #ff0055 100%);
    
    /* Buttons */
    --grad-action: linear-gradient(135deg, #6366f1 0%, #a855f7 100%);
    --grad-orange: linear-gradient(135deg, #ff7b00 0%, #f59e0b 100%);
    --grad-success: linear-gradient(135deg, #10b981 0%, #059669 100%);
    --grad-danger: linear-gradient(135deg, #ef4444 0%, #dc2626 100%);
    
    /* Text Gradient */
    --grad-text: linear-gradient(90deg, #ffffff 0%, #c7d2fe 100%);

    /* --- GLASSMORPHISM ENGINE --- */
    --glass-bg: rgba(21, 16, 48, 0.90);        /* Dark Violet Glass */
    --glass-border: rgba(139, 92, 246, 0.3);   /* Purple Border */
    --glass-shadow: 0 8px 32px 0 rgba(0, 0, 0, 0.6);
    --glass-blur: blur(24px);
    
    /* --- SHADOW DEPTHS --- */
    --shadow-xs: 0 1px 2px rgba(0, 0, 0, 0.2);
    --shadow-sm: 0 2px 4px rgba(0, 0, 0, 0.3);
    --shadow-md: 0 6px 12px rgba(0, 0, 0, 0.4);
    --shadow-lg: 0 15px 25px rgba(0, 0, 0, 0.5);
    --shadow-xl: 0 25px 50px rgba(0, 0, 0, 0.7);
    --shadow-glow: 0 0 30px rgba(139, 92, 246, 0.25);
    --shadow-glow-orange: 0 0 25px rgba(255, 123, 0, 0.3);

    /* --- Z-INDEX LAYERS --- */
    --z-negative: -1;
    --z-base: 10;
    --z-dropdown: 40;
    --z-floating: 50;
    --z-sidebar: 900;
    --z-header: 1000;
    --z-overlay: 9990;
    --z-modal: 9999;
    --z-toast: 10000;
    
    /* --- TRANSITIONS --- */
    --trans-fast: 0.15s ease;
    --trans-normal: 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    --trans-slow: 0.5s ease-in-out;
}
/* Footer Specific Vars */
    --footer-bg: #0b0a1e;
    --footer-border: rgba(255, 255, 255, 0.1);
    --accent-glow: rgba(255, 107, 53, 0.4); /* Matches your Orange */
    --text-muted: #8f90a6;
}

/* ======================================================================================
   2. GLOBAL RESET & TYPOGRAPHY STANDARDS
   ====================================================================================== */
html {
    box-sizing: border-box;
    scroll-behavior: smooth;
    height: 100%;
}

*, *::before, *::after {
    box-sizing: inherit;
    outline: none;
    -webkit-tap-highlight-color: transparent;
}

body {
    margin: 0;
    padding: 0;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    background-color: var(--bg-app);
    color: var(--text-body);
    font-size: 15px;
    line-height: 1.7;
    overflow-x: hidden;
    min-height: 100vh;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
}

/* Headings - High Contrast & Visibility */
h1, h2, h3, h4, h5, h6 {
    margin: 0;
    font-family: 'Outfit', sans-serif;
    font-weight: 800;
    color: var(--text-primary);
    letter-spacing: -0.02em;
    line-height: 1.2;
    text-shadow: 0 2px 4px rgba(0,0,0,0.4);
    margin-bottom: 0.75rem;
}

h1 { font-size: 2.75rem; }
h2 { font-size: 2.25rem; }
h3 { font-size: 1.75rem; }
h4 { font-size: 1.35rem; }
h5 { font-size: 1.1rem; }
h6 { font-size: 0.9rem; text-transform: uppercase; letter-spacing: 0.1em; color: var(--accent-orange); }

/* Paragraphs & Links */
p { margin-bottom: 1rem; color: var(--text-body); }
strong { color: var(--text-primary); font-weight: 700; }
small { font-size: 0.85em; color: var(--text-secondary); }

a {
    text-decoration: none;
    color: inherit;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

a:hover { color: var(--accent-orange); }
a.link-primary { color: var(--accent-blue); }
a.link-primary:hover { text-decoration: underline; color: var(--accent-primary); }

img { max-width: 100%; display: block; height: auto; }

/* Selection */
::selection {
    background: var(--accent-orange);
    color: white;
}

/* Utility: Custom Scrollbar (Purple/Orange Theme) */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-app);
    border-left: 1px solid var(--border-color);
}

::-webkit-scrollbar-thumb {
    background: linear-gradient(180deg, #4c1d95, #6d28d9);
    border-radius: 10px;
    border: 2px solid var(--bg-app);
}

::-webkit-scrollbar-thumb:hover {
    background: var(--accent-orange);
}

/* ======================================================================================
   3. DARK MODE ENFORCER (CRITICAL OVERRIDES)
   ====================================================================================== */
/* * This section forces the "Nebula" theme on any elements that might have 
 * conflicting Bootstrap or Tailwind "light mode" classes (e.g. bg-white).
 * It ensures visibility of white text on dark backgrounds.
 */

/* Force Dark Backgrounds on Cards, Modals, Panels */
.bg-white, .bg-slate-50, .bg-gray-50, .bg-gray-100, .bg-slate-100, .card, .panel {
    background-color: var(--bg-surface) !important;
    color: var(--text-body) !important;
    border-color: var(--border-color) !important;
}

/* Force White Text on Primary Headings/Text */
.text-slate-900, .text-gray-900, .text-black, .text-slate-800, .text-dark {
    color: var(--text-primary) !important;
}

/* Force Light Indigo on Secondary Text */
.text-slate-500, .text-gray-500, .text-slate-600, .text-muted {
    color: var(--text-secondary) !important;
}

/* Force Inputs to be Dark */
input.bg-white, select.bg-white, textarea.bg-white {
    background-color: var(--bg-surface-alt) !important;
    color: var(--text-primary) !important;
    border: 1px solid var(--border-color) !important;
}

/* Force Borders to be Purple */
.border-slate-200, .border-gray-200, .border-gray-300 {
    border-color: var(--border-color) !important;
}

/* ======================================================================================
   4. QUANTUM BACKGROUND ENGINE (ANIMATED)
   ====================================================================================== */
.ambient-bg {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-negative);
    background-color: var(--bg-app);
    overflow: hidden;
    pointer-events: none;
}

/* Floating Light Orbs (Purple & Orange) */
.ambient-bg::before, 
.ambient-bg::after {
    content: '';
    position: absolute;
    border-radius: 50%;
    filter: blur(150px);
    opacity: 0.35;
    animation: floatOrb 25s infinite alternate ease-in-out;
}

.ambient-bg::before {
    top: -15%;
    left: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(139, 92, 246, 0.25), transparent 70%); /* Violet */
}

.ambient-bg::after {
    bottom: -15%;
    right: -10%;
    width: 60vw;
    height: 60vw;
    background: radial-gradient(circle, rgba(255, 123, 0, 0.15), transparent 70%); /* Orange */
    animation-delay: -5s;
}

/* Technical Grid Overlay */
.grid-overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: var(--z-negative);
    background-image: 
        linear-gradient(rgba(139, 92, 246, 0.05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(139, 92, 246, 0.05) 1px, transparent 1px);
    background-size: 40px 40px;
    pointer-events: none;
    mask-image: radial-gradient(circle at center, black 50%, transparent 100%);
    -webkit-mask-image: radial-gradient(circle at center, black 50%, transparent 100%);
}

/* ======================================================================================
   5. LAYOUT ARCHITECTURE & GRID SYSTEM
   ====================================================================================== */
.quantum-layout-wrapper {
    /* Critical: Ensures content pushes down below fixed header */
    padding-top: calc(var(--header-height) + 2rem);
    
    margin-left: 0;
    transition: margin-left 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    min-height: 100vh;
    display: flex;
    flex-direction: column;
    position: relative;
}

/* Desktop Shift: Sidebar Push Logic */
@media (min-width: 1024px) {
    .quantum-layout-wrapper.shifted {
        margin-left: var(--sidebar-width);
    }
}

.quantum-main-container {
    width: 100%;
    max-width: var(--container-max-width);
    margin: 0 auto;
    padding: 0 2rem 2rem 2rem;
    flex: 1;
}

/* Row & Column System (Flexbox Fallback) */
.row {
    display: flex;
    flex-wrap: wrap;
    margin-right: -15px;
    margin-left: -15px;
}

.col-1, .col-2, .col-3, .col-4, .col-5, .col-6, 
.col-7, .col-8, .col-9, .col-10, .col-11, .col-12 {
    position: relative;
    width: 100%;
    padding-right: 15px;
    padding-left: 15px;
}

@media (min-width: 768px) {
    .col-md-6 { flex: 0 0 50%; max-width: 50%; }
    .col-md-4 { flex: 0 0 33.333333%; max-width: 33.333333%; }
    .col-md-3 { flex: 0 0 25%; max-width: 25%; }
}
/* Make the body a vertical flex column */
body {
    display: flex;
    flex-direction: column;
    min-height: 100vh; /* Forces body to be at least as tall as the screen */
    margin: 0;
}

/* Make the main content grow to fill empty space */
main, .content-wrapper { 
    flex: 1; 
}

/* ======================================================================================
   6. HEADER & PRISM NAVIGATION (Head.* CLASSES)
   ====================================================================================== */
.Head\.Navbar {
    position: fixed; top: 0; left: 0; right: 0;
    height: 90px;
    background: linear-gradient(135deg, #FFB700 0%, #FF6200 100%);
    z-index: 1000;
    display: flex; align-items: center; justify-content: space-between;
    padding: 0 2rem;
    box-shadow: 0 4px 20px rgba(255, 123, 0, 0.4);
}
.Head\.Navbar::before {
    content: ''; position: absolute; top: 0; left: 0; right: 0; height: 3px;
    background: var(--grad-header-border); z-index: 101;
    box-shadow: 0 0 15px rgba(255, 255, 255, 0.5);
}

/* --- Left Area --- */
.Head\.Left { display: flex; align-items: center; gap: 1.5rem; }

.Head\.ToggleBtn {
    color: #000000; background: rgba(255, 255, 255, 0.4);
    backdrop-filter: blur(4px); border-radius: 8px;
    width: 44px; height: 44px; display: flex; align-items: center; justify-content: center;
    font-size: 1.4rem; border: 1px solid rgba(0,0,0,0.1); cursor: pointer; transition: 0.2s;
}
.Head\.ToggleBtn:hover { background: #ffffff; transform: scale(1.05); }

.Head\.Logo { display: flex; align-items: center; gap: 0.8rem; }
.Head\.LogoIcon {
    width: 48px; height: 48px;
    background: linear-gradient(135deg, #ff7b00 0%, #ff0055 100%);
    border-radius: 12px; color: white; display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem; box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}
.Head\.LogoText .main {
    font-family: 'Outfit', sans-serif; font-weight: 900; font-size: 2rem;
    letter-spacing: -0.5px; color: #ffffff;
}

/* --- Center Navigation --- */
.Head\.NavContainer {
    display: none; align-items: center; gap: 0.5rem;
    background: rgba(255, 255, 255, 0.15); padding: 0.5rem 0.75rem;
    border-radius: 16px; border: 1px solid rgba(255,255,255,0.1);
}
@media (min-width: 1200px) { .Head\.NavContainer { display: flex; } }

.Head\.NavLink {
    border: none; background: transparent; color: rgba(255, 255, 255, 0.95);
    padding: 0.75rem 1.25rem; font-size: 1.05rem; font-weight: 700;
    border-radius: 12px; transition: 0.2s ease; display: flex; align-items: center; gap: 8px;
    cursor: pointer; text-decoration: none;
}
.Head\.NavLink:hover {
    background: #ffffff; color: #FF6200; transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.15);
}
.Head\.NavLink.active { background: #ffffff; color: #FF6200; box-shadow: 0 4px 15px rgba(0,0,0,0.2); }

/* --- Right Area (FIXED USER PROFILE) --- */
.Head\.Right { display: flex; align-items: center; gap: 1.5rem; }

.Head\.UserMenu { position: relative; }

/* Trigger Button - Forced Horizontal Layout */
.Head\.UserTrigger {
    display: flex; flex-direction: row; align-items: center; gap: 1rem;
    background: transparent; border: none; cursor: pointer;
    padding-left: 1.5rem; border-left: 1px solid rgba(255,255,255,0.3);
    white-space: nowrap; /* Prevents wrapping */
}

.Head\.UserMeta .name {
    color: white; font-weight: 700; font-size: 1.1rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.Head\.Avatar {
    width: 48px; height: 48px;
    background: white; color: #FF6200;
    border-radius: 50%; font-weight: 800; font-size: 1.4rem;
    display: flex; align-items: center; justify-content: center;
    box-shadow: 0 4px 10px rgba(0,0,0,0.2);
    flex-shrink: 0; /* Prevents avatar from squishing */
}

.Head\.ArrowIcon { color: rgba(255,255,255,0.7); font-size: 1rem; }

/* Dropdown Menu - HIDDEN BY DEFAULT */
.Head\.UserDropdown {
    position: absolute; top: 60px; right: 0;
    width: 260px;
    background: var(--bg-surface); /* Dark Theme Color */
    border: 1px solid var(--border-color);
    border-radius: 14px;
    box-shadow: 0 20px 50px rgba(0,0,0,0.5);
    display: none; /* Critical */
    flex-direction: column; padding: 0.5rem;
    z-index: 9999;
}
.Head\.UserDropdown.show { display: flex; animation: fadeInUp 0.2s ease-out; }

/* Dropdown Content */
.Head\.DropdownHeader {
    padding: 0.75rem 1rem; background: var(--bg-surface-alt);
    border-radius: 8px; margin-bottom: 0.5rem; border: 1px solid rgba(255,255,255,0.05);
}
.Head\.DropdownHeader .label { font-size: 0.7rem; color: var(--text-secondary); text-transform: uppercase; font-weight: 700; margin-bottom: 2px; }
.Head\.DropdownHeader .email { font-size: 0.85rem; font-weight: 600; color: white; overflow: hidden; text-overflow: ellipsis; }

.Head\.DropdownLink {
    display: flex; align-items: center; gap: 0.8rem; padding: 0.8rem 1rem;
    font-size: 0.9rem; font-weight: 500; color: var(--text-secondary);
    border-radius: 8px; transition: 0.2s;
}
.Head\.DropdownLink:hover { background: rgba(255,255,255,0.05); color: white; transform: translateX(5px); }
.Head\.Divider { height: 1px; background: var(--border-color); margin: 0.5rem 0; }
.Head\.DropdownLink.logout { color: #ef4444; }
.Head\.DropdownLink.logout:hover { background: rgba(239, 68, 68, 0.1); }

.Head\.LoginBtn {
    background: white; color: #FF6200; font-size: 1rem; font-weight: 800;
    padding: 0.8rem 2rem; border-radius: 12px; box-shadow: 0 4px 10px rgba(0,0,0,0.2); transition: 0.2s;
}

/* ======================================================================================
   7. SOLAR FLARE SIDEBAR SYSTEM
   ====================================================================================== */
.sidebar-container {
    position: fixed;
    top: var(--header-height);
    left: 0;
    bottom: 0;
    width: var(--sidebar-width);
    background: var(--grad-sidebar); /* Orange to Pink/Red */
    z-index: var(--z-sidebar);
    display: flex;
    flex-direction: column;
    box-shadow: 10px 0 30px rgba(0, 0, 0, 0.5);
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-right: 1px solid rgba(255, 255, 255, 0.1);
}

.sidebar-container.active { transform: translateX(0); }

.sidebar-header {
    padding: 1.5rem;
    background: rgba(0, 0, 0, 0.2);
    border-bottom: 1px solid rgba(255,255,255,0.1);
}

.sidebar-menu-label {
    font-size: 0.75rem; font-weight: 800;
    text-transform: uppercase; letter-spacing: 0.1em;
    color: rgba(255, 255, 255, 0.9);
    margin-bottom: 0.5rem; padding-left: 1.5rem;
    text-shadow: 0 1px 2px rgba(0,0,0,0.2);
}

.sidebar-scroll-area { flex: 1; overflow-y: auto; padding-top: 1.5rem; }

.sidebar-link {
    display: flex; align-items: center; gap: 1rem;
    padding: 1rem 1.5rem;
    color: rgba(255, 255, 255, 0.95);
    font-weight: 600; font-size: 0.95rem;
    transition: all 0.2s ease;
    border-left: 4px solid transparent;
}

.sidebar-link i {
    width: 24px; text-align: center; font-size: 1.2rem;
    text-shadow: 0 2px 4px rgba(0,0,0,0.2);
}

.sidebar-link:hover {
    background: rgba(255, 255, 255, 0.2);
    color: white; padding-left: 2rem;
}

.sidebar-link.active {
    background: white;
    color: #be123c; /* Deep pink text */
    border-left-color: white;
    box-shadow: 0 4px 15px rgba(0,0,0,0.2);
}

.sidebar-link.active i { color: #be123c; }

/* Submenu Styles */
.sidebar-submenu {
    padding-left: 3.5rem;
    background: rgba(0,0,0,0.1);
    display: none;
}
.sidebar-submenu.show { display: block; }
.sidebar-submenu a {
    display: block; padding: 0.5rem 0;
    color: rgba(255,255,255,0.7); font-size: 0.85rem;
}
.sidebar-submenu a:hover { color: white; }

/* ======================================================================================
   8. GLASS COMPONENT LIBRARY (CARDS & PANELS)
   ====================================================================================== */
.glass-panel, .card {
    background: var(--bg-surface); /* Rich Violet */
    border: 1px solid var(--border-color);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-md);
    transition: all 0.3s ease;
    position: relative;
    overflow: hidden;
    margin-bottom: 1.5rem;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: 0; left: 0; width: 100%; height: 4px;
    background: linear-gradient(90deg, var(--bg-surface), var(--accent-primary), var(--accent-orange), var(--bg-surface));
    opacity: 0.6;
}

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

.card-header {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
}
.card-body { padding: 1.5rem; }
.card-footer {
    padding: 1rem 1.5rem;
    border-top: 1px solid var(--border-color);
    background: rgba(0,0,0,0.1);
}

/* ======================================================================================
   9. FORM INTELLIGENCE (INPUTS, SELECTS, TOGGLES)
   ====================================================================================== */
.intelligence-bar { margin-bottom: 2rem; }

.form-group { margin-bottom: 1.25rem; }

label {
    color: var(--text-secondary);
    font-weight: 700; font-size: 0.8rem;
    margin-bottom: 0.5rem; display: block;
    text-transform: uppercase; letter-spacing: 0.05em;
}

input[type="text"],
input[type="email"],
input[type="password"],
input[type="number"],
input[type="search"],
input[type="date"],
select,
textarea {
    font-family: 'Inter', sans-serif;
    font-size: 1rem;
    background-color: var(--bg-surface-alt); /* Deep Indigo */
    border: 1px solid var(--border-light);
    color: white !important; /* Force White Text */
    padding: 0.9rem 1.2rem;
    border-radius: var(--radius-sm);
    width: 100%;
    transition: all 0.2s;
    outline: none;
}

/* Placeholders */
::placeholder { color: rgba(255, 255, 255, 0.4); }

/* Focus State */
input:focus, select:focus, textarea:focus {
    background-color: #262055;
    border-color: var(--accent-orange);
    box-shadow: 0 0 0 3px rgba(255, 123, 0, 0.25);
}

/* Disabled State */
input:disabled, select:disabled {
    background-color: #1a1a2e;
    color: var(--text-muted);
    cursor: not-allowed;
    border-color: #2a2a40;
}

/* Checkbox Customization */
.custom-checkbox {
    display: flex; align-items: center; gap: 0.5rem; cursor: pointer;
}
.custom-checkbox input {
    appearance: none; width: 1.25rem; height: 1.25rem;
    background: var(--bg-surface-alt); border: 1px solid var(--border-light);
    border-radius: 4px; position: relative;
}
.custom-checkbox input:checked {
    background: var(--accent-orange); border-color: var(--accent-orange);
}
.custom-checkbox input:checked::after {
    content: '✓'; position: absolute; color: white;
    top: 50%; left: 50%; transform: translate(-50%, -50%);
    font-size: 0.8rem; font-weight: bold;
}

/* Toggle Switch */
.toggle-switch {
    position: relative; display: inline-block; width: 50px; height: 26px;
}
.toggle-switch input { opacity: 0; width: 0; height: 0; }
.toggle-slider {
    position: absolute; cursor: pointer;
    top: 0; left: 0; right: 0; bottom: 0;
    background-color: var(--bg-surface-alt);
    border: 1px solid var(--border-light);
    transition: .4s; border-radius: 34px;
}
.toggle-slider:before {
    position: absolute; content: "";
    height: 18px; width: 18px; left: 4px; bottom: 3px;
    background-color: white; transition: .4s; border-radius: 50%;
}
input:checked + .toggle-slider { background-color: var(--accent-orange); border-color: var(--accent-orange); }
input:checked + .toggle-slider:before { transform: translateX(24px); }

/* ======================================================================================
   10. BUTTONS & INTERACTIVE ELEMENTS
   ====================================================================================== */
button { cursor: pointer; border: none; font-family: 'Inter', sans-serif; }

.btn {
    display: inline-flex; align-items: center; justify-content: center;
    padding: 0.75rem 1.5rem; font-weight: 600; font-size: 0.95rem;
    border-radius: var(--radius-sm); transition: var(--trans-normal);
    gap: 0.5rem; text-align: center; white-space: nowrap;
}

/* Primary (Purple Gradient) */
.btn-primary {
    background: var(--grad-action);
    color: white;
    box-shadow: 0 4px 15px rgba(99, 102, 241, 0.4);
}
.btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(99, 102, 241, 0.6);
}

/* Action (Orange Gradient) */
.btn-action {
    background: var(--grad-orange);
    color: white;
    box-shadow: 0 4px 15px rgba(255, 123, 0, 0.4);
}
.btn-action:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 25px rgba(255, 123, 0, 0.6);
}

/* Success */
.btn-success {
    background: var(--status-success); color: white;
}
.btn-success:hover { background: #059669; }

/* Danger */
.btn-danger {
    background: var(--status-error); color: white;
}
.btn-danger:hover { background: #dc2626; }

/* Ghost/Outline */
.btn-ghost {
    background: transparent;
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
}
.btn-ghost:hover {
    border-color: white; color: white;
    background: rgba(255,255,255,0.05);
}

/* Sizes */
.btn-sm { padding: 0.4rem 1rem; font-size: 0.85rem; }
.btn-lg { padding: 1rem 2rem; font-size: 1.1rem; }
.btn-block { width: 100%; }

/* ======================================================================================
   11. VIDEO GRID ARCHITECTURE
   ====================================================================================== */
.grid { display: grid; gap: 1.5rem; }

.grid-cols-1 { grid-template-columns: 1fr; }
@media(min-width: 640px) { .sm\:grid-cols-2 { grid-template-columns: repeat(2, 1fr); } }
@media(min-width: 1024px) { .lg\:grid-cols-3 { grid-template-columns: repeat(3, 1fr); } }
@media(min-width: 1280px) { .xl\:grid-cols-4 { grid-template-columns: repeat(4, 1fr); } }

.video-card {
    background: var(--bg-surface);
    border-radius: var(--radius-lg);
    overflow: hidden;
    border: 1px solid var(--border-color);
    transition: all 0.3s ease;
    display: flex; flex-direction: column;
    height: 100%;
}

.video-card:hover {
    transform: translateY(-8px);
    box-shadow: 0 10px 30px rgba(0,0,0,0.5);
    border-color: var(--accent-orange);
}

.video-card-img {
    width: 100%; aspect-ratio: 16/9;
    background: var(--bg-surface-alt);
    object-fit: cover;
    position: relative;
}

.duration-badge {
    position: absolute; bottom: 8px; right: 8px;
    background: rgba(0,0,0,0.8); color: white;
    padding: 2px 6px; border-radius: 4px; font-size: 0.75rem;
    font-weight: 700;
}

.video-card-content { padding: 1.25rem; flex: 1; display: flex; flex-direction: column; }

.video-card h3 { color: white; font-size: 1.1rem; margin-bottom: 0.5rem; line-height: 1.4; }
.video-card p { color: var(--text-secondary); font-size: 0.9rem; flex: 1; }

.video-stats {
    display: flex; justify-content: space-between;
    margin-top: 1rem; padding-top: 1rem;
    border-top: 1px solid var(--border-color);
    font-size: 0.85rem; color: var(--text-muted);
}

/* ======================================================================================
   12. FORENSIC AUDIT UI (CODE BLOCKS & LOGS)
   ====================================================================================== */
.audit-interface {
    background: var(--bg-app);
    border: 1px solid var(--border-color);
    border-radius: var(--radius-md);
    padding: 1.5rem;
    position: relative;
    overflow: hidden;
}

.log-entry {
    font-family: 'Fira Code', monospace;
    font-size: 0.9rem;
    padding: 0.5rem;
    border-bottom: 1px solid rgba(255,255,255,0.05);
    color: var(--text-secondary);
}
.log-entry:last-child { border-bottom: none; }
.log-timestamp { color: var(--accent-cyan); margin-right: 0.5rem; }
.log-error { color: var(--status-error); }
.log-success { color: var(--status-success); }

/* Code Snippet Block */
pre {
    background: #000000;
    padding: 1rem;
    border-radius: 8px;
    border: 1px solid #333;
    color: #a5b4fc;
    overflow-x: auto;
    margin: 1rem 0;
}

/* ======================================================================================
   13. PERFORMANCE TIME MACHINE (TABLES & PAGINATION)
   ====================================================================================== */
.table-container {
    overflow-x: auto;
    border-radius: var(--radius-md);
    border: 1px solid var(--border-color);
    box-shadow: var(--shadow-lg);
    background: var(--bg-surface);
}

table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
}

th, td { padding: 1.2rem 1.5rem; text-align: left; border-bottom: 1px solid var(--border-color); }

/* Headers - High Visibility */
th {
    background-color: var(--bg-surface-alt); /* Deep Indigo */
    color: var(--accent-orange);
    font-weight: 800; text-transform: uppercase;
    font-size: 0.75rem; letter-spacing: 0.05em;
    position: sticky; top: 0; z-index: 5;
    white-space: nowrap;
}

/* Body Rows */
td {
    color: var(--text-body);
    font-size: 0.95rem;
    background-color: var(--bg-surface);
    transition: background 0.2s;
    vertical-align: middle;
}

/* Stripes & Hover */
tbody tr:nth-child(even) td { background-color: rgba(255,255,255,0.02); }

tr:hover td {
    background-color: #2e2652; /* Hover Highlight */
    color: white;
}

td strong { color: white; font-weight: 600; }

/* Status Dots */
.status-dot {
    height: 8px; width: 8px; border-radius: 50%;
    display: inline-block; margin-right: 6px;
}
.dot-green { background: var(--status-success); box-shadow: 0 0 6px var(--status-success); }
.dot-red { background: var(--status-error); box-shadow: 0 0 6px var(--status-error); }
.dot-orange { background: var(--status-warning); box-shadow: 0 0 6px var(--status-warning); }

/* Pagination */
.pagination {
    display: flex; justify-content: center; align-items: center;
    gap: 0.5rem; padding: 1.5rem;
}
.page-link {
    width: 36px; height: 36px;
    display: flex; align-items: center; justify-content: center;
    border-radius: 8px;
    background: var(--bg-surface-alt);
    border: 1px solid var(--border-color);
    color: var(--text-secondary);
    transition: 0.2s;
}
.page-link:hover { border-color: var(--accent-orange); color: var(--accent-orange); }
.page-link.active {
    background: var(--accent-orange); color: white; border-color: var(--accent-orange);
}

/* ======================================================================================
   14. DATA VISUALIZATION (TAGS, PILLS, PROGRESS)
   ====================================================================================== */
/* Trending Tags */
.tag-chip {
    display: inline-flex; align-items: center; gap: 8px;
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid var(--border-color);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.85rem; font-weight: 600;
    color: var(--text-secondary);
    transition: 0.2s;
    cursor: pointer;
}

.tag-chip:hover {
    border-color: var(--accent-orange);
    color: var(--accent-orange);
    background: rgba(255, 123, 0, 0.15);
    transform: translateY(-2px);
}

/* Badges */
.badge {
    padding: 4px 10px; border-radius: 99px;
    font-size: 0.75rem; font-weight: 700; text-transform: uppercase;
}
.badge-success { background: var(--status-success-bg); color: var(--status-success); border: 1px solid var(--status-success); }
.badge-warning { background: var(--status-warning-bg); color: var(--status-warning); border: 1px solid var(--status-warning); }
.badge-danger { background: var(--status-error-bg); color: var(--status-error); border: 1px solid var(--status-error); }
.badge-info { background: var(--status-info-bg); color: var(--status-info); border: 1px solid var(--status-info); }

/* Progress Bars */
.progress-wrapper { margin-bottom: 1rem; }
.progress-label { display: flex; justify-content: space-between; margin-bottom: 4px; font-size: 0.85rem; color: var(--text-secondary); }
.progress-bar {
    width: 100%; height: 8px;
    background: var(--bg-surface-alt);
    border-radius: 10px; overflow: hidden;
}
.progress-fill {
    height: 100%;
    background: var(--grad-orange);
    border-radius: 10px;
    transition: width 1s ease;
}

/* ======================================================================================
   15. ADMIN DASHBOARD WIDGETS (STATS, CHARTS)
   ====================================================================================== */
.stats-grid {
    display: grid; grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 1.5rem; margin-bottom: 2rem;
}

.stat-card {
    background: var(--bg-surface);
    border: 1px solid var(--border-color);
    padding: 1.5rem; border-radius: var(--radius-md);
    display: flex; align-items: center; gap: 1.25rem;
}

.stat-icon {
    width: 56px; height: 56px;
    border-radius: 12px;
    display: flex; align-items: center; justify-content: center;
    font-size: 1.5rem;
    background: rgba(255, 123, 0, 0.1);
    color: var(--accent-orange);
}

.stat-info h4 { margin: 0; font-size: 1.5rem; color: white; }
.stat-info p { margin: 0; color: var(--text-secondary); font-size: 0.9rem; }

/* ======================================================================================
   16. ALERTS, TOASTS & NOTIFICATIONS
   ====================================================================================== */
.alert-box {
    padding: 1rem 1.2rem;
    border-radius: var(--radius-sm);
    display: flex; align-items: center; gap: 1rem;
    margin-bottom: 1rem;
    border-left: 4px solid;
    font-size: 0.95rem; font-weight: 500;
}

.alert-error {
    background: var(--status-error-bg);
    border-color: var(--status-error);
    color: #fca5a5;
}

.alert-success {
    background: var(--status-success-bg);
    border-color: var(--status-success);
    color: #6ee7b7;
}

.alert-warning {
    background: var(--status-warning-bg);
    border-color: var(--status-warning);
    color: #fcd34d;
}

.alert-info {
    background: var(--status-info-bg);
    border-color: var(--status-info);
    color: #93c5fd;
}

/* Toast Notification (Floating) */
.toast-container {
    position: fixed; bottom: 2rem; right: 2rem; z-index: var(--z-toast);
    display: flex; flex-direction: column; gap: 1rem;
}
.toast {
    background: var(--bg-surface); border: 1px solid var(--border-color);
    padding: 1rem 1.5rem; border-radius: var(--radius-sm);
    box-shadow: var(--shadow-xl);
    display: flex; align-items: center; gap: 1rem;
    animation: slideInRight 0.3s ease;
    color: white; min-width: 300px;
}
.toast i { font-size: 1.2rem; }
.toast.success i { color: var(--status-success); }
.toast.error i { color: var(--status-error); }

/* ======================================================================================
   17. MODAL & OVERLAY SYSTEM
   ====================================================================================== */
.modal-overlay {
    position: fixed; top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(0,0,0,0.8); backdrop-filter: blur(5px);
    z-index: var(--z-overlay);
    display: flex; align-items: center; justify-content: center;
    opacity: 0; visibility: hidden; transition: 0.3s;
}
.modal-overlay.open { opacity: 1; visibility: visible; }

.modal {
    background: var(--bg-modal);
    border: 1px solid var(--border-color);
    width: 100%; max-width: 600px;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    transform: translateY(20px); transition: 0.3s;
    overflow: hidden;
}
.modal-overlay.open .modal { transform: translateY(0); }

.modal-header {
    padding: 1.5rem; border-bottom: 1px solid var(--border-color);
    display: flex; justify-content: space-between; align-items: center;
}
.modal-header h3 { margin: 0; font-size: 1.25rem; }
.modal-close { background: none; color: var(--text-secondary); font-size: 1.5rem; }
.modal-body { padding: 2rem; }
.modal-footer {
    padding: 1.5rem; border-top: 1px solid var(--border-color);
    background: rgba(0,0,0,0.2); text-align: right;
}

/* ======================================================================================
   18. UTILITY CLASSES
   ====================================================================================== */
/* Spacing */
.mt-1 { margin-top: 0.25rem; } .mb-1 { margin-bottom: 0.25rem; }
.mt-2 { margin-top: 0.5rem; } .mb-2 { margin-bottom: 0.5rem; }
.mt-4 { margin-top: 1rem; } .mb-4 { margin-bottom: 1rem; }
.p-0 { padding: 0 !important; }
.p-4 { padding: 1rem; }

/* Text Alignment */
.text-center { text-align: center; }
.text-right { text-align: right; }
.text-left { text-align: left; }

/* Visibility */
.d-none { display: none !important; }
.d-block { display: block !important; }
.d-flex { display: flex !important; }

/* Colors Override */
.text-orange { color: var(--accent-orange) !important; }
.text-purple { color: var(--accent-primary) !important; }
.text-white { color: white !important; }

/* ======================================================================================
   19. ANIMATION CONTROLLER (KEYFRAMES)
   ====================================================================================== */
@keyframes fadeInUp {
    from { opacity: 0; transform: translateY(20px); }
    to { opacity: 1; transform: translateY(0); }
}

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

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

@keyframes floatOrb {
    0% { transform: translate(0, 0) scale(1); }
    100% { transform: translate(40px, 40px) scale(1.1); }
}

/* Pulse Animation */
@keyframes pulseLive {
    0% { box-shadow: 0 0 0 0 rgba(255, 123, 0, 0.4); }
    70% { box-shadow: 0 0 0 10px rgba(255, 123, 0, 0); }
    100% { box-shadow: 0 0 0 0 rgba(255, 123, 0, 0); }
}

.animate-fade-in { animation: fadeInUp 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards; }
.animate-pulse { animation: pulseLive 2s infinite; }

/* ======================================================================================
   20. RESPONSIVE MEDIA QUERIES
   ====================================================================================== */
/* Tablet & Mobile */
@media (max-width: 1024px) {
    .sidebar-container { width: 100%; transform: translateX(-100%); z-index: 1200; }
    .sidebar-container.active { transform: translateX(0); }
    .quantum-layout-wrapper { margin-left: 0 !important; }
}

/* Mobile Only */
@media (max-width: 768px) {
    :root { --header-height: 70px; }
    .intelligence-bar { flex-direction: column; gap: 1rem; }
    .top-navbar { padding: 0 1rem; }
    h1 { font-size: 2rem; }
    .header-right { gap: 0.8rem; }
    .user-name { display: none; }
    .stats-grid { grid-template-columns: 1fr; }
}

/* ======================================================================================
   21. FOOTER STYLING (Sticky, Gradient & Glassmorphism)
   ====================================================================================== */
.main-footer {
    width: 100%;
    
    /* GRADIENT: Deep Purple -> Glowing Orange -> Deep Purple */
    background: linear-gradient(
        90deg, 
        #0b0a1e 0%,                  /* Left: Deep Purple */
        var(--accent-orange) 50%,    /* Center: Bright Orange */
        #0b0a1e 100%                 /* Right: Deep Purple */
    );
    
    position: relative;
    z-index: 10;
    padding: 2.5rem 0;
    margin-top: auto; /* Push to bottom if using Flex layout on body */
    border-top: 1px solid var(--footer-border);
    box-shadow: 0 -5px 20px rgba(0, 0, 0, 0.5);
}

/* Dark Tint Overlay: Ensures text is readable over the bright orange center */
.main-footer::after {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: rgba(11, 10, 30, 0.85); /* Adjust opacity if you want more/less orange showing */
    z-index: 1; /* Sits on top of gradient, behind content */
}

/* Neon Top Line Effect */
.main-footer::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 1px;
    background: linear-gradient(90deg, transparent, #fff, transparent);
    opacity: 0.5;
    z-index: 2;
}

.footer-container {
    position: relative;
    z-index: 5; /* Ensures content sits above the tint overlay */
    max-width: 1200px;
    margin: 0 auto;
    padding: 0 20px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 2rem;
}

/* --- Brand --- */
.footer-brand {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.brand-name {
    font-size: 1.2rem;
    font-weight: 800;
    color: #fff;
    letter-spacing: 1px;
    text-transform: uppercase;
}

.brand-name .highlight {
    color: var(--accent-orange);
}

.copyright-text {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin: 0;
}

/* --- Links --- */
.footer-nav {
    display: flex;
    gap: 2rem;
}

.footer-nav a {
    color: #e0e0e0;
    text-decoration: none;
    font-size: 0.95rem;
    font-weight: 500;
    transition: all 0.3s ease;
    position: relative;
}

.footer-nav a:hover {
    color: var(--accent-orange);
    text-shadow: 0 0 10px var(--accent-glow);
}

/* --- Social Icons --- */
.footer-social {
    display: flex;
    gap: 1rem;
}

.social-link {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.05);
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    text-decoration: none;
    transition: all 0.3s cubic-bezier(0.175, 0.885, 0.32, 1.275);
    border: 1px solid rgba(255,255,255,0.1);
}

.social-link i { font-size: 1.1rem; }

/* Social Brand Colors */
.social-link.fb:hover { background: #1877f2; border-color: #1877f2; box-shadow: 0 0 15px rgba(24, 119, 242, 0.5); transform: translateY(-3px); }
.social-link.tw:hover { background: #1da1f2; border-color: #1da1f2; box-shadow: 0 0 15px rgba(29, 161, 242, 0.5); transform: translateY(-3px); }
.social-link.ig:hover { background: #e1306c; border-color: #e1306c; box-shadow: 0 0 15px rgba(225, 48, 108, 0.5); transform: translateY(-3px); }
.social-link.yt:hover { background: #ff0000; border-color: #ff0000; box-shadow: 0 0 15px rgba(255, 0, 0, 0.5); transform: translateY(-3px); }

/* --- Mobile Responsive --- */
@media (max-width: 768px) {
    .footer-container {
        flex-direction: column;
        text-align: center;
        gap: 1.5rem;
    }
    .footer-nav {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1rem;
    }
}
/* The Main Layout Wrapper for the Audit Page */
.audit-layout-grid {
    display: flex;
    gap: 2rem;
    align-items: flex-start; /* Crucial for sticky sidebar behavior */
    position: relative;
    width: 100%;
}

/* The Right Sidebar Container */
.right-sidebar {
    width: 350px; /* Fixed width for the sidebar */
    flex-shrink: 0; /* Prevents it from being squished */
    position: sticky;
    top: 110px; /* Offset for your fixed header height + gap */
    height: calc(100vh - 140px); /* Fill remaining height */
    overflow-y: auto; /* Scrollable internally if content is long */
    padding-right: 5px; /* Space for scrollbar */
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Custom Scrollbar for the Right Sidebar */
.right-sidebar::-webkit-scrollbar { width: 4px; }
.right-sidebar::-webkit-scrollbar-thumb { background: var(--accent-orange); border-radius: 4px; }
.right-sidebar::-webkit-scrollbar-track { background: rgba(255,255,255,0.05); }

/* Left Content Column */
.content-column {
    flex: 1; /* Takes up remaining space */
    min-width: 0; /* Prevents grid items from overflowing */
}

/* Widget Card Styling for Sidebar */
.right-sidebar .glass-panel {
    margin-bottom: 0; /* Let flex gap handle spacing */
    transition: transform 0.2s ease;
}

/* RESPONSIVE: Tablet/Mobile adjustments */
@media (max-width: 1280px) {
    .audit-layout-grid {
        flex-direction: column;
    }
    
    .right-sidebar {
        width: 100%; /* Full width on mobile */
        height: auto;
        position: relative;
        top: 0;
        overflow-y: visible;
        margin-top: 20px;
    }
    
    .right-sidebar .glass-panel {
        margin-bottom: 20px;
    }
}