/* Airline Inbox page styles: the pieces that belong to one screen (dashboard checklist, mail body and
   attachments, bookings route, mailboxes, upload, settings and team, layouts, reports, mail detail layout).
   Shared components live in data.css, controls.css and layout.css. Tokens only; breakpoints are
   639.98 (phone), 959.98 (drawer), 1100 (two columns), 1280 (wide). */

/* -- dashboard: greeting and get-started checklist ----------------------------------------- */
/* .greeting takes the page h1 from base.css; nothing extra is needed */
.setup-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3) var(--space-4);
  margin-bottom: var(--space-4);
}
.setup-progress {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--muted);
  font-variant-numeric: tabular-nums;
}
.setup-progress svg { display: block; width: 140px; height: 6px; }
.setup-progress .track { fill: var(--seq-track); }
.setup-progress .fill { fill: var(--accent); }

.steps {
  list-style: none;
  margin: 0;
  padding: 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(190px, 1fr));
  gap: var(--space-2);
}
.step {
  display: flex;
  align-items: flex-start;
  gap: var(--space-3);
  height: 100%;
  padding: var(--space-3) var(--space-3);
  border: 1px solid var(--border);
  border-radius: var(--radius-md);
  background: var(--surface);
  color: inherit;
  text-decoration: none;
}
@media (hover: hover) and (pointer: fine) {
  a.step:hover { background: var(--row-hover); border-color: var(--border-strong); text-decoration: none; }
}
.step-check {
  width: 22px;
  height: 22px;
  flex: none;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 1.5px solid var(--border-strong);
  color: transparent;
}
.step-check .i { width: 14px; height: 14px; stroke-width: 2.5; }
.step.done .step-check {
  background: var(--good-soft);
  border-color: var(--good-line);
  color: var(--good-ink);
}
.step-title {
  display: block;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  line-height: 20px;
  color: var(--ink);
}
.step-sub {
  display: block;
  margin-top: 2px;
  font-size: var(--text-xs);
  line-height: 16px;
  color: var(--muted);
}
.step.done .step-title { color: var(--muted); }

/* -- mail detail: layout, original mail, attachments --------------------------------------- */
.detail-layout { display: grid; gap: var(--space-4); min-width: 0; }
.detail-layout > * { min-width: 0; }
@media (min-width: 1100px) {
  .detail-layout { grid-template-columns: minmax(0, 1fr) 340px; align-items: start; }
  /* the side column ("Where it is", attachments, history) stays in view while the form scrolls */
  .detail-layout > :last-child { position: sticky; top: calc(var(--topbar-h) + var(--space-4)); }
}

pre.mail {
  margin: 0;
  padding: var(--space-3) var(--space-4);
  max-height: 480px;
  overflow: auto;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  font-family: var(--font-mono);
  font-size: var(--text-xs);
  line-height: 1.6;
  color: var(--ink-2);
  background: var(--surface-2);
  border: 1px solid var(--hairline);
  border-radius: var(--radius-md);
}
details > pre.mail { margin-top: var(--space-2); }

.attachments { display: flex; flex-direction: column; min-width: 0; }
.attachment {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  min-width: 0;
  padding: var(--space-2) 0;
  border-bottom: 1px solid var(--hairline);
  font-size: var(--text-sm);
  overflow-wrap: anywhere;
}
.attachment:last-child { border-bottom: 0; }
.attachment .i { width: 14px; height: 14px; color: var(--muted); }
.attachment a { font-weight: var(--weight-medium); min-width: 0; }
.attachment .muted {
  margin-left: auto;
  padding-left: var(--space-2);
  font-size: var(--text-xs);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}

/* -- bookings: route and flight -------------------------------------------------------------- */
.route {
  display: inline-flex;
  align-items: center;
  gap: var(--space-2);
}
.route .code-big { font-size: var(--text-md); color: var(--ink); }
.route .i { width: 14px; height: 14px; color: var(--muted); }

