/* =========================================================================
   Eturia ClientArea v3 — design system
   Mobile-first, light/dark, no framework.
   ========================================================================= */

:root {
  --font-ui: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  --font-display: "Fraunces", Georgia, "Times New Roman", serif;

  --bg: #f4f1ec;
  --bg-elev: #ffffff;
  --bg-sunk: #ebe6df;
  --ink: #141a2e;
  --ink-2: #4a5168;
  --ink-3: #8a8fa3;
  --line: rgba(20, 26, 46, .09);
  --brand: #0f3d5e;
  --brand-ink: #ffffff;
  --accent: #e0703c;
  --accent-soft: #fbe6da;
  --ok: #1f9d6b;
  --ok-soft: #dcf3e9;
  --warn: #c98a12;
  --warn-soft: #fbf0d6;
  --bad: #d2434b;
  --bad-soft: #fbe1e2;
  --info: #2c6ecb;
  --info-soft: #e0ebfb;

  --glass: rgba(255, 255, 255, .72);
  --glass-line: rgba(255, 255, 255, .55);
  --shadow-1: 0 1px 2px rgba(20, 26, 46, .06), 0 2px 8px rgba(20, 26, 46, .05);
  --shadow-2: 0 10px 30px -12px rgba(20, 26, 46, .28);
  --shadow-3: 0 24px 60px -20px rgba(15, 30, 60, .45);

  --r-sm: 10px;
  --r-md: 16px;
  --r-lg: 24px;
  --r-xl: 32px;

  --gutter: 16px;
  --nav-h: 72px;
  --top-safe: env(safe-area-inset-top, 0px);
  --bottom-safe: env(safe-area-inset-bottom, 0px);
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b0f1c;
    --bg-elev: #141a2c;
    --bg-sunk: #0f1424;
    --ink: #eef0f7;
    --ink-2: #b4b9cc;
    --ink-3: #7c8299;
    --line: rgba(255, 255, 255, .08);
    --brand: #6fb6e6;
    --brand-ink: #071522;
    --accent: #ff8e5a;
    --accent-soft: rgba(255, 142, 90, .14);
    --ok-soft: rgba(31, 157, 107, .16);
    --warn-soft: rgba(201, 138, 18, .16);
    --bad-soft: rgba(210, 67, 75, .16);
    --info-soft: rgba(44, 110, 203, .18);
    --glass: rgba(20, 26, 44, .72);
    --glass-line: rgba(255, 255, 255, .08);
    --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
    --shadow-2: 0 10px 30px -12px rgba(0, 0, 0, .6);
    --shadow-3: 0 24px 60px -20px rgba(0, 0, 0, .7);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b0f1c;
  --bg-elev: #141a2c;
  --bg-sunk: #0f1424;
  --ink: #eef0f7;
  --ink-2: #b4b9cc;
  --ink-3: #7c8299;
  --line: rgba(255, 255, 255, .08);
  --brand: #6fb6e6;
  --brand-ink: #071522;
  --accent: #ff8e5a;
  --accent-soft: rgba(255, 142, 90, .14);
  --ok-soft: rgba(31, 157, 107, .16);
  --warn-soft: rgba(201, 138, 18, .16);
  --bad-soft: rgba(210, 67, 75, .16);
  --info-soft: rgba(44, 110, 203, .18);
  --glass: rgba(20, 26, 44, .72);
  --glass-line: rgba(255, 255, 255, .08);
  --shadow-1: 0 1px 2px rgba(0, 0, 0, .3);
  --shadow-2: 0 10px 30px -12px rgba(0, 0, 0, .6);
  --shadow-3: 0 24px 60px -20px rgba(0, 0, 0, .7);
  color-scheme: dark;
}

