/* THB Go! Flights — house style: sober, premium, oxblood */
:root {
  --brand: #8A0304;
  --brand-deep: #5E0203;
  --brand-ink: #3d0102;
  --brand-tint: #f7ecea;
  --gold: #B08D57;
  --ink: #1d1717;
  --ink-2: #4a3f3d;
  --muted: #7a6e6b;
  --line: #e8dfdb;
  --line-2: #f1ebe8;
  --paper: #fbf8f6;
  --card: #ffffff;
  --ok: #1f7a4d;
  --ok-bg: #e9f5ee;
  --warn: #9a6200;
  --warn-bg: #fdf3e0;
  --err: #a31515;
  --err-bg: #fbeaea;
  --radius: 14px;
  --radius-sm: 9px;
  --shadow: 0 1px 2px rgba(40, 10, 10, .04), 0 8px 28px rgba(40, 10, 10, .07);
  --serif: 'Fraunces', Georgia, 'Times New Roman', serif;
  --sans: 'Inter', system-ui, -apple-system, 'Segoe UI', Roboto, sans-serif;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font-family: var(--sans); font-size: 15px; line-height: 1.55; color: var(--ink); background: var(--paper); }
img, svg { max-width: 100%; }
a { color: var(--brand); text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--brand-deep); }
h1, h2, h3 { font-family: var(--serif); font-weight: 500; letter-spacing: -.01em; line-height: 1.2; margin: 0 0 .4em; }
h1 { font-size: clamp(28px, 4vw, 40px); }
h2 { font-size: 22px; }
h3 { font-size: 18px; }
p { margin: 0 0 .8em; }
small { font-size: 12.5px; }
.muted { color: var(--muted); }
.small { font-size: 13px; }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: .04em; }
.upper { text-transform: uppercase; }
.upper::placeholder { text-transform: none; }
.wrap { width: 100%; max-width: 1180px; margin: 0 auto; padding: 0 16px; }
.narrow { max-width: 720px; }
.page-pad { padding-top: 32px; padding-bottom: 64px; }
.page-title { margin-bottom: 6px; }
.lead { font-size: 16px; margin-bottom: 22px; }
.eyebrow { text-transform: uppercase; letter-spacing: .14em; font-size: 11.5px; font-weight: 600; color: var(--gold); margin: 0 0 8px; }
.crumbs { margin: 0 0 12px; font-size: 14px; }
.crumbs a { text-decoration: none; color: var(--muted); }
.hp { position: absolute; left: -9999px; }

