/* Beyond Limits Travel and Tours — shared design system
   "Explore the world beyond limits"
   Premium, warm, travel-forward. No external font/CDN dependency — this
   app is meant to run standalone, including with no internet connection
   once installed. */

:root {
  --navy: #0e3b4d;
  --navy-deep: #082530;
  --teal: #12657f;
  --teal-light: #1a8aa8;
  --gold: #d3a25b;
  --gold-light: #e8c98b;
  --cream: #faf6ef;
  --cream-dark: #f1e9da;
  --ink: #1c2a30;
  --ink-soft: #52646b;
  --line: #e4dcc9;
  --white: #ffffff;
  --green: #2f7d5e;
  --green-bg: #e7f4ee;
  --amber: #b6791a;
  --amber-bg: #fbf0dd;
  --red: #b83b3b;
  --red-bg: #fbeaea;
  --blue: #2a6ba8;
  --blue-bg: #eaf2fa;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 4px 18px rgba(14, 59, 77, 0.08);
  --shadow-lift: 0 10px 30px rgba(14, 59, 77, 0.14);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  --serif: Georgia, "Times New Roman", serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  font-family: var(--font);
  background: var(--cream);
  color: var(--ink);
  -webkit-font-smoothing: antialiased;
}

body { min-height: 100vh; }

a { color: var(--teal); text-decoration: none; }
a:hover { text-decoration: underline; }

img { max-width: 100%; }

h1, h2, h3, h4 { font-family: var(--serif); font-weight: 600; color: var(--navy-deep); margin: 0 0 8px; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p { line-height: 1.55; margin: 0 0 12px; color: var(--ink-soft); }

.container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 20px;
}

.container-narrow {
  max-width: 720px;
  margin: 0 auto;
  padding: 0 20px;
}

/* --- Top brand bar --- */
.brandbar {
  background: linear-gradient(120deg, var(--navy-deep), var(--navy) 60%, var(--teal));
  color: var(--white);
  padding: 14px 0;
  position: sticky;
  top: 0;
  z-index: 50;
  box-shadow: var(--shadow);
}
.brandbar .container { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.brand { display: flex; align-items: center; gap: 10px; font-family: var(--serif); font-size: 1.25rem; color: var(--white); }
.brand .mark { font-size: 1.5rem; }
.brand small { display: block; font-family: var(--font); font-size: 0.68rem; letter-spacing: 0.06em; color: var(--gold-light); text-transform: uppercase; font-weight: 600; }
.brand:hover { text-decoration: none; }

.nav { display: flex; gap: 4px; align-items: center; flex-wrap: wrap; }
.nav a {
  color: rgba(255,255,255,0.82);
  padding: 8px 12px;
  border-radius: 999px;
  font-size: 0.88rem;
  font-weight: 500;
  white-space: nowrap;
}
.nav a:hover { background: rgba(255,255,255,0.1); text-decoration: none; color: var(--white); }
.nav a.active { background: rgba(255,255,255,0.16); color: var(--white); }
.nav .badge-dot {
  display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--gold);
  margin-left: 5px; vertical-align: middle;
}

.navmenu-toggle { display: none; background: none; border: 1px solid rgba(255,255,255,0.3); color: var(--white); border-radius: 8px; padding: 6px 10px; font-size: 1rem; cursor: pointer; }

@media (max-width: 880px) {
  .nav { display: none; width: 100%; order: 3; flex-direction: column; align-items: stretch; gap: 2px; margin-top: 10px; }
  .nav.open { display: flex; }
  .nav a { padding: 10px 14px; }
  .brandbar .container { flex-wrap: wrap; }
  .navmenu-toggle { display: inline-block; }
}

/* --- Page shell --- */
.page { padding: 28px 0 70px; }
.page-header { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.page-header p { margin: 0; }
.eyebrow { text-transform: uppercase; letter-spacing: 0.08em; font-size: 0.72rem; font-weight: 700; color: var(--teal); margin-bottom: 4px; }

/* --- Cards --- */
.card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 20px;
}
.card + .card { margin-top: 16px; }

.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 880px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr 1fr; } }
@media (max-width: 560px) { .grid-2, .grid-3, .grid-4 { grid-template-columns: 1fr; } }

/* --- Dashboard stat cards --- */
.stat-card {
  background: var(--white);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow);
  position: relative;
  overflow: hidden;
}
.stat-card .stat-label { font-size: 0.78rem; color: var(--ink-soft); text-transform: uppercase; letter-spacing: 0.04em; font-weight: 600; }
.stat-card .stat-value { font-family: var(--serif); font-size: 1.9rem; color: var(--navy-deep); margin-top: 6px; }
.stat-card .stat-icon { position: absolute; right: 14px; top: 14px; font-size: 1.6rem; opacity: 0.5; }

