/* css/style.css */

/* ── Tokens ─────────────────────────────────────────────── */
:root {
  --bg:        #06080e;
  --surface:   #0b0f1a;
  --surface2:  #0f1520;
  --border:    rgba(255,255,255,.06);
  --border2:   rgba(255,255,255,.1);
  --text1:     #f0f4ff;
  --text2:     #8899bb;
  --text3:     #3d5070;
  --blue:      #3b82f6;
  --cyan:      #06b6d4;
  --grad:      linear-gradient(135deg, #3b82f6, #06b6d4);
  --red:       #ef4444;
  --green:     #22c55e;
  --amber:     #f59e0b;
  --radius:    12px;
  --radius-sm: 8px;
  --shadow:    0 4px 24px rgba(0,0,0,.4);
}

/* ── Reset ──────────────────────────────────────────────── */
*, *::before, *::after { box-sizing: border-box; margin: 0; padding: 0; }
html { font-size: 16px; -webkit-tap-highlight-color: transparent; }
body {
  font-family: 'DM Sans', sans-serif;
  background: var(--bg);
  color: var(--text1);
  min-height: 100vh;
  line-height: 1.5;
}
img { display: block; max-width: 100%; }
button { cursor: pointer; border: none; background: none; font-family: inherit; }
input, select, textarea { font-family: inherit; }
.hidden { display: none !important; }

/* ── Auth screen ─────────────────────────────────────────── */
#auth-screen {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
  background:
    radial-gradient(ellipse 80% 60% at 50% -20%, rgba(59,130,246,.12) 0%, transparent 70%),
    var(--bg);
}

.auth-card {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 20px;
  padding: 48px 40px;
  display: flex;
  flex-direction: column;
  gap: 32px;
  box-shadow: 0 32px 80px rgba(0,0,0,.5);
}

.auth-brand {
  display: flex;
  align-items: center;
  gap: 14px;
}
.auth-brand__wordmark {
  font-family: 'Syne', sans-serif;
  font-size: 28px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text1);
}
.auth-brand__sub {
  font-size: 11px;
  letter-spacing: .14em;
  text-transform: uppercase;
  color: var(--text3);
  margin-top: 3px;
}

.auth-heading h2 {
  font-family: 'Syne', sans-serif;
  font-size: 22px;
  font-weight: 700;
  color: var(--text1);
  margin-bottom: 6px;
}
.auth-heading p {
  font-size: 14px;
  color: var(--text2);
}

.btn-google {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  padding: 13px 20px;
  background: var(--surface2);
  border: 1px solid var(--border2);
  border-radius: var(--radius-sm);
  color: var(--text1);
  font-size: 14px;
  font-weight: 500;
  transition: background .15s, border-color .15s;
}
.btn-google:hover { background: rgba(255,255,255,.05); border-color: var(--border2); }
.btn-google svg { width: 20px; height: 20px; flex-shrink: 0; }

.auth-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  color: var(--text3);
  font-size: 12px;
  letter-spacing: .06em;
}
.auth-divider::before,
.auth-divider::after {
  content: '';
  flex: 1;
  height: 1px;
  background: var(--border);
}

.magic-form { display: flex; flex-direction: column; gap: 10px; }
.magic-form input {
  width: 100%;
  padding: 12px 14px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text1);
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.magic-form input:focus { border-color: var(--blue); }
.magic-form input::placeholder { color: var(--text3); }

.btn-primary {
  width: 100%;
  padding: 13px 20px;
  background: var(--grad);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 14px;
  font-weight: 600;
  letter-spacing: .02em;
  transition: opacity .15s;
}
.btn-primary:hover { opacity: .9; }
.btn-primary:disabled { opacity: .5; cursor: not-allowed; }

.magic-sent {
  text-align: center;
  padding: 16px;
  background: rgba(34,197,94,.08);
  border: 1px solid rgba(34,197,94,.2);
  border-radius: var(--radius-sm);
  color: var(--green);
  font-size: 14px;
}

/* ── App screen ──────────────────────────────────────────── */
#app-screen {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  max-width: 760px;
  margin: 0 auto;
  padding: 0 16px 40px;
}

/* ── Top nav ─────────────────────────────────────────────── */
.topnav {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 16px 0 24px;
  gap: 12px;
}
.topnav__brand {
  display: flex;
  align-items: center;
  gap: 10px;
}
.topnav__wordmark {
  font-family: 'Syne', sans-serif;
  font-size: 20px;
  font-weight: 700;
  letter-spacing: -.02em;
  color: var(--text1);
}
.topnav__actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.btn-icon {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 36px;
  height: 36px;
  border-radius: 50%;
  border: 1px solid var(--border);
  background: var(--surface);
  color: var(--text2);
  transition: background .15s, color .15s;
}
.btn-icon:hover { background: var(--surface2); color: var(--text1); }
.btn-icon svg { width: 16px; height: 16px; }

