:root {
  font-family: Arial, Helvetica, sans-serif;
  color: #101828;
  background: #0b1020;
}

* { box-sizing: border-box; }
html,
body {
  margin: 0;
  min-height: 100%;
  background: #0f172a;
}

html {
  min-height: 100%;
  background-color: #0b1020;
  overscroll-behavior: none;
}

body:not(.dark-mode) {
  background: #f4f6f8;
}

body.dark-mode {
  background-color: #0b1020;
}

.app-shell {
  width: min(1760px, calc(100vw - 28px));
  margin: 8px auto 40px;
  display: grid;
  grid-template-columns: 420px minmax(0, 1fr);
  gap: 18px;
  align-items: start;
}
.page-header {
  grid-column: 1 / -1;
}

.hero-header {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  overflow: hidden;
  position: relative;
  min-height: 78px;
  margin-top: 4px;
  padding: 12px 22px;
  border-radius: 22px;
  color: #ffffff;
  background:
    radial-gradient(circle at 86% 18%, rgba(255, 255, 255, 0.28), transparent 30%),
    linear-gradient(135deg, #6b1fb1 0%, #9b35d5 52%, #ff4f8b 100%);
  box-shadow: 0 18px 44px rgba(107, 31, 177, 0.24);
}

.hero-header::after {
  content: "";
  position: absolute;
  right: -54px;
  bottom: -76px;
  width: 260px;
  height: 260px;
  border: 28px solid rgba(255, 255, 255, 0.16);
  border-radius: 999px;
}

.eyebrow {
  margin: 0 0 8px;
  font-size: 12px;
  font-weight: 800;
  letter-spacing: .12em;
  text-transform: uppercase;
  opacity: .88;
}

.page-header h1 {
  margin: 0;
  font-size: clamp(30px, 3.4vw, 46px);
  letter-spacing: -0.06em;
  line-height: .95;
}

.hero-copy {
  max-width: 760px;
  margin: 6px 0 0;
  font-size: 14px;
  line-height: 1.45;
  opacity: .92;
}

.hero-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  position: relative;
  z-index: 1;
  max-width: 330px;
}

.hero-badges span {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  backdrop-filter: blur(8px);
}



.card {
  background: #ffffff;
  border-radius: 16px;
  box-shadow: 0 14px 34px rgba(16, 24, 40, 0.08);
  padding: 16px;
}

.settings-card,
.results-card,
.result-controls,
.result-controls > div {
  min-width: 0;
}

h1, h2 {
  margin: 0 0 14px;
  font-size: 18px;
  line-height: 1.2;
}

label {
  display: block;
  margin: 13px 0 6px;
  font-size: 13px;
  font-weight: 700;
}

input, select, button {
  font: inherit;
}

input, select {
  width: 100%;
  border: 1px solid #ccd4df;
  border-radius: 10px;
  background: #ffffff;
  padding: 10px 11px;
  min-height: 40px;
}

select[multiple] {
  min-height: 116px;
  padding: 8px 10px;
}

.two-col {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
}

.day-grid {
  display: grid;
  grid-template-columns: repeat(7, 1fr);
  gap: 7px;
  margin-top: 8px;
}

.day-pill {
  margin: 0;
}

.day-pill input,
.segmented input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.day-pill span {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  border: 1px solid #ccd4df;
  border-radius: 999px;
  background: #f8fafc;
  font-size: 12px;
  font-weight: 700;
  cursor: pointer;
  user-select: none;
}

.day-pill input:checked + span,
.segmented input:checked + span {
  background: #6b1fb1;
  color: #ffffff;
  border-color: #6b1fb1;
  box-shadow: 0 8px 18px rgba(107, 31, 177, 0.24);
}

.segmented {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.segmented label {
  margin: 0;
}

.segmented span {
  display: block;
  text-align: center;
  border: 1px solid #ccd4df;
  border-radius: 10px;
  background: #f8fafc;
  padding: 10px 12px;
  cursor: pointer;
}

.hint {
  margin: 5px 0 0;
  color: #667085;
  font-size: 12px;
  line-height: 1.25;
}

.actions {
  display: flex;
  gap: 10px;
  margin-top: 18px;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 11px 14px;
  font-weight: 700;
  cursor: pointer;
}

button:disabled {
  opacity: 0.65;
  cursor: wait;
}

.primary {
  background: #6b1fb1;
  color: #ffffff;
}

.secondary {
  background: #e8edf3;
  color: #101828;
}

.danger {
  background: #fee4e2;
  color: #912018;
}

.ghost {
  background: #eef2f7;
  color: #101828;
  padding: 8px 11px;
}

.message, .log {
  margin: 12px 0 0;
  color: #667085;
  font-size: 13px;
  line-height: 1.45;
}

.results-heading {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.summary {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  margin-bottom: 14px;
}

.badge {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  background: #eef2f7;
  border-radius: 999px;
  padding: 7px 11px;
  font-size: 13px;
}

.progress-box {
  display: none;
  border: 1px solid #d9e2ec;
  background: #fbfcfe;
  border-radius: 14px;
  padding: 12px;
  margin: 0 0 14px;
  color: #526172;
  font-size: 13px;
  line-height: 1.45;
}

.progress-box.visible {
  display: block;
}

.empty {
  padding: 32px;
  text-align: center;
  color: #667085;
  border: 1px dashed #cbd5e1;
  border-radius: 14px;
}

.table-wrap {
  overflow-x: auto;
}

table {
  width: 100%;
  min-width: 980px;
  border-collapse: collapse;
  font-size: 14px;
}

th, td {
  border-bottom: 1px solid #edf0f4;
  padding: 10px 8px;
  text-align: left;
  vertical-align: top;
}

th {
  color: #667085;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

.small {
  color: #667085;
  font-size: 12px;
}

.money a {
  color: #6b1fb1;
  font-weight: 800;
  text-decoration: none;
}

.money a:hover {
  text-decoration: underline;
}

@media (max-width: 920px) {
  .app-shell { grid-template-columns: 1fr; }
  .hero-header { align-items: flex-start; flex-direction: column; }
  .hero-badges { justify-content: flex-start; }
}

.label-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  margin-top: 14px;
}

.label-row label {
  margin: 0;
}

button.mini {
  padding: 6px 10px;
  font-size: 12px;
}

select:disabled {
  background: #f1f5f9;
  color: #64748b;
}



.airline-filter-block {
  grid-column: span 2;
}

.checkbox-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  align-items: center;
}

.checkbox-pill {
  margin: 0;
}

.checkbox-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #ccd4df;
  border-radius: 999px;
  background: #ffffff;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.checkbox-pill input:checked + span {
  background: #6b1fb1;
  color: #ffffff;
  border-color: #6b1fb1;
  box-shadow: 0 6px 14px rgba(107, 31, 177, 0.18);
}

.result-controls {
  display: grid;
  grid-template-columns: repeat(6, minmax(130px, 1fr));
  gap: 10px;
  align-items: end;
  margin: 0 0 12px;
  padding: 10px;
  background: #f8fafc;
  border: 1px solid #edf0f4;
  border-radius: 14px;
  overflow: visible;
}

.result-controls label {
  margin: 0 0 5px;
}

.result-controls input,
.result-controls select {
  min-height: 38px;
  padding: 8px 10px;
}

.result-control-actions {
  display: flex;
  align-items: end;
}

.result-control-actions button {
  width: 100%;
}

.sort-button {
  width: 100%;
  padding: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  text-align: left;
  text-transform: uppercase;
  letter-spacing: .04em;
  font-size: 12px;
  font-weight: 800;
}

.sort-button:hover,
.sort-button.active {
  color: #6b1fb1;
  text-decoration: underline;
}

@media (max-width: 1080px) {
  
.airline-filter-block {
  grid-column: span 2;
}

.checkbox-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  align-items: center;
}

.checkbox-pill {
  margin: 0;
}

.checkbox-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #ccd4df;
  border-radius: 999px;
  background: #ffffff;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.checkbox-pill input:checked + span {
  background: #6b1fb1;
  color: #ffffff;
  border-color: #6b1fb1;
  box-shadow: 0 6px 14px rgba(107, 31, 177, 0.18);
}

.result-controls {
    grid-template-columns: 1fr 1fr;
  }
}

@media (max-width: 560px) {
  
.airline-filter-block {
  grid-column: span 2;
}

.checkbox-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  align-items: center;
}

.checkbox-pill {
  margin: 0;
}

.checkbox-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #ccd4df;
  border-radius: 999px;
  background: #ffffff;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.checkbox-pill input:checked + span {
  background: #6b1fb1;
  color: #ffffff;
  border-color: #6b1fb1;
  box-shadow: 0 6px 14px rgba(107, 31, 177, 0.18);
}

.result-controls {
    grid-template-columns: 1fr;
  }
}

.pagination-controls {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  margin-top: 14px;
}

.pagination-controls button {
  min-width: 42px;
  padding: 8px 11px;
}

.pagination-controls .page-button.active {
  background: #6b1fb1;
  color: #ffffff;
}

.page-ellipsis,
.page-summary {
  color: #667085;
  font-size: 13px;
}


