:root {
  /* superfícies, do mais claro ao mais "fundo" — paleta clara céu-azul */
  --navy-950: #eaf6fc;
  --navy-900: #dcedf7;
  --navy-800: #ffffff;
  --navy-700: #dde8f0;
  --navy-600: #c7d9e6;
  --teal-400: #12b8a0;
  --teal-300: #4fd9c4;
  --teal-100: #e3faf5;
  --teal-700: #0a8a76;
  --amber-400: #f2a134;
  --amber-100: #fdf0dc;
  --amber-700: #a86a12;
  --ink-100: #10202f;
  --ink-300: #45566b;
  --ink-500: #78889c;
  --danger: #ff6b6b;
  --danger-700: #c23a3a;
  --danger-100: #ffe8e8;
  --white: #ffffff;
  --radius: 16px;
  --shadow-soft: 0 20px 50px rgba(13, 43, 66, 0.08);
  --shadow-card: 0 10px 30px rgba(13, 43, 66, 0.07);
  --font-display: 'Fraunces', 'Iowan Old Style', Georgia, serif;
  --font-body: 'Plus Jakarta Sans', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, sans-serif;
}

* { box-sizing: border-box; }

html, body {
  margin: 0;
  padding: 0;
  background: var(--navy-950);
  color: var(--ink-100);
  font-family: var(--font-body);
  min-height: 100%;
}

a { color: var(--teal-700); text-decoration: none; }
a:hover { text-decoration: underline; }

h1, h2, h3 { font-family: var(--font-display); font-weight: 600; letter-spacing: 0.01em; color: var(--ink-100); }

.container { max-width: 1080px; margin: 0 auto; padding: 0 24px; }

/* ---------- Landing ---------- */

.hero {
  position: relative;
  min-height: 100vh;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  background:
    radial-gradient(circle at 20% 10%, rgba(18, 184, 160, 0.10), transparent 45%),
    linear-gradient(180deg, #f5fbfe 0%, var(--navy-950) 45%, var(--navy-900) 100%);
}

.hero-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 28px 24px;
  position: relative;
  z-index: 5;
}

.brand {
  display: flex;
  align-items: center;
  gap: 10px;
  font-family: var(--font-display);
  font-size: 1.25rem;
  color: var(--ink-100);
}

.brand-dot {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--teal-400);
  box-shadow: 0 0 12px 3px rgba(18, 184, 160, 0.45);
}

.hero-nav .links { display: flex; gap: 18px; align-items: center; }

.btn {
  display: inline-block;
  padding: 11px 22px;
  border-radius: 999px;
  font-size: 0.95rem;
  font-weight: 600;
  cursor: pointer;
  border: 1px solid transparent;
  transition: transform 0.15s ease, box-shadow 0.15s ease;
}

.btn-primary {
  background: var(--ink-100);
  color: var(--white);
}
.btn-primary:hover { transform: translateY(-1px); box-shadow: 0 10px 24px rgba(16, 32, 47, 0.25); text-decoration: none; }

.btn-ghost {
  background: transparent;
  color: var(--ink-100);
  border-color: var(--navy-600);
}
.btn-ghost:hover { border-color: var(--teal-400); color: var(--teal-700); text-decoration: none; }

.radar-field {
  position: absolute;
  inset: 0;
  z-index: 1;
  pointer-events: none;
}

.radar-ring {
  position: absolute;
  top: 50%;
  left: 82%;
  border: 1px solid rgba(18, 184, 160, 0.18);
  border-radius: 50%;
  transform: translate(-50%, -50%);
}
.radar-ring.r1 { width: 340px; height: 340px; }
.radar-ring.r2 { width: 560px; height: 560px; }
.radar-ring.r3 { width: 800px; height: 800px; }

.radar-sweep {
  position: absolute;
  top: 50%;
  left: 82%;
  width: 800px;
  height: 800px;
  transform: translate(-50%, -50%);
  background: conic-gradient(from 0deg, rgba(18, 184, 160, 0.14), transparent 28%);
  border-radius: 50%;
  animation: sweep 6s linear infinite;
}

@keyframes sweep {
  from { transform: translate(-50%, -50%) rotate(0deg); }
  to { transform: translate(-50%, -50%) rotate(360deg); }
}

