:root {
    --bg: #f5f7fb;
    --surface: rgba(255, 255, 255, 0.75);
    --surface-solid: #ffffff;

    --text: #1f2937;
    --text-light: #6b7280;

    --primary: #2563eb;
    --danger: #ef4444;
    --warning: #f59e0b;
    --success: #10b981;

    --border: rgba(255,255,255,0.25);

    --shadow:
        0 10px 30px rgba(0,0,0,0.05);

    --radius: 20px;
}

* {
    margin: 0;
    padding: 0;
    box-sizing: border-box;
}

body {
    font-family: 'Inter', 'Segoe UI', sans-serif;
    background:
        radial-gradient(circle at top left, #dbeafe, transparent 30%),
        radial-gradient(circle at bottom right, #ede9fe, transparent 30%),
        var(--bg);

    color: var(--text);
    min-height: 100vh;
}

/* HEADER */

header {
    position: sticky;
    top: 0;
    z-index: 100;

    display: flex;
    justify-content: space-between;
    align-items: center;

    padding: 1rem 2rem;

    backdrop-filter: blur(14px);
    background: rgba(255,255,255,0.7);

    border-bottom: 1px solid rgba(255,255,255,0.3);

    box-shadow: 0 4px 20px rgba(0,0,0,0.03);
}

.logo {
    font-size: 1.2rem;
    font-weight: 700;
    letter-spacing: -0.5px;
}

.logo span {
    margin-left: 10px;
    color: var(--text-light);
    font-weight: 400;
    font-size: 0.9rem;
}

#last-update {
    color: var(--text-light);
    font-size: 0.9rem;
}

/* BOTÓN */

button {
    border: none;
    background: var(--primary);
    color: white;

    padding: 0.8rem 1.2rem;
    border-radius: 14px;

    font-weight: 600;
    cursor: pointer;

    transition: all 0.25s ease;

    display: flex;
    align-items: center;
    gap: 8px;

    box-shadow: 0 8px 20px rgba(37,99,235,0.25);
}

button:hover {
    transform: translateY(-2px);
    box-shadow: 0 12px 30px rgba(37,99,235,0.35);
}

/* MAIN */

main {
    max-width: 1450px;
    margin: auto;
    padding: 2rem;
}

/* TITULOS */

h2 {
    margin-bottom: 1rem;
    font-size: 1.3rem;
    font-weight: 700;

    display: flex;
    align-items: center;
    gap: 10px;
}

/* ALERTAS */

.scroll-container {
    display: flex;
    gap: 20px;
    overflow-x: auto;
    padding-bottom: 10px;

    scrollbar-width: none;
}

.scroll-container::-webkit-scrollbar {
    display: none;
}

.alert-card {
    min-width: 320px;

    background: rgba(255,255,255,0.7);

    backdrop-filter: blur(10px);

    border: 1px solid rgba(255,255,255,0.3);

    border-left: 5px solid var(--danger);

    padding: 1.2rem;

    border-radius: var(--radius);

    box-shadow: var(--shadow);

    transition: all 0.3s ease;
}

.alert-card:hover {
    transform: translateY(-4px);
}

.alert-card small {
    color: var(--text-light);
    font-size: 0.8rem;
}

.alert-card a {
    display: inline-block;
    margin-top: 1rem;

    text-decoration: none;

    color: var(--primary);
    font-weight: 600;
}

/* GRID */

.zona-section {
    margin-top: 3rem;
}

.grid {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
    gap: 24px;
}

/* CARDS */

.card {
    background: var(--surface);

    backdrop-filter: blur(12px);

    border: 1px solid var(--border);

    border-radius: var(--radius);

    padding: 1.5rem;

    box-shadow: var(--shadow);

    transition: all 0.3s ease;
}

.card:hover {
    transform: translateY(-6px);
    box-shadow:
        0 20px 40px rgba(0,0,0,0.08);
}

.card h4 {
    font-size: 1.1rem;
    margin-bottom: 1rem;

    padding-bottom: 1rem;

    border-bottom: 1px solid rgba(0,0,0,0.05);
}

/* STATUS */

.status-badge {
    display: inline-flex;
    align-items: center;
    gap: 6px;

    padding: 6px 14px;

    border-radius: 999px;

    font-size: 0.75rem;
    font-weight: 700;

    margin-bottom: 1rem;
}

.status-CRÍTICO {
    background: rgba(239,68,68,0.12);
    color: var(--danger);
}

.status-TRÁFICO {
    background: rgba(245,158,11,0.15);
    color: var(--warning);
}

.status-FLUIDO {
    background: rgba(16,185,129,0.12);
    color: var(--success);
}

/* INFO */

.info-row {
    display: flex;
    justify-content: space-between;
    align-items: center;

    margin-top: 12px;

    padding: 0.7rem 0;

    border-bottom: 1px solid rgba(0,0,0,0.04);

    font-size: 0.92rem;
}

.info-row:last-child {
    border-bottom: none;
}

.info-row i {
    width: 20px;
    color: var(--text-light);
}

/* RESPONSIVE */

@media (max-width: 768px) {

    header {
        flex-direction: column;
        gap: 1rem;
        align-items: flex-start;
    }

    main {
        padding: 1rem;
    }

    .grid {
        grid-template-columns: 1fr;
    }
}
