:root {
  --bg: #f3f6fb;
  --card: #ffffff;
  --ink: #0f1b33;
  --muted: #5d6b82;
  --line: #e2e8f2;
  --soft: #eef3fa;
  --brand: #0b63ce;
  --brand-ink: #ffffff;
  --accent: #ff6b2c;
  --accent-ink: #ffffff;
  --hero1: #0a2a5e;
  --hero2: #0b63ce;
  --good: #12805c;
  --good-bg: #dff5ea;
  --mid: #9a6700;
  --mid-bg: #fff2cc;
  --bad: #b42318;
  --bad-bg: #fde4e1;
  --shadow: 0 1px 2px rgba(15, 27, 51, .06), 0 8px 24px rgba(15, 27, 51, .08);
  --radius: 14px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --bg: #0b1220; --card: #121b2e; --ink: #e7edf7; --muted: #9aa8bf; --line: #24304a; --soft: #182338;
    --brand: #4c9dff; --hero1: #071634; --hero2: #0d3d84;
    --good: #5fd3a2; --good-bg: #123327; --mid: #f1c44f; --mid-bg: #3a2f0f; --bad: #ff8b7f; --bad-bg: #3d1714;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 8px 24px rgba(0,0,0,.35);
    color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --bg: #0b1220; --card: #121b2e; --ink: #e7edf7; --muted: #9aa8bf; --line: #24304a; --soft: #182338;
  --brand: #4c9dff; --hero1: #071634; --hero2: #0d3d84;
  --good: #5fd3a2; --good-bg: #123327; --mid: #f1c44f; --mid-bg: #3a2f0f; --bad: #ff8b7f; --bad-bg: #3d1714;
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  background: var(--bg); color: var(--ink);
  font: 15px/1.45 Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); }
button, input, select { font: inherit; color: inherit; }
[hidden] { display: none !important; }
.wrap { max-width: 1200px; margin: 0 auto; padding: 0 16px; }
.muted { color: var(--muted); }
.small-t { font-size: 13px; }
.section { padding: 28px 16px 40px; }

