* {
  box-sizing: border-box;
  font-family: "Segoe UI", Tahoma, Geneva, Verdana, sans-serif;
}

html,
body {
  height: 100%;
  margin: 0;
}
#map {
  position: absolute;
  top: 48px;
  bottom: 0;
  left: 0;
  right: 0;
}
.topbar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 48px;
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 0 12px;
  background: #0f172a;
  color: #e2e8f0;
  border-bottom: 1px solid #1f2937;
}
.topbar .brand {
  font-weight: 600;
}
.controls {
  margin-left: auto;
  display: flex;
  gap: 8px;
  align-items: center;
}
.file-label {
  cursor: pointer;
  display: inline-flex;
  align-items: center;
  gap: 8px;
}
.file-label input {
  display: none;
}
button {
  height: 30px;
  padding: 0 12px;
  border-radius: 6px;
  border: 1px solid #334155;
  background: #1f2937;
  color: #e2e8f0;
  cursor: pointer;
}
button:hover {
  background: #0b1220;
}
.legend {
  position: absolute;
  bottom: 12px;
  left: 12px;
  background: rgba(15, 23, 42, 0.9);
  color: #e2e8f0;
  padding: 8px 10px;
  border-radius: 6px;
  font-size: 12px;
  border: 1px solid #334155;
}
.btn {
  appearance: none;
  border: 1px solid #d1d5db;
  background: #fff;
  color: #111827;
  padding: 6px 12px;
  border-radius: 6px;
  font: 500 14px/1 system-ui, -apple-system, Segoe UI, Roboto, Arial, sans-serif;
  cursor: pointer;
}
.btn:hover {
  background: #f9fafb;
}
.btn:active {
  background: #f3f4f6;
}
.btn.primary {
  background: #2563eb;
  border-color: #1e40af;
  color: #fff;
}
.btn.primary:hover {
  background: #1d4ed8;
}
.btn:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.select {
  appearance: none;
  border: 1px solid #d1d5db;
  background: #fff
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='8' viewBox='0 0 12 8'%3E%3Cpath fill='%236b7280' d='M6 8L0 0h12z'/%3E%3C/svg%3E")
    no-repeat right 10px center;
  background-size: 12px 8px;
  color: #111827;
  padding: 6px 28px 6px 10px;
  border-radius: 6px;
  font: 400 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
}
.select:disabled {
  opacity: 0.6;
}
.topbar .controls {
  display: flex;
  gap: 8px;
  align-items: center;
}
.sidebar {
  position: absolute;
  left: 12px;
  top: 12px;
  width: 340px;
  max-height: calc(100% - 24px);
  overflow: auto;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 8px;
  box-shadow: 0 6px 24px rgba(0, 0, 0, 0.12);
  z-index: 999;
  cursor: default;
  pointer-events: auto;
}
.sidebar-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-bottom: 1px solid #e5e7eb;
}
.sidebar-title {
  font: 600 14px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  color: #111827;
}
.sidebar-content {
  padding: 10px 12px;
  font: 400 13px/1.5 system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  color: #374151;
}
.sidebar h4 {
  margin: 10px 0 4px;
  font: 600 13px/1.2 system-ui, -apple-system, Segoe UI, Roboto, Arial,
    sans-serif;
  color: #111827;
}
.sidebar .meta {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 0px 10px;
  margin-bottom: 8px;
}
.sidebar .tour-item {
  border: 1px solid #e5e7eb;
  border-radius: 6px;
  padding: 8px;
  margin-bottom: 8px;
}
.sidebar .tour-title {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}
.sidebar .color-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  flex: 0 0 10px;
  border: 1px solid #e5e7eb;
}

.job-entry {
  display: flex;
  margin-bottom: 6px;
}
.job-entry.highlight {
  background: #fff7ed;
  outline: 2px solid #f59e0b44;
  border-radius: 6px;
}
.job-entry-info {
  display: flex;
  flex-direction: column;
}
.job-entry-address {
  font-size: 12px;
  color: #6b7280;
}

.hidden {
  display: none;
}
