#navbar-container {
    background: #ffffff;
    border-bottom: 1px solid #e5e7eb;
    position: sticky;
    top: 0;
    z-index: 1000;
    padding-top: env(safe-area-inset-top, 0px);
    transition: background 0.2s;
}

.nav-content {
    max-width: 1280px;
    margin: 0 auto;
    padding: 0 16px;
    height: 60px;
    display: flex;
    align-items: center;
    justify-content: space-between;
}

.nav-left {
    display: flex;
    align-items: center;
    gap: 24px;
}

.nav-brand {
    font-size: 19px;
    font-weight: 800;
    color: #111827;
    text-decoration: none;
    display: flex;
    align-items: center;
    gap: 10px;
    letter-spacing: -0.5px;
}

.nav-brand span {
    color: #17add1;
}

.nav-links {
    display: flex;
    align-items: center;
    gap: 4px;
}

.nav-link {
    font-size: 14px;
    font-weight: 500;
    color: #64748b;
    text-decoration: none;
    padding: 8px 16px;
    border-radius: 8px;
    transition: all 0.25s ease;
}

.nav-link:hover {
    color: #17add1;
    background: rgba(23, 173, 209, 0.08);
}

.nav-link.active {
    color: #17add1;
    background: rgba(23, 173, 209, 0.12);
    font-weight: 700;
}

.nav-right {
    display: flex;
    align-items: center;
    gap: 20px;
}

.user-badge {
    display: flex;
    align-items: center;
    gap: 12px;
    padding-right: 20px;
    border-right: 1px solid #f1f5f9;
}

.user-link {
    display: flex;
    flex-direction: column;
    text-align: right;
    text-decoration: none;
    transition: opacity 0.2s;
}

.user-link:hover {
    opacity: 0.8;
}

.user-name {
    font-size: 13px;
    font-weight: 600;
    color: #1e293b;
}

.user-sub {
    font-size: 11px;
    color: #94a3b8;
    text-transform: lowercase;
}

.role-tag {
    font-size: 10px;
    font-weight: 700;
    text-transform: uppercase;
    padding: 2px 8px;
    border-radius: 20px;
    color: #ffffff;
}

/* Hamburger Button (44px touch area) */
.nav-toggle {
    display: none;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    width: 44px;
    height: 44px;
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 10px;
    z-index: 1001;
    border-radius: 8px;
    touch-action: manipulation;
    -webkit-tap-highlight-color: transparent;
}

.nav-toggle:active {
    background: rgba(0, 0, 0, 0.05);
}

.nav-toggle span {
    width: 22px;
    height: 2.5px;
    background: #475569;
    border-radius: 3px;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
}

.nav-toggle.active span:nth-child(1) { transform: translateY(7.5px) rotate(45deg); }
.nav-toggle.active span:nth-child(2) { opacity: 0; transform: scaleX(0); }
.nav-toggle.active span:nth-child(3) { transform: translateY(-7.5px) rotate(-45deg); }

/* Mobile Menu Container */
@media (max-width: 1024px) {
    .nav-toggle { display: flex; }
    
    .nav-links-container {
        position: fixed;
        left: -300px;
        top: 0;
        width: 300px;
        max-width: 85vw;
        height: 100vh;
        height: 100dvh;
        background: #ffffff;
        box-shadow: 20px 0 50px rgba(0,0,0,0.15);
        z-index: 1000;
        transition: left 0.3s cubic-bezier(0.16, 1, 0.3, 1);
        padding: calc(70px + env(safe-area-inset-top, 0px)) 0 calc(20px + env(safe-area-inset-bottom, 0px));
        display: flex;
        flex-direction: column;
        overflow-y: auto;
        -webkit-overflow-scrolling: touch;
    }

    .nav-links-container.open { left: 0; }

    .nav-links {
        display: flex;
        flex-direction: column;
        align-items: stretch;
        gap: 4px;
        padding: 0 16px;
    }

    .nav-link {
        padding: 12px 20px;
        font-size: 16px;
        border-radius: 12px;
    }

    /* User Badge & Logout in Mobile Menu */
    .nav-right {
        display: none !important;
    }

    /* Mobile Mobile Footer (inside menu) */
    .nav-menu-footer {
        margin-top: auto;
        padding: 24px 20px;
        border-top: 1px solid #f1f5f9;
        background: #f8fafc;
        display: flex;
        flex-direction: column;
        gap: 16px;
    }

    .user-badge-mobile {
        display: flex;
        flex-direction: column;
        gap: 6px;
    }

    .user-badge-mobile .user-name {
        font-size: 15px;
        font-weight: 700;
        color: #1e293b;
    }

    .user-badge-mobile .role-tag {
        align-self: flex-start;
    }

    .btn-logout-mobile {
        width: 100%;
        padding: 12px;
        background: #fee2e2;
        color: #ef4444;
        border: none;
        border-radius: 12px;
        font-weight: 700;
        font-size: 14px;
        cursor: pointer;
        transition: background 0.2s;
    }

    .btn-logout-mobile:active {
        background: #fecaca;
    }

    /* Overlay */
    .nav-overlay {
        display: none;
        position: fixed;
        inset: 0;
        background: rgba(0,0,0,0.4);
        backdrop-filter: blur(4px);
        z-index: 999;
    }
    .nav-overlay.show { display: block; }
}

@media (min-width: 1025px) {
    .nav-overlay { display: none !important; }
    .nav-links {
        display: flex;
        align-items: center;
        gap: 4px;
    }
    .nav-menu-footer { display: none; }
}

.btn-logout {
    font-size: 14px;
    color: #6b7280;
    background: none;
    border: none;
    cursor: pointer;
    font-weight: 600;
    padding: 8px 0;
    width: 100%;
    text-align: left;
}

.btn-logout:hover {
    color: #ef4444;
}
