:root {
  --bg: #f3f5f7;
  --card: #ffffff;
  --text: #1d2733;
  --muted: #6b7785;
  --line: #d7dee6;
  --main: #006b8f;
  --main-2: #0097c9;
  --error: #cc1f1f;
  --ok: #1b8756;
}
* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: Roboto, sans-serif;
  color: var(--text);
  background: radial-gradient(circle at 100% 0, #dcebf3 0, var(--bg) 45%);
}
.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 12px 20px;
  background: linear-gradient(90deg, var(--main), var(--main-2));
  color: #fff;
}
.top-actions { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; }
.top-actions a { color: #fff; text-decoration: none; font-weight: 500; }
.brand { font-weight: 700; letter-spacing: 0.3px; }
.pill {
  border: 1px solid rgba(255,255,255,0.45);
  padding: 2px 10px;
  border-radius: 99px;
  font-size: 12px;
}
.container { max-width: 1080px; margin: 20px auto; padding: 0 14px 30px; }
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 18px;
  box-shadow: 0 5px 18px rgba(0,0,0,0.05);
}
.narrow { max-width: 520px; margin: 30px auto; }
h2 { margin-top: 0; }
h3 { font-size: 16px; margin-bottom: 6px; margin-top: 16px; }
input, select, textarea, button {
  width: 100%;
  border: 1px solid #c8d2dc;
  border-radius: 10px;
  padding: 10px 12px;
  font: inherit;
  background: #fff;
}
button {
  width: auto;
  cursor: pointer;
  background: linear-gradient(90deg, var(--main), var(--main-2));
  color: #fff;
  border: none;
  font-weight: 500;
}
button.ghost {
  background: #fff;
  color: var(--main);
  border: 1px solid #9dc9d8;
}
.stack { display: grid; gap: 12px; }
.grid2 { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.line {
  display: grid;
  grid-template-columns: 2fr 1fr 1fr auto;
  gap: 8px;
  align-items: center;
  margin-bottom: 8px;
}
.vehicle-line { grid-template-columns: 2fr 1fr 1fr 1fr auto; }
.line-form { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.line-form input, .line-form select { width: auto; min-width: 160px; }
.err, .line-err input, .line-err select {
  border-color: var(--error) !important;
  background: #fff4f4;
}
.error-text { color: var(--error); display: block; margin-top: -2px; }
.alert {
  padding: 10px 12px;
  border-radius: 10px;
  margin-bottom: 12px;
  border: 1px solid transparent;
}
.alert.error { background: #fff0f0; color: #8c1616; border-color: #f2b0b0; }
.alert.ok { background: #ebfff4; color: #136943; border-color: #96dab8; }
.wizard-nav { margin-top: 16px; display: flex; gap: 10px; justify-content: flex-end; }
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { border-bottom: 1px solid var(--line); text-align: left; padding: 9px 8px; }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px; }
.kpi { background: #f7fbfe; border: 1px solid #d7e7f0; border-radius: 10px; padding: 10px; }
.kpi span { display: block; font-size: 28px; font-weight: 700; }
.links { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 8px; }
.btn-link {
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #b8d6e3;
  text-decoration: none;
  color: var(--main);
}
.toolbar { display: flex; gap: 8px; margin-bottom: 10px; }
.toolbar input { max-width: 340px; }
@media (max-width: 860px) {
  .grid2 { grid-template-columns: 1fr; }
  .line, .vehicle-line { grid-template-columns: 1fr; }
  .topbar { display: block; }
  .top-actions { margin-top: 10px; }
}
