/* Icon button */
.icon-btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 36px;
    height: 36px;
    border-radius: 10px;
    border: 1px solid rgba(255, 255, 255, 0.2);
    background: rgba(255, 255, 255, 0.1);
    color: white;
    cursor: pointer;
    transition: transform 0.2s, background 0.2s;
}

.icon-btn:hover {
    transform: translateY(-1px);
    background: rgba(255, 255, 255, 0.2);
}

/* Nav Drawer */
.nav-overlay {
    position: fixed;
    inset: 0;
    background: rgba(15, 41, 66, 0.4);
    z-index: 200;
    backdrop-filter: blur(2px);
}

body.is-unauthenticated .nav-overlay,
body.is-unauthenticated .nav-drawer {
    display: none !important;
}

.nav-drawer {
    position: fixed;
    top: 0;
    left: 0;
    height: 100%;
    width: 260px;
    background: white;
    box-shadow: var(--shadow-lg);
    z-index: 210;
    transform: translateX(-100%);
    transition: transform 0.25s ease;
    padding: 1rem;
    display: flex;
    flex-direction: column;
}

.nav-drawer.open {
    transform: translateX(0);
}

.nav-drawer .icon-btn {
    color: var(--text);
    border: 1px solid var(--border);
    background: var(--bg);
}

.nav-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding-bottom: 1rem;
    border-bottom: 1px solid var(--border);
}

.nav-title {
    font-weight: 700;
    font-size: 1rem;
    color: var(--primary-dark);
}

.nav-subtitle {
    font-size: 0.75rem;
    color: var(--text-muted);
}

.nav-links {
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
    margin-top: 1rem;
}

.nav-link {
    text-align: left;
    background: var(--bg);
    border: 1px solid var(--border);
    color: var(--text);
    padding: 0.65rem 0.9rem;
    border-radius: var(--radius-sm);
    cursor: pointer;
    font-weight: 600;
    font-size: 0.95rem;
    line-height: 1.2;
    display: flex;
    align-items: center;
    gap: 0.65rem;
    text-decoration: none;
}

.nav-link-icon {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    color: currentColor;
    width: 16px;
    height: 16px;
    flex: 0 0 16px;
}

.nav-link-icon svg {
    display: block;
    width: 14px;
    height: 14px;
}

.nav-link.active,
.nav-link:hover {
    border-color: var(--primary);
    color: var(--primary);
}

.nav-link.disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

.nav-footer {
    margin-top: auto;
    padding-top: 1rem;
    border-top: 1px solid var(--border);
    display: flex;
    flex-direction: column;
    gap: 0.75rem;
}

.nav-footer-divider {
    height: 1px;
    width: 100%;
    background: var(--border);
    opacity: 0.6;
}

.nav-support {
    background: rgba(26, 54, 93, 0.08);
    border-color: rgba(26, 54, 93, 0.3);
    color: var(--primary);
    text-decoration: none;
    display: block;
}

.nav-support:hover {
    background: rgba(26, 54, 93, 0.12);
    border-color: var(--primary);
}

.nav-logout {
    background: rgba(220, 38, 38, 0.08);
    border-color: rgba(220, 38, 38, 0.4);
    color: var(--error);
}

@media (min-width: 1024px) {
    .nav-overlay {
        display: none !important;
    }

    .nav-drawer {
        transform: translateX(0);
        box-shadow: none;
        border-right: 1px solid var(--border);
        z-index: 150;
        height: 100%;
    }

    #menu-close {
        display: none;
    }

    body.nav-collapsed .nav-drawer {
        transform: translateX(-100%);
    }
}
