/* css/estilo.css - Estilo Global Glassmorphism en Español */

:root {
    --bg-color: #0b132b;
    --card-bg: rgba(28, 37, 65, 0.45);
    --card-border: rgba(255, 255, 255, 0.08);
    --primary: #48cae4;
    --primary-hover: #00b4d8;
    --secondary: #7209b7;
    --accent: #fbbf24; /* Amarillo para sol/uv */
    --text: #f8f9fa;
    --text-muted: #a0aec0;
    --danger: #f87171;
    --exito: #4ade80;
}

* {
    box-sizing: border-box;
    margin: 0;
    padding: 0;
}

body {
    font-family: 'Outfit', sans-serif;
    background-color: var(--bg-color);
    background-image: 
        radial-gradient(at 0% 0%, rgba(114, 9, 183, 0.18) 0px, transparent 55%),
        radial-gradient(at 100% 100%, rgba(72, 202, 228, 0.15) 0px, transparent 55%);
    color: var(--text);
    min-height: 100vh;
    overflow-x: hidden;
}

/* Encabezado */
header {
    background: rgba(11, 19, 43, 0.7);
    backdrop-filter: blur(10px);
    border-bottom: 1px solid var(--card-border);
    padding: 15px 30px;
    display: flex;
    justify-content: space-between;
    align-items: center;
    position: sticky;
    top: 0;
    z-index: 1000;
}

.header-brand {
    display: flex;
    align-items: center;
    gap: 12px;
}

.logo-symbol {
    font-size: 2rem;
    animation: rotateLogo 8s linear infinite;
}

@keyframes rotateLogo {
    from { transform: rotate(0deg); }
    to { transform: rotate(360deg); }
}

header h1 {
    font-size: 1.3rem;
    font-weight: 700;
    letter-spacing: 0.5px;
    background: linear-gradient(45deg, var(--primary), #ffffff);
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
}

.header-nav {
    display: flex;
    align-items: center;
    gap: 15px;
}

/* Contenedor Principal */
.app-container {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
    display: grid;
    grid-template-columns: 320px 1fr;
    gap: 25px;
}

@media (max-width: 992px) {
    .app-container {
        grid-template-columns: 1fr;
    }
}

/* Panel Lateral (Estaciones) */
.sidebar {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

/* Tarjetas Glassmorphism */
.glass-card {
    background: var(--card-bg);
    border: 1px solid var(--card-border);
    backdrop-filter: blur(12px);
    border-radius: 16px;
    padding: 20px;
    box-shadow: 0 4px 30px rgba(0, 0, 0, 0.2);
    transition: transform 0.3s ease, box-shadow 0.3s ease;
}

.glass-card:hover {
    transform: translateY(-2px);
    box-shadow: 0 6px 35px rgba(72, 202, 228, 0.05);
}

.card-title {
    font-size: 1.1rem;
    font-weight: 600;
    margin-bottom: 15px;
    color: var(--primary);
    display: flex;
    align-items: center;
    gap: 8px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 8px;
}

/* Botones */
.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 8px 16px;
    border-radius: 8px;
    font-weight: 600;
    cursor: pointer;
    transition: all 0.3s ease;
    text-decoration: none;
    font-size: 0.9rem;
    font-family: inherit;
}

.btn-primary {
    background: var(--primary);
    color: #0b132b;
    border: none;
}

.btn-primary:hover {
    background: var(--primary-hover);
    box-shadow: 0 0 12px rgba(72, 202, 228, 0.3);
}

.btn-outline {
    background: transparent;
    color: var(--text);
    border: 1px solid var(--card-border);
}

.btn-outline:hover {
    background: rgba(255, 255, 255, 0.05);
    border-color: var(--text-muted);
}

/* Lista de Estaciones */
.estacion-item {
    padding: 12px 15px;
    border-radius: 8px;
    cursor: pointer;
    background: rgba(0, 0, 0, 0.15);
    border: 1px solid transparent;
    transition: all 0.2s ease;
    margin-bottom: 10px;
    display: flex;
    justify-content: space-between;
    align-items: center;
}

.estacion-item:hover {
    background: rgba(72, 202, 228, 0.08);
    border-color: rgba(72, 202, 228, 0.2);
}

.estacion-item.active {
    background: rgba(72, 202, 228, 0.15);
    border-color: var(--primary);
}

.estacion-info h4 {
    font-size: 0.95rem;
    font-weight: 600;
}

.estacion-info p {
    font-size: 0.8rem;
    color: var(--text-muted);
}

.estacion-temp {
    font-size: 1.2rem;
    font-weight: 700;
    color: var(--primary);
}

/* Contenido Principal */
.dashboard-content {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Tabs */
.tabs-nav {
    display: flex;
    gap: 10px;
    border-bottom: 1px solid var(--card-border);
    padding-bottom: 10px;
}

.tab-btn {
    background: transparent;
    border: none;
    color: var(--text-muted);
    padding: 10px 20px;
    cursor: pointer;
    font-size: 1rem;
    font-weight: 600;
    border-radius: 8px;
    transition: all 0.3s ease;
    font-family: inherit;
}

.tab-btn:hover {
    color: var(--text);
    background: rgba(255, 255, 255, 0.03);
}

.tab-btn.active {
    color: var(--primary);
    background: rgba(72, 202, 228, 0.1);
}

.tab-content {
    display: none;
}

.tab-content.active {
    display: flex;
    flex-direction: column;
    gap: 25px;
}

/* Grid de Tarjetas de Condiciones Actuales */
.grid-condiciones {
    display: grid;
    grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
    gap: 15px;
}

.widget-metrica {
    text-align: center;
    padding: 15px;
}

.widget-metrica .icono {
    font-size: 1.8rem;
    margin-bottom: 8px;
    display: block;
}

.widget-metrica .valor {
    font-size: 1.6rem;
    font-weight: 700;
    color: var(--text);
}

.widget-metrica .etiqueta {
    font-size: 0.8rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 0.5px;
    margin-top: 4px;
}

/* Brújula de Viento Animada */
.compas-contenedor {
    position: relative;
    width: 100px;
    height: 100px;
    margin: 10px auto;
    border: 2px solid var(--card-border);
    border-radius: 50%;
}

.compas-rosa {
    position: absolute;
    top: 50%;
    left: 50%;
    width: 0;
    height: 0;
    margin-left: -5px;
    margin-top: -45px;
    border-left: 5px solid transparent;
    border-right: 5px solid transparent;
    border-bottom: 45px solid var(--primary);
    transform-origin: 5px 45px;
    transition: transform 1.2s cubic-bezier(0.175, 0.885, 0.32, 1.275);
}

/* Mapa Leaflet Personalizado */
#mapa-estaciones {
    height: 380px;
    border-radius: 16px;
    border: 1px solid var(--card-border);
    z-index: 1;
}

/* Gráficos Contenedor */
.chart-container {
    position: relative;
    height: 300px;
    width: 100%;
}

/* Mensaje Suspensión o Bloqueo */
.bloqueo-abono {
    background: rgba(248, 113, 113, 0.15);
    border: 2px dashed var(--danger);
    border-radius: 16px;
    padding: 40px;
    text-align: center;
    color: var(--text);
    margin: 40px 0;
}

.bloqueo-abono h2 {
    color: var(--danger);
    font-size: 1.8rem;
    margin-bottom: 15px;
}

.bloqueo-abono p {
    color: var(--text-muted);
    font-size: 1rem;
    margin-bottom: 20px;
}
