/* === Base === */
:root {
  --bg: #07111f;
  --bg-elevated: rgba(9, 19, 35, 0.86);
  --bg-card: rgba(14, 27, 47, 0.88);
  --bg-card-strong: rgba(18, 34, 59, 0.94);
  --bg-card-hover: rgba(27, 47, 77, 0.95);
  --bg-input: rgba(8, 17, 31, 0.9);
  --text: #eef6ff;
  --text-muted: #9fb3cf;
  --text-dim: #6981a3;
  --accent: #68e1ff;
  --accent-strong: #38bdf8;
  --accent-warm: #ffb96a;
  --accent-violet: #8b7dff;
  --green: #4ff2a3;
  --yellow: #ffd166;
  --red: #ff7f9f;
  --orange: #ff9d5c;
  --border: rgba(134, 175, 225, 0.18);
  --border-strong: rgba(104, 225, 255, 0.35);
  --shadow-lg: 0 25px 60px rgba(0, 0, 0, 0.38);
  --shadow-md: 0 16px 30px rgba(0, 0, 0, 0.28);
  --radius: 20px;
  --radius-md: 16px;
  --radius-sm: 12px;
  --max-width: 1280px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
html { scroll-behavior: smooth; }
body {
  font-family: 'Inter', -apple-system, BlinkMacSystemFont, sans-serif;
  color: var(--text);
  min-height: 100vh;
  line-height: 1.5;
  background:
    radial-gradient(circle at top left, rgba(104, 225, 255, 0.12), transparent 24%),
    radial-gradient(circle at top right, rgba(139, 125, 255, 0.12), transparent 28%),
    linear-gradient(180deg, #07111f 0%, #081321 40%, #0b1830 100%);
}

button,
input,
select {
  font: inherit;
}

button { -webkit-tap-highlight-color: transparent; }

.hidden { display: none !important; }
.screen { min-height: 100vh; position: relative; }
.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0, 0, 0, 0);
  border: 0;
}

/* === Login === */
#login-screen {
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  background:
    radial-gradient(circle at 15% 20%, rgba(104, 225, 255, 0.18), transparent 24%),
    radial-gradient(circle at 80% 15%, rgba(255, 185, 106, 0.16), transparent 22%),
    radial-gradient(circle at 70% 80%, rgba(139, 125, 255, 0.18), transparent 22%),
    linear-gradient(135deg, #07111f 0%, #0b1b31 50%, #07111f 100%);
}

.login-shell {
  position: relative;
  width: min(100%, 1040px);
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: 2rem;
}

.login-ambient {
  position: absolute;
  border-radius: 999px;
  filter: blur(40px);
  opacity: 0.8;
  pointer-events: none;
}

.login-ambient-one {
  width: 280px;
  height: 280px;
  left: 8%;
  top: 18%;
  background: rgba(104, 225, 255, 0.18);
  animation: float 12s ease-in-out infinite;
}

.login-ambient-two {
  width: 340px;
  height: 340px;
  right: 5%;
  bottom: 10%;
  background: rgba(255, 185, 106, 0.12);
  animation: float 14s ease-in-out infinite reverse;
}

.login-card {
  position: relative;
  z-index: 1;
  width: 100%;
  max-width: 470px;
  padding: 2.5rem;
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 28px;
  background: linear-gradient(180deg, rgba(12, 24, 42, 0.92), rgba(10, 20, 36, 0.9));
  backdrop-filter: blur(20px);
  box-shadow: var(--shadow-lg);
  text-align: center;
}

.login-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  padding: 0.45rem 0.8rem;
  border-radius: 999px;
  background: rgba(104, 225, 255, 0.12);
  border: 1px solid rgba(104, 225, 255, 0.22);
  color: var(--accent);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  margin-bottom: 1rem;
}

.login-icon-wrap {
  display: grid;
  place-items: center;
  margin-bottom: 1rem;
}

.login-icon {
  width: 74px;
  height: 74px;
  display: grid;
  place-items: center;
  border-radius: 22px;
  font-size: 2rem;
  background: linear-gradient(135deg, rgba(104, 225, 255, 0.22), rgba(139, 125, 255, 0.2));
  border: 1px solid rgba(255, 255, 255, 0.14);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.1), 0 14px 30px rgba(0,0,0,0.25);
}

