:root {
  --ink: #071827;
  --muted: #5b6b80;
  --line: #d8e1ec;
  --panel: #ffffff;
  --page: #f5f7fb;
  --nav: #051827;
  --blue: #0878b9;
  --teal: #0f766e;
  --green: #15803d;
  --red: #b91c1c;
  --amber: #b45309;
  --yellow: #ca8a04;
  --soft-blue: #e8f3fb;
  --soft-green: #e7f7ed;
  --soft-red: #fee2e2;
  --soft-amber: #fef3c7;
  font-family: "Segoe UI", Inter, Arial, sans-serif;
}

* { box-sizing: border-box; }

html { scroll-behavior: smooth; }

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: var(--page);
}

body[data-page="situation"] {
  background: #020a15;
}

body[data-page="situation"] .workspace {
  background: #020a15;
}

.shell {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 268px minmax(0, 1fr);
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  min-height: 0;
  padding: 22px 20px 18px;
  background: var(--nav);
  color: #e0f2fe;
  display: flex;
  flex-direction: column;
  gap: 16px;
  overflow: hidden;
}

.mark {
  width: 70px;
  height: 70px;
}

.brand-copy {
  display: grid;
  gap: 5px;
}

.brand-copy strong {
  font-size: 22px;
  letter-spacing: 0.12em;
}

.brand-copy span {
  color: #9dc7ea;
  font-size: 12px;
  line-height: 1.45;
}

nav {
  display: grid;
  gap: 5px;
  align-content: start;
  flex: 1 1 auto;
  min-height: 0;
  margin-top: 12px;
  overflow-y: auto;
  padding-right: 2px;
  scrollbar-color: rgba(125, 211, 252, 0.42) transparent;
  scrollbar-width: thin;
}

nav a {
  position: relative;
  overflow: hidden;
  color: #c8def3;
  text-decoration: none;
  padding: 5px 12px;
  border: 1px solid rgba(125, 211, 252, 0.08);
  border-radius: 8px;
  background: rgba(2, 10, 21, 0.08);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.1;
  transition: background 160ms ease, border-color 160ms ease, color 160ms ease, transform 160ms ease;
}

nav a::before {
  content: "";
  position: absolute;
  top: 7px;
  bottom: 7px;
  left: 0;
  width: 3px;
  border-radius: 0 999px 999px 0;
  background: transparent;
}

nav a.active,
nav a:hover {
  transform: translateX(2px);
  color: #fff;
  border-color: rgba(56, 189, 248, 0.34);
  background: linear-gradient(90deg, rgba(8, 120, 185, 0.38), rgba(13, 148, 136, 0.12));
}

nav a.active::before,
nav a:hover::before {
  background: #38bdf8;
}

.workspace {
  min-width: 0;
  padding: 20px;
  display: grid;
  gap: 18px;
  align-content: start;
}

.app-page {
  display: none;
}

.app-page.active {
  display: grid;
  gap: 18px;
  align-content: start;
}

.situation-page.active {
  display: block;
}

.workspace > *,
.overview-grid,
.dash-grid,
.two-column,
.stats-grid,
.topbar,
.panel,
.posture-panel,
.stat-card {
  min-width: 0;
  max-width: 100%;
}

.topbar,
.panel {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel);
  box-shadow: 0 10px 28px rgba(15, 23, 42, 0.05);
}

.topbar {
  min-height: 78px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 8px 16px;
  border-color: rgba(56, 189, 248, 0.2);
  background: #020a15;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.28), inset 0 0 70px rgba(14, 165, 233, 0.03);
}

.topbar-brand {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 16px;
}

.topbar-mark {
  width: 86px;
  height: 86px;
  flex: 0 0 86px;
  display: block;
}

.topbar-wordmark {
  min-width: 0;
  display: grid;
  gap: 6px;
}

.topbar-wordmark strong {
  color: #f8fafc;
  font-size: 42px;
  font-weight: 950;
  line-height: 0.95;
  letter-spacing: 0;
}

.topbar-wordmark span {
  width: fit-content;
  max-width: 100%;
  padding-top: 7px;
  border-top: 2px solid #38bdf8;
  color: #e2e8f0;
  font-size: 13px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.topbar-status {
  display: grid;
  grid-template-columns: auto auto;
  align-items: center;
  justify-content: end;
  gap: 4px 8px;
  text-align: right;
}

.status-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: var(--green);
}

.topbar-status small,
.topbar-status strong {
  display: block;
}

.topbar-status small {
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.topbar-status strong {
  grid-column: 1 / -1;
  color: #cbd5e1;
  font-size: 12px;
}

.overview-grid,
.dash-grid,
.two-column {
  display: grid;
  gap: 16px;
}

.globe-stage {
  position: relative;
  min-height: clamp(620px, calc(100vh - 152px), 820px);
  overflow: hidden;
  border: 1px solid rgba(56, 189, 248, 0.2);
  border-radius: 8px;
  background: #020a15;
  color: #e0f2fe;
  box-shadow: 0 24px 80px rgba(0, 0, 0, 0.38), inset 0 0 70px rgba(14, 165, 233, 0.03);
}

.globe-stage canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  transition: opacity 320ms ease, filter 320ms ease;
}

.globe-stage::before {
  content: "";
  position: absolute;
  inset: 68px 0 0;
  z-index: 6;
  pointer-events: none;
  opacity: 0;
  background:
    radial-gradient(circle at 48% 50%, rgba(2, 8, 23, 0.62), rgba(2, 8, 23, 0.88) 58%, rgba(2, 8, 23, 0.96)),
    linear-gradient(90deg, rgba(2, 8, 23, 0.82), rgba(2, 8, 23, 0.54) 45%, rgba(2, 8, 23, 0.9));
  transition: opacity 320ms ease;
}

.globe-stage::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(3, 21, 37, 0.46), rgba(3, 21, 37, 0.04) 38%, rgba(3, 21, 37, 0.74) 76%, rgba(3, 21, 37, 0.9)),
    linear-gradient(0deg, rgba(3, 21, 37, 0.42), transparent 42%, rgba(3, 21, 37, 0.16));
  pointer-events: none;
}

.globe-stage.is-admin-launch canvas {
  opacity: 0.34;
  filter: brightness(0.45) saturate(0.68) blur(0.4px);
}

.globe-stage.is-admin-launch::before {
  opacity: 1;
  pointer-events: auto;
  cursor: default;
}

.globe-stage.is-admin-launch .globe-hud,
.globe-stage.is-admin-launch .globe-node-panel,
.globe-stage.is-admin-launch .globe-legend {
  pointer-events: none;
  user-select: none;
}

.globe-command-bar,
.globe-hud,
.globe-node-panel,
.globe-legend,
.admin-region-overlay {
  position: relative;
  z-index: 2;
}

