/* Family Travel Hub — Fora-inspired warm editorial design */
:root {
  --bg: #faf5ee;
  --bg-grad: linear-gradient(160deg, #fdf8f1 0%, #f7efe3 55%, #f3e9de 100%);
  --card: #ffffff;
  --ink: #211d1a;
  --ink-soft: #6f665d;
  --line: #e9dfd2;
  --accent: #1f4d3f;
  --accent-soft: #e3efe9;
  --gold: #b98a3f;
  --pill-inquiry: #fde8dc;
  --danger: #b3422f;
  --radius: 16px;
  --shadow: 0 2px 6px rgba(60,45,30,.06), 0 10px 30px rgba(60,45,30,.08);
  --shadow-lg: 0 6px 16px rgba(60,45,30,.10), 0 24px 60px rgba(60,45,30,.14);
  --serif: 'Fraunces', Georgia, serif;
  --sans: 'Inter', -apple-system, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--sans); color: var(--ink); background: var(--bg-grad) fixed; min-height: 100vh; font-size: 15px; line-height: 1.5; }
h1, h2, h3, .serif { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; }
a { color: var(--accent); text-decoration: none; }
button { font-family: var(--sans); cursor: pointer; }
input, select, textarea { font-family: var(--sans); font-size: 14px; }

.boot-splash { display:flex; align-items:center; justify-content:center; height:100vh; }
.boot-logo { font-family: var(--serif); font-size: 28px; animation: pulse 1.2s ease infinite; }
@keyframes pulse { 50% { opacity:.4 } }

