:root {
  --bg: #061522;
  --bg-deep: #040d15;
  --panel: #0d2536;
  --panel-2: #102d41;
  --panel-3: #15364b;
  --line: #22465d;
  --line-soft: rgba(124, 172, 201, 0.16);
  --text: #edf7ff;
  --muted: #89a8bc;
  --muted-2: #638298;
  --teal: #16c7bd;
  --teal-soft: rgba(22, 199, 189, 0.16);
  --blue: #4aa3ff;
  --blue-soft: rgba(74, 163, 255, 0.16);
  --violet: #a78bfa;
  --violet-soft: rgba(167, 139, 250, 0.17);
  --yellow: #f6c453;
  --yellow-soft: rgba(246, 196, 83, 0.15);
  --orange: #ff8a43;
  --orange-soft: rgba(255, 138, 67, 0.17);
  --red: #ff5f6d;
  --red-soft: rgba(255, 95, 109, 0.16);
  --green: #50d890;
  --green-soft: rgba(80, 216, 144, 0.14);
  --shadow: 0 16px 42px rgba(0, 0, 0, 0.28);
  --r-lg: 20px;
  --r-md: 14px;
  --r-sm: 9px;
  font-family: "Pretendard", "Malgun Gothic", "Apple SD Gothic Neo", "Segoe UI", sans-serif;
}

* {
  box-sizing: border-box;
}

html,
body {
  width: 100%;
  height: 100%;
  margin: 0;
  overflow: hidden;
  background:
    radial-gradient(circle at 25% 15%, rgba(29, 107, 149, 0.18), transparent 30%),
    radial-gradient(circle at 80% 80%, rgba(22, 199, 189, 0.10), transparent 32%),
    var(--bg-deep);
  color: var(--text);
}

body {
  min-width: 360px;
  min-height: 240px;
}

button,
input {
  font: inherit;
}

button {
  color: inherit;
}

#stage {
  position: fixed;
  inset: 0;
  overflow: hidden;
}

.wall {
  position: absolute;
  inset: 0 auto auto 0;
  transform-origin: 0 0;
}

.mode-wall .wall {
  display: grid;
  grid-template-columns: 1920px 1920px;
  grid-template-rows: 1080px 1080px;
  width: 3840px;
  height: 2160px;
}

.mode-single .wall {
  width: 1920px;
  height: 1080px;
}

.mode-single .screen:not(.is-active) {
  display: none;
}

