/*
 * Italiani Volanti - dark mode coherence layer
 *
 * This file is intentionally scoped to body.iv2026-shell.dark-mode. It is the
 * final compatibility layer between the modern pages and the legacy skin.
 * Keep page identity and hierarchy intact: only contrast, surfaces and states
 * belong here.
 */

body.iv2026-shell.dark-mode {
  --iv-dark-canvas: #08111f;
  --iv-dark-canvas-soft: #0c1627;
  --iv-dark-surface: #121d30;
  --iv-dark-surface-soft: #18253a;
  --iv-dark-surface-raised: #1d2b42;
  --iv-dark-line: #2d3e59;
  --iv-dark-line-strong: #415575;
  --iv-dark-text: #eef4ff;
  --iv-dark-heading: #ffffff;
  --iv-dark-muted: #adbbce;
  --iv-dark-blue: #75b2ff;
  --iv-dark-blue-soft: #16365e;
  --iv-dark-green: #62dfb6;
  --iv-dark-green-soft: #143d34;
  --iv-dark-amber: #ffd083;
  --iv-dark-amber-soft: #44351d;
  --iv-dark-red: #ff9bac;
  --iv-dark-red-soft: #4a2430;
  color: var(--iv-dark-text);
  background-color: var(--iv-dark-canvas);
  color-scheme: dark;
}

/* The legacy footer wraps a Bootstrap row outside a container. Neutralize its
 * negative gutters so no page creates a horizontal scrollbar. */
body.iv2026-shell .footer-main.icon-footer > .row {
  margin-right: 0;
  margin-left: 0;
}

body.iv2026-shell.dark-mode :where(.page, .page-main, .main-content, .app-content, .side-app) {
  background-color: transparent;
}

body.iv2026-shell.dark-mode :where(.container, .container-fluid) {
  color: inherit;
}

body.iv2026-shell.dark-mode :where(h1, h2, h3, h4, h5, h6, .card-title, .page-title) {
  color: var(--iv-dark-heading);
}

body.iv2026-shell.dark-mode :where(p, label, td, dd, li) {
  color: inherit;
}

body.iv2026-shell.dark-mode :where(.text-muted, .text-secondary, small, .small) {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode a:not(.btn):not([class*="-btn"]):not([class*="button"]) {
  color: var(--iv-dark-blue);
}

body.iv2026-shell.dark-mode a:not(.btn):not([class*="-btn"]):not([class*="button"]):hover,
body.iv2026-shell.dark-mode a:not(.btn):not([class*="-btn"]):not([class*="button"]):focus-visible {
  color: #a8ceff;
}

body.iv2026-shell.dark-mode .iv-skip-link {
  color: #071a34 !important;
  background: #b9dcff !important;
}

/* Shared legacy components */
body.iv2026-shell.dark-mode :where(
  .card,
  .panel,
  .panel-body,
  .list-group-item,
  .dropdown-menu,
  .popover,
  .modal-content,
  .offcanvas,
  .toast,
  .jumbotron
) {
  color: var(--iv-dark-text) !important;
  background-color: var(--iv-dark-surface) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(.card-header, .card-footer, .modal-header, .modal-footer, .popover-header) {
  color: var(--iv-dark-text) !important;
  background-color: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(.dropdown-divider, hr, .border, .border-top, .border-bottom, .border-left, .border-right) {
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(.dropdown-item, .dropdown-item span, .dropdown-item i) {
  color: var(--iv-dark-text) !important;
}

body.iv2026-shell.dark-mode :where(.dropdown-item:hover, .dropdown-item:focus, .dropdown-item.active, .dropdown-item:active) {
  color: var(--iv-dark-heading) !important;
  background: var(--iv-dark-blue-soft) !important;
}

body.iv2026-shell.dark-mode :where(.close, .modal .close) {
  color: var(--iv-dark-heading) !important;
  text-shadow: none !important;
  opacity: .86;
}

body.iv2026-shell.dark-mode .modal-backdrop.show {
  opacity: .68;
}

/* Forms, selectors and validation */
body.iv2026-shell.dark-mode :where(
  .form-control,
  .custom-select,
  .custom-file-label,
  select,
  textarea,
  input[type="text"],
  input[type="email"],
  input[type="password"],
  input[type="number"],
  input[type="date"],
  input[type="time"],
  input[type="search"]
) {
  color: var(--iv-dark-text) !important;
  -webkit-text-fill-color: var(--iv-dark-text);
  background-color: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line-strong) !important;
}

body.iv2026-shell.dark-mode :where(input, textarea)::placeholder {
  color: #91a3ba !important;
  -webkit-text-fill-color: #91a3ba;
  opacity: 1;
}

body.iv2026-shell.dark-mode :where(.form-control, .custom-select, select, textarea, input):focus {
  color: var(--iv-dark-heading) !important;
  background-color: var(--iv-dark-surface-raised) !important;
  border-color: var(--iv-dark-blue) !important;
  box-shadow: 0 0 0 3px rgba(117, 178, 255, .18) !important;
}

body.iv2026-shell.dark-mode :where(select option, .nice-select .list, .nice-select .option) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-raised) !important;
}

body.iv2026-shell.dark-mode .nice-select .option:hover,
body.iv2026-shell.dark-mode .nice-select .option.focus,
body.iv2026-shell.dark-mode .nice-select .option.selected.focus {
  color: var(--iv-dark-heading) !important;
  background: var(--iv-dark-blue-soft) !important;
}

body.iv2026-shell.dark-mode :where(
  .select2-container--default .select2-selection--single,
  .select2-container--default .select2-selection--multiple,
  .select2-dropdown,
  .select2-search__field
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line-strong) !important;
}

body.iv2026-shell.dark-mode :where(
  .select2-selection__rendered,
  .select2-results__option,
  .select2-search__field
) {
  color: var(--iv-dark-text) !important;
}

body.iv2026-shell.dark-mode .select2-results__option--highlighted[aria-selected] {
  color: #fff !important;
  background: #2867d8 !important;
}

body.iv2026-shell.dark-mode :where(.invalid-feedback, .text-danger) {
  color: var(--iv-dark-red) !important;
}

body.iv2026-shell.dark-mode :where(.valid-feedback, .text-success) {
  color: var(--iv-dark-green) !important;
}

/* Tables, filters and pagination */
body.iv2026-shell.dark-mode :where(.table, table, .dataTables_wrapper) {
  color: var(--iv-dark-text) !important;
  background: transparent !important;
}