.login-card h1 {
  font-size: clamp(2rem, 4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 0.75rem;
}

.login-subtitle {
  color: var(--text-muted);
  font-size: 1rem;
  max-width: 30ch;
  margin: 0 auto 1rem;
}

.login-highlights {
  display: flex;
  justify-content: center;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-bottom: 1.5rem;
}

.login-highlights span {
  padding: 0.42rem 0.7rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
  font-size: 0.82rem;
}

#login-form {
  display: grid;
  gap: 0.9rem;
}

#login-form input,
#route-select {
  width: 100%;
  padding: 0.95rem 1rem;
  background: var(--bg-input);
  border: 1px solid rgba(255,255,255,0.1);
  border-radius: 14px;
  color: var(--text);
  outline: none;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

#login-form input::placeholder { color: #6f86a9; }
#login-form input:focus,
#route-select:focus {
  border-color: var(--accent-strong);
  box-shadow: 0 0 0 4px rgba(56, 189, 248, 0.16);
}

.btn-primary,
.book-btn,
.priority-cta {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.55rem;
  border: 0;
  border-radius: 14px;
  cursor: pointer;
  font-weight: 800;
  transition: transform 0.18s ease, box-shadow 0.2s ease, filter 0.2s ease, background 0.2s ease;
}

.btn-primary {
  width: 100%;
  min-height: 52px;
  padding: 0.95rem 1.15rem;
  color: #04131f;
  background: linear-gradient(135deg, var(--accent), #8ee8ff 60%, #c9fff4 100%);
  box-shadow: 0 14px 35px rgba(104, 225, 255, 0.28);
}

.btn-primary:hover,
.book-btn:hover,
.priority-cta:hover {
  transform: translateY(-1px);
  filter: brightness(1.04);
}

.btn-primary:active,
.book-btn:active,
.priority-cta:active,
.btn-icon:active,
.filter-btn:active,
.tab:active {
  transform: translateY(0);
}

.error { color: var(--red); font-size: 0.88rem; margin-top: 0.2rem; }

/* === Dashboard Layout === */
#dashboard {
  isolation: isolate;
}

.page-glow {
  position: fixed;
  border-radius: 999px;
  filter: blur(80px);
  pointer-events: none;
  opacity: 0.35;
  z-index: -1;
}

.page-glow-one {
  width: 320px;
  height: 320px;
  top: 90px;
  left: -100px;
  background: rgba(104, 225, 255, 0.25);
}

.page-glow-two {
  width: 340px;
  height: 340px;
  top: 260px;
  right: -120px;
  background: rgba(255, 185, 106, 0.17);
}

header,
.tabs,
main {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 0 auto;
}

header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1.25rem;
  padding: 1.35rem 0 1rem;
  position: sticky;
  top: 0;
  z-index: 50;
  backdrop-filter: blur(20px);
  -webkit-backdrop-filter: blur(20px);
  background: rgba(7, 17, 31, 0.45);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.eyebrow {
  color: var(--accent);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  margin-bottom: 0.25rem;
}

.header-left h1 {
  font-size: clamp(1.4rem, 2vw, 1.8rem);
  font-weight: 800;
  letter-spacing: -0.03em;
}

.header-subtitle {
  font-size: 0.88rem;
  color: var(--text-muted);
}

.header-right {
  display: flex;
  align-items: center;
  gap: 0.9rem;
}

.stats-mini {
  display: flex;
  gap: 0.65rem;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.stats-mini span {
  padding: 0.45rem 0.75rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
  font-size: 0.78rem;
  white-space: nowrap;
}

.btn-icon {
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 14px;
  color: var(--text);
  min-width: 44px;
  min-height: 44px;
  cursor: pointer;
  font-size: 1rem;
  transition: background 0.2s ease, border-color 0.2s ease, transform 0.18s ease;
}

.btn-icon:hover {
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.16);
}

/* === Priority Banner === */
.priority-banner {
  width: min(calc(100% - 2rem), var(--max-width));
  margin: 1.2rem auto 0;
  padding: 1.15rem 1.2rem;
  display: grid;
  grid-template-columns: auto 1fr auto auto;
  gap: 1rem;
  align-items: center;
  border: 1px solid rgba(104, 225, 255, 0.28);
  border-radius: 22px;
  background:
    linear-gradient(135deg, rgba(104, 225, 255, 0.12), rgba(255, 185, 106, 0.1)),
    rgba(15, 29, 49, 0.82);
  box-shadow: var(--shadow-md);
}

