/* ========================================
   noRECOGNITION - MODERN LIGHT DESIGN SYSTEM
   v1.0.0 - Light Mode with Modern Effects
   Theme: "Adversarial Aesthetics - Light Edition"
   ======================================== */

/* ========================================
   DESIGN TOKENS & CSS VARIABLES
   ======================================== */
:root {
    /* Light Mode Color Palette */
    --bg-primary: #f0f4ff;
    --bg-secondary: #e8f0fe;
    --bg-tertiary: #dce7fd;
    --bg-glass: rgba(255, 255, 255, 0.85);
    --bg-glass-heavy: rgba(255, 255, 255, 0.95);

    /* Aurora Gradient Colors (slightly adjusted for light mode) */
    --aurora-cyan: #00d4ea;
    --aurora-magenta: #e600e6;
    --aurora-blue: #0070f0;
    --aurora-purple: #7c3aed;
    --aurora-green: #00e676;
    --aurora-pink: #f50057;

    /* Accent Colors for Light Mode */
    --accent-cyan: #0891b2;
    --accent-magenta: #c026d3;
    --accent-blue: #2563eb;
    --accent-green: #059669;
    --accent-yellow: #d97706;
    --accent-red: #dc2626;

    /* Text Colors */
    --text-primary: #0f172a;
    --text-secondary: #475569;
    --text-tertiary: #64748b;
    --text-muted: #94a3b8;

    /* Aurora Gradients */
    --gradient-aurora: linear-gradient(135deg,
        var(--aurora-cyan) 0%,
        var(--aurora-blue) 25%,
        var(--aurora-purple) 50%,
        var(--aurora-magenta) 75%,
        var(--aurora-pink) 100%
    );

    --gradient-cyber: linear-gradient(135deg,
        var(--accent-cyan) 0%,
        var(--accent-blue) 50%,
        var(--accent-magenta) 100%
    );

    --gradient-matrix: linear-gradient(135deg,
        var(--accent-green) 0%,
        var(--accent-cyan) 100%
    );

    /* Glass Effects */
    --glass-border: rgba(59, 130, 246, 0.15);
    --glass-border-bright: rgba(59, 130, 246, 0.25);
    --glass-highlight: rgba(255, 255, 255, 0.8);

    /* Shadows & Glows */
    --shadow-sm: 0 2px 8px rgba(0, 0, 0, 0.08);
    --shadow-md: 0 4px 16px rgba(0, 0, 0, 0.12);
    --shadow-lg: 0 8px 32px rgba(0, 0, 0, 0.16);
    --shadow-xl: 0 16px 48px rgba(0, 0, 0, 0.20);

    --glow-cyan: 0 0 20px rgba(8, 145, 178, 0.4), 0 0 40px rgba(8, 145, 178, 0.2);
    --glow-magenta: 0 0 20px rgba(192, 38, 211, 0.4), 0 0 40px rgba(192, 38, 211, 0.2);
    --glow-blue: 0 0 20px rgba(37, 99, 235, 0.4), 0 0 40px rgba(37, 99, 235, 0.2);
    --glow-green: 0 0 20px rgba(5, 150, 105, 0.4), 0 0 40px rgba(5, 150, 105, 0.2);
    --glow-aurora: 0 0 30px rgba(124, 58, 237, 0.5), 0 0 60px rgba(124, 58, 237, 0.3);

    /* Spacing */
    --spacing-xs: 0.25rem;
    --spacing-sm: 0.5rem;
    --spacing-md: 1rem;
    --spacing-lg: 1.5rem;
    --spacing-xl: 2rem;
    --spacing-2xl: 3rem;
    --spacing-3xl: 4rem;

    /* Border Radius */
    --radius-sm: 0.375rem;
    --radius-md: 0.5rem;
    --radius-lg: 0.75rem;
    --radius-xl: 1rem;
    --radius-2xl: 1.5rem;
    --radius-full: 9999px;

    /* Transitions */
    --transition-fast: 150ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-base: 250ms cubic-bezier(0.4, 0, 0.2, 1);
    --transition-slow: 350ms cubic-bezier(0.4, 0, 0.2, 1);

    /* Typography */
    --font-display: 'Space Grotesk', 'Inter', -apple-system, sans-serif;
    --font-body: 'Inter', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
    --font-mono: 'JetBrains Mono', 'SF Mono', Monaco, 'Cascadia Code', monospace;
}

