.top-bar {
    background-color: #007a53;
    color: white;
    padding: 12px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.15);
} 

.user-greeting {
    font-weight: 500;
    font-size: 0.95rem;
}

.btn-logout {
    background: transparent;
    color: white;
    border: 1px solid white;
    padding: 7px 15px;
    border-radius: 4px;
    cursor: pointer;
    font-size: 0.9rem;
    transition: background-color 0.2s ease, color 0.2 ease;

}

.btn-logout:hover {
    background-color: white;
    color: #007a53
}

main {
    flex: 1;
    padding: 30px 20px;
    max-width: 1200px;
    margin: 0 auto;
    width: 100%;
    box-sizing: border-box;
}

footer {
    background-color: #4b4b4b;
    color: #d1d1d1;
    padding: 15px 25px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    font-size: 0.85rem;
}

footer a {
    color: #d1d1d1;
    text-decoration: underline;

}

footer a:hover {
    color: #ffffff;
}


.btn-primary {
    width: 100%;
    padding: 10px;
    background-color: #007a53;
    color: white;
    border: none;
    border-radius: 4px;
    font-size: 1rem;
    cursor: pointer;
    transition: background-color 0.3s;
}

.btn-primary:hover {
    background-color: #005c3e;
}

.dashboard-grid {
    display: flex;
    gap: 20px;
    margin-top: 25px;
    flex-wrap: wrap;
}

.card {
    background-color: white;
    padding: 25px;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
    flex: 1;
    min-width: 250px;
    border-top: 4px solid #007a53;
}

.card h3 {
    margin-top: 0;
    color: #333;
}

.card ul {
    list-style-type: none;
    padding: 0;
}

.card ul li {
    margin-bottom: 10px;
}

.card ul li a {
    color: #007a53;
    text-decoration: none;
    font-weight: 500;
}

.card ul li a:hover {
    text-decoration: underline;
}

.btn-card {
    display: inline-block;
    padding: 12px 20px;
    background-color: #007a53;
    color: white;
    text-decoration: None;
    border-radius: 4px;
    margin-top: 10px;
    transition: background-color 0.3s;
}

.btn-card:hover {
    background-color: #005c3e;
}

.form-control {
    width: 100%;
    padding: 10px;
    margin-top: 5px;
    margin-bottom: 15px;
    border: 1px solid #ccc;
    border-radius: 4px;
    box-sizing: border-box;
    font-size: 1rem;
    transition: border-color 0.3s;
}

.form-control:focus {
    border-color: #007a53;
    outline: none;
    box-shadow: 0 0 5px rgba(0, 122, 83, 0.2);
}

form p {
    margin: 0;
    font-weight: bold;
    color: #333;
}

.form-container {
    max-width: 600px;
    margin: 20px auto;
}

.alert {
    padding: 10px;
    border-radius: 4px;
    margin-bottom: 20px;
}

.alert-success {
    background-color: #d4edda;
    color: #155724;
    border: 1px solid #c3e6cb;
}

.alert-info {
    background-color: #e2e3e5;
    color: #383d41;
    border: 1px solid #d6d8db;
}

.alert-error {
    background-color: #f8d7da;
    color: #721c24;
    border: 19x solid #f5c6cb;
}

.alert-list {
    margin: 0;
    padding-left: 20px;
}

.form-actions {
    display: flex;
    gap: 15px;
    margin-top: 25px;
}

.btn-submit {
    border: none;
    cursor: pointer;
    flex: 1;
}

.btn-secondary {
    background-color: #6c757d;
    text-align: center;
    flex: 1;
}

.btn-secondary:hover {
    background-color: #5a6268;
}


.btn-consulta-m {
    flex: 1;
    min-width: 140px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 15px;
}
/* ==========================================================================
   1. REGLAS GENERALES Y RESET (Compartido por todas las pantallas)
   ========================================================================== */
* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
    background-color: #ededed; /* Color gris claro de fondo uniforme */
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* ==========================================================================
   2. BARRA DE NAVEGACIÓN SUPERIOR HEADER
   ========================================================================== */
.navbar {
    background-color: #006e46; 
    height: 64px;
    padding: 0 32px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    width: 100%;
}

