/* =========================================================================
   USA Trip Command Center — Futuristic Luxury Concierge Theme
   ========================================================================= */
:root {
  --accent: #3aa0ff;
  --accent2: #a45cff;
  --bg0: #05060f;
  --bg1: #0a0c1a;
  --bg2: #10142a;
  --glass: rgba(20, 26, 54, 0.55);
  --glass-strong: rgba(24, 30, 64, 0.78);
  --border: rgba(120, 150, 255, 0.18);
  --border-bright: rgba(140, 170, 255, 0.4);
  --text: #eaf0ff;
  --muted: #97a3c7;
  --good: #3ddc97;
  --warn: #ffb347;
  --bad: #ff5d73;
  --radius: 18px;
  --shadow: 0 10px 40px rgba(0, 0, 0, 0.45);
  --glow: 0 0 24px rgba(58, 160, 255, 0.35);
}

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

body {
  font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', 'Inter', Roboto, Helvetica, Arial, sans-serif;
  color: var(--text);
  background:
    radial-gradient(1200px 800px at 80% -10%, rgba(164, 92, 255, 0.18), transparent 60%),
    radial-gradient(1000px 700px at -10% 10%, rgba(58, 160, 255, 0.16), transparent 55%),
    linear-gradient(160deg, var(--bg0), var(--bg1) 50%, var(--bg2));
  background-attachment: fixed;
  min-height: 100vh;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}

/* animated aurora layer */
body::before {
  content: '';
  position: fixed;
  inset: -20%;
  background:
    radial-gradient(600px 600px at 20% 30%, rgba(58, 160, 255, 0.10), transparent 60%),
    radial-gradient(500px 500px at 75% 70%, rgba(164, 92, 255, 0.10), transparent 60%);
  filter: blur(20px);
  animation: drift 22s ease-in-out infinite alternate;
  z-index: -1;
  pointer-events: none;
}
@keyframes drift {
  0% { transform: translate(0, 0) scale(1); }
  100% { transform: translate(4%, 3%) scale(1.08); }
}

a { color: var(--accent); text-decoration: none; }

/* ---------- App layout ---------- */
.app { display: flex; min-height: 100vh; }

/* Sidebar nav */
.sidebar {
  width: 248px;
  flex-shrink: 0;
  padding: 22px 14px;
  background: var(--glass);
  backdrop-filter: blur(18px) saturate(140%);
  -webkit-backdrop-filter: blur(18px) saturate(140%);
  border-right: 1px solid var(--border);
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
}
.brand { display: flex; align-items: center; gap: 10px; padding: 6px 10px 18px; }
.brand .logo {
  width: 38px; height: 38px; border-radius: 11px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center; font-size: 20px;
  box-shadow: var(--glow);
  transition: transform .35s cubic-bezier(.2,.9,.3,1.4);
}
.brand:hover .logo { transform: rotate(-8deg) scale(1.06); }
.brand .logo svg { width: 66%; height: 66%; display: block; }
.logo-lg svg { width: 58%; height: 58%; }
.brand h1 { font-size: 15px; margin: 0; line-height: 1.15; letter-spacing: 0.3px; }
.brand small { color: var(--muted); font-size: 10.5px; }

.nav { display: flex; flex-direction: column; gap: 3px; }
.nav button {
  display: flex; align-items: center; gap: 11px;
  width: 100%; text-align: left;
  background: transparent; border: 0; color: var(--muted);
  padding: 10px 12px; border-radius: 12px; cursor: pointer;
  font-size: 13.5px; font-weight: 500; transition: all .18s ease;
}
.nav button .ic { width: 18px; text-align: center; font-size: 15px; }
.nav button:hover { background: rgba(120, 150, 255, 0.08); color: var(--text); }
.nav button.active {
  background: linear-gradient(135deg, rgba(58, 160, 255, 0.22), rgba(164, 92, 255, 0.22));
  color: #fff;
  box-shadow: inset 0 0 0 1px var(--border-bright);
}

/* Main */
.main { flex: 1; min-width: 0; padding: 26px 30px 80px; }
.section { display: none; animation: fade .35s ease; }
.section.active { display: block; }
@keyframes fade { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page-head { display: flex; align-items: flex-end; justify-content: space-between; flex-wrap: wrap; gap: 12px; margin-bottom: 20px; }
.page-head h2 { margin: 0; font-size: 26px; letter-spacing: 0.4px; }
.page-head p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }

/* ---------- Glass cards ---------- */
.card {
  background: var(--glass);
  backdrop-filter: blur(16px) saturate(140%);
  -webkit-backdrop-filter: blur(16px) saturate(140%);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 18px;
  transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
}
.card:hover { border-color: var(--border-bright); }
.card.hl {
  border-color: rgba(255, 200, 90, 0.5);
  box-shadow: 0 0 30px rgba(255, 190, 80, 0.25), var(--shadow);
}
.card h3 { margin: 0 0 10px; font-size: 16px; }
.card .sub { color: var(--muted); font-size: 12px; }