.screen {
  position: relative;
  width: 1920px;
  height: 1080px;
  overflow: hidden;
  isolation: isolate;
  background:
    linear-gradient(rgba(32, 82, 110, 0.055) 1px, transparent 1px),
    linear-gradient(90deg, rgba(32, 82, 110, 0.055) 1px, transparent 1px),
    radial-gradient(circle at 72% 18%, rgba(27, 111, 150, 0.12), transparent 28%),
    linear-gradient(145deg, #071a29 0%, #06131f 62%, #071723 100%);
  background-size: 46px 46px, 46px 46px, auto, auto;
  border: 2px solid #02070c;
}

.screen::after {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  box-shadow: inset 0 0 100px rgba(0, 0, 0, 0.34);
}

.screen-header {
  height: 92px;
  display: grid;
  grid-template-columns: 500px 1fr 590px;
  align-items: center;
  gap: 20px;
  padding: 0 30px;
  border-bottom: 1px solid rgba(99, 146, 174, 0.30);
  background: linear-gradient(90deg, rgba(8, 32, 48, 0.97), rgba(8, 25, 39, 0.94));
  box-shadow: 0 8px 26px rgba(0, 0, 0, 0.23);
}

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

.brand-mark {
  width: 48px;
  height: 48px;
  border-radius: 15px;
  display: grid;
  place-items: center;
  font-size: 22px;
  font-weight: 900;
  letter-spacing: -1px;
  color: #04121d;
  background: linear-gradient(135deg, #56e0d8, #2e8ef7 72%);
  box-shadow: 0 0 32px rgba(22, 199, 189, 0.25);
}

.brand-copy {
  min-width: 0;
}

.brand-title {
  margin: 0;
  font-size: 23px;
  line-height: 1.1;
  font-weight: 800;
  letter-spacing: -0.8px;
  white-space: nowrap;
}

.brand-sub {
  margin-top: 7px;
  color: var(--muted);
  font-size: 13px;
  letter-spacing: 1.1px;
  text-transform: uppercase;
}

.event-context {
  display: flex;
  justify-content: center;
  align-items: center;
  gap: 15px;
  min-width: 0;
}

.event-name {
  max-width: 510px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  font-size: 18px;
  font-weight: 750;
  color: #d8edfb;
}

.screen-no {
  display: inline-flex;
  align-items: center;
  height: 34px;
  padding: 0 13px;
  border: 1px solid rgba(74, 163, 255, 0.35);
  border-radius: 999px;
  color: #bce0ff;
  background: var(--blue-soft);
  font-size: 13px;
  font-weight: 800;
}

.header-status {
  display: flex;
  justify-content: flex-end;
  align-items: center;
  gap: 12px;
}

.header-kpi {
  min-width: 94px;
  padding: 8px 11px;
  border-left: 1px solid rgba(105, 153, 180, 0.25);
}

.header-kpi:first-child {
  border-left: 0;
}

.header-kpi span {
  display: block;
  margin-bottom: 4px;
  color: var(--muted-2);
  font-size: 11px;
}

.header-kpi strong {
  font-size: 15px;
  font-weight: 800;
  letter-spacing: 0.2px;
}

.screen-body {
  height: calc(100% - 92px);
  padding: 22px 26px 26px;
}

.panel {
  position: relative;
  min-width: 0;
  min-height: 0;
  overflow: hidden;
  border: 1px solid rgba(75, 128, 159, 0.28);
  border-radius: var(--r-lg);
  background:
    linear-gradient(145deg, rgba(18, 49, 69, 0.94), rgba(9, 31, 47, 0.96));
  box-shadow: var(--shadow);
}

.panel::before {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background: linear-gradient(130deg, rgba(255, 255, 255, 0.028), transparent 34%);
}

.panel-header {
  min-height: 58px;
  padding: 16px 18px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  border-bottom: 1px solid rgba(91, 142, 172, 0.20);
}

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

.panel-title h2,
.panel-title h3 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
  letter-spacing: -0.5px;
}

.panel-title h3 {
  font-size: 17px;
}

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

.panel-body {
  position: relative;
  padding: 16px 18px 18px;
  height: calc(100% - 58px);
}

.badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 26px;
  padding: 4px 10px;
  border: 1px solid rgba(127, 170, 196, 0.28);
  border-radius: 999px;
  color: #bdd5e5;
  background: rgba(81, 121, 146, 0.13);
  font-size: 11px;
  font-weight: 800;
  white-space: nowrap;
}

