/* ========================================
   PREMIUM GEOOPS UI - PROFESSIONAL EDITION
   ======================================== */

/* Light Theme (Default) */
/* Light Theme (Premium Enterprise) */
:root {
    /* Brand Colors - Sharper, more corporate blue */
    --primary: #2563EB;
    --primary-light: #3B82F6;
    --primary-dark: #1D4ED8;
    --accent: #6366F1;

    /* Semantic Colors */
    --success: #10B981;
    --warning: #F59E0B;
    --error: #EF4444;
    --info: #3B82F6;

    /* Neutrals (Darker borders for contrast on Light Mode) */
    --bg-dark: #F8FAFC;
    /* Slate 50 */
    --bg-darker: #E2E8F0;
    --bg-card: #FFFFFF;
    /* Pure white for cards */
    --bg-hover: #F1F5F9;

    /* Text - Increased contrast */
    --text-primary: #020617;
    /* Darker than slate-900 */
    --text-secondary: #334155;
    /* Darker than slate-600 */
    --text-muted: #64748B;

    /* Borders - Significant darkening for visibility */
    --border: #CBD5E1;
    /* Slate 300 */
    --border-light: #E2E8F0;

    /* Compact Sizing Factors */
    --section-padding: 24px;
    --card-padding: 20px;

    /* Shadows */
    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.05);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.08);
    --shadow-lg: 0 10px 15px -3px rgba(0, 0, 0, 0.1), 0 4px 6px -2px rgba(0, 0, 0, 0.05);
    --shadow-xl: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    --glass-shadow: 0 8px 32px 0 rgba(31, 38, 135, 0.37);
}

/* Dark Theme (Deep Navy/Slate) */
[data-theme="dark"] {
    --primary: #3B82F6;
    --primary-light: #60A5FA;
    --primary-dark: #2563EB;

    --bg-dark: #0F172A;
    /* Slate 900 */
    --bg-darker: #020617;
    /* Slate 950 */
    --bg-card: rgba(30, 41, 59, 0.7);
    /* Slate 800 + Opacity */
    --bg-hover: #1E293B;
    /* Slate 800 */

    --text-primary: #F8FAFC;
    /* Slate 50 */
    --text-secondary: #94A3B8;
    /* Slate 400 */
    --text-muted: #64748B;
    /* Slate 500 */

    --border: #334155;
    /* Slate 700 */
    --border-light: #475569;
    /* Slate 600 */

    --shadow-sm: 0 1px 2px 0 rgba(0, 0, 0, 0.5);
    --shadow-md: 0 4px 6px -1px rgba(0, 0, 0, 0.5);
}

/* ========================================
   BASE STYLES
   ======================================== */

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

body {
    background-color: var(--bg-dark);
    color: var(--text-primary);
    overflow-x: hidden;
    min-height: 100vh;
    line-height: 1.6;
    transition: background-color 0.3s ease, color 0.3s ease;
}

/* ========================================
   PREMIUM BACKGROUND
   ======================================== */

.app-background {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    z-index: -1;
    transition: all 0.5s ease;
}

[data-theme="light"] .app-background {
    background:
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 0%, rgba(99, 102, 241, 0.15) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(16, 185, 129, 0.1) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(244, 63, 94, 0.1) 0px, transparent 50%),
        #F8FAFC;
    /* Slate 50 base */
    filter: blur(40px);
    /* Soften everything */
    background-size: 100% 100%;
}

[data-theme="dark"] .app-background {
    background:
        radial-gradient(at 0% 0%, rgba(59, 130, 246, 0.2) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(99, 102, 241, 0.2) 0px, transparent 50%),
        #0F172A;
    background-size: 100% 100%;
}

@keyframes gradientShift {

    0%,
    100% {
        background-position: 0% 50%;
    }

    50% {
        background-position: 100% 50%;
    }
}

.blob {
    display: none;
}

/* ========================================
   FLOATING PARTICLES
   ======================================== */

.floating-particles {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    pointer-events: none;
    z-index: -1;
    overflow: hidden;
}

.particle {
    position: absolute;
    background: var(--primary);
    border-radius: 50%;
    opacity: 0.1;
    animation: floatParticle 25s infinite ease-in-out;
    filter: blur(2px);
}

.particle:nth-child(1) {
    width: 100px;
    height: 100px;
    left: 10%;
    animation-delay: 0s;
    animation-duration: 30s;
}

.particle:nth-child(2) {
    width: 80px;
    height: 80px;
    left: 70%;
    animation-delay: 5s;
    animation-duration: 25s;
}

.particle:nth-child(3) {
    width: 120px;
    height: 120px;
    left: 40%;
    animation-delay: 10s;
    animation-duration: 35s;
}

@keyframes floatParticle {

    0%,
    100% {
        transform: translateY(100vh) translateX(0) scale(1);
        opacity: 0;
    }

    10% {
        opacity: 0.1;
    }

    50% {
        transform: translateY(-20vh) translateX(100px) scale(1.2);
        opacity: 0.15;
    }

    90% {
        opacity: 0.1;
    }
}

/* ========================================
   UTILITIES
   ======================================== */

.hidden {
    display: none !important;
}

.view {
    min-height: 100vh;
    width: 100%;
    opacity: 0;
    transform: translateY(20px) scale(0.98);
    transition: opacity 0.4s cubic-bezier(0.4, 0, 0.2, 1),
        transform 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.view.active {
    opacity: 1;
    transform: translateY(0) scale(1);
}

/* ========================================
   PREMIUM GLASSMORPHISM
   ======================================== */

.glass-panel {
    background: var(--bg-card);
    backdrop-filter: blur(20px) saturate(180%);
    -webkit-backdrop-filter: blur(20px) saturate(180%);
    border: 1px solid var(--border);
    border-radius: 16px;
    box-shadow: var(--shadow-md);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.glass-panel::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg,
            transparent 30%,
            rgba(255, 255, 255, 0.1) 50%,
            transparent 70%);
    transform: translateX(-100%) translateY(-100%) rotate(45deg);
    transition: transform 0.8s cubic-bezier(0.4, 0, 0.2, 1);
    pointer-events: none;
}

.glass-panel:hover::before {
    transform: translateX(50%) translateY(50%) rotate(45deg);
}

.glass-panel:hover {
    transform: translateY(-4px) scale(1.01);
    box-shadow: var(--shadow-xl);
    border-color: var(--border-light);
}

/* ========================================
   PREMIUM BUTTONS
   ======================================== */

.btn-primary {
    background: linear-gradient(135deg, var(--primary) 0%, var(--primary-dark) 100%);
    background-size: 200% 200%;
    border: none;
    color: white;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.95rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    letter-spacing: 0.02em;
    position: relative;
    overflow: hidden;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.3);
}

.btn-primary::after {
    content: '';
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    border-radius: 50%;
    background: rgba(255, 255, 255, 0.3);
    transform: translate(-50%, -50%);
    transition: width 0.6s ease, height 0.6s ease;
}

.btn-primary:active::after {
    width: 300px;
    height: 300px;
}

.btn-primary:hover {
    background-position: 100% 0;
    transform: translateY(-2px) scale(1.02);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.btn-primary:active {
    transform: translateY(0) scale(0.98);
}

.btn-primary:disabled {
    opacity: 0.5;
    cursor: not-allowed;
    transform: none;
}

.btn-outline {
    background: transparent;
    border: 2px solid var(--border);
    color: var(--text-primary);
    padding: 10px 22px;
    border-radius: 12px;
    font-weight: 600;
    font-size: 0.9rem;
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.btn-outline::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(59, 130, 246, 0.1), transparent);
    transition: left 0.5s ease;
}

.btn-outline:hover::before {
    left: 100%;
}

.btn-outline:hover {
    border-color: var(--primary);
    color: var(--primary);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.btn-text {
    background: transparent;
    border: none;
    color: var(--text-muted);
    cursor: pointer;
    font-weight: 500;
    font-size: 0.9rem;
    padding: 10px 16px;
    transition: all 0.2s ease;
    border-radius: 8px;
}

.btn-text:hover {
    color: var(--text-primary);
    background: var(--bg-hover);
}

/* ========================================
   AUTH VIEW
   ======================================== */

/* ========================================
   AUTH VIEW (SPLIT LAYOUT)
   ======================================== */

#auth-view.split-layout {
    display: flex;
    width: 100%;
    height: 100vh;
    padding: 0;
    overflow: hidden;
    background: var(--bg-dark);
}