.navbar-brand {
    color: #ffffff;
    font-size: 1.15rem;
    font-weight: 600;
    letter-spacing: 0.5px;
}

.logout-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
    transition: opacity 0.2s ease;
}

.logout-btn:hover {
    opacity: 0.8;
}

/* ==========================================================================
   3. ENCABEZADOS Y COMMONS DE SECCIÓN (Validar Pronósticos / Ver Mediciones)
   ========================================================================== */
.toolbar-container {
    padding: 32px 48px 16px 48px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    flex-wrap: wrap;
    gap: 16px;
}

.title-section {
    display: flex;
    align-items: center;
    gap: 12px;
}

.back-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
}

.back-btn svg {
    fill: #333333;
}

.title-section h1 {
    color: #007147;
    font-size: 1.5rem;
    font-weight: 600;
}

/* Estilos base de las Tablas (Reutilizados en ambas vistas de datos) */
.table-responsive {
    width: 100%;
    overflow-x: auto;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}


.table-forecast th,
.table-forecast td {
    white-space: nowrap;
    padding: 8px 12px;
    vertical-align: middle;
}

.table-forecast .col-hour {
    min-width: 100px;
    text-align: left;
    font-variant-numeric: tabular-nums;
}

.table-forecast .col-load {
    min-width: 180px;
    left: 0; 
    background-color: #f8f9fa; 
    z-index: 2;
}

.table-forecast .col-date{
    min-width: 110px;
    left: 140px; 
    background-color: #f8f9fa; 
    z-index: 2;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
    margin: 0 auto;
}

.data-table th {
    font-size: 0.9rem;
    font-weight: 700;
    color: #212529;
    padding: 16px 24px;
    border-bottom: 1px solid #eaeaea;
}

.data-table td {
    font-size: 0.85rem;
    color: #555555;
    padding: 16px 24px;
    border-bottom: 1px solid #f2f2f2;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* ==========================================================================
   4. PANTALLA 1: MENÚ DE SELECCIÓN (Tarjetas Principales)
   ========================================================================== */
.menu-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 140px; 
    padding: 40px;
    display: flex;
    flex-wrap: wrap; /* Permite que los elementos bajen a la siguiente línea */
   
    @media (min-width: 768px) {
    .contenedor-iconos {
        flex-direction: column; /* Cambia la dirección a columnas */
    }
}
    
}

.menu-card {
    background-color: #ffffff;
    width: 240px;
    height: 240px;
    border-radius: 25px; 
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    text-decoration: none;
    gap: 16px;
    box-shadow: 0 10px 25px rgba(0, 0, 0, 0.08), 
                0 4px 10px rgba(0, 0, 0, 0.04);
    transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.menu-card:hover {
    transform: translateY(-4px);
    box-shadow: 0 14px 30px rgba(0, 0, 0, 0.12);
}

.card-icon {
    display: flex;
    align-items: center;
    justify-content: center;
}

.card-icon svg {
    fill: #4a4a4a;
}

.card-text {
    color: #555555;
    font-size: 0.85rem;
    font-weight: 500;
    text-align: center;
}

/* ==========================================================================
   5. PANTALLA 2: VALIDAR PRONÓSTICOS (Botones de Acción y Contenedor Único)
   ========================================================================== */
.action-buttons {
    display: flex;
    gap: 14px;
}

.action-btn {
    background-color: #ffffff;
    border: 1px solid #a5ccbc; 
    border-radius: 8px;
    padding: 10px 20px;
    font-size: 0.85rem;
    font-weight: 500;
    color: #007147;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s, box-shadow 0.2s;
}

.action-btn:hover {
    background-color: #f4fcf9;
    box-shadow: 0 2px 6px rgba(0,0,0,0.05);
}

.content-wrapper {
    flex: 1;
    padding: 0 48px 48px 48px;
    display: flex;
}

.data-card {
    background-color: #ffffff;
    flex: 1;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    padding: 60px 80px; 
    display: flex;
    flex-direction: column;
}

.data-card .data-table {
    max-width: 900px;
}

/* ==========================================================================
   6. PANTALLA 3: VER MEDICIONES (Dashboard en Dos Columnas y Gráfica)
   ========================================================================== */
.dashboard-layout {
    flex: 1;
    padding: 0 48px 24px 48px;
    display: grid;
    grid-template-columns: 2fr 2fr;
    gap: 24px;
    align-items: stretch;
}

.dashboard-card {
    background-color: #ffffff;
    border-radius: 8px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.05);
    display: flex;
    flex-direction: column;
}

