:root {
  color-scheme: light;
  --ink: #171717;
  --muted: #6e6a62;
  --line: #ddd4c5;
  --surface: #ffffff;
  --soft: #f7f4ed;
  --brand: #1f6f5b;
  --brand-dark: #174f43;
  --accent: #a77a32;
  --shadow: 0 18px 44px rgba(31, 28, 22, 0.14);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  color: var(--ink);
  background: linear-gradient(180deg, #fbfaf7 0%, var(--soft) 100%);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

button,
input,
select {
  font: inherit;
}

button {
  border: 0;
  border-radius: 8px;
  padding: 12px 16px;
  color: #fff;
  background: var(--brand);
  cursor: pointer;
  font-weight: 700;
}

button:hover {
  background: var(--brand-dark);
}

button:disabled {
  color: var(--muted);
  background: #eef2f6;
  cursor: not-allowed;
}

button.secondary {
  color: var(--ink);
  background: #e8edf4;
}

button.secondary:hover {
  background: #dce4ef;
}

button.small {
  padding: 9px 12px;
  font-size: 14px;
}

.app-header {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
  padding: 18px clamp(18px, 5vw, 64px);
  background: rgba(255, 255, 255, 0.92);
  border-bottom: 1px solid var(--line);
  backdrop-filter: blur(14px);
}

.app-header h1 {
  margin: 2px 0 0;
  font-size: clamp(20px, 3vw, 28px);
}

nav {
  display: flex;
  gap: 18px;
  flex-wrap: wrap;
}

nav a {
  color: var(--ink);
  text-decoration: none;
  font-weight: 700;
}

main {
  padding-bottom: 56px;
}

.admin-hero {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 24px;
  padding: clamp(28px, 5vw, 56px) clamp(18px, 5vw, 64px);
  color: #fff;
  background: linear-gradient(120deg, #111b19, #285f51);
}

.admin-hero h2 {
  margin: 4px 0 0;
  max-width: 720px;
  font-size: clamp(32px, 5vw, 56px);
  line-height: 1.05;
}

.admin-hero p {
  margin: 0;
  max-width: 420px;
  color: rgba(255, 255, 255, 0.82);
  line-height: 1.7;
}

.hero {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(320px, 1.05fr);
  min-height: 480px;
  gap: clamp(24px, 5vw, 64px);
  align-items: center;
  padding: clamp(28px, 6vw, 72px) clamp(18px, 5vw, 64px);
  background:
    linear-gradient(90deg, rgba(11, 19, 18, 0.9), rgba(31, 50, 46, 0.46)),
    url("https://images.unsplash.com/photo-1549925862-9902d86fe409?auto=format&fit=crop&w=1800&q=80") center/cover;
  color: #fff;
}

.notice-banner {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  flex-wrap: wrap;
  padding: 12px clamp(18px, 5vw, 64px);
  color: #5a3f0d;
  background: #fff4d8;
  border-bottom: 1px solid #e7c982;
  font-size: 14px;
}

.notice-banner strong {
  color: #3f2b08;
}

.hero-copy {
  max-width: 620px;
}

.hero h2 {
  margin: 0;
  font-size: clamp(36px, 7vw, 72px);
  line-height: 1.02;
  letter-spacing: 0;
}

.hero p {
  margin: 18px 0 0;
  max-width: 520px;
  color: rgba(255, 255, 255, 0.88);
  font-size: clamp(16px, 2.3vw, 20px);
  line-height: 1.7;
}

.search-panel,
.booking-form {
  display: grid;
  gap: 14px;
  padding: 22px;
  border-radius: 8px;
  border: 1px solid rgba(221, 212, 197, 0.78);
  background: rgba(255, 255, 255, 0.95);
  box-shadow: var(--shadow);
}

label {
  display: grid;
  gap: 8px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
}

input,
select {
  width: 100%;
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px 12px;
  background: #fff;
  color: var(--ink);
}

input:focus,
select:focus {
  outline: 3px solid rgba(13, 124, 102, 0.18);
  border-color: var(--brand);
}

.section {
  padding: 44px clamp(18px, 5vw, 64px) 0;
}

.section-heading {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 18px;
}

.section h2 {
  margin: 4px 0 0;
  font-size: clamp(24px, 4vw, 36px);
}

.eyebrow {
  margin: 0;
  color: var(--accent);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0;
  text-transform: uppercase;
}

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

.cars-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  gap: 18px;
}

.car-card {
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(31, 28, 22, 0.08);
}

.car-image {
  display: grid;
  place-items: center;
  height: 150px;
  background: linear-gradient(135deg, #edf2f7, #b9c6d3);
}

.vehicle-svg {
  width: min(82%, 260px);
  height: auto;
  filter: drop-shadow(0 14px 18px rgba(31, 28, 22, 0.2));
}

.car-body {
  display: grid;
  gap: 14px;
  padding: 16px;
}

.car-title-row,
.price-row,
.form-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.car-title-row h3 {
  margin: 0;
  font-size: 20px;
}

.badge {
  flex: 0 0 auto;
  border-radius: 999px;
  padding: 5px 9px;
  color: #075f4c;
  background: #dff6ee;
  font-size: 12px;
  font-weight: 800;
}

.car-meta {
  margin: 0;
}

.spec-list {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  margin: 0;
}

.spec-list div {
  padding: 10px;
  border-radius: 8px;
  background: var(--soft);
}

.spec-list dt {
  color: var(--muted);
  font-size: 12px;
}

.spec-list dd {
  margin: 2px 0 0;
  font-weight: 800;
}

.price-row strong {
  font-size: 21px;
}

.reservation-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
}

.reservation-layout[hidden] {
  display: none;
}

.fleet-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.45fr) minmax(320px, 0.75fr);
  gap: 24px;
  align-items: start;
}