/* Keep the scanner controls on screen and scroll the result list only. */
html, body {
  height: 100%;
}

body {
  overflow: hidden;
}

.app-shell {
  height: calc(100vh - 16px);
  margin-bottom: 8px;
  grid-template-rows: auto minmax(0, 1fr);
}

.settings-card,
.results-card {
  min-height: 0;
  max-height: 100%;
}

.settings-card {
  overflow-y: auto;
}

.results-card {
  display: flex;
  flex-direction: column;
  overflow: hidden;
}

#results {
  flex: 1 1 auto;
  min-height: 0;
  overflow: auto;
}

#results .table-wrap {
  min-width: 100%;
}

#results thead th {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #ffffff;
}

.pagination-controls {
  flex: 0 0 auto;
  padding-top: 10px;
  border-top: 1px solid #edf0f4;
  background: #ffffff;
}

@media (max-width: 920px) {
  body { overflow: auto; }
  .app-shell { height: auto; }
  .settings-card, .results-card { max-height: none; }
  #results { max-height: 70vh; }
}


/* Compact mixed-airline layout refinements */
.page-header { margin-bottom: 0; }
.results-card > .results-heading,
.results-card > .summary,
.results-card > .result-controls,
.results-card > .progress-box,
.results-card > .pagination-controls {
  flex: 0 0 auto;
}
.summary {
  margin-bottom: 10px;
}
.badge {
  min-height: 28px;
  padding: 6px 10px;
}

.airline-filter-block {
  grid-column: span 2;
}

.checkbox-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  align-items: center;
}

.checkbox-pill {
  margin: 0;
}

.checkbox-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #ccd4df;
  border-radius: 999px;
  background: #ffffff;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.checkbox-pill input:checked + span {
  background: #6b1fb1;
  color: #ffffff;
  border-color: #6b1fb1;
  box-shadow: 0 6px 14px rgba(107, 31, 177, 0.18);
}

.result-controls {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  max-height: 178px;
  overflow-y: auto;
  overflow-x: hidden;
}
.result-controls label {
  font-size: 12px;
}
.result-controls input,
.result-controls select {
  min-height: 36px;
  padding: 7px 9px;
}
.result-control-actions {
  align-self: end;
}
#results {
  overflow: auto;
  overscroll-behavior: contain;
}
#results .table-wrap {
  width: 100%;
  overflow-x: auto;
}
#results table {
  min-width: 940px;
}
th, td {
  padding: 9px 8px;
}
th:nth-child(6), td:nth-child(6) {
  min-width: 112px;
}
@media (max-height: 760px) {
  .hero-header {
    min-height: 78px;
    padding-top: 14px;
    padding-bottom: 14px;
  }
  .hero-copy { display: none; }
  .hero-badges span { padding: 6px 9px; }
  .card { padding: 14px; }
  .result-controls { max-height: 142px; }
}
@media (max-width: 1080px) {
  
.airline-filter-block {
  grid-column: span 2;
}

.checkbox-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  min-height: 38px;
  align-items: center;
}

.checkbox-pill {
  margin: 0;
}

.checkbox-pill input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}

.checkbox-pill span {
  display: inline-flex;
  align-items: center;
  min-height: 34px;
  border: 1px solid #ccd4df;
  border-radius: 999px;
  background: #ffffff;
  padding: 7px 12px;
  font-size: 13px;
  font-weight: 700;
  cursor: pointer;
}

.checkbox-pill input:checked + span {
  background: #6b1fb1;
  color: #ffffff;
  border-color: #6b1fb1;
  box-shadow: 0 6px 14px rgba(107, 31, 177, 0.18);
}

.result-controls {
    grid-template-columns: repeat(auto-fit, minmax(145px, 1fr));
  }
}


.results-card {
  overflow: hidden;
}

#results {
  max-height: calc(100vh - 390px);
  overflow-y: auto;
  overflow-x: hidden;
  padding-right: 4px;
}

.table-wrap {
  max-width: 100%;
  overflow-x: auto;
}

@media (min-width: 1280px) {
  .result-controls {
    grid-template-columns: minmax(280px, 2fr) repeat(5, minmax(150px, 1fr));
  }
  .airline-filter-block {
    grid-column: span 1;
  }
}

@media (max-height: 850px) {
  .hero-header {
    min-height: 68px;
    padding-top: 10px;
    padding-bottom: 10px;
  }
  .page-header h1 {
    font-size: clamp(28px, 3vw, 40px);
  }
  .hero-copy {
    margin-top: 4px;
  }
  #results {
    max-height: calc(100vh - 350px);
  }
}

.mini-note {
  color: #64748b;
  font-size: 12px;
  text-align: right;
}

.hero-badges a {
  border: 1px solid rgba(255, 255, 255, 0.34);
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.18);
  padding: 7px 10px;
  font-size: 12px;
  font-weight: 800;
  color: #ffffff;
  text-decoration: none;
  backdrop-filter: blur(8px);
}

.test-shell {
  width: min(1420px, calc(100vw - 28px));
  margin: 8px auto 40px;
}

.test-card {
  margin-top: 18px;
}

.test-controls {
  display: grid;
  grid-template-columns: 260px minmax(200px, 1fr);
  gap: 16px;
  align-items: end;
  margin: 14px 0;
}

.inline-checkbox {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 7px;
}

.inline-checkbox input {
  width: auto;
  min-height: auto;
}

.raw-details {
  margin-top: 14px;
  color: #475467;
}

.raw-details pre {
  white-space: pre-wrap;
  max-height: 360px;
  overflow: auto;
  background: #0f172a;
  color: #f8fafc;
  padding: 12px;
  border-radius: 12px;
}

@media (max-width: 720px) {
  .test-controls {
    grid-template-columns: 1fr;
  }
}

/* 2026-05-22: keep result filters inside the card on shorter or narrower screens. */
.results-card {
  min-width: 0;
}
.result-controls {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 8px 10px;
  max-height: none;
  overflow: visible;
}
.result-controls > div {
  min-width: 0;
}
.result-controls input,
.result-controls select {
  width: 100%;
  min-width: 0;
}
.airline-filter-block {
  grid-column: span 2;
}
.result-control-actions {
  align-self: end;
}
#results {
  overflow: auto;
}
#results .table-wrap {
  width: 100%;
  max-width: 100%;
  overflow-x: auto;
}
#results table {
  min-width: 930px;
}
@media (min-width: 1420px) {
  .result-controls {
    grid-template-columns: minmax(220px, 1.6fr) repeat(6, minmax(145px, 1fr));
  }
  .airline-filter-block {
    grid-column: span 1;
  }
}
@media (max-height: 780px) {
  .hero-header {
    min-height: 58px;
    padding-top: 9px;
    padding-bottom: 9px;
  }
  .hero-copy {
    display: none;
  }
  .result-controls {
    max-height: 160px;
    overflow-y: auto;
  }
}

/* 2026-05-22 final layout fixes: keep controls visible and allow the proof page to scroll. */
.heading-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.results-heading {
  flex: 0 0 auto;
}

.result-controls {
  grid-template-columns: repeat(auto-fit, minmax(132px, 1fr));
  max-height: 156px;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 8px;
}

@media (min-width: 1500px) {
  .result-controls {
    grid-template-columns: minmax(190px, 1.3fr) repeat(5, minmax(132px, 1fr));
  }
  .airline-filter-block {
    grid-column: span 1;
  }
}

.result-controls input,
.result-controls select {
  min-width: 0;
}

body.test-page {
  overflow: auto;
  min-height: 100%;
}

body.test-page .test-shell {
  min-height: auto;
}

body.test-page #easyjetResults {
  max-height: 58vh;
  overflow: auto;
  margin-top: 12px;
}

body.test-page .table-wrap {
  overflow-x: auto;
}

body.test-page table {
  min-width: 880px;
}

/* easyJet proof page scan controls */
.test-controls-grid {
  grid-template-columns: repeat(auto-fit, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
}
.test-controls-grid .inline-checkbox {
  min-height: 46px;
}

.hero-side {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
  position: relative;
  z-index: 2;
}

.settings-button {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
  border: 1px solid rgba(255, 255, 255, 0.42);
  padding: 8px 13px;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.20);
}

.eyebrow.dark {
  color: #667085;
  opacity: 1;
  margin-bottom: 6px;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 50;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  padding: 28px;
  background: rgba(15, 23, 42, 0.52);
  overflow-y: auto;
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-card {
  width: min(780px, calc(100vw - 32px));
  background: #ffffff;
  border-radius: 18px;
  box-shadow: 0 28px 80px rgba(15, 23, 42, 0.30);
  padding: 18px;
}

.modal-header,
.modal-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.modal-actions {
  justify-content: flex-start;
  margin-top: 16px;
  flex-wrap: wrap;
}

.switch-row {
  display: flex;
  gap: 10px;
  align-items: center;
  margin: 14px 0 8px;
  font-size: 13px;
  line-height: 1.35;
}

.switch-row input {
  width: auto;
  min-height: auto;
}

#scheduledStatus {
  display: block;
  margin-top: 14px;
}