.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.grid.cols-4 { grid-template-columns: repeat(4, 1fr); }
.grid.auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(120, 150, 255, 0.10);
  color: var(--text); border: 1px solid var(--border);
  padding: 8px 13px; border-radius: 11px; cursor: pointer;
  font-size: 12.5px; font-weight: 500; transition: all .16s ease;
  white-space: nowrap;
}
.btn:hover { background: rgba(120, 150, 255, 0.2); border-color: var(--border-bright); transform: translateY(-1px); }
.btn.primary {
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  border: 0; color: #fff; box-shadow: var(--glow);
}
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: transparent; }
.btn.danger { color: var(--bad); border-color: rgba(255, 93, 115, 0.3); }
.btn.danger:hover { background: rgba(255, 93, 115, 0.14); }
.btn.tiny { padding: 5px 9px; font-size: 11px; border-radius: 9px; }
.btn-row { display: flex; flex-wrap: wrap; gap: 7px; }

/* ---------- Forms / editable fields ---------- */
.field { display: flex; flex-direction: column; gap: 4px; margin-bottom: 10px; }
.field label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }
input, textarea, select {
  background: rgba(8, 12, 30, 0.6);
  border: 1px solid var(--border);
  color: var(--text);
  border-radius: 10px;
  padding: 9px 11px;
  font-size: 13px;
  font-family: inherit;
  width: 100%;
  transition: border-color .16s ease, box-shadow .16s ease;
}
input:focus, textarea:focus, select:focus {
  outline: none; border-color: var(--accent);
  box-shadow: 0 0 0 3px rgba(58, 160, 255, 0.18);
}
textarea { resize: vertical; min-height: 60px; }
.field-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 10px; }
.field-grid.three { grid-template-columns: repeat(3, 1fr); }

/* ---------- Badges / status ---------- */
.badge {
  display: inline-flex; align-items: center; gap: 5px;
  font-size: 11px; padding: 3px 9px; border-radius: 999px;
  background: rgba(120, 150, 255, 0.14); color: var(--muted);
  border: 1px solid var(--border);
}
.badge.good { color: var(--good); border-color: rgba(61, 220, 151, 0.3); background: rgba(61, 220, 151, 0.1); }
.badge.warn { color: var(--warn); border-color: rgba(255, 179, 71, 0.3); background: rgba(255, 179, 71, 0.1); }
.badge.bad { color: var(--bad); border-color: rgba(255, 93, 115, 0.3); background: rgba(255, 93, 115, 0.1); }
.badge.accent { color: var(--accent); border-color: var(--border-bright); }

.pill-row { display: flex; flex-wrap: wrap; gap: 8px; }

/* ---------- Countdown ---------- */
.countdown { display: flex; gap: 14px; flex-wrap: wrap; }
.cd-box {
  text-align: center; min-width: 84px; padding: 14px 10px;
  background: linear-gradient(135deg, rgba(58, 160, 255, 0.12), rgba(164, 92, 255, 0.12));
  border: 1px solid var(--border-bright); border-radius: 14px;
}
.cd-box .num { font-size: 30px; font-weight: 700; line-height: 1; background: linear-gradient(135deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cd-box .lbl { font-size: 10.5px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; margin-top: 6px; }

/* ---------- Timeline ---------- */
.timeline { display: flex; gap: 0; overflow-x: auto; padding: 8px 0; }
.tl-stop { display: flex; align-items: center; flex-shrink: 0; }
.tl-node {
  display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 0 6px; min-width: 92px;
}
.tl-dot {
  width: 40px; height: 40px; border-radius: 50%;
  display: grid; place-items: center; font-size: 18px;
  background: var(--glass-strong); border: 1px solid var(--border-bright);
  box-shadow: var(--glow);
}
.tl-node .city { font-size: 12.5px; font-weight: 600; }
.tl-node .code { font-size: 10px; color: var(--muted); }
.tl-line { width: 44px; height: 2px; background: linear-gradient(90deg, var(--accent), var(--accent2)); opacity: 0.6; }

/* ---------- itinerary items ---------- */
.itin-item {
  display: flex; align-items: center; gap: 8px; padding: 8px 10px;
  background: rgba(8, 12, 30, 0.4); border: 1px solid var(--border);
  border-radius: 10px; margin-bottom: 7px; cursor: grab;
}
.itin-item.dragging { opacity: 0.5; }
.itin-item.drag-over { border-color: var(--accent); }
.itin-item .grip { color: var(--muted); cursor: grab; }
.itin-item .txt { flex: 1; background: transparent; border: 0; padding: 2px; }
.itin-item .txt:focus { box-shadow: none; border-bottom: 1px solid var(--accent); }
.itin-item.done .txt { text-decoration: line-through; color: var(--muted); }

/* ---------- checklist ---------- */
.check-item { display: flex; align-items: center; gap: 10px; padding: 9px 11px; border-radius: 10px; background: rgba(8,12,30,0.4); border: 1px solid var(--border); margin-bottom: 7px; }
.check-item input[type=checkbox], .itin-item input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; }
.check-item .txt { flex: 1; background: transparent; border: 0; }
.check-item.done .txt { text-decoration: line-through; color: var(--muted); }

/* ---------- table (expenses) ---------- */
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--border); }
th { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.5px; font-weight: 600; }
tr:hover td { background: rgba(120, 150, 255, 0.05); }

