﻿/* Variables */
:root {
    --sidebar-width: 250px;
    --primary-color: #2c3e50;
    --secondary-color: #34495e;
    --accent-color: #3498db;
    --text-color: #ecf0f1;
    --hover-color: #3d566e;
    --mobile-header-height: 60px;
}

/* Estructura principal */
.app-container {
    display: flex;
    min-height: 100vh;
}

/* Sidebar (desktop) */
.sidebar {
    width: var(--sidebar-width);
    height: 100vh;
    position: fixed;
    background-color: var(--primary-color);
    color: var(--text-color);
    transition: transform 0.3s ease;
    z-index: 1000;
}

.sidebar.open {
    transform: translateX(0);
}

/* Menú móvil */
.mobile-menu {
    position: fixed;
    top: var(--mobile-header-height);
    left: 0;
    width: 100%;
    background-color: var(--primary-color);
    color: var(--text-color);
    transform: translateY(-100%);
    transition: transform 0.3s ease;
    z-index: 999;
    max-height: calc(100vh - var(--mobile-header-height));
    overflow-y: auto;
}

.mobile-menu.open {
    transform: translateY(0);
}

.mobile-header {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: var(--mobile-header-height);
    background-color: var(--primary-color);
    color: var(--text-color);
    display: flex;
    align-items: center;
    padding: 0 1rem;
    z-index: 1001;
    box-shadow: 0 2px 5px rgba(0,0,0,0.2);
}

.hamburger-btn {
    background: none;
    border: none;
    color: var(--text-color);
    font-size: 1.5rem;
    cursor: pointer;
    margin-right: 1rem;
}

.app-title {
    font-size: 1.2rem;
    font-weight: bold;
}

/* Contenido principal */
.main-content {
    flex: 1;
    margin-left: var(--sidebar-width);
    transition: margin 0.3s ease;
}

    .main-content.mobile {
        margin-left: 0;
        margin-top: var(--mobile-header-height); /* Empuja el contenido */
        padding-top: 1rem; /* Agrega espacio extra */
        transition: margin 0.3s ease;
    }

/* Items del menú */
.nav-content {
    padding: 1rem 0;
}

.nav-item {
    display: flex;
    align-items: center;
    padding: 0.8rem 1.5rem;
    color: var(--text-color);
    text-decoration: none;
    transition: background-color 0.2s;
}

.nav-item:hover {
    background-color: var(--hover-color);
}

.nav-item.active {
    background-color: var(--accent-color);
}

.icon {
    margin-right: 1rem;
    font-size: 1.2rem;
}

.text {
    font-size: 0.95rem;
}

.logout-btn {
    cursor: pointer;
}

/* Overlay para móvil */
.overlay {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background-color: rgba(0,0,0,0.5);
    z-index: 998;
}

/* Media queries */
@media (max-width: 767px) {
    .sidebar {
        transform: translateX(-100%);
    }
    
    .sidebar.open {
        transform: translateX(0);
    }
    
    .main-content {
        margin-left: 0;
    }
}

