* { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --cedar: #1a3a2a;
  --cedar-mid: #2d5c42;
  --cream: #f5f0e8;
  --warm: #e8dfc8;
  --accent: #c8522a;
  --text: #1a1a18;
  --muted: #5a5a52;
  --white: #ffffff;
}

body {
  background: var(--cream);
  color: var(--text);
  font-family: 'DM Sans', sans-serif;
  min-height: 100vh;
}

h1, h2, h3, .serif { font-family: 'Instrument Serif', serif; }

nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 32px;
  background: var(--cream);
  border-bottom: 1px solid var(--warm);
}

.logo {
  display: flex;
  align-items: center;
  text-decoration: none;
}

.logo-img {
  height: 34px;
  width: auto;
  border-radius: 7px;
  display: block;
}

.logo-dot { width: 8px; height: 8px; background: var(--accent); border-radius: 50%; display: inline-block; }

.nav-right { display: flex; align-items: center; gap: 16px; font-size: 14px; color: var(--muted); }
.nav-right a { color: var(--cedar-mid); text-decoration: none; font-weight: 500; }

.page {
  max-width: 640px;
  margin: 0 auto;
  padding: 40px 24px 80px;
}

.page-title {
  font-size: clamp(28px, 4vw, 38px);
  color: var(--cedar);
  margin-bottom: 8px;
}

.page-sub { color: var(--muted); font-size: 14px; margin-bottom: 32px; }

.card {
  background: var(--white);
  border: 1px solid var(--warm);
  border-radius: 14px;
  padding: 24px;
  margin-bottom: 16px;
}

.field { margin-bottom: 18px; }

.field label {
  display: block;
  font-size: 13px;
  font-weight: 500;
  color: var(--cedar);
  margin-bottom: 6px;
}

.field .hint { font-size: 12px; color: var(--muted); margin-top: 4px; }

input, textarea, select {
  width: 100%;
  background: var(--cream);
  border: 1px solid var(--warm);
  border-radius: 10px;
  padding: 12px 14px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.15s;
}

input:focus, textarea:focus, select:focus { border-color: var(--cedar-mid); }

textarea { resize: vertical; min-height: 80px; }

.btn {
  display: inline-block;
  border: none;
  border-radius: 10px;
  padding: 13px 22px;
  font-family: 'DM Sans', sans-serif;
  font-size: 14px;
  font-weight: 500;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: transform 0.1s, background 0.15s;
}

