:root {
    color-scheme: light;
    --navy-950: #03162d;
    --navy-900: #061d39;
    --navy-800: #0a2b50;
    --blue-700: #0758d6;
    --blue-600: #0969ef;
    --blue-100: #eaf3ff;
    --ink-950: #08172e;
    --ink-700: #344766;
    --ink-500: #697b96;
    --line: #dbe4f0;
    --surface: #ffffff;
    --canvas: #f4f7fb;
    --green: #159a68;
    --red: #cf2634;
    --orange: #ed7b22;
    --yellow: #eab308;
    --radius: 14px;
    font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
body { margin: 0; color: var(--ink-950); background: var(--canvas); }
button, input, select, textarea { font: inherit; }
button, summary, a { -webkit-tap-highlight-color: transparent; }
a { color: inherit; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; border: 0; }

.wc-app { min-height: 100vh; display: grid; grid-template-columns: 260px minmax(0, 1fr); }
.wc-sidebar { position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; padding: 22px 16px; color: #d8e7fa; background: linear-gradient(180deg, var(--navy-950), var(--navy-900)); border-right: 1px solid #183957; z-index: 30; }
.wc-sidebar-brand { display: grid; gap: 10px; padding: 2px 12px 23px; border-bottom: 1px solid rgba(255,255,255,.12); }
.wc-sidebar-brand img { display: block; width: 205px; max-width: 100%; height: 44px; object-fit: contain; object-position: left center; }
.wc-sidebar-brand span { color: #8fa8c8; font-size: 11px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.wc-sidebar nav { display: grid; gap: 5px; padding: 21px 0; overflow-y: auto; }
.wc-nav-link { display: flex; align-items: center; gap: 13px; min-height: 45px; padding: 0 13px; color: #bad0ea; text-decoration: none; border: 1px solid transparent; border-radius: 10px; font-size: 14px; font-weight: 700; }
.wc-nav-link:hover { color: #fff; background: rgba(255,255,255,.06); }
.wc-nav-link.is-active { color: #fff; background: linear-gradient(90deg, #0c5bc5, #0b477e); border-color: rgba(110,186,255,.3); box-shadow: inset 3px 0 #39a5ff; }
.wc-nav-icon { display: grid; place-items: center; width: 22px; color: #64b7ff; font-size: 17px; }
.wc-sidebar-status { margin-top: auto; display: flex; align-items: center; gap: 9px; padding: 17px 11px 4px; color: #9cb3ce; font-size: 12px; border-top: 1px solid rgba(255,255,255,.1); }
.wc-sidebar-status span { width: 9px; height: 9px; border-radius: 99px; background: #24ce8a; box-shadow: 0 0 0 5px rgba(36,206,138,.1); }

.wc-main { min-width: 0; }
.wc-topbar { min-height: 78px; padding: 0 32px; display: flex; align-items: center; justify-content: space-between; gap: 22px; background: rgba(255,255,255,.96); border-bottom: 1px solid var(--line); }
.wc-topbar-title { display: grid; gap: 3px; }
.wc-topbar-title strong { font-size: 16px; }
.wc-topbar-title span { color: var(--ink-500); font-size: 11px; font-weight: 800; letter-spacing: .13em; text-transform: uppercase; }
.wc-topbar-actions { display: flex; align-items: center; gap: 22px; }
.wc-topbar time { color: var(--ink-500); font-size: 12px; font-weight: 650; }
.wc-user-menu { position: relative; }
.wc-user-menu summary { display: flex; align-items: center; gap: 9px; list-style: none; cursor: pointer; }
.wc-user-menu summary::-webkit-details-marker { display: none; }
.wc-user-menu summary > span:last-child { display: grid; font-size: 12px; }
.wc-user-menu small { color: var(--ink-500); }
.wc-avatar { display: grid; place-items: center; width: 39px; height: 39px; color: #fff; background: var(--navy-900); border-radius: 50%; font-weight: 800; }
.wc-user-dropdown { position: absolute; right: 0; top: calc(100% + 12px); min-width: 230px; padding: 15px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 18px 50px rgba(8,23,46,.18); z-index: 40; }
.wc-user-dropdown > span { display: block; margin-bottom: 11px; color: var(--ink-500); font-size: 12px; overflow-wrap: anywhere; }
.wc-user-dropdown button { width: 100%; padding: 9px 12px; color: var(--red); background: #fff; border: 1px solid #f1c8cd; border-radius: 8px; cursor: pointer; font-weight: 750; }
.wc-sidebar-toggle { display: none; }

.wc-content { padding: 30px 34px 48px; }
.wc-page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 25px; }
.wc-page-header h1 { margin: 2px 0 6px; font-size: clamp(27px, 3vw, 38px); letter-spacing: -.035em; }
.wc-page-header p:not(.wc-eyebrow) { margin: 0; color: var(--ink-500); }
.wc-eyebrow { margin: 0; color: var(--blue-700); font-size: 11px; font-weight: 850; letter-spacing: .16em; text-transform: uppercase; }
.wc-page-actions { flex: 0 0 auto; }
.wc-muted { color: var(--ink-500); }

.wc-stat-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 15px; margin-bottom: 20px; }
.wc-stat-card { min-height: 128px; padding: 19px; display: grid; align-content: start; gap: 7px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 5px 20px rgba(29,54,91,.04); }
.wc-stat-card > span { color: var(--ink-500); font-size: 11px; font-weight: 800; letter-spacing: .11em; text-transform: uppercase; }
.wc-stat-card strong { font-size: 28px; letter-spacing: -.03em; }
.wc-stat-card small { color: var(--ink-500); }
.wc-tone-green { border-top: 3px solid var(--green); }
.wc-tone-blue { border-top: 3px solid var(--blue-600); }
.wc-tone-neutral { border-top: 3px solid #9aa9bb; }

.wc-workspace-grid { display: grid; grid-template-columns: minmax(0, 1.7fr) minmax(280px, .8fr); gap: 20px; }
.wc-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 28px rgba(29,54,91,.05); overflow: hidden; }
.wc-card-header { min-height: 57px; display: flex; align-items: center; padding: 0 20px; border-bottom: 1px solid var(--line); }
.wc-card-header h2 { margin: 0; font-size: 16px; }
.wc-card-body { padding: 20px; }

.wc-pill { display: inline-flex; align-items: center; min-height: 27px; padding: 4px 10px; border-radius: 999px; font-size: 11px; font-weight: 800; }
.wc-pill-blue { color: #0758d6; background: #e5f0ff; }
.wc-pill-green { color: #08734c; background: #dcf7eb; }
.wc-pill-neutral { color: #53657d; background: #edf1f6; }
.wc-pill-red { color: #a31523; background: #fde7e9; }
.wc-source-status { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 13px; font-weight: 700; }
.wc-stale-warning { display: grid; gap: 4px; margin-top: 15px; padding: 13px 14px; color: #765611; background: #fff9df; border: 1px solid #f3d984; border-radius: 10px; font-size: 12px; }
.wc-state { min-height: 245px; display: grid; place-items: center; align-content: center; text-align: center; padding: 30px; }
.wc-state-icon { display: grid; place-items: center; width: 48px; height: 48px; margin-bottom: 8px; color: var(--blue-600); background: var(--blue-100); border-radius: 50%; font-size: 23px; }
.wc-state h3 { max-width: 720px; margin: 4px 0 7px; font-size: 18px; }
.wc-state p { max-width: 650px; margin: 0; color: var(--ink-500); line-height: 1.55; }
.wc-error-state { min-height: auto; padding: 13px; color: #8d1721; background: #fff0f1; border: 1px solid #f1c3c8; border-radius: 9px; text-align: left; place-items: start; }
.wc-error-state h3, .wc-error-state p { margin: 0; color: inherit; font-size: 13px; }
.wc-map-container { position: relative; min-height: 420px; overflow: hidden; background: #e8eef6; border: 1px solid var(--line); border-radius: 12px; }
.wc-table-wrap { overflow-x: auto; }
.wc-table-wrap table { width: 100%; border-collapse: collapse; }
.wc-table-wrap th, .wc-table-wrap td { padding: 12px 14px; border-bottom: 1px solid var(--line); text-align: left; }
.wc-tabs { display: flex; gap: 3px; border-bottom: 1px solid var(--line); }
.wc-tabs button { padding: 11px 15px; color: var(--ink-500); background: transparent; border: 0; border-bottom: 2px solid transparent; cursor: pointer; }
.wc-tabs button[aria-selected="true"] { color: var(--blue-700); border-color: var(--blue-600); }
.wc-alert-badge { display: inline-flex; padding: 4px 8px; color: #fff; border-radius: 6px; font-size: 11px; font-weight: 850; text-transform: uppercase; }
.wc-alert-extreme, .wc-alert-severe { background: var(--red); }
.wc-alert-moderate { background: var(--orange); }
.wc-alert-minor { color: #4f3f00; background: #facc15; }

.wc-form { display: grid; gap: 17px; }
.wc-field { display: grid; gap: 7px; color: var(--ink-700); font-size: 12px; font-weight: 750; }
.wc-field input, .wc-field select, .wc-field textarea, .wc-search input { width: 100%; min-height: 45px; padding: 10px 12px; color: var(--ink-950); background: #fff; border: 1px solid #cbd7e7; border-radius: 9px; outline: none; }
.wc-field input:focus, .wc-field select:focus, .wc-field textarea:focus, .wc-search input:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(9,105,239,.13); }
.wc-check { display: flex; align-items: center; gap: 9px; color: var(--ink-700); font-size: 12px; }
.wc-check input { width: 17px; height: 17px; accent-color: var(--blue-600); }
.wc-button { min-height: 43px; padding: 9px 16px; border: 1px solid transparent; border-radius: 9px; cursor: pointer; font-weight: 800; }
.wc-button-primary { color: #fff; background: var(--blue-600); }
.wc-button-primary:hover { background: var(--blue-700); }
.wc-button-danger { color: #fff; background: var(--red); }
.wc-button-block { width: 100%; }
.wc-progress { height: 8px; overflow: hidden; background: #e6ecf4; border-radius: 99px; }
.wc-progress span { display: block; height: 100%; background: var(--blue-600); }
.wc-skeleton { display: grid; gap: 10px; }
.wc-skeleton span { height: 15px; border-radius: 5px; background: linear-gradient(90deg, #edf1f6 25%, #f8fafc 50%, #edf1f6 75%); background-size: 200% 100%; animation: wc-shimmer 1.4s infinite; }
@keyframes wc-shimmer { to { background-position: -200% 0; } }
.wc-modal { width: min(600px, calc(100vw - 30px)); padding: 0; border: 1px solid var(--line); border-radius: 13px; box-shadow: 0 25px 80px rgba(3,22,45,.32); }
.wc-modal::backdrop { background: rgba(3,22,45,.56); }
.wc-modal > header { display: flex; justify-content: space-between; padding: 15px 18px; border-bottom: 1px solid var(--line); }
.wc-modal > header h2 { margin: 0; }
.wc-modal > div { padding: 18px; }
.wc-drawer { position: fixed; right: 0; top: 0; width: min(440px, 100vw); height: 100vh; padding: 20px; background: #fff; box-shadow: -15px 0 50px rgba(3,22,45,.18); z-index: 60; }
.wc-dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 18px; }
.wc-toast { position: fixed; right: 22px; bottom: 22px; padding: 13px 17px; color: #fff; background: var(--navy-900); border-radius: 9px; box-shadow: 0 14px 45px rgba(3,22,45,.25); z-index: 80; }

.wc-auth-body { min-height: 100vh; display: grid; place-items: center; padding: 28px; background: radial-gradient(circle at 20% 20%, #0c4b84, transparent 38%), linear-gradient(135deg, #03162d 0%, #061d39 58%, #0a2b50 100%); }
.wc-auth-shell { width: min(980px, 100%); display: grid; grid-template-columns: 1.2fr .9fr; overflow: hidden; background: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 20px; box-shadow: 0 30px 90px rgba(0,0,0,.3); }
.wc-auth-brand { min-height: 560px; display: flex; flex-direction: column; justify-content: flex-end; padding: 52px; color: #fff; background: linear-gradient(180deg, rgba(3,22,45,.12), rgba(3,22,45,.85)), linear-gradient(135deg, #0d65be, #03162d); }
.wc-auth-logo { width: min(390px, 100%); height: 75px; object-fit: contain; object-position: left; margin-bottom: auto; }
.wc-auth-brand .wc-eyebrow { color: #75c4ff; }
.wc-auth-brand h1 { max-width: 510px; margin: 8px 0 10px; font-size: clamp(36px, 5vw, 60px); line-height: .98; letter-spacing: -.045em; }
.wc-auth-brand > p:last-child { max-width: 480px; margin-bottom: 0; color: #ccdef2; line-height: 1.6; }
.wc-login-card { display: flex; flex-direction: column; justify-content: center; gap: 29px; padding: 48px; }
.wc-login-card h2 { margin: 4px 0 4px; font-size: 30px; }
.wc-login-card p { margin-bottom: 0; }

/* Phase 4 operational dashboard */
.wc-dashboard { max-width: 1680px; margin: 0 auto; }
.wc-dashboard-health { display: inline-flex; align-items: center; gap: 8px; min-height: 34px; padding: 7px 12px; color: #0a6e4b; background: #e5f8ef; border: 1px solid #b9ead5; border-radius: 999px; font-size: 12px; font-weight: 800; }
.wc-dashboard-health span { width: 8px; height: 8px; background: #19ac73; border-radius: 50%; box-shadow: 0 0 0 4px rgba(25,172,115,.12); }
.wc-dashboard-health.is-stale { color: #825b06; background: #fff6cf; border-color: #efd46f; }
.wc-dashboard-health.is-stale span { background: #e6a700; box-shadow: 0 0 0 4px rgba(230,167,0,.13); }
.wc-dashboard-health.is-error { color: #9c1724; background: #ffeaec; border-color: #f0bec4; }
.wc-dashboard-health.is-error span { background: #d72838; box-shadow: 0 0 0 4px rgba(215,40,56,.13); }
.wc-dashboard-stats { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); gap: 12px; margin-bottom: 18px; }
.wc-dashboard-stat { position: relative; min-height: 116px; padding: 17px 17px 15px; display: grid; align-content: start; gap: 5px; background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: 0 5px 20px rgba(29,54,91,.04); overflow: hidden; }
.wc-dashboard-stat::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--blue-600); }
.wc-dashboard-stat[data-stat="warnings"]::before, .wc-dashboard-stat[data-stat="floods"]::before { background: var(--red); }
.wc-dashboard-stat[data-stat="tropical"]::before { background: var(--orange); }
.wc-dashboard-stat > span { color: var(--ink-500); font-size: 10px; font-weight: 850; letter-spacing: .09em; text-transform: uppercase; }
.wc-dashboard-stat strong { min-height: 38px; display: flex; align-items: center; font-size: clamp(22px, 2.2vw, 31px); letter-spacing: -.035em; }
.wc-dashboard-stat[data-stat="radar"] strong { font-size: 18px; }
.wc-dashboard-stat small { color: var(--ink-500); font-size: 11px; }
.wc-dashboard-grid { display: grid; grid-template-columns: minmax(0, 1.85fr) minmax(310px, .72fr); gap: 18px; align-items: start; }
.wc-radar-card { min-width: 0; }
.wc-radar-heading { min-height: 70px; display: flex; align-items: center; justify-content: space-between; gap: 18px; padding: 12px 17px; border-bottom: 1px solid var(--line); }
.wc-radar-heading h2 { margin: 2px 0 0; font-size: 18px; }
.wc-radar-meta { display: grid; justify-items: end; gap: 3px; color: var(--ink-500); font-size: 11px; }
.wc-radar-meta span { color: var(--blue-700); font-weight: 800; }
.wc-map-shell { position: relative; background: #dfe7f1; }
.wc-dashboard-map { height: clamp(480px, 52vw, 680px); min-height: 480px; background: #d8e3ef; z-index: 1; }
.wc-dashboard-map .leaflet-control-zoom a { color: var(--navy-900); }
.wc-dashboard-map .leaflet-popup-content-wrapper { border-radius: 10px; box-shadow: 0 12px 35px rgba(3,22,45,.22); }
.wc-dashboard-map .leaflet-popup-content { margin: 13px 15px; line-height: 1.45; }
.wc-dashboard-map .leaflet-popup-content strong { display: block; margin-bottom: 3px; }
.wc-map-loading { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; gap: 10px; color: #fff; background: rgba(3,22,45,.68); font-size: 13px; font-weight: 800; z-index: 900; transition: opacity .2s ease; }
.wc-map-loading.is-hidden { opacity: 0; pointer-events: none; }
.wc-map-loading span { width: 20px; height: 20px; border: 3px solid rgba(255,255,255,.35); border-top-color: #fff; border-radius: 50%; animation: wc-spin .8s linear infinite; }
@keyframes wc-spin { to { transform: rotate(360deg); } }
.wc-map-layers { position: absolute; right: 14px; top: 14px; width: 210px; padding: 13px; display: grid; gap: 8px; background: rgba(255,255,255,.96); border: 1px solid rgba(219,228,240,.95); border-radius: 10px; box-shadow: 0 9px 30px rgba(3,22,45,.15); z-index: 850; transition: opacity .16s ease, transform .16s ease; }
.wc-map-layers.is-hidden { opacity: 0; transform: translateY(-5px); pointer-events: none; }
.wc-map-layers strong { padding-bottom: 5px; color: var(--navy-900); border-bottom: 1px solid var(--line); font-size: 12px; }
.wc-map-layers label { display: flex; align-items: center; gap: 8px; color: var(--ink-700); font-size: 11px; font-weight: 700; }
.wc-map-layers input { accent-color: var(--blue-600); }
.wc-layer-toggle { position: absolute; right: 14px; bottom: 14px; min-height: 36px; padding: 7px 11px; color: var(--navy-900); background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 5px 18px rgba(3,22,45,.16); cursor: pointer; font-size: 11px; font-weight: 800; z-index: 850; }
.wc-radar-product-layer { mix-blend-mode: multiply; filter: saturate(1.35) contrast(1.08); }
.wc-lightning-marker { display: grid; place-items: center; width: 22px !important; height: 22px !important; margin-left: -11px !important; margin-top: -11px !important; color: #111827; background: #ffd400; border: 2px solid #fff; border-radius: 50%; box-shadow: 0 2px 9px rgba(3,22,45,.45); font-size: 13px; font-weight: 900; }
.wc-city-label { color: var(--navy-900); background: rgba(255,255,255,.86); border: 1px solid #aec0d5; border-radius: 5px; box-shadow: none; font-size: 10px; font-weight: 850; }
.wc-city-label::before { display: none; }
.wc-radar-controls { min-height: 59px; display: flex; align-items: center; gap: 9px; padding: 10px 14px; border-top: 1px solid var(--line); }
.wc-radar-button { min-width: 38px; min-height: 36px; padding: 7px 11px; color: var(--ink-700); background: #fff; border: 1px solid #cfdbe9; border-radius: 8px; cursor: pointer; font-size: 12px; font-weight: 800; }
.wc-radar-button:disabled { opacity: .45; cursor: not-allowed; }
.wc-radar-play { min-width: 75px; color: #fff; background: var(--blue-600); border-color: var(--blue-600); }
.wc-radar-timeline { min-width: 110px; flex: 1; display: flex; }
.wc-radar-timeline input { width: 100%; accent-color: var(--blue-600); }
.wc-loop-check { display: flex; align-items: center; gap: 5px; color: var(--ink-500); font-size: 11px; font-weight: 750; }
.wc-loop-check input { accent-color: var(--blue-600); }
.wc-frame-count { min-width: 59px; color: var(--ink-500); font-size: 10px; text-align: center; }
.wc-map-status { min-height: 33px; padding: 8px 14px; color: var(--ink-500); background: #f8fafc; border-top: 1px solid var(--line); font-size: 10px; }
.wc-dashboard-side { display: grid; gap: 18px; }
.wc-live-list-card { min-height: 260px; }
.wc-card-header-split { justify-content: space-between; }
.wc-card-header-split a, .wc-section-title > a { color: var(--blue-700); text-decoration: none; font-size: 11px; font-weight: 800; }
.wc-live-list { max-height: 390px; overflow-y: auto; padding: 5px 16px 13px; }
.wc-live-item { width: 100%; padding: 13px 2px; display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: start; color: inherit; background: none; border: 0; border-bottom: 1px solid var(--line); text-align: left; text-decoration: none; cursor: pointer; }
.wc-live-item:last-child { border-bottom: 0; }
.wc-live-icon { width: 32px; height: 32px; display: grid; place-items: center; color: #fff; background: var(--blue-600); border-radius: 8px; font-size: 13px; font-weight: 900; }
.wc-live-icon.is-severe { background: var(--red); }
.wc-live-icon.is-tropical { background: var(--orange); border-radius: 50%; }
.wc-live-copy { min-width: 0; display: grid; gap: 3px; }
.wc-live-copy strong { font-size: 12px; line-height: 1.35; }
.wc-live-copy span { color: var(--ink-500); font-size: 10px; line-height: 1.4; }
.wc-live-time { color: var(--ink-500); font-size: 9px; font-weight: 750; white-space: nowrap; }
.wc-live-empty { min-height: 170px; display: grid; place-items: center; align-content: center; gap: 6px; padding: 24px; color: var(--ink-500); text-align: center; }
.wc-live-empty span { width: 40px; height: 40px; display: grid; place-items: center; color: #0a855d; background: #e2f6ee; border-radius: 50%; font-weight: 900; }
.wc-live-empty strong { color: var(--ink-950); font-size: 13px; }
.wc-live-empty small { max-width: 260px; line-height: 1.45; }
.wc-quick-section { margin-top: 22px; }
.wc-section-title { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; margin-bottom: 12px; }
.wc-section-title h2 { margin: 2px 0 0; font-size: 19px; }
.wc-quick-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.wc-quick-action { position: relative; min-height: 125px; padding: 14px; display: grid; align-content: start; gap: 6px; color: inherit; background: #fff; border: 1px solid var(--line); border-radius: 11px; text-decoration: none; box-shadow: 0 5px 18px rgba(29,54,91,.04); transition: transform .15s ease, border-color .15s ease, box-shadow .15s ease; }
.wc-quick-action:hover { transform: translateY(-2px); border-color: #9fc5f5; box-shadow: 0 9px 25px rgba(29,54,91,.1); }
.wc-quick-action > span { width: 34px; height: 34px; display: grid; place-items: center; color: #fff; background: linear-gradient(135deg, var(--blue-600), #0751bd); border-radius: 8px; font-weight: 900; }
.wc-quick-action strong { font-size: 12px; }
.wc-quick-action small { color: var(--ink-500); font-size: 10px; line-height: 1.35; }
.wc-quick-action b { position: absolute; right: 12px; top: 16px; color: var(--blue-600); }
.wc-alert-dialog > header button { width: 32px; height: 32px; color: var(--ink-500); background: #fff; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-size: 20px; }
.wc-alert-detail-grid { display: grid; grid-template-columns: repeat(2, minmax(0,1fr)); gap: 10px; margin-bottom: 15px; }
.wc-alert-detail-grid div { padding: 10px; background: #f5f8fc; border-radius: 8px; }
.wc-alert-detail-grid span { display: block; color: var(--ink-500); font-size: 9px; font-weight: 800; text-transform: uppercase; }
.wc-alert-detail-grid strong { display: block; margin-top: 3px; font-size: 12px; }
.wc-alert-body { color: var(--ink-700); font-size: 12px; line-height: 1.58; white-space: pre-line; }

@media (max-width: 1380px) {
    .wc-dashboard-stats { grid-template-columns: repeat(3, minmax(0, 1fr)); }
    .wc-quick-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
@media (max-width: 1120px) {
    .wc-dashboard-grid { grid-template-columns: 1fr; }
    .wc-dashboard-side { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 1050px) {
    .wc-app { grid-template-columns: 220px minmax(0, 1fr); }
    .wc-sidebar-brand img { width: 180px; }
    .wc-stat-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wc-topbar { padding: 0 23px; }
    .wc-content { padding: 25px 24px 40px; }
}
@media (max-width: 780px) {
    .wc-app { display: block; }
    .wc-sidebar { position: fixed; left: 0; transform: translateX(-101%); width: 260px; transition: transform .2s ease; box-shadow: 15px 0 50px rgba(3,22,45,.25); }
    body.wc-sidebar-open .wc-sidebar { transform: translateX(0); }
    .wc-sidebar-toggle { display: inline-flex; padding: 8px 10px; color: var(--navy-900); background: #fff; border: 1px solid var(--line); border-radius: 8px; font-weight: 750; }
    .wc-topbar { min-height: 68px; padding: 0 16px; }
    .wc-topbar time, .wc-topbar-title span { display: none; }
    .wc-topbar-actions { gap: 10px; }
    .wc-user-menu summary > span:last-child { display: none; }
    .wc-content { padding: 22px 16px 35px; }
    .wc-page-header { align-items: flex-start; }
    .wc-workspace-grid, .wc-auth-shell { grid-template-columns: 1fr; }
    .wc-auth-brand { min-height: 260px; padding: 30px; }
    .wc-auth-logo { height: 55px; }
    .wc-login-card { padding: 32px 25px; }
    .wc-dashboard-stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
    .wc-dashboard-side { grid-template-columns: 1fr; }
    .wc-dashboard-map { min-height: 420px; height: 58vh; }
    .wc-map-layers { width: 190px; }
    .wc-radar-controls { flex-wrap: wrap; }
    .wc-radar-timeline { order: 2; flex-basis: 100%; }
    .wc-quick-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 520px) {
    .wc-stat-grid { grid-template-columns: 1fr; }
    .wc-page-header { display: grid; }
    .wc-auth-body { padding: 12px; }
    .wc-dashboard-stats, .wc-quick-grid { grid-template-columns: 1fr; }
    .wc-radar-heading { align-items: flex-start; }
    .wc-radar-meta { justify-items: start; }
    .wc-alert-detail-grid { grid-template-columns: 1fr; }
}

/* Phase 5 severe weather alerts */
.wc-alerts-page { max-width: 1680px; margin: 0 auto; }
.wc-alert-stat-grid { display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); gap: 12px; margin-bottom: 18px; }
.wc-alert-stat-grid .wc-dashboard-stat[data-alert-stat="warnings"]::before,
.wc-alert-stat-grid .wc-dashboard-stat[data-alert-stat="severe"]::before { background: var(--red); }
.wc-alert-stat-grid .wc-dashboard-stat[data-alert-stat="watches"]::before { background: var(--orange); }
.wc-alert-stat-grid .wc-dashboard-stat[data-alert-stat="floods"]::before { background: var(--green); }
.wc-alert-stat-grid .wc-dashboard-stat[data-alert-stat="reports"]::before { background: #64748b; }
.wc-alert-map-card { margin-bottom: 18px; }
.wc-alerts-map { height: clamp(500px,54vw,690px); min-height: 500px; background: #d8e3ef; z-index: 1; }
.wc-alert-layer-menu { position: absolute; right: 14px; top: 14px; width: 250px; max-height: calc(100% - 72px); padding: 13px; display: grid; gap: 8px; overflow-y: auto; background: rgba(255,255,255,.96); border: 1px solid rgba(219,228,240,.95); border-radius: 10px; box-shadow: 0 9px 30px rgba(3,22,45,.15); z-index: 850; transition: opacity .16s ease,transform .16s ease; }
.wc-alert-layer-menu.is-hidden { opacity: 0; transform: translateY(-5px); pointer-events: none; }
.wc-alert-layer-menu strong { padding-bottom: 6px; border-bottom: 1px solid var(--line); font-size: 12px; }
.wc-alert-layer-menu label { display: flex; align-items: center; gap: 8px; color: var(--ink-700); font-size: 11px; font-weight: 700; }
.wc-alert-layer-menu input { accent-color: var(--blue-600); }
.wc-alert-results-header { min-height: 67px; display: flex; align-items: center; justify-content: space-between; gap: 20px; padding: 12px 18px; border-bottom: 1px solid var(--line); }
.wc-alert-results-header h2 { margin: 2px 0 0; font-size: 18px; }
.wc-alert-results-header > span { color: var(--ink-500); font-size: 11px; font-weight: 800; }
.wc-alert-filters { display: grid; grid-template-columns: minmax(240px,1.6fr) repeat(5,minmax(130px,.7fr)); gap: 10px; padding: 14px 16px; background: #f8fafc; border-bottom: 1px solid var(--line); }
.wc-alert-filters label { display: grid; gap: 5px; color: var(--ink-500); font-size: 9px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.wc-alert-filters input,.wc-alert-filters select { width: 100%; min-height: 41px; padding: 8px 10px; color: var(--ink-950); background: #fff; border: 1px solid #cad7e6; border-radius: 8px; outline: none; font-size: 11px; text-transform: none; }
.wc-alert-filters input:focus,.wc-alert-filters select:focus { border-color: var(--blue-600); box-shadow: 0 0 0 3px rgba(9,105,239,.12); }
.wc-alert-search { align-self: end; }
.wc-alert-table-wrap { overflow-x: auto; }
.wc-alert-table-wrap table { width: 100%; min-width: 1180px; border-collapse: collapse; }
.wc-alert-table-wrap th { padding: 11px 13px; color: var(--ink-500); background: #fbfcfe; font-size: 9px; letter-spacing: .07em; text-transform: uppercase; }
.wc-alert-table-wrap td { max-width: 340px; padding: 13px; color: var(--ink-700); border-top: 1px solid var(--line); font-size: 10px; line-height: 1.4; vertical-align: top; }
.wc-alert-table-wrap td strong { color: var(--ink-950); font-size: 11px; }
.wc-alert-table-wrap tr.is-expired { opacity: .58; }
.wc-table-action { min-height: 32px; padding: 6px 11px; color: var(--blue-700); background: #fff; border: 1px solid #bdd3ef; border-radius: 7px; cursor: pointer; font-size: 10px; font-weight: 800; }
.wc-alert-empty { min-height: 210px; display: grid; place-items: center; align-content: center; gap: 6px; color: var(--ink-500); text-align: center; }
.wc-alert-empty.is-hidden { display: none; }
.wc-alert-empty > span { width: 42px; height: 42px; display: grid; place-items: center; color: #08734c; background: #dcf7eb; border-radius: 50%; font-weight: 900; }
.wc-alert-empty strong { color: var(--ink-950); }
.wc-alert-empty small { font-size: 11px; }
.wc-alert-detail-modal { width: min(860px,calc(100vw - 30px)); }
.wc-alert-detail-modal > header { align-items: flex-start; }
.wc-alert-detail-modal > header h2 { margin-top: 3px; font-size: 22px; }
.wc-alert-detail-modal > header button { width: 34px; height: 34px; color: var(--ink-500); background: #fff; border: 1px solid var(--line); border-radius: 7px; cursor: pointer; font-size: 20px; }
.wc-alert-detail-summary { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 9px; }
.wc-alert-detail-summary > div { padding: 11px; background: #f5f8fc; border: 1px solid #e8eef5; border-radius: 8px; }
.wc-alert-detail-summary span { display: block; color: var(--ink-500); font-size: 8px; font-weight: 850; letter-spacing: .06em; text-transform: uppercase; }
.wc-alert-detail-summary strong { display: block; margin-top: 4px; font-size: 11px; line-height: 1.4; }
.wc-alert-detail-copy { display: grid; gap: 12px; margin-top: 14px; }
.wc-alert-detail-copy section { padding: 14px; border: 1px solid var(--line); border-radius: 9px; }
.wc-alert-detail-copy h3 { margin: 0 0 7px; font-size: 13px; }
.wc-alert-detail-copy p { max-height: 190px; margin: 0; overflow-y: auto; color: var(--ink-700); font-size: 11px; line-height: 1.6; white-space: pre-line; }
.wc-alert-graphic-link { display: inline-flex; align-items: center; text-decoration: none; }
@media (max-width: 1380px) { .wc-alert-filters { grid-template-columns: repeat(3,minmax(0,1fr)); } .wc-alert-search { grid-column: span 2; } }
@media (max-width: 1120px) { .wc-alert-stat-grid { grid-template-columns: repeat(3,minmax(0,1fr)); } }
@media (max-width: 780px) { .wc-alert-stat-grid { grid-template-columns: repeat(2,minmax(0,1fr)); } .wc-alerts-map { min-height: 430px; height: 60vh; } .wc-alert-filters { grid-template-columns: repeat(2,minmax(0,1fr)); } .wc-alert-search { grid-column: span 2; } .wc-alert-detail-summary { grid-template-columns: repeat(2,minmax(0,1fr)); } }
@media (max-width: 520px) { .wc-alert-stat-grid,.wc-alert-filters,.wc-alert-detail-summary { grid-template-columns: 1fr; } .wc-alert-search { grid-column: auto; } .wc-alert-layer-menu { width: min(250px,calc(100% - 28px)); } .wc-dialog-actions { display: grid; } }
