* { box-sizing: border-box; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  margin: 0;
  background: #f7f7f8;
  color: #1f1f1f;
}
header {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 20px;
  background: #1a3a6c;
  color: #fff;
}
header a { color: #fff; text-decoration: none; }
.brand { font-weight: 700; }
.user { font-size: 14px; }

main { max-width: 640px; margin: 0 auto; padding: 16px 20px 60px; }

h1 { font-size: 22px; margin: 8px 0 16px; }
.muted { color: #6b7280; font-size: 14px; }
.error { color: #b91c1c; }

.vehicle-list { list-style: none; padding: 0; margin: 0; }
.vehicle-list li { margin: 8px 0; }
.vehicle-list a {
  display: block;
  background: #fff;
  border: 1px solid #e5e7eb;
  border-radius: 10px;
  padding: 14px 16px;
  text-decoration: none;
  color: inherit;
}
.vehicle-list a b { font-size: 17px; }
.vehicle-list .muted, .vehicle-list .km { display: block; }
.vehicle-list .km { color: #2563eb; font-size: 13px; }

fieldset {
  border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 12px 16px; margin: 16px 0; background: #fff;
}
legend { padding: 0 6px; font-weight: 600; }

.radio { display: flex; align-items: center; gap: 8px; padding: 8px 0; font-size: 16px; }

.photo-input { display: block; margin: 10px 0; }
.photo-input span { display: block; font-weight: 500; margin-bottom: 6px; }
.photo-input em { font-weight: 400; color: #9ca3af; font-size: 13px; }
.photo-input .file-count { display: block; margin-top: 4px; font-size: 13px; }
.photo-input .link-btn {
  width: auto; background: none; color: #1a3a6c;
  border: none; padding: 2px 0; font-size: 13px; font-weight: 400;
  text-decoration: underline; cursor: pointer; margin-top: 2px;
}
input[type="file"] { font-size: 15px; }

button {
  width: 100%;
  background: #1a3a6c; color: #fff;
  border: none; border-radius: 10px;
  padding: 14px; font-size: 16px; font-weight: 600;
  cursor: pointer;
}
button:disabled { background: #6b7280; cursor: wait; }

.badge {
  font-size: 14px; padding: 3px 10px; border-radius: 999px;
  margin-left: 8px; color: #fff; vertical-align: middle;
}
.badge-ok { background: #1a7f37; }
.badge-review { background: #bf8700; }
.badge-block { background: #cf222e; }

.report-box {
  background: #fff; border: 1px solid #e5e7eb; border-radius: 10px;
  padding: 8px 16px; margin: 16px 0;
}

.back { color: #1a3a6c; }

/* --- edit/review page --- */
.alert {
  padding: 12px 14px; border-radius: 10px; margin: 12px 0;
  font-size: 15px; line-height: 1.4;
}
.alert-info { background: #fef9c3; border: 1px solid #facc15; color: #713f12; }
.alert-success { background: #dcfce7; border: 1px solid #4ade80; color: #14532d; }
.alert-error { background: #fee2e2; border: 1px solid #f87171; color: #7f1d1d; }

.thumbs {
  display: flex; flex-wrap: wrap; gap: 8px;
  margin: 12px 0 20px;
}
.thumbs a {
  flex: 0 0 calc(33.333% - 6px);
  text-decoration: none; color: inherit;
}
.thumbs img {
  width: 100%; height: 110px; object-fit: cover;
  border-radius: 8px; border: 1px solid #e5e7eb;
  background: #fff;
}
.thumbs small { display: block; font-size: 11px; color: #6b7280; margin-top: 2px; text-align: center; }

.field { display: block; margin: 10px 0; }
.field > span:first-child {
  display: block; font-weight: 500; margin-bottom: 6px;
}
.field input[type="number"],
.field textarea {
  width: 100%; padding: 10px 12px;
  font-size: 16px; font-family: inherit;
  border: 1px solid #d1d5db; border-radius: 8px;
  background: #fff;
}
.field textarea { resize: vertical; }
.field small.muted { display: block; margin-top: 4px; }

fieldset.inline {
  display: flex; flex-wrap: wrap; gap: 12px 18px; align-items: center;
}
fieldset.inline legend { width: 100%; }
fieldset.inline .radio { padding: 4px 0; }
fieldset.inline small.muted { width: 100%; margin-top: 4px; }

.check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 12px;
}
.check { display: flex; align-items: center; gap: 6px; font-size: 14px; }
.check input { transform: scale(1.1); }

.two-col {
  display: grid; grid-template-columns: 1fr 1fr; gap: 12px;
}

.anomalies { padding-left: 18px; margin: 8px 0; }
.anomalies li { margin: 4px 0; font-size: 14px; }

@media (max-width: 480px) {
  .thumbs a { flex: 0 0 calc(50% - 4px); }
  .check-grid { grid-template-columns: 1fr; }
  .two-col { grid-template-columns: 1fr; }
}
