/* ---------- Reset / base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
html { -webkit-text-size-adjust: 100%; }
body {
  font-family: -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, Oxygen,
               Ubuntu, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.55;
  color: #14213d;
  background: #f6f7fb;
  -webkit-font-smoothing: antialiased;
}
img, svg { max-width: 100%; display: block; }
a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }

:root {
  --bg: #f6f7fb;
  --ink: #0b1530;
  --ink-soft: #4a5278;
  --muted: #7a82a1;
  --line: #e3e6f0;
  --card: #ffffff;
  --accent: #2e6dff;
  --accent-strong: #1c50d6;
  --accent-soft: #eaf0ff;
  --pink: #ff5470;
  --green: #16a34a;
  --shadow-sm: 0 1px 2px rgba(11,21,48,.06), 0 1px 3px rgba(11,21,48,.04);
  --shadow-md: 0 6px 24px rgba(11,21,48,.08), 0 2px 6px rgba(11,21,48,.04);
  --shadow-lg: 0 24px 60px rgba(11,21,48,.12);
  --radius: 14px;
  --radius-sm: 10px;
}

.container {
  max-width: 1140px;
  margin: 0 auto;
  padding: 0 20px;
}

h1, h2, h3 { color: var(--ink); margin: 0; }
h1 { font-size: clamp(1.9rem, 4vw + .5rem, 3.1rem); line-height: 1.1; letter-spacing: -.02em; }
h2 { font-size: clamp(1.4rem, 2vw + .5rem, 2rem); letter-spacing: -.01em; margin-bottom: 8px; }
h3 { font-size: 1.05rem; }
.muted { color: var(--muted); }
.hl { color: var(--accent); }

/* ---------- Header ---------- */
.site-header {
  background: rgba(255,255,255,.85);
  backdrop-filter: saturate(180%) blur(10px);
  -webkit-backdrop-filter: saturate(180%) blur(10px);
  border-bottom: 1px solid var(--line);
  position: sticky;
  top: 0;
  z-index: 50;
}
.header-inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 20px;
}
.logo {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 600;
  font-size: 1.05rem;
  color: var(--ink);
}
.logo-mark {
  width: 32px; height: 32px;
  border-radius: 9px;
  background: linear-gradient(135deg, var(--accent), #5a8bff);
  color: #fff;
  display: inline-grid;
  place-items: center;
  font-size: 1rem;
  transform: rotate(-12deg);
  box-shadow: var(--shadow-sm);
}
.logo-text strong { color: var(--accent); font-weight: 700; }
.site-nav {
  display: flex;
  align-items: center;
  gap: 18px;
}
.site-nav a {
  color: var(--ink-soft);
  font-weight: 500;
  font-size: .95rem;
}
.site-nav a:hover { color: var(--ink); }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 1px solid transparent;
  padding: 10px 16px;
  border-radius: 10px;
  font-weight: 600;
  font-size: .95rem;
  background: #fff;
  color: var(--ink);
  transition: transform .05s ease, background .15s ease, border-color .15s ease, box-shadow .15s ease;
  text-align: center;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: var(--accent);
  color: #fff;
  box-shadow: 0 6px 18px rgba(46,109,255,.35);
}
.btn-primary:hover { background: var(--accent-strong); }
.btn-secondary {
  background: #fff;
  color: var(--accent);
  border-color: var(--accent);
}
.btn-secondary:hover { background: var(--accent-soft); }
.btn-ghost {
  background: transparent;
  color: var(--ink-soft);
  padding: 8px 12px;
}
.btn-ghost:hover { color: var(--ink); }
.btn-lg { padding: 14px 22px; font-size: 1rem; border-radius: 12px; }

/* ---------- Hero ---------- */
.hero {
  padding: 56px 0 28px;
  background:
    radial-gradient(900px 380px at 80% -120px, rgba(46,109,255,.18), transparent 60%),
    radial-gradient(700px 320px at -10% 0%, rgba(255,84,112,.10), transparent 60%);
}
.hero > .container > h1 { max-width: 820px; }
.hero-sub {
  max-width: 640px;
  font-size: 1.1rem;
  color: var(--ink-soft);
  margin: 14px 0 28px;
}

