*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }

body {
  font-family: "Helvetica Neue", Arial, sans-serif;
  font-size: 13px;
  color: #333;
  background: #f4f5f7;
}

header {
  background: #2c3e50;
  color: #fff;
  padding: 10px 20px;
}
header h1 { font-size: 18px; font-weight: 600; }

.map-bottom-controls {
  display: flex;
  flex-direction: column;
  gap: 8px;
  margin-top: 8px;
}

.map-controls-row {
  display: flex;
  align-items: center;
  gap: 10px;
}

.map-controls-divider {
  flex: 1;
}

.filter-label {
  font-size: 12px;
  color: #555;
  white-space: nowrap;
}

.status-toggle {
  display: flex;
  border: 1px solid #ccc;
  border-radius: 4px;
  overflow: hidden;
}

.status-btn {
  padding: 3px 10px;
  font-size: 12px;
  border: none;
  background: #fff;
  cursor: pointer;
  color: #555;
}

.status-btn + .status-btn {
  border-left: 1px solid #ccc;
}

.status-btn.active {
  background: #2c3e50;
  color: #fff;
}

.count-badge {
  padding: 6px 16px 0;
  font-size: 13px;
  font-weight: 500;
  color: #555;
  text-align: right;
}

.dashboard {
  display: flex;
  flex-direction: column;
  gap: 10px;
  padding: 10px;
  max-width: 1600px;
  margin: 0 auto;
}

.dashboard-columns {
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(440px, 1fr);
  gap: 10px;
  align-items: start;
}

.left-column,
.right-column {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.left-column .panel,
.right-column .panel {
  width: 100%;
}

.panel {
  background: #fff;
  border: 1px solid #dde2ea;
  border-radius: 6px;
  padding: 10px 12px;
}

.panel-title {
  font-size: 12px;
  font-weight: 600;
  color: #555;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  margin-bottom: 8px;
}

.panel--sidechart {
  width: 100%;
}

.right-column {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

#service-section {
  grid-column: span 2;
}

#my-map {
  width:  100%;
  height: clamp(340px, 44vh, 420px);
}

#neighborhood-container,
#method-container,
#department-container,
#priority-container,
#service-container {
  min-height: 150px;
}

#method-container {
  overflow-x: auto;
  overflow-y: hidden;
}

#department-container {
  overflow-x: auto;
  overflow-y: hidden;
}


.service-type-controls {
  position: relative;
  margin-top: 0;
}

.service-type-toggle {
  font-size: 12px;
  padding: 3px 10px;
  border: 1px solid #ccc;
  border-radius: 4px;
  background: #fff;
  color: #555;
  cursor: pointer;
}

.service-type-panel {
  position: absolute;
  top: calc(100% + 8px);
  left: 136px;
  width: 360px;
  padding: 12px;
  border: 1px solid #000;
  border-radius: 4px;
  background: #fff;
  box-shadow: none;
  z-index: 2000;
}

.service-type-option {
  display: grid;
  grid-template-columns: 18px 1fr 44px;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.service-type-option:last-child {
  margin-bottom: 0;
}

.service-type-option label {
  font-size: 13px;
  color: #333;
}

.service-type-option input[type="color"] {
  width: 44px;
  height: 28px;
  padding: 0;
  border: 1px solid #d0d5de;
  border-radius: 4px;
  background: #fff;
  cursor: pointer;
}

.hidden { display: none; }

/* Timeline */

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

.timeline-controls { display: flex; gap: 8px; align-items: center; }

.timeline-controls select,
.timeline-controls button {
  font-size: 11px;
  padding: 4px 10px;
  height: 28px;
  border-radius: 4px;
  border: 1px solid #6b93c4;
  background: #fff;
  color: #3a6ea8;
  cursor: pointer;
  box-sizing: border-box;
}
.timeline-controls button:hover  { background: #eef3fa; }
.timeline-controls button.active { background: #3a6ea8; color: #fff; }

#timeline-container svg,
#neighborhood-container svg { display: block; }

.x-axis path, .x-axis line,
.y-axis path, .y-axis line {
  stroke: #ccc;
}
.x-axis text, .y-axis text {
  fill: #666;
  font-size: 11px;
}

.axis-label {
  fill: #555;
  font-size: 11px;
}

.chart-title {
  fill: #333;
  font-size: 13px;
  font-weight: 600;
}

.neighborhood-bar {
  fill: #6b93c4;
}

.neighborhood-value {
  fill: #333;
  font-size: 11px;
}


.brush .selection {
  fill: #a8c4e0;
  fill-opacity: 0.35;
  stroke: #6b93c4;
  stroke-width: 1px;
}
.brush .handle { fill: #6b93c4; }

/* Tooltip */

#tooltip {
  position: absolute;
  pointer-events: none;
  opacity: 0;
  background: #fff;
  border: 1px solid #d0d5de;
  border-radius: 4px;
  box-shadow: 2px 3px 8px rgba(0,0,0,0.12);
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.5;
  white-space: nowrap;
  z-index: 1000;
}
.tooltip-label {
  font-size: 16px;
  font-weight: 500;
  color: #888;
}

.map-button {
  font-size: 12px;
  padding: 4px 10px;
  border-radius: 4px;
  border: 1px solid #6b93c4;
  background: #fff;
  color: #3a6ea8;
  cursor: pointer;
}

.button-active { background: #3a6ea8; color: #fff; }

@media (max-width: 1100px) {
  .dashboard-columns {
    display: flex;
    flex-direction: column;
  }

  .left-column,
  .right-column {
    display: flex;
    flex-direction: column;
    gap: 10px;
  }
}