.hero-panel {
    flex: 1;
    background: linear-gradient(135deg, #0f172a 0%, #1e293b 100%);
    position: relative;
    display: flex;
    flex-direction: column;
    justify-content: center;
    padding: 60px;
    color: white;
    overflow: hidden;
    z-index: 1;
}

.hero-content {
    position: relative;
    z-index: 2;
    max-width: 600px;
    animation: fadeIn 1s ease-out;
}

.hero-brand {
    display: flex;
    align-items: center;
    gap: 16px;
    margin-bottom: 40px;
}

.hero-brand i {
    font-size: 2.5rem;
    color: #3b82f6;
    filter: drop-shadow(0 0 20px rgba(59, 130, 246, 0.5));
}

.pulse-slow {
    animation: pulseGlow 3s infinite;
}

@keyframes pulseGlow {

    0%,
    100% {
        filter: drop-shadow(0 0 15px rgba(59, 130, 246, 0.4));
        transform: scale(1);
    }

    50% {
        filter: drop-shadow(0 0 30px rgba(59, 130, 246, 0.8));
        transform: scale(1.05);
    }
}

.hero-brand h1 {
    font-size: 2.2rem;
    font-weight: 700;
    background: linear-gradient(to right, #ffffff, #94a3b8);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content h2 {
    font-size: 3.5rem;
    line-height: 1.1;
    font-weight: 800;
    margin-bottom: 20px;
    background: linear-gradient(135deg, #ffffff 0%, #cbd5e1 100%);
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.hero-content p {
    font-size: 1.2rem;
    color: #94a3b8;
    line-height: 1.6;
    margin-bottom: 40px;
    max-width: 480px;
}

.hero-stats {
    display: flex;
    gap: 20px;
}

.stat-pill {
    background: rgba(255, 255, 255, 0.05);
    border: 1px solid rgba(255, 255, 255, 0.1);
    padding: 10px 20px;
    border-radius: 50px;
    display: flex;
    align-items: center;
    gap: 10px;
    backdrop-filter: blur(10px);
    transition: all 0.3s ease;
}

.stat-pill:hover {
    background: rgba(255, 255, 255, 0.1);
    transform: translateY(-2px);
}

.stat-pill i {
    color: #3b82f6;
}

.stat-pill span {
    font-size: 0.9rem;
    font-weight: 500;
}

/* Hero Animation Orbs */
.hero-bg-anim {
    position: absolute;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: 0;
    pointer-events: none;
}

.orb {
    position: absolute;
    border-radius: 50%;
    filter: blur(80px);
    opacity: 0.4;
    animation: floatOrb 20s infinite ease-in-out;
}

.orb-1 {
    width: 400px;
    height: 400px;
    background: #3b82f6;
    top: -10%;
    right: -10%;
}

.orb-2 {
    width: 300px;
    height: 300px;
    background: #8b5cf6;
    bottom: 10%;
    left: 10%;
    animation-delay: -5s;
}

@keyframes floatOrb {

    0%,
    100% {
        transform: translate(0, 0);
    }

    33% {
        transform: translate(30px, 50px) scale(1.1);
    }

    66% {
        transform: translate(-20px, 20px) scale(0.9);
    }
}

/* Right Panel: Login */
/* Right Panel: Login */
.login-panel {
    flex: 1;
    display: flex;
    align-items: center;
    justify-content: center;
    background: var(--bg-dark);
    position: relative;
    padding: 40px;
    background: radial-gradient(at 100% 0%, rgba(59, 130, 246, 0.08) 0px, transparent 50%),
        radial-gradient(at 0% 100%, rgba(99, 102, 241, 0.08) 0px, transparent 50%),
        var(--bg-dark);
}

.login-container {
    width: 100%;
    max-width: 380px;
    z-index: 10;
    position: relative;
    animation: slideInRight 0.8s cubic-bezier(0.16, 1, 0.3, 1);
}

@keyframes slideInRight {
    from {
        opacity: 0;
        transform: translateX(50px);
    }

    to {
        opacity: 1;
        transform: translateX(0);
    }
}

.mobile-brand {
    display: none;
}

/* Center Icon Glow */
.login-icon-glow {
    width: 72px;
    height: 72px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border-radius: 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    margin: 0 auto 32px auto;
    color: white;
    font-size: 2rem;
    box-shadow: 0 15px 35px rgba(59, 130, 246, 0.4);
    animation: floatIcon 4s ease-in-out infinite;
    position: relative;
}

.login-icon-glow::after {
    content: '';
    position: absolute;
    inset: -6px;
    border-radius: 24px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    opacity: 0.25;
    z-index: -1;
    filter: blur(12px);
    animation: pulseGlow 3s infinite;
}

@keyframes floatIcon {

    0%,
    100% {
        transform: translateY(0);
    }

    50% {
        transform: translateY(-8px);
    }
}

.login-header h3 {
    font-size: 2rem;
    font-weight: 800;
    margin-bottom: 8px;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    letter-spacing: -0.02em;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 1rem;
    margin-bottom: 40px;
}

/* Advanced Input Styles */
.input-group.floating-label {
    margin-bottom: 24px;
    position: relative;
}

.input-group.floating-label i {
    z-index: 2;
    transition: all 0.3s ease;
    color: var(--text-muted);
}

.input-group.floating-label input {
    height: 60px;
    padding: 24px 16px 8px 48px;
    font-size: 1.05rem;
    background: rgba(255, 255, 255, 0.7);
    backdrop-filter: blur(10px);
    border: 1px solid rgba(203, 213, 225, 0.8);
    border-radius: 16px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.02);
}

.input-group.floating-label input:focus {
    background: #ffffff;
    border-color: var(--primary);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.15), 0 8px 16px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.input-group.floating-label input:focus+i {
    color: var(--primary);
    transform: translateY(-50%) scale(1.1);
}

.input-group.floating-label label {
    position: absolute;
    left: 48px;
    top: 19px;
    color: var(--text-muted);
    font-size: 1rem;
    pointer-events: none;
    transition: all 0.25s cubic-bezier(0.4, 0, 0.2, 1);
    font-weight: 500;
}

/* Fix overlap: Move label up if focused or has value */
.input-group.floating-label input:focus~label,
.input-group.floating-label input:not(:placeholder-shown)~label {
    top: 9px;
    font-size: 0.75rem;
    color: var(--primary);
    font-weight: 600;
}

/* Shiny Button Effect */
.btn-block {
    width: 100%;
    margin-top: 20px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    background-size: 200% 200%;
    height: 56px;
    font-size: 1.05rem;
    font-weight: 600;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 12px;
    border-radius: 16px;
    overflow: hidden;
    position: relative;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.3);
    transition: all 0.3s ease;
    border: none;
    color: white;
}

.btn-block::before {
    content: '';
    position: absolute;
    top: 0;
    left: -100%;
    width: 100%;
    height: 100%;
    background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.3), transparent);
    transition: left 0.5s ease;
}

.btn-block:hover::before {
    left: 100%;
}

.btn-block:hover {
    transform: translateY(-3px) scale(1.02);
    box-shadow: 0 12px 30px rgba(59, 130, 246, 0.5);
    background-position: 100% 0;
}

.login-footer {
    text-align: center;
    margin-top: 32px;
    color: var(--text-secondary);
    font-size: 0.95rem;
}

.login-footer a {
    color: var(--primary);
    font-weight: 600;
    text-decoration: none;
    transition: color 0.2s;
}

.login-footer a:hover {
    color: var(--primary-dark);
    text-decoration: underline;
}

/* Mobile Responsiveness for Split Layout */
@media (max-width: 900px) {
    #auth-view.split-layout {
        flex-direction: column;
    }

    .hero-panel {
        display: none;
        /* Hide hero on small screens for cleaner login */
    }

    .mobile-brand {
        display: flex;
        align-items: center;
        gap: 12px;
        margin-bottom: 30px;
        justify-content: center;
    }

    .mobile-brand i {
        font-size: 2rem;
        color: var(--primary);
    }
}

/* ========================================
   ADMIN DASHBOARD
   ======================================== */

#admin-view {
    display: flex;
    height: 100vh;
}

.sidebar {
    width: 280px;
    height: calc(100vh - 32px);
    margin: 16px 0 16px 16px;
    /* Light Mode: Light background */
    background: var(--bg-card);
    backdrop-filter: blur(24px);
    border: 1px solid var(--border);
    border-radius: 24px;
    display: flex;
    flex-direction: column;
    position: relative;
    z-index: 100;
    box-shadow: var(--shadow-lg);
    transition: all 0.3s ease;
}