/* ---------- Search card ---------- */
.search-card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 18px;
  box-shadow: var(--shadow-md);
}
.trip-tabs {
  display: inline-flex;
  background: #f1f3fa;
  padding: 4px;
  border-radius: 999px;
  margin-bottom: 16px;
}
.trip-tab input { display: none; }
.trip-tab span {
  display: inline-block;
  padding: 8px 14px;
  border-radius: 999px;
  font-weight: 600;
  font-size: .9rem;
  color: var(--ink-soft);
  cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.trip-tab input:checked + span {
  background: #fff;
  color: var(--ink);
  box-shadow: var(--shadow-sm);
}

.form-grid {
  display: grid;
  grid-template-columns: 1fr auto 1fr 160px 160px 180px;
  gap: 12px;
  align-items: end;
}
.form-grid .field-flex {
  grid-column: 1 / -1;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 6px;
  min-width: 0;
}
.field label {
  font-size: .8rem;
  font-weight: 600;
  color: var(--ink-soft);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.field input[type="text"],
.field input[type="email"],
.field input[type="date"],
.field input[type="month"],
.field input[type="number"],
.field select {
  width: 100%;
  height: 48px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: 0 14px;
  font-size: 1rem;
  color: var(--ink);
  background: #fff;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field input:focus,
.field select:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.field-airport {
  position: relative;
}
.anywhere-toggle {
  margin-top: 6px;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: .85rem;
  color: var(--ink-soft);
  cursor: pointer;
}
.checkbox-row {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-weight: 500;
  color: var(--ink-soft);
  cursor: pointer;
}
.field-flex {
  display: flex;
  flex-direction: row;
  flex-wrap: wrap;
  align-items: center;
  gap: 14px;
}
.field-flex input[type="month"] {
  max-width: 220px;
}

/* swap */
.swap-btn {
  height: 48px;
  width: 48px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  font-size: 1.2rem;
  color: var(--accent);
  transition: background .15s ease, transform .15s ease;
  align-self: end;
}
.swap-btn:hover { background: var(--accent-soft); transform: rotate(180deg); }

/* Combo (autocomplete) */
.combo { position: relative; }
.combo-list {
  position: absolute;
  top: calc(100% + 6px);
  left: 0;
  right: 0;
  z-index: 30;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  box-shadow: var(--shadow-lg);
  max-height: 320px;
  overflow-y: auto;
  padding: 6px;
}
.combo-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 10px 12px;
  border-radius: 8px;
  cursor: pointer;
  gap: 12px;
}
.combo-item:hover,
.combo-item.is-active {
  background: var(--accent-soft);
}
.combo-item-main { display: flex; flex-direction: column; min-width: 0; }
.combo-item-title {
  font-weight: 600;
  color: var(--ink);
  font-size: .95rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.combo-item-sub {
  color: var(--muted);
  font-size: .8rem;
}
.combo-item-iata {
  font-weight: 700;
  font-size: .85rem;
  color: var(--accent);
  letter-spacing: .04em;
  padding: 4px 8px;
  background: var(--accent-soft);
  border-radius: 6px;
  flex-shrink: 0;
}
.combo-empty {
  padding: 14px;
  color: var(--muted);
  text-align: center;
  font-size: .9rem;
}

/* Actions */
.actions {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  margin-top: 18px;
}
.actions .btn-lg { flex: 1 1 220px; }
.disclaimer {
  margin-top: 14px;
  font-size: .85rem;
  color: var(--muted);
  line-height: 1.5;
}

/* ---------- Result panel ---------- */
.result-panel {
  margin-top: 24px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-md);
}
.result-route {
  color: var(--ink-soft);
  margin: 4px 0 14px;
}
.provider-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(220px, 1fr));
  gap: 12px;
}
.provider-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  transition: border-color .15s ease, background .15s ease, transform .05s ease;
}
.provider-card:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
}
.provider-card .arrow {
  font-size: 1.1rem;
  color: var(--accent);
}
.provider-card.primary {
  background: var(--accent);
  color: #fff;
  border-color: var(--accent);
}
.provider-card.primary:hover {
  background: var(--accent-strong);
}
.provider-card.primary .arrow { color: #fff; }

/* ---------- Featured routes ---------- */
.featured { padding: 56px 0; }
.section-sub { color: var(--ink-soft); margin: 4px 0 22px; max-width: 640px; }
.route-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(240px, 1fr));
  gap: 12px;
}
.route-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 16px;
  transition: transform .1s ease, box-shadow .15s ease, border-color .15s ease;
  cursor: pointer;
  text-align: left;
}
.route-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.route-card-route {
  display: flex;
  align-items: center;
  gap: 8px;
  font-weight: 700;
  color: var(--ink);
  font-size: 1.05rem;
}
.route-card-route .arrow {
  color: var(--accent);
  font-weight: 400;
}
.route-card-cities {
  font-size: .85rem;
  color: var(--ink-soft);
  margin-top: 2px;
}
.route-card-cta {
  margin-top: 14px;
  font-size: .85rem;
  font-weight: 600;
  color: var(--accent);
}