.fleet-layout .fleet-table-wrap {
  grid-column: 1 / -1;
}

.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}

.summary-box {
  display: grid;
  gap: 8px;
  padding: 14px;
  border-left: 4px solid var(--brand);
  background: var(--soft);
}

.summary-box p {
  margin: 0;
}

.included-option {
  display: grid;
  gap: 4px;
  padding: 13px 14px;
  border: 1px solid #d6e8df;
  border-radius: 8px;
  color: #174f43;
  background: #edf7f2;
}

.included-option span {
  color: var(--muted);
  font-size: 13px;
  line-height: 1.5;
}

.form-note {
  margin: -2px 0 0;
  color: var(--muted);
  font-size: 12px;
  line-height: 1.5;
}

.option-fieldset {
  display: grid;
  gap: 8px;
  margin: 0;
  padding: 13px 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
}

.option-fieldset legend {
  padding: 0 4px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.check-row {
  display: flex;
  grid-template-columns: none;
  align-items: center;
  gap: 10px;
  font-size: 14px;
}

.check-row input {
  flex: 0 0 18px;
  width: 18px;
  min-height: 18px;
}

.check-row span {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
}

.confirm-row {
  display: flex;
  grid-template-columns: none;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 13px;
  border: 1px solid #e7c982;
  border-radius: 8px;
  background: #fff8e8;
  line-height: 1.55;
}

.confirm-row input {
  flex: 0 0 18px;
  width: 18px;
  min-height: 18px;
  margin-top: 2px;
}

.price-breakdown {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px 12px;
  padding: 12px;
  border-radius: 8px;
  background: #fff;
}

.price-breakdown span {
  color: var(--muted);
}

.reservations-list {
  display: grid;
  gap: 12px;
}

.info-layout {
  display: grid;
  grid-template-columns: minmax(220px, 0.55fr) minmax(320px, 1fr);
  gap: 24px;
  align-items: start;
}

.guide-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 16px;
}

.guide-grid article {
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(31, 28, 22, 0.06);
}

.guide-grid h2 {
  font-size: 22px;
}

.guide-grid p {
  margin: 10px 0 0;
  color: var(--muted);
  line-height: 1.7;
}

.guide-grid dl {
  display: grid;
  gap: 8px;
  margin: 12px 0 0;
}

.guide-grid dl div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 10px;
}

.guide-grid dt {
  color: var(--muted);
  font-weight: 800;
}

.guide-grid dd {
  margin: 0;
  font-weight: 800;
}

.reservation-item {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
}

.reservation-item.is-cancelled {
  opacity: 0.72;
}

.reservation-item h3 {
  margin: 0 0 6px;
}

.reservation-item p {
  margin: 0;
}

.reservation-actions,
.table-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  border-radius: 999px;
  padding: 4px 9px;
  color: #174f43;
  background: #e4f3ed;
  font-size: 12px;
  font-weight: 800;
}

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

.fleet-table {
  width: 100%;
  min-width: 720px;
  border-collapse: collapse;
}

.fleet-table th,
.fleet-table td {
  padding: 14px 16px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
}

.fleet-table th {
  color: var(--muted);
  background: #f9f6ef;
  font-size: 13px;
}

.fleet-table tr:last-child td {
  border-bottom: 0;
}

.fleet-table strong,
.fleet-table span {
  display: block;
}

.fleet-table span {
  margin-top: 3px;
  color: var(--muted);
  font-size: 13px;
}

.fleet-car-cell {
  display: flex;
  align-items: center;
  gap: 12px;
}

.fleet-car-thumb {
  display: grid;
  place-items: center;
  flex: 0 0 78px;
  width: 78px;
  height: 48px;
  border-radius: 8px;
  background: var(--soft);
}