.badge.teal { color: #89f2ec; border-color: rgba(22, 199, 189, 0.35); background: var(--teal-soft); }
.badge.blue { color: #a8d5ff; border-color: rgba(74, 163, 255, 0.35); background: var(--blue-soft); }
.badge.violet { color: #d0c3ff; border-color: rgba(167, 139, 250, 0.37); background: var(--violet-soft); }
.badge.yellow { color: #ffe19a; border-color: rgba(246, 196, 83, 0.36); background: var(--yellow-soft); }
.badge.orange { color: #ffc09a; border-color: rgba(255, 138, 67, 0.40); background: var(--orange-soft); }
.badge.red { color: #ffb0b7; border-color: rgba(255, 95, 109, 0.40); background: var(--red-soft); }
.badge.green { color: #a8f4c9; border-color: rgba(80, 216, 144, 0.34); background: var(--green-soft); }

.dot {
  width: 8px;
  height: 8px;
  flex: 0 0 8px;
  border-radius: 50%;
  background: currentColor;
  box-shadow: 0 0 12px currentColor;
}

.subtle {
  color: var(--muted);
}

.mono {
  font-family: "Cascadia Mono", "Consolas", monospace;
  letter-spacing: 0.1px;
}

.num {
  font-variant-numeric: tabular-nums;
}

.status-orbit {
  position: relative;
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal);
  box-shadow: 0 0 13px rgba(22, 199, 189, 0.8);
}

.status-orbit::after {
  content: "";
  position: absolute;
  inset: -5px;
  border: 1px solid rgba(22, 199, 189, 0.55);
  border-radius: 50%;
  animation: pulse 2.2s ease-out infinite;
}

@keyframes pulse {
  0% { transform: scale(.65); opacity: .8; }
  85%, 100% { transform: scale(1.7); opacity: 0; }
}

/* Screen 1 */
.screen-grid-1 {
  display: grid;
  grid-template-columns: 330px 1fr 430px;
  grid-template-rows: minmax(0, 1fr) 168px;
  gap: 18px;
}

.service-stack {
  grid-column: 1;
  grid-row: 1;
  display: grid;
  grid-template-rows: 58px repeat(3, 1fr);
  gap: 12px;
}

.service-stack-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 4px;
}

.service-stack-title strong {
  font-size: 19px;
}

.service-card {
  position: relative;
  overflow: hidden;
  padding: 18px;
  border: 1px solid rgba(78, 135, 166, 0.27);
  border-radius: 17px;
  background: linear-gradient(150deg, rgba(16, 47, 67, 0.95), rgba(9, 29, 44, 0.98));
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.19);
}

.service-card.is-alert {
  border-color: rgba(255, 138, 67, 0.50);
  background: linear-gradient(150deg, rgba(67, 45, 34, 0.78), rgba(17, 32, 43, 0.98));
}

.service-card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.service-card h3 {
  margin: 0;
  font-size: 17px;
}

.service-metric {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
  margin-top: 15px;
}

.service-metric strong {
  font-size: 36px;
  line-height: 1;
  letter-spacing: -1.5px;
}

.service-metric span {
  max-width: 138px;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.45;
  text-align: right;
}

.sparkline {
  display: block;
  width: 100%;
  height: 42px;
  margin-top: 12px;
}

.overview-map {
  grid-column: 2;
  grid-row: 1;
}

.map-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
}

.map-canvas,
.risk-map-canvas,
.impact-map-canvas {
  position: relative;
  height: 100%;
  min-height: 0;
  overflow: hidden;
  border-radius: 13px;
  background:
    radial-gradient(circle at 45% 50%, rgba(34, 107, 139, 0.20), transparent 47%),
    linear-gradient(rgba(79, 137, 163, 0.07) 1px, transparent 1px),
    linear-gradient(90deg, rgba(79, 137, 163, 0.07) 1px, transparent 1px),
    #071d2b;
  background-size: auto, 34px 34px, 34px 34px, auto;
}

.map-svg {
  width: 100%;
  height: 100%;
  display: block;
}

.map-legend {
  position: absolute;
  left: 18px;
  bottom: 16px;
  display: flex;
  gap: 8px;
  padding: 9px 11px;
  border: 1px solid rgba(92, 144, 171, 0.24);
  border-radius: 12px;
  background: rgba(4, 19, 30, 0.82);
  backdrop-filter: blur(12px);
}

.legend-item {
  display: flex;
  align-items: center;
  gap: 6px;
  color: #a9c0cf;
  font-size: 10px;
  white-space: nowrap;
}

.legend-swatch {
  width: 9px;
  height: 9px;
  border-radius: 3px;
}

.map-caption {
  position: absolute;
  top: 18px;
  left: 18px;
  padding: 12px 14px;
  border-radius: 13px;
  background: rgba(5, 24, 37, 0.84);
  border: 1px solid rgba(93, 148, 180, 0.22);
  backdrop-filter: blur(10px);
}

.map-caption strong {
  display: block;
  font-size: 17px;
  margin-bottom: 4px;
}

.map-caption span {
  color: var(--muted);
  font-size: 11px;
}

.priority-events {
  grid-column: 3;
  grid-row: 1;
}

.event-list {
  display: grid;
  gap: 10px;
}

.event-item {
  width: 100%;
  min-height: 106px;
  padding: 13px 14px;
  text-align: left;
  border: 1px solid rgba(72, 124, 153, 0.25);
  border-radius: 14px;
  color: var(--text);
  background: rgba(11, 39, 56, 0.76);
  cursor: pointer;
  transition: .18s ease;
}

.event-item:hover {
  transform: translateY(-2px);
  border-color: rgba(74, 163, 255, 0.55);
}

.event-item.is-selected {
  border-color: rgba(255, 138, 67, 0.65);
  background: linear-gradient(115deg, rgba(255, 138, 67, 0.16), rgba(11, 39, 56, 0.72));
  box-shadow: inset 3px 0 0 var(--orange);
}

.event-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.event-item h3 {
  margin: 10px 0 8px;
  font-size: 15px;
  line-height: 1.35;
}

.event-meta {
  display: flex;
  justify-content: space-between;
  color: var(--muted);
  font-size: 11px;
}

.event-progress {
  height: 5px;
  margin-top: 11px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(112, 152, 175, 0.13);
}

.event-progress span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--yellow), var(--orange));
}