.priority-icon {
  width: 56px;
  height: 56px;
  border-radius: 18px;
  display: grid;
  place-items: center;
  font-size: 1.7rem;
  background: rgba(255,255,255,0.08);
  border: 1px solid rgba(255,255,255,0.1);
}

.priority-label {
  color: var(--accent-warm);
  font-size: 0.76rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  margin-bottom: 0.25rem;
}

.priority-info h3 {
  font-size: 1.05rem;
  font-weight: 800;
  margin-bottom: 0.2rem;
}

.priority-info p {
  color: var(--text-muted);
  font-size: 0.9rem;
}

.priority-price {
  text-align: right;
  font-size: 2rem;
  font-weight: 800;
  color: var(--text);
}

.priority-price small {
  display: block;
  font-size: 0.75rem;
  font-weight: 600;
  color: var(--text-muted);
}

.priority-cta {
  padding: 0.9rem 1rem;
  color: #04131f;
  background: linear-gradient(135deg, var(--accent-warm), #ffd7aa 100%);
  white-space: nowrap;
}

/* === Tabs === */
.tabs {
  display: flex;
  gap: 0.55rem;
  margin-top: 1.2rem;
  padding: 0.45rem;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  overflow-x: auto;
}

.tab {
  flex: 1;
  min-width: max-content;
  padding: 0.85rem 1rem;
  background: transparent;
  border: 0;
  border-radius: 14px;
  color: var(--text-muted);
  font-size: 0.9rem;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s ease, color 0.2s ease, transform 0.18s ease, box-shadow 0.2s ease;
}

.tab:hover { color: var(--text); }

.tab.active {
  color: var(--text);
  background: linear-gradient(135deg, rgba(104, 225, 255, 0.18), rgba(139, 125, 255, 0.12));
  box-shadow: inset 0 0 0 1px rgba(104, 225, 255, 0.18);
}

/* === Content === */
main {
  padding: 1.4rem 0 3rem;
}

.tab-content {
  animation: fadeUp 0.35s ease;
}

.hero-panel,
.dest-card,
.deal-card,
.trip-card,
#history-chart-container,
.stat-card,
.history-empty {
  backdrop-filter: blur(14px);
}

.hero-panel {
  display: grid;
  grid-template-columns: minmax(0, 1.5fr) minmax(280px, 1fr);
  gap: 1rem;
  padding: 1.25rem;
  margin-bottom: 1.25rem;
  border-radius: 24px;
  border: 1px solid rgba(255,255,255,0.08);
  background:
    radial-gradient(circle at top right, rgba(255, 185, 106, 0.14), transparent 28%),
    linear-gradient(135deg, rgba(104, 225, 255, 0.1), rgba(139, 125, 255, 0.08)),
    rgba(14, 27, 47, 0.75);
  box-shadow: var(--shadow-md);
}

.hero-kicker {
  color: var(--accent);
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  font-weight: 800;
  margin-bottom: 0.45rem;
}

.hero-panel h2 {
  font-size: clamp(1.7rem, 3vw, 2.35rem);
  line-height: 1.05;
  letter-spacing: -0.04em;
  margin-bottom: 0.55rem;
}

.hero-panel p {
  color: var(--text-muted);
  font-size: 0.96rem;
  max-width: 58ch;
}

.hero-insights {
  display: flex;
  flex-wrap: wrap;
  align-content: flex-start;
  gap: 0.65rem;
}

.insight-pill {
  padding: 0.7rem 0.9rem;
  border-radius: 16px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.section-header {
  margin-bottom: 1.1rem;
}

.section-header-inline {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 1rem;
}

.section-header h2 {
  font-size: 1.35rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.section-header p {
  color: var(--text-muted);
  font-size: 0.92rem;
  margin-top: 0.2rem;
}

/* === Card Grid === */
.card-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(320px, 1fr));
  gap: 1rem;
}

.deal-card,
.dest-card,
.trip-card,
.stat-card,
#history-chart-container,
.history-empty {
  background: linear-gradient(180deg, rgba(16, 30, 52, 0.92), rgba(10, 21, 39, 0.9));
  border: 1px solid var(--border);
  box-shadow: var(--shadow-md);
}

.deal-card {
  position: relative;
  overflow: hidden;
  border-radius: 22px;
  padding: 1.15rem;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.deal-card::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, rgba(255,255,255,0.04), transparent 40%);
  pointer-events: none;
}

