:root {
  --bg: #0f1720;
  --panel: #17212c;
  --panel-border: #263341;
  --text: #e6edf3;
  --muted: #8b98a5;
  --accent: #3b82f6;
  --accent-dark: #2563eb;
  --danger: #f87171;
  --success: #34d399;
  --radius: 10px;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  background: var(--bg);
  color: var(--text);
  line-height: 1.5;
}

.topbar {
  padding: 24px 20px;
  border-bottom: 1px solid var(--panel-border);
  background: linear-gradient(180deg, rgba(59,130,246,0.08), transparent);
}

.brand { display: flex; align-items: center; gap: 14px; max-width: 880px; margin: 0 auto; }
.brand-icon { font-size: 34px; }
.brand h1 { margin: 0; font-size: 22px; }
.tagline { margin: 2px 0 0; color: var(--muted); font-size: 14px; }

.container { max-width: 880px; margin: 0 auto; padding: 24px 20px 60px; }

.search-panel, .departures-panel {
  background: var(--panel);
  border: 1px solid var(--panel-border);
  border-radius: var(--radius);
  padding: 20px;
  margin-bottom: 20px;
}

label { display: block; font-size: 13px; color: var(--muted); margin-bottom: 6px; }

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

input[type="text"], select {
  background: #0d1520;
  border: 1px solid var(--panel-border);
  color: var(--text);
  border-radius: 8px;
  padding: 10px 12px;
  font-size: 14px;
  width: 100%;
}

input[type="text"]:focus, select:focus { outline: 2px solid var(--accent); }

button {
  background: var(--accent);
  color: white;
  border: none;
  border-radius: 8px;
  padding: 10px 18px;
  font-size: 14px;
  font-weight: 600;
  cursor: pointer;
  white-space: nowrap;
}
button:hover { background: var(--accent-dark); }
.ghost-btn { background: transparent; border: 1px solid var(--panel-border); color: var(--text); }
.ghost-btn:hover { background: #1d2b3a; }

.status { margin-top: 10px; font-size: 13px; min-height: 18px; }
.status.error { color: var(--danger); }
.status.info { color: var(--muted); }
.status.success { color: var(--success); }

.stop-results { list-style: none; margin: 14px 0 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.stop-results li {
  border: 1px solid var(--panel-border);
  border-radius: 8px;
  padding: 12px 14px;
  cursor: pointer;
  transition: border-color .15s ease, background .15s ease;
}
.stop-results li:hover { border-color: var(--accent); background: #10202f; }
.stop-name { font-weight: 600; }
.stop-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }

.departures-header { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-bottom: 14px; }
.departures-header h2 { margin: 0; font-size: 18px; }

.controls { display: grid; grid-template-columns: 2fr 1fr 1fr; gap: 12px; margin-bottom: 14px; }
@media (max-width: 640px) { .controls { grid-template-columns: 1fr; } }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14px; }
thead th {
  text-align: left;
  color: var(--muted);
  font-weight: 600;
  font-size: 12.5px;
  text-transform: uppercase;
  letter-spacing: .03em;
  padding: 8px 10px;
  border-bottom: 1px solid var(--panel-border);
}
tbody td { padding: 10px; border-bottom: 1px solid #1c2836; }
tbody tr:hover { background: #101c28; }

.badge {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 11.5px;
  font-weight: 600;
}
.badge.scheduled { background: rgba(59,130,246,.15); color: #93c5fd; }
.badge.added { background: rgba(52,211,153,.15); color: #6ee7b7; }
.badge.canceled { background: rgba(248,113,113,.15); color: #fca5a5; }
.badge.static { background: rgba(139,152,165,.15); color: var(--muted); }

.footer { text-align: center; color: var(--muted); font-size: 12.5px; padding: 20px; }
.footer a { color: var(--accent); }
