/* ============================================
   A.R.C.A. SYSTEM - Custom Styles
   Design: Professional, bold, human-centered
   ============================================ */

/* ============================================
   Admin Topbar
   ============================================ */
.admin-topbar {
    z-index: 40;
    position: relative;
}

/* ============================================
   Force light mode on public site
   ============================================ */
:root { color-scheme: light only; }
html:not(.dark) {
    color-scheme: light only;
}
@media (prefers-color-scheme: dark) {
    html:not(.dark), html:not(.dark) body { background-color: #ffffff !important; color: #111827 !important; }
    html:not(.dark) img, html:not(.dark) video { filter: none !important; }
    input, select, textarea { background-color: #ffffff !important; color: #111827 !important; border-color: #d1d5db !important; }
}
html.dark,
html.dark body {
    background-color: #111827 !important;
    color: #f3f4f6 !important;
}
html.dark input,
html.dark select,
html.dark textarea {
    background-color: #1f2937 !important;
    color: #f3f4f6 !important;
    border-color: #374151 !important;
}

/* --- Navigation --- */
#mainNav {
    background: #0f172a;
    box-shadow: 0 1px 0 rgba(255,255,255,0.06);
}
#mainNav .nav-link {
    color: rgba(255,255,255,0.7);
    letter-spacing: 0.01em;
}
#mainNav .nav-link:hover {
    color: #ffffff;
    background: rgba(255,255,255,0.1);
}
#mainNav .nav-link.nav-link-active {
    color: #ffffff;
    background: rgba(255,255,255,0.12);
}
#mainNav.nav-hidden { transform: translateY(-100%); }

/* Side nav (scroll-triggered) */
#sideNav {
    box-shadow: 2px 0 20px rgba(0,0,0,0.15);
}
#sideNav.side-visible {
    display: flex !important;
    transform: translateX(0);
}
.side-nav-link.active {
    color: #ffffff;
    background: rgba(255,255,255,0.12);
}
.side-nav-link { position: relative; }
.side-nav-link::after {
    content: attr(title);
    position: absolute;
    left: calc(100% + 8px);
    top: 50%;
    transform: translateY(-50%) translateX(4px);
    background: #0f172a;
    color: #fff;
    font-size: 11px;
    font-weight: 600;
    padding: 4px 10px;
    border-radius: 6px;
    white-space: nowrap;
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s ease;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
}
.side-nav-link:hover::after {
    opacity: 1;
    transform: translateY(-50%) translateX(0);
}
body.side-nav-active { padding-left: 60px; transition: padding-left 0.3s ease; }
@media (max-width: 767px) {
    #sideNav { display: none !important; }
    body.side-nav-active { padding-left: 0; }
}

/* --- Mobile Drawer --- */
.mobile-drawer-overlay {
    position: fixed;
    inset: 0;
    z-index: 60;
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(4px);
    opacity: 0;
    visibility: hidden;
    transition: opacity 0.3s ease, visibility 0.3s ease;
}
.mobile-drawer-overlay.open {
    opacity: 1;
    visibility: visible;
}
.mobile-drawer {
    position: fixed;
    top: 0;
    left: 0;
    bottom: 0;
    width: 290px;
    max-width: 82vw;
    z-index: 70;
    background: #0f172a;
    transform: translateX(-100%);
    transition: transform 0.35s cubic-bezier(0.16, 1, 0.3, 1);
    display: flex;
    flex-direction: column;
    box-shadow: 4px 0 28px rgba(0,0,0,0.4);
}
.mobile-drawer.open {
    transform: translateX(0);
}
.mobile-drawer-header {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 1.1rem 1.25rem;
    border-bottom: 1px solid rgba(255,255,255,0.08);
    background: rgba(255,255,255,0.02);
}
.mobile-drawer-nav {
    flex: 1;
    padding: 0.85rem 0.75rem;
    overflow-y: auto;
    display: flex;
    flex-direction: column;
    gap: 2px;
}
.mobile-drawer-link {
    display: flex;
    align-items: center;
    gap: 0.85rem;
    padding: 0.8rem 1rem;
    border-radius: 12px;
    color: rgba(255,255,255,0.72);
    font-size: 0.9rem;
    font-weight: 500;
    transition: all 0.2s ease;
    position: relative;
}
.mobile-drawer-link:hover,
.mobile-drawer-link:active {
    background: rgba(255,255,255,0.07);
    color: #fff;
}
.mobile-drawer-link:hover {
    padding-left: 1.15rem;
}
.mobile-drawer-link-icon {
    width: 20px;
    text-align: center;
    font-size: 0.85rem;
    color: rgba(96,165,250,0.7);
}
.mobile-drawer-link:hover .mobile-drawer-link-icon {
    color: #60a5fa;
}
.mobile-drawer-link.mobile-drawer-link-active {
    background: rgba(37,99,235,0.16);
    color: #fff;
}
.mobile-drawer-link.mobile-drawer-link-active::before {
    content: '';
    position: absolute;
    left: 0;
    top: 50%;
    transform: translateY(-50%);
    width: 3px;
    height: 60%;
    background: #2563eb;
    border-radius: 0 3px 3px 0;
}
.mobile-drawer-link.mobile-drawer-link-active .mobile-drawer-link-icon {
    color: #60a5fa;
}
.mobile-drawer-footer {
    padding: 1rem 1.25rem;
    border-top: 1px solid rgba(255,255,255,0.08);
    background: rgba(0,0,0,0.2);
}
.mobile-drawer-header span {
    color: #fff;
}
.mobile-drawer-divider {
    height: 1px;
    background: rgba(255,255,255,0.08);
    margin: 0.6rem 0.5rem;
}
.mobile-drawer-cta {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    margin: 0.25rem 0.25rem 0;
    padding: 0.85rem 1rem;
    border-radius: 12px;
    background: linear-gradient(135deg, #dc2626, #b91c1c);
    color: #fff;
    font-size: 0.9rem;
    font-weight: 600;
    box-shadow: 0 4px 14px rgba(220,38,38,0.3);
    transition: all 0.2s ease;
}
.mobile-drawer-cta:hover,
.mobile-drawer-cta:active {
    background: linear-gradient(135deg, #ef4444, #dc2626);
    transform: translateY(-1px);
    box-shadow: 0 6px 18px rgba(220,38,38,0.4);
}
.mobile-drawer-cta i { font-size: 0.85rem; }

/* --- Hero (Map-first fullscreen) --- */
.arca-hero {
    position: relative;
    height: 100vh;
    min-height: 600px;
    overflow: hidden;
    background: #f5f5f5;
}
@media (max-width: 768px) {
    .arca-hero {
        height: 100svh;
        min-height: 500px;
    }
}
#heroMapContainer {
    position: absolute;
    inset: 0;
}
#heroMapContainer .leaflet-tile-pane { filter: saturate(1.1); }
#heroMapContainer .leaflet-control-zoom {
    border: none !important;
    border-radius: 10px !important;
    overflow: hidden;
    box-shadow: 0 2px 10px rgba(0,0,0,0.12) !important;
    margin-right: 14px !important;
    margin-bottom: 14px !important;
}
#heroMapContainer .leaflet-control-zoom a {
    background: #fff !important;
    color: #374151 !important;
    border: none !important;
    border-bottom: 1px solid #f0f0f0 !important;
    width: 34px !important; height: 34px !important; line-height: 34px !important; font-size: 16px !important;
}
#heroMapContainer .leaflet-control-zoom a:hover { background: #f9fafb !important; color: #111 !important; }
#heroMapContainer .leaflet-control-attribution { display: none !important; }