.globe-command-bar {
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  min-height: 68px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  padding: 14px 18px;
  border-bottom: 1px solid rgba(125, 211, 252, 0.18);
  background: rgba(3, 21, 37, 0.74);
  backdrop-filter: blur(4px);
  z-index: 8;
}

.globe-command-title {
  display: flex;
  align-items: center;
  gap: 10px;
  min-width: 0;
}

.globe-command-title strong,
.globe-command-title small {
  display: block;
}

.globe-command-title strong {
  color: #e0f2fe;
  font-size: 14px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.globe-command-title small {
  margin-top: 3px;
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
}

.globe-command-actions {
  display: flex;
  align-items: center;
  gap: 10px;
}

.shield-pill,
#globeFullscreen,
#globeRegionTiles {
  min-height: 34px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid rgba(45, 212, 191, 0.42);
  border-radius: 999px;
  padding: 8px 12px;
  background: rgba(13, 148, 136, 0.22);
  color: #99f6e4;
  font-size: 11px;
  font-weight: 900;
  white-space: nowrap;
}

#globeFullscreen,
#globeRegionTiles {
  order: -1;
  border-color: rgba(125, 211, 252, 0.28);
  background: #075985;
  color: #f8fafc;
  box-shadow: 0 0 0 1px rgba(125, 211, 252, 0.12), 0 10px 26px rgba(2, 8, 23, 0.24);
}

#globeRegionTiles {
  border-color: rgba(45, 212, 191, 0.34);
  background: #0f766e;
}

#globeRegionTiles[hidden] {
  display: none;
}

.globe-hud {
  margin-top: 68px;
  width: min(420px, calc(100% - 32px));
  padding: 24px;
}

.globe-hud h2 {
  max-width: 360px;
  color: #fff;
  font-size: 30px;
  line-height: 1.1;
}

.globe-hud p:not(.eyebrow) {
  max-width: 390px;
  margin-top: 10px;
  color: #b9d7ee;
  line-height: 1.5;
}

.admin-region-overlay {
  position: absolute;
  top: 162px;
  left: 32px;
  right: 410px;
  bottom: 56px;
  z-index: 9;
  opacity: 0;
  transform: scale(0.98) translateY(8px);
  filter: blur(3px);
  pointer-events: none;
  transition: opacity 260ms ease, transform 260ms ease, filter 260ms ease;
}

.globe-stage.is-admin-launch .admin-region-overlay {
  opacity: 1;
  transform: none;
  filter: none;
  pointer-events: auto;
}

.admin-region-grid {
  height: 100%;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  align-content: center;
  max-width: 760px;
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-color: rgba(125, 211, 252, 0.55) transparent;
  scrollbar-width: thin;
}

.admin-region-card {
  min-width: 0;
  min-height: 82px;
  display: grid;
  align-content: center;
  border: 1px solid rgba(125, 211, 252, 0.26);
  border-left: 4px solid var(--accent, #22d3ee);
  border-radius: 8px;
  padding: 8px 9px;
  background:
    linear-gradient(180deg, rgba(5, 30, 48, 0.98), rgba(2, 10, 21, 0.94)),
    rgba(2, 8, 23, 0.92);
  color: #eef9ff;
  text-align: left;
  box-shadow: 0 22px 58px rgba(0, 0, 0, 0.48), 0 0 24px rgba(14, 165, 233, 0.08), inset 0 1px 0 rgba(255, 255, 255, 0.08);
  cursor: pointer;
  backdrop-filter: blur(4px);
  transition: transform 150ms ease, border-color 150ms ease, background 150ms ease, box-shadow 150ms ease;
}

.admin-region-card:hover,
.admin-region-card:focus-visible {
  transform: translateY(-3px);
  border-color: rgba(125, 211, 252, 0.58);
  outline: none;
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.42), 0 0 34px rgba(14, 165, 233, 0.16);
}

.admin-region-card small,
.admin-region-card span {
  display: block;
}

.admin-region-card small {
  color: #7dd3fc;
  font-size: 9px;
  font-weight: 950;
  letter-spacing: 0.16em;
  text-transform: uppercase;
}