.cloud {
  position: absolute;
  background: #ffffff;
  border-radius: 999px;
  filter: blur(0.5px);
  box-shadow: 0 8px 20px rgba(13, 43, 66, 0.06);
}

.hero-content {
  position: relative;
  z-index: 4;
  flex: 1;
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 20px 24px 0;
  text-align: left;
}

.hero-grid {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  gap: 40px;
  align-items: center;
}

.hero-illustration {
  width: 100%;
  height: auto;
  filter: drop-shadow(0 20px 50px rgba(13, 43, 66, 0.18));
}

.beacon {
  animation: beacon-pulse 1.8s ease-in-out infinite;
  transform-origin: center;
}
@keyframes beacon-pulse {
  0%, 100% { opacity: 1; r: 5; }
  50% { opacity: 0.4; r: 7; }
}

.hero-plane {
  animation: plane-bob 4.5s ease-in-out infinite;
  transform-origin: center;
}
@keyframes plane-bob {
  0%, 100% { transform: translate(0, 0) rotate(-8deg); }
  50% { transform: translate(6px, -10px) rotate(-6deg); }
}

.radar-dish {
  animation: dish-spin 5s linear infinite;
  transform-origin: 300px 176px;
}
@keyframes dish-spin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.drift-a { animation: drift 9s ease-in-out infinite; }
.drift-b { animation: drift 12s ease-in-out infinite 1.5s; }
.drift-c { animation: drift 7.5s ease-in-out infinite 0.6s; }
@keyframes drift {
  0%, 100% { transform: translateX(0); }
  50% { transform: translateX(14px); }
}

.windsock {
  animation: flutter 2.4s ease-in-out infinite;
  transform-origin: 0px 0px;
}
@keyframes flutter {
  0%, 100% { transform: scaleX(1) skewY(0deg); }
  50% { transform: scaleX(0.85) skewY(4deg); }
}

.distant-plane {
  animation: crawl 26s linear infinite;
}
@keyframes crawl {
  from { transform: translate(0, 0); opacity: 0; }
  8% { opacity: 0.55; }
  92% { opacity: 0.55; }
  to { transform: translate(120px, -22px); opacity: 0; }
}

.window-blink {
  animation: blink 3.2s ease-in-out infinite;
}
@keyframes blink {
  0%, 40%, 100% { opacity: 0.35; }
  50% { opacity: 0.85; }
}

.eyebrow {
  color: var(--teal-700);
  letter-spacing: 0.16em;
  text-transform: uppercase;
  font-size: 0.78rem;
  font-weight: 700;
  margin-bottom: 18px;
}

.hero-content h1 {
  font-size: clamp(2.4rem, 6vw, 4.2rem);
  line-height: 1.06;
  max-width: 780px;
  margin: 0 0 22px;
}

.hero-content p.lede {
  font-size: 1.15rem;
  color: var(--ink-300);
  max-width: 560px;
  line-height: 1.6;
  margin: 0 0 34px;
}

.hero-cta { display: flex; gap: 14px; align-items: center; flex-wrap: wrap; }

.hero-note { margin-top: 18px; color: var(--ink-500); font-size: 0.9rem; }

/* ---------- Preview card (mimics a flight-search widget) ---------- */

.preview-wrap {
  position: relative;
  z-index: 6;
  margin-top: 46px;
}

.preview-card {
  background: var(--white);
  border: 1px solid var(--navy-700);
  border-radius: 18px;
  padding: 22px 26px;
  box-shadow: var(--shadow-soft);
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 22px;
}

.preview-field { display: flex; flex-direction: column; gap: 4px; min-width: 110px; }
.preview-field .k { font-size: 0.7rem; text-transform: uppercase; letter-spacing: 0.06em; color: var(--ink-500); }
.preview-field .v { font-size: 1rem; font-weight: 700; color: var(--ink-100); }

.preview-divider { width: 1px; align-self: stretch; background: var(--navy-700); }

.preview-arrow { color: var(--teal-400); font-size: 1.2rem; }

.preview-result {
  margin-left: auto;
  display: flex;
  align-items: center;
  gap: 14px;
}

.preview-price { text-align: right; }
.preview-price .amount { font-size: 1.3rem; font-weight: 700; color: var(--ink-100); }
.preview-price .miles { font-size: 0.8rem; color: var(--ink-500); }

@media (max-width: 860px) {
  .hero-grid { grid-template-columns: 1fr; }
  .preview-card { justify-content: center; }
  .preview-result { margin-left: 0; }
}