.route-hero {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: var(--space-3);
  margin-bottom: var(--space-4);
  padding: var(--space-4) var(--space-5);
  background: var(--surface-2);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
}
.route-hero .city {
  font-family: var(--font-mono);
  font-size: var(--text-3xl);
  font-weight: var(--weight-semibold);
  letter-spacing: 0.04em;
  line-height: 1.1;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.route-hero .city-sub { font-size: var(--text-xs); color: var(--muted); }
.route-hero > div:last-child .city-sub { text-align: right; }
.route-hero .flight-path {
  position: relative;
  min-width: 40px;
  height: 0;
  border-top: 1px dashed var(--border-strong);
}
.route-hero .flight-path .i {
  position: absolute;
  left: 50%;
  top: 0;
  width: 16px;
  height: 16px;
  padding: 2px;
  box-sizing: content-box;
  transform: translate(-50%, -50%) rotate(45deg);
  background: var(--surface-2);
  color: var(--muted);
}
@media (max-width: 639.98px) {
  .route-hero { padding: var(--space-3) var(--space-4); }
  .route-hero .city { font-size: var(--text-2xl); }
}

/* -- mailboxes: one card per mailbox ------------------------------------------------------- */
.mailbox-card { overflow: hidden; }
.mailbox-top {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: var(--space-3);
  padding: var(--space-4) var(--space-5);
}
.mailbox-top .grow { flex: 1; min-width: 220px; }
.mailbox-top h2 {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--space-2);
  margin: 0 0 2px;
}
.mailbox-meta { font-size: var(--text-xs); color: var(--muted); overflow-wrap: anywhere; }

.mailbox-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(140px, 1fr));
  gap: var(--space-3);
  padding: var(--space-3) var(--space-5);
  border-top: 1px solid var(--hairline);
}
.mailbox-stats > div { min-width: 0; }
.mailbox-stats .stat-label { font-size: var(--text-xs); color: var(--muted); }
.mailbox-stats .stat-value {
  margin-top: 2px;
  font-size: var(--text-base);
  font-weight: var(--weight-medium);
  color: var(--ink);
  overflow-wrap: anywhere;
}

.mailbox-error {
  display: flex;
  align-items: flex-start;
  gap: var(--space-2);
  margin: 0 var(--space-5) var(--space-4);
  padding: var(--space-2) var(--space-3);
  font-size: var(--text-sm);
  color: var(--critical-ink);
  background: var(--critical-soft);
  border: 1px solid var(--critical-line);
  border-radius: var(--radius-md);
}
.mailbox-error .i { margin-top: 2px; }

.mailbox-settings {
  padding: var(--space-3) var(--space-5);
  background: var(--surface-2);
  border-top: 1px solid var(--hairline);
}
.mailbox-settings[open] { padding-bottom: var(--space-4); }
.danger-zone {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: var(--space-3);
  margin-top: var(--space-4);
  padding-top: var(--space-3);
  border-top: 1px solid var(--hairline);
}
.danger-zone h3 { font-size: var(--text-sm); font-weight: var(--weight-semibold); color: var(--critical-ink); margin: 0 0 2px; }
.danger-zone p { margin: 0; font-size: var(--text-xs); color: var(--muted); }

.syncing {
  display: inline-flex;
  align-items: center;
  gap: var(--space-1-5);
  font-size: var(--text-xs);
  font-weight: var(--weight-medium);
  color: var(--info-ink);
}
.syncing .i { width: 14px; height: 14px; animation: spin 0.9s linear infinite; }  /* quick work: a quick spinner */

.provider-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: var(--space-3);
}
.provider-card {
  display: flex;
  flex-direction: column;
  gap: var(--space-2);
  padding: var(--space-4);
}
.provider-head {
  display: flex;
  align-items: center;
  gap: var(--space-2);
  font-size: var(--text-base);
  font-weight: var(--weight-semibold);
  color: var(--ink);
}
.provider-card h3 { margin: 0; }
.provider-card p { flex: 1; margin: 0; font-size: var(--text-sm); color: var(--muted); }
.provider-card .note { font-size: var(--text-xs); color: var(--muted); }
.provider-card .btn { align-self: flex-start; }

/* -- upload: results list and how-to card --------------------------------------------------- */
.upload-results { margin-bottom: var(--space-5); }
.upload-row { align-items: flex-start; flex-wrap: wrap; }
.upload-row .pill, .upload-row .btn { margin-top: var(--space-1); }
.upload-msg { margin-top: 2px; font-size: var(--text-sm); line-height: var(--lh-base); color: var(--ink-2); overflow-wrap: anywhere; }
.upload-reasons {
  margin: var(--space-1) 0 0;
  padding-left: var(--space-4);
  font-size: var(--text-sm);
  line-height: var(--lh-base);
  color: var(--warning-ink);
}
.upload-force { margin-bottom: var(--space-4); }
.upload-force .hint { display: block; margin-top: 3px; }