/* ---------- buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 11px 20px; border-radius: 10px; border: 1px solid var(--brand); background: var(--brand); color: #fff; font: 600 14.5px/1.2 var(--sans); text-decoration: none; cursor: pointer; transition: background .15s, transform .05s; white-space: nowrap; }
.btn:hover { background: var(--brand-deep); color: #fff; }
.btn:active { transform: translateY(1px); }
.btn-ghost { background: transparent; color: var(--brand); }
.btn-ghost:hover { background: var(--brand-tint); color: var(--brand-deep); }
.btn-light { background: #fff; color: var(--ink); border-color: var(--line); }
.btn-light:hover { background: var(--line-2); color: var(--ink); }
.btn-danger { background: #fff; border-color: #e3bcbc; color: var(--err); }
.btn-danger:hover { background: var(--err-bg); color: var(--err); }
.btn-sm { padding: 7px 13px; font-size: 13px; border-radius: 8px; }
.btn-lg { padding: 14px 26px; font-size: 15.5px; }
.btn-block { width: 100%; }
.link-btn { background: none; border: 0; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font: inherit; font-size: 14px; }
.link-btn:hover { color: var(--err); }

/* ---------- forms ---------- */
label { display: block; font-size: 13px; font-weight: 600; color: var(--ink-2); }
label small { font-weight: 400; color: var(--muted); }
input, select, textarea { display: block; width: 100%; margin-top: 6px; padding: 10px 12px; font: 15px/1.4 var(--sans); color: var(--ink); background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(138, 3, 4, .12); }
textarea { resize: vertical; }
label > small { display: block; margin-top: 4px; }
.check { display: flex; gap: 9px; align-items: flex-start; font-weight: 400; font-size: 14px; color: var(--ink); cursor: pointer; margin: 6px 0; }
.check input { width: 17px; height: 17px; margin: 2px 0 0; flex: none; accent-color: var(--brand); }
fieldset { border: 0; padding: 0; margin: 0; min-width: 0; }
legend { font-family: var(--serif); font-size: 19px; font-weight: 500; padding: 0; margin-bottom: 14px; }
.grid-2, .grid-3 { display: grid; gap: 14px; margin-bottom: 14px; }
.grid-2 { grid-template-columns: repeat(2, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.form-stack > * + * { margin-top: 14px; }
.form-stack .grid-2, .form-stack .grid-3 { margin-bottom: 0; }

/* ---------- alerts + badges ---------- */
.alert { padding: 12px 16px; border-radius: 10px; margin: 0 0 16px; font-size: 14.5px; border: 1px solid transparent; }
.alert ul { margin: 6px 0 0; padding-left: 18px; }
.alert-ok { background: var(--ok-bg); color: var(--ok); border-color: #cfe8d9; }
.alert-error { background: var(--err-bg); color: var(--err); border-color: #f0cccc; }
.alert-warn { background: var(--warn-bg); color: var(--warn); border-color: #f1dfb7; }
.flash-wrap { padding-top: 18px; }
.badge { display: inline-block; padding: 4px 10px; border-radius: 99px; font-size: 12px; font-weight: 600; white-space: nowrap; }
.badge-pending_payment { background: var(--warn-bg); color: var(--warn); }
.badge-payment_submitted { background: #e8eefb; color: #2848a0; }
.badge-confirmed { background: #e6f2f4; color: #12636f; }
.badge-ticketed { background: var(--ok-bg); color: var(--ok); }
.badge-cancelled { background: #efeceb; color: #7a6e6b; }
.badge-new { background: var(--warn-bg); color: var(--warn); }
.badge-quoted { background: #e8eefb; color: #2848a0; }
.badge-booked { background: var(--ok-bg); color: var(--ok); }
.badge-closed { background: #efeceb; color: #7a6e6b; }
.tag { display: inline-block; font: 600 11px var(--sans); text-transform: uppercase; letter-spacing: .08em; padding: 3px 8px; border-radius: 6px; background: var(--brand-tint); color: var(--brand); vertical-align: middle; margin-left: 6px; }

/* ---------- chips, progress, groups ---------- */
.chip { display: inline-block; padding: 3px 9px; border-radius: 99px; font-size: 12px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.chip-ok { background: var(--ok-bg); color: var(--ok); } .chip-warn { background: var(--warn-bg); color: var(--warn); }
.grid-4 { display: grid; grid-template-columns: repeat(4, minmax(0,1fr)); gap: 14px; margin-bottom: 14px; }
.progress { height: 8px; border-radius: 4px; background: var(--line-2); overflow: hidden; margin: 10px 0 4px; }
.progress i { display: block; height: 100%; background: var(--brand); }
.tmpl { background: var(--paper); border: 1px solid var(--line); border-radius: 8px; padding: 8px 10px; overflow-x: auto; font-size: 13px; margin: 0 0 8px; }
.timeline.six { grid-template-columns: repeat(6, minmax(0,1fr)); }
.big-num { font: 600 20px var(--serif); display: block; }
.offer-card { border-color: var(--brand); }
.steps-list { padding-left: 18px; margin: 0; font-size: 14px; line-height: 1.7; }
@media (max-width: 720px) { .grid-4 { grid-template-columns: 1fr 1fr; } .timeline.six { grid-template-columns: repeat(3, minmax(0,1fr)); row-gap: 14px; } }

/* ---------- header / footer ---------- */
.notice-bar { background: var(--brand-ink); color: #f6e6d6; text-align: center; font-size: 13.5px; padding: 8px 16px; }
.site-header { background: #fff; border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 40; }
.header-row { display: flex; align-items: center; justify-content: space-between; height: 66px; }
.logo { display: inline-flex; align-items: center; gap: 10px; text-decoration: none; color: var(--ink); }
.logo-mark { display: inline-grid; place-items: center; width: 40px; height: 40px; border-radius: 10px; background: var(--brand); color: #fff; font: 700 13px var(--sans); letter-spacing: .06em; }
.logo-text { font: 600 20px var(--serif); letter-spacing: -.01em; }
.logo-text em { font-style: italic; font-weight: 400; color: var(--brand); }
.logo-light { color: #fff; }
.logo-light .logo-mark { background: #fff; color: var(--brand); }
.logo-light .logo-text em { color: #e8c9a8; }
.site-nav { display: flex; gap: 4px; }
.site-nav a { padding: 8px 14px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 500; font-size: 14.5px; }
.site-nav a:hover { background: var(--line-2); color: var(--ink); }
.nav-toggle { display: none; background: none; border: 0; width: 40px; height: 40px; cursor: pointer; padding: 10px 8px; }
.nav-toggle span { display: block; height: 2px; background: var(--ink); margin: 6px 0; border-radius: 2px; transition: transform .2s; }

.site-footer { background: var(--brand-ink); color: #e9d9d4; margin-top: 40px; }
.footer-grid { display: grid; grid-template-columns: 1.2fr 1fr .8fr; gap: 40px; padding-top: 48px; padding-bottom: 36px; }
.site-footer h4 { font: 600 12px var(--sans); text-transform: uppercase; letter-spacing: .14em; color: #d3b48f; margin: 4px 0 14px; }
.footer-note { margin-top: 14px; color: #cdb7b1; max-width: 340px; font-size: 14px; }
.contact-block { font-style: normal; font-size: 14px; line-height: 1.75; color: #f1e3df; }
.footer-links { list-style: none; padding: 0; margin: 0; font-size: 14px; line-height: 2; }
.footer-links a, .footer-base a { color: #f1e3df; text-decoration: none; }
.footer-links a:hover, .footer-base a:hover { color: #fff; text-decoration: underline; }
.footer-base { display: flex; justify-content: space-between; gap: 16px; border-top: 1px solid rgba(255, 255, 255, .12); padding-top: 18px; padding-bottom: 22px; font-size: 13px; color: #bfa8a2; }
.wa-float { position: fixed; right: 18px; bottom: 18px; width: 54px; height: 54px; border-radius: 50%; background: #1fa855; color: #fff; display: grid; place-items: center; box-shadow: 0 8px 24px rgba(0, 0, 0, .2); z-index: 50; }
.wa-float:hover { color: #fff; background: #198f48; }

/* ---------- hero ---------- */
.hero { position: relative; overflow-x: clip; background: radial-gradient(120% 140% at 85% 0%, #a3191a 0%, var(--brand) 38%, var(--brand-ink) 100%); color: #fff; padding: 56px 0 44px; }
.hero-arcs { position: absolute; inset: 0; width: 100%; height: 100%; pointer-events: none; }
.hero-arcs path { fill: none; stroke: rgba(255, 228, 200, .14); stroke-width: 1.2; stroke-dasharray: 2 7; }
.hero-inner { position: relative; max-width: 1180px; margin-bottom: 28px; }
.hero h1 { max-width: 720px; color: #fff; font-size: clamp(32px, 5vw, 52px); font-weight: 400; }
.hero .eyebrow { color: #e8c9a8; }
.hero-sub { max-width: 600px; font-size: 17px; color: #f2dcd6; }

/* ---------- search card ---------- */
.search-card { position: relative; background: #fff; color: var(--ink); border-radius: 18px; padding: 18px; box-shadow: 0 20px 60px rgba(30, 0, 0, .28); }
.search-card.compact { box-shadow: var(--shadow); border: 1px solid var(--line); padding: 14px; }
.trip-toggle { display: inline-flex; background: var(--line-2); border-radius: 10px; padding: 3px; margin-bottom: 14px; }
.trip-toggle label { position: relative; }
.trip-toggle input { position: absolute; inset: 0; width: 1px; height: 1px; margin: 0; padding: 0; opacity: 0; pointer-events: none; }
.trip-toggle span { display: block; padding: 7px 15px; border-radius: 8px; font-size: 13.5px; font-weight: 600; color: var(--muted); cursor: pointer; }
.trip-toggle input:checked + span { background: #fff; color: var(--brand); box-shadow: 0 1px 3px rgba(0, 0, 0, .08); }
.trip-toggle input:focus-visible + span { outline: 2px solid var(--brand); }
.search-grid { display: grid; grid-template-columns: 1fr auto 1fr .8fr .8fr 1.1fr auto; gap: 10px; align-items: end; }
.field { position: relative; display: block; margin: 0; }
.field-label { display: block; font-size: 11.5px; font-weight: 600; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); margin-bottom: 6px; }
.field input, .pax-btn { margin: 0; height: 50px; font-size: 15.5px; font-weight: 500; }
.search-card:not(.is-round) .field-return { opacity: .45; }
.search-card:not(.is-round) .field-return input { background: var(--line-2); }
.swap-btn { width: 36px; height: 36px; margin-bottom: 7px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--brand); cursor: pointer; display: grid; place-items: center; transition: transform .25s; }
.swap-btn:hover { background: var(--brand-tint); }
.swap-btn.turned { transform: rotate(180deg); }
.btn-search { height: 50px; padding: 0 22px; }
.ap-list { display: none; position: absolute; top: calc(100% + 6px); left: 0; width: max(100%, 330px); background: #fff; border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); z-index: 30; max-height: 340px; overflow-y: auto; padding: 6px; }
.ap-list.open { display: block; }
.ap-item { display: flex; gap: 12px; align-items: center; padding: 9px 10px; border-radius: 8px; cursor: pointer; }
.ap-item:hover, .ap-item.active { background: var(--brand-tint); }
.ap-code { flex: none; width: 44px; text-align: center; font: 700 13px var(--sans); letter-spacing: .05em; color: var(--brand); background: #fff; border: 1px solid var(--line); border-radius: 6px; padding: 4px 0; }
.ap-text strong { display: block; font-size: 14px; font-weight: 600; }
.ap-text small { color: var(--muted); }
.ap-empty { padding: 12px; font-size: 14px; color: var(--muted); }
.pax-btn { width: 100%; text-align: left; padding: 0 12px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius-sm); cursor: pointer; font-family: var(--sans); color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.pax-pop { position: absolute; right: 0; top: calc(100% + 6px); width: 300px; background: #fff; border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow); padding: 16px; z-index: 30; }
.pax-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.pax-row small { display: block; color: var(--muted); font-size: 12px; }
.stepper { display: flex; align-items: center; gap: 8px; }
.stepper button { width: 32px; height: 32px; border-radius: 50%; border: 1px solid var(--line); background: #fff; color: var(--brand); font-size: 18px; line-height: 1; cursor: pointer; }
.stepper button:disabled { opacity: .35; cursor: default; }
.stepper input { width: 34px; margin: 0; padding: 4px 0; text-align: center; border: 0; font-weight: 600; background: transparent; -moz-appearance: textfield; }
.stepper input::-webkit-outer-spin-button, .stepper input::-webkit-inner-spin-button { -webkit-appearance: none; }
.pax-cabin { margin: 12px 0 8px; }
.pax-hint { font-size: 12px; color: var(--muted); margin: 0 0 12px; }

/* ---------- sections (home) ---------- */
.section { padding: 56px 0; }
.section-tint { background: #f5efec; }
.section-head { display: flex; justify-content: space-between; align-items: baseline; gap: 16px; flex-wrap: wrap; margin-bottom: 22px; }
.section-head h2 { font-size: 28px; margin: 0; }
.section-head p { margin: 0; }
.route-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; }
.route-card { display: block; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; text-decoration: none; color: var(--ink); transition: border-color .15s, box-shadow .15s, transform .15s; }
.route-card:hover { border-color: #d7c3bd; box-shadow: var(--shadow); transform: translateY(-2px); color: var(--ink); }
.route-codes { display: flex; align-items: center; gap: 8px; font: 600 13px var(--sans); letter-spacing: .08em; color: var(--muted); }
.route-codes i { flex: 1; height: 1px; background: repeating-linear-gradient(90deg, var(--line) 0 4px, transparent 4px 8px); position: relative; }
.route-codes i::after { content: '✈'; position: absolute; right: -2px; top: -9px; font-style: normal; color: var(--brand); font-size: 13px; }
.route-city { font: 500 22px var(--serif); margin: 12px 0 14px; }
.route-city small { display: block; font: 400 13px var(--sans); color: var(--muted); }
.route-meta { display: flex; justify-content: space-between; align-items: baseline; font-size: 13px; border-top: 1px solid var(--line-2); padding-top: 12px; }
.route-meta strong { font-size: 16px; color: var(--brand); }
.steps { list-style: none; margin: 0; padding: 0; display: grid; grid-template-columns: repeat(4, 1fr); gap: 18px; }
.steps li { background: #fff; border-radius: var(--radius); padding: 22px; border: 1px solid var(--line); }
.steps li > span { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; background: var(--brand); color: #fff; font-weight: 700; margin-bottom: 14px; }
.steps p { color: var(--muted); font-size: 14px; margin: 0; }
.promise-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 28px; }
.promise-grid > div { border-top: 2px solid var(--brand); padding-top: 16px; }
.promise-grid p { font-size: 14px; }

/* ---------- results ---------- */
.search-band { background: #f3ece9; border-bottom: 1px solid var(--line); padding: 18px 0; }
.results-wrap { padding-top: 26px; padding-bottom: 60px; }
.results-head h1 { font-size: 30px; margin: 0 0 4px; }
.results-head .arrow { color: var(--brand); font-family: var(--sans); font-weight: 300; }
.date-strip { display: grid; grid-template-columns: repeat(7, 1fr); gap: 8px; margin: 20px 0 22px; }
.date-strip a { display: block; text-align: center; padding: 10px 6px; border-radius: 10px; border: 1px solid var(--line); background: #fff; text-decoration: none; color: var(--ink); }
.date-strip a span { display: block; font-size: 12px; color: var(--muted); }
.date-strip a strong { font-size: 14px; }
.date-strip a:hover { border-color: #d7c3bd; }
.date-strip a.active { border-color: var(--brand); background: var(--brand); color: #fff; }
.date-strip a.active span { color: #f2d4cf; }
.results-layout { display: grid; grid-template-columns: 240px minmax(0, 1fr); gap: 24px; align-items: start; }
.results-layout > *, .book-layout > *, .admin-grid > * { min-width: 0; }
.filters { position: sticky; top: 84px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 16px; }
.filter-block + .filter-block { border-top: 1px solid var(--line-2); margin-top: 14px; padding-top: 14px; }
.filter-toggle { display: none; }
.filter-title { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .1em; color: var(--muted); font-weight: 600; margin-bottom: 8px; }
.flight-card { display: grid; grid-template-columns: 1fr 210px; background: #fff; border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 14px; overflow: hidden; transition: box-shadow .15s, border-color .15s; }
.flight-card:hover { border-color: #dccbc6; box-shadow: var(--shadow); }
.fc-main { padding: 18px 20px; }
.fc-price { padding: 18px; border-left: 1px dashed var(--line); display: flex; flex-direction: column; align-items: flex-end; justify-content: center; gap: 4px; text-align: right; background: linear-gradient(180deg, #fff, #fcf9f8); }
.fc-amount { font: 600 26px var(--serif); color: var(--ink); }
.fc-price .btn { margin-top: 10px; width: 100%; }
.seats-warn { font-size: 12px; font-weight: 600; color: var(--err); }
.fare-rules { margin-top: 10px; font-size: 13px; }
.fare-rules summary { cursor: pointer; color: var(--brand); font-weight: 500; }
.fare-rules p { margin: 8px 0 0; color: var(--ink-2); }
.empty, .empty-filter { text-align: center; padding: 48px 20px; background: #fff; border: 1px dashed var(--line); border-radius: var(--radius); }
.picked { background: #fff; border: 1px solid var(--brand); border-radius: var(--radius); padding: 14px 18px; margin-top: 18px; }
.picked-head { display: flex; justify-content: space-between; font-size: 13px; font-weight: 600; color: var(--brand); margin-bottom: 6px; text-transform: uppercase; letter-spacing: .08em; }

/* ---------- segment ---------- */
.segment + .segment { border-top: 1px solid var(--line-2); margin-top: 14px; padding-top: 14px; }
.segment-label { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .1em; color: var(--gold); margin-bottom: 10px; }
.segment-row { display: flex; flex-direction: column; gap: 12px; }
.seg-airline { display: flex; gap: 10px; align-items: center; }
.seg-airline strong { display: block; font-size: 14px; }
.seg-airline small { color: var(--muted); }
.al-tile { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--al, var(--brand)); color: #fff; font: 700 11.5px var(--sans); letter-spacing: .04em; flex: none; }
.seg-times { display: grid; grid-template-columns: auto 1fr auto; gap: 14px; align-items: center; }
.seg-times > div:not(.seg-line) strong { display: block; font-size: 22px; font-weight: 600; font-variant-numeric: tabular-nums; }
.seg-times sup { font-size: 11px; color: var(--err); margin-left: 2px; }
.seg-times > div:last-child { text-align: right; }
.seg-times span { font-weight: 600; font-size: 13px; letter-spacing: .06em; }
.seg-times small { display: block; color: var(--muted); font-size: 12px; }
.seg-line { text-align: center; font-size: 12px; }
.seg-line small { color: var(--muted); }
.seg-line i { display: block; height: 1px; background: var(--line); margin: 5px 0; position: relative; }
.seg-line i::before, .seg-line i::after { content: ''; position: absolute; top: -3px; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid var(--brand); background: #fff; }
.seg-line i::before { left: 0; }
.seg-line i::after { right: 0; background: var(--brand); }
.seg-facts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 12px; }
.seg-facts span { font-size: 12px; background: var(--line-2); color: var(--ink-2); padding: 3px 9px; border-radius: 99px; }

/* ---------- booking ---------- */
.card { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; margin-bottom: 18px; }
.card h2 { font-size: 20px; }
.book-layout { display: grid; grid-template-columns: 1fr 380px; gap: 24px; align-items: start; }
.summary { position: sticky; top: 84px; }
.summary .segment-row .seg-times strong { font-size: 18px; }
.price-lines { margin: 18px 0 10px; border-top: 1px solid var(--line); padding-top: 12px; }
.price-lines > div { display: flex; justify-content: space-between; padding: 4px 0; font-size: 14px; }
.price-lines dt { color: var(--ink-2); }
.price-lines dd { margin: 0; font-variant-numeric: tabular-nums; }
.price-lines .total { border-top: 1px solid var(--line); margin-top: 8px; padding-top: 12px; font-weight: 700; font-size: 17px; }
.price-lines .total dd { color: var(--brand); font-family: var(--serif); font-size: 22px; }
.agree { margin: 4px 0 18px; }
.booking-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 20px; flex-wrap: wrap; }
.booking-head h1.ref { font-family: ui-monospace, Menlo, Consolas, monospace; letter-spacing: .12em; font-weight: 600; margin: 0; }
.booking-status .badge { font-size: 14px; padding: 7px 14px; }
.timeline { list-style: none; display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; margin: 0 0 24px; counter-reset: t; }
.timeline li { position: relative; padding-top: 22px; font-size: 13px; color: var(--muted); font-weight: 500; }
.timeline li span { position: absolute; top: 0; left: 0; width: 14px; height: 14px; border-radius: 50%; background: #fff; border: 2px solid var(--line); z-index: 1; }
.timeline li::before { content: ''; position: absolute; top: 6px; left: 0; right: 0; height: 2px; background: var(--line); }
.timeline li.done, .timeline li.current { color: var(--ink); }
.timeline li.done span { background: var(--brand); border-color: var(--brand); }
.timeline li.done::before { background: var(--brand); }
.timeline li.current span { border-color: var(--brand); box-shadow: 0 0 0 4px rgba(138, 3, 4, .14); }
.pay-card { border-color: #e2c9c2; }
.pay-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; flex-wrap: wrap; }
.pay-head h2 { font-size: 26px; margin-bottom: 2px; }
.countdown { text-align: right; background: var(--line-2); border-radius: 10px; padding: 8px 14px; }
.countdown small { display: block; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; }
.countdown strong { font-variant-numeric: tabular-nums; font-size: 20px; }
.countdown.urgent { background: var(--err-bg); color: var(--err); }
.pay-methods { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 12px; margin: 16px 0 12px; }
.pay-method { border: 1px solid var(--line); border-radius: 10px; padding: 14px; background: var(--paper); }
.pay-method h3 { font-family: var(--sans); font-size: 14px; font-weight: 700; color: var(--brand); margin-bottom: 4px; }
.pay-method p { font-size: 14px; margin: 0; }
.form-inline-grid { display: grid; grid-template-columns: 1fr 1.2fr 1.2fr auto; gap: 12px; align-items: end; margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.info-card h2 { margin-bottom: 6px; }
.info-card.success { border-color: #bfdfcc; background: linear-gradient(180deg, #f3faf6, #fff); }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 11px 10px; border-bottom: 1px solid var(--line-2); vertical-align: top; }
.table tr:last-child td { border-bottom: 0; }
.sub-title { font-size: 18px; margin-top: 30px; }
.list-links { display: grid; gap: 8px; }
.list-links a { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 16px; background: #fff; border: 1px solid var(--line); border-radius: 10px; text-decoration: none; color: var(--ink); }
.verify { text-align: center; padding: 34px 20px; border-radius: var(--radius); margin-bottom: 18px; }
.verify-ok { background: var(--ok-bg); color: #164f33; }
.verify-bad { background: var(--err-bg); color: #6d1010; }
.verify-icon { width: 64px; height: 64px; border-radius: 50%; display: grid; place-items: center; margin: 0 auto 14px; font-size: 30px; color: #fff; background: var(--ok); }
.verify-bad .verify-icon { background: var(--err); }
.kv > div { display: grid; grid-template-columns: 140px 1fr; gap: 12px; padding: 9px 0; border-bottom: 1px solid var(--line-2); }
.kv > div:last-child { border-bottom: 0; }
.kv dt { color: var(--muted); font-size: 13.5px; }
.kv dd { margin: 0; }
.prose p { font-size: 15.5px; color: var(--ink-2); }

/* ---------- e-ticket ---------- */
.ticket-page { background: #ece6e3; padding: 24px 12px 60px; }
.ticket-tools { max-width: 820px; margin: 0 auto 14px; display: flex; justify-content: space-between; align-items: center; }
.ticket-tools a { text-decoration: none; }
.eticket { max-width: 820px; margin: 0 auto; background: #fff; border-radius: 16px; overflow: hidden; box-shadow: var(--shadow); }
.eticket section { padding: 20px 30px; }
.eticket h2 { font-family: var(--sans); font-size: 12px; text-transform: uppercase; letter-spacing: .14em; color: var(--gold); font-weight: 700; margin-bottom: 10px; }
.et-head { display: flex; justify-content: space-between; align-items: center; padding: 22px 30px; background: var(--brand); color: #fff; }
.et-head .logo { color: #fff; }
.et-head .logo-mark { background: #fff; color: var(--brand); }
.et-head .logo-text em { color: #e8c9a8; }
.et-title { text-align: right; }
.et-title span { display: block; font-size: 12px; text-transform: uppercase; letter-spacing: .12em; color: #f0d2cc; }
.et-title strong { font: 500 20px var(--serif); }
.et-refs { display: grid; grid-template-columns: repeat(3, 1fr) auto; gap: 16px; align-items: center; border-bottom: 1px dashed var(--line); }
.et-refs small { display: block; color: var(--muted); font-size: 11.5px; text-transform: uppercase; letter-spacing: .08em; }
.et-refs strong { font-size: 20px; }
.et-qr { text-align: center; }
.et-qr #qr { width: 112px; height: 112px; }
.et-qr #qr svg { width: 112px; height: 112px; display: block; }
.et-leg { border: 1px solid var(--line); border-radius: 12px; margin-bottom: 12px; overflow: hidden; }
.et-leg-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 10px 16px; background: var(--paper); font-size: 13px; flex-wrap: wrap; }
.et-leg-head .al-tile { width: 24px; height: 24px; font-size: 9px; border-radius: 5px; vertical-align: middle; }
.et-leg-body { display: grid; grid-template-columns: 1fr 140px 1fr; gap: 12px; padding: 16px; align-items: center; }
.et-leg-body > div:last-child { text-align: right; }
.et-leg-body strong { display: block; font-size: 26px; font-weight: 600; }
.et-leg-body span { display: block; font-weight: 600; }
.et-leg-body small { display: block; color: var(--muted); font-size: 12px; }
.et-mid { text-align: center; }
.et-mid i { display: block; height: 1px; background: var(--brand); margin: 6px 0; }
.et-leg-foot { display: flex; flex-wrap: wrap; gap: 18px; padding: 10px 16px; border-top: 1px solid var(--line-2); font-size: 12.5px; color: var(--ink-2); }
.et-notes p { font-size: 13.5px; }
.et-foot { padding: 18px 30px; background: var(--paper); border-top: 1px solid var(--line); font-size: 12.5px; color: var(--ink-2); line-height: 1.7; }

/* ---------- install ---------- */
.install-page { padding: 40px 16px; }
.install-card { max-width: 620px; margin: 0 auto; background: #fff; border: 1px solid var(--line); border-radius: 18px; padding: 30px; box-shadow: var(--shadow); }
.install-card h1 { font-size: 28px; margin-top: 22px; }
.install-card fieldset { border-top: 1px solid var(--line-2); padding-top: 14px; margin-bottom: 14px; }
.install-card legend { font-size: 16px; }
.install-card label { margin-bottom: 12px; }
.row-actions { display: flex; gap: 10px; flex-wrap: wrap; }

/* =================================================================== */
/* ---------- admin ---------- */
.admin { background: linear-gradient(to right, var(--brand-ink) 236px, #f6f2f0 236px); }
@media (max-width: 860px) { .admin { background: #f6f2f0; } }
.admin-shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.admin-side { background: var(--brand-ink); color: #ead9d4; padding: 20px 14px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.admin-side .logo { color: #fff; margin: 0 6px 26px; }
.admin-side .logo-mark { background: #fff; color: var(--brand); }
.admin-side .logo-text em { color: #e8c9a8; }
.admin-nav a { display: flex; justify-content: space-between; align-items: center; padding: 9px 12px; border-radius: 8px; color: #e4cfc9; text-decoration: none; font-size: 14px; font-weight: 500; margin-bottom: 2px; }
.admin-nav a:hover { background: rgba(255, 255, 255, .07); color: #fff; }
.admin-nav a.active { background: rgba(255, 255, 255, .12); color: #fff; }
.admin-nav .count { background: #d9a441; color: #2a1500; font-size: 11.5px; font-weight: 700; border-radius: 99px; padding: 1px 8px; }
.admin-nav hr { border: 0; border-top: 1px solid rgba(255, 255, 255, .1); margin: 12px 0; }
.admin-user { margin-top: 26px; font-size: 12.5px; color: #bda39c; padding: 0 12px; }
.admin-user a { color: #e8c9a8; }
.admin-main { padding: 26px 30px 60px; min-width: 0; }
.admin-top { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 20px; flex-wrap: wrap; }
.admin-top h1 { font-size: 28px; margin: 0; }
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 22px; }
.kpi { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); padding: 18px; }
.kpi small { display: block; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .08em; font-weight: 600; }
.kpi strong { display: block; font: 600 28px var(--serif); margin-top: 6px; }
.kpi a { font-size: 13px; }
.toolbar { display: flex; gap: 10px; flex-wrap: wrap; align-items: end; margin-bottom: 16px; }
.toolbar label { margin: 0; }
.toolbar input, .toolbar select { margin-top: 4px; padding: 8px 10px; font-size: 14px; }
.admin .table { background: #fff; }
.table-wrap { background: #fff; border: 1px solid var(--line); border-radius: var(--radius); overflow-x: auto; }
.table-wrap .table td, .table-wrap .table th { white-space: nowrap; }
.table tr.row-link { cursor: pointer; }
.table tr.row-link:hover td { background: #fcf8f7; }
.table .num { text-align: right; font-variant-numeric: tabular-nums; }
.admin-grid { display: grid; grid-template-columns: 1fr 330px; gap: 20px; align-items: start; }
.actions-card form + form { margin-top: 16px; padding-top: 16px; border-top: 1px solid var(--line-2); }
.actions-card h3 { font-family: var(--sans); font-size: 14px; font-weight: 700; margin-bottom: 8px; }
.actions-card label { margin-bottom: 10px; }
.log { list-style: none; padding: 0; margin: 0; font-size: 13px; }
.log li { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
.log li small { display: block; color: var(--muted); }
.inactive td { color: var(--muted); }
.inline-form { display: inline; }
.days-pick { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.days-pick label { display: inline-flex; align-items: center; gap: 5px; border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; font-weight: 500; cursor: pointer; background: #fff; }
.days-pick input { width: auto; margin: 0; accent-color: var(--brand); }
.pager { display: flex; gap: 6px; margin-top: 14px; }
.pager a, .pager span { padding: 6px 12px; border: 1px solid var(--line); border-radius: 8px; background: #fff; text-decoration: none; font-size: 13.5px; }
.pager span { background: var(--brand); color: #fff; border-color: var(--brand); }
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; background: radial-gradient(120% 120% at 80% 0%, #a3191a 0%, var(--brand) 40%, var(--brand-ink) 100%); }
.login-card { width: 100%; max-width: 380px; background: #fff; border-radius: 18px; padding: 30px; box-shadow: 0 30px 80px rgba(0, 0, 0, .35); }
.login-card h1 { font-size: 24px; margin: 20px 0 16px; }
.login-card label { margin-bottom: 14px; }

/* ---------- responsive ---------- */
@media (max-width: 1080px) {
  .search-grid { grid-template-columns: 1fr auto 1fr; }
  .search-grid .field:nth-of-type(3) { grid-column: 1; }
  .search-grid .field-return { grid-column: 2 / 4; }
  .search-grid .pax-field { grid-column: 1 / 3; }
  .route-grid { grid-template-columns: repeat(2, 1fr); }
  .steps, .promise-grid { grid-template-columns: repeat(2, 1fr); }
  .book-layout, .admin-grid { grid-template-columns: 1fr; }
  .summary { position: static; order: -1; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
}
@media (max-width: 860px) {
  .results-layout { grid-template-columns: 1fr; }
  .filters { position: static; display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
  .filter-block + .filter-block { border: 0; margin: 0; padding: 0; }
  .admin-shell { grid-template-columns: 1fr; }
  .admin-side { position: static; height: auto; }
  .admin-nav { display: flex; flex-wrap: wrap; gap: 4px; }
  .admin-nav hr { display: none; }
  .admin-main { padding: 20px 16px 50px; }
}
@media (max-width: 720px) {
  body { font-size: 14.5px; }
  .nav-toggle { display: block; }
  .site-nav { display: none; position: absolute; top: 66px; left: 0; right: 0; background: #fff; border-bottom: 1px solid var(--line); flex-direction: column; padding: 8px 16px 14px; }
  .nav-open .site-nav { display: flex; }
  .nav-open .nav-toggle span:first-child { transform: translateY(4px) rotate(45deg); }
  .nav-open .nav-toggle span:last-child { transform: translateY(-4px) rotate(-45deg); }
  .hero { padding: 36px 0 28px; }
  .hero-sub { font-size: 15.5px; }
  .search-card { padding: 14px; border-radius: 14px; }
  .search-grid { grid-template-columns: 1fr; gap: 10px; }
  .search-grid > * { grid-column: auto !important; }
  .swap-btn { position: relative; justify-self: end; margin: -26px 14px -24px 0; z-index: 2; transform: rotate(90deg); }
  .swap-btn.turned { transform: rotate(270deg); }
  .search-grid .field-return, .search-grid .field:nth-of-type(3) { grid-column: auto; }
  .search-card:not(.is-round) .field-return { display: none; }
  .pax-pop { left: 0; right: auto; width: 100%; }
  .btn-search { width: 100%; }
  .route-grid, .steps, .promise-grid { grid-template-columns: 1fr; }
  .grid-2, .grid-3 { grid-template-columns: 1fr; }
  .date-strip { grid-template-columns: repeat(7, 92px); overflow-x: auto; padding-bottom: 4px; }
  .filters { grid-template-columns: 1fr auto; align-items: end; }
  .filter-toggle { display: inline-flex; }
  .filters .filter-block:not(:first-of-type) { display: none; }
  .filters.open .filter-block { display: block; }
  .filters.open { grid-template-columns: 1fr 1fr; }
  .flight-card { grid-template-columns: 1fr; }
  .fc-price { border-left: 0; border-top: 1px dashed var(--line); flex-direction: row; flex-wrap: wrap; justify-content: space-between; align-items: center; text-align: left; }
  .fc-price .btn { width: auto; margin: 0; }
  .fc-amount { font-size: 22px; }
  .seg-times > div:not(.seg-line) strong { font-size: 19px; }
  .footer-grid { grid-template-columns: 1fr; gap: 26px; }
  .footer-base { flex-direction: column; }
  .form-inline-grid { grid-template-columns: 1fr; }
  .timeline { grid-template-columns: repeat(4, 1fr); font-size: 11.5px; }
  .timeline li { font-size: 11.5px; padding-right: 4px; }
  .et-refs { grid-template-columns: 1fr 1fr; }
  .et-leg-body { grid-template-columns: 1fr; text-align: left; }
  .et-leg-body > div:last-child { text-align: left; }
  .eticket section, .et-head { padding-left: 18px; padding-right: 18px; }
  .kv > div { grid-template-columns: 1fr; gap: 2px; }
  .kpis { grid-template-columns: 1fr 1fr; }
}

/* ---------- print (e-ticket) ---------- */
@media print {
  .no-print { display: none !important; }
  .ticket-page { background: #fff; padding: 0; }
  .eticket { box-shadow: none; border-radius: 0; max-width: none; }
  .et-head { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  .al-tile { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
  @page { margin: 12mm; }
}
