:root {
  --navy: #17182c;
  --navy-soft: #252741;
  --accent: #7042b6;
  --accent-dark: #54308d;
  --accent-pale: #f2edfb;
  --green: #17775a;
  --red: #b42318;
  --amber: #9a6700;
  --text: #202333;
  --muted: #687083;
  --line: #dce0e8;
  --panel: #f5f6f9;
  --white: #fff;
  --focus: #2f72c4;
  --shadow: 0 10px 28px rgba(22, 24, 44, 0.08);
  font-family: "Segoe UI", Arial, sans-serif;
  color: var(--text);
  background: #eef0f5;
}

* { box-sizing: border-box; }
html { min-width: 320px; background: #eef0f5; }
body { margin: 0; min-height: 100vh; background: #eef0f5; color: var(--text); }
button, input, select, textarea { font: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; opacity: .52; }
img { max-width: 100%; }
[hidden] { display: none !important; }

.skip-link { position: fixed; left: 12px; top: -60px; z-index: 9999; padding: 10px 14px; background: var(--navy); color: #fff; border-radius: 6px; }
.skip-link:focus { top: 12px; }

.app-header { min-height: 96px; background: var(--navy); color: #fff; display: flex; align-items: center; justify-content: space-between; gap: 24px; padding: 14px clamp(18px, 3vw, 46px); }
.app-brand { display: flex; align-items: center; gap: 14px; }
.app-logo { width: 78px; height: 70px; object-fit: contain; background: #fff; padding: 4px; border-radius: 11px; box-shadow: 0 2px 10px rgba(0,0,0,.12); }
.app-brand h1 { margin: 0; font-size: 22px; letter-spacing: .01em; }
.app-brand p { margin: 4px 0 0; font-size: 13px; color: #c9cbd8; }
.header-status { display: flex; align-items: center; justify-content: flex-end; gap: 10px; flex-wrap: wrap; }
.mode-badge, .privacy-chip { display: inline-flex; align-items: center; min-height: 30px; padding: 6px 10px; border: 1px solid rgba(255,255,255,.2); border-radius: 999px; font-size: 12px; color: #e7e8f0; }
.mode-badge.demo { color: #fff4c2; border-color: #b99424; background: rgba(185,148,36,.16); font-weight: 700; }
.mode-badge.live { color: #c8f7e6; border-color: #31866b; background: rgba(49,134,107,.16); font-weight: 700; }
.mode-badge.error { color: #ffd5d2; border-color: #b42318; }

.toolbar { position: sticky; top: 0; z-index: 50; display: flex; align-items: center; gap: 8px; padding: 10px clamp(18px,3vw,46px); background: #fff; border-bottom: 1px solid var(--line); box-shadow: 0 4px 14px rgba(20,23,39,.04); }
.toolbar-spacer { flex: 1; }
.button { min-height: 38px; padding: 8px 14px; border: 1px solid #cbd0da; border-radius: 7px; background: #fff; color: #303548; font-weight: 650; line-height: 1.2; transition: border-color .15s ease, background-color .15s ease; }
.button:hover:not(:disabled) { border-color: #8d94a5; background: #f7f8fa; }
.button-primary { border-color: var(--navy); background: var(--navy); color: #fff; }
.button-primary:hover:not(:disabled) { background: var(--navy-soft); border-color: var(--navy-soft); }
.button-accent { border-color: var(--accent); background: var(--accent); color: #fff; }
.button-accent:hover:not(:disabled) { background: var(--accent-dark); border-color: var(--accent-dark); }
.button-danger-ghost { color: var(--red); border-color: #efc4c0; background: #fff; }
.button-small { min-height: 32px; padding: 6px 10px; font-size: 12px; }
.button-large { min-height: 48px; padding: 12px 25px; font-size: 15px; }
.button-block { width: 100%; }
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, summary:focus-visible { outline: 3px solid rgba(47,114,196,.26); outline-offset: 2px; border-color: var(--focus); }

.wizard-wrap { background: #fff; border-bottom: 1px solid var(--line); padding: 18px clamp(18px,3vw,46px); }
.wizard-steps { list-style: none; display: grid; grid-template-columns: repeat(3,1fr); gap: 8px; max-width: 1050px; margin: 0 auto; padding: 0; }
.wizard-step { width: 100%; display: flex; align-items: center; gap: 10px; min-height: 52px; padding: 10px 14px; border: 1px solid var(--line); background: #fff; color: var(--muted); border-radius: 9px; text-align: left; }
.wizard-step span { display: grid; place-items: center; flex: 0 0 28px; width: 28px; height: 28px; border-radius: 50%; background: #e8eaf0; color: #555d70; font-weight: 800; }
.wizard-step strong { font-size: 13px; }
.wizard-step.is-active { color: var(--navy); border-color: var(--accent); background: var(--accent-pale); }
.wizard-step.is-active span { background: var(--accent); color: #fff; }
.wizard-step.is-complete span { background: var(--green); color: #fff; }

.main-content { width: min(1480px, calc(100% - 32px)); margin: 24px auto 60px; }
.step-panel, .review-step { background: #fff; border: 1px solid var(--line); border-radius: 12px; padding: clamp(18px,3vw,34px); box-shadow: var(--shadow); }
.section-title-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 22px; padding-bottom: 22px; margin-bottom: 22px; border-bottom: 1px solid var(--line); }
.section-title-row h2 { margin: 2px 0 6px; font-size: clamp(23px,2.4vw,32px); color: var(--navy); }
.section-title-row p:not(.eyebrow) { margin: 0; color: var(--muted); max-width: 820px; }
.eyebrow { margin: 0; font-size: 10px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; color: var(--accent); }
.draft-status, .snapshot-badge, .source-badge { flex: 0 0 auto; display: inline-flex; align-items: center; min-height: 31px; padding: 6px 11px; border-radius: 999px; font-size: 12px; font-weight: 700; background: #eef0f5; color: #596074; }
.source-badge.demo, .snapshot-badge.demo { background: #fff4c2; color: #725300; }
.source-badge.live, .snapshot-badge.live { background: #dcf6eb; color: #116348; }
.source-badge.scraper, .snapshot-badge.scraper { background: #fff0d8; color: #7a3f00; border: 1px solid #edbd7a; }

.form-card { margin-bottom: 18px; padding: 22px; border: 1px solid var(--line); border-radius: 10px; background: #fff; }
.form-card-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; margin-bottom: 18px; }
.form-card-heading h3 { margin: 0; font-size: 17px; color: var(--navy); }
.form-card-heading p { margin: 4px 0 0; color: var(--muted); font-size: 13px; }
.required-note, .local-only-label { color: var(--muted); font-size: 12px; }
.local-only-label { padding: 5px 9px; border-radius: 999px; background: #eaf7f2; color: #17664d; font-weight: 700; }

.sr-only { position: absolute !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0,0,0,0) !important; white-space: nowrap !important; border: 0 !important; }
.optional-label { padding: 5px 9px; border-radius: 999px; background: #f0eef8; color: var(--accent-dark); font-size: 12px; font-weight: 750; }
.provider-fieldset { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; margin: 0; padding: 0; border: 0; }
.provider-choice { position: relative; display: grid; grid-template-columns: auto minmax(0,1fr) auto; align-items: start; gap: 11px; min-height: 104px; padding: 15px; border: 1px solid var(--line); border-radius: 9px; background: #fff; cursor: pointer; }
.provider-choice:hover { border-color: #aeb5c2; background: #fafafd; }
.provider-choice:has(input:checked) { border: 2px solid var(--accent); padding: 14px; background: var(--accent-pale); }
.provider-choice:has(input:disabled) { cursor: not-allowed; opacity: .55; background: #f4f5f7; }
.provider-choice input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--accent); }
.provider-choice-copy strong, .provider-choice-copy small { display: block; }
.provider-choice-copy strong { color: var(--navy); font-size: 14px; }
.provider-choice-copy small { margin-top: 5px; color: var(--muted); font-size: 11px; line-height: 1.45; }
.provider-tag { align-self: start; padding: 4px 7px; border-radius: 999px; background: #eceef3; color: #596074; font-size: 9px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; }
.provider-tag.recommended { background: #dcf6eb; color: #116348; }
.provider-tag.experimental { background: #fff0d8; color: #7a3f00; }
.provider-availability-note { margin: 12px 0 0; padding: 10px 12px; border-radius: 7px; background: var(--panel); color: var(--muted); font-size: 12px; line-height: 1.45; }
.provider-availability-note.warning { border: 1px solid #eed694; background: #fff8e6; color: #745b14; }

.trip-type-fieldset { display: flex; gap: 10px; margin: 0 0 20px; padding: 0; border: 0; }
.trip-type-fieldset legend { font-size: 13px; font-weight: 700; margin-bottom: 8px; }
.choice-card { position: relative; display: inline-flex; align-items: center; min-width: 130px; min-height: 42px; border: 1px solid var(--line); border-radius: 7px; padding: 9px 14px; background: #fff; }
.choice-card:has(input:checked) { border-color: var(--accent); background: var(--accent-pale); color: var(--accent-dark); font-weight: 700; }
.choice-card input { margin: 0 8px 0 0; }

.form-grid { display: grid; gap: 16px; }
.trip-grid { grid-template-columns: minmax(240px,1fr) 44px minmax(240px,1fr); align-items: start; }
.trip-grid > .field-group:nth-of-type(n+3) { grid-column: auto; }
.trip-grid .field-group:nth-of-type(3) { grid-column: 1; }
.trip-grid .field-group:nth-of-type(4) { grid-column: 2 / span 1; }
.trip-grid .field-group:nth-of-type(5) { grid-column: 3; }
.three-columns { grid-template-columns: repeat(3,minmax(0,1fr)); }
.two-columns { grid-template-columns: repeat(2,minmax(0,1fr)); }
.field-group { min-width: 0; }
.field-group label { display: block; margin: 0 0 6px; font-size: 12px; font-weight: 750; color: #3c4255; }
.field-group input, .field-group select, .field-group textarea { width: 100%; min-height: 42px; border: 1px solid #cbd0da; border-radius: 7px; background: #fff; color: var(--text); padding: 9px 11px; }
.field-group textarea { min-height: 84px; resize: vertical; }
.field-group small { display: block; margin-top: 5px; color: var(--muted); font-size: 11px; }
.field-group input[aria-invalid="true"], .field-group select[aria-invalid="true"] { border-color: var(--red); background: #fff8f7; }
.field-error { min-height: 16px; margin-top: 4px; color: var(--red); font-size: 11px; }
.swap-button { align-self: center; justify-self: center; width: 38px; height: 38px; border: 1px solid #cbd0da; border-radius: 50%; background: #fff; color: var(--accent); font-size: 20px; margin-top: 24px; }

.autocomplete-wrap { position: relative; }
.autocomplete-list { position: absolute; z-index: 70; left: 0; right: 0; top: calc(100% + 5px); max-height: 330px; overflow: auto; border: 1px solid #bdc4d1; border-radius: 8px; background: #fff; box-shadow: 0 14px 30px rgba(18,21,38,.15); }
.autocomplete-option { display: block; width: 100%; padding: 11px 12px; border: 0; border-bottom: 1px solid #eceef3; background: #fff; text-align: left; color: var(--text); }
.autocomplete-option:last-child { border-bottom: 0; }
.autocomplete-option:hover, .autocomplete-option.is-active { background: var(--accent-pale); }
.autocomplete-option strong { display: block; font-size: 13px; }
.autocomplete-option span { display: block; margin-top: 2px; font-size: 11px; color: var(--muted); }
.autocomplete-empty { padding: 14px; color: var(--muted); font-size: 12px; }
.selected-airport { min-height: 18px; margin-top: 5px; color: #47604f; font-size: 11px; }

.counter-grid { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 12px; }
.counter-field { display: flex; align-items: center; justify-content: space-between; gap: 12px; border: 1px solid var(--line); border-radius: 8px; padding: 13px; background: var(--panel); }
.counter-field strong, .counter-field small { display: block; }
.counter-field small { color: var(--muted); margin-top: 2px; font-size: 11px; }
.counter-control { display: grid; grid-template-columns: 32px 42px 32px; align-items: center; }
.counter-control button { height: 32px; border: 1px solid #cbd0da; background: #fff; color: var(--navy); font-size: 18px; }
.counter-control button:first-child { border-radius: 6px 0 0 6px; }
.counter-control button:last-child { border-radius: 0 6px 6px 0; }
.counter-control input { width: 42px; height: 32px; border: 1px solid #cbd0da; border-left: 0; border-right: 0; text-align: center; padding: 0; -moz-appearance: textfield; }
.counter-control input::-webkit-outer-spin-button, .counter-control input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.count-pill { padding: 5px 9px; border-radius: 999px; background: #eef0f5; font-size: 12px; font-weight: 700; color: #525a6e; }

.customer-bar { display: flex; align-items: flex-end; gap: 8px; margin-bottom: 16px; padding: 12px; border-radius: 8px; background: var(--panel); }
.customer-field { flex: 1; }
.privacy-note, .security-note { margin: 14px 0 0; font-size: 12px; color: var(--muted); }
.additional-passengers { display: grid; gap: 10px; }
.additional-passenger-row { display: grid; grid-template-columns: 110px minmax(180px,1fr) 130px 36px; gap: 10px; align-items: end; padding: 12px; border: 1px solid var(--line); border-radius: 8px; background: var(--panel); }
.additional-passenger-row .remove-passenger { width: 36px; height: 40px; border: 1px solid #efc4c0; background: #fff; color: var(--red); border-radius: 7px; }
.form-actions { display: flex; justify-content: space-between; align-items: center; gap: 18px; padding-top: 6px; }

.error-banner { padding: 14px 16px; margin-bottom: 18px; border: 1px solid #efb6b1; border-radius: 8px; background: #fff4f3; color: #8b1f16; }
.flight-loading { display: flex; align-items: center; justify-content: center; gap: 14px; min-height: 230px; padding: 30px; border: 1px dashed #cbd0da; border-radius: 10px; background: var(--panel); }
.flight-loading strong, .flight-loading small { display: block; }
.flight-loading small { margin-top: 4px; color: var(--muted); }
.spinner { width: 26px; height: 26px; border: 3px solid #d7d9e1; border-top-color: var(--accent); border-radius: 50%; animation: spin .8s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

.results-workspace { display: grid; grid-template-columns: 245px minmax(0,1fr); gap: 20px; align-items: start; }
.filters-card { position: sticky; top: 82px; padding: 18px; border: 1px solid var(--line); border-radius: 10px; background: var(--panel); }
.filters-card h3 { margin: 0 0 16px; font-size: 16px; }
.filters-card .field-group { margin-top: 14px; }
.toggle-row { display: flex; align-items: center; gap: 9px; padding: 9px 0; font-size: 13px; }
.toggle-row input { width: 17px; height: 17px; accent-color: var(--accent); }
.results-column { min-width: 0; }
.selection-summary { display: grid; grid-template-columns: 1fr 1fr 160px; gap: 1px; overflow: hidden; margin-bottom: 18px; border: 1px solid var(--line); border-radius: 9px; background: var(--line); }
.selection-summary > div { min-width: 0; background: #fff; padding: 11px 13px; }
.selection-summary span, .selection-summary strong { display: block; }
.selection-summary span { font-size: 10px; text-transform: uppercase; letter-spacing: .12em; color: var(--muted); }
.selection-summary strong { margin-top: 4px; font-size: 12px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.results-heading { display: flex; justify-content: space-between; align-items: end; margin: 20px 0 10px; }
.results-heading h3 { margin: 3px 0 0; color: var(--navy); }
.results-heading > span { font-size: 12px; color: var(--muted); }
.instruction-banner { margin: 0 0 10px; padding: 10px 12px; background: #f2f6fc; border-left: 3px solid #4c79b4; color: #405574; font-size: 12px; }
.flight-results { display: grid; gap: 12px; }
.flight-result-card { border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; transition: border-color .15s ease, box-shadow .15s ease; }
.flight-result-card:hover { border-color: #aeb5c2; box-shadow: 0 6px 16px rgba(20,23,39,.06); }
.flight-result-card.is-selected { border: 2px solid var(--accent); }
.result-main { display: grid; grid-template-columns: 115px minmax(0,1fr) 165px; gap: 16px; padding: 16px; align-items: center; }
.airline-identity { display: flex; flex-direction: column; align-items: flex-start; gap: 7px; }
.airline-badge-image { width: 86px; height: 34px; object-fit: contain; }
.airline-code-badge { display: grid; place-items: center; min-width: 66px; height: 34px; padding: 0 10px; border-radius: 7px; background: var(--airline-colour,var(--accent)); color: #fff; font-weight: 800; }
.airline-identity strong { font-size: 12px; }
.route-overview { min-width: 0; }
.route-line { display: grid; grid-template-columns: minmax(80px,1fr) minmax(100px,1.5fr) minmax(80px,1fr); gap: 12px; align-items: center; }
.route-point strong { display: block; font-size: 20px; color: var(--navy); }
.route-point span { display: block; margin-top: 2px; color: var(--muted); font-size: 11px; }
.route-point:last-child { text-align: right; }
.route-middle { text-align: center; }
.route-middle .duration-line { height: 1px; background: #c6cad4; position: relative; margin: 7px 0; }
.route-middle .duration-line::after { content: "✈"; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: #fff; padding: 0 7px; color: var(--accent); font-size: 12px; }
.route-middle strong { font-size: 12px; }
.route-middle span { display: block; font-size: 10px; color: var(--muted); }
.result-price { text-align: right; border-left: 1px solid var(--line); padding-left: 16px; }
.result-price span, .result-price strong { display: block; }
.result-price span { font-size: 11px; color: var(--muted); }
.result-price strong { margin: 3px 0 10px; font-size: 18px; color: var(--navy); }
.result-details { display: grid; grid-template-columns: repeat(4,minmax(0,1fr)); gap: 12px; padding: 11px 16px; background: var(--panel); border-top: 1px solid var(--line); }
.result-detail span, .result-detail strong { display: block; }
.result-detail span { font-size: 9px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); }
.result-detail strong { margin-top: 3px; font-size: 11px; }
.segment-list { padding: 11px 16px; border-top: 1px solid var(--line); }
.segment-list summary { cursor: pointer; font-size: 12px; font-weight: 700; color: #4c5265; }
.segment-row { display: grid; grid-template-columns: 90px minmax(0,1fr) 150px; gap: 12px; padding: 9px 0; border-bottom: 1px dashed #d7dae2; font-size: 11px; }
.segment-row:last-child { border-bottom: 0; }
.segment-row strong { color: var(--navy); }
.segment-row span:last-child { text-align: right; color: var(--muted); }
.empty-state { padding: 30px; text-align: center; border: 1px dashed #cbd0da; border-radius: 8px; color: var(--muted); }
.step-actions { display: flex; justify-content: space-between; gap: 12px; margin-top: 24px; padding-top: 18px; border-top: 1px solid var(--line); }

.review-layout { display: grid; grid-template-columns: 310px minmax(0,1fr); gap: 20px; align-items: start; }
.review-controls { display: grid; gap: 12px; position: sticky; top: 82px; }
.control-card { padding: 17px; border: 1px solid var(--line); border-radius: 9px; background: #fff; }
.control-card h3 { margin: 0 0 12px; font-size: 15px; color: var(--navy); }
.status-box { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px; border-radius: 7px; background: var(--panel); font-size: 12px; }
.status-box strong { color: var(--green); }
.confirmation-check { display: flex; align-items: flex-start; gap: 9px; margin-top: 12px; font-size: 12px; line-height: 1.45; }
.confirmation-check input { margin-top: 3px; accent-color: var(--accent); }
.small-help { margin: 9px 0 0; font-size: 11px; color: var(--muted); }
.settings-details { padding: 0; overflow: hidden; }
.settings-details summary { cursor: pointer; padding: 15px 17px; font-weight: 750; color: var(--navy); }
.details-body { display: grid; gap: 12px; padding: 0 17px 17px; }
.warning-box { margin: 0 17px 14px; padding: 10px; background: #fff8e6; border: 1px solid #eed694; border-radius: 7px; color: #745b14; font-size: 11px; line-height: 1.45; }
.advanced-flight-group { padding-top: 12px; border-top: 1px solid var(--line); }
.advanced-flight-group:first-child { padding-top: 0; border-top: 0; }
.advanced-flight-group h4 { margin: 0 0 9px; font-size: 12px; color: var(--accent-dark); }
.vertical-actions { display: grid; grid-template-columns: 1fr; margin-top: 0; padding-top: 0; border: 0; }
.preview-panel { min-width: 0; }
.preview-heading { display: flex; align-items: end; justify-content: space-between; margin-bottom: 10px; }
.preview-heading h3 { margin: 3px 0 0; color: var(--navy); }
.preview-heading span { font-size: 12px; color: var(--muted); }
.preview-stage { overflow: auto; min-height: 700px; padding: 22px; border: 1px solid #d6dae3; border-radius: 10px; background: #dfe2e9; }
.preview-pages { display: grid; justify-content: center; gap: 24px; }

/* A4 document */
.pdf-page { width: 794px; height: 1123px; position: relative; overflow: hidden; background: #fff; color: #202131; box-shadow: 0 4px 14px rgba(15,18,32,.16); font-family: Arial, sans-serif; --doc-accent: #7042b6; }
.pdf-header { height: 88px; display: grid; grid-template-columns: 185px 1fr 210px; align-items: center; background: #18192d; color: #fff; }
.pdf-logo-zone { height: 88px; display: flex; align-items: center; justify-content: center; padding: 12px; background: var(--doc-accent); }
.pdf-logo-zone img { max-width: 152px; max-height: 58px; object-fit: contain; }
.pdf-agency-fallback { font-size: 15px; font-weight: 800; letter-spacing: .08em; text-align: center; }
.pdf-title-zone { text-align: center; }
.pdf-title-zone strong { display: block; font-size: 14px; letter-spacing: .2em; }
.pdf-title-zone span { display: inline-block; margin-top: 7px; padding: 4px 9px; border: 1px solid #ffaaa3; border-radius: 3px; color: #ffd2cf; font-size: 9px; font-weight: 800; letter-spacing: .11em; }
.pdf-period-zone { padding-right: 26px; text-align: right; }
.pdf-period-zone span, .pdf-period-zone strong { display: block; }
.pdf-period-zone span { color: #aaaebe; font-size: 9px; letter-spacing: .18em; text-transform: uppercase; }
.pdf-period-zone strong { margin-top: 5px; font-size: 16px; }
.pdf-demo-ribbon { position: absolute; right: 18px; top: 94px; z-index: 3; transform: none; width: auto; padding: 5px 10px; border-radius: 3px; text-align: center; background: #f4c642; color: #3c3104; font-size: 9px; font-weight: 900; letter-spacing: .12em; }
.pdf-travel-strip { height: 58px; display: grid; grid-template-columns: 1fr 1fr; align-items: center; padding: 0 30px; background: #f4f1fa; border-bottom: 2px solid var(--doc-accent); }
.pdf-travel-strip.oneway { grid-template-columns: 1fr; }
.travel-date-block:last-child { text-align: right; }
.travel-date-block span, .travel-date-block strong { display: block; }
.travel-date-block span { color: var(--doc-accent); font-size: 8px; font-weight: 800; letter-spacing: .2em; text-transform: uppercase; }
.travel-date-block strong { margin-top: 4px; font: 700 15px Georgia, serif; }
.pdf-summary { height: 112px; display: grid; grid-template-columns: minmax(0,1fr) 230px; gap: 22px; align-items: center; padding: 18px 30px; }
.summary-left span, .summary-reference span { display: block; color: #8c90a0; font-size: 8px; font-weight: 800; letter-spacing: .22em; text-transform: uppercase; }
.summary-name { margin-top: 7px; font: 700 23px Georgia, serif; overflow-wrap: anywhere; }
.summary-meta { display: flex; gap: 18px; margin-top: 10px; color: #626879; font-size: 9px; }
.summary-reference { text-align: right; }
.summary-reference strong { display: block; margin-top: 6px; color: var(--doc-accent); font: 700 21px Georgia, serif; letter-spacing: .1em; }
.summary-reference small { display: block; margin-top: 8px; color: #6f7484; font-size: 8px; }
.pdf-flight-stack { padding: 0 18px; }
.pdf-flight-card { break-inside: avoid; margin-bottom: 10px; border: 1px solid #dfe1e7; }
.pdf-flight-heading { height: 43px; display: flex; align-items: center; justify-content: space-between; padding: 0 28px; background: #f7f8fa; border-bottom: 1px solid #dfe1e7; }
.pdf-flight-heading span, .pdf-flight-heading strong { display: block; }
.pdf-flight-heading span { font-size: 8px; color: #838898; letter-spacing: .2em; text-transform: uppercase; }
.pdf-flight-heading strong { margin-top: 2px; font-size: 11px; }
.pdf-flight-heading em { font-size: 8px; color: #8c91a1; font-style: italic; }
.pdf-flight-main { height: 196px; padding: 15px 28px 13px; }
.pdf-flight-topline { display: grid; grid-template-columns: minmax(0,1fr) 100px 105px 100px; gap: 12px; align-items: start; }
.pdf-airline-line { display: flex; align-items: center; gap: 10px; }
.pdf-airline-line img { width: 68px; height: 28px; object-fit: contain; }
.pdf-airline-line .code-badge { display: grid; place-items: center; min-width: 48px; height: 25px; padding: 0 7px; border-radius: 5px; color: #fff; background: var(--doc-accent); font-size: 11px; font-weight: 800; }
.pdf-airline-name { font: 700 14px Georgia, serif; }
.pdf-flight-number { margin-top: 3px; color: #777c8d; font-size: 11px; }
.pdf-stat { text-align: right; }
.pdf-stat span, .pdf-stat strong { display: block; }
.pdf-stat span { color: #9296a4; font-size: 7px; letter-spacing: .16em; text-transform: uppercase; }
.pdf-stat strong { margin-top: 4px; font-size: 10px; }
.pdf-stat.status strong { color: var(--green); }
.pdf-route { display: grid; grid-template-columns: minmax(0,1fr) 220px minmax(0,1fr); gap: 16px; align-items: center; margin-top: 16px; }
.pdf-route-point:last-child { text-align: right; }
.pdf-airport-code { font: 700 38px Georgia, serif; line-height: 1; }
.pdf-airport-name { height: 25px; margin-top: 4px; color: #606678; font: 700 9px Georgia, serif; overflow: hidden; }
.pdf-flight-time { margin-top: 5px; color: var(--doc-accent); font: 700 21px Georgia, serif; }
.pdf-time-label { margin-top: 2px; color: #9a9eac; font-size: 7px; letter-spacing: .18em; text-transform: uppercase; }
.pdf-terminal { margin-top: 4px; color: #666c7d; font-size: 9px; }
.pdf-path { text-align: center; }
.pdf-path-line { height: 1px; margin: 8px 0; background: #bfc3cd; position: relative; }
.pdf-path-line::after { content: "▶"; position: absolute; left: 50%; top: 50%; transform: translate(-50%,-50%); background: #fff; padding: 0 7px; color: var(--doc-accent); font-size: 11px; }
.pdf-path strong, .pdf-path span { display: block; }
.pdf-path strong { font-size: 9px; }
.pdf-path span { margin-top: 4px; color: #888d9b; font-size: 8px; }
.pdf-segments { margin-top: 8px; color: #666c7d; font-size: 7px; line-height: 1.4; }
.pdf-flight-details { min-height: 54px; display: grid; grid-template-columns: repeat(5,minmax(0,1fr)); background: #f1f2f5; border-top: 1px solid #dfe1e7; }
.pdf-detail { padding: 10px 14px; }
.pdf-detail span, .pdf-detail strong { display: block; }
.pdf-detail span { color: #757b8c; font-size: 7px; font-weight: 800; letter-spacing: .17em; text-transform: uppercase; }
.pdf-detail strong { margin-top: 5px; font: 700 10px Georgia, serif; overflow-wrap: anywhere; }
.pdf-passenger-section { margin: 3px 18px 0; }
.pdf-passenger-heading { display: flex; align-items: center; justify-content: space-between; padding: 8px 12px; background: #f7f8fa; border: 1px solid #dfe1e7; border-bottom: 0; }
.pdf-passenger-heading strong { font-size: 9px; letter-spacing: .16em; text-transform: uppercase; }
.pdf-passenger-heading span { font-size: 8px; color: #767c8c; }
.pdf-passenger-table { width: 100%; border-collapse: collapse; table-layout: fixed; font-size: 8px; }
.pdf-passenger-table th, .pdf-passenger-table td { padding: 6px 8px; border: 1px solid #dfe1e7; text-align: left; overflow-wrap: anywhere; }
.pdf-passenger-table th { background: #f1f2f5; color: #747a8b; font-size: 7px; letter-spacing: .12em; text-transform: uppercase; }
.pdf-contact-line { margin: 7px 18px 0; padding: 7px 10px; border: 1px solid #dfe1e7; background: #fbfbfc; font-size: 8px; color: #646a7b; }
.pdf-retrieval-note { margin: 7px 18px 0; text-align: center; color: #676d7d; font-size: 7px; }
.pdf-footer { position: absolute; left: 18px; right: 18px; bottom: 13px; min-height: 50px; display: grid; grid-template-columns: 160px 1fr 130px; align-items: end; gap: 14px; padding-top: 8px; border-top: 1px solid #dfe1e7; }
.pdf-footer-brand strong, .pdf-footer-brand span { display: block; }
.pdf-footer-brand strong { color: var(--doc-accent); font-size: 9px; }
.pdf-footer-brand span { margin-top: 3px; color: #74798a; font-size: 7px; }
.pdf-legal { text-align: center; color: #555b6c; font-size: 7px; line-height: 1.35; }
.pdf-page-number { text-align: right; color: #74798a; font-size: 7px; }
.pdf-placeholder { height: calc(100% - 88px); display: grid; place-items: center; padding: 70px; text-align: center; }
.pdf-placeholder strong { display: block; font-size: 22px; color: var(--navy); }
.pdf-placeholder span { display: block; margin-top: 10px; color: var(--muted); }
.continuation-title { padding: 25px 30px 12px; font: 700 20px Georgia,serif; color: var(--navy); }
.continuation-table-wrap { padding: 0 30px; }

.toast-region { position: fixed; right: 20px; bottom: 20px; z-index: 100; display: grid; gap: 8px; width: min(390px,calc(100% - 40px)); }
.toast { padding: 12px 14px; border: 1px solid #bfc5d1; border-radius: 8px; background: #fff; box-shadow: 0 10px 28px rgba(20,23,39,.14); font-size: 13px; }
.toast.success { border-color: #9ed3c2; background: #f0fbf7; color: #155d47; }
.toast.error { border-color: #efb6b1; background: #fff4f3; color: #8b1f16; }
.loading-overlay { position: fixed; inset: 0; z-index: 200; display: grid; place-items: center; background: rgba(16,18,31,.55); }
.loading-card { display: flex; align-items: center; gap: 13px; min-width: 250px; padding: 20px 24px; border-radius: 10px; background: #fff; box-shadow: var(--shadow); }

@media (max-width: 1180px) {
  .review-layout { grid-template-columns: 1fr; }
  .review-controls { position: static; grid-template-columns: repeat(2,minmax(0,1fr)); }
  .review-controls .vertical-actions { grid-column: 1 / -1; grid-template-columns: repeat(3,1fr); }
  .preview-stage { padding: 18px; }
}

@media (max-width: 900px) {
  .app-header { align-items: flex-start; }
  .privacy-chip { display: none; }
  .toolbar { overflow-x: auto; }
  .toolbar-spacer { min-width: 12px; }
  .wizard-step strong { display: none; }
  .wizard-step { justify-content: center; }
  .trip-grid { grid-template-columns: 1fr 44px 1fr; }
  .three-columns { grid-template-columns: 1fr; }
  .counter-grid { grid-template-columns: 1fr; }
  .results-workspace { grid-template-columns: 1fr; }
  .filters-card { position: static; display: grid; grid-template-columns: repeat(2,minmax(0,1fr)); gap: 10px 14px; }
  .filters-card h3, .filters-card .button-block { grid-column: 1 / -1; }
  .filters-card .field-group { margin-top: 0; }
  .result-main { grid-template-columns: 100px minmax(0,1fr); }
  .result-price { grid-column: 1 / -1; display: flex; justify-content: flex-end; align-items: center; gap: 14px; border-left: 0; border-top: 1px solid var(--line); padding: 10px 0 0; }
  .result-price strong { margin: 0; }
  .selection-summary { grid-template-columns: 1fr 1fr; }
  .selection-summary > div:last-child { grid-column: 1 / -1; }
}

@media (max-width: 700px) {
  .app-header { display: block; }
  .header-status { margin-top: 12px; justify-content: flex-start; }
  .main-content { width: min(100% - 18px,1480px); margin-top: 10px; }
  .step-panel, .review-step { padding: 14px; border-radius: 8px; }
  .section-title-row { display: block; }
  .section-title-row > span { margin-top: 12px; }
  .form-card { padding: 15px; }
  .trip-grid { grid-template-columns: 1fr; }
  .trip-grid .field-group, .trip-grid .field-group:nth-of-type(n) { grid-column: 1; }
  .swap-button { grid-column: 1; transform: rotate(90deg); margin: 0; }
  .trip-type-fieldset { flex-wrap: wrap; }
  .choice-card { flex: 1; min-width: 115px; }
  .customer-bar { align-items: stretch; flex-direction: column; }
  .additional-passenger-row { grid-template-columns: 1fr; }
  .additional-passenger-row .remove-passenger { width: 100%; }
  .form-actions { align-items: stretch; flex-direction: column; }
  .form-actions .button { width: 100%; }
  .filters-card { grid-template-columns: 1fr; }
  .filters-card h3, .filters-card .button-block { grid-column: 1; }
  .result-main { grid-template-columns: 1fr; }
  .airline-identity { flex-direction: row; align-items: center; }
  .route-line { grid-template-columns: 1fr; text-align: left; }
  .route-point:last-child { text-align: left; }
  .route-middle { text-align: left; }
  .result-details { grid-template-columns: repeat(2,minmax(0,1fr)); }
  .segment-row { grid-template-columns: 1fr; }
  .segment-row span:last-child { text-align: left; }
  .review-controls { grid-template-columns: 1fr; }
  .review-controls .vertical-actions { grid-column: 1; grid-template-columns: 1fr; }
  .preview-stage { padding: 10px; }
}

@media print {
  @page { size: A4 portrait; margin: 0; }
  html, body { margin: 0 !important; padding: 0 !important; background: #fff !important; -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .no-print, .review-controls, .section-title-row { display: none !important; }
  .main-content, .review-step, .review-layout, .preview-panel, .preview-stage, .preview-pages { display: block !important; width: auto !important; max-width: none !important; margin: 0 !important; padding: 0 !important; border: 0 !important; box-shadow: none !important; background: #fff !important; }
  .pdf-page { width: 210mm !important; height: 297mm !important; box-shadow: none !important; page-break-after: always; break-after: page; }
  .pdf-page:last-child { page-break-after: auto; break-after: auto; }
  .pdf-flight-card { break-inside: avoid; page-break-inside: avoid; }
}

/* SerpApi return-flight retrieval */
.flight-loading.compact {
  min-height: 92px;
  margin: 10px 0 14px;
  padding: 18px;
  justify-content: flex-start;
}
#returnSearchError { margin: 10px 0 14px; }

@media (max-width: 900px) {
  .provider-fieldset { grid-template-columns: 1fr; }
  .provider-choice { min-height: auto; }
}

/* ===== Assisted visible-browser capture ===== */
.browser-provider-group {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border, #d9deea);
  border-radius: 10px;
  background: #f8f9fc;
}
.browser-provider-group label { display:block; font-weight:700; margin-bottom:6px; }
.browser-provider-group select { width:100%; max-width:420px; }
.browser-provider-group p { margin:7px 0 0; color:#62697a; font-size:.82rem; }
.browser-capture-panel {
  margin: 18px 0;
  padding: 22px;
  border: 1px solid #c9b9e7;
  border-left: 5px solid #6e3bb2;
  border-radius: 12px;
  background: #fbf9ff;
  box-shadow: 0 8px 22px rgba(42, 31, 70, .06);
}
.browser-capture-heading { display:flex; align-items:flex-start; justify-content:space-between; gap:16px; }
.browser-capture-heading h3 { margin:2px 0 0; font-size:1.15rem; }
.browser-capture-steps { margin:16px 0; padding-left:22px; color:#34394a; line-height:1.55; }
.browser-capture-steps li + li { margin-top:5px; }
.browser-capture-actions { display:flex; flex-wrap:wrap; align-items:flex-end; gap:10px; margin-top:14px; }
.inline-source-switch { display:grid; gap:4px; min-width:210px; font-size:.8rem; font-weight:700; }
.inline-source-switch select { min-height:40px; }
.assisted-import { margin-top:18px; padding-top:15px; border-top:1px solid #ddd5ec; }
.assisted-import summary { cursor:pointer; font-weight:700; color:#3e286a; }
.assisted-import p { color:#62697a; font-size:.85rem; }
.assisted-import textarea { width:100%; resize:vertical; min-height:140px; font-family:Consolas, monospace; font-size:.85rem; margin-bottom:10px; }
@media (max-width: 700px) {
  .browser-capture-heading { display:block; }
  .browser-capture-heading .source-badge { margin-top:10px; display:inline-block; }
  .browser-capture-actions > * { width:100%; }
}

/* ===== Booking Summary PDF format v2.6 ===== */
.four-columns { grid-template-columns: 105px minmax(240px,1.7fr) minmax(220px,1fr) minmax(190px,1fr); }
.passenger-contact-grid .passenger-name-field { min-width: 0; }

.pdf-page.booking-summary-page,
.booking-summary-page * { font-family: Calibri, "Segoe UI", Arial, sans-serif; }

.booking-summary-page .pdf-header {
  height: 88px;
  grid-template-columns: 220px 1fr 210px;
  background: #17192d;
  border-bottom: 3px solid var(--doc-accent);
}
.booking-summary-page .pdf-logo-zone {
  height: 62px;
  margin: 13px 20px;
  padding: 7px 12px;
  background: #fff;
  border-radius: 7px;
  box-shadow: 0 1px 4px rgba(0,0,0,.12);
}
.booking-summary-page .pdf-logo-zone img { max-width: 176px; max-height: 49px; }
.pdf-airline-header-fallback { color: #17192d; font-size: 15px; font-weight: 800; text-align: center; }
.booking-summary-page .pdf-title-zone strong { font-size: 22px; letter-spacing: .035em; }
.booking-summary-page .pdf-period-zone span { font-size: 8px; }
.booking-summary-page .pdf-period-zone strong { font-size: 14px; }

.booking-summary-page .pdf-travel-strip {
  height: 48px;
  padding: 0 30px;
  background: #f8f4ea;
  border-bottom: 1px solid #e2ded4;
}
.booking-summary-page .travel-date-block span { color: #72798a; font-size: 7px; letter-spacing: .12em; }
.booking-summary-page .travel-date-block strong { margin-top: 3px; font: 700 12px Calibri, "Segoe UI", Arial, sans-serif; }

.booking-summary-page .pdf-summary {
  height: 82px;
  grid-template-columns: minmax(0,1fr) 210px;
  padding: 12px 30px 10px;
}
.booking-summary-page .summary-left span,
.booking-summary-page .summary-reference span { font-size: 7px; letter-spacing: .12em; }
.booking-summary-page .summary-name { margin-top: 4px; font: 700 20px Calibri, "Segoe UI", Arial, sans-serif; }
.booking-summary-page .summary-meta { margin-top: 7px; font-size: 8px; text-transform: uppercase; }
.booking-summary-page .summary-reference strong { margin-top: 4px; font: 700 20px Calibri, "Segoe UI", Arial, sans-serif; letter-spacing: .04em; }
.booking-summary-page .summary-reference small { margin-top: 5px; font-size: 8px; }

.booking-summary-page .pdf-flight-stack { padding: 0 22px; }
.booking-summary-page .pdf-flight-card { margin-bottom: 9px; border-color: #d6dbe4; }
.booking-summary-page .pdf-flight-heading { height: 38px; padding: 0 20px; }
.booking-summary-page .pdf-flight-heading span { font-size: 7px; letter-spacing: .11em; }
.booking-summary-page .pdf-flight-heading strong { font-size: 10px; }
.booking-summary-page .pdf-flight-heading em { font-size: 7px; }
.booking-summary-page .pdf-flight-main { height: 148px; padding: 12px 20px 8px; }
.booking-summary-page .pdf-flight-topline { grid-template-columns: minmax(0,1fr) 86px 80px 80px; gap: 9px; }
.booking-summary-page .pdf-airline-line { gap: 12px; }
.booking-summary-page .pdf-airline-line .code-badge { min-width: 64px; height: 28px; border-radius: 6px; font-size: 11px; }
.booking-summary-page .pdf-airline-name { font: 700 13px Calibri, "Segoe UI", Arial, sans-serif; }
.booking-summary-page .pdf-flight-number { margin-top: 2px; font-size: 9px; }
.booking-summary-page .pdf-stat span { font-size: 6.5px; }
.booking-summary-page .pdf-stat strong { margin-top: 3px; font-size: 9px; }
.booking-summary-page .pdf-stat.status strong { color: #00865e; font-size: 10px; }
.booking-summary-page .pdf-route { grid-template-columns: minmax(0,1fr) 220px minmax(0,1fr); gap: 12px; margin-top: 8px; }
.booking-summary-page .pdf-airport-code { font: 700 33px Calibri, "Segoe UI", Arial, sans-serif; }
.booking-summary-page .pdf-airport-name { height: 18px; margin-top: 2px; font: 400 8px Calibri, "Segoe UI", Arial, sans-serif; }
.booking-summary-page .pdf-flight-time { margin-top: 3px; font: 700 18px Calibri, "Segoe UI", Arial, sans-serif; }
.booking-summary-page .pdf-time-label { font-size: 6.5px; }
.booking-summary-page .pdf-terminal { margin-top: 2px; font-size: 8px; }
.booking-summary-page .pdf-path strong { font-size: 8px; }
.booking-summary-page .pdf-path span { font-size: 7px; }
.booking-summary-page .pdf-path-line { margin: 6px 0; }
.booking-summary-page .pdf-path-line::after {
  content: "";
  width: 9px;
  height: 9px;
  border-radius: 50%;
  background: var(--doc-accent);
  padding: 0;
}
.booking-summary-page .pdf-segments { margin-top: 5px; font-size: 6.2px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.booking-summary-page .pdf-flight-details { min-height: 47px; }
.booking-summary-page .pdf-detail { padding: 8px 12px; }
.booking-summary-page .pdf-detail span { font-size: 6.5px; letter-spacing: .11em; }
.booking-summary-page .pdf-detail strong { margin-top: 4px; font: 700 8.5px Calibri, "Segoe UI", Arial, sans-serif; }

.booking-summary-page .pdf-passenger-section { margin: 1px 22px 0; }
.booking-summary-page .pdf-passenger-heading { padding: 7px 11px; }
.booking-summary-page .pdf-passenger-heading strong { font-size: 8px; letter-spacing: .12em; }
.booking-summary-page .pdf-passenger-table { font-size: 7.5px; }
.booking-summary-page .pdf-passenger-table th,
.booking-summary-page .pdf-passenger-table td { padding: 4px 7px; }
.booking-summary-page .pdf-passenger-table th { font-size: 6.5px; }
.booking-summary-page .pdf-contact-line { margin: 5px 22px 0; padding: 5px 8px; font-size: 7px; }

.pdf-travel-information {
  margin: 8px 22px 0;
  padding: 10px 14px 11px;
  border: 1px solid #d8dde5;
  background: #fff;
}
.pdf-information-title { margin-bottom: 7px; color: #596173; font-size: 8px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.pdf-information-columns { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.pdf-information-columns ol { margin: 0; padding-left: 18px; color: #313747; font-size: 6.7px; line-height: 1.28; }
.pdf-information-columns li { margin: 0 0 3px; padding-left: 3px; }
.pdf-conditions { display: grid; grid-template-columns: 120px 1fr; gap: 10px; align-items: center; margin-top: 7px; padding: 7px 12px; border: 1px solid #e5ad00; border-radius: 9px; background: #fff3c7; color: #95510d; font-size: 7px; }
.pdf-conditions strong { font-size: 7.5px; }

.booking-summary-page .pdf-footer {
  min-height: 28px;
  grid-template-columns: 1fr 120px;
  align-items: center;
  padding-top: 6px;
}
.pdf-footer-note { color: #777d8b; font-size: 7px; }
.booking-summary-page .pdf-page-number { font-size: 7px; }

.booking-summary-page .pdf-demo-ribbon { top: 94px; right: 22px; }
.booking-summary-page .continuation-title { font: 700 20px Calibri, "Segoe UI", Arial, sans-serif; }

@media (max-width: 900px) {
  .four-columns { grid-template-columns: 1fr; }
}
/* Keep terminal labels visible in the compact return layout. */
.booking-summary-page .pdf-flight-main { height: 160px; }