.health-strip {
  grid-column: 1 / 4;
  grid-row: 2;
  display: grid;
  grid-template-columns: 270px 1fr 1fr 1fr 1fr 1.3fr;
  gap: 1px;
  padding: 0;
  background: var(--line-soft);
}

.health-title,
.health-cell {
  padding: 19px 20px;
  background: linear-gradient(145deg, rgba(15, 45, 64, 0.98), rgba(8, 27, 41, 0.98));
}

.health-title {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.health-title strong {
  font-size: 18px;
}

.health-title span {
  margin-top: 8px;
  color: var(--muted);
  font-size: 12px;
}

.health-cell {
  display: flex;
  flex-direction: column;
  justify-content: center;
}

.health-cell span {
  color: var(--muted);
  font-size: 11px;
}

.health-cell strong {
  margin-top: 8px;
  font-size: 25px;
}

.health-cell small {
  margin-top: 5px;
  color: #76b9d9;
  font-size: 10px;
}

.mini-bar {
  height: 7px;
  margin-top: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: rgba(117, 156, 179, 0.13);
}

.mini-bar span {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--teal), var(--blue));
}

/* Screen 2 */
.screen-grid-2 {
  display: grid;
  grid-template-columns: minmax(0, 1.42fr) minmax(520px, .76fr);
  grid-template-rows: minmax(0, 1fr) 244px;
  gap: 18px;
}

.risk-main {
  grid-column: 1;
  grid-row: 1;
}

.risk-side {
  grid-column: 2;
  grid-row: 1;
  display: grid;
  grid-template-rows: 164px 1fr 208px;
  gap: 14px;
}

.risk-timeline {
  grid-column: 1 / 3;
  grid-row: 2;
}

.forecast-callout {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  height: 100%;
  padding: 18px 20px;
  border: 1px solid rgba(255, 138, 67, 0.44);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(92, 49, 28, 0.68), rgba(18, 42, 55, 0.95));
  box-shadow: var(--shadow);
}

.forecast-callout span {
  color: #ffc49f;
  font-size: 13px;
  font-weight: 800;
}

.forecast-callout strong {
  display: block;
  margin-top: 7px;
  font-size: 25px;
}

.countdown {
  min-width: 158px;
  text-align: right;
}

.countdown b {
  display: block;
  color: #ffba8f;
  font-size: 40px;
  letter-spacing: -2px;
}

.countdown small {
  color: #d49b78;
  font-size: 11px;
}

.cause-card,
.matrix-card {
  min-height: 0;
}

.cause-list {
  display: grid;
  gap: 12px;
}

.cause-row {
  display: grid;
  grid-template-columns: 96px 1fr 55px;
  align-items: center;
  gap: 10px;
  font-size: 12px;
}

.cause-row > span:first-child {
  color: #c7dce9;
}

.cause-row > strong {
  text-align: right;
  font-size: 12px;
}

.bar-track {
  height: 9px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(118, 157, 179, 0.13);
}

.bar-track i {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--blue), var(--orange));
}

.impact-matrix {
  width: 100%;
  border-collapse: separate;
  border-spacing: 5px;
  font-size: 10px;
  table-layout: fixed;
}

.impact-matrix th {
  color: var(--muted);
  font-weight: 700;
  padding: 3px;
}

.impact-matrix td {
  height: 31px;
  border-radius: 7px;
  text-align: center;
  color: #f0f7fb;
  background: rgba(74, 163, 255, 0.12);
}

