:root {
    color-scheme: dark;
    --bg: #03060a;
    --surface: rgba(14, 23, 34, .64);
    --surface-strong: rgba(17, 29, 43, .83);
    --border: rgba(167, 212, 255, .14);
    --border-strong: rgba(38, 197, 255, .42);
    --text: #f5f9ff;
    --muted: #8998ab;
    --cyan: #18c8ff;
    --blue: #1778ff;
    --violet: #9d7bff;
    --amber: #ffb347;
    --green: #34e89e;
    --red: #ff5f78;
    --gauge: 0deg;
    font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }
body { margin: 0; min-width: 320px; min-height: 100vh; color: var(--text); background: var(--bg); }
.view-pending [data-private-dashboard], .public-view [data-private-dashboard] { display: none; }
body::before { content: ""; position: fixed; inset: 0; pointer-events: none; opacity: .32; background-image: linear-gradient(rgba(255,255,255,.018) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.018) 1px, transparent 1px); background-size: 44px 44px; mask-image: linear-gradient(to bottom, black, transparent 78%); }
.ambient { position: fixed; width: 38rem; height: 38rem; border-radius: 50%; filter: blur(110px); opacity: .14; pointer-events: none; }
.ambient-one { top: -15rem; left: -12rem; background: var(--cyan); }
.ambient-two { top: 15rem; right: -20rem; background: var(--violet); }
.shell { position: relative; width: min(1560px, calc(100% - 40px)); margin: 0 auto; padding: 28px 0 56px; }
.glass { background: linear-gradient(145deg, rgba(21, 34, 49, .78), rgba(7, 13, 21, .62)); border: 1px solid var(--border); box-shadow: inset 0 1px 0 rgba(255,255,255,.06), 0 20px 60px rgba(0,0,0,.24); backdrop-filter: blur(24px) saturate(135%); -webkit-backdrop-filter: blur(24px) saturate(135%); }
.topbar { min-height: 102px; border-radius: 26px; padding: 17px 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.brand-lockup { display: flex; align-items: center; min-width: 0; }
.adsb-logo { width: 72px; height: 72px; object-fit: contain; }
.vrsx-logo { width: 122px; height: 52px; object-fit: contain; }
.brand-divider { width: 1px; height: 44px; margin: 0 20px; background: linear-gradient(transparent, rgba(255,255,255,.25), transparent); }
.title-block { margin-left: 23px; padding-left: 23px; border-left: 1px solid var(--border); }
.eyebrow { margin: 0 0 5px; color: var(--cyan); font-size: 11px; font-weight: 700; letter-spacing: .18em; text-transform: uppercase; }
h1, h2, h3, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(25px, 3vw, 38px); letter-spacing: -.045em; }
h2 { margin: 0; font-size: 24px; letter-spacing: -.025em; }
h3 { margin: 0 0 4px; font-size: 16px; }
.header-status { display: flex; align-items: center; gap: 24px; }
.state-pill { display: flex; gap: 9px; align-items: center; padding: 9px 13px; border-radius: 999px; background: rgba(137,152,171,.1); color: var(--muted); font-size: 12px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; white-space: nowrap; }
.state-pill.ok { color: var(--green); background: rgba(52,232,158,.1); }
.state-pill.degraded { color: var(--amber); background: rgba(255,179,71,.1); }
.state-dot { width: 8px; height: 8px; border-radius: 50%; background: currentColor; box-shadow: 0 0 14px currentColor; }
.zulu-clock { min-width: 112px; text-align: right; font-variant-numeric: tabular-nums; }
.zulu-clock span { display: block; font-size: 21px; font-weight: 700; letter-spacing: .04em; }
.zulu-clock small { color: var(--muted); }
.kpi-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin: 18px 0 14px; }
.metric-card { position: relative; min-height: 152px; padding: 21px 22px; border-radius: 22px; overflow: hidden; }
.metric-card::after { content: ""; position: absolute; width: 110px; height: 110px; right: -42px; top: -50px; border-radius: 50%; background: rgba(24,200,255,.08); filter: blur(6px); }
.metric-card p, .live-strip span { margin-bottom: 24px; color: var(--muted); font-size: 11px; font-weight: 700; letter-spacing: .12em; text-transform: uppercase; }
.metric-card strong { display: block; font-size: clamp(40px, 5vw, 62px); line-height: .95; letter-spacing: -.06em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.metric-card small { position: absolute; left: 22px; bottom: 19px; color: var(--muted); font-size: 12px; white-space: nowrap; }
.accent-card { border-color: var(--border-strong); }
.warning-card strong { color: #ffd092; }
.live-strip { display: grid; grid-template-columns: repeat(5, 1fr); border-radius: 22px; padding: 17px 0; margin-bottom: 14px; }
.live-strip > div { padding: 5px 22px; border-right: 1px solid var(--border); min-width: 0; }
.live-strip > div:last-child { border-right: 0; }
.live-strip span { display: block; margin: 0 0 10px; }
.live-strip strong { display: block; font-size: 24px; letter-spacing: -.04em; white-space: nowrap; font-variant-numeric: tabular-nums; }
.live-strip small { display: block; margin-top: 4px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.resource-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 30px; }
.resource-card { min-height: 198px; border-radius: 22px; padding: 18px; display: grid; place-items: center; align-content: center; }
.resource-card p { margin: 13px 0 0; color: var(--muted); font-size: 12px; text-align: center; white-space: nowrap; }
.gauge { width: 126px; height: 126px; padding: 9px; border-radius: 50%; background: conic-gradient(var(--cyan) var(--gauge), rgba(255,255,255,.07) 0); box-shadow: 0 0 30px rgba(24,200,255,.08); }
.gauge > div { width: 100%; height: 100%; border-radius: 50%; display: grid; place-content: center; text-align: center; background: #09111a; box-shadow: inset 0 0 22px rgba(0,0,0,.5); }
.gauge strong { font-size: 24px; font-variant-numeric: tabular-nums; }
.gauge span { margin-top: 2px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .13em; text-transform: uppercase; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 20px; margin: 0 2px 14px; }
.range-control { display: flex; padding: 4px; border-radius: 13px; border: 1px solid var(--border); background: rgba(255,255,255,.025); }
.range-control button { border: 0; border-radius: 9px; padding: 8px 11px; background: transparent; color: var(--muted); font: inherit; font-size: 11px; font-weight: 700; cursor: pointer; }
.range-control button:hover, .range-control button:focus-visible { color: var(--text); }
.range-control button.active { color: var(--text); background: rgba(24,200,255,.14); box-shadow: inset 0 0 0 1px rgba(24,200,255,.2); }
.chart-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
.chart-panel { position: relative; border-radius: 22px; padding: 21px 22px 15px; min-width: 0; }
.chart-panel.wide { grid-column: 1 / -1; }
.panel-title { display: flex; justify-content: space-between; align-items: flex-start; gap: 18px; }
.panel-title p { margin: 0; color: var(--muted); font-size: 12px; }
.panel-title > small { color: var(--muted); white-space: nowrap; }
.legend { display: flex; gap: 14px; color: var(--muted); font-size: 11px; white-space: nowrap; }
.legend span::before { content: ""; display: inline-block; width: 7px; height: 7px; margin-right: 6px; border-radius: 50%; background: currentColor; box-shadow: 0 0 10px currentColor; }
.cyan { color: var(--cyan); } .violet { color: var(--violet); } .amber { color: var(--amber); }
.chart { display: block; width: 100%; height: 258px; margin-top: 11px; overflow: visible; }
.chart .grid-line { stroke: rgba(255,255,255,.075); stroke-width: 1; }
.chart .axis-label { fill: var(--muted); font-size: 11px; }
.chart .series-line { fill: none; stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.chart .series-area { opacity: .09; }
.chart .empty-label { fill: var(--muted); font-size: 14px; text-anchor: middle; }
.chart .hover-guide { stroke: rgba(245,249,255,.44); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart .hover-dot { stroke: var(--surface-strong); stroke-width: 2.5; vector-effect: non-scaling-stroke; }
.chart .hover-layer { opacity: 0; pointer-events: none; }
.chart .hover-layer.visible { opacity: 1; }
.chart .hit-area { fill: transparent; cursor: crosshair; pointer-events: all; }
.chart-tooltip { position: absolute; z-index: 4; width: max-content; min-width: 172px; max-width: min(260px, calc(100% - 20px)); padding: 10px 12px; border: 1px solid rgba(167,212,255,.2); border-radius: 11px; color: var(--text); background: rgba(5,10,17,.94); box-shadow: 0 13px 36px rgba(0,0,0,.42); pointer-events: none; font-variant-numeric: tabular-nums; }
.chart-tooltip time { display: block; margin-bottom: 7px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .04em; }
.tooltip-series { display: grid; grid-template-columns: 8px minmax(68px, 1fr) auto; align-items: center; gap: 7px; margin-top: 5px; font-size: 11px; }
.tooltip-series i { width: 7px; height: 7px; border-radius: 50%; background: var(--series-color); box-shadow: 0 0 8px var(--series-color); }
.tooltip-series span { color: #b9c8da; }
.tooltip-series strong { font-size: 11px; text-align: right; }
.health-panel { margin-top: 14px; border-radius: 22px; padding: 21px 22px; }
.health-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 9px; margin-top: 17px; }
.health-item { min-height: 68px; padding: 13px; border-radius: 15px; background: rgba(255,255,255,.03); border: 1px solid rgba(255,255,255,.055); }
.health-item span { display: flex; align-items: center; gap: 7px; color: var(--muted); font-size: 10px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; }
.health-item span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--green); box-shadow: 0 0 11px var(--green); }
.health-item.bad span::before { background: var(--red); box-shadow: 0 0 11px var(--red); }
.health-item strong { display: block; margin-top: 9px; font-size: 14px; }
.lower-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 14px; margin-top: 14px; }
.table-panel, .events-panel { min-width: 0; border-radius: 22px; padding: 21px 22px; }
.count-chip, .event-counts span { color: var(--muted); font-size: 11px; white-space: nowrap; }
.table-wrap { overflow-x: auto; margin-top: 16px; }
table { width: 100%; border-collapse: collapse; font-size: 12px; }
th { padding: 11px 10px; color: var(--muted); font-size: 10px; letter-spacing: .09em; text-align: left; text-transform: uppercase; border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 12px 10px; border-bottom: 1px solid rgba(255,255,255,.05); white-space: nowrap; font-variant-numeric: tabular-nums; }
.feeder-ids { color: #b9c8da; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 11px; }
.warning-badge { width: 20px; height: 20px; margin-left: 8px; padding: 0; border: 1px solid rgba(255,179,71,.5); border-radius: 50%; color: #171006; background: var(--amber); box-shadow: 0 0 14px rgba(255,179,71,.24); cursor: pointer; font: 900 12px/18px Inter, sans-serif; vertical-align: middle; }
.warning-badge.error { border-color: rgba(255,95,120,.65); color: #19050a; background: var(--red); box-shadow: 0 0 14px rgba(255,95,120,.28); }
.warning-badge:hover, .warning-badge:focus-visible { transform: scale(1.08); outline: 2px solid rgba(255,255,255,.72); outline-offset: 2px; }
tbody tr.has-alert td:first-child { color: var(--amber); font-weight: 800; }
tbody tr.feeder-highlight { outline: none; }
tbody tr.feeder-highlight td { animation: feeder-highlight 1.1s ease-in-out 3; background: rgba(255,179,71,.13); }
tbody tr.feeder-highlight td:first-child { box-shadow: inset 3px 0 0 var(--amber); }
tbody tr:last-child td { border-bottom: 0; }
.transport { display: inline-flex; padding: 4px 8px; border-radius: 999px; background: rgba(24,200,255,.1); color: var(--cyan); font-size: 10px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.transport.v2 { color: #beaaff; background: rgba(157,123,255,.11); }
.transport.both { color: var(--green); background: rgba(52,232,158,.1); }
.empty { color: var(--muted); text-align: center; padding: 27px; }
.event-counts { display: flex; gap: 11px; }
.event-list { list-style: none; margin: 17px 0 0; padding: 0; max-height: 380px; overflow: auto; }
.event-list li { padding: 11px 0 11px 17px; border-bottom: 1px solid rgba(255,255,255,.05); position: relative; }
.event-list li::before { content: ""; position: absolute; left: 0; top: 17px; width: 7px; height: 7px; border-radius: 50%; background: var(--amber); }
.event-list li.error::before { background: var(--red); }
.event-list li.resolved { opacity: .67; }
.event-list li.resolved::before { background: var(--green); box-shadow: 0 0 9px rgba(52,232,158,.32); }
.event-list time { display: block; margin-bottom: 3px; color: var(--muted); font-size: 10px; font-variant-numeric: tabular-nums; }
.event-list strong { margin-right: 6px; font-size: 11px; text-transform: uppercase; }
.event-list p { display: inline; color: #c6d0dc; font-size: 11px; overflow-wrap: anywhere; }
.incident-status { display: inline-flex; margin-right: 6px; padding: 2px 6px; border-radius: 999px; color: var(--amber); background: rgba(255,179,71,.1); font-size: 9px; font-weight: 800; letter-spacing: .07em; text-transform: uppercase; }
.incident-status.resolved { color: var(--green); background: rgba(52,232,158,.1); }
.incident-occurrences { display: inline-flex; margin-right: 7px; color: var(--muted); font-size: 10px; font-weight: 800; }
.event-list li.linked-feeder { cursor: pointer; border-radius: 8px; transition: background .18s ease; }
.event-list li.linked-feeder:hover, .event-list li.linked-feeder:focus-visible { background: rgba(255,179,71,.075); outline: 1px solid rgba(255,179,71,.28); outline-offset: -1px; }
.event-target { display: inline-flex; margin: 6px 0 0 3px; color: var(--amber); font-size: 10px; font-weight: 800; letter-spacing: .04em; text-transform: uppercase; white-space: nowrap; }

@keyframes feeder-highlight {
    0%, 100% { background: rgba(255,179,71,.08); }
    50% { background: rgba(255,179,71,.25); }
}

@media (max-width: 1040px) {
    .kpi-grid, .resource-grid { grid-template-columns: repeat(2, 1fr); }
    .live-strip { grid-template-columns: repeat(3, 1fr); }
    .live-strip > div:nth-child(3) { border-right: 0; }
    .live-strip > div:nth-child(n+4) { margin-top: 13px; padding-top: 16px; border-top: 1px solid var(--border); }
    .health-grid { grid-template-columns: repeat(4, 1fr); }
    .lower-grid { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
    .shell { width: min(100% - 20px, 1560px); padding-top: 10px; }
    .topbar, .section-heading { align-items: flex-start; flex-direction: column; }
    .topbar { border-radius: 20px; }
    .brand-lockup { width: 100%; }
    .adsb-logo { width: 56px; height: 56px; }
    .vrsx-logo { width: 90px; }
    .brand-divider { margin: 0 12px; }
    .title-block { margin-left: 12px; padding-left: 12px; }
    .header-status { width: 100%; justify-content: space-between; }
    .metric-card { min-height: 142px; }
    .live-strip { grid-template-columns: 1fr 1fr; }
    .live-strip > div { border-top: 1px solid var(--border); border-right: 0; }
    .live-strip > div:first-child, .live-strip > div:nth-child(2) { border-top: 0; }
    .chart-grid { grid-template-columns: 1fr; }
    .chart-panel.wide { grid-column: auto; }
    .panel-title { flex-direction: column; }
    .health-grid { grid-template-columns: repeat(2, 1fr); }
    .range-control { width: 100%; overflow-x: auto; }
}
@media (max-width: 460px) {
    .kpi-grid, .resource-grid, .live-strip { grid-template-columns: 1fr; }
    .live-strip > div { border-top: 1px solid var(--border) !important; }
    .live-strip > div:first-child { border-top: 0 !important; }
    .vrsx-logo, .brand-divider { display: none; }
    .title-block { margin-left: 8px; }
}