.user-avatar-wrap {
  display: flex;
  align-items: center;
  gap: 8px;
}
#user-avatar {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  border: 1px solid var(--border2);
  object-fit: cover;
}
#user-avatar-placeholder {
  width: 32px;
  height: 32px;
  border-radius: 50%;
  background: var(--grad);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  font-weight: 700;
  color: #fff;
}
.user-info { display: none; }

/* ── Stats bar ───────────────────────────────────────────── */
.stats-bar {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 2px;
  margin-bottom: 24px;
}
.stat-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px 12px;
  text-align: center;
}
.stat-card__num {
  font-family: 'Syne', sans-serif;
  font-size: 26px;
  font-weight: 700;
  background: var(--grad);
  -webkit-background-clip: text;
  -webkit-text-fill-color: transparent;
  background-clip: text;
  line-height: 1;
}
.stat-card__label {
  font-size: 11px;
  color: var(--text3);
  margin-top: 4px;
  letter-spacing: .04em;
}

/* ── Section header ──────────────────────────────────────── */
.section-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 16px;
}
.tab-group {
  display: flex;
  gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 3px;
}
.tab-btn {
  padding: 6px 14px;
  border-radius: 6px;
  font-size: 13px;
  color: var(--text2);
  transition: background .15s, color .15s;
}
.tab-btn.active {
  background: var(--surface2);
  color: var(--text1);
}

.btn-add {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 8px 16px;
  background: var(--grad);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  transition: opacity .15s;
}
.btn-add:hover { opacity: .9; }
.btn-add svg { width: 16px; height: 16px; }

/* ── Flight cards (legacy stubs kept for safety) ── */
#flights-list { display: flex; flex-direction: column; gap: 10px; }
.flight-num { font-family: 'Syne', sans-serif; font-weight: 700; color: var(--text1) !important; }
.btn-delete:hover { color: var(--red) !important; border-color: rgba(239,68,68,.3) !important; }

/* ── Status badges ───────────────────────────────────────── */
.status-badge {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .06em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 4px;
}
.status-scheduled { background: rgba(59,130,246,.1);  color: var(--blue); }
.status-active    { background: rgba(34,197,94,.1);   color: var(--green); }
.status-landed    { background: rgba(100,116,139,.1); color: #64748b; }
.status-cancelled { background: rgba(239,68,68,.1);   color: var(--red); }

/* ── Empty state ─────────────────────────────────────────── */
.empty-state {
  text-align: center;
  padding: 64px 24px;
  color: var(--text3);
}
.empty-icon {
  font-size: 40px;
  margin-bottom: 16px;
  opacity: .3;
}

/* ── Settings panel ──────────────────────────────────────── */
.settings-panel {
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: var(--radius);
  padding: 24px;
  margin-bottom: 24px;
}
.settings-panel h3 {
  font-family: 'Syne', sans-serif;
  font-size: 14px;
  font-weight: 700;
  color: var(--text1);
  margin-bottom: 6px;
}
.settings-panel p {
  font-size: 13px;
  color: var(--text2);
  margin-bottom: 12px;
}
.settings-row {
  display: flex;
  gap: 8px;
}
.settings-row input {
  flex: 1;
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text1);
  font-size: 13px;
  outline: none;
}
.settings-row input:focus { border-color: var(--blue); }
.btn-sm {
  padding: 10px 16px;
  background: var(--blue);
  border-radius: var(--radius-sm);
  color: #fff;
  font-size: 13px;
  font-weight: 600;
  white-space: nowrap;
  transition: opacity .15s;
}
.btn-sm:hover { opacity: .9; }

/* ── Modal ───────────────────────────────────────────────── */
#modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 100;
}
#modal {
  position: fixed;
  inset: 0;
  z-index: 101;
  overflow-y: auto;
  padding: 24px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
}
#modal > .modal-box {
  pointer-events: all;
  width: 100%;
  max-width: 520px;
  background: var(--surface);
  border: 1px solid var(--border2);
  border-radius: 16px;
  padding: 28px;
  box-shadow: var(--shadow);
}

.modal-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  margin-bottom: 24px;
}
.modal-header h2 {
  font-family: 'Syne', sans-serif;
  font-size: 18px;
  font-weight: 700;
  color: var(--text1);
}

