/* CML8 — cml8.moc.tl shared stylesheet (public + member portal) */

:root {
  --ink: #1a1a1a;
  --ink-soft: #3c3a36;
  --muted: #6d6a63;
  --red: #d5232a;
  --red-dark: #a91b21;
  --bg: #f7f5f1;
  --paper: #ffffff;
  --line: #e4e0d8;
  --line-strong: #c9c4ba;
  --ok: #1e7b34;
  --ok-bg: #e7f4ea;
  --warn: #8a6d00;
  --warn-bg: #fdf3d1;
  --bad: #a91b21;
  --bad-bg: #fbe9e9;
  --info-bg: #eef1f6;
  --info: #33538a;
  --radius: 8px;
  --shadow: 0 1px 2px rgba(26, 26, 26, .06), 0 6px 24px rgba(26, 26, 26, .06);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  --speed: .16s;
}

* { box-sizing: border-box; }

/* The hidden attribute must always win, even over display:flex/grid rules. */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 16px;
  line-height: 1.55;
  color: var(--ink);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}

:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation: none !important; }
}

img { max-width: 100%; height: auto; }

a { color: var(--red-dark); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--red); }

h1, h2, h3, h4 { line-height: 1.2; margin: 0 0 .5em; font-weight: 700; letter-spacing: -.015em; }
h1 { font-size: 1.9rem; }
h2 { font-size: 1.4rem; }
h3 { font-size: 1.1rem; }
p { margin: 0 0 1em; }

.kicker {
  display: block;
  font-size: .78rem;
  font-weight: 700;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--red);
  margin-bottom: .4rem;
}

.container { max-width: 1100px; margin: 0 auto; padding: 0 1.25rem; }
.narrow { max-width: 560px; }

.muted { color: var(--muted); }
.small { font-size: .85rem; }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.mt { margin-top: 1.5rem; }
.hidden { display: none !important; }

/* ---------- Header ---------- */