.impact-matrix td.low { background: rgba(22, 199, 189, 0.14); color: #9af1e8; }
.impact-matrix td.med { background: rgba(246, 196, 83, 0.20); color: #ffe3a0; }
.impact-matrix td.high { background: rgba(255, 138, 67, 0.28); color: #ffc09b; }

.map-floating-kpis {
  position: absolute;
  right: 17px;
  top: 17px;
  display: grid;
  width: 220px;
  gap: 9px;
}

.map-floating-kpi {
  padding: 12px 13px;
  border: 1px solid rgba(88, 139, 167, 0.24);
  border-radius: 12px;
  background: rgba(6, 25, 38, 0.84);
  backdrop-filter: blur(12px);
}

.map-floating-kpi span {
  color: var(--muted);
  font-size: 10px;
}

.map-floating-kpi strong {
  display: block;
  margin-top: 5px;
  font-size: 17px;
}

.timeline-wrap {
  display: grid;
  grid-template-columns: 230px 1fr;
  gap: 16px;
  height: 100%;
}

.timeline-summary {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding-right: 15px;
  border-right: 1px solid rgba(90, 142, 171, 0.22);
}

.timeline-summary strong {
  font-size: 18px;
  line-height: 1.42;
}

.timeline-summary span {
  margin-top: 9px;
  color: var(--muted);
  font-size: 11px;
  line-height: 1.55;
}

.timeline-chart {
  width: 100%;
  height: 100%;
}

/* Screen 3 */
.screen-grid-3 {
  display: grid;
  grid-template-columns: minmax(0, 1.47fr) minmax(590px, .78fr);
  gap: 18px;
}

.vlm-video-panel {
  display: grid;
  grid-template-rows: 58px minmax(0, 1fr) 170px;
}

.vlm-video-panel .panel-body {
  height: auto;
  padding: 14px;
}

.cctv-frame {
  position: relative;
  min-height: 0;
  overflow: hidden;
  border-radius: 15px;
  background:
    linear-gradient(174deg, #405f63 0 38%, #667d72 39% 44%, #42585d 45% 52%, #465b60 53% 100%);
  box-shadow: inset 0 0 80px rgba(0, 0, 0, 0.35);
}

.cctv-frame > img {
  width: 100%;
  height: 100%;
  display: block;
  object-fit: cover;
  filter: saturate(.82) contrast(1.04) brightness(.88);
}

.cctv-frame::after {
  content: "";
  position: absolute;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(90deg, rgba(3, 11, 16, 0.21), transparent 22%, transparent 75%, rgba(3, 11, 16, 0.18)),
    linear-gradient(0deg, rgba(3, 11, 16, 0.24), transparent 24%);
}

.video-id {
  position: absolute;
  top: 16px;
  left: 16px;
  z-index: 4;
  display: flex;
  gap: 8px;
  align-items: center;
  padding: 9px 12px;
  border: 1px solid rgba(221, 235, 244, 0.28);
  border-radius: 10px;
  color: #f2f8fc;
  background: rgba(4, 15, 23, 0.68);
  backdrop-filter: blur(9px);
  font-size: 12px;
  font-weight: 800;
}

.video-time {
  position: absolute;
  top: 16px;
  right: 16px;
  z-index: 4;
  padding: 9px 12px;
  border-radius: 10px;
  color: #e8f4fa;
  background: rgba(4, 15, 23, 0.68);
  font-size: 12px;
}

.detection-box {
  position: absolute;
  z-index: 3;
  border: 2px solid var(--violet);
  border-radius: 8px;
  box-shadow: 0 0 0 1px rgba(0, 0, 0, 0.45), 0 0 22px rgba(167, 139, 250, 0.26);
}

.detection-box span {
  position: absolute;
  left: -2px;
  top: -28px;
  padding: 5px 8px;
  border-radius: 7px 7px 7px 0;
  color: #160f2b;
  background: var(--violet);
  font-size: 10px;
  font-weight: 900;
  white-space: nowrap;
}

.detection-box.waterline {
  left: 17%;
  top: 46%;
  width: 65%;
  height: 33%;
  border-color: rgba(74, 163, 255, 0.88);
  border-style: dashed;
}

.detection-box.waterline span { background: var(--blue); color: #041522; }

.detection-box.debris {
  left: 43%;
  top: 62%;
  width: 14%;
  height: 11%;
}

.detection-box.person {
  left: 79.2%;
  top: 33.5%;
  width: 3.5%;
  height: 13%;
  border-color: var(--yellow);
}

.detection-box.person span { background: var(--yellow); color: #332500; }

.waterline-guide {
  position: absolute;
  z-index: 4;
  left: 14%;
  right: 16%;
  top: 58%;
  border-top: 3px solid rgba(74, 163, 255, 0.88);
  transform: rotate(-3deg);
  filter: drop-shadow(0 0 6px rgba(74, 163, 255, 0.8));
}

.waterline-guide::after {
  content: "수면선 +28cm / 30분";
  position: absolute;
  right: 0;
  bottom: 7px;
  padding: 5px 8px;
  border-radius: 7px;
  color: #041522;
  background: var(--blue);
  font-size: 10px;
  font-weight: 900;
}

.video-evidence-strip {
  display: grid;
  grid-template-columns: 1fr 1fr 1.35fr;
  gap: 12px;
  padding: 14px;
}

.evidence-thumb {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(88, 137, 165, 0.28);
  border-radius: 12px;
  background: #0a1e2c;
}

.evidence-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  filter: saturate(.65) brightness(.58);
  transform: scale(1.03);
}

.evidence-thumb span {
  position: absolute;
  left: 9px;
  bottom: 8px;
  padding: 4px 7px;
  border-radius: 6px;
  color: #dceaf2;
  background: rgba(3, 14, 22, 0.76);
  font-size: 9px;
}

.evidence-note {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 14px;
  border: 1px solid rgba(167, 139, 250, 0.24);
  border-radius: 12px;
  background: var(--violet-soft);
}

.evidence-note strong {
  font-size: 15px;
}

.evidence-note span {
  margin-top: 7px;
  color: #bcb1e7;
  font-size: 11px;
  line-height: 1.5;
}

.vlm-side {
  display: grid;
  grid-template-rows: 240px 294px minmax(0, 1fr);
  gap: 14px;
}

.summary-box {
  height: 100%;
  padding: 18px 20px;
  border: 1px solid rgba(167, 139, 250, 0.35);
  border-radius: var(--r-lg);
  background: linear-gradient(135deg, rgba(83, 62, 136, 0.33), rgba(12, 39, 55, 0.96));
  box-shadow: var(--shadow);
}

.summary-box h2 {
  margin: 14px 0 10px;
  font-size: 21px;
}

.summary-box p {
  margin: 0;
  color: #c9dce7;
  font-size: 14px;
  line-height: 1.68;
}

.summary-meta {
  display: flex;
  gap: 16px;
  margin-top: 14px;
  color: #a99bd7;
  font-size: 11px;
}

.cross-table {
  display: grid;
  gap: 8px;
}

.cross-row {
  display: grid;
  grid-template-columns: 1fr 116px 78px;
  align-items: center;
  gap: 10px;
  min-height: 43px;
  padding: 8px 10px;
  border-radius: 10px;
  background: rgba(30, 66, 87, 0.45);
  font-size: 11px;
}

.cross-row span:nth-child(2) {
  color: #b9d0de;
  text-align: right;
}

.cross-row strong {
  text-align: center;
  font-size: 10px;
}

.qa-list {
  display: grid;
  align-content: start;
  gap: 9px;
}

.qa-message {
  display: grid;
  grid-template-columns: 30px 1fr;
  align-items: start;
  gap: 10px;
  padding: 11px 12px;
  border: 1px solid rgba(94, 143, 169, 0.21);
  border-radius: 11px;
  color: #c8dce8;
  background: rgba(12, 40, 58, 0.62);
  font-size: 12px;
  line-height: 1.45;
}

.qa-message.is-answer {
  border-color: rgba(74, 163, 255, 0.30);
  background: linear-gradient(135deg, rgba(74, 163, 255, 0.13), rgba(24, 55, 76, 0.72));
}

.qa-role {
  display: grid;
  place-items: center;
  width: 30px;
  height: 30px;
  border-radius: 9px;
  color: #1b1035;
  background: var(--violet);
  font-size: 10px;
  font-weight: 900;
}

.qa-message.is-answer .qa-role {
  color: #041522;
  background: var(--blue);
}

.qa-message p {
  margin: 5px 0 0;
}

.qa-copy p {
  margin-top: 1px;
}

.qa-copy strong {
  color: #e7f4ff;
}

.qa-evidence {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 9px;
}

.qa-evidence span {
  padding: 4px 7px;
  border: 1px solid rgba(74, 163, 255, 0.24);
  border-radius: 999px;
  color: #a9d5f7;
  background: rgba(5, 28, 43, 0.55);
  font-size: 9px;
  font-weight: 700;
}

.qa-followups {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 7px;
  color: var(--muted);
  font-size: 9px;
}

.qa-followups > span {
  font-weight: 800;
}

.qa-followups p {
  margin: 0;
  padding: 6px 9px;
  border-radius: 8px;
  color: #aebfd0;
  background: rgba(94, 143, 169, 0.11);
}

.integration-note {
  margin-top: 9px;
  color: var(--muted-2);
  font-size: 9px;
  line-height: 1.45;
}

/* Screen 4 */
.screen-grid-4 {
  display: grid;
  grid-template-columns: minmax(0, 1.06fr) minmax(0, 1fr) 470px;
  gap: 18px;
}

.impact-panel,
.actions-panel,
.assistant-column {
  min-height: 0;
}

.impact-panel {
  display: grid;
  grid-template-rows: 58px 440px 1fr;
}

.impact-panel .panel-body {
  height: auto;
  padding: 14px;
}

.impact-summary {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  padding: 14px;
}

.impact-stat {
  padding: 13px;
  border: 1px solid rgba(76, 130, 160, 0.23);
  border-radius: 12px;
  background: rgba(12, 40, 58, 0.62);
}

.impact-stat span {
  color: var(--muted);
  font-size: 10px;
}

.impact-stat strong {
  display: block;
  margin-top: 6px;
  font-size: 21px;
}

.impact-stat small {
  display: block;
  margin-top: 4px;
  color: #78adc8;
  font-size: 9px;
}

.actions-panel {
  display: grid;
  grid-template-rows: 58px 344px 216px 1fr;
}

.actions-panel .panel-body {
  height: auto;
  padding: 13px 15px;
}

.action-timeline {
  display: grid;
  grid-template-rows: 74px repeat(5, minmax(0, 1fr));
  gap: 6px;
}

.golden-time-banner {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 14px;
  padding: 10px 12px;
  overflow: hidden;
  border: 1px solid rgba(255, 95, 109, 0.48);
  border-radius: 12px;
  background: linear-gradient(130deg, rgba(103, 38, 41, 0.76), rgba(45, 34, 42, 0.92));
  box-shadow: inset 0 0 28px rgba(255, 95, 109, 0.08);
}

.golden-time-copy span,
.golden-time-copy strong,
.golden-time-copy small {
  display: block;
}

.golden-time-copy span {
  color: #ff9eaa;
  font-size: 10px;
  font-weight: 900;
  letter-spacing: .7px;
}

.golden-time-copy strong {
  margin-top: 4px;
  color: #fff1f2;
  font-size: 13px;
}

.golden-time-copy small {
  margin-top: 3px;
  color: #d9a6aa;
  font-size: 8px;
}

.golden-countdown {
  min-width: 164px;
  text-align: right;
}

.golden-countdown span,
.golden-countdown small {
  display: block;
  color: #d9a6aa;
  font-size: 8px;
}

.golden-countdown strong {
  display: block;
  margin: 1px 0;
  color: #ff8c98;
  font-size: 35px;
  line-height: 1;
  letter-spacing: -1.5px;
  text-shadow: 0 0 18px rgba(255, 95, 109, 0.30);
}

.golden-time-banner.is-critical {
  animation: criticalPulse 1.4s ease-in-out infinite;
}

@keyframes criticalPulse {
  0%, 100% { border-color: rgba(255, 95, 109, 0.48); }
  50% { border-color: rgba(255, 95, 109, 0.95); }
}

.action-row {
  display: grid;
  grid-template-columns: 54px 1fr 86px;
  align-items: center;
  gap: 9px;
  min-height: 0;
  padding: 5px 9px;
  border-radius: 10px;
  background: rgba(22, 55, 75, 0.56);
  font-size: 11px;
}

.action-row time {
  color: #8ec7e3;
  font-weight: 800;
}

.action-row strong {
  font-size: 11px;
  line-height: 1.35;
}

.decision-card {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  height: 100%;
}

.decision-block {
  padding: 13px;
  border: 1px solid rgba(74, 163, 255, 0.24);
  border-radius: 12px;
  background: rgba(20, 54, 75, 0.54);
}

.decision-block h4 {
  margin: 0 0 10px;
  font-size: 13px;
}

.decision-main {
  color: #e6f4fc;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.45;
}

.decision-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 10px;
  line-height: 1.5;
}

.capacity-line {
  display: flex;
  justify-content: space-between;
  margin-top: 11px;
  color: #b8cedb;
  font-size: 10px;
}

.resource-strip {
  display: grid;
  grid-template-columns: 1.1fr 1fr;
  gap: 11px;
  height: 100%;
}

.resource-map-mini,
.before-after {
  position: relative;
  overflow: hidden;
  border: 1px solid rgba(81, 134, 163, 0.23);
  border-radius: 12px;
  background: rgba(10, 35, 51, 0.74);
}

.resource-map-mini {
  padding: 12px;
}

.resource-map-mini h4,
.before-after h4 {
  margin: 0;
  font-size: 12px;
}

.route-line {
  position: absolute;
  left: 23px;
  right: 38px;
  top: 66%;
  border-top: 2px dashed rgba(74, 163, 255, 0.72);
  transform: rotate(-8deg);
}

.route-node {
  position: absolute;
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: var(--blue);
  box-shadow: 0 0 12px var(--blue);
}

.route-node.start { left: 25px; top: 73%; }
.route-node.end { right: 38px; top: 49%; background: var(--orange); box-shadow: 0 0 12px var(--orange); }

.route-label {
  position: absolute;
  right: 18px;
  top: 34%;
  color: #ffc19c;
  font-size: 10px;
}

.before-after {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1px;
  background: var(--line-soft);
}

.risk-before,
.risk-after {
  display: flex;
  flex-direction: column;
  justify-content: center;
  align-items: center;
  background: rgba(11, 37, 53, 0.95);
}

.risk-before strong,
.risk-after strong {
  font-size: 29px;
}

.risk-before span,
.risk-after span {
  margin-top: 7px;
  color: var(--muted);
  font-size: 9px;
}

.assistant-column {
  display: grid;
  grid-template-rows: 260px 1fr 174px;
  gap: 14px;
}

.assistant-card {
  padding: 17px;
  border: 1px solid rgba(167, 139, 250, 0.30);
  border-radius: var(--r-lg);
  background: linear-gradient(145deg, rgba(65, 53, 111, 0.30), rgba(11, 34, 50, 0.97));
  box-shadow: var(--shadow);
}

.assistant-card h3 {
  margin: 13px 0 10px;
  font-size: 18px;
}

.assistant-query {
  padding: 10px 12px;
  border-radius: 10px;
  color: #dcd4ff;
  background: rgba(167, 139, 250, 0.12);
  font-size: 11px;
  line-height: 1.45;
}

.assistant-answer {
  margin-top: 11px;
  color: #c8dae6;
  font-size: 11px;
  line-height: 1.55;
}

.report-card {
  min-height: 0;
}

.report-preview {
  height: 100%;
  padding: 16px;
  overflow: hidden;
  border-radius: 12px;
  color: #203040;
  background: #edf4f8;
  box-shadow: inset 0 0 0 1px rgba(41, 72, 89, 0.12);
}

.report-preview header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding-bottom: 11px;
  border-bottom: 2px solid #2c6f92;
}

.report-preview h4 {
  margin: 0;
  color: #123b54;
  font-size: 15px;
}

.report-preview header span {
  color: #617a8a;
  font-size: 8px;
}

.report-section {
  margin-top: 13px;
}

.report-section strong {
  display: block;
  margin-bottom: 6px;
  color: #256281;
  font-size: 10px;
}

.report-section p,
.report-section li {
  margin: 0;
  color: #435a69;
  font-size: 9px;
  line-height: 1.55;
}

.report-section ul {
  margin: 0;
  padding-left: 16px;
}

.approval-card {
  padding: 15px 16px;
  border: 1px solid rgba(80, 216, 144, 0.25);
  border-radius: var(--r-lg);
  background: rgba(22, 64, 66, 0.52);
  box-shadow: var(--shadow);
}

.approval-steps {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 8px;
  margin-top: 13px;
}

.approval-step {
  padding: 11px 8px;
  border-radius: 10px;
  text-align: center;
  color: var(--muted);
  background: rgba(10, 38, 47, 0.65);
  font-size: 10px;
}

.approval-step strong {
  color: #dcebf3;
  font-size: 10px;
}

.approval-step.is-done {
  color: #a9f2cb;
  background: rgba(80, 216, 144, 0.13);
}

.approval-step.is-current {
  color: #ffe1a3;
  background: rgba(246, 196, 83, 0.13);
}

/* Prototype navigation */
.prototype-nav {
  position: fixed;
  z-index: 100;
  left: 50%;
  bottom: 20px;
  transform: translateX(-50%);
  display: flex;
  gap: 7px;
  padding: 8px;
  border: 1px solid rgba(109, 156, 184, 0.33);
  border-radius: 14px;
  background: rgba(3, 15, 23, 0.84);
  box-shadow: 0 16px 38px rgba(0, 0, 0, 0.34);
  backdrop-filter: blur(16px);
}

.prototype-nav button {
  padding: 10px 13px;
  border: 0;
  border-radius: 9px;
  color: #a8c0cf;
  background: transparent;
  cursor: pointer;
}

.prototype-nav button:hover,
.prototype-nav button.is-active {
  color: #ecf8ff;
  background: rgba(74, 163, 255, 0.18);
}

body.capture .prototype-nav {
  display: none;
}

body.capture * {
  animation: none !important;
  transition: none !important;
}

@media (max-width: 900px) {
  .prototype-nav {
    max-width: calc(100% - 24px);
    overflow-x: auto;
  }
}
