:root {
  --forest-950: #092219;
  --forest-900: #0f3023;
  --forest-800: #174b36;
  --forest-700: #216447;
  --leaf: #7fb18a;
  --cream: #f6f1e7;
  --paper: #fffdf9;
  --ink: #163025;
  --muted: #65736d;
  --line: #dce4de;
  --danger: #a73535;
  --warning: #9c6500;
  --success: #17623d;
  --shadow: 0 18px 50px rgba(11, 40, 29, .1);
  color: var(--ink);
  background: var(--cream);
  font-family: Inter, ui-sans-serif, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { scroll-behavior: smooth; }
body { margin: 0; min-width: 320px; background: var(--cream); }
body.modal-open { overflow: hidden; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
img { max-width: 100%; }
.hidden { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: rgba(9, 34, 25, .96);
  color: white;
  backdrop-filter: blur(14px);
  border-bottom: 1px solid rgba(255,255,255,.08);
}
.nav {
  width: min(1160px, calc(100% - 32px));
  min-height: 72px;
  margin: auto;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.brand { display: inline-flex; align-items: center; gap: 11px; font-size: 17px; font-weight: 950; letter-spacing: .13em; }
.brand img { width: 42px; height: 42px; border-radius: 12px; }
.brand small { display: block; color: #bdd7c8; font-size: 10px; letter-spacing: .18em; text-transform: uppercase; }
.nav-actions { display: flex; align-items: center; gap: 9px; flex-wrap: wrap; }

.button {
  display: inline-flex;
  min-height: 46px;
  padding: 11px 18px;
  align-items: center;
  justify-content: center;
  border-radius: 14px;
  border: 1px solid transparent;
  background: var(--forest-800);
  color: white;
  font-weight: 850;
  line-height: 1.15;
  transition: transform .15s ease, background .15s ease, box-shadow .15s ease;
}
.button:hover { transform: translateY(-1px); background: var(--forest-700); }
.button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible { outline: 3px solid rgba(127,177,138,.45); outline-offset: 2px; }
.button.light { background: white; color: var(--forest-950); }
.button.ghost { border-color: rgba(255,255,255,.34); background: transparent; }
.button.secondary { background: #eaf1ec; color: var(--forest-900); border-color: #d2dfd6; }
.button.danger { background: var(--danger); }
.button.small { min-height: 38px; padding: 8px 12px; border-radius: 11px; font-size: 14px; }
.button:disabled { opacity: .55; cursor: not-allowed; transform: none; }

.hero { overflow: hidden; color: white; background: radial-gradient(circle at 85% 10%, rgba(127,177,138,.35), transparent 25%), linear-gradient(135deg, var(--forest-950), var(--forest-800) 72%, #24704f); }
.hero-inner { width: min(1160px, calc(100% - 32px)); margin: auto; padding: 76px 0 66px; display: grid; grid-template-columns: 1.25fr .75fr; gap: 44px; align-items: center; }
.eyebrow { color: #c8e2d2; font-size: 12px; font-weight: 950; letter-spacing: .16em; text-transform: uppercase; }
h1, h2, h3 { color: inherit; letter-spacing: -.025em; }
h1 { margin: 13px 0 18px; max-width: 820px; font-size: clamp(42px, 7vw, 76px); line-height: .98; }
h2 { margin: 0 0 9px; font-size: clamp(27px, 4vw, 38px); }
h3 { margin: 0 0 8px; font-size: 20px; }
.lead { margin: 0; max-width: 760px; color: #e7f0eb; font-size: clamp(18px, 2.2vw, 21px); line-height: 1.58; }
.hero-card { padding: 24px; color: #4d3b00; background: #fff4c9; border: 1px solid #ffe49a; border-radius: 24px; box-shadow: var(--shadow); }
.hero-card > strong { display: block; margin-bottom: 8px; font-size: 27px; }
.founding-summary { display: grid; gap: 6px; margin-top: 18px; padding-top: 17px; border-top: 1px solid rgba(156,101,0,.28); line-height: 1.45; }
.founding-summary b { color: var(--forest-900); font-size: 18px; }
.founding-banner { display: grid; gap: 5px; margin: 18px 0; padding: 15px 17px; border: 1px solid #e3c676; border-radius: 16px; background: #fff6d9; color: #654d0a; line-height: 1.45; }
.founding-banner strong { color: var(--forest-900); }
.founding-banner span { font-size: 14px; }
.actions { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 24px; }

.container { width: min(1160px, calc(100% - 32px)); margin: auto; padding: 34px 0 64px; }
.narrow { width: min(760px, calc(100% - 32px)); }
.section { margin-top: 18px; padding: 28px; background: var(--paper); border: 1px solid var(--line); border-radius: 24px; box-shadow: 0 10px 32px rgba(14,47,34,.05); }
.section:first-child { margin-top: 0; }
.muted { color: var(--muted); line-height: 1.6; }
.small { font-size: 13px; }
.process-section { overflow: hidden; }
.process-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 14px; margin-top: 22px; }
.process-step { padding: 20px; border: 1px solid var(--line); border-radius: 18px; background: #f8faf8; }
.process-step > span { display: block; margin-bottom: 18px; color: var(--forest-700); font-size: 13px; font-weight: 950; letter-spacing: .14em; }
.process-step p { margin-bottom: 0; }
.market-welcome { margin: 18px 0; padding: clamp(24px, 5vw, 42px); border-radius: 24px; color: white; background: linear-gradient(135deg, var(--forest-950), var(--forest-800)); box-shadow: var(--shadow); }
.market-welcome .eyebrow { color: #c8e2d2; }
.market-welcome h1 { max-width: 760px; margin: 9px 0 12px; font-size: clamp(32px, 5vw, 52px); line-height: 1.02; }
.market-welcome p { max-width: 680px; margin: 0; color: #dce9e2; line-height: 1.55; }
.quick-actions { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 11px; margin-top: 24px; }
.quick-action { display: grid; gap: 5px; min-height: 128px; padding: 18px; text-align: left; color: var(--ink); background: #fff; border: 1px solid rgba(255,255,255,.3); border-radius: 17px; box-shadow: 0 12px 28px rgba(0,0,0,.11); transition: transform .15s ease, box-shadow .15s ease; }
.quick-action:hover { transform: translateY(-2px); box-shadow: 0 16px 34px rgba(0,0,0,.16); }
.quick-action:focus-visible { outline: 3px solid rgba(255,255,255,.65); outline-offset: 3px; }
.quick-action > span { color: var(--forest-700); font-size: 12px; font-weight: 950; letter-spacing: .13em; }
.quick-action strong { align-self: end; font-size: 18px; }
.quick-action small { color: var(--muted); font-size: 13px; }
.grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 13px; }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.cards { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 15px; margin-top: 20px; }
.feature { padding: 19px; border: 1px solid var(--line); border-radius: 18px; background: #f8faf8; }
.feature-icon { display: block; margin-bottom: 10px; font-size: 28px; }
.chips { display: flex; gap: 9px; flex-wrap: wrap; margin: 18px 0; }
.chip { padding: 9px 13px; background: #edf3ee; border: 1px solid #d9e5dc; border-radius: 999px; font-size: 14px; font-weight: 800; }

.form-stack { display: grid; gap: 14px; }
.field { display: grid; gap: 7px; }
.field > span, fieldset > legend { font-size: 13px; font-weight: 850; color: #385247; }
input, select, textarea {
  width: 100%;
  min-height: 48px;
  padding: 12px 13px;
  color: var(--ink);
  background: white;
  border: 1px solid #cad6ce;
  border-radius: 13px;
}
textarea { resize: vertical; min-height: 110px; }
fieldset { margin: 0; padding: 14px; border: 1px solid var(--line); border-radius: 15px; }
.check { display: flex; align-items: flex-start; gap: 10px; color: #41574d; font-size: 14px; line-height: 1.5; }
.check input { width: 20px; min-height: 20px; margin-top: 1px; flex: 0 0 auto; }
.message { padding: 13px 15px; border-radius: 13px; line-height: 1.45; }
.message.info { color: #25483a; background: #e7f1ea; border: 1px solid #cfe0d4; }
.message.success { color: #124d2f; background: #e5f6eb; border: 1px solid #bfe3ca; }
.message.error { color: #7d2727; background: #fdebea; border: 1px solid #efc3c0; }
.message.warning { color: #704a00; background: #fff4d6; border: 1px solid #ead49c; }

.toolbar { display: flex; align-items: end; gap: 12px; flex-wrap: wrap; margin: 18px 0; }
.toolbar .field { min-width: 170px; flex: 1; }
.tabs { display: flex; gap: 8px; overflow-x: auto; padding-bottom: 4px; }
.tab { white-space: nowrap; padding: 10px 14px; border: 1px solid var(--line); border-radius: 999px; background: white; color: var(--forest-900); font-weight: 850; }
.tab.active { color: white; background: var(--forest-800); border-color: var(--forest-800); }
.listing-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 15px; }
.listing { overflow: hidden; background: white; border: 1px solid var(--line); border-radius: 20px; }
.listing.urgent { border-color: #e6b05a; box-shadow: inset 0 4px #e3a23a; }
.listing-photo { width: 100%; aspect-ratio: 16 / 8; object-fit: cover; background: #e7eee9; }
.listing-body { padding: 18px; }
.listing-top { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.badge { display: inline-flex; padding: 5px 9px; border-radius: 999px; color: #24483a; background: #e8f1eb; font-size: 12px; font-weight: 900; }
.badge.urgent { color: #764800; background: #fff0ce; }
.badge.route { color: #1a4a67; background: #e3f2fb; }
.price { color: var(--forest-800); font-size: 24px; font-weight: 950; white-space: nowrap; }
.listing-meta { display: grid; grid-template-columns: 1fr 1fr; gap: 7px 14px; margin: 13px 0; color: #566860; font-size: 14px; }
.listing-note { white-space: pre-wrap; }
.route-intro { display: flex; align-items: end; justify-content: space-between; gap: 24px; margin: 18px 0 22px; }
.route-intro h2 { margin-top: 10px; }
.route-intro p { margin: 0; }
.route-actions { display: flex; justify-content: flex-end; gap: 9px; flex-wrap: wrap; }
.route-card { border-color: #cbdfe9; box-shadow: inset 0 4px #75aeca; }
.transport-request { border-color: #d9c781; box-shadow: inset 0 4px #d3ad42; }
.transport-load { margin: 0; color: var(--forest-900); font-size: 18px; }
.route-line { display: grid; grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr); align-items: center; gap: 12px; margin: 17px 0; font-size: clamp(18px, 3vw, 24px); }
.route-line strong:last-child { text-align: right; }
.route-arrow { color: #397899; font-size: 30px; font-weight: 950; }
.truck-contact { margin-top: 14px; }
.truck-contact .actions { margin-top: 10px; }
.empty { padding: 34px 20px; text-align: center; color: var(--muted); border: 1px dashed #bdcbc2; border-radius: 18px; }
.photo-preview { display: grid; grid-template-columns: repeat(5, 1fr); gap: 8px; }
.photo-preview img { width: 100%; aspect-ratio: 1; object-fit: cover; border-radius: 11px; }

.modal { position: fixed; inset: 0; z-index: 100; display: grid; place-items: center; padding: 18px; background: rgba(4,22,15,.68); }
.modal-panel { width: min(640px, 100%); max-height: calc(100vh - 36px); overflow: auto; padding: 24px; background: var(--paper); border-radius: 22px; box-shadow: 0 30px 80px rgba(0,0,0,.3); }
.modal-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 12px; }
.icon-button { width: 42px; height: 42px; border: 0; border-radius: 12px; color: var(--forest-900); background: #eaf0ec; font-size: 22px; }

.account-bar { padding: 12px 16px; border: 1px solid #cadae0; border-radius: 15px; background: #f7faf8; display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.admin-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.admin-table th, .admin-table td { padding: 10px; text-align: left; vertical-align: top; border-bottom: 1px solid var(--line); }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(145px, 1fr)); gap: 12px; margin: 18px 0; }
.stat { padding: 17px; background: #edf3ee; border-radius: 16px; }
.stat strong { display: block; font-size: 28px; }

.site-footer { border-top: 1px solid var(--line); background: #efe9de; }
.footer-inner { width: min(1160px, calc(100% - 32px)); margin: auto; padding: 28px 0 42px; display: flex; justify-content: space-between; gap: 20px; flex-wrap: wrap; }
.footer-links { display: flex; gap: 16px; flex-wrap: wrap; color: #315847; }

@media (max-width: 860px) {
  .hero-inner { grid-template-columns: 1fr; padding-top: 54px; }
  .hero-card { max-width: 560px; }
  .cards, .grid.three, .process-grid { grid-template-columns: 1fr 1fr; }
  .quick-actions { grid-template-columns: 1fr; }
  .quick-action { min-height: 96px; }
  .stats { grid-template-columns: 1fr 1fr; }
}
@media (max-width: 650px) {
  .nav {
    min-height: 66px;
    padding: 11px 0;
    flex-direction: column;
    align-items: stretch;
    justify-content: center;
    gap: 10px;
  }
  .brand { align-self: flex-start; min-width: 0; }
  .brand small { display: none; }
  .nav-actions { width: 100%; flex-wrap: nowrap; }
  .nav-actions .button { min-width: 0; min-height: 42px; padding: 9px 12px; flex: 1 1 0; font-size: 13px; white-space: nowrap; }
  .hero-inner { padding: 44px 0 48px; }
  .grid, .grid.three, .cards, .listing-grid, .process-grid { grid-template-columns: 1fr; }
  .section { padding: 20px; border-radius: 20px; }
  .listing-meta { grid-template-columns: 1fr; }
  .route-intro { align-items: stretch; flex-direction: column; }
  .route-actions { justify-content: stretch; }
  .route-actions .button { flex: 1; }
  .photo-preview { grid-template-columns: repeat(3, 1fr); }
  .admin-table { display: block; overflow-x: auto; }
}