.deal-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
  box-shadow: 0 22px 45px rgba(0,0,0,0.34);
}

.deal-card.top-pick {
  border-color: rgba(255, 209, 102, 0.4);
  box-shadow: 0 18px 45px rgba(255, 209, 102, 0.08), var(--shadow-md);
}

.deal-card-header {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
  margin-bottom: 0.8rem;
}

.deal-kicker {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.35rem 0.65rem;
  margin-bottom: 0.65rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  color: var(--accent-warm);
  font-size: 0.74rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.deal-route {
  color: var(--text-muted);
  font-size: 0.88rem;
}

.deal-route strong {
  display: block;
  color: var(--text);
  font-size: 1.3rem;
  line-height: 1.05;
  margin-top: 0.2rem;
  font-weight: 800;
  letter-spacing: -0.03em;
}

.route-code {
  color: var(--text-dim);
  font-size: 0.78rem;
  margin-top: 0.28rem;
}

.deal-price-wrap {
  text-align: right;
}

.deal-price {
  font-size: clamp(1.8rem, 4vw, 2.15rem);
  font-weight: 800;
  line-height: 0.95;
  letter-spacing: -0.04em;
}

.deal-price.price-high { color: var(--red); }
.deal-price.price-typical { color: var(--yellow); }
.deal-price.price-low { color: var(--green); }

.deal-price small {
  display: block;
  margin-top: 0.28rem;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--text-muted);
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.deal-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 0.55rem;
  margin-bottom: 0.8rem;
}

.meta-chip {
  padding: 0.42rem 0.65rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
  font-size: 0.78rem;
}

.deal-tags {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
}

.tag {
  font-size: 0.72rem;
  font-weight: 700;
  padding: 0.3rem 0.6rem;
  border-radius: 999px;
  background: rgba(56, 189, 248, 0.12);
  color: var(--accent);
  border: 1px solid rgba(56, 189, 248, 0.18);
}

.tag.tag-low { background: rgba(79, 242, 163, 0.12); color: var(--green); border-color: rgba(79, 242, 163, 0.2); }
.tag.tag-high { background: rgba(255, 127, 159, 0.12); color: var(--red); border-color: rgba(255, 127, 159, 0.2); }
.tag.tag-typical { background: rgba(255, 209, 102, 0.12); color: var(--yellow); border-color: rgba(255, 209, 102, 0.2); }
.tag.tag-drop { background: rgba(104, 225, 255, 0.14); color: var(--accent); }
.tag.tag-direct { background: rgba(255,255,255,0.08); color: var(--text); }
.tag.tag-vibe { background: rgba(139, 125, 255, 0.12); color: #bdb5ff; }

.deal-typical {
  margin-top: 0.8rem;
  color: var(--text-dim);
  font-size: 0.82rem;
}

.deal-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-top: 1rem;
}

.deal-prompt {
  color: var(--text-muted);
  font-size: 0.84rem;
  font-weight: 600;
}

.book-btn {
  padding: 0.85rem 1rem;
  color: #04131f;
  background: linear-gradient(135deg, var(--accent), #d4fff7 100%);
  box-shadow: 0 12px 24px rgba(104, 225, 255, 0.22);
  font-size: 0.9rem;
}

/* === Destination Cards === */
.dest-card {
  border-radius: 22px;
  overflow: hidden;
  transition: transform 0.22s ease, border-color 0.22s ease, box-shadow 0.22s ease;
}

.dest-card:hover {
  transform: translateY(-4px);
  border-color: var(--border-strong);
}

.dest-image {
  height: 190px;
  background-size: cover;
  background-position: center;
  position: relative;
}

.dest-image::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(180deg, transparent 20%, rgba(8, 17, 31, 0.2) 55%, rgba(8, 17, 31, 0.95) 100%);
}

.dest-image-badge,
.dest-match {
  position: absolute;
  z-index: 1;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 800;
  backdrop-filter: blur(8px);
}

.dest-image-badge {
  top: 0.9rem;
  left: 0.9rem;
  padding: 0.42rem 0.7rem;
  background: rgba(8, 17, 31, 0.6);
  border: 1px solid rgba(255,255,255,0.12);
}