.feature-strip {
  position: relative;
  z-index: 4;
  border-top: 1px solid var(--navy-700);
  background: rgba(255, 255, 255, 0.55);
  backdrop-filter: blur(6px);
}

.feature-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 28px;
  padding: 64px 24px 48px;
}

.feature-card { display: flex; flex-direction: column; gap: 4px; }
.feature-icon {
  width: 40px;
  height: 40px;
  border-radius: 10px;
  background: var(--teal-100);
  display: flex;
  align-items: center;
  justify-content: center;
  margin-bottom: 10px;
}
.feature-grid h3 { font-size: 1.05rem; margin: 0 0 8px; color: var(--ink-100); }
.feature-grid p { margin: 0; color: var(--ink-500); font-size: 0.92rem; line-height: 1.55; }
.feature-tag { color: var(--teal-700); font-size: 0.8rem; font-weight: 700; letter-spacing: 0.06em; }

/* ---------- Auth pages ---------- */

.auth-wrap {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  background: linear-gradient(180deg, #f5fbfe, var(--navy-950));
  padding: 24px;
}

.auth-card {
  width: 100%;
  max-width: 420px;
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
  border-radius: var(--radius);
  padding: 34px;
  box-shadow: var(--shadow-soft);
}

.auth-card h1 { font-size: 1.6rem; margin: 0 0 6px; }
.auth-card .sub { color: var(--ink-500); font-size: 0.92rem; margin: 0 0 26px; }

.field { margin-bottom: 16px; }
.field label { display: block; font-size: 0.85rem; color: var(--ink-300); margin-bottom: 6px; font-weight: 600; }
.field-row { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }

input, select, textarea {
  width: 100%;
  padding: 11px 13px;
  border-radius: 10px;
  border: 1px solid var(--navy-600);
  background: var(--navy-950);
  color: var(--ink-100);
  font-size: 0.95rem;
  font-family: inherit;
}
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--teal-400); background: var(--white); }

.error-box {
  background: var(--danger-100);
  border: 1px solid rgba(255, 107, 107, 0.4);
  color: var(--danger-700);
  padding: 10px 14px;
  border-radius: 10px;
  font-size: 0.88rem;
  margin-bottom: 18px;
}

.auth-card .foot { margin-top: 20px; font-size: 0.88rem; color: var(--ink-500); text-align: center; }

/* ---------- App shell ---------- */

.app-shell {
  position: relative;
  min-height: 100vh;
  background:
    radial-gradient(circle at 12% 0%, rgba(18, 184, 160, 0.08), transparent 40%),
    radial-gradient(circle at 100% 20%, rgba(242, 161, 52, 0.06), transparent 35%),
    var(--navy-950);
  background-attachment: fixed;
  overflow-x: clip;
}

.app-nav, .app-main { position: relative; z-index: 1; }

.app-bg-field {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
}

.app-radar-ring {
  position: absolute;
  top: -120px;
  right: -160px;
  border: 1px solid rgba(18, 184, 160, 0.10);
  border-radius: 50%;
}
.app-radar-ring.r1 { width: 340px; height: 340px; }
.app-radar-ring.r2 { width: 560px; height: 560px; top: -230px; right: -280px; }
.app-radar-ring.r3 { width: 800px; height: 800px; top: -350px; right: -400px; }

.app-radar-sweep {
  position: absolute;
  top: -350px;
  right: -400px;
  width: 800px;
  height: 800px;
  background: conic-gradient(from 0deg, rgba(18, 184, 160, 0.08), transparent 28%);
  border-radius: 50%;
  animation: sweep 9s linear infinite;
}

.app-bg-plane {
  position: absolute;
  width: 260px;
  bottom: 6%;
  left: -3%;
  opacity: 0.035;
  transform: rotate(8deg);
}

.app-bg-path {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  opacity: 0.5;
}

.app-nav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 20px 24px;
  border-bottom: 1px solid var(--navy-700);
  background: rgba(255, 255, 255, 0.5);
  backdrop-filter: blur(6px);
}

