/* Unified Header Navigation Styles */
.header-nav {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    background-color: rgba(30, 41, 59, 0.95);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border-bottom: 1px solid rgba(255, 255, 255, 0.1);
    padding: 0.75rem 2rem;
    z-index: 50;
    font-family: 'Inter', system-ui, -apple-system, sans-serif;
    box-shadow: 0 4px 6px -1px rgba(0, 0, 0, 0.1), 0 2px 4px -1px rgba(0, 0, 0, 0.06);
}

.nav-content {
    display: flex;
    justify-content: space-between;
    align-items: center;
    max-width: 1600px;
    margin: 0 auto;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 0.75rem;
}

.nav-logo {
    width: 2rem;
    height: auto;
    object-fit: contain;
    border-radius: 0.375rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.3);
}

.nav-brand-area {
    display: flex;
    flex-direction: column;
    gap: 0.1rem;
}

.nav-links {
    display: flex;
    gap: 1.5rem;
    align-items: center;
}

.nav-link {
    color: #cbd5e1;
    text-decoration: none;
    font-weight: 500;
    font-size: 0.95rem;
    transition: color 0.2s ease-in-out;
}

.nav-link:hover {
    color: #60a5fa;
}

.user-greeting {
    color: #e2e8f0;
    font-size: 0.9rem;
    display: flex;
    align-items: center;
    gap: 0.5rem;
}

.user-name {
    color: #60a5fa;
    font-weight: 600;
}

.admin-badge {
    background: linear-gradient(135deg, #8b5cf6, #3b82f6);
    padding: 0.2rem 0.6rem;
    border-radius: 999px;
    font-size: 0.7rem;
    font-weight: 600;
    color: white;
}

/* Breadcrumb — visible on mobile, hidden on desktop */
.nav-breadcrumb {
    display: none;
    font-size: 0.78rem;
    color: #94a3b8;
    align-items: center;
    gap: 0.3rem;
}

.breadcrumb-link {
    color: #60a5fa;
    text-decoration: none;
}

.breadcrumb-link:hover {
    text-decoration: underline;
}

.breadcrumb-sep {
    color: #64748b;
    font-size: 0.85rem;
}

/* Hamburger button — hidden on desktop */
.hamburger-btn {
    display: none;
    background: transparent;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    padding: 0.4rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s, color 0.2s;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
}

.hamburger-btn:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Profile dropdown */
.profile-dropdown {
    position: relative;
}

.profile-btn {
    display: inline-flex;
    align-items: center;
    gap: 0.3rem;
    background: rgba(255, 255, 255, 0.08);
    border: 1px solid rgba(255, 255, 255, 0.15);
    color: #cbd5e1;
    cursor: pointer;
    padding: 0.4rem 0.65rem;
    border-radius: 0.5rem;
    transition: background-color 0.2s, color 0.2s;
    font-size: 0.875rem;
}

.profile-btn:hover {
    background-color: rgba(255, 255, 255, 0.15);
    color: #fff;
}

.dropdown-caret {
    transition: transform 0.2s;
    opacity: 0.7;
}

.profile-dropdown--open .dropdown-caret {
    transform: rotate(180deg);
}

.profile-menu {
    display: none;
    position: absolute;
    right: 0;
    top: calc(100% + 0.5rem);
    background: #1e293b;
    border: 1px solid rgba(255, 255, 255, 0.12);
    border-radius: 0.5rem;
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.4);
    min-width: 160px;
    z-index: 100;
    overflow: hidden;
}

.profile-dropdown--open .profile-menu {
    display: block;
}

.profile-menu-item {
    display: flex;
    align-items: center;
    gap: 0.6rem;
    padding: 0.65rem 1rem;
    font-size: 0.875rem;
    color: #cbd5e1;
    text-decoration: none;
    transition: background-color 0.15s;
    white-space: nowrap;
}

.profile-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.08);
}

.profile-menu-item--danger {
    color: #f87171;
}

.profile-menu-item--danger:hover {
    background-color: rgba(248, 113, 113, 0.1);
    color: #fca5a5;
}