/* ========================================
   RESET & BASE STYLES
   ======================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

html {
    scroll-behavior: smooth;
}

body {
    font-family: var(--font-body);
    background: var(--bg-primary);
    color: var(--text-primary);
    line-height: 1.6;
    overflow-x: hidden;
    position: relative;
    min-height: 100vh;
}

/* ========================================
   ANIMATED BACKGROUND SYSTEM
   ======================================== */

/* Tech Grid Background - MORE VISIBLE */
body::before {
    content: '';
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-image:
        linear-gradient(rgba(59, 130, 246, 0.08) 2px, transparent 2px),
        linear-gradient(90deg, rgba(59, 130, 246, 0.08) 2px, transparent 2px);
    background-size: 40px 40px;
    background-position: -1px -1px;
    pointer-events: none;
    z-index: 0;
    opacity: 1;
}

/* Animated Aurora Background - LIGHTER */
body::after {
    content: '';
    position: fixed;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: radial-gradient(
        ellipse at 20% 30%,
        rgba(59, 130, 246, 0.12) 0%,
        transparent 50%
    ),
    radial-gradient(
        ellipse at 80% 70%,
        rgba(192, 38, 211, 0.12) 0%,
        transparent 50%
    ),
    radial-gradient(
        ellipse at 50% 50%,
        rgba(124, 58, 237, 0.08) 0%,
        transparent 50%
    );
    animation: aurora-drift 30s ease-in-out infinite;
    pointer-events: none;
    z-index: 0;
}

@keyframes aurora-drift {
    0%, 100% {
        transform: translate(0, 0) scale(1);
    }
    33% {
        transform: translate(10%, -10%) scale(1.1);
    }
    66% {
        transform: translate(-10%, 10%) scale(0.9);
    }
}

/* Canvas for facial recognition animation */
#facial-recognition-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.25;
    pointer-events: none;
    filter: hue-rotate(0deg) saturate(1.2) brightness(1.3);
}

/* Animated grid canvas - filled boxes that fade in/out */
#animated-grid-canvas {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    opacity: 0.4;
    pointer-events: none;
}

/* Main App Container */
#app {
    position: relative;
    z-index: 1;
}

/* ========================================
   GLASSMORPHISM CARDS
   ======================================== */
.glass-card {
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    -webkit-backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    box-shadow: var(--shadow-md);
    position: relative;
}

.glass-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg,
        transparent 0%,
        var(--glass-border-bright) 50%,
        transparent 100%
    );
}

.glass-card-elevated {
    background: var(--bg-glass-heavy);
    backdrop-filter: blur(30px);
    -webkit-backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border-bright);
    box-shadow: var(--shadow-lg);
    transition: all var(--transition-base);
}

.glass-card-elevated:hover {
    border-color: rgba(59, 130, 246, 0.4);
    box-shadow: var(--shadow-xl), var(--glow-cyan);
    transform: translateY(-4px);
}

/* ========================================
   HEADER DESIGN
   ======================================== */
header {
    position: relative;
    z-index: 10001 !important;
    background: var(--bg-glass-heavy);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border-bright);
    border-top: none;
}

header::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 3px;
    background: var(--gradient-aurora);
    opacity: 0.8;
}

header::after {
    content: '';
    position: absolute;
    inset: 0;
    background: radial-gradient(
        ellipse at top,
        rgba(59, 130, 246, 0.08) 0%,
        transparent 70%
    );
    pointer-events: none;
}

/* ========================================
   GRADIENT TEXT & EFFECTS
   ======================================== */
.gradient-text {
    background: var(--gradient-aurora);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: gradient-shift 8s ease infinite;
    background-size: 200% 200%;
    font-weight: 900;
    letter-spacing: -0.02em;
}

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

/* Colored Text for Light Mode */
.text-accent-cyan {
    color: var(--accent-cyan);
}

.text-accent-magenta {
    color: var(--accent-magenta);
}

.text-accent-green {
    color: var(--accent-green);
}

/* ========================================
   METRIC CARDS - MODERN LIGHT STYLE
   ======================================== */
.metric-card {
    background: var(--bg-glass);
    backdrop-filter: blur(24px);
    border: 1px solid var(--glass-border);
    transition: all var(--transition-base);
    position: relative;
    overflow: hidden;
}

.metric-card::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg,
        transparent,
        rgba(59, 130, 246, 0.15),
        transparent
    );
    transition: left 0.6s;
}

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