/* Dark Mode: Dark gradient for sidebar */
[data-theme="dark"] .sidebar {
    background: linear-gradient(180deg, rgba(30, 41, 59, 0.7) 0%, rgba(15, 23, 42, 0.8) 100%);
    border: 1px solid rgba(255, 255, 255, 0.08);
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.2);
}

.nav-brand {
    font-size: 1.5rem;
    font-weight: 700;
    padding: 0 24px;
    margin-bottom: 36px;
    display: flex;
    align-items: center;
    gap: 12px;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.nav-brand i {
    font-size: 1.6rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: float 4s ease-in-out infinite;
}

.nav-links {
    list-style: none;
    flex: 1;
    padding: 0 16px;
    overflow-y: auto;
    max-height: calc(100vh - 220px);
    /* Leave room for brand + profile */
}

.nav-links li {
    margin-bottom: 6px;
}

.nav-links a {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 12px 18px;
    text-decoration: none;
    color: var(--text-secondary);
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    font-size: 0.95rem;
    font-weight: 500;
    position: relative;
    overflow: hidden;
}

.nav-links a::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    height: 100%;
    width: 4px;
    background: linear-gradient(180deg, var(--primary), var(--accent));
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    border-radius: 0 4px 4px 0;
}

.nav-links li.active a::before {
    transform: translateX(0);
}

.nav-links li.active a {
    background: linear-gradient(90deg, rgba(59, 130, 246, 0.15), rgba(59, 130, 246, 0.02));
    color: var(--primary);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.15);
    border: 1px solid rgba(59, 130, 246, 0.1);
}

.nav-links li.active a i {
    color: #3b82f6;
    filter: drop-shadow(0 0 8px rgba(59, 130, 246, 0.4));
}

.nav-links a:hover {
    background: var(--bg-hover);
    color: var(--text-primary);
    transform: translateX(4px);
}

.nav-links a i {
    width: 20px;
    text-align: center;
    font-size: 1.1rem;
}

.user-profile {
    display: flex;
    gap: 12px;
    align-items: center;
    padding: 20px 24px;
    border-top: 1px solid var(--border);
    margin-top: auto;
    transition: all 0.3s ease;
}

.user-profile:hover {
    background: var(--bg-hover);
}

.user-profile img {
    border-radius: 50%;
    width: 42px;
    height: 42px;
    border: 2px solid var(--primary);
    box-shadow: 0 2px 8px rgba(59, 130, 246, 0.2);
    transition: transform 0.3s ease;
}

.user-profile:hover img {
    transform: scale(1.1) rotate(5deg);
}

.user-info h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: var(--text-primary);
}

.user-info span {
    font-size: 0.8rem;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.user-info span:hover {
    color: var(--primary);
    transform: translateX(2px);
}

.main-content {
    flex: 1;
    height: calc(100vh - 32px);
    margin: 16px 16px 16px 0;
    /* Top Right Bottom Left (Right side gap, Left side touches flex gap) */
    /* Actually sidebar has 0 right margin, so we need a gap. */
    margin-left: 16px;
    /* Gap between sidebar and content */
    background: rgba(248, 250, 252, 0.7);
    /* Light tint */
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 24px;
    overflow-y: auto;
    overflow-x: hidden;
    position: relative;
    display: flex;
    flex-direction: column;
    box-shadow: 0 20px 40px rgba(0, 0, 0, 0.1);
}

[data-theme="dark"] .main-content {
    background: rgba(15, 23, 42, 0.6);
}

.top-bar {
    padding: 20px 32px;
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: flex;
    justify-content: space-between;
    align-items: center;
    background: rgba(187, 206, 227, 0.979);
    backdrop-filter: blur(12px);
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    position: sticky;
    top: 0;
    z-index: 50;
}

.top-bar h2 {
    font-size: 1.6rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.status-indicators {
    display: flex;
    gap: 24px;
    align-items: center;
}

.status-item {
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    font-weight: 500;
}

.dot {
    width: 8px;
    height: 8px;
    background: var(--success);
    border-radius: 50%;
    animation: pulse 2s ease-in-out infinite;
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
}

@keyframes pulse {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(16, 185, 129, 0);
    }
}

.date-display {
    font-size: 0.9rem;
    color: var(--text-muted);
    font-weight: 500;
}

.content-area {
    padding: var(--section-padding);
}

/* ========================================
   BENTO GRID DASHBOARD (PREMIUM POLISH)
   ======================================== */

.bento-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 12px;
    /* Compact gap */
}

.bento-tile {
    background: var(--bg-card);
    border-radius: 20px;
    /* Slightly tighter radius */
    padding: var(--card-padding);
    border: 1px solid var(--border);
    transition: all 0.4s cubic-bezier(0.16, 1, 0.3, 1);
    animation: tileEnter 0.6s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    /* Improved Light Mode Shadow */
    box-shadow: var(--shadow-sm);
}

.bento-tile:nth-child(1) {
    animation-delay: 0s;
}

.bento-tile:nth-child(2) {
    animation-delay: 0.08s;
}

.bento-tile:nth-child(3) {
    animation-delay: 0.16s;
}

.bento-tile:nth-child(4) {
    animation-delay: 0.24s;
}

.bento-tile:nth-child(5) {
    animation-delay: 0.32s;
}

.bento-tile:nth-child(6) {
    animation-delay: 0.4s;
}

.bento-tile:nth-child(7) {
    animation-delay: 0.48s;
}

.bento-tile:nth-child(8) {
    animation-delay: 0.56s;
}

.bento-tile:nth-child(9) {
    animation-delay: 0.64s;
}

.bento-tile:nth-child(10) {
    animation-delay: 0.72s;
}

/* Expanded Grid */
.bento-grid.expanded {
    gap: 20px;
}

.span-4 {
    grid-column: span 4;
}

@keyframes tileEnter {
    from {
        opacity: 0;
        transform: translateY(20px) scale(0.96);
    }

    to {
        opacity: 1;
        transform: translateY(0) scale(1);
    }
}

.bento-tile:hover {
    box-shadow: 0 24px 48px -12px rgba(0, 0, 0, 0.12);
    transform: translateY(-4px);
}

.bento-tile h4 {
    font-size: 0.9rem;
    font-weight: 600;
    color: #6B7280;
    margin-bottom: 14px;
    display: flex;
    align-items: center;
    gap: 8px;
}

.bento-tile h4 i {
    color: var(--primary);
    font-size: 1rem;
}

/* Span Helpers */
.span-2 {
    grid-column: span 2;
}

.span-3 {
    grid-column: span 3;
}

.row-2 {
    grid-row: span 2;
}

/* --- HERO TILE (Polished) --- */
.bento-tile.hero {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px;
    /* Reduced from 40px */
    border: none;
}

.hero .eyebrow {
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.1em;
    color: #64748B;
    font-weight: 600;
}

.hero h1 {
    font-size: 1.75rem;
    /* Reduced from 2rem */
    font-weight: 700;
    margin: 4px 0;
    line-height: 1.2;
}

.hero h1 span {
    color: #60A5FA;
}

.hero-subtitle {
    color: #94A3B8;
    font-size: 0.9rem;
    margin: 0;
}

.hero-actions {
    display: flex;
    gap: 12px;
    flex-wrap: wrap;
}

