:root {
  color-scheme: light;
  --bg: #f5f7f8;
  --panel: #ffffff;
  --text: #172026;
  --muted: #61707c;
  --line: #d8e0e6;
  --accent: #0f766e;
  --accent-dark: #0b5d57;
  --danger: #b42318;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.5 system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a {
  color: inherit;
}

.topbar {
  align-items: center;
  background: #ffffff;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  min-height: 64px;
  padding: 0 28px;
}

.brand {
  font-size: 18px;
  font-weight: 700;
  text-decoration: none;
}

.topbar nav,
.actions {
  align-items: center;
  display: flex;
  gap: 12px;
}

.topbar nav a {
  color: var(--muted);
  text-decoration: none;
}

.topbar form {
  margin: 0;
}

.shell {
  margin: 0 auto;
  max-width: 1180px;
  padding: 32px 24px 60px;
}

.hero {
  align-items: end;
  display: flex;
  justify-content: space-between;
  margin-bottom: 24px;
  gap: 20px;
}

.hero h1 {
  font-size: 32px;
  margin: 0 0 4px;
}

.hero p {
  color: var(--muted);
  margin: 0;
}

.button,
button {
  background: var(--accent);
  border: 0;
  border-radius: 6px;
  color: #ffffff;
  cursor: pointer;
  display: inline-flex;
  font: inherit;
  font-weight: 650;
  padding: 10px 14px;
  text-decoration: none;
}

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

.button.secondary {
  background: #334155;
}

.button.secondary:hover {
  background: #1f2937;
}

.grid {
  display: grid;
  gap: 16px;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  margin-bottom: 32px;
}

.card,
.empty,
.panel,
.login-box {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 20px;
}

.card h2,
.panel h2 {
  margin: 0 0 16px;
}

.panel {
  margin-bottom: 24px;
}

dl {
  display: grid;
  gap: 8px 14px;
  grid-template-columns: 120px 1fr;
  margin: 0;
}

dt {
  color: var(--muted);
}

dd {
  margin: 0;
  overflow-wrap: anywhere;
}

.error,
.alert {
  color: var(--danger);
}

.success {
  color: var(--accent-dark);
  font-weight: 650;
}

.card-actions {
  margin: 18px 0 0;
}

.table-wrap {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 8px;
  overflow-x: auto;
}

table {
  border-collapse: collapse;
  min-width: 900px;
  width: 100%;
}

th,
td {
  border-bottom: 1px solid var(--line);
  padding: 12px 14px;
  text-align: left;
  vertical-align: top;
}

th {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.login-page {
  align-items: center;
  display: flex;
  min-height: 100vh;
  justify-content: center;
}

.login-box {
  width: min(420px, calc(100vw - 32px));
}

.login-box h1 {
  margin: 0;
}

.stack {
  display: grid;
  gap: 14px;
}

label {
  color: var(--muted);
  display: grid;
  gap: 6px;
  font-weight: 650;
}

input,
select {
  border: 1px solid var(--line);
  border-radius: 6px;
  font: inherit;
  padding: 11px 12px;
}

.vehicle-form {
  align-items: end;
  display: grid;
  gap: 14px;
  grid-template-columns: 160px minmax(180px, 1fr) minmax(150px, 220px) minmax(150px, 1fr) auto;
}

@media (max-width: 720px) {
  .topbar,
  .hero {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar nav {
    flex-wrap: wrap;
  }

  .vehicle-form {
    align-items: stretch;
    grid-template-columns: 1fr;
  }
}