.how-steps {
  display: grid;
  gap: var(--space-3);
  list-style: none;
  margin: 0 0 var(--space-4);
  padding: 0;
  counter-reset: how;
}
.how-steps li {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr);
  column-gap: var(--space-3);
  counter-increment: how;
}
.how-steps li::before {
  content: counter(how);
  grid-row: span 2;
  display: grid;
  place-items: center;
  width: 24px;
  height: 24px;
  border-radius: var(--radius-sm);
  font-size: var(--text-xs);
  font-weight: var(--weight-semibold);
  color: var(--accent-soft-ink);
  background: var(--accent-soft);
}
.how-steps strong { font-size: var(--text-base); color: var(--ink); }
.how-steps span { font-size: var(--text-sm); line-height: 1.5; color: var(--muted); }
.how-steps em { font-style: normal; font-weight: var(--weight-medium); color: var(--ink-2); }
.how-after { padding-top: var(--space-4); border-top: 1px solid var(--hairline); }
.how-after h3 { margin: 0 0 var(--space-2); }

.check-list.compact { gap: var(--space-2); }
.check-list.compact li {
  padding: 0;
  border: 0;
  background: none;
  align-items: center;
  font-size: var(--text-sm);
  color: var(--ink-2);
}
.check-list.compact .tick { width: 20px; height: 20px; border-radius: var(--radius-sm); }
.check-list.compact .tick .i { width: 13px; height: 13px; }

/* -- settings and team -------------------------------------------------------------------- */
/* a settings row: heading and explanation on the left, the card or form on the right (one column on phones) */
.settings-section { display: grid; gap: var(--space-4); min-width: 0; }
.settings-section + .settings-section {
  margin-top: var(--space-6);
  padding-top: var(--space-6);
  border-top: 1px solid var(--border);
}
.settings-intro h2 { margin-bottom: var(--space-1); }
.settings-intro p,
.settings-section > .desc p { margin: 0; font-size: var(--text-sm); color: var(--muted); }
.settings-section > .desc h2 { margin-bottom: var(--space-1); }
.settings-body { min-width: 0; }
@media (min-width: 1100px) {
  .settings-section { grid-template-columns: 280px minmax(0, 1fr); gap: var(--space-8); }
}

.person { display: flex; align-items: center; gap: var(--space-3); min-width: 0; }
.person-name { font-weight: var(--weight-semibold); color: var(--ink); overflow-wrap: anywhere; }
.role-list {
  display: flex;
  flex-direction: column;
  gap: var(--space-3);
  list-style: none;
  margin: 0;
  padding: 0;
}
.role-list li { display: flex; align-items: flex-start; gap: var(--space-3); }
.role-list .pill { min-width: 96px; justify-content: center; }
.role-list .role-desc { padding-top: 2px; font-size: var(--text-sm); color: var(--ink-2); }

/* -- table layouts (admin): one approval form per pending layout ---------------------------- */
.layout-form { display: grid; gap: var(--space-3); margin: 0; }
.layout-form > p { margin: 0; }

/* -- Excel reports: download card beside the schedules card -------------------------------- */
.report-layout { display: grid; gap: var(--space-4); min-width: 0; }
.report-layout > * { min-width: 0; }
@media (min-width: 1100px) {
  .report-layout { grid-template-columns: minmax(0, 1fr) 380px; gap: var(--space-4); align-items: start; }
}

@media (max-width: 639.98px) {
  .mailbox-top { padding: var(--space-3) var(--space-4); }
  .mailbox-stats { padding: var(--space-3) var(--space-4); }
  .mailbox-error { margin: 0 var(--space-4) var(--space-3); }
  .mailbox-settings { padding: var(--space-3) var(--space-4); }
  .setup-progress svg { width: 110px; }
}

/* -- touch targets: on touch screens these links and link-buttons get a 44px+ hit box. The padding is taken back
      by a negative margin, so nothing moves; they have no background, so nothing shows. Fine pointers: unchanged. -- */
@media (pointer: coarse) {
  a.title, a.item-title, .link-more, td a.small, dl.kv dd a, .attachment a, .tl-title a, .auth-foot a, .linklike, a.code-link, .auth-form .hint a, .lp-footer a:not(.brand) {
    padding-block: 14px;
    margin-block: -14px;
  }
  .auth-form .hint a { padding-block: 15px; margin-block: -15px; }  /* 12px hint text: 15px reaches 44px */
  .card > details > summary { padding-block: 12px; }
}
/* Accuracy page: five KPI tiles fill each row (2 on a phone, 3+2 on tablets, 5 on wide screens); the two tables
   keep no empty min-height under a short table */
