/* =====================================================================
   Van Bortel Referral Rewards® — styles
   Palette and type match vanbortel.com (Montserrat / Open Sans / Zeyada,
   charcoal #353233, Van Bortel blues #003594 · #0075c9).
   ===================================================================== */

:root {
  --ink: #0e0e0e;
  --ink-2: #161515;
  --charcoal: #353233;
  --panel: rgba(255, 255, 255, .035);
  --panel-2: rgba(255, 255, 255, .06);
  --line: rgba(255, 255, 255, .12);
  --line-strong: rgba(255, 255, 255, .3);
  --text: #fff;
  --muted: rgba(255, 255, 255, .64);
  --faint: rgba(255, 255, 255, .36);
  --blue: #0075c9;
  --blue-deep: #003594;
  --blue-bright: #2a9bff;
  --danger: #ff6b6b;
  --success: #3ecf8e;
  --ease: cubic-bezier(.22, 1, .36, 1);
  --font-head: "Montserrat", Arial, sans-serif;
  --font-body: "Open Sans", Arial, sans-serif;
  --font-script: "Zeyada", cursive;
  --radius: 18px;
  --topbar: 76px;
}

*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  background: var(--ink);
  color: var(--text);
  font-family: var(--font-body);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
main { flex: 1; display: flex; flex-direction: column; }
img { display: block; max-width: 100%; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; }
a { color: inherit; }
::selection { background: var(--blue); color: #fff; }

/* Atmosphere: soft brand-blue light + a faint instrument grid */
body.vb-bg::before,
body.vb-bg::after { content: ""; position: fixed; inset: 0; z-index: -1; pointer-events: none; }
body.vb-bg::before {
  background:
    radial-gradient(1100px 620px at 88% -12%, rgba(0, 117, 201, .24), transparent 62%),
    radial-gradient(900px 560px at -12% 112%, rgba(0, 53, 148, .28), transparent 60%),
    linear-gradient(180deg, #151414 0%, #0c0c0c 100%);
}
body.vb-bg::after {
  background-image:
    linear-gradient(rgba(255, 255, 255, .028) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255, 255, 255, .028) 1px, transparent 1px);
  background-size: 72px 72px;
  -webkit-mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 72%);
          mask-image: radial-gradient(ellipse at 50% 40%, #000 20%, transparent 72%);
}

.container { width: 100%; max-width: 1240px; margin: 0 auto; padding: 0 clamp(20px, 4vw, 48px); }

/* ---------- Type ---------- */
.eyebrow {
  display: inline-flex; align-items: center; gap: .6rem;
  font: 600 .72rem/1 var(--font-head);
  letter-spacing: .22em; text-transform: uppercase; color: var(--blue-bright);
}
.eyebrow::before { content: ""; width: 28px; height: 1px; background: currentColor; opacity: .7; }
.display {
  font: 800 clamp(2.4rem, 5vw, 4.1rem)/1.04 var(--font-head);
  letter-spacing: -.02em; text-transform: uppercase;
  margin: 1.4rem 0 1.4rem;
}
.display .accent {
  background: linear-gradient(92deg, #fff 0%, #9cc8f0 55%, var(--blue-bright) 100%);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
.h2 { font: 700 clamp(1.5rem, 2.6vw, 2rem)/1.2 var(--font-head); letter-spacing: -.01em; margin: .9rem 0 .6rem; }
.lead { font-size: clamp(1rem, 1.3vw, 1.15rem); color: var(--muted); max-width: 36em; font-weight: 300; }
.muted { color: var(--muted); }
.script { font-family: var(--font-script); font-size: 1.9rem; line-height: 1; color: #fff; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: .65rem;
  font: 600 .78rem/1 var(--font-head); letter-spacing: .16em; text-transform: uppercase;
  padding: 1.05rem 1.7rem; border-radius: 100vw;
  border: 1.5px solid var(--text); color: var(--text); background: transparent;
  transition: background .35s var(--ease), color .35s var(--ease), border-color .35s var(--ease), transform .35s var(--ease), box-shadow .35s var(--ease);
  white-space: nowrap; text-decoration: none;
}
.btn svg { transition: transform .35s var(--ease); }
.btn:hover { background: #fff; color: #111; }
.btn:hover svg { transform: translateX(3px); }
.btn:active { transform: scale(.98); }
.btn:disabled { opacity: .55; pointer-events: none; }
.btn-solid { background: #fff; color: #111; }
.btn-solid:hover { background: var(--blue); border-color: var(--blue); color: #fff; box-shadow: 0 10px 30px -10px rgba(0, 117, 201, .8); }
.btn-sm { padding: .7rem 1.15rem; font-size: .68rem; }
.btn-block { width: 100%; }
.btn-danger { border-color: rgba(229, 83, 75, .5); color: #e5534b; }
.btn-danger:hover { background: #e5534b; border-color: #e5534b; color: #fff; }
.link-btn {
  font: 600 .78rem/1.4 var(--font-head); letter-spacing: .06em; color: var(--muted);
  border-bottom: 1px solid transparent; transition: color .25s, border-color .25s; text-align: left;
}
.link-btn:hover { color: #fff; border-color: currentColor; }
.icon-btn {
  width: 44px; height: 44px; border-radius: 50%; border: 1px solid var(--line);
  display: inline-grid; place-items: center; color: var(--muted);
  transition: border-color .25s, color .25s, background .25s, opacity .25s;
}
.icon-btn:hover { border-color: #fff; color: #fff; }
.icon-btn:disabled { opacity: 0; pointer-events: none; }
.spinner {
  width: 14px; height: 14px; border-radius: 50%;
  border: 2px solid currentColor; border-right-color: transparent;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Top bar & footer ---------- */
.topbar {
  height: var(--topbar); display: flex; align-items: center; justify-content: space-between;
  padding: 0 clamp(20px, 4vw, 48px); position: relative; z-index: 5;
  border-bottom: 1px solid rgba(255, 255, 255, .06);
}
.brand img { height: 22px; width: auto; }
.topnav { display: flex; align-items: center; gap: 1.4rem; }
.topnav .link-btn { font-size: .72rem; text-transform: uppercase; letter-spacing: .14em; text-decoration: none; }
.site-foot {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .8rem 2rem;
  padding: 1.6rem clamp(20px, 4vw, 48px); border-top: 1px solid rgba(255, 255, 255, .06);
  font: 500 .68rem/1.4 var(--font-head); letter-spacing: .1em; text-transform: uppercase; color: var(--faint);
}
body.in-flow .site-foot { display: none; }
.config-banner {
  background: #b26b00; color: #fff; text-align: center; padding: .55rem 1rem;
  font: 600 .78rem/1.4 var(--font-head);
}

/* ---------- Screens ---------- */
.screen { display: none; flex: 1; }
.screen.is-visible { display: flex; flex-direction: column; animation: screenIn .8s var(--ease) both; }
@keyframes screenIn { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* ---------- Welcome ---------- */
.welcome {
  flex: 1; display: grid; grid-template-columns: 1.25fr .9fr; gap: clamp(32px, 6vw, 96px);
  align-items: center; padding-top: clamp(40px, 7vh, 90px); padding-bottom: clamp(40px, 7vh, 90px);
}
.stats { display: grid; grid-template-columns: repeat(3, 1fr); margin: 2.4rem 0 2rem; border-top: 1px solid var(--line); }
.stat { padding: 1.4rem 1.4rem 0 0; }
.stat + .stat { padding-left: 1.4rem; border-left: 1px solid var(--line); }
.stat b { display: block; font: 700 clamp(1.6rem, 2.6vw, 2.2rem)/1 var(--font-head); margin-bottom: .55rem; letter-spacing: -.02em; }
.stat span { font-size: .84rem; color: var(--muted); line-height: 1.45; display: block; }
.welcome-actions { display: flex; flex-direction: column; gap: 14px; }
.welcome-actions .greeting { font: 600 .82rem/1.4 var(--font-head); color: var(--muted); margin-bottom: .4rem; }
.choice-card {
  position: relative; display: block; width: 100%; text-align: left;
  padding: 1.8rem 4.2rem 1.8rem 1.8rem; border-radius: var(--radius);
  background: var(--panel); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  transition: transform .5s var(--ease), border-color .4s, background .4s, box-shadow .5s var(--ease);
  overflow: hidden; text-decoration: none;
}
.choice-card::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .5s var(--ease);
  background: radial-gradient(600px 200px at 0% 0%, rgba(0, 117, 201, .25), transparent 70%);
}
.choice-card:hover { transform: translateY(-3px); border-color: var(--line-strong); box-shadow: 0 24px 60px -30px rgba(0, 0, 0, .9); }
.choice-card:hover::before { opacity: 1; }
.choice-card.primary { background: linear-gradient(135deg, rgba(0, 117, 201, .22), rgba(0, 53, 148, .12)); border-color: rgba(42, 155, 255, .35); }
.choice-card > * { position: relative; }
.cc-kicker { display: block; font: 600 .66rem/1 var(--font-head); letter-spacing: .2em; text-transform: uppercase; color: var(--blue-bright); margin-bottom: .8rem; }
.cc-title { display: block; font: 700 1.35rem/1.2 var(--font-head); margin-bottom: .35rem; }
.cc-text { display: block; font-size: .9rem; color: var(--muted); }
.cc-arrow {
  position: absolute; right: 1.6rem; top: 50%; translate: 0 -50%;
  width: 44px; height: 44px; border-radius: 50%; display: grid; place-items: center;
  border: 1px solid var(--line-strong); transition: background .4s var(--ease), color .4s, border-color .4s, transform .4s var(--ease);
}
.choice-card:hover .cc-arrow { background: #fff; color: #111; border-color: #fff; transform: translateX(3px); }
.choice-sub { display: flex; justify-content: space-between; gap: 1rem; padding: .2rem .4rem; }

/* ---------- Auth cards ---------- */
.auth-wrap { flex: 1; display: grid; place-items: center; padding: 48px 20px; }
.auth-card {
  width: 100%; max-width: 460px; padding: clamp(28px, 4vw, 44px);
  border-radius: 24px; background: rgba(22, 21, 21, .72); border: 1px solid var(--line);
  -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px);
  box-shadow: 0 40px 80px -40px rgba(0, 0, 0, .9);
}
.auth-card .lead { font-size: .95rem; }
.back-link { display: inline-flex; align-items: center; gap: .5rem; font: 600 .72rem/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 1.8rem; }
.back-link:hover { color: #fff; }
.form { display: grid; gap: 1rem; margin-top: 1.6rem; }
.field { display: grid; gap: .45rem; }
.field > span { font: 600 .68rem/1 var(--font-head); letter-spacing: .16em; text-transform: uppercase; color: var(--muted); }
.field input, .field select, .field textarea {
  width: 100%; padding: .95rem 1.05rem; border-radius: 12px;
  background: rgba(255, 255, 255, .04); border: 1px solid var(--line); color: #fff; outline: none;
  transition: border-color .25s, background .25s, box-shadow .25s;
}
.field input:focus, .field select:focus, .field textarea:focus { border-color: var(--blue-bright); background: rgba(255, 255, 255, .06); box-shadow: 0 0 0 4px rgba(42, 155, 255, .14); }
.form-error { color: var(--danger); font-size: .88rem; }
.form-note { color: var(--success); font-size: .9rem; }
.auth-foot { display: flex; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-top: 1.4rem; }

/* ---------- Question flow ---------- */
body.in-flow { height: 100vh; height: 100dvh; }
body.in-flow main { min-height: 0; }
.flow { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.flow-progress { height: 2px; background: rgba(255, 255, 255, .08); }
.flow-progress span {
  display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--blue-deep), var(--blue-bright));
  box-shadow: 0 0 12px rgba(42, 155, 255, .7); transition: width .8s var(--ease);
}
.flow-head, .flow-foot { display: flex; align-items: center; justify-content: space-between; padding-top: 18px; padding-bottom: 18px; }
.flow-part { font: 600 .7rem/1 var(--font-head); letter-spacing: .2em; text-transform: uppercase; color: var(--muted); }
.flow-part b { color: #fff; font-weight: 600; }
.flow-count { font: 500 .75rem/1 var(--font-head); letter-spacing: .14em; color: var(--faint); font-variant-numeric: tabular-nums; }
.stage { position: relative; flex: 1; min-height: 380px; overflow: hidden; }

.slide {
  position: absolute; inset: 0; overflow-y: auto; display: flex;
  transition: transform .75s var(--ease), opacity .55s var(--ease);
}
.slide.enter-right { transform: translateX(9vw); opacity: 0; }
.slide.enter-left  { transform: translateX(-9vw); opacity: 0; }
.slide.exit-left   { transform: translateX(-9vw); opacity: 0; pointer-events: none; }
.slide.exit-right  { transform: translateX(9vw); opacity: 0; pointer-events: none; }
.slide-inner { width: 100%; max-width: 780px; margin: auto; padding: 24px clamp(20px, 4vw, 40px) 48px; }
.slide .a { opacity: 0; transform: translateY(16px); transition: opacity .7s var(--ease), transform .7s var(--ease); }
.slide.is-active .a { opacity: 1; transform: none; }
.slide.is-active .a1 { transition-delay: .12s; }
.slide.is-active .a2 { transition-delay: .2s; }
.slide.is-active .a3 { transition-delay: .3s; }
.slide.is-active .a4 { transition-delay: .4s; }

.q-num { display: inline-flex; align-items: center; gap: .5rem; font: 600 .78rem/1 var(--font-head); letter-spacing: .16em; color: var(--blue-bright); margin-bottom: 1.1rem; font-variant-numeric: tabular-nums; }
.q-title { font: 600 clamp(1.65rem, 3.6vw, 2.7rem)/1.18 var(--font-head); letter-spacing: -.015em; }
.q-hint { color: var(--muted); margin-top: .8rem; font-size: 1.02rem; font-weight: 300; }
.q-fields { display: grid; gap: 1.1rem; margin-top: 2.2rem; }
.q-field { position: relative; }
.q-field::after {
  content: ""; position: absolute; left: 0; right: 0; bottom: 0; height: 2px;
  background: linear-gradient(90deg, var(--blue-bright), var(--blue)); transform: scaleX(0); transform-origin: left;
  transition: transform .6s var(--ease);
}
.q-field:focus-within::after { transform: scaleX(1); }
.q-input {
  width: 100%; background: transparent; border: 0; border-bottom: 1.5px solid var(--line-strong);
  color: #fff; outline: none; padding: .55rem 0 .7rem; border-radius: 0;
  font: 300 clamp(1.25rem, 2.6vw, 1.85rem)/1.3 var(--font-body);
}
.q-input.secondary { font-size: clamp(1.05rem, 2vw, 1.35rem); }
.q-input::placeholder { color: rgba(255, 255, 255, .26); }
.q-error { min-height: 1.4em; color: var(--danger); font-size: .9rem; display: flex; align-items: center; gap: .4rem; }
.q-actions { display: flex; align-items: center; gap: 1.2rem; margin-top: 1.4rem; flex-wrap: wrap; }
.enter-hint { font-size: .8rem; color: var(--faint); }
.enter-hint b { color: var(--muted); font-weight: 600; }
.shake { animation: shake .45s var(--ease); }
@keyframes shake { 20%, 60% { transform: translateX(-8px); } 40%, 80% { transform: translateX(8px); } }

.intro-title { font: 800 clamp(2.4rem, 6vw, 4.4rem)/1.02 var(--font-head); text-transform: uppercase; letter-spacing: -.02em; margin: 1.2rem 0 1.2rem; }
.intro .lead { margin-bottom: 2.2rem; }

/* Aircraft cards */
.aircraft-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; margin-top: 2.2rem; }
.ac-card {
  position: relative; text-align: left; padding: 1.3rem 1.3rem 1.2rem; border-radius: 16px;
  border: 1px solid var(--line); background: var(--panel);
  transition: border-color .3s, background .3s, transform .4s var(--ease);
}
.ac-card:hover { border-color: var(--line-strong); transform: translateY(-2px); }
.ac-card .ac-key {
  position: absolute; top: 1.1rem; right: 1.1rem; width: 26px; height: 26px; border-radius: 7px;
  display: grid; place-items: center; border: 1px solid var(--line-strong);
  font: 600 .7rem/1 var(--font-head); color: var(--muted); transition: all .3s;
}
.ac-card .ac-model { display: block; font: 700 1.7rem/1 var(--font-head); letter-spacing: -.01em; margin-bottom: .45rem; }
.ac-card .ac-name { font-size: .88rem; color: var(--muted); }
.ac-card[aria-pressed="true"] { border-color: var(--blue-bright); background: rgba(0, 117, 201, .16); }
.ac-card[aria-pressed="true"] .ac-key { background: var(--blue-bright); border-color: var(--blue-bright); color: #fff; }

/* Review */
.review { display: grid; gap: 14px; margin-top: 2rem; }
.review-group { border: 1px solid var(--line); border-radius: 16px; background: var(--panel); overflow: hidden; }
.review-group h3 { font: 600 .7rem/1 var(--font-head); letter-spacing: .2em; text-transform: uppercase; color: var(--blue-bright); padding: 1.1rem 1.3rem; border-bottom: 1px solid var(--line); }
.review-row { display: grid; grid-template-columns: 200px 1fr auto; gap: 1rem; align-items: center; padding: .85rem 1.3rem; border-top: 1px solid rgba(255, 255, 255, .05); }
.review-row:first-of-type { border-top: 0; }
.review-row dt { font-size: .82rem; color: var(--muted); }
.review-row dd { font-size: .98rem; word-break: break-word; }
.review-row dd.empty { color: var(--faint); }
.review-row .edit { color: var(--faint); padding: 6px; border-radius: 8px; }
.review-row .edit:hover { color: #fff; background: var(--panel-2); }
.agree { display: flex; gap: .9rem; align-items: flex-start; margin: 1.6rem 0 .4rem; font-size: .92rem; color: var(--muted); cursor: pointer; }
.agree input { appearance: none; flex: none; width: 22px; height: 22px; border-radius: 6px; border: 1.5px solid var(--line-strong); margin-top: 1px; display: grid; place-items: center; transition: all .25s; cursor: pointer; }
.agree input:checked { background: var(--blue-bright); border-color: var(--blue-bright); }
.agree input:checked::after { content: ""; width: 6px; height: 11px; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg) translate(-1px, -1px); }

/* ---------- Done ---------- */
.done { flex: 1; display: grid; place-items: center; padding: 48px 20px 64px; }
.done-card { width: 100%; max-width: 640px; text-align: center; }
.done-check {
  width: 84px; height: 84px; margin: 0 auto 1.6rem; border-radius: 50%; display: grid; place-items: center;
  background: radial-gradient(circle, rgba(42, 155, 255, .25), rgba(0, 53, 148, .1)); border: 1px solid rgba(42, 155, 255, .45);
  animation: pop .9s var(--ease) both;
}
.done-check svg { width: 38px; height: 38px; stroke-dasharray: 30; stroke-dashoffset: 30; animation: draw .8s .35s var(--ease) forwards; }
@keyframes pop { from { transform: scale(.6); opacity: 0; } to { transform: none; opacity: 1; } }
@keyframes draw { to { stroke-dashoffset: 0; } }
.done-card .display { font-size: clamp(2.2rem, 5vw, 3.4rem); margin: .8rem 0 1rem; }
.done-card .lead { margin: 0 auto; }
.ref-code { display: inline-block; margin-top: 1.4rem; padding: .5rem 1rem; border-radius: 100vw; border: 1px solid var(--line); font: 600 .8rem/1 var(--font-head); letter-spacing: .16em; color: var(--muted); }
.ref-code b { color: #fff; }
.link-box { display: flex; align-items: center; gap: .6rem; margin: 1.8rem auto 0; padding: .45rem .45rem .45rem 1.1rem; border-radius: 100vw; background: var(--panel); border: 1px solid var(--line); max-width: 560px; }
.link-box code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font: 400 .85rem/1 ui-monospace, SFMono-Regular, Menlo, monospace; color: var(--muted); text-align: left; }
.account-card { margin-top: 2.4rem; text-align: left; }
.account-card .h2 { font-size: 1.4rem; }
.account-card .form { grid-template-columns: 1fr 1fr; }
.account-card .form .full { grid-column: 1 / -1; }

/* ---------- Status pills (shared with admin) ---------- */
.pill {
  --c: #8a8a8a;
  display: inline-flex; align-items: center; gap: .45rem; white-space: nowrap;
  padding: .38rem .75rem; border-radius: 100vw;
  font: 600 .72rem/1 var(--font-head); letter-spacing: .04em;
  color: var(--c); background: color-mix(in srgb, var(--c) 14%, transparent);
  border: 1px solid color-mix(in srgb, var(--c) 32%, transparent);
}
.pill i { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.tone-blue { --c: #4aa8ff; } .tone-amber { --c: #f0a73a; } .tone-teal { --c: #2cc5b6; } .tone-indigo { --c: #9187ff; }
.tone-green { --c: #3ecf8e; } .tone-gold { --c: #e3b64a; } .tone-red { --c: #ff7a72; } .tone-grey { --c: #9a9a9a; }

/* ---------- Tracking page ---------- */
.track { padding-top: clamp(32px, 6vh, 72px); padding-bottom: 72px; }
.track-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2.4rem; }
.track-head .display { font-size: clamp(2.2rem, 5vw, 3.6rem); margin: 1rem 0 0; }
.ref-list { display: grid; gap: 14px; }
.ref-card { border-radius: var(--radius); border: 1px solid var(--line); background: var(--panel); overflow: hidden; transition: border-color .3s; }
.ref-card:hover, .ref-card.open { border-color: var(--line-strong); }
.ref-summary { width: 100%; display: grid; grid-template-columns: 1fr auto auto; gap: 1.4rem; align-items: center; padding: 1.4rem 1.6rem; text-align: left; }
.ref-summary h3 { font: 700 1.15rem/1.3 var(--font-head); }
.ref-summary p { font-size: .86rem; color: var(--muted); margin-top: .2rem; }
.ref-summary .chev { transition: transform .4s var(--ease); color: var(--faint); }
.ref-card.open .chev { transform: rotate(90deg); }
.ref-detail { display: none; padding: 0 1.6rem 1.8rem; border-top: 1px solid var(--line); }
.ref-card.open .ref-detail { display: block; animation: screenIn .6s var(--ease); }

.stepper { display: grid; grid-template-columns: repeat(6, 1fr); margin: 2rem 0 1.6rem; position: relative; }
.step { position: relative; text-align: center; padding-top: 34px; font: 600 .68rem/1.3 var(--font-head); letter-spacing: .06em; color: var(--faint); }
.step::before { content: ""; position: absolute; top: 11px; left: -50%; right: 50%; height: 2px; background: var(--line); }
.step:first-child::before { display: none; }
.step::after { content: ""; position: absolute; top: 4px; left: 50%; translate: -50% 0; width: 16px; height: 16px; border-radius: 50%; background: var(--ink-2); border: 2px solid var(--line-strong); box-sizing: border-box; }
.step.done { color: var(--muted); }
.step.done::before, .step.current::before { background: var(--blue-bright); }
.step.done::after { background: var(--blue-bright); border-color: var(--blue-bright); }
.step.current { color: #fff; }
.step.current::after { background: #fff; border-color: #fff; box-shadow: 0 0 0 6px rgba(42, 155, 255, .25); }

.status-banner { display: flex; gap: 1rem; align-items: flex-start; padding: 1.1rem 1.3rem; border-radius: 14px; background: var(--panel-2); border: 1px solid var(--line); margin-bottom: 1rem; }
.status-banner p { color: var(--muted); font-size: .94rem; margin-top: .35rem; }
.note-box { padding: 1.1rem 1.3rem; border-radius: 14px; border: 1px solid rgba(42, 155, 255, .3); background: rgba(0, 117, 201, .1); margin-bottom: 1rem; }
.note-box h4, .detail-grid h4, .timeline h4 { font: 600 .66rem/1 var(--font-head); letter-spacing: .2em; text-transform: uppercase; color: var(--blue-bright); margin-bottom: .6rem; }
.detail-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin: 1.4rem 0; }
.detail-grid > div { padding: 1rem 1.1rem; border-radius: 12px; border: 1px solid var(--line); }
.detail-grid b { font: 600 1rem/1.3 var(--font-head); }
.timeline { margin-top: 1.4rem; }
.timeline ol { list-style: none; border-left: 1px solid var(--line); margin-left: 6px; }
.timeline li { position: relative; padding: 0 0 1.1rem 1.4rem; }
.timeline li::before { content: ""; position: absolute; left: -5px; top: 6px; width: 9px; height: 9px; border-radius: 50%; background: var(--blue-bright); }
.timeline time { font-size: .8rem; color: var(--faint); display: block; }
.timeline p { font-size: .9rem; color: var(--muted); }
.empty-state { text-align: center; padding: 64px 20px; border: 1px dashed var(--line); border-radius: var(--radius); color: var(--muted); }
.empty-state .btn { margin-top: 1.4rem; }

/* ---------- Modal ---------- */
.modal { position: fixed; inset: 0; z-index: 50; display: none; place-items: center; padding: 20px; background: rgba(0, 0, 0, .66); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); }
.modal.open { display: grid; animation: fadeIn .35s var(--ease); }
.modal-card { position: relative; width: 100%; max-width: 760px; max-height: 88vh; overflow-y: auto; padding: clamp(28px, 4vw, 48px); border-radius: 24px; background: #161515; border: 1px solid var(--line); animation: screenIn .55s var(--ease); }
.modal-card .icon-btn { position: absolute; top: 18px; right: 18px; }
.modal-card h3 { font: 700 1rem/1.3 var(--font-head); letter-spacing: .1em; text-transform: uppercase; margin: 2rem 0 .9rem; }
.modal-card ol, .modal-card ul { padding-left: 1.2rem; display: grid; gap: .6rem; color: var(--muted); font-size: .95rem; }
.modal-card ul { list-style: none; padding: 0; }
.modal-card ul li { display: flex; gap: .7rem; }
.modal-card ul li svg { flex: none; color: var(--blue-bright); margin-top: 3px; }
@keyframes fadeIn { from { opacity: 0; } to { opacity: 1; } }

/* ---------- Toast ---------- */
.toast {
  position: fixed; left: 50%; bottom: 28px; z-index: 100; translate: -50% 20px; opacity: 0; pointer-events: none;
  padding: .85rem 1.3rem; border-radius: 12px; background: #1f1e1e; color: #fff; border: 1px solid var(--line);
  font: 600 .85rem/1.4 var(--font-head); box-shadow: 0 20px 50px -20px rgba(0, 0, 0, .8);
  transition: opacity .35s var(--ease), translate .35s var(--ease); max-width: calc(100vw - 40px);
}
.toast.show { opacity: 1; translate: -50% 0; }
.toast-success { border-color: rgba(62, 207, 142, .5); }
.toast-error { border-color: rgba(255, 107, 107, .6); }

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .welcome { grid-template-columns: 1fr; }
  .detail-grid { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  :root { --topbar: 64px; }
  .brand img { height: 17px; }
  .topnav { gap: .9rem; }
  .topnav .hide-sm { display: none; }
  .stats { grid-template-columns: 1fr; }
  .stat, .stat + .stat { padding: 1rem 0; border-left: 0; border-bottom: 1px solid var(--line); }
  .aircraft-grid { grid-template-columns: 1fr; }
  .review-row { grid-template-columns: 1fr auto; }
  .review-row dt { grid-column: 1 / -1; margin-bottom: -.6rem; }
  .account-card .form { grid-template-columns: 1fr; }
  .ref-summary { grid-template-columns: 1fr auto; }
  .ref-summary .chev { display: none; }
  .stepper { grid-template-columns: repeat(3, 1fr); row-gap: 1.2rem; }
  .step:nth-child(4)::before { display: none; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; transition-duration: .01ms !important; transition-delay: 0s !important; }
}

/* =====================================================================
   Admin dashboard — light, high-legibility layout for staff
   ===================================================================== */
body.admin { background: #f3f3f1; color: #1c1b1b; }
body.admin .topbar { background: #131313; color: #fff; border: 0; }
body.admin .tone-blue { --c: #0067b8; } body.admin .tone-amber { --c: #b06a00; } body.admin .tone-teal { --c: #0b8478; }
body.admin .tone-indigo { --c: #5848d8; } body.admin .tone-green { --c: #1a8a52; } body.admin .tone-gold { --c: #946d00; }
body.admin .tone-red { --c: #c8372f; } body.admin .tone-grey { --c: #6b6b6b; }
.admin-title { font: 600 .74rem/1 var(--font-head); letter-spacing: .2em; text-transform: uppercase; color: rgba(255, 255, 255, .6); padding-left: 1.2rem; margin-left: 1.2rem; border-left: 1px solid rgba(255, 255, 255, .2); }
.admin-brand { display: flex; align-items: center; }
.admin-main { padding: 32px clamp(16px, 3vw, 40px) 64px; max-width: 1500px; width: 100%; margin: 0 auto; }
.admin-hello { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 24px; }
.admin-hello h1 { font: 700 1.9rem/1.2 var(--font-head); letter-spacing: -.01em; }
.admin-hello p { color: #6a6868; margin-top: .3rem; }
.admin .btn { border-color: #1c1b1b; color: #1c1b1b; }
.admin .btn:hover { background: #1c1b1b; color: #fff; }
.admin .btn-solid { background: #1c1b1b; color: #fff; }
.admin .btn-solid:hover { background: var(--blue); border-color: var(--blue); }
.admin .topbar .btn { border-color: rgba(255, 255, 255, .5); color: #fff; }
.admin .topbar .btn:hover { background: #fff; color: #111; }
.kpis { display: grid; grid-template-columns: repeat(5, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi { background: #fff; border-radius: 16px; padding: 1.2rem 1.3rem; border: 1px solid #e6e5e2; }
.kpi span { font: 600 .68rem/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: #7a7876; }
.kpi b { display: block; font: 700 2rem/1 var(--font-head); margin-top: .7rem; letter-spacing: -.02em; }
.kpi small { display: block; color: #8a8886; font-size: .8rem; margin-top: .4rem; }
.toolbar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.chips { display: flex; gap: 8px; flex-wrap: wrap; flex: 1; }
.chip { padding: .55rem .95rem; border-radius: 100vw; background: #fff; border: 1px solid #e0dfdc; font: 600 .78rem/1 var(--font-head); color: #4a4848; transition: all .2s; }
.chip b { margin-left: .35rem; color: #9a9896; font-weight: 600; }
.chip:hover { border-color: #1c1b1b; }
.chip.active { background: #1c1b1b; border-color: #1c1b1b; color: #fff; }
.chip.active b { color: rgba(255, 255, 255, .6); }
.search { position: relative; }
.search input { width: 300px; max-width: 100%; padding: .75rem 1rem .75rem 2.6rem; border-radius: 100vw; border: 1px solid #e0dfdc; background: #fff; outline: none; font-size: .95rem; }
.search input:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 117, 201, .12); }
.search svg { position: absolute; left: 1rem; top: 50%; translate: 0 -50%; color: #8a8886; }
.table-wrap { background: #fff; border-radius: 16px; border: 1px solid #e6e5e2; overflow-x: auto; }
table.refs { width: 100%; border-collapse: collapse; min-width: 980px; }
table.refs th { text-align: left; font: 600 .68rem/1 var(--font-head); letter-spacing: .14em; text-transform: uppercase; color: #7a7876; padding: 1rem 1.1rem; background: #fafaf9; border-bottom: 1px solid #ebeae7; white-space: nowrap; }
table.refs td { padding: 1rem 1.1rem; border-bottom: 1px solid #f0efed; font-size: .95rem; vertical-align: middle; }
table.refs tbody tr { cursor: pointer; transition: background .15s; }
table.refs tbody tr:hover { background: #f7f9fc; }
table.refs tbody tr:last-child td { border-bottom: 0; }
td .primary { font-weight: 600; }
td .secondary { color: #7a7876; font-size: .85rem; margin-top: .15rem; }
td .ref { font: 600 .82rem/1 var(--font-head); letter-spacing: .04em; }
.flag { display: inline-block; margin-top: .35rem; padding: .2rem .5rem; border-radius: 6px; font: 600 .66rem/1.2 var(--font-head); letter-spacing: .04em; }
.flag-dup { background: #fff1e0; color: #a35a00; }
.flag-exp { background: #fdecea; color: #b42318; }
.flag-new { background: #e6f1fb; color: #0067b8; }
.status-select {
  appearance: none; -webkit-appearance: none; cursor: pointer; border-radius: 100vw;
  padding: .5rem 2rem .5rem .85rem; font: 600 .78rem/1 var(--font-head);
  color: var(--c); background: color-mix(in srgb, var(--c) 10%, #fff) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='10' height='6'%3E%3Cpath d='M1 1l4 4 4-4' stroke='%23777' fill='none' stroke-width='1.5'/%3E%3C/svg%3E") no-repeat right .8rem center;
  border: 1px solid color-mix(in srgb, var(--c) 35%, transparent); outline: none;
}
.status-select:focus { box-shadow: 0 0 0 4px rgba(0, 117, 201, .15); }
.status-select option { color: #1c1b1b; background: #fff; }
.admin-empty { padding: 64px 20px; text-align: center; color: #7a7876; }

/* Drawer */
.drawer-scrim { position: fixed; inset: 0; background: rgba(20, 20, 20, .35); z-index: 40; opacity: 0; pointer-events: none; transition: opacity .35s var(--ease); }
.drawer-scrim.open { opacity: 1; pointer-events: auto; }
.drawer { position: fixed; top: 0; right: 0; bottom: 0; width: min(620px, 100vw); background: #fff; z-index: 41; transform: translateX(100%); transition: transform .5s var(--ease); display: flex; flex-direction: column; visibility: hidden; transition: transform .5s var(--ease), visibility 0s .5s; }
.drawer.open { transform: none; visibility: visible; transition: transform .5s var(--ease); box-shadow: -30px 0 60px -30px rgba(0, 0, 0, .3); }
.drawer-head { padding: 1.4rem 1.6rem; border-bottom: 1px solid #ebeae7; display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; }
.drawer-head h2 { font: 700 1.35rem/1.25 var(--font-head); }
.drawer-head p { color: #7a7876; font-size: .88rem; margin-top: .2rem; }
.drawer .icon-btn { border-color: #e0dfdc; color: #4a4848; flex: none; }
.drawer .icon-btn:hover { border-color: #1c1b1b; color: #1c1b1b; }
.drawer-body { flex: 1; overflow-y: auto; padding: 1.4rem 1.6rem 2rem; }
.drawer-foot { padding: 1rem 1.6rem; border-top: 1px solid #ebeae7; display: flex; gap: .8rem; justify-content: space-between; align-items: center; background: #fafaf9; }
.d-section { margin-bottom: 1.8rem; }
.d-section > h3 { font: 600 .68rem/1 var(--font-head); letter-spacing: .18em; text-transform: uppercase; color: var(--blue); margin-bottom: .9rem; }
.d-grid { display: grid; grid-template-columns: 1fr 1fr; gap: .9rem 1.2rem; }
.d-grid .full { grid-column: 1 / -1; }
.d-item dt { font-size: .76rem; color: #8a8886; margin-bottom: .15rem; }
.d-item dd { font-size: .96rem; word-break: break-word; }
.d-item dd a { color: var(--blue); text-decoration: none; }
.admin .field > span { color: #6a6868; }
.admin .field input, .admin .field select, .admin .field textarea { background: #fff; border-color: #dcdbd8; color: #1c1b1b; }
.admin .field input:focus, .admin .field select:focus, .admin .field textarea:focus { border-color: var(--blue); box-shadow: 0 0 0 4px rgba(0, 117, 201, .12); background: #fff; }
.admin .field textarea { min-height: 84px; resize: vertical; }
.admin .field small { color: #8a8886; font-size: .78rem; }
.reward-box { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; margin-top: .9rem; }
.reward-box div { background: #f4f8fc; border: 1px solid #dbe8f5; border-radius: 12px; padding: .85rem 1rem; }
.reward-box span { font-size: .75rem; color: #5a6b7c; }
.reward-box b { display: block; font: 700 1.15rem/1.2 var(--font-head); margin-top: .2rem; }
.admin .timeline ol { border-color: #e0dfdc; }
.admin .timeline time { color: #8a8886; }
.admin .timeline p { color: #4a4848; }
.admin .auth-card { background: #fff; border-color: #e6e5e2; color: #1c1b1b; box-shadow: 0 30px 60px -40px rgba(0, 0, 0, .3); }
.admin .auth-card .lead { color: #6a6868; }
@media (max-width: 1100px) { .kpis { grid-template-columns: repeat(3, 1fr); } }
@media (max-width: 640px) { .kpis { grid-template-columns: repeat(2, 1fr); } .admin-title { display: none; } .d-grid { grid-template-columns: 1fr; } .search input { width: 100%; } .search { width: 100%; } }