.action-pill {
    background: var(--primary);
    color: white;
    border: none;
    padding: 10px 16px;
    /* Compact */
    border-radius: 10px;
    font-size: 0.85rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.action-pill:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

.action-pill.outline {
    background: transparent;
    border: 1px solid #475569;
    color: #94A3B8;
}

.action-pill.outline:hover {
    background: #334155;
    color: white;
    box-shadow: none;
}

/* --- STAT CARDS (Colored) --- */
.stat-card {
    display: flex;
    align-items: center;
    gap: 14px;
    padding: 16px 20px;
    /* Compact */
}

.stat-card .stat-icon {
    width: 42px;
    /* Reduced from 52px */
    height: 42px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.1rem;
    color: white;
}

.stat-card.blue .stat-icon {
    background: linear-gradient(135deg, #3B82F6, #60A5FA);
}

.stat-card.green .stat-icon {
    background: linear-gradient(135deg, #10B981, #34D399);
}

.stat-card.orange .stat-icon {
    background: linear-gradient(135deg, #F59E0B, #FBBF24);
}

.stat-card.purple .stat-icon {
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
}

.stat-card .stat-content {
    display: flex;
    flex-direction: column;
}

.stat-card .stat-value {
    font-size: 1.5rem;
    /* Reduced from 1.8rem */
    font-weight: 800;
    color: var(--text-primary);
    line-height: 1;
}

.stat-card .stat-title {
    font-size: 0.8rem;
    color: var(--text-secondary);
    /* Better contrast var */
    font-weight: 500;
    margin-top: 2px;
}

/* --- ANALYTICS CARD --- */
.analytics-card {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding: var(--card-padding);
}

.analytics-card .analytics-header h4 {
    margin-bottom: 16px;
}

.analytics-card .analytics-value {
    display: flex;
    align-items: baseline;
    gap: 16px;
    flex-wrap: wrap;
}

.analytics-card .big-num {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--text-primary);
}

.analytics-card .trend {
    font-size: 0.85rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 4px 10px;
    border-radius: 20px;
}

.analytics-card .trend.up {
    background: #DCFCE7;
    color: #16A34A;
}

.analytics-card .trend.down {
    background: #FEE2E2;
    color: #DC2626;
}

/* Chart visibility fix */
.chart-tile .chart-container {
    height: 180px;
}

.chart-tile .chart-container.large {
    height: 220px;
}

.chart-tile .tile-header {
    margin-bottom: 12px;
}

/* --- ANALYTICS CTA TILE --- */
.analytics-cta {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 24px 32px;
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    border: none;
}

.analytics-cta .cta-content {
    display: flex;
    align-items: center;
    gap: 20px;
    color: white;
}

.analytics-cta .cta-content>i {
    font-size: 2rem;
    color: #60A5FA;
}

.analytics-cta .cta-content h4 {
    font-size: 1.1rem;
    font-weight: 600;
    color: white;
    margin: 0 0 4px 0;
}

.analytics-cta .cta-content p {
    font-size: 0.85rem;
    color: #94A3B8;
    margin: 0;
}

.analytics-cta .btn-primary {
    background: var(--primary);
    color: white;
    border: none;
    padding: 12px 24px;
    border-radius: 12px;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: all 0.2s ease;
}

.analytics-cta .btn-primary:hover {
    transform: translateY(-2px);
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
}

/* Responsive for expanded */
@media (max-width: 1200px) {
    .span-4 {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .span-4 {
        grid-column: span 1;
    }

    .bento-tile.stat-card {
        padding: 16px;
    }

    .stat-card .stat-value {
        font-size: 1.5rem;
    }
}

/* --- STATS SUMMARY --- */
.stats-summary {
    display: flex;
    align-items: center;
    justify-content: space-around;
    gap: 16px;
    padding: 28px 20px;
}

.stat-item {
    text-align: center;
}

.stat-num {
    font-size: 2rem;
    font-weight: 800;
    color: var(--text-primary);
    display: block;
}

.stat-label {
    font-size: 0.8rem;
    color: #9CA3AF;
    font-weight: 500;
}

.stats-summary .divider {
    width: 1px;
    height: 40px;
    background: #E5E7EB;
}

/* --- MAP TILE --- */
.map-tile {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.map-tile .tile-header {
    padding: 16px 20px;
    border-bottom: 1px solid #E5E7EB;
}

.mini-map-container {
    flex: 1;
    min-height: 200px;
    background: linear-gradient(135deg, #E0F2FE 0%, #DBEAFE 100%);
    border-radius: 0 0 24px 24px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #64748B;
    font-size: 0.9rem;
}

.mini-map-container::before {
    content: '🗺️ Map Loading...';
}

/* --- TILE HEADER --- */
.tile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 12px;
}

.tile-header h4 {
    margin: 0;
}

.chip-btn {
    background: #F3F4F6;
    border: none;
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6B7280;
    cursor: pointer;
    transition: all 0.2s ease;
}

.chip-btn:hover {
    background: var(--primary);
    color: white;
}

.badge {
    background: #DCFCE7;
    color: #16A34A;
    padding: 4px 10px;
    border-radius: 20px;
    font-size: 0.7rem;
    font-weight: 700;
    text-transform: uppercase;
}

/* --- ACTIVITY TILE --- */
.activity-tile {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.activity-tile .tile-header {
    padding: 16px 20px;
    border-bottom: 1px solid #E5E7EB;
}

.activity-tile .activity-list {
    flex: 1;
    overflow-y: auto;
    padding: 12px 20px;
    max-height: 320px;
}

/* --- CHART TILE --- */
.chart-tile {
    padding: 20px;
}

.chart-tile h4 {
    margin-bottom: 12px;
}

.chart-tile .chart-container {
    height: 160px;
    position: relative;
}

/* Responsive Bento */
@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .span-3 {
        grid-column: span 2;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .span-2,
    .span-3 {
        grid-column: span 1;
    }

    .bento-tile.hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 24px;
        padding: 24px;
    }

    .hero h1 {
        font-size: 1.5rem;
    }
}

/* --- Hero Tile --- */
.bento-tile.hero {
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    color: white;
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 32px;
}

.hero .greeting {
    font-size: 0.9rem;
    color: #94A3B8;
    display: block;
    margin-bottom: 4px;
}

.hero h2 {
    font-size: 1.8rem;
    font-weight: 700;
    margin-bottom: 8px;
}

.hero h2 span {
    color: var(--primary-light);
}

.hero p {
    color: #94A3B8;
    font-size: 0.95rem;
}

.hero-metrics {
    display: flex;
    gap: 32px;
}

.hero-metrics .metric {
    text-align: center;
}

.hero-metrics .num {
    font-size: 2.2rem;
    font-weight: 800;
    color: white;
    display: block;
}

.hero-metrics .lbl {
    font-size: 0.8rem;
    color: #94A3B8;
}

/* --- Map Preview --- */
.bento-tile.map-preview {
    padding: 0;
    display: flex;
    flex-direction: column;
}

.map-preview .tile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid #E2E8F0;
}

.map-preview .tile-header h4 {
    margin: 0;
}

.link-btn {
    background: none;
    border: none;
    color: var(--primary);
    font-weight: 600;
    cursor: pointer;
    font-size: 0.85rem;
}

.link-btn:hover {
    text-decoration: underline;
}

.mini-map {
    flex: 1;
    min-height: 200px;
    background: #E2E8F0 url('data:image/svg+xml;utf8,<svg xmlns="http://www.w3.org/2000/svg" viewBox="0 0 100 100"><text y="55" x="20" font-size="14" fill="%2394A3B8">Map Loading...</text></svg>') center/contain no-repeat;
    border-radius: 0 0 20px 20px;
}

/* --- Actions Tile --- */
.bento-tile.actions {
    display: flex;
    flex-direction: column;
}

.action-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
    flex: 1;
}

.action-grid button {
    width: 100%;
    height: 60px;
    background: #F1F5F9;
    border: 1px solid #E2E8F0;
    border-radius: 14px;
    font-size: 1.2rem;
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s;
}

.action-grid button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: scale(1.05);
}

/* --- Team Tile --- */
.bento-tile.team {
    display: flex;
    flex-direction: column;
}

.avatar-stack {
    display: flex;
    align-items: center;
    margin-bottom: 10px;
}

.avatar-stack img {
    width: 40px;
    height: 40px;
    border-radius: 50%;
    border: 3px solid white;
    margin-left: -12px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.1);
}

.avatar-stack img:first-child {
    margin-left: 0;
}

.avatar-stack .more {
    width: 40px;
    height: 40px;
    background: #E2E8F0;
    border-radius: 50%;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 0.8rem;
    font-weight: 600;
    color: var(--text-secondary);
    margin-left: -12px;
}

.bento-tile .subtitle {
    font-size: 0.85rem;
    color: var(--text-muted);
    margin-top: auto;
}

/* --- Activity Tile --- */
.bento-tile.activity .activity-list {
    max-height: 300px;
    overflow-y: auto;
    padding-right: 8px;
}

/* --- Chart Tile --- */
.chart-wrap {
    height: 180px;
    position: relative;
}

.chart-wrap.small {
    height: 140px;
}

/* Responsive */
@media (max-width: 1200px) {
    .bento-grid {
        grid-template-columns: repeat(2, 1fr);
    }

    .span-2 {
        grid-column: span 2;
    }

    .row-2 {
        grid-row: span 1;
    }
}

@media (max-width: 768px) {
    .bento-grid {
        grid-template-columns: 1fr;
    }

    .span-2 {
        grid-column: span 1;
    }

    .bento-tile.hero {
        flex-direction: column;
        align-items: flex-start;
        gap: 20px;
    }

    .hero-metrics {
        gap: 24px;
    }
}

/* Keep Legacy Styles for Other Tabs */
.stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 28px;
}

.stat-card-mini {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 20px;
    display: flex;
    align-items: center;
    gap: 16px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
    transition: all 0.3s ease;
}

.stat-card-mini:hover {
    transform: translateY(-4px);
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08);
}

