:root {
  --ink: #123529;
  --accent: #16804d;
  --accent-dark: #0e5a36;
  --paper: #fff;
  --bg: #f4f7f4;
  --line: #d8e5dc;
  --muted: #65776d;
  --warning: #9d5a10;
  --danger: #a93433;
}
*, *::before, *::after { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font: 15px/1.45 system-ui, -apple-system, sans-serif;
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; }
button { cursor: pointer; }
button:disabled { opacity: .55; cursor: not-allowed; }
.shell { max-width: 1060px; margin: auto; padding: 22px 16px 40px; }
header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 20px;
}
.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 21px;
  letter-spacing: -.03em;
}
.brand-mark {
  width: 36px;
  height: 36px;
  display: grid;
  place-items: center;
  background: var(--ink);
  color: #fff;
  border-radius: 10px;
  font-size: 18px;
}
.push-btn {
  border: 1px solid #b6d9c7;
  background: #edf8f1;
  color: var(--accent-dark);
  padding: 9px 14px;
  border-radius: 10px;
  font-weight: 700;
  font-size: 13px;
  white-space: nowrap;
  transition: background .15s, color .15s;
}
.push-btn.on { background: var(--accent); color: #fff; border-color: var(--accent); }
.offline {
  background: #fff0d8;
  color: var(--warning);
  border: 1px solid #f0d4a8;
  border-radius: 10px;
  padding: 10px 14px;
  font-size: 13px;
  font-weight: 700;
  margin-bottom: 14px;
  text-align: center;
}
.hero {
  background: linear-gradient(135deg, #123529 0%, #1a4a35 100%);
  color: #fff;
  border-radius: 20px;
  padding: 28px;
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 24px;
  align-items: end;
}
h1 {
  margin: 0;
  font-size: clamp(28px, 5vw, 42px);
  letter-spacing: -.05em;
  line-height: 1.08;
}
.hero p { color: #c9dbd0; margin: 10px 0 0; max-width: 520px; }
.hero-next {
  margin-top: 14px;
  display: inline-block;
  background: #ffffff18;
  border: 1px solid #ffffff33;
  border-radius: 10px;
  padding: 8px 12px;
  font-size: 13px;
  color: #e8f3ec;
}
.summary { display: flex; gap: 28px; }
.summary b { display: block; font-size: 28px; letter-spacing: -.05em; }
.summary span { color: #bcd0c5; font-size: 13px; }
.onboard {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 10px;
  margin-top: 18px;
}
.onboard-step {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 12px 14px;
  font-size: 13px;
}
.onboard-step.done { border-color: #b6d9c7; background: #f6fbf8; }
.onboard-step b { display: block; font-size: 12px; color: var(--muted); margin-bottom: 4px; }
.grid {
  display: grid;
  grid-template-columns: 340px 1fr;
  gap: 18px;
  margin-top: 18px;
  align-items: start;
}
.panel {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 20px;
  box-shadow: 0 1px 3px #12352908;
}
h2 { margin: 0 0 14px; font-size: 19px; letter-spacing: -.03em; }
label { display: block; font-size: 13px; font-weight: 700; margin: 12px 0 5px; }
input, select {
  width: 100%;
  padding: 10px 11px;
  border: 1px solid #c9d9ce;
  border-radius: 9px;
  font: inherit;
  outline: none;
  background: #fff;
}
input:focus, select:focus {
  border-color: var(--accent);
  box-shadow: 0 0 0 3px #dff3e7;
}
input.invalid { border-color: var(--danger); box-shadow: 0 0 0 3px #fbe7e688; }
.row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.help { color: var(--muted); font-size: 12px; margin: 6px 0 0; }
.btn {
  border: 0;
  border-radius: 9px;
  background: var(--accent);
  color: #fff;
  padding: 11px 14px;
  font-weight: 800;
  margin-top: 16px;
  width: 100%;
  transition: background .15s;
}
.btn:hover:not(:disabled) { background: var(--accent-dark); }
.btn.secondary { background: #edf7f0; color: var(--accent-dark); }
.btn.secondary:hover:not(:disabled) { background: #dff0e6; }
.btn.danger { background: #fbe7e6; color: var(--danger); }
.btn.small { width: auto; margin-top: 8px; padding: 7px 12px; font-size: 13px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.chip {
  border: 1px solid var(--line);
  background: #f8fbf9;
  color: var(--accent-dark);
  border-radius: 99px;
  padding: 5px 11px;
  font-size: 12px;
  font-weight: 700;
}
.chip:hover { background: #edf7f0; }
.tip {
  margin-top: 18px;
  border-left: 3px solid var(--accent);
  background: #edf7f0;
  color: #275d42;
  padding: 12px 14px;
  border-radius: 0 10px 10px 0;
  font-size: 13px;
  line-height: 1.5;
}
.schedule {
  margin-top: 14px;
  padding: 12px 14px;
  background: #f8fbf9;
  border-radius: 10px;
  font-size: 12px;
  color: var(--muted);
  line-height: 1.6;
}
.schedule strong { color: var(--ink); }
.toolbar {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 12px;
  margin-bottom: 14px;
}
.toolbar p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.filter { width: auto; min-width: 150px; padding: 8px 10px; }
.car-list { display: grid; gap: 10px; }
.car {
  display: grid;
  grid-template-columns: 46px 1fr auto;
  gap: 14px;
  align-items: center;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 14px 16px;
  transition: box-shadow .15s, border-color .15s;
}
.car:hover { box-shadow: 0 2px 12px #1235290d; border-color: #c9d9ce; }
.car.urgent { border-color: #f0c878; background: #fffcf7; }
.car.overdue { border-color: #e8b4b2; background: #fffafa; }
.car-icon {
  width: 46px;
  height: 46px;
  display: grid;
  place-items: center;
  background: #edf5ef;
  border-radius: 12px;
  font-size: 22px;
}
.car-main { min-width: 0; }
.car-title {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  font-weight: 800;
}
.meta {
  color: var(--muted);
  font-size: 13px;
  margin-top: 3px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.progress {
  height: 4px;
  background: #e4ede7;
  border-radius: 99px;
  margin-top: 8px;
  overflow: hidden;
}
.progress span {
  display: block;
  height: 100%;
  border-radius: 99px;
  background: var(--accent);
  transition: width .3s;
}
.progress.late span { background: var(--danger); }
.progress.soon span { background: #d98125; }
.car-side { text-align: right; }
.car-side strong { display: block; font-size: 14px; }
.car-side small { color: var(--muted); font-size: 12px; }
.badge {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 99px;
  font-size: 11px;
  font-weight: 800;
}
.badge.ok { background: #e4f5e9; color: #176b40; }
.badge.soon { background: #fff0d8; color: var(--warning); }
.badge.late { background: #fbe7e6; color: var(--danger); }
.actions { display: flex; justify-content: flex-end; gap: 6px; margin-top: 6px; }
.link {
  border: 0;
  background: none;
  color: var(--muted);
  font-size: 12px;
  padding: 2px 4px;
}
.link:hover { color: var(--accent-dark); }
.link.del:hover { color: var(--danger); }
.empty {
  border: 1px dashed #b9cdc0;
  text-align: center;
  color: var(--muted);
  padding: 40px 18px;
  border-radius: 14px;
}
.divider { border: 0; border-top: 1px solid var(--line); margin: 22px 0; }
.skeleton {
  background: linear-gradient(90deg, #eef3ef 25%, #f8fbf9 50%, #eef3ef 75%);
  background-size: 200% 100%;
  animation: shimmer 1.2s infinite;
  border-radius: 14px;
  height: 88px;
}
@keyframes shimmer { to { background-position: -200% 0; } }
.toast {
  position: fixed;
  left: 50%;
  bottom: 22px;
  transform: translate(-50%, 130px);
  transition: transform .25s;
  background: #15362a;
  color: #fff;
  padding: 11px 18px;
  border-radius: 10px;
  box-shadow: 0 8px 25px #17342a44;
  z-index: 30;
  max-width: 90vw;
  text-align: center;
}
.toast.error { background: #6b1f1e; }
.toast.show { transform: translate(-50%, 0); }
.overlay {
  position: fixed;
  inset: 0;
  background: #12352966;
  display: grid;
  place-items: center;
  padding: 16px;
  z-index: 40;
}
.overlay.hidden { display: none; }
.dialog {
  background: var(--paper);
  border-radius: 16px;
  padding: 22px;
  width: min(420px, 100%);
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 50px #12352933;
}
.dialog h3 { margin: 0 0 16px; font-size: 20px; }
.dialog-actions { display: flex; gap: 10px; margin-top: 8px; }
.dialog-actions .btn { margin-top: 12px; flex: 1; }
footer {
  text-align: center;
  color: var(--muted);
  font-size: 12px;
  margin-top: 28px;
  padding-top: 16px;
  border-top: 1px solid var(--line);
}
.hidden { display: none !important; }
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    transition-duration: .01ms !important;
  }
}
@media (max-width: 760px) {
  .shell { padding: 16px 12px 36px; }
  .hero { grid-template-columns: 1fr; padding: 22px; }
  .summary { gap: 20px; }
  .onboard { grid-template-columns: 1fr; }
  .grid { grid-template-columns: 1fr; }
  .car { grid-template-columns: 40px 1fr; }
  .car-icon { width: 40px; height: 40px; font-size: 19px; }
  .car-side { grid-column: 2; text-align: left; }
  .push-btn { font-size: 12px; padding: 8px 10px; }
  .row { grid-template-columns: 1fr; }
}
