:root {
    --bg-color: #020617;
    --primary-color: #3b82f6;
    --text-color: #ffffff;
    --glass-bg: rgba(255, 255, 255, 0.05);
    --glass-border: rgba(255, 255, 255, 0.1);
    --glass-blur: 10px;
    --font-main: 'Inter', sans-serif;
    --font-display: 'Outfit', sans-serif;
}

body {
    font-family: var(--font-main);
    /* overflow-x: hidden; REMOVED to fix sticky elements */
    min-height: 100vh;
}

.main-content {
    padding-top: 2rem !important; /* Override style.css large padding */
    background-color: #eff3f9;
}


#canvas-container {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    z-index: -1;
    background: radial-gradient(circle at 50% 50%, #0f172a 0%, #020617 100%);
}

@media (max-width: 768px) {
    #canvas-container {
        background: url('/img/mobile_hero_bg.png') no-repeat center center;
        background-size: cover;
    }
}

/* Top Bar */
.top-bar {
    background: #f8fafc;
    border-bottom: 1px solid #e2e8f0;
    padding: 0.5rem 0;
    font-size: 0.875rem;
    color: #64748b;
    position: relative;
    z-index: 1040;
}

.top-bar-container {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.top-bar-right {
    display: flex;
    gap: 1.5rem;
}

.top-link {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    color: #64748b;
    text-decoration: none;
    transition: color 0.2s;
}

.top-link:hover {
    color: var(--primary-color);
}

/* Main Header */
.main-header {
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid rgba(0,0,0,0.05);
    position: sticky;
    top: 0;
    padding: 1rem 0;
    z-index: 1030;
    width: 100%;
}

.header-container {
    display: flex;
    align-items: center;
    justify-content: space-between;
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
    gap: 2rem;
}

.logo-section {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.site-logo {
    height: 40px;
    width: auto;
    display: block;
}

.main-nav {
    display: flex;
    gap: 2rem;
    align-items: center;
}

.main-nav a {
    color: #475569;
    text-decoration: none;
    font-weight: 500;
    transition: color 0.3s ease;
    font-size: 0.95rem;
}

.main-nav a:hover, .main-nav a.active {
    color: var(--primary-color);
}

/* Dropdown Navigation */
.dropdown-nav {
    position: relative;
}

.dropdown-toggle {
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 0.25rem;
}

.dropdown-toggle::after {
    content: '';
    width: 0;
    height: 0;
    border-left: 4px solid transparent;
    border-right: 4px solid transparent;
    border-top: 4px solid currentColor;
    opacity: 0.5;
}

.dropdown-menu {
    display: none;
    position: absolute;
    top: 100%;
    left: 0;
    background: white;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.1);
    min-width: 200px;
    padding: 0.5rem 0;
    z-index: 1001;
    margin-top: 0.5rem;
}

.dropdown-menu::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 0;
    width: 100%;
    height: 0.5rem;
    background: transparent;
}

.dropdown-nav:hover .dropdown-menu {
    display: block;
}

.dropdown-menu a {
    display: block;
    padding: 0.5rem 1rem;
    color: #334155;
    font-size: 0.9rem;
    white-space: nowrap;
}

.dropdown-menu a:hover {
    background: #f8fafc;
    color: var(--primary-color);
}

/* Header Search */
.header-search-wrapper {
    flex: 1;
    max-width: 600px;
    position: relative;
}

.header-search-bar {
    display: flex;
    align-items: center;
    background: #f1f5f9;
    border: 1px solid #e2e8f0;
    border-radius: 0.5rem;
    padding: 0.25rem 0.5rem;
    transition: all 0.2s;
    position: relative;
    z-index: 51; /* Ensure above suggestions */
}

.header-search-bar:focus-within {
    background: white;
    border-color: var(--primary-color);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.1);
}

.search-icon {
    margin: 0 0.75rem;
    opacity: 0.5;
}