#results {
  max-height: calc(100vh - 360px);
  overflow-y: auto;
  padding-right: 2px;
}

@media (max-width: 920px) {
  .hero-side { align-items: flex-start; }
  .modal-header { align-items: flex-start; }
}

/* 2026-05-26: result outbound-day filter is multi-select again. */
.result-controls .day-filter-block {
  min-width: 0;
}
.day-grid.compact {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
}
.small-day-pill span {
  min-width: 34px;
  min-height: 34px;
  padding: 6px 9px;
  font-size: 12px;
}
.result-controls .checkbox-strip {
  min-height: 36px;
}
@media (min-width: 1420px) {
  .result-controls {
    grid-template-columns: minmax(210px, 1.35fr) minmax(150px, .95fr) minmax(230px, 1.4fr) minmax(120px, .7fr) minmax(140px, .85fr) minmax(140px, .85fr);
  }
  .day-filter-block {
    grid-column: auto;
  }
}

/* 2026-05-26: simplified result filters and theme toggle. */
.header-buttons {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  flex-wrap: wrap;
}

.results-card > .result-controls {
  display: none !important;
}

#results {
  max-height: calc(100vh - 285px);
}

body.dark-mode {
  color: #e5e7eb;
  background: #0b1020;
}

body.dark-mode .card,
body.dark-mode .modal-card,
body.dark-mode .pagination-controls {
  background: #111827;
  color: #e5e7eb;
  box-shadow: 0 14px 34px rgba(0, 0, 0, 0.35);
}

body.dark-mode input,
body.dark-mode select,
body.dark-mode textarea {
  background: #0f172a;
  color: #e5e7eb;
  border-color: #334155;
}

body.dark-mode select:disabled {
  background: #111827;
  color: #94a3b8;
}

body.dark-mode .secondary,
body.dark-mode .ghost,
body.dark-mode .badge,
body.dark-mode .progress-box,
body.dark-mode .day-pill span,
body.dark-mode .segmented span,
body.dark-mode .checkbox-pill span {
  background: #1f2937;
  color: #e5e7eb;
  border-color: #334155;
}

body.dark-mode .danger {
  background: #3b1115;
  color: #fecaca;
}

body.dark-mode .hint,
body.dark-mode .mini-note,
body.dark-mode .message,
body.dark-mode .log,
body.dark-mode .small,
body.dark-mode th,
body.dark-mode .page-summary,
body.dark-mode .page-ellipsis,
body.dark-mode .eyebrow.dark {
  color: #94a3b8;
}

body.dark-mode th,
body.dark-mode td,
body.dark-mode .pagination-controls {
  border-color: #243244;
}

body.dark-mode #results thead th {
  background: #111827;
}

body.dark-mode .empty {
  color: #94a3b8;
  border-color: #334155;
}

body.dark-mode .money a,
body.dark-mode .sort-button:hover,
body.dark-mode .sort-button.active {
  color: #c084fc;
}

/* Compact header, no feature-badge patches. */
.hero-header {
  display: block;
  min-height: 0;
  padding: 12px 22px;
  border-radius: 18px;
  align-items: stretch;
}
.hero-title-row {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}
.hero-title-block {
  min-width: 0;
}
.hero-side,
.hero-badges {
  display: none !important;
}
.header-buttons {
  flex: 0 0 auto;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 0;
}
.settings-button {
  min-height: 36px;
  padding: 8px 13px;
  border-radius: 12px;
  white-space: nowrap;
}
.eyebrow {
  margin-bottom: 5px;
}
.page-header h1 {
  font-size: clamp(28px, 3vw, 42px);
  line-height: .95;
}
.hero-copy {
  margin-top: 5px;
  max-width: 780px;
  font-size: 13px;
}
#results {
  max-height: calc(100vh - 245px);
}
@media (max-height: 820px) {
  .hero-header {
    padding-top: 9px;
    padding-bottom: 9px;
  }
  .page-header h1 {
    font-size: clamp(26px, 2.8vw, 36px);
  }
  .hero-copy {
    display: none;
  }
  #results {
    max-height: calc(100vh - 215px);
  }
}
@media (max-width: 760px) {
  .hero-title-row {
    flex-direction: column;
    gap: 10px;
  }
  .header-buttons {
    justify-content: flex-start;
  }
}

/* 2026-05-26: compact header button placement fix. */
.hero-header {
  align-items: center;
  padding: 12px 28px;
  min-height: 120px;
}
.hero-title-row {
  position: relative;
  z-index: 2;
  display: flex;
  width: 100%;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
}
.hero-title-block {
  min-width: 0;
  flex: 1 1 auto;
}
.header-buttons {
  flex: 0 0 auto;
  align-self: flex-start;
  margin-left: auto;
  padding-top: 0;
}
.header-buttons .settings-button {
  white-space: nowrap;
}
@media (max-width: 860px) {
  .hero-header {
    min-height: auto;
    padding: 14px 18px;
  }
  .hero-title-row {
    flex-direction: column;
    gap: 10px;
  }
  .header-buttons {
    margin-left: 0;
    justify-content: flex-start;
  }
}

/* 2026-05-27: fix compact header clipping and dark-mode selected states. */
.hero-header {
  min-height: 96px !important;
  padding: 14px 28px !important;
  display: flex !important;
  align-items: center !important;
}
.hero-title-row {
  align-items: center !important;
}
.header-buttons {
  align-self: center !important;
  align-items: center !important;
  padding-top: 0 !important;
  margin-top: 0 !important;
}
.header-buttons .settings-button {
  min-height: 34px;
  padding: 7px 13px;
}
@media (max-height: 820px) {
  .hero-header {
    min-height: 86px !important;
    padding-top: 10px !important;
    padding-bottom: 10px !important;
  }
}
body.dark-mode .day-pill input:checked + span,
body.dark-mode .segmented input:checked + span,
body.dark-mode .checkbox-pill input:checked + span {
  background: #7c2bd5 !important;
  color: #ffffff !important;
  border-color: #a855f7 !important;
  box-shadow: 0 0 0 2px rgba(168, 85, 247, 0.34), 0 8px 20px rgba(0, 0, 0, 0.38) !important;
}
body.dark-mode .day-pill input:not(:checked) + span,
body.dark-mode .segmented input:not(:checked) + span,
body.dark-mode .checkbox-pill input:not(:checked) + span {
  background: #111827;
  color: #cbd5e1;
  border-color: #334155;
}

/* Mobile options sidebar. Desktop keeps the original two-column layout. */
.mobile-options-button {
  display: none;
}

.sidebar-backdrop {
  display: none;
}

@media (max-width: 920px) {
  .hero-title-row {
    width: 100%;
  }

  .header-buttons {
    width: 100%;
    justify-content: flex-start;
    flex-wrap: wrap;
  }

  .mobile-options-button {
    display: inline-flex;
  }

  .sidebar-backdrop {
    display: block;
    position: fixed;
    inset: 0;
    z-index: 40;
    background: rgba(15, 23, 42, 0.48);
    backdrop-filter: blur(2px);
  }

  .sidebar-backdrop[hidden] {
    display: none !important;
  }

  .page-header {
    position: relative;
    z-index: 30;
  }

  body.options-sidebar-open .page-header {
    z-index: 20;
  }

  .settings-card {
    position: fixed;
    z-index: 50;
    top: 0;
    left: 0;
    width: min(88vw, 390px);
    height: 100dvh;
    max-height: 100dvh;
    border-radius: 0 18px 18px 0;
    overflow-y: auto;
    transform: translateX(-105%);
    transition: transform 180ms ease;
    box-shadow: 18px 0 44px rgba(15, 23, 42, 0.24);
  }

  body.options-sidebar-open {
    overflow: hidden;
  }

  body.options-sidebar-open .settings-card {
    transform: translateX(0);
  }

  .results-card {
    width: 100%;
  }
}


/* Mobile device fallback for Android/Chrome where viewport width can be reported as desktop-scale. */
body.mobile-device .hero-title-row {
  width: 100%;
}
body.mobile-device .header-buttons {
  width: 100%;
  justify-content: flex-start;
  flex-wrap: wrap;
}
body.mobile-device .mobile-options-button {
  display: inline-flex !important;
}
body.mobile-device .sidebar-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
}
body.mobile-device .sidebar-backdrop[hidden] {
  display: none !important;
}
body.mobile-device .page-header {
  position: relative;
  z-index: 30;
}
body.mobile-device.options-sidebar-open .page-header {
  z-index: 20;
}
body.mobile-device .settings-card {
  position: fixed;
  z-index: 50;
  top: 0;
  left: 0;
  width: min(88vw, 420px);
  height: 100dvh;
  max-height: 100dvh;
  border-radius: 0 18px 18px 0;
  overflow-y: auto;
  transform: translateX(-105%);
  transition: transform 180ms ease;
  box-shadow: 18px 0 44px rgba(15, 23, 42, 0.24);
}
body.mobile-device.options-sidebar-open {
  overflow: hidden;
}
body.mobile-device.options-sidebar-open .settings-card {
  transform: translateX(0);
}
body.mobile-device .results-card {
  width: 100%;
}


