/* TwoPixels Dashboard - Header & Mobile Menu v3 */
/* Menu is now a SEPARATE element at end of body for proper z-index */

/* ========== NAVBAR ========== */
.navbar {
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    height: 56px !important;
    background: #0f172a !important;
    padding: 0 15px !important;
    display: flex !important;
    justify-content: space-between !important;
    align-items: center !important;
    z-index: 9000 !important;
    border-bottom: 1px solid #334155 !important;
}

body {
    padding-top: 56px !important;
}

.navbar-brand {
    font-size: 1.1em;
    font-weight: 700;
    color: white !important;
    text-decoration: none !important;
}
.navbar-brand span { color: #3b82f6 !important; }

/* ========== HAMBURGER ========== */
.hamburger {
    display: flex;
    flex-direction: column;
    gap: 5px;
    cursor: pointer;
    padding: 15px;
    margin: -15px;
    position: relative;
    z-index: 9999 !important;
}
.hamburger span {
    width: 24px;
    height: 2px;
    background: #e2e8f0;
    transition: all 0.3s;
    display: block;
}
.hamburger.active span:nth-child(1) { transform: rotate(45deg) translate(5px, 5px); }
.hamburger.active span:nth-child(2) { opacity: 0; }
.hamburger.active span:nth-child(3) { transform: rotate(-45deg) translate(5px, -5px); }

/* ========== DESKTOP NAV (hidden on mobile) ========== */
.desktop-nav {
    display: none !important;
}

/* ========== MOBILE OVERLAY ========== */
.mobile-menu-overlay {
    display: none;
    position: fixed !important;
    top: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: rgba(0, 0, 0, 0.8) !important;
    z-index: 99999 !important;
}
.mobile-menu-overlay.active {
    display: block !important;
}

/* ========== MOBILE MENU ========== */
.mobile-menu {
    display: none;
    position: fixed !important;
    top: 56px !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    background: #0f172a !important;
    flex-direction: column !important;
    padding: 20px !important;
    gap: 8px !important;
    z-index: 100000 !important;
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
}
.mobile-menu.active {
    display: flex !important;
}

/* ========== NAV LINKS ========== */
.nav-link {
    color: #94a3b8 !important;
    text-decoration: none !important;
    padding: 16px 20px !important;
    border-radius: 10px !important;
    font-size: 1.1em !important;
    display: block !important;
    transition: all 0.2s;
    background: rgba(51, 65, 85, 0.3) !important;
}
.nav-link:hover, .nav-link:active {
    background: #334155 !important;
    color: white !important;
}
.nav-link.active {
    background: #3b82f6 !important;
    color: white !important;
}

.logout-btn {
    background: #ef4444 !important;
    color: white !important;
    border: none !important;
    padding: 16px 20px !important;
    border-radius: 10px !important;
    cursor: pointer;
    font-size: 1.1em !important;
    width: 100% !important;
    margin-top: 15px !important;
}
.logout-btn:hover { background: #dc2626 !important; }

/* ========== DESKTOP (900px+) ========== */
@media (min-width: 900px) {
    body { padding-top: 0 !important; }
    
    .navbar {
        position: sticky !important;
        z-index: 100 !important;
        padding: 12px 30px !important;
    }
    
    .hamburger { display: none !important; }
    
    .desktop-nav {
        display: flex !important;
        align-items: center !important;
        gap: 4px !important;
    }
    
    .desktop-nav .nav-link {
        padding: 8px 14px !important;
        font-size: 0.9em !important;
        background: transparent !important;
    }
    
    .desktop-nav .logout-btn {
        width: auto !important;
        margin: 0 0 0 10px !important;
        padding: 8px 14px !important;
        font-size: 0.9em !important;
    }
    
    .mobile-menu-overlay,
    .mobile-menu {
        display: none !important;
    }
}
