:root {
  --amber: #ef9f27;
  --amber-light: #fac775;
  --cream: #fff8ed;
  --coral: #d85a30;
  --coral-soft: #fbe7dc;
  --teal: #0f6e56;
  --teal-soft: #e4f4ee;
  --dark: #2c2c2a;
  --paper: #f1efe8;
  --line: #d3d1c7;
  --muted: #77756f;
  --white: #fff;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  background: var(--cream);
  color: var(--dark);
  font-family: "DM Sans", system-ui, sans-serif;
}

a {
  color: inherit;
  text-decoration: none;
}

.topbar {
  position: sticky;
  top: 0;
  z-index: 10;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 72px;
  padding: 0 32px;
  background: rgba(44, 44, 42, .96);
  color: var(--white);
  backdrop-filter: blur(16px);
}

.brand {
  display: inline-flex;
  align-items: center;
  color: var(--amber-light);
  font-weight: 700;
}

.brand img {
  display: block;
  width: 176px;
  height: auto;
}

nav {
  display: flex;
  align-items: center;
  gap: 18px;
  color: #d8d5cb;
  font-size: 14px;
}

.nav-pill {
  min-height: 38px;
  border-radius: 999px;
  padding: 9px 16px;
  background: var(--amber);
  color: var(--dark);
  font-weight: 700;
}

.link-button {
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  cursor: pointer;
}

.hero {
  min-height: 610px;
  padding: 96px 24px 86px;
  background: linear-gradient(90deg, rgba(44, 44, 42, .95), rgba(44, 44, 42, .62), rgba(15, 110, 86, .48)), url("https://images.unsplash.com/photo-1565123409695-7b5ef63a2efb?auto=format&fit=crop&w=1600&q=80");
  background-size: cover;
  background-position: center;
  color: var(--white);
}

.hero-inner {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
}

.hero h1,
.section h2,
.panel h1,
.panel h2,
.section-head h1 {
  margin: 0;
  font-family: "Playfair Display", Georgia, serif;
}

.hero h1 {
  max-width: 760px;
  margin: 0 0 18px;
  font-size: 68px;
  line-height: .98;
}

.hero p {
  max-width: 620px;
  margin: 0 0 28px;
  color: #e2ded3;
  font-size: 18px;
  line-height: 1.6;
}

.badge,
.eyebrow {
  margin: 0 0 10px;
  color: var(--coral);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: .12em;
  text-transform: uppercase;
}

.hero .badge {
  color: var(--amber-light);
}

.hero-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
}

.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 44px;
  border: 0;
  border-radius: 8px;
  padding: 0 20px;
  background: var(--coral);
  color: var(--white);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.button.secondary {
  background: var(--dark);
}

.button.ghost {
  border: 1px solid rgba(255, 255, 255, .38);
  background: rgba(255, 255, 255, .12);
  color: var(--white);
}

.trust-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-top: 28px;
}

.trust-row span {
  border: 1px solid rgba(255, 255, 255, .22);
  border-radius: 999px;
  padding: 9px 14px;
  background: rgba(255, 255, 255, .1);
  color: #f6efe4;
  font-size: 13px;
  font-weight: 700;
}

.how-section {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  width: min(1120px, calc(100% - 32px));
  margin: -44px auto 0;
  position: relative;
  z-index: 2;
}

.how-card {
  display: flex;
  align-items: center;
  gap: 14px;
  min-height: 88px;
  border: 1px solid rgba(211, 209, 199, .85);
  border-radius: 8px;
  padding: 18px;
  background: var(--white);
  box-shadow: 0 18px 46px rgba(44, 44, 42, .1);
}

.how-card strong {
  display: grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  background: var(--coral-soft);
  color: var(--coral);
}

.how-card span {
  font-weight: 700;
}

.section,
.admin-shell {
  width: min(1120px, calc(100% - 32px));
  margin: 0 auto;
  padding: 64px 0;
}

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

.section h2 {
  font-size: 42px;
}

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

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

.finder-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) minmax(220px, .6fr);
  gap: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  margin-bottom: 24px;
  padding: 14px;
  background: var(--white);
  box-shadow: 0 14px 30px rgba(44, 44, 42, .06);
}

.truck-card,
.panel,
.admin-row {
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--white);
}

.truck-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
  cursor: pointer;
  transition: transform .18s ease, box-shadow .18s ease;
}

.truck-card:hover,
.truck-card:focus {
  outline: none;
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(44, 44, 42, .14);
}

.truck-media {
  display: grid;
  place-items: center;
  height: 220px;
  border-bottom: 1px solid var(--line);
  background: #faeeda;
  font-size: 76px;
  flex: 0 0 auto;
}

.truck-media img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.truck-body {
  display: flex;
  flex: 1;
  flex-direction: column;
  padding: 20px;
  background: var(--white);
}

.truck-body h3 {
  margin: 0 0 10px;
  color: var(--dark);
  font-size: 24px;
  line-height: 1.15;
}

.truck-body p {
  color: var(--muted);
  line-height: 1.5;
}

.truck-body > p:not(.eyebrow) {
  min-height: 64px;
  margin: 0;
}

.truck-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin: 16px 0;
  color: var(--teal);
  font-size: 13px;
  font-weight: 700;
}

.truck-meta span {
  border-radius: 999px;
  padding: 6px 10px;
  background: var(--teal-soft);
}

.card-action {
  width: 100%;
  min-height: 46px;
  margin-top: auto;
  border: 1px solid var(--dark);
  border-radius: 8px;
  background: var(--white);
  color: var(--dark);
  font: inherit;
  font-weight: 700;
  cursor: pointer;
}

