:root {
  --bg: #FAF6ED;
  --surface: #ffffff;
  --surface-muted: #F3EEE1;
  --fg: #21201C;
  --muted: #7A756B;
  --border: #E7E0D0;
  --primary: #E2662B;
  --primary-dark: #C9531E;
  --primary-fg: #ffffff;
  --navy: #1F2A37;
  --success: #1D8A4A;
  --success-bg: #E9F6EE;
  --warning: #B45309;
  --warning-bg: #FFF6E5;
  --danger: #C13B2E;
  --danger-bg: #FCEDEB;
  --info: #2563A8;
  --info-bg: #EAF2FB;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(33,32,28,0.04), 0 8px 24px rgba(33,32,28,0.06);
}

* { box-sizing: border-box; }

body {
  background: var(--bg);
  color: var(--fg);
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  font-size: 14.5px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3, .display {
  font-family: "Fraunces", Georgia, "Times New Roman", serif;
  font-weight: 600;
  letter-spacing: -0.01em;
  color: var(--navy);
}

.eyebrow {
  display: block;
  font-size: 11.5px;
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--primary);
  margin-bottom: 6px;
}

/* ---- Sidebar / topbar shell ---- */

.sidebar {
  width: 240px;
  min-height: 100vh;
  background: var(--surface);
  border-right: 1px solid var(--border);
}

.sidebar-brand {
  height: 60px;
  display: flex;
  align-items: center;
  padding: 0 20px;
  font-family: "Fraunces", Georgia, serif;
  font-weight: 600;
  font-size: 16px;
  border-bottom: 1px solid var(--border);
  color: var(--navy);
}

.sidebar-group { padding: 18px 12px 0; }

.sidebar-group-label {
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--muted);
  padding: 0 10px;
  margin-bottom: 6px;
}

.sidebar-link {
  display: block;
  padding: 8px 10px;
  border-radius: 9px;
  color: var(--fg);
  text-decoration: none;
  font-size: 14px;
  font-weight: 500;
}
.sidebar-link:hover { background: var(--surface-muted); color: var(--fg); }
.sidebar-link.active { background: var(--navy); color: #fff; }

.topbar {
  height: 60px;
  background: var(--surface);
  border-bottom: 1px solid var(--border);
}

.role-pill {
  display: inline-block;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  padding: 2px 8px;
  border-radius: 999px;
  background: var(--surface-muted);
  color: var(--muted);
}

/* ---- Cards & panels ---- */

.card {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  background: var(--surface);
}

.card-header {
  background: transparent;
  font-weight: 600;
  border-bottom: 1px solid var(--border);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  padding: 14px 18px;
}

.card-body { padding: 18px; }

.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
}
.stat-card .stat-label { color: var(--muted); font-size: 12.5px; font-weight: 600; text-transform: uppercase; letter-spacing: 0.04em; }
.stat-card .stat-value { font-family: "Fraunces", serif; font-size: 28px; font-weight: 600; color: var(--navy); }

/* ---- Forms ---- */

.form-label {
  font-weight: 600;
  font-size: 13px;
  color: var(--fg);
  margin-bottom: 5px;
}

.form-control, .form-select {
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 9px 12px;
  font-size: 14px;
  background: var(--surface);
}
.form-control:focus, .form-select:focus {
  border-color: var(--primary);
  box-shadow: 0 0 0 3px rgba(226,102,43,0.14);
}

/* ---- Buttons ---- */

.btn { border-radius: 10px; font-weight: 600; font-size: 14px; padding: 9px 18px; }

.btn-primary {
  background-color: var(--primary);
  border-color: var(--primary);
  color: var(--primary-fg);
}
.btn-primary:hover, .btn-primary:focus {
  background-color: var(--primary-dark);
  border-color: var(--primary-dark);
  color: var(--primary-fg);
}

.btn-outline-secondary {
  border-color: var(--border);
  color: var(--fg);
}
.btn-outline-secondary:hover { background: var(--surface-muted); color: var(--fg); border-color: var(--border); }

.btn-link { color: var(--primary); text-decoration: none; font-weight: 600; }
.btn-link:hover { color: var(--primary-dark); }