.btn-primary { background: var(--accent); color: #fff; width: 100%; }
.btn-primary:hover { background: #b8461f; }
.btn-primary:disabled { opacity: 0.6; cursor: not-allowed; }

.btn-secondary { background: var(--cedar); color: var(--cream); width: 100%; }
.btn-secondary:hover { background: var(--cedar-mid); }

.btn-outline { background: transparent; border: 1px solid var(--cedar); color: var(--cedar); width: 100%; }

.tabs { display: flex; gap: 4px; background: var(--warm); border-radius: 10px; padding: 4px; margin-bottom: 24px; }
.tab { flex: 1; text-align: center; padding: 10px; border-radius: 8px; font-size: 14px; font-weight: 500; cursor: pointer; color: var(--muted); }
.tab.active { background: var(--cedar); color: var(--cream); }

.role-cards { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; margin-bottom: 18px; }
.role-card { border: 1.5px solid var(--warm); border-radius: 12px; padding: 16px; text-align: center; cursor: pointer; font-size: 13px; font-weight: 500; }
.role-card.selected { border-color: var(--accent); background: #fdf3ee; }

.error-msg { font-size: 13px; color: var(--accent); margin-top: 10px; display: none; }
.success-msg { font-size: 13px; color: var(--cedar-mid); margin-top: 10px; display: none; }

.empty-state { text-align: center; padding: 40px 20px; color: var(--muted); font-size: 14px; }

.list-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 16px;
  border: 1px solid var(--warm);
  border-radius: 12px;
  margin-bottom: 10px;
  text-decoration: none;
  color: var(--text);
  background: var(--white);
}
.list-item:hover { border-color: var(--cedar-mid); }
.list-item-title { font-size: 14px; font-weight: 500; margin-bottom: 3px; }
.list-item-meta { font-size: 12px; color: var(--muted); }

.badge { font-size: 11px; font-weight: 500; padding: 4px 10px; border-radius: 99px; white-space: nowrap; }
.badge-submitted, .badge-active { background: #fef3ec; color: #c8522a; }
.badge-matched, .badge-item_ordered, .badge-item_packed, .badge-in_transit { background: #edf2fe; color: #2c4db5; }
.badge-delivered, .badge-completed { background: #e6f4ed; color: #1a6b3a; }
.badge-disputed, .badge-cancelled { background: #fde8e8; color: #b03a3a; }

.section-label {
  font-size: 12px;
  font-weight: 500;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  margin: 28px 0 12px;
}

.timeline { list-style: none; }
.timeline li {
  position: relative;
  padding: 0 0 24px 28px;
  border-left: 2px solid var(--warm);
  margin-left: 6px;
}
.timeline li:last-child { border-left-color: transparent; }
.timeline li::before {
  content: '';
  position: absolute;
  left: -7px; top: 0;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: var(--warm);
}
.timeline li.done::before { background: var(--cedar-mid); }
.timeline li.current::before { background: var(--accent); box-shadow: 0 0 0 4px #fdf3ee; }
.timeline-label { font-size: 14px; font-weight: 500; }
.timeline-time { font-size: 12px; color: var(--muted); margin-top: 2px; }

.loading { text-align: center; padding: 60px 20px; color: var(--muted); font-size: 14px; }

.price-row { display: flex; justify-content: space-between; font-size: 13px; padding: 5px 0; color: var(--muted); }

@media (max-width: 500px) {
  .page { padding: 28px 18px 60px; }
  .role-cards { grid-template-columns: 1fr; }
}

/* Public welcome page */
.landing-page { background: var(--cream); color: var(--text); }
.landing-header { position: sticky; top: 0; z-index: 10; background: rgba(245, 240, 232, .86); border-bottom: 1px solid rgba(232, 223, 200, .8); backdrop-filter: blur(12px); }
.landing-nav { height: 56px; max-width: 1024px; margin: 0 auto; padding: 0 24px; display: flex; align-items: center; justify-content: space-between; gap: 24px; }
.landing-brand, .landing-brand:hover { color: var(--text); font-family: 'Instrument Serif', serif; font-size: 24px; line-height: 1; text-decoration: none; }
.landing-links { display: flex; gap: 32px; }
.landing-links a, .landing-login { color: var(--muted); font-size: 14px; text-decoration: none; transition: color .15s; }
.landing-links a:hover, .landing-login:hover { color: var(--text); }
.landing-account-links { display: flex; align-items: center; gap: 8px; }
.landing-login, .landing-signup { padding: 8px 12px; }
.landing-signup { background: var(--accent); border-radius: 7px; color: #fff; font-size: 14px; font-weight: 500; text-decoration: none; }
.landing-signup:hover, .landing-button-primary:hover { background: #b8461f; }
.landing-hero { max-width: 768px; margin: 0 auto; padding: 112px 24px 160px; text-align: center; }
.landing-hero h1, .landing-content-narrow h2 { margin: 0; font-family: 'Instrument Serif', serif; font-size: clamp(52px, 8vw, 76px); font-weight: 400; letter-spacing: -.035em; line-height: 1.05; }
.landing-hero em, .landing-content-narrow em { color: var(--accent); font-style: italic; }
.landing-hero > p { max-width: 420px; margin: 30px auto 0; color: var(--muted); font-size: 18px; }
.landing-cta-row { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 38px; }
.landing-button { display: inline-block; border-radius: 8px; padding: 14px 20px; font-size: 15px; font-weight: 500; text-decoration: none; transition: background .15s, transform .15s; }
.landing-button:hover { transform: translateY(-1px); }
.landing-button-primary { background: var(--accent); color: #fff; }
.landing-button-secondary { border: 1px solid var(--warm); color: var(--text); }
.landing-button-secondary:hover { background: #eee7d8; }
.landing-button-cedar { margin-top: 36px; background: var(--cedar); color: var(--cream); }
.landing-button-cedar:hover { background: var(--cedar-mid); }
.landing-section, .landing-final-cta { border-top: 1px solid var(--warm); }
.landing-section { padding: 72px 24px; }
.landing-content-wide { max-width: 1024px; margin: 0 auto; }
.landing-content-wide > h2 { margin: 0; text-align: center; font-family: 'Instrument Serif', serif; font-size: 42px; font-weight: 400; }
.landing-steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 24px; margin: 40px 0 0; padding: 0; list-style: none; color: var(--muted); font-size: 14px; line-height: 1.55; }
.landing-steps span { color: var(--accent); font-family: 'Instrument Serif', serif; font-size: 30px; }
.landing-steps strong { color: var(--text); }
.landing-travelers { padding: 112px 24px; background: rgba(232, 223, 200, .22); text-align: center; }
.landing-content-narrow { max-width: 640px; margin: 0 auto; text-align: center; }
.landing-content-narrow h2 { font-size: clamp(42px, 6vw, 58px); }
.landing-content-narrow > p { max-width: 530px; margin: 24px auto 0; color: var(--muted); font-size: 16px; line-height: 1.6; }
.landing-content-narrow .landing-traveler-note { margin-top: 44px; font-size: 14px; font-weight: 500; }
.landing-trust { padding: 104px 24px; }
.landing-trust-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 48px; max-width: 840px; margin: 0 auto; text-align: center; }
.landing-trust h3 { margin: 0; font-family: 'Instrument Serif', serif; font-size: 30px; font-weight: 400; }
.landing-trust p { margin: 8px 0 0; color: var(--muted); font-size: 14px; line-height: 1.5; }
.landing-faq { padding: 104px 24px; }
.landing-questions { margin-top: 36px; border-top: 1px solid var(--warm); text-align: left; }
.landing-questions details { border-bottom: 1px solid var(--warm); padding: 20px 0; }
.landing-questions summary { cursor: pointer; font-family: 'Instrument Serif', serif; font-size: 22px; list-style: none; }
.landing-questions summary::-webkit-details-marker { display: none; }
.landing-questions summary::after { content: '+'; float: right; color: var(--accent); font-family: 'DM Sans', sans-serif; }
.landing-questions details[open] summary::after { content: '−'; }
.landing-questions p { margin: 12px 28px 0 0; color: var(--muted); font-size: 14px; line-height: 1.55; }
.landing-final-cta { padding: 112px 24px; text-align: center; }
.landing-footer { border-top: 1px solid var(--warm); padding: 40px 24px; color: var(--muted); font-size: 14px; text-align: center; }

@media (max-width: 700px) {
  .landing-links { display: none; }
  .landing-nav { padding: 0 18px; }
  .landing-hero { padding: 88px 20px 108px; }
  .landing-steps, .landing-trust-grid { grid-template-columns: 1fr; gap: 28px; }
  .landing-section, .landing-faq, .landing-trust { padding: 68px 20px; }
  .landing-travelers, .landing-final-cta { padding: 88px 20px; }
}
