/* ==========================================
   6. LAYOUT PRINCIPAL (DASHBOARD)
   ========================================== */
.dashboard-layout {
    display: flex;
    height: 100vh;
    width: 100%;
}

/* Sidebar */
.sidebar {
    width: 260px;
    background-color: var(--color-blue-dark);
    color: var(--color-white);
    display: flex;
    flex-direction: column;
    transition: transform var(--transition-speed) ease;
    z-index: 40;
    flex-shrink: 0;
}

.sidebar-header {
    padding: 1.5rem;
    font-size: 1.25rem;
    font-weight: bold;
    border-bottom: 1px solid rgba(255,255,255,0.1);
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.sidebar-nav {
    flex: 1;
    padding: 1rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 0.5rem;
}

.nav-item {
    width: 100%;
    display: flex;
    align-items: center;
    gap: 0.75rem;
    padding: 0.75rem 1rem;
    border-radius: 0.5rem;
    color: rgba(255,255,255,0.8);
    transition: all var(--transition-speed);
    border-left: 3px solid transparent;
}

.nav-item:hover {
    background-color: rgba(255,255,255,0.05);
    color: var(--color-white);
}

.nav-item.active {
    background-color: var(--color-blue-main);
    color: var(--color-white);
    border-left-color: var(--color-gold);
}

.sidebar-footer {
    padding: 1rem;
    border-top: 1px solid rgba(255,255,255,0.1);
}

/* Contenido Principal */
.main-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    overflow: hidden;
    position: relative;
}

.mobile-header {
    display: none;
    background-color: var(--color-white);
    padding: 1rem;
    box-shadow: 0 1px 3px rgba(0,0,0,0.1);
    align-items: center;
    gap: 1rem;
    z-index: 20;
}

.mobile-header h2 { font-size: 1.25rem; margin: 0; }

.content-area {
    flex: 1;
    padding: 2rem;
    overflow-y: auto;
}

/* Overlay para móviles */
.sidebar-overlay {
    position: fixed; top: 0; left: 0; width: 100vw; height: 100vh;
    background: rgba(0,0,0,0.5); z-index: 30;
    display: none; opacity: 0; transition: opacity 0.3s;
}
.sidebar-overlay.show { display: block; opacity: 1; }

/* RESPONSIVE DESIGN */
@media (max-width: 768px) {
    .sidebar { position: absolute; height: 100%; transform: translateX(-100%); }
    .sidebar.open { transform: translateX(0); }
    
    .mobile-header { display: flex; }
    .content-area { padding: 1rem; }
}
