.top-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  background: #0d1b2a;
  border-bottom: 3px solid #e63946;
  padding: 10px 20px;
  height: 52px;
  flex-shrink: 0;
}

.top-left {
  display: flex;
  align-items: center;
  gap: 16px;
}

.back-link {
  color: #7fa8c9;
  text-decoration: none;
  font-size: 0.85rem;
}
.back-link:hover { color: #fff; }

.bar-title {
  font-size: 0.95rem;
  font-weight: 700;
  color: #fff;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.top-center {
  display: flex;
  align-items: center;
  gap: 10px;
}

.timer-label {
  font-size: 0.75rem;
  color: #7fa8c9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.timer-value {
  font-size: 1.4rem;
  font-weight: 800;
  color: #e63946;
  font-family: 'Courier New', monospace;
  letter-spacing: 2px;
  min-width: 70px;
}

.timer-btn {
  padding: 5px 12px;
  border: 1px solid #2a5f8f;
  border-radius: 4px;
  background: #1a2f4a;
  color: #c0d4e8;
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 600;
}
.timer-btn:hover { background: #1e3a5f; color: #fff; }
.timer-btn.start.running {
  background: #e63946;
  border-color: #e63946;
  color: #fff;
}

.score-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #0a0e1a;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 4px 10px;
  margin-left: 6px;
}

.score-label {
  font-size: 0.7rem;
  color: #5a8aaa;
  font-weight: 600;
  text-transform: uppercase;
}

.score-value {
  font-size: 1.2rem;
  font-weight: 800;
  font-family: 'Courier New', monospace;
}
.score-good { color: #2a9d8f; }
.score-warn { color: #f4a261; }
.score-bad { color: #e63946; }

.top-right {
  display: flex;
  align-items: center;
  gap: 12px;
}

.conn-status {
  font-size: 0.75rem;
  font-weight: 600;
  letter-spacing: 0.5px;
}
.conn-status.connected { color: #2a9d8f; }
.conn-status.disconnected { color: #e63946; }

.aar-btn {
  padding: 5px 12px;
  border: 1px solid #2a9d8f;
  border-radius: 4px;
  background: rgba(42, 157, 143, 0.15);
  color: #2a9d8f;
  font-size: 0.75rem;
  cursor: pointer;
  font-weight: 600;
}
.aar-btn:hover { background: #2a9d8f; color: #fff; }

.reset-scenario-btn {
  padding: 5px 12px;
  border: 1px solid #555;
  border-radius: 4px;
  background: #333;
  color: #aaa;
  font-size: 0.75rem;
  cursor: pointer;
}
.reset-scenario-btn:hover { background: #e63946; color: #fff; border-color: #e63946; }

.main-layout {
  display: flex;
  height: calc(100vh - 52px);
  overflow: hidden;
}

.left-controls {
  width: 280px;
  padding: 12px;
  overflow-y: auto;
  border-right: 2px solid #1e3a5f;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.control-section {
  background: #111827;
  border-radius: 8px;
  padding: 12px 14px;
  border: 1px solid #1e3a5f;
}

.control-section h3 {
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 1px;
  color: #7fa8c9;
  margin-bottom: 10px;
  padding-bottom: 6px;
  border-bottom: 1px solid #1e3a5f;
}

.control-section label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  color: #5a8aaa;
  font-weight: 600;
  margin-top: 6px;
  display: block;
}

.section-hint {
  font-size: 0.65rem;
  color: #4a7a9a;
  font-style: italic;
  margin-bottom: 6px;
}

.division-block {
  margin-top: 10px;
  padding: 8px 10px;
  background: #0a0e1a;
  border-radius: 6px;
  border: 1px solid #1e3a5f;
}

.division-header {
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 6px;
  padding-bottom: 4px;
  border-bottom: 1px solid #1e3a5f;
}
.division-header.fire-div { color: #e63946; border-bottom-color: #e63946; }
.division-header.hazmat-div { color: #f4a261; border-bottom-color: #f4a261; }
.division-header.rescue-div { color: #6495ed; border-bottom-color: #6495ed; }
.division-header.ems-div { color: #2a9d8f; border-bottom-color: #2a9d8f; }

.personnel-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
  min-height: 20px;
  margin-top: 3px;
}

.personnel-tag {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  background: #1a2f4a;
  border: 1px solid #2a5f8f;
  border-radius: 3px;
  padding: 2px 6px;
  font-size: 0.68rem;
  color: #c0d4e8;
}

.personnel-remove {
  background: none;
  border: none;
  color: #e63946;
  cursor: pointer;
  font-size: 0.7rem;
  padding: 0 2px;
  line-height: 1;
}
.personnel-remove:hover { color: #ff6b6b; }

.personnel-add-row {
  display: flex;
  gap: 4px;
  margin-top: 4px;
}
.personnel-add-row input {
  flex: 1;
  margin-top: 0 !important;
}
.personnel-add-row button {
  padding: 4px 8px;
  background: #1a2f4a;
  border: 1px solid #2a5f8f;
  border-radius: 4px;
  color: #c0d4e8;
  font-size: 0.7rem;
  cursor: pointer;
  white-space: nowrap;
}
.personnel-add-row button:hover { background: #1e3a5f; color: #fff; }

.control-section input,
.control-section textarea,
.control-section select {
  width: 100%;
  background: #0a0e1a;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 7px 10px;
  color: #e0e6f0;
  font-size: 0.82rem;
  font-family: inherit;
  margin-top: 3px;
  resize: vertical;
}

.control-section input:focus,
.control-section textarea:focus,
.control-section select:focus {
  outline: none;
  border-color: #7fa8c9;
}

.score-controls {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.score-current-display {
  text-align: center;
  font-size: 1rem;
  font-weight: 700;
  color: #e0e6f0;
  padding: 6px;
  background: #0a0e1a;
  border-radius: 4px;
  border: 1px solid #1e3a5f;
}

.score-adjust-row {
  display: flex;
  gap: 4px;
}

.score-btn {
  flex: 1;
  padding: 6px;
  border-radius: 4px;
  font-size: 0.75rem;
  font-weight: 700;
  cursor: pointer;
  border: 1px solid;
}
.score-minus {
  background: rgba(230, 57, 70, 0.15);
  border-color: #e63946;
  color: #e63946;
}
.score-minus:hover { background: rgba(230, 57, 70, 0.3); }
.score-plus {
  background: rgba(42, 157, 143, 0.15);
  border-color: #2a9d8f;
  color: #2a9d8f;
}
.score-plus:hover { background: rgba(42, 157, 143, 0.3); }

.score-custom-row {
  display: flex;
  gap: 4px;
}
.score-custom-row input[type="number"] {
  width: 60px;
  flex-shrink: 0;
  margin-top: 0;
}
.score-custom-row input[type="text"] {
  flex: 1;
  margin-top: 0;
}
.score-custom-row button {
  padding: 6px 10px;
  background: #1a2f4a;
  border: 1px solid #2a5f8f;
  border-radius: 4px;
  color: #c0d4e8;
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}
.score-custom-row button:hover { background: #1e3a5f; color: #fff; }

.score-reset-btn {
  width: 100%;
  padding: 4px;
  background: transparent;
  border: 1px solid #333;
  border-radius: 4px;
  color: #666;
  font-size: 0.68rem;
  cursor: pointer;
}
.score-reset-btn:hover { color: #e63946; border-color: #e63946; }

.score-log {
  max-height: 140px;
  overflow-y: auto;
  margin-top: 4px;
}

.score-log-entry {
  display: flex;
  gap: 4px;
  align-items: baseline;
  padding: 3px 6px;
  border-radius: 3px;
  font-size: 0.68rem;
  margin-bottom: 2px;
}
.score-log-entry.deduction {
  background: rgba(230, 57, 70, 0.08);
  color: #e63946;
}
.score-log-entry.addition {
  background: rgba(42, 157, 143, 0.08);
  color: #2a9d8f;
}
.score-log-entry.neutral {
  background: rgba(127, 168, 201, 0.08);
  color: #7fa8c9;
}
.sle-time { color: #5a8aaa; font-size: 0.6rem; }
.sle-amount { font-weight: 800; min-width: 28px; }
.sle-reason { flex: 1; color: #8aa; }
.sle-total { color: #7fa8c9; font-weight: 600; }

.wind-control {
  display: flex;
  gap: 12px;
  align-items: flex-start;
}

.wind-compass-small {
  width: 70px;
  height: 70px;
  border-radius: 50%;
  border: 2px solid #2a5f8f;
  position: relative;
  flex-shrink: 0;
  background: #0a0e1a;
}

.compass-labels span {
  position: absolute;
  font-size: 0.55rem;
  font-weight: 700;
  color: #5a8aaa;
}
.cl-n { top: 2px; left: 50%; transform: translateX(-50%); }
.cl-s { bottom: 2px; left: 50%; transform: translateX(-50%); }
.cl-e { right: 4px; top: 50%; transform: translateY(-50%); }
.cl-w { left: 4px; top: 50%; transform: translateY(-50%); }

.compass-arrow {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 2px;
  height: 24px;
  background: #e63946;
  transform-origin: 50% 0%;
  transform: rotate(0deg);
  margin-left: -1px;
  margin-top: 0;
  transition: transform 0.5s ease;
}
.compass-arrow::after {
  content: '';
  position: absolute;
  top: -6px;
  left: -4px;
  border-left: 5px solid transparent;
  border-right: 5px solid transparent;
  border-bottom: 8px solid #e63946;
}

.wind-inputs {
  flex: 1;
}

.wind-inputs label {
  margin-top: 4px;
}

.wind-inputs select,
.wind-inputs input {
  margin-top: 2px;
}

.scene-btn-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 4px;
  margin-top: 6px;
}

.scene-btn-grid button {
  padding: 6px 8px;
  background: #0a0e1a;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  color: #7fa8c9;
  font-size: 0.7rem;
  cursor: pointer;
  text-align: center;
  transition: all 0.15s;
}
.scene-btn-grid button:hover {
  background: #1a2f4a;
  border-color: #2a5f8f;
  color: #fff;
}

.hazard-btns .haz-fire { border-color: #e63946; color: #e63946; }
.hazard-btns .haz-fire:hover { background: rgba(230, 57, 70, 0.15); }
.hazard-btns .haz-smoke { border-color: #888; color: #aaa; }
.hazard-btns .haz-smoke:hover { background: rgba(136, 136, 136, 0.15); }
.hazard-btns .haz-vapor { border-color: #9b59b6; color: #9b59b6; }
.hazard-btns .haz-vapor:hover { background: rgba(155, 89, 182, 0.15); }
.hazard-btns .haz-spill { border-color: #f4a261; color: #f4a261; }
.hazard-btns .haz-spill:hover { background: rgba(244, 162, 97, 0.15); }
.hazard-btns .haz-leak { border-color: #f39c12; color: #f39c12; }
.hazard-btns .haz-leak:hover { background: rgba(243, 156, 18, 0.15); }
.hazard-btns .haz-explosion { border-color: #ff4444; color: #ff4444; }
.hazard-btns .haz-explosion:hover { background: rgba(255, 68, 68, 0.15); }
.hazard-btns .haz-radiation { border-color: #e74c3c; color: #e74c3c; }
.hazard-btns .haz-radiation:hover { background: rgba(231, 76, 60, 0.15); }
.hazard-btns .haz-zone { border-color: #3498db; color: #3498db; }
.hazard-btns .haz-zone:hover { background: rgba(52, 152, 219, 0.15); }

.custom-scene-row {
  display: flex;
  gap: 4px;
  margin-top: 6px;
}
.custom-scene-row input {
  flex: 1;
  margin-top: 0;
}
.custom-scene-row button {
  padding: 6px 10px;
  background: #1a2f4a;
  border: 1px solid #2a5f8f;
  border-radius: 4px;
  color: #c0d4e8;
  font-size: 0.75rem;
  cursor: pointer;
  white-space: nowrap;
}
.custom-scene-row button:hover { background: #1e3a5f; color: #fff; }

.clear-scene-btn {
  width: 100%;
  padding: 5px;
  background: transparent;
  border: 1px solid #333;
  border-radius: 4px;
  color: #666;
  font-size: 0.7rem;
  cursor: pointer;
  margin-top: 8px;
}
.clear-scene-btn:hover { color: #e63946; border-color: #e63946; }

.center-board {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
}

.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 8px 14px;
  background: #111827;
  border-bottom: 1px solid #1e3a5f;
  flex-shrink: 0;
}

.board-label {
  font-size: 0.8rem;
  font-weight: 700;
  color: #7fa8c9;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.wind-indicator-bar {
  display: flex;
  align-items: center;
  gap: 6px;
  background: #0a0e1a;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 4px 10px;
  font-size: 0.75rem;
  color: #7fa8c9;
}

.wind-bar-arrow {
  display: inline-block;
  font-size: 1rem;
  color: #e63946;
  transition: transform 0.5s ease;
}

.add-unit-group {
  display: flex;
  gap: 6px;
  align-items: center;
}

.add-unit-group input {
  width: 120px;
  background: #0a0e1a;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 5px 8px;
  color: #e0e6f0;
  font-size: 0.78rem;
}

.add-unit-group select {
  background: #0a0e1a;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 5px 6px;
  color: #e0e6f0;
  font-size: 0.78rem;
}

.add-unit-group button {
  background: #1a2f4a;
  border: 1px solid #2a5f8f;
  border-radius: 4px;
  padding: 5px 10px;
  color: #c0d4e8;
  font-size: 0.78rem;
  cursor: pointer;
  white-space: nowrap;
}
.add-unit-group button:hover { background: #1e3a5f; color: #fff; }

.board-area {
  flex: 1;
  position: relative;
  background:
    linear-gradient(rgba(30, 58, 95, 0.15) 1px, transparent 1px),
    linear-gradient(90deg, rgba(30, 58, 95, 0.15) 1px, transparent 1px);
  background-size: 40px 40px;
  overflow: auto;
  min-height: 0;
}

.bottom-tabs-panel {
  height: 260px;
  flex-shrink: 0;
  display: flex;
  flex-direction: column;
  border-top: 2px solid #1e3a5f;
  background: #0d1b2a;
}

.bottom-tabs-bar {
  display: flex;
  gap: 0;
  flex-shrink: 0;
  background: #111827;
  border-bottom: 1px solid #1e3a5f;
}

.bottom-tab {
  padding: 7px 16px;
  background: transparent;
  border: none;
  border-bottom: 2px solid transparent;
  color: #5a8aaa;
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 1px;
  cursor: pointer;
  transition: all 0.15s;
}
.bottom-tab:hover {
  color: #c0d4e8;
  background: rgba(30, 58, 95, 0.3);
}
.bottom-tab.active {
  color: #e63946;
  border-bottom-color: #e63946;
  background: rgba(230, 57, 70, 0.05);
}

.bottom-tab-content {
  display: none;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.bottom-tab-content.active {
  display: flex;
}

.bottom-tab-body {
  flex: 1;
  display: flex;
  flex-direction: column;
  padding: 8px 14px;
  overflow-y: auto;
  gap: 6px;
  min-height: 0;
}

.event-presets-row {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.event-presets-row button {
  padding: 5px 10px;
  background: #0a0e1a;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  color: #7fa8c9;
  font-size: 0.7rem;
  cursor: pointer;
  transition: all 0.15s;
}
.event-presets-row button:hover {
  background: #1a2f4a;
  border-color: #2a5f8f;
  color: #fff;
}
.event-presets-row .ev-escalation { border-color: #e63946; color: #e63946; }
.event-presets-row .ev-escalation:hover { background: rgba(230, 57, 70, 0.15); }
.event-presets-row .ev-env { border-color: #f4a261; color: #f4a261; }
.event-presets-row .ev-env:hover { background: rgba(244, 162, 97, 0.15); }
.event-presets-row .ev-update { border-color: #2a9d8f; color: #2a9d8f; }
.event-presets-row .ev-update:hover { background: rgba(42, 157, 143, 0.15); }

.radio-btn-row {
  display: flex;
  gap: 6px;
}

.wind-compass-overlay {
  position: absolute;
  top: 10px;
  right: 10px;
  z-index: 50;
  text-align: center;
  pointer-events: none;
}

.compass-ring {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  border: 2px solid rgba(30, 58, 95, 0.6);
  background: rgba(10, 14, 26, 0.8);
  position: relative;
}

.compass-ring .compass-n,
.compass-ring .compass-e,
.compass-ring .compass-s,
.compass-ring .compass-w {
  position: absolute;
  font-size: 0.6rem;
  font-weight: 700;
  color: #5a8aaa;
}
.compass-n { top: 4px; left: 50%; transform: translateX(-50%); }
.compass-s { bottom: 4px; left: 50%; transform: translateX(-50%); }
.compass-e { right: 6px; top: 50%; transform: translateY(-50%); }
.compass-w { left: 6px; top: 50%; transform: translateY(-50%); }

.compass-arrow-large {
  position: absolute;
  top: 50%;
  left: 50%;
  width: 3px;
  height: 28px;
  background: #e63946;
  transform-origin: 50% 0%;
  margin-left: -1.5px;
  transition: transform 0.5s ease;
}
.compass-arrow-large::after {
  content: '';
  position: absolute;
  top: -7px;
  left: -5px;
  border-left: 6px solid transparent;
  border-right: 6px solid transparent;
  border-bottom: 9px solid #e63946;
}

.compass-speed {
  font-size: 0.65rem;
  color: #7fa8c9;
  margin-top: 4px;
  font-weight: 600;
}

.scene-obj {
  position: absolute;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.65rem;
  font-weight: 600;
  text-align: center;
  cursor: grab;
  user-select: none;
  z-index: 5;
  border: 1px solid;
  white-space: nowrap;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 1px;
  transform-origin: center center;
}
.scene-obj:active { cursor: grabbing; }

.scene-icon {
  font-size: 1rem;
  line-height: 1;
}
.scene-label {
  font-size: 0.6rem;
  line-height: 1.1;
}

.scene-tank, .scene-tank-small {
  background: rgba(100, 140, 180, 0.2);
  border-color: #648cb4;
  color: #8ab4d4;
}
.scene-pump {
  background: rgba(120, 160, 100, 0.2);
  border-color: #78a064;
  color: #98c084;
}
.scene-pipe {
  background: rgba(140, 140, 140, 0.15);
  border-color: #888;
  color: #aaa;
  min-width: 80px;
}
.scene-valve {
  background: rgba(200, 180, 60, 0.15);
  border-color: #c8b43c;
  color: #d4c854;
}
.scene-building, .scene-control-room {
  background: rgba(100, 120, 160, 0.2);
  border-color: #6478a0;
  color: #8498c0;
}
.scene-cooling-tower {
  background: rgba(80, 160, 200, 0.15);
  border-color: #50a0c8;
  color: #70c0e8;
}
.scene-flare {
  background: rgba(240, 160, 40, 0.15);
  border-color: #f0a028;
  color: #f0b040;
}
.scene-reactor {
  background: rgba(180, 100, 200, 0.15);
  border-color: #b464c8;
  color: #c880d8;
}
.scene-column {
  background: rgba(160, 140, 200, 0.15);
  border-color: #a08cc8;
  color: #b8a0d8;
}
.scene-loading-rack {
  background: rgba(140, 120, 100, 0.2);
  border-color: #8c7864;
  color: #b09880;
}
.scene-road {
  background: rgba(80, 80, 80, 0.3);
  border-color: #555;
  color: #999;
  min-width: 80px;
  border-style: dashed;
}
.scene-fence {
  background: rgba(60, 60, 60, 0.2);
  border-color: #444;
  color: #888;
  min-width: 80px;
  border-style: dotted;
}
.scene-gate {
  background: rgba(60, 100, 60, 0.2);
  border-color: #3c643c;
  color: #68a068;
}
.scene-dike {
  background: rgba(100, 80, 60, 0.2);
  border-color: #64503c;
  color: #a08060;
  min-width: 80px;
  border-style: double;
  border-width: 3px;
}
.scene-custom {
  background: rgba(160, 160, 160, 0.15);
  border-color: #aaa;
  color: #ccc;
}

.hazard-marker {
  position: absolute;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.7rem;
  font-weight: 800;
  text-align: center;
  cursor: grab;
  user-select: none;
  z-index: 15;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}
.hazard-marker:active { cursor: grabbing; }

.hazard-fire {
  background: rgba(230, 57, 70, 0.3);
  border: 2px solid #e63946;
  color: #ff6b6b;
  box-shadow: 0 0 12px rgba(230, 57, 70, 0.5);
  animation: hazardPulse 1.5s infinite;
}
.hazard-smoke {
  background: rgba(120, 120, 120, 0.3);
  border: 2px solid #888;
  color: #bbb;
  box-shadow: 0 0 10px rgba(120, 120, 120, 0.4);
}
.hazard-vapor {
  background: rgba(155, 89, 182, 0.25);
  border: 2px solid #9b59b6;
  color: #c39bd3;
  box-shadow: 0 0 12px rgba(155, 89, 182, 0.4);
  animation: hazardPulse 2s infinite;
}
.hazard-spill {
  background: rgba(244, 162, 97, 0.25);
  border: 2px solid #f4a261;
  color: #f4a261;
  box-shadow: 0 0 10px rgba(244, 162, 97, 0.4);
}
.hazard-leak {
  background: rgba(243, 156, 18, 0.25);
  border: 2px solid #f39c12;
  color: #f5b041;
  box-shadow: 0 0 10px rgba(243, 156, 18, 0.4);
  animation: hazardPulse 2s infinite;
}
.hazard-explosion {
  background: rgba(255, 68, 68, 0.3);
  border: 2px solid #ff4444;
  color: #ff6666;
  box-shadow: 0 0 20px rgba(255, 68, 68, 0.6);
  animation: hazardPulse 1s infinite;
}
.hazard-radiation {
  background: rgba(231, 76, 60, 0.25);
  border: 2px solid #e74c3c;
  color: #ec7063;
  box-shadow: 0 0 12px rgba(231, 76, 60, 0.5);
  animation: hazardPulse 1.5s infinite;
}
.hazard-hot-zone {
  background: rgba(230, 57, 70, 0.12);
  border: 2px dashed #e63946;
  color: #e63946;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
}
.hazard-warm-zone {
  background: rgba(244, 162, 97, 0.08);
  border: 2px dashed #f4a261;
  color: #f4a261;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
}
.hazard-cold-zone {
  background: rgba(42, 157, 143, 0.08);
  border: 2px dashed #2a9d8f;
  color: #2a9d8f;
  border-radius: 50%;
  width: 120px;
  height: 120px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
}

@keyframes hazardPulse {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.6; }
}

.plume-cone {
  position: absolute;
  z-index: 12;
  cursor: grab;
  user-select: none;
}
.plume-cone:active { cursor: grabbing; }

.plume-origin {
  width: 12px;
  height: 12px;
  border-radius: 50%;
  background: #e63946;
  border: 2px solid #fff;
  position: absolute;
  top: -6px;
  left: -6px;
  z-index: 14;
}

.plume-shape {
  position: absolute;
  top: 0;
  left: 0;
  transform-origin: 0 0;
  clip-path: polygon(50% 0%, 0% 100%, 100% 100%);
  transition: transform 0.5s ease;
}

.plume-gas .plume-shape {
  background: linear-gradient(180deg, rgba(155, 89, 182, 0.85) 0%, rgba(155, 89, 182, 0.15) 100%);
}
.plume-smoke .plume-shape {
  background: linear-gradient(180deg, rgba(120, 120, 120, 0.85) 0%, rgba(120, 120, 120, 0.15) 100%);
}
.plume-thermal .plume-shape {
  background: linear-gradient(180deg, rgba(230, 57, 70, 0.8) 0%, rgba(244, 162, 97, 0.15) 100%);
}
.plume-chemical .plume-shape {
  background: linear-gradient(180deg, rgba(244, 162, 97, 0.85) 0%, rgba(244, 162, 97, 0.15) 100%);
}

.plume-label {
  position: absolute;
  top: -20px;
  left: 10px;
  font-size: 0.6rem;
  font-weight: 700;
  color: #c39bd3;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
}

.plume-thermal .plume-label { color: #e63946; }
.plume-smoke .plume-label { color: #aaa; }
.plume-chemical .plume-label { color: #f4a261; }

.context-menu {
  position: fixed;
  z-index: 1000;
  background: #1a2f4a;
  border: 1px solid #2a5f8f;
  border-radius: 6px;
  padding: 4px 0;
  box-shadow: 0 4px 12px rgba(0,0,0,0.4);
  min-width: 160px;
}

.context-menu button {
  display: block;
  width: 100%;
  padding: 7px 14px;
  background: none;
  border: none;
  color: #c0d4e8;
  font-size: 0.78rem;
  cursor: pointer;
  text-align: left;
}
.context-menu button:hover {
  background: #2a5f8f;
  color: #fff;
}
.context-menu .ctx-delete {
  color: #e63946;
  border-top: 1px solid #1e3a5f;
  margin-top: 2px;
}
.context-menu .ctx-delete:hover {
  background: #e63946;
  color: #fff;
}

.obj-remove {
  position: absolute;
  top: -6px;
  right: -6px;
  width: 16px;
  height: 16px;
  background: #e63946;
  color: #fff;
  border: none;
  border-radius: 50%;
  font-size: 0.6rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  line-height: 1;
  z-index: 200;
}
.scene-obj:hover .obj-remove,
.hazard-marker:hover .obj-remove,
.unit-token:hover .obj-remove { display: flex; }

.unit-token {
  position: absolute;
  min-width: 70px;
  padding: 6px 10px;
  border-radius: 6px;
  font-size: 0.72rem;
  font-weight: 700;
  text-align: center;
  cursor: grab;
  user-select: none;
  z-index: 20;
  border: 2px solid;
  text-transform: uppercase;
  letter-spacing: 0.5px;
  white-space: nowrap;
  transition: box-shadow 0.2s;
}
.unit-token:active { cursor: grabbing; z-index: 100; }

.unit-token.fire {
  background: rgba(230, 57, 70, 0.2);
  border-color: #e63946;
  color: #e63946;
}
.unit-token.hazmat {
  background: rgba(244, 162, 97, 0.2);
  border-color: #f4a261;
  color: #f4a261;
}
.unit-token.ems {
  background: rgba(42, 157, 143, 0.2);
  border-color: #2a9d8f;
  color: #2a9d8f;
}
.unit-token.command {
  background: rgba(255, 215, 0, 0.15);
  border-color: #ffd700;
  color: #ffd700;
}
.unit-token.police {
  background: rgba(100, 149, 237, 0.2);
  border-color: #6495ed;
  color: #6495ed;
}
.unit-token.other {
  background: rgba(200, 200, 200, 0.15);
  border-color: #aaa;
  color: #ccc;
}

.radio-feed {
  flex: 1;
  display: flex;
  flex-direction: column;
  gap: 6px;
  overflow-y: auto;
  margin-bottom: 10px;
  min-height: 40px;
}

.radio-msg {
  font-size: 0.8rem;
  padding: 7px 10px;
  border-radius: 5px;
  line-height: 1.4;
  animation: fadeIn 0.3s ease;
}

.radio-msg .radio-time {
  font-size: 0.65rem;
  color: #5a8aaa;
  margin-right: 6px;
}

.radio-msg .radio-sender {
  font-weight: 700;
  margin-right: 4px;
}

.radio-msg.incoming {
  background: rgba(30, 58, 95, 0.5);
  border-left: 3px solid #7fa8c9;
  color: #c0d4e8;
}

.radio-msg.outgoing {
  background: rgba(42, 157, 143, 0.15);
  border-left: 3px solid #2a9d8f;
  color: #2a9d8f;
}

.radio-msg.alert {
  background: rgba(230, 57, 70, 0.1);
  border-left: 3px solid #e63946;
  color: #e63946;
}

.radio-msg.update {
  background: rgba(244, 162, 97, 0.1);
  border-left: 3px solid #f4a261;
  color: #f4a261;
}

@keyframes fadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to { opacity: 1; transform: translateY(0); }
}

.radio-input-group {
  display: flex;
  gap: 5px;
  align-items: flex-end;
  flex-shrink: 0;
}

.radio-input-group select,
.radio-input-group input {
  background: #0a0e1a;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 6px 8px;
  color: #e0e6f0;
  font-size: 0.8rem;
  font-family: inherit;
}

.radio-input-group select {
  width: 130px;
  flex-shrink: 0;
}

.radio-input-group input {
  width: 100px;
  flex-shrink: 0;
}

.radio-input-group textarea {
  flex: 1;
  min-width: 150px;
  background: #0a0e1a;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  padding: 6px 8px;
  color: #e0e6f0;
  font-size: 0.8rem;
  font-family: inherit;
  resize: vertical;
}

.send-radio-btn {
  padding: 8px;
  background: #1a2f4a;
  border: 1px solid #2a5f8f;
  border-radius: 4px;
  color: #c0d4e8;
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
}
.send-radio-btn:hover { background: #2a9d8f; color: #fff; border-color: #2a9d8f; }

.clear-radio-btn {
  padding: 5px;
  background: transparent;
  border: 1px solid #333;
  border-radius: 4px;
  color: #666;
  font-size: 0.72rem;
  cursor: pointer;
}
.clear-radio-btn:hover { color: #e63946; border-color: #e63946; }

.quick-radio-grid {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.quick-radio-grid button {
  width: 100%;
  padding: 7px 10px;
  background: #0a0e1a;
  border: 1px solid #1e3a5f;
  border-radius: 4px;
  color: #7fa8c9;
  font-size: 0.75rem;
  cursor: pointer;
  text-align: left;
  transition: all 0.15s;
}
.quick-radio-grid button:hover {
  background: #1a2f4a;
  border-color: #2a5f8f;
  color: #fff;
}

.incident-log {
  flex: 1;
  overflow-y: auto;
  margin-top: 6px;
}

.log-entry {
  padding: 4px 8px;
  border-radius: 3px;
  font-size: 0.7rem;
  margin-bottom: 2px;
  line-height: 1.4;
  animation: fadeIn 0.3s ease;
}

.log-time {
  font-size: 0.6rem;
  color: #5a8aaa;
  margin-right: 4px;
}

.log-escalation {
  background: rgba(230, 57, 70, 0.1);
  color: #e63946;
  border-left: 2px solid #e63946;
}

.log-environmental {
  background: rgba(244, 162, 97, 0.1);
  color: #f4a261;
  border-left: 2px solid #f4a261;
}

.log-update {
  background: rgba(42, 157, 143, 0.08);
  color: #2a9d8f;
  border-left: 2px solid #2a9d8f;
}

.log-custom {
  background: rgba(127, 168, 201, 0.08);
  color: #c0d4e8;
  border-left: 2px solid #7fa8c9;
}

.log-level {
  background: rgba(255, 215, 0, 0.08);
  color: #ffd700;
  border-left: 2px solid #ffd700;
}

.log-evacuation {
  background: rgba(230, 57, 70, 0.08);
  color: #ff6b6b;
  border-left: 2px solid #e63946;
}

.log-tactical {
  background: rgba(100, 149, 237, 0.08);
  color: #6495ed;
  border-left: 2px solid #6495ed;
}

.log-decision {
  background: rgba(127, 168, 201, 0.08);
  color: #c0d4e8;
  border-left: 2px solid #7fa8c9;
}

.log-event {
  background: rgba(127, 168, 201, 0.08);
  color: #c0d4e8;
  border-left: 2px solid #7fa8c9;
}

.scenario-save-load {
  margin-top: 10px;
  border-top: 1px solid rgba(127, 168, 201, 0.15);
  padding-top: 10px;
}

.save-scenario-btn {
  width: 100%;
  padding: 8px;
  background: #1b4332;
  color: #52b788;
  border: 1px solid #52b788;
  border-radius: 4px;
  font-weight: 700;
  font-size: 0.8rem;
  cursor: pointer;
  text-transform: uppercase;
  letter-spacing: 1px;
  margin-bottom: 8px;
}
.save-scenario-btn:hover {
  background: #2d6a4f;
}

.saved-scenario-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  max-height: 150px;
  overflow-y: auto;
}

.saved-scenario-row {
  display: flex;
  gap: 4px;
}

.saved-scenario-load {
  flex: 1;
  padding: 5px 8px;
  background: rgba(127, 168, 201, 0.1);
  color: #c0d4e8;
  border: 1px solid rgba(127, 168, 201, 0.2);
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.75rem;
  text-align: left;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.saved-scenario-load:hover {
  background: rgba(127, 168, 201, 0.25);
  border-color: #7fa8c9;
}

.saved-scenario-delete {
  padding: 5px 8px;
  background: rgba(230, 57, 70, 0.15);
  color: #e63946;
  border: 1px solid rgba(230, 57, 70, 0.3);
  border-radius: 3px;
  cursor: pointer;
  font-size: 0.8rem;
  font-weight: 700;
}
.saved-scenario-delete:hover {
  background: rgba(230, 57, 70, 0.35);
}

.no-saved {
  font-size: 0.7rem;
  color: #5a7a94;
  font-style: italic;
}

.benchmark-toggle-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}

.toggle-label {
  font-size: 0.72rem;
  color: #c0d4e8;
  font-weight: 600;
}

.toggle-switch {
  position: relative;
  display: inline-block;
  width: 40px;
  height: 20px;
}

.toggle-switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.toggle-slider {
  position: absolute;
  cursor: pointer;
  top: 0;
  left: 0;
  right: 0;
  bottom: 0;
  background: #333;
  border-radius: 20px;
  transition: 0.3s;
}

.toggle-slider::before {
  content: '';
  position: absolute;
  height: 14px;
  width: 14px;
  left: 3px;
  bottom: 3px;
  background: #888;
  border-radius: 50%;
  transition: 0.3s;
}

.toggle-switch input:checked + .toggle-slider {
  background: #2a9d8f;
}

.toggle-switch input:checked + .toggle-slider::before {
  transform: translateX(20px);
  background: #fff;
}

.benchmarks-list {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.benchmark-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 4px 8px;
  border-radius: 4px;
  font-size: 0.68rem;
}

.benchmark-name {
  font-weight: 600;
}

.benchmark-status {
  font-weight: 700;
  white-space: nowrap;
}

.benchmark-pending {
  background: rgba(127, 168, 201, 0.08);
  color: #7fa8c9;
}

.benchmark-urgent {
  background: rgba(244, 162, 97, 0.12);
  color: #f4a261;
  animation: hazardPulse 1.5s infinite;
}

.benchmark-completed {
  background: rgba(42, 157, 143, 0.1);
  color: #2a9d8f;
}

.benchmark-failed {
  background: rgba(230, 57, 70, 0.1);
  color: #e63946;
}

.benchmark-time-edit {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  margin: 0 6px;
}

.benchmark-time-input {
  width: 38px;
  background: #0a0e1a;
  border: 1px solid #1e3a5f;
  color: #e0e6f0;
  border-radius: 3px;
  padding: 1px 3px;
  font-size: 0.65rem;
  text-align: center;
}

.benchmark-time-input:focus {
  border-color: #2a9d8f;
  outline: none;
}

.benchmark-time-unit {
  color: #556677;
  font-size: 0.6rem;
}

.benchmark-time-fixed {
  color: #556677;
  font-size: 0.6rem;
}
