:root {
  --ink: #17201b;
  --muted: #66736c;
  --panel: rgba(252, 253, 250, 0.94);
  --line: rgba(23, 32, 27, 0.13);
  --danger: #d43d2f;
  --detect: #d98a1f;
  --clear: #7b8794;
  --good: #2f7d62;
  --map-bg: #e8eee8;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--map-bg);
  font-family: "Segoe UI", "Noto Sans", sans-serif;
}

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

.map-zone {
  min-width: 0;
  position: relative;
}

#map {
  width: 100%;
  height: 100vh;
  background: var(--map-bg);
}

.console {
  height: 100vh;
  overflow: hidden;
  display: grid;
  grid-template-rows: auto auto auto auto auto minmax(0, 1fr);
  gap: 14px;
  padding: 18px;
  background: var(--panel);
  border-left: 1px solid var(--line);
  box-shadow: -18px 0 40px rgba(29, 45, 36, 0.12);
  backdrop-filter: blur(14px);
}

.console-head,
.section-title,
.status-strip,
.legend {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--good);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  margin: 0;
}

h1 {
  font-size: 28px;
  line-height: 1.05;
}

h2 {
  font-size: 15px;
}

.icon-button {
  width: 38px;
  height: 38px;
  flex: 0 0 38px;
  border: 1px solid var(--line);
  border-radius: 8px;
  color: var(--ink);
  background: #ffffff;
  font-weight: 800;
  cursor: pointer;
}

.icon-button:hover {
  background: #edf4ef;
}

.status-strip {
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #ffffff;
}

.ad-slot {
  min-height: 62px;
  display: grid;
  place-items: center;
  padding: 12px;
  border: 1px dashed rgba(47, 125, 98, 0.34);
  border-radius: 8px;
  color: var(--muted);
  background: rgba(255, 255, 255, 0.62);
  font-size: 12px;
}

.metric {
  display: block;
  font-size: 28px;
  font-weight: 800;
  line-height: 1;
}

.metric.small {
  font-size: 16px;
  text-transform: uppercase;
}

.metric-label {
  display: block;
  margin-top: 5px;
  color: var(--muted);
  font-size: 12px;
}

.legend {
  justify-content: flex-start;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 12px;
}

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

.dot {
  width: 10px;
  height: 10px;
  display: inline-block;
  border-radius: 50%;
}

.danger {
  background: var(--danger);
}

.detection {
  background: var(--detect);
}

.clear {
  background: var(--clear);
}

.error-box {
  padding: 10px 12px;
  border: 1px solid rgba(212, 61, 47, 0.3);
  border-radius: 8px;
  color: #8b241b;
  background: #fff0ee;
  font-size: 13px;
  line-height: 1.35;
}

.feed-wrap {
  min-height: 0;
  display: grid;
  grid-template-rows: auto minmax(0, 1fr);
  gap: 10px;
}

.section-title time {
  color: var(--muted);
  font-size: 12px;
}

.feed {
  min-height: 0;
  overflow: auto;
  display: flex;
  flex-direction: column;
  gap: 9px;
  padding-right: 4px;
}

.event {
  padding: 11px;
  border: 1px solid var(--line);
  border-left-width: 5px;
  border-radius: 8px;
  background: #ffffff;
}

.event[data-status="danger"] {
  border-left-color: var(--danger);
}

.event[data-status="detection"] {
  border-left-color: var(--detect);
}

.event[data-status="clear"] {
  border-left-color: var(--clear);
}

.event-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 5px;
}

.region {
  font-size: 14px;
  font-weight: 800;
  line-height: 1.25;
}

.event time {
  flex: 0 0 auto;
  color: var(--muted);
  font-size: 12px;
}

.details {
  color: var(--muted);
  font-size: 12px;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.symbol-marker {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid #fff;
  color: #fff;
  font-size: 20px;
  font-weight: 800;
  line-height: 1;
  box-shadow: 0 0 0 7px rgba(217, 138, 31, 0.20), 0 8px 18px rgba(0, 0, 0, 0.18);
}

.symbol-marker svg {
  width: 24px;
  height: 24px;
  display: block;
}

.symbol-marker svg path,
.symbol-marker svg circle {
  fill: none;
  stroke: currentColor;
  stroke-width: 2.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.symbol-marker.uav {
  background: var(--detect);
}

.symbol-marker.pvo {
  background: #334c5f;
  box-shadow: 0 0 0 7px rgba(51, 76, 95, 0.22), 0 8px 18px rgba(0, 0, 0, 0.18);
}

.symbol-marker.missile {
  background: var(--danger);
  box-shadow: 0 0 0 7px rgba(212, 61, 47, 0.22), 0 8px 18px rgba(0, 0, 0, 0.18);
}

@media (max-width: 860px) {
  .shell {
    grid-template-columns: 1fr;
    grid-template-rows: 58vh 42vh;
  }

  #map,
  .console {
    height: auto;
  }

  #map {
    height: 100%;
  }

  .console {
    border-left: 0;
    border-top: 1px solid var(--line);
    box-shadow: 0 -12px 30px rgba(29, 45, 36, 0.12);
  }
}
