:root {
  --bg: #f3f6fb;
  --panel: #ffffff;
  --line: #dbe3f0;
  --text: #13233d;
  --muted: #5a6f91;
  --accent: #0a66ff;
  --accent-dark: #0747b2;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  font-family: 'Noto Sans KR', sans-serif;
  color: var(--text);
  background: radial-gradient(circle at top right, #dbe8ff 0%, var(--bg) 45%);
}

.layout {
  min-height: 100vh;
  display: grid;
  grid-template-columns: minmax(320px, 420px) 1fr;
  gap: 16px;
  padding: 16px;
}

.panel {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 16px;
  box-shadow: 0 12px 28px rgba(10, 30, 66, 0.08);
  padding: 16px;
}

.search-row {
  display: flex;
  gap: 8px;
}

.search-row input {
  flex: 1;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px 12px;
  font-size: 15px;
}

button {
  border: 0;
  border-radius: 10px;
  padding: 10px 14px;
  background: var(--accent);
  color: #fff;
  font-weight: 600;
  cursor: pointer;
}

button:hover {
  background: var(--accent-dark);
}

button:disabled {
  opacity: 0.4;
  cursor: not-allowed;
}

.muted {
  color: var(--muted);
  margin: 8px 0 12px;
}

.status {
  margin: 12px 0;
  font-size: 14px;
  color: var(--muted);
}

.route-list,
.vehicle-list {
  list-style: none;
  margin: 0;
  padding: 0;
}

.route-list {
  max-height: calc(100vh - 210px);
  overflow: auto;
}

.route-item {
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px;
  margin-bottom: 8px;
  cursor: pointer;
  transition: all 0.12s ease;
}

.route-item:hover,
.route-item.active {
  border-color: var(--accent);
  background: #eef4ff;
}

.route-title {
  font-weight: 700;
}

.route-meta {
  margin-top: 4px;
  font-size: 13px;
  color: var(--muted);
}

.map-panel {
  display: flex;
  flex-direction: column;
}

.map-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

#selected-title {
  margin: 0;
  font-size: 22px;
}

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

.map-controls label {
  font-size: 14px;
  color: var(--muted);
}

.map-controls select {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 8px 10px;
  font-size: 14px;
  color: var(--text);
  background: #fff;
}

#map {
  width: 100%;
  min-height: 520px;
  border: 1px solid var(--line);
  border-radius: 12px;
}

.vehicle-list {
  margin-top: 12px;
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 8px;
}

.vehicle-item {
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 10px;
  font-size: 13px;
}

@media (max-width: 960px) {
  .layout {
    grid-template-columns: 1fr;
  }

  .route-list {
    max-height: 240px;
  }

  #map {
    min-height: 420px;
  }
}
