/* ═══════════════════════════════════════════════
   Sidebar — Warm Amber Theme
   ═══════════════════════════════════════════════ */

.sidebar {
    background: var(--bg-surface);
    border-right: 1px solid var(--border);
    height: 100vh;
    position: sticky;
    top: 0;
    display: flex;
    flex-direction: column;
    padding: 1.5rem .875rem 1.25rem;
    overflow-y: auto;
    z-index: 50;
}

.sidebar .brand {
    display: flex;
    align-items: center;
    gap: .6rem;
    padding: 0 .5rem;
    margin-bottom: 1.5rem;
}

.sidebar .brand-icon {
    font-size: 1.3rem;
    color: var(--primary);
}

.sidebar .brand-name {
    font-size: 1.15rem;
    font-weight: 800;
    letter-spacing: -.02em;
    background: var(--gradient);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.search-wrapper {
    position: relative;
    margin-bottom: 1.25rem;
}

.search-icon {
    position: absolute;
    left: .7rem;
    top: 50%;
    transform: translateY(-50%);
    color: var(--text-muted);
    font-size: .8rem;
    pointer-events: none;
}

.search-input {
    width: 100%;
    padding: .5rem .7rem .5rem 2.1rem;
    background: var(--bg-input);
    border: 1px solid var(--border);
    border-radius: var(--radius);
    color: var(--text-primary);
    font-size: .82rem;
    transition: border var(--transition);
}

.search-input::placeholder {
    color: var(--text-muted);
}

.search-input:focus {
    outline: none;
    border-color: var(--primary);
    box-shadow: 0 0 0 3px var(--primary-ring);
}

.nav-menu {
    display: flex;
    flex-direction: column;
    gap: 1px;
    flex: 1;
    overflow-y: auto;
}

.nav-header {
    font-size: .62rem;
    text-transform: uppercase;
    letter-spacing: .1em;
    color: var(--text-muted);
    font-weight: 700;
    padding: .65rem .7rem .35rem;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: .65rem;
    padding: .55rem .7rem;
    border-radius: var(--radius);
    color: var(--text-secondary);
    font-weight: 500;
    font-size: .85rem;
    transition: all .15s ease;
}

.nav-link i {
    width: 1.2rem;
    text-align: center;
    font-size: .85rem;
    opacity: .5;
}

.nav-link:hover {
    background: var(--primary-soft);
    color: var(--text-primary);
}

.nav-link:hover i {
    opacity: 1;
}

.nav-link.active {
    background: var(--primary);
    color: #fff;
    font-weight: 600;
    box-shadow: 0 2px 10px rgba(245, 158, 11, .25);
}

.nav-link.active i {
    opacity: 1;
}

.user-actions {
    margin-top: auto;
    padding-top: .6rem;
    border-top: 1px solid var(--border);
}

.theme-toggle {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 2.1rem;
    height: 2.1rem;
    border-radius: var(--radius);
    color: var(--text-muted);
    background: var(--bg-input);
    border: 1px solid var(--border);
    transition: all .2s;
}

.theme-toggle:hover {
    color: var(--primary);
    border-color: var(--primary);
}

.mobile-toggle {
    display: none;
    position: fixed;
    bottom: 1.25rem;
    right: 1.25rem;
    width: 3.25rem;
    height: 3.25rem;
    background: var(--primary);
    color: #fff;
    border-radius: 50%;
    box-shadow: 0 4px 16px rgba(245, 158, 11, .3);
    z-index: 100;
    font-size: 1.15rem;
    align-items: center;
    justify-content: center;
}

@media (max-width:768px) {
    .sidebar {
        position: fixed;
        width: 268px;
        transform: translateX(-100%);
        box-shadow: 4px 0 24px rgb(0 0 0/.5);
        transition: transform .3s var(--ease);
    }

    .sidebar.open {
        transform: translateX(0);
    }

    .mobile-toggle {
        display: flex;
    }
}