.metric-card:hover {
    transform: translateY(-8px) scale(1.02);
    border-color: var(--glass-border-bright);
    box-shadow: var(--shadow-xl), var(--glow-aurora);
}

/* Border colors based on metric type */
.metric-card.border-t-4.border-green-500 {
    border-top-color: var(--accent-green) !important;
}

.metric-card.border-t-4.border-green-500:hover {
    box-shadow: var(--shadow-xl), var(--glow-green);
}

.metric-card.border-t-4.border-blue-500 {
    border-top-color: var(--accent-blue) !important;
}

.metric-card.border-t-4.border-blue-500:hover {
    box-shadow: var(--shadow-xl), var(--glow-blue);
}

.metric-card.border-t-4.border-yellow-500 {
    border-top-color: var(--accent-yellow) !important;
}

.metric-card.border-t-4.border-orange-600 {
    border-top-color: #ea580c !important;
}

.metric-card.border-t-4.border-red-700 {
    border-top-color: var(--accent-red) !important;
}

/* ========================================
   TAB NAVIGATION - MODERN LIGHT
   ======================================== */
.tab-container {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
    scrollbar-color: var(--accent-cyan) transparent;
}

.tab-container::-webkit-scrollbar {
    height: 3px;
}

.tab-container::-webkit-scrollbar-track {
    background: transparent;
}

.tab-container::-webkit-scrollbar-thumb {
    background: var(--gradient-cyber);
    border-radius: var(--radius-full);
}

.tab-button {
    transition: all var(--transition-base);
    border-radius: var(--radius-lg) var(--radius-lg) 0 0;
    white-space: nowrap;
    position: relative;
    flex-shrink: 0;
    font-weight: 600;
    letter-spacing: 0.025em;
    color: var(--text-secondary);
    padding: 0.875rem 1.5rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.tab-button::after {
    content: '';
    position: absolute;
    bottom: 0;
    left: 0;
    width: 100%;
    height: 3px;
    background: var(--gradient-aurora);
    transform: scaleX(0);
    transition: transform var(--transition-base);
}

.tab-button.active::after {
    transform: scaleX(1);
}

.tab-button.active {
    background: var(--bg-glass-heavy);
    color: var(--accent-cyan);
    font-weight: 700;
    box-shadow: 0 -4px 20px rgba(8, 145, 178, 0.25);
}

.tab-button:hover:not(.active) {
    background: var(--bg-glass);
    color: var(--text-primary);
    transform: translateY(-2px);
}

/* ========================================
   LOADING ANIMATIONS
   ======================================== */
.loader {
    width: 2rem;
    height: 2rem;
    border: 4px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--accent-cyan);
    border-radius: 50%;
    display: inline-block;
    animation: rotation 0.8s linear infinite;
    box-shadow: 0 0 10px rgba(8, 145, 178, 0.3);
}

@keyframes rotation {
    0% { transform: rotate(0deg); }
    100% { transform: rotate(360deg); }
}

/* Skeleton Loading */
.skeleton {
    background: linear-gradient(
        90deg,
        var(--bg-tertiary) 0%,
        rgba(59, 130, 246, 0.15) 50%,
        var(--bg-tertiary) 100%
    );
    background-size: 200% 100%;
    animation: skeleton-loading 1.5s ease-in-out infinite;
    border-radius: var(--radius-md);
}

@keyframes skeleton-loading {
    0% {
        background-position: 200% 0;
    }
    100% {
        background-position: -200% 0;
    }
}

/* ========================================
   IMAGE GRID - ENHANCED
   ======================================== */
.image-wrapper {
    aspect-ratio: 1 / 1;
    overflow: hidden;
    border-radius: var(--radius-xl);
    background: var(--bg-secondary);
    transition: all var(--transition-base);
    position: relative;
    border: 1px solid var(--glass-border);
}

.image-wrapper::before {
    content: '';
    position: absolute;
    inset: 0;
    background: var(--gradient-aurora);
    opacity: 0;
    transition: opacity var(--transition-base);
    mix-blend-mode: soft-light;
}

.image-wrapper:hover::before {
    opacity: 0.2;
}

.image-wrapper::after {
    content: '';
    position: absolute;
    inset: 0;
    border: 2px solid transparent;
    border-radius: var(--radius-xl);
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue)) border-box;
    -webkit-mask: linear-gradient(#fff 0 0) padding-box, linear-gradient(#fff 0 0);
    -webkit-mask-composite: xor;
    mask-composite: exclude;
    opacity: 0;
    transition: opacity var(--transition-base);
}