/* --- Next trip hero --- */
.next-trip {
  background: linear-gradient(135deg, var(--navy-deep), var(--teal) 120%);
  color: var(--white);
  border-radius: var(--radius);
  padding: 28px;
  box-shadow: var(--shadow-lift);
  position: relative;
  overflow: hidden;
}
.next-trip::after {
  content: "✈";
  position: absolute; right: 24px; top: 18px; font-size: 4.5rem; opacity: 0.13; transform: rotate(20deg);
}
.next-trip .eyebrow { color: var(--gold-light); }
.next-trip h2 { color: var(--white); font-size: 1.7rem; }
.next-trip .trip-meta { display: flex; flex-wrap: wrap; gap: 22px; margin: 14px 0 18px; }
.next-trip .trip-meta div span { display: block; }
.next-trip .trip-meta .label { font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; color: rgba(255,255,255,0.65); margin-bottom: 3px; }
.next-trip .trip-meta .value { font-weight: 600; font-size: 1.02rem; }
.countdown-badge {
  display: inline-flex; align-items: baseline; gap: 8px; background: rgba(255,255,255,0.12);
  border: 1px solid rgba(255,255,255,0.25); padding: 10px 18px; border-radius: 999px; margin-bottom: 14px;
}
.countdown-badge .num { font-family: var(--serif); font-size: 1.6rem; color: var(--gold-light); }

/* --- Buttons --- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  padding: 10px 18px; border-radius: 999px; font-weight: 600; font-size: 0.9rem;
  border: 1px solid transparent; cursor: pointer; text-decoration: none; transition: all .15s ease;
}
.btn:hover { text-decoration: none; }
.btn-primary { background: var(--gold); color: var(--navy-deep); }
.btn-primary:hover { background: var(--gold-light); }
.btn-outline { background: transparent; border-color: var(--navy); color: var(--navy); }
.btn-outline:hover { background: var(--navy); color: var(--white); }
.btn-light { background: rgba(255,255,255,0.15); color: var(--white); border-color: rgba(255,255,255,0.4); }
.btn-light:hover { background: rgba(255,255,255,0.28); }
.btn-danger { background: var(--red); color: var(--white); }
.btn-danger:hover { opacity: 0.9; }
.btn-ghost { background: transparent; color: var(--teal); border: 1px solid var(--line); }
.btn-ghost:hover { background: var(--cream-dark); }
.btn-sm { padding: 6px 13px; font-size: 0.8rem; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: 0.55; cursor: not-allowed; }

/* --- Badges / status pills --- */
.pill { display: inline-block; padding: 4px 11px; border-radius: 999px; font-size: 0.74rem; font-weight: 700; letter-spacing: 0.02em; }
.pill-confirmed, .pill-verified, .pill-completed, .pill-paid, .pill-accepted { background: var(--green-bg); color: var(--green); }
.pill-pending, .pill-reserved, .pill-forverification, .pill-submitted, .pill-sent, .pill-partiallypaid { background: var(--amber-bg); color: var(--amber); }
.pill-cancelled, .pill-declined, .pill-rejected, .pill-overdue, .pill-voided { background: var(--red-bg); color: var(--red); }
.pill-inquiry, .pill-quotation, .pill-ticketed, .pill-unpaid, .pill-refunded { background: var(--blue-bg); color: var(--blue); }

/* --- Forms --- */
label { display: block; font-size: 0.85rem; font-weight: 600; color: var(--navy); margin-bottom: 5px; }
input, select, textarea {
  width: 100%; padding: 10px 12px; border-radius: var(--radius-sm); border: 1px solid var(--line);
  font-family: var(--font); font-size: 0.92rem; background: var(--white); color: var(--ink);
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px rgba(18,101,127,0.12); }
.field { margin-bottom: 14px; }
.field-hint { font-size: 0.78rem; color: var(--ink-soft); margin-top: 4px; }
.field-error { font-size: 0.8rem; color: var(--red); margin-top: 4px; }
.checkbox-row { display: flex; align-items: flex-start; gap: 8px; }
.checkbox-row input { width: auto; margin-top: 3px; }

