:root {
    --bg-color: #0f172a;
    --panel-bg: rgba(30, 41, 59, 0.7);
    --panel-border: rgba(255, 255, 255, 0.1);
    --text-color: #f8fafc;
    --text-muted: #94a3b8;
    --primary: #4ba4a4;
    /* Teal del logo */
    --primary-hover: #388484;
    --accent: #d9472e;
    /* Rojo/Naranja del logo */
    --navy: #1a2b4c;
    /* Azul Oscuro del escudo */
    --glass-blur: 12px;

    /* Risk Colors */
    --risk-1: #22c55e;
    --risk-2: #84cc16;
    --risk-3: #eab308;
    --risk-4: #f97316;
    --risk-5: #ef4444;
}

body {
    margin: 0;
    font-family: 'Inter', sans-serif;
    background-color: var(--bg-color);
    color: var(--text-color);
    overflow: hidden;
    height: 100vh;
}

/* Background Blobs */
.blob {
    position: absolute;
    filter: blur(80px);
    z-index: -1;
    opacity: 0.6;
    animation: float 10s infinite alternate ease-in-out;
}

.blob-1 {
    width: 400px;
    height: 400px;
    background: radial-gradient(circle, var(--accent), transparent);
    top: -100px;
    left: -100px;
}

.blob-2 {
    width: 500px;
    height: 500px;
    background: radial-gradient(circle, var(--primary), transparent);
    bottom: -200px;
    right: -100px;
    animation-delay: -5s;
}

.blob-3 {
    width: 300px;
    height: 300px;
    background: radial-gradient(circle, var(--navy), transparent);
    top: 40%;
    left: 30%;
    animation-delay: -2s;
}

@keyframes float {
    0% {
        transform: translateY(0px) scale(1);
    }

    100% {
        transform: translateY(30px) scale(1.1);
    }
}

/* Layout */
.dashboard-container {
    display: flex;
    height: 100vh;
    padding: 1rem;
    box-sizing: border-box;
    gap: 1rem;
}

.glass-panel {
    background: var(--panel-bg);
    backdrop-filter: blur(var(--glass-blur));
    border: 1px solid var(--panel-border);
    border-radius: 20px;
    box-shadow: 0 25px 50px -12px rgba(0, 0, 0, 0.5);
}

.sidebar {
    width: 350px;
    display: flex;
    flex-direction: column;
    padding: 2rem;
    overflow-y: auto;
}

.map-section {
    flex: 1;
    position: relative;
    overflow: hidden;
    display: flex;
}

#map {
    width: 100%;
    height: 100%;
    border-radius: 20px;
    z-index: 1;
}

/* Typography & Brand */
.brand-container {
    text-align: center;
    background: rgba(255, 255, 255, 0.9);
    border-radius: 15px;
    padding: 10px;
    margin-bottom: 0.5rem;
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.2);
}

.brand-logo {
    max-width: 100%;
    height: auto;
    display: block;
    margin: 0 auto;
}

.highlight {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    -webkit-background-clip: text;
    background-clip: text;
    -webkit-text-fill-color: transparent;
}

.subtitle {
    margin: 0 0 2rem 0;
    color: var(--text-muted);
    font-size: 0.95rem;
}

/* Forms */
.input-group {
    margin-bottom: 1.5rem;
    display: flex;
    flex-direction: column;
}

.input-group label {
    font-size: 0.85rem;
    text-transform: uppercase;
    letter-spacing: 1px;
    color: var(--text-muted);
    margin-bottom: 0.5rem;
    font-weight: 600;
}

select,
input {
    background: rgba(15, 23, 42, 0.6);
    border: 1px solid var(--panel-border);
    color: var(--text-color);
    padding: 0.85rem 1rem;
    border-radius: 10px;
    font-size: 1rem;
    font-family: inherit;
    outline: none;
    transition: all 0.3s ease;
}

select:focus,
input:focus {
    border-color: var(--primary);
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.25);
}

select:disabled {
    opacity: 0.5;
    cursor: not-allowed;
}

option {
    background: var(--bg-color);
    color: var(--text-color);
}

.submit-btn {
    background: linear-gradient(135deg, var(--primary), var(--accent));
    color: white;
    border: none;
    padding: 1rem;
    border-radius: 10px;
    font-size: 1.05rem;
    font-weight: 600;
    cursor: pointer;
    transition: transform 0.2s ease, box-shadow 0.2s ease;
    display: flex;
    justify-content: center;
    align-items: center;
    gap: 0.5rem;
}

.submit-btn:hover {
    transform: translateY(-2px);
    box-shadow: 0 10px 20px -10px var(--primary);
}

/* Status overlays */
.result-card {
    margin-top: 2rem;
    background: rgba(0, 0, 0, 0.2);
    border-radius: 15px;
    padding: 1.5rem;
    border: 1px solid var(--panel-border);
    text-align: center;
    animation: fadeIn 0.4s ease-out forwards;
}

.result-header {
    font-size: 0.85rem;
    color: var(--text-muted);
    text-transform: uppercase;
    letter-spacing: 1px;
}

.result-value {
    font-size: 3rem;
    font-weight: 700;
    margin: 0.5rem 0;
    text-shadow: 0 2px 10px rgba(0, 0, 0, 0.5);
}

.result-label {
    font-size: 1.1rem;
    font-weight: 500;
}

.legend {
    margin-top: auto;
    padding: 1rem;
}

.legend h4 {
    margin: 0 0 1rem 0;
    font-size: 0.9rem;
    color: var(--text-muted);
    text-transform: uppercase;
}

.legend ul {
    list-style: none;
    padding: 0;
    margin: 0;
}

.legend li {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    margin-bottom: 0.5rem;
    font-size: 0.9rem;
}

.color-box {
    width: 16px;
    height: 16px;
    border-radius: 4px;
}

.risk-1 {
    background-color: var(--risk-1);
    box-shadow: 0 0 10px var(--risk-1);
}

.risk-2 {
    background-color: var(--risk-2);
    box-shadow: 0 0 10px var(--risk-2);
}

.risk-3 {
    background-color: var(--risk-3);
    box-shadow: 0 0 10px var(--risk-3);
}

.risk-4 {
    background-color: var(--risk-4);
    box-shadow: 0 0 10px var(--risk-4);
}

.risk-5 {
    background-color: var(--risk-5);
    box-shadow: 0 0 10px var(--risk-5);
}


/* Map Overlays */
.map-overlay {
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: rgba(15, 23, 42, 0.8);
    backdrop-filter: blur(8px);
    display: flex;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    z-index: 999;
    color: var(--text-color);
    font-size: 1.2rem;
    transition: opacity 0.3s ease;
}

.hide {
    display: none !important;
}

/* Loader */
.spinner {
    width: 20px;
    height: 20px;
    border: 3px solid rgba(255, 255, 255, 0.3);
    border-radius: 50%;
    border-top-color: #fff;
    animation: spin 1s ease-in-out infinite;
}

@keyframes spin {
    to {
        transform: rotate(360deg);
    }
}

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

    to {
        opacity: 1;
        transform: translateY(0);
    }
}