/* Lookup section */
.lookup-section {
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 16px;
  margin-bottom: 20px;
}
.lookup-section__label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 10px;
}
.lookup-row {
  display: flex;
  gap: 8px;
}
.lookup-row input {
  flex: 1;
  padding: 9px 12px;
  background: var(--bg);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text1);
  font-size: 13px;
  outline: none;
}
.lookup-row input:focus { border-color: var(--blue); }

.lookup-result {
  margin-top: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}
.lookup-result.loading  { background: rgba(59,130,246,.08); color: var(--text2); }
.lookup-result.success  { background: rgba(34,197,94,.08);  color: var(--green); border: 1px solid rgba(34,197,94,.15); }
.lookup-result.error    { background: rgba(239,68,68,.08);  color: var(--red);   border: 1px solid rgba(239,68,68,.15); }
.btn-apply {
  padding: 5px 12px;
  background: var(--green);
  border-radius: 4px;
  color: #fff;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
}

/* Form grid */
.form-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
}
.form-grid .full { grid-column: 1 / -1; }

.form-group { display: flex; flex-direction: column; gap: 5px; }
.form-group label {
  font-size: 11px;
  font-weight: 600;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text3);
}
.form-group input,
.form-group select,
.form-group textarea {
  padding: 10px 12px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text1);
  font-size: 14px;
  outline: none;
  transition: border-color .15s;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus { border-color: var(--blue); }
.form-group select { appearance: none; }
.form-group textarea { resize: vertical; min-height: 72px; }

.modal-footer {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 20px;
  padding-top: 20px;
  border-top: 1px solid var(--border);
}
.btn-ghost {
  padding: 10px 18px;
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  color: var(--text2);
  font-size: 14px;
  transition: background .15s;
}
.btn-ghost:hover { background: var(--surface2); }

/* ── Toast ───────────────────────────────────────────────── */
.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%) translateY(80px);
  background: var(--surface2);
  border: 1px solid var(--border2);
  color: var(--text1);
  font-size: 14px;
  padding: 12px 20px;
  border-radius: 24px;
  box-shadow: var(--shadow);
  z-index: 999;
  transition: transform .25s cubic-bezier(.34,1.56,.64,1), opacity .25s;
  opacity: 0;
  white-space: nowrap;
}
.toast--in { transform: translateX(-50%) translateY(0); opacity: 1; }
.toast--error { border-color: rgba(239,68,68,.3); color: var(--red); }
.toast--success { border-color: rgba(34,197,94,.2); color: var(--green); }

/* ── Responsive ──────────────────────────────────────────── */
@media (max-width: 480px) {
  .auth-card { padding: 32px 24px; }
  .stats-bar { grid-template-columns: repeat(2, 1fr); }
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .full { grid-column: 1; }
  .iata { font-size: 18px; }
}

/* ── Loading spinner ─────────────────────────────────────── */
.loading-state {
  display: flex;
  justify-content: center;
  align-items: center;
  padding: 64px 24px;
}
.loading-spinner {
  width: 28px;
  height: 28px;
  border: 2px solid var(--border);
  border-top-color: var(--blue);
  border-radius: 50%;
  animation: spin .7s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ── Trip cards ──────────────────────────────────────────── */
#trips-list { display: flex; flex-direction: column; gap: 16px; }

.trip-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius);
  transition: border-color .2s;
}
.trip-card:hover { border-color: var(--border2); }

.trip-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px 12px;
  border-bottom: 1px solid var(--border);
  border-radius: var(--radius) var(--radius) 0 0;
}
.trip-card__title-row {
  display: flex;
  align-items: center;
  gap: 10px;
}
.trip-card__name {
  display: flex; flex-direction: column; gap: 1px;
}
.trip-card__destinations {
  font-family: 'Syne', sans-serif;
  font-size: 15px; font-weight: 800; line-height: 1.1;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  max-width: 190px;
}
@media (min-width: 400px) { .trip-card__destinations { max-width: 250px; } }
.trip-card__month {
  font-size: 11px; font-weight: 500;
  color: var(--text3); letter-spacing: .02em;
}
.trip-card__actions {
  display: flex;
  gap: 4px;
}
.trip-days {
  font-size: 11px;
  color: var(--text2);
  background: var(--surface2);
  padding: 2px 8px;
  border-radius: 20px;
  border: 1px solid var(--border);
}
.trip-days.soon {
  color: var(--amber);
  border-color: rgba(245,158,11,.2);
  background: rgba(245,158,11,.06);
}