#header-search-input {
    flex: 1;
    background: transparent;
    border: none;
    padding: 0.6rem 0;
    font-size: 0.95rem;
    color: #0f172a;
    outline: none;
    font-family: var(--font-main);
}

#header-search-input::placeholder {
    color: #94a3b8;
}

.header-search-btn {
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0.5rem 1.5rem;
    border-radius: 0.375rem;
    font-weight: 500;
    cursor: pointer;
    transition: background 0.2s;
    font-family: var(--font-main);
}


.search-suggestions {
    position: absolute;
    top: 100%;
    left: 0;
    width: 100%;
    background: rgba(255, 255, 255, 0.95);
    backdrop-filter: blur(10px);
    border: 1px solid #e2e8f0;
    border-top: none;
    border-radius: 0 0 0.5rem 0.5rem;
    margin-top: 0;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.1), 0 8px 10px -6px rgba(0, 0, 0, 0.1);
    z-index: 50;
    overflow: hidden;
    max-height: 400px;
    overflow-y: auto;
}

.search-suggestions.hidden {
    display: none;
}

.suggestion-item {
    padding: 0.75rem 1rem;
    cursor: pointer;
    border-bottom: 1px solid #f1f5f9;
    color: #334155;
    transition: background 0.1s;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

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

.suggestion-item:hover {
    background: #f8fafc;
    color: var(--primary-color);
}

.suggestion-code {
    font-size: 0.8rem;
    color: #94a3b8;
}

.page-wrapper {
    display: flex;
    flex-direction: column;
    flex-grow: 1;
}

/* Hero Section Adjustments */
.hero-section {
    min-height: 70vh; /* Reduced from 90vh */
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-align: center;
    padding: 0 1rem;
    position: relative;
    z-index: 1;
    margin-top: -80px; /* Pull up behind header if transparent, but here we want it below */
    padding-top: 120px; /* Increased padding to account for header */
    padding-bottom: 4rem;
}

.hero-content {
    background: rgba(255, 255, 255, 0.05);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.1);
    border-radius: 24px;
    padding: 1rem;
    max-width: 650px;
    width: 100%;
    display: flex;
    flex-direction: column;
    align-items: center;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.25);
    margin-top: 240px;
}

