:root {
  color-scheme: light;
  --bg: #f5f7fa;
  --ink: #17202a;
  --muted: #607083;
  --line: #d9e0e8;
  --panel: #ffffff;
  --accent: #ffd200;
  --accent-ink: #171717;
  --blue: #1f5eff;
  --green: #15803d;
  --red: #b91c1c;
  --shadow: 0 18px 45px rgba(30, 43, 62, 0.12);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background:
    linear-gradient(180deg, rgba(255, 210, 0, 0.16), transparent 260px),
    var(--bg);
  color: var(--ink);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

.shell {
  width: min(1480px, calc(100% - 32px));
  margin: 0 auto;
  padding: 28px 0;
}

.topbar {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 22px;
}

.eyebrow {
  margin: 0 0 7px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

h1,
h2,
h3,
p {
  overflow-wrap: anywhere;
}

h1 {
  margin: 0;
  font-size: 34px;
  line-height: 1.08;
}

h2 {
  margin: 0;
  font-size: 20px;
  line-height: 1.2;
}

.status {
  display: inline-flex;
  align-items: center;
  gap: 9px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.72);
  color: var(--muted);
  font-size: 14px;
  white-space: nowrap;
}

.dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  background: #94a3b8;
}

.status.ok .dot {
  background: var(--green);
}

.status.warn .dot {
  background: #f59e0b;
}

.grid {
  display: grid;
  grid-template-columns: 1fr 1fr 1fr;
  gap: 16px;
  align-items: start;
}

.panel {
  min-width: 0;
  min-height: 720px;
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: var(--shadow);
  padding: 18px;
}

.panel-head {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 16px;
}

.form {
  display: grid;
  gap: 12px;
  margin-bottom: 16px;
}

.form.two {
  grid-template-columns: 1fr 1fr;
}

.form.two label:first-child,
.form.two button {
  grid-column: 1 / -1;
}

label {
  display: grid;
  gap: 6px;
  min-width: 0;
}

label span {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

input {
  width: 100%;
  min-height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  color: var(--ink);
  background: #fbfcfe;
  font: inherit;
  outline: none;
}

input:focus {
  border-color: var(--blue);
  box-shadow: 0 0 0 3px rgba(31, 94, 255, 0.12);
}

button {
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 10px 14px;
  background: var(--accent);
  color: var(--accent-ink);
  cursor: pointer;
  font: inherit;
  font-weight: 850;
}

button:disabled {
  opacity: 0.58;
  cursor: wait;
}

.result {
  display: grid;
  gap: 10px;
}

.empty,
.loading,
.error {
  min-height: 120px;
  display: grid;
  place-items: center;
  border: 1px dashed var(--line);
  border-radius: 8px;
  color: var(--muted);
  text-align: center;
  padding: 18px;
}

.error {
  color: var(--red);
  border-color: rgba(185, 28, 28, 0.35);
  background: rgba(185, 28, 28, 0.05);
}

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

.metric,
.row,
.note,
.route-card {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfe;
}

.metric {
  padding: 14px;
}

.metric strong {
  display: block;
  margin-bottom: 4px;
  font-size: 24px;
}

.metric span,
.note,
.route-card {
  color: var(--muted);
  font-size: 13px;
}

.note,
.route-card {
  padding: 12px;
  line-height: 1.45;
}

.vehicle-title {
  margin: 0 0 4px;
  font-size: 18px;
}

.pillline {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin: 10px 0;
}

.pill {
  border-radius: 999px;
  background: #edf2f7;
  color: #334155;
  padding: 6px 9px;
  font-size: 12px;
  font-weight: 800;
}

.list {
  display: grid;
  gap: 8px;
  max-height: 470px;
  overflow: auto;
  padding-right: 3px;
}

.row {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: 10px;
  padding: 11px;
}

.index {
  width: 34px;
  height: 34px;
  display: grid;
  place-items: center;
  border-radius: 8px;
  background: #e8eef8;
  color: #19365f;
  font-weight: 850;
}

.row h3 {
  margin: 0 0 4px;
  font-size: 15px;
}

.row p {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  line-height: 1.4;
}

.source-link {
  color: var(--blue);
  text-decoration: none;
  font-weight: 750;
}

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

  .panel {
    min-height: auto;
  }
}

@media (max-width: 640px) {
  .shell {
    width: min(100% - 20px, 1480px);
    padding: 18px 0;
  }

  .topbar,
  .form.two {
    grid-template-columns: 1fr;
    display: grid;
  }

  .form.two label:first-child,
  .form.two button {
    grid-column: auto;
  }

  h1 {
    font-size: 27px;
  }

  .metric-grid {
    grid-template-columns: 1fr;
  }
}