.dest-match {
  right: 0.9rem;
  bottom: 0.9rem;
  padding: 0.48rem 0.75rem;
  background: rgba(104, 225, 255, 0.14);
  border: 1px solid rgba(104, 225, 255, 0.2);
  color: var(--accent);
}

.dest-body { padding: 1rem 1rem 1.1rem; }
.dest-header { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; }
.dest-body h3 { font-size: 1.12rem; font-weight: 800; letter-spacing: -0.02em; }
.dest-country { color: var(--text-muted); font-size: 0.82rem; margin-top: 0.25rem; }
.dest-desc { font-size: 0.88rem; color: var(--text-muted); margin: 0.8rem 0 0.95rem; line-height: 1.55; }

.dest-vibes {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-bottom: 0.85rem;
}

.vibe-chip {
  padding: 0.32rem 0.58rem;
  border-radius: 999px;
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.08);
  color: var(--text-muted);
  font-size: 0.72rem;
  font-weight: 700;
}

.dest-ratings {
  display: grid;
  gap: 0.55rem;
}

.rating {
  display: grid;
  grid-template-columns: 64px 1fr auto;
  gap: 0.5rem;
  align-items: center;
  color: var(--text-muted);
  font-size: 0.8rem;
}

.rating-bar {
  display: inline-block;
  height: 7px;
  background: rgba(255,255,255,0.08);
  border-radius: 999px;
  overflow: hidden;
}

.rating-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, var(--accent-strong), var(--accent));
}

.dest-price-tag {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  margin-top: 1rem;
  padding: 0.5rem 0.8rem;
  border-radius: 12px;
  background: rgba(79, 242, 163, 0.12);
  color: var(--green);
  font-size: 0.86rem;
  font-weight: 800;
}

/* === Trip Ideas === */
#trips-list {
  display: grid;
  gap: 1rem;
}

.trip-card {
  border-radius: 22px;
  padding: 1.25rem;
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  transition: transform 0.2s ease, border-color 0.2s ease;
}

.trip-card:hover {
  transform: translateY(-3px);
  border-color: var(--border-strong);
}

.trip-card.priority {
  background:
    radial-gradient(circle at top right, rgba(255, 185, 106, 0.12), transparent 20%),
    linear-gradient(135deg, rgba(104, 225, 255, 0.1), rgba(139, 125, 255, 0.08)),
    rgba(14, 27, 47, 0.9);
}

.trip-icon {
  width: 68px;
  height: 68px;
  border-radius: 20px;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.07);
  border: 1px solid rgba(255,255,255,0.08);
  font-size: 2rem;
}

.trip-topline {
  display: flex;
  justify-content: space-between;
  gap: 0.75rem;
  align-items: center;
  margin-bottom: 0.25rem;
}

.trip-info h3 { font-size: 1.15rem; font-weight: 800; }
.trip-subtitle { font-size: 0.9rem; color: var(--text-muted); }
.trip-dates { font-size: 0.82rem; color: var(--accent); margin-top: 0.45rem; font-weight: 700; }
.trip-notes { font-size: 0.88rem; color: var(--text-muted); margin-top: 0.55rem; line-height: 1.5; }

.trip-reasons {
  display: flex;
  gap: 0.45rem;
  flex-wrap: wrap;
  margin-top: 0.8rem;
}

.trip-status {
  display: grid;
  gap: 0.55rem;
  justify-items: end;
}

.trip-priority-badge {
  padding: 0.35rem 0.55rem;
  border-radius: 999px;
  background: rgba(255, 209, 102, 0.12);
  color: var(--yellow);
  font-size: 0.72rem;
  font-weight: 800;
}

.status-badge {
  display: inline-block;
  padding: 0.4rem 0.78rem;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  text-transform: capitalize;
}

.status-tracking { background: rgba(56, 189, 248, 0.15); color: var(--accent); }
.status-idea { background: rgba(255, 209, 102, 0.15); color: var(--yellow); }
.status-booked { background: rgba(79, 242, 163, 0.15); color: var(--green); }

/* === History === */
#route-selector { margin-bottom: 1rem; }

#route-select {
  max-width: 500px;
  min-width: 280px;
  background: rgba(11, 22, 38, 0.95);
}

.history-empty {
  padding: 2.5rem 1.5rem;
  border-radius: 22px;
  text-align: center;
}

.history-empty-icon {
  font-size: 2.2rem;
  margin-bottom: 0.6rem;
}