.stat-card-mini .icon {
    width: 48px;
    height: 48px;
    border-radius: 12px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.3rem;
    color: white;
}

.stat-card-mini .icon.blue {
    background: linear-gradient(135deg, #3B82F6, #60A5FA);
}

.stat-card-mini .icon.green {
    background: linear-gradient(135deg, #10B981, #34D399);
}

.stat-card-mini .icon.orange {
    background: linear-gradient(135deg, #F59E0B, #FBBF24);
}

.stat-card-mini .icon.purple {
    background: linear-gradient(135deg, #8B5CF6, #A78BFA);
}

.stat-card-mini .info {
    display: flex;
    flex-direction: column;
}

.stat-card-mini .label {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.stat-card-mini .value {
    font-size: 1.8rem;
    font-weight: 700;
    color: var(--text-primary);
}

/* Dashboard Grid (2x2) */
.dashboard-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.dashboard-card {
    background: #ffffff;
    border: 1px solid var(--border-light);
    border-radius: 16px;
    padding: 24px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.04);
}

.dashboard-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
    display: flex;
    align-items: center;
    gap: 10px;
}

.dashboard-card h4 i {
    color: var(--primary);
}

/* Quick Actions */
.quick-actions .action-buttons {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 12px;
}

.quick-actions button {
    background: var(--bg-dark);
    border: 1px solid var(--border);
    border-radius: 12px;
    padding: 14px 16px;
    font-size: 0.9rem;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-secondary);
    transition: all 0.2s ease;
}

.quick-actions button:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-2px);
}

.quick-actions button i {
    font-size: 1rem;
}

/* Activity Feed List */
.activity-feed .activity-list {
    max-height: 280px;
    overflow-y: auto;
    padding-right: 8px;
}

/* Chart Container */
.chart-container {
    height: 200px;
    position: relative;
}

.chart-container.small {
    height: 160px;
}

/* Responsive: Stack on Mobile */
@media (max-width: 1024px) {
    .stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .dashboard-grid {
        grid-template-columns: 1fr;
    }
}

@media (max-width: 600px) {
    .stats-row {
        grid-template-columns: 1fr;
    }
}

/* Legacy Stat Card (Keep for other tabs) */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
    gap: 24px;
    margin-bottom: 32px;
}

.stat-card {
    padding: 24px;
    display: flex;
    align-items: flex-start;
    gap: 18px;
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.4), rgba(255, 255, 255, 0.1));
    border: 1px solid rgba(255, 255, 255, 0.2);
    transition: all 0.4s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.stat-card:hover {
    transform: translateY(-5px);
    box-shadow: 0 15px 30px rgba(0, 0, 0, 0.1);
    background: linear-gradient(145deg, rgba(255, 255, 255, 0.6), rgba(255, 255, 255, 0.2));
}

.stat-card:nth-child(1) {
    animation-delay: 0.1s;
}

.stat-card:nth-child(2) {
    animation-delay: 0.2s;
}

.stat-card:nth-child(3) {
    animation-delay: 0.3s;
}

