* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

:root {
    --primary-color: #2e7d32;      /* Verde oscuro */
    --secondary-color: #4caf50;     /* Verde medio */
    --success-color: #2e7d32;       /* Verde éxito */
    --danger-color: #f44336;        /* Rojo (se mantiene para alertas) */
    --warning-color: #ff9800;       /* Naranja (se mantiene) */
    --dark-bg: #1b5e20;             /* Verde muy oscuro */
    --light-bg: #f5f5f5;            /* Gris muy claro para fondo general */
    --icon-bg: #e8f5e9;             /* Verde muy claro para iconos */
    --card-bg: #ffffff;              /* Blanco para tarjetas */
    --border-color: #e0e0e0;         /* Gris para bordes */
    --text-primary: #333333;         /* Texto principal oscuro */
    --text-secondary: #666666;       /* Texto secundario */
    --hover-green: #c8e6c9;          /* Verde claro para hover */
    --header-height: 80px;
    --header-minimized-height: 50px;
}

body {
    font-family: 'Inter', sans-serif;
    background: var(--light-bg);
    color: var(--text-primary);
    min-height: 100vh;
}

/* Estilos de Login */
.login-container {
    min-height: 100vh;
    width: 100%;
    display: flex;
    align-items: center;
    justify-content: center;
    background: linear-gradient(135deg, var(--primary-color), var(--dark-bg));
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
}

.login-box {
    background: var(--card-bg);
    padding: 40px;
    border-radius: 10px;
    box-shadow: 0 10px 40px rgba(0,0,0,0.2);
    width: 90%;
    max-width: 400px;
    margin: 20px;
    border: 1px solid var(--border-color);
}

.login-header {
    text-align: center;
    margin-bottom: 30px;
}

.login-header .logo {
    width: 180px;
    height: auto;
    margin-bottom: 20px;
    display: block;
    margin-left: auto;
    margin-right: auto;
}

.login-header h2 {
    color: var(--primary-color);
    margin-bottom: 10px;
    font-size: 1.8rem;
}

.login-header p {
    color: var(--text-secondary);
    font-size: 0.9rem;
    font-weight: 500;
}

.login-form {
    width: 100%;
}

.input-group {
    position: relative;
    margin-bottom: 20px;
    width: 100%;
}

.input-group i {
    position: absolute;
    left: 12px;
    top: 50%;
    transform: translateY(-50%);
    color: var(--primary-color);
    z-index: 1;
}

.input-group input {
    width: 100%;
    padding: 12px 12px 12px 40px;
    border: 1px solid var(--border-color);
    border-radius: 5px;
    font-size: 1rem;
    transition: all 0.3s;
    background: white;
}

.input-group input:focus {
    outline: none;
    border-color: var(--secondary-color);
    box-shadow: 0 0 0 3px rgba(76, 175, 80, 0.1);
}