.history-empty h3 {
  font-size: 1.08rem;
  font-weight: 800;
  margin-bottom: 0.3rem;
}

.history-empty p {
  color: var(--text-muted);
  max-width: 42ch;
  margin: 0 auto;
}

#history-chart-container {
  border-radius: 22px;
  padding: 1rem 1rem 1.25rem;
  margin-bottom: 1rem;
  min-height: 320px;
}

.stat-cards {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: 1rem;
}

.stat-card {
  border-radius: 18px;
  padding: 1.1rem;
  text-align: center;
}

.stat-label {
  display: block;
  font-size: 0.78rem;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.08em;
  font-weight: 700;
  margin-bottom: 0.45rem;
}

.stat-value {
  display: block;
  font-size: 1.8rem;
  font-weight: 800;
  color: var(--text);
  letter-spacing: -0.04em;
}

/* === Filter Bar === */
.filter-bar {
  display: flex;
  gap: 0.55rem;
  flex-wrap: wrap;
  margin-top: 0.85rem;
}

.filter-btn {
  padding: 0.55rem 0.9rem;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
  border-radius: 999px;
  color: var(--text-muted);
  font-size: 0.82rem;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.2s ease;
}

.filter-btn:hover {
  border-color: rgba(104, 225, 255, 0.26);
  color: var(--text);
}

.filter-btn.active {
  background: linear-gradient(135deg, rgba(104, 225, 255, 0.18), rgba(139, 125, 255, 0.12));
  color: var(--text);
  border-color: rgba(104, 225, 255, 0.3);
}

/* === Loading === */
.loading {
  grid-column: 1 / -1;
  text-align: center;
  padding: 3rem 1rem;
  color: var(--text-muted);
  font-size: 0.92rem;
}

/* === Animations === */
@keyframes float {
  0%, 100% { transform: translate3d(0, 0, 0); }
  50% { transform: translate3d(0, -16px, 0); }
}

@keyframes fadeUp {
  from { opacity: 0; transform: translateY(10px); }
  to { opacity: 1; transform: translateY(0); }
}

/* === Responsive === */
@media (max-width: 980px) {
  .priority-banner {
    grid-template-columns: auto 1fr;
  }

  .priority-price,
  .priority-cta {
    grid-column: 2;
  }

  .hero-panel {
    grid-template-columns: 1fr;
  }

  .trip-card {
    grid-template-columns: auto 1fr;
  }

  .trip-status {
    grid-column: 1 / -1;
    justify-items: start;
  }
}

@media (max-width: 768px) {
  .login-shell,
  main,
  header,
  .tabs,
  .priority-banner {
    width: min(calc(100% - 1.2rem), var(--max-width));
  }

  .login-shell { padding: 1rem; }
  .login-card { padding: 2rem 1.25rem; border-radius: 24px; }

  header {
    align-items: flex-start;
    flex-direction: column;
    padding: 1rem 0 0.85rem;
  }

  .header-right {
    width: 100%;
    justify-content: space-between;
  }

  .stats-mini {
    flex-wrap: wrap;
    justify-content: flex-start;
  }

  .tabs {
    margin-top: 1rem;
    padding: 0.35rem;
  }

  main { padding: 1rem 0 2.5rem; }

  .card-grid,
  .stat-cards {
    grid-template-columns: 1fr;
  }

  .priority-banner {
    margin-top: 1rem;
    grid-template-columns: 1fr;
    text-align: left;
  }

  .priority-price,
  .priority-cta {
    grid-column: auto;
    text-align: left;
  }

  .deal-card-header,
  .dest-header,
  .trip-topline {
    flex-direction: column;
    align-items: flex-start;
  }

  .deal-price-wrap { text-align: left; }

  .deal-footer {
    flex-direction: column;
    align-items: stretch;
  }

  .book-btn,
  .priority-cta {
    width: 100%;
  }

  .trip-card {
    grid-template-columns: 1fr;
    text-align: left;
  }

  .trip-icon { width: 60px; height: 60px; }

  .rating {
    grid-template-columns: 56px 1fr auto;
  }

  #route-select {
    min-width: 0;
  }
}