/* vnext4: cache-busted mobile rules. These sit at the end so they win over older layout rules. */
body.mobile-device .mobile-options-button {
  display: inline-flex !important;
}
body.mobile-device .settings-card {
  position: fixed !important;
  z-index: 50 !important;
  top: 0 !important;
  left: 0 !important;
  width: min(88vw, 420px) !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  border-radius: 0 18px 18px 0 !important;
  overflow-y: auto !important;
  transform: translateX(-105%) !important;
  transition: transform 180ms ease !important;
  box-shadow: 18px 0 44px rgba(15, 23, 42, 0.24) !important;
}
body.mobile-device.options-sidebar-open .settings-card {
  transform: translateX(0) !important;
}
body.mobile-device .sidebar-backdrop {
  display: block;
  position: fixed;
  inset: 0;
  z-index: 40;
  background: rgba(15, 23, 42, 0.48);
  backdrop-filter: blur(2px);
}
body.mobile-device .sidebar-backdrop[hidden] {
  display: none !important;
}
body.mobile-device.options-sidebar-open {
  overflow: hidden;
}
@media (max-width: 920px) {
  .mobile-options-button { display: inline-flex !important; }
  .settings-card {
    position: fixed !important;
    z-index: 50 !important;
    top: 0 !important;
    left: 0 !important;
    width: min(88vw, 420px) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 18px 18px 0 !important;
    overflow-y: auto !important;
    transform: translateX(-105%) !important;
    transition: transform 180ms ease !important;
    box-shadow: 18px 0 44px rgba(15, 23, 42, 0.24) !important;
  }
  body.options-sidebar-open .settings-card { transform: translateX(0) !important; }
}


/* vnext5: fail-safe mobile filter drawer.
   The Filters button is visible by default, then only hidden on clear desktop devices.
   This avoids Android/Chrome desktop-width reporting on high-resolution phones. */
.mobile-options-button {
  display: inline-flex !important;
}
@media (min-width: 1201px) and (hover: hover) and (pointer: fine) {
  body:not(.mobile-device) .mobile-options-button {
    display: none !important;
  }
}
@media (max-width: 920px) {
  .settings-card {
    position: fixed !important;
    z-index: 50 !important;
    top: 0 !important;
    left: 0 !important;
    width: min(90vw, 440px) !important;
    height: 100dvh !important;
    max-height: 100dvh !important;
    border-radius: 0 18px 18px 0 !important;
    overflow-y: auto !important;
    transform: translateX(-106%) !important;
    transition: transform 180ms ease !important;
    box-shadow: 18px 0 44px rgba(15, 23, 42, 0.24) !important;
  }
  body.options-sidebar-open .settings-card {
    transform: translateX(0) !important;
  }
}
body.mobile-device .settings-card {
  position: fixed !important;
  z-index: 50 !important;
  top: 0 !important;
  left: 0 !important;
  width: min(90vw, 440px) !important;
  height: 100dvh !important;
  max-height: 100dvh !important;
  border-radius: 0 18px 18px 0 !important;
  overflow-y: auto !important;
  transform: translateX(-106%) !important;
  transition: transform 180ms ease !important;
  box-shadow: 18px 0 44px rgba(15, 23, 42, 0.24) !important;
}
body.mobile-device.options-sidebar-open .settings-card {
  transform: translateX(0) !important;
}
body.mobile-device .sidebar-backdrop {
  display: block !important;
  position: fixed !important;
  inset: 0 !important;
  z-index: 40 !important;
  background: rgba(15, 23, 42, 0.48) !important;
  backdrop-filter: blur(2px) !important;
}
body.mobile-device .sidebar-backdrop[hidden] {
  display: none !important;
}
body.mobile-device.options-sidebar-open {
  overflow: hidden !important;
}


/* vnext11: one combined country/airport selector. */
#destinationSelect option[value^="country:"] {
  font-weight: 800;
}

#destinationSelect option[value^="airport:"] {
  font-weight: 400;
}


/* vnext11: compact custom multi-select dropdown for countries and airports. */
.combo-multiselect {
  position: relative;
  margin-top: 6px;
}

.combo-button {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  min-height: 44px;
  text-align: left;
  padding: 10px 12px;
  border: 1px solid #cbd5e1;
  border-radius: 12px;
  background: #ffffff;
  color: #111827;
  font-weight: 700;
}

.combo-button::after {
  content: "▾";
  margin-left: 10px;
  font-size: 12px;
}

.combo-button[aria-expanded="true"]::after {
  content: "▴";
}

.combo-button:disabled {
  background: #f1f5f9;
  color: #64748b;
}

.combo-panel {
  position: absolute;
  z-index: 30;
  left: 0;
  right: 0;
  top: calc(100% + 6px);
  max-height: min(420px, 65vh);
  overflow: auto;
  border: 1px solid #cbd5e1;
  border-radius: 14px;
  background: #ffffff;
  box-shadow: 0 18px 45px rgba(15, 23, 42, 0.22);
  padding: 6px;
}

.combo-group + .combo-group {
  border-top: 1px solid #e2e8f0;
  margin-top: 6px;
  padding-top: 6px;
}

.combo-option {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  border: 0;
  border-radius: 10px;
  background: transparent;
  color: #111827;
  text-align: left;
  padding: 10px;
  cursor: pointer;
}

.combo-option.country {
  font-weight: 800;
}

.combo-option.airport {
  padding-left: 24px;
  font-weight: 500;
}

.combo-option small {
  color: #64748b;
  white-space: nowrap;
}

.combo-option:hover,
.combo-option.selected {
  background: #eef2ff;
}

.combo-option.selected::after {
  content: "Selected";
  font-size: 11px;
  font-weight: 800;
  color: #1d4ed8;
}

.combo-empty {
  padding: 12px;
  color: #64748b;
}

body.dark-mode .combo-button,
body.dark-mode .combo-panel {
  background: #0f172a;
  color: #e5e7eb;
  border-color: #334155;
}

body.dark-mode .combo-option {
  color: #e5e7eb;
}

body.dark-mode .combo-group + .combo-group {
  border-top-color: #334155;
}

body.dark-mode .combo-option:hover,
body.dark-mode .combo-option.selected {
  background: #1e293b;
}

/* vnext17: airport country fallback gaps fixed, plus vnext14 destination country fallback fixes and vnext13 resume accounting/cache preservation fixes. */
.combo-actions {
  border-bottom: 1px solid #e2e8f0;
  margin-bottom: 6px;
  padding-bottom: 6px;
}

.combo-option.anywhere {
  font-weight: 900;
}

.combo-clear {
  width: 100%;
  border: 1px solid #cbd5e1;
  border-radius: 10px;
  background: #f8fafc;
  color: #111827;
  font-weight: 800;
  padding: 9px 10px;
  margin-top: 6px;
  cursor: pointer;
}

.combo-clear:hover {
  background: #e2e8f0;
}

body.dark-mode .combo-actions {
  border-bottom-color: #334155;
}

body.dark-mode .combo-clear {
  background: #111827;
  border-color: #334155;
  color: #e5e7eb;
}

body.dark-mode .combo-clear:hover {
  background: #1e293b;
}

/* vnext17: compact destination picker and real-airport-only display. */
.combo-multiselect {
  margin-top: 4px;
}

.combo-button {
  min-height: 38px;
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 14px;
  font-weight: 650;
}

.combo-panel {
  top: calc(100% + 4px);
  max-height: min(360px, 58vh);
  border-radius: 12px;
  padding: 4px;
}

.combo-group + .combo-group {
  margin-top: 3px;
  padding-top: 3px;
}

.combo-option {
  min-height: 32px;
  padding: 6px 8px;
  border-radius: 8px;
  gap: 8px;
  font-size: 14px;
  line-height: 1.2;
}

.combo-option.country {
  font-size: 14px;
  font-weight: 800;
}

.combo-option.airport {
  padding-left: 18px;
  font-size: 13px;
  font-weight: 500;
}

.combo-option small {
  font-size: 11px;
}

.combo-option.selected::after {
  content: "✓";
  font-size: 13px;
  min-width: 16px;
  text-align: right;
}

.combo-actions {
  margin-bottom: 4px;
  padding-bottom: 4px;
}

.combo-clear {
  padding: 6px 8px;
  margin-top: 4px;
  font-size: 13px;
}

#destinationSelectedSummary {
  margin-top: 4px;
}

/* vnext19: managed Docker /data/config migration refreshes stale routes.csv and airports.csv while preserving user settings. */

.build-version {
  align-self: center;
  border-radius: 999px;
  color: rgba(255, 255, 255, 0.72);
  font-size: 0.68rem;
  font-weight: 700;
  letter-spacing: 0.03em;
  padding: 0.2rem 0.35rem;
  white-space: nowrap;
}

body.light .build-version {
  color: rgba(255, 255, 255, 0.78);
}


/* vnext27: keep build version out of the responsive button row. */
.hero-title-block {
  width: 100%;
}

.hero-kicker-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  width: 100%;
  margin-bottom: 5px;
}