.admin-region-card strong {
  display: block;
  margin-top: 5px;
  overflow: hidden;
  color: #fff;
  font-size: 13px;
  line-height: 1.08;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.admin-region-card span {
  margin-top: 6px;
  color: #d9edf9;
  font-size: 10px;
  font-weight: 800;
}

.admin-region-card em {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-top: 6px;
  color: var(--accent, #22d3ee);
  font-size: 10px;
  font-style: normal;
  font-weight: 950;
}

.globe-legend {
  position: absolute;
  left: 24px;
  bottom: 24px;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  max-width: min(520px, calc(100% - 460px));
  padding: 9px 12px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 999px;
  background: rgba(2, 8, 23, 0.68);
  color: #cbd5e1;
  font-size: 10px;
  font-weight: 800;
}

.globe-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.globe-legend i {
  flex: 0 0 auto;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  box-shadow: 0 0 8px currentColor;
}

.globe-legend i.dot {
  background: currentColor;
}

.globe-legend i.ring {
  width: 11px;
  height: 11px;
  border: 2px solid currentColor;
  background: radial-gradient(circle, #93c5fd 0 1.5px, transparent 2px);
}

.globe-legend i.allowed,
.globe-legend i.asset-up {
  color: #34d399;
}

.globe-legend i.blocked,
.globe-legend i.asset-down {
  color: #fb7185;
}

.globe-legend i.asset-risk {
  color: #fbbf24;
}

.globe-legend i.asset-planned {
  color: #7dd3fc;
}

.globe-controls {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.globe-controls label {
  color: #bfdbfe;
  font-size: 11px;
  gap: 4px;
}

.globe-controls label:nth-child(3),
.globe-controls button {
  grid-column: 1 / -1;
}

.globe-controls select {
  min-height: 34px;
  border-color: rgba(125, 211, 252, 0.35);
  padding: 6px 8px;
  background: rgba(8, 27, 43, 0.86);
  color: #e0f2fe;
  font-size: 12px;
}

.globe-controls button {
  min-height: 34px;
  padding: 6px 10px;
  background: #0f766e;
}

.globe-node-panel {
  position: absolute;
  top: 92px;
  right: 24px;
  bottom: 24px;
  width: min(380px, calc(100% - 48px));
  display: block;
  gap: 10px;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  padding-right: 6px;
  pointer-events: auto;
  scrollbar-color: rgba(125, 211, 252, 0.55) transparent;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
}

body.stage-fullscreen-active {
  overflow: hidden;
}

.globe-stage:fullscreen,
.globe-stage.is-stage-fullscreen {
  width: 100vw;
  height: 100vh;
  min-height: 100vh;
  border-radius: 0;
}

.globe-stage.is-stage-fullscreen {
  position: fixed;
  inset: 0;
  z-index: 1000;
}

.globe-stage:fullscreen .globe-command-bar,
.globe-stage.is-stage-fullscreen .globe-command-bar {
  min-height: 70px;
}

.globe-stage:fullscreen::before,
.globe-stage.is-stage-fullscreen::before {
  inset: 70px 0 0;
}

.globe-stage:fullscreen .globe-hud,
.globe-stage.is-stage-fullscreen .globe-hud {
  margin-top: 70px;
}

.globe-stage:fullscreen .globe-node-panel,
.globe-stage.is-stage-fullscreen .globe-node-panel {
  top: 94px;
  right: 18px;
  bottom: 18px;
}

.globe-stage:fullscreen .globe-legend,
.globe-stage.is-stage-fullscreen .globe-legend {
  bottom: 18px;
}

.globe-stage:fullscreen .admin-region-overlay,
.globe-stage.is-stage-fullscreen .admin-region-overlay {
  top: 178px;
  left: 32px;
  right: 420px;
  bottom: 58px;
}

.rail-panel {
  overflow: visible;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-radius: 8px;
  padding: 12px;
  background: rgba(3, 21, 37, 0.78);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.18);
}

.rail-panel + .rail-panel {
  margin-top: 10px;
}

.rail-fill {
  display: block;
}

.rail-heading h2 {
  margin: 2px 0 0;
  color: #fff;
  font-size: 17px;
}

.rail-panel details + details {
  margin-top: 8px;
}

.rail-panel summary {
  cursor: pointer;
  color: #e0f2fe;
  font-weight: 900;
}

.rail-panel summary strong,
.rail-panel summary .summary-kicker {
  display: block;
}

.rail-panel summary .summary-kicker {
  margin-bottom: 4px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

.globe-breadcrumb {
  min-height: 34px;
  display: block;
  border: 1px solid rgba(125, 211, 252, 0.3);
  border-radius: 8px;
  padding: 7px 10px;
  background: rgba(3, 21, 37, 0.75);
  color: #e0f2fe;
  font-size: 12px;
  font-weight: 900;
  line-height: 18px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  text-transform: uppercase;
}

.globe-node-list {
  display: grid;
  align-content: start;
  gap: 8px;
  margin-top: 10px;
  overflow: visible;
}

.globe-node {
  display: grid;
  gap: 3px;
  min-height: 54px;
  border: 1px solid rgba(125, 211, 252, 0.24);
  border-left: 4px solid #38bdf8;
  border-radius: 8px;
  padding: 8px 10px;
  background: rgba(5, 24, 38, 0.78);
  color: #e0f2fe;
  text-align: left;
}

.globe-node.good { border-left-color: var(--green); }
.globe-node.warn { border-left-color: var(--amber); }
.globe-node.bad { border-left-color: var(--red); }

.globe-node span,
.globe-node strong,
.globe-node small {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.globe-node span {
  font-size: 12px;
  font-weight: 900;
}

.globe-node strong {
  color: #b9d7ee;
  font-size: 12px;
}

.globe-node small {
  color: #86b7d8;
  font-size: 11px;
}

.overview-grid {
  grid-template-columns: minmax(320px, 0.62fr) minmax(620px, 1.38fr);
}

.dash-grid {
  grid-template-columns: minmax(280px, 1fr) minmax(280px, 1fr) minmax(280px, 1fr);
}

.two-column {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.panel {
  padding: 16px;
}

.posture-panel {
  min-height: 178px;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 11px;
  align-content: center;
  align-items: stretch;
  border-top: 4px solid var(--green);
}

.eyebrow {
  margin: 0 0 8px;
  color: var(--blue);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.14em;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
  letter-spacing: 0;
}

h1 {
  font-size: 34px;
  line-height: 1.08;
}

h2 {
  font-size: 21px;
}

h3 {
  font-size: 13px;
}

.lede {
  margin-top: 9px;
  color: #46586d;
  font-size: 14px;
  line-height: 1.45;
}

.score-pair {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
}

.score-pair div,
.stat-card {
  min-height: 78px;
  padding: 10px 11px;
  border: 1px solid #cfe1ef;
  border-radius: 8px;
  background: #fff;
}

.score-pair div {
  min-height: 68px;
}

.stat-card {
  appearance: none;
  display: grid;
  align-content: center;
  width: 100%;
  color: inherit;
  font: inherit;
  text-align: left;
  cursor: pointer;
}

.stat-card:focus-visible {
  outline: 3px solid rgba(14, 165, 233, 0.34);
  outline-offset: 3px;
}

.score-pair span,
.stat-card small,
.stat-card span,
.report-list small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.15;
  text-transform: uppercase;
}

.score-pair strong,
.stat-card strong {
  display: block;
  margin-top: 6px;
  color: var(--ink);
  font-size: 28px;
  line-height: 1;
}

.stat-card em {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin-top: 10px;
  color: #0878b9;
  font-size: 10px;
  font-style: normal;
  font-weight: 900;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  opacity: 0.78;
}

.stat-card em::after {
  content: "";
  width: 18px;
  height: 2px;
  background: currentColor;
  transform-origin: left center;
  transition: transform 160ms ease;
}

.stat-card:hover em::after,
.stat-card:focus-visible em::after {
  transform: scaleX(1.55);
}

.stat-card.is-loading em {
  color: #b45309;
}

.stat-card.is-loading em::after {
  animation: insightPulse 700ms ease-in-out infinite alternate;
}

.stats-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(92px, 1fr));
  grid-auto-rows: minmax(82px, auto);
  align-content: start;
  align-items: stretch;
  align-self: start;
  gap: 8px;
}

.overview-telemetry {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 16px;
}

.telemetry-panel {
  position: relative;
  min-height: 210px;
  overflow: hidden;
  padding: 12px;
  border: 1px solid rgba(8, 120, 185, 0.2);
  border-radius: 8px;
  background:
    radial-gradient(circle at 18% 12%, rgba(56, 189, 248, 0.18), transparent 34%),
    linear-gradient(135deg, rgba(255, 255, 255, 0.84), rgba(226, 239, 247, 0.68) 52%, rgba(208, 250, 244, 0.52));
  box-shadow:
    0 18px 42px rgba(8, 47, 73, 0.12),
    inset 0 1px 0 rgba(255, 255, 255, 0.82),
    inset 0 0 0 1px rgba(255, 255, 255, 0.34);
  isolation: isolate;
  backdrop-filter: blur(14px) saturate(1.45);
}

.telemetry-panel::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background:
    linear-gradient(90deg, rgba(8, 120, 185, 0.07) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15, 118, 110, 0.05) 1px, transparent 1px);
  background-size: 24px 24px;
  mask-image: linear-gradient(180deg, rgba(0, 0, 0, 0.78), transparent 94%);
}

.telemetry-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(180deg, transparent, rgba(56, 189, 248, 0.12), transparent);
  opacity: 0.18;
  transform: translateY(-100%);
  animation: telemetrySweep 8s linear infinite;
}