/* === Departure Filter === */
.departure-filter {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.departure-label {
  font-size: 0.8rem;
  color: var(--text-muted);
  font-weight: 500;
  white-space: nowrap;
}

.departure-pills {
  display: flex;
  gap: 0.4rem;
  flex-wrap: wrap;
}

.dep-pill {
  padding: 0.35rem 0.75rem;
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: 20px;
  color: var(--text-muted);
  font-size: 0.8rem;
  cursor: pointer;
  transition: all 0.2s;
  font-family: inherit;
}

.dep-pill:hover {
  border-color: var(--accent);
  color: var(--text);
}

.dep-pill.active {
  background: var(--accent);
  color: #0f172a;
  border-color: var(--accent);
  font-weight: 600;
}

.dep-pill.dep-home {
  border-color: rgba(104, 225, 255, 0.3);
}

.section-header-inline {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 1rem;
  flex-wrap: wrap;
}

@media (max-width: 480px) {
  .header-left h1 { font-size: 1.3rem; }
  .hero-panel h2 { font-size: 1.55rem; }
  .deal-route strong { font-size: 1.15rem; }
  .deal-price { font-size: 1.8rem; }
  .stats-mini span { font-size: 0.74rem; }
}

/* === City Comparison === */
.city-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(300px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
}

.city-card {
  background: var(--bg-card);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem;
  transition: all 0.25s ease;
}

.city-card:hover {
  border-color: var(--accent);
  transform: translateY(-2px);
  box-shadow: 0 8px 30px rgba(0,0,0,0.3);
}

.city-card-home {
  border-color: var(--accent);
  background: linear-gradient(135deg, rgba(104, 225, 255, 0.08), var(--bg-card));
}

.city-card-header {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  margin-bottom: 1rem;
  position: relative;
}

.city-emoji { font-size: 1.75rem; }
.city-card-header h3 { font-size: 1.1rem; font-weight: 600; margin: 0; line-height: 1.2; }
.city-note { font-size: 0.8rem; color: var(--text-muted); }

.city-home-badge {
  position: absolute;
  top: 0;
  right: 0;
  font-size: 0.7rem;
  padding: 0.2rem 0.6rem;
  background: rgba(104, 225, 255, 0.15);
  color: var(--accent);
  border-radius: 12px;
  font-weight: 500;
}

.city-best-deal {
  background: rgba(255,255,255,0.03);
  border-radius: var(--radius-sm);
  padding: 0.75rem;
  margin-bottom: 0.75rem;
}

.city-best-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.city-best-route {
  display: flex;
  justify-content: space-between;
  align-items: baseline;
  margin-bottom: 0.35rem;
}

.city-best-dest {
  font-size: 1.1rem;
  font-weight: 600;
  color: var(--text);
}

.city-best-price {
  font-size: 1.4rem;
  font-weight: 700;
}

.city-best-price.price-low { color: var(--green); }
.city-best-price.price-high { color: var(--red); }
.city-best-price.price-typical { color: var(--yellow); }

.city-best-price small {
  font-size: 0.7rem;
  font-weight: 400;
  color: var(--text-muted);
}

.city-best-meta {
  font-size: 0.8rem;
  color: var(--text-muted);
  display: flex;
  align-items: center;
  gap: 0.5rem;
  flex-wrap: wrap;
}

.tag-sm {
  font-size: 0.65rem;
  padding: 0.15rem 0.4rem;
}

.city-other-deals {
  border-top: 1px solid var(--border);
  padding-top: 0.75rem;
}

.city-other-label {
  font-size: 0.7rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  color: var(--text-dim);
  margin-bottom: 0.5rem;
  font-weight: 500;
}

.city-other-row {
  display: flex;
  justify-content: space-between;
  font-size: 0.85rem;
  padding: 0.25rem 0;
  color: var(--text-muted);
}

.city-other-price {
  font-weight: 600;
  color: var(--text);
}

.city-no-data {
  color: var(--text-dim);
  font-size: 0.85rem;
  text-align: center;
  padding: 1rem;
}

.city-takeaway {
  background: linear-gradient(135deg, rgba(104, 225, 255, 0.06), rgba(79, 242, 163, 0.06));
  border: 1px solid var(--border);
  border-radius: var(--radius);
  padding: 1.25rem 1.5rem;
}

.city-takeaway h3 {
  font-size: 1rem;
  font-weight: 600;
  margin-bottom: 0.5rem;
}

.city-takeaway p {
  font-size: 0.9rem;
  color: var(--text-muted);
  line-height: 1.5;
}

@media (max-width: 768px) {
  .city-grid { grid-template-columns: 1fr; }
}