.pad-large { padding: 60px 40px; }
.pad-medium { padding: 40px 32px; }

.dashboard-card .data-table th, 
.dashboard-card .data-table td {
    padding: 16px 12px; /* Ajuste de padding para data comprimida en columnas */
}

/* Elementos del Gráfico */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: #212529;
}

.icon-green { fill: #00be6e; }

.expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.expand-btn svg { fill: #444444; }

.chart-container {
    position: relative;
    height: 260px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: 60px 1fr;
    grid-template-rows: 1fr 24px;
}

.y-axis {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding-right: 12px;
    font-size: 0.8rem;
    color: #777777;
}

.chart-bars-area {
    grid-column: 2;
    grid-row: 1;
    border-left: 1px solid #cccccc;
    border-bottom: 1px solid #cccccc;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 0 10px;
}

.grid-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px dashed #e5e5e5;
    z-index: 1;
}
.line-1 { bottom: 25%; }
.line-2 { bottom: 50%; }
.line-3 { bottom: 75%; }
.line-4 { bottom: 100%; }

.bar {
    width: 10px;
    z-index: 2;
    border-radius: 2px 2px 0 0;
}

.bar-renovable { background-color: #00be6e; }
.bar-tradicional { background-color: #007bff; }

.x-axis 


table-responsive {
    width: 100%;
    overflow-x: auto;
}

.data-table {
    width: 100%;
    border-collapse: collapse;
    text-align: left;
}

.data-table th {
    font-size: 0.85rem;
    font-weight: 700;
    color: #212529;
    padding: 16px 12px;
    border-bottom: 1px solid #eaeaea;
}

.data-table td {
    font-size: 0.85rem;
    color: #555555;
    padding: 16px 12px;
    border-bottom: 1px solid #f2f2f2;
}

.data-table tbody tr:last-child td {
    border-bottom: none;
}

/* --- SECCIÓN DE LA GRÁFICA --- */
.chart-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
    margin-bottom: 30px;
}

.chart-title {
    display: flex;
    align-items: center;
    gap: 8px;
    font-size: 1rem;
    font-weight: 500;
    color: #212529;
}

.icon-green {
    fill: #00be6e;
}

.expand-btn {
    background: none;
    border: none;
    cursor: pointer;
    display: flex;
    align-items: center;
}

.expand-btn svg {
    fill: #444444;
}

/* --- ÁREA DEL GRÁFICO --- */
.chart-container {
    position: relative;
    height: 260px;
    margin-bottom: 24px;
    display: grid;
    grid-template-columns: 60px 1fr;
    grid-template-rows: 1fr 24px;
}

.y-axis {
    grid-column: 1;
    grid-row: 1;
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    align-items: flex-end;
    padding-right: 12px;
    font-size: 0.8rem;
    color: #777777;
}

.chart-bars-area {
    grid-column: 2;
    grid-row: 1;
    border-left: 1px solid #cccccc;
    border-bottom: 1px solid #cccccc;
    position: relative;
    display: flex;
    align-items: flex-end;
    justify-content: space-around;
    padding: 0 10px;
}

.grid-line {
    position: absolute;
    left: 0;
    right: 0;
    border-top: 1px dashed #e5e5e5;
    z-index: 1;
}
.line-1 { bottom: 25%; }
.line-2 { bottom: 50%; }
.line-3 { bottom: 75%; }
.line-4 { bottom: 100%; }

.bar {
    width: 10px;
    z-index: 2;
    border-radius: 2px 2px 0 0;
}

.bar-renovable {
    background-color: #00be6e;
}

.bar-tradicional {
    background-color: #007bff;
}

.x-axis {
    grid-column: 2;
    grid-row: 2;
    display: flex;
    justify-content: space-around;
    padding-top: 8px;
    font-size: 0.8rem;
    color: #555555;
}

/* Leyenda inferior */
.chart-legend {
    display: flex;
    justify-content: center;
    gap: 24px;
    margin-top: auto;
}

.legend-item {
    display: flex;
    align-items: center;
    gap: 8px;
}

.legend-color {
    width: 12px;
    height: 12px;
    display: inline-block;
}

.color-renovable { background-color: #00be6e; }
.color-tradicional { background-color: #007bff; }

.legend-text {
    font-size: 0.85rem;
    color: #007bff;
    font-weight: 500;
}
.legend-item:first-child .legend-text {
    color: #00be6e;
}

/* --- BOTÓN DE ACCIÓN INFERIOR --- */
.footer-actions {
    padding: 0 48px 48px 48px;
    display: flex;
    justify-content: flex-end;
}

.download-footer-btn {
    background-color: #ffffff;
    border: 1px solid #00BC70;
    border-radius: 8px;
    padding: 10px 24px;
    font-size: 0.85rem;
    color: #007147;
    font-weight: 500;
    cursor: pointer;
    display: flex;
    align-items: center;
    gap: 8px;
    transition: background-color 0.2s;
}

.download-footer-btn:hover {
    background-color: #f4fcf9;
}

/* --- RESPONSIVE --- */
@media (max-width: 992px) {
    .dashboard-layout {
        grid-template-columns: 1fr;
        gap: 24px;
        padding: 24px;
    }
    .toolbar-container {
        padding: 24px;
    }
    .footer-actions {
        padding: 24px;
    }
}

/* ==========================================================================
   8. PANTALLA 4: INICIAR SESIÓN (Login Card)
   ========================================================================== */
.login-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.login-card {
    background-color: #ffffff;
    width: 100%;
    max-width: 400px; /* Tamaño ideal y estilizado para el formulario */
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 
                0 1px 5px rgba(0, 0, 0, 0.04);
    padding: 40px 32px;
}

.login-form {
    display: flex;
    flex-direction: column;
    gap: 24px;
}

.login-form p, 
.login-form div {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
}

.login-form input {
    width: 100%;
}

.form-group {
    display: flex;
    flex-direction: column;
    gap: 8px;
}

.form-group label {
    font-size: 0.95rem;
    color: #333333;
    font-weight: 500;
}

.form-group input {
    width: 100%;
    height: 46px;
    padding: 0 14px;
    font-size: 1rem;
    color: #212529;
    background-color: #ffffff;
    border: 1px solid #dcdcdc;
    border-radius: 8px;
    outline: none;
    transition: border-color 0.2s ease, box-shadow 0.2s ease;
}

/* Enfoque visual del input para accesibilidad */
.form-group input:focus {
    border-color: #007147;
    box-shadow: 0 0 0 3px rgba(0, 113, 71, 0.1);
}

.submit-btn {
    background-color: #00be6e; /* Verde brillante e idéntico para el botón de acción */
    color: #ffffff;
    border: none;
    border-radius: 8px;
    height: 46px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

.submit-btn:hover {
    background-color: #00a860;
}

.submit-btn:active {
    transform: scale(0.98);
}

/* Ajuste responsive para pantallas pequeñas */
@media (max-width: 480px) {
    .login-card {
        padding: 32px 20px;

        
    }
}

/* ==========================================================================
   9. PANTALLA 5: Politicas de privacidad
   ========================================================================== */

.politica-container {
    flex: 1;
    display: flex;
    justify-content: center;
    align-items: center;
    padding: 24px;
}

.politica-card {
    background-color: #ffffff;
    width: 100%;
    max-width: 600px; 
    border-radius: 12px;
    box-shadow: 0 4px 20px rgba(0, 0, 0, 0.06), 
                0 1px 5px rgba(0, 0, 0, 0.04);
    padding: 40px 32px;
}

.politica-card h3 {
    text-align: center;
    margin-bottom: 20px;
}

.politica-img {
    text-align: center;
    margin-bottom: 20px;
}

.btn-sm {
    padding: 6px 12px;
    font-size: 0.85rem;
    border-radius: 4px;
    text-decoration: none;
    display: inline-block;
    color: white;
    background-color: #00be6e;
    transition: background-color 0.2s;
}

.btn-sm:hover {
    background-color: #005c3e;
}

.btn-danger {
    background-color: #dc3545;
    color: white;
}

.btn-danger:hover {
    background-color: #bd2130;
}

.btn-success {
    background-color: #28a745;
    color: white;
}

.btn-success:hover {
    background-color: #218838;
}

.action-actions {
    display: flex;
    gap: 8px;
}

.table-container {
    overflow-x: auto;
    margin-top: 20px;
    background-color: white;
    border-radius: 8px;
    box-shadow: 0 2px 5px rgba(0, 0, 0, 0.1);
}

.table {
    width: 100%;
    border-collapse: collapse;
}

.table th, .table td {
    padding: 12px 15px;
    text-align: left;
    border-bottom: 1px solid #ddd;
}

.table th {
    background-color: #007a53;
    color: white;
    font-weight: 500;
}

.table tr:hover {
    background-color: #f9f9f9;
}

.title-responsable {
    margin: 15px 0; 
    padding: 12px; 
    background-color: #f0f7f4; 
    border-left: 4px solid #007a53; 
    border-radius: 4px; 
    font-size: 0.9rem;
}

.title-data-user {
    margin: 15px 0; 
    font-size: 0.95rem; 
    color: #4b4b4b; 
    line-height: 1.4;
}

.carga-item-row {
    margin-bottom: 12px; 
    display: flex; 
    align-items: center; 
    gap: 10px;
}

.div-lista-cargas {
    max-height: 320px; 
    overflow-y: auto; 
    border: 1px solid #ccc; 
    padding: 15px; 
    border-radius: 4px; 
    background-color: #f9f9f9; 
    margin-bottom: 20px;
}

.label-cargas-disponibles {
    cursor: pointer; 
    font-weight: normal; 
    color: #333; 
    width: 100%;
}

.form-politicas {
    display: grid;
    grid-template-columns: 50% 1fr;
    gap: 12px;
}

.btn-politicas {
    width: 100%;
    border: none;
    padding: 12px;
    border-radius: 8px;
    cursor: pointer;
}

.reject-btn {
    background-color: #6c757d;
    color: #ffffff;
    border: none;
    border-radius: 8px;
    height: 46px;
    font-size: 0.95rem;
    font-weight: 600;
    cursor: pointer;
    display: flex;
    align-items: center;
    justify-content: center;
    margin-top: 8px;
    transition: background-color 0.2s ease, transform 0.1s ease;
}

/* Tarjeta Principal del Descargo */
.disclaimer-card {
    background-color: #ffffff;
    border-radius: 4px;
    box-shadow: 0 2px 8px rgba(0, 0, 0, 0.08);
    padding: 20px 25px;
    margin-bottom: 25px;
    transition: all 0.2s ease-in-out;
}

/* Cabecera (Título + Botón) */
.disclaimer-header {
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.disclaimer-title {
    font-size: 1rem;
    font-weight: 700;
    color: #000000;
    margin: 0;
}

/* Botón con el icono del ojo */
.disclaimer-toggle-btn {
    background: transparent;
    border: none;
    cursor: pointer;
    padding: 4px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #1a1a1a;
    border-radius: 4px;
    transition: background-color 0.2s;
}

.disclaimer-toggle-btn:hover {
    background-color: #f0f0f0;
}

.disclaimer-toggle-btn svg {
    width: 20px;
    height: 20px;
    stroke: currentColor;
    fill: none;
    stroke-width: 1.8;
    stroke-linecap: round;
    stroke-linejoin: round;
}

/* Contenido de texto y viñetas */
.disclaimer-content {
    margin-top: 15px;
    color: #1a1a1a;
    font-size: 0.9rem;
    line-height: 1.5;
}

.disclaimer-content p {
    margin-top: 0;
    margin-bottom: 12px;
}

.disclaimer-content ul {
    margin: 0;
    padding-left: 20px;
}

.disclaimer-content li {
    margin-bottom: 6px;
}

.disclaimer-content li:last-child {
    margin-bottom: 0;
}