/* --- Alerts / banners --- */
.alert { border-radius: var(--radius-sm); padding: 12px 15px; font-size: 0.88rem; margin-bottom: 16px; }
.alert-info { background: var(--blue-bg); color: #1d4d75; }
.alert-warn { background: var(--amber-bg); color: #7a5210; }
.alert-danger { background: var(--red-bg); color: #7a2626; }
.alert-success { background: var(--green-bg); color: #1e5c42; }

/* --- Tables --- */
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
th { text-align: left; font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.04em; color: var(--ink-soft); padding: 9px 10px; border-bottom: 2px solid var(--line); }
td { padding: 11px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
tr:last-child td { border-bottom: none; }
.table-wrap { overflow-x: auto; }

/* --- Auth pages --- */
.auth-shell {
  min-height: 100vh;
  display: flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at top left, var(--teal-light), var(--navy-deep) 65%);
  padding: 30px 16px;
}
.auth-card { background: var(--white); border-radius: 18px; box-shadow: var(--shadow-lift); padding: 34px; width: 100%; max-width: 440px; }
.auth-brand { text-align: center; margin-bottom: 22px; }
.auth-brand .mark { font-size: 2.2rem; }
.auth-brand h1 { font-size: 1.4rem; margin: 8px 0 2px; }
.auth-brand .tagline { color: var(--gold); font-style: italic; font-size: 0.88rem; }
.auth-links { text-align: center; margin-top: 14px; font-size: 0.88rem; }

/* --- Timeline (itinerary) --- */
.timeline { position: relative; padding-left: 34px; }
.timeline::before { content: ""; position: absolute; left: 11px; top: 6px; bottom: 6px; width: 2px; background: var(--line); }
.timeline-day { position: relative; margin-bottom: 24px; }
.timeline-day::before {
  content: ""; position: absolute; left: -34px; top: 4px; width: 22px; height: 22px; border-radius: 50%;
  background: var(--gold); border: 3px solid var(--white); box-shadow: 0 0 0 2px var(--gold);
}
.timeline-day .day-label { font-family: var(--serif); color: var(--navy-deep); font-size: 1.15rem; margin-bottom: 6px; }
.timeline-detail { display: flex; gap: 8px; font-size: 0.85rem; color: var(--ink-soft); margin-top: 4px; }
.timeline-detail b { color: var(--ink); min-width: 100px; display: inline-block; }

/* --- Checklist --- */
.checklist-item { display: flex; align-items: center; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line); }
.checklist-item:last-child { border-bottom: none; }
.checklist-item .check { width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--teal); display: flex; align-items: center; justify-content: center; font-size: 0.75rem; color: var(--white); flex-shrink: 0; }
.checklist-item.checked .check { background: var(--teal); }
.checklist-item.checked span.label { text-decoration: line-through; color: var(--ink-soft); }

/* --- Notifications list --- */
.notif-item { display: flex; gap: 12px; padding: 13px 0; border-bottom: 1px solid var(--line); }
.notif-item:last-child { border-bottom: none; }
.notif-item .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--gold); margin-top: 6px; flex-shrink: 0; }
.notif-item.read .dot { background: var(--line); }
.notif-item .notif-title { font-weight: 700; color: var(--navy-deep); }
.notif-item .notif-time { font-size: 0.75rem; color: var(--ink-soft); }

/* --- Message bubbles --- */
.msg-thread { display: flex; flex-direction: column; gap: 10px; max-height: 460px; overflow-y: auto; padding: 6px 2px; }
.msg-bubble { max-width: 78%; padding: 10px 14px; border-radius: 14px; font-size: 0.9rem; line-height: 1.4; }
.msg-bubble.customer { align-self: flex-end; background: var(--navy); color: var(--white); border-bottom-right-radius: 3px; }
.msg-bubble.staff { align-self: flex-start; background: var(--cream-dark); color: var(--ink); border-bottom-left-radius: 3px; }
.msg-meta { font-size: 0.7rem; opacity: 0.65; margin-top: 4px; }

/* --- Misc --- */
.muted { color: var(--ink-soft); }
.text-right { text-align: right; }
.flex { display: flex; }
.flex-between { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.flex-wrap { flex-wrap: wrap; }
.gap-8 { gap: 8px; }
.gap-12 { gap: 12px; }
.mt-8 { margin-top: 8px; } .mt-12 { margin-top: 12px; } .mt-16 { margin-top: 16px; } .mt-24 { margin-top: 24px; }
.mb-0 { margin-bottom: 0; }
.section-title { display: flex; align-items: center; justify-content: space-between; margin-bottom: 12px; }
.empty-state { text-align: center; padding: 40px 20px; color: var(--ink-soft); }
.empty-state .icon { font-size: 2.4rem; margin-bottom: 10px; }
.divider { border: none; border-top: 1px solid var(--line); margin: 18px 0; }
.tag-emoji { font-size: 1.8rem; }
.spinner { border: 3px solid var(--line); border-top-color: var(--teal); border-radius: 50%; width: 26px; height: 26px; animation: spin 0.7s linear infinite; margin: 30px auto; }
@keyframes spin { to { transform: rotate(360deg); } }
.toast-wrap { position: fixed; bottom: 20px; right: 20px; z-index: 200; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--navy-deep); color: var(--white); padding: 12px 18px; border-radius: 10px; box-shadow: var(--shadow-lift); font-size: 0.88rem; max-width: 320px; }
.toast.error { background: var(--red); }
.toast.success { background: var(--green); }
.modal-backdrop { position: fixed; inset: 0; background: rgba(8,37,48,0.55); display: flex; align-items: center; justify-content: center; z-index: 150; padding: 20px; }
.modal { background: var(--white); border-radius: var(--radius); padding: 24px; max-width: 480px; width: 100%; max-height: 90vh; overflow-y: auto; box-shadow: var(--shadow-lift); }
.footer-note { text-align: center; color: var(--ink-soft); font-size: 0.78rem; margin-top: 40px; }

/* --- Print --- */
@media print {
  .brandbar, .nav, .no-print, .navmenu-toggle { display: none !important; }
  body { background: white; }
  .card { box-shadow: none; border: 1px solid #ccc; }
}

/* --- Staff console tint (still Beyond Limits brand, visually distinct chrome) --- */
.staff-shell .brandbar { background: linear-gradient(120deg, #22303a, #33454f 60%, var(--teal)); }
.staff-shell { }