.btn-login {
    width: 100%;
    padding: 12px;
    background: var(--secondary-color);
    color: white;
    border: none;
    border-radius: 5px;
    font-size: 1rem;
    font-weight: 600;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-login:hover {
    background: var(--primary-color);
}

.btn-login i {
    margin-right: 8px;
}

.login-info {
    text-align: center;
    margin-top: 20px;
    padding: 10px;
    background: var(--icon-bg);
    border-radius: 5px;
    font-size: 0.85rem;
    color: var(--primary-color);
    border: 1px solid var(--secondary-color);
}

.login-info i {
    margin-right: 5px;
    color: var(--secondary-color);
}

/* Dashboard Layout */
.dashboard {
    display: flex;
    flex-direction: column;
    min-height: 100vh;
    width: 100%;
}

/* Barra superior */
.top-bar {
    height: var(--header-height);
    background: var(--card-bg);
    display: flex;
    align-items: center;
    padding: 0 25px;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    z-index: 100;
    box-shadow: 0 2px 10px rgba(0,0,0,0.05);
    border-bottom: 1px solid var(--border-color);
    transition: all 0.3s ease;
}

.top-bar.minimized {
    height: var(--header-minimized-height);
    overflow: hidden;
    cursor: pointer;
}

.top-bar.minimized .logo-container,
.top-bar.minimized .nav-menu-horizontal,
.top-bar.minimized .user-menu-container {
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.2s ease;
}

.top-bar.minimized::after {
    content: '☰ Menú';
    position: absolute;
    left: 50%;
    top: 50%;
    transform: translate(-50%, -50%);
    color: var(--primary-color);
    font-weight: 600;
    font-size: 1rem;
    background: var(--icon-bg);
    padding: 8px 20px;
    border-radius: 20px;
    border: 1px solid var(--secondary-color);
    box-shadow: 0 2px 5px rgba(0,0,0,0.1);
}

.top-bar.minimized:hover {
    background: var(--icon-bg);
}

.top-bar.minimized:hover::after {
    background: var(--secondary-color);
    color: white;
}

/* Logo en la barra superior */
.logo-container {
    flex-shrink: 0;
    width: 140px;
    height: 75px;
    margin-right: 30px;
    display: flex;
    align-items: center;
    justify-content: center;
    transition: opacity 0.3s ease;
}

.logo-small {
    width: 100%;
    height: 100%;
    object-fit: contain;
    display: block;
}

/* Menú de navegación horizontal */
.nav-menu-horizontal {
    display: flex;
    list-style: none;
    gap: 8px;
    margin: 0;
    padding: 0;
    flex: 1;
    position: relative;
    transition: opacity 0.3s ease;
}

.nav-item-horizontal {
    position: relative;
    transition: transform 0.3s ease;
}

.nav-item-horizontal > a {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 50px;
    height: 50px;
    color: var(--primary-color);
    text-decoration: none;
    border-radius: 8px;
    transition: all 0.3s;
    position: relative;
    z-index: 10;
    cursor: pointer;
    background: var(--icon-bg);
    border: 1px solid var(--border-color);
}

.nav-item-horizontal > a i {
    font-size: 1.5rem;
    color: var(--primary-color);
    transition: all 0.3s;
}

.nav-item-horizontal:hover > a {
    background: var(--secondary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 8px rgba(46, 125, 50, 0.15);
}

.nav-item-horizontal:hover > a i {
    color: white;
}

.nav-item-horizontal.active > a {
    background: var(--secondary-color);
    border-color: var(--primary-color);
}

.nav-item-horizontal.active > a i {
    color: white;
}

/* Menú desplegable a la derecha */
.nav-dropdown {
    position: absolute;
    top: 0;
    left: 100%;
    min-width: 140px;
    background: var(--card-bg);
    border-radius: 8px;
    box-shadow: 0 5px 15px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transition: all 0.3s ease;
    z-index: 1000;
    border: 1px solid var(--border-color);
    margin-left: 8px;
    pointer-events: none;
}

.nav-item-horizontal:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
}

/* Efecto de desplazamiento - los iconos siguientes se mueven */
.nav-item-horizontal:hover ~ .nav-item-horizontal {
    transform: translateX(150px);
    transition: transform 0.3s ease;
}

/* Texto informativo */
.dropdown-text {
    display: block;
    padding: 12px 20px;
    color: var(--text-primary);
    font-size: 0.95rem;
    font-weight: 500;
    white-space: nowrap;
    text-align: center;
    border-radius: 8px;
    cursor: default;
    user-select: none;
    pointer-events: none;
    background: var(--card-bg);
}

/* Cuando el cursor está sobre el área del dropdown, mantener visible */
.nav-item-horizontal:hover .nav-dropdown {
    opacity: 1;
    visibility: visible;
}

/* Menú de usuario */
.user-menu-container {
    position: relative;
    margin-left: 20px;
    transition: opacity 0.3s ease;
}

.user-avatar-circle {
    width: 55px;
    height: 55px;
    border-radius: 50%;
    background: var(--secondary-color);
    color: white;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.6rem;
    font-weight: bold;
    cursor: pointer;
    border: 3px solid white;
    transition: all 0.3s;
    box-shadow: 0 3px 8px rgba(0,0,0,0.1);
}

.user-avatar-circle:hover {
    transform: scale(1.05);
    background: var(--primary-color);
}

.user-dropdown {
    position: absolute;
    top: 65px;
    right: 0;
    width: 280px;
    background: var(--card-bg);
    border-radius: 12px;
    box-shadow: 0 8px 25px rgba(0,0,0,0.1);
    opacity: 0;
    visibility: hidden;
    transform: translateY(-10px);
    transition: all 0.3s;
    z-index: 1000;
    border: 1px solid var(--border-color);
}

.user-menu-container:hover .user-dropdown {
    opacity: 1;
    visibility: visible;
    transform: translateY(0);
}

.user-dropdown-header {
    padding: 20px;
    border-bottom: 1px solid var(--border-color);
    background: var(--icon-bg);
    border-radius: 12px 12px 0 0;
}

.user-dropdown-name {
    font-weight: 700;
    color: var(--primary-color);
    font-size: 1.2rem;
    margin-bottom: 5px;
}

.user-dropdown-email {
    color: var(--text-secondary);
    font-size: 0.95rem;
    margin-bottom: 5px;
}

.user-dropdown-role {
    color: var(--primary-color);
    font-size: 0.9rem;
    font-weight: 600;
}

.user-dropdown-menu {
    list-style: none;
    padding: 10px 0;
    background: var(--card-bg);
    border-radius: 0 0 12px 12px;
}

.user-dropdown-menu li {
    padding: 0;
}

.user-dropdown-menu li a {
    display: flex;
    align-items: center;
    padding: 14px 20px;
    color: var(--text-primary);
    text-decoration: none;
    transition: all 0.3s;
    gap: 12px;
    font-size: 0.95rem;
    cursor: pointer;
    background: transparent;
}

.user-dropdown-menu li a i {
    width: 22px;
    color: var(--secondary-color);
    font-size: 1.1rem;
}

.user-dropdown-menu li a:hover {
    background: var(--icon-bg);
    color: var(--primary-color);
}

.user-dropdown-menu li.logout a {
    color: var(--danger-color);
    border-top: 1px solid var(--border-color);
}

.user-dropdown-menu li.logout a i {
    color: var(--danger-color);
}

.user-dropdown-menu li.logout a:hover {
    background: #ffebee;
}

/* Contenido principal */
.main-content {
    margin-top: var(--header-height);
    padding: 30px;
    background: var(--light-bg);
    min-height: calc(100vh - var(--header-height));
    transition: margin-top 0.3s ease;
}

.main-content.shifted {
    margin-top: var(--header-minimized-height);
}

.content-section {
    display: none;
}

.content-section.active {
    display: block;
}

/* ===== ESTILOS CON MISMO EFECTO HOVER QUE EL MENÚ ===== */

/* Panel de Control - Título principal */
.section-header {
    margin-bottom: 30px;
}

.section-header h2 {
    color: var(--text-primary);
    font-size: 1.8rem;
    font-weight: 600;
    display: flex;
    align-items: center;
    margin: 0;
    padding: 0;
    border: none;
    background: transparent;
    box-shadow: none;
}

.section-header h2 i {
    margin-right: 12px;
    color: var(--secondary-color);
    font-size: 2rem;
}

.date-info {
    color: var(--text-secondary);
    font-size: 0.95rem;
    background: transparent;
    padding: 0;
    border: none;
}

/* Grid de tarjetas de estadísticas - MISMO EFECTO QUE EL MENÚ */
.stats-grid {
    display: grid;
    grid-template-columns: repeat(4, 1fr);
    gap: 25px;
    margin-bottom: 40px;
}

.stat-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid var(--secondary-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.stat-card:hover {
    background: var(--secondary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

.stat-card:hover .stat-icon i {
    color: white;
}

.stat-card:hover .stat-info h3 {
    color: white;
}

.stat-card:hover .stat-info .stat-value {
    color: white;
}

.stat-card:hover .stat-info .stat-change {
    color: white;
}

.stat-card:hover .stat-info .stat-change.positive,
.stat-card:hover .stat-info .stat-change.negative {
    color: white;
}

.stat-card .stat-icon {
    width: auto;
    height: auto;
    background: transparent;
    margin-bottom: 15px;
}

.stat-card .stat-icon i {
    font-size: 2rem;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.stat-card .stat-info h3 {
    color: var(--text-secondary);
    font-size: 0.95rem;
    font-weight: 500;
    margin-bottom: 8px;
    text-transform: uppercase;
    letter-spacing: 0.5px;
    transition: all 0.3s ease;
}

.stat-card .stat-info .stat-value {
    color: var(--text-primary);
    font-size: 2.2rem;
    font-weight: 700;
    margin-bottom: 5px;
    line-height: 1.2;
    transition: all 0.3s ease;
}

.stat-card .stat-info .stat-change {
    font-size: 0.9rem;
    padding: 4px 0;
    background: transparent;
    border: none;
    transition: all 0.3s ease;
}

.stat-card .stat-info .stat-change.positive {
    color: var(--success-color);
}

.stat-card .stat-info .stat-change.negative {
    color: var(--danger-color);
}

.stat-card .stat-info .stat-change i {
    margin-right: 4px;
}

/* Gráficos - MISMO EFECTO QUE EL MENÚ */
.charts-grid {
    display: grid;
    grid-template-columns: repeat(2, 1fr);
    gap: 25px;
    margin-bottom: 30px;
}

.chart-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid var(--secondary-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.chart-card:hover {
    background: var(--secondary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

.chart-card:hover h3 {
    color: white;
}

.chart-card:hover h3 i {
    color: white;
}

.chart-card h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    padding-bottom: 0;
    border-bottom: none;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.chart-card h3 i {
    margin-right: 10px;
    color: var(--secondary-color);
    font-size: 1.3rem;
    transition: all 0.3s ease;
}

/* Mapa - MISMO EFECTO QUE EL MENÚ */
.map-card {
    background: var(--card-bg);
    padding: 25px;
    border-radius: 12px;
    box-shadow: 0 2px 8px rgba(0,0,0,0.05);
    border: 1px solid var(--secondary-color);
    transition: all 0.3s ease;
    cursor: pointer;
}

.map-card:hover {
    background: var(--secondary-color);
    border-color: var(--primary-color);
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(46, 125, 50, 0.2);
}

.map-card:hover h3 {
    color: white;
}

.map-card:hover h3 i {
    color: white;
}

.map-card h3 {
    color: var(--text-primary);
    font-size: 1.2rem;
    font-weight: 600;
    margin-bottom: 20px;
    display: flex;
    align-items: center;
    transition: all 0.3s ease;
}

.map-card h3 i {
    margin-right: 10px;
    color: var(--secondary-color);
    transition: all 0.3s ease;
}

.mini-map {
    height: 350px;
    width: 100%;
    border-radius: 8px;
    z-index: 1;
    border: 1px solid var(--border-color);
}

/* Responsive */
@media (max-width: 1200px) {
    .stats-grid {
        grid-template-columns: repeat(2, 1fr);
    }
}

@media (max-width: 768px) {
    .stats-grid {
        grid-template-columns: 1fr;
    }
    
    .charts-grid {
        grid-template-columns: 1fr;
    }
    
    .stat-card .stat-value {
        font-size: 1.8rem;
    }
}

/* El resto de los estilos se mantienen igual... */