/* ---------- layout ---------- */
.shell { display: flex; min-height: 100vh; }
.sidebar {
  width: 220px; flex-shrink: 0; padding: 28px 18px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px; border-right: 1px solid var(--line);
  background: rgba(255,255,255,.45); backdrop-filter: blur(8px);
}
.brand { font-family: var(--serif); font-size: 22px; margin: 0 10px 22px; }
.brand small { display:block; font-family: var(--sans); font-size:10px; letter-spacing:.18em; text-transform:uppercase; color:var(--ink-soft); margin-top:2px; }
.nav-item {
  display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px;
  color: var(--ink); font-weight: 500; font-size: 14px; border: none; background: none; text-align: left; width: 100%;
}
.nav-item:hover { background: rgba(255,255,255,.9); }
.nav-item.active { background: var(--ink); color: #fff; }
.nav-item .ic { font-size: 16px; width: 20px; text-align: center; }
.sidebar .spacer { flex: 1; }
.user-chip { display:flex; align-items:center; gap:10px; padding:10px 12px; font-size:13px; color:var(--ink-soft); }
.user-chip .avatar { width:30px; height:30px; border-radius:50%; background:var(--accent); color:#fff; display:flex; align-items:center; justify-content:center; font-weight:600; font-size:12px; }

.main { flex: 1; padding: 34px 44px 80px; max-width: 1200px; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 34px; margin: 0; }
.page-head .sub { color: var(--ink-soft); margin-top: 4px; font-size: 14px; }

/* ---------- buttons & inputs ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 8px; padding: 10px 18px; border-radius: 999px;
  border: 1px solid var(--ink); background: var(--ink); color: #fff; font-weight: 600; font-size: 14px;
  transition: transform .08s ease, box-shadow .15s;
}
.btn:hover { transform: translateY(-1px); box-shadow: var(--shadow); }
.btn.secondary { background: transparent; color: var(--ink); border-color: var(--line); background: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--ink-soft); }
.btn.danger { background: transparent; color: var(--danger); border-color: var(--danger); }
.btn.small { padding: 6px 13px; font-size: 13px; }
.btn:disabled { opacity: .5; cursor: default; transform: none; }

.field { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; }
.field label { font-size: 12px; font-weight: 600; letter-spacing: .04em; text-transform: uppercase; color: var(--ink-soft); }
.field input, .field select, .field textarea {
  padding: 10px 12px; border: 1px solid var(--line); border-radius: 10px; background: #fff; outline: none; width: 100%;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.field textarea { min-height: 70px; resize: vertical; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 16px; }
.form-grid .full { grid-column: 1 / -1; }
.form-grid-3 { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0 14px; }

/* ---------- vignette cards (dashboard) ---------- */
.section-label { font-family: var(--serif); font-style: italic; font-size: 21px; margin: 30px 0 14px; }
.vignette-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 20px; }
.vignette {
  background: var(--card); border-radius: var(--radius); overflow: hidden; box-shadow: var(--shadow);
  cursor: pointer; transition: transform .15s ease, box-shadow .2s ease; border: 1px solid rgba(233,223,210,.6);
}
.vignette:hover { transform: translateY(-4px); box-shadow: var(--shadow-lg); }
.vignette .cover { height: 140px; background: linear-gradient(135deg,#d8c8b2,#b5a58f); background-size: cover; background-position: center; position: relative; }
.vignette .cover .status-pill { position: absolute; top: 10px; left: 10px; }
.vignette .cover .days-badge { position:absolute; top:10px; right:10px; background:rgba(255,255,255,.92); border-radius:999px; font-size:11px; font-weight:600; padding:3px 9px; }
.vignette .body { padding: 13px 15px 15px; }
.vignette .title { font-family: var(--serif); font-size: 17px; font-weight: 600; margin: 0 0 3px; }
.vignette .meta { font-size: 12.5px; color: var(--ink-soft); display: flex; align-items: center; gap: 5px; }
.vignette .meta + .meta { margin-top: 2px; }
.vignette .pax-row { display: flex; margin-top: 10px; }
.avatar-sm { width: 24px; height: 24px; border-radius: 50%; background: var(--accent); color: #fff; font-size: 10px; font-weight: 600; display: flex; align-items: center; justify-content: center; border: 2px solid #fff; margin-left: -6px; }
.avatar-sm:first-child { margin-left: 0; }

.status-pill { font-size: 10.5px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; padding: 3px 9px; border-radius: 999px; background: #fff; }
.status-planning { background:#fdf3d7; color:#8a6d1a; }
.status-inquiry { background:#fde8dc; color:#a05325; }
.status-booking { background:#e8e3fb; color:#5b4bb5; }
.status-confirmed { background:#ddefe4; color:#1f6b45; }
.status-completed { background:#e8e6e2; color:#6f665d; }
.status-cancelled { background:#f8dcd6; color:#a03b28; }

.filter-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.filter-bar .tab { border: 1px solid var(--line); background: #fff; padding: 7px 16px; border-radius: 999px; font-size: 13px; font-weight: 600; color: var(--ink-soft); }
.filter-bar .tab.active { background: var(--ink); color: #fff; border-color: var(--ink); }
.search-input { padding: 8px 14px; border: 1px solid var(--line); border-radius: 999px; width: 210px; outline: none; background:#fff; }

.empty-state { text-align: center; padding: 60px 20px; color: var(--ink-soft); }
.empty-state .big { font-size: 40px; margin-bottom: 8px; }

/* ---------- trip detail ---------- */
.trip-hero { border-radius: 20px; overflow: hidden; position: relative; min-height: 240px; display: flex; align-items: flex-end; box-shadow: var(--shadow-lg); background: linear-gradient(135deg,#d8c8b2,#a99878); background-size: cover; background-position: center; margin-bottom: 6px; }
.trip-hero::before { content: ''; position: absolute; inset: 0; background: linear-gradient(180deg, rgba(0,0,0,0) 30%, rgba(10,8,5,.68)); }
.trip-hero .hero-content { position: relative; padding: 26px 30px; color: #fff; width: 100%; }
.trip-hero h1 { margin: 0 0 6px; font-size: 36px; color: #fff; }
.trip-hero .hero-meta { display: flex; gap: 16px; flex-wrap: wrap; font-size: 14px; opacity: .95; align-items:center; }
.trip-hero .hero-actions { position: absolute; top: 16px; right: 16px; display: flex; gap: 8px; }
.hero-credit { position:absolute; bottom:6px; right:12px; font-size:10px; color:rgba(255,255,255,.65); }

.trip-layout { display: grid; grid-template-columns: 1fr 320px; gap: 24px; margin-top: 24px; align-items: start; }
@media (max-width: 980px) { .trip-layout { grid-template-columns: 1fr; } .sidebar { display:none; } .main { padding: 20px; } .mobile-nav{display:flex!important;} }

.panel { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px 22px; border: 1px solid rgba(233,223,210,.6); margin-bottom: 20px; }
.panel h3 { margin: 0 0 14px; font-size: 19px; display: flex; align-items: center; gap: 8px; }
.panel h3 .grow { flex: 1; }

#trip-map { height: 260px; border-radius: 12px; border: 1px solid var(--line); }

/* itinerary timeline */
.timeline { position: relative; }
.day-group { margin-bottom: 20px; }
.day-label { font-family: var(--serif); font-style: italic; font-size: 16px; color: var(--ink-soft); margin-bottom: 10px; border-bottom: 1px dashed var(--line); padding-bottom: 5px; }
.seg-card { display: flex; gap: 14px; background: #fdfaf5; border: 1px solid var(--line); border-radius: 14px; padding: 14px 16px; margin-bottom: 10px; }
.seg-card .seg-icon { width: 40px; height: 40px; flex-shrink: 0; border-radius: 12px; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 19px; }
.seg-card .seg-body { flex: 1; min-width: 0; }
.seg-card .seg-title { font-weight: 600; font-size: 14.5px; display:flex; align-items:center; gap:8px; flex-wrap:wrap; }
.seg-card .seg-route { font-size: 13.5px; margin: 2px 0; }
.airport-map-link { font-weight: 700; text-decoration: underline; text-underline-offset: 2px; }
.seg-card .seg-sub { font-size: 12.5px; color: var(--ink-soft); }
.seg-card .seg-actions { display: flex; gap: 4px; align-items: flex-start; }
.seg-card.private-jet-card { position: relative; padding-right: 98px; }
.aircraft-thumb { position: absolute; right: 16px; bottom: 14px; width: 68px; height: 48px; border-radius: 9px; overflow: hidden; background: var(--accent-soft); display: flex; align-items: center; justify-content: center; font-size: 24px; box-shadow: 0 2px 8px rgba(38, 31, 22, .12); }
.aircraft-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.icon-btn { border: none; background: none; font-size: 14px; padding: 5px 7px; border-radius: 8px; color: var(--ink-soft); }
.icon-btn:hover { background: #f0e8dc; color: var(--ink); }
.seg-detail-rows { margin-top: 8px; display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 5px 14px; font-size: 12.5px; }
.seg-detail-rows .dt { color: var(--ink-soft); font-size: 10.5px; text-transform: uppercase; letter-spacing: .04em; }
.leg-row { border-left: 2px solid var(--accent-soft); padding-left: 10px; margin: 6px 0; font-size: 13px; }
.leg-row .layover { color: var(--gold); font-size: 12px; font-style: italic; }

.chip-row { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 8px; }
.pax-chip { display: inline-flex; align-items: center; gap: 6px; background: var(--accent-soft); color: var(--accent); border-radius: 999px; padding: 4px 10px; font-size: 12.5px; font-weight: 600; }
.pax-chip button { border: none; background: none; color: inherit; font-size: 13px; padding: 0 1px; line-height: 1; opacity:.7; }
.pax-chip button:hover { opacity:1; }
.pax-chip.add { background: #fff; border: 1px dashed var(--line); color: var(--ink-soft); cursor: pointer; }
.pax-chip .seatnote { font-weight: 400; opacity:.75; }

.add-seg-row { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 4px; }
.add-seg-btn {
  flex: 1; min-width: 120px; border: 1.5px dashed var(--line); background: rgba(255,255,255,.6); border-radius: 14px;
  padding: 16px 10px; text-align: center; font-weight: 600; font-size: 13px; color: var(--ink-soft); transition: all .15s;
}
.add-seg-btn:hover { border-color: var(--accent); color: var(--accent); background: #fff; }
.add-seg-btn .ic { display: block; font-size: 22px; margin-bottom: 5px; }

/* type picker */
.type-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.type-tile { border: 1.5px solid var(--line); background: #fff; border-radius: 14px; padding: 18px 8px; text-align: center; font-weight: 600; font-size: 13px; transition: all .12s; }
.type-tile:hover, .type-tile.selected { border-color: var(--accent); background: var(--accent-soft); }
.type-tile .ic { display: block; font-size: 26px; margin-bottom: 6px; }

/* ---------- modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(30,22,12,.45); display: flex; align-items: flex-start; justify-content: center; padding: 40px 16px; z-index: 100; overflow-y: auto; backdrop-filter: blur(3px); }
.modal { background: var(--bg); border-radius: 20px; width: 100%; max-width: 640px; box-shadow: var(--shadow-lg); animation: slideup .18s ease; margin-bottom: 40px; }
.modal.wide { max-width: 780px; }
.modal-head { display: flex; align-items: center; justify-content: space-between; padding: 20px 26px 0; }
.modal-head h2 { margin: 0; font-size: 24px; }
.modal-body { padding: 18px 26px 26px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; padding: 0 26px 24px; }
@keyframes slideup { from { transform: translateY(14px); opacity: 0; } }

/* ---------- passengers page ---------- */
.pax-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(270px, 1fr)); gap: 16px; }
.pax-card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; border: 1px solid rgba(233,223,210,.6); }
.pax-card .top { display: flex; gap: 12px; align-items: center; margin-bottom: 10px; }
.pax-card .avatar { width: 44px; height: 44px; border-radius: 50%; background: var(--accent); color: #fff; display: flex; align-items: center; justify-content: center; font-weight: 600; font-size: 16px; }
.pax-card h4 { margin: 0; font-size: 16px; }
.pax-card .rows { font-size: 12.5px; color: var(--ink-soft); display: grid; gap: 3px; }
.pax-card .rows b { color: var(--ink); font-weight: 600; }

/* ---------- assistant ---------- */
.chat-box { display: flex; flex-direction: column; height: 60vh; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 6px 2px; display: flex; flex-direction: column; gap: 10px; }
.msg { max-width: 82%; padding: 11px 15px; border-radius: 16px; font-size: 14px; white-space: pre-wrap; }
.msg.user { align-self: flex-end; background: var(--ink); color: #fff; border-bottom-right-radius: 5px; }
.msg.ai { align-self: flex-start; background: #fff; border: 1px solid var(--line); border-bottom-left-radius: 5px; }
.chat-input-row { display: flex; gap: 8px; margin-top: 12px; }
.chat-input-row input { flex: 1; padding: 11px 15px; border-radius: 999px; border: 1px solid var(--line); outline: none; }
.drop-zone { border: 2px dashed var(--line); border-radius: 14px; padding: 26px; text-align: center; color: var(--ink-soft); font-size: 14px; background: rgba(255,255,255,.5); transition: all .15s; cursor: pointer; }
.drop-zone.drag { border-color: var(--accent); background: var(--accent-soft); }
.proposal-block { background:#fff; border:1px solid var(--line); border-radius:14px; padding:14px 16px; margin-top:12px; }
.proposal-block h4 { margin:0 0 8px; }
.proposal-item { font-size:13px; padding:8px 0; border-top:1px dashed var(--line); display:flex; gap:8px; align-items:flex-start; }
.proposal-item input[type=checkbox] { margin-top:3px; }

/* ---------- login ---------- */
.auth-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 20px; }
.auth-card { background: var(--card); border-radius: 24px; box-shadow: var(--shadow-lg); padding: 40px 38px; width: 100%; max-width: 400px; }
.auth-card h1 { margin: 0 0 4px; font-size: 30px; }
.auth-card .sub { color: var(--ink-soft); margin-bottom: 24px; font-size: 14px; }
.auth-error { background: #fbe3dd; color: var(--danger); border-radius: 10px; padding: 10px 13px; font-size: 13px; margin-bottom: 14px; }

/* ---------- toast ---------- */
#toast-root { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--ink); color: #fff; padding: 11px 20px; border-radius: 999px; font-size: 14px; box-shadow: var(--shadow-lg); animation: slideup .2s ease; }
.toast.error { background: var(--danger); }

.mobile-nav { display:none; position:fixed; bottom:0; left:0; right:0; background:#fff; border-top:1px solid var(--line); z-index:90; justify-content:space-around; padding:8px 4px calc(8px + env(safe-area-inset-bottom)); }
.mobile-nav button { border:none; background:none; font-size:11px; display:flex; flex-direction:column; align-items:center; gap:2px; color:var(--ink-soft); font-weight:600; }
.mobile-nav button.active { color: var(--ink); }
.mobile-nav .ic { font-size:20px; }

.doc-row { display:flex; align-items:center; gap:10px; padding:8px 0; border-top:1px dashed var(--line); font-size:13.5px; }
.doc-row:first-of-type { border-top:none; }
.doc-row .name { flex:1; min-width:0; overflow:hidden; text-overflow:ellipsis; white-space:nowrap; }
.muted { color: var(--ink-soft); }
.spin { display:inline-block; animation: rot 1s linear infinite; }
@keyframes rot { to { transform: rotate(360deg); } }