.hero-kicker-row .eyebrow {
  margin: 0;
}

.hero-kicker-row .build-version {
  margin-left: auto;
  transform: translateY(-1px);
}

.header-buttons .build-version {
  display: none !important;
}

body.mobile-device .hero-title-block {
  width: 100%;
}

body.mobile-device .hero-kicker-row {
  width: 100%;
}

body.mobile-device .header-buttons {
  gap: 8px;
}

@media (max-width: 760px) {
  .hero-title-block {
    width: 100%;
  }
  .hero-kicker-row {
    width: 100%;
  }
  .build-version {
    font-size: 0.62rem;
    padding: 0.12rem 0.28rem;
  }
}


/* vnext40: mobile/tablet continuous results. Desktop pagination is unchanged. */
body.mobile-results-mode .pagination-controls {
  display: none !important;
}
.mobile-load-more {
  display: block;
  width: fit-content;
  margin: 14px auto 4px;
}
.mobile-end-results {
  margin: 14px 0 2px;
  color: #98a2b3;
  font-size: 13px;
  text-align: center;
}
body.mobile-results-mode #results {
  max-height: none !important;
  overflow: visible !important;
}
body.mobile-results-mode #results .table-wrap {
  overflow-x: auto;
  overflow-y: visible;
}
body.mobile-results-mode #results thead th {
  position: sticky;
  top: 0;
}


/* vnext43: route scan log table inside settings */
.log-table-wrap { max-height: 340px; overflow: auto; }
.log-table { width: 100%; border-collapse: collapse; font-size: 0.85rem; }
.log-table th, .log-table td { padding: 0.45rem 0.55rem; border-bottom: 1px solid rgba(148, 163, 184, 0.22); text-align: left; white-space: nowrap; }
.log-table th { color: var(--muted); font-size: 0.75rem; text-transform: uppercase; letter-spacing: 0.06em; }

.log-modal-card {
  width: min(1480px, calc(100vw - 48px));
  max-height: calc(100vh - 64px);
}

.log-modal-body {
  max-height: calc(100vh - 210px);
  overflow: auto;
}

.header-modal-actions {
  justify-content: flex-end;
  align-items: center;
}

.log-table-wrap {
  overflow: auto;
  max-height: inherit;
}

.log-table {
  width: 100%;
  border-collapse: collapse;
}

.log-table th, .log-table td {
  padding: 8px 10px;
  border-bottom: 1px solid rgba(148, 163, 184, 0.25);
  text-align: left;
  vertical-align: top;
  white-space: nowrap;
}