.hero-title {
    font-family: var(--font-display);
    font-size: 4rem;
    line-height: 1.1;
    font-weight: 700;
    margin-bottom: 1.5rem;
    letter-spacing: -0.03em;
    background: linear-gradient(to right, #fff, #94a3b8);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    text-shadow: 0 10px 30px rgba(0,0,0,0.5); /* Added shadow for contrast */
    position: relative;
    z-index: 2; /* Ensure text is above globe */
}

.hero-title .highlight {
    color: var(--primary-color);
    -webkit-text-fill-color: var(--primary-color);
}

.hero-subtitle {
    font-size: 1.25rem;
    color: rgba(255, 255, 255, 0.8); /* Increased opacity */
    margin-bottom: 3rem;
    max-width: 600px;
    text-shadow: 0 5px 15px rgba(0,0,0,0.5); /* Added shadow */
    position: relative;
    z-index: 2;
}

.stats-container {
    display: flex;
    gap: 4rem;
    margin-top: 0rem;
    justify-content: center;
    width: 100%;
}

.stat-item {
    display: flex;
    align-items: center;
    gap: 1rem;
    opacity: 0.8;
    transition: opacity 0.3s ease;
}

.stat-item:hover {
    opacity: 1;
}

.stat-icon {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 48px;
    height: 48px;
    background: rgba(255, 255, 255, 0.05);
    border-radius: 12px;
    border: 1px solid rgba(255, 255, 255, 0.1);
}

.stat-text {
    display: flex;
    flex-direction: column;
    text-align: left;
}

.stat-number {
    color: #fff;
    font-family: var(--font-display);
    font-weight: 700;
    font-size: 1.25rem;
}

.stat-label {
    font-size: 0.875rem;
    color: rgba(255, 255, 255, 0.5);
}

/* Hero Search Styles */
.hero-search-container {
    width: 100%;
    max-width: 600px;
    margin: 0 auto 3rem;
    position: relative;
    z-index: 10;
}

.hero-search-form {
    display: flex;
    gap: 0.5rem;
    background: rgba(255, 255, 255, 0.1);
    padding: 0.5rem;
    border-radius: 1rem;
    border: 1px solid rgba(255, 255, 255, 0.2);
    backdrop-filter: blur(10px);
}

.search-input-wrapper {
    flex: 1;
    display: flex;
    align-items: center;
    background: rgba(255, 255, 255, 0.95);
    border-radius: 0.75rem;
    padding: 0.5rem 1rem;
    transition: all 0.3s ease;
}

.search-input-wrapper:focus-within {
    background: #ffffff;
    box-shadow: 0 0 0 4px rgba(59, 130, 246, 0.3);
}

.hero-search-input {
    flex: 1;
    border: none;
    background: transparent;
    padding: 0.5rem;
    font-size: 1.1rem;
    color: #1e293b;
    outline: none;
    width: 100%;
}

.hero-search-btn {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    background: var(--primary-color);
    color: white;
    border: none;
    padding: 0 2rem;
    border-radius: 0.75rem;
    font-weight: 600;
    font-size: 1.1rem;
    cursor: pointer;
    transition: all 0.3s ease;
}

.hero-search-btn:hover {
    background: #2563eb;
    transform: translateY(-1px);
}



@media (max-width: 768px) {
    .main-header {
        padding: 1rem;
    }
    
    .header-container {
        flex-direction: row;
        flex-wrap: wrap;
        justify-content: space-between;
        align-items: center;
        gap: 1rem;
        padding: 0 1rem;
    }

    .logo-section {
        order: 2;
        flex-grow: 1;
        text-align: center;
    }

    .mobile-menu-btn, .drawer-toggle-btn {
        display: block !important;
        order: 1;
        background: transparent;
        border: 0px solid rgba(0,0,0,0.1);
        border-radius: 4px;
        padding: 4px;
        color: #1e293b;
        cursor: pointer;
        z-index: 2000;
        width: 32px;
        height: 32px;
        margin-left: 0;
    }

    .header-search-wrapper {
        width: 100%;
        max-width: 100%;
        flex: 0 0 100%; /* Force full width and line break */
        order: 4;
        margin-top: 0.5rem;
    }
    
    .main-nav, .main-nav.active {
        display: none !important;
    }

    .main-nav a {
        font-size: 1.5rem;
    }
    
    .hero-title {
        font-size: 2.5rem;
    }
    
    .stats-container {
        flex-direction: column;
        gap: 2rem;
        align-items: center;
    }
    
    .top-bar {
        display: none; 
    }
}

.mobile-menu-btn, .drawer-toggle-btn {
    display: none;
}

/* User Dropdown */
.user-dropdown {
    position: relative;
    display: inline-block;
}

.user-toggle {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    cursor: pointer;
}

.user-dropdown-content {
    display: none;
    position: absolute;
    right: 0;
    top: 100%;
    background-color: white;
    min-width: 180px;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
    border-radius: 0.5rem;
    z-index: 1000;
    padding: 0.5rem 0;
    margin-top: 0.5rem;
    border: 1px solid #e5e7eb;
}

.user-dropdown-content::before {
    content: '';
    position: absolute;
    top: -0.5rem;
    left: 0;
    width: 100%;
    height: 0.5rem;
    background: transparent;
}

/* Mobile Drawer Menu Styles */
.mobile-menu-drawer,
.mobile-menu-backdrop {
    display: none;
}

@media (max-width: 768px) {
    /* Backdrop */
    .mobile-menu-backdrop {
        display: block;
        position: fixed;
        top: 0;
        left: 0;
        width: 100%;
        height: 100vh;
        background: rgba(0, 0, 0, 0.5);
        z-index: 1999;
        opacity: 0;
        visibility: hidden;
        transition: all 0.3s ease;
        backdrop-filter: blur(2px);
    }

    .mobile-menu-backdrop.active {
        opacity: 1;
        visibility: visible;
    }

    /* Drawer */
    .mobile-menu-drawer {
        display: flex;
        flex-direction: column;
        position: fixed;
        top: 0;
        left: -320px; /* Hidden by default */
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        height: 100dvh; /* Use dynamic viewport height for mobile browsers */
        background: #fff;
        z-index: 2000;
        transition: transform 0.3s ease, left 0.3s ease;
        box-shadow: 4px 0 24px rgba(0,0,0,0.15);
        overflow-y: auto;
        padding-bottom: env(safe-area-inset-bottom, 20px); /* Add safe area padding */
    }

    .mobile-menu-drawer.active {
        left: 0;
    }

    /* Drawer Header */
    .drawer-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 1.5rem;
        border-bottom: 1px solid #f1f5f9;
        background: #fff;
    }

    .drawer-logo {
        height: 32px;
        width: auto;
    }

    .drawer-close-btn {
        background: transparent;
        border: none;
        color: #64748b;
        cursor: pointer;
        padding: 4px;
        display: flex;
        align-items: center;
        justify-content: center;
        border-radius: 50%;
        transition: background 0.2s;
    }

    .drawer-close-btn:hover {
        background: #f1f5f9;
        color: #ef4444;
    }

    /* Drawer Content */
    .drawer-content {
        display: flex;
        flex-direction: column;
        flex: 1;
        padding: 1rem;
        gap: 0.5rem;
    }

    .drawer-nav {
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    .drawer-link {
        display: flex;
        align-items: center;
        gap: 1rem;
        padding: 0.75rem 1rem;
        color: #334155;
        text-decoration: none;
        font-weight: 500;
        border-radius: 0.75rem;
        transition: all 0.2s;
    }

    .drawer-link:hover {
        background: #f8fafc;
        color: #0f172a;
        transform: translateX(4px);
    }

    .drawer-link.active {
        background: #dcfce7; /* Green highlight like screenshot */
        color: #166534;
        font-weight: 600;
        box-shadow: 0 1px 2px rgba(0,0,0,0.05);
    }
    
    .drawer-link .material-icons {
        font-size: 1.25rem;
        color: #64748b;
    }
    
    .drawer-link.active .material-icons {
        color: #166534;
    }

    /* Tools Accordion */
    .drawer-accordion {
        display: flex;
        flex-direction: column;
        border-radius: 0.75rem;
        overflow: hidden;
    }

    .drawer-accordion-header {
        display: flex;
        align-items: center;
        justify-content: space-between;
        padding: 0.75rem 1rem;
        cursor: pointer;
        color: #334155;
        font-weight: 500;
        transition: background 0.2s;
        border-radius: 0.75rem;
    }
    
    .drawer-accordion-header:hover {
        background: #f8fafc;
    }

    .drawer-link-content {
        display: flex;
        align-items: center;
        gap: 1rem;
    }

    .drawer-link-content .material-icons {
        font-size: 1.25rem;
        color: #64748b;
    }

    .drawer-accordion-content {
        display: none;
        flex-direction: column;
        padding-left: 1rem; /* Indent sublinks */
        background: #f8fafc;
        margin-top: 0.25rem;
        border-radius: 0.5rem;
    }

    .drawer-accordion-content.active {
        display: flex;
        padding-bottom: 0.5rem;
    }

    .drawer-sublink {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        padding: 0.6rem 1rem;
        color: #475569;
        text-decoration: none;
        font-size: 0.9rem;
        transition: color 0.2s;
    }

    .drawer-sublink:hover {
        color: var(--primary-color);
        text-decoration: none;
    }
    
    .drawer-sublink .material-icons {
        font-size: 1.1rem;
        opacity: 0.7;
    }

    /* Footer Section */
    .drawer-footer {
        margin-top: auto;
        padding-top: 1rem;
        border-top: 1px solid #f1f5f9;
        display: flex;
        flex-direction: column;
        gap: 0.25rem;
    }

    /* User Section */
    .drawer-user {
        margin-top: 1rem;
        padding: 1rem;
        padding-bottom: 2rem; /* Extra padding for bottom visibility */
        background: #f8fafc;
        border-radius: 1rem;
        border: 1px solid #e2e8f0;
    }

    .drawer-user-profile {
        display: flex;
        align-items: center;
        gap: 0.75rem;
        text-decoration: none;
        color: inherit;
        margin-bottom: 0.75rem;
        padding-bottom: 0.75rem;
        border-bottom: 1px solid #e2e8f0;
    }

    .drawer-avatar {
        width: 40px;
        height: 40px;
        background: #e2e8f0;
        border-radius: 50%;
        display: flex;
        align-items: center;
        justify-content: center;
        color: #64748b;
    }

    .drawer-user-info {
        flex: 1;
        display: flex;
        flex-direction: column;
    }

    .user-name {
        font-weight: 600;
        color: #0f172a;
        font-size: 0.9rem;
    }

    .user-role {
        font-size: 0.8rem;
        color: #64748b;
    }

    .drawer-logout {
        display: flex;
        align-items: center;
        gap: 0.5rem;
        color: #ef4444;
        font-weight: 500;
        text-decoration: none;
        font-size: 0.9rem;
        padding: 0.5rem;
        border-radius: 0.5rem;
        justify-content: center;
        background: #fff;
        border: 1px solid #fecaca;
        transition: all 0.2s;
    }

    .drawer-logout:hover {
        background: #fef2f2;
    }
}
/* Restore User Dropdown Hover */
.user-dropdown:hover .user-dropdown-content {
    display: block;
    animation: fadeIn 0.2s ease-out;
}

.user-dropdown-content a {
    color: #374151;
    padding: 0.5rem 1rem;
    text-decoration: none;
    display: block;
    font-size: 0.875rem;
    transition: background-color 0.2s;
}

.user-dropdown-content a:hover {
    background-color: #f3f4f6;
    color: #111827;
}

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

/* Mobile User Actions */
    .hero-search-form {
        flex-direction: column;
        padding: 1rem;
        background: transparent;
        border: none;
    }
    
    .hero-search-btn {
        width: 100%;
        justify-content: center;
        padding: 1rem;
    }

    .mobile-user-actions {
    display: none;
}

@media (max-width: 768px) {
    .mobile-user-actions {
        display: flex;
        align-items: center;
        gap: 1rem;
        order: 3;
        margin-left: 0;
        margin-right: 0;
    }

    .mobile-user-toggle, .mobile-login-icon {
        color: #1e293b;
        display: flex;
        align-items: center;
        justify-content: center;
        padding: 4px;
    }

    .mobile-user-dropdown {
        display: none;
        position: absolute;
        top: 100%;
        right: 0;
        background: white;
        border: 1px solid #e5e7eb;
        border-radius: 0.5rem;
        box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1);
        flex-direction: column;
        min-width: 150px;
        z-index: 2001;
        margin-top: 0.5rem;
    }

    .mobile-user-actions:hover .mobile-user-dropdown {
        display: flex;
    }

    .mobile-user-dropdown a {
        padding: 0.75rem 1rem;
        text-decoration: none;
        color: #374151;
        border-bottom: 1px solid #f3f4f6;
    }

    .mobile-user-dropdown a:last-child {
        border-bottom: none;
    }

    /* Mobile Search Scroll Behavior */
    .header-search-wrapper {
        transition: all 0.3s ease-in-out;
        opacity: 1;
        overflow: visible; /* Allow suggestions to be seen */
        margin-top: 0.5rem; /* Default margin */
        height: auto;
        transform-origin: top;
    }

    .header-search-wrapper.search-hidden {
        opacity: 0;
        margin-top: -60px !important; /* Pull it up to hide space */
        pointer-events: none;
        visibility: hidden; /* Ensure it's not clickable */
    }
}