/* ── Flight rows inside trip ─────────────────────────────── */
.trip-timeline { padding: 10px 12px 12px; display: flex; flex-direction: column; gap: 8px; }
/* ── Flight card (boarding pass style) ── */
.flight-card {
  padding: 14px 16px 12px;
  border: 1px solid var(--border);
  border-left: 3px solid transparent;
  border-radius: 10px;
  background: var(--surface);
  transition: background .15s, border-color .15s;
}
.flight-card:last-of-type { border-bottom: none; }

/* Header: logo + flight num | status */
.flight-card__header {
  display: flex; align-items: center;
  justify-content: space-between;
  margin-bottom: 8px;
}
.flight-card__airline { display: flex; align-items: center; gap: 7px; }
.flight-card__logo {
  height: 16px; width: auto; max-width: 48px;
  object-fit: contain; opacity: 0.85;
}
.flight-card__flightnum {
  font-size: 11px; font-weight: 700;
  color: var(--text3); letter-spacing: .05em;
}
.flight-card__right { display: flex; align-items: center; gap: 5px; }

/* Route */
.flight-card__route {
  display: flex; align-items: center; gap: 8px;
  margin-bottom: 10px;
}
.flight-card__airport {
  display: flex; flex-direction: column;
  align-items: flex-start; gap: 0;
}
.flight-card__airport--right { align-items: flex-end; }
.flight-card__iata {
  font-family: 'Syne', sans-serif;
  font-size: 32px; font-weight: 800;
  color: var(--text1); line-height: 1; letter-spacing: -1px;
}
.flight-card__time {
  font-size: 12px; color: var(--text3); font-weight: 500; margin-top: 2px;
}
.flight-card__middle {
  flex: 1; display: flex; flex-direction: column;
  align-items: center; gap: 4px; padding: 0 6px;
}
.flight-card__plane { width: 14px; height: 14px; color: var(--cyan); flex-shrink: 0; }
.flight-card__line {
  width: 100%; height: 1px;
  background-image: repeating-linear-gradient(90deg, var(--border) 0, var(--border) 4px, transparent 4px, transparent 8px);
}
.flight-card__dur {
  font-size: 10px; color: var(--text3); font-weight: 600; letter-spacing: .05em;
  background: var(--surface2); padding: 1px 6px; border-radius: 10px;
  border: 1px solid var(--border);
}

/* Footer: date | actions on same line */
.flight-card__footer {
  display: flex; align-items: center; justify-content: space-between;
  padding-top: 8px; margin-top: 2px;
  border-top: 1px solid var(--border);
}
.flight-card__details { display: flex; align-items: center; gap: 8px; }
.flight-card__detail { font-size: 11px; color: var(--text3); white-space: nowrap; }
.flight-card__detail + .flight-card__detail {
  padding-left: 8px;
  border-left: 1px solid var(--border);
}
.flight-card__actions { display: flex; gap: 2px; flex-shrink: 0; }

/* Keep old classes working for anything that still uses them */
.return-badge {
  font-size: 10px; color: var(--blue);
  background: rgba(59,130,246,.1);
  padding: 2px 6px; border-radius: 4px; white-space: nowrap;
}
.tag {
  font-size: 11px; color: var(--text2);
  background: var(--surface2); border: 1px solid var(--border);
  padding: 2px 7px; border-radius: 4px;
}
.iata-sm {
  font-family: 'Syne', sans-serif; font-size: 15px;
  font-weight: 700; color: var(--text1);
}
.btn-icon-sm {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 6px;
  border: 1px solid transparent;
  background: none;
  color: var(--text3);
  cursor: pointer;
  transition: background .15s, color .15s, border-color .15s;
}
.btn-icon-sm:hover { background: var(--surface2); color: var(--text1); border-color: var(--border); }
.btn-icon-sm svg { width: 13px; height: 13px; }
.btn-delete-flight:hover, .btn-delete-trip:hover, .btn-delete-extra:hover {
  color: var(--red) !important;
  border-color: rgba(239,68,68,.3) !important;
}

.trip-empty-flights {
  padding: 16px 20px;
  font-size: 13px;
  color: var(--text3);
}
.btn-link {
  background: none;
  border: none;
  color: var(--blue);
  cursor: pointer;
  font-size: inherit;
  padding: 0;
  text-decoration: underline;
}

/* ── Extra rows ──────────────────────────────────────────── */
.trip-extras {
  padding: 0 12px 12px;
  display: flex; flex-direction: column; gap: 8px;
}
.extra-row {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 10px 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--surface);
}
.extra-icon { font-size: 16px; flex-shrink: 0; }
.extra-info {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px;
  flex: 1;
}
.extra-name { font-size: 13px; color: var(--text1); font-weight: 500; }
.extra-date, .extra-ref { font-size: 11px; color: var(--text2); }
.extra-price { font-size: 11px; color: var(--cyan); font-weight: 600; }

