* {
  margin: 0;
  padding: 0;
  box-sizing: border-box;
}
body {
  font-family: Arial, sans-serif;
  overflow: hidden;
}
#map {
  height: calc(100vh - 60px);
  width: 100%;
}

.metrics-bar {
  position: fixed;
  bottom: 0;
  left: 0;
  right: 0;
  background: linear-gradient(
    to bottom,
    rgba(0, 0, 0, 0.9),
    rgba(0, 0, 0, 0.95)
  );
  padding: 10px 20px;
  display: flex;
  justify-content: space-around;
  z-index: 1000;
  color: white;
  height: 60px;
  align-items: center;
}

.metric {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
}

.metric-label {
  font-size: 10px;
  opacity: 0.7;
  text-transform: uppercase;
  letter-spacing: 1px;
}

.metric-value {
  font-size: 20px;
  font-weight: bold;
}

.controls {
  position: absolute;
  top: 15px;
  left: 50%;
  transform: translateX(-50%);
  z-index: 1000;
  background: rgba(0, 0, 0, 0.85);
  padding: 8px 18px;
  border-radius: 30px;
  display: flex;
  gap: 10px;
}

.btn {
  background: none;
  border: 2px solid white;
  color: white;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  cursor: pointer;
  transition: all 0.2s;
  font-size: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.btn:hover {
  background: white;
  color: black;
  transform: scale(1.1);
}

.btn.active {
  background: #4caf50;
  border-color: #4caf50;
}

/* Street Management Panel */
.street-panel {
  position: absolute;
  top: 70px;
  right: 15px;
  z-index: 1000;
  background: rgba(0, 0, 0, 0.9);
  border-radius: 12px;
  padding: 15px;
  width: 320px;
  max-height: calc(100vh - 150px);
  overflow-y: auto;
  color: white;
  border: 2px solid rgba(255, 255, 255, 0.1);
}

.street-panel h3 {
  margin: 0 0 15px 0;
  font-size: 18px;
  display: flex;
  align-items: center;
  gap: 8px;
  border-bottom: 2px solid rgba(255, 255, 255, 0.2);
  padding-bottom: 10px;
}

.street-section {
  margin-bottom: 15px;
}

.street-section label {
  display: block;
  font-size: 12px;
  margin-bottom: 5px;
  color: rgba(255, 255, 255, 0.7);
  text-transform: uppercase;
  letter-spacing: 1px;
}

#streetSelect {
  width: 100%;
  padding: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  color: white;
  font-size: 13px;
  cursor: pointer;
  max-height: 150px;
}

#streetSelect option {
  background: #1a1a1a;
  padding: 5px;
}

#streetSearch {
  width: 100%;
  padding: 8px;
  background: rgba(255, 255, 255, 0.1);
  border: 1px solid rgba(255, 255, 255, 0.3);
  border-radius: 6px;
  color: white;
  font-size: 13px;
  margin-bottom: 10px;
}

#streetSearch::placeholder {
  color: rgba(255, 255, 255, 0.5);
}

.action-buttons {
  display: flex;
  gap: 8px;
  margin-top: 10px;
}

.action-btn {
  flex: 1;
  padding: 10px;
  border: none;
  border-radius: 6px;
  cursor: pointer;
  font-weight: bold;
  font-size: 13px;
  transition: all 0.2s;
}

.action-btn.close {
  background: #f44336;
  color: white;
}

.action-btn.close:hover {
  background: #d32f2f;
}

.action-btn.open {
  background: #4caf50;
  color: white;
}

.action-btn.open:hover {
  background: #388e3c;
}

.action-btn:disabled {
  background: #555;
  cursor: not-allowed;
  opacity: 0.5;
}

.closed-list {
  margin-top: 15px;
  border-top: 2px solid rgba(255, 255, 255, 0.2);
  padding-top: 15px;
}

.closed-list h4 {
  font-size: 14px;
  margin-bottom: 10px;
  color: #f44336;
}

.closed-item {
  background: rgba(244, 67, 54, 0.2);
  border: 1px solid rgba(244, 67, 54, 0.4);
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 8px;
  display: flex;
  justify-content: space-between;
  align-items: center;
}

.closed-item span {
  font-size: 12px;
  font-family: monospace;
}

.closed-item button {
  background: #4caf50;
  border: none;
  color: white;
  padding: 4px 10px;
  border-radius: 4px;
  cursor: pointer;
  font-size: 11px;
  transition: all 0.2s;
}

.closed-item button:hover {
  background: #388e3c;
}

.status-message {
  margin-top: 10px;
  padding: 8px;
  border-radius: 6px;
  font-size: 12px;
  display: none;
}

.status-message.success {
  background: rgba(76, 175, 80, 0.3);
  border: 1px solid #4caf50;
  color: #4caf50;
}

.status-message.error {
  background: rgba(244, 67, 54, 0.3);
  border: 1px solid #f44336;
  color: #f44336;
}

.street-count {
  font-size: 11px;
  color: rgba(255, 255, 255, 0.6);
  margin-top: 5px;
}

.traffic-light-line {
  width: 30px;
  height: 4px;
  border-radius: 2px;
  box-shadow: 0 0 10px currentColor;
}
/* ================= MODE SWITCH ================= */

.mode-switch {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 6px 14px;
  background: rgba(255, 255, 255, 0.08);
  border-radius: 30px;
  cursor: pointer;
  user-select: none;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.1);
}

.mode-label {
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.6px;
  opacity: 0.5;
  transition: opacity 0.3s, color 0.3s;
}

.switch-track {
  width: 54px;
  height: 26px;
  background: #333;
  border-radius: 20px;
  position: relative;
  transition: background 0.3s;
}

.switch-thumb {
  width: 22px;
  height: 22px;
  background: white;
  border-radius: 50%;
  position: absolute;
  top: 2px;
  left: 2px;
  transition: transform 0.3s ease;
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.4);
}

/* VEGHA (default) */
.mode-vegha .switch-track {
  background: linear-gradient(135deg, #38ef7d, #11998e);
}

.mode-vegha #modeVegha {
  opacity: 1;
  color: #38ef7d;
}

/* FIXED */
.mode-fixed .switch-track {
  background: linear-gradient(135deg, #f7971e, #ffd200);
}

.mode-fixed .switch-thumb {
  transform: translateX(28px);
}

.mode-fixed #modeFixed {
  opacity: 1;
  color: #ffd200;
}
