/* Hamburger - visible on tablet & mobile */
.hamburger-btn {
    display: none;
    position: fixed;
    top: 16px;
    left: 20px;
    z-index: 99999;
    background: #1e3a5f;
    border: 2px solid rgba(255,255,255,0.3);
    border-radius: 8px;
    padding: 14px 16px;
    min-width: 48px;
    min-height: 48px;
    cursor: pointer;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 5px;
    transition: background 0.2s;
    box-shadow: 0 2px 12px rgba(0,0,0,0.3);
    -webkit-tap-highlight-color: transparent;
    touch-action: manipulation;
}
.hamburger-btn:hover,
.hamburger-btn:active {
    background: #0f2744;
}
.hamburger-btn span {
    display: block;
    width: 24px;
    height: 3px;
    background: #fff;
    border-radius: 2px;
    transition: transform 0.3s, opacity 0.3s;
}
.hamburger-btn[aria-expanded="true"] span:nth-child(1) {
    transform: translateY(8px) rotate(45deg);
}
.hamburger-btn[aria-expanded="true"] span:nth-child(2) {
    opacity: 0;
}
.hamburger-btn[aria-expanded="true"] span:nth-child(3) {
    transform: translateY(-8px) rotate(-45deg);
}

/* Drawer - slides from left */
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    width: min(320px, 85vw);
    max-width: 320px;
    height: 100vh;
    background: #fff;
    box-shadow: 4px 0 24px rgba(0, 0, 0, 0.15);
    z-index: 99998;
    transform: translateX(-100%);
    transition: transform 0.3s cubic-bezier(0.4, 0, 0.2, 1);
    overflow-y: auto;
}
.mobile-drawer.open {
    transform: translateX(0);
}

.drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 20px;
    border-bottom: 1px solid #e5e7eb;
    background: #f9fafb;
}
.drawer-title {
    font-size: 1.25rem;
    font-weight: 700;
    color: #111;
}
.drawer-close {
    background: none;
    border: none;
    font-size: 1.75rem;
    line-height: 1;
    color: #6b7280;
    cursor: pointer;
    padding: 4px 8px;
}
.drawer-close:hover {
    color: #111;
}

.drawer-nav {
    padding: 16px 0;
}
.drawer-link {
    display: block;
    padding: 14px 24px;
    color: #111;
    text-decoration: none;
    font-weight: 500;
    transition: background 0.2s;
    border-bottom: 1px solid #f3f4f6;
}
.drawer-link:hover {
    background: #f3f4f6;
}
.drawer-link-logout {
    color: #dc2626;
}
.drawer-link-logout:hover {
    background: #fef2f2;
}
.drawer-section {
    border-bottom: 1px solid #e5e7eb;
}
.drawer-section-title {
    padding: 12px 24px 8px;
    font-size: 0.8rem;
    font-weight: 600;
    color: #6b7280;
    text-transform: uppercase;
    letter-spacing: 0.05em;
}
.drawer-section .drawer-link {
    padding-left: 32px;
}

/* Backdrop */
.drawer-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.4);
    z-index: 99997;
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s, visibility 0.3s;
}
.drawer-backdrop.visible {
    opacity: 1;
    visibility: visible;
}

/* Responsive: show hamburger, hide desktop nav - phones, tablets, small laptops */
@media (max-width: 1280px) {
    .hamburger-btn {
        display: flex !important;
    }
    .top-nav .nav-center,
    .top-nav .nav-right {
        display: none !important;
    }
    .top-nav {
        justify-content: flex-end;
    }
}
/* Extra coverage for common mobile widths */
@media screen and (max-width: 480px), (max-width: 768px), (max-width: 1024px) {
    .hamburger-btn {
        display: flex !important;
    }
}