@keyframes fadeInUp {
    from {
        opacity: 0;
        transform: translateY(20px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Generic Animation Utility */
.animate-enter {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.stagger-1 {
    animation-delay: 0.1s;
}

.stagger-2 {
    animation-delay: 0.2s;
}

.stagger-3 {
    animation-delay: 0.3s;
}

.stagger-4 {
    animation-delay: 0.4s;
}

/* Dashboard Grids */

/* === FULLSCREEN ANALYTICS MODAL === */
.fullscreen-modal .modal-content {
    width: 95vw;
    max-width: 1400px;
    height: 90vh;
    max-height: none;
    border-radius: 24px;
    padding: 0;
    overflow: hidden;
    display: flex;
    flex-direction: column;
}

.analytics-panel {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.analytics-modal-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 24px 32px;
    border-bottom: 1px solid var(--border);
    background: linear-gradient(135deg, #1E293B 0%, #0F172A 100%);
    color: white;
}

.analytics-modal-header h2 {
    font-size: 1.4rem;
    font-weight: 700;
    display: flex;
    align-items: center;
    gap: 12px;
}

.analytics-modal-header h2 i {
    color: #60A5FA;
}

.analytics-modal-header .close-btn {
    background: rgba(255, 255, 255, 0.1);
    border: none;
    width: 40px;
    height: 40px;
    border-radius: 12px;
    color: white;
    cursor: pointer;
    font-size: 1.2rem;
    transition: all 0.2s ease;
}

.analytics-modal-header .close-btn:hover {
    background: rgba(255, 255, 255, 0.2);
    transform: rotate(90deg);
}

.analytics-grid {
    flex: 1;
    overflow-y: auto;
    padding: 32px;
    background: #F8FAFC;
}

.analytics-stats-row {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 20px;
    margin-bottom: 32px;
}

.analytics-stat {
    background: white;
    border-radius: 16px;
    padding: 24px;
    text-align: center;
    border: 1px solid #E5E7EB;
}

.analytics-stat .num {
    font-size: 2.5rem;
    font-weight: 800;
    color: var(--primary);
    display: block;
}

.analytics-stat .lbl {
    font-size: 0.9rem;
    color: #6B7280;
    font-weight: 500;
}

.analytics-charts {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 24px;
}

.analytics-chart-card {
    background: white;
    border-radius: 16px;
    padding: 24px;
    border: 1px solid #E5E7EB;
}

.analytics-chart-card h4 {
    font-size: 1rem;
    font-weight: 600;
    color: var(--text-primary);
    margin-bottom: 16px;
}

.chart-lg {
    height: 250px;
    position: relative;
}

@media (max-width: 900px) {
    .analytics-stats-row {
        grid-template-columns: repeat(2, 1fr);
    }

    .analytics-charts {
        grid-template-columns: 1fr;
    }
}

.dashboard-split {
    display: flex;
    gap: 24px;
    margin-top: 24px;
    flex-wrap: wrap;
}

.dashboard-split>div {
    animation: fadeInUp 0.8s cubic-bezier(0.16, 1, 0.3, 1) backwards;
}

.dashboard-split>div:nth-child(1) {
    animation-delay: 0.4s;
}

.dashboard-split>div:nth-child(2) {
    animation-delay: 0.5s;
}

.icon-box {
    width: 56px;
    height: 56px;
    border-radius: 14px;
    display: flex;
    justify-content: center;
    align-items: center;
    font-size: 1.5rem;
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.05));
    border: 2px solid rgba(59, 130, 246, 0.2);
    color: var(--primary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    position: relative;
    overflow: hidden;
}

.icon-box::before {
    content: '';
    position: absolute;
    top: -50%;
    left: -50%;
    width: 200%;
    height: 200%;
    background: linear-gradient(45deg, transparent, rgba(255, 255, 255, 0.1), transparent);
    animation: shimmer 3s infinite;
}

@keyframes shimmer {
    0% {
        transform: translateX(-100%) translateY(-100%) rotate(45deg);
    }

    100% {
        transform: translateX(100%) translateY(100%) rotate(45deg);
    }
}

.stat-card:hover .icon-box {
    transform: scale(1.1) rotate(5deg);
    box-shadow: 0 8px 16px rgba(59, 130, 246, 0.3);
}

.stat-info {
    flex: 1;
}

.stat-info h3 {
    font-size: 0.75rem;
    font-weight: 600;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 8px;
}

.stat-value {
    font-size: 2.5rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    transition: all 0.3s ease;
    animation: countUp 0.8s cubic-bezier(0.34, 1.56, 0.64, 1);
}

@keyframes countUp {
    from {
        opacity: 0;
        transform: scale(0.5);
    }

    to {
        opacity: 1;
        transform: scale(1);
    }
}

/* ========================================
   CHARTS & ACTIVITY
   ======================================== */

.charts-row {
    display: grid;
    grid-template-columns: 2fr 1fr;
    gap: 24px;
}

.chart-container,
.activity-feed {
    padding: 28px;
}

.chart-container h3,
.activity-feed h3 {
    font-size: 1.1rem;
    font-weight: 700;
    margin-bottom: 24px;
    color: var(--text-primary);
}

.map-wrapper {
    padding: 28px;
    height: calc(100vh - 200px);
}

#ops-map {
    height: 100%;
    border-radius: 16px;
    border: 2px solid var(--border);
    overflow: hidden;
    box-shadow: var(--shadow-lg);
}

/* ========================================
   FIELD STAFF VIEW
   ======================================== */

#field-view {
    background: var(--bg-dark);
    padding-bottom: 90px;
}

.mobile-header {
    padding: 24px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border-bottom: 1px solid var(--border);
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: var(--shadow-sm);
}

.logo-small i {
    font-size: 1.8rem;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
    animation: float 3s ease-in-out infinite;
}

@keyframes float {

    0%,
    100% {
        transform: translateY(0px);
    }

    50% {
        transform: translateY(-10px);
    }
}

.user-greeting {
    flex: 1;
    padding-left: 20px;
}

.user-greeting span {
    font-size: 0.85rem;
    color: var(--text-muted);
    font-weight: 500;
}

.user-greeting h3 {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--text-primary);
}

.icon-btn {
    background: var(--bg-darker);
    border: 2px solid var(--border);
    border-radius: 12px;
    padding: 10px 12px;
    cursor: pointer;
    color: var(--text-secondary);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.icon-btn:hover {
    background: var(--bg-hover);
    color: var(--primary);
    transform: scale(1.05);
    border-color: var(--primary);
}

.mobile-content {
    padding: 24px;
}

.mobile-content h3 {
    font-size: 0.85rem;
    font-weight: 700;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.08em;
    margin-bottom: 20px;
}

.attendance-card {
    padding: 32px;
    text-align: center;
    margin-bottom: 32px;
    transition: all 0.3s ease;
}

.status-circle {
    width: 80px;
    height: 80px;
    background: var(--bg-darker);
    border: 3px solid var(--border);
    border-radius: 50%;
    margin: 0 auto 20px;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 2rem;
    color: var(--text-muted);
    transition: all 0.4s cubic-bezier(0.4, 0, 0.2, 1);
}

.attendance-card.clocked-in .status-circle {
    border-color: var(--success);
    color: var(--success);
    background: linear-gradient(135deg, rgba(16, 185, 129, 0.1), rgba(16, 185, 129, 0.05));
    box-shadow: 0 0 0 0 rgba(16, 185, 129, 0.7);
    animation: pulse 2s ease-in-out infinite;
}

.attendance-controls p {
    font-size: 1rem;
    color: var(--text-secondary);
    margin-bottom: 20px;
    font-weight: 500;
}

.location-badge {
    margin-top: 20px;
    font-size: 0.8rem;
    color: var(--text-muted);
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
}

/* ========================================
   TASK CARDS
   ======================================== */

.task-list {
    display: flex;
    flex-direction: column;
    gap: 16px;
}

.task-card {
    padding: 20px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: slideInUp 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.task-card:nth-child(1) {
    animation-delay: 0.1s;
}

.task-card:nth-child(2) {
    animation-delay: 0.2s;
}

.task-card:nth-child(3) {
    animation-delay: 0.3s;
}

.task-card:nth-child(4) {
    animation-delay: 0.4s;
}

.task-card:hover {
    border-color: var(--primary);
    transform: translateY(-4px);
}

.task-header {
    display: flex;
    justify-content: space-between;
    margin-bottom: 12px;
    align-items: center;
}

.badge {
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.15), rgba(139, 92, 246, 0.1));
    color: var(--primary);
    border: 1px solid rgba(59, 130, 246, 0.3);
    padding: 6px 14px;
    border-radius: 8px;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    transition: all 0.3s ease;
}

.badge:hover {
    transform: scale(1.05);
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

.task-card h4 {
    font-size: 1.1rem;
    font-weight: 700;
    color: var(--text-primary);
    margin-bottom: 8px;
}

.task-card p {
    font-size: 0.9rem;
    color: var(--text-secondary);
    margin-bottom: 16px;
}

/* ========================================
   MOBILE NAVIGATION
   ======================================== */

.mobile-nav {
    display: none;
    /* Hidden by default */
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: rgba(30, 41, 59, 0.8);
    backdrop-filter: blur(12px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 20px;
    padding: 12px 24px;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* Only show when inside an active view */
.view.active .mobile-nav {
    display: flex;
    animation: slideUpNav 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

@keyframes slideUpNav {
    from {
        transform: translate(-50%, 100px);
        opacity: 0;
    }

    to {
        transform: translate(-50%, 0);
        opacity: 1;
    }
}

.mobile-nav a {
    color: var(--text-muted);
    font-size: 1.3rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    padding: 10px 20px;
    border-radius: 12px;
    position: relative;
}

.mobile-nav a::before {
    content: '';
    position: absolute;
    bottom: 0;
    left: 50%;
    transform: translateX(-50%) scaleX(0);
    width: 60%;
    height: 3px;
    background: linear-gradient(90deg, var(--primary), var(--accent));
    border-radius: 2px 2px 0 0;
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.mobile-nav a.active {
    color: var(--primary);
    background: linear-gradient(135deg, rgba(59, 130, 246, 0.1), rgba(139, 92, 246, 0.05));
}

.mobile-nav a.active::before {
    transform: translateX(-50%) scaleX(1);
}

.mobile-nav a:hover {
    color: var(--primary);
}

/* Disable glass-panel hover transform for mobile-nav */
.mobile-nav:hover {
    transform: translateX(-50%);
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.2);
}

/* ========================================
   MODALS
   ======================================== */

.modal {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 1000;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show {
    opacity: 1;
    pointer-events: all;
}

.modal-content {
    width: 90%;
    max-width: 480px;
    padding: 32px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 20px;
    box-shadow: var(--shadow-xl);
    transform: scale(0.9) translateY(20px);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.modal.show .modal-content {
    transform: scale(1) translateY(0);
}

.modal-content h3 {
    margin-bottom: 24px;
    font-size: 1.4rem;
    font-weight: 700;
    background: linear-gradient(135deg, var(--text-primary), var(--primary));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.input-light {
    width: 100%;
    padding: 12px 16px;
    margin-bottom: 16px;
    background: var(--bg-darker);
    border: 2px solid var(--border);
    border-radius: 12px;
    color: var(--text-primary);
    outline: none;
    font-size: 0.95rem;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.input-light:focus {
    border-color: var(--primary);
    background: var(--bg-card);
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
    transform: translateY(-2px);
}

.modal-actions {
    display: flex;
    justify-content: flex-end;
    gap: 12px;
    margin-top: 24px;
}

/* ========================================
   TOAST NOTIFICATIONS
   ======================================== */

.toast {
    position: fixed;
    bottom: -100px;
    right: 24px;
    min-width: 320px;
    max-width: 420px;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 1px solid var(--border);
    border-radius: 16px;
    padding: 16px 20px;
    box-shadow: var(--shadow-xl);
    z-index: 10000;
    display: flex;
    align-items: center;
    gap: 14px;
    transition: bottom 0.4s cubic-bezier(0.4, 0, 0.2, 1);
    color: var(--text-primary);
}

.toast.show {
    bottom: 32px;
}

.toast i {
    font-size: 1.3rem;
}

.toast-success {
    border-left: 4px solid var(--success);
}

.toast-success i {
    color: var(--success);
}

.toast-error {
    border-left: 4px solid var(--error);
}

.toast-error i {
    color: var(--error);
}

.toast-info {
    border-left: 4px solid var(--primary);
}

.toast-info i {
    color: var(--primary);
}

/* ========================================
   LOADING SPINNER
   ======================================== */

.global-loader {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: rgba(0, 0, 0, 0.7);
    backdrop-filter: blur(8px);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9998;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.3s ease;
}

.global-loader.active {
    opacity: 1;
    pointer-events: all;
}

.spinner {
    width: 50px;
    height: 50px;
    border: 3px solid rgba(59, 130, 246, 0.2);
    border-top-color: var(--primary);
    border-radius: 50%;
    animation: spin 0.8s linear infinite;
    position: relative;
}

.spinner::after {
    content: '';
    position: absolute;
    width: 100%;
    height: 100%;
    border-radius: 50%;
    border: 3px solid transparent;
    border-top-color: var(--accent);
    animation: spin 1.2s linear infinite reverse;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

/* ========================================
   SPLASH SCREEN
   ======================================== */

#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100vw;
    height: 100vh;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    z-index: 9999;
    display: flex;
    justify-content: center;
    align-items: center;
    transition: opacity 0.4s ease;
}

#splash-screen.fade-out {
    opacity: 0;
    pointer-events: none;
}

.splash-content {
    text-align: center;
    animation: float 2s ease-in-out infinite;
}

/* ========================================
   FAB (Floating Action Button)
   ======================================== */

.fab {
    position: fixed;
    bottom: 110px;
    right: 24px;
    width: 64px;
    height: 64px;
    border-radius: 50%;
    background: linear-gradient(135deg, var(--primary), var(--accent));
    border: none;
    color: white;
    font-size: 1.5rem;
    cursor: pointer;
    box-shadow: 0 8px 20px rgba(59, 130, 246, 0.4);
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    z-index: 99;
    animation: float 3s ease-in-out infinite;
}

.fab:hover {
    transform: scale(1.1) rotate(90deg);
    box-shadow: 0 12px 28px rgba(59, 130, 246, 0.5);
}

.fab:active {
    transform: scale(0.95);
}

/* ========================================
   TAB TRANSITIONS
   ======================================== */

.tab-content {
    opacity: 0;
    transform: translateY(12px);
    transition: opacity 0.3s ease, transform 0.3s ease;
}

.tab-content.active {
    opacity: 1;
    transform: translateY(0);
}

.field-tab {
    animation: fadeIn 0.3s ease;
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(12px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* ========================================
   SCROLLBAR
   ======================================== */

::-webkit-scrollbar {
    width: 6px;
    height: 6px;
}

::-webkit-scrollbar-track {
    background: transparent;
}

::-webkit-scrollbar-thumb {
    background: var(--border);
    border-radius: 10px;
    transition: background 0.3s ease;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--text-muted);
}

/* ========================================
   MOBILE NAV (GLASS)
   ======================================== */
.mobile-nav {
    display: none;
    position: fixed;
    bottom: 20px;
    left: 50%;
    transform: translateX(-50%);
    width: 90%;
    max-width: 400px;
    background: var(--bg-card);
    /* Use theme card bg */
    backdrop-filter: blur(16px);
    border: 1px solid var(--border);
    border-radius: 20px;
    padding: 12px 24px;
    justify-content: space-between;
    align-items: center;
    z-index: 1000;
    box-shadow: 0 10px 30px rgba(0, 0, 0, 0.15);
    /* Softer shadow */
}

/* Only show when inside an active view */
.view.active .mobile-nav {
    display: flex;
    animation: slideUpNav 0.5s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

.flex-gap {
    display: flex;
    gap: 16px;
}

.text-center {
    text-align: center;
}

.upload-area {
    border: 2px dashed var(--border);
    border-radius: 12px;
    padding: 40px;
    text-align: center;
    color: var(--text-muted);
    cursor: pointer;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
}

.upload-area:hover {
    border-color: var(--primary);
    color: var(--primary);
    background: rgba(59, 130, 246, 0.05);
    transform: translateY(-4px);
}

/* ========================================
   THEME TOGGLE
   ======================================== */

.theme-toggle {
    position: fixed;
    bottom: 24px;
    right: 24px;
    width: 52px;
    height: 52px;
    border-radius: 50%;
    background: var(--bg-card);
    backdrop-filter: blur(20px);
    border: 2px solid var(--border);
    box-shadow: var(--shadow-md);
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    z-index: 99;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    animation: float 4s ease-in-out infinite;
}

/* Hide theme toggle in field view to prevent overlap */
#field-view .theme-toggle {
    top: 90px;
}

.theme-toggle:hover {
    transform: scale(1.1);
    border-color: var(--primary);
    box-shadow: var(--shadow-xl), 0 0 20px rgba(59, 130, 246, 0.3);
}

.theme-toggle i {
    font-size: 1.3rem;
    color: var(--primary);
    transition: transform 0.5s cubic-bezier(0.4, 0, 0.2, 1);
}

.theme-toggle:hover i {
    transform: rotate(180deg);
}

/* ========================================
   RESPONSIVE
   ======================================== */

@media (max-width: 768px) {
    #admin-view {
        flex-direction: column;
    }

    .sidebar {
        width: 100%;
        height: auto;
        margin: 0;
        border-radius: 0;
        border-right: none;
        border-bottom: 1px solid var(--border);
        background: var(--bg-card);
        /* Opaque for readability */
    }

    .main-content {
        margin: 0;
        height: auto;
        border-radius: 0;
        border: none;
        background: transparent;
        box-shadow: none;
        overflow-y: visible;
        /* Let body scroll */
    }

    #admin-view {
        height: auto;
        overflow-y: auto;
        /* Allow full page scroll */
    }

    .nav-links {
        display: flex;
        overflow-x: auto;
        gap: 6px;
        padding: 0 16px;
    }

    .nav-links li {
        margin-bottom: 0;
    }

    .charts-row {
        grid-template-columns: 1fr;
    }

    .toast {
        min-width: 280px;
        right: 20px;
    }

    .stats-grid {
        grid-template-columns: 1fr;
    }

    /* Bento Grid Mobile Fix */
    .bento-grid {
        grid-template-columns: 1fr;
        gap: 16px;
    }

    .bento-tile.span-4,
    .bento-tile.span-3,
    .bento-tile.span-2 {
        grid-column: span 1;
    }

    .bento-tile.row-2 {
        grid-row: span 1;
    }

    .hero {
        flex-direction: column;
        align-items: flex-start;
        text-align: left;
    }

    .hero-actions {
        width: 100%;
        margin-top: 16px;
    }

    .stat-card {
        padding: 16px;
    }
}

/* ========================================
   FOCUS STATES
   ======================================== */

input:focus,
select:focus,
textarea:focus {
    outline: none;
    border-color: var(--primary) !important;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.1);
}

/* ========================================
   SMOOTH TRANSITIONS
   ======================================== */

* {
    transition-property: background-color, border-color, color, fill, stroke;
    transition-duration: 0.3s;
    transition-timing-function: ease;
}

button,
a,
.glass-panel,
.task-card,
.stat-card {
    transition-property: all;
}

/* ========================================
   OVERRIDDEN STYLES
   ======================================== */

/* Hide global theme toggle when logged in (Dashboards Active) */
body:has(#admin-view.active) #theme-toggle,
body:has(#field-view.active) #theme-toggle {
    display: none !important;
}

/* ========================================
   DROPDOWNS
   ======================================== */
.dropdown {
    position: relative;
    display: inline-block;
}

.dropdown-menu {
    position: absolute;
    top: 100%;
    right: 0;
    margin-top: 8px;
    background: var(--bg-card);
    border: 1px solid var(--border);
    border-radius: 12px;
    box-shadow: var(--shadow-xl);
    padding: 8px;
    min-width: 160px;
    z-index: 1000;
    display: flex;
    flex-direction: column;
    gap: 4px;
    animation: fadeIn 0.15s ease-out;
}

.dropdown-menu.hidden {
    display: none;
}

.dropdown-menu button {
    text-align: left;
    width: 100%;
    padding: 10px 12px;
    border-radius: 8px;
}

.dropdown-menu button:hover {
    background: var(--bg-hover);
    color: var(--primary);
}

@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(-5px);
    }

    to {
        opacity: 1;
        transform: translateY(0);
    }
}

/* Forced Utility to prevent FOUC */
.hidden {
    display: none !important;
    visibility: hidden !important;
    opacity: 0 !important;
}

/* ========================================
   FullCalendar Overrides (Glass Theme)
   ======================================== */
.fc {
    --fc-border-color: rgba(255, 255, 255, 0.1);
    --fc-button-bg-color: var(--primary);
    --fc-button-border-color: var(--primary);
    --fc-button-hover-bg-color: #4f46e5;
    --fc-button-hover-border-color: #4f46e5;
    --fc-button-active-bg-color: #4338ca;
    --fc-button-active-border-color: #4338ca;
    --fc-event-bg-color: #3b82f6;
    --fc-event-border-color: #3b82f6;
    --fc-today-bg-color: rgba(255, 255, 255, 0.05);
    --fc-neutral-bg-color: rgba(255, 255, 255, 0.05);
    font-family: 'Outfit', sans-serif;
    color: var(--text-primary);
}

.fc-theme-standard td,
.fc-theme-standard th {
    border-color: var(--fc-border-color);
}

.fc-col-header-cell {
    background: rgba(255, 255, 255, 0.03);
    padding: 10px 0;
}

.fc-daygrid-day-number {
    color: var(--text-secondary);
    font-size: 0.9rem;
    padding: 8px;
}

.fc-daygrid-event {
    border-radius: 4px;
    padding: 2px 4px;
    font-size: 0.8rem;
    border: none;
    box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
}

.fc-toolbar-title {
    font-size: 1.5rem !important;
    font-weight: 600;
}

.fc-button {
    border-radius: 8px !important;
    text-transform: capitalize;
    font-weight: 500;
    padding: 8px 16px !important;
    font-size: 0.9rem !important;
    transition: all 0.2s;
}

.fc-button:focus {
    box-shadow: none !important;
}

/* Day cell hover effect */
.fc-daygrid-day:hover {
    background: rgba(255, 255, 255, 0.02);
}

/* ========================================
   AI FEATURES STYLING
   ======================================== */

.ai-briefing-tile {
    background: linear-gradient(135deg, rgba(99, 102, 241, 0.05) 0%, rgba(59, 130, 246, 0.08) 100%);
    border: 1px solid rgba(99, 102, 241, 0.2);
    position: relative;
    overflow: hidden;
}

.ai-briefing-tile::before {
    content: '';
    position: absolute;
    top: 0;
    right: 0;
    width: 200px;
    height: 200px;
    background: radial-gradient(circle, rgba(99, 102, 241, 0.15) 0%, transparent 70%);
    pointer-events: none;
}

.ai-briefing-tile .tile-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    padding: 16px 20px;
    border-bottom: 1px solid var(--border);
}

.ai-briefing-tile .tile-header h4 {
    margin: 0;
    font-size: 1rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    gap: 10px;
    color: var(--text-primary);
}

.ai-briefing-tile .tile-header h4 i {
    color: var(--accent);
}

/* Chip Button for AI actions */
.chip-btn {
    background: rgba(99, 102, 241, 0.1);
    border: 1px solid rgba(99, 102, 241, 0.3);
    color: var(--accent);
    padding: 6px 14px;
    border-radius: 20px;
    font-size: 0.8rem;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 6px;
}

.chip-btn:hover {
    background: rgba(99, 102, 241, 0.2);
    border-color: var(--accent);
    transform: translateY(-1px);
}

.chip-btn:disabled {
    opacity: 0.6;
    cursor: not-allowed;
    transform: none;
}

.chip-btn i {
    font-size: 0.75rem;
}

/* AI Spinner Animation */
@keyframes spin {
    from {
        transform: rotate(0deg);
    }

    to {
        transform: rotate(360deg);
    }
}

.fa-spin {
    animation: spin 1s linear infinite;
}

/* ========================================
   LOGO ANIMATIONS & STYLES
   ======================================== */

/* Base Logo Styles */
.nav-brand img,
.logo-small img,
.hero-brand img,
.mobile-brand img,
.logo img,
.footer-brand img {
    border-radius: 12px;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    filter: drop-shadow(0 2px 8px rgba(37, 99, 235, 0.3));
}

/* Hover Effect - Lift and Glow */
.nav-brand img:hover,
.logo-small img:hover,
.hero-brand img:hover,
.mobile-brand img:hover,
.logo img:hover,
.footer-brand img:hover {
    transform: scale(1.08) translateY(-2px);
    filter: drop-shadow(0 4px 16px rgba(99, 102, 241, 0.5));
}

/* Pulse Animation for Splash Screen */
@keyframes logoPulse {

    0%,
    100% {
        transform: scale(1);
        filter: drop-shadow(0 0 20px rgba(99, 102, 241, 0.4));
    }

    50% {
        transform: scale(1.05);
        filter: drop-shadow(0 0 40px rgba(99, 102, 241, 0.7));
    }
}

/* Slow Pulse for Headers */
@keyframes logoGlow {

    0%,
    100% {
        filter: drop-shadow(0 2px 8px rgba(37, 99, 235, 0.3));
    }

    50% {
        filter: drop-shadow(0 2px 16px rgba(99, 102, 241, 0.5));
    }
}

/* Apply pulse animation */
.pulse {
    animation: logoPulse 2s ease-in-out infinite;
}

.pulse-slow {
    animation: logoGlow 3s ease-in-out infinite;
}

/* Splash Screen Logo - Larger with stronger glow */
#splash-screen img {
    border-radius: 20px;
    animation: logoPulse 1.5s ease-in-out infinite;
}

/* Admin Sidebar Logo */
.sidebar .nav-brand img {
    animation: logoGlow 4s ease-in-out infinite;
}

/* Field View Header Logo */
.mobile-header .logo-small img {
    animation: logoGlow 4s ease-in-out infinite;
}

/* Dark Theme Adjustments */
[data-theme="dark"] .nav-brand img,
[data-theme="dark"] .logo-small img,
[data-theme="dark"] .hero-brand img,
[data-theme="dark"] .mobile-brand img,
[data-theme="dark"] .logo img {
    filter: drop-shadow(0 2px 12px rgba(96, 165, 250, 0.4));
}

[data-theme="dark"] .nav-brand img:hover,
[data-theme="dark"] .logo-small img:hover,
[data-theme="dark"] .hero-brand img:hover,
[data-theme="dark"] .mobile-brand img:hover,
[data-theme="dark"] .logo img:hover {
    filter: drop-shadow(0 4px 24px rgba(96, 165, 250, 0.6));
}

[data-theme="dark"] #splash-screen img {
    filter: drop-shadow(0 0 30px rgba(96, 165, 250, 0.5));
}

/* ========================================
   CHIP BUTTONS (AI Features)
   ======================================== */

.chip-btn {
    display: inline-flex;
    align-items: center;
    gap: 6px;
    padding: 5px 12px;
    font-size: 0.75rem;
    font-weight: 600;
    border-radius: 20px;
    border: 1px solid var(--primary);
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
    cursor: pointer;
    transition: all 0.2s ease;
    white-space: nowrap;
}

.chip-btn:hover {
    background: var(--primary);
    color: white;
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(99, 102, 241, 0.3);
}

.chip-btn:active {
    transform: translateY(0);
}

.chip-btn i {
    font-size: 0.7rem;
}

/* Dark theme adjustment */
[data-theme="dark"] .chip-btn {
    background: rgba(96, 165, 250, 0.15);
    border-color: var(--primary-light);
    color: var(--primary-light);
}

[data-theme="dark"] .chip-btn:hover {
    background: var(--primary-light);
    color: var(--bg-dark);
}

/* ========================================
   REPORT WRITING FEATURE STYLES
   ======================================== */

/* Template Buttons */
.template-btn {
    padding: 6px 12px;
    font-size: 0.75rem;
    border-radius: 6px;
    border: 1px solid var(--border);
    background: var(--bg-hover);
    color: var(--text-secondary);
    cursor: pointer;
    transition: all 0.2s ease;
}

.template-btn:hover {
    background: var(--primary);
    color: white;
    border-color: var(--primary);
    transform: translateY(-1px);
}

/* Tag Buttons */
.tag-btn {
    padding: 5px 10px;
    font-size: 0.7rem;
    border-radius: 16px;
    border: 1px solid;
    cursor: pointer;
    transition: all 0.2s ease;
    font-weight: 500;
}

.tag-btn:hover {
    transform: scale(1.05);
}

.tag-success {
    background: rgba(16, 185, 129, 0.1);
    border-color: #10b981;
    color: #10b981;
}

.tag-success:hover {
    background: #10b981;
    color: white;
}

.tag-warning {
    background: rgba(245, 158, 11, 0.1);
    border-color: #f59e0b;
    color: #f59e0b;
}

.tag-warning:hover {
    background: #f59e0b;
    color: white;
}

.tag-danger {
    background: rgba(239, 68, 68, 0.1);
    border-color: #ef4444;
    color: #ef4444;
}

.tag-danger:hover {
    background: #ef4444;
    color: white;
}

.tag-info {
    background: rgba(59, 130, 246, 0.1);
    border-color: #3b82f6;
    color: #3b82f6;
}

.tag-info:hover {
    background: #3b82f6;
    color: white;
}

/* Voice & AI Helper Buttons */
.voice-btn,
.ai-helper-btn {
    width: 32px;
    height: 32px;
    border-radius: 50%;
    border: none;
    display: flex;
    align-items: center;
    justify-content: center;
    cursor: pointer;
    transition: all 0.2s ease;
}

.voice-btn {
    background: rgba(239, 68, 68, 0.1);
    color: var(--text-secondary);
}

.voice-btn:hover,
.voice-btn.recording {
    background: #ef4444;
    color: white;
    box-shadow: 0 0 12px rgba(239, 68, 68, 0.4);
}

.voice-btn.recording {
    animation: pulse-recording 1s infinite;
}

@keyframes pulse-recording {

    0%,
    100% {
        box-shadow: 0 0 0 0 rgba(239, 68, 68, 0.4);
    }

    50% {
        box-shadow: 0 0 0 8px rgba(239, 68, 68, 0);
    }
}

.ai-helper-btn {
    background: rgba(99, 102, 241, 0.1);
    color: var(--primary);
}

.ai-helper-btn:hover {
    background: var(--primary);
    color: white;
    box-shadow: 0 0 12px rgba(99, 102, 241, 0.4);
}

/* Dark theme adjustments */
[data-theme="dark"] .template-btn {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--border);
}

[data-theme="dark"] .tag-btn {
    background: rgba(255, 255, 255, 0.05);
}