/* ===============================================
   Sidebar CSS
   =============================================== */

.sidebar {
    width: 260px;
    background-color: var(--bg-card);
    border-right: 1px solid var(--border-color-light);
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    display: flex;
    flex-direction: column;
    z-index: 1000;
    transition: transform 0.3s ease;
    overflow-y: auto;
}

.sidebar-header {
    height: 70px;
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 24px;
    border-bottom: 1px solid var(--border-color-light);
    flex-shrink: 0;
}

.brand-logo {
    font-family: var(--font-heading, 'Poppins', sans-serif);
    font-size: var(--fs-xl);
    font-weight: 700;
    color: var(--color-primary);
    white-space: nowrap;
}

.sidebar-nav {
    flex: 1;
    padding: 16px 12px;
}

.sidebar-nav ul {
    display: flex;
    flex-direction: column;
    gap: 4px;
}

.nav-link {
    display: flex;
    align-items: center;
    gap: 12px;
    padding: 12px 16px;
    border-radius: 8px;
    color: var(--text-secondary);
    font-weight: 500;
    font-size: 0.95rem;
    white-space: nowrap;
    transition: all 0.2s ease;
    position: relative;
    width: 100%;
    text-align: left;
}

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

/* ===============================================
   ACTIVE STATE (Dark Yellow/Gold)
   =============================================== */
.nav-link.active {
    background-color: #c8962e; /* Dark Yellow / Gold */
    color: #1a1a1a; /* Dark text for high contrast */
    font-weight: 600;
    box-shadow: 0 4px 12px rgba(200, 150, 46, 0.25);
}

/* Left accent for active item */
.nav-link.active::before {
    content: '';
    position: absolute;
    left: -12px;
    top: 50%;
    transform: translateY(-50%);
    width: 4px;
    height: 60%;
    background-color: #1a1a1a; /* Dark accent next to the gold */
    border-radius: 0 4px 4px 0;
}

.logout-btn {
    margin-top: auto;
    color: var(--color-danger);
}
.logout-btn:hover {
    background-color: var(--color-danger-bg);
    color: var(--color-danger);
}

/* Mobile Overlay */
.sidebar-overlay {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.5);
    z-index: 999;
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
}
.sidebar-overlay.active {
    opacity: 1;
    visibility: visible;
}

/* Mobile Responsiveness */
@media (max-width: 768px) {
    .sidebar {
        transform: translateX(-100%);
        width: 280px; /* Slightly wider on mobile for better tap targets */
    }
    .sidebar.active {
        transform: translateX(0);
        box-shadow: 0 0 40px rgba(0,0,0,0.2);
    }
}