/* Footer Styles */
.site-footer {
    background: #0f172a;
    color: #94a3b8;
    padding: 4rem 0 2rem;
    margin-top: auto;
    border-top: 1px solid #1e293b;
    position: relative;
    z-index: 100;
}

.footer-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 0 2rem;
}

.footer-grid {
    display: grid;
    grid-template-columns: 1.5fr 1fr 1fr 1fr;
    gap: 3rem;
    margin-bottom: 3rem;
}

.footer-logo {
    height: 32px;
    width: auto;
    margin-bottom: 1rem;
    opacity: 0.9;
}

.footer-desc {
    font-size: 0.9rem;
    line-height: 1.6;
    max-width: 300px;
}

.footer-heading {
    color: #fff;
    font-size: 1rem;
    font-weight: 600;
    margin-bottom: 1.5rem;
    font-family: var(--font-display);
}

.footer-links {
    list-style: none;
    padding: 0;
    margin: 0;
}

.footer-links li {
    margin-bottom: 0.75rem;
}

.footer-links a {
    color: #94a3b8;
    text-decoration: none;
    transition: color 0.2s;
    font-size: 0.95rem;
}

.footer-links a:hover {
    color: var(--primary-color);
}

.footer-bottom {
    border-top: 1px solid #1e293b;
    padding-top: 2rem;
    text-align: center;
    font-size: 0.9rem;
}