/* stat boxes */
.stat { padding: 14px 16px; }
.stat .v { font-size: 24px; font-weight: 700; }
.stat .k { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 0.5px; }

/* ---------- modal ---------- */
.modal-back {
  position: fixed; inset: 0; background: rgba(2, 4, 12, 0.7);
  backdrop-filter: blur(6px); display: none; align-items: center; justify-content: center;
  z-index: 100; padding: 20px;
}
.modal-back.open { display: flex; }
.modal {
  background: var(--glass-strong); border: 1px solid var(--border-bright);
  border-radius: var(--radius); box-shadow: var(--shadow);
  width: 100%; max-width: 560px; max-height: 86vh; overflow-y: auto; padding: 22px;
}
.modal h3 { margin: 0 0 14px; }
.modal-head { display: flex; justify-content: space-between; align-items: center; }
.modal-foot { display: flex; gap: 8px; justify-content: flex-end; margin-top: 16px; }

/* ---------- AI chat ---------- */
.ai-log { display: flex; flex-direction: column; gap: 12px; max-height: 52vh; overflow-y: auto; padding: 4px; }
.ai-msg { padding: 12px 14px; border-radius: 13px; max-width: 88%; font-size: 13.5px; line-height: 1.5; }
.ai-msg.user { align-self: flex-end; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
.ai-msg.bot { align-self: flex-start; background: rgba(8, 12, 30, 0.6); border: 1px solid var(--border); }
.ai-msg.bot p { margin: 0 0 8px; }
.ai-msg.bot ul { margin: 4px 0; padding-left: 18px; }
.ai-msg.bot code { background: rgba(120,150,255,0.15); padding: 1px 5px; border-radius: 5px; }
.ai-input-row { display: flex; gap: 8px; margin-top: 12px; }
.ai-input-row textarea { min-height: 44px; }
.ai-suggest { display: flex; flex-wrap: wrap; gap: 7px; margin-bottom: 12px; }

/* ---------- map ---------- */
.map-wrap { position: relative; border-radius: var(--radius); overflow: hidden; border: 1px solid var(--border); min-height: 360px;
  background:
    radial-gradient(circle at 20% 30%, rgba(58,160,255,0.12), transparent 40%),
    radial-gradient(circle at 80% 70%, rgba(164,92,255,0.12), transparent 40%),
    repeating-linear-gradient(0deg, rgba(120,150,255,0.05) 0 1px, transparent 1px 40px),
    repeating-linear-gradient(90deg, rgba(120,150,255,0.05) 0 1px, transparent 1px 40px),
    var(--bg1);
}
.map-pin { position: absolute; transform: translate(-50%, -100%); text-align: center; cursor: pointer; }
.map-pin .dot { font-size: 26px; filter: drop-shadow(0 0 8px rgba(58,160,255,0.6)); }
.map-pin .lbl { font-size: 10px; background: var(--glass-strong); border: 1px solid var(--border); padding: 2px 6px; border-radius: 7px; white-space: nowrap; }

/* upload */
.dropzone { border: 1.5px dashed var(--border-bright); border-radius: var(--radius); padding: 30px; text-align: center; color: var(--muted); cursor: pointer; transition: all .18s; }
.dropzone:hover, .dropzone.over { background: rgba(58,160,255,0.08); color: var(--text); }
.doc-preview { width: 100%; height: 130px; object-fit: cover; border-radius: 10px; border: 1px solid var(--border); margin-bottom: 8px; }
.doc-preview.file { display: grid; place-items: center; font-size: 40px; background: rgba(8,12,30,0.5); }

/* toast */
.toast-wrap { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; }
.toast { background: var(--glass-strong); border: 1px solid var(--border-bright); padding: 11px 18px; border-radius: 12px; box-shadow: var(--shadow); font-size: 13px; animation: pop .25s ease; }
@keyframes pop { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }

/* mobile top bar */
.topbar { display: none; }

.row-between { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.muted { color: var(--muted); }
.mt { margin-top: 16px; }
.mb { margin-bottom: 16px; }
.flex { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.spacer { flex: 1; }
hr.sep { border: 0; border-top: 1px solid var(--border); margin: 16px 0; }
.empty { color: var(--muted); text-align: center; padding: 30px; font-size: 13px; }

/* ---------- Responsive / mobile-first ---------- */
@media (max-width: 900px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .field-grid, .field-grid.three { grid-template-columns: 1fr; }
}
@media (max-width: 760px) {
  .app { flex-direction: column; }
  .sidebar {
    position: fixed; left: 0; top: 0; bottom: 0; z-index: 90;
    transform: translateX(-100%); transition: transform .25s ease; width: 80%; max-width: 280px;
  }
  .sidebar.open { transform: translateX(0); }
  .main { padding: 16px 14px 80px; }
  .topbar {
    display: flex; align-items: center; justify-content: space-between;
    padding: 12px 14px; position: sticky; top: 0; z-index: 80;
    background: var(--glass); backdrop-filter: blur(16px); border-bottom: 1px solid var(--border);
  }
  .topbar .brand { padding: 0; }
  .topbar h1 { font-size: 14px; }
  .scrim { position: fixed; inset: 0; background: rgba(0,0,0,0.5); z-index: 85; display: none; }
  .scrim.open { display: block; }
  .page-head h2 { font-size: 21px; }
}
.hamburger { background: transparent; border: 1px solid var(--border); color: var(--text); width: 40px; height: 40px; border-radius: 11px; font-size: 18px; cursor: pointer; }

/* ---------- app header bar ---------- */
.appbar {
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  padding: 10px 14px; margin-bottom: 18px;
  background: var(--glass); border: 1px solid var(--border);
  border-radius: 14px; backdrop-filter: blur(14px);
}
.appbar .trip-name { font-weight: 600; font-size: 14px; }
.appbar .spacer { flex: 1; }
.appbar input.name-in { width: 150px; }
.appbar .who { color: var(--muted); font-size: 12px; }

/* ---------- lock screen ---------- */
.lock-screen {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 24px;
}
.lock-card {
  width: 100%; max-width: 440px;
  background: var(--glass-strong); border: 1px solid var(--border-bright);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 26px;
}
.lock-card .logo-lg {
  width: 60px; height: 60px; border-radius: 16px; margin: 0 auto 14px;
  background: linear-gradient(135deg, var(--accent), var(--accent2));
  display: grid; place-items: center; font-size: 32px; box-shadow: var(--glow);
}
.lock-card h2 { text-align: center; margin: 0 0 4px; font-size: 22px; }
.lock-card .tag { text-align: center; color: var(--muted); font-size: 12.5px; margin-bottom: 18px; }
.lock-tabs { display: flex; gap: 6px; margin-bottom: 16px; }
.lock-tabs button { flex: 1; padding: 9px; border-radius: 10px; border: 1px solid var(--border); background: transparent; color: var(--muted); cursor: pointer; font-size: 13px; }
.lock-tabs button.active { background: linear-gradient(135deg, rgba(58,160,255,0.22), rgba(164,92,255,0.22)); color: #fff; border-color: var(--border-bright); }
.lock-trips { display: flex; flex-direction: column; gap: 7px; margin-bottom: 8px; }
.lock-trip-row { display: flex; align-items: center; gap: 8px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 11px; background: rgba(8,12,30,0.4); cursor: pointer; transition: all .15s; }
.lock-trip-row:hover { border-color: var(--border-bright); background: rgba(58,160,255,0.08); }
.lock-err { color: var(--bad); font-size: 12.5px; min-height: 16px; margin-top: 4px; }
.lock-foot { margin-top: 18px; text-align: center; color: var(--muted); font-size: 11px; }

/* =========================================================================
   ✨ Polish pass — wordmark, scrollbars, depth, motion
   ========================================================================= */

/* gradient wordmark */
.brand h1 {
  font-size: 17px;
  background: linear-gradient(120deg, #fff 10%, var(--accent) 55%, var(--accent2) 100%);
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
  font-weight: 800; letter-spacing: 0.4px;
}
.topbar .brand h1 { font-size: 16px; }

/* page titles get a subtle gradient */
.page-head h2 {
  background: linear-gradient(120deg, #ffffff, #cfe0ff 60%, var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* sleek custom scrollbars */
* { scrollbar-width: thin; scrollbar-color: rgba(120,150,255,0.35) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: transparent; }
::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(58,160,255,0.5), rgba(164,92,255,0.5));
  border-radius: 999px; border: 2px solid transparent; background-clip: padding-box;
}
::-webkit-scrollbar-thumb:hover { background: linear-gradient(180deg, var(--accent), var(--accent2)); background-clip: padding-box; }

/* cards: lift + top sheen on hover */
.card { position: relative; overflow: hidden; }
.card::before {
  content: ''; position: absolute; inset: 0 0 auto 0; height: 1px;
  background: linear-gradient(90deg, transparent, rgba(140,170,255,0.55), transparent);
  opacity: 0; transition: opacity .25s ease;
}
.card:hover { transform: translateY(-3px); box-shadow: 0 18px 50px rgba(0,0,0,0.5), 0 0 0 1px var(--border-bright); }
.card:hover::before { opacity: 1; }
.card.hl::after {
  content: ''; position: absolute; inset: 0; border-radius: var(--radius); pointer-events: none;
  box-shadow: inset 0 0 36px rgba(255,190,80,0.12);
}

/* nav active gets a glowing left bar */
.nav button { position: relative; }
.nav button.active::before {
  content: ''; position: absolute; left: 2px; top: 18%; bottom: 18%; width: 3px; border-radius: 3px;
  background: linear-gradient(180deg, var(--accent), var(--accent2)); box-shadow: var(--glow);
}
.nav button .ic { transition: transform .2s ease; }
.nav button:hover .ic { transform: scale(1.2) translateX(1px); }

/* buttons: glossy sweep on hover */
.btn { position: relative; overflow: hidden; }
.btn::after {
  content: ''; position: absolute; top: 0; left: -120%; width: 60%; height: 100%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,0.18), transparent);
  transform: skewX(-18deg); transition: left .55s ease;
}
.btn:hover::after { left: 130%; }
.btn.primary { background-size: 160% 160%; animation: btnflow 6s ease infinite; }
@keyframes btnflow { 0%,100% { background-position: 0% 50%; } 50% { background-position: 100% 50%; } }

/* appbar: gradient hairline + glow */
.appbar {
  background: linear-gradient(120deg, rgba(20,26,54,0.6), rgba(24,30,64,0.5));
  box-shadow: 0 6px 24px rgba(0,0,0,0.3), inset 0 0 0 1px var(--border);
}
.appbar .trip-name {
  background: linear-gradient(120deg, #fff, var(--accent));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}

/* countdown numbers pulse subtly */
.cd-box { transition: transform .25s ease; }
.cd-box:hover { transform: translateY(-2px) scale(1.03); }

/* timeline dots glow on hover */
.tl-dot { transition: transform .25s ease, box-shadow .25s ease; }
.tl-stop:hover .tl-dot { transform: scale(1.1); box-shadow: 0 0 26px rgba(58,160,255,0.6); }

/* lock card: animated aurora ring */
.lock-card { position: relative; overflow: hidden; }
.lock-card::before {
  content: ''; position: absolute; inset: -40%; z-index: -1;
  background: conic-gradient(from 0deg, transparent, rgba(58,160,255,0.10), transparent 40%, rgba(164,92,255,0.10), transparent 70%);
  animation: spin 14s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
.logo-lg { animation: float 4.5s ease-in-out infinite; }
@keyframes float { 0%,100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }

/* badges a touch brighter */
.badge { backdrop-filter: blur(6px); }

/* selection color */
::selection { background: rgba(58,160,255,0.35); color: #fff; }

/* =========================================================================
   🌐 RTL (Hebrew) + PWA install
   ========================================================================= */
[dir="rtl"] .nav button { text-align: right; }
[dir="rtl"] .nav button.active::before { left: auto; right: 2px; }
[dir="rtl"] .sidebar { border-right: 0; border-left: 1px solid var(--border); }
[dir="rtl"] .card.hl, [dir="rtl"] .card::before { /* keep */ }
[dir="rtl"] .itin-item .grip { transform: scaleX(-1); }
[dir="rtl"] .field label { letter-spacing: 0; }
[dir="rtl"] input, [dir="rtl"] textarea, [dir="rtl"] select { text-align: right; }
[dir="rtl"] .toast-wrap { direction: rtl; }
[dir="rtl"] .lock-lang { right: auto; left: 14px; }
[dir="rtl"] .badge { direction: rtl; }
/* keep latin/number fields readable */
[dir="rtl"] input[type="date"], [dir="rtl"] input[type="time"], [dir="rtl"] input[type="color"] { text-align: left; direction: ltr; }
[dir="rtl"] .timeline, [dir="rtl"] .map-wrap { direction: ltr; }

/* mobile: sidebar slides from the right in RTL */
@media (max-width: 760px) {
  [dir="rtl"] .sidebar { left: auto; right: 0; transform: translateX(100%); }
  [dir="rtl"] .sidebar.open { transform: translateX(0); }
}

/* lock screen language toggle */
.lock-lang { position: absolute; top: 14px; right: 14px; z-index: 2; }

/* install button pulse */
#hdrInstall, #setInstall { position: relative; }
#hdrInstall::before {
  content: ''; position: absolute; inset: -2px; border-radius: 11px;
  box-shadow: 0 0 0 0 rgba(58,160,255,0.5); animation: ipulse 2.6s ease-out infinite;
}
@keyframes ipulse { 0% { box-shadow: 0 0 0 0 rgba(58,160,255,0.5); } 70%,100% { box-shadow: 0 0 0 8px rgba(58,160,255,0); } }

/* =========================================================================
   👁 Read-only (view) mode + 📱 modern mobile bottom nav + refinements
   ========================================================================= */
body.readonly .dropzone { display: none; }
body.readonly input:disabled, body.readonly textarea:disabled, body.readonly select:disabled {
  opacity: 0.92; cursor: default; -webkit-text-fill-color: var(--text);
  background: rgba(8,12,30,0.35); border-color: rgba(120,150,255,0.10);
}
body.readonly .itin-item { cursor: default; }
body.readonly .itin-item .grip { display: none; }

/* a clean "viewing" ribbon on the appbar */
body.readonly .appbar { box-shadow: 0 6px 24px rgba(0,0,0,0.3), inset 0 0 0 1px rgba(58,160,255,0.35); }

/* ---------- mobile bottom navigation ---------- */
.bottomnav { display: none; }
@media (max-width: 760px) {
  .bottomnav {
    display: flex; position: fixed; left: 0; right: 0; bottom: 0; z-index: 70;
    padding: 6px 6px calc(6px + env(safe-area-inset-bottom));
    background: rgba(10,12,26,0.82); backdrop-filter: blur(18px) saturate(140%);
    border-top: 1px solid var(--border);
  }
  .bottomnav button {
    flex: 1; display: flex; flex-direction: column; align-items: center; gap: 3px;
    background: transparent; border: 0; color: var(--muted); cursor: pointer;
    padding: 6px 2px; border-radius: 12px; font-size: 10px; transition: color .15s, transform .15s;
  }
  .bottomnav button .bic { font-size: 19px; line-height: 1; }
  .bottomnav button.active { color: #fff; }
  .bottomnav button.active .bic { transform: translateY(-2px) scale(1.12); filter: drop-shadow(0 3px 8px rgba(58,160,255,0.6)); }
  .bottomnav button.active::after {
    content: ''; width: 5px; height: 5px; border-radius: 50%;
    background: linear-gradient(135deg, var(--accent), var(--accent2)); margin-top: 1px;
  }
  .main { padding-bottom: 92px; }
  /* hide the desktop hamburger-only sidebar duplicates of bottom items? keep sidebar for full list */
  .appbar { gap: 7px; }
  .appbar .name-in { width: 110px; }
  .page-head h2 { font-size: 20px; }
  .card { padding: 15px; }
}

/* ---------- general modern refinements ---------- */
.card h3 { letter-spacing: 0.2px; }
.btn.tiny { border-radius: 10px; }
.badge { font-weight: 600; }
.appbar { border-radius: 16px; }
.section { animation: fadeUp .4s cubic-bezier(.2,.7,.3,1); }
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px); } to { opacity: 1; transform: none; } }
/* larger, comfier tap targets on mobile */
@media (max-width: 760px) {
  .btn { padding: 9px 13px; }
  .btn.tiny { padding: 7px 11px; font-size: 11.5px; }
  input, textarea, select { padding: 11px 12px; font-size: 14px; }
}

/* a flight/hotel button that already has a document attached */
.btn.done-doc { color: var(--good); border-color: rgba(61,220,151,0.4); background: rgba(61,220,151,0.10); }

/* =========================================================================
   ✨ v2 RENEWAL — light/dark themes, universal bottom nav, simpler shell,
   account + Conquered map
   ========================================================================= */

/* ---- Light theme ---- */
[data-theme="light"] {
  --bg0: #e9eefb; --bg1: #f4f7ff; --bg2: #ffffff;
  --glass: rgba(255,255,255,0.72);
  --glass-strong: rgba(255,255,255,0.95);
  --border: rgba(40,70,140,0.16);
  --border-bright: rgba(58,120,255,0.45);
  --text: #14203b; --muted: #5d6a86;
  --shadow: 0 10px 30px rgba(40,70,140,0.12);
  --glow: 0 0 18px rgba(58,160,255,0.22);
}
[data-theme="light"] body {
  background:
    radial-gradient(1100px 700px at 85% -10%, rgba(164,92,255,0.12), transparent 60%),
    radial-gradient(900px 650px at -10% 5%, rgba(58,160,255,0.14), transparent 55%),
    linear-gradient(170deg, #eef2fc, #f6f9ff 60%, #ffffff);
}
[data-theme="light"] body::before { opacity: 0.5; }
[data-theme="light"] input, [data-theme="light"] textarea, [data-theme="light"] select { background: rgba(255,255,255,0.85); }
[data-theme="light"] .toast { color: var(--text); }
[data-theme="light"] .nav button.active, [data-theme="light"] .bottomnav button.active { color: #16203b; }

/* ---- Simpler shell: drop the sidebar + old topbar, use a sticky header ---- */
.sidebar, .topbar, .scrim { display: none !important; }
.main { padding: 0 22px 100px; width: 100%; }
.appbar {
  position: sticky; top: 0; z-index: 60;
  margin: 0 -22px 18px; padding: 12px 22px;
  border-radius: 0; border-left: 0; border-right: 0; border-top: 0;
}
.brandbtn { display: inline-flex; align-items: center; gap: 8px; background: transparent; border: 0; cursor: pointer; color: var(--text); padding: 0; }
.brandbtn b { font-size: 16px; background: linear-gradient(120deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.brandlogo { width: 30px; height: 30px; border-radius: 9px; background: linear-gradient(135deg, var(--accent), var(--accent2)); display: grid; place-items: center; box-shadow: var(--glow); }
.brandlogo svg { width: 64%; height: 64%; }
.appbar .trip-name { font-size: 13px; opacity: 0.85; }
.page-head { margin-top: 6px; }

/* ---- Universal bottom navigation (floating pill on desktop, full bar on mobile) ---- */
.bottomnav {
  display: flex; position: fixed; left: 50%; transform: translateX(-50%); bottom: 16px;
  gap: 4px; padding: 7px; max-width: 640px; z-index: 70;
  background: var(--glass-strong); border: 1px solid var(--border); border-radius: 20px;
  backdrop-filter: blur(18px) saturate(140%); -webkit-backdrop-filter: blur(18px) saturate(140%);
  box-shadow: var(--shadow);
}
.bottomnav button {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  background: transparent; border: 0; color: var(--muted); cursor: pointer;
  padding: 7px 16px; border-radius: 14px; font-size: 10.5px; font-weight: 600;
  transition: color .15s, background .15s, transform .15s;
}
.bottomnav button .bic { font-size: 18px; line-height: 1; }
.bottomnav button:hover { color: var(--text); }
.bottomnav button.active { color: #fff; background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: var(--glow); }
[data-theme="light"] .bottomnav button.active { color: #fff; }
@media (max-width: 760px) {
  .bottomnav { left: 0; right: 0; bottom: 0; transform: none; max-width: none; width: 100%; border-radius: 18px 18px 0 0; padding: 6px 4px calc(6px + env(safe-area-inset-bottom)); }
  .bottomnav button { flex: 1; padding: 7px 2px; }
  .main { padding: 0 14px 96px; }
  .appbar { margin: 0 -14px 16px; padding: 10px 14px; }
}

/* ---- "More" sheet ---- */
.more-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.more-item { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 16px 8px; border-radius: 14px; border: 1px solid var(--border); background: rgba(120,150,255,0.06); color: var(--text); cursor: pointer; font-size: 12px; transition: all .15s; }
.more-item:hover { border-color: var(--border-bright); transform: translateY(-2px); }
.more-item.active { background: linear-gradient(135deg, rgba(58,160,255,0.2), rgba(164,92,255,0.2)); border-color: var(--border-bright); }
.more-item .mi-ic { font-size: 24px; }

/* ---- Conquered dashboard CTA ---- */
.conquer-cta {
  display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; cursor: pointer;
  border: 1px solid var(--border-bright);
  background:
    radial-gradient(600px 200px at 0% 0%, rgba(58,160,255,0.18), transparent 70%),
    radial-gradient(500px 200px at 100% 100%, rgba(164,92,255,0.18), transparent 70%),
    var(--glass);
}
.conquer-cta:hover { transform: translateY(-2px); }
.conquer-cta .cc-emoji { font-size: 34px; filter: drop-shadow(0 4px 10px rgba(255,190,80,0.4)); }
.conquer-cta .cc-title { font-size: 17px; font-weight: 700; }
.conquer-cta .cc-sub { color: var(--muted); font-size: 12.5px; }
.conquer-cta .cc-go { margin-left: auto; font-size: 22px; color: var(--accent); }

/* ---- Conquered page ---- */
.cq-hero .cq-count { font-size: 30px; font-weight: 800; background: linear-gradient(120deg, var(--accent), var(--accent2)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
.cq-map { height: 440px; border-radius: 14px; overflow: hidden; display: grid; place-items: center; color: var(--muted); background: rgba(8,12,30,0.4); }
.cq-map .leaflet-container { height: 100%; width: 100%; border-radius: 14px; font-family: inherit; }
.cq-mapfallback { text-align: center; padding: 30px; line-height: 1.7; }
.cq-item { display: flex; align-items: center; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--border); }
.cq-dot { width: 14px; height: 14px; border-radius: 50%; flex-shrink: 0; box-shadow: 0 0 8px rgba(0,0,0,0.3); }
.cq-swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.cq-swatch { width: 30px; height: 30px; border-radius: 9px; cursor: pointer; position: relative; border: 2px solid transparent; }
.cq-swatch input { position: absolute; opacity: 0; }
.cq-swatch:has(input:checked) { border-color: #fff; box-shadow: 0 0 0 2px var(--accent); }
.cq-hero-banner { font-size: 40px; text-align: center; letter-spacing: 6px; }
.auth-card { max-width: 440px; margin: 0 auto; }

/* slightly calmer motion for a more straightforward feel */
.card:hover { transform: translateY(-2px); }

/* page titles must stay legible in light mode */
[data-theme="light"] .page-head h2 { background: linear-gradient(120deg, var(--text), var(--accent)); -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent; }
[data-theme="light"] .appbar { background: rgba(255,255,255,0.82); }

/* Conquered map toolbar (Globe / Flat) */
.cq-toolbar { display: flex; gap: 6px; margin-bottom: 10px; }
.cq-toolbar .btn.active { background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; border-color: transparent; box-shadow: var(--glow); }
.cq-map { position: relative; }
.cq-map > div { margin: 0 auto; }
.cq-map canvas { display: block; border-radius: 14px; }

/* ---------- full-screen document "present" view (show to a gate / front desk) ---------- */
.present { position: fixed; inset: 0; z-index: 300; background: #0b0e1a; display: flex; flex-direction: column; animation: fade .2s ease; }
.present-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px calc(12px + env(safe-area-inset-top)); background: var(--glass-strong); border-bottom: 1px solid var(--border); }
.present-title { font-weight: 800; font-size: 15px; }
.present-sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.present-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.present-stage { flex: 1; display: grid; place-items: center; background: #ffffff; overflow: auto; padding: 8px; }
.present-stage img { max-width: 100%; max-height: 100%; object-fit: contain; }
.present-stage iframe { width: 100%; height: 100%; border: 0; background: #fff; }
.present-fallback { color: #222; text-align: center; font-size: 15px; }

/* ---------- new-trip setup wizard ---------- */
.wizard { position: fixed; inset: 0; z-index: 320; background: rgba(2,4,12,0.75); backdrop-filter: blur(8px); display: flex; align-items: center; justify-content: center; padding: 18px; animation: fade .2s ease; }
.wiz-card { width: 100%; max-width: 520px; max-height: 92vh; overflow-y: auto; background: var(--glass-strong); border: 1px solid var(--border-bright); border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; }
.wiz-head { display: flex; align-items: center; gap: 12px; }
.wiz-logo { width: 40px; height: 40px; border-radius: 11px; background: linear-gradient(135deg, var(--accent), var(--accent2)); display: grid; place-items: center; box-shadow: var(--glow); flex-shrink: 0; }
.wiz-logo svg { width: 64%; height: 64%; }
.wiz-head h2 { margin: 0; font-size: 19px; }
.wiz-step { color: var(--muted); font-size: 11px; text-transform: uppercase; letter-spacing: 0.6px; }
.wiz-prog { height: 6px; border-radius: 6px; background: rgba(120,150,255,0.15); overflow: hidden; margin: 14px 0 16px; }
.wiz-prog span { display: block; height: 100%; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .3s ease; }
.wiz-body { min-height: 140px; }
.wiz-list { display: flex; flex-direction: column; gap: 6px; margin-bottom: 12px; }
.wiz-item { display: flex; align-items: center; justify-content: space-between; gap: 8px; padding: 9px 12px; border: 1px solid var(--border); border-radius: 11px; background: rgba(120,150,255,0.06); font-size: 13px; }
.wiz-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 18px; }
.wiz-ready { text-align: center; padding: 10px 6px; }
.wiz-ready h3 { margin: 8px 0 4px; }

/* Conquered entry on the lock screen */
.lock-conquer { width: 100%; margin-top: 12px; text-align: left; }
.lock-conquer .cc-emoji { font-size: 26px; }
.lock-conquer .cc-title { font-size: 15px; font-weight: 700; display:block; }
.lock-conquer .cc-sub { font-size: 12px; color: var(--muted); display:block; }