/* ---------- Alerts ---------- */
.alerts {
  background: linear-gradient(180deg, #fff 0%, #f6f7fb 100%);
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.alerts-list {
  margin-top: 20px;
  display: grid;
  gap: 12px;
}
.alerts-empty {
  background: #fff;
  border: 1px dashed var(--line);
  padding: 24px;
  border-radius: 12px;
  text-align: center;
  color: var(--muted);
}
.alert-row {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 14px;
  justify-content: space-between;
  padding: 16px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.alert-info { display: flex; flex-direction: column; min-width: 220px; }
.alert-route {
  font-weight: 700;
  color: var(--ink);
}
.alert-meta {
  font-size: .85rem;
  color: var(--ink-soft);
}
.alert-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.alert-actions .btn { padding: 8px 12px; font-size: .85rem; }

/* ---------- How ---------- */
.how { padding: 56px 0 76px; }
.steps {
  list-style: none;
  padding: 0;
  margin: 24px 0 0;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 16px;
  counter-reset: step;
}
.steps li {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 22px;
  position: relative;
  box-shadow: var(--shadow-sm);
}
.step-num {
  display: inline-grid;
  place-items: center;
  width: 32px; height: 32px;
  border-radius: 50%;
  background: var(--accent-soft);
  color: var(--accent);
  font-weight: 700;
  margin-bottom: 10px;
}
.steps p { color: var(--ink-soft); margin: 6px 0 0; font-size: .95rem; }

/* ---------- Footer ---------- */
.site-footer {
  background: var(--ink);
  color: #c4cae1;
  padding: 28px 0;
}
.site-footer strong { color: #fff; }
.site-footer p { margin: 0 0 6px; font-size: .9rem; }

/* ---------- Modals ---------- */
.modal {
  position: fixed;
  inset: 0;
  z-index: 90;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
}
.modal[hidden] { display: none; }
.modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(11,21,48,.55);
  backdrop-filter: blur(2px);
}
.modal-body {
  position: relative;
  background: #fff;
  border-radius: 16px;
  width: 100%;
  max-width: 440px;
  padding: 28px;
  box-shadow: var(--shadow-lg);
  animation: pop .18s ease;
}
.modal-body h3 { margin: 0 0 8px; }
.modal-body form { display: grid; gap: 12px; margin-top: 12px; }
.modal-body .field input { height: 46px; }
.modal-close {
  position: absolute;
  top: 12px; right: 14px;
  width: 32px; height: 32px;
  border: none;
  background: transparent;
  font-size: 1.4rem;
  line-height: 1;
  color: var(--muted);
  border-radius: 6px;
}
.modal-close:hover { color: var(--ink); background: #f1f3fa; }
.modal-note {
  font-size: .8rem;
  color: var(--muted);
  margin: 0;
}
@keyframes pop {
  from { transform: translateY(8px) scale(.98); opacity: 0; }
  to   { transform: translateY(0) scale(1); opacity: 1; }
}

/* ---------- Toast ---------- */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  background: var(--ink);
  color: #fff;
  padding: 12px 18px;
  border-radius: 999px;
  font-size: .9rem;
  font-weight: 500;
  box-shadow: var(--shadow-lg);
  z-index: 100;
  animation: toastIn .18s ease;
}
@keyframes toastIn { from { transform: translate(-50%, 12px); opacity: 0;} to { transform: translate(-50%, 0); opacity: 1; } }

/* ---------- View visibility ---------- */
body[data-view="public"] .user-only { display: none; }
body[data-view="user"]   .public-only { display: none; }

/* ---------- User chip in header ---------- */
.user-chip {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  padding: 6px 8px 6px 12px;
  border-radius: 999px;
  font-size: .88rem;
  font-weight: 600;
}
.user-chip-email { max-width: 180px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.btn-sm { padding: 8px 12px; font-size: .88rem; border-radius: 8px; }

/* ---------- Hero CTA + stats ---------- */
.hero-cta { display: flex; gap: 12px; flex-wrap: wrap; margin-bottom: 32px; }
.hero-stats {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 14px;
  max-width: 720px;
}
.hero-stats > div {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  box-shadow: var(--shadow-sm);
}
.hero-stats strong {
  display: block;
  font-size: 1.6rem;
  color: var(--ink);
  letter-spacing: -.01em;
}
.hero-stats span {
  display: block;
  font-size: .8rem;
  color: var(--ink-soft);
  margin-top: 4px;
  text-transform: uppercase;
  letter-spacing: .04em;
}

/* ---------- Dashboard ---------- */
.dashboard {
  padding: 32px 0 12px;
  background:
    radial-gradient(900px 320px at 80% -80px, rgba(46,109,255,.10), transparent 60%);
}
.dash-header {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 24px;
  flex-wrap: wrap;
  margin-bottom: 24px;
}
.dash-title { font-size: clamp(1.5rem, 3vw, 2.2rem); margin: 0; }
.dash-sub { color: var(--ink-soft); margin: 4px 0 0; }
.dash-summary { display: flex; gap: 10px; flex-wrap: wrap; }
.dash-stat {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: 10px 14px;
  min-width: 120px;
  text-align: center;
  box-shadow: var(--shadow-sm);
}
.dash-stat strong {
  display: block;
  font-size: 1.4rem;
  color: var(--ink);
}
.dash-stat span {
  font-size: .75rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.dash-section { margin-bottom: 12px; }
.section-head { margin-bottom: 16px; }

/* ---------- Radar section ---------- */
.radar-section {
  padding: 36px 0 56px;
  border-top: 1px solid var(--line);
  background: linear-gradient(180deg, #fff 0%, #f6f7fb 100%);
}
.radar-head {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 20px;
  flex-wrap: wrap;
  margin-bottom: 18px;
}
.radar-head h2 {
  display: inline-flex;
  align-items: center;
  gap: 12px;
}
.radar-dot {
  display: inline-block;
  width: 12px; height: 12px;
  border-radius: 50%;
  background: #ff5470;
  box-shadow: 0 0 0 0 rgba(255,84,112, .6);
  animation: radarPulse 1.4s ease-out infinite;
}
@keyframes radarPulse {
  0%   { box-shadow: 0 0 0 0 rgba(255,84,112,.55); }
  70%  { box-shadow: 0 0 0 14px rgba(255,84,112,0); }
  100% { box-shadow: 0 0 0 0 rgba(255,84,112,0); }
}
.radar-status {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  font-size: .85rem;
}
.radar-status-label { color: var(--muted); text-transform: uppercase; letter-spacing: .05em; font-size: .72rem; }
.radar-status-value {
  font-weight: 600;
  color: var(--ink-soft);
  background: #fff;
  border: 1px solid var(--line);
  padding: 6px 10px;
  border-radius: 999px;
  margin-top: 4px;
}
.radar-status-value.is-live { color: var(--green); border-color: rgba(22,163,74,.3); }

.radar-filters {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px;
  margin-bottom: 22px;
  box-shadow: var(--shadow-sm);
}
.radar-filter { display: flex; flex-direction: column; gap: 4px; }
.radar-filter span {
  font-size: .72rem;
  color: var(--muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: .04em;
}
.radar-filter select {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: .92rem;
  background: #fff;
  color: var(--ink);
}
.radar-filter select:focus,
.radar-filter input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.radar-filter input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 10px;
  font-size: .92rem;
  background: #fff;
  color: var(--ink);
  -moz-appearance: textfield;
}
.radar-filter input::-webkit-outer-spin-button,
.radar-filter input::-webkit-inner-spin-button {
  -webkit-appearance: none;
  margin: 0;
}
.radar-filter-price-row {
  display: grid;
  grid-template-columns: 72px 1fr;
  gap: 6px;
}
.radar-filter-price-row select {
  padding: 0 6px;
  font-weight: 600;
}

.country-combo {
  position: relative;
}
.country-combo-input {
  width: 100%;
  height: 42px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 0 32px 0 10px;
  font-size: .92rem;
  background: #fff;
  color: var(--ink);
}
.country-combo-input:focus {
  outline: none;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
.country-combo-clear {
  position: absolute;
  right: 6px;
  top: 50%;
  transform: translateY(-50%);
  width: 24px;
  height: 24px;
  border: none;
  background: transparent;
  color: var(--muted);
  font-size: 1.2rem;
  cursor: pointer;
  border-radius: 50%;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 0;
}
.country-combo-clear:hover { color: var(--ink); background: #f1f5f9; }
.country-combo-list {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 8px;
  box-shadow: 0 8px 24px rgba(0,0,0,.08);
  max-height: 280px;
  overflow-y: auto;
  z-index: 50;
}
.country-combo-item {
  display: grid;
  grid-template-columns: auto 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 8px 12px;
  cursor: pointer;
  font-size: .92rem;
}
.country-combo-item:hover,
.country-combo-item.is-active {
  background: var(--accent-soft);
}
.country-combo-item.is-continent {
  background: #fff8e1;
  font-weight: 600;
}
.country-combo-item.is-continent:hover,
.country-combo-item.is-continent.is-active {
  background: #ffeec2;
}
.country-combo-flag { font-size: 1.1rem; }
.country-combo-label { color: var(--ink); }
.country-combo-sub {
  font-size: .72rem;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .04em;
}
.combo-empty {
  padding: 12px;
  color: var(--muted);
  font-size: .88rem;
  text-align: center;
}

.meta-chips {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  margin: 6px 0 4px;
}
.meta-chip {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 2px 8px;
  border-radius: 999px;
  font-size: .78rem;
  font-weight: 600;
  border: 1px solid var(--line);
  background: #f8fafc;
  color: var(--ink-soft);
  white-space: nowrap;
}
.meta-chip-price {
  background: #ecfdf5;
  border-color: #a7f3d0;
  color: #047857;
}
.meta-chip-trip {
  background: #eff6ff;
  border-color: #bfdbfe;
  color: #1d4ed8;
}
.meta-chip-airline {
  background: #f5f3ff;
  border-color: #ddd6fe;
  color: #5b21b6;
}
.meta-chip-age {
  background: #fafafa;
  border-color: #e5e5e5;
  color: #525252;
}
.meta-chip-exceptional {
  background: linear-gradient(90deg, #fef2f2, #fff7ed);
  border-color: #fca5a5;
  color: #b91c1c;
  font-weight: 700;
  box-shadow: 0 1px 3px rgba(220, 38, 38, .15);
}

.radar-filter-toggle {
  align-self: end;
}
.radar-toggle {
  display: inline-flex;
  align-items: center;
  cursor: pointer;
  height: 42px;
}
.radar-toggle input { position: absolute; opacity: 0; pointer-events: none; }
.radar-toggle-track {
  position: relative;
  width: 44px;
  height: 24px;
  background: #e5e7eb;
  border-radius: 999px;
  transition: background .15s ease;
}
.radar-toggle-thumb {
  position: absolute;
  top: 2px;
  left: 2px;
  width: 20px;
  height: 20px;
  background: #fff;
  border-radius: 50%;
  box-shadow: 0 1px 3px rgba(0,0,0,.2);
  transition: transform .15s ease;
}
.radar-toggle input:checked + .radar-toggle-track {
  background: #dc2626;
}
.radar-toggle input:checked + .radar-toggle-track .radar-toggle-thumb {
  transform: translateX(20px);
}
.radar-filter-clear {
  align-self: end;
  height: 42px;
  padding: 0 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fff;
  color: var(--ink-soft);
  font-size: .85rem;
  font-weight: 600;
  cursor: pointer;
}
.radar-filter-clear:hover {
  border-color: var(--accent);
  color: var(--accent);
}

.radar-filter-add {
  align-self: end;
  height: 42px;
  padding: 0 16px;
  border: 1px solid #f5b400;
  border-radius: 8px;
  background: #fff8e1;
  color: #7a5a00;
  font-size: .88rem;
  font-weight: 700;
  cursor: pointer;
  white-space: nowrap;
}
.radar-filter-add:hover {
  background: #ffeec2;
  border-color: #d99a00;
}

.saved-routes {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin: -10px 0 22px;
  box-shadow: var(--shadow-sm);
}
.saved-routes-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  margin-bottom: 10px;
  flex-wrap: wrap;
}
.saved-routes-label {
  font-size: .78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .05em;
  color: var(--ink-soft);
}
.saved-routes-toggle {
  border: 1px solid var(--line);
  border-radius: 999px;
  background: #fff;
  padding: 6px 14px;
  font-size: .82rem;
  font-weight: 600;
  color: var(--ink-soft);
  cursor: pointer;
}
.saved-routes-toggle:hover { border-color: var(--accent); color: var(--accent); }
.saved-routes-toggle.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: #fff;
}
.saved-routes-chips { display: flex; flex-wrap: wrap; gap: 8px; }
.route-chip {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: #fff8e1;
  border: 1px solid #f5d77a;
  color: #7a5a00;
  border-radius: 999px;
  padding: 6px 8px 6px 14px;
  font-size: .88rem;
  font-weight: 600;
  cursor: pointer;
  line-height: 1.2;
}
.route-chip:hover { background: #ffeec2; }
.route-chip-label { white-space: nowrap; }
.route-chip-x {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 20px;
  height: 20px;
  border-radius: 50%;
  background: rgba(0,0,0,.10);
  font-size: 1rem;
  line-height: 1;
}
.radar-disclaimer {
  margin: 0 0 18px;
  padding: 12px 14px;
  background: var(--accent-soft);
  border-left: 3px solid var(--accent);
  border-radius: 8px;
  font-size: .88rem;
  color: var(--ink-soft);
  line-height: 1.5;
}
.deal-source {
  margin: 0;
  font-size: .8rem;
  color: var(--muted);
}
.deal-source strong { color: var(--ink-soft); }
.post-card .deal-route { font-size: 1rem; line-height: 1.35; }
.deal-tag.tagERRORFARE { background: #ffe5ea; color: #b3142e; }
.deal-tag.tagCHEAPFLIGHT { background: #d6f5e0; color: #0f6b34; }
.deal-tag.tagBUSINESSDEAL { background: #e6e2ff; color: #4a35b3; }
.deal-tag.tagROUND-THE-WORLD { background: #fff2c6; color: #8a5b00; }

/* ---------- Deal grid + card ---------- */
.deal-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(290px, 1fr));
  gap: 14px;
}
.deal-card {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 10px;
  transition: transform .12s ease, box-shadow .15s ease, border-color .15s ease;
  position: relative;
}
.deal-card:hover {
  transform: translateY(-2px);
  box-shadow: var(--shadow-md);
  border-color: var(--accent);
}
.deal-card.is-new {
  animation: cardSlideIn .5s ease;
  border-color: var(--accent);
  box-shadow: 0 0 0 4px var(--accent-soft);
}
@keyframes cardSlideIn {
  from { transform: translateY(-10px); opacity: 0; }
  to   { transform: translateY(0);     opacity: 1; }
}
.deal-card-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}
.deal-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.deal-tag {
  font-size: .68rem;
  font-weight: 800;
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 4px 8px;
  border-radius: 6px;
  background: #ffe5ea;
  color: #b3142e;
}
.deal-tag.tagERRORFARE,
.deal-tag.tagMISTAKEFARE { background: #ffe5ea; color: #b3142e; }
.deal-tag.tagFLASHDEAL { background: #fff2c6; color: #8a5b00; }
.deal-tag.tagGLITCH { background: #e6e2ff; color: #4a35b3; }
.deal-tag.tag-NEARBY {
  background: #dceefc;
  color: #1a4f7a;
  text-transform: none;
  letter-spacing: 0;
  font-weight: 700;
}
.deal-tag.tag-NEARBY::before { content: "📍 "; }
.deal-discount {
  font-size: .82rem;
  font-weight: 800;
  color: var(--green);
  background: rgba(22,163,74,.10);
  padding: 4px 8px;
  border-radius: 6px;
}
.new-pulse {
  font-size: .65rem;
  font-weight: 800;
  letter-spacing: .1em;
  color: #fff;
  background: var(--accent);
  padding: 3px 7px;
  border-radius: 999px;
  animation: newPulse 1.2s ease-out 3;
}
@keyframes newPulse {
  0%   { box-shadow: 0 0 0 0 rgba(46,109,255,.6); }
  100% { box-shadow: 0 0 0 12px rgba(46,109,255,0); }
}
.fav-btn {
  border: none;
  background: transparent;
  font-size: 1.5rem;
  line-height: 1;
  color: var(--muted);
  cursor: pointer;
  padding: 0;
  width: 32px; height: 32px;
  border-radius: 8px;
  transition: background .12s ease, color .12s ease, transform .12s ease;
}
.fav-btn:hover { background: var(--accent-soft); color: var(--accent); }
.fav-btn.is-fav { color: #f6a800; transform: scale(1.05); }
.fav-btn.is-fav:hover { color: #d68f00; }

.deal-route {
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--ink);
  margin: 2px 0 0;
  line-height: 1.3;
}
.deal-meta {
  margin: 0;
  font-size: .85rem;
  color: var(--ink-soft);
}
.deal-prices {
  display: flex;
  align-items: baseline;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 4px;
}
.deal-price-found {
  font-size: 1.6rem;
  font-weight: 800;
  color: var(--ink);
  letter-spacing: -.01em;
}
.deal-price-normal {
  font-size: .85rem;
  color: var(--muted);
}
.deal-price-normal s { opacity: .8; }
.deal-note {
  margin: 0;
  font-size: .82rem;
  color: var(--ink-soft);
  line-height: 1.45;
}
.deal-actions {
  margin-top: auto;
  padding-top: 6px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}
.deal-when {
  font-size: .75rem;
  color: var(--muted);
}

.empty-card {
  background: #fff;
  border: 1px dashed var(--line);
  border-radius: var(--radius);
  padding: 24px;
  text-align: center;
  color: var(--muted);
  grid-column: 1 / -1;
}

.radar-loading {
  grid-column: 1 / -1;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 36px;
  text-align: center;
  color: var(--muted);
  position: relative;
  overflow: hidden;
}
.radar-scan {
  height: 4px;
  background: linear-gradient(90deg, transparent, var(--accent), transparent);
  background-size: 30% 100%;
  background-repeat: no-repeat;
  animation: scan 1.4s linear infinite;
  margin-bottom: 14px;
}
@keyframes scan {
  0%   { background-position: -30% 0; }
  100% { background-position: 130% 0; }
}

/* ---------- Search section (secundário) ---------- */
.search-section {
  padding: 56px 0;
  border-top: 1px solid var(--line);
}
.year-grid {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}
.year-grid h4 { margin: 0 0 4px; }
.year-grid-cells {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 8px;
  margin-top: 12px;
}
.year-cell {
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #fff;
  color: var(--ink);
  font-weight: 600;
  text-align: center;
  transition: border-color .15s ease, background .15s ease, transform .05s ease;
}
.year-cell:hover {
  border-color: var(--accent);
  background: var(--accent-soft);
  transform: translateY(-1px);
}
.year-cell-month { font-size: .95rem; }
.year-cell-cta { font-size: .8rem; color: var(--accent); font-weight: 600; }

/* ---------- Login button spinner ---------- */
#loginSubmit { position: relative; }
.btn-spinner {
  width: 16px; height: 16px;
  border: 2px solid rgba(255,255,255,.4);
  border-top-color: #fff;
  border-radius: 50%;
  display: inline-block;
  animation: spin .8s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }
#loginFeedback {
  padding: 10px 12px;
  border-radius: 10px;
  font-weight: 500;
  margin: 0;
}
#loginFeedback.is-error {
  background: #ffe5ea;
  color: #b3142e;
}
#loginFeedback.is-success {
  background: rgba(22,163,74,.12);
  color: var(--green);
}

/* ---------- Responsive ---------- */
@media (max-width: 900px) {
  .form-grid {
    grid-template-columns: 1fr 1fr;
  }
  .form-grid .swap-btn { display: none; }
  .field-flex { grid-column: 1 / -1; }
}
@media (max-width: 580px) {
  .hero { padding-top: 36px; }
  .site-nav { gap: 8px; }
  .site-nav .nav-radar, .site-nav .nav-how { display: none; }
  .form-grid {
    grid-template-columns: 1fr;
  }
  .actions { flex-direction: column; }
  .actions .btn-lg { width: 100%; }
  .search-card { padding: 14px; border-radius: 12px; }
  .modal-body { padding: 22px; }
  .hero-stats { grid-template-columns: 1fr; }
  .dash-header { flex-direction: column; align-items: flex-start; }
  .dash-summary { width: 100%; }
  .dash-stat { flex: 1; min-width: 0; }
  .radar-head { flex-direction: column; align-items: flex-start; }
  .radar-status { align-items: flex-start; }
  .deal-grid { grid-template-columns: 1fr; }
}
