:root {
  color-scheme: light;
  font-family: "Segoe UI", Tahoma, Arial, sans-serif;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: #f3f6fb;
  color: #13233a;
}

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 20px;
}

.header h1 {
  margin: 0 0 6px;
}

.subtitle {
  margin: 0;
  color: #385678;
}

.controls {
  display: flex;
  align-items: center;
  gap: 16px;
  flex-wrap: wrap;
  margin: 16px 0;
}

.line-select-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 600;
}

.line-select-wrap select {
  border: 1px solid #d0dae7;
  border-radius: 8px;
  padding: 8px 10px;
  background: #fff;
  color: #13233a;
}

button {
  border: none;
  background: #0b63ce;
  color: #fff;
  padding: 10px 14px;
  border-radius: 8px;
  cursor: pointer;
}

button:hover {
  background: #0a58b8;
}

.auto-refresh {
  display: flex;
  align-items: center;
  gap: 8px;
}

.status-cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 16px;
}

.map-wrap {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
  margin-bottom: 16px;
}

.map-wrap h2 {
  margin: 0 0 10px;
  font-size: 16px;
  color: #4f6480;
}

#map {
  width: 100%;
  height: 380px;
  border-radius: 10px;
}

.bus-marker {
  background: transparent;
  border: none;
}

.bus-marker__badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  background: #0b63ce;
  color: #fff;
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 1px 4px rgba(0, 0, 0, 0.3);
  white-space: nowrap;
}

.card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

.card h2 {
  margin: 0;
  font-size: 14px;
  color: #4f6480;
}

.card p {
  margin: 8px 0 0;
  font-size: 24px;
  font-weight: 700;
}

.table-wrap {
  background: #fff;
  border-radius: 12px;
  overflow: hidden;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.08);
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  padding: 12px;
  text-align: left;
  border-bottom: 1px solid #e4eaf2;
  font-size: 14px;
}

thead {
  background: #eef4fc;
}

.pill {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
}

.pill.green {
  background: #d7f4de;
  color: #1a6e2f;
}

.pill.orange {
  background: #ffeccc;
  color: #8f5a00;
}

.pill.red {
  background: #ffd9d9;
  color: #8a1f1f;
}

.placeholder {
  text-align: center;
  color: #4f6480;
}

.message {
  margin: 14px 0 0;
  color: #385678;
}

@media (max-width: 860px) {
  .status-cards {
    grid-template-columns: 1fr;
  }

  th,
  td {
    padding: 10px 8px;
    font-size: 12px;
  }

  #map {
    height: 300px;
  }
}