.log-table .log-summary {
  max-width: 520px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

/* vNext59 compact scan banner and details modal */
.progress-box.clickable {
  cursor: pointer;
  user-select: none;
}
.progress-box.clickable:hover {
  filter: brightness(0.98);
}
.scan-details-modal-card {
  max-width: min(860px, calc(100vw - 24px));
}
.scan-details-body {
  display: grid;
  gap: 12px;
  max-height: min(70vh, 680px);
  overflow: auto;
  padding-right: 4px;
}
.scan-detail-section {
  border: 1px solid var(--border, #ddd);
  border-radius: 12px;
  padding: 12px;
  background: rgba(255,255,255,0.65);
}
body.dark-mode .scan-detail-section {
  background: rgba(255,255,255,0.04);
}
.scan-detail-section h3 {
  margin: 0 0 6px 0;
}
.scan-detail-section p {
  margin: 4px 0;
}
.scan-status-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin-top: 8px;
}
.scan-status-chip {
  border: 1px solid var(--border, #ddd);
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.82rem;
  white-space: nowrap;
}
@media (max-width: 700px) {
  .progress-box.clickable {
    font-size: 0.92rem;
  }
  .scan-details-modal-card {
    max-width: calc(100vw - 16px);
  }
}

.scan-status-chip {
  cursor: pointer;
  background: transparent;
  color: inherit;
}
.scan-status-chip:hover, .scan-status-chip:focus {
  filter: brightness(1.15);
  outline: 2px solid rgba(148, 91, 255, 0.35);
}
.scan-task-drilldown {
  overflow: hidden;
}
.scan-task-drilldown-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}
.scan-task-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 0.82rem;
}
.scan-task-table th, .scan-task-table td {
  border-bottom: 1px solid var(--border, #ddd);
  padding: 6px 8px;
  text-align: left;
  vertical-align: top;
}
.scan-task-table th {
  position: sticky;
  top: 0;
  background: var(--card, #fff);
}
body.dark-mode .scan-task-table th {
  background: #121a2a;
}
button.small {
  padding: 5px 9px;
  font-size: 0.82rem;
}

/* vNext62: pill drilldown and route-log modal must scroll horizontally on mobile and desktop. */
.table-scroll,
.log-table-wrap,
.log-modal-body,
.scan-task-drilldown {
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.table-scroll {
  width: 100%;
  max-width: 100%;
}
.scan-task-table,
.log-table {
  min-width: 980px;
}
.scan-details-modal-card,
.log-modal-card {
  overflow-x: hidden;
}
.scan-details-body {
  min-width: 0;
}
@media (max-width: 700px) {
  .modal-backdrop { padding: 8px; }
  .modal-card { width: calc(100vw - 16px); }
  .scan-task-table, .log-table { min-width: 1080px; }
}

/* vNext68: P920 worker control and stable modal/table scrolling */
.robot-control-panel {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid var(--border, #ddd);
  border-radius: 14px;
  padding: 12px;
  margin-top: 12px;
  background: rgba(148, 163, 184, 0.08);
}
.robot-control-panel p { margin: 4px 0 0; }
.scan-details-body,
.log-modal-body {
  overflow-x: hidden !important;
}
.table-scroll,
.log-table-wrap {
  display: block;
  width: 100%;
  max-width: 100%;
  overflow-x: auto !important;
  overflow-y: auto;
  overscroll-behavior-x: contain;
}
.scan-task-drilldown {
  min-width: 0;
  overflow: hidden !important;
}
.scan-task-table,
.log-table {
  min-width: 1180px;
}
@media (max-width: 700px) {
  .robot-control-panel { align-items: stretch; flex-direction: column; }
  .robot-control-panel button { width: 100%; }
  .scan-task-table, .log-table { min-width: 1220px; }
}


/* vNext68: visible route-validation response details */
.validation-detail {
  white-space: pre-wrap;
  overflow-x: auto;
  max-height: 280px;
  margin: 10px 0 0;
  padding: 12px;
  border-radius: 10px;
  border: 1px solid rgba(148,163,184,.5);
  background: rgba(15,23,42,.82);
  color: #e5e7eb;
  font-size: 12px;
}


/* vNext73 mobile/default dark mode, sticky header, and cleaner scan details. */
html, body { background: #0b1020; min-width: 0; }
body { overscroll-behavior-x: none; }
.app-shell { background: transparent; }
.page-header.hero-header { position: sticky; top: 8px; z-index: 35; }
body.mobile-device, body.mobile-device .app-shell, body.mobile-device #results, body.mobile-device .results-card { background: #0b1020 !important; }
body.mobile-device .app-shell { width: 100vw !important; max-width: 100vw !important; margin-left: 0 !important; margin-right: 0 !important; padding-left: 12px !important; padding-right: 12px !important; overflow-x: hidden !important; }
body.mobile-device .page-header.hero-header { top: 8px; }
body.mobile-device .results-card { overflow-x: hidden !important; }
body.mobile-device #results { max-height: none !important; overflow-x: hidden !important; }
body.mobile-device #results .table-wrap { max-width: 100%; overflow-x: auto; }
.scan-message-details summary { cursor: pointer; max-width: min(520px, 62vw); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.scan-message-details[open] summary { white-space: normal; max-width: none; }
.scan-message-details div { margin-top: 6px; white-space: pre-wrap; word-break: break-word; max-width: min(680px, 72vw); }
.scan-task-table th:last-child, .scan-task-table td:last-child { min-width: 260px; max-width: 720px; white-space: normal; }
@media (max-width: 700px) { .scan-task-table, .log-table { min-width: 760px !important; } .scan-message-details summary { max-width: 220px; } .scan-message-details div { max-width: 320px; } }
.trip-type-toggle { margin-bottom: 8px; }
#originSearch { margin-bottom: 8px; }
#originSelect { min-height: 156px; }

/* vNext73: searchable airport controls and mobile scrolling fixes. */
#originDropdown, #destinationDropdown { margin-top: 6px; }
#destinationSearch { margin-bottom: 8px; }
#originSelect, #destinationSelect { display: none !important; }
.combo-option[hidden], .combo-group[hidden] { display: none !important; }
.combo-option.selected { outline: 2px solid rgba(216, 0, 255, .75); background: rgba(168, 85, 247, .24); }
.scan-status-chip { text-transform: none; }
.scan-detail-section p { margin: 4px 0; }
body.mobile-device .results-card { overflow: visible !important; }
body.mobile-device #results { max-height: none !important; overflow: visible !important; -webkit-overflow-scrolling: touch; }
body.mobile-device #results .table-wrap { max-width: 100% !important; overflow-x: auto !important; overflow-y: visible !important; -webkit-overflow-scrolling: touch; }
body.mobile-device .app-shell { min-height: 100dvh; }
body.mobile-device .page-header.hero-header { position: sticky !important; top: 0 !important; z-index: 60 !important; }
@media (max-width: 700px) {
  .combo-panel { max-height: min(52vh, 460px); overflow: auto; }
  .scan-details-modal-card { max-height: 92dvh; }
  .scan-details-body { max-height: 68dvh; overflow: auto; }
}

.combo-hint {
  font-size: .82rem;
  color: #64748b;
  padding: 4px 8px 8px;
  line-height: 1.25;
}

body.dark-mode .combo-hint {
  color: #94a3b8;
}

/* vNext91 maintainability pass: modal layout rules are consolidated below.
   The card is a fixed frame, header/actions stay visible, and only body panels scroll. */
.modal-backdrop {
  align-items: center !important;
  padding: 12px !important;
  overflow: hidden !important;
}
.modal-card {
  width: min(780px, calc(100vw - 24px));
  max-height: calc(100dvh - 24px);
  display: flex;
  flex-direction: column;
  overflow-y: auto;
  overflow-x: hidden;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
  min-height: 0;
}
.modal-header {
  flex-shrink: 0;
  position: sticky;
  top: 0;
  z-index: 2;
  background: inherit;
  padding-bottom: 10px;
}
.modal-actions {
  flex-shrink: 0;
}
.scan-details-modal-card,
.log-modal-card {
  max-height: calc(100dvh - 24px) !important;
  overflow: hidden !important;
}
.scan-details-body,
.log-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  max-height: none !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch;
}
.scan-details-modal-card > .modal-actions {
  position: sticky;
  bottom: 0;
  z-index: 2;
  margin-top: 10px;
  padding-top: 10px;
  background: inherit;
}
.log-modal-card .modal-header {
  margin-bottom: 10px;
}
@supports not (height: 100dvh) {
  .modal-card,
  .scan-details-modal-card,
  .log-modal-card {
    max-height: calc(100vh - 24px) !important;
  }
}
@media (max-width: 700px) {
  .modal-backdrop {
    padding: 8px !important;
    align-items: center !important;
  }
  .modal-card,
  .scan-details-modal-card,
  .log-modal-card {
    width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    border-radius: 14px;
  }
}


/* vNext88 modal structure fix: card is a fixed frame, only body panels scroll. */
body.modal-open {
  overflow: hidden !important;
}

.modal-backdrop {
  align-items: center !important;
  justify-content: center !important;
  padding: 16px !important;
  overflow: hidden !important;
}

.modal-card,
.scan-details-modal-card,
.log-modal-card {
  box-sizing: border-box !important;
  width: min(920px, calc(100vw - 32px)) !important;
  max-height: calc(100dvh - 32px) !important;
  display: flex !important;
  flex-direction: column !important;
  overflow: hidden !important;
  padding: 0 !important;
}

.modal-card > .modal-header,
.scan-details-modal-card > .modal-header,
.log-modal-card > .modal-header {
  flex: 0 0 auto !important;
  position: relative !important;
  top: auto !important;
  z-index: 5 !important;
  background: #ffffff !important;
  padding: 18px 18px 12px !important;
  border-bottom: 1px solid rgba(148, 163, 184, 0.22) !important;
}

.modal-card > .modal-actions,
.scan-details-modal-card > .modal-actions,
.log-modal-card > .modal-actions,
.settings-modal-actions {
  flex: 0 0 auto !important;
  position: relative !important;
  bottom: auto !important;
  z-index: 5 !important;
  background: #ffffff !important;
  padding: 12px 18px 18px !important;
  margin-top: 0 !important;
  border-top: 1px solid rgba(148, 163, 184, 0.22) !important;
}

.modal-scroll-body,
.settings-modal-body,
.scan-details-body,
.log-modal-body {
  flex: 1 1 auto !important;
  min-height: 0 !important;
  overflow-y: auto !important;
  overflow-x: hidden !important;
  -webkit-overflow-scrolling: touch !important;
  overscroll-behavior: contain !important;
  padding: 16px 18px !important;
}

.scan-details-body,
.log-modal-body {
  max-height: none !important;
}

.log-modal-card {
  width: min(1480px, calc(100vw - 32px)) !important;
}

.log-modal-body,
.scan-details-body {
  overflow-x: auto !important;
}

.log-table-wrap,
.table-scroll,
.scan-task-drilldown {
  max-width: 100% !important;
  overflow: auto !important;
  -webkit-overflow-scrolling: touch !important;
}

.settings-modal-body .progress-box,
#scheduledStatus,
#workerWakeStatus,
#scheduledSettingsMessage {
  max-width: 100%;
}

.modal-card pre,
.modal-card code,
.modal-card .progress-box,
.settings-modal-body pre,
.settings-modal-body code,
.settings-modal-body .progress-box,
.log-modal-body pre,
.log-modal-body code {
  white-space: pre-wrap;
  overflow: auto;
  max-height: 320px;
}

#scheduledStatus.progress-box {
  min-height: 120px;
  max-height: 280px;
  overflow: auto;
}

body.dark-mode .modal-card > .modal-header,
body.dark-mode .scan-details-modal-card > .modal-header,
body.dark-mode .log-modal-card > .modal-header,
body.dark-mode .modal-card > .modal-actions,
body.dark-mode .scan-details-modal-card > .modal-actions,
body.dark-mode .log-modal-card > .modal-actions,
body.dark-mode .settings-modal-actions {
  background: #111827 !important;
  border-color: rgba(148, 163, 184, 0.22) !important;
}

@supports not (height: 100dvh) {
  .modal-card,
  .scan-details-modal-card,
  .log-modal-card {
    max-height: calc(100vh - 32px) !important;
  }
}

@media (max-width: 700px) {
  .modal-backdrop {
    padding: 8px !important;
  }
  .modal-card,
  .scan-details-modal-card,
  .log-modal-card {
    width: calc(100vw - 16px) !important;
    max-height: calc(100dvh - 16px) !important;
    border-radius: 14px !important;
  }
  .modal-card > .modal-header,
  .scan-details-modal-card > .modal-header,
  .log-modal-card > .modal-header {
    padding: 14px 14px 10px !important;
  }
  .modal-scroll-body,
  .settings-modal-body,
  .scan-details-body,
  .log-modal-body {
    padding: 12px 14px !important;
  }
  .modal-card > .modal-actions,
  .scan-details-modal-card > .modal-actions,
  .log-modal-card > .modal-actions,
  .settings-modal-actions {
    padding: 10px 14px 14px !important;
  }
  #scheduledStatus.progress-box {
    min-height: 150px;
    max-height: 40dvh;
  }
}


/* vNext88 modal polish and inset dark scrollbars. */
:root {
  --farefinder-scroll-track: rgba(15, 23, 42, 0.28);
  --farefinder-scroll-thumb: rgba(148, 163, 184, 0.58);
  --farefinder-scroll-thumb-hover: rgba(203, 213, 225, 0.78);
}

* {
  scrollbar-width: thin;
  scrollbar-color: var(--farefinder-scroll-thumb) transparent;
}

*::-webkit-scrollbar {
  width: 10px;
  height: 10px;
}

*::-webkit-scrollbar-track {
  background: transparent;
  border-radius: 999px;
  margin: 8px;
}

*::-webkit-scrollbar-thumb {
  background: var(--farefinder-scroll-thumb);
  border-radius: 999px;
  border: 3px solid transparent;
  background-clip: content-box;
}

*::-webkit-scrollbar-thumb:hover {
  background: var(--farefinder-scroll-thumb-hover);
  background-clip: content-box;
}

.modal-scroll-body,
.settings-modal-body,
.scan-details-body,
.log-modal-body,
.progress-box,
.table-scroll,
.log-table-wrap,
.scan-task-drilldown {
  scrollbar-gutter: stable;
}

.modal-scroll-body,
.settings-modal-body {
  padding-right: 22px !important;
}

.settings-actions-inline {
  position: static !important;
  border-top: 0 !important;
  padding: 12px 0 0 !important;
  background: transparent !important;
}

#scheduledStatus.progress-box {
  min-height: 150px !important;
  max-height: 34dvh !important;
  padding: 10px 12px !important;
  line-height: 1.32 !important;
  overflow: auto !important;
}

.settings-modal-body .progress-box {
  border-radius: 12px;
}

body.dark-mode {
  --farefinder-scroll-track: rgba(2, 6, 23, 0.22);
  --farefinder-scroll-thumb: rgba(148, 163, 184, 0.52);
  --farefinder-scroll-thumb-hover: rgba(203, 213, 225, 0.72);
}

body.dark-mode * {
  scrollbar-color: var(--farefinder-scroll-thumb) transparent;
}

@media (max-width: 700px) {
  .modal-scroll-body,
  .settings-modal-body {
    padding-right: 18px !important;
  }
  #scheduledStatus.progress-box {
    max-height: 34dvh !important;
  }
}


/* vNext88 separate manual/scheduled queue rows. */
.queue-status-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
}