.card-action:hover {
  background: var(--dark);
  color: var(--white);
}

.empty-state {
  grid-column: 1 / -1;
  border: 1px dashed var(--line);
  border-radius: 8px;
  padding: 28px;
  background: var(--white);
  color: var(--muted);
  text-align: center;
}

body.modal-open {
  overflow: hidden;
}

.detail-overlay {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: grid;
  place-items: center;
  padding: 20px;
  background: rgba(44, 44, 42, .68);
}

.detail-modal {
  position: relative;
  display: grid;
  grid-template-columns: 220px 1fr;
  width: min(780px, 100%);
  max-height: min(680px, calc(100vh - 40px));
  overflow: auto;
  border-radius: 8px;
  background: var(--white);
  box-shadow: 0 28px 80px rgba(0, 0, 0, .28);
}

.detail-close {
  position: absolute;
  top: 12px;
  right: 12px;
  display: grid;
  place-items: center;
  width: 36px;
  height: 36px;
  border: 0;
  border-radius: 50%;
  background: var(--dark);
  color: var(--white);
  font-size: 24px;
  line-height: 1;
  cursor: pointer;
}

.detail-hero {
  display: grid;
  place-items: center;
  min-height: 100%;
  background: #faeeda;
  font-size: 96px;
}

.detail-hero img {
  width: 100%;
  height: 100%;
  min-height: 100%;
  object-fit: cover;
}

.detail-content {
  padding: 34px;
}

.detail-content h2 {
  margin: 0 0 12px;
  font-family: "Playfair Display", Georgia, serif;
  font-size: 42px;
}

.detail-description {
  color: var(--muted);
  font-size: 16px;
  line-height: 1.6;
}

.detail-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  margin: 22px 0;
}

.detail-grid div {
  display: grid;
  gap: 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 13px;
  background: var(--paper);
}

.detail-grid span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  text-transform: uppercase;
}

.detail-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.quote-form {
  display: grid;
  gap: 12px;
  margin-top: 24px;
  border-top: 1px solid var(--line);
  padding-top: 20px;
}

.quote-form h3 {
  margin: 0;
  font-size: 22px;
}

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

.quote-status {
  min-height: 22px;
  margin: 0;
  color: var(--teal);
  font-weight: 700;
}

footer {
  display: flex;
  justify-content: center;
  gap: 12px;
  padding: 28px;
  background: var(--dark);
  color: #c8c3b8;
}

.panel {
  padding: 24px;
}

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

form {
  display: grid;
  gap: 14px;
}

label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 11px 12px;
  background: var(--white);
  color: var(--dark);
  font: inherit;
}

input:focus,
textarea:focus,
select:focus {
  outline: 2px solid rgba(239, 159, 39, .3);
  border-color: var(--amber);
}

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

.checkbox {
  display: flex;
  align-items: center;
  gap: 10px;
}

.checkbox input {
  width: auto;
}

.admin-list {
  display: grid;
  gap: 10px;
}

.requests-panel {
  margin-top: 18px;
}

.admin-row {
  display: grid;
  grid-template-columns: 48px 1fr auto auto;
  align-items: center;
  gap: 12px;
  padding: 12px;
}

.admin-row h3,
.admin-row p {
  margin: 0;
}

.admin-row p {
  color: var(--muted);
  font-size: 13px;
}

.row-emoji {
  display: grid;
  place-items: center;
  width: 48px;
  height: 48px;
  border-radius: 8px;
  background: #faeeda;
  font-size: 26px;
  overflow: hidden;
}

.row-emoji img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.admin-row button {
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: var(--white);
  cursor: pointer;
}

.request-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 14px;
  background: var(--white);
}

.request-row h3,
.request-row p {
  margin: 0;
}

.request-row p {
  color: var(--muted);
}

.request-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 14px;
  margin-top: 8px;
  color: var(--muted);
  font-size: 14px;
}

.request-details span {
  overflow-wrap: anywhere;
}

.request-message {
  border-left: 3px solid var(--amber);
  margin-top: 12px !important;
  padding-left: 10px;
  color: var(--dark) !important;
  white-space: pre-line;
}

@media (max-width: 760px) {
  .topbar,
  .section-head,
  footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .topbar {
    gap: 14px;
    padding: 18px 20px;
  }

  .brand img {
    width: 158px;
  }

  nav {
    width: 100%;
    justify-content: space-between;
  }

  .hero {
    min-height: auto;
    padding: 72px 20px 92px;
  }

  .hero-inner {
    width: 100%;
  }

  .hero h1 {
    font-size: 44px;
  }

  .hero p {
    font-size: 16px;
  }

  .hero-actions,
  .hero-actions .button {
    width: 100%;
  }

  .trust-row span {
    flex: 1 1 100%;
  }

  .how-section {
    grid-template-columns: 1fr;
    margin-top: -52px;
  }

  .section h2 {
    font-size: 34px;
  }

  .finder-panel {
    grid-template-columns: 1fr;
  }

  .auth-grid,
  .admin-grid,
  .form-row {
    grid-template-columns: 1fr;
  }

  .admin-row {
    grid-template-columns: 48px 1fr;
  }

  .detail-modal {
    grid-template-columns: 1fr;
  }

  .detail-hero {
    min-height: 170px;
  }

  .detail-content {
    padding: 24px;
  }

  .detail-content h2 {
    font-size: 34px;
  }

  .detail-grid {
    grid-template-columns: 1fr;
  }

  .quote-row,
  .request-row {
    grid-template-columns: 1fr;
  }

  .request-details {
    grid-template-columns: 1fr;
  }
}