body.iv2026-shell.dark-mode :where(.table th, table th) {
  color: #c3cede !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(.table td, table td) {
  color: var(--iv-dark-text) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(.table-striped tbody tr:nth-of-type(odd), .table-hover tbody tr:hover) {
  color: var(--iv-dark-heading) !important;
  background: rgba(117, 178, 255, .075) !important;
}

body.iv2026-shell.dark-mode .table-hover tbody tr:hover > :where(td, th) {
  color: var(--iv-dark-text) !important;
  background-color: var(--iv-dark-surface-soft) !important;
}

body.iv2026-shell.dark-mode .iv-pilots .iv-pilots__table tbody tr:hover > td {
  color: var(--iv-dark-text) !important;
  background-color: var(--iv-dark-surface-soft) !important;
}

body.iv2026-shell.dark-mode :where(
  .dataTables_info,
  .dataTables_length,
  .dataTables_filter,
  .dataTables_processing,
  .dataTables_empty
) {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode :where(.page-link, .paginate_button) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(.page-link:hover, .paginate_button:hover) {
  color: var(--iv-dark-heading) !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: var(--iv-dark-blue) !important;
}

body.iv2026-shell.dark-mode :where(.page-item.active .page-link, .paginate_button.current, .paginate_button.current:hover) {
  color: #fff !important;
  background: #2867d8 !important;
  border-color: #2867d8 !important;
}

body.iv2026-shell.dark-mode :where(.page-item.disabled .page-link, .paginate_button.disabled) {
  color: #73849a !important;
  background: #101a2b !important;
  border-color: var(--iv-dark-line) !important;
}

/* Alerts and semantic states */
body.iv2026-shell.dark-mode :where(.alert-info, .badge-info, .bg-info-transparent) {
  color: #b9dcff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #315d8d !important;
}

body.iv2026-shell.dark-mode :where(.alert-success, .badge-success, .bg-success-transparent) {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
  border-color: #2b6c5a !important;
}

body.iv2026-shell.dark-mode :where(.alert-warning, .badge-warning, .bg-warning-transparent) {
  color: var(--iv-dark-amber) !important;
  background: var(--iv-dark-amber-soft) !important;
  border-color: #785d2c !important;
}

body.iv2026-shell.dark-mode :where(.alert-danger, .badge-danger, .bg-danger-transparent) {
  color: var(--iv-dark-red) !important;
  background: var(--iv-dark-red-soft) !important;
  border-color: #7c3d4d !important;
}

body.iv2026-shell.dark-mode :where(.badge-light, .bg-light, .bg-white) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
}

/* Component tokens shared by every modern route */
body.iv2026-shell.dark-mode :where(
  .ivo,
  .iva,
  .ivh-page,
  .ivdl-shell,
  .ivd-shell,
  .ivn,
  .ivr,
  .ivp,
  .ivpass,
  .ivcareer,
  .ivps,
  .ivl,
  .ivia,
  .iv-profile,
  .iv-settings,
  .iv26,
  .ivrank,
  .ivc,
  .ivcd,
  .ive,
  .ivt
) {
  --ivo-ink: var(--iv-dark-text);
  --ivo-muted: var(--iv-dark-muted);
  --ivo-line: var(--iv-dark-line);
  --iva-ink: var(--iv-dark-text);
  --iva-muted: var(--iv-dark-muted);
  --iva-line: var(--iv-dark-line);
  --ivh-ink: var(--iv-dark-text);
  --ivh-muted: var(--iv-dark-muted);
  --ivh-line: var(--iv-dark-line);
  --ivdl-ink: var(--iv-dark-text);
  --ivdl-muted: var(--iv-dark-muted);
  --ivdl-line: var(--iv-dark-line);
  --ivdl-soft: var(--iv-dark-surface-soft);
  --ivdl-white: var(--iv-dark-surface);
  --ivd-ink: var(--iv-dark-text);
  --ivd-muted: var(--iv-dark-muted);
  --ivd-line: var(--iv-dark-line);
  --ivd-soft: var(--iv-dark-surface-soft);
  --ivn-ink: var(--iv-dark-text);
  --ivn-muted: var(--iv-dark-muted);
  --ivn-line: var(--iv-dark-line);
  --ivr-ink: var(--iv-dark-text);
  --ivr-muted: var(--iv-dark-muted);
  --ivr-line: var(--iv-dark-line);
  --ivp-ink: var(--iv-dark-text);
  --ivp-muted: var(--iv-dark-muted);
  --ivp-line: var(--iv-dark-line);
  --ivpass-ink: var(--iv-dark-text);
  --ivpass-muted: var(--iv-dark-muted);
  --ivpass-line: var(--iv-dark-line);
  --ivcareer-ink: var(--iv-dark-text);
  --ivcareer-muted: var(--iv-dark-muted);
  --ivcareer-line: var(--iv-dark-line);
  --iv26-ink: var(--iv-dark-text);
  --iv26-muted: var(--iv-dark-muted);
  --iv26-line: var(--iv-dark-line);
  color: var(--iv-dark-text);
}

/* Shared modern surfaces */
body.iv2026-shell.dark-mode :where(
  .ivo-card,
  .ivo-stat,
  .ivo-choice-card,
  .ivo-current,
  .iva-card,
  .iva-stat,
  .ivh-card,
  .ivh-stat,
  .ivd-card,
  .ivd-info,
  .ivn-card,
  .ivn-stat,
  .ivn-panel,
  .ivr-stat,
  .ivr-workspace,
  .ivr-side,
  .ivr-flight,
  .ivp-card,
  .ivp-section,
  .ivpass-card,
  .ivpass-section,
  .ivcareer-card,
  .ivcareer-section,
  .ivps-card,
  .ivl-card,
  .ivl-shell,
  .ivia-card,
  .iv-profile__card,
  .iv-settings__card,
  .iv26-card,
  .iv26-stat,
  .ivrank-rank-main,
  .ivrank-filter,
  .ivrank-aircraft-card,
  .ivrank-section-status,
  .ivc-card,
  .ivcd-task,
  .ive-card,
  .ivt-card
) {
  color: var(--iv-dark-text) !important;
  background-color: var(--iv-dark-surface) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(
  .ivo-auto-note,
  .iva-meta,
  .ivh-filter,
  .ivh-filters,
  .ivd-meta span,
  .ivd-checksum code,
  .ivn-fact,
  .ivn-filter,
  .ivr-flight-data > div,
  .ivp-badge,
  .ivp-award,
  .ivpass-week,
  .ivpass-stamp,
  .ivcareer-instrument,
  .ivcareer-readout,
  .ivl-instrument,
  .ivl-field,
  .ivl-highlight,
  .ivia-suggestion,
  .iv-profile__metric,
  .iv-settings__email-option,
  .iv26-filters,
  .iv26-reviewbox,
  .iv26-routebox,
  .ivrank-requirements > span,
  .ivrank-aircraft-facts > span,
  .ivrank-career-note,
  .ivcd-mission,
  .ivt-leg
) {
  color: var(--iv-dark-text) !important;
  background-color: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(
  .ivo-card p,
  .iva-card p,
  .ivh-card p,
  .ivd-card p,
  .ivn-card p,
  .ivr-flight small,
  .ivp-card p,
  .ivpass-card p,
  .ivcareer-card p,
  .ivcareer-section p,
  .ivps-card p,
  .ivl-card p,
  .iv-profile__card p,
  .iv-settings__card p,
  .iv26-card p,
  .ivrank-aircraft-body > p,
  .ivc-card p,
  .ive-card p,
  .ivt-card p
) {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode :where(
  .ivo-card h2, .ivo-card h3,
  .iva-card h2, .iva-card h3,
  .ivh-card h2, .ivh-card h3,
  .ivd-card h2, .ivd-card h3,
  .ivn-card h2, .ivn-card h3,
  .ivp-card h2, .ivp-card h3,
  .ivpass-card h2, .ivpass-card h3,
  .ivcareer-card h2, .ivcareer-card h3,
  .ivcareer-section h2, .ivcareer-section h3,
  .ivl-card h2, .ivl-card h3,
  .iv-profile__card h2, .iv-profile__card h3,
  .iv-settings__card h2, .iv-settings__card h3,
  .iv26-card h2, .iv26-card h3,
  .ivrank-aircraft-body h3,
  .ivc-card h2, .ivc-card h3,
  .ive-card h2, .ive-card h3,
  .ivt-card h2, .ivt-card h3
) {
  color: var(--iv-dark-heading) !important;
}

/* Authentication and account recovery */
body.iv2026-shell.dark-mode .ivauth {
  --ivauth-paper: var(--iv-dark-surface);
  --ivauth-bg: var(--iv-dark-canvas-soft);
  --ivauth-ink: var(--iv-dark-text);
  --ivauth-muted: var(--iv-dark-muted);
  --ivauth-line: var(--iv-dark-line);
  --ivauth-sky: var(--iv-dark-blue-soft);
  color: var(--iv-dark-text) !important;
  color-scheme: dark;
}

body.iv2026-shell.dark-mode .ivauth .ivauth-shell {
  background: var(--iv-dark-surface) !important;
  border-color: var(--iv-dark-line) !important;
  box-shadow: 0 24px 64px rgba(0, 0, 0, .34) !important;
}

body.iv2026-shell.dark-mode .ivauth .ivauth-panel {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
}

body.iv2026-shell.dark-mode .ivauth .ivauth-panel :where(h1, h2, h3, label, strong) {
  color: var(--iv-dark-heading) !important;
  -webkit-text-fill-color: var(--iv-dark-heading);
}

body.iv2026-shell.dark-mode .ivauth .ivauth-panel :where(p, span, small, .ivauth-check) {
  color: var(--iv-dark-muted) !important;
  -webkit-text-fill-color: var(--iv-dark-muted);
}

body.iv2026-shell.dark-mode .ivauth .ivauth-panel :where(.ivauth-kicker, .ivauth-link, a) {
  color: var(--iv-dark-blue) !important;
  -webkit-text-fill-color: var(--iv-dark-blue);
}

body.iv2026-shell.dark-mode .ivauth .ivauth-control,
body.iv2026-shell.dark-mode .ivauth select.ivauth-control {
  color: var(--iv-dark-text) !important;
  -webkit-text-fill-color: var(--iv-dark-text);
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line-strong) !important;
}

body.iv2026-shell.dark-mode .ivauth .ivauth-control-icon,
body.iv2026-shell.dark-mode .ivauth .ivauth-password-toggle {
  color: #9fb0c7 !important;
  -webkit-text-fill-color: #9fb0c7;
}

body.iv2026-shell.dark-mode .ivauth :where(.ivauth-terms, .ivauth-result) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivauth .ivauth-submit,
body.iv2026-shell.dark-mode .ivauth a.ivauth-submit {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
  background: #2867d8 !important;
  border-color: #2867d8 !important;
}

body.iv2026-shell.dark-mode .ivauth .ivauth-submit :where(span, i) {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

body.iv2026-shell.dark-mode .ivauth .ivauth-submit-secondary,
body.iv2026-shell.dark-mode .ivauth a.ivauth-submit-secondary {
  color: var(--iv-dark-blue) !important;
  -webkit-text-fill-color: var(--iv-dark-blue);
  background: transparent !important;
  border-color: var(--iv-dark-blue) !important;
}

body.iv2026-shell.dark-mode .ivauth .ivauth-alert-error {
  color: var(--iv-dark-red) !important;
  background: var(--iv-dark-red-soft) !important;
  border-color: #7c3d4d !important;
}

body.iv2026-shell.dark-mode .ivauth .ivauth-alert-success {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
  border-color: #2b6c5a !important;
}

/* Keep the branded story panel explicitly dark and readable. */
body.iv2026-shell.dark-mode .ivauth .ivauth-story {
  color: #fff !important;
  background:
    radial-gradient(circle at 16% 8%, rgba(91, 187, 236, .32), transparent 20rem),
    linear-gradient(145deg, #071a34 0%, #102b52 100%) !important;
}

body.iv2026-shell.dark-mode .ivauth .ivauth-story :where(h1, h2, h3, strong) {
  color: #fff !important;
  -webkit-text-fill-color: #fff;
}

/* Home dashboard */
body.iv2026-shell.dark-mode .ivhome {
  --home-ink: var(--iv-dark-text);
  --home-muted: var(--iv-dark-muted);
  --home-line: var(--iv-dark-line);
}

body.iv2026-shell.dark-mode :where(
  .ivhome-pilot-strip,
  .ivhome-live-card,
  .ivhome-live-workspace,
  .ivhome-flight-strip,
  .ivhome-flight-strip-head,
  .ivhome-events-panel,
  .ivhome-arrivals-board,
  .ivhome-logbook
) {
  color: var(--iv-dark-text) !important;
  background-color: var(--iv-dark-surface) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(
  .ivhome-pilot-label,
  .ivhome-event-ticket,
  .ivhome-panel-empty,
  .ivhome-board-empty,
  .ivhome-flight-strip-panel,
  .ivhome-airspace-empty,
  .ivhome-arrivals-columns
) {
  color: var(--iv-dark-text) !important;
  background-color: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivhome :where(
  .ivhome-flight-strip-top > div > strong,
  .ivhome-flight-strip-route > strong,
  .ivhome-flight-strip-data strong
) {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivhome .ivhome-flight-strip-top small.is-live {
  color: #78e6bf !important;
}

body.iv2026-shell.dark-mode .ivhome .ivhome-flight-strip-top small.is-stale,
body.iv2026-shell.dark-mode .ivhome .ivhome-flight-strip-top small.is-paused {
  color: var(--iv-dark-amber) !important;
}

body.iv2026-shell.dark-mode .ivhome .ivhome-multiplayer-state {
  border: 1px solid #43546b;
  color: #c8d5e6 !important;
  background: #25344a !important;
}

body.iv2026-shell.dark-mode .ivhome .ivhome-multiplayer-state.is-online {
  border-color: #2f715e;
  color: #8ce9c8 !important;
  background: #173e35 !important;
}

body.iv2026-shell.dark-mode .ivhome .ivhome-multiplayer-state.is-unknown {
  border-color: #745c31;
  color: var(--iv-dark-amber) !important;
  background: var(--iv-dark-amber-soft) !important;
}

body.iv2026-shell.dark-mode .ivhome .ivhome-flight-strip-top em {
  border: 1px solid #43546b;
  color: #d1dbea !important;
  background: #26364c !important;
}

body.iv2026-shell.dark-mode .ivhome .ivhome-flight-strip.is-group .ivhome-flight-strip-top em {
  border-color: #5d578e;
  color: #d9d5ff !important;
  background: #35315d !important;
}

body.iv2026-shell.dark-mode .ivhome .ivhome-flight-strip-route > span {
  color: #8fc0ff !important;
}

body.iv2026-shell.dark-mode .ivhome .ivhome-flight-strip-route > span i {
  border-color: #49617c !important;
}

body.iv2026-shell.dark-mode .ivhome .ivhome-flight-strip-data span {
  color: var(--iv-dark-muted) !important;
  background: var(--iv-dark-surface-soft) !important;
}

body.iv2026-shell.dark-mode .ivhome .ivhome-flight-strip-progress > span {
  border-color: #3b5068 !important;
  background: #0f1d2c !important;
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, .34) !important;
}

body.iv2026-shell.dark-mode .ivhome .ivhome-flight-strip-progress > b {
  color: #aec0d3 !important;
}

body.iv2026-shell.dark-mode .ivhome-arrival-row {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivhome-arrival-row:hover {
  background: var(--iv-dark-surface-soft) !important;
}

body.iv2026-shell.dark-mode .ivhome-arrival-cell-link:is(:hover, :focus-visible) strong,
body.iv2026-shell.dark-mode .ivhome-arrival-cell-link:is(:hover, :focus-visible) .ivhome-inline-link-icon {
  color: #8fc0ff !important;
}

body.iv2026-shell.dark-mode .ivhome-arrival-pilot > span.is-fallback {
  border-color: #3f5874 !important;
  color: #8fc0ff !important;
  background: linear-gradient(145deg, #203650, #17283d) !important;
  box-shadow: inset 0 0 0 1px rgba(143, 192, 255, .08), 0 5px 14px rgba(0, 0, 0, .24) !important;
}

body.iv2026-shell.dark-mode .ivhome-arrival-pilot > span.is-fallback > .ivhome-arrival-avatar-fallback {
  color: #8fc0ff !important;
}

body.iv2026-shell.dark-mode .ivhome-arrival-mode {
  color: #c8d4e4 !important;
  background: #25344a !important;
}

body.iv2026-shell.dark-mode .ivhome-arrival-landing.is-smooth strong { color: var(--iv-dark-green) !important; }
body.iv2026-shell.dark-mode .ivhome-arrival-landing.is-standard strong { color: #8fc0ff !important; }
body.iv2026-shell.dark-mode .ivhome-arrival-landing.is-firm strong { color: var(--iv-dark-amber) !important; }

body.iv2026-shell.dark-mode .ivhome-btn-primary {
  color: #fff !important;
  background: linear-gradient(135deg, #1769e0, #0d58c7) !important;
}

body.iv2026-shell.dark-mode .ivhome-ops-open :where(span, i) {
  color: #0b315c !important;
}

body.iv2026-shell.dark-mode .ivhome-events-panel .ivhome-section-head > a {
  color: #c3ddff !important;
  background: var(--iv-dark-blue-soft) !important;
}

body.iv2026-shell.dark-mode .ivhome-next-date :where(span, strong, small) {
  color: #fff !important;
}

/* The passport is a paper document by design, even inside dark mode. */
body.iv2026-shell.dark-mode .ivhome-passport-page {
  color: #302d25 !important;
  background:
    repeating-linear-gradient(0deg, rgba(72, 58, 32, .025), rgba(72, 58, 32, .025) 1px, transparent 1px, transparent 23px),
    linear-gradient(145deg, #fbf5e8, #f1e5cd) !important;
}

body.iv2026-shell.dark-mode .ivhome-passport-page :where(h3, p, strong, span, small) {
  color: #514a3d !important;
}

body.iv2026-shell.dark-mode .ivhome-passport-page .ivhome-passport-page-no { color: #876d37 !important; }
body.iv2026-shell.dark-mode .ivhome-passport-page > a { color: #8c2d34 !important; }

/* Downloads */
body.iv2026-shell.dark-mode :where(.ivd-card, .ivd-info, .ivd-empty) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivd-card-visual {
  background: linear-gradient(145deg, #263a54, #1d2c42) !important;
}

/* Activities, events, tours, archive and campaigns */
body.iv2026-shell.dark-mode :where(
  .iva-empty,
  .ivh-filters,
  .ivh-empty,
  .ivd-story,
  .ivd-facts,
  .ivd-media,
  .ivcd-person,
  .ivcd-task,
  .ivcd-mission,
  .ive-person,
  .ivt-person,
  .ivt-leg
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(.iva-btn-outline, .ivh-btn, .ivcd-btn:not(.primary):not(.collect), .ive-btn:not(.ive-btn-primary), .ivt-btn:not(.ivt-btn-primary)) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  border-color: var(--iv-dark-line-strong) !important;
}

body.iv2026-shell.dark-mode :where(.iva-btn-outline, .ivh-btn, .ivcd-btn:not(.collect), .ive-btn, .ivt-btn):hover {
  color: #fff !important;
  background: #2867d8 !important;
  border-color: #2867d8 !important;
}

body.iv2026-shell.dark-mode :where(.ivcd-warning, .ivc-orange, .iva-pill-orange, .ivt-pill-orange, .ive-warning) {
  color: var(--iv-dark-amber) !important;
  background: var(--iv-dark-amber-soft) !important;
  border-color: #785d2c !important;
}

body.iv2026-shell.dark-mode :where(.ivc-error, .ive-pill-red, .ive-btn-danger, .ivt-btn-danger) {
  color: var(--iv-dark-red) !important;
  background: var(--iv-dark-red-soft) !important;
  border-color: #7c3d4d !important;
}

body.iv2026-shell.dark-mode :where(.ivcd-task.completed, .ivt-leg-done) {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
  border-color: #2b6c5a !important;
}

body.iv2026-shell.dark-mode :where(.ivcd-task.active, .ivh-tab.active, .ivh-tab.is-active) {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .ivcd-pill {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

/* Flight Campaigns list and detail. */
body.iv2026-shell.dark-mode :where(
  .ivc-summary-data span,
  .ivcd-active,
  .ivcd-active-card,
  .ivcd-mission-nav-wrap,
  .ivcd-mission-panel,
  .ivcd-person,
  .ivcd-empty,
  .ivcd-modal-card
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  background-image: none !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(
  .ivcd-mission-head,
  .ivcd-task,
  .ivcd-slot-card,
  .ivcd-modal-actions,
  .ivcd-mission-node,
  .ivcd-slot-icon,
  .ivcd-search input
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  background-image: none !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(
  .ivc-summary-title h2,
  .ivc-card h3,
  .ivcd-section-title h2,
  .ivcd-active-top strong,
  .ivcd-slot-content strong,
  .ivcd-mission-identity h3,
  .ivcd-task-id strong,
  .ivcd-person-copy strong,
  .ivcd-modal-head h3
) {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode :where(
  .ivc-card-label,
  .ivc-card-meta,
  .ivc-progress-head span,
  .ivcd-section-title p,
  .ivcd-active-card p,
  .ivcd-active-route,
  .ivcd-slot-content p,
  .ivcd-mission-identity span,
  .ivcd-mission-progress div:first-child,
  .ivcd-task-desc,
  .ivcd-task-meta,
  .ivcd-person-copy small,
  .ivcd-person-score small,
  .ivcd-modal-body
) {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .ivcd-mission-tab:hover,
body.iv2026-shell.dark-mode .ivcd-mission-tab.is-active {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .ivcd-mission-pinboard {
  color: #ffe4a6 !important;
  background: linear-gradient(145deg, rgba(115, 82, 27, 0.46), rgba(29, 43, 66, 0.98)) !important;
  border-color: #8d6c31 !important;
  box-shadow: inset 0 1px 0 rgba(255, 226, 159, 0.1), 0 10px 24px rgba(2, 8, 23, 0.22) !important;
}

body.iv2026-shell.dark-mode .ivcd-mission-pinboard-head,
body.iv2026-shell.dark-mode .ivcd-mission-pinboard-head > span,
body.iv2026-shell.dark-mode .ivcd-mission-pinboard-head > strong {
  color: #ffe4a6 !important;
}

body.iv2026-shell.dark-mode .ivcd-mission-pinboard .ivcd-pin-dot {
  background: #3a465b !important;
  border-color: #7c6740 !important;
  box-shadow: inset 0 0 0 2px rgba(8, 17, 31, 0.82) !important;
}

body.iv2026-shell.dark-mode .ivcd-mission-pinboard .ivcd-pin-dot.is-collected {
  background: #f1b84c !important;
  border-color: #d89a29 !important;
  box-shadow: inset 0 0 0 2px rgba(45, 32, 12, 0.52), 0 0 10px rgba(241, 184, 76, 0.22) !important;
}

body.iv2026-shell.dark-mode .ivcd-task.completed {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
  border-color: #2b6c5a !important;
}

body.iv2026-shell.dark-mode :where(.ivcd-task.active, .ivcd-task.final, .ivcd-slot-card.is-locked) {
  color: var(--iv-dark-amber) !important;
  background: var(--iv-dark-amber-soft) !important;
  border-color: #785d2c !important;
}

body.iv2026-shell.dark-mode .ivcd-modal-close {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

/* Event and tour detail pages. */
body.iv2026-shell.dark-mode :where(
  .ive-page .ive-panel,
  .ive-page .ive-facts,
  .ive-page .ive-modal-card,
  .ivt-page .ivt-panel,
  .ivt-page .ivt-modal-card
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  background-image: none !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(
  .ive-page .ive-fact,
  .ivt-page .ivt-summary article,
  .ivt-page .ivt-legs,
  .ivt-page .ivt-leg,
  .ivt-page .ivt-leg-number,
  .ivt-page .ivt-leg-aircraft em,
  .ivt-page .ivt-people-toggle
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  background-image: none !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(
  .ive-page .ive-section-title h2,
  .ive-page .ive-action-head h2,
  .ive-page .ive-fact strong,
  .ive-page .ive-modal-card h2,
  .ivt-page .ivt-section-title h2,
  .ivt-page .ivt-action-head h2,
  .ivt-page .ivt-leg h3,
  .ivt-page .ivt-modal-card h2
) {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode :where(
  .ive-page .ive-section-title p,
  .ive-page .ive-description,
  .ive-page .ive-capacity,
  .ive-page .ive-fact > span,
  .ive-page .ive-fact strong small,
  .ive-page .ive-modal-card p,
  .ivt-page .ivt-section-title p,
  .ivt-page .ivt-description,
  .ivt-page .ivt-leg-route,
  .ivt-page .ivt-leg-aircraft > span,
  .ivt-page .ivt-modal-card p
) {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode :where(.ive-page .ive-btn.secondary, .ivt-page .ivt-btn.secondary) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line-strong) !important;
}

body.iv2026-shell.dark-mode :where(
  .ivc-btn.primary,
  .ivcd-btn.primary,
  .ive-page .ive-btn.primary,
  .ivt-page .ivt-btn.primary
) {
  color: #fff !important;
  background: #2867d8 !important;
  border-color: #2867d8 !important;
}

body.iv2026-shell.dark-mode :where(
  .ive-page .ive-btn.discord,
  .ivt-page .ivt-btn.discord
) {
  color: #fff !important;
  background: #5865f2 !important;
  border-color: #5865f2 !important;
}

body.iv2026-shell.dark-mode .ivt-page .ivt-leg:hover,
body.iv2026-shell.dark-mode .ivt-page .ivt-leg.available:hover {
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .ivt-page .ivt-leg.completed {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
  border-color: #2b6c5a !important;
}

body.iv2026-shell.dark-mode .ivt-page .ivt-leg.has-meetup {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

/* Fly-now workspace. */
body.iv2026-shell.dark-mode :where(
  .ivo-page .ivo-group-card,
  .ivo-page .ivo-mission,
  .ivo-page .ivo-empty-live,
  .ivo-page .ivo-mission-empty
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  background-image: none !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(
  .ivo-page .ivo-mission-route,
  .ivo-page .ivo-current-icon,
  .ivo-page .ivo-empty-live > i,
  .ivo-page .ivo-mission-empty i
) {
  color: #c7e0ff !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(
  .ivo-page .ivo-group-card h3,
  .ivo-page .ivo-mission h3,
  .ivo-page .ivo-mission-route strong,
  .ivo-page .ivo-empty-live strong,
  .ivo-page .ivo-mission-empty strong
) {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode :where(
  .ivo-page .ivo-empty-live p,
  .ivo-page .ivo-mission-actions small,
  .ivo-page .ivo-mission-empty span
) {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .ivo-page .ivo-route-line i {
  color: var(--iv-dark-blue) !important;
  background: var(--iv-dark-surface) !important;
}

body.iv2026-shell.dark-mode :where(.ivo-page .ivo-btn, .ivo-page .ivo-btn-outline) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line-strong) !important;
}

body.iv2026-shell.dark-mode :where(.ivo-page .ivo-btn-primary, .ivo-page .ivo-btn-light) {
  color: #fff !important;
  background: #2867d8 !important;
  border-color: #2867d8 !important;
}

body.iv2026-shell.dark-mode .ivo-page .ivo-btn-ghost {
  color: #fff !important;
  background: rgba(255, 255, 255, .08) !important;
  border-color: rgba(255, 255, 255, .25) !important;
}

body.iv2026-shell.dark-mode .iv-pilots .iv-pilots__pilot-arrow {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

/* Activity archive list and memory detail. */
body.iv2026-shell.dark-mode :where(
  .ivh-page .ivh-controls,
  .ivh-page .ivh-record,
  .ivh-page .ivh-result-count,
  .ivh-page .ivh-empty,
  .ivd-page .ivd-jump,
  .ivd-page .ivd-panel
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  background-image: none !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(
  .ivh-page .ivh-fact,
  .ivh-page .ivh-tab,
  .ivh-page .ivh-page-link,
  .ivd-page .ivd-leg,
  .ivd-page .ivd-leg-number,
  .ivd-page .ivd-leg-meta span,
  .ivd-page .ivd-person,
  .ivd-page .ivd-show-all button
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  background-image: none !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(
  .ivh-page .ivh-controls-title h2,
  .ivh-page .ivh-section-title h2,
  .ivh-page .ivh-record h3,
  .ivd-page .ivd-section-title h2,
  .ivd-page .ivd-summary-title,
  .ivd-page .ivd-fact strong,
  .ivd-page .ivd-leg-route,
  .ivd-page .ivd-person-copy a,
  .ivd-page .ivd-person-progress strong
) {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode :where(
  .ivh-page .ivh-controls-title p,
  .ivh-page .ivh-section-title p,
  .ivh-page .ivh-record-desc,
  .ivh-page .ivh-date,
  .ivd-page .ivd-section-title p,
  .ivd-page .ivd-description,
  .ivd-page .ivd-fact span,
  .ivd-page .ivd-leg-route-text,
  .ivd-page .ivd-person-copy small
) {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .ivh-page .ivh-tab.active,
body.iv2026-shell.dark-mode .ivh-page .ivh-page-link.active {
  color: #fff !important;
  background: #2867d8 !important;
  border-color: #2867d8 !important;
}

body.iv2026-shell.dark-mode :where(.ivh-page .ivh-btn.primary, .ivc-page .ivc-btn.primary, .ivc-page button.ivc-btn) {
  color: #fff !important;
  background: #2867d8 !important;
  border-color: #2867d8 !important;
}

body.iv2026-shell.dark-mode :where(.ivd-meta span, .ivd-checksum code) {
  color: var(--iv-dark-muted) !important;
  background: var(--iv-dark-surface-soft) !important;
}

/* Keep map controls light for instant recognition, while transient map
 * overlays follow the dark cockpit surface used by the surrounding UI. */
body.iv2026-shell.dark-mode :where(
  .leaflet-control,
  .leaflet-control-layers
) {
  color: #14233a !important;
  background-color: #fff !important;
  border-color: #cbd8e7 !important;
}

body.iv2026-shell.dark-mode :where(
  .leaflet-popup-content-wrapper,
  .leaflet-tooltip
) {
  color: var(--iv-dark-text) !important;
  background: #102844 !important;
  border: 1px solid rgba(117, 178, 255, .3) !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .42) !important;
}

body.iv2026-shell.dark-mode .leaflet-popup-tip {
  background: #102844 !important;
  box-shadow: 3px 3px 8px rgba(0, 0, 0, .28) !important;
}

body.iv2026-shell.dark-mode :where(
  .leaflet-popup-content,
  .leaflet-popup-content span,
  .leaflet-popup-content div,
  .leaflet-popup-content p,
  .leaflet-tooltip,
  .leaflet-tooltip span,
  .leaflet-tooltip div
) {
  color: #d5e1f0 !important;
}

body.iv2026-shell.dark-mode :where(
  .leaflet-popup-content strong,
  .leaflet-tooltip strong
) {
  color: #fff !important;
}

body.iv2026-shell.dark-mode :where(
  .leaflet-popup-content a,
  .leaflet-tooltip a
) {
  color: #8fc2ff !important;
}

body.iv2026-shell.dark-mode :where(
  .leaflet-popup-content a:hover,
  .leaflet-popup-content a:focus-visible,
  .leaflet-tooltip a:hover,
  .leaflet-tooltip a:focus-visible
) {
  color: #c8e1ff !important;
}

body.iv2026-shell.dark-mode .leaflet-popup-close-button {
  color: #c8d8eb !important;
}

body.iv2026-shell.dark-mode .leaflet-popup-close-button:is(:hover, :focus-visible) {
  color: #fff !important;
  background: rgba(255, 255, 255, .08) !important;
}

body.iv2026-shell.dark-mode .leaflet-tooltip-top::before {
  border-top-color: #102844 !important;
}

body.iv2026-shell.dark-mode .leaflet-tooltip-bottom::before {
  border-bottom-color: #102844 !important;
}

body.iv2026-shell.dark-mode .leaflet-tooltip-left::before {
  border-left-color: #102844 !important;
}

body.iv2026-shell.dark-mode .leaflet-tooltip-right::before {
  border-right-color: #102844 !important;
}

/* Flight Passport overview */
body.iv2026-shell.dark-mode :where(
  .ivpass-stamp,
  .ivpass-card,
  .ivpass-archive,
  .ivpass-archive-stat,
  .ivpass-feed-item,
  .ivpass-week,
  .ivpass-award
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(.ivpass-feed-item, .ivpass-archive-stat, .ivpass-week) {
  background: var(--iv-dark-surface-soft) !important;
}

body.iv2026-shell.dark-mode :where(.ivpass-stamp.done, .ivpass-week.done, .ivpass-me) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-green-soft) !important;
  border-color: #2b6c5a !important;
}

body.iv2026-shell.dark-mode .ivpass-btn:not(.ivpass-btn-primary) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  border-color: var(--iv-dark-line-strong) !important;
}

body.iv2026-shell.dark-mode .ivpass-rank {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
}

body.iv2026-shell.dark-mode .ivpass-hero-meta > span {
  color: #fff !important;
  background: rgba(255, 255, 255, .09) !important;
  border-color: rgba(255, 255, 255, .24) !important;
}

body.iv2026-shell.dark-mode :where(
  .leaflet-control a,
  .leaflet-control span,
  .leaflet-control label,
  .leaflet-control-attribution,
  .leaflet-control-attribution a
) {
  color: #14233a !important;
}

body.iv2026-shell.dark-mode .ivr .leaflet-tooltip.ivr-tooltip {
  color: #fff !important;
  background: #102844 !important;
  border-color: transparent !important;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .34) !important;
}

body.iv2026-shell.dark-mode .ivr .leaflet-tooltip.ivr-tooltip::before {
  border-top-color: #102844 !important;
}

body.iv2026-shell.dark-mode .ivr .leaflet-tooltip.ivr-tooltip strong {
  color: #fff !important;
}

body.iv2026-shell.dark-mode .ivr .leaflet-tooltip.ivr-tooltip div {
  color: #d5e1f0 !important;
}

body.iv2026-shell.dark-mode :where(
  .iv-profile__career-note,
  .iv-profile__event-row,
  .iv-profile__award,
  .iv-profile__award-count,
  .iv-profile__toggle-button,
  .iv-profile__max-rank-icon,
  .ivcareer-rank-panel,
  .ivcareer-career-card,
  .ivcareer-career-status,
  .ivcareer-skill-card,
  .ivcareer-skill-row,
  .ivcareer-skill-flight,
  .ivcareer-empty,
  .ivcareer-participation-card,
  .ivcareer-next-milestone,
  .ivcareer-recognition,
  .ivcareer-award,
  .ivcareer-award-archive > summary,
  .ivps-rule-strip > span,
  .ivps-invite-action > i,
  .ivps-dashboard,
  .ivps-attempt,
  .ivps-dashboard-foot,
  .ivps-requirement > i,
  .ivps-board,
  .ivps-podium-card,
  .ivps-list-state,
  .ivps-history-month,
  .ivps-dialog,
  .ivps-dialog-icon
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(.iv-profile__action, .ivcareer-btn-ghost, .ivps-action.is-secondary, .ivps-page-link) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  border-color: var(--iv-dark-line-strong) !important;
}

body.iv2026-shell.dark-mode :where(.iv-profile__action, .ivcareer-btn-ghost, .ivps-action.is-secondary, .ivps-page-link):hover {
  color: #fff !important;
  background: #2867d8 !important;
  border-color: #2867d8 !important;
}

body.iv2026-shell.dark-mode :where(.iv-profile__account-status--inactive, .iv-profile__flight-status--pending, .ivcareer-career-status.is-paused) {
  color: var(--iv-dark-amber) !important;
  background: var(--iv-dark-amber-soft) !important;
}

body.iv2026-shell.dark-mode :where(.iv-profile__account-status--suspended, .iv-profile__flight-status--rejected, .ivps-flash.is-error) {
  color: var(--iv-dark-red) !important;
  background: var(--iv-dark-red-soft) !important;
}

body.iv2026-shell.dark-mode .iv-profile__action--primary {
  color: #fff !important;
  background: #2867d8 !important;
  border-color: #2867d8 !important;
}

body.iv2026-shell.dark-mode .iv-profile__info::after {
  background: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(
  .ivcareer-section-tag,
  .ivcareer-max-rank-icon,
  .ivcareer-next-rank > span,
  .ivcareer-award-head > span,
  .ivps-medal
) {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .leaflet-control a:hover {
  color: #0d58c7 !important;
  background: #eef5fd !important;
}

/* Profile, settings and progress */
body.iv2026-shell.dark-mode :where(
  .iv-profile__metric,
  .iv-profile__discord-detail,
  .iv-profile__flights,
  .iv-settings__avatar-preview,
  .iv-settings__email-option,
  .ivcareer-instrument,
  .ivcareer-readout,
  .ivcareer-award,
  .ivcareer-rank-step,
  .ivps-entry
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode :where(
  .iv-settings__control,
  .iv-settings__field input,
  .iv-settings__field select,
  .iv-settings__field textarea
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line-strong) !important;
}

/* Flight log, active flight and historical PIREP */
body.iv2026-shell.dark-mode .ivl :where(
  .ivl-body,
  .ivl-statusline,
  .ivl-instrument,
  .ivl-highlight,
  .ivl-phase,
  .ivl-leg,
  .ivl-reviewbox,
  .ivl-skillbox,
  .ivl-skill-item,
  .ivl-field,
  .ivl-note,
  .ivl-chart-empty
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  background-image: none !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivl :where(
  .ivl-map-empty,
  .ivl-route-stat,
  .ivl-recorder-legend-item,
  .ivl-recorder-detail,
  .ivl-recorder-metric,
  .ivl-recorder-alert,
  .ivl-recorder-log,
  .ivl-recorder-log-toggle,
  .ivl-recorder-log-datum
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivl .ivl-recorder-identity h3 i {
  color: var(--iv-dark-blue) !important;
  background: var(--iv-dark-blue-soft) !important;
}

/* Flight Recorder technical log: instrument contrast in dark mode. */
body.iv2026-shell.dark-mode .ivl .ivl-recorder-log-list {
  background: #101a29 !important;
  border-top-color: #405675 !important;
}

body.iv2026-shell.dark-mode .ivl .ivl-recorder-log-list::before {
  z-index: 0;
  opacity: 1 !important;
  background: linear-gradient(180deg, #579fff 0%, #46c1df 52%, #42d39b 100%) !important;
  box-shadow: 0 0 0 1px rgba(143, 192, 255, .18), 0 0 12px rgba(70, 193, 223, .24);
}

body.iv2026-shell.dark-mode .ivl .ivl-recorder-log-row {
  color: #eef4ff !important;
  background: transparent !important;
}

body.iv2026-shell.dark-mode .ivl :where(
  .ivl-recorder-log-copy strong,
  .ivl-recorder-log-time strong,
  .ivl-recorder-log-datum strong
) {
  color: #f3f7ff !important;
}

body.iv2026-shell.dark-mode .ivl :where(
  .ivl-recorder-log-copy small,
  .ivl-recorder-log-time small,
  .ivl-recorder-log-datum small
) {
  color: #b8c7da !important;
}

body.iv2026-shell.dark-mode .ivl .ivl-recorder-log-copy strong {
  font-size: 12px;
}

body.iv2026-shell.dark-mode .ivl .ivl-recorder-log-datum {
  background: #121e30 !important;
  border-color: #344a68 !important;
}

body.iv2026-shell.dark-mode .ivl .ivl-recorder-log-datum > i {
  color: #8cb5ff !important;
  background: #223a5d !important;
}

body.iv2026-shell.dark-mode .ivl .ivl-pill {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivl .ivl-pill-no {
  color: var(--iv-dark-red) !important;
  background: var(--iv-dark-red-soft) !important;
  border-color: #7c3d4d !important;
}

body.iv2026-shell.dark-mode .ivh-shell .ivh-result.is-pass {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
  border: 1px solid #2b6c5a;
}

body.iv2026-shell.dark-mode .ivh-shell .ivh-result.is-fail {
  color: var(--iv-dark-red) !important;
  background: var(--iv-dark-red-soft) !important;
  border: 1px solid #7c3d4d;
}

body.iv2026-shell.dark-mode .ivh-shell .ivh-result.is-na {
  color: var(--iv-dark-amber) !important;
  background: var(--iv-dark-amber-soft) !important;
  border: 1px solid #785d2c;
}

body.iv2026-shell.dark-mode :where(.ivl .ivl-pill-wait, .ivo-pill-soon) {
  color: var(--iv-dark-amber) !important;
  background: var(--iv-dark-amber-soft) !important;
  border-color: #785d2c !important;
}

body.iv2026-shell.dark-mode :where(.iv26-table tr.iv26-row-live td, .iv26-status-live) {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
}

body.iv2026-shell.dark-mode :where(.iv26-status-wait, .iv26-mode-event, .iv26-mode-tour) {
  color: var(--iv-dark-amber) !important;
  background: var(--iv-dark-amber-soft) !important;
}

body.iv2026-shell.dark-mode .iv26-status-no {
  color: var(--iv-dark-red) !important;
  background: var(--iv-dark-red-soft) !important;
}

body.iv2026-shell.dark-mode :where(.service, .widgets-cards, .item-box, .item-box-wrap) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  border-color: var(--iv-dark-line) !important;
}

/* Copilot chat */
body.iv2026-shell.dark-mode :where(#ivia-chat, .ivia-sidebar, .ivia-thread, .ivia-suggestion) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivia-message-assistant .ivia-bubble {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivia-message-user .ivia-bubble {
  color: #fff !important;
  background: #2867d8 !important;
}

/* Radar controls and selected traffic */
body.iv2026-shell.dark-mode :where(
  .ivr-map-controls,
  .ivr-map-control,
  .ivr-selected,
  .ivr-selected-grid > div,
  .ivr-side-head,
  .ivr-traffic-icon,
  .ivr-traffic-fact
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivr-pill-paused {
  color: var(--iv-dark-amber) !important;
  background: var(--iv-dark-amber-soft) !important;
}

body.iv2026-shell.dark-mode .ivr-error {
  color: var(--iv-dark-red) !important;
  background: var(--iv-dark-red-soft) !important;
  border-color: #7c3d4d !important;
}

body.iv2026-shell.dark-mode .ivr-airport-pin > span {
  color: #14233a !important;
  background: #fff !important;
  border-color: #cbd8e7 !important;
}

/* Pilot directory */
body.iv2026-shell.dark-mode .iv-pilots :where(
  .iv-pilots__panel,
  .iv-pilots__panel-head,
  .iv-pilots__filters,
  .iv-pilots__table-wrap,
  .iv-pilots__datatable-footer
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .iv-pilots :where(.iv-pilots__filters, .iv-pilots__datatable-footer) {
  background: var(--iv-dark-surface-soft) !important;
}

body.iv2026-shell.dark-mode .iv-pilots :where(
  .iv-pilots__panel h2,
  .iv-pilots__field label,
  .iv-pilots__results,
  .iv-pilots__results strong,
  .iv-pilots__last-flight,
  .iv-pilots__last-flight strong
) {
  color: var(--iv-dark-text) !important;
}

body.iv2026-shell.dark-mode .iv-pilots .iv-pilots__panel-kicker {
  color: var(--iv-dark-blue) !important;
}

body.iv2026-shell.dark-mode .iv-pilots .iv-pilots__table tbody tr,
body.iv2026-shell.dark-mode .iv-pilots .iv-pilots__table tbody tr:nth-child(odd) {
  background: var(--iv-dark-surface-soft) !important;
}

body.iv2026-shell.dark-mode .iv-pilots .iv-pilots__table tbody tr:nth-child(even) {
  background: var(--iv-dark-surface-raised) !important;
}

body.iv2026-shell.dark-mode .iv-pilots :where(.iv-pilots__table td, .iv-pilots__table th) {
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .iv-pilots .iv-pilots__community-number {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .iv-pilots .iv-pilots__community-number--discord {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
  border-color: #2f6f5e !important;
}

body.iv2026-shell.dark-mode .iv-pilots .iv-pilots__pilot-status--active {
  color: var(--iv-dark-green) !important;
}

body.iv2026-shell.dark-mode .iv-pilots .iv-pilots__pilot-status--inactive {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .iv-pilots .iv-pilots__reset {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-raised) !important;
  border-color: var(--iv-dark-line-strong) !important;
}

/* My flights register */
body.iv2026-shell.dark-mode .ivlog-page {
  --ivlog-ink: var(--iv-dark-heading);
  --ivlog-muted: var(--iv-dark-muted);
  --ivlog-line: var(--iv-dark-line);
  --ivlog-soft: var(--iv-dark-surface-soft);
}

body.iv2026-shell.dark-mode .ivlog-page :where(
  .ivlog-filters,
  .ivlog-register,
  .ivlog-register-top,
  .ivlog-pages,
  .ivlog-empty,
  .ivlog-result-count
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  background-image: none !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivlog-page :where(
  .ivlog-register-top,
  .ivlog-pages,
  .ivlog-table th
) {
  background: var(--iv-dark-surface-soft) !important;
}

body.iv2026-shell.dark-mode .ivlog-page :where(
  .ivlog-filter label,
  .ivlog-register-top span,
  .ivlog-register-top strong,
  .ivlog-result-count,
  .ivlog-result-count strong,
  .ivlog-route,
  .ivlog-date strong,
  .ivlog-duration,
  .ivlog-aircraft,
  .ivlog-landing,
  .ivlog-empty strong,
  .ivlog-table td
) {
  color: var(--iv-dark-text) !important;
}

body.iv2026-shell.dark-mode .ivlog-page :where(
  .ivlog-date span,
  .ivlog-landing small,
  .ivlog-table td::before,
  .ivlog-empty span
) {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .ivlog-page .ivlog-table tbody tr,
body.iv2026-shell.dark-mode .ivlog-page .ivlog-table tbody tr:hover {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivlog-page .ivlog-table tbody tr.ivlog-row-live,
body.iv2026-shell.dark-mode .ivlog-page .ivlog-table tbody tr.ivlog-row-live:hover {
  background: var(--iv-dark-green-soft) !important;
}

body.iv2026-shell.dark-mode .ivlog-page :where(.ivlog-active-filters span, .ivlog-filter-reset, .ivlog-open, .ivlog-pages a, .ivlog-pages span) {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .ivlog-page .ivlog-pages .current {
  color: #fff !important;
  background: #2867d8 !important;
  border-color: #2867d8 !important;
}

body.iv2026-shell.dark-mode .ivlog-page :where(.ivlog-mode-free, .ivlog-mode-legacy) {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
}

body.iv2026-shell.dark-mode .ivlog-page :where(.ivlog-mode-group, .ivlog-status-ok) {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
}

body.iv2026-shell.dark-mode .ivlog-page .ivlog-points {
  color: var(--iv-dark-green) !important;
}

body.iv2026-shell.dark-mode .ivlog-page :where(
  .ivlog-mode-event,
  .ivlog-mode-tour,
  .ivlog-status-wait,
  .ivlog-status-disconnected,
  .ivlog-status-live
) {
  color: var(--iv-dark-amber) !important;
  background: var(--iv-dark-amber-soft) !important;
}

body.iv2026-shell.dark-mode .ivlog-page .ivlog-event-name {
  color: var(--iv-dark-amber) !important;
}

body.iv2026-shell.dark-mode .ivlog-page .ivlog-status-no {
  color: var(--iv-dark-red) !important;
  background: var(--iv-dark-red-soft) !important;
}

body.iv2026-shell.dark-mode .ivlog-page .ivlog-landing.is-hard {
  color: var(--iv-dark-red) !important;
}

body.iv2026-shell.dark-mode .ivlog-page .ivlog-live {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
  background-image: none !important;
  border-color: #2f6f5e !important;
}

body.iv2026-shell.dark-mode .ivlog-page .ivlog-live :where(small, strong, span, .ivlog-live-route) {
  color: var(--iv-dark-green) !important;
}

body.iv2026-shell.dark-mode .ivlog-page .ivlog-live.is-interrupted {
  color: var(--iv-dark-amber) !important;
  background: var(--iv-dark-amber-soft) !important;
  border-color: #785d2c !important;
}

body.iv2026-shell.dark-mode .ivlog-page .ivlog-live.is-interrupted :where(small, strong, span, .ivlog-live-route) {
  color: var(--iv-dark-amber) !important;
}

/* Notification history */
body.iv2026-shell.dark-mode .ivnc-page {
  --ivnc-ink: var(--iv-dark-heading);
  --ivnc-muted: var(--iv-dark-muted);
  --ivnc-line: var(--iv-dark-line);
}

body.iv2026-shell.dark-mode .ivnc-page :where(.ivnc-filter-bar, .ivnc-item, .ivnc-item.is-read, .ivnc-empty) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivnc-page :where(
  .ivnc-retention,
  .ivnc-group-title,
  .ivnc-item-meta,
  .ivnc-item p,
  .ivnc-empty p
) {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .ivnc-page :where(.ivnc-item h2, .ivnc-empty h2) {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivnc-page :where(.ivnc-filter, .ivnc-open, .ivnc-read-one, .ivnc-page-link) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivnc-page :where(.ivnc-filter:hover, .ivnc-filter.is-active, .ivnc-open:hover, .ivnc-read-one:hover, .ivnc-page-link:hover) {
  color: var(--iv-dark-heading) !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: var(--iv-dark-blue) !important;
}

body.iv2026-shell.dark-mode .ivnc-page .ivnc-page-link.is-current {
  color: #fff !important;
  background: #2867d8 !important;
  border-color: #2867d8 !important;
}

body.iv2026-shell.dark-mode .ivnc-page .ivnc-filter span {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
}

body.iv2026-shell.dark-mode .ivnc-page .ivnc-filter.is-active span {
  color: #fff !important;
  background: #2867d8 !important;
}

body.iv2026-shell.dark-mode .ivnc-page .ivnc-item-icon,
body.iv2026-shell.dark-mode .ivnc-page .ivnc-empty i {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
}

body.iv2026-shell.dark-mode .ivnc-page .ivnc-item.is-red .ivnc-item-icon {
  color: var(--iv-dark-red) !important;
  background: var(--iv-dark-red-soft) !important;
}

body.iv2026-shell.dark-mode .ivnc-page .ivnc-item.is-green .ivnc-item-icon {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
}

body.iv2026-shell.dark-mode .ivnc-page :where(.ivnc-item.is-gold, .ivnc-item.is-amber) .ivnc-item-icon {
  color: var(--iv-dark-amber) !important;
  background: var(--iv-dark-amber-soft) !important;
}

body.iv2026-shell.dark-mode .ivnc-page .ivnc-new {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
}

/* Progress tracks and charts */
body.iv2026-shell.dark-mode :where(
  .progress,
  .ivpass-bar,
  .ivpass-mini,
  .ivcareer-progress,
  .ivcareer-track,
  .ivp-bar,
  .ivp-skill-track,
  .ivcd-progress,
  .ivt-progress,
  .ivl-progress-track,
  .ivl-skill-track,
  .ivl-follow-track
) {
  background: var(--iv-dark-line) !important;
  border-color: var(--iv-dark-line-strong) !important;
}

body.iv2026-shell.dark-mode :where(.apexcharts-text, .c3 text, .chart text) {
  fill: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode :where(.apexcharts-gridline, .c3-grid line) {
  stroke: var(--iv-dark-line) !important;
}

/* Tooltips and popovers */
body.iv2026-shell.dark-mode :where(.tooltip-inner, .tooltiptext, .iv-tooltip, .ivcareer-tooltip) {
  color: #fff !important;
  background: #050b14 !important;
  border-color: #32445f !important;
  box-shadow: 0 12px 30px rgba(0, 0, 0, .42) !important;
}

body.iv2026-shell.dark-mode :where(.tooltip-inner, .tooltiptext, .iv-tooltip, .ivcareer-tooltip) :where(span, p, strong, small) {
  color: #fff !important;
}

/* Focus is visible on both themes. */
body.iv2026-shell.dark-mode :where(a, button, input, select, textarea, [tabindex]):focus-visible {
  outline: 3px solid rgba(117, 178, 255, .55);
  outline-offset: 2px;
}

body.iv2026-shell.dark-mode ::-webkit-scrollbar-thumb {
  background: #3b4d68;
  border: 3px solid var(--iv-dark-canvas);
}

body.iv2026-shell.dark-mode ::-webkit-scrollbar-track {
  background: var(--iv-dark-canvas);
}

/* Authenticated routes - complete the dark treatment for late inline styles.
 * Several legacy modules print their page CSS after the shared stylesheet, so
 * these rules intentionally use scoped selectors and !important. */
html:has(body.iv2026-shell.dark-mode) {
  color-scheme: dark;
  background: #08111f;
  scrollbar-color: #3b4d68 #08111f;
}

html:has(body.iv2026-shell.dark-mode)::-webkit-scrollbar-track,
body.iv2026-shell.dark-mode::-webkit-scrollbar-track {
  background: #08111f;
}

html:has(body.iv2026-shell.dark-mode)::-webkit-scrollbar-thumb,
body.iv2026-shell.dark-mode::-webkit-scrollbar-thumb {
  background: #3b4d68;
  border: 3px solid #08111f;
}

body.iv2026-shell.dark-mode .iv-notification-counter {
  color: #fff !important;
  background: #b52340 !important;
}

/* Home diary */
body.iv2026-shell.dark-mode .ivhome-logbook-open {
  color: #bcdcff !important;
  background: linear-gradient(145deg, #14283f, #1a334e) !important;
  border-color: #3b5673 !important;
}

body.iv2026-shell.dark-mode .ivhome-logbook-open::before,
body.iv2026-shell.dark-mode .ivhome-logbook-open::after {
  background: #13253a !important;
  box-shadow: inset 0 0 0 1px #3b5673 !important;
}

body.iv2026-shell.dark-mode .ivhome-logbook-open > span {
  color: #bcdcff !important;
}

body.iv2026-shell.dark-mode .ivhome-logbook-metrics article {
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivhome-logbook-metrics strong {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivhome-logbook-metrics span {
  color: var(--iv-dark-text) !important;
}

body.iv2026-shell.dark-mode .ivhome-logbook-metrics small {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .ivhome-logbook-metrics article > i {
  color: var(--iv-dark-blue) !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
  box-shadow: none !important;
}

body.iv2026-shell.dark-mode .ivhome-logbook-metrics article:nth-child(3) > i {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
  border-color: #2b6c5a !important;
}

body.iv2026-shell.dark-mode .ivhome-logbook-open:is(:hover, :focus-visible) {
  color: #f4f9ff !important;
  background: rgba(98, 197, 236, 0.14) !important;
  border-color: #4b78aa !important;
}

body.iv2026-shell.dark-mode .ivhome-logbook-open:is(:hover, :focus-visible) :where(span, i) {
  color: #fff !important;
}

body.iv2026-shell.dark-mode .ivps-attempt-score,
body.iv2026-shell.dark-mode .ive-person-copy a,
body.iv2026-shell.dark-mode .ivt-person-copy a,
body.iv2026-shell.dark-mode .ivd-person-copy a {
  color: #8fc0ff !important;
}

body.iv2026-shell.dark-mode :where(.ive-person-copy, .ivt-person-copy, .ivd-person-copy) a:is(:hover, :focus-visible) {
  color: #d8ebff !important;
}

body.iv2026-shell.dark-mode .ivh-record-body h3 a:is(:hover, :focus-visible) {
  color: #8fc0ff !important;
}

/* Fly now and activity state chips */
body.iv2026-shell.dark-mode .ivo-page .ivo-pill-plan,
body.iv2026-shell.dark-mode .ivo-page .ivo-pill-neutral {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .ivo-page .ivo-pill-live,
body.iv2026-shell.dark-mode .iva-page .iva-joined {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
  border-color: #2b6c5a !important;
}

body.iv2026-shell.dark-mode .iva-page :where(.iva-card-eyebrow, .iva-tour-route) {
  color: #c7e0ff !important;
}

/* Event and tour content printed by late inline styles. */
body.iv2026-shell.dark-mode .ive-page :where(.ive-panel, .ive-facts, .ive-person) :where(h2, h3, strong, a:not(.ive-btn)),
body.iv2026-shell.dark-mode .ivt-page :where(.ivt-panel, .ivt-leg, .ivt-person) :where(h2, h3, strong, a:not(.ivt-btn)) {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ive-page :where(.ive-panel, .ive-facts, .ive-person) :where(p, small),
body.iv2026-shell.dark-mode .ivt-page :where(.ivt-panel, .ivt-leg, .ivt-person) :where(p, small) {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode :where(.ive-page .ive-avatar, .ive-page .ive-count) {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .ive-page .ive-btn.secondary {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-raised) !important;
  border-color: var(--iv-dark-line-strong) !important;
}

body.iv2026-shell.dark-mode .ivt-page .ivt-leg-state {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .ivt-page .ivt-leg.completed .ivt-leg-state {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
  border-color: #2b6c5a !important;
}

/* Flight Campaigns */
body.iv2026-shell.dark-mode .ivc-page .ivc-state.locked,
body.iv2026-shell.dark-mode .ivcd-page .ivcd-task-state.locked {
  color: var(--iv-dark-muted) !important;
  background: var(--iv-dark-surface-raised) !important;
  border-color: var(--iv-dark-line-strong) !important;
}

body.iv2026-shell.dark-mode .ivc-page .ivc-state.enrolled,
body.iv2026-shell.dark-mode .ivcd-page .ivcd-task-state.complete {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
  border-color: #2b6c5a !important;
}

body.iv2026-shell.dark-mode .ivcd-page .ivcd-task-state.running {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .ivcd-page .ivcd-task-state.available {
  color: #ffe7ad !important;
  background: #473818 !important;
  border-color: #765b2a !important;
}

body.iv2026-shell.dark-mode .ivcd-page .ivcd-task-state.ready {
  color: #fff1c7 !important;
  background: #5b451a !important;
  border-color: #947126 !important;
}

body.iv2026-shell.dark-mode .ivcd-page .ivcd-task-pin.required {
  color: var(--iv-dark-amber) !important;
  background: var(--iv-dark-amber-soft) !important;
  border-color: #785d2c !important;
}

body.iv2026-shell.dark-mode .ivc-page .ivc-card :where(h2, h3, strong, a),
body.iv2026-shell.dark-mode .ivcd-page :where(.ivcd-task, .ivcd-mission-panel, .ivcd-active-card, .ivcd-slot-card) :where(h2, h3, strong, a:not(.ivcd-btn)) {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivc-page .ivc-card :where(p, small, span:not(.ivc-state)),
body.iv2026-shell.dark-mode .ivcd-page :where(.ivcd-task, .ivcd-mission-panel, .ivcd-active-card, .ivcd-slot-card) :where(p, small) {
  color: var(--iv-dark-muted) !important;
}

/* Flight list and detail */
body.iv2026-shell.dark-mode .iv26 .ivlog-id,
body.iv2026-shell.dark-mode .ivrank .ivrank-aircraft-body a strong {
  color: var(--iv-dark-blue) !important;
}

body.iv2026-shell.dark-mode .ivl .ivl-phase-heading strong {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivl :where(.ivl-card-badge, .ivl-leg-number),
body.iv2026-shell.dark-mode .ivh-card-badge {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

/* Career, profile and account settings */
body.iv2026-shell.dark-mode .ivcareer :where(.ivcareer-requirement-head strong, .ivcareer-hero-readouts strong) {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivcareer .ivcareer-milestones b {
  color: #c7e0ff !important;
}

body.iv2026-shell.dark-mode .iv-profile :where(.iv-profile__section-head h2, .iv-profile__flight a, .iv-profile__card strong) {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .iv-profile .iv-profile__section-count {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .iv-profile .iv-profile__flight-status--accepted {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
  border-color: #2b6c5a !important;
}

body.iv2026-shell.dark-mode .iv-profile .iv-profile__section-kicker,
body.iv2026-shell.dark-mode .iv-settings .iv-settings__section-kicker {
  color: var(--iv-dark-blue) !important;
}

body.iv2026-shell.dark-mode .iv-settings .iv-settings__email-option-copy strong {
  color: var(--iv-dark-heading) !important;
  font-weight: 700 !important;
}

body.iv2026-shell.dark-mode .iv-settings .iv-settings__email-option-copy small {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .iv-settings .iv-settings__email-option-icon.is-red {
  color: #ff9eae !important;
  background: #3c202b !important;
}

body.iv2026-shell.dark-mode .iv-settings .iv-settings__email-option-icon.is-blue {
  color: #8fd0ff !important;
  background: #163b55 !important;
}

body.iv2026-shell.dark-mode .iv-settings .iv-settings__email-option-icon.is-gold {
  color: #ffd47c !important;
  background: #3d321c !important;
}

body.iv2026-shell.dark-mode .iv-settings .iv-settings__email-option-icon.is-violet {
  color: #c5b9ff !important;
  background: #2d294d !important;
}

body.iv2026-shell.dark-mode .iv-settings .iv-settings__email-option-icon.is-green {
  color: #7ce0bb !important;
  background: #193c34 !important;
}

body.iv2026-shell.dark-mode .iv-settings .iv-settings__email-option-icon.is-cyan {
  color: #79dcf3 !important;
  background: #173a49 !important;
}

/* Downloads */
body.iv2026-shell.dark-mode .ivdl-shell .ivdl-flight-recorder {
  border-color: #416887 !important;
  background:
    radial-gradient(circle at 86% 10%, rgba(67, 193, 231, .14), transparent 32%),
    linear-gradient(145deg, rgba(8, 25, 43, .98), rgba(12, 45, 68, .97)) !important;
}

body.iv2026-shell.dark-mode .ivdl-shell .ivdl-recorder-route,
body.iv2026-shell.dark-mode .ivdl-shell .ivdl-recorder-data {
  border-color: #2e5875 !important;
  background-color: rgba(7, 24, 39, .7) !important;
}

body.iv2026-shell.dark-mode .ivdl-shell .ivdl-recorder-data span,
body.iv2026-shell.dark-mode .ivdl-shell .ivdl-recorder-foot {
  color: #9fb8cb !important;
}

body.iv2026-shell.dark-mode .ivdl-shell .ivdl-recorder-data strong,
body.iv2026-shell.dark-mode .ivdl-shell .ivdl-recorder-title {
  color: #f1f8ff !important;
}

body.iv2026-shell.dark-mode .ivdl-shell .ivdl-integration-badge {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .ivdl-shell .ivdl-state-ready {
  color: #baf3df !important;
  background: #123d34 !important;
  border-color: #2f765f !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, .05), 0 0 0 3px rgba(46, 201, 151, .07) !important;
}

body.iv2026-shell.dark-mode .ivdl-shell .ivdl-state-ready > i {
  color: #4de0aa !important;
  background: currentColor !important;
  box-shadow: 0 0 0 3px rgba(77, 224, 170, .14) !important;
}

body.iv2026-shell.dark-mode .ivdl-shell .ivdl-state-external {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .ivdl-shell .ivdl-state-planned {
  color: var(--iv-dark-amber) !important;
  background: var(--iv-dark-amber-soft) !important;
  border-color: #785d2c !important;
}

body.iv2026-shell.dark-mode .ivdl-shell .ivdl-state-archived {
  color: #c8d5e8 !important;
  background: #223149 !important;
  border-color: #3e526f !important;
}

/* Activity archive and memory */
body.iv2026-shell.dark-mode .ivh-page .ivh-year,
body.iv2026-shell.dark-mode :where(.ivd-page .ivd-avatar, .ivd-page .ivd-count) {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .ivd-page .ivd-panel :where(h2, h3, strong, a) {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivd-page .ivd-panel :where(p, small) {
  color: var(--iv-dark-muted) !important;
}

/* Points ledger */
body.iv2026-shell.dark-mode .ivpoints {
  --ivp-ink: var(--iv-dark-text);
  --ivp-muted: var(--iv-dark-muted);
  --ivp-line: var(--iv-dark-line);
  color: var(--iv-dark-text) !important;
}

body.iv2026-shell.dark-mode .ivpoints :where(
  .ivpoints-guide,
  .ivpoints-examples,
  .ivpoints-examples-toggle,
  .ivpoints-examples-panel,
  .ivpoints-example,
  .ivpoints-tools,
  .ivpoints-row,
  .ivpoints-empty
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  background-image: none !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivpoints :where(
  .ivpoints-conversion,
  .ivpoints-quarter-case,
  .ivpoints-search,
  .ivpoints-year,
  .ivpoints-row-icon
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  background-image: none !important;
  border-color: var(--iv-dark-line-strong) !important;
}

body.iv2026-shell.dark-mode .ivpoints :where(
  .ivpoints-conversion strong,
  .ivpoints-examples-toggle strong,
  .ivpoints-example-equation,
  .ivpoints-quarter-title,
  .ivpoints-quarter-copy > strong,
  .ivpoints-quarter-case strong,
  .ivpoints-ledger-title h2,
  .ivpoints-month-name h3,
  .ivpoints-row h3,
  .ivpoints-empty strong
) {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivpoints :where(
  .ivpoints-conversion span,
  .ivpoints-examples-toggle span,
  .ivpoints-example p,
  .ivpoints-quarter-legend,
  .ivpoints-quarter-case,
  .ivpoints-quarter-case em,
  .ivpoints-ledger-count,
  .ivpoints-month-name span,
  .ivpoints-date,
  .ivpoints-route,
  .ivpoints-empty span
) {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .ivpoints :where(
  .ivpoints-conversion > i,
  .ivpoints-examples-toggle > i,
  .ivpoints-filter[aria-pressed="true"]
) {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .ivpoints .ivpoints-filter:not([aria-pressed="true"]) {
  color: var(--iv-dark-text) !important;
  background: transparent !important;
}

body.iv2026-shell.dark-mode .ivpoints .ivpoints-month-total strong,
body.iv2026-shell.dark-mode .ivpoints .ivpoints-source {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
}

body.iv2026-shell.dark-mode .ivpoints :where(.ivpoints-amount, .ivpoints-detail) {
  color: var(--iv-dark-green) !important;
}

body.iv2026-shell.dark-mode .ivpoints .ivpoints-row.is-spent :where(.ivpoints-amount, .ivpoints-detail) {
  color: var(--iv-dark-blue) !important;
}

/* Pilot Skill */
body.iv2026-shell.dark-mode .ivskill {
  --ivs-ink: var(--iv-dark-text);
  --ivs-muted: var(--iv-dark-muted);
  --ivs-line: var(--iv-dark-line);
  --ivs-blue: var(--iv-dark-blue);
  color: var(--iv-dark-text) !important;
}

body.iv2026-shell.dark-mode .ivskill :where(
  .ivskill-section,
  .ivskill-ranking-meta,
  .ivskill-counter,
  .ivskill-tie-trigger,
  .ivskill-podium-card,
  .ivskill-list-row,
  .ivskill-history-month,
  .ivskill-history-archive
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  background-image: none !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivskill :where(
  .ivskill-list-row.is-current,
  .ivskill-podium-metrics span,
  .ivskill-tiebreak span,
  .ivskill-history-entry b,
  .ivskill-avatar-shell
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  background-image: none !important;
  border-color: var(--iv-dark-line-strong) !important;
}

body.iv2026-shell.dark-mode .ivskill :where(
  .ivskill-title h2,
  .ivskill-pilot strong,
  .ivskill-history-month > strong,
  .ivskill-history-pilot strong,
  .ivskill-counter strong,
  .ivskill-podium-metrics strong
) {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivskill :where(
  .ivskill-section-note,
  .ivskill-list-head,
  .ivskill-pilot span,
  .ivskill-value small,
  .ivskill-podium-metrics small,
  .ivskill-history-score small
) {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .ivskill :where(.ivskill-title > i, .ivskill-rank) {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
}

body.iv2026-shell.dark-mode .ivskill .ivskill-state {
  color: var(--iv-dark-amber) !important;
  background: var(--iv-dark-amber-soft) !important;
  border-color: #785d2c !important;
}

body.iv2026-shell.dark-mode .ivskill .ivskill-state.is-qualified {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
  border-color: #2b6c5a !important;
}

body.iv2026-shell.dark-mode .ivskill :where(.ivskill-value strong, .ivskill-history-score em, .ivskill-tiebreak i) {
  color: var(--iv-dark-blue) !important;
}

/* Flight Passport keeps its document identity in dark mode without retaining
 * paper-white panels or dark ink on dark surfaces. */
body.iv2026-shell.dark-mode .ivfp-command .fp-nav-item.is-active {
  color: var(--iv-dark-heading) !important;
  background: linear-gradient(145deg, #1d426c, #1a2c48) !important;
  box-shadow: inset 0 -3px 0 #e18b96 !important;
}

body.iv2026-shell.dark-mode .ivfp-command .fp-nav-item.is-active :where(.fp-nav-copy, .fp-nav-copy span) {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivfp-command .fp-nav-item.is-active .fp-nav-copy small {
  color: #bfd8f5 !important;
}

body.iv2026-shell.dark-mode .ivfp-command .fp-nav-item.is-active .fp-nav-ico {
  color: #ffd6db !important;
  background: rgba(225, 139, 150, .14) !important;
  border-color: rgba(225, 139, 150, .42) !important;
}

body.iv2026-shell.dark-mode .ivfp-page .ivfp-passport-id {
  color: var(--iv-dark-text) !important;
  background: linear-gradient(145deg, #1a2b43, #121e31) !important;
  border-color: #3a4e6b !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035) !important;
}

body.iv2026-shell.dark-mode .ivfp-page .ivfp-passport-photo {
  background: #23344c !important;
  border-color: #526681 !important;
}

body.iv2026-shell.dark-mode .ivfp-page .ivfp-passport-id .ivfp-id-copy > span {
  color: #e2c980 !important;
}

body.iv2026-shell.dark-mode .ivfp-page .ivfp-passport-id strong {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivfp-page .ivfp-passport-id small {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .ivfp-page .ivfp-passport-id .ivfp-id-number {
  color: rgba(226, 201, 128, .58) !important;
}

body.iv2026-shell.dark-mode .ivfp-page .ivfp-progress-card {
  color: var(--iv-dark-text) !important;
  background: linear-gradient(145deg, #172a44, #111d30) !important;
  border-color: #3a4e6b !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035) !important;
}

body.iv2026-shell.dark-mode .ivfp-progress-copy span {
  color: #e2c980 !important;
}

body.iv2026-shell.dark-mode .ivfp-progress-copy strong,
body.iv2026-shell.dark-mode .ivfp-progress-dial strong {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivfp-progress-copy small,
body.iv2026-shell.dark-mode .ivfp-progress-dial small {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .ivfp-progress-dial {
  background:
    radial-gradient(circle at center, #142238 0 55%, transparent 56%),
    conic-gradient(#e18b96 calc(var(--ivfp-progress) * 1%), #34465f 0) !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .08), 0 7px 20px rgba(0, 0, 0, .24) !important;
}

body.iv2026-shell.dark-mode .ivfp-wingman-visa {
  color: var(--iv-dark-text) !important;
  background: linear-gradient(100deg, rgba(88, 101, 242, .2), #17233a 38%, #111d30) !important;
  border-color: #465a9c !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .035) !important;
}

body.iv2026-shell.dark-mode .ivfp-wingman-visa.is-earned {
  background: linear-gradient(100deg, rgba(31, 157, 112, .2), #172d35 38%, #111d30) !important;
  border-color: #2f715e !important;
}

body.iv2026-shell.dark-mode .ivfp-wingman-visa:is(.is-pending, .is-processing) {
  background: linear-gradient(100deg, rgba(205, 157, 52, .2), #2b2a25 38%, #111d30) !important;
  border-color: #765e32 !important;
}

body.iv2026-shell.dark-mode .ivfp-wingman-seal {
  color: #aeb7ff !important;
  background: #1b2943 !important;
  border-color: #6673df !important;
  box-shadow: inset 0 0 0 5px rgba(88, 101, 242, .1), 0 7px 18px rgba(0, 0, 0, .28) !important;
}

body.iv2026-shell.dark-mode .ivfp-wingman-copy h2,
body.iv2026-shell.dark-mode .ivfp-wingman-goal strong,
body.iv2026-shell.dark-mode .ivfp-wingman-reward strong {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivfp-wingman-copy p,
body.iv2026-shell.dark-mode .ivfp-wingman-goal > small,
body.iv2026-shell.dark-mode .ivfp-wingman-reward small {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .ivfp-wingman-status {
  color: #c7cdff !important;
  background: rgba(88, 101, 242, .22) !important;
}

body.iv2026-shell.dark-mode .is-earned .ivfp-wingman-status {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
}

body.iv2026-shell.dark-mode :is(.is-pending, .is-processing) .ivfp-wingman-status {
  color: var(--iv-dark-amber) !important;
  background: var(--iv-dark-amber-soft) !important;
}

body.iv2026-shell.dark-mode .ivfp-wingman-reward {
  background: linear-gradient(135deg, #1e2c48, #19243b) !important;
  border-color: #3a4d70 !important;
  box-shadow: 0 7px 18px rgba(0, 0, 0, .2) !important;
}

body.iv2026-shell.dark-mode .ivfp-wingman-help {
  color: #cbd1ff !important;
  background: #1f2c49 !important;
  border-color: #6673df !important;
}

body.iv2026-shell.dark-mode .ivfp-wingman-action > a {
  color: #dce1ff !important;
  background: #202f52 !important;
  border-color: #5365b7 !important;
}

body.iv2026-shell.dark-mode .ivfp-wingman-action > a:hover {
  color: #fff !important;
  background: #2a3d69 !important;
  border-color: #7080db !important;
}

body.iv2026-shell.dark-mode .ivfp-page .passport-stamp {
  color: var(--iv-dark-text) !important;
}

body.iv2026-shell.dark-mode .ivfp-page .passport-title {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivfp-page .passport-sub {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .ivfp-page .passport-stamp.is-earned {
  color: var(--iv-dark-text) !important;
  background: linear-gradient(145deg, #1a302f, #16253b) !important;
  border-color: #347760 !important;
  box-shadow: 0 10px 23px rgba(0, 0, 0, .24), inset 0 0 30px rgba(98, 223, 182, .035) !important;
}

body.iv2026-shell.dark-mode .ivfp-page .passport-stamp.is-earned::before {
  border-color: rgba(207, 222, 244, .68) !important;
  mix-blend-mode: normal !important;
  box-shadow: 0 0 0 2px rgba(207, 222, 244, .1), 0 8px 18px rgba(0, 0, 0, .28), inset 0 0 16px rgba(207, 222, 244, .12), inset 0 0 0 14px rgba(207, 222, 244, .08), inset 0 0 0 32px rgba(207, 222, 244, .04) !important;
}

body.iv2026-shell.dark-mode .ivfp-page .passport-stamp.is-earned::after {
  opacity: .56 !important;
  filter: invert(1) sepia(.08) saturate(.72) brightness(1.16) !important;
  mix-blend-mode: normal !important;
}

body.iv2026-shell.dark-mode .ivfp-page .passport-stamp.is-earned .stamp-logo {
  background: radial-gradient(circle at 30% 30%, rgba(255, 255, 255, .18), transparent 45%), radial-gradient(circle at 70% 75%, rgba(20, 37, 59, .2), transparent 55%), repeating-linear-gradient(18deg, rgba(20, 37, 59, .1) 0 1px, transparent 1px 7px), rgba(207, 222, 244, .84) !important;
  opacity: .76 !important;
  filter: contrast(1.08) !important;
  mix-blend-mode: normal !important;
}

body.iv2026-shell.dark-mode .ivfp-page :where(.stamp-name, .stamp-rules summary) {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivfp-page :where(.stamp-desc, .stamp-rules ul) {
  color: #c7d4e5 !important;
}

body.iv2026-shell.dark-mode .ivfp-page .ivfp-earned-date {
  color: #7ce9c2 !important;
}

body.iv2026-shell.dark-mode .ivfp-page .stamp-rules {
  border-top-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivfp-page .stamp-status {
  color: #c8d5e8 !important;
  background: #223149 !important;
  border-color: #3e526f !important;
}

body.iv2026-shell.dark-mode .ivfp-page .passport-stamp.is-earned .stamp-status {
  color: var(--iv-dark-green) !important;
  background: var(--iv-dark-green-soft) !important;
  border-color: #2f715e !important;
}

body.iv2026-shell.dark-mode .ivfp-page .ivfp-podium-passport {
  color: var(--iv-dark-text) !important;
  background: linear-gradient(135deg, #1a293f, #121d30) !important;
  border-right-color: var(--iv-dark-line) !important;
  border-bottom-color: var(--iv-dark-line) !important;
  border-left-color: var(--iv-dark-line) !important;
  box-shadow: 0 14px 30px rgba(0, 0, 0, .28) !important;
}

body.iv2026-shell.dark-mode .ivfp-page .ivfp-podium-passport.is-place-1 {
  background: linear-gradient(135deg, #342e20, #17243a 62%) !important;
  border-top-color: #c49b35 !important;
}

body.iv2026-shell.dark-mode .ivfp-page .ivfp-podium-passport.is-place-2 {
  background: linear-gradient(135deg, #263143, #152137 62%) !important;
  border-top-color: #8f9aa8 !important;
}

body.iv2026-shell.dark-mode .ivfp-page .ivfp-podium-passport.is-place-3 {
  background: linear-gradient(135deg, #332923, #17243a 62%) !important;
  border-top-color: #ac704c !important;
}

body.iv2026-shell.dark-mode .ivfp-page .ivfp-podium-passport:hover {
  color: var(--iv-dark-heading) !important;
  border-right-color: var(--iv-dark-line-strong) !important;
  border-bottom-color: var(--iv-dark-line-strong) !important;
  border-left-color: var(--iv-dark-line-strong) !important;
}

body.iv2026-shell.dark-mode .ivfp-page .ivfp-podium-passport > img {
  border-color: var(--iv-dark-line-strong) !important;
  box-shadow: 0 7px 17px rgba(0, 0, 0, .3) !important;
}

body.iv2026-shell.dark-mode .ivfp-page :where(
  .ivfp-podium-name strong,
  .ivfp-podium-total strong
) {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivfp-page :where(
  .ivfp-podium-name small,
  .ivfp-podium-total small,
  .ivfp-podium-caption
) {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .ivfp-page .ivfp-podium-rank {
  color: #c5d2e3 !important;
  background: #202e43 !important;
  border-color: #435672 !important;
}

body.iv2026-shell.dark-mode .ivfp-page .ivfp-podium-rank strong {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivfp-page .is-place-1 .ivfp-podium-rank {
  color: #f1d47c !important;
  background: linear-gradient(145deg, #45391e, #2d2d2b) !important;
  border-color: #7e6832 !important;
}

body.iv2026-shell.dark-mode .ivfp-page .is-place-1 .ivfp-podium-rank strong {
  color: #ffe59d !important;
}

body.iv2026-shell.dark-mode .ivfp-page .is-place-2 .ivfp-podium-rank {
  color: #d4dde8 !important;
  background: linear-gradient(145deg, #303b4b, #222c3b) !important;
  border-color: #5b6b80 !important;
}

body.iv2026-shell.dark-mode .ivfp-page .is-place-3 .ivfp-podium-rank {
  color: #efb28f !important;
  background: linear-gradient(145deg, #453027, #2d2829) !important;
  border-color: #78503f !important;
}

body.iv2026-shell.dark-mode .ivfp-page .is-place-3 .ivfp-podium-rank strong {
  color: #ffc19c !important;
}

body.iv2026-shell.dark-mode .ivfp-page .ivfp-podium-week {
  background: #304159 !important;
}

body.iv2026-shell.dark-mode .ivfp-airports-btn {
  color: #dceaff !important;
  background: #1b3558 !important;
  border-color: #416896 !important;
}

body.iv2026-shell.dark-mode .ivfp-airports-btn:hover {
  color: #fff !important;
  background: #244a78 !important;
  border-color: #75b2ff !important;
}

body.iv2026-shell.dark-mode .ivfp-debrief-view .ivfp-debrief-more-btn {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivfp-debrief-view .ivfp-debrief-more {
  color: var(--iv-dark-text) !important;
  background: linear-gradient(180deg, #16243a, #111d30) !important;
  border-top-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivfp-debrief-view .ivfp-debrief-more-btn span {
  color: var(--iv-dark-text) !important;
}

body.iv2026-shell.dark-mode .ivfp-debrief-view .ivfp-debrief-more-btn small {
  color: var(--iv-dark-blue) !important;
  background: var(--iv-dark-blue-soft) !important;
}

body.iv2026-shell.dark-mode .iv-pilots .page-item.disabled .page-link {
  color: #9aabc0 !important;
  background: var(--iv-dark-surface) !important;
}

/* The notification centre is rendered in the header and therefore stays
 * outside most page-specific dark-mode scopes. Treat the entire dropdown as
 * one coherent surface, including its filters, unread rows and empty state. */
body.iv2026-shell.dark-mode .iv-notification-menu {
  border-color: var(--iv-dark-line) !important;
  background: var(--iv-dark-surface) !important;
  box-shadow: 0 24px 60px rgba(0, 0, 0, .48) !important;
}

body.iv2026-shell.dark-mode .iv-notification-filters,
body.iv2026-shell.dark-mode .iv-notification-list,
body.iv2026-shell.dark-mode .iv-notification-empty,
body.iv2026-shell.dark-mode .iv-notification-footer-link {
  border-color: var(--iv-dark-line) !important;
  background: var(--iv-dark-surface) !important;
}

body.iv2026-shell.dark-mode .iv-notification-filters button {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .iv-notification-filters button span {
  color: #d8e4f3 !important;
  background: var(--iv-dark-surface-raised) !important;
}

body.iv2026-shell.dark-mode .iv-notification-filters button:hover,
body.iv2026-shell.dark-mode .iv-notification-filters button:focus-visible {
  color: var(--iv-dark-heading) !important;
  background: var(--iv-dark-blue-soft) !important;
}

body.iv2026-shell.dark-mode .iv-notification-filters button.is-active {
  border-color: #4979b8 !important;
  color: var(--iv-dark-heading) !important;
  background: var(--iv-dark-blue-soft) !important;
  box-shadow: none !important;
}

body.iv2026-shell.dark-mode .iv-notification-filters button.is-active span {
  color: #fff !important;
  background: #1f67c1 !important;
}

body.iv2026-shell.dark-mode .iv-notification-item {
  border-color: transparent !important;
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
}

body.iv2026-shell.dark-mode .iv-notification-item.is-unread {
  border-color: #345f96 !important;
  background: linear-gradient(100deg, #142e51 0%, #17283f 74%, #121d30 100%) !important;
}

body.iv2026-shell.dark-mode .iv-notification-item:hover,
body.iv2026-shell.dark-mode .iv-notification-item:focus-visible {
  border-color: #4f78ad !important;
  color: var(--iv-dark-heading) !important;
  background: var(--iv-dark-surface-raised) !important;
}

body.iv2026-shell.dark-mode .iv-notification-item.is-read .iv-notification-icon {
  color: #b5c4d8 !important;
  background: var(--iv-dark-surface-raised) !important;
}

body.iv2026-shell.dark-mode .iv-notification-icon > span {
  border-color: #142e51 !important;
}

body.iv2026-shell.dark-mode .iv-notification-meta,
body.iv2026-shell.dark-mode .iv-notification-message,
body.iv2026-shell.dark-mode .iv-notification-date,
body.iv2026-shell.dark-mode .iv-notification-arrow,
body.iv2026-shell.dark-mode .iv-notification-empty,
body.iv2026-shell.dark-mode .iv-notification-empty span {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .iv-notification-copy strong,
body.iv2026-shell.dark-mode .iv-notification-empty strong {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .iv-notification-new-label {
  color: #d8eaff !important;
  background: #245890 !important;
}

body.iv2026-shell.dark-mode .iv-notification-date i,
body.iv2026-shell.dark-mode .iv-notification-footer-link {
  color: var(--iv-dark-blue) !important;
}

body.iv2026-shell.dark-mode .iv-notification-empty i {
  color: var(--iv-dark-blue) !important;
  background: var(--iv-dark-blue-soft) !important;
}

body.iv2026-shell.dark-mode .iv-notification-footer-link:hover,
body.iv2026-shell.dark-mode .iv-notification-footer-link:focus-visible {
  color: #c7e0ff !important;
  background: var(--iv-dark-surface-raised) !important;
}

body.iv2026-shell.dark-mode .ivhome-pilot-label strong {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivhome-pilot-label p {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .ivhome-pilot-label small {
  color: var(--iv-dark-blue) !important;
}

/* Detail-page confirmations are declared inside the page templates, after the
 * shared styles. Keep the selectors specific enough to win over those local
 * declarations in dark mode. */
body.iv2026-shell.dark-mode .page.ive-page .ive-modal.open .ive-modal-card h2,
body.iv2026-shell.dark-mode .page.ivt-page .ivt-modal.open .ivt-modal-card h2 {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .page.ive-page .ive-modal.open .ive-modal-card p,
body.iv2026-shell.dark-mode .page.ivt-page .ivt-modal.open .ivt-modal-card p {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .page.ivt-page .ivt-modal.open .ivt-modal-card p strong {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivfp-airports-modal .modal-content,
body.iv2026-shell.dark-mode .ivfp-airports-modal .modal-header,
body.iv2026-shell.dark-mode .ivfp-airports-modal .modal-body,
body.iv2026-shell.dark-mode .ivfp-airports-modal .modal-footer {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivfp-airports-modal :where(
  .ivfp-airports-modal-heading p,
  .ivfp-airports-summary span,
  .modal-footer > span
) {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .ivfp-airports-modal :where(
  .modal-title,
  .ivfp-airports-summary strong,
  .fp-icao-chip .mono
) {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivfp-airports-modal .fp-icao-chip {
  color: var(--iv-dark-heading) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivfp-airports-modal .ivfp-airports-modal-icon {
  color: var(--iv-dark-red) !important;
  background: linear-gradient(145deg, #4a2430, #2d2232) !important;
  border-color: #7c4355 !important;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .045) !important;
}

body.iv2026-shell.dark-mode .ivfp-airports-modal .ivfp-airports-modal-icon > i {
  color: inherit !important;
}

body.iv2026-shell.dark-mode .ivfp-airports-modal :where(
  .ivfp-airports-modal-x,
  .ivfp-airports-close-btn
) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-raised) !important;
  border-color: var(--iv-dark-line-strong) !important;
}

body.iv2026-shell.dark-mode .ivps-action.is-secondary {
  color: #fff !important;
}

body.iv2026-shell.dark-mode .ivcareer .ivps-action.is-secondary,
body.iv2026-shell.dark-mode .ivcareer button.ivps-action.is-secondary,
body.iv2026-shell.dark-mode .ivcareer .ivps-dialog .ivps-action.is-secondary {
  color: #fff !important;
}

/* Second pass for nested content rendered below the main cards. */
body.iv2026-shell.dark-mode .ive-page .ive-step {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ive-page .ive-step strong {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ive-page .ive-step p {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .ivt-page .ivt-leg-meetup-chip {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .ivt-page .ivt-leg-meetup-chip :where(span, strong, i) {
  color: #c7e0ff !important;
}

body.iv2026-shell.dark-mode :where(.ivt-page .ivt-avatar, .ivt-page .ivt-count) {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .ivcd-page .ivcd-task-criterion {
  color: var(--iv-dark-muted) !important;
  background: var(--iv-dark-surface-soft) !important;
  border-color: var(--iv-dark-line) !important;
}

body.iv2026-shell.dark-mode .ivcd-page .ivcd-task-criterion strong {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivcd-page .ivcd-task.completed .ivcd-task-criterion {
  background: var(--iv-dark-green-soft) !important;
  border-color: #2b6c5a !important;
}

body.iv2026-shell.dark-mode .ivlog-page .ivlog-id,
body.iv2026-shell.dark-mode .ivrank .ivrank-unlock-grid a strong {
  color: var(--iv-dark-blue) !important;
}

body.iv2026-shell.dark-mode .ivl .ivl-recorder-segment strong {
  color: var(--iv-dark-muted) !important;
}

body.iv2026-shell.dark-mode .ivl .ivl-recorder-segment.is-current strong,
body.iv2026-shell.dark-mode .ivl .ivl-recorder-segment.is-complete strong {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivcareer .ivcareer-participation-count strong {
  color: var(--iv-dark-green) !important;
}

body.iv2026-shell.dark-mode .ivskill .ivskill-empty strong {
  color: var(--iv-dark-heading) !important;
}

body.iv2026-shell.dark-mode .ivh-page :where(.ivh-btn.on-dark, .ivh-btn.subtle) {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-raised) !important;
  border-color: var(--iv-dark-line-strong) !important;
}

body.iv2026-shell.dark-mode .ivh-page .ivh-memory-link {
  color: var(--iv-dark-blue) !important;
}

body.iv2026-shell.dark-mode .ivd-page .ivd-jump a {
  color: var(--iv-dark-text) !important;
}

body.iv2026-shell.dark-mode .ivt-page .ivt-btn.secondary {
  color: var(--iv-dark-text) !important;
  background: var(--iv-dark-surface-raised) !important;
  border-color: var(--iv-dark-line-strong) !important;
}

body.iv2026-shell.dark-mode .ivcd-page .ivcd-task-pin {
  color: var(--iv-dark-amber) !important;
  background: var(--iv-dark-amber-soft) !important;
  border-color: #785d2c !important;
}

body.iv2026-shell.dark-mode .ivcd-page .ivcd-count {
  color: #c7e0ff !important;
  background: var(--iv-dark-blue-soft) !important;
  border-color: #3a6798 !important;
}

body.iv2026-shell.dark-mode .ivcd-page :where(.ivcd-person-score strong, .ivcd-person-code-inline) {
  color: var(--iv-dark-blue) !important;
}

@media (prefers-reduced-motion: reduce) {
  body.iv2026-shell.dark-mode *,
  body.iv2026-shell.dark-mode *::before,
  body.iv2026-shell.dark-mode *::after {
    scroll-behavior: auto !important;
  }
}

/* Light mode readability layer.
 * Several modern templates intentionally use quiet secondary text. The
 * original palette was too pale on white and ice-blue panels, especially at
 * 11-13px. Keep the hierarchy, but use one readable secondary tone across
 * connected page families. */
body.iv2026-shell:not(.dark-mode) {
  --iv-light-readable: #52657a;
  --iv-light-readable-strong: #425870;
}

body.iv2026-shell:not(.dark-mode) .iv-notification-counter {
  color: #fff !important;
  background: #bd2944 !important;
}

body.iv2026-shell:not(.dark-mode) .ivhome-arrivals-board :where(small, .ivhome-arrival-mode) {
  color: var(--iv-light-readable) !important;
}

body.iv2026-shell:not(.dark-mode) .ivo-page .ivo-mission-type,
body.iv2026-shell:not(.dark-mode) .ivrank .ivrank-rank-state.is-reached,
body.iv2026-shell:not(.dark-mode) .ivrank .is-reached .ivrank-rank-state {
  color: #087453 !important;
}

body.iv2026-shell:not(.dark-mode) .iva-page .iva-participants,
body.iv2026-shell:not(.dark-mode) .ivc-page .ivc-card-label {
  color: var(--iv-light-readable) !important;
}

body.iv2026-shell:not(.dark-mode) .ive-page :where(
  .ive-fact > span,
  .ive-fact strong small,
  .ive-step p,
  .ive-pilot span,
  .ive-pilot small
) {
  color: var(--iv-light-readable) !important;
}

body.iv2026-shell:not(.dark-mode) .ivt-page :where(
  .ivt-fact > span,
  .ivt-fact strong small,
  .ivt-leg-aircraft > span,
  .ivt-leg-route,
  .ivt-leg-number,
  .ivt-pilot span,
  .ivt-pilot small
) {
  color: var(--iv-light-readable) !important;
}

body.iv2026-shell:not(.dark-mode) .ivt-page .ivt-leg-state {
  color: #104f9f !important;
}

body.iv2026-shell:not(.dark-mode) .ivcd-page small,
body.iv2026-shell:not(.dark-mode) .ivcd-page .ivcd-active-route,
body.iv2026-shell:not(.dark-mode) .ivcd-page .ivcd-task-state.locked,
body.iv2026-shell:not(.dark-mode) .ivcd-page .ivcd-btn:disabled,
body.iv2026-shell:not(.dark-mode) .ivcd-page :where(
  .ivcd-active-card,
  .ivcd-task-card,
  .ivcd-participant-card,
  .ivcd-mission-tab
) :where(p, span:not([class])) {
  color: var(--iv-light-readable) !important;
}

body.iv2026-shell:not(.dark-mode) .ivlog-page :where(small, th, time span),
body.iv2026-shell:not(.dark-mode) .ivl .ivl-body small,
body.iv2026-shell:not(.dark-mode) .ivl .ivl-recorder-metric span,
body.iv2026-shell:not(.dark-mode) .ivl :where(.ivl-phase-metric, .ivl-phase-stat) span,
body.iv2026-shell:not(.dark-mode) .ivh .ivh-body small {
  color: var(--iv-light-readable) !important;
}

/* Text placed on permanent dark panels must not inherit the page theme colors. */
body.iv2026-shell .ivhome .ivhome-arrivals-bar > small {
  color: #dcecff !important;
}

body.iv2026-shell .ivlog-page .ivlog-logbook-head small {
  color: #bceaff !important;
}

body.iv2026-shell .ivcareer .ivps-dashboard-head .ivps-score > small {
  color: #bceaff !important;
}

body.iv2026-shell .ivl .ivl-body .ivl-skill-total small {
  color: #dcecff !important;
  opacity: 1;
}

body.iv2026-shell:not(.dark-mode) .ivcareer :where(
  .ivcareer-instruments,
  .ivcareer-participation-section,
  .ivcareer-skill-section,
  .ivcareer-recognition-section,
  .ivcareer-awards-section
) small,
body.iv2026-shell:not(.dark-mode) .ivcareer :where(
  .ivcareer-participation-count,
  .ivcareer-milestones,
  .ivcareer-award-subhead,
  .ivps-board-head,
  .ivps-list-position,
  .ivps-empty,
  .ivps-history-entry
) :where(span, b),
body.iv2026-shell:not(.dark-mode) .ivcareer .ivcareer-award-body small {
  color: var(--iv-light-readable) !important;
}

body.iv2026-shell:not(.dark-mode) .ivpoints :where(
  .ivpoints-conversion span,
  .ivpoints-empty span,
  .ivpoints-examples-toggle-copy span
),
body.iv2026-shell:not(.dark-mode) .ivskill :where(
  .ivskill-counter small,
  .ivskill-podium-metrics small,
  .ivskill-value small,
  .ivskill-empty,
  .ivskill-list-row span,
  .ivskill-section-note
) {
  color: var(--iv-light-readable) !important;
}

body.iv2026-shell:not(.dark-mode) .ivrank :where(
  .ivrank-requirements > span,
  .ivrank-no-unlock,
  .ivrank-scope > span,
  .ivrank-rank-state
) {
  color: var(--iv-light-readable) !important;
}

body.iv2026-shell:not(.dark-mode) .ivia-page :where(
  .ivia-counter,
  .ivia-empty span,
  .ivia-disclaimer span,
  .ivia-sidebar-empty span
) {
  color: var(--iv-light-readable) !important;
}

body.iv2026-shell:not(.dark-mode) .iv-pilots .iv-pilots__pilot-status--inactive {
  color: var(--iv-light-readable-strong) !important;
}

body.iv2026-shell:not(.dark-mode) .iv-profile :where(
  .iv-profile__milestones,
  .iv-profile__award-subhead span,
  .iv-profile__award-body small,
  .iv-profile__toggle-button small
) {
  color: var(--iv-light-readable) !important;
}

body.iv2026-shell:not(.dark-mode) .iv-settings :where(
  .iv-settings__email-option small,
  .iv-settings__email-note,
  .iv-settings__field-help,
  .iv-settings__note
) {
  color: var(--iv-light-readable) !important;
}

body.iv2026-shell:not(.dark-mode) .ivnc-page .ivnc-item-meta,
body.iv2026-shell:not(.dark-mode) .ivd-page :where(
  .ivd-fact > span,
  .ivd-fact small,
  .ivd-participant small,
  .ivd-participant span
) {
  color: var(--iv-light-readable) !important;
}

body.iv2026-shell:not(.dark-mode) .ive-page .ive-person-copy span,
body.iv2026-shell:not(.dark-mode) .ivt-page .ivt-person-copy span,
body.iv2026-shell:not(.dark-mode) .ivd-page .ivd-person-copy small,
body.iv2026-shell:not(.dark-mode) .ivcd-page .ivcd-task-progress-head span,
body.iv2026-shell:not(.dark-mode) .ivlog-page .ivlog-date span,
body.iv2026-shell:not(.dark-mode) .ivcareer .ivcareer-requirements small,
body.iv2026-shell:not(.dark-mode) .ivia-page .ivia-history-empty span,
body.iv2026-shell:not(.dark-mode) .iv-settings p.iv-settings__preferences-note {
  color: var(--iv-light-readable) !important;
}

body.iv2026-shell:not(.dark-mode) .ivt-page .ivt-summary article > span,
body.iv2026-shell:not(.dark-mode) .ivcareer .ivcareer-next-rank small,
body.iv2026-shell:not(.dark-mode) .iv-settings .iv-settings__email-footer p {
  color: var(--iv-light-readable) !important;
}

body.iv2026-shell:not(.dark-mode) .ivn .ivn-hero h1 {
  color: #10213a !important;
}

body.iv2026-shell:not(.dark-mode) .iv-pilots .page-item.disabled .page-link {
  color: #637286 !important;
  background: #f5f7fa !important;
}

body.iv2026-shell:not(.dark-mode) .ive-page .ive-launch-warning > span,
body.iv2026-shell:not(.dark-mode) .ivt-page .ivt-launch-warning > span,
body.iv2026-shell:not(.dark-mode) .ivfp-airports-modal .modal-footer > span {
  color: var(--iv-light-readable) !important;
}

@media (max-width: 991px) {
  body.iv2026-shell .iv-simple-nav > li > a.sub-icon:is(:hover, :focus, :focus-visible, :active),
  body.iv2026-shell .iv-simple-nav > li.iv-submenu-open > a.sub-icon,
  body.iv2026-shell.dark-mode .iv-simple-nav > li > a.sub-icon:is(:hover, :focus, :focus-visible, :active),
  body.iv2026-shell.dark-mode .iv-simple-nav > li.iv-submenu-open > a.sub-icon {
    color: #fff !important;
    background: rgba(255, 255, 255, 0.09) !important;
  }

  body.iv2026-shell .iv-simple-nav > li > a.sub-icon:is(:hover, :focus, :focus-visible, :active) :where(i, i::before),
  body.iv2026-shell .iv-simple-nav > li.iv-submenu-open > a.sub-icon :where(i, i::before),
  body.iv2026-shell.dark-mode .iv-simple-nav > li > a.sub-icon:is(:hover, :focus, :focus-visible, :active) :where(i, i::before),
  body.iv2026-shell.dark-mode .iv-simple-nav > li.iv-submenu-open > a.sub-icon :where(i, i::before) {
    color: #fff !important;
  }

  body.iv2026-shell .iv-simple-nav > li > ul.sub-menu > li > a > span,
  body.iv2026-shell.dark-mode .iv-simple-nav > li > ul.sub-menu > li > a > span {
    color: inherit !important;
  }
}

/* Shared action colors in dark mode: blue hierarchy instead of neutral grey. */
body.iv2026-shell.dark-mode {
  --iv-action-secondary-text: #c7e0ff;
  --iv-action-secondary-bg: #16365e;
  --iv-action-secondary-border: #3a6798;
  --iv-action-secondary-hover-text: #ffffff;
  --iv-action-secondary-hover-bg: #1b4679;
  --iv-action-secondary-hover-border: #5f91c5;
}

body.iv2026-shell.dark-mode :where(
  .ivhome-section-head > a,
  .ivhome-airspace-empty-actions > a:not(.is-primary),
  .iva-history-head > a,
  .iva-section-link,
  .ivo-section-link,
  .ivo-btn-outline,
  .iva-btn-outline,
  .ivn-btn:not(.ivn-btn-primary):not(.ivn-btn-success),
  .ivc-btn:not(.primary):not(.ivc-btn-primary):not(.on-dark):not(.ghost-dark),
  .ivcd-btn:not(.primary):not(.danger):not(.collect),
  .ivcd-modal-close,
  .ive-btn.secondary,
  .ivt-btn.secondary,
  .ivt-people-toggle,
  .ivd-show-all > button,
  .ivh-btn.subtle,
  .ivh-tab:not(.active):not(.is-active),
  .ivh-page-link:not(.active),
  .iv-profile__toggle-button,
  .ivl-recorder-log-toggle,
  .ivpoints-examples-toggle,
  .ivr-btn:not(.ivr-btn-primary),
  .ivr-map-control,
  .ivr-filter:not(.is-active),
  .ivlog-filter-reset:not(.is-disabled),
  .ivlog-open,
  .ivnc-open,
  .ivnc-read-one,
  .ivnc-filter:not(.is-active),
  .ivnc-page-link:not(.is-current),
  .ivn-tab:not(.is-active),
  .iv-pilots__reset,
  .iv-pilots__radar-link,
  .iv-pilots__pilot-arrow,
  .ivia-reset,
  .ivps-page-link,
  .ivps-action.is-secondary,
  .iv-settings__button--soft,
  .ivdl-button-secondary,
  .ivskill-tie-trigger,
  .page-item:not(.active):not(.disabled) > .page-link
) {
  color: var(--iv-action-secondary-text) !important;
  background: var(--iv-action-secondary-bg) !important;
  border-color: var(--iv-action-secondary-border) !important;
}

body.iv2026-shell.dark-mode :where(
  .ivo-btn-ghost,
  .iva-btn-ghost,
  .ivcareer-btn-ghost,
  .ivhome-btn-ghost,
  .ivc-btn.on-dark,
  .ivc-btn.ghost-dark,
  .ivh-btn.on-dark,
  .ivpoints-back,
  .ivnc-mark-all
) {
  color: #fff !important;
  background: rgba(255, 255, 255, .08) !important;
  border-color: rgba(255, 255, 255, .24) !important;
  box-shadow: none;
}

body.iv2026-shell.dark-mode :where(
  .ivr-filter.is-active,
  .ivnc-filter.is-active,
  .ivnc-page-link.is-current,
  .page-item.active > .page-link
) {
  color: #fff !important;
  background: #2867d8 !important;
  border-color: #2867d8 !important;
}

/* The notifications page owns a more specific legacy dark rule. Keep its
   secondary actions on the same blue hierarchy as the rest of the site. */
body.iv2026-shell.dark-mode .ivnc-page :where(
  .ivnc-open,
  .ivnc-read-one,
  .ivnc-page-link:not(.is-current)
) {
  color: var(--iv-action-secondary-text) !important;
  background: var(--iv-action-secondary-bg) !important;
  border-color: var(--iv-action-secondary-border) !important;
}

body.iv2026-shell.dark-mode .ivnc-page :where(
  .ivnc-open:hover,
  .ivnc-read-one:hover,
  .ivnc-page-link:not(.is-current):hover
) {
  color: var(--iv-action-secondary-hover-text) !important;
  background: var(--iv-action-secondary-hover-bg) !important;
  border-color: var(--iv-action-secondary-hover-border) !important;
}

/* DataTables injects page-specific pagination rules after the shared theme. */
body.iv2026-shell.dark-mode .iv-pilots .dataTables_paginate .page-item:not(.active):not(.disabled) > .page-link {
  color: var(--iv-action-secondary-text) !important;
  background: var(--iv-action-secondary-bg) !important;
  border-color: var(--iv-action-secondary-border) !important;
}

body.iv2026-shell.dark-mode .iv-pilots .dataTables_paginate .page-item:not(.active):not(.disabled) > .page-link:hover {
  color: var(--iv-action-secondary-hover-text) !important;
  background: var(--iv-action-secondary-hover-bg) !important;
  border-color: var(--iv-action-secondary-hover-border) !important;
}

/* Final audit closure for components whose page rules have higher specificity. */
body.iv2026-shell.dark-mode .ive-page .ive-btn.secondary,
body.iv2026-shell.dark-mode .ivt-page .ivt-btn.secondary,
body.iv2026-shell.dark-mode .ivt-page .ivt-people-toggle,
body.iv2026-shell.dark-mode .ivd-page .ivd-show-all > button,
body.iv2026-shell.dark-mode .ivh-page .ivh-tab:not(.active):not(.is-active),
body.iv2026-shell.dark-mode .iv-profile__toggle-button,
body.iv2026-shell.dark-mode .ivl-recorder-log-toggle,
body.iv2026-shell.dark-mode .ivpoints .ivpoints-examples-toggle,
body.iv2026-shell.dark-mode .ivnc-page .ivnc-filter:not(.is-active),
body.iv2026-shell.dark-mode .ivn .ivn-tab:not(.is-active),
body.iv2026-shell.dark-mode .ivcd-modal-close {
  color: var(--iv-action-secondary-text) !important;
  background: var(--iv-action-secondary-bg) !important;
  border-color: var(--iv-action-secondary-border) !important;
}

body.iv2026-shell.dark-mode .ive-page .ive-btn.secondary:hover,
body.iv2026-shell.dark-mode .ivt-page .ivt-btn.secondary:hover,
body.iv2026-shell.dark-mode .ivt-page .ivt-people-toggle:hover,
body.iv2026-shell.dark-mode .ivd-page .ivd-show-all > button:hover,
body.iv2026-shell.dark-mode .ivh-page .ivh-tab:not(.active):not(.is-active):hover,
body.iv2026-shell.dark-mode .iv-profile__toggle-button:hover,
body.iv2026-shell.dark-mode .ivl-recorder-log-toggle:hover,
body.iv2026-shell.dark-mode .ivpoints .ivpoints-examples-toggle:hover,
body.iv2026-shell.dark-mode .ivnc-page .ivnc-filter:not(.is-active):hover,
body.iv2026-shell.dark-mode .ivn .ivn-tab:not(.is-active):hover,
body.iv2026-shell.dark-mode .ivcd-modal-close:hover {
  color: var(--iv-action-secondary-hover-text) !important;
  background: var(--iv-action-secondary-hover-bg) !important;
  border-color: var(--iv-action-secondary-hover-border) !important;
}