.footer-bottom a {
    color: #cbd5e1;
    text-decoration: none;
}

.footer-bottom a:hover {
    color: var(--primary-color);
}

@media (max-width: 768px) {
    .footer-grid {
        grid-template-columns: 1fr;
        gap: 2rem;
        text-align: center;
    }

    .footer-desc {
        margin: 0 auto;
    }
    
    .footer-logo {
        margin: 0 auto 1rem;
    }
}

.text-light-muted {
    color: rgba(255, 255, 255, 0.7) !important;
}

.footer-links li {
    margin-bottom: 0.75rem;
    display: block;
}

.text-white {
    color: #ffffff !important;
}

/* Home Page Sections */
.top-companies-section,
.benefits-section,
.calculators-section {
    background-color: #eff3f9; /* Match main content background */
    position: relative;
    z-index: 2; /* Ensure above fixed canvas */
}

/* =========================================
   Dark Mode Overrides
   ========================================= */

[data-bs-theme="dark"] body {
    background-color: #0f172a;
    color: #e2e8f0;
}

[data-bs-theme="dark"] .main-content,
[data-bs-theme="dark"] .top-companies-section,
[data-bs-theme="dark"] .benefits-section,
[data-bs-theme="dark"] .calculators-section {
    background-color: #0f172a;
}