/* Layer toggle buttons */
.hero-layer-btn {
    padding: 6px 12px;
    border-radius: 20px;
    font-size: 11px;
    font-weight: 600;
    background: rgba(255,255,255,0.9);
    color: #4b5563;
    border: 1px solid rgba(0,0,0,0.08);
    cursor: pointer;
    transition: all 0.2s ease;
    display: inline-flex;
    align-items: center;
    gap: 5px;
    box-shadow: 0 1px 6px rgba(0,0,0,0.1);
    white-space: nowrap;
}
.hero-layer-btn:hover {
    background: #fff;
    color: #111;
    box-shadow: 0 2px 10px rgba(0,0,0,0.15);
}
.hero-layer-btn.active {
    background: #1E40AF;
    border-color: #1E40AF;
    color: #fff;
    box-shadow: 0 2px 10px rgba(30,64,175,0.35);
}
.layer-btn-badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 18px;
    height: 18px;
    padding: 0 5px;
    border-radius: 9px;
    font-size: 10px;
    font-weight: 700;
    line-height: 1;
    background: rgba(0,0,0,0.1);
    color: inherit;
}
.hero-layer-btn.active .layer-btn-badge {
    background: rgba(255,255,255,0.25);
}
@media (max-width: 768px) {
    .hero-bottom-strip {
        bottom: 0;
        left: 0;
        right: 0;
        border-radius: 0;
        z-index: 30;
        background: rgba(255,255,255,0.97);
        backdrop-filter: blur(16px);
        -webkit-backdrop-filter: blur(16px);
        border-top: 1px solid rgba(0,0,0,0.07);
        padding: 8px 6px calc(env(safe-area-inset-bottom, 6px) + 6px);
        box-shadow: 0 -4px 20px rgba(0,0,0,0.1);
    }
    .hero-bottom-hint { display: none; }
    .hero-bottom-btns {
        display: flex;
        justify-content: space-between;
        gap: 0;
        width: 100%;
    }
    .hero-layer-wrap {
        flex: 1 1 0;
        min-width: 0;
    }
    .hero-layer-btn {
        display: flex;
        flex-direction: column;
        align-items: center;
        justify-content: flex-start;
        gap: 3px;
        width: 100%;
        height: 50px;
        padding: 6px 0 0;
        border-radius: 12px;
        font-size: 10px;
        background: transparent;
        border: none;
        box-shadow: none;
        color: #9ca3af;
        transition: all 0.18s ease;
    }
    .hero-layer-btn i {
        font-size: 16px;
        display: flex;
        align-items: center;
        justify-content: center;
        width: 32px;
        height: 28px;
        border-radius: 10px;
        flex-shrink: 0;
        transition: all 0.18s ease;
    }
    .hero-layer-btn .hero-btn-label {
        display: block !important;
        font-size: 8.5px;
        font-weight: 600;
        line-height: 1;
        letter-spacing: -0.2px;
        white-space: nowrap;
        color: #9ca3af;
    }
    .hero-layer-btn:active {
        transform: scale(0.92);
    }
    .hero-layer-btn:hover {
        background: transparent;
        box-shadow: none;
        color: #9ca3af;
    }
    .hero-layer-btn.active {
        background: transparent;
        color: #9ca3af;
        border: none;
        box-shadow: none;
    }
    .hero-layer-btn.active .hero-btn-label {
        color: #9ca3af;
    }
    .hero-layer-btn.active i {
        background: #2563eb;
        color: #fff;
        box-shadow: none;
    }
    .hero-layer-btn .layer-btn-badge {
        position: absolute;
        top: 2px;
        right: 50%;
        margin-right: -20px;
        min-width: 14px;
        height: 14px;
        font-size: 8px;
        padding: 0 3px;
        border-radius: 7px;
        background: #ef4444;
        color: #fff;
        border: 1.5px solid #fff;
        box-shadow: 0 1px 4px rgba(0,0,0,0.2);
    }
    .hero-layer-btn.active .layer-btn-badge {
        background: #ef4444;
    }
    .hero-layer-wrap { position: relative; }
    .hero-layer-tooltip { display: none !important; }

    .hero-weather-card {
        top: auto;
        bottom: 60px;
        right: 0.5rem;
        left: 0.5rem;
        width: auto;
        max-height: 50vh;
        overflow-y: auto;
        padding: 10px 12px;
        border-radius: 14px;
        z-index: 22;
    }
    .hero-weather-card .weather-drag-handle { display: none; }

    .map-realtime-badge {
        top: 0.4rem;
        left: auto;
        right: 0.4rem;
        transform: none;
        font-size: 9px;
        padding: 4px 8px;
    }

    #heroMapContainer .leaflet-control-zoom {
        margin-right: 8px !important;
        margin-bottom: 68px !important;
    }
    #heroMapContainer .leaflet-control-zoom a {
        width: 28px !important; height: 28px !important;
        line-height: 28px !important; font-size: 14px !important;
    }
}
/* Weather card (floating, light theme) */
.hero-weather-card {
    position: absolute;
    top: 4rem;
    right: 1rem;
    z-index: 20;
    width: 310px;
    max-width: calc(100vw - 2rem);
    background: rgba(255,255,255,0.95);
    backdrop-filter: blur(20px);
    -webkit-backdrop-filter: blur(20px);
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 16px;
    padding: 14px;
    box-shadow: 0 8px 32px rgba(0,0,0,0.12);
    animation: hero-weather-rise 0.6s cubic-bezier(0.16,1,0.3,1) 0.5s both;
    color: #1f2937;
}
@keyframes hero-weather-rise {
    0% { opacity: 0; transform: translateY(-10px) scale(0.97); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
/* Widget city card */
.wt-city-card {
    margin-bottom: 10px;
    border-radius: 12px;
    overflow: hidden;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 1px 4px rgba(0,0,0,0.04);
}
.wt-city-img {
    height: 90px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #1E40AF;
}
.wt-city-img::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, rgba(0,0,0,0.1) 40%, transparent 70%);
}
.wt-city-img-name {
    position: absolute;
    bottom: 6px;
    left: 10px;
    z-index: 2;
    color: #fff;
    font-size: 14px;
    font-weight: 800;
    text-shadow: 0 1px 4px rgba(0,0,0,0.4);
    line-height: 1.2;
}
.wt-city-img-uf {
    font-size: 10px;
    font-weight: 600;
    background: rgba(255,255,255,0.2);
    backdrop-filter: blur(4px);
    padding: 1px 6px;
    border-radius: 4px;
    margin-left: 5px;
    vertical-align: middle;
}
.wt-city-img-region {
    position: absolute;
    top: 6px;
    right: 8px;
    z-index: 2;
    font-size: 8px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    background: rgba(0,0,0,0.3);
    backdrop-filter: blur(4px);
    padding: 2px 7px;
    border-radius: 6px;
    text-transform: uppercase;
    letter-spacing: 0.04em;
}
.wt-city-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 0;
    background: #f9fafb;
}
.wt-city-stat {
    font-size: 9px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 5px;
    padding: 6px 10px;
    border-bottom: 1px solid rgba(0,0,0,0.03);
    white-space: nowrap;
}
.wt-city-stat:nth-child(odd) {
    border-right: 1px solid rgba(0,0,0,0.03);
}
.wt-city-stat i {
    font-size: 8px;
    width: 14px;
    height: 14px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 4px;
    flex-shrink: 0;
}
.wt-city-stat:nth-child(1) i { color: #2563eb; background: #eff6ff; }
.wt-city-stat:nth-child(2) i { color: #16a34a; background: #f0fdf4; }
.wt-city-stat:nth-child(3) i { color: #ea580c; background: #fff7ed; }
.wt-city-stat:nth-child(4) i { color: #dc2626; background: #fef2f2; }
.wt-city-stat-label {
    color: #9ca3af;
    font-size: 8px;
    margin-right: 2px;
}
.wt-city-stat-value {
    font-weight: 700;
    color: #111827;
}

/* Dark theme city card */
.wt-dark .wt-city-stats { background: rgba(255,255,255,0.03); }
.wt-dark .wt-city-stat { color: rgba(255,255,255,0.6); border-color: rgba(255,255,255,0.04); }
.wt-dark .wt-city-stat:nth-child(odd) { border-right-color: rgba(255,255,255,0.04); }
.wt-dark .wt-city-stat:nth-child(1) i { color: #60a5fa; background: rgba(96,165,250,0.1); }
.wt-dark .wt-city-stat:nth-child(2) i { color: #4ade80; background: rgba(74,222,128,0.1); }
.wt-dark .wt-city-stat:nth-child(3) i { color: #fb923c; background: rgba(251,146,60,0.1); }
.wt-dark .wt-city-stat:nth-child(4) i { color: #f87171; background: rgba(248,113,113,0.1); }
.wt-dark .wt-city-stat-value { color: #fff; }
.wt-dark .wt-city-stat-label { color: rgba(255,255,255,0.3); }
.wt-dark .wt-city-card { border-color: rgba(255,255,255,0.06); box-shadow: none; }

/* Widget light theme helpers */
.wt-sep { color: #e5e7eb; }
.wt-city { color: #6b7280; }
.wt-alert-count { color: #d97706; }
.wt-ok { color: #059669; }
.wt-theme-btn {
    width: 22px; height: 22px; border-radius: 6px;
    display: flex; align-items: center; justify-content: center;
    background: rgba(0,0,0,0.05); color: #9ca3af;
    border: 1px solid rgba(0,0,0,0.06); cursor: pointer;
    transition: all 0.2s ease;
}
.wt-theme-btn:hover { background: rgba(0,0,0,0.1); color: #4b5563; }

/* Widget DARK theme override */
.hero-weather-card.wt-dark {
    background: rgba(10,15,44,0.92);
    border-color: rgba(255,255,255,0.08);
    color: #fff;
    box-shadow: 0 8px 32px rgba(0,0,0,0.3);
}
.wt-dark .wt-sep { color: rgba(255,255,255,0.1); }
.wt-dark .wt-city { color: rgba(255,255,255,0.5); }
.wt-dark .wt-alert-count { color: #fbbf24; }
.wt-dark .wt-ok { color: #34d399; }
.wt-dark .wt-theme-btn { background: rgba(255,255,255,0.08); color: rgba(255,255,255,0.5); border-color: rgba(255,255,255,0.08); }
.wt-dark .wt-theme-btn:hover { background: rgba(255,255,255,0.15); color: #fff; }
.wt-dark .hero-live-pulse { color: #34d399; }
.wt-dark .weather-drag-handle-bar { background: rgba(255,255,255,0.2); }
.wt-dark .text-gray-900 { color: #fff !important; }
.wt-dark .text-gray-800 { color: rgba(255,255,255,0.9) !important; }
.wt-dark .text-gray-500 { color: rgba(255,255,255,0.5) !important; }
.wt-dark .text-gray-400 { color: rgba(255,255,255,0.35) !important; }
.wt-dark .text-gray-200 { color: rgba(255,255,255,0.1) !important; }
.wt-dark .bg-gray-50 { background: rgba(255,255,255,0.06) !important; }
.wt-dark .border-gray-100 { border-color: rgba(255,255,255,0.06) !important; }
.wt-dark .text-blue-500 { color: #60a5fa !important; }
.wt-dark .text-red-400 { color: rgba(248,113,113,0.7) !important; }
.wt-dark .text-blue-400 { color: rgba(96,165,250,0.7) !important; }
.wt-dark .text-amber-600 { color: #fbbf24 !important; }
.wt-dark .text-emerald-500 { color: #34d399 !important; }
.wt-dark .forecast-day-active { background: rgba(255,255,255,0.08); border-color: rgba(255,255,255,0.12); }
.wt-dark .forecast-day:hover { background: rgba(255,255,255,0.05); border-color: rgba(255,255,255,0.08); }
.wt-dark .widget-alerts-section { border-top-color: rgba(255,255,255,0.06); }
.wt-dark .widget-alerts-banner-text div:first-child { color: #fff !important; }
.wt-dark .widget-alerts-banner-text div:last-child { color: rgba(255,255,255,0.4) !important; }
.wt-dark .widget-alert-title { color: #fff; }
.wt-dark .widget-alert-item:hover { background: rgba(255,255,255,0.04); }
.wt-dark .widget-alert-item + .widget-alert-item { border-top-color: rgba(255,255,255,0.04); }
.wt-dark .weather-accordion-toggle { color: rgba(255,255,255,0.6); }
.wt-dark .weather-accordion-toggle i { color: rgba(255,255,255,0.3); }

/* Bottom strip: hint left + layer buttons right */
.hero-bottom-strip {
    position: absolute;
    bottom: 0.75rem;
    left: 0.75rem;
    right: 0.75rem;
    z-index: 25;
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 0.5rem;
}
.hero-bottom-hint {
    background: rgba(0,0,0,0.5);
    backdrop-filter: blur(8px);
    color: rgba(255,255,255,0.65);
    font-size: 10px;
    padding: 6px 14px;
    border-radius: 20px;
    white-space: nowrap;
    transition: opacity 0.4s ease;
}
.hero-bottom-hint.hidden { opacity: 0; pointer-events: none; }
.hero-bottom-hint i { margin-right: 4px; font-size: 9px; }
.hero-bottom-btns {
    display: flex;
    align-items: flex-end;
    gap: 5px;
    flex-shrink: 0;
}

/* Hero map tools (inside thermometer) */
.hero-map-tools {
    display: flex;
    flex-direction: column;
    gap: 5px;
    padding: 8px 10px;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: rgba(0,0,0,0.02);
}
.hero-tool-btn {
    display: flex; align-items: center; gap: 5px;
    padding: 6px 10px; border-radius: 8px; width: 100%;
    background: #fff; border: 1px solid rgba(0,0,0,0.08);
    font-family: Inter, system-ui, sans-serif;
    font-size: 10px; font-weight: 600; color: #374151;
    cursor: pointer; transition: all 0.2s ease;
    white-space: nowrap;
}
.hero-tool-btn:hover {
    background: #2563eb; color: #fff; border-color: #2563eb;
}
.hero-tool-btn.locating {
    background: #2563eb; color: #fff; border-color: #1d4ed8;
}
.hero-tool-btn.located {
    background: #10b981; color: #fff; border-color: #10b981;
}
.hero-tool-btn i { font-size: 11px; }
.hero-tool-select {
    appearance: none; -webkit-appearance: none; width: 100%;
    padding: 6px 24px 6px 10px; border-radius: 8px;
    background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M0 0l5 6 5-6z' fill='%239ca3af'/%3E%3C/svg%3E") no-repeat right 8px center;
    border: 1px solid rgba(0,0,0,0.08);
    font-family: Inter, system-ui, sans-serif;
    font-size: 10px; font-weight: 600; color: #374151;
    cursor: pointer; transition: all 0.2s ease;
}
.hero-tool-select:hover { border-color: #2563eb; }
.hero-tool-select:focus { outline: none; border-color: #2563eb; box-shadow: 0 0 0 2px rgba(37,99,235,0.15); }

/* Weather card drag handle */
.weather-drag-handle {
    cursor: grab;
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 2px 0 6px;
    user-select: none;
}
.weather-drag-handle:active { cursor: grabbing; }
.weather-drag-handle-bar {
    width: 32px;
    height: 3px;
    border-radius: 2px;
    background: rgba(0,0,0,0.12);
}
.hero-weather-card.dragging {
    opacity: 0.9;
    transition: none !important;
}

/* Map active state (scroll enabled) */
.arca-hero.map-active #heroMapContainer { cursor: grab; }
.arca-hero:not(.map-active) #heroMapContainer { cursor: default; }

/* Legend panel */
.hero-legend {
    position: absolute;
    bottom: 4rem;
    left: 1rem;
    z-index: 20;
    display: none;
}
.hero-legend.visible { display: block; }

/* Radar precipitation legend */
.radar-legend {
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    border-radius: 12px;
    padding: 10px 14px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    border: 1px solid rgba(0,0,0,0.06);
    font-family: Inter, system-ui, sans-serif;
    min-width: 180px;
}
.radar-legend-header {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 11px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 8px;
}
.radar-legend-header i {
    font-size: 10px;
    color: #2563eb;
}
.radar-legend-scale {
    margin-bottom: 8px;
}
.radar-legend-bar {
    display: flex;
    height: 10px;
    border-radius: 5px;
    overflow: hidden;
}
.radar-legend-bar span {
    flex: 1;
}
.radar-legend-labels {
    display: flex;
    justify-content: space-between;
    margin-top: 3px;
    font-size: 7px;
    color: #9ca3af;
    font-weight: 600;
}
.radar-legend-unit {
    text-align: right;
    font-size: 8px;
    color: #6b7280;
    margin-top: 1px;
}
.radar-legend-info {
    border-top: 1px solid rgba(0,0,0,0.06);
    padding-top: 6px;
    margin-bottom: 6px;
}
.radar-legend-row {
    display: flex;
    align-items: center;
    gap: 6px;
    font-size: 10px;
    padding: 3px 0;
}
.radar-legend-row i {
    font-size: 9px;
    color: #6b7280;
    width: 14px;
    text-align: center;
}
.radar-legend-row span {
    flex: 1;
    color: #6b7280;
}
.radar-legend-row strong {
    color: #111827;
    font-size: 11px;
}
.radar-legend-time {
    font-size: 8px;
    color: #9ca3af;
    border-top: 1px solid rgba(0,0,0,0.04);
    padding-top: 5px;
}
.radar-legend-time i {
    margin-right: 3px;
    font-size: 7px;
}

/* Live pulse */
.hero-live-pulse {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    font-size: 0.5625rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #059669;
}
.hero-live-dot {
    width: 6px; height: 6px; border-radius: 50%; background: #10b981;
    animation: hero-live-pulse 2s ease-in-out infinite;
}
@keyframes hero-live-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.6); }
    50% { box-shadow: 0 0 0 4px rgba(16,185,129,0); }
}

/* --- Alert Pin Markers --- */
.alert-pin { background: none !important; border: none !important; cursor: pointer; }
.alert-pin-inner { display: flex; flex-direction: column; align-items: center; }
.alert-pin-head {
    width: 40px; height: 40px; border-radius: 50%;
    display: flex; align-items: center; justify-content: center;
    font-size: 15px; color: #fff;
    box-shadow: 0 4px 14px rgba(0,0,0,0.3);
    border: 3px solid #fff;
    transition: transform 0.25s cubic-bezier(0.16,1,0.3,1), box-shadow 0.25s ease;
    position: relative; z-index: 2;
}
.alert-pin-head::after {
    content: ''; position: absolute; inset: -6px; border-radius: 50%;
    border: 2.5px solid; border-color: inherit; opacity: 0;
    animation: alert-pin-ring 2s ease-in-out infinite;
}
@keyframes alert-pin-ring {
    0%, 100% { transform: scale(1); opacity: 0; }
    50% { transform: scale(1.6); opacity: 0.35; }
}
.alert-pin-stem { width: 3px; height: 12px; margin-top: -2px; border-radius: 0 0 2px 2px; }
.alert-pin-shadow { width: 16px; height: 5px; border-radius: 50%; background: rgba(0,0,0,0.2); margin-top: 1px; }
.alert-pin:hover .alert-pin-head {
    transform: scale(1.25) translateY(-4px);
    box-shadow: 0 8px 24px rgba(0,0,0,0.4);
}

/* Leaflet tooltip for alerts */
.leaflet-tooltip.alert-tooltip {
    background: rgba(15,20,40,0.94);
    backdrop-filter: blur(16px); -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.1);
    border-radius: 14px; padding: 14px 16px;
    box-shadow: 0 16px 48px rgba(0,0,0,0.4);
    font-family: Inter, system-ui, sans-serif; color: #fff;
    min-width: 240px; max-width: 300px;
    opacity: 0 !important; transition: opacity 0.2s ease !important;
}
.leaflet-tooltip.alert-tooltip.leaflet-tooltip-visible { opacity: 1 !important; }
.leaflet-tooltip.alert-tooltip::before { border-top-color: rgba(15,20,40,0.94) !important; }
.alert-tooltip-title { font-size: 13px; font-weight: 700; line-height: 1.3; margin-bottom: 4px; }
.alert-tooltip-severity { display: inline-block; padding: 2px 8px; border-radius: 6px; font-weight: 700; font-size: 10px; text-transform: uppercase; letter-spacing: 0.04em; }
.alert-tooltip-meta { font-size: 11px; color: rgba(255,255,255,0.4); margin-top: 6px; display: flex; align-items: center; gap: 4px; }
.alert-tooltip-section { margin-top: 8px; }
.alert-tooltip-section-label { font-size: 9px; text-transform: uppercase; letter-spacing: 0.06em; color: rgba(255,255,255,0.3); margin-bottom: 3px; }
.alert-tooltip-section-text { font-size: 11px; color: rgba(255,255,255,0.6); line-height: 1.5; }

/* Light tooltip for alert pins on map */
.leaflet-tooltip.alert-tooltip-light {
    background: #ffffff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 14px;
    padding: 14px 16px;
    box-shadow: 0 12px 40px rgba(0,0,0,0.15);
    font-family: Inter, system-ui, sans-serif;
    color: #1f2937;
    min-width: 240px;
    max-width: 320px;
    opacity: 0 !important;
    transition: opacity 0.2s ease !important;
}
.leaflet-tooltip.alert-tooltip-light.leaflet-tooltip-visible { opacity: 1 !important; }
.leaflet-tooltip.alert-tooltip-light::before { border-top-color: #ffffff !important; }

/* Danger zone heatmap effect (Perigo / Grande Perigo) */
.alert-danger-zone {
    animation: danger-pulse 2s ease-in-out infinite;
}
@keyframes danger-pulse {
    0%, 100% { fill-opacity: 0.15; stroke-opacity: 0.7; }
    50% { fill-opacity: 0.30; stroke-opacity: 1; }
}

/* City marker tooltip */
.leaflet-tooltip.city-tooltip {
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 10px;
    padding: 8px 12px;
    box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    font-family: Inter, system-ui, sans-serif;
    color: #1f2937;
}
.leaflet-tooltip.city-tooltip::before {
    border-top-color: #fff !important;
}

/* Alert polygon hover */
.alert-polygon { transition: fill-opacity 0.2s ease; }
.alert-polygon:hover { fill-opacity: 0.18 !important; }

/* Layer button wrapper + custom tooltip */
.hero-layer-wrap {
    position: relative;
}
.hero-layer-tooltip {
    position: absolute;
    bottom: calc(100% + 8px);
    left: 50%;
    transform: translateX(-50%) translateY(4px);
    opacity: 0;
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
    z-index: 50;
    white-space: nowrap;
}
.hero-layer-wrap:hover .hero-layer-tooltip {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.hero-layer-tooltip-title {
    font-size: 11px;
    font-weight: 700;
    color: #fff;
    background: rgba(15, 20, 40, 0.92);
    backdrop-filter: blur(12px);
    padding: 6px 12px 4px;
    border-radius: 8px 8px 0 0;
    border: 1px solid rgba(255,255,255,0.1);
    border-bottom: none;
    text-align: center;
}
.hero-layer-tooltip-desc {
    font-size: 9px;
    color: rgba(255,255,255,0.5);
    background: rgba(15, 20, 40, 0.92);
    backdrop-filter: blur(12px);
    padding: 0 12px 6px;
    border-radius: 0 0 8px 8px;
    border: 1px solid rgba(255,255,255,0.1);
    border-top: none;
    text-align: center;
    max-width: 200px;
    white-space: normal;
    line-height: 1.4;
}
.hero-layer-tooltip::after {
    content: '';
    position: absolute;
    top: 100%;
    left: 50%;
    transform: translateX(-50%);
    border: 5px solid transparent;
    border-top-color: rgba(15, 20, 40, 0.92);
}

/* Capital tooltip with city card */
.leaflet-tooltip.capital-tooltip {
    background: #fff;
    border: 1px solid rgba(0,0,0,0.08);
    border-radius: 12px;
    padding: 0;
    box-shadow: 0 8px 28px rgba(0,0,0,0.15);
    font-family: Inter, system-ui, sans-serif;
    color: #1f2937;
    min-width: 220px;
    max-width: 260px;
    overflow: hidden;
    opacity: 0 !important;
    transition: opacity 0.2s ease !important;
}
.leaflet-tooltip.capital-tooltip.leaflet-tooltip-visible { opacity: 1 !important; }
.leaflet-tooltip.capital-tooltip::before { border-top-color: #fff !important; }
.capital-tip-img {
    height: 70px;
    background-size: cover;
    background-position: center;
    position: relative;
    background-color: #1E40AF;
}
.capital-tip-overlay {
    position: absolute;
    bottom: 0; left: 0; right: 0;
    padding: 6px 10px;
    background: linear-gradient(0deg, rgba(0,0,0,0.6) 0%, transparent 100%);
    display: flex;
    align-items: center;
    gap: 5px;
}
.capital-tip-name {
    color: #fff;
    font-size: 13px;
    font-weight: 800;
    text-shadow: 0 1px 3px rgba(0,0,0,0.3);
}
.capital-tip-uf {
    font-size: 9px;
    font-weight: 600;
    color: rgba(255,255,255,0.8);
    background: rgba(255,255,255,0.2);
    padding: 1px 5px;
    border-radius: 4px;
}
.capital-tip-body {
    padding: 8px 10px 10px;
}
.capital-tip-weather {
    font-size: 12px;
    color: #374151;
    display: flex;
    align-items: center;
    gap: 5px;
    margin-bottom: 6px;
}
.capital-tip-weather strong { color: #111827; font-size: 14px; }
.capital-tip-weather span { color: #6b7280; font-size: 11px; }
.capital-tip-stats {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 3px 10px;
}
.capital-tip-stats span {
    font-size: 9px;
    color: #4b5563;
    display: flex;
    align-items: center;
    gap: 4px;
}
.capital-tip-stats i {
    font-size: 7px;
    color: #9ca3af;
}

/* Capital city weather balloons */
.capital-marker-wrap {
    background: none !important;
    border: none !important;
}
.capital-balloon {
    display: inline-flex;
    align-items: center;
    gap: 4px;
    padding: 3px 8px;
    border-radius: 12px;
    background: rgba(255,255,255,0.92);
    backdrop-filter: blur(4px);
    font-family: Inter, system-ui, sans-serif;
    box-shadow: 0 2px 8px rgba(0,0,0,0.15);
    border: 1px solid rgba(0,0,0,0.06);
    white-space: nowrap;
}
.capital-temp {
    font-size: 11px;
    font-weight: 800;
    color: #1f2937;
}

/* Widget alert location line */
.widget-alert-location {
    font-size: 8px;
    color: rgba(255,255,255,0.25);
    margin-top: 2px;
}

/* Widget alert item hover highlight */
.widget-alert-item:hover {
    background: rgba(255,255,255,0.04);
    border-radius: 6px;
    margin: 0 -4px;
    padding: 6px 4px;
}

/* Alert risk zone labels on map */
.alert-zone-label {
    background: none !important;
    border: none !important;
}
.alert-zone-tag {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 4px 10px;
    border-radius: 6px;
    color: #fff;
    font-family: Inter, system-ui, sans-serif;
    font-size: 10px;
    font-weight: 800;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    box-shadow: 0 2px 8px rgba(0,0,0,0.3);
    white-space: nowrap;
    border: 1.5px solid rgba(255,255,255,0.5);
}
.alert-risk-zone {
    animation: risk-zone-pulse 3s ease-in-out infinite;
}
@keyframes risk-zone-pulse {
    0%, 100% { fill-opacity: 0.08; }
    50% { fill-opacity: 0.18; }
}

/* Widget alerts section (light theme) */
.widget-alerts-section {
    margin-top: 10px;
    padding-top: 10px;
    border-top: 1px solid rgba(0,0,0,0.06);
}
.widget-alerts-banner {
    display: flex;
    align-items: center;
    gap: 10px;
    padding: 8px 10px;
    border-radius: 10px;
    margin-bottom: 6px;
}
.widget-alerts-banner-icon {
    width: 26px;
    height: 26px;
    border-radius: 8px;
    display: flex;
    align-items: center;
    justify-content: center;
    color: #fff;
    font-size: 11px;
    flex-shrink: 0;
}
.widget-alerts-banner-text {
    flex: 1;
    min-width: 0;
}
.widget-alert-item {
    position: relative;
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 5px 4px;
    border-radius: 8px;
    cursor: pointer;
    transition: background 0.2s ease;
}
.widget-alert-item:hover {
    background: rgba(0,0,0,0.03);
}
.widget-alert-item + .widget-alert-item {
    border-top: 1px solid rgba(0,0,0,0.04);
}
.widget-alert-dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.widget-alert-content {
    flex: 1;
    min-width: 0;
}
.widget-alert-title {
    font-size: 10px;
    font-weight: 600;
    color: #1f2937;
    line-height: 1.3;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
}
.widget-alert-meta {
    display: none;
}
.widget-alert-severity-inline {
    font-size: 9px;
    font-weight: 700;
}
/* Alert thermometer (left side of map) */
.alert-thermometer {
    position: absolute;
    left: 1rem;
    top: 50%;
    transform: translateY(-50%);
    z-index: 20;
    width: 220px;
    background: rgba(255,255,255,0.96);
    backdrop-filter: blur(12px);
    border-radius: 14px;
    border: 1px solid rgba(0,0,0,0.06);
    box-shadow: 0 4px 20px rgba(0,0,0,0.1);
    overflow: hidden;
    font-family: Inter, system-ui, sans-serif;
}
.alert-thermo-header {
    display: flex;
    align-items: center;
    gap: 6px;
    padding: 10px 12px;
    font-size: 11px;
    font-weight: 700;
    color: #1f2937;
    border-bottom: 1px solid rgba(0,0,0,0.05);
    background: rgba(0,0,0,0.02);
}
.alert-thermo-header i {
    color: #ef4444;
    font-size: 13px;
}
.alert-thermo-bar {
    padding: 6px 0;
}
.alert-thermo-level {
    display: flex;
    align-items: stretch;
    gap: 0;
    padding: 0 12px;
    cursor: default;
    transition: background 0.15s ease;
}
.alert-thermo-level:hover {
    background: rgba(0,0,0,0.03);
}
.alert-thermo-color {
    width: 4px;
    flex-shrink: 0;
    border-radius: 2px;
    margin: 4px 0;
}
.alert-thermo-info {
    display: flex;
    align-items: center;
    gap: 8px;
    padding: 7px 0 7px 10px;
    flex: 1;
}
.alert-thermo-icon {
    width: 24px;
    height: 24px;
    border-radius: 6px;
    display: flex;
    align-items: center;
    justify-content: center;
    flex-shrink: 0;
    font-size: 10px;
}
.alert-thermo-5 .alert-thermo-icon { background: #fef2f2; color: #ef4444; }
.alert-thermo-4 .alert-thermo-icon { background: #fff7ed; color: #f97316; }
.alert-thermo-3 .alert-thermo-icon { background: #fefce8; color: #eab308; }
.alert-thermo-2 .alert-thermo-icon { background: #eff6ff; color: #3b82f6; }
.alert-thermo-1 .alert-thermo-icon { background: #ecfdf5; color: #10b981; }

.alert-thermo-name {
    font-size: 10px;
    font-weight: 700;
    color: #111827;
    line-height: 1.2;
}
.alert-thermo-desc {
    font-size: 8px;
    color: #9ca3af;
    line-height: 1.3;
    margin-top: 1px;
}
.alert-thermo-footer {
    padding: 6px 12px;
    font-size: 8px;
    color: #9ca3af;
    border-top: 1px solid rgba(0,0,0,0.04);
    display: flex;
    align-items: center;
    gap: 4px;
}
.alert-thermo-footer i { font-size: 7px; }

@media (max-width: 768px) {
    .alert-thermometer {
        position: absolute;
        left: 0.5rem;
        right: auto;
        top: 0.5rem;
        bottom: auto;
        transform: none;
        width: auto;
        min-width: 0;
        border-radius: 10px;
    }
    .alert-thermo-bar,
    .alert-thermo-footer,
    .alert-thermo-header {
        display: none;
    }
    .hero-map-tools {
        flex-direction: row;
        padding: 0;
        border-bottom: none;
        background: transparent;
        gap: 0;
    }
    .hero-tool-btn {
        display: none;
    }
    .hero-tool-select {
        font-size: 10px;
        padding: 7px 22px 7px 10px;
        max-width: 150px;
        border-radius: 9px;
        background-color: rgba(255,255,255,0.96);
        box-shadow: 0 2px 8px rgba(0,0,0,0.12);
    }
}

/* Alert list scrollable */
.widget-alerts-list.widget-alerts-scrollable {
    max-height: 280px;
    overflow-y: auto;
    scrollbar-width: thin;
    scrollbar-color: rgba(0,0,0,0.1) transparent;
}
.widget-alerts-list.widget-alerts-scrollable::-webkit-scrollbar { width: 3px; }
.widget-alerts-list.widget-alerts-scrollable::-webkit-scrollbar-thumb { background: rgba(0,0,0,0.1); border-radius: 2px; }
.widget-alerts-actions { margin-top: 6px; }

/* Alert goto icon */
.widget-alert-goto {
    font-size: 9px;
    color: #d1d5db;
    flex-shrink: 0;
    transition: color 0.2s ease;
}
.widget-alert-item:hover .widget-alert-goto { color: #2563eb; }
.wt-dark .widget-alert-goto { color: rgba(255,255,255,0.15); }
.wt-dark .widget-alert-item:hover .widget-alert-goto { color: #60a5fa; }

/* Ver mais alertas button */
.widget-alerts-expand {
    display: block;
    width: 100%;
    padding: 0;
    margin-top: 8px;
    border: none;
    background: none;
    cursor: pointer;
    font-family: inherit;
}
.widget-alerts-expand-inner {
    display: flex;
    align-items: center;
    justify-content: center;
    gap: 8px;
    padding: 8px 0;
    background: linear-gradient(135deg, #eff6ff 0%, #f0fdf4 100%);
    border: 1px solid #dbeafe;
    border-radius: 10px;
    color: #1E40AF;
    font-size: 11px;
    font-weight: 600;
    transition: all 0.25s ease;
}
.widget-alerts-expand:hover .widget-alerts-expand-inner {
    background: linear-gradient(135deg, #dbeafe 0%, #dcfce7 100%);
    border-color: #93c5fd;
    box-shadow: 0 2px 8px rgba(37,99,235,0.1);
    transform: translateY(-1px);
}
.widget-alerts-expand-inner i { font-size: 9px; }
.widget-alerts-expand-badge {
    background: #ef4444;
    color: #fff;
    font-size: 9px;
    font-weight: 700;
    min-width: 18px;
    height: 18px;
    border-radius: 9px;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    padding: 0 5px;
    line-height: 1;
    box-shadow: 0 1px 3px rgba(239,68,68,0.3);
}
.wt-dark .widget-alerts-expand-inner { background: rgba(255,255,255,0.04); border-color: rgba(255,255,255,0.08); color: #60a5fa; }
.wt-dark .widget-alerts-expand:hover .widget-alerts-expand-inner { background: rgba(96,165,250,0.08); border-color: rgba(96,165,250,0.2); box-shadow: none; }
.widget-alert-risks, .widget-alert-location {
    display: none;
}

/* Alert hover tooltip (appears above item) */
.widget-alert-tooltip {
    position: absolute;
    bottom: calc(100% + 6px);
    left: 0;
    right: 0;
    z-index: 50;
    opacity: 0;
    transform: translateY(4px);
    pointer-events: none;
    transition: all 0.2s cubic-bezier(0.16, 1, 0.3, 1);
}
.widget-alert-item:hover .widget-alert-tooltip {
    opacity: 1;
    transform: translateY(0);
    pointer-events: auto;
}
.widget-alert-tooltip-inner {
    background: #ffffff;
    border-radius: 12px;
    padding: 12px 14px;
    box-shadow: 0 12px 32px rgba(0,0,0,0.18);
    border: 1px solid rgba(0,0,0,0.06);
    color: #1f2937;
    font-size: 10px;
    line-height: 1.5;
}
.widget-alert-tooltip-inner::after {
    content: '';
    position: absolute;
    bottom: -5px;
    left: 20px;
    width: 10px;
    height: 10px;
    background: #ffffff;
    border-right: 1px solid rgba(0,0,0,0.06);
    border-bottom: 1px solid rgba(0,0,0,0.06);
    transform: rotate(45deg);
}
.widget-alert-tooltip-head {
    font-size: 12px;
    font-weight: 700;
    color: #111827;
    margin-bottom: 4px;
}
.widget-alert-tooltip-row {
    font-size: 9px;
    color: #6b7280;
    margin-top: 3px;
}
.widget-alert-tooltip-row i {
    width: 12px;
    text-align: center;
    margin-right: 4px;
    font-size: 8px;
    color: #9ca3af;
}

/* Shelter map pins */
.shelter-marker { background:none !important; border:none !important; }
.shelter-pin { display:flex; flex-direction:column; align-items:center; filter:drop-shadow(0 3px 6px rgba(0,0,0,0.25)); }
.shelter-pin-head {
    width:38px; height:38px; border-radius:12px;
    background:#10b981; display:flex; align-items:center; justify-content:center;
    font-size:16px; color:#fff; border:3px solid #fff;
    box-shadow:0 0 0 2px rgba(16,185,129,0.3);
    transition:transform 0.2s ease, box-shadow 0.2s ease;
    position:relative;
}
.shelter-pin-head::after {
    content:''; position:absolute; inset:-6px; border-radius:16px;
    border:2px solid rgba(16,185,129,0.25);
    animation:shelter-pulse 2.5s ease-in-out infinite;
}
@keyframes shelter-pulse {
    0%,100% { transform:scale(1); opacity:0.5; }
    50% { transform:scale(1.2); opacity:0; }
}
.shelter-marker:hover .shelter-pin-head { transform:scale(1.2); box-shadow:0 0 0 4px rgba(16,185,129,0.3); }
.shelter-pin-stem { width:3px; height:10px; background:#10b981; margin-top:-2px; border-radius:0 0 2px 2px; }
.shelter-pin-label {
    background:#10b981; color:#fff; font-family:Inter,sans-serif;
    font-size:8px; font-weight:700; text-transform:uppercase; letter-spacing:0.04em;
    padding:2px 6px; border-radius:4px; margin-top:2px;
    white-space:nowrap;
}

/* Shelter popup */
.shelter-popup-wrap .leaflet-popup-content-wrapper {
    background:#fff; border-radius:14px; padding:0;
    box-shadow:0 8px 28px rgba(0,0,0,0.15); border:1px solid rgba(0,0,0,0.06);
}
.shelter-popup-wrap .leaflet-popup-content { margin:0; font-family:Inter,system-ui,sans-serif; }
.shelter-popup-wrap .leaflet-popup-tip { background:#fff; }
.shelter-popup-header { padding:12px 14px; border-left:3px solid #10b981; }
.shelter-popup-title { font-size:14px; font-weight:700; color:#111827; }
.shelter-popup-type { font-size:10px; color:#6b7280; margin-top:1px; }
.shelter-popup-body { padding:10px 14px 14px; border-top:1px solid #f3f4f6; }
.shelter-popup-row { font-size:11px; color:#4b5563; display:flex; align-items:center; gap:6px; margin-bottom:6px; }
.shelter-popup-row i { font-size:10px; color:#9ca3af; width:14px; text-align:center; }
.shelter-popup-capacity { display:flex; align-items:center; gap:8px; margin-bottom:8px; }
.shelter-popup-bar-bg { flex:1; height:6px; background:#f3f4f6; border-radius:3px; overflow:hidden; }
.shelter-popup-bar-fill { height:100%; border-radius:3px; transition:width 0.3s ease; }
.shelter-popup-capacity span { font-size:10px; font-weight:600; color:#374151; white-space:nowrap; }
.shelter-popup-amenities { display:flex; align-items:center; gap:6px; font-size:10px; color:#6b7280; margin-bottom:6px; flex-wrap:wrap; }
.shelter-popup-amenities i { font-size:9px; }
.shelter-popup-route {
    display:flex; align-items:center; justify-content:center; gap:6px;
    margin-top:8px; padding:8px; border-radius:10px;
    background:linear-gradient(135deg,#2563eb,#1d4ed8); color:#ffffff !important;
    font-size:11px; font-weight:600; text-decoration:none;
    transition:all 0.2s ease; box-shadow:0 2px 6px rgba(37,99,235,0.3);
}
.shelter-popup-route:hover { box-shadow:0 4px 12px rgba(37,99,235,0.4); transform:translateY(-1px); color:#ffffff !important; }
.shelter-popup-route i { font-size:12px; }

/* User location pin */
.user-location-wrap { background:none !important; border:none !important; }
.user-location-pin { position:relative; width:24px; height:24px; }
.user-location-dot {
    position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
    width:12px; height:12px; border-radius:50%;
    background:#2563eb; border:3px solid #fff;
    box-shadow:0 2px 8px rgba(37,99,235,0.4);
    z-index:2;
}
.user-location-ring {
    position:absolute; top:50%; left:50%; transform:translate(-50%,-50%);
    width:24px; height:24px; border-radius:50%;
    border:2px solid rgba(37,99,235,0.3);
    animation:user-loc-pulse 2s ease-in-out infinite;
}
@keyframes user-loc-pulse {
    0%,100% { transform:translate(-50%,-50%) scale(1); opacity:0.6; }
    50% { transform:translate(-50%,-50%) scale(1.8); opacity:0; }
}

/* Unused - hide */
.hero-overlay, .hero-grid-overlay, .hero-accent, .hero-panel, .hero-map-area { display: none; }

/* Animated particles */
.arca-particle {
    position: absolute;
    border-radius: 50%;
    background: rgba(255,255,255,0.2);
    pointer-events: none;
    animation: particle-float linear infinite;
}
@keyframes particle-float {
    0% { transform: translateY(100vh) scale(0) rotate(0deg); opacity: 0; }
    5% { opacity: 0.6; }
    85% { opacity: 0.6; }
    100% { transform: translateY(-10vh) scale(1) rotate(720deg); opacity: 0; }
}

/* Arc letters animation */
.arca-letter {
    display: inline-block;
    opacity: 0;
    animation: letter-reveal 0.7s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes letter-reveal {
    0% { opacity: 0; transform: translateY(40px) scale(0.8) rotateX(40deg); filter: blur(4px); }
    100% { opacity: 1; transform: translateY(0) scale(1) rotateX(0); filter: blur(0); }
}
.arca-dot {
    display: inline-block;
    animation: dot-glow 1.2s ease-in-out infinite;
}
@keyframes dot-glow {
    0%, 100% { opacity: 0.3; text-shadow: 0 0 0px rgba(147,197,253,0); }
    50% { opacity: 1; text-shadow: 0 0 12px rgba(147,197,253,0.8), 0 0 24px rgba(147,197,253,0.4); }
}

/* Glitch animation */
.arca-glitch {
    display: inline-block;
    opacity: 0;
    animation: glitch-in 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    position: relative;
}
@keyframes glitch-in {
    0% { opacity: 0; transform: translateX(-20px) skewX(-10deg); clip-path: inset(100% 0 0 0); }
    10% { opacity: 1; transform: translateX(3px) skewX(3deg); clip-path: inset(0 0 80% 0); }
    20% { transform: translateX(-3px) skewX(-3deg); clip-path: inset(20% 0 60% 0); }
    30% { transform: translateX(2px) skewX(2deg); clip-path: inset(40% 0 40% 0); }
    40% { transform: translateX(-2px) skewX(-2deg); clip-path: inset(60% 0 20% 0); }
    50% { transform: translateX(1px) skewX(1deg); clip-path: inset(80% 0 0 0); }
    60% { opacity: 1; transform: translateX(0) skewX(0); clip-path: inset(0 0 0 0); }
}
.arca-glitch::before,
.arca-glitch::after {
    content: attr(data-char);
    position: absolute;
    inset: 0;
    opacity: 0;
    animation: glitch-split 1.2s ease-in-out forwards;
    animation-delay: inherit;
}
.arca-glitch::before {
    color: #f472b6;
    clip-path: inset(0 0 50% 0);
    transform: translateX(-2px);
}
.arca-glitch::after {
    color: #60a5fa;
    clip-path: inset(50% 0 0 0);
    transform: translateX(2px);
}
@keyframes glitch-split {
    0%, 50% { opacity: 0; }
    5%, 45% { opacity: 0.8; }
    55%, 100% { opacity: 0; }
}

/* Morph animation */
.arca-morph {
    display: inline-block;
    opacity: 0;
    animation: morph-in 0.3s ease forwards;
    transition: color 0.3s ease;
}
@keyframes morph-in {
    0% { opacity: 0; filter: blur(4px); }
    100% { opacity: 1; filter: blur(0); }
}
.arca-morph-resolved {
    color: #ffffff;
    animation: morph-resolve 0.3s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes morph-resolve {
    0% { transform: scale(1.3); text-shadow: 0 0 20px rgba(96,165,250,0.8); }
    100% { transform: scale(1); text-shadow: none; }
}

/* Wave 3D animation */
.arca-wave {
    display: inline-block;
    opacity: 0;
    transform-origin: bottom center;
    animation: wave-in 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
}
@keyframes wave-in {
    0% { opacity: 0; transform: translateY(30px) rotateX(60deg) scale(0.7); filter: blur(6px); }
    40% { opacity: 1; filter: blur(0); }
    70% { transform: translateY(-6px) rotateX(-10deg) scale(1.05); }
    85% { transform: translateY(2px) rotateX(3deg) scale(0.98); }
    100% { opacity: 1; transform: translateY(0) rotateX(0) scale(1); filter: blur(0); }
}

/* === Particle Burst === */
.arca-particle-burst {
    display: inline-block;
    position: relative;
    opacity: 0;
    animation: pb-reveal 0.6s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    font-weight: inherit;
}
@keyframes pb-reveal {
    0% { opacity: 0; transform: scale(2); filter: blur(8px); }
    50% { opacity: 1; filter: blur(0); }
    100% { opacity: 1; transform: scale(1); }
}
.arca-pb-dot {
    position: absolute;
    width: 4px;
    height: 4px;
    border-radius: 50%;
    background: var(--pb-color, #93c5fd);
    top: 50%;
    left: 50%;
    pointer-events: none;
    animation: pb-dot-fly 0.7s ease-out forwards;
    animation-delay: var(--pb-delay, 0.1s);
    opacity: 0;
}
@keyframes pb-dot-fly {
    0% { opacity: 1; transform: translate(-50%, -50%) translate(0, 0) scale(1); }
    100% { opacity: 0; transform: translate(-50%, -50%) translate(var(--pb-x, 0), var(--pb-y, 0)) scale(0); }
}

/* === Neon Glow === */
.arca-neon {
    display: inline-block;
    opacity: 0;
    animation: neon-in 1.2s ease forwards;
    text-shadow:
        0 0 7px var(--neon-color, #93c5fd),
        0 0 14px var(--neon-color, #93c5fd),
        0 0 28px var(--neon-color, #93c5fd),
        0 0 56px var(--neon-color, #93c5fd);
    color: #ffffff;
}
@keyframes neon-in {
    0% { opacity: 0; filter: blur(12px); text-shadow: 0 0 0px transparent; }
    30% { opacity: 1; filter: blur(0); }
    35% { opacity: 0.6; }
    40% { opacity: 1; }
    45% { opacity: 0.4; }
    50% { opacity: 1; }
    55% { opacity: 0.7; }
    60% { opacity: 1; }
    100% { opacity: 1; }
}

/* === 3D Flip === */
.arca-flip-outer {
    display: inline-block;
    perspective: 400px;
    opacity: 0;
    animation: flip-appear 0.01s ease forwards;
}
@keyframes flip-appear {
    0% { opacity: 1; }
    100% { opacity: 1; }
}
.arca-flip-inner {
    position: relative;
    display: inline-block;
    transform-style: preserve-3d;
    animation: flip-rotate 1s cubic-bezier(0.16, 1, 0.3, 1) forwards;
    animation-delay: inherit;
}
.arca-flip-face {
    display: inline-block;
    backface-visibility: hidden;
    font-weight: inherit;
}
.arca-flip-front {
    position: relative;
    color: #ffffff;
}
.arca-flip-back {
    position: absolute;
    inset: 0;
    transform: rotateX(180deg);
    color: #60a5fa;
    text-shadow: 0 0 12px rgba(96,165,250,0.6);
}
@keyframes flip-rotate {
    0% { transform: rotateX(-120deg) scale(0.6); opacity: 0; }
    30% { opacity: 1; }
    60% { transform: rotateX(20deg) scale(1.05); }
    80% { transform: rotateX(-5deg) scale(0.98); }
    100% { transform: rotateX(0deg) scale(1); opacity: 1; }
}

/* === Aurora === */
.arca-aurora {
    display: inline-block;
    opacity: 0;
    background: linear-gradient(135deg,
        hsl(220, 80%, 70%),
        hsl(260, 80%, 60%),
        hsl(200, 80%, 70%));
    background-size: 200% 200%;
    -webkit-background-clip: text;
    -webkit-text-fill-color: transparent;
    background-clip: text;
    animation: aurora-in 1.4s cubic-bezier(0.16, 1, 0.3, 1) forwards,
               aurora-shift 4s ease-in-out 1.4s infinite alternate;
}
@keyframes aurora-in {
    0% { opacity: 0; transform: translateY(20px) scale(0.9); filter: blur(8px); }
    60% { filter: blur(0); }
    100% { opacity: 1; transform: translateY(0) scale(1); }
}
@keyframes aurora-shift {
    0% { background-position: 0% 50%; }
    100% { background-position: 100% 50%; }
}

/* Hero badge */
.hero-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.375rem 1rem;
    background: rgba(255,255,255,0.08);
    backdrop-filter: blur(8px);
    border: 1px solid rgba(255,255,255,0.12);
    border-radius: 9999px;
    font-size: 0.8125rem;
    color: rgba(255,255,255,0.8);
}
.hero-badge-dot {
    width: 6px;
    height: 6px;
    border-radius: 50%;
    background: #10b981;
    animation: pulse-dot 2s ease-in-out infinite;
}
@keyframes pulse-dot {
    0%, 100% { box-shadow: 0 0 0 0 rgba(16,185,129,0.7); }
    50% { box-shadow: 0 0 0 6px rgba(16,185,129,0); }
}

/* Hero CTA buttons */
.hero-btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: #ffffff;
    color: #0f1a4a;
    font-weight: 600;
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
    box-shadow: 0 4px 16px rgba(0,0,0,0.15);
}
.hero-btn-primary:hover {
    transform: translateY(-1px);
    box-shadow: 0 6px 24px rgba(0,0,0,0.25);
}
.hero-btn-secondary {
    display: inline-flex;
    align-items: center;
    gap: 0.4rem;
    background: transparent;
    color: rgba(255,255,255,0.8);
    font-weight: 600;
    border: 1.5px solid rgba(255,255,255,0.2);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-btn-secondary:hover {
    background: rgba(255,255,255,0.08);
    border-color: rgba(255,255,255,0.35);
    color: #fff;
    transform: translateY(-1px);
}
.hero-btn-tertiary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.875rem 2rem;
    background: rgba(59,130,246,0.15);
    color: #93c5fd;
    font-weight: 600;
    border-radius: 12px;
    border: 1px solid rgba(59,130,246,0.3);
    transition: all 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.hero-btn-tertiary:hover {
    background: rgba(59,130,246,0.25);
    transform: translateY(-2px);
}

/* Scroll indicator */
.scroll-indicator {
    position: absolute;
    bottom: 2rem;
    left: 50%;
    transform: translateX(-50%);
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    color: rgba(255,255,255,0.3);
    font-size: 0.75rem;
    letter-spacing: 0.1em;
    text-transform: uppercase;
    animation: scroll-pulse 2s ease-in-out infinite;
}
@keyframes scroll-pulse {
    0%, 100% { opacity: 0.3; transform: translateX(-50%) translateY(0); }
    50% { opacity: 0.8; transform: translateX(-50%) translateY(4px); }
}
.scroll-indicator-line {
    width: 1px;
    height: 32px;
    background: linear-gradient(to bottom, rgba(255,255,255,0.5), transparent);
}

/* --- Cards --- */
.card {
    background: #ffffff;
    border-radius: 16px;
    border: 1px solid #f0f0f0;
    transition: all 0.3s ease;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.card:hover {
    box-shadow: 0 8px 30px rgba(0,0,0,0.08);
    border-color: #e5e7eb;
    transform: translateY(-2px);
}

.card-glass {
    background: rgba(255,255,255,0.06);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* --- Sections --- */
.section-heading {
    text-align: center;
    margin-bottom: 3rem;
}
.section-heading-label {
    display: inline-block;
    font-size: 0.8125rem;
    font-weight: 600;
    text-transform: uppercase;
    letter-spacing: 0.08em;
    color: #2563eb;
    margin-bottom: 0.5rem;
}
.section-heading-title {
    font-size: 2.25rem;
    font-weight: 800;
    color: #111827;
    line-height: 1.2;
}
/* --- About: Ciclo de atuação --- */
.about-cycle {
    display: flex;
    align-items: flex-start;
    gap: 0;
    margin-top: 3.5rem;
    padding-top: 2.5rem;
    border-top: 1px solid #f1f5f9;
    max-width: 760px;
    margin-left: auto;
    margin-right: auto;
}
.about-cycle-step {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.5rem;
    flex-shrink: 0;
    cursor: pointer;
    position: relative;
}
/* Tooltip */
.about-cycle-step[data-tooltip]::before {
    content: attr(data-tooltip);
    position: absolute;
    bottom: calc(100% + 14px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    width: 210px;
    background: #0f172a;
    color: #e2e8f0;
    font-size: 11px;
    font-weight: 500;
    line-height: 1.5;
    text-align: center;
    padding: 10px 12px;
    border-radius: 10px;
    box-shadow: 0 10px 30px rgba(0,0,0,0.25);
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16,1,0.3,1);
    z-index: 20;
}
.about-cycle-step[data-tooltip]::after {
    content: '';
    position: absolute;
    bottom: calc(100% + 6px);
    left: 50%;
    transform: translateX(-50%) translateY(8px);
    border: 6px solid transparent;
    border-top-color: #0f172a;
    opacity: 0;
    pointer-events: none;
    transition: opacity 0.25s ease, transform 0.25s cubic-bezier(0.16,1,0.3,1);
    z-index: 20;
}
.about-cycle-step[data-tooltip]:hover::before,
.about-cycle-step[data-tooltip]:hover::after {
    opacity: 1;
    transform: translateX(-50%) translateY(0);
}
.about-cycle-icon {
    width: 52px;
    height: 52px;
    border-radius: 14px;
    background: #f8fafc;
    border: 1px solid #e5e7eb;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #475569;
    transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
    position: relative;
}
.about-cycle-icon[data-step]::after {
    content: attr(data-step);
    position: absolute;
    top: -6px;
    right: -6px;
    width: 18px;
    height: 18px;
    border-radius: 50%;
    background: #fff;
    border: 1px solid #e5e7eb;
    font-size: 9px;
    font-weight: 700;
    color: #94a3b8;
    display: flex;
    align-items: center;
    justify-content: center;
}
.about-cycle-step:hover .about-cycle-icon::after {
    border-color: #2563eb;
    color: #2563eb;
}
.about-cycle-step:hover .about-cycle-icon {
    background: #2563eb;
    border-color: #2563eb;
    color: #fff;
    transform: translateY(-4px);
    box-shadow: 0 8px 20px rgba(37,99,235,0.25);
}
.about-cycle-label {
    font-size: 0.78rem;
    font-weight: 600;
    color: #334155;
    transition: color 0.3s ease;
}
.about-cycle-step:hover .about-cycle-label {
    color: #2563eb;
}
.about-cycle-connector {
    flex: 1;
    height: 2px;
    margin-top: 25px;
    min-width: 20px;
    position: relative;
    overflow: hidden;
    background: #e2e8f0;
}
.about-cycle-connector::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(90deg, transparent, #60a5fa, transparent);
    width: 40%;
    animation: about-flow 2.4s linear infinite;
}
@keyframes about-flow {
    0% { transform: translateX(-100%); }
    100% { transform: translateX(350%); }
}

@media (max-width: 560px) {
    .about-cycle {
        flex-wrap: wrap;
        justify-content: center;
        gap: 1.25rem 1.5rem;
        max-width: 100%;
    }
    .about-cycle-connector { display: none; }
    .about-cycle-step { flex: 0 0 auto; }
    .about-cycle-step[data-tooltip]::before { width: 160px; }
}

/* --- About: Pilares (parceiros) --- */
.about-pillar {
    position: relative;
    background: #fff;
    border: 1px solid #e5e7eb;
    border-radius: 18px;
    padding: 1.4rem;
    overflow: hidden;
    transition: all 0.3s cubic-bezier(0.16,1,0.3,1);
}
.about-pillar::before {
    content: '';
    position: absolute;
    left: 0;
    top: 0;
    width: 100%;
    height: 3px;
    background: #2563eb;
    transform: scaleX(0);
    transform-origin: left;
    transition: transform 0.35s cubic-bezier(0.16,1,0.3,1);
}
.about-pillar:hover {
    border-color: #bfdbfe;
    box-shadow: 0 12px 30px rgba(37,99,235,0.1);
    transform: translateY(-4px);
}
.about-pillar:hover::before {
    transform: scaleX(1);
}
.about-pillar-top {
    display: flex;
    align-items: flex-start;
    justify-content: space-between;
    margin-bottom: 0.9rem;
}
.about-pillar-icon {
    width: 44px;
    height: 44px;
    border-radius: 12px;
    background: #eff6ff;
    display: flex;
    align-items: center;
    justify-content: center;
    font-size: 1.05rem;
    color: #2563eb;
    transition: all 0.3s ease;
}
.about-pillar:hover .about-pillar-icon {
    background: #2563eb;
    color: #fff;
    transform: scale(1.05);
}
.about-pillar-tag {
    font-size: 1.5rem;
    font-weight: 900;
    color: #f1f5f9;
    line-height: 1;
    letter-spacing: -0.03em;
    transition: color 0.3s ease;
}
.about-pillar:hover .about-pillar-tag {
    color: #dbeafe;
}
.about-pillar-title {
    font-size: 1.05rem;
    font-weight: 700;
    color: #111827;
}
.about-pillar-desc {
    font-size: 0.8rem;
    color: #6b7280;
    margin-top: 0.15rem;
}
@media (max-width: 480px) {
    .about-cycle-label { font-size: 0.68rem; }
    .about-cycle-icon { width: 46px; height: 46px; }
}

/* --- Risk Levels --- */
.risk-badge {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    padding: 0.25rem 0.75rem;
    border-radius: 9999px;
    font-size: 0.75rem;
    font-weight: 700;
}
.risk-badge-green { background: #d1fae5; color: #065f46; }
.risk-badge-yellow { background: #fef3c7; color: #92400e; }
.risk-badge-orange { background: #ffedd5; color: #9a3412; }
.risk-badge-red { background: #fee2e2; color: #991b1b; }
.risk-badge-black { background: #f3f4f6; color: #111827; }

/* Scroll Reveal */
.scroll-reveal {
    opacity: 0;
    transform: translateY(24px);
    transition: all 0.7s cubic-bezier(0.16, 1, 0.3, 1);
}
.scroll-reveal.revealed {
    opacity: 1;
    transform: translateY(0);
}

/* Slide-up stagger */
.stagger-children > * {
    opacity: 0;
    transform: translateY(16px);
    transition: all 0.5s cubic-bezier(0.16, 1, 0.3, 1);
}
.stagger-children.revealed > *:nth-child(1) { opacity: 1; transform: translateY(0); transition-delay: 0.05s; }
.stagger-children.revealed > *:nth-child(2) { opacity: 1; transform: translateY(0); transition-delay: 0.1s; }
.stagger-children.revealed > *:nth-child(3) { opacity: 1; transform: translateY(0); transition-delay: 0.15s; }
.stagger-children.revealed > *:nth-child(4) { opacity: 1; transform: translateY(0); transition-delay: 0.2s; }
.stagger-children.revealed > *:nth-child(5) { opacity: 1; transform: translateY(0); transition-delay: 0.25s; }
.stagger-children.revealed > *:nth-child(6) { opacity: 1; transform: translateY(0); transition-delay: 0.3s; }

/* Stat counter */
.stat-number {
    font-variant-numeric: tabular-nums;
}

/* Glass morphism */
.glass {
    background: rgba(255,255,255,0.05);
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
    border: 1px solid rgba(255,255,255,0.1);
}

/* Focus ring */
.focus-ring {
    outline: none;
    transition: box-shadow 0.2s ease;
}
.focus-ring:focus {
    box-shadow: 0 0 0 3px rgba(37,99,235,0.25);
}

/* Form elements */
.form-input {
    width: 100%;
    padding: 0.625rem 1rem;
    border: 1px solid #d1d5db;
    border-radius: 10px;
    outline: none;
    transition: all 0.2s ease;
}
.form-input:focus {
    border-color: #2563eb;
    box-shadow: 0 0 0 3px rgba(37,99,235,0.1);
}
.form-input::placeholder {
    color: #9ca3af;
}

/* Buttons */
.btn-primary {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    background: #2563eb;
    color: #ffffff;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.2s ease;
}
.btn-primary:hover {
    background: #1d4ed8;
}

.btn-outline {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    padding: 0.625rem 1.5rem;
    border: 1px solid #d1d5db;
    color: #374151;
    font-weight: 600;
    border-radius: 10px;
    transition: all 0.2s ease;
}
.btn-outline:hover {
    background: #f9fafb;
    border-color: #9ca3af;
}

html {
    scroll-behavior: smooth;
}

/* Timeline */
.timeline-line {
    position: relative;
}
.timeline-line::before {
    content: '';
    position: absolute;
    left: 1.25rem;
    top: 2.5rem;
    bottom: 0;
    width: 2px;
    background: #e5e7eb;
}

/* Admin card */
.admin-stat {
    transition: all 0.2s ease;
}
.admin-stat:hover {
    transform: translateY(-2px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}

/* Table styles */
.table-base th {
    font-weight: 600;
    font-size: 0.75rem;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    color: #6b7280;
    padding: 0.75rem 1rem;
    text-align: left;
    background: #f9fafb;
}
.table-base td {
    padding: 0.75rem 1rem;
    font-size: 0.875rem;
    border-top: 1px solid #f3f4f6;
}
.table-base tr:hover td {
    background: #f9fafb;
}

/* Alert dismiss */
.alert-dismissible {
    transition: opacity 0.3s ease;
}

/* --- Page Header (subpages) --- */
.page-header {
    position: relative;
    overflow: hidden;
}
.page-header::before {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        radial-gradient(ellipse at 20% 50%, rgba(59,130,246,0.15) 0%, transparent 50%),
        radial-gradient(ellipse at 80% 20%, rgba(139,92,246,0.1) 0%, transparent 50%);
    pointer-events: none;
}
.page-header::after {
    content: '';
    position: absolute;
    inset: 0;
    background-image:
        linear-gradient(rgba(255,255,255,0.02) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255,255,255,0.02) 1px, transparent 1px);
    background-size: 48px 48px;
    pointer-events: none;
}

/* --- Enhanced Tables --- */
.table-enhanced {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    background: #ffffff;
    border-radius: 16px;
    overflow: hidden;
    border: 1px solid #f0f0f0;
    box-shadow: 0 1px 3px rgba(0,0,0,0.04);
}
.table-enhanced thead th {
    padding: 0.875rem 1.25rem;
    font-size: 0.75rem;
    font-weight: 700;
    text-transform: uppercase;
    letter-spacing: 0.06em;
    color: #6b7280;
    background: #f8fafc;
    border-bottom: 2px solid #e5e7eb;
    text-align: left;
}
.table-enhanced tbody td {
    padding: 0.875rem 1.25rem;
    font-size: 0.875rem;
    border-bottom: 1px solid #f3f4f6;
    transition: background 0.15s ease;
}
.table-enhanced tbody tr:last-child td { border-bottom: none; }
.table-enhanced tbody tr:hover td { background: #f8fafc; }

/* --- Enhanced Form Inputs --- */
.form-input-enhanced {
    width: 100%;
    padding: 0.75rem 1rem 0.75rem 2.75rem;
    border: 1.5px solid #e5e7eb;
    border-radius: 12px;
    outline: none;
    transition: all 0.25s cubic-bezier(0.16, 1, 0.3, 1);
    background: #ffffff;
    font-size: 0.9375rem;
}
.form-input-enhanced:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 4px rgba(59,130,246,0.1), 0 2px 8px rgba(59,130,246,0.08);
}
.form-input-enhanced::placeholder { color: #b0b8c4; }
.form-group {
    position: relative;
}
.form-group .form-icon {
    position: absolute;
    left: 0.875rem;
    top: 50%;
    transform: translateY(-50%);
    color: #9ca3af;
    font-size: 0.875rem;
    pointer-events: none;
    transition: color 0.2s ease;
}
.form-group:focus-within .form-icon { color: #3b82f6; }

/* --- Enhanced Buttons --- */
.btn-primary {
    position: relative;
    overflow: hidden;
}
.btn-primary::after {
    content: '';
    position: absolute;
    inset: 0;
    background: linear-gradient(to right, transparent, rgba(255,255,255,0.15), transparent);
    transform: translateX(-100%);
    transition: transform 0.5s ease;
}
.btn-primary:hover::after { transform: translateX(100%); }
.btn-primary:active { transform: scale(0.97); }

.btn-outline:active { transform: scale(0.97); }

/* --- Link underline animation --- */
.link-animated {
    position: relative;
    display: inline-block;
}
.link-animated::after {
    content: '';
    position: absolute;
    bottom: -2px;
    left: 0;
    width: 0;
    height: 2px;
    background: currentColor;
    transition: width 0.3s cubic-bezier(0.16, 1, 0.3, 1);
}
.link-animated:hover::after { width: 100%; }

/* --- Card risk-level hover colors --- */
.card-risk-green:hover { border-color: #10b981; box-shadow: 0 8px 30px rgba(16,185,129,0.12); transform:translateX(4px); }
.card-risk-yellow:hover { border-color: #f59e0b; box-shadow: 0 8px 30px rgba(245,158,11,0.12); transform:translateX(4px); }
.card-risk-orange:hover { border-color: #f97316; box-shadow: 0 8px 30px rgba(249,115,22,0.12); transform:translateX(4px); }
.card-risk-red:hover { border-color: #ef4444; box-shadow: 0 8px 30px rgba(239,68,68,0.12); transform:translateX(4px); }
.card-risk-black:hover { border-color: #374151; box-shadow: 0 8px 30px rgba(55,65,81,0.15); transform:translateX(4px); }

/* --- CTA / Força Tarefa --- */
.cta-section {
    position: relative;
    padding: 5rem 0;
    background: #0f172a;
}
@media (min-width: 1024px) {
    .cta-section { padding: 6rem 0; }
}

/* --- Weather card mobile accordion --- */
@media (max-width: 768px) {
    .hero-weather-card.accordion-collapsed #arcaWeather {
        max-height: 0;
        overflow: hidden;
        opacity: 0;
    }
    .hero-weather-card.accordion-collapsed #heroLayerBtns {
        display: none;
    }
    .hero-weather-card #arcaWeather {
        max-height: 2000px;
        overflow: visible;
        opacity: 1;
        transition: max-height 0.4s cubic-bezier(0.16, 1, 0.3, 1), opacity 0.3s ease;
    }
    .weather-accordion-toggle {
        display: flex !important;
    }
}
.weather-accordion-toggle {
    display: none;
    align-items: center;
    justify-content: space-between;
    width: 100%;
    padding: 8px 0 4px;
    cursor: pointer;
    border: none;
    background: none;
    color: #4b5563;
    font-size: 11px;
    font-weight: 600;
    font-family: inherit;
}
.weather-accordion-toggle i {
    transition: transform 0.3s ease;
    font-size: 10px;
    color: #9ca3af;
}
.accordion-collapsed .weather-accordion-toggle i {
    transform: rotate(-90deg);
}

/* --- Footer enhanced --- */
.footer-enhanced {
    position: relative;
    overflow: hidden;
}
.footer-enhanced::before {
    content: '';
    position: absolute;
    top: 0;
    left: 0;
    right: 0;
    height: 1px;
    background: linear-gradient(90deg, transparent, rgba(59,130,246,0.3), rgba(139,92,246,0.2), transparent);
}

/* --- Stagger children extended (up to 9) --- */
.stagger-children.revealed > *:nth-child(7) { opacity: 1; transform: translateY(0); transition-delay: 0.35s; }
.stagger-children.revealed > *:nth-child(8) { opacity: 1; transform: translateY(0); transition-delay: 0.4s; }
.stagger-children.revealed > *:nth-child(9) { opacity: 1; transform: translateY(0); transition-delay: 0.45s; }
.stagger-children.revealed > *:nth-child(10) { opacity: 1; transform: translateY(0); transition-delay: 0.5s; }
.stagger-children.revealed > *:nth-child(11) { opacity: 1; transform: translateY(0); transition-delay: 0.55s; }
.stagger-children.revealed > *:nth-child(12) { opacity: 1; transform: translateY(0); transition-delay: 0.6s; }

/* --- Weather Widget --- */
.forecast-grid {
    display: grid;
    grid-template-columns: repeat(7, 1fr);
    gap: 3px;
}
.forecast-day {
    text-align: center;
    padding: 6px 2px;
    border-radius: 8px;
    cursor: pointer;
    transition: all 0.3s ease;
    border: 1px solid transparent;
}

/* --- Alert Markers --- */
.alert-marker-pulse {
    background: none !important;
    border: none !important;
}
.alert-pulse-yellow,
.alert-pulse-orange,
.alert-pulse-red {
    width: 28px;
    height: 28px;
    display: flex;
    align-items: center;
    justify-content: center;
    border-radius: 50%;
    animation: alert-pulse 1.8s ease-in-out infinite;
    font-size: 12px;
    color: #fff;
    position: relative;
}
.alert-pulse-yellow { background: rgba(255,254,0,0.85); color: #1a1a1a; }
.alert-pulse-orange { background: rgba(255,165,0,0.85); }
.alert-pulse-red { background: rgba(255,0,0,0.85); }
.alert-pulse-yellow::after,
.alert-pulse-orange::after,
.alert-pulse-red::after {
    content: '';
    position: absolute;
    inset: -4px;
    border-radius: 50%;
    animation: alert-ring 1.8s ease-in-out infinite;
}
.alert-pulse-yellow::after { border: 2px solid rgba(255,254,0,0.5); }
.alert-pulse-orange::after { border: 2px solid rgba(255,165,0,0.5); }
.alert-pulse-red::after { border: 2px solid rgba(255,0,0,0.5); }
@keyframes alert-pulse {
    0%, 100% { transform: scale(1); }
    50% { transform: scale(1.15); }
}
@keyframes alert-ring {
    0%, 100% { transform: scale(1); opacity: 0.6; }
    50% { transform: scale(1.3); opacity: 0; }
}
.alert-polygon {
    transition: fill-opacity 0.3s ease;
}
.alert-polygon:hover {
    fill-opacity: 0.25 !important;
}
#alertsPanel .rotate-180 {
    transform: rotate(180deg);
}
.forecast-day:hover {
    background: rgba(0,0,0,0.03);
    border-color: rgba(0,0,0,0.06);
}
.forecast-day-active {
    background: rgba(30,64,175,0.08);
    border-color: rgba(30,64,175,0.15);
}
@media (max-width: 640px) {
    .forecast-grid {
        grid-template-columns: repeat(4, 1fr);
    }
}

/* ============================================
   Guaíba Thermometer — Compact & Polished
   ============================================ */
.guaiba-thermo-card {
    display: flex;
    flex-direction: column;
}
.guaiba-thermo {
    display: flex;
    align-items: stretch;
    gap: 5px;
    flex: 1;
    min-height: 180px;
}
.guaiba-thermo-scale {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    font-size: 7.5px;
    color: #9ca3af;
    font-weight: 600;
    padding-bottom: 1px;
    text-align: right;
    line-height: 1;
    user-select: none;
    width: 18px;
    flex-shrink: 0;
    letter-spacing: -0.01em;
}
.guaiba-thermo-bar {
    position: relative;
    width: 16px;
    flex-shrink: 0;
    border-radius: 8px;
    overflow: visible;
    margin: 0 1px;
    box-shadow: inset 0 1px 3px rgba(0,0,0,0.06);
}
.guaiba-thermo-bg {
    position: absolute;
    inset: 0;
    border-radius: 8px;
    overflow: hidden;
    background: #f3f4f6;
}
.guaiba-thermo-zone {
    position: absolute;
    left: 0;
    right: 0;
}
.guaiba-thermo-zone-red {
    bottom: 0;
    height: 50%;
    background: linear-gradient(to top, rgba(239,68,68,0.18), rgba(239,68,68,0.06));
}
.guaiba-thermo-zone-yellow {
    bottom: 50%;
    height: 6.7%;
    background: rgba(245,158,11,0.10);
}
.guaiba-thermo-zone-green {
    top: 56.7%;
    bottom: 0;
    background: rgba(16,185,129,0.04);
}
.guaiba-thermo-fill {
    position: absolute;
    bottom: 0;
    left: 0;
    right: 0;
    border-radius: 8px;
    transition: height 1.2s cubic-bezier(0.22, 1, 0.36, 1), background 0.6s ease;
    z-index: 2;
    box-shadow: 0 0 6px rgba(37,99,235,0.15);
}
.guaiba-thermo-marker {
    position: absolute;
    left: -2px;
    right: -2px;
    bottom: var(--pos);
    z-index: 3;
    pointer-events: none;
}
.guaiba-thermo-marker-line {
    display: block;
    height: 2px;
    border-radius: 1px;
    box-shadow: 0 0 2px rgba(0,0,0,0.08);
}
.guaiba-thermo-labels {
    display: flex;
    flex-direction: column;
    justify-content: space-between;
    padding-bottom: 1px;
    position: relative;
    flex: 1;
    min-width: 48px;
}
.guaiba-thermo-label {
    position: absolute;
    bottom: var(--pos);
    font-size: 8px;
    font-weight: 700;
    line-height: 1.2;
    white-space: nowrap;
    transform: translateY(50%);
    letter-spacing: -0.01em;
}
.guaiba-thermo-arrow {
    position: absolute;
    left: -7px;
    width: 0;
    height: 0;
    border-top: 4px solid transparent;
    border-bottom: 4px solid transparent;
    border-right: 6px solid #2563eb;
    z-index: 4;
    opacity: 0;
    transition: bottom 1.2s cubic-bezier(0.22, 1, 0.36, 1), opacity 0.5s ease;
    filter: drop-shadow(0 1px 2px rgba(0,0,0,0.25));
}

/* Trend indicators */
.guaiba-trend-dot {
    display: inline-block;
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex-shrink: 0;
}
.guaiba-trend-up {
    background: #ef4444;
    animation: trend-pulse 1.5s ease-in-out infinite;
}
.guaiba-trend-down {
    background: #10b981;
}
.guaiba-trend-stable {
    background: #6b7280;
}
@keyframes trend-pulse {
    0%, 100% { box-shadow: 0 0 0 0 rgba(239,68,68,0.5); }
    50% { box-shadow: 0 0 0 4px rgba(239,68,68,0); }
}

/* Reference badges */
.guaiba-badge {
    display: inline-flex;
    align-items: center;
    gap: 5px;
    padding: 5px 12px;
    border-radius: 20px;
    font-size: 11px;
    color: #6b7280;
    background: #f9fafb;
    border: 1px solid #f0f0f0;
    transition: all 0.25s ease;
    cursor: default;
}
.guaiba-badge:hover {
    transform: translateY(-1px);
    box-shadow: 0 4px 12px rgba(0,0,0,0.06);
}
.guaiba-badge strong {
    font-weight: 700;
    color: #111827;
}
.guaiba-badge-dot {
    display: inline-block;
    width: 8px;
    height: 8px;
    border-radius: 50%;
    flex-shrink: 0;
}
.guaiba-badge-peak:hover {
    border-color: #c4b5fd;
    background: #f5f3ff;
}
.guaiba-badge-flood:hover {
    border-color: #fca5a5;
    background: #fef2f2;
}
.guaiba-badge-alert:hover {
    border-color: #fcd34d;
    background: #fffbeb;
}

/* Counter animation */
.counter-anim {
    font-variant-numeric: tabular-nums;
}

@media (max-width: 1023px) {
    .guaiba-thermo {
        min-height: 160px;
    }
    .guaiba-thermo-scale {
        font-size: 7px;
        width: 16px;
    }
    .guaiba-thermo-bar {
        width: 14px;
    }
}
@media (max-width: 640px) {
    .guaiba-thermo {
        min-height: 140px;
    }
    .guaiba-thermo-scale {
        font-size: 6.5px;
        width: 14px;
    }
    .guaiba-thermo-bar {
        width: 12px;
    }
    .guaiba-thermo-label {
        font-size: 7px;
    }
}

/* ============ Warning Popup animations ============ */
@keyframes arcaFadeIn { from { opacity: 0; } to { opacity: 1; } }
@keyframes arcaPopIn { from { opacity: 0; transform: scale(0.9) translateY(20px); } to { opacity: 1; transform: scale(1) translateY(0); } }

/* ============ Route Lines & Button ============ */
.hero-route-btn {
    position: absolute; bottom: 60px; right: 1rem; z-index: 25;
    display: flex; align-items: center; gap: 6px;
    padding: 8px 14px; border-radius: 12px;
    background: rgba(255,255,255,0.96); backdrop-filter: blur(8px);
    border: 1px solid rgba(0,0,0,0.08); box-shadow: 0 4px 16px rgba(0,0,0,0.12);
    font-family: Inter, system-ui, sans-serif; font-size: 11px; font-weight: 700;
    color: #1f2937; cursor: pointer; transition: all 0.2s ease;
}
.hero-route-btn:hover {
    background: #2563eb; color: #fff; border-color: #2563eb;
    box-shadow: 0 6px 20px rgba(37,99,235,0.35);
}
.hero-route-btn i { font-size: 13px; }
.hero-route-btn.active {
    background: #2563eb; color: #fff; border-color: #1d4ed8;
}
.route-distance-label {
    background: rgba(255,255,255,0.95); backdrop-filter: blur(6px);
    border: 1px solid rgba(0,0,0,0.08); border-radius: 8px;
    padding: 4px 8px; font-family: Inter, system-ui, sans-serif;
    font-size: 10px; font-weight: 700; color: #1f2937;
    box-shadow: 0 2px 8px rgba(0,0,0,0.12); white-space: nowrap;
}
.route-distance-label i { color: #2563eb; margin-right: 3px; }

/* ============ Thermometer active level highlight ============ */
.alert-thermo-level.thermo-active {
    background: rgba(0,0,0,0.04);
}
.alert-thermo-level.thermo-active .alert-thermo-color {
    width: 6px; box-shadow: 0 0 6px currentColor;
}
.alert-thermo-level.thermo-active .alert-thermo-name {
    font-size: 11px;
}
.alert-thermo-level.thermo-active .alert-thermo-icon {
    transform: scale(1.15);
    box-shadow: 0 0 0 2px currentColor;
}
@keyframes thermo-pulse {
    0%, 100% { opacity: 1; }
    50% { opacity: 0.6; }
}
.alert-thermo-level.thermo-active .alert-thermo-icon {
    animation: thermo-pulse 2s ease-in-out infinite;
}

/* ============ Real-time pulse indicator ============ */
.map-realtime-badge {
    position: absolute; top: 0.75rem; left: 50%; transform: translateX(-50%); z-index: 25;
    display: flex; align-items: center; gap: 6px;
    padding: 5px 12px; border-radius: 20px;
    background: rgba(255,255,255,0.92); backdrop-filter: blur(8px);
    border: 1px solid rgba(0,0,0,0.06); box-shadow: 0 2px 12px rgba(0,0,0,0.08);
    font-family: Inter, system-ui, sans-serif; font-size: 10px; font-weight: 600; color: #374151;
    transition: opacity 0.3s;
}
.map-realtime-dot {
    width: 7px; height: 7px; border-radius: 50%; background: #10b981;
    box-shadow: 0 0 0 2px rgba(16,185,129,0.25);
    animation: rt-blink 2s ease-in-out infinite;
}
@keyframes rt-blink {
    0%, 100% { opacity: 1; box-shadow: 0 0 0 2px rgba(16,185,129,0.25); }
    50% { opacity: 0.5; box-shadow: 0 0 0 5px rgba(16,185,129,0.1); }
}
.map-realtime-badge.updating .map-realtime-dot { background: #f59e0b; }