.queue-status-card {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 14px;
  padding: 12px 14px;
  background: rgba(255, 255, 255, 0.78);
}

body.dark-mode .queue-status-card {
  background: rgba(15, 23, 42, 0.82);
  border-color: rgba(148, 163, 184, 0.24);
}

.queue-status-card .hint {
  margin: 4px 0 0;
}

.queue-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

button.small {
  padding: 7px 10px;
  font-size: 0.86rem;
}

@media (max-width: 820px) {
  .queue-status-grid {
    grid-template-columns: 1fr;
  }
  .queue-status-card {
    align-items: flex-start;
    flex-direction: column;
  }
  .queue-actions {
    justify-content: flex-start;
  }
}


/* vNext88 fixed action button sizing and disabled airline state. */
.action-button-fixed {
  min-width: 112px;
  text-align: center;
}

.checkbox-pill.disabled {
  opacity: 0.42;
  cursor: not-allowed;
}

.checkbox-pill.disabled span {
  cursor: not-allowed;
}

.checkbox-pill input:disabled + span {
  filter: grayscale(0.35);
}


/* vNext88 action buttons: black by default, purple while busy. */
button.action-button-fixed,
.queue-actions button.secondary,
.modal-actions button.secondary,
button.primary.action-button-fixed,
button.secondary.action-button-fixed {
  background: #111827 !important;
  border-color: #111827 !important;
  color: #ffffff !important;
  min-width: 112px;
}

button.action-button-fixed:hover,
.queue-actions button.secondary:hover,
.modal-actions button.secondary:hover {
  background: #1f2937 !important;
  border-color: #1f2937 !important;
  color: #ffffff !important;
}

button.is-busy,
button.action-button-fixed.is-busy,
.queue-actions button.is-busy,
.modal-actions button.is-busy {
  background: #7c3aed !important;
  border-color: #7c3aed !important;
  color: #ffffff !important;
}

.route-validation-badge {
  display: inline-block;
  margin-left: 6px;
  padding: 1px 6px;
  border-radius: 999px;
  font-size: 0.72rem;
  line-height: 1.4;
  background: rgba(245, 158, 11, 0.16);
  color: #92400e;
  border: 1px solid rgba(245, 158, 11, 0.35);
}

body.dark-mode .route-validation-badge {
  color: #fbbf24;
  background: rgba(245, 158, 11, 0.12);
  border-color: rgba(245, 158, 11, 0.28);
}


/* vNext88 refined button states and compact route-validation panel. */
:root {
  --ff-button-bg: #1f2937;
  --ff-button-border: #374151;
  --ff-button-hover-bg: #c084fc;
  --ff-button-hover-border: #d8b4fe;
  --ff-button-active-bg: #6d28d9;
  --ff-button-active-border: #7c3aed;
  --ff-button-text: #ffffff;
}

button.action-button-fixed,
button.app-action-button,
.queue-actions button.secondary,
.modal-actions button.secondary,
button.primary.action-button-fixed,
button.secondary.action-button-fixed,
#refreshResults,
#closeScanDetailsFooterButton,
#closeLogFooterButton {
  background: var(--ff-button-bg) !important;
  border-color: var(--ff-button-border) !important;
  color: var(--ff-button-text) !important;
  min-width: 112px;
}

button.icon-button.app-action-button {
  min-width: 38px;
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

button.action-button-fixed:hover,
button.app-action-button:hover,
.queue-actions button.secondary:hover,
.modal-actions button.secondary:hover,
#refreshResults:hover,
#closeScanDetailsFooterButton:hover,
#closeLogFooterButton:hover {
  background: var(--ff-button-hover-bg) !important;
  border-color: var(--ff-button-hover-border) !important;
  color: var(--ff-button-text) !important;
}

button.action-button-fixed:active,
button.app-action-button:active,
.queue-actions button.secondary:active,
.modal-actions button.secondary:active,
#refreshResults:active,
#closeScanDetailsFooterButton:active,
#closeLogFooterButton:active,
button.is-busy,
button.action-button-fixed.is-busy,
button.app-action-button.is-busy,
.queue-actions button.is-busy,
.modal-actions button.is-busy {
  background: var(--ff-button-active-bg) !important;
  border-color: var(--ff-button-active-border) !important;
  color: var(--ff-button-text) !important;
}

.route-validation-mini-panel {
  margin: 10px 0 12px;
  padding: 10px 12px;
  border: 1px solid rgba(148, 163, 184, 0.28);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.68);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

body.dark-mode .route-validation-mini-panel {
  background: rgba(15, 23, 42, 0.72);
  border-color: rgba(148, 163, 184, 0.24);
}

.route-validation-mini-panel .hint {
  margin: 3px 0 0;
}

@media (max-width: 700px) {
  .route-validation-mini-panel {
    align-items: flex-start;
    flex-direction: column;
  }
}




/* vNext88 final mobile/modal and one-way options fixes. */
.nights-fields[hidden] {
  display: none !important;
}

body.mobile-device .settings-card {
  z-index: 1200 !important;
  top: max(8px, env(safe-area-inset-top)) !important;
  bottom: max(8px, env(safe-area-inset-bottom)) !important;
  height: auto !important;
  max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))) !important;
  overflow-y: auto !important;
  overscroll-behavior: contain !important;
  -webkit-overflow-scrolling: touch !important;
  padding-bottom: 96px !important;
  pointer-events: auto !important;
}

@media (max-width: 920px) {
  body.options-sidebar-open .settings-card {
    z-index: 1200 !important;
    top: max(8px, env(safe-area-inset-top)) !important;
    bottom: max(8px, env(safe-area-inset-bottom)) !important;
    height: auto !important;
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))) !important;
    overflow-y: auto !important;
    overscroll-behavior: contain !important;
    -webkit-overflow-scrolling: touch !important;
    padding-bottom: 96px !important;
    pointer-events: auto !important;
  }
}

body.mobile-device .sidebar-backdrop {
  z-index: 1100 !important;
}

@media (max-width: 920px) {
  .sidebar-backdrop {
    z-index: 1100 !important;
  }
}

body.mobile-device .page-header,
body.mobile-device.options-sidebar-open .page-header {
  z-index: 20 !important;
}

body.mobile-device input,
body.mobile-device select,
body.mobile-device textarea,
body.mobile-device button,
body.mobile-device .combo-option {
  pointer-events: auto !important;
  touch-action: manipulation;
}

body.mobile-device #minNights,
body.mobile-device #maxNights {
  position: relative;
  z-index: 5;
  -webkit-user-select: text;
  user-select: text;
}

body.mobile-device .modal-backdrop {
  z-index: 1300 !important;
  align-items: stretch !important;
  justify-content: center !important;
  padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)) !important;
}

@media (max-width: 700px) {
  .modal-backdrop {
    z-index: 1300 !important;
    align-items: stretch !important;
    justify-content: center !important;
    padding: max(8px, env(safe-area-inset-top)) 8px max(8px, env(safe-area-inset-bottom)) !important;
  }
  .modal-card,
  .scan-details-modal-card,
  .log-modal-card {
    width: calc(100vw - 16px) !important;
    height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))) !important;
    max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))) !important;
    min-height: 0 !important;
  }
  .scan-details-body,
  .modal-scroll-body,
  .settings-modal-body,
  .log-modal-body {
    flex: 1 1 auto !important;
    min-height: 0 !important;
    max-height: none !important;
  }
  .settings-actions-inline,
  .header-modal-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(132px, 1fr)) !important;
    justify-content: center !important;
    align-items: stretch !important;
    gap: 10px !important;
  }
  .settings-actions-inline .action-button-fixed,
  .header-modal-actions .action-button-fixed {
    width: 100% !important;
    min-width: 0 !important;
  }
  .modal-header {
    gap: 10px !important;
  }
  .modal-header h2 {
    line-height: 1.15;
  }
}

body.mobile-device .modal-card,
body.mobile-device .scan-details-modal-card,
body.mobile-device .log-modal-card {
  width: calc(100vw - 16px) !important;
  height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))) !important;
  max-height: calc(100dvh - max(16px, env(safe-area-inset-top)) - max(16px, env(safe-area-inset-bottom))) !important;
  min-height: 0 !important;
}

@supports not (height: 100dvh) {
  body.mobile-device .modal-card,
  body.mobile-device .scan-details-modal-card,
  body.mobile-device .log-modal-card {
    height: calc(100vh - 16px) !important;
    max-height: calc(100vh - 16px) !important;
  }
}


/* vNext91 mobile modal and scan-status clean-up. */
.modal-card,
.scan-details-modal-card,
.log-modal-card {
  overflow: hidden !important;
}

.scan-details-body,
.log-modal-body,
.modal-scroll-body,
.settings-modal-body {
  flex: 1 1 auto;
  min-height: 0;
  overflow-y: auto !important;
  overflow-x: hidden !important;
}

.scan-task-drilldown {
  min-height: 160px;
  max-height: 42dvh;
  overflow: auto !important;
}

.scan-status-chip,
.scan-status-chip:hover,
.scan-status-chip:focus {
  min-height: 28px;
  height: auto !important;
  line-height: 1.2;
}

