* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; font-family: system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; }
#app { display: flex; height: 100vh; width: 100vw; }
#sidebar {
  width: 320px;
  min-width: 320px;
  overflow-y: auto;
  background: #14161a;
  color: #e6e6e6;
  padding: 12px;
  border-right: 1px solid #2a2d33;
}
#map { flex: 1; height: 100%; }

h1 { font-size: 18px; margin: 4px 0 12px; }
h2 { font-size: 13px; text-transform: uppercase; letter-spacing: 0.04em; color: #9aa0a8; margin: 0 0 8px; }

.panel {
  background: #1b1e24;
  border: 1px solid #2a2d33;
  border-radius: 8px;
  padding: 10px;
  margin-bottom: 10px;
}

label { display: block; font-size: 12px; color: #b5bac1; margin: 6px 0 2px; }

select, input[type="text"], input[type="number"] {
  width: 100%;
  padding: 6px 8px;
  border-radius: 6px;
  border: 1px solid #383c44;
  background: #0f1114;
  color: #e6e6e6;
  font-size: 13px;
  margin-bottom: 6px;
}

input[type="range"] { width: 100%; }

button {
  background: #2f6fed;
  color: white;
  border: none;
  border-radius: 6px;
  padding: 7px 10px;
  font-size: 13px;
  cursor: pointer;
  margin: 2px 2px 2px 0;
}
button:hover { background: #4a82f0; }
button:disabled { background: #383c44; cursor: not-allowed; }
button.secondary { background: #383c44; }
button.secondary:hover { background: #464b54; }

#areaNameRow { display: flex; gap: 6px; }
#areaNameRow input { flex: 1; margin-bottom: 0; }

.hidden { display: none !important; }

.mode-buttons { display: flex; flex-wrap: wrap; gap: 6px; }
.mode-btn { background: #383c44; flex: 1 1 45%; }
.mode-btn.active { background: #2f6fed; }

.status { font-size: 12px; color: #9aa0a8; margin-top: 6px; line-height: 1.4; }

#areaResults { display: flex; flex-direction: column; gap: 4px; margin-top: 6px; }
#areaResults button { text-align: left; background: #22262d; font-size: 12px; }
#areaResults button:hover { background: #2c313a; }

.light-state-btn[data-state="green"] { background: #2ecc71; }
.light-state-btn[data-state="yellow"] { background: #f1c40f; color: #222; }
.light-state-btn[data-state="red"] { background: #e74c3c; }

.arm-row { border-top: 1px solid #2a2d33; padding-top: 6px; margin-top: 6px; }
.arm-row label { margin-bottom: 4px; }
.arm-row button { padding: 4px 8px; font-size: 12px; }

#stats { font-size: 12px; color: #cfd3d8; line-height: 1.6; }

.leaflet-div-icon { background: transparent; border: none; }

.car-icon {
  width: 12px; height: 12px; border-radius: 50%;
  border: 1px solid rgba(0,0,0,0.5);
  box-shadow: 0 0 3px rgba(0,0,0,0.6);
}

.building-marker-label {
  font-size: 10px; background: rgba(0,0,0,0.6); color: white; padding: 1px 4px; border-radius: 4px; white-space: nowrap;
}
