/* --- STATION AVAILABILITY DASHBOARD CSS --- */

.dashboard-body {
    margin: 0;
    padding: 0;
    height: 100vh;
    display: flex;
    flex-direction: column;
    overflow: hidden; /* Evita el scroll en toda la página, el mapa usa todo el espacio */
}

.dashboard-container {
    display: flex;
    flex: 1;
    height: calc(100vh - 70px); /* Resta la altura del header */
    background-color: #f8fafc;
}

/* Panel Lateral */
.sidebar {
    width: 400px;
    background-color: #ffffff;
    box-shadow: 2px 0 15px rgba(0,0,0,0.05);
    padding: 25px;
    display: flex;
    flex-direction: column;
    gap: 20px;
    overflow-y: auto;
    z-index: 10;
}

.sidebar-header h2 {
    font-size: 1.4rem;
    color: var(--brand-dark);
    margin-bottom: 5px;
}

.sidebar-header p {
    font-size: 0.9rem;
    color: #64748b;
}

.info-box {
    background-color: #f1f5f9;
    border-left: 4px solid var(--brand-blue);
    padding: 15px;
    border-radius: 4px;
    font-size: 0.85rem;
    color: #334155;
}

.info-box h3 {
    margin-bottom: 8px;
    font-size: 0.95rem;
    color: var(--brand-dark);
}

.info-box ul {
    margin-top: 5px;
    padding-left: 20px;
}

.control-group {
    border-top: 1px solid #e2e8f0;
    padding-top: 20px;
}

.control-group h3 {
    font-size: 1rem;
    margin-bottom: 15px;
    color: var(--brand-dark);
}

.input-row {
    display: flex;
    gap: 15px;
    margin-bottom: 15px;
}

.input-field {
    flex: 1;
    display: flex;
    flex-direction: column;
}

.input-field label {
    font-size: 0.8rem;
    font-weight: bold;
    color: #475569;
    margin-bottom: 5px;
}

.input-field input {
    width: 100%; /* Fuerza a que no exceda el límite de su columna */
    box-sizing: border-box; /* Evita que el padding ensanche la caja */
    padding: 10px;
    border: 1px solid #cbd5e1;
    border-radius: 5px;
    font-family: 'Roboto', sans-serif;
}

.btn-analizar {
    width: 100%;
    padding: 12px;
    background-color: #1e40af; /* Azul oscuro sólido asegurado */
    color: white;
    border: none;
    border-radius: 5px;
    font-weight: bold;
    cursor: pointer;
    transition: background 0.3s;
}

.btn-analizar:hover {
    background-color: #0f172a; /* Azul casi negro al pasar el ratón */
}

/* Resultados Dinámicos */
.result-container {
    padding: 20px;
    border-radius: 8px;
    text-align: center;
    animation: fadeIn 0.5s ease-in-out;
}

.result-container.hidden {
    display: none;
}

.result-success {
    background-color: #ecfdf5;
    border: 1px solid #10b981;
}

.result-warning {
    background-color: #fffbeb;
    border: 1px solid #f59e0b;
}

.result-title {
    font-size: 1.1rem;
    font-weight: bold;
    margin-bottom: 10px;
}

.result-success .result-title { color: #047857; }
.result-warning .result-title { color: #b45309; }

.result-text {
    font-size: 0.9rem;
    color: #334155;
    margin-bottom: 15px;
}

.btn-whatsapp-result {
    display: inline-block;
    background-color: #25D366;
    color: white;
    padding: 10px 15px;
    border-radius: 5px;
    text-decoration: none;
    font-weight: bold;
    width: 100%;
    box-sizing: border-box;
}

.btn-whatsapp-result:hover {
    background-color: #1ebe57;
}

/* Mapa */
.map-section {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.map-loader {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.9);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: var(--brand-dark);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* --- STATION AVAILABILITY DASHBOARD CSS --- */

/* ... (reglas anteriores iguales) */

/* Panel del Mapa */
.map-section {
    flex: 1;
    position: relative;
}

#map {
    width: 100%;
    height: 100%;
    z-index: 1;
}

.map-loader {
    position: absolute;
    top: 0; left: 0; right: 0; bottom: 0;
    background: rgba(255,255,255,0.9);
    z-index: 1000;
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    font-weight: bold;
    color: var(--brand-dark);
}

@keyframes fadeIn {
    from { opacity: 0; transform: translateY(-10px); }
    to { opacity: 1; transform: translateY(0); }
}

/* Responsividad para móviles */
@media (max-width: 768px) {
    .dashboard-container {
        flex-direction: column;
    }
    .sidebar {
        width: 100%;
        height: 50%;
        border-bottom: 2px solid #e2e8f0;
    }
    .map-section {
        height: 50%;
    }
}

/* --- REGLA CORREGIDA: Padding para el header global fixed --- */
.dashboard-container {
    display: flex;
    flex: 1;
    /* height: calc(100vh - 70px); -- Eliminamos esta línea, ya que el header global fixed se superpone */
    /* Eliminamos la altura fija calculada y añadimos un margen superior para hacer espacio al header global fixed */
    margin-top: 80px; /* Estimación de altura del header global fixed. Ajusta este valor si es necesario */
    height: calc(100vh - 80px); /* Nueva altura calculada restando el nuevo margen */
    background-color: #f8fafc;
}