.kpis.kpis-five { grid-template-columns: repeat(6, minmax(0, 1fr)); }
.kpis.kpis-five > .kpi { grid-column: span 2; }
.kpis.kpis-five > .kpi:nth-child(n+4) { grid-column: span 3; }
@media (min-width: 1200px) {
  .kpis.kpis-five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
  .kpis.kpis-five > .kpi, .kpis.kpis-five > .kpi:nth-child(n+4) { grid-column: auto; }
}
@media (max-width: 639.98px) {
  .kpis.kpis-five { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis.kpis-five > .kpi, .kpis.kpis-five > .kpi:nth-child(n+4) { grid-column: auto; }
  .kpis.kpis-five > .kpi:last-child { grid-column: 1 / -1; }
}
.table-wrap.acc-wrap { min-height: 0; }
/* the two card tables: a card narrower than 760px stacks its rows as cards (the phone look), so no table scrolls
   sideways at any width. The container is the card itself (class acc-card). */
.acc-card { container-type: inline-size; }
@container (max-width: 759px) {
  .acc-card .table-wrap:has(> table) { mask-image: none; animation: none; }
  .acc-card table.cards, .acc-card table.cards tbody, .acc-card table.cards tr, .acc-card table.cards td { display: block; }
  .acc-card table.cards thead { position: absolute; width: 1px; height: 1px; overflow: hidden; clip-path: inset(50%); white-space: nowrap; }
  .acc-card table.cards tr { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; padding: 14px 16px; border-bottom: 1px solid var(--hairline); }
  .acc-card table.cards tbody tr:last-child { border-bottom: 0; }
  .acc-card table.cards td { min-width: 0; padding: 0; border: 0; }
  .acc-card table.cards td.card-main, .acc-card table.cards td.card-full { flex: 1 1 100%; }
  .acc-card table.cards td[data-label]::before { content: attr(data-label) " "; color: var(--muted); font-size: var(--text-xs); }
  .acc-card table.cards td[data-label] { order: 1; flex: 1 1 100%; color: var(--muted); font-size: var(--text-sm); }
  .acc-card table.cards td.nowrap { white-space: normal; overflow-wrap: anywhere; }
  /* the sticky first column of the wide table does not apply to a card */
  .acc-card table.sticky-first th:first-child, .acc-card table.sticky-first td:first-child { position: static; background: none; box-shadow: none; }
  .acc-card table.sticky-first tr.flagged > td:first-child { background: none; box-shadow: none; }
  .acc-card table.sticky-first tbody tr:hover > td:first-child, .acc-card table.sticky-first tbody tr.flagged:hover > td:first-child { background: none; }
}
/* -- platform console (round 8) -------------------------------------------------------------- */
.platform-toolbar .search-input { flex: 1 1 260px; min-width: 0; }
.platform-toolbar .search-input input { width: 100%; }
.mfa-card .mfa-form { display: flex; flex-wrap: wrap; align-items: flex-end; gap: 10px 12px; }
.mfa-card .mfa-form .field { margin: 0; }
.mfa-card .code-input { width: 10ch; max-width: 100%; letter-spacing: 0.12em; }
@media (max-width: 639.98px) {
  /* the agency name is the tap target of its card: at least 44px tall */
  .platform-table td.card-main > .platform-link { display: inline-flex; align-items: center; min-height: 44px; }
}
.person-actions summary { list-style: none; cursor: pointer; display: inline-flex; align-items: center; }
.person-actions summary::-webkit-details-marker { display: none; }
.person-action-list { display: flex; flex-direction: column; align-items: flex-start; gap: 8px; padding-top: 8px; }
.person-action-list form { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: 0; }
.per-day { margin-top: 16px; }
.per-day > summary { display: flex; align-items: center; min-height: 44px; cursor: pointer; padding: 10px 0; font-weight: var(--weight-medium); color: var(--ink); }

/* -- account closing (round 9) ---------------------------------------------------------------- */
/* the warning callout: its paragraphs keep their own spacing, and the fields below it are clear of it */
.close-warning { margin-bottom: 20px; }
.close-warning p { margin: 0 0 8px; }
.close-warning ul { margin: 0 0 8px; }
/* a single-field form (the closing password): a normal form width, not the whole card */
.field.narrow { max-width: 360px; }
/* "What happens now": the list starts right under its heading */
.closing-what ul { margin: 0; padding-left: 1.25em; }
.closing-what li + li { margin-top: 4px; }
.danger-card { border-color: var(--critical-line); }
@media (hover: hover) and (pointer: fine) {
  .code-link:hover { text-decoration: none; }
  .code-link:hover > .code { background: var(--accent-soft); color: var(--accent-soft-ink); }
}

/* ==========================================================================================
   Dashboard (the layout of the owner's dark picture; the light theme uses the same layout in light colours).
   Colours come from tokens.css only: --tint-* (cards), --plane-* (the plane art), --chart-* and --hero-*.
   Sizes are set so that, at 1672 x 941, everything down to the first rows of "Recently processed" is in view.
   ========================================================================================== */

/* plane art: the dark and light drawings are both in the page; the theme decides which one shows */
.plane-banner-dark, .plane-small-dark { display: none; }
:root:not([data-theme="light"]) .plane-banner-light, :root:not([data-theme="light"]) .plane-small-light { display: none; }
:root:not([data-theme="light"]) .plane-banner-dark, :root:not([data-theme="light"]) .plane-small-dark { display: block; }

/* the palette of the plane art: every colour in the drawings is one of these slots (see tokens.css) */
.pa-f1 { fill: var(--plane-1); stop-color: var(--plane-1); }   .pa-s1 { stroke: var(--plane-1); }
.pa-f2 { fill: var(--plane-2); stop-color: var(--plane-2); }   .pa-s2 { stroke: var(--plane-2); }
.pa-f3 { fill: var(--plane-3); stop-color: var(--plane-3); }   .pa-s3 { stroke: var(--plane-3); }
.pa-f4 { fill: var(--plane-4); stop-color: var(--plane-4); }   .pa-s4 { stroke: var(--plane-4); }
.pa-f5 { fill: var(--plane-5); stop-color: var(--plane-5); }   .pa-s5 { stroke: var(--plane-5); }
.pa-f6 { fill: var(--plane-6); stop-color: var(--plane-6); }   .pa-s6 { stroke: var(--plane-6); }
.pa-f7 { fill: var(--plane-7); stop-color: var(--plane-7); }   .pa-s7 { stroke: var(--plane-7); }
.pa-f8 { fill: var(--plane-8); stop-color: var(--plane-8); }   .pa-s8 { stroke: var(--plane-8); }
.pa-f9 { fill: var(--plane-9); stop-color: var(--plane-9); }   .pa-s9 { stroke: var(--plane-9); }
.pa-f10 { fill: var(--plane-10); stop-color: var(--plane-10); } .pa-s10 { stroke: var(--plane-10); }
.pa-f11 { fill: var(--plane-11); stop-color: var(--plane-11); } .pa-s11 { stroke: var(--plane-11); }
.pa-f12 { fill: var(--plane-12); stop-color: var(--plane-12); } .pa-s12 { stroke: var(--plane-12); }
.pa-f13 { fill: var(--plane-13); stop-color: var(--plane-13); } .pa-s13 { stroke: var(--plane-13); }
.pa-f14 { fill: var(--plane-14); stop-color: var(--plane-14); } .pa-s14 { stroke: var(--plane-14); }
.pa-f15 { fill: var(--plane-15); stop-color: var(--plane-15); } .pa-s15 { stroke: var(--plane-15); }
.pa-f16 { fill: var(--plane-16); stop-color: var(--plane-16); } .pa-s16 { stroke: var(--plane-16); }

/* -- greeting band: no box; the words sit on the page, the plane fades into the top right --------- */
.hero {
  position: relative; display: flex; align-items: center; flex-wrap: wrap; gap: 12px 20px;
  min-height: 105px; padding: 4px 0 0; overflow: hidden;
}
/* the picture sits at the top right, to the left of the Download Excel button, so it never covers the button */
.hero-art {
  position: absolute; top: 0; bottom: 0; right: 200px; width: 46%; pointer-events: none;
  -webkit-mask-image: linear-gradient(to right, transparent 0%, black 38%, black 80%, transparent 100%);
  mask-image: linear-gradient(to right, transparent 0%, black 38%, black 80%, transparent 100%);
}
.hero-art svg { display: block; width: 100%; height: 100%; }
.hero-text, .btn-hero { position: relative; z-index: 1; }
.hero-text { min-width: 0; flex: 1 1 320px; }
.hero-title {
  margin: 0; font-size: 30px; line-height: 36px; font-weight: var(--weight-semibold);
  letter-spacing: var(--tracking-tighter); color: var(--ink); overflow-wrap: anywhere;
}
.hero-name { color: var(--hero-name); }
.hero-sub { margin: 4px 0 0; font-size: 15px; line-height: 22px; color: var(--ink-2); }
.btn-hero { height: 40px; margin-left: auto; padding: 0 16px; box-shadow: var(--shadow-sm); }
.btn-hero .i { width: 18px; height: 18px; }

/* -- get started: header 44px, step cards about 80px ------------------------------------------- */
.setup { padding: 14px 18px 16px; box-shadow: var(--card-glow); }
.setup-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.setup-title h2 { margin: 0; font-size: 15px; line-height: 20px; }
.setup-title .muted { font-size: 13px; line-height: 18px; }
.setup-icon {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--radius-md);
  background: var(--tint-blue-icon); color: var(--tint-blue-ink);
}
.setup-icon .i { width: 20px; height: 20px; }
.setup-head { margin-bottom: 12px; }
.setup-progress { font-size: 13px; color: var(--ink-2); }
.setup-progress svg { width: 180px; }
.setup-progress .fill { fill: var(--accent); }
.steps { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 10px; }
.step { padding: 10px 12px; background: var(--surface-2); border-color: var(--border); gap: 10px; }
a.step:hover { background: var(--surface-3); }
.step.done { background: var(--tint-green-bg); border-color: var(--tint-green-line); }
.step.done .step-title { color: var(--ink); }
.step.done .step-check { background: var(--good); border-color: var(--good); color: var(--on-accent); }
.step-check { width: 22px; height: 22px; }
.step-title { font-size: 14px; line-height: 18px; }
.step-sub {
  font-size: 12px; line-height: 16px;
  display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden;
}