.user-menu { position: relative; }
.user-menu-trigger {
  display: flex;
  align-items: center;
  gap: 8px;
  background: var(--white);
  border: 1px solid var(--navy-700);
  border-radius: 999px;
  padding: 6px 14px 6px 6px;
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  color: var(--ink-100);
  box-shadow: var(--shadow-card);
}
.user-avatar {
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--ink-100);
  color: var(--white);
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  font-size: 0.8rem;
  flex-shrink: 0;
}
.user-name { font-weight: 600; }
.user-caret { color: var(--ink-500); font-size: 0.7rem; }

.user-dropdown {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 160px;
  background: var(--white);
  border: 1px solid var(--navy-700);
  border-radius: 12px;
  box-shadow: var(--shadow-soft);
  padding: 6px;
  display: none;
  z-index: 30;
}
.user-dropdown.open { display: block; }
.user-dropdown form { margin: 0; }
.user-dropdown-item {
  display: block;
  width: 100%;
  text-align: left;
  padding: 9px 12px;
  border-radius: 8px;
  border: none;
  background: none;
  font-family: inherit;
  font-size: 0.88rem;
  color: var(--ink-100);
  cursor: pointer;
}
.user-dropdown-item:hover { background: var(--navy-950); text-decoration: none; }
.user-dropdown-danger { color: var(--danger-700); }

.app-main { padding: 36px 24px 80px; }

.page-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 16px;
  margin-bottom: 28px;
}

.page-head h1 { margin: 0; font-size: 1.9rem; }
.page-head p { margin: 6px 0 0; color: var(--ink-500); }

.monitoring-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
  gap: 18px;
}

.card {
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
  border-radius: var(--radius);
  padding: 20px;
  box-shadow: var(--shadow-card);
}

.mon-card {
  display: block;
  color: inherit;
  transition: border-color 0.15s ease, transform 0.15s ease, box-shadow 0.15s ease;
  position: relative;
  overflow: hidden;
}
.mon-card:hover { border-color: var(--teal-400); text-decoration: none; transform: translateY(-2px); box-shadow: var(--shadow-soft); }
.mon-card::before {
  content: '';
  position: absolute;
  top: -40px;
  right: -40px;
  width: 120px;
  height: 120px;
  background: radial-gradient(circle, rgba(18, 184, 160, 0.10), transparent 70%);
  pointer-events: none;
}

.route-viz {
  display: flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 4px;
}
.route-code { font-size: 1.2rem; font-weight: 700; }
.route-line {
  flex: 1;
  height: 1px;
  background: repeating-linear-gradient(90deg, var(--navy-600) 0 6px, transparent 6px 11px);
  position: relative;
  min-width: 30px;
}
.route-plane {
  color: var(--teal-400);
  font-size: 0.85rem;
  flex-shrink: 0;
}

.mon-meta { color: var(--ink-500); font-size: 0.85rem; margin-bottom: 12px; }

.mon-price-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 0.85rem;
  color: var(--ink-300);
}
.mon-price-row .icon { opacity: 0.8; }

.badge {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.02em;
}
.badge-active { background: var(--teal-100); color: var(--teal-700); }
.badge-paused { background: var(--navy-900); color: var(--ink-500); }
.badge-below { background: var(--teal-100); color: var(--teal-700); }
.badge-average { background: var(--amber-100); color: var(--amber-700); }
.badge-above { background: var(--danger-100); color: var(--danger-700); }

.empty-state {
  text-align: center;
  padding: 80px 20px;
  color: var(--ink-500);
  border: 1px dashed var(--navy-600);
  border-radius: var(--radius);
  background: rgba(255, 255, 255, 0.4);
}
.empty-state .empty-icon { margin-bottom: 18px; opacity: 0.9; }
.empty-state p { max-width: 380px; margin-left: auto; margin-right: auto; }

/* ---------- Modal / wizard ---------- */

.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(13, 27, 42, 0.45);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 50;
  padding: 20px;
}
.modal-overlay.open { display: flex; }

.modal {
  width: 100%;
  max-width: 620px;
  max-height: 90vh;
  overflow-y: auto;
  background: var(--navy-800);
  border: 1px solid var(--navy-700);
  border-radius: var(--radius);
  padding: 30px;
  box-shadow: var(--shadow-soft);
}

.modal-head { display: flex; justify-content: space-between; align-items: flex-start; margin-bottom: 22px; }
.modal-head h2 { margin: 0 0 4px; font-size: 1.4rem; }
.modal-head .step-label { color: var(--ink-500); font-size: 0.85rem; }
.modal-close { background: none; border: none; color: var(--ink-500); font-size: 1.4rem; cursor: pointer; line-height: 1; }

