:root {
    --bg-deep-space: #050910;
    --glass-card-fill: rgba(16, 26, 44, 0.6);
    --glass-card-stroke: rgba(255, 255, 255, 0.07);
    --neon-scarlet: #ff4747;
    --neon-amber: #ffa61f;
    --neon-cyan: #00e1ff;
    --neon-purple: #bd93f9;
    --bright-slate: #f3f7fc;
    --muted-slate: #627288;
}

body {
    margin: 0; padding: 20px;
    background-color: var(--bg-deep-space);
    background-image: 
        radial-gradient(at 0% 0%, rgba(0, 225, 255, 0.04) 0px, transparent 50%),
        radial-gradient(at 100% 100%, rgba(255, 71, 71, 0.03) 0px, transparent 50%);
    color: var(--bright-slate);
    font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, sans-serif;
    overflow-x: hidden;
}

/* Horizontal Alert Header Marquee System */
.global-alert-ticker-belt {
    display: flex; align-items: center;
    background: rgba(220, 38, 38, 0.15);
    border: 1px solid rgba(239, 68, 68, 0.25);
    border-radius: 12px; padding: 10px 16px;
    margin-bottom: 20px; backdrop-filter: blur(8px);
}
.ticker-badge {
    background: linear-gradient(135deg, var(--neon-scarlet), #b91c1c);
    color: #fff; font-size: 0.75rem; font-weight: 900;
    padding: 6px 12px; border-radius: 6px; letter-spacing: 0.05em;
    box-shadow: 0 0 12px rgba(255, 71, 71, 0.4); margin-right: 16px; flex-shrink: 0;
}
.ticker-text-window { overflow: hidden; position: relative; width: 100%; height: 20px; }
.ticker-moving-content {
    position: absolute; width: max-content; white-space: nowrap;
    font-size: 0.9rem; font-weight: 600; color: #fca5a5;
    animation: marqueeScroll 30s linear infinite;
}
@keyframes marqueeScroll {
    0% { transform: translateX(70vw); }
    100% { transform: translateX(-100%); }
}

/* Core System Outlines */
.dashboard-core-layout { display: grid; grid-template-columns: 360px 1fr; gap: 20px; max-width: 1800px; margin: 0 auto; }
.primary-analytics-container { display: flex; flex-direction: column; gap: 20px; }

/* Threat Sidebar Components */
.threat-matrix-sidebar { display: flex; flex-direction: column; max-height: calc(100vh - 40px); position: sticky; top: 20px; }
.sidebar-header-row { border-bottom: 1px solid rgba(255, 255, 255, 0.06); padding-bottom: 14px; margin-bottom: 14px; }
.threat-matrix-badge { background: #1e293b; border: 1px solid var(--glass-card-stroke); color: #fff; padding: 8px 14px; font-size: 0.82rem; font-weight: 700; border-radius: 6px; display: inline-block; }
.threat-scroll-container { overflow-y: auto; flex-grow: 1; display: flex; flex-direction: column; gap: 10px; padding-right: 4px; }
.threat-scroll-container::-webkit-scrollbar { width: 4px; }
.threat-scroll-container::-webkit-scrollbar-thumb { background: rgba(255,255,255,0.08); border-radius: 4px; }

.feed-item { background: rgba(2, 4, 8, 0.4); border-left: 3px solid var(--muted-slate); border-radius: 8px; padding: 12px; font-size: 0.85rem; line-height: 1.4; }
.feed-item.red { border-left-color: var(--neon-scarlet); background: rgba(253, 71, 71, 0.04); }
.feed-item.orange { border-left-color: var(--neon-amber); background: rgba(255, 166, 31, 0.03); }
.feed-item.green { border-left-color: #10b981; background: rgba(16, 185, 129, 0.02); }
.feed-tag { font-weight: 700; display: block; margin-bottom: 2px; font-size: 0.76rem; letter-spacing: 0.02em; }
.feed-item.red .feed-tag { color: #fca5a5; }
.feed-item.orange .feed-tag { color: #fef08a; }
.feed-item.green .feed-tag { color: #86efac; }
.feed-loc { color: var(--bright-slate); font-weight: 600; display: block; }
.feed-details { color: var(--muted-slate); display: block; margin-top: 2px; font-size: 0.8rem; }

/* Dashboard Structural Containers */
.card { background: var(--glass-card-fill); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); border: 1px solid var(--glass-card-stroke); border-radius: 14px; padding: 18px; box-shadow: 0 10px 30px rgba(0,0,0,0.25); }

.radar-header-block { display: flex; justify-content: space-between; align-items: flex-start; border-bottom: 1px solid rgba(255,255,255,0.05); padding-bottom: 14px; margin-bottom: 16px; }
.geo-title-node { margin: 0; font-size: 1.5rem; font-weight: 700; color: #fff; }
.status-pill-row { margin-top: 6px; display: flex; gap: 8px; }
.status-pill-lightning { background: rgba(0, 225, 255, 0.12); border: 1px solid rgba(0, 225, 255, 0.25); color: var(--neon-cyan); font-size: 0.78rem; font-weight: 600; padding: 3px 8px; border-radius: 6px; }

.timekeeping-cluster { display: flex; flex-direction: column; text-align: right; gap: 2px; }
.clock-readout { font-size: 1.35rem; font-weight: 800; color: #fff; font-variant-numeric: tabular-nums; }
.calendar-readout { font-size: 0.8rem; color: var(--muted-slate); font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }

.hero-split-grid { display: grid; grid-template-columns: 320px 1fr; gap: 18px; }
.hero-weather-summary { display: flex; flex-direction: column; justify-content: center; }
.main-temperature-row { display: flex; align-items: flex-start; margin-bottom: 2px; }
.mega-degree-value { font-size: 4.8rem; font-weight: 800; line-height: 1; color: #fff; }
.mega-scale-tag { font-size: 1.8rem; font-weight: 600; color: var(--muted-slate); margin-top: 8px; margin-left: 2px; }
.weather-sub-phrase { margin: 0 0 20px 0; font-size: 0.95rem; color: var(--muted-slate); font-weight: 500; }

.fast-metrics-row { display: flex; flex-direction: column; gap: 8px; background: rgba(0,0,0,0.15); padding: 12px; border-radius: 10px; border: 1px solid rgba(255,255,255,0.02); }
.fast-metric-item { display: flex; align-items: center; gap: 10px; }
.fast-icon { font-size: 1.1rem; width: 20px; text-align: center; }
.fast-text-stack { display: flex; justify-content: space-between; flex-grow: 1; font-size: 0.82rem; }
.fast-label { color: var(--muted-slate); font-weight: 500; }
.fast-val { color: #fff; font-weight: 700; }

.radar-map-wrapper { height: 230px; border-radius: 10px; overflow: hidden; border: 1px solid rgba(255,255,255,0.04); }
#live-hazard-map { height: 100%; width: 100%; background: #04080e; }
.leaflet-container { background: #04080e !important; }
.leaflet-layer { filter: invert(1) hue-rotate(185deg) brightness(0.6) contrast(1.2); }

/* Data Grid Construction layout specs */
.matrix-title-banner h3 { margin: 0 0 12px 0; font-size: 1.1rem; font-weight: 600; color: var(--muted-slate); text-transform: uppercase; letter-spacing: 0.04em; }
.analytics-responsive-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
@media (max-width: 1500px) { .analytics-responsive-grid { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 1100px) { .analytics-responsive-grid { grid-template-columns: repeat(2, 1fr); } }

.analytics-card { display: flex; flex-direction: column; min-height: 175px; justify-content: space-between; }
.card-tag-label { font-size: 0.82rem; color: var(--muted-slate); font-weight: 600; text-transform: uppercase; }
.card-giant-readout { font-size: 2.2rem; font-weight: 700; color: #fff; margin: 4px 0; }
.readout-unit { font-size: 1rem; color: var(--muted-slate); font-weight: 500; }
.card-status-footer { font-size: 0.85rem; font-weight: 700; margin-top: auto; margin-bottom: 2px; }
.card-narrative { margin: 0; font-size: 0.78rem; color: var(--muted-slate); line-height: 1.4; }

.text-cyan { color: var(--neon-cyan); }
.text-orange { color: var(--neon-amber); }

/* Auxiliary Dynamic Graphic Containers */
.vector-sparkline-box { height: 25px; display: flex; align-items: center; width: 100%; margin: 4px 0; }
.mini-spark-bar { height: 2px; width: 100%; background: rgba(255,255,255,0.08); position: relative; }
.mini-spark-bar::after { content: ''; position: absolute; left: 0; top: -3px; height: 8px; border-radius: 4px; }
.temp-bar::after { border-bottom: 2px solid var(--neon-cyan); width: 80%; }
.feels-bar::after { border-bottom: 2px solid var(--neon-amber); width: 65%; }
.pressure-bar::after { border-bottom: 2px solid var(--neon-cyan); width: 75%; }

.visual-emblem-center { font-size: 1.6rem; height: 40px; display: flex; align-items: center; margin: 2px 0; }

.compass-widget-row { display: flex; align-items: center; gap: 12px; margin: 8px 0; }
.compass-ring-frame { width: 48px; height: 48px; border-radius: 50%; border: 2px solid rgba(255,255,255,0.1); position: relative; background: rgba(0,0,0,0.2); }
.compass-ring-frame::before { content: 'N'; position: absolute; top: 1px; left: 50%; transform: translateX(-50%); font-size: 0.55rem; color: var(--muted-slate); font-weight: 800; }
.compass-needle-pointer { width: 2px; height: 26px; background: linear-gradient(to top, transparent 50%, var(--neon-cyan) 50%); position: absolute; top: 11px; left: 23px; transform: rotate(230deg); }
.compass-numeric-legend { display: flex; flex-direction: column; font-size: 0.78rem; color: var(--muted-slate); gap: 1px; }
.prominent-legend-stat { color: #fff; font-size: 1rem; font-weight: 700; }

.humidity-layout-split { display: flex; justify-content: space-between; align-items: center; margin: 6px 0; }
.humidity-bar-graph { display: flex; gap: 3px; align-items: flex-end; height: 35px; }
.humidity-bar-graph span { width: 5px; height: 100%; background: rgba(255,255,255,0.08); border-radius: 4px; }
.humidity-bar-graph span:nth-child(3) { background: var(--neon-cyan); height: 85%; }
.medium-hero-stat { font-size: 1.8rem; font-weight: 700; color: #fff; }
.humidity-legend-right { display: flex; flex-direction: column; text-align: right; font-size: 0.78rem; color: var(--muted-slate); }

.radial-dial-bounding-box { position: relative; width: 90px; height: 45px; overflow: hidden; margin: 6px auto 2px auto; }
.radial-arc { width: 90px; height: 90px; border-radius: 50%; border: 5px solid rgba(255,255,255,0.06); box-sizing: border-box; position: absolute; top: 0; left: 0; border-bottom-color: transparent !important; border-left-color: transparent !important; transform: rotate(-45deg); }
.uv-border-color { border-color: var(--neon-amber); }
.aqi-border-color { border-color: var(--neon-cyan); }
.radial-numeric-center { position: absolute; bottom: 0; left: 0; width: 100%; text-align: center; font-size: 1.6rem; font-weight: 700; color: #fff; }

.pyramid-graphic-stack { display: flex; flex-direction: column; gap: 3px; width: 55px; margin: 4px 0; }
.pyramid-graphic-stack span { height: 3px; background: rgba(0, 225, 255, 0.1); border-radius: 2px; }
.pyramid-graphic-stack span:nth-child(1) { width: 25%; background: var(--neon-cyan); }
.pyramid-graphic-stack span:nth-child(2) { width: 50%; background: var(--neon-cyan); }
.pyramid-graphic-stack span:nth-child(3) { width: 75%; background: var(--neon-cyan); }
.pyramid-graphic-stack span:nth-child(4) { width: 100%; background: var(--neon-cyan); }

.sun-arc-bounding-frame { position: relative; height: 40px; border-bottom: 1px dashed rgba(255,255,255,0.12); margin: 10px 0 4px 0; }
.sun-arc-dashed-vector { width: 110px; height: 110px; border: 2px solid var(--neon-amber); border-radius: 50%; position: absolute; top: 0; left: 50%; transform: translateX(-50%); opacity: 0.2; }
.sun-arc-duration-tag { position: absolute; bottom: 2px; width: 100%; text-align: center; font-size: 0.74rem; color: var(--muted-slate); font-weight: 600; }
.sun-transit-times-footer { display: flex; justify-content: space-between; font-size: 0.76rem; font-weight: 600; color: #fff; }
.label-muted { color: var(--muted-slate); font-size: 0.68rem; }

.lunar-orb-element { width: 38px; height: 38px; border-radius: 50%; background: #02050a; box-shadow: inset -14px 0 0 0 var(--neon-amber); border: 1px solid rgba(255,255,255,0.04); }

/* Mitigation Protocol Modules Panel styling layout rules */
.mitigation-checklists-wrapper h3 { margin: 0 0 14px 0; font-size: 1.1rem; font-weight: 600; color: #fff; }
.mitigation-flex-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(260px, 1fr)); gap: 14px; }
.mitigation-column-box { padding: 14px; border-radius: 10px; background: rgba(0, 0, 0, 0.15); border: 1px solid rgba(255,255,255,0.02); }
.mitigation-column-box h4 { margin: 0 0 6px 0; font-size: 0.9rem; font-weight: 700; color: #fff; }
.mitigation-column-box p { margin: 0; font-size: 0.8rem; color: var(--muted-slate); line-height: 1.45; }

.flood-accent-top { border-top: 3px solid var(--neon-cyan); }
.wind-accent-top { border-top: 3px solid #ec4899; }
.snow-accent-top { border-top: 3px solid var(--neon-purple); }
.crust-accent-top { border-top: 3px solid var(--neon-amber); }

@media (max-width: 1250px) { .dashboard-core-layout { grid-template-columns: 1fr; } .threat-matrix-sidebar { max-height: 350px; position: relative; top: 0; } }