[data-bs-theme="dark"] .main-header {
    background: rgba(15, 23, 42, 0.95);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
}

[data-bs-theme="dark"] .main-nav a,
[data-bs-theme="dark"] .top-link,
[data-bs-theme="dark"] .drawer-toggle-btn,
[data-bs-theme="dark"] .mobile-menu-btn,
[data-bs-theme="dark"] .mobile-user-toggle,
[data-bs-theme="dark"] .mobile-login-icon {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .main-nav a:hover,
[data-bs-theme="dark"] .main-nav a.active {
    color: #60a5fa; /* Primary lighter */
}

/* Header Search - Dark Mode */
[data-bs-theme="dark"] .header-search-bar {
    background-color: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .header-search-bar:focus-within {
    background-color: #1e293b;
    border-color: #60a5fa;
    box-shadow: 0 0 0 3px rgba(96, 165, 250, 0.15);
}

[data-bs-theme="dark"] #header-search-input {
    color: #f8fafc;
}

[data-bs-theme="dark"] #header-search-input::placeholder {
    color: #94a3b8;
}

[data-bs-theme="dark"] .search-icon {
    stroke: #94a3b8;
}

[data-bs-theme="dark"] .search-suggestions {
    background: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 25px -5px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .suggestion-item {
    color: #e2e8f0;
    border-bottom-color: #334155;
}

[data-bs-theme="dark"] .suggestion-item:hover {
    background-color: #334155;
    color: #60a5fa;
}

[data-bs-theme="dark"] .suggestion-code {
    color: #94a3b8;
}

/* Mobile Drawer - Dark Mode */
[data-bs-theme="dark"] .mobile-menu-drawer {
    background-color: #0f172a;
    box-shadow: 4px 0 24px rgba(0,0,0,0.5);
}

[data-bs-theme="dark"] .drawer-header {
    background-color: #0f172a;
    border-bottom-color: #1e293b;
}

[data-bs-theme="dark"] .drawer-close-btn {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .drawer-close-btn:hover {
    background-color: #1e293b;
    color: #fca5a5;
}

[data-bs-theme="dark"] .drawer-link,
[data-bs-theme="dark"] .drawer-accordion-header,
[data-bs-theme="dark"] .drawer-sublink {
    color: #cbd5e1;
}

[data-bs-theme="dark"] .drawer-link:hover,
[data-bs-theme="dark"] .drawer-accordion-header:hover {
    background-color: #1e293b;
    color: #f8fafc;
}

[data-bs-theme="dark"] .drawer-sublink:hover {
    color: #60a5fa;
}

[data-bs-theme="dark"] .drawer-link.active {
    background-color: rgba(96, 165, 250, 0.15);
    color: #60a5fa;
    box-shadow: none;
    border: 1px solid rgba(96, 165, 250, 0.2);
}

[data-bs-theme="dark"] .drawer-link.active .material-icons {
    color: #60a5fa;
}

[data-bs-theme="dark"] .drawer-accordion-content {
    background-color: #1e293b;
}

/* User Section & Dropdowns - Dark Mode */
[data-bs-theme="dark"] .drawer-user {
    background-color: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .drawer-user-profile {
    color: #e2e8f0;
    border-bottom-color: #334155;
}

[data-bs-theme="dark"] .drawer-avatar {
    background-color: #334155;
    color: #cbd5e1;
}

[data-bs-theme="dark"] .user-name {
    color: #f8fafc;
}

[data-bs-theme="dark"] .user-role {
    color: #94a3b8;
}

[data-bs-theme="dark"] .drawer-logout {
    background-color: #1e293b;
    border-color: #7f1d1d;
    color: #f87171; /* lighter red */
}

[data-bs-theme="dark"] .drawer-logout:hover {
    background-color: #450a0a;
}

[data-bs-theme="dark"] .top-bar {
    background-color: #1e293b;
    border-bottom-color: #334155;
    color: #94a3b8;
}

[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="dark"] .user-dropdown-content {
    background-color: #1e293b;
    border-color: #334155;
    box-shadow: 0 10px 15px -3px rgba(0, 0, 0, 0.5);
}

[data-bs-theme="dark"] .dropdown-menu a,
[data-bs-theme="dark"] .user-dropdown-content a {
    color: #e2e8f0;
}

[data-bs-theme="dark"] .dropdown-menu a:hover,
[data-bs-theme="dark"] .user-dropdown-content a:hover {
    background-color: #334155;
    color: #60a5fa;
}

[data-bs-theme="dark"] .mobile-user-dropdown {
    background-color: #1e293b;
    border-color: #334155;
}

[data-bs-theme="dark"] .mobile-user-dropdown a {
    color: #e2e8f0;
    border-bottom-color: #334155;
}