.image-wrapper:hover::after {
    opacity: 0.6;
}

.image-wrapper:hover {
    transform: translateY(-4px) scale(1.02);
    box-shadow: var(--shadow-xl), var(--glow-aurora);
}

.image-wrapper img {
    width: 100%;
    height: 100%;
    object-fit: contain;
    transition: transform var(--transition-slow);
}

.image-wrapper:hover img {
    transform: scale(1.05);
}

/* Smoke transition canvas overlay */
.image-wrapper canvas.smoke-canvas {
    position: absolute;
    inset: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: 15;
}

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

.btn::before {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.5);
    transform: translate(-50%, -50%);
    transition: width 0.6s, height 0.6s;
}

.btn:hover::before {
    width: 300px;
    height: 300px;
}

.btn-primary {
    background: var(--gradient-cyber);
    color: white;
    box-shadow: var(--shadow-md);
}

.btn-primary:hover {
    box-shadow: var(--shadow-lg), var(--glow-cyan);
    transform: translateY(-2px);
}

.btn-ghost {
    background: transparent;
    border: 2px solid var(--accent-cyan);
    color: var(--accent-cyan);
}

.btn-ghost:hover {
    background: rgba(8, 145, 178, 0.1);
    box-shadow: var(--glow-cyan);
}

/* ========================================
   FORMS - MODERN INPUT DESIGN
   ======================================== */
.form-input-enhanced {
    width: 100%;
    padding: 0.875rem 1rem;
    background: white;
    border: 2px solid var(--glass-border);
    border-radius: var(--radius-lg);
    color: var(--text-primary);
    font-size: 1rem;
    transition: all var(--transition-base);
}

.form-input-enhanced:focus {
    outline: none;
    border-color: var(--accent-cyan);
    box-shadow: 0 0 0 3px rgba(8, 145, 178, 0.1), var(--glow-cyan);
    background: rgba(8, 145, 178, 0.02);
}

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

/* ========================================
   TABLE STYLES
   ======================================== */
.table-enhanced {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: white !important;
}

.table-enhanced thead tr {
    background: linear-gradient(to right,
        rgba(59, 130, 246, 0.08),
        rgba(8, 145, 178, 0.08)
    ) !important;
}

.table-enhanced th {
    padding: 1rem;
    text-align: left;
    font-weight: 700;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: var(--accent-cyan);
    border-bottom: 2px solid var(--accent-cyan);
    position: sticky;
    top: 0;
    z-index: 10;
    background: white;
}

.table-enhanced tbody tr {
    transition: all var(--transition-fast);
    border-bottom: 1px solid var(--glass-border);
    background: white;
}

.table-enhanced tbody tr:hover {
    background: rgba(59, 130, 246, 0.05) !important;
}

.table-enhanced td {
    padding: 0.875rem 1rem;
    color: var(--text-secondary);
}

/* Make all tables white */
table {
    background: white !important;
}

/* Table containers should also be white */
.table-container,
.bg-white\/70,
[class*="bg-white"] {
    background: white !important;
}

/* ========================================
   BADGES & STATUS INDICATORS
   ======================================== */
.badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: var(--radius-full);
    font-size: 0.75rem;
    font-weight: 600;
    border: 1px solid;
}

.badge-success {
    background: rgba(5, 150, 105, 0.1);
    border-color: var(--accent-green);
    color: var(--accent-green);
}

.badge-warning {
    background: rgba(217, 119, 6, 0.1);
    border-color: var(--accent-yellow);
    color: var(--accent-yellow);
}

.badge-error {
    background: rgba(220, 38, 38, 0.1);
    border-color: var(--accent-red);
    color: var(--accent-red);
}

.badge-info {
    background: rgba(8, 145, 178, 0.1);
    border-color: var(--accent-cyan);
    color: var(--accent-cyan);
}

/* ========================================
   USER MENU & AUTH
   ======================================== */
.user-menu {
    position: relative;
    z-index: 999999 !important;
}

.user-avatar {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    cursor: pointer;
    border: 2px solid var(--accent-cyan);
    box-shadow: 0 0 15px rgba(8, 145, 178, 0.4);
    transition: all var(--transition-base);
    z-index: 999999;
}

.user-avatar:hover {
    transform: scale(1.05);
    box-shadow: var(--glow-cyan);
}