/* Theme Toggle Button styles */
.header-nav .theme-toggle {
    background: transparent;
    border: none;
    color: #cbd5e1;
    cursor: pointer;
    padding: 0.5rem;
    border-radius: 0.375rem;
    transition: background-color 0.2s, color 0.2s;
    display: flex;
    align-items: center;
    justify-content: center;
}

.header-nav .theme-toggle:hover {
    background-color: rgba(255, 255, 255, 0.1);
    color: #fff;
}

/* Light Mode Overrides */
body.light-mode .header-nav {
    background-color: rgba(255, 255, 255, 0.97);
    border-bottom: 1px solid rgba(0, 0, 0, 0.08);
}

body.light-mode .nav-link {
    color: #475569;
}

body.light-mode .nav-link:hover {
    color: #2563eb;
}

body.light-mode .user-greeting {
    color: #334155;
}

body.light-mode .user-name {
    color: #2563eb;
}

body.light-mode .hamburger-btn {
    color: #475569;
}

body.light-mode .hamburger-btn:hover {
    background-color: rgba(0, 0, 0, 0.06);
    color: #0f172a;
}

body.light-mode .profile-btn {
    background: rgba(0, 0, 0, 0.06);
    border-color: rgba(0, 0, 0, 0.12);
    color: #475569;
}

body.light-mode .profile-btn:hover {
    background-color: rgba(0, 0, 0, 0.1);
    color: #0f172a;
}

body.light-mode .profile-menu {
    background: #ffffff;
    border-color: rgba(0, 0, 0, 0.1);
    box-shadow: 0 8px 24px rgba(0, 0, 0, 0.12);
}

body.light-mode .profile-menu-item {
    color: #334155;
}

body.light-mode .profile-menu-item:hover {
    background-color: rgba(0, 0, 0, 0.04);
}

body.light-mode .profile-menu-item--danger {
    color: #ef4444;
}

body.light-mode .profile-menu-item--danger:hover {
    background-color: rgba(239, 68, 68, 0.06);
    color: #dc2626;
}

body.light-mode .nav-breadcrumb {
    color: #64748b;
}

body.light-mode .header-nav .theme-toggle {
    color: #475569;
}

body.light-mode .header-nav .theme-toggle:hover {
    background-color: rgba(0, 0, 0, 0.05);
    color: #0f172a;
}

/* Responsive Styles */
@media (max-width: 768px) {
    .header-nav {
        padding: 0.75rem 1rem;
    }

    .hamburger-btn {
        display: inline-flex;
    }

    .nav-breadcrumb {
        display: flex;
    }

    .nav-content {
        flex-direction: row;
        flex-wrap: wrap;
        gap: 0;
        position: relative;
    }

    .nav-links {
        display: none;
        width: 100%;
        flex-direction: column;
        align-items: flex-start;
        gap: 0;
        padding: 0.5rem 0 0.25rem;
        border-top: 1px solid rgba(255, 255, 255, 0.08);
        margin-top: 0.5rem;
    }

    .nav-links.nav-links--open {
        display: flex;
    }

    .nav-link {
        padding: 0.7rem 0.25rem;
        width: 100%;
        font-size: 1rem;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    }

    .nav-link:last-child {
        border-bottom: none;
    }

    .profile-dropdown {
        width: 100%;
    }

    .profile-btn {
        width: 100%;
        justify-content: flex-start;
        padding: 0.7rem 0.25rem;
        background: transparent;
        border: none;
        border-bottom: 1px solid rgba(255, 255, 255, 0.05);
        border-radius: 0;
        font-size: 1rem;
        color: #f87171;
    }

    body.light-mode .profile-btn {
        background: transparent;
        border: none;
        border-bottom: 1px solid rgba(0, 0, 0, 0.05);
        color: #ef4444;
    }

    .profile-menu {
        position: static;
        border: none;
        box-shadow: none;
        background: transparent;
        padding: 0;
    }

    .profile-dropdown--open .profile-menu {
        display: block;
    }

    .profile-menu-item {
        padding: 0.65rem 1rem;
    }
}

body.light-mode .nav-links {
    border-top-color: rgba(0, 0, 0, 0.08);
}

body.light-mode .nav-link {
    border-bottom-color: rgba(0, 0, 0, 0.05);
}