/* ── Modal overlay (shared) ──────────────────────────────── */
.modal-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.7);
  backdrop-filter: blur(4px);
  z-index: 100;
}
.modal {
  position: fixed;
  inset: 0;
  z-index: 101;
  overflow-y: auto;
  padding: 24px 16px;
  display: flex;
  align-items: flex-start;
  justify-content: center;
  pointer-events: none;
}
.modal > .modal-box { pointer-events: all; }

/* ── Weather panel ───────────────────────────────────────── */
.weather-container {
  border-top: 1px solid var(--border);
  padding: 14px 16px;
}
.weather-loading, .weather-error {
  font-size: 13px; color: var(--text3); text-align: center; padding: 6px;
}

/* ── Main panel ── */
.weather-panel { display: flex; gap: 12px; }
@media (max-width: 560px) { .weather-panel { flex-direction: column; } }

/* ── Location card ── */
.weather-loc {
  flex: 1; border-radius: 20px; overflow: hidden; min-width: 0;
  box-shadow: 0 8px 32px rgba(0,0,0,.35);
}

/* ── Gradient themes ── */
.wtheme--clear   { background: linear-gradient(160deg, #f59e0b 0%, #ef4444 60%, #c2410c 100%); }
.wtheme--partly  { background: linear-gradient(160deg, #38bdf8 0%, #3b82f6 60%, #1d4ed8 100%); }
.wtheme--cloudy  { background: linear-gradient(160deg, #64748b 0%, #334155 100%); }
.wtheme--rain    { background: linear-gradient(160deg, #1e40af 0%, #1e3a5f 60%, #0f172a 100%); }
.wtheme--snow    { background: linear-gradient(160deg, #bae6fd 0%, #7dd3fc 40%, #0ea5e9 100%); }
.wtheme--fog     { background: linear-gradient(160deg, #94a3b8 0%, #475569 100%); }
.wtheme--thunder { background: linear-gradient(160deg, #312e81 0%, #1e1b4b 60%, #0f0f1a 100%); }

/* ── Header ── */
.weather-loc__header { padding: 18px 18px 10px; }
.weather-loc__top-row { display: flex; justify-content: space-between; align-items: flex-start; }
.weather-loc__iata { font-size: 11px; font-weight: 800; letter-spacing: .15em; color: rgba(255,255,255,.7); text-transform: uppercase; }
.weather-loc__city { font-size: 17px; font-weight: 700; color: #fff; margin-top: 1px; }
.weather-loc__badge {
  font-size: 10px; font-weight: 600; letter-spacing: .05em;
  background: rgba(255,255,255,.2); color: #fff;
  padding: 3px 9px; border-radius: 20px; white-space: nowrap; margin-top: 2px;
  backdrop-filter: blur(8px);
}

/* ── Hero temperature ── */
.weather-loc__hero { display: flex; align-items: center; gap: 12px; margin: 14px 0 10px; }
.weather-loc__big-icon svg { width: 56px; height: 56px; filter: drop-shadow(0 4px 12px rgba(0,0,0,.3)); }
.weather-loc__big-temp { font-size: 56px; font-weight: 800; color: #fff; line-height: 1; letter-spacing: -2px; }
.weather-loc__temp-range { font-size: 13px; color: rgba(255,255,255,.7); margin-left: 2px; margin-top: 4px; }

/* ── Stats row ── */
.weather-loc__stats { display: flex; gap: 10px; flex-wrap: wrap; margin-bottom: 4px; }
.weather-stat {
  display: flex; align-items: center; gap: 4px;
  font-size: 12px; font-weight: 600; color: rgba(255,255,255,.85);
  background: rgba(0,0,0,.15); border-radius: 20px;
  padding: 3px 10px; backdrop-filter: blur(4px);
}
.weather-stat svg { opacity: .8; }

/* ── Hourly strip ── */
.whourly {
  display: flex; overflow-x: auto; gap: 0;
  background: rgba(0,0,0,.18); padding: 8px 6px;
  scrollbar-width: none; border-top: 1px solid rgba(255,255,255,.08);
}
.whourly::-webkit-scrollbar { display: none; }
.whour {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  padding: 6px 12px; flex-shrink: 0; min-width: 52px;
  border-right: 1px solid rgba(255,255,255,.06);
}
.whour:last-child { border-right: none; }
.whour__time { font-size: 10px; color: rgba(255,255,255,.6); font-weight: 600; }
.whour__icon { font-size: 18px; line-height: 1; }
.whour__temp { font-size: 13px; font-weight: 700; color: #fff; }
.whour__pop  { font-size: 10px; color: rgba(147,210,255,.9); }

/* ── Daily forecast strip ── */
.weather-strip {
  display: flex; gap: 0; background: rgba(0,0,0,.22);
  padding: 8px 6px; overflow-x: auto; scrollbar-width: none;
  border-top: 1px solid rgba(255,255,255,.08);
}
.weather-strip::-webkit-scrollbar { display: none; }
.wday {
  display: flex; flex-direction: column; align-items: center; gap: 4px;
  padding: 8px 10px; flex: 1; min-width: 52px; flex-shrink: 0;
  border-right: 1px solid rgba(255,255,255,.07);
}
.wday:last-child { border-right: none; }
.wday--today { background: rgba(255,255,255,.12); border-radius: 10px; }
.wday__date { font-size: 10px; color: rgba(255,255,255,.6); font-weight: 700; white-space: nowrap; }
.wday__icon { font-size: 18px; line-height: 1; }
.wday__icon svg { width: 22px; height: 22px; }
.wday__temp { display: flex; gap: 4px; align-items: baseline; }
.wday__max  { font-size: 13px; font-weight: 700; color: #fff; }
.wday__min  { font-size: 11px; color: rgba(255,255,255,.5); }
.wday__rain { font-size: 10px; color: rgba(147,210,255,.9); font-weight: 600; }

/* ── Weather animations ── */
@keyframes wx-spin       { from { transform: rotate(0deg); }   to { transform: rotate(360deg); } }
@keyframes wx-spin-slow  { from { transform: rotate(0deg); }   to { transform: rotate(360deg); } }
@keyframes wx-drift      { 0%,100% { transform: translateX(0); } 50% { transform: translateX(4px); } }
@keyframes wx-drift-slow { 0%,100% { transform: translateX(0); } 50% { transform: translateX(6px); } }
@keyframes wx-fall       { 0% { transform: translateY(-4px); opacity:0; } 40% { opacity:1; } 100% { transform: translateY(6px); opacity:0; } }
@keyframes wx-fall2      { 0% { transform: translateY(-4px); opacity:0; } 40% { opacity:1; } 100% { transform: translateY(6px); opacity:0; } }
@keyframes wx-fall3      { 0% { transform: translateY(-4px); opacity:0; } 40% { opacity:1; } 100% { transform: translateY(6px); opacity:0; } }
@keyframes wx-fog-move   { 0%,100% { transform: translateX(0); opacity:.7; } 50% { transform: translateX(5px); opacity:.4; } }
@keyframes wx-flash      { 0%,90%,100% { opacity:1; } 92%,96% { opacity:0.1; } 94%,98% { opacity:1; } }
@keyframes wx-snow-spin  { from { transform: rotate(0deg); } to { transform: rotate(360deg); } }
@keyframes wx-pulse-glow { 0%,100% { filter: drop-shadow(0 0 4px rgba(255,220,50,.6)); } 50% { filter: drop-shadow(0 0 12px rgba(255,220,50,1)); } }

.wx-sun-rays    { animation: wx-spin 8s linear infinite; }
.wx-sun-rays-sm { animation: wx-spin 10s linear infinite; }
.wx-cloud-drift { animation: wx-drift 4s ease-in-out infinite; }
.wx-rain-1      { animation: wx-fall  1.2s ease-in infinite; }
.wx-rain-2      { animation: wx-fall2 1.2s ease-in infinite 0.3s; }
.wx-rain-3      { animation: wx-fall3 1.2s ease-in infinite 0.6s; }
.wx-fog-1       { animation: wx-fog-move 3s ease-in-out infinite; }
.wx-fog-2       { animation: wx-fog-move 3s ease-in-out infinite 0.8s; }
.wx-fog-3       { animation: wx-fog-move 3s ease-in-out infinite 1.6s; }
.wx-lightning   { animation: wx-flash 3s ease-in-out infinite; }
.wx-snow-spin   { animation: wx-snow-spin 6s linear infinite; }

/* Big icon in hero gets larger animation */
.weather-loc__big-icon .wx-sun-rays    { animation: wx-spin 8s linear infinite; }
.weather-loc__big-icon .wx-cloud-drift { animation: wx-drift-slow 5s ease-in-out infinite; }
.weather-loc__big-icon .wx-lightning   { animation: wx-flash 2.5s ease-in-out infinite; animation-fill-mode: both; }


/* ── Colored extra icons ─────────────────────────────────── */
.extra-icon {
  width: 28px;
  height: 28px;
  border-radius: 7px;
  background: var(--surface2);
  border: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 13px;
  flex-shrink: 0;
}

/* ── Tag seat ────────────────────────────────────────────── */
.tag--seat {
  font-weight: 600;
}

/* ── Trip timeline wrapper ───────────────────────────────── */
.trip-timeline { }

/* ── Live status button ──────────────────────────────────── */
.btn-live-status {
  color: #10b981 !important;
  border-color: rgba(16,185,129,.3) !important;
}
.btn-live-status:hover {
  background: rgba(16,185,129,.1) !important;
  border-color: #10b981 !important;
}
.btn-live--loading {
  animation: pulse 1s ease-in-out infinite;
}
@keyframes pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .3; }
}

/* ── Countries modal ─────────────────────────────────────── */
.countries-map-container { padding: 8px 0; }
.countries-list { display: flex; flex-direction: column; gap: 6px; }

.country-row {
  display: flex;
  align-items: center;
  gap: 14px;
  padding: 12px 16px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
}
.country-flag {
  font-size: 28px;
  line-height: 1;
  flex-shrink: 0;
  width: 38px;
  text-align: center;
}
.country-info {
  display: flex;
  flex-direction: column;
  gap: 2px;
  flex: 1;
}
.country-name {
  font-size: 14px;
  font-weight: 600;
  color: var(--text1);
}
.country-airports {
  font-size: 11px;
  color: var(--text3);
  letter-spacing: .04em;
}
.country-count {
  font-family: 'Syne', sans-serif;
  font-size: 13px;
  font-weight: 700;
  flex-shrink: 0;
}



/* ── Map view ────────────────────────────────────────────── */
#leaflet-map {
  width: 100%;
  height: 420px;
  border-radius: var(--radius);
  overflow: hidden;
  border: 1px solid var(--border);
  margin-bottom: 16px;
}
.map-country-list {
  display: flex;
  flex-direction: column;
  gap: 6px;
  margin-bottom: 24px;
}

/* Active stat card */
.stat-card--active {
  background: rgba(59,130,246,.08) !important;
  border-color: rgba(59,130,246,.3) !important;
  cursor: pointer;
}
.stat-card { cursor: pointer; transition: background .15s, border-color .15s; }
.stat-card:hover { background: var(--surface2); }

/* Airport dot markers */
.airport-dot {
  position: relative;
  width: 12px;
  height: 12px;
}
.airport-dot__pulse {
  width: 12px; height: 12px;
  background: #06b6d4;
  border-radius: 50%;
  border: 2px solid #070a12;
  position: absolute;
}
.airport-dot__label {
  position: absolute;
  top: -18px;
  left: 50%;
  transform: translateX(-50%);
  font-family: 'Syne', sans-serif;
  font-size: 9px;
  font-weight: 700;
  color: #93c5fd;
  white-space: nowrap;
  pointer-events: none;
}

/* Route count badge */
.route-count-badge {
  background: rgba(6,182,212,.9);
  color: #070a12;
  font-family: 'Syne', sans-serif;
  font-size: 10px;
  font-weight: 800;
  padding: 1px 5px;
  border-radius: 4px;
}

/* Override Leaflet dark theme */
.leaflet-container { background: #070d1a !important; }
.leaflet-control-zoom a {
  background: var(--surface) !important;
  color: var(--text2) !important;
  border-color: var(--border) !important;
}
.leaflet-control-zoom a:hover { background: var(--surface2) !important; color: var(--text1) !important; }

/* ── Insights button ─────────────────────────────────────── */
.btn-insights {
  color: #8b5cf6 !important;
  border-color: rgba(139,92,246,.3) !important;
}
.btn-insights:hover, .btn-insights--active {
  background: rgba(139,92,246,.1) !important;
  border-color: #8b5cf6 !important;
}

/* ── Insights panel ──────────────────────────────────────── */
.insights-container {
  background: rgba(139,92,246,.04);
  border-top: 1px solid rgba(139,92,246,.15);
  padding: 16px 18px;
}
.insights-loading, .insights-error {
  font-size: 13px;
  color: var(--text3);
  text-align: center;
  padding: 8px 0;
}
.insights-section {
  margin-bottom: 14px;
}
.insights-section:last-child { margin-bottom: 0; }
.insights-label {
  font-size: 10px;
  font-weight: 700;
  letter-spacing: .08em;
  text-transform: uppercase;
  color: var(--text3);
  margin-bottom: 8px;
}
.insights-row {
  display: flex;
  gap: 8px;
}
.insights-stat {
  flex: 1;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 3px;
}
.insights-stat__val {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 700;
  color: var(--text1);
}
.insights-stat__key {
  font-size: 10px;
  color: var(--text3);
  text-transform: uppercase;
  letter-spacing: .06em;
}
.insights-history {
  display: flex;
  flex-direction: column;
  gap: 4px;
}
.history-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  padding: 7px 10px;
  background: var(--surface2);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
}
.history-date { color: var(--text2); }

/* ── Flight details panel ────────────────────────────────── */
.flight-details-panel {
  background: var(--surface2);
  border-bottom: 1px solid var(--border);
  padding: 16px 18px;
}
.fdet { display: flex; flex-direction: column; gap: 14px; }
.fdet-section { display: flex; flex-direction: column; gap: 8px; }
.fdet-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--text3);
}
.fdet-sub { font-weight: 400; text-transform: none; letter-spacing: 0; }
.fdet-grid { display: flex; gap: 8px; flex-wrap: wrap; }
.fdet-stat {
  display: flex; flex-direction: column; gap: 2px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: var(--radius-sm);
  padding: 10px 14px;
  min-width: 90px;
}
.fdet-val {
  font-family: 'Syne', sans-serif;
  font-size: 15px;
  font-weight: 800;
  color: var(--text1);
}
.fdet-lbl {
  font-size: 10px;
  color: var(--text3);
  letter-spacing: .06em;
  text-transform: uppercase;
}
.fdet-history { display: flex; flex-direction: column; gap: 4px; }
.fdet-hist-row {
  display: flex; align-items: center; gap: 10px;
  padding: 7px 10px;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 6px;
  font-size: 12px;
}
.fdet-hist-date { color: var(--text2); min-width: 60px; }
.fdet-hist-badge { font-size: 13px; }
.fdet-hist-delay { font-weight: 600; margin-left: auto; }
.fdet-loading {
  display: flex; align-items: center; gap: 8px;
  color: var(--text3); font-size: 13px;
}
.fdet-spin { animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }
.fdet-empty { font-size: 13px; color: var(--text3); }

/* Details button */
.btn-flight-details {
  font-size: 13px !important;
  color: var(--text2) !important;
}
.btn-flight-details:hover {
  color: var(--text1) !important;
  border-color: var(--border2) !important;
}

/* ── Insights container ──────────────────────────────────── */
.insights-container { border-bottom: 1px solid var(--border); }
.insights-panel {
  background: var(--surface2);
  padding: 14px 16px;
  display: flex; flex-direction: column; gap: 12px;
}
.insights-section { display: flex; flex-direction: column; gap: 6px; }
.insights-label {
  font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--text3);
}

/* Compact inline stat rows */
.insights-row {
  display: flex; gap: 0;
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 10px; overflow: hidden;
}
.insights-stat {
  flex: 1; display: flex; flex-direction: column;
  gap: 1px; padding: 10px 12px;
  border-right: 1px solid var(--border);
}
.insights-stat:last-child { border-right: none; }
.insights-stat__val {
  font-family: 'Syne', sans-serif;
  font-size: 14px; font-weight: 800; color: var(--text1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.insights-stat__key {
  font-size: 9px; color: var(--text3);
  letter-spacing: .06em; text-transform: uppercase;
}

.insights-loading { padding: 14px 16px; font-size: 13px; color: var(--text3); }
.insights-error   { padding: 14px 16px; font-size: 13px; color: var(--text3); }
.btn-insights--active { color: #06b6d4 !important; border-color: #06b6d4 !important; }

/* Airline header — compact */
.insights-airline {
  display: flex; align-items: center; gap: 10px;
  padding-bottom: 10px; margin-bottom: 2px;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}
.insights-airline-logo {
  width: 36px; height: 36px; object-fit: contain;
  border-radius: 8px; background: white; padding: 4px; flex-shrink: 0;
}
.insights-airline-name { font-size: 13px; font-weight: 600; color: var(--text1); }

/* Aircraft photo */
.insights-aircraft-photo { position: relative; border-radius: 10px; overflow: hidden; margin-bottom: 2px; }
.insights-aircraft-photo img { width: 100%; height: 160px; object-fit: cover; display: block; }
.insights-photo-credit {
  position: absolute; bottom: 0; right: 0;
  background: rgba(0,0,0,0.55); color: rgba(255,255,255,0.55);
  font-size: 9px; padding: 3px 7px; border-top-left-radius: 6px;
}