.user-dropdown {
    position: fixed !important;
    top: 4rem !important;
    right: 1rem !important;
    background: white !important;
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border-bright);
    border-radius: var(--radius-xl);
    box-shadow: 0 20px 50px rgba(0, 0, 0, 0.3) !important;
    min-width: 200px;
    overflow: hidden;
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all var(--transition-base);
    z-index: 9999999 !important;
}

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

.user-dropdown a,
.user-dropdown button {
    display: block;
    width: 100%;
    padding: 0.875rem 1.25rem;
    text-align: left;
    border: none;
    background: none;
    color: var(--text-secondary);
    font-size: 0.875rem;
    font-weight: 500;
    cursor: pointer;
    transition: all var(--transition-fast);
    text-decoration: none;
}

.user-dropdown a:hover,
.user-dropdown button:hover {
    background: rgba(8, 145, 178, 0.1);
    color: var(--accent-cyan);
}

.user-dropdown hr {
    margin: 0;
    border: none;
    border-top: 1px solid var(--glass-border);
}

/* ========================================
   ACCESSIBILITY
   ======================================== */
.skip-to-content {
    position: absolute;
    top: -999px;
    left: -999px;
    background: var(--bg-glass-heavy);
    color: var(--accent-cyan);
    padding: 1rem 2rem;
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    font-weight: 600;
    text-decoration: none;
    z-index: 999999;
    border: 2px solid var(--accent-cyan);
}

.skip-to-content:focus {
    top: 1rem;
    left: 1rem;
}

*:focus-visible {
    outline: 2px solid var(--accent-cyan);
    outline-offset: 2px;
}

/* ========================================
   ANIMATIONS & TRANSITIONS
   ======================================== */
.tab-content {
    animation: fadeInUp 0.5s ease-out;
}

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

/* Pulse animation for live indicator */
@keyframes pulse-ring {
    0% {
        transform: scale(0.8);
        opacity: 1;
    }
    100% {
        transform: scale(2);
        opacity: 0;
    }
}

/* ========================================
   CHART CONTAINERS
   ======================================== */
.chart-container {
    background: var(--bg-glass);
    backdrop-filter: blur(20px);
    border: 1px solid var(--glass-border);
    border-radius: var(--radius-xl);
    padding: 1.5rem;
    box-shadow: var(--shadow-md);
    transition: all var(--transition-base);
}

.chart-container:hover {
    border-color: var(--glass-border-bright);
    box-shadow: var(--shadow-lg), var(--glow-aurora);
}

/* ========================================
   MODAL / AUTH MODAL
   ======================================== */
#authModal {
    position: fixed;
    inset: 0;
    background: rgba(240, 244, 255, 0.95);
    backdrop-filter: blur(10px);
    z-index: 9999;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

#authModal.hidden {
    display: none;
}

.auth-card {
    background: var(--bg-glass-heavy);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border-bright);
    border-radius: var(--radius-2xl);
    padding: 2rem;
    max-width: 420px;
    width: 100%;
    box-shadow: var(--shadow-xl), var(--glow-aurora);
    animation: slideUp 0.3s ease-out;
}

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

.google-btn {
    width: 100%;
    padding: 0.875rem 1.5rem;
    background: white;
    border: 2px solid var(--glass-border-bright);
    border-radius: var(--radius-lg);
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    cursor: pointer;
    transition: all var(--transition-base);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.75rem;
}

.google-btn:hover {
    border-color: var(--accent-cyan);
    background: rgba(8, 145, 178, 0.05);
    transform: translateY(-2px);
    box-shadow: var(--glow-cyan);
}

.google-btn img {
    width: 20px;
    height: 20px;
}

/* ========================================
   RESPONSIVE DESIGN
   ======================================== */
@media (max-width: 640px) {
    .metric-card {
        padding: 1.25rem !important;
    }

    .metric-card p:first-child {
        font-size: 2.5rem !important;
    }

    h1.gradient-text {
        font-size: 2rem !important;
    }

    .tab-button {
        font-size: 0.875rem;
        padding: 0.75rem 1rem;
    }

    .btn,
    .tab-button,
    .form-input-enhanced {
        min-height: 44px;
    }
}

@media (min-width: 640px) and (max-width: 1024px) {
    .metric-card p:first-child {
        font-size: 3rem !important;
    }
}

/* ========================================
   UTILITY CLASSES
   ======================================== */
.description-text {
    line-height: 1.7;
    color: var(--text-secondary);
}