/* ---------- topo */
.topbar { background: var(--hero1); color: #fff; position: sticky; top: 0; z-index: 40; }
.topbar-inner { display: flex; align-items: center; gap: 20px; height: 60px; }
.brand { display: flex; align-items: center; gap: 8px; color: #fff; text-decoration: none; font-weight: 800; font-size: 18px; letter-spacing: -.01em; }
.brand svg { width: 26px; height: 26px; fill: #5ab4ff; transform: rotate(45deg); }
.mainnav { display: flex; gap: 4px; overflow-x: auto; flex: 1; scrollbar-width: none; }
.mainnav a { color: #c9d7f0; text-decoration: none; padding: 8px 12px; border-radius: 999px; white-space: nowrap; font-weight: 500; }
.mainnav a:hover { color: #fff; background: rgba(255,255,255,.08); }
.mainnav a.on { color: #fff; background: rgba(255,255,255,.16); }
.currency { display: flex; align-items: center; gap: 6px; font-size: 13px; color: #c9d7f0; }
.currency select { background: rgba(255,255,255,.1); color: #fff; border: 1px solid rgba(255,255,255,.2); border-radius: 8px; padding: 5px 8px; }
.currency select option { color: #111; }

/* ---------- hero e cartão de busca */
.hero { background: linear-gradient(135deg, var(--hero1), var(--hero2)); color: #fff; padding: 36px 0 44px; }
.hero.small { padding: 28px 0 36px; }
.hero .page-title { margin: 0 0 6px; font-size: clamp(24px, 3.4vw, 36px); letter-spacing: -.02em; line-height: 1.15; }
.hero .sub { margin: 0 0 22px; color: #cfe0ff; max-width: 760px; }
.card { background: var(--card); color: var(--ink); border-radius: var(--radius); box-shadow: var(--shadow); }
.search-card { padding: 16px; }
.search-top { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px; }
.seg { display: inline-flex; background: var(--soft); border-radius: 999px; padding: 3px; flex-wrap: wrap; }
.seg button { border: 0; background: transparent; padding: 7px 14px; border-radius: 999px; cursor: pointer; font-weight: 500; color: var(--muted); }
.seg button.on { background: var(--card); color: var(--ink); box-shadow: 0 1px 3px rgba(0,0,0,.12); }
.seg.small button { padding: 5px 12px; font-size: 13px; }
.chip { border: 1px solid var(--line); background: var(--card); border-radius: 999px; padding: 7px 14px; cursor: pointer; font-weight: 500; }
select.chip { padding-right: 28px; }
.pop-wrap { position: relative; }
.popover { position: absolute; top: calc(100% + 6px); left: 0; z-index: 30; background: var(--card); border: 1px solid var(--line); border-radius: 12px; box-shadow: var(--shadow); padding: 12px; width: 280px; }
.popover.wide { width: 300px; }
.popover .pop-h { margin: 8px 0 6px; font-size: 13px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.counter { display: grid; grid-template-columns: 1fr 34px 28px 34px; align-items: center; gap: 6px; padding: 8px 0; border-bottom: 1px solid var(--line); }
.counter small { display: block; color: var(--muted); font-size: 12px; }
.counter button { width: 34px; height: 34px; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 18px; line-height: 1; }
.counter button:disabled { opacity: .35; cursor: default; }
.counter output { text-align: center; font-weight: 700; }
.pop-foot { display: flex; justify-content: flex-end; margin-top: 10px; }
.row-l { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 6px 0; }
.row-l select, .row-l input { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: var(--card); }
.row-l input[type=number] { width: 70px; }
.check { display: flex; align-items: center; gap: 8px; padding: 4px 0; cursor: pointer; }
.check input { width: 16px; height: 16px; accent-color: var(--brand); }

.search-row { display: flex; gap: 8px; align-items: stretch; flex-wrap: wrap; }
.field { position: relative; display: flex; flex-direction: column; justify-content: center; border: 1px solid var(--line); border-radius: 10px; padding: 6px 12px; min-height: 56px; background: var(--card); min-width: 0; }
.field:focus-within { border-color: var(--brand); box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 20%, transparent); }
.field label { font-size: 11px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.field input, .field select { border: 0; outline: 0; background: transparent; padding: 2px 0; font-size: 15px; font-weight: 500; width: 100%; min-width: 0; }
.field.grow { flex: 1 1 200px; }
.field.date { flex: 0 1 150px; }
.field.small { flex: 0 1 100px; }
.date-btn { border: 0; background: transparent; text-align: left; padding: 2px 0; cursor: pointer; font-weight: 500; font-size: 15px; white-space: nowrap; }
.swap { align-self: center; width: 36px; height: 36px; margin: 0 -22px; z-index: 2; border-radius: 50%; border: 1px solid var(--line); background: var(--card); cursor: pointer; font-size: 16px; box-shadow: 0 1px 3px rgba(0,0,0,.1); }
.btn-primary { background: var(--accent); color: var(--accent-ink); border: 0; border-radius: 10px; padding: 0 26px; min-height: 56px; font-weight: 700; font-size: 16px; cursor: pointer; }
.btn-primary:hover { filter: brightness(1.05); }
.btn-primary:disabled { opacity: .6; cursor: wait; }
.btn-ghost { background: transparent; border: 1px solid var(--line); border-radius: 10px; padding: 8px 14px; cursor: pointer; font-weight: 500; color: var(--ink); }
.btn-ghost:hover { background: var(--soft); }
.link { background: none; border: 0; padding: 0; color: var(--brand); cursor: pointer; font-weight: 500; font-size: 13px; }
.hint { margin: 10px 2px 0; color: var(--muted); font-size: 13px; }
.recent { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 10px; }
.recent:empty { display: none; }
.recent .rc { border: 1px dashed var(--line); background: transparent; border-radius: 999px; padding: 4px 10px; cursor: pointer; font-size: 13px; color: var(--muted); }
.recent .rc:hover { color: var(--ink); border-style: solid; }

.leg { display: flex; gap: 8px; align-items: stretch; margin-bottom: 8px; flex-wrap: wrap; }
.leg .num { align-self: center; width: 28px; height: 28px; border-radius: 50%; background: var(--soft); display: grid; place-items: center; font-weight: 700; font-size: 13px; }
.leg .rm { align-self: center; border: 0; background: none; font-size: 20px; color: var(--muted); cursor: pointer; }
.multi-actions { display: flex; gap: 8px; justify-content: flex-end; flex-wrap: wrap; }
.ages { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 8px; }
.ages:empty { display: none; }
.ages label { font-size: 13px; color: var(--muted); display: flex; gap: 6px; align-items: center; }
.ages select { border: 1px solid var(--line); border-radius: 8px; padding: 4px 6px; background: var(--card); }

/* ---------- autocomplete */
.ac { position: absolute; left: -1px; right: -1px; top: calc(100% + 4px); z-index: 50; background: var(--card); border: 1px solid var(--line); border-radius: 10px; box-shadow: var(--shadow); max-height: 320px; overflow-y: auto; min-width: 280px; }
.ac div { padding: 9px 12px; cursor: pointer; font-size: 14px; display: flex; gap: 8px; align-items: baseline; }
.ac div b { font-weight: 700; color: var(--brand); min-width: 34px; }
.ac div.on, .ac div:hover { background: var(--soft); }
.ac .empty { color: var(--muted); cursor: default; }

/* ---------- resultados */
#results-wrap { padding-top: 24px; padding-bottom: 12px; }
.results-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.results-head h2 { margin: 0; font-size: 22px; letter-spacing: -.01em; }
.results-head p { margin: 4px 0 0; }
.providers { display: flex; gap: 8px; flex-wrap: wrap; margin: 16px 0 8px; }
.ptab { display: flex; align-items: center; gap: 8px; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 8px 12px; cursor: pointer; min-width: 132px; text-align: left; }
.ptab.on { border-color: var(--brand); box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 25%, transparent); }
.ptab .pname { font-weight: 700; }
.ptab .pstat { display: block; font-size: 12px; color: var(--muted); }
.ptab .pprice { margin-left: auto; font-weight: 800; color: var(--good); }
.spin { width: 16px; height: 16px; border: 2px solid var(--line); border-top-color: var(--brand); border-radius: 50%; animation: sp 0.8s linear infinite; flex: none; }
@keyframes sp { to { transform: rotate(360deg); } }
.compare { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; margin-bottom: 16px; font-size: 13px; }
.compare > span { color: var(--muted); margin-right: 4px; }
.compare a { text-decoration: none; border: 1px solid var(--line); background: var(--card); color: var(--ink); padding: 5px 10px; border-radius: 999px; font-weight: 500; }
.compare a:hover { border-color: var(--brand); color: var(--brand); }
.compare a::after { content: " ↗"; color: var(--muted); }

.results-layout { display: grid; grid-template-columns: 270px 1fr; gap: 18px; align-items: start; }
.filters { padding: 14px 16px; position: sticky; top: 76px; max-height: calc(100vh - 92px); overflow-y: auto; }
.filters-head { display: flex; justify-content: space-between; align-items: center; }
.filters h3 { margin: 0; font-size: 16px; }
.fgroup { border-top: 1px solid var(--line); padding: 12px 0; }
.fgroup:first-of-type { border-top: 0; }
.fgroup h4 { margin: 0 0 8px; font-size: 13px; display: flex; justify-content: space-between; gap: 8px; }
.fgroup h4 output { color: var(--muted); font-weight: 500; }
.fgroup .check { justify-content: space-between; font-size: 14px; }
.fgroup .check span.lbl { flex: 1; }
.fgroup .check small { color: var(--muted); }
.alliances { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
input[type=range] { width: 100%; accent-color: var(--brand); }
.dual { position: relative; height: 26px; }
.dual input { position: absolute; left: 0; right: 0; top: 4px; pointer-events: none; background: none; -webkit-appearance: none; appearance: none; height: 18px; margin: 0; }
.dual input::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; box-shadow: 0 1px 3px rgba(0,0,0,.3); cursor: pointer; position: relative; z-index: 2; }
.dual input::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: var(--brand); border: 2px solid #fff; cursor: pointer; }
.dual::before { content: ""; position: absolute; left: 0; right: 0; top: 12px; height: 4px; border-radius: 4px; background: var(--line); }
.dual input::-webkit-slider-runnable-track { background: transparent; }

.sortcards { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-bottom: 10px; }
.sortcards button { text-align: left; border: 1px solid var(--line); background: var(--card); border-radius: 12px; padding: 10px 14px; cursor: pointer; }
.sortcards button.on { border-color: var(--brand); box-shadow: inset 0 -3px 0 var(--brand); }
.sortcards span { display: block; font-size: 13px; color: var(--muted); font-weight: 600; }
.sortcards b { display: block; font-size: 20px; }
.sortcards small { color: var(--muted); }
.list-tools { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 10px; flex-wrap: wrap; }
.list-tools select { border: 1px solid var(--line); border-radius: 8px; padding: 5px 8px; background: var(--card); margin-left: 6px; }
.only-mobile { display: none; }

.res { display: grid; grid-template-columns: 1fr 190px; margin-bottom: 10px; overflow: hidden; }
.res-legs { padding: 12px 16px; cursor: pointer; }
.leg-row { display: grid; grid-template-columns: minmax(34px, auto) minmax(90px, 1.2fr) 2fr; gap: 12px; align-items: center; padding: 6px 0; }
.logos { display: flex; align-items: center; }
.logos img { border: 1px solid var(--line); }
.logos img + img { margin-left: -10px; }
.leg-row + .leg-row { border-top: 1px dashed var(--line); }
.leg-row img { width: 30px; height: 30px; object-fit: contain; border-radius: 6px; background: #fff; }
.leg-row .al { font-size: 13px; color: var(--muted); line-height: 1.25; }
.leg-row .al b { color: var(--ink); font-weight: 600; display: block; font-size: 14px; }
.timeline { display: grid; grid-template-columns: auto 1fr auto; gap: 10px; align-items: center; }
.timeline .t { font-size: 17px; font-weight: 700; line-height: 1.1; }
.timeline .t small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; }
.timeline .t.r { text-align: right; }
.timeline .mid { text-align: center; font-size: 12px; color: var(--muted); }
.timeline .bar { height: 2px; background: var(--line); position: relative; margin: 4px 0; }
.timeline .bar i { position: absolute; top: -3px; width: 8px; height: 8px; border-radius: 50%; background: var(--card); border: 2px solid var(--bad); }
.timeline .direct { color: var(--good); font-weight: 600; }
.timeline .stops { color: var(--bad); font-weight: 600; }
.res-side { border-left: 1px solid var(--line); padding: 12px 14px; display: flex; flex-direction: column; justify-content: center; gap: 6px; background: color-mix(in srgb, var(--soft) 45%, var(--card)); }
.res-side .price { font-size: 24px; font-weight: 800; letter-spacing: -.01em; }
.badge { display: inline-block; font-size: 11px; font-weight: 700; padding: 2px 7px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; }
.badge { background: var(--soft); color: var(--ink); white-space: nowrap; }
.badge.kiwi { background: #dff7f2; color: #00796b; }
.badge.zupper { background: #fff1e0; color: #b45309; }
.badge.sky { background: #e3efff; color: #0b57d0; }
.btn-book { display: block; text-align: center; background: var(--brand); color: var(--brand-ink); text-decoration: none; font-weight: 700; padding: 9px 10px; border-radius: 9px; }
.btn-book:hover { filter: brightness(1.08); }
.alt { font-size: 12px; color: var(--muted); }
.alt a { color: var(--muted); }
.tag { font-size: 11px; font-weight: 700; color: var(--good); background: var(--good-bg); border-radius: 6px; padding: 2px 6px; align-self: flex-start; }
.more { text-align: center; padding: 6px 0 20px; }
.empty-state, .err-state { padding: 36px 20px; text-align: center; color: var(--muted); }
.err-state { color: var(--bad); }
.skeleton { height: 108px; margin-bottom: 10px; border-radius: var(--radius); background: linear-gradient(90deg, var(--card) 25%, var(--soft) 50%, var(--card) 75%); background-size: 200% 100%; animation: sk 1.3s infinite; }
@keyframes sk { to { background-position: -200% 0; } }

/* cartões agrupados por horário */
.grp { margin-bottom: 10px; overflow: hidden; }
.grp.open { box-shadow: 0 0 0 2px color-mix(in srgb, var(--brand) 35%, transparent), var(--shadow); }
.res.flat { margin: 0; }
.leg-tag { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-bottom: 2px; }
.count b { display: block; font-size: 15px; }
.count small { display: block; color: var(--muted); font-size: 12px; line-height: 1.3; }
.res-side .price small { display: block; font-size: 12px; color: var(--muted); font-weight: 500; letter-spacing: 0; }
.offers { border-top: 1px solid var(--line); background: color-mix(in srgb, var(--soft) 60%, var(--card)); padding: 6px 14px 14px; }
.offers-head { font-size: 13px; color: var(--muted); padding: 6px 2px; }
.offer { display: grid; grid-template-columns: 1fr auto 130px auto; gap: 14px; align-items: center; padding: 10px 12px; background: var(--card); border: 1px solid var(--line); border-radius: 10px; margin-top: 6px; }
.offer.cheapest { border-color: var(--good); }
.offer .badge { justify-self: start; }
.retrow + .retrow { margin-top: 0; }
.offer[data-sub] { cursor: pointer; }
.offer[data-sub]:hover { border-color: color-mix(in srgb, var(--brand) 45%, var(--line)); }
.offer.open { border-color: var(--brand); box-shadow: 0 0 0 1px var(--brand); }
.o-count { font-weight: 700; font-size: 14px; color: var(--brand); white-space: nowrap; line-height: 1.2; }
.o-count small { display: block; font-weight: 500; font-size: 11px; color: var(--muted); }
.o-price small { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }
.sub-offers { margin: 4px 0 10px 22px; padding-left: 12px; border-left: 3px solid color-mix(in srgb, var(--brand) 35%, transparent); }
.sub-offers .offer { margin-top: 6px; }
.o-ret { font-size: 14px; }
.o-ret .direct { color: var(--good); font-weight: 600; }
.o-ret .stops { color: var(--bad); font-weight: 600; }
.o-lbl { font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin-right: 8px; }
.o-air { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); margin-top: 3px; }
.o-air img { width: 20px; height: 20px; object-fit: contain; border-radius: 4px; background: #fff; }
.o-price { font-size: 19px; font-weight: 800; text-align: right; white-space: nowrap; }
.o-price .tag { display: table; margin: 3px 0 0 auto; }
.o-act { display: flex; align-items: center; gap: 12px; }
.btn-book.sm { padding: 7px 16px; }
.o-more { margin-top: 10px; }
.alts { margin-top: 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.alts p { width: 100%; margin: 0 0 2px; }
.alts .btn-ghost { text-decoration: none; font-size: 13px; }
#group-mode button { white-space: nowrap; }

/* multi-cidade / qualquer lugar */
.legblock { margin: 18px 0 26px; }
.legblock h3 { margin: 0 0 10px; font-size: 17px; }

/* ---------- ofertas */
.deals-head { display: flex; flex-wrap: wrap; align-items: center; gap: 12px; margin-bottom: 14px; }
.deals-head h2 { margin: 0; font-size: 22px; }
.deals-ctrl { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; color: var(--muted); }
.deals-ctrl input, .deals-ctrl select { border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; background: var(--card); min-width: 150px; }
.deals-ctrl .acwrap { position: relative; }
.deals { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 14px; }
.deal { overflow: hidden; cursor: pointer; text-align: left; border: 0; padding: 0; transition: transform .15s; }
.deal:hover { transform: translateY(-2px); }
.deal .ph { height: 130px; background: var(--soft) center/cover no-repeat; }
.deal .bd { padding: 12px 14px; display: flex; justify-content: space-between; gap: 10px; align-items: flex-end; }
.deal .rt { font-weight: 700; line-height: 1.25; }
.deal .rt small { display: block; color: var(--muted); font-weight: 500; margin-top: 3px; }
.deal .pr { text-align: right; white-space: nowrap; }
.deal .pr small { display: block; color: var(--muted); font-size: 12px; }
.deal .pr b { font-size: 22px; color: var(--good); }

/* ---------- cartões de link (hotéis/carros/pacotes) */
.linkcards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.linkcard { padding: 18px; display: flex; flex-direction: column; gap: 8px; }
.linkcard h2 { margin: 0; font-size: 18px; }
.linkcard p { margin: 0; color: var(--muted); font-size: 14px; flex: 1; }
.linkcard code { font-size: 11px; color: var(--muted); word-break: break-all; }
.linkcard .note { font-size: 12px; color: var(--mid); }

/* ---------- overlays */
.overlay { position: fixed; inset: 0; background: rgba(6, 14, 30, .55); z-index: 100; display: flex; align-items: center; justify-content: center; padding: 16px; }
.x { border: 0; background: none; font-size: 28px; line-height: 1; cursor: pointer; color: var(--muted); }
.cal { background: var(--card); color: var(--ink); border-radius: 16px; width: min(760px, 100%); max-height: calc(100vh - 32px); overflow: auto; box-shadow: var(--shadow); }
.cal-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.cal-head h2 { margin: 0; font-size: 17px; margin-right: auto; }
.legend { display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }
.legend small { color: var(--muted); font-size: 11px; }
.lg { font-size: 11px; font-weight: 700; padding: 2px 8px; border-radius: 6px; }
.lg.cheap, .day.cheap { background: var(--good-bg); color: var(--good); }
.lg.mid, .day.mid { background: var(--mid-bg); color: var(--mid); }
.lg.exp, .day.exp { background: var(--bad-bg); color: var(--bad); }
.cal-body { display: grid; grid-template-columns: 32px 1fr 1fr 32px; gap: 18px; padding: 14px 12px; align-items: start; }
.cal-body .nav { border: 1px solid var(--line); background: var(--card); width: 32px; height: 32px; border-radius: 50%; cursor: pointer; font-size: 18px; margin-top: 2px; }
.cal-body .nav:disabled { opacity: .3; cursor: default; }
.month h3 { text-align: center; margin: 4px 0 10px; font-size: 15px; text-transform: capitalize; }
.dow, .days { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.dow span { text-align: center; font-size: 11px; color: var(--muted); font-weight: 600; padding-bottom: 4px; }
.day { border: 0; background: transparent; border-radius: 8px; height: 46px; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center; font-weight: 600; font-size: 14px; color: var(--ink); padding: 0; }
.day small { font-size: 10px; font-weight: 600; opacity: .9; }
.day:hover:not(:disabled) { outline: 2px solid var(--brand); }
.day:disabled { color: var(--line); cursor: default; background: transparent; }
.day.inrange { box-shadow: inset 0 0 0 100px color-mix(in srgb, var(--brand) 14%, transparent); }
.day.sel { background: var(--brand) !important; color: #fff !important; }
.cal-months { padding: 14px 18px; }
.months-grid { display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 10px; }
.mcell { border: 1px solid var(--line); background: var(--card); border-radius: 10px; padding: 10px; cursor: pointer; text-align: center; text-transform: capitalize; }
.mcell b { display: block; }
.mcell small { color: var(--muted); }
.mcell.sel { border-color: var(--brand); background: color-mix(in srgb, var(--brand) 12%, var(--card)); }
.cal-foot { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 12px 18px; border-top: 1px solid var(--line); flex-wrap: wrap; }
.cal-sel { font-weight: 600; }
.cal-btns { display: flex; gap: 8px; }
.cal-btns .btn-primary { min-height: 40px; padding: 0 18px; }

.modal { position: relative; background: var(--card); color: var(--ink); border-radius: 16px; width: min(640px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 20px 22px; box-shadow: var(--shadow); }
.modal .x { position: absolute; right: 14px; top: 10px; }
.modal h3 { margin: 0 0 4px; }
.dir { margin-top: 16px; }
.dir h4 { margin: 0 0 8px; font-size: 15px; }
.dir h4 small { color: var(--muted); font-weight: 500; }
.seg-row { display: grid; grid-template-columns: 64px 1fr; gap: 10px; padding: 8px 0; border-left: 3px solid var(--brand); padding-left: 12px; margin-left: 4px; }
.seg-row .tm { font-weight: 700; }
.seg-row .tm small { display: block; color: var(--muted); font-weight: 500; }
.seg-row .fl { font-size: 13px; color: var(--muted); }
.layover { margin: 4px 0 4px 20px; font-size: 13px; color: var(--mid); background: var(--mid-bg); display: inline-block; padding: 3px 10px; border-radius: 6px; }
.modal-foot { display: flex; justify-content: space-between; align-items: center; margin-top: 18px; gap: 12px; }
.modal-foot .price { font-size: 26px; font-weight: 800; }

.toast { position: fixed; bottom: 18px; left: 50%; transform: translateX(-50%); background: var(--ink); color: var(--bg); padding: 10px 16px; border-radius: 10px; z-index: 200; font-weight: 500; }
.foot { padding: 24px 0 36px; color: var(--muted); font-size: 13px; border-top: 1px solid var(--line); }

/* ---------- responsivo */
@media (max-width: 900px) {
  .results-layout { grid-template-columns: 1fr; }
  .filters { position: static; max-height: none; display: none; }
  .filters.open { display: block; }
  .only-mobile { display: inline-block; }
  .field.date { flex: 1 1 140px; }
  .btn-primary { flex: 1 1 100%; }
  .swap { margin: 0 auto; transform: rotate(90deg); }
  .field.grow { flex: 1 1 100%; }
}
@media (max-width: 640px) {
  .topbar-inner { gap: 10px; }
  .brand span { display: none; }
  .currency span { display: none; }
  .res { grid-template-columns: 1fr; }
  .res-side { border-left: 0; border-top: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; align-items: center; justify-content: space-between; }
  .leg-row { grid-template-columns: 30px 1fr; }
  .leg-row .al { display: none; }
  .sortcards b { font-size: 16px; }
  .offer { grid-template-columns: 1fr auto; gap: 8px 12px; }
  .o-info { grid-column: 1 / -1; }
  .o-price { text-align: left; }
  .o-price .tag { margin-left: 0; }
  .o-act { grid-column: 1 / -1; justify-content: space-between; }
  .sub-offers { margin-left: 6px; padding-left: 8px; }
  .sortcards button { padding: 8px 10px; }
  .cal-body { grid-template-columns: 28px 1fr 28px; }
  #cal-m2 { display: none; }
  .months-grid { grid-template-columns: repeat(3, 1fr); }
  .ptab { min-width: 0; flex: 1 1 45%; }
}

.use-src-list { max-height: 240px; overflow-y: auto; }
.o-price .conv { display: block; font-size: 11px; font-weight: 500; color: var(--muted); }

.miles { font-size: 10px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--mid); background: var(--mid-bg); border-radius: 5px; padding: 1px 6px; margin-left: 4px; cursor: help; }
.badge. 23milhas { background: #efe7ff; color: #6d28d9; }
.badge.maxmilhas { background: #e0f2fe; color: #0369a1; }
.badge.vaidepromo { background: #fde7f3; color: #be185d; }
#f-miles-wrap { margin-top: 6px; padding-top: 6px; border-top: 1px dashed var(--line); }
.alt-ap { color: var(--mid) !important; font-weight: 700; text-decoration: underline dotted; cursor: help; }
.badge.gotogate { background: #e6f4ea; color: #137333; }
.badge.mytrip { background: #fce8e6; color: #c5221f; }
.badge.kissandfly { background: #fef7e0; color: #a16207; }
.ptab.failed { border-color: var(--bad); }
.ptab.failed .pstat { color: var(--bad); }
.seller { display: inline-flex; flex-direction: column; align-items: flex-start; gap: 2px; justify-self: start; }
.seller small { font-size: 11px; color: var(--muted); white-space: nowrap; }

/* ---------- histórico de preços */
.head-actions { display: flex; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.watch-btn.on { border-color: var(--brand); color: var(--brand); font-weight: 600; }
.btn-primary.sm { min-height: 36px; padding: 0 14px; font-size: 14px; }
.link.danger { color: var(--bad); }
.watch-list { display: flex; flex-direction: column; gap: 10px; margin-bottom: 22px; }
.wcard { display: grid; grid-template-columns: 1fr 220px auto; gap: 16px; align-items: center; padding: 14px 16px; }
.wcard.on { box-shadow: 0 0 0 2px var(--brand), var(--shadow); }
.wcard h3 { margin: 0 0 2px; font-size: 16px; }
.wcard p { margin: 2px 0; }
.w-price b { font-size: 22px; display: block; }
.w-act { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; justify-content: flex-end; }
.w-act a.btn-ghost { text-decoration: none; }
.spark { width: 120px; height: 32px; margin-top: 4px; }
.spark polyline { fill: none; stroke: var(--brand); stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.delta { font-size: 13px; font-weight: 600; }
.delta.up { color: var(--bad); }
.delta.down { color: var(--good); }
.delta.flat { color: var(--muted); font-weight: 500; }
.chip { display: inline-block; font-size: 11px; font-weight: 700; border-radius: 6px; padding: 2px 7px; margin-top: 4px; }
.chip.good { background: var(--good-bg); color: var(--good); }
.chip.bad { background: var(--bad-bg); color: var(--bad); }
.spin.inline { display: inline-block; vertical-align: -3px; width: 12px; height: 12px; }
.hist-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; flex-wrap: wrap; margin: 6px 0 12px; }
.hist-head h2 { margin: 0; font-size: 21px; }
.hist-head p { margin: 4px 0 0; }
.tiles { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin-bottom: 12px; }
.tile { padding: 12px 14px; }
.tile span { display: block; font-size: 12px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.tile b { display: block; font-size: 24px; margin: 2px 0; }
.tile small { display: block; min-height: 18px; }
.chart-card { position: relative; padding: 14px 16px 10px; margin-bottom: 12px; }
.chart-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 6px; }
.chart-head h3 { margin: 0; font-size: 15px; }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.lk { display: inline-block; width: 18px; height: 0; border-top: 2px solid var(--s1); }
.lk.s2 { border-top-color: var(--s2); }
.lk.dashed { border-top-style: dashed; }
.chart { position: relative; outline: none; }
.chart svg { display: block; max-width: 100%; }
.chart .grid { stroke: var(--grid); stroke-width: 1; }
.chart .axis { stroke: var(--axis); stroke-width: 1; }
.chart .ylab { fill: var(--muted); font-size: 11px; text-anchor: end; font-variant-numeric: tabular-nums; }
.chart .xlab { fill: var(--muted); font-size: 11px; text-anchor: middle; font-variant-numeric: tabular-nums; }
.chart .ln { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
.chart .ln.s1 { stroke: var(--s1); }
.chart .ln.s2 { stroke: var(--s2); }
.chart .ln.dashed { stroke-dasharray: 5 4; }
.chart .dot { stroke: var(--card); stroke-width: 2; }
.chart .dot.s1 { fill: var(--s1); }
.chart .dot.s2 { fill: var(--s2); }
.chart .dlabel { fill: var(--ink); font-size: 12px; font-weight: 700; text-anchor: end; }
.chart .cross { stroke: var(--axis); stroke-width: 1; }
.chart .hit { fill: transparent; cursor: crosshair; }
.chart:focus-visible { box-shadow: 0 0 0 2px var(--brand); border-radius: 8px; }
.ctip { position: absolute; z-index: 5; background: var(--card); border: 1px solid var(--line); box-shadow: var(--shadow); border-radius: 10px; padding: 8px 10px; font-size: 12px; pointer-events: none; min-width: 190px; transform: translateY(40px); }
.ctip .tt-day { font-weight: 700; margin-bottom: 4px; }
.ctip .tt-row { display: flex; align-items: center; gap: 6px; }
.ctip .tt-row::before { content: ""; width: 14px; border-top: 2px solid var(--s1); }
.ctip .tt-row.s2::before { border-top: 2px dashed var(--s2); }
.ctip .tt-row b { font-size: 13px; }
.ctip .tt-site { color: var(--muted); padding-left: 20px; }
.ctip .tt-site b { color: var(--ink); font-weight: 600; }
.chart-note { margin: 6px 0 2px; }
.table-card { padding: 14px 16px; }
.table-card h3 { margin: 0 0 8px; font-size: 15px; }
.tscroll { overflow-x: auto; }
.htable { width: 100%; border-collapse: collapse; font-size: 14px; }
.htable th { text-align: left; font-size: 12px; color: var(--muted); font-weight: 600; padding: 6px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.htable td { padding: 7px 8px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.htable .num { text-align: right; font-variant-numeric: tabular-nums; }
.viz-root { --s1: #2a78d6; --s2: #eb6834; --grid: #e1e0d9; --axis: #c3c2b7; }
@media (prefers-color-scheme: dark) {
  :root:where(:not([data-theme="light"])) .viz-root { --s1: #3987e5; --s2: #d95926; --grid: #2c2c2a; --axis: #383835; }
}
:root[data-theme="dark"] .viz-root { --s1: #3987e5; --s2: #d95926; --grid: #2c2c2a; --axis: #383835; }
@media (max-width: 900px) {
  .wcard { grid-template-columns: 1fr; }
  .w-act { justify-content: flex-start; }
  .tiles { grid-template-columns: repeat(2, 1fr); }
}

/* títulos de seção e perguntas frequentes */
.sec-title { margin: 0 0 12px; font-size: 20px; letter-spacing: -.01em; }
.faq h2 { margin: 0 0 12px; font-size: 22px; }
.faq details { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); margin-bottom: 8px; }
.faq summary { cursor: pointer; padding: 14px 16px; font-weight: 600; list-style: none; display: flex; justify-content: space-between; gap: 12px; }
.faq summary::-webkit-details-marker { display: none; }
.faq summary::after { content: '+'; color: var(--muted); font-weight: 400; font-size: 20px; line-height: 1; }
.faq details[open] summary::after { content: '−'; }
.faq details p { margin: 0; padding: 0 16px 14px; color: var(--muted); line-height: 1.55; }
.faq a, .foot a { color: var(--brand); }

/* rodapé e páginas de texto (Sobre, Privacidade, Termos) */
.foot-grid { display: grid; gap: 18px; }
.foot-nav { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 16px; }
.foot-nav div { display: grid; gap: 6px; align-content: start; }
.foot-nav b { color: var(--ink); font-size: 13px; }
.foot-nav a { text-decoration: none; padding: 2px 0; }
.foot-nav a:hover { text-decoration: underline; }
.prose { max-width: 760px; line-height: 1.65; }
.prose h2 { font-size: 20px; margin: 28px 0 8px; letter-spacing: -.01em; }
.prose h2:first-child { margin-top: 0; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose a { color: var(--brand); }

/* celular: menu numa segunda linha, inteiro visível (antes Ofertas e Histórico ficavam escondidos) */
@media (max-width: 640px) {
  .topbar-inner { flex-wrap: wrap; height: auto; padding: 8px 0 6px; row-gap: 4px; }
  .brand span { display: inline; font-size: 17px; }
  .currency { margin-left: auto; }
  .mainnav { order: 3; flex-basis: 100%; min-width: 0; gap: 2px; -webkit-mask-image: linear-gradient(90deg, #000 88%, transparent); mask-image: linear-gradient(90deg, #000 88%, transparent); }
  .mainnav a { padding: 6px 9px; font-size: 14px; }
}