.telemetry-head {
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 8px;
}

.telemetry-head span,
.telemetry-head strong {
  color: #24445f;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.18em;
  text-transform: uppercase;
}

.telemetry-head strong {
  padding: 4px 7px;
  border: 1px solid rgba(15, 118, 110, 0.24);
  border-radius: 999px;
  background: rgba(15, 118, 110, 0.1);
  color: #0f766e;
  opacity: 1;
}

.telemetry-screen {
  position: relative;
  z-index: 1;
  height: 154px;
  overflow: hidden;
  border: 1px solid rgba(8, 120, 185, 0.16);
  border-radius: 7px;
  background:
    radial-gradient(circle at 44% 42%, rgba(255, 255, 255, 0.66), transparent 56%),
    linear-gradient(180deg, rgba(248, 252, 255, 0.82), rgba(226, 239, 247, 0.62));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.86),
    inset 0 -22px 42px rgba(8, 47, 73, 0.08),
    0 12px 26px rgba(8, 47, 73, 0.08);
}

.signal-screen {
  height: 154px;
}

.assets-screen {
  height: 154px;
}

.telemetry-screen::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 2;
  pointer-events: none;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.38), transparent 32%),
    repeating-linear-gradient(0deg, transparent 0 5px, rgba(8, 120, 185, 0.035) 5px 6px);
  mix-blend-mode: soft-light;
}

.telemetry-screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: 3;
  pointer-events: none;
  background:
    radial-gradient(circle at 28% 12%, rgba(255, 255, 255, 0.62), transparent 18%),
    linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.22), transparent);
  opacity: 0.52;
}

.telemetry-canvas {
  width: 100%;
  height: 100%;
  display: block;
  opacity: 1;
  filter: saturate(1.08) contrast(1.12);
}

@keyframes insightPulse {
  from {
    opacity: 0.35;
    transform: scaleX(0.55);
  }

  to {
    opacity: 1;
    transform: scaleX(1.45);
  }
}

@keyframes telemetrySweep {
  to {
    transform: translateY(100%);
  }
}

@media (prefers-reduced-motion: reduce) {
  .telemetry-panel::after {
    animation: none;
  }
}

.insight-modal[hidden] {
  display: none;
}

.insight-modal {
  position: fixed;
  inset: 0;
  z-index: 80;
  display: grid;
  place-items: stretch end;
}

.insight-backdrop {
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(2, 6, 23, 0.08), rgba(2, 6, 23, 0.34)),
    rgba(8, 47, 73, 0.14);
  backdrop-filter: blur(4px);
}

.insight-sheet {
  position: relative;
  z-index: 1;
  width: min(620px, calc(100vw - 28px));
  height: calc(100vh - 28px);
  margin: 14px;
  overflow: auto;
  border: 1px solid rgba(8, 120, 185, 0.28);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(244, 251, 255, 0.95)),
    linear-gradient(135deg, rgba(8, 120, 185, 0.12), rgba(15, 118, 110, 0.1));
  box-shadow:
    0 28px 80px rgba(8, 47, 73, 0.28),
    inset 0 1px 0 rgba(255, 255, 255, 0.86);
}

.insight-head {
  position: sticky;
  top: 0;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
  padding: 18px;
  border-bottom: 1px solid rgba(8, 120, 185, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.94));
}

.insight-head h2 {
  margin: 3px 0 6px;
  color: var(--ink);
  font-size: 27px;
  line-height: 1.05;
}

.insight-head p:last-child {
  max-width: 48ch;
  margin: 0;
  color: #426179;
  line-height: 1.45;
}

.insight-head button,
.insight-sheet footer button {
  min-height: 38px;
  border: 1px solid rgba(8, 120, 185, 0.22);
  border-radius: 8px;
  background: #fff;
  color: #075985;
  font-weight: 900;
  cursor: pointer;
}

.insight-head button {
  padding: 0 12px;
}

.insight-metrics {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 14px 18px 0;
}

.insight-metrics article {
  min-width: 0;
  padding: 12px;
  border: 1px solid rgba(8, 120, 185, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, #ffffff, #f8fcff);
  box-shadow: inset 0 3px 0 rgba(8, 120, 185, 0.22);
}

.insight-metrics span,
.insight-metrics small,
.insight-list span {
  display: block;
  color: #526b80;
  font-size: 11px;
  font-weight: 800;
  line-height: 1.35;
  text-transform: uppercase;
}

.insight-metrics strong {
  display: block;
  margin: 7px 0 4px;
  color: var(--ink);
  font-size: 30px;
  line-height: 1;
}

.insight-body {
  padding: 16px 18px 6px;
}

.insight-body h3 {
  margin: 0 0 10px;
  color: var(--ink);
  font-size: 18px;
}

.insight-list {
  display: grid;
  gap: 9px;
}

.insight-list article {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: start;
  padding: 12px;
  border: 1px solid rgba(8, 120, 185, 0.14);
  border-left: 4px solid #0878b9;
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.96), rgba(248, 252, 255, 0.94));
}

.insight-list article.tone-good {
  border-left-color: #16a34a;
}

.insight-list article.tone-warn,
.insight-list article.tone-major,
.insight-list article.tone-risk,
.insight-list article.tone-degraded {
  border-left-color: #d97706;
}

.insight-list article.tone-bad,
.insight-list article.tone-critical,
.insight-list article.tone-offline {
  border-left-color: #dc2626;
}

.insight-list strong {
  display: block;
  color: var(--ink);
  line-height: 1.25;
}

.insight-list p {
  grid-column: 1 / -1;
  margin: 0;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
}

.insight-sheet footer {
  position: sticky;
  bottom: 0;
  padding: 14px 18px 18px;
  border-top: 1px solid rgba(8, 120, 185, 0.13);
  background:
    linear-gradient(180deg, rgba(248, 252, 255, 0.82), rgba(255, 255, 255, 0.98));
}

.insight-sheet footer button {
  width: 100%;
  background: linear-gradient(135deg, #0878b9, #0f766e);
  color: #fff;
}

.panel-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 14px;
}