.description-text strong {
    color: var(--text-primary);
    font-weight: 600;
}

.description-text code {
    background: rgba(8, 145, 178, 0.1);
    padding: 0.125rem 0.375rem;
    border-radius: var(--radius-sm);
    font-size: 0.875em;
    font-family: var(--font-mono);
    color: var(--accent-cyan);
}

/* Admin Badge */
.admin-badge {
    display: inline-block;
    padding: 0.25rem 0.5rem;
    background: var(--gradient-cyber);
    color: white;
    font-size: 0.625rem;
    font-weight: 700;
    border-radius: var(--radius-sm);
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: var(--glow-cyan);
}

/* Report Sections */
.report-section {
    background: linear-gradient(to bottom,
        rgba(59, 130, 246, 0.03),
        transparent
    );
    border-left: 4px solid;
    transition: all var(--transition-base);
    border-radius: var(--radius-md);
}

.report-section:hover {
    background: linear-gradient(to bottom,
        rgba(59, 130, 246, 0.08),
        transparent
    );
    box-shadow: var(--shadow-md);
}

.report-section.purple {
    border-color: var(--aurora-purple);
}

.report-section.blue {
    border-color: var(--accent-blue);
}

.report-section.green {
    border-color: var(--accent-green);
}

.report-section.orange {
    border-color: #ea580c;
}

.report-section.border-red-500 {
    border-color: var(--accent-red);
}

