:root {
  color-scheme: light;
  font-family: "Segoe UI", "PingFang SC", "Microsoft YaHei", system-ui, sans-serif;
  color: #182b23;
  background: #f3f6f2;
  --brand: #123b2e;
  --muted: #53695f;
  --border: #dce7df;
}

* { box-sizing: border-box; }
[hidden] { display: none !important; }
body { margin: 0; }
a { color: inherit; }
button, input { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 3px solid #4e8a70; outline-offset: 3px; }

.shell { width: min(1180px, calc(100% - 40px)); margin-inline: auto; }
.topbar { background: var(--brand); color: #f2f8f4; }
.topbar-inner { min-height: 64px; display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand, .topbar nav a { text-decoration: none; }
.brand { display: inline-flex; gap: 10px; align-items: center; font-weight: 750; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 10px; color: var(--brand); background: #c8e96a; }
.topbar nav { display: flex; flex-wrap: wrap; gap: 12px; font-size: .875rem; }
.topbar nav a:hover { text-decoration: underline; }

.intro { padding: 34px 0 24px; }
.eyebrow { color: #3f6c58; font-size: .8rem; font-weight: 750; letter-spacing: .09em; }
h1, h2, h3 { margin-block: 0 8px; }
h1 { font-size: clamp(2rem, 4vw, 2.9rem); }
h2 { font-size: 1.18rem; }
h3 { font-size: 1rem; }
.intro > p { margin: 0 0 5px; }
.intro > p:last-child { color: var(--muted); }

.admin-layout { display: grid; grid-template-columns: minmax(248px, .72fr) minmax(0, 1.6fr); gap: 18px; align-items: start; padding-bottom: 36px; }
.card { padding: clamp(14px, 3vw, 22px); border: 1px solid var(--border); border-radius: 18px; background: #fff; }
.access { max-width: 560px; }
.access p { margin-top: 0; }
.section-heading { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.section-heading h2 { margin: 0; }
.hint { color: var(--muted); font-size: .86rem; }
.save-status[data-error="true"], #photoStatus[data-error="true"] { color: #982e21; }
.save-status:empty, #photoStatus:empty { display: none; }

.button { display: inline-flex; align-items: center; justify-content: center; min-height: 39px; padding: 8px 13px; border: 1px solid var(--brand); border-radius: 9px; color: #fff; background: var(--brand); font-size: .87rem; font-weight: 700; text-decoration: none; }
.button.secondary { color: var(--brand); background: #f2f7f3; border-color: var(--border); }
.button:hover:not(:disabled) { filter: brightness(1.1); }

.vehicle-rows, .photo-grid { display: grid; gap: 8px; padding: 0; list-style: none; }
.vehicle-rows { max-height: 54vh; overflow: auto; padding: 4px; }
.vehicle-option { width: 100%; display: grid; gap: 4px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; background: #fff; color: inherit; text-align: left; overflow-wrap: anywhere; }
.vehicle-option[aria-pressed="true"] { border-color: #5f8d76; background: #edf5ef; }
.vehicle-option:hover:not(:disabled) { background: #edf5ef; }

fieldset { border: 0; margin: 0; padding: 0; min-width: 0; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
label { display: block; font-size: .9rem; font-weight: 700; }
label .hint { font-weight: 400; }
label input:not([type="checkbox"]) { display: block; width: 100%; margin-top: 5px; padding: 10px; border: 1px solid #b9cbbf; border-radius: 9px; background: #fff; color: inherit; }
.switch-row { display: flex; align-items: center; gap: 10px; padding: 11px; border-radius: 10px; background: #f0f6f1; }
.switch-row input { width: 18px; height: 18px; accent-color: var(--brand); }
.switch-row small { display: block; margin-top: 4px; color: var(--muted); font-weight: 400; }

.photos { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--border); }
.photo-grid { grid-template-columns: repeat(auto-fill, minmax(115px, 1fr)); }
.photo-item { display: grid; align-content: start; gap: 5px; min-width: 0; padding: 7px; border: 1px solid var(--border); border-radius: 10px; }
.photo-thumb { display: grid; place-items: center; aspect-ratio: 4 / 3; overflow: hidden; border-radius: 6px; background: #e9f0ec; text-align: center; }
.photo-thumb img { display: block; width: 100%; height: 100%; object-fit: cover; }
.photo-item .button { min-height: 32px; }
.form-actions { display: flex; gap: 8px; margin-top: 18px; }

@media (max-width: 740px) {
  .admin-layout { grid-template-columns: 1fr; }
  .vehicle-rows { max-height: 34vh; }
}
@media (max-width: 470px) {
  .shell { width: calc(100% - 24px); }
  .form-grid { grid-template-columns: 1fr; }
  .topbar-inner { align-items: flex-start; flex-direction: column; padding-block: 11px; }
}
label select, label textarea {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 10px;
  border: 1px solid #b9cbbf;
  border-radius: 9px;
  background: #fff;
  color: inherit;
  font: inherit;
}
label textarea { resize: vertical; }
.description { grid-column: 1 / -1; }