.filters {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) 150px 150px;
  gap: 8px;
  min-width: min(560px, 100%);
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.wide {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 5px;
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

input,
select,
textarea {
  width: 100%;
  min-height: 38px;
  border: 1px solid #cbd5e1;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: var(--ink);
  font: inherit;
  font-size: 13px;
}

textarea {
  min-height: 76px;
  resize: vertical;
}

button,
.small-btn,
.button-link {
  min-height: 38px;
  border: 0;
  border-radius: 8px;
  padding: 8px 12px;
  background: #075985;
  color: white;
  font: inherit;
  font-size: 13px;
  font-weight: 800;
  text-decoration: none;
  cursor: pointer;
}

.small-btn {
  min-height: 30px;
  font-size: 12px;
  background: var(--teal);
}

.small-btn.ghost {
  background: #e2e8f0;
  color: #0f172a;
}

.table-wrap {
  width: 100%;
  overflow-x: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 11px 10px;
  border-bottom: 1px solid #e2e8f0;
  text-align: left;
  vertical-align: top;
  font-size: 13px;
}

th {
  color: #475569;
  font-size: 11px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

td strong,
td small {
  display: block;
}

td small {
  margin-top: 4px;
  color: var(--muted);
}

.detail-row td {
  padding-top: 0;
  background: #fbfdff;
}

.asset-detail {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #fff;
}

.asset-detail summary {
  cursor: pointer;
  font-weight: 800;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  margin-top: 10px;
}

.detail-grid div {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 10px;
  background: #f8fafc;
}

.detail-grid small {
  display: block;
  color: var(--muted);
  font-size: 11px;
  font-weight: 800;
  text-transform: uppercase;
}

.detail-grid strong {
  margin-top: 5px;
}

.split-detail {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 12px;
}

.split-detail ul,
.report-list ul {
  margin: 8px 0 0;
  padding-left: 18px;
}

.split-detail li + li,
.report-list li + li {
  margin-top: 8px;
}

.chip {
  display: inline-flex;
  align-items: center;
  min-height: 23px;
  border-radius: 999px;
  padding: 3px 8px;
  background: #e2e8f0;
  color: #334155;
  font-size: 11px;
  font-weight: 900;
  text-transform: uppercase;
}

.chip.good { background: var(--soft-green); color: var(--green); }
.chip.warn { background: var(--soft-amber); color: var(--amber); }
.chip.bad { background: var(--soft-red); color: var(--red); }

.scope-list,
.event-list,
.collector-list,
.incident-list,
.report-list,
.source-list,
.accordion {
  display: grid;
  gap: 10px;
}

.scope-item,
.accordion details,
.tree details {
  border: 1px solid #dbeafe;
  border-radius: 8px;
  background: #fff;
  padding: 9px 10px;
}

.scope-item summary,
.accordion summary,
.tree summary {
  cursor: pointer;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  font-weight: 800;
}

.scope-item summary span,
.tree summary span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.scope-context {
  display: grid;
  gap: 3px;
  border: 1px solid rgba(45, 212, 191, 0.28);
  border-radius: 8px;
  padding: 9px 10px;
  background: rgba(13, 148, 136, 0.16);
}

.scope-context strong {
  color: #e0f2fe;
  font-size: 12px;
}

.scope-context span {
  color: #9dc7ea;
  font-size: 11px;
  font-weight: 800;
}

.tree-globe-btn {
  min-height: 28px;
  flex: 0 0 auto;
  padding: 5px 8px;
  background: #e0f2fe;
  color: #075985;
  font-size: 11px;
}

.scope-bars {
  display: grid;
  gap: 6px;
  margin-top: 10px;
}

.scope-bars span {
  border: 1px solid #e2e8f0;
  border-radius: 8px;
  padding: 7px 9px;
  background: linear-gradient(90deg, #dcfce7 calc(var(--value) * 1%), #f8fafc 0);
  color: #334155;
  font-size: 12px;
  font-weight: 800;
}

.event,
.collector-list article,
.incident,
.report-block,
.source-list article {
  border: 1px solid #dbeafe;
  border-left: 4px solid var(--blue);
  border-radius: 8px;
  padding: 12px;
  background: #fff;
}

.event.good,
.incident.good { border-left-color: var(--green); }
.event.warn,
.incident.warn { border-left-color: var(--amber); }
.event.bad,
.incident.bad { border-left-color: var(--red); }

.event time,
.event span,
.collector-list small,
.incident span,
.report-block small,
.report-block li small,
.source-list p {
  display: block;
  color: var(--muted);
  font-size: 12px;
}

.event strong,
.collector-list strong,
.incident strong,
.source-list strong {
  display: block;
  margin-top: 4px;
}

.collector-list p,
.incident p,
.report-block p {
  margin-top: 8px;
  color: #334155;
  font-size: 13px;
  line-height: 1.5;
}

.globe-node-panel .scope-list,
.globe-node-panel .event-list,
.globe-node-panel .collector-list {
  margin-top: 10px;
}

.globe-node-panel .scope-item,
.globe-node-panel .event,
.globe-node-panel .collector-list article {
  border-color: rgba(125, 211, 252, 0.24);
  background: rgba(5, 24, 38, 0.78);
  color: #e0f2fe;
}

.globe-node-panel .scope-item summary span,
.globe-node-panel .event time,
.globe-node-panel .event span,
.globe-node-panel .collector-list small,
.globe-node-panel .collector-list p {
  color: #9dc7ea;
}

.globe-node-panel .scope-bars span {
  border-color: rgba(125, 211, 252, 0.18);
  background: linear-gradient(90deg, rgba(34, 197, 94, 0.24) calc(var(--value) * 1%), rgba(8, 27, 43, 0.86) 0);
  color: #dbeafe;
}

.api-strip {
  display: grid;
  gap: 4px;
  margin-top: 12px;
  padding: 10px;
  border: 1px dashed #b6c7d8;
  border-radius: 8px;
  background: #f8fafc;
}

.api-strip code {
  color: #075985;
  font-weight: 900;
}

.api-strip span {
  color: var(--muted);
  font-size: 12px;
}

.tree {
  display: grid;
  gap: 8px;
  max-height: 760px;
  overflow: auto;
}

.tree details details {
  margin-top: 8px;
  background: #f8fbff;
}

.tree ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: #334155;
}

.tree li + li {
  margin-top: 7px;
}

.report-block strong {
  display: block;
  margin-top: 5px;
  font-size: 24px;
}

.report-block li span,
.source-list a {
  display: block;
  margin-top: 4px;
  color: #334155;
  font-size: 13px;
  line-height: 1.45;
}

.source-list {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.source-list a {
  color: var(--blue);
  overflow-wrap: anywhere;
}

.empty {
  color: var(--muted);
  font-size: 13px;
}

.fatal {
  padding: 40px;
}

body:not([data-page="situation"]) {
  background:
    linear-gradient(90deg, rgba(8, 120, 185, 0.06) 1px, transparent 1px),
    linear-gradient(0deg, rgba(15, 118, 110, 0.045) 1px, transparent 1px),
    linear-gradient(135deg, #f7fbff 0%, #eef5fb 42%, #f8fafc 100%);
  background-size: 44px 44px, 44px 44px, auto;
}

body:not([data-page="situation"]) .workspace {
  gap: 20px;
  padding: 20px 22px 28px;
}

.sidebar {
  background:
    linear-gradient(180deg, rgba(8, 120, 185, 0.16), transparent 34%),
    linear-gradient(135deg, #061b2c 0%, #03111e 58%, #041827 100%);
  box-shadow: inset -1px 0 rgba(125, 211, 252, 0.16), 18px 0 44px rgba(3, 15, 28, 0.12);
}

.mark {
  padding: 6px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 8px;
  background:
    linear-gradient(180deg, rgba(125, 211, 252, 0.12), rgba(13, 148, 136, 0.06)),
    rgba(2, 10, 21, 0.28);
  box-shadow: 0 14px 34px rgba(2, 8, 23, 0.18);
}

.topbar {
  position: relative;
  overflow: hidden;
  border-color: rgba(8, 120, 185, 0.18);
  background:
    linear-gradient(90deg, #061827 0%, #09233a 54%, #07332e 100%);
  box-shadow: 0 18px 46px rgba(8, 47, 73, 0.22);
}

.topbar::after {
  content: "";
  position: absolute;
  left: 16px;
  right: 16px;
  bottom: 0;
  height: 3px;
  border-radius: 999px 999px 0 0;
  background: linear-gradient(90deg, #ce1126 0 33%, #fcd116 33% 66%, #006b3f 66% 100%);
  opacity: 0.9;
}

.topbar-status {
  padding: 9px 11px;
  border: 1px solid rgba(125, 211, 252, 0.16);
  border-radius: 8px;
  background: rgba(2, 10, 21, 0.28);
}

body:not([data-page="situation"]) .panel,
body:not([data-page="situation"]) .stat-card,
body:not([data-page="situation"]) .score-pair div {
  border-color: rgba(8, 120, 185, 0.16);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.96));
  box-shadow: 0 16px 40px rgba(15, 23, 42, 0.07);
}

body:not([data-page="situation"]) .panel {
  position: relative;
  padding: 18px;
}

body:not([data-page="situation"]) .panel::before {
  content: "";
  position: absolute;
  top: -1px;
  left: 14px;
  right: 14px;
  height: 3px;
  border-radius: 0 0 999px 999px;
  background: linear-gradient(90deg, #0878b9, #0f766e, #ca8a04);
  opacity: 0.82;
}

body:not([data-page="situation"]) .posture-panel {
  position: relative;
  overflow: hidden;
  border-top: 0;
  border-color: rgba(8, 120, 185, 0.22);
  background:
    linear-gradient(135deg, rgba(3, 21, 37, 0.96) 0%, rgba(7, 50, 77, 0.94) 58%, rgba(6, 77, 68, 0.9) 100%);
  color: #e0f2fe;
}

body:not([data-page="situation"]) .posture-panel::before {
  left: 18px;
  right: auto;
  top: 18px;
  width: 74px;
  height: 4px;
  border-radius: 999px;
  background: linear-gradient(90deg, #38bdf8, #2dd4bf, #facc15);
}

body:not([data-page="situation"]) .posture-panel::after {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(90deg, rgba(125, 211, 252, 0.08) 1px, transparent 1px),
    linear-gradient(0deg, rgba(125, 211, 252, 0.06) 1px, transparent 1px);
  background-size: 34px 34px;
  opacity: 0.42;
  pointer-events: none;
}

body:not([data-page="situation"]) .posture-panel > * {
  position: relative;
  z-index: 1;
}

body:not([data-page="situation"]) .posture-panel .eyebrow {
  margin-top: 8px;
  color: #7dd3fc;
}

body:not([data-page="situation"]) .posture-panel h1 {
  color: #ffffff;
  font-size: 31px;
  line-height: 1.02;
  text-shadow: 0 8px 28px rgba(2, 8, 23, 0.42);
}

body:not([data-page="situation"]) .posture-panel .lede {
  color: #b8d8ef;
  font-size: 13px;
  line-height: 1.35;
  margin-top: 8px;
}

body:not([data-page="situation"]) .score-pair strong {
  font-size: 25px;
}

body:not([data-page="situation"]) .score-pair div {
  border-color: rgba(125, 211, 252, 0.22);
  background: rgba(2, 10, 21, 0.34);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
}

body:not([data-page="situation"]) .score-pair span {
  color: #93c5fd;
}

body:not([data-page="situation"]) .score-pair strong {
  color: #ffffff;
}

body:not([data-page="situation"]) .stats-grid {
  gap: 8px;
}

body:not([data-page="situation"]) .stat-card {
  position: relative;
  overflow: hidden;
  min-height: 82px;
  transition: transform 160ms ease, box-shadow 160ms ease, border-color 160ms ease;
}

body:not([data-page="situation"]) .stat-card::before {
  content: "";
  position: absolute;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  background: var(--blue);
}

body:not([data-page="situation"]) .stat-card[data-summary-card="regions"]::before,
body:not([data-page="situation"]) .stat-card[data-summary-card="districts"]::before,
body:not([data-page="situation"]) .stat-card[data-summary-card="institutions"]::before,
body:not([data-page="situation"]) .stat-card[data-summary-card="controls"]::before {
  background: var(--teal);
}

body:not([data-page="situation"]) .stat-card[data-summary-card="critical"]::before,
body:not([data-page="situation"]) .stat-card[data-summary-card="incidents"]::before,
body:not([data-page="situation"]) .stat-card[data-summary-card="issues"]::before {
  height: 4px;
  background: linear-gradient(90deg, #7f1d1d, var(--red), #ef4444);
}

body:not([data-page="situation"]) .stat-card:hover {
  transform: translateY(-2px);
  border-color: rgba(8, 120, 185, 0.34);
  box-shadow: 0 18px 48px rgba(8, 47, 73, 0.12);
}

body:not([data-page="situation"]) .stat-card small,
body:not([data-page="situation"]) .score-pair span {
  letter-spacing: 0.06em;
}

body:not([data-page="situation"]) .stat-card span {
  margin-top: 6px;
  font-size: 10px;
}

body:not([data-page="situation"]) .panel-head {
  padding-bottom: 12px;
  border-bottom: 1px solid rgba(8, 120, 185, 0.12);
}

body:not([data-page="situation"]) .panel-head h2 {
  color: #0b2135;
  font-size: 23px;
}

body:not([data-page="situation"]) input,
body:not([data-page="situation"]) select,
body:not([data-page="situation"]) textarea {
  border-color: #c7d8e8;
  background:
    linear-gradient(180deg, #ffffff, #f8fbff);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.8);
  transition: border-color 140ms ease, box-shadow 140ms ease, background 140ms ease;
}

body:not([data-page="situation"]) input:focus,
body:not([data-page="situation"]) select:focus,
body:not([data-page="situation"]) textarea:focus {
  border-color: #0878b9;
  outline: 3px solid rgba(56, 189, 248, 0.18);
}

body:not([data-page="situation"]) button,
body:not([data-page="situation"]) .button-link {
  background: linear-gradient(135deg, #075985, #0f766e);
  box-shadow: 0 10px 22px rgba(7, 89, 133, 0.18);
  transition: transform 140ms ease, box-shadow 140ms ease, filter 140ms ease;
}

body:not([data-page="situation"]) button:hover,
body:not([data-page="situation"]) .button-link:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
  box-shadow: 0 14px 28px rgba(7, 89, 133, 0.22);
}

body:not([data-page="situation"]) .stat-card {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.98), rgba(248, 252, 255, 0.96));
  color: inherit;
}

body:not([data-page="situation"]) .stat-card[data-summary-card="critical"],
body:not([data-page="situation"]) .stat-card[data-summary-card="incidents"],
body:not([data-page="situation"]) .stat-card[data-summary-card="issues"] {
  border-color: rgba(185, 28, 28, 0.34);
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.99), rgba(254, 242, 242, 0.98));
  box-shadow: 0 16px 42px rgba(127, 29, 29, 0.11);
}

body:not([data-page="situation"]) .stat-card[data-summary-card="critical"] small,
body:not([data-page="situation"]) .stat-card[data-summary-card="incidents"] small,
body:not([data-page="situation"]) .stat-card[data-summary-card="issues"] small {
  color: #991b1b;
}

body:not([data-page="situation"]) .stat-card[data-summary-card="critical"] strong,
body:not([data-page="situation"]) .stat-card[data-summary-card="incidents"] strong,
body:not([data-page="situation"]) .stat-card[data-summary-card="issues"] strong {
  color: var(--red);
}

body:not([data-page="situation"]) .stat-card[data-summary-card="critical"] span,
body:not([data-page="situation"]) .stat-card[data-summary-card="incidents"] span,
body:not([data-page="situation"]) .stat-card[data-summary-card="issues"] span {
  color: #7f1d1d;
}

body:not([data-page="situation"]) .insight-head button {
  background: #fff;
  color: #075985;
  box-shadow: none;
}

body:not([data-page="situation"]) .insight-sheet footer button {
  background: linear-gradient(135deg, #0878b9, #0f766e);
  color: #fff;
}

body:not([data-page="situation"]) .small-btn.ghost {
  background: linear-gradient(180deg, #f8fafc, #e8f3fb);
  color: #075985;
  box-shadow: none;
}

body:not([data-page="situation"]) .table-wrap {
  border: 1px solid rgba(8, 120, 185, 0.14);
  border-radius: 8px;
  background: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.7);
}

body:not([data-page="situation"]) table {
  border-collapse: separate;
  border-spacing: 0;
}

body:not([data-page="situation"]) th {
  position: sticky;
  top: 0;
  z-index: 1;
  border-bottom-color: rgba(8, 120, 185, 0.18);
  background: #eef6fc;
  color: #24445f;
}

body:not([data-page="situation"]) td {
  border-bottom-color: #edf3f8;
}

body:not([data-page="situation"]) tbody tr:not(.detail-row):hover td {
  background: #f4fbff;
}

body:not([data-page="situation"]) .detail-row td {
  background: #f7fbff;
}

body:not([data-page="situation"]) .chip {
  border: 1px solid rgba(15, 23, 42, 0.06);
}

body:not([data-page="situation"]) .chip.good {
  background: #dcfce7;
}

body:not([data-page="situation"]) .chip.warn {
  background: #fef3c7;
}

body:not([data-page="situation"]) .chip.bad {
  background: #ffe4e6;
}

body:not([data-page="situation"]) .accordion details,
body:not([data-page="situation"]) .tree details,
body:not([data-page="situation"]) .event,
body:not([data-page="situation"]) .collector-list article,
body:not([data-page="situation"]) .incident,
body:not([data-page="situation"]) .report-block,
body:not([data-page="situation"]) .source-list article,
body:not([data-page="situation"]) .asset-detail {
  border-color: rgba(8, 120, 185, 0.15);
  background:
    linear-gradient(180deg, #ffffff, #fbfdff);
  box-shadow: 0 12px 26px rgba(15, 23, 42, 0.045);
}

body:not([data-page="situation"]) .accordion summary,
body:not([data-page="situation"]) .tree summary {
  min-height: 42px;
  margin: -9px -10px 0;
  padding: 10px;
  border-radius: 8px 8px 0 0;
  background: linear-gradient(90deg, #f1f8fd, #ffffff);
  color: #0b2135;
}

body:not([data-page="situation"]) .accordion details[open] summary,
body:not([data-page="situation"]) .tree details[open] summary {
  border-bottom: 1px solid rgba(8, 120, 185, 0.12);
}

body:not([data-page="situation"]) .accordion form {
  margin-top: 12px;
}

body:not([data-page="situation"]) .incident {
  border-left-width: 5px;
}

body:not([data-page="situation"]) .incident p,
body:not([data-page="situation"]) .collector-list p,
body:not([data-page="situation"]) .report-block p {
  color: #40566d;
}

body:not([data-page="situation"]) .report-block strong {
  color: #0b2135;
}

body:not([data-page="situation"]) .source-list article {
  position: relative;
}

body:not([data-page="situation"]) .source-list article::before,
body:not([data-page="situation"]) .report-block::before {
  content: "";
  display: block;
  width: 44px;
  height: 3px;
  margin-bottom: 10px;
  border-radius: 999px;
  background: linear-gradient(90deg, #0878b9, #0f766e);
}

body:not([data-page="situation"]) .tree {
  padding-right: 4px;
  scrollbar-color: rgba(8, 120, 185, 0.35) transparent;
  scrollbar-width: thin;
}

body:not([data-page="situation"]) .api-strip {
  border-color: rgba(8, 120, 185, 0.22);
  background:
    linear-gradient(90deg, rgba(8, 120, 185, 0.08), rgba(15, 118, 110, 0.06)),
    #ffffff;
}

@media (max-width: 1240px) {
  .overview-grid,
  .dash-grid,
  .two-column {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .globe-stage {
    min-height: 720px;
  }

  .globe-legend {
    bottom: 310px;
    max-width: calc(100% - 48px);
  }

  .admin-region-overlay {
    top: 150px;
    left: 24px;
    right: 24px;
    bottom: 320px;
  }

  .admin-region-grid {
    max-width: none;
    align-content: start;
  }

  .globe-node-panel {
    top: auto;
    left: 24px;
    right: 24px;
    bottom: 24px;
    width: auto;
    max-height: 270px;
    overflow-y: auto;
  }
}

@media (max-width: 880px) {
  .shell {
    grid-template-columns: 1fr;
  }

  .sidebar {
    position: relative;
    height: auto;
  }

  nav {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .workspace {
    padding: 14px;
  }

  .topbar,
  .posture-panel {
    align-items: flex-start;
    grid-template-columns: 1fr;
    flex-direction: column;
  }

  .topbar-status {
    justify-content: start;
    text-align: left;
  }

  .panel-head {
    align-items: stretch;
    flex-direction: column;
  }

  .topbar-brand {
    gap: 12px;
  }

  .topbar-mark {
    width: 72px;
    height: 72px;
    flex-basis: 72px;
  }

  .topbar-wordmark strong {
    font-size: 34px;
  }

  .topbar-wordmark span {
    font-size: 11px;
    white-space: normal;
  }

  .stats-grid,
  .overview-telemetry,
  .filters,
  .form-grid,
  .detail-grid,
  .split-detail,
  .source-list {
    grid-template-columns: 1fr;
  }

  .globe-stage {
    min-height: 860px;
  }

  .globe-command-bar {
    align-items: flex-start;
    flex-direction: column;
    min-height: 128px;
  }

  .globe-command-actions {
    width: 100%;
    justify-content: space-between;
  }

  .globe-hud {
    margin-top: 128px;
    width: 100%;
    padding: 18px;
  }

  .globe-hud h2 {
    font-size: 24px;
  }

  .globe-label {
    max-width: 100px;
  }

  .globe-node-panel {
    max-height: 480px;
  }

  .admin-region-overlay {
    top: 226px;
    left: 18px;
    right: 18px;
    bottom: 180px;
  }

  .admin-region-grid {
    grid-template-columns: 1fr;
    align-content: start;
  }

  .globe-legend {
    left: 18px;
    right: 18px;
    bottom: 520px;
    max-width: none;
    border-radius: 8px;
  }

  .tree summary {
    align-items: flex-start;
    flex-direction: column;
  }
}

@media (max-width: 560px) {
  nav {
    grid-template-columns: 1fr;
  }

  .insight-sheet {
    width: calc(100vw - 18px);
    height: calc(100vh - 18px);
    margin: 9px;
  }

  .insight-head {
    flex-direction: column;
  }

  .insight-metrics,
  .insight-list article {
    grid-template-columns: 1fr;
  }

  h1 {
    font-size: 28px;
  }
}

#appNotice {
  position: fixed;
  left: 50%;
  bottom: 28px;
  z-index: 40;
  transform: translate(-50%, 16px);
  max-width: min(520px, calc(100vw - 32px));
  padding: 11px 18px;
  border: 1px solid rgba(251, 113, 133, 0.5);
  border-radius: 10px;
  background: rgba(30, 8, 16, 0.94);
  color: #fecdd3;
  font-size: 13px;
  font-weight: 600;
  opacity: 0;
  pointer-events: none;
  transition: opacity 160ms linear, transform 160ms ease-out;
}

#appNotice.visible {
  opacity: 1;
  transform: translate(-50%, 0);
}

#appNotice.good {
  border-color: rgba(52, 211, 153, 0.5);
  background: rgba(4, 26, 18, 0.94);
  color: #a7f3d0;
}

body.auth-pending .shell,
body.auth-anon .shell {
  display: none;
}

.login-screen {
  display: none;
}

body.auth-anon .login-screen {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 24px;
  background:
    radial-gradient(circle at 50% 38%, rgba(8, 47, 73, 0.9), rgba(2, 10, 21, 0.99) 70%),
    #020a15;
}

.login-card {
  width: min(380px, 100%);
  display: grid;
  gap: 12px;
  justify-items: center;
  padding: 34px 30px;
  border: 1px solid rgba(56, 189, 248, 0.24);
  border-radius: 12px;
  background: rgba(3, 21, 37, 0.88);
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.5), inset 0 0 60px rgba(14, 165, 233, 0.04);
  color: #e0f2fe;
}

.login-mark {
  width: 84px;
  height: 84px;
}

.login-card > strong {
  font-size: 30px;
  font-weight: 950;
  letter-spacing: 0.08em;
  color: #f8fafc;
}

.login-card > span {
  padding-bottom: 8px;
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  text-align: center;
}

.login-card label {
  width: 100%;
  display: grid;
  gap: 6px;
  color: #9dc7ea;
  font-size: 12px;
  font-weight: 700;
}

.login-card input {
  width: 100%;
  padding: 11px 12px;
  border: 1px solid rgba(125, 211, 252, 0.26);
  border-radius: 8px;
  background: rgba(2, 10, 21, 0.8);
  color: #f8fafc;
  font-size: 14px;
}

.login-card input:focus {
  outline: 2px solid rgba(56, 189, 248, 0.55);
  outline-offset: 1px;
}

.login-card button {
  width: 100%;
  margin-top: 6px;
  padding: 11px 12px;
  border: 0;
  border-radius: 8px;
  background: #0878b9;
  color: #fff;
  font-size: 14px;
  font-weight: 800;
  cursor: pointer;
}

.login-card button:hover {
  background: #0a8fd8;
}

.login-error {
  min-height: 18px;
  margin: 0;
  color: #fda4af;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}

.sidebar-user {
  flex: 0 0 auto;
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid rgba(125, 211, 252, 0.2);
  border-radius: 10px;
  background: rgba(8, 120, 185, 0.12);
}

.sidebar-user strong {
  color: #f8fafc;
  font-size: 13px;
}

.sidebar-user span {
  color: #7dd3fc;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.sidebar-user-actions {
  display: flex;
  gap: 8px;
  margin-top: 8px;
}

.sidebar-user-actions button {
  flex: 1;
  min-width: 0;
  padding: 7px 8px;
  border: 1px solid rgba(125, 211, 252, 0.28);
  border-radius: 7px;
  background: transparent;
  color: #c8def3;
  font-size: 11px;
  font-weight: 800;
  cursor: pointer;
}

.sidebar-user-actions button:hover {
  background: rgba(8, 120, 185, 0.3);
  color: #fff;
}

#logoutBtn {
  background: rgba(8, 120, 185, 0.28);
  color: #f8fafc;
}

.form-hint {
  margin: -6px 0 0;
  color: var(--muted);
  font-size: 12px;
}

.role-guide {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 10px;
  margin: 14px 0;
}

.role-guide article {
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--soft-blue);
}

.role-guide strong {
  display: block;
  font-size: 13px;
}

.role-guide p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
}

#userRows select {
  padding: 6px 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  font-size: 12px;
}

#userRows .small-btn {
  margin: 2px 3px 2px 0;
}

body:not(.can-registry-write) [data-asset-status] {
  display: none;
}

body:not(.can-incidents-write) #incidentForm,
body:not(.can-incidents-write) [data-incident-id] {
  display: none;
}

body:not(.can-export) .button-link[href="/api/export/registry.json"] {
  display: none;
}