/* ------------------------------------------------------------------ base */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }
body {
  margin: 0;
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font: 400 15px/1.5 var(--font-ui);
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
  -webkit-tap-highlight-color: transparent;
}
img { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; border: 0; background: none; padding: 0; }
:focus-visible { outline: 2.5px solid var(--accent); outline-offset: 2px; border-radius: 6px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.hidden { display: none !important; }

h1, h2, h3, h4 { margin: 0; line-height: 1.15; letter-spacing: -.01em; }
.display { font-family: var(--font-display); font-weight: 600; letter-spacing: -.02em; }
.muted { color: var(--ink-2); }
.subtle { color: var(--ink-3); }
.small { font-size: 13px; }
.tiny { font-size: 11.5px; letter-spacing: .02em; }
.upper { text-transform: uppercase; letter-spacing: .08em; font-weight: 700; }
.num { font-variant-numeric: tabular-nums; }

/* ------------------------------------------------------------------ layout */
#app { min-height: 100dvh; }
.shell { max-width: 560px; margin: 0 auto; position: relative; min-height: 100dvh; }
@media (min-width: 900px) {
  body { background:
      radial-gradient(1200px 600px at 10% -10%, color-mix(in oklab, var(--brand) 18%, transparent), transparent 60%),
      radial-gradient(900px 500px at 110% 10%, color-mix(in oklab, var(--accent) 14%, transparent), transparent 60%),
      var(--bg); }
  .shell { box-shadow: 0 0 0 1px var(--line), var(--shadow-3); background: var(--bg); }
}

.view {
  padding: calc(var(--top-safe) + 8px) var(--gutter) calc(var(--nav-h) + var(--bottom-safe) + 28px);
  animation: view-in .45s var(--ease) both;
}
@keyframes view-in { from { opacity: 0; transform: translateY(10px); } }

.stack > * + * { margin-top: 14px; }
.stack-lg > * + * { margin-top: 24px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.between { justify-content: space-between; }
.grow { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.grid-4 { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; }
.ellipsis { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ------------------------------------------------------------------ top bar */
.topbar {
  position: sticky; top: 0; z-index: 30;
  display: flex; align-items: center; gap: 12px;
  padding: calc(var(--top-safe) + 10px) var(--gutter) 10px;
  margin: calc(-1 * (var(--top-safe) + 8px)) calc(-1 * var(--gutter)) 8px;
  background: color-mix(in oklab, var(--bg) 82%, transparent);
  backdrop-filter: saturate(1.6) blur(16px);
  -webkit-backdrop-filter: saturate(1.6) blur(16px);
  border-bottom: 1px solid transparent;
  transition: border-color .2s;
}
.topbar.scrolled { border-bottom-color: var(--line); }
.topbar h1 { font-size: 20px; font-weight: 700; }
.topbar .logo { height: 22px; width: auto; }
.icon-btn {
  width: 42px; height: 42px; border-radius: 14px;
  display: grid; place-items: center;
  background: var(--bg-elev); box-shadow: var(--shadow-1);
  color: var(--ink); position: relative; flex: none;
  transition: transform .15s var(--ease);
}
.icon-btn:active { transform: scale(.94); }
.icon-btn .dot { position: absolute; top: 9px; right: 10px; width: 8px; height: 8px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 0 2px var(--bg-elev); }
.icon { width: 22px; height: 22px; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; flex: none; }
.icon.sm { width: 18px; height: 18px; }
.icon.lg { width: 28px; height: 28px; }

/* ------------------------------------------------------------------ bottom nav */
.tabbar {
  position: fixed; z-index: 40; left: 50%; transform: translateX(-50%);
  bottom: calc(10px + var(--bottom-safe));
  width: min(calc(100% - 24px), 520px);
  height: 64px; border-radius: 22px;
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
  background: var(--glass);
  backdrop-filter: saturate(1.8) blur(20px);
  -webkit-backdrop-filter: saturate(1.8) blur(20px);
  border: 1px solid var(--glass-line);
  box-shadow: var(--shadow-3);
}
.tabbar a {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  font-size: 10.5px; font-weight: 600; color: var(--ink-3);
  padding: 8px 0; position: relative; transition: color .2s;
}
.tabbar a.active { color: var(--ink); }
.tabbar a.active::after {
  content: ""; position: absolute; bottom: 2px; width: 18px; height: 3px; border-radius: 3px; background: var(--accent);
}
.tabbar .badge { position: absolute; top: 4px; left: calc(50% + 6px); }
.tabbar .sos {
  justify-self: center; width: 54px; height: 54px; margin-top: -26px;
  border-radius: 18px; display: grid; place-items: center;
  background: linear-gradient(140deg, var(--accent), #c2410c);
  color: #fff; box-shadow: 0 10px 24px -6px color-mix(in oklab, var(--accent) 70%, transparent);
  border: 3px solid var(--bg);
}
.tabbar .sos::after { display: none; }

/* ------------------------------------------------------------------ cards */
.card {
  background: var(--bg-elev); border-radius: var(--r-lg);
  box-shadow: var(--shadow-1); padding: 16px;
  border: 1px solid var(--line);
}
.card.flat { box-shadow: none; }
.card.tap { transition: transform .15s var(--ease), box-shadow .2s; display: block; }
.card.tap:active { transform: scale(.985); }
.card.row { display: flex; }
.card-title { font-size: 15px; font-weight: 700; }
.section-head { display: flex; align-items: baseline; justify-content: space-between; margin: 26px 2px 10px; }
.section-head h2 { font-size: 18px; font-weight: 700; }
.section-head a, .link { color: var(--brand); font-weight: 600; font-size: 13.5px; }

.list { background: var(--bg-elev); border-radius: var(--r-lg); border: 1px solid var(--line); overflow: hidden; box-shadow: var(--shadow-1); }
.list > .item { display: flex; align-items: center; gap: 14px; padding: 14px 16px; position: relative; }
.list > .item + .item::before { content: ""; position: absolute; top: 0; left: 64px; right: 0; height: 1px; background: var(--line); }
.list > a.item:active, .list > button.item:active { background: var(--bg-sunk); }
.list > button.item { width: 100%; text-align: left; }
.item .lead {
  width: 36px; height: 36px; border-radius: 12px; display: grid; place-items: center; flex: none;
  background: var(--bg-sunk); color: var(--brand);
}
.item .lead.accent { background: var(--accent-soft); color: var(--accent); }
.item .lead.ok { background: var(--ok-soft); color: var(--ok); }
.item .lead.warn { background: var(--warn-soft); color: var(--warn); }
.item .lead.bad { background: var(--bad-soft); color: var(--bad); }
.item .lead.info { background: var(--info-soft); color: var(--info); }
.item .t { font-weight: 600; }
.item .s { color: var(--ink-3); font-size: 13px; }
.item .chev { color: var(--ink-3); }

/* ------------------------------------------------------------------ chips, badges */
.chip {
  display: inline-flex; align-items: center; gap: 6px;
  font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 999px;
  background: var(--bg-sunk); color: var(--ink-2); white-space: nowrap;
}
.chip.ok { background: var(--ok-soft); color: var(--ok); }
.chip.warn { background: var(--warn-soft); color: var(--warn); }
.chip.bad { background: var(--bad-soft); color: var(--bad); }
.chip.info { background: var(--info-soft); color: var(--info); }
.chip.accent { background: var(--accent-soft); color: var(--accent); }
.chip.glass { background: rgba(255,255,255,.18); color: #fff; backdrop-filter: blur(8px); }
.chip .pulse { width: 7px; height: 7px; border-radius: 50%; background: currentColor; animation: pulse 1.6s infinite; }
@keyframes pulse { 0% { box-shadow: 0 0 0 0 currentColor; } 70% { box-shadow: 0 0 0 6px transparent; } }
.badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 999px;
  font-size: 10.5px; font-weight: 800; line-height: 18px; text-align: center;
  background: var(--accent); color: #fff;
}

/* ------------------------------------------------------------------ buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 50px; padding: 0 20px; border-radius: 16px;
  font-weight: 700; font-size: 15px;
  background: var(--ink); color: var(--bg);
  transition: transform .12s var(--ease), opacity .2s, box-shadow .2s;
}
.btn:active { transform: scale(.97); }
.btn[disabled] { opacity: .55; pointer-events: none; }
.btn.block { width: 100%; }
.btn.sm { height: 38px; padding: 0 14px; font-size: 13.5px; border-radius: 12px; }
.btn.accent { background: linear-gradient(135deg, var(--accent), #c2410c); color: #fff; box-shadow: 0 10px 24px -10px var(--accent); }
.btn.brand { background: var(--brand); color: var(--brand-ink); }
.btn.ghost { background: var(--bg-elev); color: var(--ink); border: 1px solid var(--line); }
.btn.soft { background: var(--bg-sunk); color: var(--ink); }
.btn.danger { background: var(--bad-soft); color: var(--bad); }
.btn .spinner { width: 18px; height: 18px; border: 2.5px solid currentColor; border-right-color: transparent; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* quick actions */
.qa {
  display: flex; flex-direction: column; align-items: center; gap: 8px;
  font-size: 12px; font-weight: 600; color: var(--ink-2); text-align: center;
}
.qa .ic {
  width: 58px; height: 58px; border-radius: 20px; display: grid; place-items: center;
  background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow-1); color: var(--brand);
  transition: transform .15s var(--ease);
}
.qa:active .ic { transform: scale(.92); }
.qa .ic { position: relative; }
.qa .ic .badge { position: absolute; top: -4px; right: -4px; }

/* ------------------------------------------------------------------ forms */
.field { display: block; }
.field > span { display: block; font-size: 12.5px; font-weight: 700; color: var(--ink-2); margin: 0 0 6px 4px; }
.input, .select, .textarea {
  width: 100%; height: 52px; border-radius: 16px; padding: 0 16px;
  background: var(--bg-elev); border: 1.5px solid var(--line);
  outline: none; transition: border-color .2s, box-shadow .2s;
  font-size: 16px; /* avoid iOS zoom */
}
.textarea { height: auto; min-height: 120px; padding: 14px 16px; resize: vertical; }
.input:focus, .select:focus, .textarea:focus { border-color: var(--brand); box-shadow: 0 0 0 4px color-mix(in oklab, var(--brand) 16%, transparent); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 52px; }
.input-wrap .suffix { position: absolute; right: 6px; top: 6px; width: 40px; height: 40px; border-radius: 12px; display: grid; place-items: center; color: var(--ink-3); }
.hint { font-size: 12.5px; color: var(--ink-3); margin: 6px 4px 0; }
.err { font-size: 13px; color: var(--bad); margin: 6px 4px 0; }

.switch { position: relative; width: 50px; height: 30px; flex: none; }
.switch input { opacity: 0; width: 0; height: 0; position: absolute; }
.switch i { position: absolute; inset: 0; border-radius: 999px; background: var(--bg-sunk); border: 1px solid var(--line); transition: background .2s; }
.switch i::after { content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px; border-radius: 50%; background: #fff; box-shadow: 0 2px 6px rgba(0,0,0,.2); transition: transform .25s var(--ease); }
.switch input:checked + i { background: var(--ok); }
.switch input:checked + i::after { transform: translateX(20px); }

.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; padding: 4px; border-radius: 14px; background: var(--bg-sunk); gap: 4px; }
.seg button { height: 38px; border-radius: 11px; font-weight: 700; font-size: 13.5px; color: var(--ink-2); transition: background .2s, color .2s; }
.seg button.on { background: var(--bg-elev); color: var(--ink); box-shadow: var(--shadow-1); }

.choices { display: flex; flex-wrap: wrap; gap: 8px; }
.choices label { position: relative; }
.choices input { position: absolute; opacity: 0; }
.choices span { display: inline-block; padding: 9px 14px; border-radius: 12px; border: 1.5px solid var(--line); background: var(--bg-elev); font-size: 13.5px; font-weight: 600; transition: all .15s; }
.choices input:checked + span { border-color: var(--brand); background: color-mix(in oklab, var(--brand) 12%, var(--bg-elev)); color: var(--brand); }
.choices input:focus-visible + span { outline: 2.5px solid var(--accent); outline-offset: 2px; }

/* ------------------------------------------------------------------ greeting / hero */
.hello { display: flex; align-items: center; gap: 12px; margin: 6px 2px 18px; }
.hello .avatar { width: 46px; height: 46px; border-radius: 16px; display: grid; place-items: center; font-weight: 800; color: #fff; background: linear-gradient(135deg, var(--brand), #3a7ca5); flex: none; }
.hello h1 { font-size: 24px; }

.trip-hero {
  position: relative; overflow: hidden; border-radius: var(--r-xl);
  color: #fff; padding: 20px; min-height: 260px;
  display: flex; flex-direction: column; justify-content: space-between;
  box-shadow: var(--shadow-3); isolation: isolate;
  background: var(--hero, linear-gradient(135deg, #0f3d5e, #1f7a8c));
}
.trip-hero::before {
  content: ""; position: absolute; inset: -40%; z-index: -1;
  background:
    radial-gradient(40% 40% at 20% 30%, rgba(255,255,255,.28), transparent 60%),
    radial-gradient(35% 35% at 80% 70%, rgba(255,190,120,.35), transparent 60%),
    radial-gradient(30% 30% at 60% 10%, rgba(120,220,255,.3), transparent 60%);
  animation: aurora 18s ease-in-out infinite alternate;
}
.trip-hero::after {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background-image: radial-gradient(rgba(255,255,255,.14) 1px, transparent 1px);
  background-size: 14px 14px; mask-image: linear-gradient(180deg, transparent, #000 70%);
}
@keyframes aurora { to { transform: translate(8%, -6%) rotate(12deg); } }
.trip-hero .badge-img {
  position: absolute; right: -26px; top: -26px; width: 132px; height: 132px; border-radius: 50%;
  opacity: .95; filter: drop-shadow(0 18px 30px rgba(0,0,0,.25)); background: #fff;
  animation: float 6s ease-in-out infinite;
}
@keyframes float { 50% { transform: translateY(8px) rotate(-3deg); } }
.trip-hero .country { font-family: var(--font-display); font-size: 38px; font-weight: 600; line-height: 1.02; max-width: 70%; text-shadow: 0 2px 20px rgba(0,0,0,.15); }
.trip-hero .dates { opacity: .92; font-weight: 600; margin-top: 6px; }
.trip-hero .product { opacity: .78; font-size: 13.5px; margin-top: 2px; }
.trip-hero .foot { display: flex; align-items: flex-end; justify-content: space-between; gap: 10px; margin-top: 20px; }
.countdown { display: flex; gap: 8px; }
.countdown div { min-width: 56px; padding: 8px 6px; border-radius: 14px; text-align: center; background: rgba(255,255,255,.16); backdrop-filter: blur(10px); border: 1px solid rgba(255,255,255,.22); }
.countdown b { display: block; font-size: 22px; line-height: 1; font-variant-numeric: tabular-nums; }
.countdown small { font-size: 10.5px; opacity: .85; text-transform: uppercase; letter-spacing: .06em; }

/* progress pipeline */
.steps { display: flex; gap: 6px; margin-top: 16px; }
.steps i { flex: 1; height: 5px; border-radius: 5px; background: rgba(255,255,255,.25); overflow: hidden; position: relative; }
.steps i.done { background: #fff; }
.steps i.now::after { content: ""; position: absolute; inset: 0; background: #fff; transform-origin: left; animation: fill 1.6s var(--ease) infinite; }
@keyframes fill { from { transform: scaleX(0); } to { transform: scaleX(1); opacity: 0; } }

/* trip list card */
.card.trip-card { display: flex; gap: 14px; align-items: center; padding: 12px; }
.trip-card .thumb { width: 64px; height: 64px; border-radius: 18px; flex: none; display: grid; place-items: center; background: var(--hero); position: relative; overflow: hidden; }
.trip-card .thumb img { width: 54px; height: 54px; border-radius: 50%; background: #fff; }
.trip-card h3 { font-size: 16px; font-weight: 700; }

/* ------------------------------------------------------------------ alerts */
.alert { display: flex; gap: 12px; align-items: flex-start; padding: 14px 16px; border-radius: var(--r-md); }
.alert .icon { margin-top: 1px; }
.alert.warn { background: var(--warn-soft); color: color-mix(in oklab, var(--warn) 70%, var(--ink)); }
.alert.bad { background: var(--bad-soft); color: color-mix(in oklab, var(--bad) 75%, var(--ink)); }
.alert.info { background: var(--info-soft); color: color-mix(in oklab, var(--info) 70%, var(--ink)); }
.alert.ok { background: var(--ok-soft); color: color-mix(in oklab, var(--ok) 70%, var(--ink)); }
.alert b { display: block; }
.alert .small { display: block; opacity: .9; margin-top: 2px; }
.alert-cta { align-self: center; flex: none; font-size: 12px; font-weight: 800; padding: 6px 11px; border-radius: 999px; border: 1.5px solid currentColor; }
.alerts-scroll { display: flex; align-items: flex-start; gap: 10px; overflow-x: auto; scroll-snap-type: x mandatory; margin: 0 calc(-1 * var(--gutter)); padding: 2px var(--gutter) 6px; scrollbar-width: none; }
.alerts-scroll::-webkit-scrollbar { display: none; }
.alerts-scroll > * { scroll-snap-align: start; flex: 0 0 86%; }

/* ------------------------------------------------------------------ club card */
.club {
  --c1: #9aa3b5; --c2: #e9edf5; --c3: #6b7488; --ink-c: #1c2333;
  position: relative; aspect-ratio: 1.586; border-radius: 22px; padding: 20px;
  color: var(--ink-c); overflow: hidden; isolation: isolate;
  background: linear-gradient(125deg, var(--c1) 0%, var(--c2) 38%, var(--c1) 62%, var(--c3) 100%);
  box-shadow: var(--shadow-3), inset 0 1px 0 rgba(255,255,255,.6);
  display: flex; flex-direction: column; justify-content: space-between;
  transform-style: preserve-3d; transition: transform .6s var(--ease);
}
.club::before {
  content: ""; position: absolute; inset: 0; z-index: -1;
  background: linear-gradient(105deg, transparent 30%, rgba(255,255,255,.55) 45%, transparent 60%);
  transform: translateX(-100%); animation: sheen 5s ease-in-out infinite 1s;
}
@keyframes sheen { 40%, 100% { transform: translateX(100%); } }
.club::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .18;
  background-image: repeating-radial-gradient(circle at 85% 120%, transparent 0 10px, currentColor 10px 11px);
}
.club.gold { --c1: #b8862b; --c2: #f6dc93; --c3: #8a5d12; --ink-c: #2b1d05; }
.club.platinum { --c1: #2b2f3a; --c2: #6f7686; --c3: #12141a; --ink-c: #f2f4f8; }
.club.ivory { --c1: #d9cfb8; --c2: #fbf7ec; --c3: #b7a98a; --ink-c: #2c2617; }
.club.silver { --c1: #9aa3b5; --c2: #eef1f7; --c3: #6b7488; --ink-c: #1c2333; }
.club.standard { --c1: #0f3d5e; --c2: #2f7fa8; --c3: #0a2a42; --ink-c: #fff; }
.club .brand { font-family: var(--font-display); font-size: 20px; font-weight: 700; letter-spacing: .01em; }
.club .tier { font-size: 12px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; opacity: .85; }
.club .chipcard { width: 40px; height: 30px; border-radius: 7px; background: linear-gradient(135deg, #f2d48a, #b48a2c); box-shadow: inset 0 0 0 1px rgba(0,0,0,.15); }
.club .holder { font-weight: 700; letter-spacing: .08em; text-transform: uppercase; font-size: 14px; }
.club .cardno { font-family: ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .14em; font-size: 15px; opacity: .9; }
.club.mini { aspect-ratio: auto; padding: 14px 16px; border-radius: 18px; flex-direction: row; align-items: center; gap: 12px; }
.club.mini .brand { font-size: 16px; }

.points-ring { --p: 0; width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; flex: none;
  background: conic-gradient(var(--accent) calc(var(--p) * 1%), var(--bg-sunk) 0); }
.points-ring span { width: 50px; height: 50px; border-radius: 50%; background: var(--bg-elev); display: grid; place-items: center; font-weight: 800; font-size: 13px; }

/* ------------------------------------------------------------------ consultant */
.agent { display: flex; gap: 14px; align-items: center; }
.agent .ph { width: 56px; height: 56px; border-radius: 18px; object-fit: cover; background: var(--bg-sunk); flex: none; }
.agent .presence { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--bg-elev); position: absolute; right: -2px; bottom: -2px; background: var(--ok); }
.agent .presence.off { background: var(--warn); }
.agent-actions { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }

/* ------------------------------------------------------------------ timeline (itinerary) */
.timeline { position: relative; padding-left: 28px; }
.timeline::before { content: ""; position: absolute; left: 9px; top: 6px; bottom: 6px; width: 2px; background: linear-gradient(var(--brand), var(--accent)); border-radius: 2px; opacity: .35; }
.tl-item { position: relative; padding-bottom: 18px; }
.tl-item::before { content: ""; position: absolute; left: -24px; top: 4px; width: 12px; height: 12px; border-radius: 50%; background: var(--bg); border: 3px solid var(--brand); }
.tl-item.today::before { border-color: var(--accent); box-shadow: 0 0 0 5px var(--accent-soft); }
.tl-item .day { font-size: 12px; font-weight: 800; color: var(--accent); text-transform: uppercase; letter-spacing: .06em; }
.tl-item h4 { font-size: 15.5px; margin: 2px 0 4px; }
.tl-item .body { color: var(--ink-2); font-size: 14px; }
.tl-item .body p { margin: 0 0 6px; }

/* flight boarding pass */
.pass { position: relative; border-radius: var(--r-lg); background: var(--bg-elev); border: 1px solid var(--line); box-shadow: var(--shadow-1); overflow: hidden; }
.pass .top { padding: 16px; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px; }
.pass .iata { font-size: 30px; font-weight: 800; letter-spacing: .02em; line-height: 1; }
.pass .city { font-size: 12px; color: var(--ink-3); }
.pass .plane { color: var(--accent); display: grid; place-items: center; }
.pass .plane .line { width: 70px; border-top: 2px dashed var(--line); margin-top: 6px; }
.pass .bottom { border-top: 2px dashed var(--line); padding: 12px 16px; display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; font-size: 13px; position: relative; }
.pass .bottom::before, .pass .bottom::after { content: ""; position: absolute; top: -11px; width: 20px; height: 20px; border-radius: 50%; background: var(--bg); border: 1px solid var(--line); }
.pass .bottom::before { left: -11px; } .pass .bottom::after { right: -11px; }
.pass label { display: block; font-size: 10.5px; color: var(--ink-3); text-transform: uppercase; letter-spacing: .06em; font-weight: 700; }

/* invoices */
.money-hero { border-radius: var(--r-xl); padding: 20px; color: #fff; background: linear-gradient(135deg, #142f4d, #0f3d5e 50%, #1f6f8b); box-shadow: var(--shadow-3); position: relative; overflow: hidden; }
.money-hero::after { content: ""; position: absolute; width: 240px; height: 240px; right: -80px; top: -80px; border-radius: 50%; background: radial-gradient(circle, rgba(255,255,255,.18), transparent 70%); }
.money-hero .amount { font-size: 36px; font-weight: 800; letter-spacing: -.02em; margin: 4px 0 2px; }
.bar { height: 8px; border-radius: 8px; background: rgba(255,255,255,.18); overflow: hidden; }
.bar i { display: block; height: 100%; border-radius: 8px; background: linear-gradient(90deg, #7ee0b5, #fff); }
.bar.light { background: var(--bg-sunk); }
.bar.light i { background: linear-gradient(90deg, var(--ok), #6fd3a6); }

/* tabs (sticky inside detail) */
.tabs { position: sticky; top: calc(var(--top-safe) + 62px); z-index: 20; display: flex; gap: 6px; overflow-x: auto; scrollbar-width: none;
  margin: 16px calc(-1 * var(--gutter)) 14px; padding: 8px var(--gutter); background: color-mix(in oklab, var(--bg) 88%, transparent); backdrop-filter: blur(12px); }
.tabs::-webkit-scrollbar { display: none; }
.tabs button { flex: none; height: 36px; padding: 0 14px; border-radius: 12px; font-weight: 700; font-size: 13.5px; color: var(--ink-2); background: var(--bg-elev); border: 1px solid var(--line); }
.tabs button.on { background: var(--ink); color: var(--bg); border-color: var(--ink); }

/* docs grid */
.doc { display: flex; gap: 12px; align-items: center; padding: 12px; border-radius: var(--r-md); background: var(--bg-elev); border: 1px solid var(--line); }
.doc .ext { width: 42px; height: 50px; border-radius: 10px; display: grid; place-items: center; font-size: 11px; font-weight: 800; color: #fff; background: linear-gradient(160deg, #e45656, #b92f3c); flex: none; }
.doc .ext.img { background: linear-gradient(160deg, #3fb38a, #20785b); }
.doc .ext.doc { background: linear-gradient(160deg, #3d7fd6, #2457a3); }

/* passengers */
.pax { display: flex; align-items: center; gap: 12px; }
.pax .av { width: 40px; height: 40px; border-radius: 14px; display: grid; place-items: center; font-weight: 800; font-size: 14px; color: var(--brand); background: color-mix(in oklab, var(--brand) 14%, var(--bg-elev)); flex: none; }

/* ------------------------------------------------------------------ login */
.auth {
  min-height: 100dvh; display: flex; flex-direction: column; justify-content: flex-end;
  padding: calc(var(--top-safe) + 24px) var(--gutter) calc(var(--bottom-safe) + 24px);
  position: relative; overflow: hidden; color: #fff; isolation: isolate;
  background: #071a2b;
}
.auth .bg { position: absolute; inset: 0; z-index: -2; background: url("../img/login-bg.jpg") center/cover; opacity: .55; transform: scale(1.08); animation: kenburns 30s ease-in-out infinite alternate; }
@keyframes kenburns { to { transform: scale(1.18) translate(-2%, -2%); } }
.auth::before { content: ""; position: absolute; inset: 0; z-index: -1;
  background: radial-gradient(80% 50% at 20% 0%, rgba(224,112,60,.45), transparent 60%), radial-gradient(70% 50% at 100% 30%, rgba(60,170,220,.35), transparent 60%), linear-gradient(180deg, rgba(7,26,43,.1), #071a2b 72%); }
.auth .brandmark { position: absolute; top: calc(var(--top-safe) + 28px); left: var(--gutter); right: var(--gutter); display: flex; justify-content: space-between; align-items: center; }
.wordmark { font-family: var(--font-display); font-weight: 700; font-size: 28px; letter-spacing: -.02em; }
.wordmark::after { content: "."; color: var(--accent); }
.auth .wordmark::after { color: #ffb48a; }
.auth h1 { font-family: var(--font-display); font-size: clamp(34px, 9vw, 46px); font-weight: 600; line-height: 1.02; margin-bottom: 10px; }
.auth h1 em { font-style: italic; color: #ffb48a; }
.auth .lead { color: rgba(255,255,255,.78); margin: 0 0 22px; max-width: 34ch; }
.auth-card { background: rgba(255,255,255,.1); border: 1px solid rgba(255,255,255,.16); backdrop-filter: blur(24px) saturate(1.4); -webkit-backdrop-filter: blur(24px) saturate(1.4); border-radius: 28px; padding: 18px; }
.auth-card .input { background: rgba(255,255,255,.95); color: #141a2e; border-color: transparent; }
.auth-card .field > span { color: rgba(255,255,255,.8); }
.auth-card .seg { background: rgba(255,255,255,.12); }
.auth-card .seg button { color: rgba(255,255,255,.75); }
.auth-card .seg button.on { background: #fff; color: #141a2e; }
.auth .divider { display: flex; align-items: center; gap: 12px; color: rgba(255,255,255,.6); font-size: 12.5px; margin: 14px 0; }
.auth .divider::before, .auth .divider::after { content: ""; flex: 1; height: 1px; background: rgba(255,255,255,.2); }
.btn.google { background: #fff; color: #1f1f1f; }
.otp { width: 100%; height: 64px; border: 0; border-radius: 16px; background: rgba(255,255,255,.95); color: #141a2e;
  text-align: center; font: 800 30px/1 ui-monospace, "SF Mono", Menlo, monospace; letter-spacing: .5em; padding-left: .5em; outline: none; }
.otp:focus { box-shadow: 0 0 0 4px rgba(255,180,138,.55); }
.otp::placeholder { color: #c3c7d4; }

/* ------------------------------------------------------------------ sheet / toast */
.scrim { position: fixed; inset: 0; z-index: 60; background: rgba(8, 12, 24, .45); backdrop-filter: blur(3px); animation: fade .25s both; }
@keyframes fade { from { opacity: 0; } }
.sheet {
  position: fixed; z-index: 61; left: 50%; bottom: 0; transform: translateX(-50%);
  width: min(100%, 560px); max-height: 88dvh; overflow-y: auto;
  background: var(--bg); border-radius: 28px 28px 0 0;
  padding: 10px var(--gutter) calc(var(--bottom-safe) + 22px);
  box-shadow: var(--shadow-3); animation: sheet-in .38s var(--ease) both;
}
@keyframes sheet-in { from { transform: translate(-50%, 100%); } }
.sheet .grab { width: 40px; height: 5px; border-radius: 5px; background: var(--line); margin: 0 auto 14px; background: var(--ink-3); opacity: .35; }
.sheet h3 { font-size: 20px; margin-bottom: 14px; }

.toast-host { position: fixed; z-index: 80; left: 50%; transform: translateX(-50%); top: calc(var(--top-safe) + 12px); width: min(calc(100% - 24px), 520px); display: grid; gap: 8px; pointer-events: none; }
.toast { pointer-events: auto; display: flex; gap: 10px; align-items: center; padding: 12px 14px; border-radius: 16px; background: var(--ink); color: var(--bg); box-shadow: var(--shadow-3); font-weight: 600; font-size: 14px; animation: toast-in .35s var(--ease) both; }
.toast.ok .icon { color: #6fd3a6; } .toast.bad .icon { color: #ff8a8f; }
@keyframes toast-in { from { opacity: 0; transform: translateY(-12px) scale(.97); } }

/* ------------------------------------------------------------------ skeleton / empty */
.sk { border-radius: 12px; background: linear-gradient(90deg, var(--bg-sunk) 25%, color-mix(in oklab, var(--bg-sunk) 60%, var(--bg-elev)) 50%, var(--bg-sunk) 75%); background-size: 200% 100%; animation: sk 1.3s infinite linear; }
@keyframes sk { to { background-position: -200% 0; } }
.empty { text-align: center; padding: 36px 20px; color: var(--ink-2); }
.empty .art { width: 84px; height: 84px; margin: 0 auto 14px; border-radius: 28px; display: grid; place-items: center; background: var(--bg-sunk); color: var(--ink-3); }

.kv { display: grid; grid-template-columns: auto 1fr; gap: 8px 16px; font-size: 14px; }
.kv dt { color: var(--ink-3); }
.kv dd { margin: 0; font-weight: 600; text-align: right; overflow-wrap: anywhere; }

.stat { padding: 14px; border-radius: var(--r-md); background: var(--bg-elev); border: 1px solid var(--line); }
.stat b { display: block; font-size: 22px; font-weight: 800; letter-spacing: -.02em; }
.stat span { font-size: 12px; color: var(--ink-3); font-weight: 600; }

.demo-ribbon { position: fixed; z-index: 90; top: calc(var(--top-safe) + 2px); left: 50%; transform: translateX(-50%); padding: 3px 8px; border-radius: 8px; font-size: 10.5px; font-weight: 800; letter-spacing: .08em; background: var(--accent); color: #fff; opacity: .85; pointer-events: none; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