.date-select-group { display: grid; grid-template-columns: 0.8fr 1fr 1fr; gap: 6px; }
.date-select-group select { padding: 11px 8px; }

.stepper {
  display: flex;
  align-items: stretch;
  border: 1px solid var(--navy-600);
  border-radius: 10px;
  background: var(--navy-950);
  overflow: hidden;
}
.stepper-btn {
  width: 38px;
  flex-shrink: 0;
  border: none;
  background: var(--navy-900);
  color: var(--ink-100);
  font-size: 1.1rem;
  font-weight: 700;
  cursor: pointer;
  line-height: 1;
}
.stepper-btn:hover { background: var(--teal-100); color: var(--teal-700); }
.stepper-btn:active { background: var(--teal-400); color: var(--white); }
.stepper input {
  border: none;
  background: transparent;
  text-align: center;
  padding: 11px 4px;
  width: 100%;
  -moz-appearance: textfield;
}
.stepper input::-webkit-outer-spin-button,
.stepper input::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }

.airport-field { position: relative; }
.airport-suggest {
  position: absolute;
  top: calc(100% + 4px);
  left: 0;
  right: 0;
  z-index: 20;
  background: var(--white);
  border: 1px solid var(--navy-700);
  border-radius: 10px;
  box-shadow: var(--shadow-soft);
  max-height: 240px;
  overflow-y: auto;
  display: none;
}
.airport-suggest.open { display: block; }
.airport-option {
  display: flex;
  align-items: baseline;
  gap: 8px;
  padding: 9px 13px;
  cursor: pointer;
  font-size: 0.86rem;
}
.airport-option:hover, .airport-option.active { background: var(--navy-950); }
.airport-option .code { font-weight: 700; color: var(--ink-100); }
.airport-option .place { color: var(--ink-500); flex: 1; }
.airport-option-empty { padding: 10px 13px; color: var(--ink-500); font-size: 0.85rem; }

.checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(150px, 1fr));
  gap: 8px;
  max-height: 220px;
  overflow-y: auto;
  padding: 12px;
  border: 1px solid var(--navy-600);
  border-radius: 10px;
  background: var(--navy-950);
}
.checkbox-grid label { display: flex; align-items: center; gap: 6px; font-size: 0.86rem; color: var(--ink-300); font-weight: normal; }
.checkbox-grid input { width: auto; }
.checkbox-group-label { grid-column: 1 / -1; color: var(--ink-500); font-size: 0.72rem; text-transform: uppercase; letter-spacing: 0.05em; margin: 8px 0 2px; }

.radio-pills { display: flex; gap: 8px; flex-wrap: wrap; }
.radio-pills label {
  border: 1px solid var(--navy-600);
  border-radius: 999px;
  padding: 8px 16px;
  font-size: 0.85rem;
  cursor: pointer;
  color: var(--ink-300);
}
.radio-pills input { display: none; }
.radio-pills input:checked + span { color: var(--white); }
.radio-pills label:has(input:checked) { background: var(--ink-100); border-color: var(--ink-100); color: var(--white); }

.modal-actions { display: flex; justify-content: space-between; margin-top: 26px; }

.benchmark-box {
  background: var(--navy-950);
  border: 1px solid var(--navy-600);
  border-radius: 12px;
  padding: 18px;
  margin-bottom: 20px;
}
.benchmark-row { display: flex; justify-content: space-between; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--navy-700); }
.benchmark-row:last-child { border-bottom: none; }
.benchmark-label { color: var(--ink-500); font-size: 0.88rem; }
.benchmark-value { font-weight: 700; }

/* ---------- Detail / chart ---------- */

.detail-meta { display: flex; flex-wrap: wrap; gap: 10px; margin-bottom: 24px; }
.chip {
  background: var(--white);
  border: 1px solid var(--navy-700);
  border-radius: 999px;
  padding: 6px 14px;
  font-size: 0.82rem;
  color: var(--ink-300);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.chart-wrap { background: var(--navy-800); border: 1px solid var(--navy-700); border-radius: var(--radius); padding: 24px; box-shadow: var(--shadow-card); }

@media (max-width: 640px) {
  .field-row { grid-template-columns: 1fr; }
  .hero-content { padding-bottom: 60px; }
}