.fleet-car-thumb .vehicle-svg {
  width: 72px;
}

.schedule-controls {
  display: flex;
  align-items: end;
  justify-content: flex-end;
  gap: 18px;
  flex-wrap: wrap;
}

.schedule-controls label {
  min-width: 180px;
}

.schedule-legend {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
  padding-bottom: 6px;
}

.schedule-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.schedule-legend i {
  width: 12px;
  height: 12px;
  border-radius: 3px;
}

.legend-available {
  background: #edf5f0;
  border: 1px solid #c9dfd5;
}

.legend-booked {
  background: #1f6f5b;
}

.legend-maintenance {
  background: #b6782c;
}

.schedule-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 10px 28px rgba(31, 28, 22, 0.08);
}

.schedule-table {
  width: 100%;
  min-width: 1180px;
  border-collapse: separate;
  border-spacing: 0;
}

.schedule-table th,
.schedule-table td {
  border-bottom: 1px solid var(--line);
  border-right: 1px solid var(--line);
  padding: 10px;
  text-align: center;
  vertical-align: middle;
}

.schedule-table thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  color: var(--muted);
  background: #f9f6ef;
  font-size: 13px;
}

.schedule-table thead th span {
  display: block;
  margin-top: 2px;
  color: var(--accent);
  font-size: 11px;
}

.schedule-table tr:last-child th,
.schedule-table tr:last-child td {
  border-bottom: 0;
}

.schedule-table th:last-child,
.schedule-table td:last-child {
  border-right: 0;
}

.schedule-car-col {
  position: sticky;
  left: 0;
  z-index: 3;
  width: 210px;
  min-width: 210px;
  background: #fffdf9;
  text-align: left;
}

.schedule-table tbody .schedule-car-col {
  z-index: 1;
}

.schedule-car-col strong,
.schedule-car-col span {
  display: block;
}

.schedule-car-col span {
  margin-top: 4px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.schedule-cell {
  width: 72px;
  min-width: 72px;
}

.schedule-cell span {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 34px;
  border-radius: 6px;
  padding: 4px;
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.schedule-cell.available span {
  color: #326b58;
  background: #edf5f0;
}

.schedule-cell.booked span {
  color: #fff;
  background: var(--brand);
}

.schedule-cell.maintenance span {
  color: #fff;
  background: #b6782c;
}

.empty-state {
  padding: 24px;
  border: 1px dashed var(--line);
  border-radius: 8px;
  background: rgba(255, 255, 255, 0.7);
  text-align: center;
}

.email-dialog {
  width: min(720px, calc(100vw - 28px));
  border: 0;
  border-radius: 8px;
  padding: 0;
  color: var(--ink);
  background: transparent;
}

.email-dialog::backdrop {
  background: rgba(10, 14, 14, 0.48);
}

.email-preview {
  padding: 22px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fffdf9;
  box-shadow: var(--shadow);
}

.email-toolbar {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 16px;
  margin-bottom: 16px;
}

.email-toolbar h2 {
  margin: 4px 0 0;
}

.email-body {
  display: grid;
  gap: 12px;
  line-height: 1.7;
}

.email-body p {
  margin: 0;
}

.email-body dl {
  display: grid;
  gap: 8px;
  margin: 0;
}

.email-body dl div {
  display: grid;
  grid-template-columns: 120px minmax(0, 1fr);
  gap: 12px;
  padding: 10px 0;
  border-bottom: 1px solid var(--line);
}

.email-body dt {
  color: var(--muted);
  font-weight: 800;
}

.email-body dd {
  margin: 0;
}

.site-footer {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 16px;
  flex-wrap: wrap;
  padding: 28px clamp(18px, 5vw, 64px) 36px;
  color: var(--muted);
  font-size: 12px;
}

.site-footer a {
  color: var(--muted);
  text-decoration: none;
}

.site-footer a:hover {
  color: var(--ink);
  text-decoration: underline;
}

.payment-summary {
  margin-bottom: 16px;
}

.payment-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 14px;
}

@media (max-width: 780px) {
  .app-header,
  .section-heading,
  .car-title-row,
  .price-row,
  .form-actions,
  .reservation-item {
    align-items: stretch;
    flex-direction: column;
  }

  .app-header {
    position: static;
  }

  .admin-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .hero,
  .reservation-layout,
  .info-layout,
  .guide-grid,
  .fleet-layout,
  .form-grid,
  .payment-grid {
    grid-template-columns: 1fr;
  }

  .reservation-item {
    grid-template-columns: 1fr;
  }

  .reservation-actions,
  .table-actions,
  .email-toolbar,
  .schedule-controls {
    justify-content: stretch;
  }

  .email-body dl div {
    grid-template-columns: 1fr;
    gap: 2px;
  }

  .hero h2 {
    font-size: 40px;
  }
}