.header-modal-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

@media (max-width: 700px) {
  .modal-header {
    align-items: flex-start;
    gap: 8px;
  }

  .modal-actions {
    justify-content: center;
  }

  #closeScanDetailsFooterButton {
    display: none !important;
  }

  .scan-details-body {
    max-height: none !important;
  }

  .scan-task-drilldown {
    min-height: 190px;
    max-height: 48dvh;
  }

  .scan-status-chip {
    flex: 1 1 calc(50% - 6px);
    text-align: center;
  }
}

/* vNext91 menu/navigation split */
.admin-menu-nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin: 0 0 1rem;
  padding: 0.5rem;
  border: 1px solid rgba(255,255,255,0.14);
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
}
.admin-nav-button {
  border: 1px solid rgba(255,255,255,0.18);
  border-radius: 999px;
  padding: 0.55rem 0.85rem;
  background: transparent;
  color: inherit;
  cursor: pointer;
  font-weight: 700;
}
.admin-nav-button.active {
  background: rgba(255,255,255,0.18);
  border-color: rgba(255,255,255,0.36);
}
.admin-panel {
  display: block;
}
.admin-panel[hidden] {
  display: none !important;
}
.admin-subsection-card {
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
}
.admin-subsection-card h3,
.admin-panel h3 {
  margin-top: 0;
}
.inline-check {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  margin: 0.5rem 0 0.75rem;
}
.admin-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.6rem;
  margin: 1rem 0;
}
@media (max-width: 720px) {
  .admin-menu-nav {
    position: sticky;
    top: 0;
    z-index: 3;
    background: var(--card-bg, #111827);
  }
  .admin-nav-button {
    flex: 1 1 calc(50% - 0.5rem);
  }
  .admin-action-row .action-button-fixed {
    flex: 1 1 calc(50% - 0.5rem);
  }
}

/* vNext92 dropdown navigation and duplicate-summary clean-up. */
.app-menu-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
}

.app-menu-dropdown {
  position: fixed;
  top: var(--app-menu-top, 72px);
  right: var(--app-menu-right, 16px);
  z-index: 10050;
  min-width: 220px;
  padding: 8px;
  border: 1px solid rgba(148, 163, 184, 0.34);
  border-radius: 16px;
  background: rgba(15, 23, 42, 0.98);
  box-shadow: 0 24px 60px rgba(0, 0, 0, 0.32);
  backdrop-filter: blur(10px);
  max-height: min(72vh, calc(100dvh - var(--app-menu-top, 72px) - 12px));
  overflow-y: auto;
}

/* vNext93: keep the dropdown above the page/options panel and do not let the hero crop it. */
.hero-header {
  overflow: visible !important;
}

.app-menu-wrap {
  z-index: 10060;
}

.app-menu-dropdown[hidden] {
  display: none !important;
}

.app-menu-dropdown button {
  width: 100%;
  display: block;
  border: 0;
  border-radius: 11px;
  padding: 10px 12px;
  background: transparent;
  color: #f8fafc;
  text-align: left;
  font-weight: 700;
  cursor: pointer;
}

.app-menu-dropdown button:hover,
.app-menu-dropdown button:focus-visible {
  background: rgba(255, 255, 255, 0.12);
  outline: none;
}

body:not(.dark-mode) .app-menu-dropdown {
  background: rgba(255, 255, 255, 0.98);
  border-color: rgba(15, 23, 42, 0.14);
}

body:not(.dark-mode) .app-menu-dropdown button {
  color: #0f172a;
}

.menu-moved-summary {
  display: none !important;
}

/* The old in-modal tab strip has been replaced by the header dropdown. */
.admin-menu-nav {
  display: none !important;
}

@media (max-width: 720px) {
  .app-menu-dropdown {
    min-width: min(260px, calc(100vw - 32px));
  }
}

/* vNext94 mobile stabilisation and menu cleanup. */
.mobile-options-button,
#optionsMenuButton {
  display: none !important;
}

.hero-header::after {
  pointer-events: none !important;
}

.results-heading,
.heading-actions,
#refreshResults {
  position: relative;
  z-index: auto;
  pointer-events: auto !important;
}

.app-menu-dropdown {
  left: var(--app-menu-left, auto);
  right: var(--app-menu-right, auto);
  max-width: calc(100vw - 24px);
  z-index: 20000 !important;
}

body.mobile-device .app-menu-dropdown {
  left: 12px !important;
  right: 12px !important;
  width: auto !important;
  min-width: 0 !important;
  max-width: calc(100vw - 24px) !important;
  max-height: min(72dvh, calc(100dvh - var(--app-menu-top, 96px) - 12px));
}

.page-header.hero-header,
body.mobile-device .page-header.hero-header {
  z-index: 120 !important;
}

.app-menu-wrap {
  z-index: 121 !important;
}
@media (max-width: 720px) {
  .app-menu-dropdown {
    left: 12px !important;
    right: 12px !important;
    width: auto !important;
    min-width: 0 !important;
    max-width: calc(100vw - 24px) !important;
    max-height: min(72dvh, calc(100dvh - var(--app-menu-top, 96px) - 12px));
  }
}

.switch-line {
  display: grid;
  grid-template-columns: 52px 1fr;
  gap: 0.75rem;
  align-items: center;
  margin: 0.75rem 0 1rem;
  font-weight: 700;
}
.switch-line input {
  position: absolute;
  opacity: 0;
  pointer-events: none;
}
.switch-ui {
  width: 52px;
  height: 30px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.55);
  background: rgba(15, 23, 42, 0.24);
  position: relative;
  display: inline-block;
  transition: background .15s ease, border-color .15s ease;
}
.switch-ui::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  border-radius: 999px;
  background: #ffffff;
  box-shadow: 0 2px 8px rgba(15, 23, 42, 0.28);
  transition: transform .15s ease;
}
.switch-line input:checked + .switch-ui {
  background: #8a2be2;
  border-color: #a855f7;
}
.switch-line input:checked + .switch-ui::after {
  transform: translateX(22px);
}

.combo-group-heading {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  padding: 0.65rem 0.85rem 0.35rem;
  font-weight: 800;
}
.combo-group-heading small {
  color: #94a3b8;
  font-weight: 700;
}

.route-browser-list {
  margin-top: .75rem;
  display: grid;
  gap: .4rem;
}
.route-browser-row {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: start;
  padding: .55rem 0;
  border-top: 1px solid rgba(148, 163, 184, .22);
}
.route-browser-row small {
  display: block;
  color: #94a3b8;
  margin-top: .15rem;
}

body:not(.dark-mode) .app-shell,
body:not(.dark-mode) .results-card,
body:not(.dark-mode) .settings-card {
  color: #0f172a;
}
body:not(.dark-mode) .results-card .hint,
body:not(.dark-mode) .results-card .small,
body:not(.dark-mode) #results td,
body:not(.dark-mode) #results th {
  color: #0f172a;
}
body:not(.dark-mode) .progress-box,
body:not(.dark-mode) .summary .badge,
body:not(.dark-mode) .summary span {
  background: #ffffff;
  color: #0f172a;
  border-color: rgba(15, 23, 42, .12);
}

@media (max-width: 720px) {
  .route-browser-row {
    grid-template-columns: 1fr;
  }
  .modal-card,
  .scan-details-modal-card,
  .log-modal-card {
    width: calc(100vw - 24px) !important;
    max-height: calc(100dvh - 24px) !important;
  }
}

/* vNext95: modal layers must sit above the hero/menu fixes from vNext94. */
.modal-backdrop {
  z-index: 30000 !important;
}

.modal-card,
.scan-details-modal-card,
.log-modal-card {
  position: relative;
  z-index: 30001 !important;
}

#airportMetadataList.progress-box {
  max-height: none !important;
  overflow: visible !important;
}

.airport-list-scroll {
  margin-top: 0;
  max-height: min(52dvh, 560px);
  min-height: 0;
  overflow: auto;
}

.airport-list-table {
  margin: 0;
}

.airport-list-table th,
.airport-list-table td {
  white-space: nowrap;
}

.status-pre {
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  margin: .4rem 0 0;
  padding: .65rem;
  border: 1px solid rgba(148, 163, 184, .28);
  border-radius: 8px;
  background: rgba(15, 23, 42, .24);
  color: inherit;
  font: 12px/1.45 ui-monospace, SFMono-Regular, Consolas, monospace;
}

.worker-count-strip {
  display: grid;
  grid-template-columns: repeat(3, minmax(110px, max-content));
  gap: 8px 18px;
  align-items: center;
  margin: 6px 0;
}

.worker-count-strip span {
  display: inline-flex;
  justify-content: space-between;
  gap: 10px;
}

@media (min-width: 921px) {
  .app-menu-dropdown [data-menu-target="search-options"] {
    display: none !important;
  }
}

@media (max-width: 720px) {
  html,
  body,
  body.mobile-device {
    background-color: #0b1020 !important;
  }
  body.mobile-device .app-shell {
    margin-top: 0 !important;
    margin-bottom: 0 !important;
  }
}