/* -- number cards: icon tile left; label, number with trend chip, caption right; sparkline bottom right ----- */
.stat-cards { display: grid; grid-template-columns: minmax(0, 1fr); gap: 16px; }
.stat-card {
  position: relative; overflow: hidden; display: grid; grid-template-columns: 44px minmax(0, 1fr); gap: 14px;
  align-items: start; min-width: 0; padding: 14px 16px; border: 1px solid var(--border); border-radius: var(--radius-xl);
  box-shadow: var(--card-glow); color: inherit; text-decoration: none;
}
a.stat-card:hover { text-decoration: none; }
.stat-card.tint-blue { background: var(--tint-blue-bg); border-color: var(--tint-blue-line); --tint-ink: var(--tint-blue-ink); --tint-icon: var(--tint-blue-icon); }
.stat-card.tint-violet { background: var(--tint-violet-bg); border-color: var(--tint-violet-line); --tint-ink: var(--tint-violet-ink); --tint-icon: var(--tint-violet-icon); }
.stat-card.tint-green { background: var(--tint-green-bg); border-color: var(--tint-green-line); --tint-ink: var(--tint-green-ink); --tint-icon: var(--tint-green-icon); }
.stat-card.tint-purple { background: var(--tint-purple-bg); border-color: var(--tint-purple-line); --tint-ink: var(--tint-purple-ink); --tint-icon: var(--tint-purple-icon); }
.stat-card.tint-amber { background: var(--tint-amber-bg); border-color: var(--tint-amber-line); --tint-ink: var(--tint-amber-ink); --tint-icon: var(--tint-amber-icon); }
.stat-icon {
  display: grid; place-items: center; width: 44px; height: 44px; border-radius: var(--radius-md);
  background: var(--tint-icon); color: var(--tint-ink);
}
.stat-icon .i { width: 22px; height: 22px; }
.stat-body { min-width: 0; }
.stat-label { font-size: 14px; line-height: 18px; font-weight: var(--weight-semibold); color: var(--ink); }
.stat-main { display: flex; align-items: center; flex-wrap: wrap; gap: 4px 10px; margin-top: 2px; }
.stat-value {
  font-size: 32px; line-height: 36px; font-weight: var(--weight-bold); letter-spacing: var(--tracking-tighter);
  font-variant-numeric: tabular-nums; color: var(--ink);
}
.stat-caption { max-width: calc(100% - 124px); margin-top: 2px; font-size: 12px; line-height: 16px; color: var(--muted); }
.spark { position: absolute; right: 14px; bottom: 12px; width: 120px; height: 40px; pointer-events: none; }
.spark-line { fill: none; stroke: var(--tint-ink, var(--accent-icon)); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.spark-top { stop-color: var(--tint-ink, var(--accent-icon)); stop-opacity: 0.32; }
.spark-end { stop-color: var(--tint-ink, var(--accent-icon)); stop-opacity: 0; }

/* trend chips: green up, red down, neutral for no change, blue for a rise from nothing */
.trend {
  display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: var(--radius-full);
  font-size: 12px; font-weight: var(--weight-semibold); line-height: 1; white-space: nowrap; font-variant-numeric: tabular-nums;
}
.trend .i { width: 12px; height: 12px; stroke-width: 2.5; }
.trend-up { background: var(--good-soft); color: var(--good-ink); }
.trend-down { background: var(--critical-soft); color: var(--critical-ink); }
.trend-flat { background: var(--neutral-soft); color: var(--neutral-ink); }
.trend-new { background: var(--info-soft); color: var(--info-ink); }

/* -- chart, donut and airline rows ------------------------------------------------------------ */
.dash-row { display: grid; gap: 16px; min-width: 0; }
.dash-row .card { box-shadow: var(--card-glow); }
.dash-row .card-head { margin-bottom: 10px; }
.dash-row .card-head h2 { font-size: 15px; line-height: 20px; }
.card-title { display: flex; align-items: center; gap: 12px; min-width: 0; }
.card-title h2 { margin: 0; }
.card-icon {
  display: grid; place-items: center; flex: none; width: 36px; height: 36px; border-radius: var(--radius-md);
  background: var(--tint-blue-icon); color: var(--tint-blue-ink);
}
.card-icon .i { width: 19px; height: 19px; }
.type-card .card-icon, .recent-card .card-icon { background: var(--tint-violet-icon); color: var(--tint-violet-ink); }
.accuracy-card .card-icon { background: var(--tint-green-icon); color: var(--tint-green-ink); }
.airline-card .card-icon { background: var(--tint-blue-icon); color: var(--tint-blue-ink); }
.chart-card, .type-card, .airline-card { padding: 12px 14px; }
.airline-card .card-body { padding: 0; }
.chart-total { display: flex; align-items: baseline; gap: 6px; }
.chart-total .big { font-size: 26px; font-weight: var(--weight-bold); line-height: 1; font-variant-numeric: tabular-nums; }

.chart { display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 8px; margin-top: 2px; }
.chart-y {
  display: flex; flex-direction: column; justify-content: space-between; text-align: right;
  font-size: 12px; line-height: 12px; color: var(--muted); font-variant-numeric: tabular-nums;
}
.chart-plot { min-width: 0; }
.chart-plot svg { display: block; width: 100%; height: auto; aspect-ratio: 5 / 1; overflow: visible; }
.chart-plot .grid-line { stroke: var(--chart-grid); stroke-width: 1; stroke-dasharray: 4 5; vector-effect: non-scaling-stroke; }
.chart-plot .base-line { stroke: var(--border-strong); stroke-width: 1; vector-effect: non-scaling-stroke; }
.chart-plot .bar { fill: var(--chart-bar); }
.chart-plot .hit { fill: transparent; }
.chart-plot .col:hover .bar { opacity: 0.85; }
.chart-x { display: flex; justify-content: space-between; margin-top: 6px; font-size: 12px; line-height: 16px; color: var(--muted); white-space: nowrap; }

/* donut on the left (about 120 px across), its legend to the right of it */
.donut-row { display: flex; align-items: center; gap: 18px; min-width: 0; }
.donut-wrap { position: relative; flex: none; width: 120px; height: 120px; }
.donut { display: block; width: 100%; height: 100%; }
.donut-track { stroke: var(--surface-3); }
.donut-arc { stroke-linecap: butt; }
.donut-invoice { stroke: var(--t-invoice); }
.donut-credit_note { stroke: var(--t-credit_note); }
.donut-center { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; }
.donut-center .big { font-size: 22px; font-weight: var(--weight-bold); line-height: 1; font-variant-numeric: tabular-nums; }
.legend { flex: 1; min-width: 0; display: grid; gap: 12px; margin: 0; padding: 0; list-style: none; }
.legend li { display: grid; grid-template-columns: 10px minmax(0, 1fr) auto; align-items: center; gap: 8px; font-size: 13px; line-height: 18px; }
.legend .dot { width: 10px; height: 10px; }
.legend-val { font-weight: var(--weight-semibold); font-variant-numeric: tabular-nums; color: var(--ink-2); white-space: nowrap; }
.legend-name { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.airline-card .bars { row-gap: 12px; }

/* -- bottom row: recent mails and accuracy ---------------------------------------------------- */
.recent-card .card-head { padding: 14px 16px 0; margin-bottom: 6px; }
.recent-card .table-wrap { border: 0; border-radius: 0; box-shadow: none; }
.recent-table td { padding: 6px 12px; }
.recent-table td:first-child { position: relative; }
.mail-cell { display: flex; align-items: center; gap: 12px; min-width: 0; }
.mail-tile {
  display: grid; place-items: center; flex: none; width: 34px; height: 34px; border-radius: var(--radius-md);
  background: var(--tint-blue-icon); color: var(--tint-blue-ink);
}
.mail-tile .i { width: 18px; height: 18px; }
.mail-text { min-width: 0; }
.row-link::after { content: ""; position: absolute; inset: 0; }
.row-link:focus-visible { outline: none; }
.recent-table td:first-child:has(.row-link:focus-visible) { outline: 2px solid var(--focus); outline-offset: -2px; }
.recent-table .code { font-weight: var(--weight-semibold); }
.recent-table .badge { border-color: var(--border-strong); }
.accuracy-card {
  position: relative; display: flex; flex-direction: column; align-self: start;
  background: var(--tint-green-bg); border-color: var(--tint-green-line);
}
.acc-main { display: flex; align-items: center; flex-wrap: wrap; gap: 10px; margin-top: 6px; }
.acc-value { font-size: 40px; line-height: 1; font-weight: var(--weight-bold); letter-spacing: var(--tracking-tighter); font-variant-numeric: tabular-nums; color: var(--ink); }
.acc-note { margin: 8px 0 0; max-width: 60%; }
/* the sparkline fills the lower right of the card */
.acc-spark { position: absolute; right: 16px; bottom: 14px; width: 46%; height: 72px; }
.acc-spark .spark-line { stroke: var(--tint-green-ink); }
.acc-spark { --tint-ink: var(--tint-green-ink); }
.acc-empty { margin-top: 4px; }
.acc-empty h3 { margin: 0 0 6px; font-size: 16px; line-height: 22px; color: var(--ink); }
.acc-empty p { margin: 0; }

/* -- layout by width -------------------------------------------------------------------------- */
.dash-row-chart { grid-template-columns: minmax(0, 1fr); }
.dash-row-bottom { grid-template-columns: minmax(0, 1fr); }
/* below 1440 px: two number cards per row and the chart on its own row, so captions, the donut and its legend fit */
@media (min-width: 640px) {
  .stat-cards { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-row-chart { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .dash-row-chart .chart-card { grid-column: 1 / -1; }
}
@media (min-width: 640px) and (max-width: 1439.98px) {
  .hero-art { width: 30%; right: 190px; }
}
@media (min-width: 1100px) {
  .dash-row-bottom { grid-template-columns: minmax(0, 2.1fr) minmax(0, 1fr); align-items: start; }
  .dash-row-bottom.solo { grid-template-columns: minmax(0, 1fr); }
}
@media (min-width: 1440px) {
  .stat-cards { grid-template-columns: repeat(4, minmax(0, 1fr)); }
  .dash-row-chart { grid-template-columns: minmax(0, 1.8fr) minmax(0, 1.25fr) minmax(0, 1fr); }
  .dash-row-chart .chart-card { grid-column: auto; }
}
@media (max-width: 639.98px) {
  .hero { padding: 8px 0 0; min-height: 0; }
  /* phone: no plane behind the words; the greeting and the button are the whole band */
  .hero-art { display: none; }
  .hero-title { font-size: 24px; line-height: 30px; }
  .hero-sub { font-size: 14px; }
  .btn-hero { margin-left: 0; }
  .stat-value { font-size: 30px; }
  .setup { padding: 14px; }
  .setup-progress svg { width: 120px; }
  /* phone: the mail table keeps the subject, PNR and status; type and time sit under the subject */
  .recent-table th:nth-child(3), .recent-table td:nth-child(3),
  .recent-table th:nth-child(4), .recent-table td:nth-child(4) { display: none; }
  .donut-row { gap: 14px; }
  .side-art svg { height: 112px; }
}
@media (min-width: 640px) and (max-width: 1099.98px) {
  .recent-table th:nth-child(3), .recent-table td:nth-child(3) { display: none; }
}
@media (min-height: 900px) and (min-width: 960px) {
  .side-art svg { height: 130px; }
}