.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--paper);
  border-bottom: 3px solid var(--ink);
}
.site-header .container {
  display: flex;
  align-items: center;
  gap: 1rem;
  min-height: 64px;
  flex-wrap: wrap;
  padding-top: .5rem;
  padding-bottom: .5rem;
}
.brand { display: flex; align-items: center; gap: .65rem; text-decoration: none; color: var(--ink); }
.brand img { height: 44px; width: auto; }
.brand-code {
  font-weight: 800;
  font-size: 1.05rem;
  letter-spacing: .06em;
}
.site-nav { display: flex; gap: .25rem; margin-left: auto; flex-wrap: wrap; align-items: center; }
.site-nav a {
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: .92rem;
  padding: .45rem .7rem;
  border-radius: var(--radius);
}
.site-nav a:hover { background: var(--bg); color: var(--ink); }
.site-nav a.btn-red { color: #fff; }
.site-nav a.btn-red:hover { background: var(--red-dark); color: #fff; }
.site-nav a[aria-current="page"] { color: var(--red-dark); }

.btn-lang {
  font: inherit;
  font-weight: 700;
  font-size: .8rem;
  letter-spacing: .08em;
  padding: .4rem .6rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: var(--paper);
  color: var(--ink-soft);
  cursor: pointer;
}
.btn-lang:hover { border-color: var(--ink); color: var(--ink); }

/* ---------- Buttons ---------- */

.btn {
  display: inline-block;
  font: inherit;
  font-weight: 600;
  font-size: .95rem;
  padding: .55rem 1.1rem;
  border-radius: var(--radius);
  border: 1.5px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
  text-align: center;
  transition: background-color var(--speed), border-color var(--speed), color var(--speed), box-shadow var(--speed);
}
.btn:hover { background: #000; color: #fff; box-shadow: 0 2px 8px rgba(26, 26, 26, .18); }
.btn:disabled, .btn.busy { opacity: .55; cursor: default; }
.btn-red { background: var(--red); border-color: var(--red); }
.btn-red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn-outline { background: transparent; color: var(--ink); }
.btn-outline:hover { background: var(--ink); color: #fff; }
.btn-ghost {
  background: transparent;
  border-color: var(--line-strong);
  color: var(--ink-soft);
  font-weight: 600;
}
.btn-ghost:hover { border-color: var(--ink); background: transparent; color: var(--ink); }
.btn-sm { padding: .3rem .7rem; font-size: .85rem; }
.btn-danger { background: transparent; border-color: var(--bad); color: var(--bad); }
.btn-danger:hover { background: var(--bad); color: #fff; }
.btn.busy::after { content: "…"; }

/* ---------- Hero (home) ---------- */

.hero {
  background: var(--ink);
  color: #f4f2ee;
  padding: 3.5rem 0 3rem;
  border-bottom: 4px solid var(--red);
}
.hero .kicker { color: var(--red); }
.hero h1 { color: #fff; font-size: 2.3rem; max-width: 22ch; }
/* runway centreline */
.hero h1::after {
  content: "";
  display: block;
  width: 84px;
  height: 4px;
  margin-top: .85rem;
  border-radius: 2px;
  background: repeating-linear-gradient(90deg, var(--red) 0 14px, transparent 14px 24px);
}
.hero p { color: #cfccc5; max-width: 60ch; font-size: 1.05rem; }
.hero .btn-red { margin-top: .5rem; }
.hero-code {
  font-family: var(--mono);
  font-weight: 700;
  color: var(--ink);
  background: #fff;
  border-radius: 4px;
  padding: .05em .35em;
  font-size: .8em;
  vertical-align: .12em;
}

/* ---------- Facts grid ---------- */

.facts {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 1rem;
  margin: -2rem auto 0;
}
.fact {
  background: var(--paper);
  border: 1px solid var(--line);
  border-top: 3px solid var(--red);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1rem 1.1rem;
}
.fact .label {
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--muted);
}
.fact .value { font-size: 1.25rem; font-weight: 700; margin-top: .15rem; }
.fact .sub { font-size: .85rem; color: var(--muted); }

/* ---------- Sections / cards ---------- */

.section { padding: 3rem 0 2rem; }
.section-tight { padding: 1.75rem 0; }

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(260px, 1fr));
  gap: 1.25rem;
}
.card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.4rem 1.5rem;
}
.card h3 { display: flex; align-items: center; gap: .5rem; }
.card .partner-logo { height: 42px; width: auto; display: block; margin-bottom: .75rem; }

.cta-band {
  background: var(--paper);
  border: 1px solid var(--line);
  border-left: 5px solid var(--red);
  border-radius: var(--radius);
  padding: 1.75rem 2rem;
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
  align-items: center;
  justify-content: space-between;
}
.cta-band h2 { margin: 0; }
.cta-band p { margin: .3rem 0 0; color: var(--muted); }

.notice {
  border-radius: var(--radius);
  padding: .9rem 1.1rem;
  margin: 1rem 0;
  border: 1px solid var(--line);
  background: var(--info-bg);
  color: var(--info);
}
.notice-warn { background: var(--warn-bg); color: var(--warn); }
.notice-bad { background: var(--bad-bg); color: var(--bad); }
.notice-ok { background: var(--ok-bg); color: var(--ok); }

/* ---------- Footer ---------- */

.site-footer {
  margin-top: 3rem;
  background: var(--ink);
  color: #b7b3ab;
  padding: 2.25rem 0;
  font-size: .9rem;
}
.site-footer a { color: #e8e5df; }
.site-footer .cols { display: flex; flex-wrap: wrap; gap: 2.5rem; justify-content: space-between; }
.site-footer h4 { color: #fff; font-size: .82rem; letter-spacing: .1em; text-transform: uppercase; }
.site-footer img { height: 36px; width: auto; background: #fff; border-radius: 4px; padding: 4px 8px; }
.site-footer .legal { margin-top: 1.75rem; padding-top: 1rem; border-top: 1px solid #37342f; font-size: .8rem; }

/* ---------- Forms ---------- */

.form-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 1.75rem;
  margin: 2rem auto;
}
.field { margin-bottom: 1rem; }
.field label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .3rem; }
.field .hint { font-size: .8rem; color: var(--muted); margin-top: .25rem; }
.field .hint.ok { color: var(--ok); }
input[type="text"], input[type="email"], input[type="password"], input[type="tel"],
input[type="date"], input[type="datetime-local"], input[type="number"], input[type="file"],
select, textarea {
  font: inherit;
  width: 100%;
  padding: .55rem .7rem;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  background: #fff;
  color: var(--ink);
  transition: border-color var(--speed), box-shadow var(--speed);
}
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--ink);
  box-shadow: 0 0 0 3px rgba(26, 26, 26, .1);
}
input.invalid, select.invalid, textarea.invalid { border-color: var(--bad); }
textarea { min-height: 130px; resize: vertical; }
.field-row { display: flex; gap: 1rem; flex-wrap: wrap; }
.field-row .field { flex: 1 1 180px; }
.field-error { display: block; color: var(--bad); font-size: .82rem; margin-top: .25rem; }

/* Flight-follow: collapsible detail section + repeatable on-board people. */
.fl-details { margin: 1rem 0; border: 1px solid var(--line); border-radius: var(--radius); padding: .75rem 1rem; }
.fl-details > summary { cursor: pointer; font-weight: 600; color: var(--ink-soft); }
.fl-details[open] > summary { margin-bottom: .75rem; }
.fl-person { align-items: center; gap: .5rem; margin-bottom: .5rem; }
.fl-person input { flex: 1 1 110px; min-width: 0; }
.fl-person .p-del { flex: 0 0 auto; padding: .3rem .65rem; }
.form-error {
  background: var(--bad-bg);
  color: var(--bad);
  border-radius: var(--radius);
  padding: .7rem .9rem;
  font-size: .9rem;
}
.form-success {
  background: var(--ok-bg);
  color: var(--ok);
  border-radius: var(--radius);
  padding: .7rem .9rem;
  font-size: .9rem;
}
.check { display: flex; align-items: flex-start; gap: .55rem; font-size: .92rem; margin: .4rem 0; }
.check input { width: auto; margin-top: .25rem; }
fieldset { border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.25rem; margin: 0 0 1.25rem; }
legend { font-weight: 700; font-size: .95rem; padding: 0 .4rem; }

/* Radio cards (membership types) */
.radio-cards { display: grid; gap: .75rem; margin-bottom: 1rem; }
.radio-card {
  display: flex;
  gap: .75rem;
  align-items: flex-start;
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius);
  padding: .85rem 1rem;
  cursor: pointer;
  background: #fff;
}
.radio-card:has(input:checked) { border-color: var(--red); box-shadow: 0 0 0 1px var(--red); }
.radio-card input { width: auto; margin-top: .3rem; }
.radio-card .rc-name { font-weight: 700; }
.radio-card .rc-fee { color: var(--muted); font-size: .88rem; }

/* ---------- Tables ---------- */

.table-wrap { overflow-x: auto; background: var(--paper); border: 1px solid var(--line); border-radius: var(--radius); }
table.data { width: 100%; border-collapse: collapse; font-size: .92rem; }
table.data th, table.data td { text-align: left; padding: .6rem .8rem; border-bottom: 1px solid var(--line); vertical-align: top; }
table.data th {
  font-size: .74rem;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--muted);
  background: var(--bg);
  white-space: nowrap;
}
table.data tbody tr { transition: background-color var(--speed); }
table.data tbody tr:last-child td { border-bottom: none; }
table.data tbody tr:hover { background: #faf8f4; }
table.data td.empty { text-align: center; color: var(--muted); padding: 1.5rem; }

/* Under 640px a `stack` table drops the grid: the header row is hidden and
   each row reads as a small card of label/value pairs (labels come from the
   cells' data-label attributes), so wide tables never force a sideways
   scrollbar on phones. */
@media (max-width: 640px) {
  table.data.stack thead { display: none; }
  table.data.stack, table.data.stack tbody, table.data.stack tr, table.data.stack td { display: block; }
  table.data.stack tbody tr { padding: .5rem 0; border-bottom: 1px solid var(--line); }
  table.data.stack tbody tr:last-child { border-bottom: none; }
  table.data.stack td {
    display: flex;
    justify-content: space-between;
    align-items: baseline;
    gap: 1rem;
    padding: .2rem .8rem;
    border-bottom: none;
    text-align: right;
  }
  table.data.stack td::before {
    content: attr(data-label);
    font-size: .74rem;
    font-weight: 700;
    letter-spacing: .08em;
    text-transform: uppercase;
    color: var(--muted);
    text-align: left;
  }
  table.data.stack td.empty { display: block; text-align: center; }
  table.data.stack td.nowrap { white-space: normal; }
}

/* ---------- Badges ---------- */

.badge {
  display: inline-block;
  font-size: .74rem;
  font-weight: 700;
  letter-spacing: .04em;
  padding: .15rem .6rem;
  border-radius: 999px;
  white-space: nowrap;
  background: var(--info-bg);
  color: var(--info);
}
.badge::before {
  content: "";
  display: inline-block;
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: .65;
  margin-right: .35rem;
  vertical-align: .08em;
}
.badge-ok { background: var(--ok-bg); color: var(--ok); }
.badge-warn { background: var(--warn-bg); color: var(--warn); }
.badge-bad { background: var(--bad-bg); color: var(--bad); }
.badge-muted { background: #eeece7; color: var(--muted); }

/* Multi-station fuel: station picker, inline pills, chips, button columns. */
.station-picker { display: flex; flex-wrap: wrap; gap: .4rem; margin-bottom: 1rem; }
.btn-dark { background: var(--ink); border-color: var(--ink); color: #fff; }
.btn-dark:hover { background: #000; color: #fff; }
.btn-col { display: flex; flex-direction: column; gap: .5rem; align-items: stretch; }
.btn-col .btn { width: 100%; }
.pill {
  display: inline-block;
  font-size: .64rem;
  font-weight: 700;
  letter-spacing: .05em;
  padding: .05rem .4rem;
  border-radius: 999px;
  background: var(--info-bg);
  color: var(--info);
  vertical-align: .12em;
}
.pill-warn { background: var(--warn-bg); color: var(--warn); }
.chip {
  display: inline-block;
  font-size: .82rem;
  padding: .2rem .55rem;
  margin: .1rem .15rem .1rem 0;
  border-radius: 999px;
  background: #eeece7;
  color: var(--ink-soft);
  white-space: nowrap;
}
.chip a { color: var(--muted); text-decoration: none; margin-left: .3rem; font-weight: 700; }
.chip a:hover { color: var(--bad); }

/* ---------- Tabs (contract FR/EN) ---------- */

.tabs { display: flex; gap: .25rem; border-bottom: 2px solid var(--line-strong); margin-bottom: 1rem; }
.tab {
  font: inherit;
  font-weight: 600;
  font-size: .9rem;
  padding: .45rem .9rem;
  background: none;
  border: none;
  border-bottom: 3px solid transparent;
  margin-bottom: -2px;
  cursor: pointer;
  color: var(--muted);
}
.tab.active { color: var(--ink); border-bottom-color: var(--red); }

.contract-body {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  max-height: 30rem;
  overflow-y: auto;
}
/* fallback when the text can't be parsed into clauses */
.contract-body .doc-raw { white-space: pre-wrap; font-size: .95rem; padding: 1.25rem 1.5rem; }

/* structured legal-document rendering */
.contract-doc {
  font-family: Georgia, "Times New Roman", serif;
  color: #23211d;
  padding: 2.25rem 2.5rem 2rem;
}
.contract-doc .doc-head {
  text-align: center;
  border-bottom: 2px solid var(--ink);
  padding-bottom: 1.1rem;
  margin-bottom: 1.6rem;
}
.contract-doc .doc-title {
  font-size: 1.15rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  line-height: 1.35;
  margin: 0 0 .3rem;
}
.contract-doc .doc-party {
  font-style: italic;
  color: #5a564e;
  font-size: .95rem;
  margin: 0;
}
.contract-doc .doc-draft {
  display: inline-block;
  margin-top: .8rem;
  font-family: var(--font);
  font-size: .72rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--warn);
  background: var(--warn-bg);
  border: 1px solid #e5d48a;
  border-radius: 999px;
  padding: .25rem .8rem;
}
.contract-doc .doc-section {
  margin: 2rem 0 1rem;
  padding-top: 1.1rem;
  border-top: 1px solid #d8d4cb;
  font-family: var(--font);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: #6b665c;
}
.contract-doc .clause { display: flex; gap: 1rem; margin-bottom: 1.15rem; }
.contract-doc .clause-no {
  flex: 0 0 auto;
  font-family: var(--font);
  font-weight: 800;
  font-size: .8rem;
  color: #fff;
  background: var(--red);
  border-radius: 4px;
  width: 1.9rem;
  height: 1.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  margin-top: .15rem;
}
.contract-doc .clause-title {
  font-family: var(--font);
  font-weight: 700;
  font-size: .82rem;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--ink);
  margin: 0 0 .25rem;
}
.contract-doc .clause p {
  margin: 0 0 .5em;
  font-size: .95rem;
  line-height: 1.65;
  text-align: justify;
  hyphens: auto;
}
@media (max-width: 640px) {
  .contract-doc { padding: 1.4rem 1.1rem; }
  .contract-doc .clause { gap: .7rem; }
  .contract-doc .clause p { text-align: left; }
}

/* ---------- Member portal layout ---------- */

.portal { display: flex; min-height: calc(100vh - 64px); align-items: stretch; }
/* Groups the mobile Menu button with the nav drawer. display:contents keeps
   the nav a direct flex item of .portal on desktop; on phones the group
   becomes a sticky bar (see the 840px media block). */
.portal-top { display: contents; }
.portal-nav {
  flex: 0 0 220px;
  background: var(--paper);
  border-right: 1px solid var(--line);
  padding: 1.25rem .75rem;
}
.portal-nav a {
  display: block;
  padding: .5rem .8rem;
  border-radius: var(--radius);
  text-decoration: none;
  color: var(--ink-soft);
  font-weight: 600;
  font-size: .92rem;
  margin-bottom: .15rem;
}
.portal-nav a { transition: background-color var(--speed), color var(--speed); }
.portal-nav a:hover { background: var(--bg); }
.portal-nav a.active { background: var(--ink); color: #fff; box-shadow: inset 3px 0 0 var(--red); }
/* A nested item (e.g. Aéronefs under Profil): indented, lighter, kept visually
   tied to the parent above it. */
.portal-nav a.nav-sub {
  margin-left: .9rem;
  padding-left: .9rem;
  font-size: .86rem;
  font-weight: 500;
  border-left: 2px solid var(--line);
  border-top-left-radius: 0;
  border-bottom-left-radius: 0;
}
.portal-nav a.nav-sub.active { border-left-color: var(--red); box-shadow: none; }
.portal-main { flex: 1 1 auto; padding: 1.75rem 2rem 3rem; min-width: 0; }
.portal-main > h1 { margin-bottom: 1.25rem; }
.nav-toggle { display: none; }   /* mobile-only drawer toggle */

.stat-cards { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 1rem; margin-bottom: 1.5rem; }
.stat-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1rem 1.2rem;
}
.stat-card .label { font-size: .74rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.stat-card .value { font-size: 1.5rem; font-weight: 800; margin-top: .2rem; }
.stat-card .sub { font-size: .85rem; color: var(--muted); }
a.stat-card { display: block; text-decoration: none; color: var(--ink); transition: border-color var(--speed), box-shadow var(--speed); }
a.stat-card:hover { border-color: var(--ink); box-shadow: var(--shadow); }

/* Inline action rows (invoice actions, review decisions): controls sit on
   one line and wrap; selects size to content instead of stretching. */
.actions-bar { display: flex; flex-wrap: wrap; gap: .6rem; align-items: center; }

/* Audio memo recorder (issue/dispute modal — memo-rec.js). The meter bar is
   the "you are being captured" signal: it must visibly ride the voice. */
.memo-live { display: flex; align-items: center; gap: .6rem; margin-top: .5rem; }
.memo-meter {
  flex: 1 1 auto;
  height: 12px;
  background: var(--bg);
  border: 1px solid var(--line);
  border-radius: 999px;
  overflow: hidden;
}
.memo-meter-fill { height: 100%; width: 0%; background: var(--red); border-radius: inherit; }
.memo-audio { display: block; width: 100%; margin-top: .5rem; }
.memo-audio[hidden] { display: none; }
.actions-bar select, .select-inline { width: auto; }
.actions-bar .actions-group {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .3rem .55rem;
  border: 1px dashed var(--line-strong);
  border-radius: var(--radius);
}

.view-head { display: flex; align-items: center; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.25rem; }
.view-head h1, .view-head h2 { margin: 0; }

.interstitial { max-width: 760px; margin: 2.5rem auto; }

.list-cards { display: grid; gap: 1rem; }
.list-card {
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 1.1rem 1.3rem;
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
}
.list-card .lc-main { flex: 1 1 260px; }
.list-card .lc-title { font-weight: 700; }
.list-card .lc-sub { color: var(--muted); font-size: .88rem; }
.list-card .lc-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.list-card .lc-thumb {
  flex: 0 0 auto;
  width: 68px; height: 68px;
  object-fit: cover;
  border-radius: 10px;
  border: 1px solid var(--line);
  background: var(--bg, #f2f2f2);
}

/* Aircraft photo capture (aircraft manager + onboarding wizard) */
.ac-photo { margin: 1rem 0 .25rem; }
.ac-photo > label { display: block; font-weight: 600; margin-bottom: .4rem; }
.ac-photo-preview { margin-bottom: .55rem; }
.ac-photo-preview img {
  display: block;
  max-width: 100%;
  width: 320px;
  aspect-ratio: 4 / 3;
  object-fit: cover;
  border-radius: var(--radius);
  border: 1px solid var(--line);
}
.ac-photo-preview[data-empty] {
  width: 320px; max-width: 100%;
  aspect-ratio: 4 / 3;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  display: flex; align-items: center; justify-content: center;
}
.ac-photo-preview[data-empty]::after {
  content: "✈"; font-size: 2rem; color: var(--muted); opacity: .5;
}
.ac-photo-actions { display: flex; gap: .5rem; flex-wrap: wrap; }
.wz-ac-buttons { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

/* Custom date / datetime picker */
.dp-field { cursor: pointer; background-image: none; }
.dp-pop {
  position: absolute;
  z-index: 200;
  width: 268px;
  background: var(--paper);
  border: 1px solid var(--line-strong);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: .6rem;
  font-size: .9rem;
}
.dp-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: .4rem; }
.dp-title { font-weight: 700; }
.dp-nav {
  border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink);
  width: 1.9rem; height: 1.9rem; border-radius: var(--radius); cursor: pointer; font-size: 1.1rem; line-height: 1;
}
.dp-nav:hover { border-color: var(--ink); }
.dp-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 2px; }
.dp-dow { margin-bottom: 2px; }
.dp-w { text-align: center; font-size: .7rem; font-weight: 700; color: var(--muted); text-transform: uppercase; padding: .2rem 0; }
.dp-day {
  border: none; background: transparent; color: var(--ink); cursor: pointer;
  height: 2rem; border-radius: var(--radius); font: inherit;
}
.dp-day:hover { background: var(--bg); }
.dp-day.today { box-shadow: inset 0 0 0 1px var(--line-strong); }
.dp-day.sel { background: var(--red); color: #fff; font-weight: 700; }
.dp-day.dp-off { color: var(--muted); opacity: .35; cursor: not-allowed; pointer-events: none; text-decoration: line-through; }
.dp-day.dp-off:hover { background: transparent; }
.dp-time { display: flex; align-items: center; gap: .4rem; margin-top: .6rem; padding-top: .5rem; border-top: 1px solid var(--line); }
.dp-time label { font-weight: 600; font-size: .8rem; color: var(--muted); margin-right: auto; }
.dp-time select { width: auto; padding: .25rem .4rem; }
.dp-actions { display: flex; gap: .4rem; margin-top: .6rem; }
.dp-btn { flex: 1; border: 1px solid var(--line-strong); background: var(--paper); color: var(--ink-soft); border-radius: var(--radius); padding: .35rem; cursor: pointer; font: inherit; font-size: .82rem; }
.dp-btn:hover { border-color: var(--ink); color: var(--ink); }
.dp-btn.dp-ok { background: var(--red); border-color: var(--red); color: #fff; }
.dp-btn.dp-ok:hover { background: var(--red-dark); }

/* Self-serve fuel dispensing */
.fuel-price { font-weight: 700; font-size: 1.1rem; color: var(--red-dark); }
/* Retro mechanical pump register: two stacked rows (litres over dollars) of
   rolling digit drums — 4 digits, separator, 2 decimal drums (red, like the
   cents rollers on an old pump). Drums only roll forward, as the real
   mechanism does; .odo-strip carries 0-9 twice so 9→0 rolls onward. */
.odo-stack {
  display: flex; flex-direction: column; gap: .9rem;
  width: max-content; max-width: 100%;
  margin: 1rem auto 1.25rem; padding: 1.1rem 1.3rem;
  background: linear-gradient(180deg, #3d3b38, #232221 35%, #191918);
  border: 3px solid #4a4844; border-radius: 10px;
  box-shadow: inset 0 0 22px rgba(0, 0, 0, .65), 0 2px 6px rgba(0, 0, 0, .25);
}
.odo-row { display: flex; align-items: center; justify-content: space-between; gap: 1.4rem; flex-wrap: wrap; }
.odo-digit.odo-hide { display: none; }
/* gallons: an informational aside, visibly less official than the drums */
.odo-row-gal { margin: -4px 0 0; }
.odo-label-gal { font-size: .62em; opacity: .65; font-weight: 500; }
.odo-gal { font-family: var(--mono, ui-monospace, monospace); font-style: italic;
  font-size: .95rem; letter-spacing: .05em;
  /* the stack is a near-black bezel: an uncolored span inherits page ink and
     vanishes — dim warm grey keeps it visible but clearly not the register */
  color: #a89f8d; opacity: .85; text-shadow: 0 1px 0 rgba(0,0,0,.8); }
.odo-label {
  font-size: .72rem; font-weight: 700; letter-spacing: .22em; text-transform: uppercase;
  color: #b8b2a6; text-shadow: 0 1px 0 rgba(0, 0, 0, .8);
}
/* live flow rate: a lit readout beneath the register — UX, not the billed drums.
   Dim amber at rest; glows green while fuel actually moves. */
.odo-row-flow { margin: .1rem 0 0; border-top: 1px solid rgba(255, 255, 255, .06); padding-top: .7rem; }
.odo-label-flow { align-self: center; }
.odo-flow {
  font-family: var(--mono, ui-monospace, monospace); font-weight: 700;
  font-size: 1.5rem; letter-spacing: .04em; font-variant-numeric: tabular-nums;
  color: #8f877a; text-shadow: 0 1px 0 rgba(0, 0, 0, .8);
  transition: color .25s ease, text-shadow .25s ease;
}
.odo-flow em { font-style: normal; font-size: .62em; font-weight: 600; opacity: .7; letter-spacing: .06em; }
.odo-flow.is-flowing { color: #6ee787; text-shadow: 0 0 10px rgba(88, 220, 120, .55), 0 1px 0 rgba(0, 0, 0, .8); }
/* Session clock in its final stretch (≤30 s) — urgent, not "flowing" green. */
.odo-flow.is-low { color: #ff7b72; text-shadow: 0 0 10px rgba(255, 90, 80, .55), 0 1px 0 rgba(0, 0, 0, .8); }
/* "Stop and finish" affordance: while fuel flows it's ghosted out (close the
   nozzle first); the instant flow stops it lights up FULL red — the outline
   default vs outline-at-55% was too subtle to read as enabled/disabled. */
#fuel-stop:not(:disabled) { background: var(--bad); border-color: var(--bad); color: #fff; }
#fuel-stop:disabled { opacity: .4; }
.odo {
  --odo-h: 2.9rem;
  display: inline-flex; align-items: center; gap: 3px; padding: .4rem .5rem;
  background: #0c0c0c; border: 2px solid #000; border-radius: 6px;
  box-shadow: inset 0 3px 9px rgba(0, 0, 0, .9), 0 1px 0 rgba(255, 255, 255, .07);
}
.odo-digit {
  position: relative; width: 1.5ch; height: var(--odo-h); overflow: hidden;
  font-family: "Courier New", ui-monospace, Menlo, monospace;
  font-size: 2.25rem; font-weight: 700; text-align: center;
  color: #f4f1e6; background: linear-gradient(180deg, #000, #2c2c2c 18%, #454545 50%, #2c2c2c 82%, #000);
  border-radius: 3px; box-shadow: inset 0 0 5px rgba(0, 0, 0, .8);
}
.odo-digit.odo-dec {
  color: #ffe9e6; background: linear-gradient(180deg, #1a0000, #5c1512 18%, #7d221d 50%, #5c1512 82%, #1a0000);
}
/* glass window: a faint fixed reflection over the rolling drum */
.odo-digit::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background: linear-gradient(180deg, rgba(255, 255, 255, .18), rgba(255, 255, 255, 0) 30%, rgba(0, 0, 0, 0) 70%, rgba(0, 0, 0, .35));
}
.odo-strip {
  position: absolute; left: 0; top: 0; width: 100%;
  will-change: transform;   /* positioned per-frame (fractionally) by the register's rAF loop */
}
.odo-strip span { display: block; height: var(--odo-h); line-height: var(--odo-h); }
.odo-sep { color: #f4f1e6; font-size: 1.5rem; font-weight: 800; margin: 0 1px; align-self: flex-end; padding-bottom: .3rem; }
.odo-unit { color: #cfccc5; font-size: 1rem; font-weight: 700; margin-left: .45rem; }
@media (max-width: 540px) {
  .odo { --odo-h: 2.1rem; gap: 2px; }
  .odo-digit { font-size: 1.6rem; width: 1.45ch; }
  .odo-sep { font-size: 1.1rem; padding-bottom: .2rem; }
}
.fuel-slider { margin: 1rem 0 1.25rem; }
.fuel-slider label { display: block; font-weight: 600; font-size: .9rem; margin-bottom: .5rem; }
.fuel-slider .fuel-ends { display: flex; justify-content: space-between; font-size: .72rem; font-weight: 700; letter-spacing: .08em; color: var(--muted); margin-top: .3rem; }
/* Fuel-pump lever: the track "fills" green as fuel flows; the thumb is a nozzle handle. */
.fuel-slider input[type="range"] {
  -webkit-appearance: none; appearance: none;
  width: 100%; height: 2.8rem; margin: 0; cursor: grab;
  border-radius: 8px; border: 2px solid var(--ink);
  background:
    repeating-linear-gradient(45deg, rgba(255,255,255,.10) 0 8px, rgba(255,255,255,0) 8px 16px),
    linear-gradient(90deg, #1e7b34 0 var(--fill, 0%), #2b2b2b var(--fill, 0%) 100%);
  box-shadow: inset 0 2px 6px rgba(0,0,0,.35);
}
.fuel-slider input[type="range"]:active { cursor: grabbing; }
.fuel-slider input[type="range"]:focus-visible { outline: 2px solid var(--red); outline-offset: 2px; }
.fuel-slider input[type="range"]::-webkit-slider-thumb {
  -webkit-appearance: none; width: 30px; height: 2.8rem; border-radius: 6px;
  background: linear-gradient(180deg, #e5484d, var(--red-dark));
  border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,.45);
  cursor: grab;
}
.fuel-slider input[type="range"]::-moz-range-thumb {
  width: 26px; height: 2.6rem; border-radius: 6px;
  background: var(--red); border: 2px solid #fff; box-shadow: 0 2px 5px rgba(0,0,0,.45);
}
.fuel-slider input[type="range"]::-moz-range-track { background: transparent; height: 2.8rem; }
.fuel-slider input[type="range"]::-moz-range-progress { background: #1e7b34; height: 2.8rem; border-radius: 6px; }
.fuel-slider input[type="range"]:disabled { cursor: not-allowed; opacity: .55; }
/* Pump body: the register (display) with the activate control to its right,
   vertically centered at about the counter's height — stacked under on a phone. */
.fuel-pump > .fuel-price { text-align: center; }   /* price sits above the centered register */
.pump-body { display: flex; align-items: center; justify-content: center; gap: 1.25rem; flex-wrap: wrap; }
.pump-display { flex: 0 1 auto; min-width: 0; }   /* size to the register, don't stretch — keeps the button beside it */
.pump-display .odo-stack { margin: 0 auto; }
/* Activation slot: a fixed square holding EITHER the round button OR the
   countdown ring — same size and position, centered against the counter. */
.pump-state {
  flex: 0 0 auto; align-self: center;
  width: 120px; height: 120px; display: flex; align-items: center; justify-content: center;
}
@media (max-width: 640px) {
  .pump-body { flex-direction: column; align-items: center; gap: .5rem; }
  .pump-display { flex-basis: auto; align-self: stretch; }   /* in a column, flex-basis is height */
  .pump-state { margin: .25rem 0 .5rem; }
}
/* Round "activate" button — green (go); a power symbol means "turn the pump on". */
.pump-btn {
  width: 120px; height: 120px; border-radius: 50%; padding: 0; border: none; cursor: pointer;
  color: #fff; display: inline-flex; align-items: center; justify-content: center;
  background: radial-gradient(circle at 50% 32%, #35c06a, #1e7b34 55%, #155c27);
  box-shadow: 0 4px 12px rgba(30, 123, 52, .4), inset 0 2px 3px rgba(255, 255, 255, .35), inset 0 -3px 6px rgba(0, 0, 0, .3);
  transition: transform var(--speed), box-shadow var(--speed), filter var(--speed);
}
.pump-btn:hover { filter: brightness(1.06); box-shadow: 0 6px 16px rgba(30, 123, 52, .5), inset 0 2px 3px rgba(255, 255, 255, .35), inset 0 -3px 6px rgba(0, 0, 0, .3); }
.pump-btn:active { transform: translateY(1px) scale(.98); }
.pump-btn:focus-visible { outline: 3px solid var(--ok); outline-offset: 3px; }
.pump-btn:disabled { background: #b9b4aa; box-shadow: inset 0 -3px 6px rgba(0, 0, 0, .2); cursor: not-allowed; }
.pump-btn-ico { width: 62px; height: 62px; }
.pump-btn-ico path { fill: none; stroke: currentColor; stroke-width: 2.2; stroke-linecap: round; stroke-linejoin: round; }
/* Countdown ring: same 92px footprint as the button; the stroke depletes and
   its hue slides green→red, painted per-frame by the rAF loop (no CSS easing
   so it stays in step with the script). */
.pump-ring { position: relative; width: 120px; height: 120px; }
.pump-ring-svg { width: 100%; height: 100%; transform: rotate(-90deg); }
.pump-ring-bg { fill: none; stroke: var(--line); stroke-width: 5; }
.pump-ring-fg {
  fill: none; stroke: hsl(120, 68%, 42%); stroke-width: 5; stroke-linecap: round;
  stroke-dasharray: 125.664; stroke-dashoffset: 0;
}
.pump-ring.is-flowing .pump-ring-fg { animation: pump-pulse 1.2s ease-in-out infinite; }
.pump-ring-secs {
  position: absolute; inset: 0; display: flex; align-items: center; justify-content: center;
  font-weight: 800; font-size: 2.1rem; color: var(--ink); font-variant-numeric: tabular-nums;
}
@keyframes pump-pulse { 50% { opacity: .55; } }
@media (prefers-reduced-motion: reduce) { .pump-ring.is-flowing .pump-ring-fg { animation: none; } }
/* Status/help line — below the panel so its text never moves the button. */
.pump-note { min-height: 1.2em; margin: .5rem 0 .25rem; }
.pump-note.is-cooling { color: var(--red-dark); font-weight: 700; font-variant-numeric: tabular-nums; }
/* Dev-only reset: left-aligned below the panel, never in the right-side control. */
.pump-dev { text-align: left; }
/* Modal dialog */
.modal-overlay {
  position: fixed; inset: 0; z-index: 200;
  background: rgba(26, 26, 26, .55);
  display: flex; align-items: center; justify-content: center; padding: 1rem;
}
.modal-card {
  background: var(--paper); border-radius: var(--radius); box-shadow: var(--shadow);
  max-width: 460px; width: 100%; padding: 1.5rem;
  border-top: 4px solid var(--red);
}
.modal-title { margin: 0 0 .6rem; }
.modal-body { color: var(--ink-soft); }
.modal-body .cd-secs { font-weight: 800; font-variant-numeric: tabular-nums; color: var(--red-dark); }
.modal-actions { margin-top: 1.25rem; display: flex; justify-content: flex-end; }
/* Camera capture */
.cam-card { max-width: 560px; }
.cam-stage {
  position: relative; width: 100%; aspect-ratio: 4 / 3;
  background: #000; border-radius: var(--radius); overflow: hidden;
}
.cam-video { display: block; width: 100%; height: 100%; object-fit: cover; }
.cam-guide {
  position: absolute; top: 50%; left: 50%; transform: translate(-50%, -50%);
  border: 2px dashed rgba(255, 255, 255, .9); border-radius: 6px;
  box-shadow: 0 0 0 9999px rgba(0, 0, 0, .35); pointer-events: none;
}
.cam-guide-wide { width: 86%; aspect-ratio: 16 / 6; }
.cam-guide-card { width: 76%; aspect-ratio: 1.586; }
.cam-hint {
  position: absolute; left: 0; right: 0; bottom: .5rem; text-align: center;
  color: #fff; font-size: .8rem; font-weight: 600; padding: 0 .5rem;
  text-shadow: 0 1px 3px rgba(0, 0, 0, .85); pointer-events: none;
}
.cam-review { display: block; width: 100%; background: #000; border-radius: var(--radius); }
.cam-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: 1rem; }
.cam-torch.is-on { background: var(--warn-bg); border-color: var(--warn); color: var(--warn); }
.cam-filelink {
  display: inline-block; margin-top: .75rem; padding: 0;
  background: none; border: none; color: var(--info);
  font: inherit; font-size: .85rem; text-decoration: underline; cursor: pointer;
}
/* No camera (or access refused): the sheet says so and offers the picker
   instead of closing on a device that has no other way to attach a file. */
.cam-fallback { margin: 1rem 0 0; text-align: center; font-size: .92rem; font-weight: 600; }
.cam-field { display: flex; align-items: flex-start; gap: .75rem; flex-wrap: wrap; margin-top: .4rem; }
/* The chosen file's name — the native input is hidden inside a capture tile,
   so this is the only confirmation that something was attached. */
.cam-pickname { font-size: .85rem; color: var(--muted); word-break: break-all; }
.cam-thumb { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; }
.cam-thumb-img {
  display: block; max-width: 120px; max-height: 90px;
  border: 1px solid var(--line-strong); border-radius: var(--radius);
}
.cam-thumb-act {
  padding: 0; background: none; border: none; color: var(--info);
  font: inherit; font-size: .82rem; text-decoration: underline; cursor: pointer;
}
/* Toasts */
.toast-wrap {
  position: fixed; z-index: 300; left: 50%; bottom: 1.25rem; transform: translateX(-50%);
  display: flex; flex-direction: column; gap: .5rem; align-items: center;
  width: max-content; max-width: calc(100vw - 2rem); pointer-events: none;
}
.toast {
  pointer-events: auto; cursor: pointer;
  background: var(--ink); color: #fff; border-radius: var(--radius);
  padding: .7rem 1rem; font-size: .92rem; font-weight: 600; box-shadow: var(--shadow);
  max-width: 92vw; opacity: 0; transform: translateY(10px);
  transition: opacity .2s, transform .2s;
  border-left: 4px solid var(--line-strong);
}
.toast.show { opacity: 1; transform: translateY(0); }
.toast-ok { border-left-color: var(--ok); }
.toast-error { border-left-color: var(--red); }
.toast-info { border-left-color: var(--info); }
@media (prefers-reduced-motion: reduce) { .toast { transition: none; } }
/* Live session event log */
.fuel-log { font-size: .85rem; }
.fuel-log > summary { cursor: pointer; font-weight: 600; color: var(--muted); }
.fuel-events { list-style: none; margin: .5rem 0 0; padding: 0; max-height: 12rem; overflow-y: auto; font-variant-numeric: tabular-nums; }
.fuel-events li { display: flex; gap: .6rem; padding: .25rem 0; border-bottom: 1px dashed var(--line); }
.fuel-events li:last-child { border-bottom: none; }
.fuel-events .fe-time { color: var(--muted); white-space: nowrap; }
.fuel-events .fe-name { flex: 1; }
.fuel-events .fe-l { color: var(--muted); white-space: nowrap; }

/* Onboarding wizard */
.wizard { max-width: 720px; margin: 0 auto; }
.wizard-top { display: flex; justify-content: space-between; align-items: center; gap: 1rem; }
.wizard-progress { height: 6px; background: var(--line); border-radius: 3px; overflow: hidden; margin: .6rem 0 .25rem; }
.wizard-bar { width: 0; height: 100%; background: var(--red); border-radius: 3px; transition: width .3s ease; }
.wizard-count { margin: .25rem 0 1.25rem; }
.wizard-body > h1 { font-size: 1.5rem; margin-bottom: .4rem; }
.wizard-nav { display: flex; justify-content: space-between; align-items: center; gap: 1rem; margin-top: 1.5rem; }
.wizard-remaining { margin: .5rem 0 0; padding-left: 1.15rem; }
.wizard-remaining li { margin: .35rem 0; }
@media (prefers-reduced-motion: reduce) { .wizard-bar { transition: none; } }

/* Onboarding wizard — "what you'll need" list + document capture tiles */
.check-list { margin: .5rem 0 0; padding-left: 1.15rem; }
.check-list li { margin: .3rem 0; }
.cap-row { display: grid; grid-template-columns: 1fr 1fr; gap: 1rem; margin-top: .25rem; }
.cap-col { display: flex; flex-direction: column; gap: .35rem; }
.cap-single { margin-top: .75rem; }
.cap-tile {
  border: 1.5px dashed var(--line-strong); border-radius: var(--radius);
  padding: .9rem; background: var(--bg);
}
.cap-tile-label { display: block; font-weight: 600; margin-bottom: .5rem; }
.cap-state {
  display: inline-block; font-size: .74rem; font-weight: 700; letter-spacing: .03em;
  padding: .12rem .55rem; border-radius: 999px; margin-bottom: .35rem;
}
.cap-state-ok { background: var(--ok-bg); color: var(--ok); }
.cap-state-pending { background: #fff4e0; color: #8a5d00; }
.cap-state-todo { background: var(--bg); color: var(--muted); border: 1px solid var(--line-strong); }
@media (max-width: 560px) { .cap-row { grid-template-columns: 1fr; } }

/* Dashboard "next step" hero banner */
.next-action {
  display: block; text-decoration: none; color: #fff;
  background: var(--ink); border-radius: var(--radius); border-left: 5px solid var(--red);
  padding: 1rem 1.25rem; margin: 0 0 1.25rem; box-shadow: var(--shadow);
  transition: transform var(--speed), box-shadow var(--speed);
}
.next-action:hover { color: #fff; transform: translateY(-1px); box-shadow: 0 4px 16px rgba(26,26,26,.22); }
.next-action .na-eyebrow {
  display: block; font-size: .72rem; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--red);
}
.next-action .na-label { display: block; font-size: 1.15rem; font-weight: 700; margin-top: .15rem; }
.next-action .na-sub { display: block; font-size: .88rem; color: #cfccc5; margin-top: .1rem; }
.next-action .na-cta { display: inline-block; margin-top: .5rem; font-weight: 700; color: #fff; }

/* Onboarding checklist (member dashboard) */
.onboarding { border-left: 5px solid var(--red); }
.onboard-steps { list-style: none; margin: .25rem 0 0; padding: 0; }
.onboard-steps li { display: flex; gap: .8rem; padding: .5rem 0; border-bottom: 1px dashed var(--line); }
.onboard-steps li:last-child { border-bottom: none; }
.ob-mark {
  flex: 0 0 auto;
  width: 1.7rem;
  height: 1.7rem;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 50%;
  font-size: .82rem;
  font-weight: 700;
  background: var(--bg);
  border: 1.5px solid var(--line-strong);
  color: var(--ink-soft);
}
.onboard-steps li.done .ob-mark { background: var(--ok-bg); border-color: var(--ok); color: var(--ok); }
.onboard-steps li.todo .ob-mark { border-color: var(--red); color: var(--red-dark); }
.onboard-steps li.done .ob-label { color: var(--muted); text-decoration: line-through; }
.ob-body { display: flex; flex-direction: column; gap: .1rem; }
.ob-label { font-weight: 600; }

.kv { display: grid; grid-template-columns: max-content 1fr; gap: .3rem 1.25rem; font-size: .93rem; }
.kv dt { color: var(--muted); font-weight: 600; }
.kv dd { margin: 0; }

/* Flight-follow (/vol) event-log timeline. */
.vol-timeline { list-style: none; margin: .25rem 0 0; padding: 0; border-left: 2px solid var(--line); }
.vol-timeline li { padding: .3rem 0 .3rem 1rem; }
.vol-ev-time { font-family: var(--mono); font-size: .78rem; color: var(--muted); margin-right: .4rem; white-space: nowrap; }
.vol-ev-desc { font-size: .9rem; }

/* ---------- Responsive ---------- */

@media (max-width: 840px) {
  .portal { display: block; }
  .portal-nav {
    display: flex;
    flex-wrap: wrap;
    gap: .15rem;
    border-right: none;
    border-bottom: 1px solid var(--line);
    padding: .5rem .75rem;
    position: sticky;
    top: 64px;
    z-index: 40;
    overflow-x: auto;
  }
  .portal-nav a { margin-bottom: 0; white-space: nowrap; font-size: .85rem; padding: .4rem .6rem; }
  .portal-main { padding: 1.25rem 1.25rem 3rem; }
  .hero h1 { font-size: 1.8rem; }
  .facts { margin-top: 1rem; }
  /* Member portal: nav becomes a toggled drawer (used at the pump, on phones). */
  body[data-page="portal"] .nav-toggle {
    display: block; width: 100%; text-align: left; font: inherit; font-weight: 700;
    padding: .75rem 1rem; background: var(--ink); color: #fff; border: none; cursor: pointer;
  }
  body[data-page="portal"] .portal-nav {
    display: none; position: static; flex: none; width: 100%; overflow: visible;
    border-right: none; border-bottom: 1px solid var(--line); padding: .5rem .75rem 1rem;
  }
  body[data-page="portal"] .portal.nav-open .portal-nav { display: block; }
  body[data-page="portal"] .portal-nav a { display: block; white-space: normal; font-size: .98rem; padding: .6rem .8rem; }
  /* Keep the Menu bar pinned under the sticky header while scrolling; the
     drawer opens attached to it, scrolling internally if it is taller than
     the viewport. Applies to both the member portal and the admin. */
  body[data-page="portal"] .portal-top,
  body[data-page="admin"] .portal-top {
    display: block;
    position: sticky;
    top: 64px;
    z-index: 40;
  }
  body[data-page="portal"] .portal.nav-open .portal-nav,
  body[data-page="admin"] .portal.nav-open .portal-nav {
    max-height: calc(100vh - 64px - 4rem);
    overflow-y: auto;
    box-shadow: var(--shadow);
  }
}

@media (max-width: 560px) {
  .site-header .container { gap: .35rem .5rem; }
  .brand img { height: 36px; }
  .site-nav { gap: .1rem; }
  .site-nav a { padding: .45rem .5rem; font-size: .88rem; }
  /* Tighter hero + sections on small screens */
  .hero { padding: 2.25rem 0 1.75rem; }
  .hero h1 { font-size: 1.6rem; }
  .hero p { font-size: 1rem; }
  .section { padding: 2rem 0 1.25rem; }
  .section-tight { padding: 1.25rem 0; }
  /* CTA band: stack text over full-width buttons */
  .cta-band { flex-direction: column; align-items: stretch; gap: .9rem; padding: 1.25rem 1.25rem; }
  .cta-band .btn { display: block; width: 100%; margin: 0; }
  .cta-band > div:last-child { display: flex; flex-direction: column; gap: .5rem; }
  /* Footer columns stack with breathing room */
  .site-footer .cols { gap: 1.5rem; }
  /* Comfortable form controls (avoid iOS zoom: keep >=16px) */
  .form-card { padding: 1.25rem 1.1rem; }
  input, select, textarea { font-size: 16px; }
}

/* ---------- Print (invoices) ---------- */

@media print {
  body { background: #fff; }
  .site-header, .portal-nav, .site-footer, .no-print, .btn, .view-head .lc-actions { display: none !important; }
  .portal-main { padding: 0; }
  .table-wrap, .card, .stat-card { border: 1px solid #999; box-shadow: none; }
  a { color: #000; text-decoration: none; }
}

/* Live fuel waiting-queue panel (member) */
.fuel-queue-card .fq-list { list-style: none; padding: 0; margin: .5rem 0; }
.fuel-queue-card .fq-list li { padding: .4rem 0; border-bottom: 1px solid rgba(127,127,127,.2); }
.fuel-queue-card .fq-list li:last-child { border-bottom: 0; }
.fuel-queue-card .fq-me { font-weight: 600; }
.fuel-queue-card .fq-pos { display: inline-block; min-width: 2.2em; color: #8a8a8a; }
.fuel-queue-card .fq-controls { margin-top: .6rem; }

/* Home-page fuel price board — public.js fills #home-fuel from the public
   /fuel-status API. Sits inside the "Carburant" service card. */
.fuel-board { margin-top: 1.1rem; padding-top: .9rem; border-top: 1px solid var(--line); display: grid; gap: .55rem; }
.fl-head { font-size: .72rem; font-weight: 700; letter-spacing: .09em; text-transform: uppercase; color: var(--red); }
.fl-row { display: flex; align-items: center; gap: .6rem; }
.fl-grade { display: flex; flex-direction: column; line-height: 1.15; font-weight: 700; text-transform: uppercase; letter-spacing: .03em; font-size: .8rem; }
.fl-name { font-weight: 400; text-transform: none; letter-spacing: 0; font-size: .72rem; color: var(--muted); }
.fl-price { margin-left: auto; font-variant-numeric: tabular-nums; font-weight: 800; font-size: 1.4rem; color: var(--ink); }
.fl-price span { font-size: .72rem; font-weight: 600; color: var(--muted); margin-left: 1px; }
.fl-pill { flex: 0 0 auto; padding: .2rem .55rem; border-radius: 999px; font-size: .72rem; font-weight: 700; white-space: nowrap; }
.fl-available { color: var(--ok); background: var(--ok-bg); }
.fl-busy { color: var(--warn); background: var(--warn-bg); }
.fl-estop, .fl-fault { color: var(--bad); background: var(--bad-bg); }
.fl-offline { color: var(--muted); background: var(--info-bg); }
.fl-unknown { color: var(--warn); background: var(--warn-bg); }
.fl-star { color: var(--muted); font-weight: 700; font-size: .7em; margin-left: 1px; }
.fl-note { margin: .35rem 0 0; font-size: .68rem; line-height: 1.45; color: var(--muted); }
.fl-note-unknown { color: var(--warn); background: var(--warn-bg); border-radius: 8px; padding: .45rem .6rem; font-size: .72rem; }

/* Aircraft reference specs (type-level data from Wikipedia + FAA) */
.ac-specs-panel { margin: -.5rem 0 .25rem; }
.ac-specs { background: var(--paper); }
.ac-specs .ref-note {
  color: var(--muted); background: var(--info-bg, var(--warn-bg));
  border-radius: 8px; padding: .5rem .7rem; margin: 0 0 .9rem; line-height: 1.45;
}
.ac-specs-img { margin: 0 0 1rem; }
.ac-specs-img img {
  width: 100%; max-width: 460px; border-radius: 10px;
  border: 1px solid var(--line); display: block;
}
.ac-specs-img figcaption { margin-top: .3rem; }
.ac-specs-h { margin: 1rem 0 .4rem; font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.spec-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: .35rem .9rem; margin: 0; }
.spec-row { display: flex; justify-content: space-between; gap: .5rem; border-bottom: 1px dotted var(--line); padding: .25rem 0; }
.spec-row dt { color: var(--muted); font-size: .85rem; }
.spec-row dd { margin: 0; font-weight: 600; text-align: right; }
.spec-src { font-weight: 400; font-size: .7rem; color: var(--muted); margin-left: .35rem; text-decoration: none; border-bottom: 1px dotted currentColor; }
.spec-docs { margin: .3rem 0 0; padding-left: 1.1rem; }
.spec-docs li { margin: .15rem 0; }
.ac-specs-meta { margin: -.4rem 0 .8rem; }
.ac-raw { margin-top: 1rem; }
.ac-raw summary { cursor: pointer; color: var(--muted); }
.ac-raw-pre {
  margin: .5rem 0 0; padding: .7rem .8rem; max-height: 340px; overflow: auto;
  background: var(--bg, #f6f5f2); border: 1px solid var(--line); border-radius: 8px;
  font-size: .74rem; line-height: 1.4; white-space: pre-wrap; word-break: break-word;
}

/* Aircraft finder */
.acf-form { display: flex; gap: .6rem; margin: 1rem 0 .6rem; flex-wrap: wrap; }
.acf-form input[type="search"] { flex: 1 1 260px; }
.acf-recent { margin: 0 0 1rem; display: flex; flex-wrap: wrap; gap: .35rem; align-items: center; }
.acf-recent-label { margin-right: .2rem; }
.acf-chip { cursor: pointer; }
.acf-clear { cursor: pointer; opacity: .8; }
.acf-tail { margin: 0 0 1rem; }

/* Per-aircraft fuel & tanks */
.ac-fuel h3 { margin: 0 0 .3rem; }
.acf-line { display: flex; justify-content: space-between; gap: .8rem; flex-wrap: wrap; padding: .4rem 0; border-bottom: 1px dotted var(--line); }
.acf-actions { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .8rem; }
.acf-sub { margin-top: .8rem; background: var(--bg, #f6f5f2); }
.acf-sub h4 { margin: 0 0 .5rem; }
.tank-list { margin: .8rem 0 .2rem; display: grid; gap: .6rem; }
.tank-row .tank-head { display: flex; justify-content: space-between; font-size: .9rem; margin-bottom: .2rem; }
.tank-bar { height: 12px; border-radius: 6px; background: var(--line); overflow: hidden; }
.tank-bar > span { display: block; height: 100%; background: var(--ok, #3a8a4f); border-radius: 6px; }
.ff-tank { flex: 1 1 auto; align-self: center; }
.fuel-summary-extra { margin-top: .8rem; padding-top: .6rem; border-top: 1px dotted var(--line); }
.fuel-est { margin: 0 0 .5rem; }