a.small, a { color: var(--primary); }

/* ---- Badges ---- */

.badge { font-weight: 600; letter-spacing: 0.01em; border-radius: 999px; padding: 4px 10px; font-size: 11.5px; }

/* ---- Nav pills (itinerary builder tabs) ---- */

.nav-pills .nav-link { color: var(--fg); border-radius: 9px; font-weight: 500; }
.nav-pills .nav-link.active { background-color: var(--navy); color: #fff; }

/* ---- Type-choice cards (package type picker) ---- */

.type-choice {
  border: 2px solid var(--border);
  border-radius: var(--radius);
  padding: 20px;
  cursor: pointer;
  background: var(--surface);
}
.type-choice.selected { border-color: var(--primary); background: #FDF1EA; }

/* ---- Slide-over "drawer" page framing (flight inventory, add forms) ---- */

.drawer-backdrop {
  min-height: 100vh;
  background: var(--surface-muted);
  padding: 32px 16px;
  display: flex;
  justify-content: center;
}

.drawer-panel {
  width: 100%;
  max-width: 900px;
  position: relative;
}

.drawer-close {
  position: absolute;
  top: -4px;
  right: 0;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  color: var(--fg);
  text-decoration: none;
  font-size: 16px;
}
.drawer-close:hover { background: var(--surface-muted); color: var(--fg); }

/* ---- Modal (Add Flight Inventory, etc.) ---- */

.modal-content {
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: 0 24px 64px rgba(33,32,28,0.22);
}
.modal-header {
  background: var(--surface-muted);
  border-bottom: 1px solid var(--border);
  border-top-left-radius: var(--radius);
  border-top-right-radius: var(--radius);
  padding: 18px 24px;
  align-items: flex-start;
}
.modal-header .eyebrow { margin-bottom: 2px; }
.modal-header .modal-title { font-size: 20px; }
.modal-body { padding: 24px; background: var(--bg); }
.modal-body .card:last-child { margin-bottom: 0 !important; }
.modal-footer {
  background: var(--surface);
  border-top: 1px solid var(--border);
  border-bottom-left-radius: var(--radius);
  border-bottom-right-radius: var(--radius);
  padding: 16px 24px;
}
.modal-backdrop.show { opacity: 0.55; }

.leg-row {
  background: var(--surface-muted);
  border-radius: 10px;
  padding: 12px;
  margin-bottom: 10px;
}
.leg-row-label {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 11px;
  font-weight: 700;
  color: var(--muted);
  width: 44px;
}

.status-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 999px;
  flex: 0 0 auto;
}

.leg-field-label {
  display: block;
  font-size: 10.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--muted);
  margin-bottom: 3px;
}
.leg-route { display: flex; align-items: flex-end; gap: 10px; }
.leg-route-side { flex: 1; min-width: 0; }
.leg-route-arrow { color: var(--muted); font-size: 16px; flex: 0 0 auto; padding-bottom: 7px; }
@media (max-width: 480px) {
  .leg-route { flex-wrap: wrap; }
  .leg-route-arrow { display: none; }
}

/* ---- Itinerary builder ---- */

.day-column {
  width: 280px;
  flex: 0 0 auto;
  background: var(--surface-muted);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 12px;
}
.day-columns { display: flex; gap: 16px; overflow-x: auto; padding-bottom: 12px; }
.itinerary-item {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px;
  padding: 10px;
  margin-bottom: 8px;
  font-size: 13px;
}

.summary-card dl { margin: 0; }
.summary-row { display: flex; justify-content: space-between; padding: 3px 0; font-size: 13px; }

/* ---- Public package page ---- */

.public-hero {
  background: var(--navy);
  color: #fff;
  border-radius: var(--radius);
  padding: 36px 32px;
}
.public-hero .eyebrow { color: #F0A87B; }
.public-hero h1 { color: #fff; }

/* ---- Marketplace cards ---- */

.marketplace-card { transition: transform .12s ease, box-shadow .12s ease; }
.marketplace-card:hover { transform: translateY(-2px); box-shadow: 0 4px 8px rgba(33,32,28,0.06), 0 16px 32px rgba(33,32,28,0.09); }