.insight-box {
    background: linear-gradient(135deg,
        rgba(8, 145, 178, 0.08) 0%,
        rgba(37, 99, 235, 0.08) 100%
    );
    border-left: 4px solid var(--accent-cyan);
    padding: 1rem;
    border-radius: var(--radius-md);
    margin: 1rem 0;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */
.toast-container {
    position: fixed;
    top: 1rem;
    right: 1rem;
    z-index: 999999;
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
    pointer-events: none;
}

.toast {
    background: var(--bg-glass-heavy);
    backdrop-filter: blur(30px);
    border: 1px solid var(--glass-border-bright);
    border-radius: var(--radius-lg);
    box-shadow: var(--shadow-xl);
    padding: 1rem 1.25rem;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    min-width: 300px;
    max-width: 400px;
    pointer-events: all;
    border-left: 4px solid;
    animation: slideInRight 0.3s ease-out, fadeOut 0.3s ease-out 4.7s;
}

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

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

.toast-success {
    border-left-color: var(--accent-green);
    box-shadow: var(--shadow-xl), var(--glow-green);
}

.toast-error {
    border-left-color: var(--accent-red);
}

.toast-warning {
    border-left-color: var(--accent-yellow);
}

.toast-info {
    border-left-color: var(--accent-cyan);
    box-shadow: var(--shadow-xl), var(--glow-cyan);
}

.toast-icon {
    width: 1.5rem;
    height: 1.5rem;
    flex-shrink: 0;
}

.toast-content {
    flex: 1;
}

.toast-title {
    font-weight: 600;
    font-size: 0.875rem;
    color: var(--text-primary);
    margin-bottom: 0.125rem;
}

.toast-message {
    font-size: 0.75rem;
    color: var(--text-secondary);
}

/* ========================================
   CUSTOM SCROLLBAR
   ======================================== */
::-webkit-scrollbar {
    width: 10px;
    height: 10px;
}

::-webkit-scrollbar-track {
    background: var(--bg-secondary);
}

::-webkit-scrollbar-thumb {
    background: var(--gradient-cyber);
    border-radius: var(--radius-full);
}

::-webkit-scrollbar-thumb:hover {
    background: linear-gradient(135deg, var(--accent-cyan), var(--accent-blue));
}

/* Firefox */
* {
    scrollbar-width: thin;
    scrollbar-color: var(--accent-cyan) var(--bg-secondary);
}

/* ========================================
   METRIC CARD TEXT ENHANCEMENTS
   Added for better visibility and style
   ======================================== */

/* Metric Numbers - Cool gradient effect */
.metric-number {
    background: linear-gradient(135deg, 
        #0891b2 0%,    /* Cyan */
        #2563eb 50%,   /* Blue */
        #7c3aed 100%   /* Purple */
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: metric-gradient-shift 6s ease infinite;
    filter: drop-shadow(0 2px 4px rgba(8, 145, 178, 0.3));
    font-weight: 900;
    letter-spacing: -0.02em;
}

@keyframes metric-gradient-shift {
    0%, 100% {
        background-position: 0% 50%;
    }
    50% {
        background-position: 100% 50%;
    }
}

/* Metric Labels - Clear and visible */
.metric-label {
    color: #475569;  /* Slate gray - clearly visible */
    font-weight: 700;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.8);
}

/* Enhanced metric card styling for better contrast */
.metric-card {
    background: linear-gradient(135deg, 
        rgba(255, 255, 255, 0.95) 0%,
        rgba(248, 250, 252, 0.95) 100%
    );
}

/* Add subtle color tints to metric cards based on border color */
.metric-card.border-green-500 {
    background: linear-gradient(135deg, 
        rgba(240, 253, 244, 0.95) 0%,
        rgba(255, 255, 255, 0.95) 100%
    );
}

.metric-card.border-green-500 .metric-number {
    background: linear-gradient(135deg, 
        #059669 0%,    /* Green */
        #0891b2 100%   /* Cyan */
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-card.border-blue-500 {
    background: linear-gradient(135deg, 
        rgba(239, 246, 255, 0.95) 0%,
        rgba(255, 255, 255, 0.95) 100%
    );
}

.metric-card.border-blue-500 .metric-number {
    background: linear-gradient(135deg, 
        #2563eb 0%,    /* Blue */
        #7c3aed 100%   /* Purple */
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-card.border-yellow-500 {
    background: linear-gradient(135deg, 
        rgba(254, 252, 232, 0.95) 0%,
        rgba(255, 255, 255, 0.95) 100%
    );
}

.metric-card.border-yellow-500 .metric-number {
    background: linear-gradient(135deg, 
        #d97706 0%,    /* Amber */
        #f59e0b 100%   /* Yellow */
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-card.border-orange-600 {
    background: linear-gradient(135deg, 
        rgba(255, 247, 237, 0.95) 0%,
        rgba(255, 255, 255, 0.95) 100%
    );
}

.metric-card.border-orange-600 .metric-number {
    background: linear-gradient(135deg, 
        #ea580c 0%,    /* Orange */
        #dc2626 100%   /* Red */
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

.metric-card.border-red-700 {
    background: linear-gradient(135deg, 
        rgba(254, 242, 242, 0.95) 0%,
        rgba(255, 255, 255, 0.95) 100%
    );
}

.metric-card.border-red-700 .metric-number {
    background: linear-gradient(135deg, 
        #dc2626 0%,    /* Red */
        #c026d3 100%   /* Magenta */
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
}

/* Enhance on hover */
.metric-card:hover .metric-number {
    animation: metric-gradient-shift 3s ease infinite, metric-pulse 2s ease infinite;
}

@keyframes metric-pulse {
    0%, 100% {
        filter: drop-shadow(0 2px 4px rgba(8, 145, 178, 0.3));
    }
    50% {
        filter: drop-shadow(0 4px 8px rgba(8, 145, 178, 0.5));
    }
}

/* Metric sublabels (Multi-Model, All Models) */
.metric-sublabel {
    color: #64748b;  /* Medium gray - clearly visible */
    font-weight: 600;
    text-shadow: 0 1px 2px rgba(255, 255, 255, 0.5);
}

/* ========================================
   SECTION HEADING STYLES
   For tab content and report section headings
   ======================================== */

/* Main section headings (h2) */
.section-heading {
    background: linear-gradient(135deg,
        #0891b2 0%,    /* Cyan */
        #2563eb 50%,   /* Blue */
        #7c3aed 100%   /* Purple */
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    background-size: 200% 200%;
    animation: gradient-shift 8s ease infinite;
    filter: drop-shadow(0 2px 4px rgba(8, 145, 178, 0.2));
    font-weight: 900;
    letter-spacing: -0.02em;
}

/* Subsection headings (h3) */
.subsection-heading {
    background: linear-gradient(135deg,
        #0f172a 0%,    /* Near black */
        #334155 100%   /* Dark slate */
    );
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    filter: drop-shadow(0 1px 2px rgba(15, 23, 42, 0.3));
    font-weight: 900;
    letter-spacing: -0.01em;
}

/* Modal headings */
.modal-heading {
    color: #0f172a;  /* Near black for high contrast */
    font-weight: 900;
    letter-spacing: -0.02em;
    text-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

/* ========================================
   IMAGE LIGHTBOX
   ======================================== */

.image-lightbox {
    display: none; /* Hidden by default */
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.95);
    backdrop-filter: blur(10px);
    z-index: 100000;
    align-items: center;
    justify-content: center;
    padding: 2rem;
    opacity: 0;
    transition: opacity 0.3s ease;
}

.image-lightbox.active {
    display: flex;
    opacity: 1;
}

.image-lightbox-close {
    position: absolute;
    top: 1.5rem;
    right: 1.5rem;
    background: rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
    border: none;
    width: 3rem;
    height: 3rem;
    border-radius: 50%;
    color: white;
    font-size: 2rem;
    line-height: 1;
    cursor: pointer;
    transition: all 0.25s ease;
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 100001;
}

.image-lightbox-close:hover {
    background: rgba(255, 255, 255, 0.3);
    transform: scale(1.1);
}

.image-lightbox img {
    position: relative;
    z-index: 1;
}


/* ========================================
   AUTO-REFRESH INDICATORS
   ======================================== */

/* Last Updated Indicator */
.last-updated {
    font-size: 0.85rem;
    color: #6c757d;
    font-style: italic;
    transition: all 0.3s ease;
}

.last-updated.updating {
    color: #28a745;
    animation: pulse 1s infinite;
}

/* Refresh Button Styles */
.btn-refresh {
    padding: 0.5rem 1rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.9rem;
    font-weight: 600;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
}

.btn-refresh:hover {
    background: #0056b3;
    transform: translateY(-1px);
    box-shadow: 0 4px 8px rgba(0, 123, 255, 0.3);
}

.btn-refresh:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

.btn-refresh:disabled:hover {
    transform: none;
    box-shadow: none;
}

.btn-refresh-chart {
    padding: 0.375rem 0.875rem;
    background: #007bff;
    color: white;
    border: none;
    border-radius: 0.375rem;
    cursor: pointer;
    font-size: 0.85rem;
    font-weight: 600;
    transition: all 0.2s ease;
}

.btn-refresh-chart:hover {
    background: #0056b3;
}

.btn-refresh-chart:disabled {
    background: #6c757d;
    cursor: not-allowed;
    opacity: 0.6;
}

/* Cache Status Indicator */
.cache-status {
    font-size: 0.75rem;
    color: #28a745;
    font-weight: 600;
    padding: 0.25rem 0.5rem;
    background: rgba(40, 167, 69, 0.1);
    border-radius: 0.25rem;
    display: inline-block;
}

/* Data Freshness Indicator */
.data-freshness {
    padding: 0.5rem 1rem;
    border-radius: 0.375rem;
    font-size: 0.85rem;
    margin-top: 0.5rem;
    font-weight: 600;
}

.data-freshness.fresh {
    background: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.data-freshness.stale {
    background: #fff3cd;
    color: #856404;
    border: 1px solid #ffeeba;
}

/* Stats Controls Container */
.stats-controls {
    display: flex;
    align-items: center;
    gap: 1rem;
    flex-wrap: wrap;
}

/* Notification Toast for Auto-Refresh */
.notification {
    position: fixed;
    top: 20px;
    right: 20px;
    background: #28a745;
    color: white;
    padding: 1rem 1.5rem;
    border-radius: 0.375rem;
    box-shadow: 0 4px 6px rgba(0,0,0,0.1);
    transform: translateX(400px);
    transition: transform 0.3s ease;
    z-index: 9999;
    font-size: 0.9rem;
    font-weight: 600;
}

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

/* Pulse Animation for Updating Indicators */
@keyframes pulse {
    0%, 100% { 
        opacity: 1;
        transform: scale(1);
    }
    50% { 
        opacity: 0.5;
        transform: scale(1.05);
    }
}

/* Chart Header with Refresh Button */
.chart-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
    flex-wrap: wrap;
    gap: 0.75rem;
}

.chart-header h3 {
    margin: 0;
}

/* Leaderboard Header with Last Updated */
.leaderboard-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    margin-bottom: 1rem;
}

.leaderboard-header h3 {
    margin: 0;
}

/* Carousel Info Bar */
.carousel-info {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0.75rem 1rem;
    background: rgba(255, 255, 255, 0.8);
    backdrop-filter: blur(10px);
    border-radius: 0.5rem;
    margin-bottom: 1rem;
}

.carousel-info span {
    font-size: 0.9rem;
    font-weight: 600;
    color: #333;
}

/* Loading Spinner for Refresh */
.refresh-spinner {
    display: inline-block;
    width: 16px;
    height: 16px;
    border: 2px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 0.8s linear infinite;
}

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