/* ============================================================
   RFD Web — CSS Consolidé
   Extrait depuis les balises <style> inline de tous les fichiers HTML
   ============================================================ */


/* ============================================================
   index.html — Application principale
   ============================================================ */

/* Reserve space for Font Awesome icons before deferred load (prevents CLS) */
.fa-solid,
.fa-regular,
.fa-brands,
.fa-light {
  display: inline-block;
  min-width: 1em;
  min-height: 1em;
  font-style: normal;
}

:root {
  /* Primary background (Dark Navy) */
  --bg: #1a2d45;
  --rfd-mobile-header-offset: 4.5rem;

  /* surfaces — Spike layered navy (Darker Navy) */
  --surface: #132137;
  --surface-strong: #0f1b2d;
  --color-dark: #0f1b2d;
  --surface-soft: rgba(255, 255, 255, 0.025);

  /* borders */
  --border: rgba(121, 145, 173, 0.18);
  --border-soft: rgba(121, 145, 173, 0.1);

  /* text */
  --text: #8ea3c7;
  --text-white: #f8fbff;
  --muted: #b9c8e6;
  /* Much lighter for headers and secondary info */

  /* accents — Spike palette */
  --accent: #0e8df2;
  /* Spike Primary Blue */
  --accent-hover: #2d9df4;
  --accent-soft: rgba(14, 141, 242, 0.16);
  --accent2: #ffb35c;
  --brand: #57c3ff;

  /* status — Spike semantic colors */
  --ok: #2fdd88;
  --err: #ff9f8a;
  --danger: #ff9f8a;
  --success: #2fdd88;
  --warning: #ffbe69;
  --info: #5cc9ff;

  --dep: #0e8df2;
  --dep-soft: rgba(14, 141, 242, 0.18);

  --arr: #ff9a84;
  --arr-soft: rgba(255, 154, 132, 0.18);

  --row: rgba(255, 255, 255, 0.02);
  --row-hover: rgba(14, 141, 242, 0.10);
  --row-selected: rgba(14, 141, 242, 0.18);

  /* radii — Spike specific */
  --radius-card: 18px;
  --radius-pill: 9999px;
  --radius-xl: 16px;
}

html {
  font-family: 'Plus Jakarta Sans', Inter, ui-sans-serif, system-ui, sans-serif;
  text-rendering: optimizeLegibility;
  -webkit-text-size-adjust: 100%;
  scrollbar-gutter: stable;
  background-color: var(--bg);
}

/* Mobile browsers: avoid 100vh issues with dynamic address bars. */
.rfd-viewport {
  height: 100vh;
  min-height: 100vh;
}

@supports (height: 100svh) {
  .rfd-viewport {
    height: 100svh;
    min-height: 100svh;
  }
}

@supports (height: 100dvh) {
  .rfd-viewport {
    height: 100dvh;
    min-height: 100dvh;
  }
}

body {
  background-color: var(--bg);
  color: var(--text);
  background-image: none;
}

/* RTL: keep the app readable by stabilizing the main structural surfaces
   instead of fully mirroring every flex/table layout. */
html[dir="rtl"] #app-header,
html[dir="rtl"] #builder-view,
html[dir="rtl"] #active-filters-container,
html[dir="rtl"] #table-results-view,
html[dir="rtl"] #table-results-view .flex-1.flex,
html[dir="rtl"] #results-main-column,
html[dir="rtl"] #results-toolbar,
html[dir="rtl"] #results-toolbar-actions,
html[dir="rtl"] #results-list-scroll,
html[dir="rtl"] #results-summary-bar,
html[dir="rtl"] #results-support-wrap,
html[dir="rtl"] #flights-table {
  direction: ltr;
}

html[dir="rtl"] #builder-hero {
  text-align: right;
}

html[dir="rtl"] #builder-hero > .flex-1 > .flex {
  flex-direction: row-reverse;
}

html[dir="rtl"] #builder-primary-actions {
  justify-content: flex-start;
}

html[dir="rtl"] #builder-status-pills {
  justify-content: flex-end;
}

html[dir="rtl"] #active-filters-container > .glass,
html[dir="rtl"] #active-filters-container > #empty-state {
  text-align: right;
}

html[dir="rtl"] #active-filters-container input[type="text"],
html[dir="rtl"] #active-filters-container input[type="search"],
html[dir="rtl"] #active-filters-container input[type="number"],
html[dir="rtl"] #active-filters-container select {
  text-align: right;
}

html[dir="rtl"] #builder-sidebar {
  text-align: right;
}

html[dir="rtl"] #builder-sidebar-top {
  flex-direction: row-reverse;
}

html[dir="rtl"] #builder-sidebar-meta {
  flex-direction: row-reverse;
}

html[dir="rtl"] #sidebar-container .nav-item,
html[dir="rtl"] #sidebar-container .rfd-links-item-btn {
  text-align: right;
}

html[dir="rtl"] #table-results-view .rfd-actions-panel {
  text-align: right;
}

html[dir="rtl"] #table-results-view .rfd-actions-panel .rfd-dock-header,
html[dir="rtl"] #table-results-view .rfd-actions-panel .dock-card-title,
html[dir="rtl"] #table-results-view .rfd-actions-panel .dock-card > .space-y-2 > button[data-action],
html[dir="rtl"] #table-results-view .rfd-actions-panel .dock-card > .space-y-2 > button[data-windy-kind],
html[dir="rtl"] #table-results-view .rfd-actions-panel .dock-card > .space-y-2 > .relative > button[data-action] {
  direction: rtl;
}

html[dir="rtl"] #flights-table thead th,
html[dir="rtl"] #flights-table tbody td {
  text-align: left;
}

html[dir="rtl"] #flights-table tbody td:nth-child(2),
html[dir="rtl"] #flights-table tbody td:nth-child(5),
html[dir="rtl"] #flights-table tbody td:nth-child(9) {
  text-align: right;
}

html[dir="rtl"] #results-summary-bar #estim-time {
  text-align: left;
}

html[dir="rtl"] #results-summary-bar #total-count {
  text-align: right;
}

/* Override hardcoded Tailwind bg-slate-950 partout */
[class*="bg-slate-950"] {
  background-color: var(--bg) !important;
}

/* Global UI Overrides */
button,
input[type="text"],
input[type="number"],
input[type="search"],
select,
.nav-item,
.rfd-links-item-btn,
.rfd-links-go {
  border-radius: var(--radius-pill) !important;
}

.glass,
.card,
.dock-card,
.rfd-loader-panel,
#empty-state {
  border-radius: var(--radius-card) !important;
  background: var(--color-dark) !important;
  border: 1px solid var(--border) !important;
  box-shadow: 0px 2px 6px rgba(37, 83, 185, 0.1) !important;
}

.glass-strong {
  background: var(--color-dark);
  border-bottom: 1px solid var(--border);
}

@media (min-width: 1024px) {
  #app-header {
    position: sticky;
    top: 0.9rem;
    margin: 0.9rem 1rem 0;
    min-height: 4.5rem;
    height: auto;
    padding-top: 0.7rem;
    padding-bottom: 0.7rem;
    border: 1px solid rgba(121, 145, 173, 0.18);
    border-radius: 1.75rem;
    background: var(--color-dark);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px) saturate(135%);
    -webkit-backdrop-filter: blur(18px) saturate(135%);
    overflow: visible;
  }

  #app-header::before {
    content: "";
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
      linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.025), transparent);
    opacity: 1;
  }

  #app-workspace {
    gap: 0;
  }

  #builder-sidebar {
    margin: 1rem 0 1rem 1rem;
    border-right: 0 !important;
    border-radius: 1.9rem !important;
    background: var(--color-dark);
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
    backdrop-filter: blur(18px) saturate(130%);
    -webkit-backdrop-filter: blur(18px) saturate(130%);
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  #builder-sidebar::-webkit-scrollbar {
    width: 0;
    height: 0;
  }

  #active-filters-container {
    position: relative;
    isolation: isolate;
  }

  #active-filters-container>.glass,
  #active-filters-container>#empty-state {
    position: relative;
    z-index: 1;
    overflow: visible;
    background: var(--color-dark) !important;
    border: 1px solid rgba(121, 145, 173, 0.16) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03) !important;
    backdrop-filter: blur(16px) saturate(130%);
    -webkit-backdrop-filter: blur(16px) saturate(130%);
    transition: transform .2s ease, box-shadow .2s ease, border-color .2s ease;
  }

  #active-filters-container>.glass::before,
  #active-filters-container>#empty-state::before {
    content: "";
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    background: none;
    opacity: 0;
  }

  #active-filters-container>.glass:hover {
    transform: translateY(-3px);
    border-color: rgba(14, 141, 242, 0.26) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
  }

  #active-filters-container > .glass.filter-card-overlay-open {
    z-index: 220 !important;
  }

  #empty-state {
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0.9rem;
    text-align: center;
  }

  .empty-state-orb {
    width: 4.25rem;
    height: 4.25rem;
    display: grid;
    place-items: center;
    border-radius: 1.35rem;
    background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03));
    border: 1px solid rgba(255, 255, 255, 0.1);
    box-shadow: 0 16px 34px rgba(5, 14, 30, 0.2);
  }

  .empty-state-orb i {
    font-size: 1.9rem;
    color: color-mix(in srgb, var(--accent) 72%, #dbeafe);
  }

  .empty-state-title {
    margin: 0;
    font-size: 1.15rem;
    line-height: 1.25;
    font-weight: 800;
    color: #e5eefb;
  }

  .empty-state-copy {
    margin: 0;
    max-width: 42rem;
    font-size: 0.9rem;
    line-height: 1.6;
    color: #90a2bd;
  }

  .empty-state-actions {
    width: 100%;
    max-width: 46rem;
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    margin-top: 0.35rem;
  }

  .empty-state-actions-label {
    font-size: 0.72rem;
    font-weight: 800;
    letter-spacing: 0.16em;
    text-transform: uppercase;
    color: #7f94b3;
  }

  .empty-state-chip-grid {
    display: flex;
    flex-wrap: wrap;
    justify-content: center;
    gap: 0.7rem;
  }

  .empty-state-chip {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.6rem;
    min-width: 9.75rem;
    padding: 0.82rem 1.05rem;
    border-radius: 999px;
    border: 1px solid rgba(255, 255, 255, 0.1);
    background: rgba(255, 255, 255, 0.04);
    color: #d8e4f6;
    font-size: 0.84rem;
    font-weight: 800;
    transition: transform .18s ease, border-color .18s ease, background-color .18s ease, color .18s ease, box-shadow .18s ease;
  }

  .empty-state-chip i {
    color: color-mix(in srgb, var(--accent) 74%, #dbeafe);
  }

  .empty-state-chip:hover {
    transform: translateY(-1px);
    background: color-mix(in srgb, var(--accent) 12%, rgba(255, 255, 255, 0.04));
    border-color: color-mix(in srgb, var(--accent) 32%, rgba(255, 255, 255, 0.1));
    color: #ffffff;
    box-shadow: 0 12px 24px rgba(5, 14, 30, 0.16);
  }
}

:where(a, button, input, select, textarea, [role="button"], [tabindex]:not([tabindex="-1"])):focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px var(--bg), 0 0 0 4px var(--accent-soft);
}

:where(a, button) {
  -webkit-tap-highlight-color: transparent;
}

#app-header h1,
#main-title {
  font-family: 'Plus Jakarta Sans', Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.01em;
}

#builder-hero {
  position: relative;
  padding: 1rem 1.15rem;
  border-radius: 1.75rem;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.03), rgba(255, 255, 255, 0.015)),
    rgba(15, 27, 45, 0.18);
  border: 1px solid rgba(121, 145, 173, 0.14);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#builder-hero::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  background:
    radial-gradient(340px 140px at 0% 0%, color-mix(in srgb, var(--accent) 14%, transparent), transparent 70%),
    radial-gradient(280px 120px at 100% 0%, color-mix(in srgb, var(--brand) 12%, transparent), transparent 72%);
  pointer-events: none;
}

#builder-hero > * {
  position: relative;
  z-index: 1;
}

#main-icon-container {
  width: 3.15rem !important;
  height: 3.15rem !important;
  border-radius: 1rem !important;
  background: linear-gradient(180deg, rgba(255, 255, 255, 0.08), rgba(255, 255, 255, 0.03)) !important;
  border: 1px solid rgba(121, 145, 173, 0.16) !important;
  box-shadow: 0 14px 30px rgba(5, 14, 30, 0.18);
}

#main-title {
  font-size: clamp(1.6rem, 2.15vw, 2.15rem);
  line-height: 1.04;
  margin-bottom: 0.25rem;
}

#main-subtitle {
  font-size: 0.9rem;
  line-height: 1.45;
  max-width: 38rem;
}

#db-msg {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.7rem !important;
  font-size: 0.78rem !important;
  font-weight: 700;
  color: #78dca0 !important;
}

#db-msg::before {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: currentColor;
  box-shadow: 0 0 0 6px color-mix(in srgb, currentColor 18%, transparent);
}

#builder-primary-actions {
  align-items: center;
  gap: 0.55rem !important;
}

#builder-primary-actions > button[data-action="reset-all"],
#builder-primary-actions > button[data-action="save-preset"] {
  min-height: 2.35rem;
  padding-inline: 1rem !important;
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(121, 145, 173, 0.16) !important;
  color: #e5eefb !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
}

#builder-primary-actions > button[data-action="reset-all"]:hover,
#builder-primary-actions > button[data-action="save-preset"]:hover {
  background: rgba(255, 255, 255, 0.08) !important;
  border-color: color-mix(in srgb, var(--accent) 26%, rgba(121, 145, 173, 0.16)) !important;
  transform: translateY(-1px);
}

#btn-search {
  min-height: 2.45rem;
  padding-inline: 1.2rem !important;
  box-shadow: 0 16px 30px color-mix(in srgb, var(--accent) 24%, rgba(5, 14, 30, 0.18));
}

#builder-status-pills {
  gap: 0.5rem !important;
  margin-top: 0.75rem !important;
}

#pill-db,
#pill-airports {
  min-height: 1.8rem;
  display: inline-flex;
  align-items: center;
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(121, 145, 173, 0.14) !important;
  color: #b0c0d7 !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

#pill-db-val,
#pill-airports-val,
#pill-rows-val {
  font-weight: 800;
}

#table-results-view {
  padding: 0 !important;
  background-color: var(--bg);
}

#results-toolbar {
  position: relative;
  min-height: 3.2rem;
  height: auto !important;
  margin: 0.9rem 1rem 0;
  padding-top: 0.55rem;
  padding-bottom: 0.55rem;
  border: 1px solid rgba(121, 145, 173, 0.18) !important;
  border-radius: 1.35rem !important;
  background: var(--color-dark) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow: visible;
}

#results-toolbar::before {
  content: "";
  position: absolute;
  inset: 0;
  border-radius: inherit;
  pointer-events: none;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.02), transparent);
}

#table-results-view>.flex-1.flex.overflow-hidden {
  min-height: 0;
  align-items: stretch;
  padding-top: 0.85rem;
  gap: 1rem;
  padding-left: 1rem;
  padding-right: 1rem;
  padding-bottom: 0.75rem;
}

body.pref-container-boxed #results-toolbar,
body.pref-container-boxed #table-results-view>.flex-1.flex.overflow-hidden {
  max-width: min(1700px, calc(100vw - 2rem));
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

#builder-view,
#results-list-scroll {
  scrollbar-gutter: stable;
}

#results-list-scroll {
  flex: 1 1 auto;
  min-height: 0;
  padding: 0.9rem;
  background-color: var(--color-dark);
  border: 1px solid rgba(121, 145, 173, 0.16);
  border-radius: 1.6rem;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

@media (prefers-reduced-motion: reduce) {

  *,
  *::before,
  *::after {
    animation-duration: 0.001ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.001ms !important;
    scroll-behavior: auto !important;
  }
}

/* ===== Actions Dock (results right panel) ===== */
.rfd-actions-panel {
  margin-right: 0.1rem;
  border: 1px solid rgba(121, 145, 173, 0.16);
  border-radius: 1.6rem;
  overflow: hidden;
  background: var(--color-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.rfd-actions-panel .rfd-dock-header {
  position: sticky;
  top: 0;
  z-index: 5;
  background: var(--surface-strong);
  border-bottom: 1px solid var(--border);
}

.rfd-actions-panel button {
  transition: transform .16s ease, filter .16s ease, background-color .16s ease, border-color .16s ease;
}

.rfd-actions-panel button:hover {
  transform: translateY(-1px);
}

.rfd-actions-panel button:active {
  transform: translateY(0);
}

.rfd-actions-panel button:focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(13, 22, 38, 0.75), 0 0 0 4px rgba(93, 135, 255, 0.55);
}

.rfd-actions-panel [data-menu-open="1"] [data-dock-chevron] {
  transform: rotate(180deg);
}

.rfd-actions-panel [data-dock-chevron] {
  transition: transform .18s ease;
}

/* Cards + uniform buttons in the right actions panel */
.rfd-actions-panel .dock-card {
  background: rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.5rem;
  padding: 0.85rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

/* ===== Support / Donations Strip (results footer) ===== */
.rfd-support-strip {
  border-radius: 1.6rem !important;
  background:
    radial-gradient(900px 180px at 12% 50%, rgba(93, 135, 255, 0.10), transparent 55%),
    radial-gradient(700px 180px at 88% 50%, rgba(239, 68, 68, 0.06), transparent 60%),
    linear-gradient(180deg, rgba(17, 28, 45, 0.62), rgba(13, 22, 38, 0.70));
  border: 1px solid rgba(121, 145, 173, 0.16);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.rfd-support-strip .support-icon-btn {
  transition: transform .15s ease, filter .15s ease, background-color .15s ease, border-color .15s ease;
}

.rfd-support-strip .support-icon-btn:hover {
  transform: translateY(-1px);
}

.rfd-support-strip .support-icon-btn:active {
  transform: translateY(0);
}

.rfd-support-strip .support-panes {
  position: relative;
  min-height: 104px;
}

@media (min-width: 768px) {
  .rfd-support-strip .support-panes {
    min-height: 92px;
  }
}

.rfd-support-strip .support-pane {
  position: absolute;
  inset: 0;
  opacity: 0;
  transform: translateY(6px);
  pointer-events: none;
  transition: opacity .22s ease, transform .22s ease;
}

.rfd-support-strip[data-support-pane="progress"] .support-pane[data-pane="progress"],
.rfd-support-strip[data-support-pane="countdown"] .support-pane[data-pane="countdown"] {
  opacity: 1;
  transform: translateY(0);
  pointer-events: auto;
}

.rfd-support-strip .support-progress-track {
  height: 8px;
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.10);
  overflow: hidden;
}

.rfd-support-strip .support-progress-bar {
  height: 100%;
  width: 0%;
  border-radius: 999px;
  background: linear-gradient(90deg, rgba(239, 68, 68, 0.95), rgba(34, 197, 94, 0.95));
  box-shadow: 0 0 24px rgba(34, 197, 94, 0.15);
  transition: width .35s ease;
}

.rfd-support-strip .support-tick {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 5px;
  min-width: 34px;
  padding: 6px 8px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

/* Donors credits (Support strip) */
.support-right-grid {
  display: grid;
  grid-template-columns: 1fr minmax(240px, 320px);
  gap: 0.75rem;
  align-items: stretch;
}

@media (max-width: 900px) {
  .support-right-grid {
    grid-template-columns: 1fr;
  }
}

.support-donors-col {
  border-radius: 14px;
  background:
    radial-gradient(400px 140px at 50% 0%, rgba(244, 63, 94, 0.14), transparent 70%),
    radial-gradient(520px 160px at 50% 100%, rgba(93, 135, 255, 0.10), transparent 70%),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.08);
  padding: 0.65rem 0.75rem;
  overflow: hidden;
}

.support-donors-col:hover .support-donors-track {
  animation-play-state: paused;
}

.support-donors-viewport {
  position: relative;
  height: 92px;
  overflow: hidden;
  margin-top: 0.4rem;
  mask-image: linear-gradient(to bottom, transparent, black 14%, black 86%, transparent);
}

.support-donors-track {
  --credits-duration: 22s;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  will-change: transform;
  animation: rfdCreditsScroll var(--credits-duration) linear infinite;
}

@keyframes rfdCreditsScroll {
  from {
    transform: translateY(0);
  }

  to {
    transform: translateY(-50%);
  }
}

.support-donor-year {
  text-align: center;
  font-weight: 950;
  font-size: 13px;
  letter-spacing: .18em;
  text-transform: uppercase;
  color: rgba(226, 232, 240, 0.92);
  margin: 0.25rem 0 0.1rem;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
  position: relative;
}

.support-donor-year:after {
  content: '';
  display: block;
  height: 1px;
  margin: 0.35rem auto 0;
  width: 72%;
  background: linear-gradient(90deg, transparent, rgba(255, 255, 255, 0.18), transparent);
}

.support-donor-row {
  padding: 0.05rem 0;
}

.support-donor-item {
  text-align: center;
  font-weight: 900;
  color: rgba(226, 232, 240, 0.95);
  font-size: 12px;
  letter-spacing: .02em;
  text-shadow: 0 10px 24px rgba(0, 0, 0, 0.35);
}

.support-donor-sub {
  text-align: center;
  font-weight: 700;
  color: rgba(124, 143, 172, 0.9);
  font-size: 10px;
}

.support-donor-star {
  color: rgba(253, 230, 138, 0.95);
  margin-left: 0.35rem;
  font-size: 10px;
  vertical-align: baseline;
  filter: drop-shadow(0 6px 10px rgba(253, 230, 138, 0.15));
}

@media (prefers-reduced-motion: reduce) {
  .support-donors-track {
    animation: none;
    transform: none;
  }
}

.rfd-actions-panel .dock-card-title {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem;
  margin-bottom: 0.65rem;
  color: rgba(124, 143, 172, 0.95);
  font-size: 10px;
  letter-spacing: .14em;
  text-transform: uppercase;
  font-weight: 900;
}

.rfd-actions-panel .dock-card-title .left {
  display: flex;
  align-items: center;
  gap: 0.6rem;
}

.rfd-actions-panel .dock-card-title .icon {
  width: 1.85rem;
  height: 1.85rem;
  display: grid;
  place-items: center;
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.08);
}

.rfd-actions-panel .dock-card>.space-y-2>button[data-action],
.rfd-actions-panel .dock-card>.space-y-2>button[data-windy-kind],
.rfd-actions-panel .dock-card>.space-y-2>.relative>button[data-action] {
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 1.2rem;
  padding: 0.75rem;
  box-shadow: none;
}

.rfd-actions-panel .dock-card>.space-y-2>button[data-action]:hover,
.rfd-actions-panel .dock-card>.space-y-2>button[data-windy-kind]:hover,
.rfd-actions-panel .dock-card>.space-y-2>.relative>button[data-action]:hover {
  background: color-mix(in srgb, var(--accent) 12%, rgba(255, 255, 255, 0.03));
  border-color: color-mix(in srgb, var(--accent) 32%, rgba(255, 255, 255, 0.12));
  color: color-mix(in srgb, var(--accent) 82%, #ffffff);
}

.rfd-actions-panel .dock-card>.space-y-2>button[data-action] i,
.rfd-actions-panel .dock-card>.space-y-2>button[data-windy-kind] i,
.rfd-actions-panel .dock-card>.space-y-2>.relative>button[data-action] i {
  opacity: 0.95;
}

.rfd-actions-panel .dock-card>.space-y-2>button[data-action="open-map"] {
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 88%, #ffffff),
      color-mix(in srgb, var(--brand) 70%, var(--accent)));
  border-color: color-mix(in srgb, var(--accent) 40%, rgba(255, 255, 255, 0.18));
}

.rfd-actions-panel .dock-card>.space-y-2>button[data-action="open-map"]:hover {
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 94%, #ffffff),
      color-mix(in srgb, var(--brand) 78%, var(--accent)));
  border-color: color-mix(in srgb, var(--accent) 56%, rgba(255, 255, 255, 0.18));
}

.rfd-actions-panel .dock-card>.space-y-2>button[data-action="open-map"]:hover .text-xs,
.rfd-actions-panel .dock-card>.space-y-2>button[data-action="open-map"]:hover .text-\[10px\],
.rfd-actions-panel .dock-card>.space-y-2>button[data-action="open-map"]:hover i {
  color: #ffffff !important;
}

.rfd-actions-panel .dock-card>.space-y-2>button[data-action="open-map"]:hover>div:first-child {
  background: rgba(255, 255, 255, 0.18) !important;
}

.rfd-actions-panel .dock-card [data-briefing-menu],
.rfd-actions-panel .dock-card [data-announcement-menu],
.rfd-actions-panel .dock-card [data-flight-info-menu],
.rfd-actions-panel .dock-card [data-registration-info-menu],
.rfd-actions-panel .dock-card [data-airport-info-menu],
.rfd-actions-panel .dock-card [data-ai-diff-menu],
.rfd-actions-panel .dock-card [data-charts-info-menu],
.rfd-actions-panel .dock-card [data-weather-info-menu],
.rfd-actions-panel .dock-card [data-simbrief-menu],
.rfd-actions-panel .dock-card [data-pfpx-menu] {
  border-radius: 1.25rem;
}

.rfd-actions-panel .dock-card [data-briefing-menu],
.rfd-actions-panel .dock-card [data-announcement-menu],
.rfd-actions-panel .dock-card [data-flight-info-menu],
.rfd-actions-panel .dock-card [data-registration-info-menu],
.rfd-actions-panel .dock-card [data-airport-info-menu],
.rfd-actions-panel .dock-card [data-ai-diff-menu],
.rfd-actions-panel .dock-card [data-charts-info-menu],
.rfd-actions-panel .dock-card [data-weather-info-menu],
.rfd-actions-panel .dock-card [data-simbrief-menu],
.rfd-actions-panel .dock-card [data-pfpx-menu] {
  background: var(--color-dark) !important;
  border: 1px solid color-mix(in srgb, var(--accent) 18%, rgba(255, 255, 255, 0.08)) !important;
  box-shadow: 0 16px 34px rgba(6, 18, 35, 0.26) !important;
  overflow: hidden;
}

.rfd-actions-panel .dock-card [data-briefing-menu] > div:first-child,
.rfd-actions-panel .dock-card [data-announcement-menu] > div:first-child,
.rfd-actions-panel .dock-card [data-ai-diff-menu] > div.text-\[10px\],
.rfd-actions-panel .dock-card [data-flight-info-menu] > div:first-child,
.rfd-actions-panel .dock-card [data-registration-info-menu] > div:first-child,
.rfd-actions-panel .dock-card [data-airport-info-menu] > div:first-child,
.rfd-actions-panel .dock-card [data-charts-info-menu] > div:first-child,
.rfd-actions-panel .dock-card [data-weather-info-menu] > div:first-child,
.rfd-actions-panel .dock-card [data-simbrief-menu] > div:first-child,
.rfd-actions-panel .dock-card [data-pfpx-menu] > div:first-child {
  color: color-mix(in srgb, var(--accent) 48%, #c7d5ea) !important;
}

.rfd-actions-panel .dock-card [data-briefing-menu] > button,
.rfd-actions-panel .dock-card [data-announcement-menu] > button,
.rfd-actions-panel .dock-card [data-flight-info-menu] > button,
.rfd-actions-panel .dock-card [data-registration-info-menu] > button,
.rfd-actions-panel .dock-card [data-airport-info-menu] > button,
.rfd-actions-panel .dock-card [data-ai-diff-menu] > button,
.rfd-actions-panel .dock-card [data-charts-info-menu] > button,
.rfd-actions-panel .dock-card [data-weather-info-menu] > button,
.rfd-actions-panel .dock-card [data-simbrief-menu] > button,
.rfd-actions-panel .dock-card [data-pfpx-menu] > button {
  color: #f4f8ff !important;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease;
}

.rfd-actions-panel .dock-card [data-briefing-menu] > button:hover,
.rfd-actions-panel .dock-card [data-announcement-menu] > button:hover,
.rfd-actions-panel .dock-card [data-flight-info-menu] > button:hover,
.rfd-actions-panel .dock-card [data-registration-info-menu] > button:hover,
.rfd-actions-panel .dock-card [data-airport-info-menu] > button:hover,
.rfd-actions-panel .dock-card [data-ai-diff-menu] > button:hover,
.rfd-actions-panel .dock-card [data-charts-info-menu] > button:hover,
.rfd-actions-panel .dock-card [data-weather-info-menu] > button:hover,
.rfd-actions-panel .dock-card [data-simbrief-menu] > button:hover,
.rfd-actions-panel .dock-card [data-pfpx-menu] > button:hover {
  background: color-mix(in srgb, var(--accent) 14%, rgba(255, 255, 255, 0.03)) !important;
  color: #ffffff !important;
}

.rfd-actions-panel .dock-card [data-briefing-menu] > button i,
.rfd-actions-panel .dock-card [data-announcement-menu] > button i,
.rfd-actions-panel .dock-card [data-flight-info-menu] > button i,
.rfd-actions-panel .dock-card [data-registration-info-menu] > button i,
.rfd-actions-panel .dock-card [data-airport-info-menu] > button i,
.rfd-actions-panel .dock-card [data-ai-diff-menu] > button i,
.rfd-actions-panel .dock-card [data-charts-info-menu] > button i,
.rfd-actions-panel .dock-card [data-weather-info-menu] > button i,
.rfd-actions-panel .dock-card [data-simbrief-menu] > button i,
.rfd-actions-panel .dock-card [data-pfpx-menu] > button i {
  color: color-mix(in srgb, var(--accent) 62%, #f3d4ff) !important;
}

.rfd-actions-panel .dock-card [data-briefing-menu] > button:hover i,
.rfd-actions-panel .dock-card [data-announcement-menu] > button:hover i,
.rfd-actions-panel .dock-card [data-flight-info-menu] > button:hover i,
.rfd-actions-panel .dock-card [data-registration-info-menu] > button:hover i,
.rfd-actions-panel .dock-card [data-airport-info-menu] > button:hover i,
.rfd-actions-panel .dock-card [data-ai-diff-menu] > button:hover i,
.rfd-actions-panel .dock-card [data-charts-info-menu] > button:hover i,
.rfd-actions-panel .dock-card [data-weather-info-menu] > button:hover i,
.rfd-actions-panel .dock-card [data-simbrief-menu] > button:hover i,
.rfd-actions-panel .dock-card [data-pfpx-menu] > button:hover i {
  color: #ffffff !important;
}

.rfd-actions-panel .dock-card [data-action="generate-briefing"],
.rfd-actions-panel .dock-card [data-action="generate-announcements"] {
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 88%, #ffffff),
      color-mix(in srgb, var(--brand) 70%, var(--accent))) !important;
  border: 1px solid color-mix(in srgb, var(--accent) 38%, rgba(255, 255, 255, 0.16)) !important;
  color: #ffffff !important;
}

.rfd-actions-panel .dock-card [data-action="generate-briefing"]:hover,
.rfd-actions-panel .dock-card [data-action="generate-announcements"]:hover {
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 94%, #ffffff),
      color-mix(in srgb, var(--brand) 78%, var(--accent))) !important;
  border-color: color-mix(in srgb, var(--accent) 54%, rgba(255, 255, 255, 0.18)) !important;
}

.rfd-actions-panel .dock-card [data-action="generate-briefing"] i,
.rfd-actions-panel .dock-card [data-action="generate-announcements"] i,
.rfd-actions-panel .dock-card [data-action="generate-briefing"] span,
.rfd-actions-panel .dock-card [data-action="generate-announcements"] span {
  color: #ffffff !important;
}

.rfd-actions-panel .dock-card .ring-violet-300 {
  --tw-ring-color: color-mix(in srgb, var(--accent) 46%, rgba(255, 255, 255, 0.18)) !important;
  border-color: color-mix(in srgb, var(--accent) 36%, rgba(255, 255, 255, 0.16)) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 28%, transparent) !important;
}

[data-briefing-root][data-menu-open="1"] > button,
[data-announcement-root][data-menu-open="1"] > button,
[data-ai-diff-root][data-menu-open="1"] > button,
[data-flight-info-root][data-menu-open="1"] > button,
[data-registration-info-root][data-menu-open="1"] > button,
[data-airport-info-root][data-menu-open="1"] > button {
  background: color-mix(in srgb, var(--accent) 14%, rgba(255, 255, 255, 0.04)) !important;
  border-color: color-mix(in srgb, var(--accent) 34%, rgba(255, 255, 255, 0.14)) !important;
  color: #ffffff !important;
}

::-webkit-scrollbar {
  width: 8px;
  height: 8px;
}

::-webkit-scrollbar-track {
  background: transparent;
}

::-webkit-scrollbar-thumb {
  background: linear-gradient(180deg, rgba(36, 51, 80, 0.95), rgba(26, 39, 68, 0.95));
  border-radius: 999px;
  border: 2px solid rgba(13, 22, 38, 0.55);
}

::-webkit-scrollbar-thumb:hover {
  background: linear-gradient(180deg, rgba(50, 65, 100, 0.98), rgba(26, 39, 68, 0.98));
}

/* Hide native number spinners */
input[type="number"].no-spinner::-webkit-inner-spin-button,
input[type="number"].no-spinner::-webkit-outer-spin-button {
  -webkit-appearance: none;
  margin: 0;
}

input[type="number"].no-spinner {
  -moz-appearance: textfield;
  appearance: textfield;
}

.sidebar-item.active {
  background: rgba(255, 255, 255, 0.04);
  position: relative;
  color: var(--accent);
  font-weight: 700;
  border: 1px solid rgba(255, 255, 255, 0.08);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.sidebar-item {
  background: rgba(255, 255, 255, 0.01);
  border: 1px solid transparent;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.02);
  transition: transform .18s ease, background-color .18s ease, border-color .18s ease, box-shadow .18s ease, color .18s ease;
}

.sidebar-item:hover {
  transform: translateX(4px) translateY(-1px);
  background: color-mix(in srgb, var(--accent) 12%, rgba(255, 255, 255, 0.02));
  border-color: color-mix(in srgb, var(--accent) 32%, rgba(121, 145, 173, 0.14));
  box-shadow: 0 12px 24px rgba(5, 14, 30, 0.16);
  color: color-mix(in srgb, var(--accent) 82%, #ffffff);
}

.sidebar-item.active::before {
  content: '';
  position: absolute;
  left: 0;
  top: 20%;
  height: 60%;
  width: 3px;
  background-color: var(--accent);
  border-radius: 0 4px 4px 0;
}

.sidebar-item.active {
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 18%, rgba(255, 255, 255, 0.02)),
      color-mix(in srgb, var(--accent) 8%, rgba(255, 255, 255, 0.01)));
  border-color: color-mix(in srgb, var(--accent) 34%, rgba(121, 145, 173, 0.14));
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.sidebar-item-disabled {
  opacity: 0.35;
  pointer-events: none;
  cursor: not-allowed;
  filter: grayscale(100%);
}

#sidebar-toggle-tab {
  position: relative !important;
  left: auto;
  top: auto;
  transform: none;
  align-self: center;
  flex: 0 0 0.75rem;
  width: 0.75rem !important;
  height: 3.5rem;
  background: transparent !important;
  border-color: transparent !important;
  color: rgba(148, 163, 184, 0.92) !important;
  box-shadow: none !important;
  overflow: visible !important;
  margin-left: 0 !important;
  margin-right: 0 !important;
  padding: 0 !important;
  z-index: 35;
}

#sidebar-toggle-tab:hover {
  background: transparent !important;
  color: #fff !important;
  border-color: transparent !important;
}

#sidebar-toggle-tab #sidebar-chevron {
  width: 1.2rem;
  height: 3.25rem;
  display: grid;
  place-items: center;
  border-radius: 999px;
  background: var(--surface);
  border: 1px solid var(--border);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
  transform: translateX(0.1rem);
}

#sidebar-toggle-tab:hover #sidebar-chevron {
  background: var(--surface-strong);
  border-color: rgba(147, 197, 253, 0.22);
}

#builder-sidebar.builder-sidebar-collapsed {
  width: 5.5rem !important;
  min-width: 5.5rem !important;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
  overflow: hidden !important;
}

body.pref-sidebar-collapse #builder-sidebar {
  width: 5.5rem !important;
  min-width: 5.5rem !important;
  padding-left: 0.65rem;
  padding-right: 0.65rem;
  overflow: hidden !important;
}

#builder-sidebar.builder-sidebar-collapsed #builder-sidebar-top {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

body.pref-sidebar-collapse #builder-sidebar #builder-sidebar-top {
  justify-content: center;
  padding-left: 0;
  padding-right: 0;
}

#builder-sidebar.builder-sidebar-collapsed #builder-sidebar-title,
#builder-sidebar.builder-sidebar-collapsed #builder-sidebar-meta,
#builder-sidebar.builder-sidebar-collapsed .sidebar-item-label {
  display: none !important;
}

body.pref-sidebar-collapse #builder-sidebar #builder-sidebar-title,
body.pref-sidebar-collapse #builder-sidebar #builder-sidebar-meta,
body.pref-sidebar-collapse #builder-sidebar .sidebar-item-label {
  display: none !important;
}

#builder-sidebar.builder-sidebar-collapsed #sidebar-container {
  flex: 1 1 auto;
  padding-left: 0;
  padding-right: 0.18rem;
  align-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

body.pref-sidebar-collapse #builder-sidebar #sidebar-container {
  flex: 1 1 auto;
  padding-left: 0;
  padding-right: 0.18rem;
  align-items: center;
  overflow-y: auto;
  overflow-x: hidden;
  scrollbar-width: thin;
  scrollbar-color: transparent transparent;
}

#builder-sidebar.builder-sidebar-collapsed:hover #sidebar-container,
#builder-sidebar.builder-sidebar-collapsed #sidebar-container:hover {
  scrollbar-color: rgba(129, 150, 178, 0.78) rgba(255, 255, 255, 0.06);
}

body.pref-sidebar-collapse #builder-sidebar:hover #sidebar-container,
body.pref-sidebar-collapse #builder-sidebar #sidebar-container:hover {
  scrollbar-color: rgba(129, 150, 178, 0.78) rgba(255, 255, 255, 0.06);
}

#builder-sidebar.builder-sidebar-collapsed .sidebar-item {
  width: 3.4rem;
  height: 3.4rem;
  min-height: 3.4rem;
  display: grid;
  place-items: center;
  padding: 0;
  gap: 0;
  text-align: center;
}

body.pref-sidebar-collapse #builder-sidebar .sidebar-item {
  width: 3.4rem;
  height: 3.4rem;
  min-height: 3.4rem;
  display: grid;
  place-items: center;
  padding: 0;
  gap: 0;
  text-align: center;
}

#builder-sidebar.builder-sidebar-collapsed .sidebar-item .sidebar-item-icon {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

body.pref-sidebar-collapse #builder-sidebar .sidebar-item .sidebar-item-icon {
  width: 100%;
  margin: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 1.05rem;
}

#builder-sidebar.builder-sidebar-collapsed .sidebar-item::before {
  display: none;
}

body.pref-sidebar-collapse #builder-sidebar .sidebar-item::before {
  display: none;
}

#builder-sidebar.builder-sidebar-collapsed #sidebar-container::-webkit-scrollbar {
  width: 4px;
}

body.pref-sidebar-collapse #builder-sidebar #sidebar-container::-webkit-scrollbar {
  width: 4px;
}

#builder-sidebar.builder-sidebar-collapsed #sidebar-container::-webkit-scrollbar-track {
  background: transparent;
  margin-block: 0.95rem;
  border-radius: 999px;
}

body.pref-sidebar-collapse #builder-sidebar #sidebar-container::-webkit-scrollbar-track {
  background: transparent;
  margin-block: 0.95rem;
  border-radius: 999px;
}

#builder-sidebar.builder-sidebar-collapsed #sidebar-container::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

body.pref-sidebar-collapse #builder-sidebar #sidebar-container::-webkit-scrollbar-button {
  display: none;
  width: 0;
  height: 0;
}

#builder-sidebar.builder-sidebar-collapsed #sidebar-container::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
  border: none;
  min-height: 2.8rem;
}

body.pref-sidebar-collapse #builder-sidebar #sidebar-container::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
  border: none;
  min-height: 2.8rem;
}

#builder-sidebar.builder-sidebar-collapsed:hover #sidebar-container::-webkit-scrollbar-thumb,
#builder-sidebar.builder-sidebar-collapsed #sidebar-container:hover::-webkit-scrollbar-thumb {
  background: rgba(129, 150, 178, 0.72);
}

#builder-sidebar.builder-sidebar-collapsed:hover #sidebar-container::-webkit-scrollbar-track,
#builder-sidebar.builder-sidebar-collapsed #sidebar-container:hover::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

body.pref-sidebar-collapse #builder-sidebar:hover #sidebar-container::-webkit-scrollbar-thumb,
body.pref-sidebar-collapse #builder-sidebar #sidebar-container:hover::-webkit-scrollbar-thumb {
  background: rgba(129, 150, 178, 0.72);
}

body.pref-sidebar-collapse #builder-sidebar:hover #sidebar-container::-webkit-scrollbar-track,
body.pref-sidebar-collapse #builder-sidebar #sidebar-container:hover::-webkit-scrollbar-track {
  background: rgba(255, 255, 255, 0.05);
}

#builder-sidebar.builder-sidebar-collapsed #sidebar-container::-webkit-scrollbar-thumb:hover {
  background: rgba(144, 165, 194, 0.88);
}

body.pref-sidebar-collapse #builder-sidebar #sidebar-container::-webkit-scrollbar-thumb:hover {
  background: rgba(144, 165, 194, 0.88);
}

/* ===== Builder settings panel (main page only) ===== */
#builder-settings-fab {
  position: absolute;
  right: 1.25rem;
  bottom: 1.25rem;
  z-index: 34;
  width: 4rem;
  height: 4rem;
  place-items: center;
  border-radius: 999px !important;
  border: 1px solid rgba(73, 190, 255, 0.2);
  background: linear-gradient(135deg, var(--accent), var(--brand)) !important;
  color: #fff;
  box-shadow: 0 22px 48px rgba(8, 25, 53, 0.36);
  transition: transform .2s ease, box-shadow .2s ease, opacity .2s ease;
}

#builder-settings-fab:hover {
  transform: translateY(-2px);
  box-shadow: 0 26px 58px rgba(8, 25, 53, 0.42);
}

#builder-settings-fab i {
  font-size: 1.2rem;
}

#builder-settings-panel {
  position: absolute;
  top: 0.9rem;
  right: 0.9rem;
  bottom: 0.9rem;
  z-index: 33;
  width: min(22rem, calc(100% - 1.8rem));
  pointer-events: none;
  visibility: hidden;
  transform: translateX(100%);
  transition: transform .28s ease;
  overflow: hidden;
}

.builder-settings-open #builder-settings-panel {
  transform: translateX(0);
  pointer-events: auto;
  visibility: visible;
}

.builder-settings-open #builder-settings-fab {
  opacity: 0;
  transform: translateY(10px) scale(0.94);
  pointer-events: none;
}

.builder-settings-panel-shell {
  height: 100%;
  display: flex;
  flex-direction: column;
  background: rgba(17, 28, 45, 0.98);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.75rem;
  box-shadow: 0 28px 60px rgba(4, 12, 24, 0.32);
  backdrop-filter: blur(22px);
  -webkit-backdrop-filter: blur(22px);
  overflow: hidden;
}

.builder-settings-panel-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 1.05rem 1.3rem;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
}

.builder-settings-panel-header h3 {
  margin: 0;
  font-size: 1.7rem;
  line-height: 1;
  font-weight: 800;
  color: #f8fafc;
}

.builder-settings-close {
  width: 2.5rem;
  height: 2.5rem;
  display: grid;
  place-items: center;
  border-radius: 999px !important;
  background: transparent !important;
  color: rgba(226, 232, 240, 0.92);
}

.builder-settings-panel-body {
  padding: 1.2rem 1.3rem 1.5rem;
  display: flex;
  flex-direction: column;
  gap: 1.45rem;
  overflow: auto;
}

.builder-settings-group {
  display: flex;
  flex-direction: column;
  gap: 0.8rem;
}

.builder-settings-group h4 {
  margin: 0;
  font-size: 1rem;
  font-weight: 800;
  color: #f8fafc;
}

.builder-settings-grid {
  display: grid;
  gap: 0.8rem;
}

.builder-settings-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.builder-settings-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.builder-settings-choice {
  min-height: 3.9rem;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.7rem;
  padding: 0.9rem 0.95rem;
  border-radius: 1.1rem !important;
  border: 1px solid rgba(255, 255, 255, 0.1);
  background: rgba(255, 255, 255, 0.03) !important;
  color: rgba(226, 232, 240, 0.92);
  font-size: 0.98rem;
  font-weight: 700;
  transition: border-color .18s ease, background-color .18s ease, color .18s ease, transform .18s ease, box-shadow .18s ease;
}

.builder-settings-choice:hover {
  transform: translateY(-1px);
  background: color-mix(in srgb, var(--accent) 9%, rgba(255, 255, 255, 0.02)) !important;
  border-color: color-mix(in srgb, var(--accent) 34%, rgba(255, 255, 255, 0.12));
  color: color-mix(in srgb, var(--accent) 82%, #ffffff);
}

.builder-settings-choice.is-active {
  color: var(--accent);
  border-color: color-mix(in srgb, var(--accent) 45%, rgba(255, 255, 255, 0.12));
  background: color-mix(in srgb, var(--accent) 10%, rgba(255, 255, 255, 0.02)) !important;
  box-shadow: 0 12px 28px rgba(6, 18, 35, 0.2);
}

.builder-settings-choice--color {
  position: relative;
  min-height: 3.55rem;
  padding: 0.85rem;
}

.builder-settings-choice--color i {
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  font-size: 0.95rem;
  color: #fff;
  opacity: 0;
  transition: opacity .18s ease;
}

.builder-settings-choice--color.is-active i {
  opacity: 1;
}

.builder-settings-choice--color span:not(.builder-settings-swatch) {
  display: none;
}

.builder-settings-swatch {
  width: 1.65rem;
  height: 1.65rem;
  border-radius: 999px;
  background: var(--swatch);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.25);
}

#toast-container {
  top: auto;
  right: auto;
  left: 50%;
  bottom: calc(1rem + env(safe-area-inset-bottom, 0px));
  transform: translateX(-50%);
}

@media (max-width: 1023px) {
  #toast-container {
    top: auto;
    right: auto;
    left: 50%;
    bottom: calc(0.85rem + env(safe-area-inset-bottom, 0px));
    transform: translateX(-50%);
  }
}

body.light-theme {
  --bg: #edf5fd;
  --surface: #ffffff;
  --surface-strong: #ffffff;
  --color-dark: #ffffff;
  --surface-soft: rgba(19, 34, 56, 0.03);
  --border: rgba(95, 122, 155, 0.16);
  --border-soft: rgba(95, 122, 155, 0.1);
  --text: #6c7f99;
  --text-white: #1f2a3d;
  --muted: #6f8099;
  --row: rgba(19, 34, 56, 0.015);
  --row-hover: rgba(30, 136, 229, 0.06);
  --row-selected: rgba(30, 136, 229, 0.1);
}

body.light-theme {
  background-color: var(--bg);
  background-image: none;
}

body.light-theme #app-header,
body.light-theme .glass-strong {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
  box-shadow: 0 8px 24px rgba(191, 212, 239, 0.36) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.light-theme .glass,
body.light-theme .card,
body.light-theme .dock-card,
body.light-theme .rfd-loader-panel,
body.light-theme #empty-state {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.12) !important;
  box-shadow: 0 10px 28px rgba(191, 212, 239, 0.32) !important;
}

body.light-theme #global-loader .rfd-loader-backdrop {
  background:
    radial-gradient(1200px 800px at 18% 18%, rgba(93, 135, 255, .14), transparent 58%),
    radial-gradient(900px 650px at 82% 82%, rgba(6, 182, 212, .1), transparent 62%),
    rgba(235, 243, 255, 0.62);
  backdrop-filter: blur(16px) saturate(112%);
}

body.light-theme .rfd-loader-panel {
  background: linear-gradient(180deg, rgba(255,255,255,0.98), rgba(248, 251, 255, 0.98)) !important;
  border-color: rgba(95, 122, 155, 0.16) !important;
  box-shadow: 0 28px 56px rgba(168, 187, 214, 0.28), 0 0 0 1px rgba(255,255,255,0.72) inset !important;
}

body.light-theme .rfd-loader-chip {
  background: rgba(74, 118, 177, 0.06);
  border-color: rgba(95, 122, 155, 0.14);
  color: #627794;
}

body.light-theme .rfd-loader-title {
  color: #1e2e49 !important;
}

body.light-theme .rfd-loader-subtitle,
body.light-theme .rfd-loader-stage-note {
  color: #70839d !important;
}

body.light-theme .rfd-loader-mode-icon {
  background: linear-gradient(180deg, color-mix(in srgb, var(--accent) 14%, white), color-mix(in srgb, var(--accent) 8%, white));
  color: var(--accent);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.92), 0 12px 22px rgba(191, 212, 239, 0.28);
}

body.light-theme .rfd-loader-stage {
  background: rgba(247, 250, 255, 0.94);
  border-color: rgba(95, 122, 155, 0.12);
  color: #73859d;
}

body.light-theme .rfd-loader-stage.is-active {
  background: color-mix(in srgb, var(--accent) 12%, white);
  border-color: color-mix(in srgb, var(--accent) 34%, rgba(95,122,155,0.12));
  color: #20314b;
  box-shadow: 0 10px 22px rgba(191, 212, 239, 0.24);
}

body.light-theme .rfd-loader-stage.is-done {
  color: #3a576f;
  background: rgba(34, 197, 94, 0.08);
  border-color: rgba(34, 197, 94, 0.16);
}

body.light-theme .rfd-loader-preview {
  background: #f7fbff;
  border-color: rgba(95, 122, 155, 0.1);
}

body.light-theme .rfd-loader-preview-row,
body.light-theme .rfd-loader-preview-grid span {
  background: rgba(148, 163, 184, 0.18);
}

body.light-theme .rfd-loader-dot {
  background: rgba(117, 137, 167, 0.54);
}

body.light-theme .rfd-loader-progress-shell {
  background: rgba(95, 122, 155, 0.12);
}

body.light-theme .builder-settings-panel-shell {
  background: rgba(255, 255, 255, 0.98);
  border: 1px solid rgba(95, 122, 155, 0.14);
  box-shadow: 0 24px 54px rgba(121, 145, 173, 0.2);
}

body.light-theme .builder-settings-panel-header {
  border-bottom-color: rgba(95, 122, 155, 0.12);
}

body.light-theme .builder-settings-panel-header h3,
body.light-theme .builder-settings-group h4,
body.light-theme .builder-settings-choice {
  color: #132238;
}

body.light-theme .builder-settings-choice {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.2) !important;
  box-shadow: 0 8px 22px rgba(191, 212, 239, 0.18);
}

body.light-theme .builder-settings-choice:hover {
  background: color-mix(in srgb, var(--accent) 8%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--accent) 42%, rgba(95, 122, 155, 0.22)) !important;
  box-shadow: 0 14px 28px rgba(191, 212, 239, 0.24);
}

body.light-theme .builder-settings-choice.is-active {
  background: color-mix(in srgb, var(--accent) 10%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--accent) 46%, rgba(95, 122, 155, 0.22)) !important;
  box-shadow: 0 14px 30px color-mix(in srgb, var(--accent) 16%, rgba(191, 212, 239, 0.28));
}

body.light-theme .builder-settings-choice--color {
  background: #ffffff !important;
}

body.light-theme .builder-settings-choice--color.is-active i {
  color: #ffffff;
}

body.light-theme .builder-settings-close {
  color: #39506b;
}

body.light-theme #app-header::before,
body.light-theme #results-toolbar::before {
  display: none;
}

body.light-theme #builder-sidebar {
  background: #ffffff !important;
  border: 1px solid rgba(95, 122, 155, 0.12) !important;
  box-shadow: 0 12px 30px rgba(191, 212, 239, 0.3) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.light-theme #builder-view,
body.light-theme #results-list-scroll,
body.light-theme #table-results-view,
body.light-theme #map-detail-view {
  background: var(--bg) !important;
}

body.light-theme #builder-hero h2,
body.light-theme #main-title,
body.light-theme .font-extrabold.text-white,
body.light-theme .text-white {
  color: #1f2a3d !important;
}

body.light-theme #builder-hero {
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.97), rgba(255, 255, 255, 0.93)),
    #ffffff !important;
  border-color: rgba(95, 122, 155, 0.12) !important;
  box-shadow: 0 14px 30px rgba(191, 212, 239, 0.18);
}

body.light-theme #main-subtitle,
body.light-theme #db-msg,
body.light-theme .text-slate-400,
body.light-theme .text-slate-500,
body.light-theme .text-slate-600 {
  color: #7b8da7 !important;
}

body.light-theme #main-subtitle {
  color: #647892 !important;
}

body.light-theme .nav-item {
  color: #58697f !important;
}

body.light-theme .nav-item:hover {
  background: color-mix(in srgb, var(--accent) 8%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--accent) 20%, rgba(95, 122, 155, 0.14)) !important;
  color: var(--accent) !important;
}

body.light-theme .nav-item.active {
  background: rgba(30, 136, 229, 0.1) !important;
  border-color: rgba(30, 136, 229, 0.28) !important;
  color: #1e88e5 !important;
  box-shadow: none !important;
}

body.light-theme .sidebar-item {
  background: transparent;
  border-color: transparent;
  box-shadow: none;
  color: #5b6f89;
}

body.light-theme .sidebar-item:hover {
  background: color-mix(in srgb, var(--accent) 7%, #ffffff);
  border-color: color-mix(in srgb, var(--accent) 18%, rgba(95, 122, 155, 0.12));
  box-shadow: none;
  color: var(--accent);
  transform: translateX(2px);
}

body.light-theme .sidebar-item.active {
  background: color-mix(in srgb, var(--accent) 10%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--accent) 22%, rgba(95, 122, 155, 0.08)) !important;
  color: var(--accent) !important;
  box-shadow: none;
}

body.light-theme .sidebar-item.active::before {
  display: none;
}

body.light-theme .sidebar-item.active .sidebar-item-icon,
body.light-theme .sidebar-item.active i {
  color: var(--accent) !important;
}

body.light-theme #builder-sidebar.builder-sidebar-collapsed .sidebar-item.active {
  background: color-mix(in srgb, var(--accent) 12%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--accent) 24%, rgba(95, 122, 155, 0.08)) !important;
}

body.light-theme #builder-sidebar.builder-sidebar-collapsed #sidebar-container,
body.light-theme.pref-sidebar-collapse #builder-sidebar #sidebar-container {
  scrollbar-color: transparent transparent;
}

body.light-theme #builder-sidebar.builder-sidebar-collapsed:hover #sidebar-container,
body.light-theme #builder-sidebar.builder-sidebar-collapsed #sidebar-container:hover,
body.light-theme.pref-sidebar-collapse #builder-sidebar:hover #sidebar-container,
body.light-theme.pref-sidebar-collapse #builder-sidebar #sidebar-container:hover {
  scrollbar-color: rgba(188, 193, 201, 0.98) rgba(95, 122, 155, 0.08);
}

body.light-theme #builder-sidebar.builder-sidebar-collapsed #sidebar-container::-webkit-scrollbar,
body.light-theme.pref-sidebar-collapse #builder-sidebar #sidebar-container::-webkit-scrollbar {
  width: 4px;
}

body.light-theme #builder-sidebar.builder-sidebar-collapsed #sidebar-container::-webkit-scrollbar-track,
body.light-theme.pref-sidebar-collapse #builder-sidebar #sidebar-container::-webkit-scrollbar-track {
  background: transparent;
  margin-block: 0.95rem;
  border-radius: 999px;
}

body.light-theme #builder-sidebar.builder-sidebar-collapsed #sidebar-container::-webkit-scrollbar-thumb,
body.light-theme.pref-sidebar-collapse #builder-sidebar #sidebar-container::-webkit-scrollbar-thumb {
  background: transparent;
  border-radius: 999px;
  box-shadow: none;
  min-height: 2.8rem;
}

body.light-theme #builder-sidebar.builder-sidebar-collapsed:hover #sidebar-container::-webkit-scrollbar-thumb,
body.light-theme #builder-sidebar.builder-sidebar-collapsed #sidebar-container:hover::-webkit-scrollbar-thumb,
body.light-theme.pref-sidebar-collapse #builder-sidebar:hover #sidebar-container::-webkit-scrollbar-thumb,
body.light-theme.pref-sidebar-collapse #builder-sidebar #sidebar-container:hover::-webkit-scrollbar-thumb {
  background: rgba(196, 199, 205, 0.96);
}

body.light-theme #builder-sidebar.builder-sidebar-collapsed:hover #sidebar-container::-webkit-scrollbar-track,
body.light-theme #builder-sidebar.builder-sidebar-collapsed #sidebar-container:hover::-webkit-scrollbar-track,
body.light-theme.pref-sidebar-collapse #builder-sidebar:hover #sidebar-container::-webkit-scrollbar-track,
body.light-theme.pref-sidebar-collapse #builder-sidebar #sidebar-container:hover::-webkit-scrollbar-track {
  background: rgba(95, 122, 155, 0.08);
}

body.light-theme #builder-sidebar.builder-sidebar-collapsed #sidebar-container::-webkit-scrollbar-thumb:hover,
body.light-theme.pref-sidebar-collapse #builder-sidebar #sidebar-container::-webkit-scrollbar-thumb:hover {
  background: rgba(178, 183, 191, 1);
}

body.light-theme #builder-primary-actions>button[data-action="reset-all"],
body.light-theme #builder-primary-actions>button[data-action="save-preset"] {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.16) !important;
  color: #667a93 !important;
  box-shadow: 0 6px 18px rgba(191, 212, 239, 0.18);
}

body.light-theme #btn-search {
  background: #1e88e5 !important;
  border-color: #1e88e5 !important;
  box-shadow: none !important;
}

body.light-theme #active-filters-container>.glass,
body.light-theme #active-filters-container>#empty-state {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.12) !important;
  box-shadow: 0 14px 36px rgba(191, 212, 239, 0.26) !important;
}

body.light-theme #filter-card-live_excludes .text-slate-400,
body.light-theme #filter-card-live_excludes .text-slate-500,
body.light-theme #filter-card-live_excludes .text-slate-200,
body.light-theme #filter-card-live_excludes .text-slate-300,
body.light-theme #filter-card-airport_filters .text-slate-400,
body.light-theme #filter-card-airport_filters .text-slate-500,
body.light-theme #filter-card-airport_filters .text-slate-200,
body.light-theme #filter-card-airport_filters .text-slate-300 {
  color: #5f7390 !important;
}

body.light-theme #filter-card-live_excludes label,
body.light-theme #filter-card-airport_filters label {
  color: #223149 !important;
  font-weight: 700;
}

body.light-theme #filter-card-live_excludes .border-white\/10,
body.light-theme #filter-card-airport_filters .border-white\/10 {
  border-color: rgba(95, 122, 155, 0.14) !important;
}

body.light-theme #filter-card-live_excludes [data-live-excl],
body.light-theme #filter-card-airport_filters input[type="checkbox"] {
  filter: saturate(1.05) contrast(1.08);
}

body.light-theme [data-nr-excludes-card] p,
body.light-theme [data-nr-excludes-card] .text-slate-300,
body.light-theme [data-nr-excludes-card] .text-slate-400,
body.light-theme [data-nr-excludes-card] .text-slate-500 {
  color: #6a7d98 !important;
}

body.light-theme [data-nr-excludes-card] label,
body.light-theme [data-nr-excludes-card] .text-slate-200 {
  color: #223149 !important;
  font-weight: 700;
}

body.light-theme [data-nr-excludes-card] legend,
body.light-theme [data-nr-excludes-card] .text-blue-300 {
  color: color-mix(in srgb, var(--accent) 72%, #5f7390) !important;
}

body.light-theme [data-nr-excludes-card] fieldset + fieldset,
body.light-theme [data-nr-excludes-card] .border-white\/10 {
  border-color: rgba(95, 122, 155, 0.14) !important;
}

body.light-theme [data-nr-excludes-card] input[type="checkbox"] {
  filter: saturate(1.08) contrast(1.1);
}

body.light-theme [data-nr-excludes-card] .inline-flex > span[class*="bg-"] {
  box-shadow: 0 0 0 1px rgba(17, 24, 39, 0.08);
}

body.light-theme #toast-container .glass {
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
  box-shadow: 0 12px 30px rgba(191, 212, 239, 0.24) !important;
}

body.light-theme #toast-container .glass button,
body.light-theme #toast-container .glass i {
  color: currentColor !important;
}

body.light-theme #empty-state {
  color: #7b8da7 !important;
}

body.light-theme .empty-state-orb {
  background: linear-gradient(180deg, rgba(30, 136, 229, 0.1), rgba(255, 255, 255, 0.92));
  border-color: rgba(95, 122, 155, 0.12);
  box-shadow: 0 14px 30px rgba(191, 212, 239, 0.28);
}

body.light-theme .empty-state-orb i {
  color: color-mix(in srgb, var(--accent) 78%, #7b8da7);
}

body.light-theme .empty-state-title {
  color: #223149;
}

body.light-theme .empty-state-copy,
body.light-theme .empty-state-actions-label {
  color: #6f8099;
}

body.light-theme .empty-state-chip {
  background: #ffffff;
  border-color: rgba(95, 122, 155, 0.16);
  color: #223149;
  box-shadow: 0 8px 18px rgba(191, 212, 239, 0.14);
}

body.light-theme .empty-state-chip i {
  color: color-mix(in srgb, var(--accent) 74%, #6f8099);
}

body.light-theme .empty-state-chip:hover {
  background: color-mix(in srgb, var(--accent) 8%, #ffffff);
  border-color: color-mix(in srgb, var(--accent) 24%, rgba(95, 122, 155, 0.16));
  color: var(--accent);
  box-shadow: 0 14px 26px rgba(191, 212, 239, 0.22);
}

body.light-theme #main-icon-container {
  background: linear-gradient(180deg, rgba(30, 136, 229, 0.12), rgba(255, 255, 255, 0.94)) !important;
  border-color: rgba(95, 122, 155, 0.12) !important;
  box-shadow: 0 10px 18px rgba(191, 212, 239, 0.18);
}

body.light-theme #db-msg {
  color: #169f63 !important;
}

body.light-theme #pill-db,
body.light-theme #pill-airports {
  background: #fdfefe !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
  color: #5f7390 !important;
  box-shadow: 0 6px 14px rgba(191, 212, 239, 0.09);
}

body.light-theme #pill-db-val,
body.light-theme #pill-airports-val,
body.light-theme #pill-rows-val {
  color: #169f63 !important;
  font-weight: 900 !important;
  text-shadow: none !important;
}

body.light-theme #pill-airports .text-slate-400,
body.light-theme #pill-db .text-slate-400 {
  color: #169f63 !important;
}

body.light-theme #builder-primary-actions>button[data-action="reset-all"],
body.light-theme #builder-primary-actions>button[data-action="save-preset"] {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.16) !important;
  color: #5f7390 !important;
  box-shadow: 0 6px 14px rgba(191, 212, 239, 0.1);
}

body.light-theme #builder-primary-actions>button[data-action="reset-all"]:hover,
body.light-theme #builder-primary-actions>button[data-action="save-preset"]:hover {
  color: var(--accent) !important;
  border-color: color-mix(in srgb, var(--accent) 24%, rgba(95, 122, 155, 0.16)) !important;
  box-shadow: 0 10px 18px rgba(191, 212, 239, 0.14);
}

body.light-theme #results-toolbar,
body.light-theme #results-summary-bar,
body.light-theme #results-list-scroll,
body.light-theme .rfd-actions-panel,
body.light-theme .rfd-actions-panel .rfd-dock-header,
body.light-theme .rfd-support-strip {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.12) !important;
  box-shadow: 0 10px 28px rgba(191, 212, 239, 0.28) !important;
}

body.light-theme .rfd-actions-panel,
body.light-theme .rfd-support-strip {
  overflow: hidden;
}

body.light-theme .rfd-actions-panel .dock-card,
body.light-theme .support-donors-col,
body.light-theme .support-donors-col,
body.light-theme .rfd-support-strip .support-tick,
body.light-theme .rfd-support-strip .support-progress-track {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.12) !important;
  box-shadow: none !important;
}

body.light-theme .rfd-support-strip {
  background: #ffffff !important;
}

body.light-theme #results-support-wrap .md\:w-48,
body.light-theme #results-support-wrap .flex-1.rounded-xl {
  background: #ffffff !important;
  border: 1px solid rgba(95, 122, 155, 0.12) !important;
  box-shadow: none !important;
}

body.light-theme #results-support-wrap .text-\[13px\].uppercase,
body.light-theme #results-support-wrap .text-\[14px\].text-white,
body.light-theme #results-support-wrap .text-\[12px\].text-white,
body.light-theme #results-support-wrap .text-\[12px\].text-white.font-extrabold,
body.light-theme #results-support-wrap .support-donor-year,
body.light-theme #results-support-wrap .support-donor-item {
  color: #223149 !important;
  text-shadow: none !important;
}

body.light-theme #results-support-wrap .text-\[12px\].text-slate-500,
body.light-theme #results-support-wrap .text-\[12px\].text-slate-400,
body.light-theme #results-support-wrap .text-\[10px\].font-extrabold.text-slate-300,
body.light-theme #results-support-wrap .support-donor-sub,
body.light-theme #results-support-wrap .text-\[9px\].uppercase {
  color: #7b8da7 !important;
}

body.light-theme #results-support-wrap .support-icon-btn {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
  box-shadow: none !important;
}

body.light-theme #results-support-wrap .support-progress-track {
  background: #edf5fd !important;
  border-color: rgba(95, 122, 155, 0.1) !important;
}

body.light-theme #results-support-wrap .support-tick {
  background: #f7fafd !important;
  border-color: rgba(95, 122, 155, 0.1) !important;
}

body.light-theme #results-support-wrap .support-pane {
  background: transparent !important;
}

body.light-theme #results-support-wrap .text-rose-200\/75,
body.light-theme #results-support-wrap .text-rose-200\/70 {
  color: #f56b45 !important;
}

body.light-theme .rfd-actions-panel .dock-card-title,
body.light-theme .rfd-actions-panel .dock-card-title .icon,
body.light-theme .rfd-actions-panel .dock-card-title span,
body.light-theme .support-donor-year,
body.light-theme .support-donor-item,
body.light-theme .support-donor-sub {
  color: #6f8099 !important;
  text-shadow: none !important;
}

body.light-theme .rfd-actions-panel .dock-card>.space-y-2>button[data-action],
body.light-theme .rfd-actions-panel .dock-card>.space-y-2>button[data-windy-kind],
body.light-theme .rfd-actions-panel .dock-card>.space-y-2>.relative>button[data-action] {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
  color: #223149 !important;
}

body.light-theme .rfd-actions-panel .dock-card>.space-y-2>button[data-action]:hover,
body.light-theme .rfd-actions-panel .dock-card>.space-y-2>button[data-windy-kind]:hover,
body.light-theme .rfd-actions-panel .dock-card>.space-y-2>.relative>button[data-action]:hover {
  background: color-mix(in srgb, var(--accent) 6%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--accent) 20%, rgba(95, 122, 155, 0.14)) !important;
  color: var(--accent) !important;
}

body.light-theme .rfd-actions-panel .dock-card>.space-y-2>button[data-action="open-map"] {
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 88%, #ffffff),
      color-mix(in srgb, var(--brand) 70%, var(--accent))) !important;
  border-color: color-mix(in srgb, var(--accent) 34%, rgba(95, 122, 155, 0.14)) !important;
  color: #ffffff !important;
}

body.light-theme .rfd-actions-panel .dock-card>.space-y-2>button[data-action="open-map"] .text-xs,
body.light-theme .rfd-actions-panel .dock-card>.space-y-2>button[data-action="open-map"] .text-\[10px\],
body.light-theme .rfd-actions-panel .dock-card>.space-y-2>button[data-action="open-map"] i {
  color: #ffffff !important;
}

body.light-theme .rfd-actions-panel .dock-card>.space-y-2>button[data-action="open-map"] > div:first-child {
  background: rgba(255, 255, 255, 0.16) !important;
}

body.light-theme .rfd-actions-panel .dock-card>.space-y-2>button[data-action="open-map"]:hover {
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 92%, #ffffff),
      color-mix(in srgb, var(--brand) 76%, var(--accent))) !important;
  border-color: color-mix(in srgb, var(--accent) 46%, rgba(95, 122, 155, 0.14)) !important;
  color: #ffffff !important;
}

body.light-theme .rfd-actions-panel .dock-card>.space-y-2>button[data-action="open-map"]:hover .text-xs,
body.light-theme .rfd-actions-panel .dock-card>.space-y-2>button[data-action="open-map"]:hover .text-\[10px\],
body.light-theme .rfd-actions-panel .dock-card>.space-y-2>button[data-action="open-map"]:hover i {
  color: #ffffff !important;
}

body.light-theme .rfd-actions-panel .dock-card [data-briefing-menu],
body.light-theme .rfd-actions-panel .dock-card [data-announcement-menu],
body.light-theme .rfd-actions-panel .dock-card [data-flight-info-menu],
body.light-theme .rfd-actions-panel .dock-card [data-registration-info-menu],
body.light-theme .rfd-actions-panel .dock-card [data-airport-info-menu],
body.light-theme .rfd-actions-panel .dock-card [data-ai-diff-menu],
body.light-theme .rfd-actions-panel .dock-card [data-charts-info-menu],
body.light-theme .rfd-actions-panel .dock-card [data-weather-info-menu],
body.light-theme .rfd-actions-panel .dock-card [data-simbrief-menu],
body.light-theme .rfd-actions-panel .dock-card [data-pfpx-menu] {
  background: #ffffff !important;
  border-color: color-mix(in srgb, var(--accent) 18%, rgba(95, 122, 155, 0.14)) !important;
  box-shadow: 0 14px 32px rgba(191, 212, 239, 0.26) !important;
}

body.light-theme .rfd-actions-panel .dock-card [data-briefing-menu] > div:first-child,
body.light-theme .rfd-actions-panel .dock-card [data-announcement-menu] > div:first-child,
body.light-theme .rfd-actions-panel .dock-card [data-ai-diff-menu] > div.text-\[10px\],
body.light-theme .rfd-actions-panel .dock-card [data-flight-info-menu] > div:first-child,
body.light-theme .rfd-actions-panel .dock-card [data-registration-info-menu] > div:first-child,
body.light-theme .rfd-actions-panel .dock-card [data-airport-info-menu] > div:first-child,
body.light-theme .rfd-actions-panel .dock-card [data-charts-info-menu] > div:first-child,
body.light-theme .rfd-actions-panel .dock-card [data-weather-info-menu] > div:first-child,
body.light-theme .rfd-actions-panel .dock-card [data-simbrief-menu] > div:first-child,
body.light-theme .rfd-actions-panel .dock-card [data-pfpx-menu] > div:first-child {
  color: color-mix(in srgb, var(--accent) 52%, #6f8099) !important;
}

body.light-theme .rfd-actions-panel .dock-card [data-briefing-menu] > button,
body.light-theme .rfd-actions-panel .dock-card [data-announcement-menu] > button,
body.light-theme .rfd-actions-panel .dock-card [data-flight-info-menu] > button,
body.light-theme .rfd-actions-panel .dock-card [data-registration-info-menu] > button,
body.light-theme .rfd-actions-panel .dock-card [data-airport-info-menu] > button,
body.light-theme .rfd-actions-panel .dock-card [data-ai-diff-menu] > button,
body.light-theme .rfd-actions-panel .dock-card [data-charts-info-menu] > button,
body.light-theme .rfd-actions-panel .dock-card [data-weather-info-menu] > button,
body.light-theme .rfd-actions-panel .dock-card [data-simbrief-menu] > button,
body.light-theme .rfd-actions-panel .dock-card [data-pfpx-menu] > button {
  color: #223149 !important;
}

body.light-theme .rfd-actions-panel .dock-card [data-briefing-menu] > button:hover,
body.light-theme .rfd-actions-panel .dock-card [data-announcement-menu] > button:hover,
body.light-theme .rfd-actions-panel .dock-card [data-flight-info-menu] > button:hover,
body.light-theme .rfd-actions-panel .dock-card [data-registration-info-menu] > button:hover,
body.light-theme .rfd-actions-panel .dock-card [data-airport-info-menu] > button:hover,
body.light-theme .rfd-actions-panel .dock-card [data-ai-diff-menu] > button:hover,
body.light-theme .rfd-actions-panel .dock-card [data-charts-info-menu] > button:hover,
body.light-theme .rfd-actions-panel .dock-card [data-weather-info-menu] > button:hover,
body.light-theme .rfd-actions-panel .dock-card [data-simbrief-menu] > button:hover,
body.light-theme .rfd-actions-panel .dock-card [data-pfpx-menu] > button:hover {
  background: color-mix(in srgb, var(--accent) 10%, #ffffff) !important;
  color: var(--accent) !important;
}

body.light-theme .rfd-actions-panel .dock-card [data-briefing-menu] > button i,
body.light-theme .rfd-actions-panel .dock-card [data-announcement-menu] > button i,
body.light-theme .rfd-actions-panel .dock-card [data-flight-info-menu] > button i,
body.light-theme .rfd-actions-panel .dock-card [data-registration-info-menu] > button i,
body.light-theme .rfd-actions-panel .dock-card [data-airport-info-menu] > button i,
body.light-theme .rfd-actions-panel .dock-card [data-ai-diff-menu] > button i,
body.light-theme .rfd-actions-panel .dock-card [data-charts-info-menu] > button i,
body.light-theme .rfd-actions-panel .dock-card [data-weather-info-menu] > button i,
body.light-theme .rfd-actions-panel .dock-card [data-simbrief-menu] > button i,
body.light-theme .rfd-actions-panel .dock-card [data-pfpx-menu] > button i {
  color: color-mix(in srgb, var(--accent) 68%, #7b8da7) !important;
}

body.light-theme .rfd-actions-panel .dock-card [data-briefing-menu] > button:hover i,
body.light-theme .rfd-actions-panel .dock-card [data-announcement-menu] > button:hover i,
body.light-theme .rfd-actions-panel .dock-card [data-flight-info-menu] > button:hover i,
body.light-theme .rfd-actions-panel .dock-card [data-registration-info-menu] > button:hover i,
body.light-theme .rfd-actions-panel .dock-card [data-airport-info-menu] > button:hover i,
body.light-theme .rfd-actions-panel .dock-card [data-ai-diff-menu] > button:hover i,
body.light-theme .rfd-actions-panel .dock-card [data-charts-info-menu] > button:hover i,
body.light-theme .rfd-actions-panel .dock-card [data-weather-info-menu] > button:hover i,
body.light-theme .rfd-actions-panel .dock-card [data-simbrief-menu] > button:hover i,
body.light-theme .rfd-actions-panel .dock-card [data-pfpx-menu] > button:hover i {
  color: var(--accent) !important;
}

body.light-theme .rfd-actions-panel .dock-card .ring-violet-300 {
  --tw-ring-color: color-mix(in srgb, var(--accent) 34%, rgba(95, 122, 155, 0.14)) !important;
  border-color: color-mix(in srgb, var(--accent) 28%, rgba(95, 122, 155, 0.14)) !important;
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 16%, transparent) !important;
}

body.light-theme [data-briefing-root][data-menu-open="1"] > button,
body.light-theme [data-announcement-root][data-menu-open="1"] > button,
body.light-theme [data-ai-diff-root][data-menu-open="1"] > button,
body.light-theme [data-flight-info-root][data-menu-open="1"] > button,
body.light-theme [data-registration-info-root][data-menu-open="1"] > button,
body.light-theme [data-airport-info-root][data-menu-open="1"] > button {
  background: color-mix(in srgb, var(--accent) 10%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--accent) 28%, rgba(95, 122, 155, 0.14)) !important;
  color: var(--accent) !important;
}

body.light-theme #flights-table thead th {
  background: #ffffff !important;
  color: #223149 !important;
  border-bottom-color: rgba(95, 122, 155, 0.14) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.light-theme #flights-table tbody tr.flight-row td {
  background: #ffffff !important;
  border-top-color: rgba(95, 122, 155, 0.12) !important;
  border-bottom-color: rgba(95, 122, 155, 0.12) !important;
}

body.light-theme #flights-table tbody tr.flight-row td:first-child {
  border-left-color: rgba(95, 122, 155, 0.12) !important;
}

body.light-theme #flights-table tbody tr.flight-row td:last-child {
  border-right-color: rgba(95, 122, 155, 0.12) !important;
}

body.light-theme #flights-table tbody tr.flight-row:hover td {
  background: #f8fbff !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
}

body.light-theme #flights-table tbody tr.flight-row.selected td {
  background: color-mix(in srgb, var(--accent) 10%, #ffffff) !important;
  border-top-color: color-mix(in srgb, var(--accent) 34%, rgba(95, 122, 155, 0.14)) !important;
  border-bottom-color: color-mix(in srgb, var(--accent) 34%, rgba(95, 122, 155, 0.14)) !important;
  border-left-color: color-mix(in srgb, var(--accent) 34%, rgba(95, 122, 155, 0.14)) !important;
  border-right-color: color-mix(in srgb, var(--accent) 34%, rgba(95, 122, 155, 0.14)) !important;
}

body.light-theme #table-results-view #flights-table .company-short,
body.light-theme #table-results-view #flights-table .col-aircraft>div:first-child,
body.light-theme #table-results-view #flights-table .table-meta-value,
body.light-theme #total-count,
body.light-theme #estim-time .text-white {
  color: #223149 !important;
}

body.light-theme #table-results-view #flights-table .company-long,
body.light-theme #table-results-view #flights-table .aircraft-reg,
body.light-theme #table-results-view #flights-table .duration-dist,
body.light-theme #table-results-view #flights-table .duration-diff,
body.light-theme #table-results-view #flights-table .table-meta-label,
body.light-theme #table-results-view #flights-table .airport-name,
body.light-theme #table-results-view #flights-table .col-flightno span,
body.light-theme #table-results-view #flights-table .col-callsign span,
body.light-theme #estim-time {
  color: #7b8da7 !important;
}

body.light-theme .badge {
  background: #f7fafd !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
  color: #4d637f !important;
}

body.light-theme .badge-dep {
  background: rgba(30, 136, 229, 0.08) !important;
  border-color: rgba(30, 136, 229, 0.22) !important;
  color: #1e88e5 !important;
}

body.light-theme .badge-arr {
  background: rgba(255, 138, 101, 0.1) !important;
  border-color: rgba(255, 138, 101, 0.22) !important;
  color: #f56b45 !important;
}

body.light-theme .logo-slot {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.12) !important;
  box-shadow: 0 8px 18px rgba(191, 212, 239, 0.18) !important;
}

body.light-theme #results-toolbar>button[data-action="exit-results"] {
  color: #7b8da7 !important;
}

body.light-theme #results-toolbar>button[data-action="exit-results"]:hover {
  color: #223149 !important;
}

body.light-theme #results-toolbar-actions [data-i18n="results.title"] {
  color: #6f8099 !important;
}

body.light-theme #results-toolbar-actions button {
  color: #223149 !important;
  border-color: rgba(95, 122, 155, 0.16) !important;
  background: #ffffff !important;
}

body.light-theme #results-toolbar-actions button i {
  color: #223149 !important;
}

body.light-theme [id^="filter-card-"] label.text-slate-400,
body.light-theme [id^="filter-card-"] .text-slate-400,
body.light-theme [id^="filter-card-"] .text-slate-500 {
  color: #7b8da7 !important;
}

body.light-theme [id^="filter-card-"] [data-filter-input],
body.light-theme [id^="filter-card-"] input[type="number"],
body.light-theme [id^="filter-card-"] input[type="text"],
body.light-theme [id^="filter-card-"] select,
body.light-theme [id^="filter-card-"] .bg-black\/20 {
  background: #f3f7fc !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
  color: #223149 !important;
  box-shadow: none !important;
  color-scheme: light;
}

body.light-theme [id^="filter-card-"] [data-filter-input]::placeholder,
body.light-theme [id^="filter-card-"] input::placeholder,
body.light-theme [id^="filter-card-"] textarea::placeholder {
  color: #8ca0bb !important;
}

body.light-theme [id^="filter-card-"] [data-action="open-dropdown"],
body.light-theme [id^="filter-card-"] [data-match-dd-trigger],
body.light-theme [id^="filter-card-"] [data-match-dd-trigger] i {
  color: #6f8099 !important;
}

body.light-theme [id^="filter-card-"] [data-action="open-dropdown"]:hover,
body.light-theme [id^="filter-card-"] [data-match-dd-trigger]:hover,
body.light-theme [id^="filter-card-"] [data-match-dd-trigger]:focus-visible {
  color: var(--accent) !important;
  border-color: color-mix(in srgb, var(--accent) 24%, rgba(95, 122, 155, 0.14)) !important;
}

body.light-theme [id^="filter-card-"] [data-match-dd-trigger] {
  background: #f3f7fc !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
}

body.light-theme [id^="filter-card-"] button.bg-white\/5,
body.light-theme [id^="filter-card-"] .bg-white\/5,
body.light-theme [id^="filter-card-"] .hover\:bg-white\/10,
body.light-theme [id^="filter-card-"] .border-white\/10,
body.light-theme [id^="filter-card-"] .border-white\/12 {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
  color: #6f8099 !important;
  box-shadow: none !important;
}

body.light-theme [id^="filter-card-"] button.bg-white\/5:hover,
body.light-theme [id^="filter-card-"] .hover\:bg-white\/10:hover {
  background: color-mix(in srgb, var(--accent) 7%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--accent) 20%, rgba(95, 122, 155, 0.14)) !important;
  color: var(--accent) !important;
}

body.light-theme .custom-dropdown-list {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
  box-shadow: 0 12px 28px rgba(191, 212, 239, 0.28) !important;
  scrollbar-color: rgba(123, 141, 167, 0.7) rgba(237, 245, 253, 0.9);
}

body.light-theme .custom-option {
  color: #223149 !important;
  border-bottom-color: rgba(95, 122, 155, 0.1) !important;
}

body.light-theme .custom-option:hover {
  background: color-mix(in srgb, var(--accent) 10%, #ffffff) !important;
  color: var(--accent) !important;
}

body.light-theme .custom-option.selected,
body.light-theme .custom-option[aria-selected="true"] {
  background: color-mix(in srgb, var(--accent) 12%, #ffffff) !important;
  color: var(--accent) !important;
}

body.light-theme .custom-dropdown-list::-webkit-scrollbar,
body.light-theme .rfd-dd-menu::-webkit-scrollbar {
  width: 8px;
}

body.light-theme .custom-dropdown-list::-webkit-scrollbar-track,
body.light-theme .rfd-dd-menu::-webkit-scrollbar-track {
  background: rgba(237, 245, 253, 0.92);
  border-radius: 999px;
}

body.light-theme .custom-dropdown-list::-webkit-scrollbar-thumb,
body.light-theme .rfd-dd-menu::-webkit-scrollbar-thumb {
  background: rgba(123, 141, 167, 0.58);
  border-radius: 999px;
}

body.light-theme .custom-dropdown-list::-webkit-scrollbar-thumb:hover,
body.light-theme .rfd-dd-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(95, 122, 155, 0.82);
}

body.light-theme .rfd-dd-menu {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
  box-shadow: 0 12px 28px rgba(191, 212, 239, 0.28) !important;
  backdrop-filter: none !important;
  scrollbar-color: rgba(123, 141, 167, 0.7) rgba(237, 245, 253, 0.9);
}

body.light-theme .rfd-dd-item {
  color: #223149 !important;
}

body.light-theme .rfd-dd-item+.rfd-dd-item {
  border-top-color: rgba(95, 122, 155, 0.1) !important;
}

body.light-theme .rfd-dd-item:hover {
  background: color-mix(in srgb, var(--accent) 8%, #ffffff) !important;
  color: var(--accent) !important;
}

body.light-theme .rfd-dd-item[aria-selected="true"] {
  background: color-mix(in srgb, var(--accent) 12%, #ffffff) !important;
  color: var(--accent) !important;
}

body.light-theme .rfd-select {
  background: #f3f7fc !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
  color: #223149 !important;
  box-shadow: none !important;
  backdrop-filter: none !important;
  color-scheme: light;
}

body.light-theme [id^="filter-card-"] .rfd-tip,
body.light-theme [id^="filter-card-"] .rfd-tip i {
  color: #7b8da7 !important;
}

body.light-theme [id^="filter-card-"] .rfd-tip:hover,
body.light-theme [id^="filter-card-"] .rfd-tip:hover i {
  color: var(--accent) !important;
}

body.light-theme [id^="filter-card-"] .rfd-tooltip {
  background: #ffffff !important;
  border: 1px solid rgba(95, 122, 155, 0.14) !important;
  color: #223149 !important;
  box-shadow: 0 12px 28px rgba(191, 212, 239, 0.26) !important;
}

body.light-theme .rfd-select option {
  background: #ffffff !important;
  color: #223149 !important;
}

body.light-theme .rfd-links-menu>div,
body.light-theme #lang-menu {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
  box-shadow: 0 12px 28px rgba(191, 212, 239, 0.28) !important;
  backdrop-filter: none !important;
  -webkit-backdrop-filter: none !important;
}

body.light-theme .rfd-links-section,
body.light-theme .rfd-links-section+.rfd-links-section {
  border-color: rgba(95, 122, 155, 0.12) !important;
}

body.light-theme .rfd-links-item,
body.light-theme .rfd-links-item-btn,
body.light-theme .rfd-links-label {
  color: #223149 !important;
}

body.light-theme .rfd-links-item:hover,
body.light-theme .rfd-links-item-btn:hover {
  background: color-mix(in srgb, var(--accent) 8%, #ffffff) !important;
  color: var(--accent) !important;
}

body.light-theme #mobile-modes-menu {
  background: rgba(255, 255, 255, 0.98) !important;
  border-color: rgba(195, 210, 232, 0.96) !important;
  box-shadow: 0 24px 54px rgba(148, 163, 184, 0.28) !important;
}

body.light-theme #mobile-modes-menu button,
body.light-theme #mobile-modes-menu button span {
  color: #223149 !important;
  opacity: 1 !important;
  text-shadow: none !important;
}

body.light-theme #mobile-modes-menu button:hover,
body.light-theme #mobile-modes-menu button:hover span {
  color: var(--accent) !important;
}

body.light-theme .rfd-links-section .text-\[10px\],
body.light-theme .rfd-links-field-label,
body.light-theme .rfd-links-menu .text-slate-400,
body.light-theme .rfd-links-menu .text-slate-500 {
  color: #7b8da7 !important;
}

body.light-theme .rfd-links-field {
  background: #f7fafd !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
  color: #223149 !important;
}

body.light-theme .rfd-links-field::placeholder {
  color: #8ca0bb !important;
}

body.light-theme .rfd-links-go {
  background: rgba(30, 136, 229, 0.12) !important;
  border-color: rgba(30, 136, 229, 0.18) !important;
  color: #1e88e5 !important;
}

body.light-theme .rfd-links-go:hover {
  background: rgba(30, 136, 229, 0.18) !important;
  border-color: rgba(30, 136, 229, 0.24) !important;
}

body.light-theme #table-results-view #flights-table .company-long,
body.light-theme #table-results-view #flights-table .aircraft-reg,
body.light-theme #table-results-view #flights-table .duration-dist,
body.light-theme #table-results-view #flights-table .duration-diff,
body.light-theme #table-results-view #flights-table .airport-name,
body.light-theme #table-results-view #flights-table .col-flightno span,
body.light-theme #table-results-view #flights-table .col-callsign span,
body.light-theme #table-results-view #flights-table .table-meta-label {
  color: #6e82a0 !important;
}

body.light-theme .rfd-actions-panel .rfd-dock-header .text-\[11px\].text-slate-400,
body.light-theme .rfd-actions-panel .rfd-dock-header .text-\[10px\].uppercase,
body.light-theme .rfd-actions-panel .rfd-dock-header .text-\[11px\].text-slate-400.font-mono,
body.light-theme .rfd-actions-panel .dock-card-title .text-\[10px\].font-bold,
body.light-theme .rfd-actions-panel .text-slate-500,
body.light-theme .rfd-actions-panel .text-slate-400,
body.light-theme .rfd-actions-panel .text-slate-300 {
  color: #7b8da7 !important;
}

body.light-theme .rfd-actions-panel .rfd-dock-header .text-white,
body.light-theme .rfd-actions-panel .dock-card-title .left span,
body.light-theme .rfd-actions-panel #dock-selected-dep,
body.light-theme .rfd-actions-panel #dock-selected-arr,
body.light-theme .rfd-actions-panel #dock-selected-ident,
body.light-theme .rfd-actions-panel .text-xs.font-bold,
body.light-theme .rfd-actions-panel .text-xs.font-extrabold {
  color: #223149 !important;
}

body.light-theme .rfd-actions-panel .rfd-dock-header .inline-flex {
  color: #7b8da7 !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
  background: #f7fafd !important;
}

body.light-theme #estim-time,
body.light-theme #total-estim-time,
body.light-theme #total-count {
  color: #223149 !important;
}

body.light-theme #results-support-wrap .text-\[10px\].font-extrabold.text-slate-300,
body.light-theme #results-support-wrap [data-donors-credits-meta],
body.light-theme #results-support-wrap .text-\[12px\].text-slate-500,
body.light-theme #results-support-wrap .text-\[12px\].text-slate-400,
body.light-theme #results-support-wrap .support-donor-sub,
body.light-theme #results-support-wrap .text-\[9px\].uppercase,
body.light-theme #results-support-wrap .text-rose-200\/75,
body.light-theme #results-support-wrap .text-rose-200\/70 {
  color: #6f8099 !important;
}

body.light-theme #results-support-wrap .support-donor-item,
body.light-theme #results-support-wrap .support-donor-year,
body.light-theme #results-support-wrap .text-\[14px\].text-white,
body.light-theme #results-support-wrap .text-\[12px\].text-white,
body.light-theme #results-support-wrap .text-\[12px\].text-white.font-extrabold,
body.light-theme #results-support-wrap .font-extrabold.leading-none {
  color: #223149 !important;
}

body.light-theme #support-progress-meta,
body.light-theme #support-countdown-meta {
  color: #50627f !important;
  font-weight: 900 !important;
  text-shadow: none !important;
}

body.pref-container-boxed #app-header,
body.pref-container-boxed #app-workspace {
  max-width: min(1700px, calc(100vw - 2rem));
  width: 100%;
  margin-left: auto;
  margin-right: auto;
}

body.pref-container-boxed {
  padding: 0.65rem 1rem 1rem;
}

body.pref-container-boxed #app-header {
  border-radius: 1.25rem;
  margin-bottom: 0.75rem;
}

body.pref-layout-horizontal #app-workspace {
  flex-direction: column;
}

body.pref-layout-horizontal #builder-sidebar-top {
  display: none !important;
}

body.pref-layout-horizontal #builder-sidebar {
  width: auto !important;
  max-width: none !important;
  height: 5.6rem;
  max-height: 5.6rem;
  margin: 0.9rem 1rem 0 !important;
  border-right: 0 !important;
  border-bottom: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 1.75rem !important;
  background: var(--color-dark);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  overflow-x: hidden;
  overflow-y: hidden !important;
}

body.pref-layout-horizontal #sidebar-container {
  flex-direction: row;
  flex-wrap: nowrap;
  align-items: center;
  justify-content: flex-start;
  gap: 0.45rem;
  height: 100%;
  width: 100%;
  padding-top: 0.7rem;
  padding-bottom: 0.7rem;
  padding-left: 0.2rem;
  padding-right: 0.95rem;
  margin: 0 !important;
  padding-inline: 0.2rem 0.95rem;
  padding-block: 0.7rem;
  overflow-x: auto;
  overflow-y: hidden !important;
  overscroll-behavior-x: contain;
  overscroll-behavior-y: none;
  touch-action: pan-x;
  scrollbar-width: thin;
  scrollbar-color: rgba(121, 145, 173, 0.45) transparent;
}

body.pref-layout-horizontal #builder-sidebar-top,
body.pref-layout-horizontal #builder-sidebar-inner,
body.pref-layout-horizontal #builder-sidebar-content {
  overflow-y: hidden !important;
}

body.pref-layout-horizontal .sidebar-item {
  width: 6.2rem;
  min-width: 6.2rem;
  height: 2.7rem;
  min-height: 2.7rem;
  padding: 0.25rem 0.5rem;
  display: grid;
  place-items: center;
  gap: 0;
  text-align: center;
  align-content: center;
  justify-content: center;
  border-left: 0 !important;
}

body.pref-layout-horizontal .sidebar-item .sidebar-item-icon {
  width: auto;
  height: auto;
  margin: 0;
  display: grid;
  place-items: center;
  font-size: 0.9rem;
  line-height: 1;
  align-self: center;
  justify-self: center;
  transform: none !important;
}

body.pref-layout-horizontal .sidebar-item-label {
  font-size: 0.68rem;
  line-height: 1.05;
}

body.pref-layout-horizontal .sidebar-item>* {
  align-self: center;
  justify-self: center;
}

body.pref-layout-horizontal #sidebar-container::-webkit-scrollbar {
  height: 7px;
}

body.pref-layout-horizontal #sidebar-container::-webkit-scrollbar-track {
  background: transparent;
}

body.pref-layout-horizontal #sidebar-container::-webkit-scrollbar-thumb {
  background: rgba(121, 145, 173, 0.38);
  border-radius: 999px;
  border: 1px solid transparent;
}

body.pref-layout-horizontal #sidebar-container::-webkit-scrollbar-thumb:hover {
  background: rgba(121, 145, 173, 0.56);
}

body.pref-layout-horizontal #sidebar-toggle-tab {
  display: none !important;
}

body.pref-card-shadow .glass,
body.pref-card-shadow .card,
body.pref-card-shadow .dock-card,
body.pref-card-shadow #empty-state,
body.pref-card-shadow #active-filters-container>.glass,
body.pref-card-shadow #active-filters-container>#empty-state,
body.pref-card-shadow #app-header,
body.pref-card-shadow #builder-sidebar,
body.pref-card-shadow #results-toolbar,
body.pref-card-shadow #results-list-scroll,
body.pref-card-shadow #results-summary-bar,
body.pref-card-shadow .rfd-actions-panel,
body.pref-card-shadow .rfd-actions-panel .rfd-dock-header,
body.pref-card-shadow .rfd-support-strip,
body.pref-card-shadow #results-support-wrap .md\:w-48,
body.pref-card-shadow #results-support-wrap .flex-1.rounded-xl,
body.pref-card-shadow .support-donors-col,
body.pref-card-shadow .rfd-support-strip .support-tick,
body.pref-card-shadow .rfd-support-strip .support-progress-track {
  border-color: transparent !important;
  box-shadow: 0 22px 48px rgba(5, 14, 30, 0.24) !important;
}

body.light-theme.pref-card-shadow .glass,
body.light-theme.pref-card-shadow .card,
body.light-theme.pref-card-shadow .dock-card,
body.light-theme.pref-card-shadow #empty-state,
body.light-theme.pref-card-shadow #active-filters-container>.glass,
body.light-theme.pref-card-shadow #active-filters-container>#empty-state,
body.light-theme.pref-card-shadow #app-header,
body.light-theme.pref-card-shadow #builder-sidebar,
body.light-theme.pref-card-shadow #results-toolbar,
body.light-theme.pref-card-shadow #results-list-scroll,
body.light-theme.pref-card-shadow #results-summary-bar,
body.light-theme.pref-card-shadow .rfd-actions-panel,
body.light-theme.pref-card-shadow .rfd-actions-panel .rfd-dock-header,
body.light-theme.pref-card-shadow .rfd-support-strip,
body.light-theme.pref-card-shadow #results-support-wrap .md\:w-48,
body.light-theme.pref-card-shadow #results-support-wrap .flex-1.rounded-xl,
body.light-theme.pref-card-shadow .support-donors-col,
body.light-theme.pref-card-shadow .rfd-support-strip .support-tick,
body.light-theme.pref-card-shadow .rfd-support-strip .support-progress-track {
  border-color: rgba(95, 122, 155, 0.06) !important;
  box-shadow: 0 16px 34px rgba(191, 212, 239, 0.34) !important;
}

body.pref-card-border .glass,
body.pref-card-border .card,
body.pref-card-border .dock-card,
body.pref-card-border #empty-state,
body.pref-card-border #active-filters-container>.glass,
body.pref-card-border #active-filters-container>#empty-state,
body.pref-card-border #app-header,
body.pref-card-border #builder-sidebar,
body.pref-card-border #results-toolbar,
body.pref-card-border #results-list-scroll,
body.pref-card-border #results-summary-bar,
body.pref-card-border .rfd-actions-panel,
body.pref-card-border .rfd-actions-panel .rfd-dock-header,
body.pref-card-border .rfd-support-strip,
body.pref-card-border #results-support-wrap .md\:w-48,
body.pref-card-border #results-support-wrap .flex-1.rounded-xl,
body.pref-card-border .support-donors-col,
body.pref-card-border .rfd-support-strip .support-tick,
body.pref-card-border .rfd-support-strip .support-progress-track {
  box-shadow: none !important;
}

body.pref-card-border #app-header,
body.pref-card-border #builder-sidebar,
body.pref-card-border #results-toolbar,
body.pref-card-border #results-list-scroll,
body.pref-card-border #results-summary-bar,
body.pref-card-border .rfd-actions-panel,
body.pref-card-border .rfd-support-strip {
  box-shadow: none !important;
}

body.light-theme.pref-card-border .glass,
body.light-theme.pref-card-border .card,
body.light-theme.pref-card-border .dock-card,
body.light-theme.pref-card-border #empty-state,
body.light-theme.pref-card-border #active-filters-container>.glass,
body.light-theme.pref-card-border #active-filters-container>#empty-state,
body.light-theme.pref-card-border #app-header,
body.light-theme.pref-card-border #builder-sidebar,
body.light-theme.pref-card-border #results-toolbar,
body.light-theme.pref-card-border #results-list-scroll,
body.light-theme.pref-card-border #results-summary-bar,
body.light-theme.pref-card-border .rfd-actions-panel,
body.light-theme.pref-card-border .rfd-actions-panel .rfd-dock-header,
body.light-theme.pref-card-border .rfd-support-strip,
body.light-theme.pref-card-border #results-support-wrap .md\:w-48,
body.light-theme.pref-card-border #results-support-wrap .flex-1.rounded-xl,
body.light-theme.pref-card-border .support-donors-col,
body.light-theme.pref-card-border .rfd-support-strip .support-tick,
body.light-theme.pref-card-border .rfd-support-strip .support-progress-track {
  border-color: rgba(95, 122, 155, 0.16) !important;
}

body.pref-card-shadow #flights-table tbody tr.flight-row {
  filter: drop-shadow(0 14px 30px rgba(5, 14, 30, 0.18));
}

body.light-theme.pref-card-shadow #flights-table tbody tr.flight-row {
  filter: drop-shadow(0 12px 24px rgba(191, 212, 239, 0.52));
}

body.pref-card-shadow #flights-table tbody tr.flight-row td {
  border-top-color: transparent !important;
  border-bottom-color: transparent !important;
}

body.pref-card-shadow #flights-table tbody tr.flight-row td:first-child {
  border-left-color: transparent !important;
}

body.pref-card-shadow #flights-table tbody tr.flight-row td:last-child {
  border-right-color: transparent !important;
}

body.light-theme.pref-card-shadow #flights-table tbody tr.flight-row td {
  border-top-color: rgba(95, 122, 155, 0.05) !important;
  border-bottom-color: rgba(95, 122, 155, 0.05) !important;
}

body.light-theme.pref-card-shadow #flights-table tbody tr.flight-row td:first-child {
  border-left-color: rgba(95, 122, 155, 0.05) !important;
}

body.light-theme.pref-card-shadow #flights-table tbody tr.flight-row td:last-child {
  border-right-color: rgba(95, 122, 155, 0.05) !important;
}

body.pref-card-border #flights-table tbody tr.flight-row {
  filter: none !important;
}

body.pref-card-border #flights-table tbody tr.flight-row td {
  box-shadow: none !important;
  border-top-color: rgba(121, 145, 173, 0.18) !important;
  border-bottom-color: rgba(121, 145, 173, 0.18) !important;
}

body.pref-card-border #flights-table tbody tr.flight-row td:first-child {
  border-left-color: rgba(121, 145, 173, 0.18) !important;
}

body.pref-card-border #flights-table tbody tr.flight-row td:last-child {
  border-right-color: rgba(121, 145, 173, 0.18) !important;
}

body.light-theme.pref-card-border #flights-table tbody tr.flight-row {
  filter: none !important;
}

body.light-theme.pref-card-border #flights-table tbody tr.flight-row td {
  border-top-color: rgba(95, 122, 155, 0.18) !important;
  border-bottom-color: rgba(95, 122, 155, 0.18) !important;
}

body.light-theme.pref-card-border #flights-table tbody tr.flight-row td:first-child {
  border-left-color: rgba(95, 122, 155, 0.18) !important;
}

body.light-theme.pref-card-border #flights-table tbody tr.flight-row td:last-child {
  border-right-color: rgba(95, 122, 155, 0.18) !important;
}

@media (max-width: 1023px) {

  #builder-settings-fab,
  #builder-settings-panel {
    display: none !important;
  }
}

.nav-item {
  position: relative;
  min-height: 2.45rem;
  padding-left: 1rem !important;
  padding-right: 1rem !important;
  border: 1px solid transparent !important;
  color: rgba(226, 232, 240, 0.88) !important;
  background: transparent !important;
  box-shadow: none !important;
}

.nav-item:hover {
  color: color-mix(in srgb, var(--accent) 84%, #ffffff) !important;
  background: color-mix(in srgb, var(--accent) 12%, rgba(255, 255, 255, 0.02)) !important;
  border-color: color-mix(in srgb, var(--accent) 30%, rgba(255, 255, 255, 0.08)) !important;
}

.nav-item.active {
  background: linear-gradient(135deg, color-mix(in srgb, var(--accent) 16%, rgba(255, 255, 255, 0.02)), color-mix(in srgb, var(--brand) 10%, rgba(255, 255, 255, 0.02))) !important;
  color: #eef8ff !important;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, rgba(255, 255, 255, 0.1)) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05), 0 8px 18px rgba(7, 16, 29, 0.16) !important;
}

.nav-item.active i {
  color: var(--accent) !important;
}

#header-modes-nav {
  padding: 0.34rem !important;
  gap: 0.18rem !important;
  border-radius: 1rem !important;
  background: rgba(255, 255, 255, 0.04) !important;
  border-color: rgba(121, 145, 173, 0.16) !important;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04), inset 0 -1px 0 rgba(8, 18, 35, 0.25) !important;
}

.rfd-links-menu>summary {
  list-style: none;
}

.rfd-links-menu>summary::-webkit-details-marker {
  display: none;
}

.rfd-links-menu summary .rfd-links-chevron {
  transition: transform 0.18s ease;
}

.rfd-links-menu[open] summary .rfd-links-chevron {
  transform: rotate(180deg);
}

.rfd-links-item {
  display: flex;
  align-items: center;
  gap: 0.5rem;
  width: 100%;
  padding: 0.55rem 0.75rem;
  color: #fff !important;
  font-size: 0.75rem;
  font-weight: 700;
  transition: background-color 0.15s ease;
}

.rfd-links-item:hover {
  background-color: color-mix(in srgb, var(--accent) 16%, rgba(255, 255, 255, 0.02));
  color: color-mix(in srgb, var(--accent) 78%, #ffffff) !important;
}

.rfd-links-item-btn {
  width: 100%;
  text-align: left;
  border: 0;
  background: transparent;
  cursor: pointer;
  color: inherit;
}

.rfd-links-label {
  font-size: 0.78rem;
  font-weight: 700;
  line-height: 1.15rem;
  letter-spacing: 0.01em;
}

.rfd-links-section {
  padding: 0.65rem 0.75rem;
}

.rfd-links-section+.rfd-links-section {
  border-top: 1px solid rgba(255, 255, 255, 0.1);
}

.rfd-links-field-label {
  display: block;
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: rgba(124, 143, 172, 0.95);
  margin: 0.35rem 0 0.25rem;
}

.rfd-links-inline {
  display: flex;
  gap: 0.4rem;
  align-items: center;
}

.rfd-links-field {
  width: 100%;
  min-width: 0;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(17, 28, 45, 0.9);
  color: rgba(241, 245, 249, 0.98);
  border-radius: 0.55rem;
  padding: 0.42rem 0.55rem;
  font-size: 0.72rem;
  font-weight: 700;
}

.rfd-links-go {
  border: 1px solid rgba(56, 189, 248, 0.42);
  background: rgba(14, 116, 144, 0.26);
  color: #e0f2fe;
  border-radius: 0.55rem;
  padding: 0.4rem 0.6rem;
  font-size: 0.7rem;
  font-weight: 800;
  white-space: nowrap;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease;
}

.rfd-links-go:hover {
  background: rgba(14, 116, 144, 0.42);
  border-color: rgba(56, 189, 248, 0.72);
}

.header-actions-status {
  min-width: 0;
  padding-left: 0.35rem;
}

#data-status-text {
  max-width: 13.5rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.rfd-links-menu>div,
#lang-menu {
  background: rgba(13, 22, 38, 0.95);
  backdrop-filter: blur(8px);
  -webkit-backdrop-filter: blur(8px);
  border-color: rgba(255, 255, 255, 0.16);
}

.btn-shop-style {
  background: linear-gradient(135deg, #6366f1, #4338ca);
  border-color: rgba(93, 135, 255, 0.6);
  box-shadow: 0 8px 20px rgba(93, 135, 255, 0.35), inset 0 1px 0 rgba(255, 255, 255, 0.18);
  color: #fff;
  position: relative;
  overflow: hidden;
  isolation: isolate;
}

.btn-shop-style:hover {
  background: linear-gradient(135deg, #818cf8, #4f46e5);
  transform: translateY(-1px);
}

.btn-shop-style:active {
  transform: translateY(0);
}

.btn-shop-style::before {
  content: "";
  position: absolute;
  top: -130%;
  left: -45%;
  width: 40%;
  height: 320%;
  background: linear-gradient(90deg, rgba(255, 255, 255, 0), rgba(255, 255, 255, 0.38), rgba(255, 255, 255, 0));
  transform: rotate(22deg) translateX(-260%);
  pointer-events: none;
  animation: shop-shine 5.5s ease-in-out infinite;
  z-index: 0;
}

.btn-shop-style>* {
  position: relative;
  z-index: 1;
}

@keyframes shop-shine {

  0%,
  72% {
    transform: rotate(22deg) translateX(-260%);
  }

  100% {
    transform: rotate(22deg) translateX(420%);
  }
}

/* Leaflet */
#map-detail-view {
  padding: 1rem;
  background: transparent !important;
}

#map-detail-view > .h-14,
#map-detail-view > .flex-1 {
  border: 1px solid rgba(121, 145, 173, 0.14);
}

#map-detail-view > .h-14 {
  background: rgba(13, 22, 38, 0.82) !important;
  border-bottom: none;
  border-radius: 1.5rem 1.5rem 0 0;
  margin: 0 auto;
  width: min(100%, calc(100vw - 2rem));
}

#map-detail-view > .flex-1 {
  background: #0f1b2d !important;
  border-top: none;
  border-radius: 0 0 1.5rem 1.5rem;
  overflow: hidden;
  margin: 0 auto;
  width: min(100%, calc(100vw - 2rem));
}

body.pref-card-shadow #map-detail-view > .h-14,
body.pref-card-shadow #map-detail-view > .flex-1 {
  box-shadow: 0 22px 48px rgba(5, 14, 30, 0.24) !important;
  border-color: transparent !important;
}

body.pref-card-border #map-detail-view > .h-14,
body.pref-card-border #map-detail-view > .flex-1 {
  box-shadow: none !important;
  border-color: rgba(121, 145, 173, 0.18) !important;
}

body.light-theme #map-detail-view {
  background: transparent !important;
}

body.light-theme #map-detail-view > .h-14 {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
}

body.light-theme #map-detail-view > .flex-1 {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
}

body.light-theme.pref-card-shadow #map-detail-view > .h-14,
body.light-theme.pref-card-shadow #map-detail-view > .flex-1 {
  box-shadow: 0 16px 34px rgba(191, 212, 239, 0.34) !important;
  border-color: rgba(95, 122, 155, 0.06) !important;
}

body.light-theme.pref-card-border #map-detail-view > .h-14,
body.light-theme.pref-card-border #map-detail-view > .flex-1 {
  box-shadow: none !important;
  border-color: rgba(95, 122, 155, 0.16) !important;
}

#leafletMap {
  height: 100%;
  width: 100%;
  z-index: 10;
}

.leaflet-container {
  background: #0b1220;
}

.leaflet-control-layers,
.leaflet-bar {
  border-radius: 14px;
  overflow: hidden;
}

.leaflet-control-attribution {
  background: rgba(13, 22, 38, 0.55);
  color: #7c8fac;
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 10px;
  margin: 0 10px 10px 0;
  padding: 2px 8px;
}

/* Custom dropdown */
.custom-dropdown-list {
  position: absolute;
  top: 100%;
  left: 0;
  width: 100%;
  max-height: 260px;
  overflow-y: auto;
  background-color: #0b1220;
  border: 1px solid rgba(124, 143, 172, 0.22);
  border-radius: 0.75rem;
  z-index: 70;
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.55);
  margin-top: 0.4rem;
  display: none;
}

.custom-dropdown-list.show {
  display: block;
  animation: fadeIn 0.18s ease-out;
}

.custom-option {
  padding: 0.75rem 1.25rem;
  cursor: pointer;
  color: var(--text);
  font-size: 0.85rem;
  border-bottom: 1px solid var(--border-soft);
  transition: all 0.15s ease;
}

.custom-option:last-child {
  border-bottom: none;
}

.custom-option:hover {
  background-color: color-mix(in srgb, var(--accent) 22%, #0b1220);
  color: #ffffff;
}

.infinite-spinner {
  border-top: 1px solid var(--border-soft);
  color: var(--accent);
}

/* Filter tooltip (exact search hint) */
.rfd-tip {
  position: relative;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-grid;
  place-items: center;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  color: rgba(124, 143, 172, 0.95);
  cursor: help;
  flex: 0 0 auto;
}

.rfd-tip:hover {
  color: white;
  border-color: rgba(93, 135, 255, 0.35);
  background: rgba(93, 135, 255, 0.16);
}

.rfd-tip:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(93, 135, 255, 0.25);
}

.rfd-tooltip {
  position: absolute;
  right: 0;
  top: calc(100% + 10px);
  width: 280px;
  max-width: calc(100vw - 1.5rem);
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(13, 22, 38, 0.92);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 35px rgba(0, 0, 0, 0.55);
  color: rgba(226, 232, 240, 0.98);
  font-size: 12px;
  line-height: 1.25rem;
  opacity: 0;
  transform: translateY(-4px);
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
  z-index: 90;
}

.rfd-tooltip::before {
  content: "";
  position: absolute;
  right: 12px;
  top: -6px;
  width: 10px;
  height: 10px;
  transform: rotate(45deg);
  background: rgba(13, 22, 38, 0.92);
  border-left: 1px solid rgba(255, 255, 255, 0.10);
  border-top: 1px solid rgba(255, 255, 255, 0.10);
}

.rfd-tip:hover .rfd-tooltip,
.rfd-tip:focus .rfd-tooltip {
  opacity: 1;
  transform: translateY(0);
}

/* DB source tag (tooltip au survol de la compagnie) */
.db-src-tag {
  position: relative;
  display: inline-flex;
  align-items: center;
  font-size: 9px;
  color: rgba(100, 116, 139, 0.55);
  cursor: help;
  flex-shrink: 0;
  transition: color .12s ease;
}

.db-src-tag:hover {
  color: rgba(96, 165, 250, 0.85);
}

.db-src-tt {
  position: absolute;
  left: 0;
  top: calc(100% + 6px);
  white-space: nowrap;
  min-width: 160px;
  max-width: 300px;
  padding: 7px 11px;
  border-radius: 10px;
  background: rgba(13, 22, 38, 0.97);
  border: 1px solid rgba(255, 255, 255, 0.12);
  box-shadow: 0 10px 28px rgba(0, 0, 0, 0.65);
  color: rgba(226, 232, 240, 0.98);
  font-size: 11px;
  font-weight: 400;
  line-height: 1.45;
  opacity: 0;
  pointer-events: none;
  transition: opacity .14s ease, transform .14s ease;
  transform: translateY(-3px);
  z-index: 120;
}

.db-src-tag:hover .db-src-tt {
  opacity: 1;
  transform: translateY(0);
}

/* ICAO badge — curseur indiquant le double-clic */
.badge-dep,
.badge-arr {
  cursor: pointer;
}

.badge-dep:hover,
.badge-arr:hover {
  filter: brightness(1.2);
}

/* Reduce layout shift when opening overlay */
.no-scroll {
  overflow: hidden;
}

/* --- Header logo slot (top-left) --- */
.app-logo-slot {
  width: 2.75rem;
  height: 2.75rem;
  display: grid;
  place-items: center;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  overflow: hidden;
}

.app-logo-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  padding: 0.25rem;
  filter: drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55));
}

/* ===== Results table (modern) ===== */
#flights-table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0 12px;
  /* Increased vertical spacing */
}

#table-results-view #results-list-scroll {
  overflow-x: hidden;
}

@media (min-width: 641px) {
  #table-results-view #flights-table {
    width: 100%;
    min-width: 0 !important;
    table-layout: fixed;
  }

  #table-results-view #flights-table thead th,
  #table-results-view #flights-table tbody td {
    min-width: 0;
  }

  #table-results-view #flights-table thead th:nth-child(1),
  #table-results-view #flights-table tbody td.col-logo {
    width: 7%;
  }

  #table-results-view #flights-table thead th:nth-child(2),
  #table-results-view #flights-table tbody td.col-company {
    width: 25%;
  }

  #table-results-view #flights-table thead th:nth-child(3),
  #table-results-view #flights-table thead th:nth-child(4),
  #table-results-view #flights-table tbody td.col-dep,
  #table-results-view #flights-table tbody td.col-arr {
    width: 9%;
  }

  #table-results-view #flights-table thead th:nth-child(5),
  #table-results-view #flights-table tbody td.col-aircraft {
    width: 16%;
  }

  #table-results-view #flights-table thead th:nth-child(6),
  #table-results-view #flights-table thead th:nth-child(7),
  #table-results-view #flights-table tbody td.col-time,
  #table-results-view #flights-table tbody td.col-duration {
    width: 7%;
  }

  #table-results-view #flights-table thead th:nth-child(8),
  #table-results-view #flights-table tbody td.col-flightno {
    width: 8%;
  }

  #table-results-view #flights-table thead th:nth-child(9),
  #table-results-view #flights-table tbody td.col-callsign {
    width: 9%;
  }

  #table-results-view #flights-table thead th:nth-child(10),
  #table-results-view #flights-table tbody td.col-days {
    width: 7%;
  }

  #table-results-view #flights-table .col-company,
  #table-results-view #flights-table .col-aircraft,
  #table-results-view #flights-table .col-flightno,
  #table-results-view #flights-table .col-callsign,
  #table-results-view #flights-table .col-days {
    overflow: hidden;
  }

  #table-results-view #flights-table .company-short,
  #table-results-view #flights-table .company-long,
  #table-results-view #flights-table .airport-name,
  #table-results-view #flights-table .aircraft-reg,
  #table-results-view #flights-table .col-flightno span,
  #table-results-view #flights-table .col-callsign span,
  #table-results-view #flights-table .col-days .badge {
    display: block;
    max-width: 100%;
    overflow: visible;
    text-overflow: clip;
    white-space: normal;
  }

  #table-results-view #flights-table .col-company>div,
  #table-results-view #flights-table .col-aircraft>div {
    min-width: 0;
  }

  #table-results-view #flights-table .badge {
    max-width: 100%;
    white-space: normal;
  }

  #table-results-view #flights-table .airport-name {
    max-width: 100% !important;
  }

  #table-results-view #flights-table .company-short,
  #table-results-view #flights-table .company-long,
  #table-results-view #flights-table .airport-name,
  #table-results-view #flights-table .aircraft-reg,
  #table-results-view #flights-table .col-flightno span,
  #table-results-view #flights-table .col-callsign span {
    overflow-wrap: anywhere;
    word-break: break-word;
  }

  #table-results-view #flights-table .col-callsign,
  #table-results-view #flights-table .col-flightno,
  #table-results-view #flights-table .col-days {
    white-space: normal;
  }

  #table-results-view #flights-table .col-days {
    text-align: right;
    padding-right: 1.2rem !important;
  }

  #table-results-view #flights-table .col-days .badge {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: auto;
    min-width: 4.75rem;
    max-width: 100%;
    padding: 0.24rem 0.6rem;
    margin-left: auto;
    margin-right: 0;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: clip;
    border-color: rgba(124, 143, 172, 0.22);
    background: rgba(255, 255, 255, 0.04);
  }

  #table-results-view #flights-table .table-meta-card {
    display: flex;
    flex-direction: column;
    align-items: flex-start;
    gap: 0.16rem;
    padding: 0;
    border-radius: 0;
    background: transparent;
    border: 0;
    box-shadow: none;
  }

  #table-results-view #flights-table .table-meta-card--compact {
    gap: 0.12rem;
  }

  #table-results-view #flights-table .table-meta-card--day {
    background: transparent;
    border-color: transparent;
    box-shadow: none;
    padding: 0;
    gap: 0.14rem;
    align-items: flex-end;
  }

  #table-results-view #flights-table .table-meta-label {
    font-size: 8px;
    line-height: 1;
    letter-spacing: 0.11em;
    text-transform: uppercase;
    color: rgba(148, 163, 184, 0.65);
    font-weight: 800;
  }

  #table-results-view #flights-table .table-meta-label {
    display: none;
  }

  #table-results-view #flights-table .table-meta-value {
    display: block;
    width: 100%;
    font-size: 1rem;
    line-height: 1.18;
    letter-spacing: 0;
    color: #f8fbff;
  }

  #table-results-view #flights-table .col-company .company-short {
    font-size: 1.08rem;
    line-height: 1.18;
    letter-spacing: -0.015em;
    color: #ffffff;
  }

  #table-results-view #flights-table .col-company .company-long {
    margin-top: 0.28rem;
    line-height: 1.4;
    color: rgba(214, 224, 237, 0.9);
  }

  #table-results-view #flights-table .col-aircraft>div:first-child {
    font-size: 1.02rem;
    line-height: 1.24;
    color: #f8fbff;
  }

  #table-results-view #flights-table .aircraft-reg,
  #table-results-view #flights-table .duration-dist,
  #table-results-view #flights-table .duration-diff,
  #table-results-view #flights-table .airport-name {
    line-height: 1.35;
    color: rgba(191, 205, 222, 0.82);
  }

  #table-results-view #flights-table .col-time,
  #table-results-view #flights-table .col-duration,
  #table-results-view #flights-table .col-flightno,
  #table-results-view #flights-table .col-callsign {
    text-align: left;
  }

  #table-results-view #flights-table .col-time .badge,
  #table-results-view #flights-table .col-duration .badge {
    padding: 0.12rem 0;
    border: 0;
    background: transparent;
    box-shadow: none;
    color: #f8fbff;
    justify-content: flex-start;
    font-size: 0.98rem;
    font-weight: 800;
    gap: 0.35rem;
  }

  #table-results-view #flights-table .col-time .badge i,
  #table-results-view #flights-table .col-duration .badge i {
    color: rgba(148, 163, 184, 0.82) !important;
  }

  #table-results-view #flights-table .col-flightno .table-meta-value,
  #table-results-view #flights-table .col-callsign .table-meta-value {
    font-size: 1rem;
    font-weight: 700;
  }

  #table-results-view #flights-table .col-callsign .table-meta-value {
    color: rgba(232, 240, 250, 0.96);
  }

  #table-results-view #flights-table .col-dep .badge,
  #table-results-view #flights-table .col-arr .badge {
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.07), 0 8px 18px rgba(0, 0, 0, 0.12);
  }
}

#flights-table thead th {
  position: sticky;
  top: 0;
  z-index: 20;
  background: #132137;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
  border-bottom: 1px solid rgba(121, 145, 173, 0.22);
  color: #b7c7e4;
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  font-weight: 800;
  padding: 14px;
}

#flights-table thead th:first-child {
  box-shadow: none;
}

#flights-table tbody tr.flight-row td {
  background: #132137;
  border-top: 1px solid rgba(121, 145, 173, 0.14);
  border-bottom: 1px solid rgba(121, 145, 173, 0.14);
  padding: 16px 14px;
  /* More breathable */
  transition: all 0.2s cubic-bezier(0.4, 0, 0.2, 1);
}

#flights-table tbody tr.flight-row td:first-child {
  border-left: 1px solid rgba(121, 145, 173, 0.14);
  border-top-left-radius: var(--radius-card);
  border-bottom-left-radius: var(--radius-card);
  box-shadow: none;
}

#flights-table tbody tr.flight-row td:last-child {
  border-right: 1px solid rgba(121, 145, 173, 0.14);
  border-top-right-radius: var(--radius-card);
  border-bottom-right-radius: var(--radius-card);
  padding-right: 1.15rem;
}

#flights-table tbody tr.flight-row:hover td {
  background: #162842;
  border-color: rgba(121, 145, 173, 0.2) !important;
}

#flights-table tbody tr.flight-row.selected td {
  background: color-mix(in srgb, var(--accent) 16%, #132137);
  border-top-color: color-mix(in srgb, var(--accent) 72%, #ffffff) !important;
  border-bottom-color: color-mix(in srgb, var(--accent) 72%, #ffffff) !important;
  border-left-color: color-mix(in srgb, var(--accent) 72%, #ffffff) !important;
  border-right-color: color-mix(in srgb, var(--accent) 72%, #ffffff) !important;
  z-index: 10;
}

#flights-table tbody tr.flight-row.selected td:first-child {
  box-shadow: none;
}

/* Redesigning Badges for Premium Look */
.badge {
  background: rgba(38, 58, 89, 0.92);
  border: 1px solid rgba(121, 145, 173, 0.22);
  padding: 4px 10px;
  border-radius: var(--radius-pill);
  font-size: 12px;
  color: #d9e6fb;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: all 0.15s ease;
}

.badge-dep {
  border-color: rgba(88, 131, 202, 0.7);
  background: rgba(52, 79, 123, 0.96);
  color: #dbe9ff;
}

.badge-arr {
  border-color: rgba(181, 123, 121, 0.7);
  background: rgba(84, 61, 72, 0.96);
  color: #ffe0d9;
}

.airport-name {
  font-weight: 500;
  color: #8fa6ca;
  opacity: 1;
}

.logo-slot {
  width: 3.5rem;
  height: 3.5rem;
  background: #fff !important;
  border: 1px solid rgba(255, 255, 255, 0.15);
  border-radius: var(--radius-xl);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2px;
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.2);
  overflow: hidden;
  transition: transform 0.2s ease;
}

.logo-slot:hover {
  transform: scale(1.05);
}

.logo-slot img {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.logo-placeholder {
  color: #1a2744;
  font-weight: 800;
  font-size: 1.25rem;
  letter-spacing: -0.02em;
}

#table-results-view #flights-table .company-short,
#table-results-view #flights-table .col-aircraft>div:first-child,
#table-results-view #flights-table .table-meta-value {
  color: #f8fbff;
}

#table-results-view #flights-table .company-long,
#table-results-view #flights-table .aircraft-reg,
#table-results-view #flights-table .duration-dist,
#table-results-view #flights-table .duration-diff,
#table-results-view #flights-table .table-meta-label,
#table-results-view #flights-table .col-flightno span,
#table-results-view #flights-table .col-callsign span {
  color: #8fa6ca;
}

#table-results-view #results-list-scroll {
  background: #1a2d45;
}

#results-summary-bar {
  background: #132137 !important;
  border-top-color: rgba(121, 145, 173, 0.16) !important;
  margin-top: 0.9rem;
  margin-bottom: 1rem;
  border: 1px solid rgba(121, 145, 173, 0.16) !important;
  border-radius: 1.1rem !important;
  overflow: hidden;
  padding-left: 0.95rem;
  padding-right: 0.95rem;
  min-height: 3.25rem;
  flex: 0 0 auto;
}

#total-count {
  color: #8fc0ff !important;
}

#results-support-wrap {
  margin-top: auto;
  padding-left: 0 !important;
  padding-right: 0 !important;
}

#results-main-column {
  flex: 1 1 auto;
  min-height: 100%;
}

/* Drag-to-reorder */
.drag-handle {
  opacity: 0.25;
  cursor: grab;
  transition: opacity .15s, color .15s;
  color: #7c8fac;
  line-height: 1;
  font-size: 14px;
}

#flights-table tbody tr.flight-row:hover .drag-handle {
  opacity: 1;
  color: #8faaff;
}

.drag-handle:active {
  cursor: grabbing;
}

#flights-table tbody tr.flight-row.row-dragging {
  opacity: 0.35;
}

#flights-table tbody tr.flight-row.drag-over-top td {
  border-top: 2px solid #5D87FF !important;
  background: rgba(93, 135, 255, 0.10) !important;
}

#flights-table tbody tr.flight-row.drag-over-bottom td {
  border-bottom: 2px solid #5D87FF !important;
  background: rgba(93, 135, 255, 0.10) !important;
}

/* badges */
.badge {
  display: inline-flex;
  align-items: center;
  gap: .45rem;
  padding: .35rem .6rem;
  border-radius: 999px;
  border: 1px solid var(--border-soft);
  background: rgba(13, 22, 38, 0.55);
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 12px;
  color: rgba(226, 232, 240, 0.95);
}

.badge-muted {
  background: rgba(255, 255, 255, 0.05);
  color: rgba(203, 213, 225, 0.98);
}

.badge-muted i {
  color: rgba(226, 232, 240, 0.92);
}

.badge-dep {
  border-color: rgba(93, 135, 255, 0.40);
  background: rgba(93, 135, 255, 0.12);
}

.badge-arr {
  border-color: rgba(250, 137, 107, 0.40);
  background: rgba(250, 137, 107, 0.12);
}

/* Pills ICAO */
.code-pill {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 56px;
  padding: 0.25rem 0.6rem;
  border-radius: 0.8rem;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace;
  font-weight: 700;
  font-size: 0.85rem;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(13, 22, 38, 0.35);
}

.code-pill.dep {
  color: #c5d5ff;
  box-shadow: inset 0 0 0 999px rgba(93, 135, 255, 0.12);
}

.code-pill.arr {
  color: #ffd0bb;
  box-shadow: inset 0 0 0 999px rgba(250, 137, 107, 0.12);
}

/* Logo slot in table */
.logo-slot {
  width: 4.25rem;
  height: 4.25rem;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 255, 255, 0.10);
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 1rem;
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.35);
  padding: 0.08rem;
  margin-left: auto;
  margin-right: auto;
}

.logo-slot img {
  max-width: 100%;
  max-height: 100%;
  width: auto;
  height: auto;
  object-fit: contain;
  filter:
    drop-shadow(0 1px 2px rgba(0, 0, 0, 0.55)) drop-shadow(0 0 2px rgba(255, 255, 255, 0.20));
}

.logo-slot .logo-placeholder {
  width: 100%;
  height: 100%;
  border: none;
  background: transparent;
  border-radius: 1rem;
  font-size: 0.85rem;
}

/* Logo picker: hint overlay on double-click (admin) */
.logo-slot {
  position: relative;
  cursor: zoom-in;
}

.logo-slot::after {
  content: '\f044';
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  font-size: 0.85rem;
  color: #fff;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(30, 64, 175, 0.75);
  border-radius: 1rem;
  opacity: 0;
  transition: opacity 0.15s ease;
  pointer-events: none;
}

.logo-slot:hover::after {
  opacity: 1;
}

.logo-placeholder {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 2.5rem;
  height: 2.5rem;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid rgba(255, 255, 255, 0.06);
  border-radius: 0.75rem;
  font-weight: 800;
  color: #7c8fac;
  font-size: 0.75rem;
}

/* --- Range (slider) --- */
.rfd-range {
  -webkit-appearance: none;
  appearance: none;
  width: 100%;
  height: 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .10);
  outline: none;
}

.rfd-range:focus {
  box-shadow: 0 0 0 3px rgba(93, 135, 255, .25);
}

.rfd-range::-webkit-slider-thumb {
  -webkit-appearance: none;
  appearance: none;
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .20);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
  cursor: pointer;
}

.rfd-range::-moz-range-thumb {
  width: 18px;
  height: 18px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .92);
  border: 1px solid rgba(255, 255, 255, .20);
  box-shadow: 0 10px 24px rgba(0, 0, 0, .45);
  cursor: pointer;
}

.rfd-range::-moz-range-track {
  height: 10px;
  border-radius: 9999px;
  background: rgba(255, 255, 255, .10);
  border: 1px solid rgba(255, 255, 255, .10);
}

/* Select */
.rfd-select {
  -webkit-appearance: none;
  -moz-appearance: none;
  appearance: none;
  width: 100%;
  padding: 10px 44px 10px 14px;
  border-radius: 16px;
  border: 1px solid rgba(255, 255, 255, .12);
  background: rgba(8, 12, 24, .65);
  color: rgba(255, 255, 255, .92);
  outline: none;
  backdrop-filter: blur(10px);
  box-shadow: 0 10px 30px rgba(0, 0, 0, .35);
  color-scheme: dark;
}

.rfd-select:hover {
  border-color: rgba(255, 255, 255, .20);
}

.rfd-select:focus {
  border-color: rgba(93, 135, 255, .65);
  box-shadow: 0 0 0 3px rgba(93, 135, 255, .20), 0 10px 30px rgba(0, 0, 0, .35);
}

.rfd-select option {
  background-color: rgba(10, 16, 32, 1);
  color: rgba(255, 255, 255, .92);
}

.rfd-select option:hover,
.rfd-select option:checked {
  background-color: rgba(93, 135, 255, .25);
  color: rgba(255, 255, 255, .98);
}

.rfd-select::-ms-expand {
  display: none;
}

/* Panneau déroulant dark + lignes + scroll */
.rfd-dd-menu {
  background: rgba(10, 16, 32, .82);
  border: 1px solid rgba(255, 255, 255, .10);
  border-radius: 16px;
  backdrop-filter: blur(14px);
  box-shadow: 0 18px 60px rgba(0, 0, 0, .55);
  overflow: auto;
  max-height: 320px;
}

.rfd-dd-menu.rfd-dd-portal {
  position: fixed;
  z-index: 99999 !important;
}

.rfd-dd-item {
  width: 100%;
  text-align: left;
  padding: 12px 16px;
  font-size: 13px;
  line-height: 1.2;
  color: rgba(255, 255, 255, .92);
  background: transparent;
  border: 0;
  cursor: pointer;
}

.rfd-dd-item+.rfd-dd-item {
  border-top: 1px solid rgba(255, 255, 255, .06);
}

.rfd-dd-item:hover {
  background: color-mix(in srgb, var(--accent) 16%, rgba(255, 255, 255, .02));
  color: #ffffff;
}

.rfd-dd-item[aria-selected="true"] {
  background: color-mix(in srgb, var(--accent) 28%, rgba(255, 255, 255, .04));
  color: color-mix(in srgb, var(--accent) 86%, #ffffff);
}

.rfd-dd-menu::-webkit-scrollbar {
  width: 10px;
}

.rfd-dd-menu::-webkit-scrollbar-track {
  background: transparent;
}

.rfd-dd-menu::-webkit-scrollbar-thumb {
  background: rgba(255, 255, 255, .16);
  border-radius: 999px;
  border: 2px solid rgba(10, 16, 32, .82);
}

.rfd-dd-menu::-webkit-scrollbar-thumb:hover {
  background: rgba(255, 255, 255, .22);
}

/* ===== Global Loader ===== */
body.busy-scroll {
  overflow: hidden;
}

html.busy * {
  cursor: progress !important;
}

#global-loader {
  pointer-events: auto;
}

#global-loader .rfd-loader-backdrop {
  background:
    radial-gradient(1200px 800px at 20% 20%, rgba(93, 135, 255, .20), transparent 60%),
    radial-gradient(1000px 700px at 80% 80%, rgba(6, 182, 212, .16), transparent 62%),
    rgba(13, 22, 38, .74);
  backdrop-filter: blur(16px) saturate(120%);
}

.rfd-loader-orb {
  position: absolute;
  width: 34vmin;
  height: 34vmin;
  border-radius: 9999px;
  filter: blur(38px);
  opacity: .45;
  pointer-events: none;
  animation: rfdOrbFloat 5.2s ease-in-out infinite alternate;
}

.rfd-loader-orb.orb-a {
  top: 8%;
  left: 8%;
  background: rgba(93, 135, 255, .50);
}

/* ===== App modals / popups ===== */
#fav-modal,
#logo-picker-modal,
#api-key-modal,
#briefing-modal,
#announcement-modal,
#presets-modal,
#login-modal,
#dbs-modal,
#popup-changelog,
#popup-shop {
  background: color-mix(in srgb, #000000 56%, transparent) !important;
  backdrop-filter: blur(10px);
  -webkit-backdrop-filter: blur(10px);
}

#fav-modal > div:first-child,
#logo-picker-modal > div:first-child,
#api-key-modal > div:first-child,
#briefing-modal > div:first-child,
#announcement-modal > div:first-child,
#presets-modal > div:first-child,
#login-modal > div:first-child,
#dbs-modal > div:first-child,
#popup-changelog > div:first-child,
#popup-shop > div:first-child {
  background: linear-gradient(180deg, rgba(23, 35, 56, 0.98), rgba(14, 24, 40, 0.98)) !important;
  border: 1px solid rgba(121, 145, 173, 0.18) !important;
  box-shadow: 0 28px 72px rgba(4, 10, 22, 0.48), inset 0 1px 0 rgba(255, 255, 255, 0.04) !important;
}

#fav-modal h2,
#logo-picker-modal h2,
#api-key-modal h2,
#briefing-modal h2,
#announcement-modal h2,
#presets-modal h2,
#login-modal h2,
#dbs-modal h2,
#popup-changelog-title,
#popup-shop-title {
  color: #f4f8ff !important;
}

#fav-modal p,
#logo-picker-modal p,
#api-key-modal .text-xs,
#briefing-modal p,
#announcement-modal p,
#presets-modal p,
#login-modal p,
#dbs-modal p,
#popup-changelog-date,
#popup-shop-subtitle {
  color: #8ea3bf !important;
}

#fav-modal input,
#logo-picker-modal input,
#api-key-modal input,
#api-key-modal textarea,
#api-key-modal select,
#briefing-modal textarea,
#announcement-modal textarea,
#presets-modal input,
#login-modal input,
#dbs-modal input[type="text"],
#dbs-modal input[type="email"],
#dbs-modal input[type="password"] {
  background: rgba(10, 16, 32, 0.72) !important;
  border-color: rgba(121, 145, 173, 0.18) !important;
  color: #f4f8ff !important;
  box-shadow: none !important;
}

#fav-modal input::placeholder,
#logo-picker-modal input::placeholder,
#api-key-modal input::placeholder,
#api-key-modal textarea::placeholder,
#briefing-modal textarea::placeholder,
#announcement-modal textarea::placeholder,
#presets-modal input::placeholder,
#login-modal input::placeholder {
  color: #8093ad !important;
}

#fav-modal button.bg-blue-600,
#logo-picker-modal button.bg-blue-600,
#api-key-modal button.bg-blue-600,
#briefing-modal button.bg-blue-600,
#announcement-modal button.bg-blue-600,
#presets-modal button.bg-blue-600,
#dbs-modal button.bg-blue-600,
#popup-changelog #btn-close-popup-changelog {
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 88%, #ffffff),
      color-mix(in srgb, var(--brand) 72%, var(--accent))) !important;
  border-color: color-mix(in srgb, var(--accent) 34%, rgba(255, 255, 255, 0.16)) !important;
  color: #ffffff !important;
}

#fav-modal button.bg-blue-600:hover,
#logo-picker-modal button.bg-blue-600:hover,
#api-key-modal button.bg-blue-600:hover,
#briefing-modal button.bg-blue-600:hover,
#announcement-modal button.bg-blue-600:hover,
#presets-modal button.bg-blue-600:hover,
#dbs-modal button.bg-blue-600:hover,
#popup-changelog #btn-close-popup-changelog:hover {
  filter: brightness(1.04);
}

#fav-modal .bg-white\/5,
#logo-picker-modal .bg-white\/5,
#api-key-modal .bg-white\/5,
#briefing-modal .bg-white\/5,
#announcement-modal .bg-white\/5,
#presets-modal .bg-white\/5,
#login-modal .bg-white\/5,
#dbs-modal .bg-white\/5,
#popup-shop .bg-white\/5 {
  background: rgba(255, 255, 255, 0.05) !important;
  border-color: rgba(121, 145, 173, 0.18) !important;
  color: #f4f8ff !important;
}

#fav-modal .bg-white\/5:hover,
#logo-picker-modal .bg-white\/5:hover,
#api-key-modal .bg-white\/5:hover,
#briefing-modal .bg-white\/5:hover,
#announcement-modal .bg-white\/5:hover,
#presets-modal .bg-white\/5:hover,
#login-modal .bg-white\/5:hover,
#dbs-modal .bg-white\/5:hover,
#popup-shop .bg-white\/5:hover {
  background: color-mix(in srgb, var(--accent) 12%, rgba(255, 255, 255, 0.03)) !important;
  border-color: color-mix(in srgb, var(--accent) 26%, rgba(121, 145, 173, 0.18)) !important;
}

#api-key-modal .rfd-dd-menu,
#api-key-modal .rfd-dd-item,
#dbs-modal .rfd-dd-menu,
#dbs-modal .rfd-dd-item {
  color-scheme: dark;
}

body.light-theme #fav-modal,
body.light-theme #logo-picker-modal,
body.light-theme #api-key-modal,
body.light-theme #briefing-modal,
body.light-theme #announcement-modal,
body.light-theme #presets-modal,
body.light-theme #login-modal,
body.light-theme #dbs-modal,
body.light-theme #popup-changelog,
body.light-theme #popup-shop {
  background: color-mix(in srgb, #18263c 20%, rgba(255, 255, 255, 0.72)) !important;
}

body.light-theme #fav-modal > div:first-child,
body.light-theme #logo-picker-modal > div:first-child,
body.light-theme #api-key-modal > div:first-child,
body.light-theme #briefing-modal > div:first-child,
body.light-theme #announcement-modal > div:first-child,
body.light-theme #presets-modal > div:first-child,
body.light-theme #login-modal > div:first-child,
body.light-theme #dbs-modal > div:first-child,
body.light-theme #popup-changelog > div:first-child,
body.light-theme #popup-shop > div:first-child {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
  box-shadow: 0 24px 56px rgba(191, 212, 239, 0.34) !important;
}

body.light-theme #fav-modal h2,
body.light-theme #logo-picker-modal h2,
body.light-theme #api-key-modal h2,
body.light-theme #briefing-modal h2,
body.light-theme #announcement-modal h2,
body.light-theme #presets-modal h2,
body.light-theme #login-modal h2,
body.light-theme #dbs-modal h2,
body.light-theme #popup-changelog-title,
body.light-theme #popup-shop-title {
  color: #223149 !important;
}

body.light-theme #fav-modal p,
body.light-theme #logo-picker-modal p,
body.light-theme #api-key-modal .text-xs,
body.light-theme #briefing-modal p,
body.light-theme #announcement-modal p,
body.light-theme #presets-modal p,
body.light-theme #login-modal p,
body.light-theme #dbs-modal p,
body.light-theme #popup-changelog-date,
body.light-theme #popup-shop-subtitle {
  color: #7b8da7 !important;
}

body.light-theme #fav-modal input,
body.light-theme #logo-picker-modal input,
body.light-theme #api-key-modal input,
body.light-theme #api-key-modal textarea,
body.light-theme #api-key-modal select,
body.light-theme #briefing-modal textarea,
body.light-theme #announcement-modal textarea,
body.light-theme #presets-modal input,
body.light-theme #login-modal input,
body.light-theme #dbs-modal input[type="text"],
body.light-theme #dbs-modal input[type="email"],
body.light-theme #dbs-modal input[type="password"] {
  background: #f5f8fc !important;
  border-color: rgba(95, 122, 155, 0.16) !important;
  color: #223149 !important;
}

body.light-theme #fav-modal input::placeholder,
body.light-theme #logo-picker-modal input::placeholder,
body.light-theme #api-key-modal input::placeholder,
body.light-theme #api-key-modal textarea::placeholder,
body.light-theme #briefing-modal textarea::placeholder,
body.light-theme #announcement-modal textarea::placeholder,
body.light-theme #presets-modal input::placeholder,
body.light-theme #login-modal input::placeholder {
  color: #8ca0bb !important;
}

body.light-theme #fav-modal .bg-white\/5,
body.light-theme #logo-picker-modal .bg-white\/5,
body.light-theme #api-key-modal .bg-white\/5,
body.light-theme #briefing-modal .bg-white\/5,
body.light-theme #announcement-modal .bg-white\/5,
body.light-theme #presets-modal .bg-white\/5,
body.light-theme #login-modal .bg-white\/5,
body.light-theme #dbs-modal .bg-white\/5,
body.light-theme #popup-shop .bg-white\/5 {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.16) !important;
  color: #223149 !important;
}

body.light-theme #fav-modal .bg-white\/5:hover,
body.light-theme #logo-picker-modal .bg-white\/5:hover,
body.light-theme #api-key-modal .bg-white\/5:hover,
body.light-theme #briefing-modal .bg-white\/5:hover,
body.light-theme #announcement-modal .bg-white\/5:hover,
body.light-theme #presets-modal .bg-white\/5:hover,
body.light-theme #login-modal .bg-white\/5:hover,
body.light-theme #dbs-modal .bg-white\/5:hover,
body.light-theme #popup-shop .bg-white\/5:hover {
  background: color-mix(in srgb, var(--accent) 8%, #ffffff) !important;
}

body.light-theme #login-error {
  color: #d14343 !important;
  background: rgba(244, 102, 102, 0.08) !important;
  border-color: rgba(244, 102, 102, 0.18) !important;
}

.rfd-loader-orb.orb-b {
  right: 8%;
  bottom: 8%;
  background: rgba(20, 184, 166, .45);
  animation-delay: .7s;
}

.rfd-loader-panel {
  position: relative;
  overflow: hidden;
  display: flex;
  flex-direction: column;
  gap: 1rem;
  background: linear-gradient(180deg, rgba(17, 27, 45, 0.98), rgba(12, 21, 36, 0.96)) !important;
  border-color: rgba(118, 145, 181, 0.18) !important;
  box-shadow: 0 28px 70px rgba(2, 10, 24, 0.44), 0 0 0 1px rgba(255, 255, 255, 0.03) inset !important;
}

.rfd-loader-panel::before {
  content: '';
  position: absolute;
  inset: -1px;
  background: linear-gradient(120deg, rgba(255, 255, 255, .08), rgba(93, 135, 255, .15), rgba(255, 255, 255, .08));
  filter: blur(18px);
  opacity: .45;
  pointer-events: none;
}

.rfd-loader-head {
  display: grid;
  grid-template-columns: auto 1fr;
  align-items: center;
  gap: 1rem;
  text-align: left;
}

.rfd-loader-icon-shell {
  position: relative;
  width: 4.6rem;
  height: 4.6rem;
  display: grid;
  place-items: center;
  flex-shrink: 0;
}

.rfd-loader-mode-icon {
  position: absolute;
  inset: 0.72rem;
  display: grid;
  place-items: center;
  border-radius: 9999px;
  background: linear-gradient(180deg, rgba(93, 135, 255, 0.2), rgba(93, 135, 255, 0.08));
  color: #dbe8ff;
  font-size: 1.1rem;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.08);
}

.rfd-loader-copy {
  min-width: 0;
}

.rfd-loader-chip {
  display: inline-flex;
  align-items: center;
  min-height: 1.7rem;
  padding: 0.28rem 0.72rem;
  border-radius: 9999px;
  border: 1px solid rgba(118, 145, 181, 0.18);
  background: rgba(255,255,255,0.04);
  color: #9bb0d0;
  font-size: 0.7rem;
  font-weight: 900;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.rfd-loader-title {
  margin-top: 0.55rem;
  font-size: clamp(1.12rem, 1rem + 0.45vw, 1.45rem);
  line-height: 1.18;
}

.rfd-loader-subtitle {
  margin-top: 0.4rem;
  font-size: 0.94rem;
  line-height: 1.5;
  color: #9cb0cb;
}

.rfd-loader-stages {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
}

.rfd-loader-stage {
  display: flex;
  align-items: center;
  justify-content: center;
  min-height: 2.35rem;
  padding: 0.55rem 0.6rem;
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.045);
  border: 1px solid rgba(118, 145, 181, 0.14);
  color: #8da2c0;
  font-size: 0.73rem;
  font-weight: 800;
  text-align: center;
  line-height: 1.25;
  transition: all 180ms ease;
}

.rfd-loader-stage.is-active {
  background: color-mix(in srgb, var(--accent) 18%, rgba(255,255,255,0.04));
  border-color: color-mix(in srgb, var(--accent) 44%, rgba(118,145,181,0.14));
  color: #f3f7ff;
  box-shadow: 0 10px 24px color-mix(in srgb, var(--accent) 24%, transparent);
}

.rfd-loader-stage.is-done {
  color: #c5d7f3;
  border-color: rgba(120, 218, 173, 0.24);
  background: rgba(120, 218, 173, 0.08);
}

.rfd-loader-stage-note {
  color: #91a6c5;
  font-size: 0.83rem;
  line-height: 1.45;
  text-align: left;
}

.rfd-loader-preview {
  padding: 0.9rem 0.95rem;
  border-radius: 1.2rem;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(118, 145, 181, 0.12);
}

.rfd-loader-preview-row,
.rfd-loader-preview-grid span {
  position: relative;
  overflow: hidden;
  background: rgba(255, 255, 255, 0.08);
}

.rfd-loader-preview-row::after,
.rfd-loader-preview-grid span::after {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(90deg, transparent, rgba(255,255,255,0.28), transparent);
  transform: translateX(-130%);
  animation: rfdLoaderShimmer 1.35s ease-in-out infinite;
}

.rfd-loader-preview-row {
  height: 0.72rem;
  border-radius: 9999px;
}

.rfd-loader-preview-row.row-wide {
  width: 84%;
}

.rfd-loader-preview-row.row-mid {
  width: 62%;
  margin-top: 0.72rem;
}

.rfd-loader-preview-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 0.55rem;
  margin-top: 0.95rem;
}

.rfd-loader-preview-grid span {
  height: 2.6rem;
  border-radius: 0.9rem;
}

.rfd-loader-dots {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .4rem;
  margin-top: .7rem;
}

.rfd-loader-dot {
  width: 8px;
  height: 8px;
  border-radius: 9999px;
  background: rgba(124, 143, 172, .7);
  animation: rfdDotPulse 1.2s ease-in-out infinite;
}

.rfd-loader-dot:nth-child(2) {
  animation-delay: .18s;
}

.rfd-loader-dot:nth-child(3) {
  animation-delay: .36s;
}

.rfd-spinner {
  width: 4.35rem;
  height: 4.35rem;
  border-radius: 9999px;
  border: 4px solid rgba(255, 255, 255, .11);
  border-top-color: color-mix(in srgb, var(--accent) 88%, white);
  border-right-color: color-mix(in srgb, var(--accent) 36%, rgba(255,255,255,0.08));
  animation: rfdSpin .9s linear infinite;
  box-shadow: 0 18px 34px rgba(0, 0, 0, .22);
}

@keyframes rfdSpin {
  to {
    transform: rotate(360deg);
  }
}

/* Indeterminate progress bar */
.rfd-loader-progress-shell {
  height: 0.34rem;
  background: rgba(255,255,255,0.09);
  border-radius: 9999px;
  overflow: hidden;
}

.rfd-loader-panel[data-loader-mode="real"] {
  --accent: #3b82f6;
}

.rfd-loader-panel[data-loader-mode="non_real"] {
  --accent: #8b5cf6;
}

.rfd-loader-panel[data-loader-mode="ia"] {
  --accent: #10b981;
}

.rfd-loader-panel[data-loader-mode="live"] {
  --accent: #ff7a59;
}

.rfd-progress {
  height: 100%;
  width: 40%;
  border-radius: 9999px;
  background: linear-gradient(90deg, color-mix(in srgb, var(--accent) 72%, white), var(--accent), color-mix(in srgb, var(--accent) 72%, white));
  animation: rfdBar 1.1s ease-in-out infinite;
}

@keyframes rfdBar {
  0% {
    transform: translateX(-140%);
  }

  50% {
    transform: translateX(60%);
  }

  100% {
    transform: translateX(240%);
  }
}

@keyframes rfdOrbFloat {
  0% {
    transform: translate3d(0, 0, 0) scale(1);
  }

  100% {
    transform: translate3d(10px, -14px, 0) scale(1.08);
  }
}

@keyframes rfdDotPulse {

  0%,
  80%,
  100% {
    transform: scale(.7);
    opacity: .55;
  }

  40% {
    transform: scale(1.15);
    opacity: 1;
  }
}

/* =============================
   Responsive adjustments
   ============================= */
@media (max-width: 1024px) {
  :root {
    --rfd-mobile-header-offset: 4.5rem;
  }

  #app-header {
    position: sticky;
    top: 0;
    z-index: 120;
  }

  .app-logo-slot {
    width: 2.25rem;
    height: 2.25rem;
    border-radius: 0.85rem;
  }

  .glass-strong {
    backdrop-filter: blur(14px);
  }

  #table-results-view .overflow-y-auto {
    overflow: auto;
    -webkit-overflow-scrolling: touch;
  }

  #table-results-view #flights-table {
    min-width: 960px;
  }

  #results-toolbar {
    height: auto;
    min-height: 3rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    gap: 0.35rem;
    flex-wrap: wrap;
    align-items: center;
  }

  #results-toolbar>button[data-action="exit-results"] {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 11px;
    letter-spacing: 0.02em;
  }

  #results-toolbar-actions {
    width: 100%;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  #results-toolbar-actions>* {
    flex: 0 0 auto;
  }

  #results-mobile-actions {
    padding: 0.55rem;
    gap: 0.4rem;
    max-height: 18dvh;
    overflow-y: auto;
  }

  #results-mobile-actions[data-advanced-open="1"] {
    max-height: 38dvh;
  }

  #results-mobile-advanced {
    gap: 0.4rem;
  }

  #results-mobile-advanced.hidden {
    display: none !important;
  }

  #results-mobile-actions button {
    min-height: 2.05rem;
  }

  #results-support-wrap {
    padding-top: 0.25rem;
  }

  #results-support-content.hidden {
    display: none !important;
  }

  #results-support-wrap[data-support-open="1"] #results-support-content {
    display: block !important;
  }

  #results-support-wrap[data-support-open="1"] [data-mobile-support-chevron],
  #results-mobile-actions[data-advanced-open="1"] [data-mobile-advanced-chevron] {
    transform: rotate(180deg);
  }

  #table-results-view .support-donors-col {
    display: none;
  }

  #table-results-view .support-right-grid {
    grid-template-columns: 1fr;
  }

  #table-results-view .support-panes {
    min-height: 86px;
  }

  /* Sidebar as drawer on tablet + mobile */
  #builder-sidebar {
    position: fixed;
    top: var(--rfd-mobile-header-offset);
    bottom: 0;
    left: 0;
    height: calc(100dvh - var(--rfd-mobile-header-offset));
    width: 82vw;
    max-width: 320px;
    border-right: 1px solid rgba(255, 255, 255, 0.06);
    border-bottom: 0;
    transform: translateX(-105%);
    transition: transform 0.25s ease;
    z-index: 90;
  }

  body.sidebar-open #builder-sidebar {
    transform: translateX(0);
  }

  #sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0, 0, 0, 0.55);
    backdrop-filter: blur(2px);
    z-index: 80;
    display: none;
  }

  body.sidebar-open #sidebar-backdrop {
    display: block;
  }

  .no-scroll {
    overflow: hidden;
  }
}

@media (max-width: 900px) {
  :root {
    --rfd-mobile-header-offset: 6.6rem;
  }

  #app-header {
    height: auto !important;
    min-height: 4rem;
    padding-top: 0.6rem;
    padding-bottom: 0.5rem;
    flex-wrap: wrap;
    row-gap: 0.4rem;
    align-items: flex-start;
  }

  #header-brand {
    width: 100%;
    gap: 0.5rem;
    min-width: 0;
  }

  #header-brand .rfd-brand-chip,
  #header-brand .rfd-brand-subtitle {
    display: none;
  }

  #header-actions {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  #header-actions {
    scrollbar-width: none;
  }

  #header-actions::-webkit-scrollbar {
    height: 0;
  }

  #header-actions {
    -webkit-mask-image: linear-gradient(to right, transparent, black 14px, black calc(100% - 14px), transparent);
    mask-image: linear-gradient(to right, transparent, black 14px, black calc(100% - 14px), transparent);
  }

  #header-actions>* {
    flex: 0 0 auto;
  }

  #header-actions>button {
    min-width: 2.25rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }
}

/* Desktop/table non-card layout: keep only column headers, hide in-cell mobile labels */
@media (min-width: 769px) {

  #table-results-view #flights-table .mobile-cell-label,
  #table-results-view #flights-table .mobile-inline-ident,
  #table-results-view #flights-table .mobile-flight-meta {
    display: none !important;
  }
}

@media (max-width: 768px) {
  :root {
    --rfd-mobile-header-offset: 6.9rem;
  }

  body {
    overflow-y: auto;
  }

  #app-header {
    height: auto !important;
    min-height: 4rem;
    padding-top: 0.7rem;
    padding-bottom: 0.6rem;
    flex-wrap: wrap;
    row-gap: 0.45rem;
    align-items: flex-start;
  }

  #header-brand {
    width: 100%;
    gap: 0.5rem;
    min-width: 0;
  }

  #header-brand .rfd-brand-chip,
  #header-brand .rfd-brand-subtitle {
    display: none;
  }

  #header-actions {
    width: 100%;
    min-width: 0;
    justify-content: flex-start;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.25rem;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
    flex-wrap: nowrap;
  }

  #header-actions>* {
    flex: 0 0 auto;
  }

  #header-actions>button {
    min-width: 2.35rem;
    padding-left: 0.5rem;
    padding-right: 0.5rem;
  }

  #btn-load-db {
    min-width: max-content;
  }

  /* Keep mobile modes menu inside viewport */
  #mobile-modes-menu {
      position: fixed;
      top: calc(var(--rfd-mobile-header-offset) + 0.35rem);
      right: 0.75rem;
      left: auto;
      min-width: 14rem;
      max-height: calc(100dvh - var(--rfd-mobile-header-offset) - 1rem);
      overflow-y: auto;
      z-index: 200;
      border-radius: 1.5rem;
      backdrop-filter: blur(18px);
    }

    #mobile-modes-menu button {
      display: flex;
      align-items: center;
      gap: 0.15rem;
      color: #e6eefb;
      font-weight: 700;
      transition: background-color 160ms ease, color 160ms ease, opacity 160ms ease;
    }

    #mobile-modes-menu button span {
      color: inherit;
    }

    #mobile-modes-menu button:hover {
      background: rgba(255, 255, 255, 0.08);
      color: #ffffff;
    }

    body.light-theme #mobile-modes-menu {
      background: rgba(255, 255, 255, 0.96);
      border-color: rgba(195, 210, 232, 0.92) !important;
      box-shadow: 0 24px 54px rgba(148, 163, 184, 0.26);
    }

    body.light-theme #mobile-modes-menu button {
      color: #23324d;
    }

    body.light-theme #mobile-modes-menu button:hover {
      background: color-mix(in srgb, var(--accent) 13%, white);
      color: color-mix(in srgb, var(--accent) 82%, #17253d);
    }

  #builder-view .p-6 {
    padding: 1rem;
  }

  #builder-view .md\:p-10 {
    padding: 1rem;
  }

  #builder-hero {
    margin-bottom: 1rem;
    gap: 0.75rem;
    align-items: stretch;
  }

  #main-icon-container {
    width: 2.5rem;
    height: 2.5rem;
    border-radius: 0.9rem;
  }

  #main-title {
    font-size: 1.4rem;
    line-height: 1.15;
  }

  #main-subtitle {
    font-size: 0.85rem;
  }

  #builder-primary-actions {
    width: 100%;
  }

  #builder-primary-actions button {
    flex: 1 1 calc(50% - 0.25rem);
    justify-content: center;
  }

  #builder-primary-actions #btn-search {
    flex-basis: 100%;
  }

  #builder-status-pills>div {
    width: 100%;
  }

  #pill-airports .mx-2 {
    display: none;
  }

  /* Results toolbar (mobile) */
  #results-toolbar {
    height: auto;
    min-height: 3rem;
    padding-top: 0.35rem;
    padding-bottom: 0.35rem;
    gap: 0.35rem;
    flex-wrap: wrap;
    align-items: center;
  }

  #results-toolbar>button[data-action="exit-results"] {
    flex: 1 1 auto;
    min-width: 0;
    font-size: 11px;
    letter-spacing: 0.02em;
  }

  #results-toolbar-actions {
    width: 100%;
    gap: 0.35rem;
    overflow-x: auto;
    padding-bottom: 0.2rem;
    -webkit-overflow-scrolling: touch;
    scrollbar-width: thin;
  }

  #results-toolbar-actions {
    scrollbar-width: none;
  }

  #results-toolbar-actions::-webkit-scrollbar {
    height: 0;
  }

  #results-toolbar-actions {
    -webkit-mask-image: linear-gradient(to right, transparent, black 14px, black calc(100% - 14px), transparent);
    mask-image: linear-gradient(to right, transparent, black 14px, black calc(100% - 14px), transparent);
  }

  #results-toolbar-actions>* {
    flex: 0 0 auto;
  }

  #results-toolbar-actions button {
    padding-left: 0.55rem;
    padding-right: 0.55rem;
  }

  .app-logo-slot {
    width: 2rem;
    height: 2rem;
    border-radius: 0.75rem;
  }

  /* Results table -> card mode on mobile */
  #results-list-scroll {
    padding: 0.55rem 0.55rem 0.55rem 0;
  }

  #table-results-view #flights-table {
    min-width: 0 !important;
    width: 100%;
    border-spacing: 0 0.55rem;
  }

  #table-results-view #flights-table thead {
    display: none;
  }

  #table-results-view #flights-table tbody {
    display: block;
  }

  #table-results-view #flights-table tbody tr.flight-row {
    display: grid;
    grid-template-columns: 3rem minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "logo company company"
      "logo aircraft aircraft"
      "dep dep arr"
      "time time duration";
    gap: 0.5rem 0.6rem;
    padding: 0.8rem;
    border-radius: var(--radius-card);
    border: 1px solid var(--border);
    background: var(--surface);
    box-shadow: 0 4px 15px rgba(0, 0, 0, 0.15);
    align-items: start;
  }

  #table-results-view #flights-table tbody tr.flight-row:hover {
    background: var(--row-hover);
  }

  #table-results-view #flights-table tbody tr.flight-row.selected {
    background: var(--row-selected);
    box-shadow: inset 3px 0 0 rgba(93, 135, 255, 0.95);
  }

  #table-results-view #flights-table tbody tr.flight-row td {
    border: 0 !important;
    background: transparent !important;
    padding: 0 !important;
    min-width: 0;
  }

  #table-results-view #flights-table tbody tr.flight-row td:first-child,
  #table-results-view #flights-table tbody tr.flight-row td:last-child {
    border: 0 !important;
    border-radius: 0 !important;
  }

  #table-results-view #flights-table tbody tr.flight-row.selected td:first-child {
    box-shadow: none;
  }

  #table-results-view #flights-table .col-logo {
    grid-area: logo;
    align-self: start;
  }

  #table-results-view #flights-table .col-company {
    grid-area: company;
    display: flex;
    flex-direction: column;
    justify-content: center;
  }

  #table-results-view #flights-table .col-dep {
    grid-area: dep;
  }

  #table-results-view #flights-table .col-arr {
    grid-area: arr;
  }

  #table-results-view #flights-table .col-aircraft {
    grid-area: aircraft;
  }

  #table-results-view #flights-table .col-time {
    grid-area: time;
  }

  #table-results-view #flights-table .col-duration {
    grid-area: duration;
  }

  #table-results-view #flights-table .col-flightno,
  #table-results-view #flights-table .col-callsign,
  #table-results-view #flights-table .col-days {
    display: none !important;
  }

  #table-results-view #flights-table .col-dep>div:last-child,
  #table-results-view #flights-table .col-arr>div:last-child {
    max-width: none !important;
  }

  #table-results-view #flights-table .col-aircraft .truncate {
    white-space: normal;
    display: -webkit-box;
    -webkit-line-clamp: 2;
    line-clamp: 2;
    -webkit-box-orient: vertical;
  }

  #table-results-view #flights-table .badge {
    width: auto;
    max-width: 100%;
  }

  #table-results-view #flights-table .mobile-cell-label,
  #table-results-view #flights-table .mobile-flight-meta {
    display: none;
  }

  #table-results-view #flights-table .drag-handle {
    display: none !important;
  }

  .logo-slot {
    width: 3rem;
    height: 3rem;
    background: #fff !important;
  }

  .logo-placeholder {
    font-size: 0.85rem;
  }

  .logo-slot img {
    width: 100%;
    height: 100%;
    object-fit: contain;
  }

  #table-results-view .overflow-y-auto {
    overflow: auto;
  }

  /* Mobile quick actions + support: keep compact so table stays visible */
  #results-mobile-actions {
    padding: 0.6rem;
    gap: 0.45rem;
    max-height: 16dvh;
    overflow-y: auto;
  }

  #results-mobile-actions[data-advanced-open="1"] {
    max-height: 40dvh;
  }

  #results-mobile-advanced {
    gap: 0.45rem;
  }

  #results-mobile-advanced.hidden {
    display: none !important;
  }

  #results-mobile-actions button {
    min-height: 2.1rem;
  }

  #results-support-wrap {
    padding-top: 0.25rem;
  }

  #results-support-content.hidden {
    display: none !important;
  }

  #results-support-wrap[data-support-open="1"] #results-support-content {
    display: block !important;
  }

  #results-support-wrap[data-support-open="1"] [data-mobile-support-chevron],
  #results-mobile-actions[data-advanced-open="1"] [data-mobile-advanced-chevron] {
    transform: rotate(180deg);
  }

  #table-results-view .support-donors-col {
    display: none;
  }

  #table-results-view .support-right-grid {
    grid-template-columns: 1fr;
  }

  #table-results-view .support-panes {
    min-height: 86px;
  }
}

@media (max-width: 640px) {
  :root {
    --rfd-mobile-header-offset: 6.4rem;
  }

  #app-header {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  #app-header .app-logo-slot {
    display: none;
  }

  #header-brand h1 {
    font-size: 1rem;
  }

  #builder-sidebar {
    width: 92vw;
    max-width: 92vw;
  }

  .rfd-modes-portal {
    width: min(94vw, 22rem);
  }

  #builder-view .p-6 {
    padding: 0.75rem;
  }

  #builder-primary-actions button {
    flex-basis: 100%;
  }

  #active-filters-container .glass {
    padding: 0.85rem;
  }

  .sidebar-item {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  #results-toolbar-actions [data-i18n="results.title"] {
    display: none;
  }

  #table-results-view #flights-table tbody tr.flight-row {
    grid-template-columns: 2.9rem minmax(0, 1fr) minmax(0, 1fr);
    gap: 0.45rem 0.5rem;
    padding: 0.68rem;
    border-radius: 15px;
    background:
      radial-gradient(560px 120px at 20% -10%, rgba(93, 135, 255, 0.18), transparent 70%),
      rgba(30, 58, 138, 0.20);
  }

  #table-results-view #flights-table .logo-slot {
    width: 3.5rem;
    height: 3.5rem;
    border-radius: 12px;
    padding: 2px;
    background: #fff !important;
  }

  #table-results-view #flights-table .badge {
    font-size: 10px;
    padding: 0.26rem 0.48rem;
    border-radius: 999px;
  }

  #table-results-view #flights-table .col-company>div:last-child {
    font-size: 10px;
  }

  #table-results-view #flights-table .mobile-inline-ident {
    display: none;
  }

  #table-results-view #flights-table .mobile-flight-meta {
    display: flex;
    flex-wrap: wrap;
    gap: 0.3rem;
    margin-top: 0.28rem;
  }

  #table-results-view #flights-table .mobile-meta-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.28rem;
    max-width: 100%;
    padding: 0.16rem 0.45rem;
    border-radius: 999px;
    border: 1px solid rgba(124, 143, 172, 0.26);
    background: rgba(17, 28, 45, 0.44);
  }

  #table-results-view #flights-table .mobile-meta-key {
    color: rgb(148 163 184 / 0.92);
    font-weight: 700;
    font-size: 9px;
    line-height: 1;
    letter-spacing: 0.06em;
    text-transform: uppercase;
  }

  #table-results-view #flights-table .mobile-meta-value {
    max-width: 8.6rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
    font-size: 10px;
    line-height: 1.1;
  }

  #table-results-view #flights-table .mobile-cell-label {
    display: block;
    font-size: 8px;
    line-height: 1.1;
    letter-spacing: 0.12em;
    text-transform: uppercase;
    color: rgb(148 163 184 / 0.84);
    font-weight: 800;
    margin-bottom: 0.22rem;
  }

  #table-results-view #flights-table .col-dep,
  #table-results-view #flights-table .col-arr,
  #table-results-view #flights-table .col-time,
  #table-results-view #flights-table .col-duration {
    border: 1px solid rgba(124, 143, 172, 0.18) !important;
    border-radius: 12px !important;
    background: rgba(13, 22, 38, 0.22) !important;
    padding: 0.42rem 0.36rem !important;
  }

  #table-results-view #flights-table .col-time,
  #table-results-view #flights-table .col-duration {
    text-align: left !important;
  }

  #table-results-view #flights-table .col-time .badge,
  #table-results-view #flights-table .col-duration .badge {
    margin-left: 0 !important;
    margin-right: 0 !important;
    justify-content: flex-start !important;
  }

  #table-results-view #flights-table .col-aircraft {
    border-top: 1px solid rgba(124, 143, 172, 0.18) !important;
    padding-top: 0.45rem !important;
    text-align: center !important;
  }

  #table-results-view #flights-table .col-aircraft>div {
    margin-left: auto;
    margin-right: auto;
  }
}

/* Ultra-compact phones (ex: ~360-430px wide) */
@media (max-width: 430px) {
  :root {
    --rfd-mobile-header-offset: 6.1rem;
  }

  #app-header {
    padding-top: 0.55rem;
    padding-bottom: 0.45rem;
    row-gap: 0.35rem;
  }

  #header-actions {
    gap: 0.25rem;
    padding-bottom: 0.15rem;
  }

  #header-actions button,
  #header-actions a {
    padding-top: 0.45rem;
    padding-bottom: 0.45rem;
    padding-left: 0.55rem;
    padding-right: 0.55rem;
    border-radius: 0.9rem;
  }

  #header-actions>button {
    min-width: 2.1rem;
  }

  #btn-load-db {
    padding-left: 0.65rem !important;
    padding-right: 0.65rem !important;
  }

  #db-status-text {
    max-width: 10.5rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
    letter-spacing: 0.01em;
  }

  #results-toolbar {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  #results-toolbar-actions button {
    font-size: 11px;
    padding-left: 0.5rem !important;
    padding-right: 0.5rem !important;
  }

  #results-list-scroll {
    padding: 0.5rem 0.5rem 0.5rem 0;
  }

  #table-results-view #flights-table tbody tr.flight-row {
    grid-template-columns: 2.75rem minmax(0, 1fr);
    grid-template-areas:
      "logo company"
      "logo aircraft"
      "dep arr"
      "time duration";
    padding: 0.62rem;
    gap: 0.38rem 0.45rem;
  }

  #table-results-view #flights-table .mobile-cell-label {
    display: none !important;
  }

  #table-results-view #flights-table .col-time .mobile-cell-label,
  #table-results-view #flights-table .col-duration .mobile-cell-label {
    display: block !important;
    font-size: 7px;
  }

  #table-results-view #flights-table .company-meta {
    display: none !important;
  }

  #table-results-view #flights-table .col-arr::before {
    left: -0.45rem;
  }

  #table-results-view #flights-table .company-long {
    display: none !important;
  }

  #table-results-view #flights-table .airport-name {
    display: none !important;
  }

  #table-results-view #flights-table .aircraft-reg {
    display: none !important;
  }

  #table-results-view #flights-table .duration-diff {
    display: none !important;
  }

  #table-results-view #flights-table .duration-dist {
    margin-top: 0.25rem !important;
    font-size: 0.66rem;
  }

  #table-results-view #flights-table .col-company>div:first-child .company-short {
    font-size: 0.92rem;
  }

  #table-results-view #flights-table .col-aircraft>div:first-child {
    font-size: 0.8rem;
  }

  #table-results-view #flights-table .logo-slot {
    width: 2.95rem;
    height: 2.95rem;
  }
}

/* ── Mobile result card — améliorations visuelles ── */
@media (max-width: 768px) {
  #table-results-view #flights-table tbody tr.flight-row {
    border-left: 3px solid rgba(93, 135, 255, 0.55);
  }

  #table-results-view #flights-table tbody tr.flight-row.selected {
    border-left-color: rgba(93, 135, 255, 0.95);
  }

  #table-results-view #flights-table .col-company>div:first-child .company-short {
    font-size: 0.98rem;
    color: #fff;
    letter-spacing: -0.01em;
  }

  #table-results-view #flights-table .company-meta.mobile-flight-meta {
    margin-top: 0.3rem;
    gap: 0.24rem;
  }

  #table-results-view #flights-table .col-arr {
    position: relative;
  }

  #table-results-view #flights-table .col-arr::before {
    content: '→';
    position: absolute;
    left: -0.7rem;
    top: 45%;
    transform: translateY(-50%);
    font-size: 0.72rem;
    color: rgba(124, 143, 172, 0.55);
    pointer-events: none;
  }

  #table-results-view #flights-table .badge-dep,
  #table-results-view #flights-table .badge-arr {
    font-size: 0.78rem;
    padding: 0.28rem 0.55rem;
    gap: 0.3rem;
  }

  #table-results-view #flights-table .badge-dep span,
  #table-results-view #flights-table .badge-arr span {
    font-size: 0.8rem;
    letter-spacing: 0.02em;
  }

  #table-results-view #flights-table .mobile-inline-ident {
    display: block !important;
    font-size: 0.69rem;
    margin-top: 0.12rem;
    opacity: 0.85;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #table-results-view #flights-table .col-aircraft>div:first-child {
    font-size: 0.84rem;
    line-height: 1.3;
  }

  #table-results-view #flights-table .duration-dist {
    font-size: 0.7rem;
    color: #7c8fac;
  }

  #table-results-view #flights-table .col-time,
  #table-results-view #flights-table .col-duration {
    min-height: 4.05rem;
  }

  #table-results-view #flights-table .duration-dist:empty,
  #table-results-view #flights-table .duration-diff:empty {
    display: none !important;
  }
}

/* Tablets (touch) in landscape */
@media (pointer: coarse) and (min-width: 1024px) and (max-width: 1366px) {
  #app-header {
    padding-left: 1rem;
    padding-right: 1rem;
  }

  #app-header nav button {
    padding-left: 0.85rem;
    padding-right: 0.85rem;
  }

  #header-actions {
    gap: 0.45rem;
  }

  #header-actions button,
  #header-actions a {
    padding-left: 0.65rem;
    padding-right: 0.65rem;
    border-radius: 0.95rem;
  }

  #table-results-view .rfd-actions-panel {
    width: 18rem;
  }

  #table-results-view .rfd-actions-panel .rfd-dock-header {
    padding: 0.9rem;
  }

  #table-results-view .rfd-actions-panel .dock-card {
    padding: 0.75rem;
    border-radius: 1.35rem;
  }

  #table-results-view .rfd-actions-panel .dock-card-title {
    margin-bottom: 0.55rem;
  }

  #table-results-view .rfd-actions-panel .dock-card>.space-y-2>button[data-action],
  #table-results-view .rfd-actions-panel .dock-card>.space-y-2>button[data-windy-kind],
  #table-results-view .rfd-actions-panel .dock-card>.space-y-2>.relative>button[data-action] {
    padding: 0.65rem;
    border-radius: 1.05rem;
  }
}

/* Tablets portrait/landscape (901px–1279px) */
@media (min-width: 901px) and (max-width: 1279px) {
  #header-brand {
    flex-shrink: 1;
    min-width: 0;
  }

  #header-brand .rfd-brand-chip,
  #header-brand .rfd-brand-subtitle {
    display: none;
  }

  #header-actions {
    flex-shrink: 0;
  }
}

@media (min-width: 641px) and (max-width: 1279px) {
  #results-list-scroll {
    overflow-x: hidden;
    overflow-y: auto;
    -webkit-overflow-scrolling: touch;
  }

  #table-results-view #flights-table {
    min-width: 0 !important;
    width: 100%;
  }

  #table-results-view #flights-table thead th:nth-child(8),
  #table-results-view #flights-table thead th:nth-child(9),
  #table-results-view #flights-table thead th:nth-child(10),
  #table-results-view #flights-table tbody td.col-flightno,
  #table-results-view #flights-table tbody td.col-callsign,
  #table-results-view #flights-table tbody td.col-days {
    display: table-cell !important;
  }

  #table-results-view #flights-table thead {
    display: table-header-group !important;
  }

  #table-results-view #flights-table tbody {
    display: table-row-group !important;
  }

  #table-results-view #flights-table tbody tr.flight-row {
    display: table-row !important;
    background: var(--row);
  }

  #table-results-view #flights-table tbody tr.flight-row td {
    display: table-cell !important;
    vertical-align: middle;
    padding: 0.5rem 0.4rem !important;
    min-width: 0;
    font-size: 0.92rem;
  }

  #table-results-view #flights-table thead th {
    padding: 0.75rem 0.4rem;
    font-size: 9px;
    letter-spacing: 0.12em;
  }

  #table-results-view #flights-table .logo-slot {
    width: 3.95rem;
    height: 3.95rem;
    margin-left: auto;
    margin-right: auto;
    padding: 0.06rem;
  }

  #table-results-view #flights-table .badge {
    padding: 0.28rem 0.45rem;
    gap: 0.3rem;
    font-size: 10px;
  }

  #table-results-view #flights-table .table-meta-card {
    padding: 0;
    border-radius: 0;
  }

  #table-results-view #flights-table .table-meta-label {
    font-size: 8px;
    letter-spacing: 0.12em;
  }

  #table-results-view #flights-table .company-short,
  #table-results-view #flights-table .col-aircraft>div:first-child {
    font-size: 0.9rem;
  }

  #table-results-view #flights-table .company-long,
  #table-results-view #flights-table .airport-name,
  #table-results-view #flights-table .aircraft-reg,
  #table-results-view #flights-table .duration-dist,
  #table-results-view #flights-table .duration-diff,
  #table-results-view #flights-table .col-flightno span,
  #table-results-view #flights-table .col-callsign span {
    font-size: 10px !important;
  }

  #table-results-view #flights-table .drag-handle {
    left: 0.15rem;
    font-size: 12px;
  }
}


/* ============================================================
   contact.html — Page de contact
   ============================================================ */

/* Note: Les variables :root et body sont déjà définies plus haut (index.html).
   Les classes suivantes sont spécifiques à contact.html */

body.page-shell {
  position: relative;
  min-height: 100vh;
  font-family: 'Plus Jakarta Sans', Inter, ui-sans-serif, system-ui, sans-serif;
  color: var(--text);
  background:
    radial-gradient(900px 420px at 8% -10%, rgba(93, 135, 255, 0.18), transparent 60%),
    radial-gradient(760px 360px at 100% 0%, rgba(73, 190, 255, 0.12), transparent 58%),
    linear-gradient(180deg, #15263a 0%, #132338 48%, #0d1626 100%);
  background-attachment: fixed;
}

body.page-shell::before {
  content: "";
  position: fixed;
  inset: 0;
  pointer-events: none;
  background:
    linear-gradient(135deg, rgba(255, 255, 255, 0.028), transparent 38%),
    radial-gradient(circle at 20% 20%, rgba(255, 255, 255, 0.035) 0, transparent 22%);
  opacity: 0.65;
  z-index: 0;
}

body.page-shell>* {
  position: relative;
  z-index: 1;
}

.page-main,
.page-state-card {
  position: relative;
  z-index: 1;
}

.page-main {
  padding-top: 1.4rem;
  padding-bottom: 2.25rem;
}

.page-shell .wrap {
  max-width: 1120px;
  padding: 1.1rem;
}

.page-shell .topbar,
.page-shell .hero,
.page-shell .panel,
.page-shell .card,
.page-shell .category,
.page-shell .footer-card,
.page-shell .page-state-card,
.page-shell .glass,
.page-shell .glass-strong {
  background:
    linear-gradient(180deg, rgba(30, 45, 69, 0.9), rgba(17, 28, 45, 0.88));
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow:
    0 22px 60px rgba(3, 10, 24, 0.38),
    inset 0 1px 0 rgba(255, 255, 255, 0.04);
  backdrop-filter: blur(16px);
  -webkit-backdrop-filter: blur(16px);
}

.page-shell .topbar {
  position: sticky;
  top: 0.9rem;
  z-index: 20;
  margin-bottom: 1.15rem;
  padding: 0.95rem 1rem;
  border-radius: 1.35rem;
}

.page-shell .hero,
.page-shell .panel,
.page-shell .category,
.page-shell .footer-card {
  border-radius: 1.55rem;
}

.page-shell .hero {
  padding: 1.45rem;
  margin-bottom: 1rem;
  overflow: hidden;
}

.page-shell .hero::before,
.page-shell .panel::before,
.page-shell .category::before,
.page-shell .page-state-card::before {
  content: "";
  position: absolute;
  inset: 0 auto auto 0;
  width: 100%;
  height: 100%;
  pointer-events: none;
  background:
    radial-gradient(520px 180px at 0% 0%, rgba(93, 135, 255, 0.16), transparent 58%),
    radial-gradient(420px 160px at 100% 0%, rgba(73, 190, 255, 0.10), transparent 55%);
  opacity: 0.9;
}

.page-shell .wrap h1,
.page-shell .wrap h2,
.page-shell .wrap h3,
.page-shell .mbr-section-title,
.page-shell .mbr-section-maintitle {
  color: rgba(247, 250, 255, 0.98);
  letter-spacing: -0.02em;
}

.page-shell .wrap p,
.page-shell .mbr-section-subtitle,
.page-shell .mbr-text,
.page-shell .card-text,
.page-shell .answer,
.page-shell .file-sub,
.page-shell .meta-note,
.page-shell .cat-head p {
  color: rgba(202, 213, 225, 0.88);
}

.page-shell .btn,
.page-shell .file-actions a,
.page-shell .card-actions a {
  border: 1px solid rgba(255, 255, 255, 0.10);
  border-radius: 1rem;
  background: rgba(255, 255, 255, 0.05);
  color: rgba(241, 245, 249, 0.98);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease, box-shadow .16s ease;
}

.page-shell .btn:hover,
.page-shell .file-actions a:hover,
.page-shell .card-actions a:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.08);
  border-color: rgba(147, 197, 253, 0.34);
  box-shadow: 0 12px 30px rgba(8, 15, 32, 0.22);
}

.page-shell .btn-primary,
.page-shell .submit-btn {
  background: linear-gradient(135deg, rgba(93, 135, 255, 0.96), rgba(74, 111, 232, 0.88));
  border-color: rgba(125, 164, 255, 0.42);
  color: #fff;
  box-shadow: 0 16px 34px rgba(61, 102, 201, 0.28);
}

.page-shell .submit-btn:hover,
.page-shell .btn-primary:hover {
  filter: brightness(1.04);
}

.page-shell .pill,
.page-shell .meta-pill,
.page-shell .tag {
  border-radius: 999px;
  background: rgba(255, 255, 255, 0.05);
  border: 1px solid rgba(255, 255, 255, 0.10);
}

.page-shell .wrap details,
.page-shell .file-row,
.page-shell .features026 .item-wrapper {
  border-color: rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.035);
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.03);
}

.page-shell .video-wrapper,
.page-shell .mbr-figure {
  border-color: rgba(255, 255, 255, 0.12);
  box-shadow: 0 26px 70px rgba(0, 0, 0, 0.42);
}

.page-shell .page-state-card {
  padding: 2rem 1.6rem;
  border-radius: 1.9rem;
}

.page-shell.page-shell--centered {
  background:
    radial-gradient(700px 320px at 50% 0%, rgba(93, 135, 255, 0.18), transparent 58%),
    radial-gradient(640px 280px at 100% 0%, rgba(73, 190, 255, 0.10), transparent 55%),
    linear-gradient(180deg, #15263a 0%, #0d1626 100%);
}

@keyframes rfdLoaderShimmer {
  to {
    transform: translateX(130%);
  }
}

body.page-shell.light-theme {
  color: #223149;
  background:
    radial-gradient(900px 420px at 8% -10%, color-mix(in srgb, var(--accent) 18%, transparent), transparent 60%),
    radial-gradient(760px 360px at 100% 0%, color-mix(in srgb, var(--brand) 14%, transparent), transparent 58%),
    linear-gradient(180deg, #edf5fd 0%, #eaf2fb 100%);
}

body.page-shell.light-theme::before {
  display: none;
}

body.page-shell.light-theme .topbar,
body.page-shell.light-theme .hero,
body.page-shell.light-theme .panel,
body.page-shell.light-theme .card,
body.page-shell.light-theme .category,
body.page-shell.light-theme .footer-card,
body.page-shell.light-theme .page-state-card,
body.page-shell.light-theme .glass,
body.page-shell.light-theme .glass-strong {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
  box-shadow: 0 16px 42px rgba(191, 212, 239, 0.3), inset 0 1px 0 rgba(255, 255, 255, 0.75) !important;
  backdrop-filter: none;
  -webkit-backdrop-filter: none;
}

body.page-shell.light-theme .hero::before,
body.page-shell.light-theme .panel::before,
body.page-shell.light-theme .category::before,
body.page-shell.light-theme .page-state-card::before {
  display: none;
}

body.page-shell.light-theme .wrap h1,
body.page-shell.light-theme .wrap h2,
body.page-shell.light-theme .wrap h3,
body.page-shell.light-theme .mbr-section-title,
body.page-shell.light-theme .mbr-section-maintitle,
body.page-shell.light-theme .text-white {
  color: #223149 !important;
}

body.page-shell.light-theme .wrap p,
body.page-shell.light-theme .mbr-section-subtitle,
body.page-shell.light-theme .mbr-text,
body.page-shell.light-theme .card-text,
body.page-shell.light-theme .answer,
body.page-shell.light-theme .file-sub,
body.page-shell.light-theme .meta-note,
body.page-shell.light-theme .cat-head p,
body.page-shell.light-theme .text-slate-400,
body.page-shell.light-theme .text-slate-300 {
  color: #6f8099 !important;
}

body.page-shell.light-theme .btn,
body.page-shell.light-theme .file-actions a,
body.page-shell.light-theme .card-actions a {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.16) !important;
  color: #223149 !important;
  box-shadow: none !important;
}

body.page-shell.light-theme .btn:hover,
body.page-shell.light-theme .file-actions a:hover,
body.page-shell.light-theme .card-actions a:hover {
  background: color-mix(in srgb, var(--accent) 8%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--accent) 22%, rgba(95, 122, 155, 0.16)) !important;
  color: var(--accent) !important;
  box-shadow: 0 12px 28px rgba(191, 212, 239, 0.24) !important;
}

body.page-shell.light-theme .btn-primary,
body.page-shell.light-theme .submit-btn {
  background: linear-gradient(135deg,
      color-mix(in srgb, var(--accent) 88%, #ffffff),
      color-mix(in srgb, var(--brand) 72%, var(--accent))) !important;
  border-color: color-mix(in srgb, var(--accent) 38%, rgba(95, 122, 155, 0.16)) !important;
  color: #ffffff !important;
  box-shadow: 0 16px 32px color-mix(in srgb, var(--accent) 24%, rgba(191, 212, 239, 0.24)) !important;
}

body.page-shell.light-theme .pill,
body.page-shell.light-theme .meta-pill,
body.page-shell.light-theme .tag,
body.page-shell.light-theme .wrap details,
body.page-shell.light-theme .file-row,
body.page-shell.light-theme .features026 .item-wrapper {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.12) !important;
  box-shadow: none !important;
}

body.page-shell.light-theme.page-shell--centered {
  background:
    radial-gradient(700px 320px at 50% 0%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 58%),
    radial-gradient(640px 280px at 100% 0%, color-mix(in srgb, var(--brand) 11%, transparent), transparent 55%),
    linear-gradient(180deg, #edf5fd 0%, #eaf2fb 100%);
}

.wrap {
  max-width: 950px;
  margin: 0 auto;
  padding: 1rem;
}

.topbar {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.55rem;
  margin-bottom: 1rem;
}

.nav {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
}

.btn {
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: rgba(30, 45, 69, 0.75);
  color: var(--text);
  text-decoration: none;
  font-size: 0.83rem;
  font-weight: 760;
  padding: 0.52rem 0.78rem;
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
}

.btn:hover {
  border-color: rgba(186, 230, 253, 0.74);
  background: rgba(26, 39, 68, 0.92);
}

.hero,
.panel {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.75rem;
}

.hero {
  padding: 1.2rem;
  margin-bottom: 0.85rem;
}

.kicker {
  margin: 0;
  color: #8faaff;
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.wrap h1 {
  margin: 0.35rem 0 0.45rem;
  font-size: clamp(1.4rem, 3vw, 1.95rem);
  letter-spacing: -0.01em;
  color: var(--text);
}

.wrap p {
  margin: 0.4rem 0;
  color: var(--muted);
  line-height: 1.55;
}

.panel {
  padding: 1rem;
}

.wrap .grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 0.65rem;
}

.field {
  display: flex;
  flex-direction: column;
  gap: 0.34rem;
}

.field-full {
  grid-column: span 2;
}

.wrap label {
  font-size: 0.78rem;
  color: #7c8fac;
  font-weight: 700;
}

.wrap input,
.wrap textarea {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: rgba(13, 22, 38, 0.78);
  color: var(--text);
  font-size: 0.92rem;
  padding: 0.65rem 0.8rem;
  font-family: inherit;
}

.wrap textarea {
  min-height: 170px;
  resize: vertical;
}

.wrap input:focus,
.wrap textarea:focus {
  outline: 2px solid rgba(93, 135, 255, 0.55);
  outline-offset: 1px;
}

.actions {
  margin-top: 0.85rem;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.6rem;
  flex-wrap: wrap;
}

.submit-btn {
  border: 1px solid rgba(93, 135, 255, 0.45);
  border-radius: 0.8rem;
  background: linear-gradient(135deg, #5D87FF, #4a6fe8);
  color: #fff;
  font-size: 0.84rem;
  font-weight: 800;
  padding: 0.6rem 1rem;
  cursor: pointer;
}

.submit-btn[disabled] {
  opacity: 0.7;
  cursor: default;
}

.meta-note {
  font-size: 0.76rem;
  color: var(--muted);
}

.status {
  margin-top: 0.75rem;
  font-size: 0.84rem;
  border-radius: 0.7rem;
  border: 1px solid var(--border);
  padding: 0.62rem 0.72rem;
  background: rgba(255, 255, 255, 0.03);
  display: none;
}

.status.show {
  display: block;
}

.status.ok {
  border-color: rgba(19, 222, 185, 0.45);
  color: #b2f5eb;
}

.status.err {
  border-color: rgba(250, 137, 107, 0.45);
  color: #ffd5c8;
}

.honeypot {
  position: absolute !important;
  left: -5000px !important;
  width: 1px !important;
  height: 1px !important;
  overflow: hidden !important;
}

@media (max-width: 760px) {
  .grid {
    grid-template-columns: 1fr;
  }

  .field-full {
    grid-column: span 1;
  }
}


/* ============================================================
   documentation.html — Page de documentation PDF
   ============================================================ */

.meta-grid {
  margin-top: 0.85rem;
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(210px, 1fr));
  gap: 0.5rem;
}

.meta-pill {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.5rem;
  background: rgba(255, 255, 255, 0.03);
  padding: 0.6rem 0.72rem;
  font-size: 0.82rem;
  color: var(--muted);
}

.meta-pill strong {
  color: var(--text);
}

.toolbar {
  margin: 0.75rem 0;
  display: grid;
  grid-template-columns: 1fr auto auto;
  gap: 0.5rem;
  align-items: center;
}

.wrap .toolbar input {
  width: 100%;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: rgba(13, 22, 38, 0.72);
  color: var(--text);
  font-size: 0.9rem;
  padding: 0.66rem 0.8rem;
}

.wrap .toolbar input:focus {
  outline: 2px solid rgba(93, 135, 255, 0.55);
  outline-offset: 1px;
}

.panel {
  padding: 0.82rem;
}

#status {
  margin-bottom: 0.62rem;
  font-size: 0.85rem;
  color: var(--muted);
}

#status.error {
  color: #fca5a5;
}

.wrap details {
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.6rem;
  background: rgba(255, 255, 255, 0.02);
  margin-bottom: 0.4rem;
  overflow: hidden;
}

.wrap summary {
  cursor: pointer;
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.7rem;
  padding: 0.62rem 0.76rem;
  font-size: 0.84rem;
  font-weight: 800;
  color: var(--text);
}

.wrap summary::-webkit-details-marker {
  display: none;
}

.folder-count {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 700;
}

.file-list {
  margin: 0;
  padding: 0 0.45rem 0.45rem;
  list-style: none;
}

.file-row {
  display: grid;
  grid-template-columns: 1fr auto;
  align-items: center;
  gap: 0.55rem;
  border: 1px solid var(--border);
  border-radius: 0.68rem;
  margin: 0.35rem 0;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.45rem 0.55rem;
}

.file-main {
  min-width: 0;
  display: flex;
  align-items: center;
  gap: 0.52rem;
}

.file-dot {
  width: 0.45rem;
  height: 0.45rem;
  border-radius: 999px;
  background: rgba(93, 135, 255, 0.9);
  flex: 0 0 auto;
}

.file-link {
  color: var(--text);
  text-decoration: none;
  font-size: 0.84rem;
  font-weight: 720;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  display: block;
}

.file-link:hover {
  color: #c5d5ff;
  text-decoration: underline;
}

.file-sub {
  color: var(--muted);
  font-size: 0.74rem;
  margin-top: 0.16rem;
}

.file-actions {
  display: flex;
  gap: 0.35rem;
}

.file-actions a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  border-radius: 0.55rem;
  background: rgba(255, 255, 255, 0.02);
  font-size: 0.72rem;
  font-weight: 800;
  padding: 0.34rem 0.46rem;
  white-space: nowrap;
}

.file-actions a:hover {
  border-color: rgba(125, 211, 252, 0.75);
}

.empty {
  border: 1px dashed var(--border);
  border-radius: 0.84rem;
  padding: 0.92rem;
  color: var(--muted);
  text-align: center;
  font-size: 0.85rem;
}

@media (max-width: 760px) {
  .toolbar {
    grid-template-columns: 1fr;
  }

  .file-row {
    grid-template-columns: 1fr;
  }

  .file-actions {
    justify-content: flex-start;
  }
}


/* ============================================================
   faq.html — Page FAQ
   ============================================================ */

.btn-shop {
  background: linear-gradient(135deg, #f59e0b, #d97706);
  border-color: rgba(251, 191, 36, 0.7);
  color: #fff;
  box-shadow: 0 12px 26px rgba(245, 158, 11, 0.24);
}

.btn-shop:hover {
  border-color: rgba(254, 240, 138, 0.9);
  background: linear-gradient(135deg, #fbbf24, #d97706);
}

.btn-donate {
  border-color: rgba(74, 222, 128, 0.4);
  background: rgba(19, 222, 185, 0.12);
}

.card {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.75rem;
  padding: 1rem;
}

.card h2 {
  margin: 0;
  font-size: 1rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.card p {
  margin: 0.45rem 0;
  color: var(--muted);
  line-height: 1.5;
}

.span-4 {
  grid-column: span 4;
}

.span-6 {
  grid-column: span 6;
}

.span-8 {
  grid-column: span 8;
}

.span-12 {
  grid-column: span 12;
}

.pill-row {
  display: flex;
  flex-wrap: wrap;
  gap: 0.45rem;
  margin-top: 0.75rem;
}

.pill {
  border: 1px solid var(--border);
  background: var(--surface-soft);
  border-radius: 999px;
  padding: 0.3rem 0.6rem;
  font-size: 0.72rem;
  color: #7c8fac;
  font-weight: 700;
}

.utility-list {
  margin: 0.55rem 0 0;
  padding-left: 1rem;
  color: var(--muted);
  line-height: 1.5;
  font-size: 0.88rem;
}

.utility-list li {
  margin: 0.32rem 0;
}

.note {
  margin-top: 0.7rem;
  font-size: 0.8rem;
  color: #7c8fac;
  border-left: 3px solid rgba(59, 130, 246, 0.62);
  padding-left: 0.6rem;
}

.wrap details {
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  margin-top: 0.55rem;
  overflow: hidden;
}

.wrap summary {
  cursor: pointer;
  list-style: none;
  padding: 0.65rem 0.72rem;
  font-size: 0.86rem;
  font-weight: 800;
  color: #f1f5f9;
}

.wrap summary::-webkit-details-marker {
  display: none;
}

.answer {
  margin: 0;
  padding: 0 0.72rem 0.72rem;
  color: var(--muted);
  font-size: 0.85rem;
  line-height: 1.55;
}

.footer-card {
  margin-top: 0.8rem;
  text-align: center;
}

.footer-card p {
  margin: 0.4rem auto 0;
  max-width: 760px;
}

@media (max-width: 980px) {

  .span-4,
  .span-6,
  .span-8 {
    grid-column: span 12;
  }
}

@media (max-width: 600px) {
  .wrap {
    padding: 0.75rem;
  }

  .hero {
    padding: 1rem 0.85rem;
  }

  .grid {
    gap: 0.5rem;
  }

  .pill {
    font-size: 0.68rem;
    padding: 0.25rem 0.5rem;
  }

  .pill-row {
    gap: 0.35rem;
    margin-top: 0.55rem;
  }

  .hero-actions {
    gap: 0.4rem;
    margin-top: 0.7rem;
  }

  .card {
    padding: 0.85rem;
  }
}


/* ============================================================
   tips.html — Page Tips simulation
   ============================================================ */

.category {
  background: var(--surface);
  border: 1px solid rgba(255, 255, 255, 0.07);
  border-radius: 0.75rem;
  padding: 0.95rem;
  margin-top: 0.75rem;
}

.cat-head {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  justify-content: space-between;
  gap: 0.45rem;
  margin-bottom: 0.7rem;
}

.cat-head h2 {
  margin: 0;
  font-size: 1.05rem;
  color: var(--text);
}

.cat-head p {
  margin: 0;
  font-size: 0.84rem;
  color: var(--muted);
}

.cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 0.6rem;
}

.card {
  border: 1px solid var(--border);
  border-radius: 0.85rem;
  background: rgba(255, 255, 255, 0.02);
  padding: 0.8rem;
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
}

.card-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.45rem;
}

.card h3 {
  margin: 0;
  font-size: 0.95rem;
  letter-spacing: -0.01em;
  color: var(--text);
}

.tag {
  border: 1px solid var(--border);
  border-radius: 999px;
  padding: 0.16rem 0.44rem;
  font-size: 0.68rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  white-space: nowrap;
  color: #7c8fac;
}

.tag.free {
  border-color: rgba(19, 222, 185, 0.42);
  color: #86efac;
  background: rgba(19, 222, 185, 0.08);
}

.tag.paid {
  border-color: rgba(245, 158, 11, 0.44);
  color: #fcd34d;
  background: rgba(245, 158, 11, 0.08);
}

.tag.mixed {
  border-color: rgba(93, 135, 255, 0.42);
  color: #93c5fd;
  background: rgba(93, 135, 255, 0.08);
}

.card p {
  margin: 0;
  font-size: 0.85rem;
  color: var(--muted);
}

.card ul {
  margin: 0;
  padding-left: 1rem;
  color: #7c8fac;
  font-size: 0.83rem;
  line-height: 1.45;
}

.card li {
  margin: 0.22rem 0;
}

.card-actions {
  margin-top: auto;
  display: flex;
  flex-wrap: wrap;
  gap: 0.35rem;
  padding-top: 0.25rem;
}

.card-actions a {
  text-decoration: none;
  color: var(--text);
  border: 1px solid var(--border);
  background: rgba(30, 45, 69, 0.62);
  border-radius: 0.55rem;
  padding: 0.34rem 0.5rem;
  font-size: 0.74rem;
  font-weight: 700;
}

.card-actions a:hover {
  border-color: rgba(125, 211, 252, 0.72);
}

.legal-note {
  margin-top: 0.35rem;
  border-left: 3px solid rgba(245, 158, 11, 0.65);
  padding-left: 0.55rem;
  font-size: 0.78rem;
  color: #fde68a;
}

.footer-card {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.3);
  margin-top: 0.8rem;
  padding: 1rem;
  text-align: center;
}

.footer-card h2 {
  margin: 0;
  font-size: 1rem;
  color: var(--text);
}

.footer-card p {
  max-width: 760px;
  margin: 0.45rem auto 0;
}

@media (max-width: 720px) {
  .card-actions a {
    flex: 1 1 auto;
    text-align: center;
  }
}

/* ===== Page-shell light final overrides ===== */
body.page-shell.light-theme .wrap label,
body.page-shell.light-theme .folder-count,
body.page-shell.light-theme .pill,
body.page-shell.light-theme .tag,
body.page-shell.light-theme .meta-pill,
body.page-shell.light-theme .meta-note,
body.page-shell.light-theme .file-sub,
body.page-shell.light-theme .answer,
body.page-shell.light-theme .utility-list,
body.page-shell.light-theme .card ul,
body.page-shell.light-theme .cat-head p,
body.page-shell.light-theme #status,
body.page-shell.light-theme .status,
body.page-shell.light-theme .text-slate-500,
body.page-shell.light-theme .text-slate-400,
body.page-shell.light-theme .text-slate-300 {
  color: #6f8099 !important;
}

body.page-shell.light-theme .wrap summary,
body.page-shell.light-theme .file-link,
body.page-shell.light-theme .meta-pill strong,
body.page-shell.light-theme .card h2,
body.page-shell.light-theme .card h3,
body.page-shell.light-theme .cat-head h2,
body.page-shell.light-theme .footer-card h2,
body.page-shell.light-theme .status.ok,
body.page-shell.light-theme .btn-shop,
body.page-shell.light-theme .btn-donate {
  color: #223149 !important;
}

body.page-shell.light-theme .wrap input,
body.page-shell.light-theme .wrap input[type="search"],
body.page-shell.light-theme .wrap textarea,
body.page-shell.light-theme .wrap select,
body.page-shell.light-theme .wrap .toolbar input {
  background: #f5f8fc !important;
  border-color: rgba(95, 122, 155, 0.16) !important;
  color: #223149 !important;
  box-shadow: none !important;
}

body.page-shell.light-theme .wrap input::placeholder,
body.page-shell.light-theme .wrap textarea::placeholder,
body.page-shell.light-theme .wrap .toolbar input::placeholder {
  color: #8ca0bb !important;
}

body.page-shell.light-theme .wrap input:focus,
body.page-shell.light-theme .wrap textarea:focus,
body.page-shell.light-theme .wrap .toolbar input:focus {
  outline: 2px solid color-mix(in srgb, var(--accent) 34%, transparent) !important;
  border-color: color-mix(in srgb, var(--accent) 28%, rgba(95, 122, 155, 0.16)) !important;
}

body.page-shell.light-theme .wrap details,
body.page-shell.light-theme .file-row,
body.page-shell.light-theme .card,
body.page-shell.light-theme .category,
body.page-shell.light-theme .footer-card,
body.page-shell.light-theme .meta-pill,
body.page-shell.light-theme .empty {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.12) !important;
  box-shadow: none !important;
}

body.page-shell.light-theme .wrap details[open],
body.page-shell.light-theme .file-row:hover,
body.page-shell.light-theme .card:hover {
  border-color: color-mix(in srgb, var(--accent) 20%, rgba(95, 122, 155, 0.12)) !important;
}

body.page-shell.light-theme .btn-shop {
  background: linear-gradient(135deg, #f59e0b, #d97706) !important;
  border-color: rgba(245, 158, 11, 0.45) !important;
  color: #ffffff !important;
}

body.page-shell.light-theme .btn-donate {
  background: color-mix(in srgb, var(--accent) 10%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--accent) 22%, rgba(95, 122, 155, 0.14)) !important;
  color: var(--accent) !important;
}

body.page-shell.light-theme .tag.free {
  border-color: rgba(19, 222, 185, 0.28) !important;
  color: #0f9f7c !important;
  background: rgba(19, 222, 185, 0.08) !important;
}

body.page-shell.light-theme .tag.paid {
  border-color: rgba(245, 158, 11, 0.28) !important;
  color: #c77907 !important;
  background: rgba(245, 158, 11, 0.08) !important;
}

body.page-shell.light-theme .tag.mixed {
  border-color: color-mix(in srgb, var(--accent) 28%, rgba(95, 122, 155, 0.14)) !important;
  color: var(--accent) !important;
  background: color-mix(in srgb, var(--accent) 10%, #ffffff) !important;
}

body.page-shell.light-theme .legal-note {
  color: #9a6a14 !important;
  border-left-color: rgba(245, 158, 11, 0.5) !important;
}

body.page-shell.light-theme .file-dot {
  background: var(--accent) !important;
}

body.page-shell.light-theme .file-actions a,
body.page-shell.light-theme .card-actions a {
  background: #ffffff !important;
  border-color: rgba(95, 122, 155, 0.14) !important;
  color: #223149 !important;
}

body.page-shell.light-theme .file-actions a:hover,
body.page-shell.light-theme .card-actions a:hover {
  background: color-mix(in srgb, var(--accent) 8%, #ffffff) !important;
  border-color: color-mix(in srgb, var(--accent) 24%, rgba(95, 122, 155, 0.14)) !important;
  color: var(--accent) !important;
}


/* ============================================================
   charts.html — Page Charts IFR/VFR
   ============================================================ */

/* Minimal bootstrap-ish layout */
.wrap .container {
  max-width: 1100px;
  margin: 0 auto;
  padding: 0 1rem;
}

.wrap .container-fluid {
  width: 100%;
  padding: 0 1rem;
}

.wrap .row {
  display: flex;
  flex-wrap: wrap;
  gap: 1.25rem;
}

.justify-content-center {
  justify-content: center;
}

.align-center {
  text-align: center;
}

.align-left {
  text-align: left;
}

.col-12 {
  width: 100%;
}

.col-md {
  flex: 1 1 0%;
  min-width: min(260px, 100%);
}

@media (max-width: 540px) {
  .col-md {
    flex: 1 1 100%;
    min-width: 0;
  }
}

@media (min-width: 768px) {
  .col-md-5 {
    width: 41.6667%;
  }

  .col-md-6 {
    width: 50%;
  }
}

@media (min-width: 1024px) {
  .col-lg-3 {
    width: calc((100% - 2.5rem) / 3);
  }

  .col-lg-10 {
    width: 83.3333%;
  }
}

.wrap section {
  padding: 2.25rem 0;
}

.mbr-section-title {
  font-family: 'Plus Jakarta Sans', Inter, ui-sans-serif, system-ui, sans-serif;
  letter-spacing: -0.01em;
  color: rgba(234, 236, 240, 0.96);
}

.mbr-section-subtitle {
  color: var(--muted);
  line-height: 1.55;
}

.display-2 {
  font-size: clamp(1.65rem, 2.8vw, 2.35rem);
  font-weight: 800;
}

.display-5 {
  font-size: 1.12rem;
  font-weight: 800;
}

.display-7 {
  font-size: 0.95rem;
}

/* Video embeds */
.video-wrapper,
.mbr-figure {
  position: relative;
  border-radius: 1.25rem;
  overflow: hidden;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.03);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.video-wrapper:before,
.mbr-figure:before {
  content: "";
  display: block;
  padding-top: 56.25%;
}

.video-wrapper iframe,
.mbr-figure iframe {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  border: 0;
}

/* Buttons (charts page) */
.mbr-section-btn {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
}

.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0.65rem 0.95rem;
  border-radius: 1rem;
  font-weight: 800;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.10);
  background: rgba(255, 255, 255, 0.04);
  color: rgba(226, 232, 240, 0.96);
  transition: transform .16s ease, background-color .16s ease, border-color .16s ease;
}

.btn:hover {
  transform: translateY(-1px);
  background: rgba(255, 255, 255, 0.06);
  border-color: rgba(255, 255, 255, 0.16);
}

.btn:active {
  transform: translateY(0);
}

.btn-primary {
  background: linear-gradient(135deg, rgba(59, 130, 246, 0.92), rgba(37, 99, 235, 0.70));
  border-color: rgba(59, 130, 246, 0.35);
}

.btn-primary:hover {
  border-color: rgba(147, 197, 253, 0.50);
}

.btn-lg {
  padding: 0.7rem 1rem;
  border-radius: 1.1rem;
}

/* Feature cards */
.features026 .item-wrapper {
  height: 100%;
  border-radius: 1.5rem;
  padding: 1rem;
  background:
    radial-gradient(600px 220px at 20% 0%, rgba(59, 130, 246, 0.12), transparent 55%),
    radial-gradient(560px 220px at 90% 30%, rgba(6, 182, 212, 0.10), transparent 60%),
    rgba(255, 255, 255, 0.03);
  border: 1px solid rgba(255, 255, 255, 0.10);
  box-shadow: 0 18px 60px rgba(0, 0, 0, 0.45);
}

.features026 .card-box {
  height: 100%;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
}

.features026 .card-title {
  color: rgba(226, 232, 240, 0.96);
}

.features026 .card-text {
  color: var(--muted);
  margin: 0;
}

.features026 .row {
  display: grid;
  grid-template-columns: 1fr;
  gap: 1.25rem;
}

.features026 .row>.item {
  width: 100%;
}

@media (min-width: 768px) {
  .features026 .row {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (min-width: 1100px) {
  .features026 .row {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

/* Small inline links (IFR/VFR videos, etc.) */
.features026 .card-box>a {
  display: inline-flex;
  align-items: center;
  gap: 0.45rem;
  width: fit-content;
  font-weight: 800;
  font-size: 0.85rem;
  color: rgba(165, 243, 252, 0.92);
  text-decoration: none;
  padding: 0.35rem 0.55rem;
  border-radius: 0.85rem;
  background: rgba(6, 182, 212, 0.10);
  border: 1px solid rgba(6, 182, 212, 0.22);
  margin-right: 0.35rem;
  margin-top: 0.15rem;
}

.features026 .card-box>a:hover {
  background: rgba(6, 182, 212, 0.14);
  border-color: rgba(165, 243, 252, 0.35);
}

.item-mb {
  margin-bottom: 1.25rem;
}

:where(a, button):focus-visible {
  outline: none;
  box-shadow: 0 0 0 2px rgba(13, 22, 38, 0.75), 0 0 0 4px rgba(59, 130, 246, 0.55);
}

.shadow-soft {
  box-shadow: 0 12px 40px rgba(0, 0, 0, 0.45);
}


/* ============================================================
   chartoaci.html — Page Charts OACI
   ============================================================ */

.panel {
  background: var(--surface);
  border: 1px solid var(--border);
  border-radius: 1rem;
  padding: 1.2rem;
}

.links {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

code {
  color: #bfdbfe;
}

.wrap form {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 0.5rem;
  margin-top: 0.9rem;
}

.wrap input {
  background: rgba(13, 22, 38, 0.75);
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  color: var(--text);
  padding: 0.65rem 0.8rem;
  font-size: 0.92rem;
  text-transform: uppercase;
}

.wrap input:focus {
  outline: 2px solid rgba(59, 130, 246, 0.6);
  outline-offset: 1px;
}

@media (max-width: 520px) {
  .wrap form {
    grid-template-columns: 1fr;
  }

  .wrap form button[type="submit"] {
    width: 100%;
    justify-content: center;
  }
}


/* ============================================================
   404.html — Page d'erreur 404
   ============================================================ */

/* Note: body et .card sont déjà définis plus haut.
   Les classes suivantes sont spécifiques à la page 404 */
.btn-primary {
  background: linear-gradient(135deg, #3b82f6, #6366f1);
  transition: opacity .2s;
}

.btn-primary:hover {
  opacity: .88;
}


/* ============================================================
   maintenance.html — Page de maintenance
   ============================================================ */

.progress-bar {
  background: linear-gradient(90deg, #3b82f6, #6366f1, #a78bfa);
  background-size: 200% 100%;
  animation: shimmer 2s linear infinite;
}

@keyframes shimmer {
  0% {
    background-position: 200% 0;
  }

  100% {
    background-position: -200% 0;
  }
}

/* ============================================================
   Accessibility: dark-mode contrast bump
   ============================================================ */

body:not(.light-theme) .text-slate-600 {
  color: #9fb0c6 !important;
}

body:not(.light-theme) .text-slate-500 {
  color: #afbdd0 !important;
}

body:not(.light-theme) #db-msg,
body:not(.light-theme) .text-slate-400 {
  color: #c2cedd !important;
}

/* ============================================================
   Responsive polish — mobile & tablet
   ============================================================ */

@media (min-width: 769px) and (max-width: 1180px) {
  #app-header {
    min-height: 4.5rem;
    padding-left: 1rem;
    padding-right: 1rem;
    gap: 0.75rem;
  }

  #header-brand {
    min-width: 0;
    flex: 1 1 auto;
  }

  #header-brand > div:last-child {
    font-size: 1rem;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #header-actions {
    max-width: min(54vw, 42rem);
    overflow-x: auto;
    scrollbar-width: none;
    -webkit-overflow-scrolling: touch;
  }

  #header-actions::-webkit-scrollbar {
    height: 0;
  }

  #builder-view .max-w-5xl {
    max-width: min(100%, 64rem);
  }

  #builder-hero {
    align-items: stretch;
  }

  #builder-primary-actions {
    width: 100%;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.65rem;
  }

  #builder-primary-actions button {
    justify-content: center;
  }
}

@media (max-width: 1024px) {
  #builder-sidebar-top {
    position: sticky;
    top: 0;
    z-index: 2;
    padding-top: 0.55rem;
    padding-bottom: 0.65rem;
    background: linear-gradient(180deg, rgba(15, 27, 45, 0.98), rgba(15, 27, 45, 0.88));
    backdrop-filter: blur(12px);
    -webkit-backdrop-filter: blur(12px);
  }

  #sidebar-container {
    padding-bottom: 7rem;
  }

  #active-filters-container > .glass,
  #active-filters-container > #empty-state {
    border-radius: 1.35rem !important;
  }
}

@media (max-width: 900px) {
  #header-brand > div:last-child {
    font-size: 1.05rem;
    max-width: calc(100vw - 7.25rem);
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #header-actions {
    padding-top: 0.1rem;
  }

  #header-actions .rfd-links-menu > div {
    position: fixed;
    top: calc(var(--rfd-mobile-header-offset) + 0.4rem);
    left: 0.75rem !important;
    right: 0.75rem !important;
    width: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - var(--rfd-mobile-header-offset) - 1rem);
    overflow-y: auto;
    border-radius: 1.35rem;
    z-index: 200;
  }

  #builder-view .max-w-5xl {
    max-width: 100%;
  }

  #builder-hero {
    padding: 0.95rem;
    border-radius: 1.5rem;
    background: linear-gradient(180deg, rgba(14, 24, 40, 0.56), rgba(14, 24, 40, 0.18));
    border: 1px solid rgba(121, 145, 173, 0.14);
  }

  #builder-status-pills {
    gap: 0.45rem;
  }

  #builder-status-pills > div {
    flex: 1 1 100%;
    min-width: 0;
  }

  #active-filters-container > .glass,
  #active-filters-container > #empty-state {
    padding: 1rem !important;
  }

  #empty-state {
    min-height: 14.5rem;
    padding-inline: 1rem !important;
  }
}

@media (max-width: 768px) {
  #builder-sidebar {
    width: min(88vw, 22rem);
    max-width: 22rem;
    box-shadow: 18px 0 48px rgba(0, 0, 0, 0.35);
  }

  #builder-primary-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.55rem;
  }

  #builder-primary-actions button {
    min-height: 2.85rem;
  }

  #builder-primary-actions #btn-search {
    grid-column: 1 / -1;
  }

  #logo-picker-modal {
    align-items: flex-end;
    padding: 0.75rem;
  }

  #logo-picker-modal > div:first-child {
    width: 100%;
    max-width: none;
    max-height: min(88dvh, 48rem);
    margin: 0;
    padding: 1rem;
    border-radius: 1.5rem 1.5rem 1rem 1rem;
    display: flex;
    flex-direction: column;
  }

  #logo-picker-modal .flex.gap-2.mt-4 {
    flex-wrap: wrap;
    gap: 0.55rem;
  }

  #logo-picker-modal .flex.gap-2.mt-4 > input,
  #logo-picker-modal .flex.gap-2.mt-4 > button {
    min-height: 2.9rem;
  }

  #logo-picker-loading,
  #logo-picker-grid {
    overflow-y: auto;
    padding-right: 0.1rem;
  }

  #logo-picker-loading .grid,
  #logo-picker-grid {
    grid-template-columns: repeat(3, minmax(0, 1fr)) !important;
    gap: 0.65rem !important;
  }

  #logo-picker-grid > * {
    min-width: 0;
  }
}

@media (max-width: 640px) {
  #builder-hero {
    padding: 0.85rem;
    border-radius: 1.25rem;
  }

  #header-brand > div:last-child {
    max-width: calc(100vw - 5.5rem);
    font-size: 0.98rem;
  }

  #header-actions .rfd-links-menu > summary,
  #header-actions > button,
  #header-actions > a {
    min-height: 2.55rem;
  }

  #builder-primary-actions {
    grid-template-columns: 1fr;
  }

  #builder-primary-actions button {
    width: 100%;
  }

  #logo-picker-modal {
    padding: 0.5rem;
  }

  #logo-picker-modal > div:first-child {
    padding: 0.9rem;
    border-radius: 1.25rem 1.25rem 0.9rem 0.9rem;
  }

  #logo-picker-subtitle {
    white-space: normal;
    overflow: visible;
    text-overflow: initial;
  }

  #logo-picker-loading .grid,
  #logo-picker-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr)) !important;
  }

  #logo-picker-grid .bg-white\/5,
  #logo-picker-loading .bg-white\/5 {
    min-height: 4.9rem;
    border-radius: 1rem;
  }

  #fav-modal > div:first-child,
  #api-key-modal > div:first-child,
  #briefing-modal > div:first-child,
  #announcement-modal > div:first-child,
  #presets-modal > div:first-child,
  #login-modal > div:first-child,
  #dbs-modal > div:first-child,
  #popup-changelog > div:first-child,
  #popup-shop > div:first-child {
    max-height: calc(100dvh - 1rem);
    overflow-y: auto;
    margin: 0.5rem;
    padding: 1rem;
  }
}

@media (max-width: 430px) {
  #header-brand > div:last-child {
    max-width: calc(100vw - 4.75rem);
    font-size: 0.92rem;
  }

  #builder-sidebar {
    width: 92vw;
    max-width: 92vw;
  }

  #builder-hero {
    padding: 0.75rem;
    gap: 0.65rem;
  }

  #main-title {
    font-size: 1.28rem;
  }

  #main-subtitle {
    font-size: 0.8rem;
    line-height: 1.45;
  }

  #builder-status-pills > div {
    padding-left: 0.7rem;
    padding-right: 0.7rem;
  }

  #logo-picker-modal > div:first-child {
    padding: 0.8rem;
  }

  #logo-picker-loading .grid,
  #logo-picker-grid {
    gap: 0.55rem !important;
  }
}

/* ============================================================
   Final mobile/tablet polish
   ============================================================ */

@media (max-width: 900px) {
  #builder-view {
    background:
      radial-gradient(620px 180px at 50% -8%, rgba(93, 135, 255, 0.12), transparent 72%),
      linear-gradient(180deg, rgba(255, 255, 255, 0.015), rgba(255, 255, 255, 0));
  }

  #builder-view .p-6,
  #builder-view .md\:p-10 {
    padding-top: 1.05rem;
  }

  #builder-hero {
    padding: 1rem;
    border-radius: 1.6rem;
    box-shadow: 0 16px 36px rgba(3, 10, 24, 0.16);
  }

  #builder-hero > .flex-1 > .flex {
    gap: 0.85rem;
  }

  #main-icon-container {
    width: 2.9rem !important;
    height: 2.9rem !important;
    border-radius: 1rem !important;
  }

  #main-subtitle {
    color: #d4ddeb !important;
    line-height: 1.52;
  }

  #db-msg {
    margin-top: 0.55rem !important;
    font-size: 0.8rem !important;
  }

  #builder-primary-actions {
    margin-top: 0.1rem;
  }

  #builder-primary-actions > button[data-action="reset-all"],
  #builder-primary-actions > button[data-action="save-preset"],
  #btn-search {
    min-height: 3.15rem;
    border-radius: 999px !important;
    font-size: 0.98rem !important;
    font-weight: 800 !important;
  }

  #builder-status-pills {
    margin-top: 0.9rem !important;
  }

  #pill-db,
  #pill-airports {
    min-height: 3.2rem;
    border-radius: 1.15rem !important;
    padding: 0.8rem 0.95rem !important;
    align-items: center;
  }

  #empty-state {
    padding: 1.15rem 1rem !important;
    border-radius: 1.6rem !important;
    text-align: left;
    align-items: stretch;
    justify-content: flex-start;
    min-height: auto;
  }

  .empty-state-orb {
    width: 3.5rem;
    height: 3.5rem;
    margin: 0 auto;
  }

  .empty-state-title {
    font-size: 1.08rem;
    text-align: center;
  }

  .empty-state-copy {
    font-size: 0.98rem;
    line-height: 1.62;
    max-width: 100%;
    text-align: left;
  }

  .empty-state-actions {
    margin-top: 0.15rem;
  }

  .empty-state-actions-label {
    text-align: left;
  }

  .empty-state-chip-grid {
    justify-content: flex-start;
    gap: 0.5rem;
  }

  .empty-state-chip {
    min-width: 0;
    width: calc(50% - 0.25rem);
    justify-content: flex-start;
    padding: 0.78rem 0.95rem;
    border-radius: 1rem;
    font-size: 0.88rem;
  }
}

@media (max-width: 768px) {
  #pill-db {
    display: flex;
    justify-content: space-between;
    gap: 0.6rem;
  }

  #pill-airports {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "airports rowslabel"
      "airports rowsvalue";
    row-gap: 0.18rem;
    column-gap: 0.9rem;
  }

  #pill-airports > span:nth-child(1),
  #pill-airports > span:nth-child(2) {
    grid-area: airports;
    align-self: center;
  }

  #pill-airports > span:nth-child(1) {
    display: inline;
    margin-right: 0.25rem;
  }

  #pill-airports > span:nth-child(2) {
    display: inline;
    font-size: 1rem;
  }

  #pill-airports > span:nth-child(4) {
    grid-area: rowslabel;
    align-self: end;
    justify-self: end;
    font-size: 0.76rem;
    color: #95a7c2;
  }

  #pill-airports > span:nth-child(5) {
    grid-area: rowsvalue;
    justify-self: end;
    font-size: 1rem;
  }

  #results-toolbar {
    padding: 0.8rem 0.85rem;
    border-radius: 1.45rem;
    background: linear-gradient(180deg, rgba(12, 22, 38, 0.88), rgba(12, 22, 38, 0.72));
    border-bottom: 1px solid rgba(121, 145, 173, 0.12);
  }

  #results-toolbar > button[data-action="exit-results"] {
    min-height: 2.7rem;
    font-size: 0.92rem;
    font-weight: 800;
  }

  #results-toolbar-actions {
    gap: 0.5rem;
  }

  #results-toolbar-actions button {
    min-height: 2.7rem;
    border-radius: 999px !important;
    font-size: 0.9rem;
    font-weight: 800;
  }

  #table-results-view #flights-table tbody tr.flight-row {
    border-radius: 1.45rem;
    background:
      radial-gradient(520px 120px at 0% 0%, rgba(93, 135, 255, 0.14), transparent 68%),
      linear-gradient(180deg, rgba(36, 73, 116, 0.22), rgba(20, 47, 77, 0.08)),
      rgba(20, 40, 64, 0.92);
    box-shadow:
      0 14px 28px rgba(3, 10, 24, 0.14),
      inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  #table-results-view #flights-table tbody tr.flight-row.selected {
    box-shadow:
      inset 3px 0 0 rgba(93, 135, 255, 0.95),
      0 16px 32px rgba(3, 10, 24, 0.16);
  }

  #table-results-view #flights-table .col-company {
    gap: 0.08rem;
  }

  #table-results-view #flights-table .col-company > div:first-child {
    gap: 0.4rem !important;
  }

  #table-results-view #flights-table .company-long {
    font-size: 0.8rem;
    color: #c7d4e5 !important;
  }

  #table-results-view #flights-table .mobile-inline-ident {
    color: #c8d5e7 !important;
  }

  #table-results-view #flights-table .col-dep,
  #table-results-view #flights-table .col-arr,
  #table-results-view #flights-table .col-time,
  #table-results-view #flights-table .col-duration {
    border-radius: 1rem !important;
    background: rgba(12, 24, 40, 0.42) !important;
    border-color: rgba(124, 143, 172, 0.16) !important;
    padding: 0.5rem 0.45rem !important;
    display: flex !important;
    flex-direction: column;
    justify-content: center;
    align-items: center;
    gap: 0.28rem;
    min-width: 0;
  }

  #table-results-view #flights-table .col-aircraft {
    border-top-color: rgba(124, 143, 172, 0.14) !important;
    padding-top: 0.52rem !important;
  }

  #table-results-view #flights-table .col-aircraft > div:first-child {
    font-weight: 800;
  }

  #table-results-view #flights-table .badge-dep,
  #table-results-view #flights-table .badge-arr,
  #table-results-view #flights-table .col-time .badge,
  #table-results-view #flights-table .col-duration .badge {
    min-height: 2.35rem;
    border-radius: 999px;
    width: 100%;
    justify-content: center !important;
    text-align: center;
  }

  #table-results-view #flights-table .col-dep .airport-name,
  #table-results-view #flights-table .col-arr .airport-name {
    width: 100%;
    max-width: 100%;
    text-align: center;
  }

  #table-results-view #flights-table .col-time .badge,
  #table-results-view #flights-table .col-duration .badge {
    padding-inline: 0.75rem;
  }

  #table-results-view #flights-table .mobile-cell-label {
    width: 100%;
    text-align: center;
    margin-bottom: 0;
  }

  #table-results-view #flights-table .col-arr::before {
    top: 50%;
  }

  #results-summary-bar {
    margin-top: 0.55rem;
    border-radius: 1.35rem;
    padding: 0.9rem 1rem;
  }

  #results-mobile-actions {
    margin-top: 0.35rem;
    padding: 0.75rem;
    border-radius: 1.35rem;
    background: rgba(13, 22, 38, 0.4);
  }

  #results-mobile-actions > button,
  #results-mobile-actions button {
    min-height: 3rem;
    border-radius: 999px !important;
    font-size: 0.96rem;
    font-weight: 800;
  }

  #results-support-wrap > button,
  #results-support-wrap button[data-action="toggle-mobile-support"] {
    min-height: 3rem;
    border-radius: 999px !important;
    font-size: 0.96rem;
    font-weight: 800;
  }
}

@media (max-width: 640px) {
  #builder-hero {
    padding: 0.95rem 0.9rem;
    border-radius: 1.4rem;
  }

  #main-title {
    font-size: 1.25rem;
    line-height: 1.08;
  }

  #main-subtitle {
    font-size: 0.84rem;
    line-height: 1.55;
  }

  #db-msg {
    font-size: 0.74rem !important;
  }

  .empty-state-chip {
    width: 100%;
  }

  #results-list-scroll {
    padding-right: 0.5rem;
  }

  #table-results-view #flights-table tbody tr.flight-row {
    padding: 0.72rem;
    gap: 0.42rem 0.5rem;
  }

  #table-results-view #flights-table .col-company > div:first-child .company-short {
    font-size: 0.94rem;
  }

  #table-results-view #flights-table .company-long {
    font-size: 0.74rem;
  }

  #table-results-view #flights-table .mobile-inline-ident {
    font-size: 0.68rem;
  }

  #table-results-view #flights-table .col-aircraft > div:first-child {
    font-size: 0.8rem;
  }

  #table-results-view #flights-table .badge-dep,
  #table-results-view #flights-table .badge-arr {
    padding-inline: 0.5rem;
  }

  #table-results-view #flights-table .col-dep,
  #table-results-view #flights-table .col-arr,
  #table-results-view #flights-table .col-time,
  #table-results-view #flights-table .col-duration {
    padding: 0.46rem 0.38rem !important;
    border-radius: 0.9rem !important;
  }

  #table-results-view #flights-table .col-time .badge,
  #table-results-view #flights-table .col-duration .badge {
    min-height: 2.2rem;
    font-size: 0.88rem;
  }

  #table-results-view #flights-table .badge-dep,
  #table-results-view #flights-table .badge-arr {
    min-height: 2.1rem;
  }
}

@media (max-width: 430px) {
  #builder-view .p-6,
  #builder-view .md\:p-10 {
    padding-left: 0.75rem;
    padding-right: 0.75rem;
  }

  #main-icon-container {
    width: 2.7rem !important;
    height: 2.7rem !important;
  }

  #pill-db,
  #pill-airports {
    padding: 0.72rem 0.8rem !important;
  }

  #pill-airports > span:nth-child(4),
  #pill-airports > span:nth-child(5) {
    font-size: 0.88rem;
  }

  #table-results-view #flights-table tbody tr.flight-row {
    border-radius: 1.25rem;
  }

  #results-summary-bar {
    padding: 0.8rem 0.9rem;
  }

  #results-mobile-actions {
    padding: 0.65rem;
  }
}

/* Final premium polish for mobile and tablet result cards */
@media (max-width: 900px) {
  #table-results-view #flights-table tbody tr.flight-row {
    position: relative;
    overflow: hidden;
    border: 1px solid rgba(124, 143, 172, 0.16);
    background:
      radial-gradient(220px 120px at 0% 0%, rgba(96, 165, 250, 0.18), transparent 72%),
      linear-gradient(180deg, rgba(34, 72, 121, 0.96) 0%, rgba(28, 63, 107, 0.94) 100%);
    box-shadow:
      0 14px 32px rgba(2, 8, 23, 0.28),
      inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  #table-results-view #flights-table tbody tr.flight-row::after {
    content: '';
    position: absolute;
    inset: 0;
    border-radius: inherit;
    pointer-events: none;
    box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.04);
  }

  #table-results-view #flights-table tbody tr.flight-row.selected {
    background:
      radial-gradient(240px 130px at 0% 0%, rgba(99, 102, 241, 0.26), transparent 74%),
      linear-gradient(180deg, rgba(35, 78, 132, 0.98) 0%, rgba(27, 66, 112, 0.96) 100%);
    box-shadow:
      0 18px 38px rgba(15, 23, 42, 0.36),
      inset 0 1px 0 rgba(255, 255, 255, 0.08);
  }

  #table-results-view #flights-table .col-logo {
    align-self: start;
    padding-top: 0.1rem !important;
  }

  #table-results-view #flights-table .logo-slot {
    border-radius: 1.05rem;
    padding: 0.22rem;
    box-shadow:
      0 10px 24px rgba(15, 23, 42, 0.24),
      inset 0 0 0 1px rgba(226, 232, 240, 0.72);
  }

  #table-results-view #flights-table .col-company {
    gap: 0.26rem;
  }

  #table-results-view #flights-table .col-company > div:first-child {
    align-items: flex-start;
    gap: 0.38rem;
  }

  #table-results-view #flights-table .company-short {
    line-height: 1.04;
    text-wrap: balance;
  }

  #table-results-view #flights-table .company-long {
    color: rgba(226, 232, 240, 0.8) !important;
    font-size: 0.79rem;
    line-height: 1.22;
  }

  #table-results-view #flights-table .mobile-inline-ident {
    color: rgba(226, 232, 240, 0.88) !important;
    letter-spacing: 0.015em;
  }

  #table-results-view #flights-table .col-aircraft {
    display: flex;
    flex-direction: column;
    align-items: center;
    gap: 0.18rem;
    padding: 0.62rem 0.7rem 0.15rem !important;
    border-top: 1px solid rgba(148, 163, 184, 0.14) !important;
  }

  #table-results-view #flights-table .col-aircraft > div:first-child {
    max-width: 100%;
    color: #f8fafc;
    letter-spacing: -0.015em;
    text-wrap: balance;
  }

  #table-results-view #flights-table .aircraft-reg {
    color: rgba(191, 219, 254, 0.86) !important;
  }

  #table-results-view #flights-table .col-dep,
  #table-results-view #flights-table .col-arr,
  #table-results-view #flights-table .col-time,
  #table-results-view #flights-table .col-duration {
    background: linear-gradient(180deg, rgba(11, 24, 40, 0.24), rgba(8, 19, 33, 0.34)) !important;
    border-color: rgba(148, 163, 184, 0.14) !important;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  #table-results-view #flights-table .badge-dep,
  #table-results-view #flights-table .badge-arr {
    min-height: 2.6rem;
    padding-inline: 0.92rem;
    border-radius: 999px;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.05);
  }

  #table-results-view #flights-table .col-time .badge,
  #table-results-view #flights-table .col-duration .badge {
    min-height: 2.55rem;
    border-radius: 999px;
    font-weight: 700;
    letter-spacing: 0.01em;
    box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.04);
  }

  #table-results-view #flights-table .duration-dist {
    width: 100%;
    margin-top: 0.1rem !important;
    text-align: center;
    color: rgba(191, 219, 254, 0.88) !important;
    font-size: 0.74rem;
    font-weight: 600;
    letter-spacing: 0.01em;
  }

  #table-results-view #flights-table .duration-diff {
    width: 100%;
    margin-top: 0.08rem !important;
    text-align: center;
  }
}

@media (min-width: 431px) and (max-width: 900px) {
  #table-results-view #flights-table tbody tr.flight-row {
    grid-template-columns: 4.15rem minmax(0, 1fr) minmax(0, 1fr);
    grid-template-areas:
      "logo company company"
      "logo aircraft aircraft"
      "dep dep arr"
      "time duration duration";
    gap: 0.72rem 0.82rem;
    padding: 1rem;
    border-radius: 1.7rem;
  }

  #table-results-view #flights-table .logo-slot {
    width: 4.15rem;
    height: 4.15rem;
  }

  #table-results-view #flights-table .company-short {
    font-size: 1.5rem;
  }

  #table-results-view #flights-table .mobile-inline-ident {
    font-size: 0.88rem;
  }

  #table-results-view #flights-table .col-aircraft > div:first-child {
    font-size: 1rem;
  }

  #table-results-view #flights-table .col-dep,
  #table-results-view #flights-table .col-arr,
  #table-results-view #flights-table .col-time,
  #table-results-view #flights-table .col-duration {
    padding: 0.72rem 0.78rem !important;
    border-radius: 1.1rem !important;
  }

  #table-results-view #flights-table .mobile-cell-label {
    font-size: 0.62rem;
    letter-spacing: 0.16em;
  }

  #table-results-view #flights-table .badge-dep,
  #table-results-view #flights-table .badge-arr,
  #table-results-view #flights-table .col-time .badge,
  #table-results-view #flights-table .col-duration .badge {
    font-size: 0.96rem;
  }
}

@media (max-width: 430px) {
  #table-results-view #flights-table tbody tr.flight-row {
    border-radius: 1.35rem;
    padding: 0.76rem;
    gap: 0.52rem 0.52rem;
    background:
      radial-gradient(190px 96px at 0% 0%, rgba(96, 165, 250, 0.2), transparent 72%),
      linear-gradient(180deg, rgba(32, 69, 116, 0.98) 0%, rgba(27, 60, 101, 0.96) 100%);
  }

  #table-results-view #flights-table .logo-slot {
    width: 3.35rem;
    height: 3.35rem;
    border-radius: 0.95rem;
  }

  #table-results-view #flights-table .company-short {
    font-size: 1.02rem !important;
  }

  #table-results-view #flights-table .mobile-inline-ident {
    font-size: 0.77rem !important;
    margin-top: 0.18rem;
  }

  #table-results-view #flights-table .col-aircraft {
    padding-top: 0.48rem !important;
  }

  #table-results-view #flights-table .col-aircraft > div:first-child {
    font-size: 0.9rem !important;
  }

  #table-results-view #flights-table .col-dep,
  #table-results-view #flights-table .col-arr {
    min-height: 4.15rem;
  }

  #table-results-view #flights-table .col-time,
  #table-results-view #flights-table .col-duration {
    min-height: 4.65rem;
  }

  #table-results-view #flights-table .badge-dep,
  #table-results-view #flights-table .badge-arr {
    min-height: 2.35rem;
    padding-inline: 0.72rem;
  }

  #table-results-view #flights-table .col-time .badge,
  #table-results-view #flights-table .col-duration .badge {
    min-height: 2.35rem;
    padding-inline: 0.72rem;
    font-size: 0.9rem;
  }

  #table-results-view #flights-table .duration-dist {
    font-size: 0.71rem;
  }
}

/* ============================================================
   Mobile-first layout refresh
   ============================================================ */

.mobile-mode-tab {
  min-height: 52px;
  border-radius: 1rem;
  border: 1px solid transparent;
  background: transparent;
  color: rgba(226, 232, 240, 0.72);
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 0.28rem;
  padding: 0.45rem 0.35rem;
  text-align: center;
  font-size: 0.68rem;
  font-weight: 800;
  line-height: 1.1;
  transition: background-color .18s ease, color .18s ease, border-color .18s ease, transform .18s ease;
}

.mobile-mode-tab i {
  font-size: 0.95rem;
}

.mobile-mode-tab.active {
  background: linear-gradient(180deg, rgba(59, 130, 246, 0.28), rgba(37, 99, 235, 0.18));
  border-color: rgba(96, 165, 250, 0.32);
  color: #fff;
  box-shadow: inset 0 1px 0 rgba(255, 255, 255, 0.06);
}

.mobile-mode-tab:active {
  transform: translateY(1px);
}

@media (max-width: 1024px) {
  html {
    font-size: clamp(14px, 1.7vw, 16px);
  }

  #app-workspace {
    padding-bottom: 0;
  }

  #builder-sidebar {
    width: min(88vw, 24rem);
  }

  #builder-sidebar .sidebar-item,
  #builder-sidebar button[data-action="toggle-filter"],
  #header-actions button,
  #header-actions a,
  #results-toolbar-actions button,
  #results-mobile-actions button,
  #builder-primary-actions button,
  .rfd-links-item,
  .rfd-links-go,
  .rfd-actions-panel button,
  .mobile-mode-tab {
    min-height: 44px;
  }

  #active-filters-container > .glass,
  #active-filters-container > #empty-state {
    padding: 1rem !important;
  }

  #active-filters-container input[type="text"],
  #active-filters-container input[type="search"],
  #active-filters-container input[type="number"],
  #active-filters-container select,
  #active-filters-container [data-match-dd-trigger],
  #active-filters-container [data-provider-dd-trigger],
  #active-filters-container [data-action="open-dropdown"] {
    min-height: 46px;
  }

  #active-filters-container .flex.items-center.gap-3,
  #active-filters-container .flex.items-center.justify-between.gap-3,
  #active-filters-container .flex.items-center.justify-between.border-t {
    flex-wrap: wrap;
  }

  #active-filters-container .builder-settings-grid,
  #active-filters-container .rfd-links-inline {
    width: 100%;
  }
}

@media (max-width: 1024px) {
  :root {
    --rfd-mobile-header-offset: 5rem;
  }

  .rfd-viewport {
    padding-bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
  }

  #mobile-mode-tabbar {
    display: block !important;
  }

  #btn-mobile-modes,
  #mobile-modes-menu {
    display: none !important;
  }

  #app-workspace {
    flex-direction: column;
    overflow: visible;
  }

  #builder-sidebar {
    position: fixed;
    top: calc(var(--rfd-mobile-header-offset) + 0.5rem);
    left: 0.75rem;
    bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px));
    z-index: 80;
    border-radius: 1.4rem !important;
    box-shadow: 0 24px 48px rgba(2, 8, 23, 0.42) !important;
  }

  #builder-view {
    padding-inline: 0;
  }

  #builder-hero,
  #builder-view .rfd-shell,
  #table-results-view,
  #results-list-scroll {
    padding-inline: 0;
  }

  #builder-sidebar-top {
    padding-inline: 1rem;
  }

  #builder-primary-actions {
    position: sticky;
    bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px));
    z-index: 18;
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.65rem;
    padding: 0.75rem;
    margin-top: 0.5rem;
    border-radius: 1.25rem;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(16px);
    box-shadow: 0 12px 30px rgba(2, 8, 23, 0.28);
  }

  #builder-primary-actions > button {
    width: 100%;
    justify-content: center;
  }

  #builder-primary-actions > #btn-search {
    grid-column: 1 / -1;
    min-height: 50px;
    font-size: 0.95rem;
  }

  #results-toolbar {
    min-height: auto;
    height: auto;
    gap: 0.75rem;
    padding: 0.85rem 0.9rem;
    flex-wrap: wrap;
    align-items: stretch;
  }

  #results-toolbar > button[data-action="exit-results"] {
    width: 100%;
    min-height: 44px;
    justify-content: center;
    border-radius: 1rem;
    background: rgba(255, 255, 255, 0.05);
  }

  #results-toolbar-actions {
    width: 100%;
    display: grid !important;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 0.55rem;
  }

  #results-toolbar-actions > [data-i18n="results.title"] {
    grid-column: 1 / -1;
    text-align: center;
    padding-bottom: 0.15rem;
  }

  #results-toolbar-actions button {
    width: 100%;
    justify-content: center;
    padding-inline: 0.5rem;
  }

  #table-results-view > .flex-1.flex.overflow-hidden {
    flex-direction: column;
    overflow-y: auto;
  }

  #results-main-column {
    min-height: 0;
  }

  #results-mobile-actions {
    position: sticky;
    bottom: calc(5.5rem + env(safe-area-inset-bottom, 0px));
    z-index: 16;
    margin: 0.5rem 0.75rem 0;
    border-radius: 1.25rem;
    background: rgba(15, 23, 42, 0.82);
    backdrop-filter: blur(14px);
  }

  #results-mobile-actions > button,
  #results-mobile-actions button,
  #results-support-wrap button[data-action="toggle-mobile-support"] {
    min-height: 46px;
    border-radius: 1rem;
  }
}

@media (max-width: 480px) {
  html {
    font-size: 14px;
  }

  #app-header {
    padding-inline: 0.75rem;
  }

  #header-brand .text-lg {
    font-size: 1rem;
  }

  #header-actions {
    gap: 0.35rem;
  }

  #header-actions .rfd-links-menu > summary,
  #header-actions > button,
  #header-actions > a {
    min-width: 44px;
    min-height: 44px;
    padding-inline: 0.8rem;
  }

  #active-filters-container > .glass,
  #active-filters-container > #empty-state {
    border-radius: 1.15rem !important;
  }

  #active-filters-container .w-full.relative,
  #active-filters-container .relative[data-match-dd],
  #active-filters-container .relative[data-provider-dd] {
    width: 100%;
  }

  #active-filters-container .flex.items-center.gap-3 > * {
    flex: 1 1 100%;
  }

  #active-filters-container [data-time-root="temps"] .grid,
  #active-filters-container [data-multiple-manual] {
    grid-template-columns: 1fr !important;
    display: grid !important;
    width: 100%;
  }

  #active-filters-container [data-multiple-manual] .relative,
  #active-filters-container [data-multiple-manual] input,
  #active-filters-container [data-time-root="temps"] .space-y-1,
  #active-filters-container [data-time-root="temps"] input {
    width: 100%;
  }

  #results-toolbar-actions {
    grid-template-columns: 1fr;
  }

  #results-toolbar-actions button {
    min-height: 46px;
  }
}

/* ============================================================
   Results actions bottom sheet
   ============================================================ */

#results-actions-sheet-backdrop {
  position: absolute;
  inset: 0;
  z-index: 44;
  display: block;
  border: 0;
  background: rgba(2, 8, 23, 0.58);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 1;
  transition: opacity 280ms cubic-bezier(.22, 1, .36, 1);
}

#results-actions-sheet-backdrop.hidden {
  display: block;
  opacity: 0;
  pointer-events: none;
}

.results-sheet-handle-wrap {
  display: none;
}

@media (max-width: 1024px) {
  #table-results-view .rfd-actions-panel {
    display: flex !important;
    position: fixed;
    left: 0;
    right: 0;
    bottom: 0;
    width: auto !important;
    max-width: none;
    z-index: 45;
    border-radius: 20px 20px 0 0 !important;
    border: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-bottom: 0 !important;
    background:
      linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.96)) !important;
    box-shadow:
      0 -18px 44px rgba(2, 8, 23, 0.42),
      0 -2px 0 rgba(255, 255, 255, 0.04) inset !important;
    transform: translate3d(0, calc(100% - 5.5rem), 0);
    transition:
      transform 420ms cubic-bezier(.22, 1, .36, 1),
      box-shadow 260ms ease;
    will-change: transform;
    overflow: hidden;
  }

  #table-results-view .rfd-actions-panel[data-sheet-state="collapsed"] {
    transform: translate3d(0, calc(100% - 5.5rem), 0);
  }

  #table-results-view .rfd-actions-panel[data-sheet-state="half"] {
    transform: translate3d(0, calc(100% - 52dvh), 0);
  }

  #table-results-view .rfd-actions-panel[data-sheet-state="full"] {
    transform: translate3d(0, 0, 0);
  }

  #table-results-view .rfd-actions-panel.is-dragging {
    transition: none;
    transform: translate3d(0, calc(
      (var(--results-sheet-base, 0px)) + var(--results-sheet-drag, 0px)
    ), 0);
  }

  #table-results-view .rfd-actions-panel[data-sheet-state="collapsed"].is-dragging {
    --results-sheet-base: calc(100% - 5.5rem);
  }

  #table-results-view .rfd-actions-panel[data-sheet-state="half"].is-dragging {
    --results-sheet-base: calc(100% - 52dvh);
  }

  #table-results-view .rfd-actions-panel[data-sheet-state="full"].is-dragging {
    --results-sheet-base: 0px;
  }

  .results-sheet-handle-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 34px;
    padding: 0.55rem 1rem 0.25rem;
    background: transparent;
    border: 0;
    cursor: grab;
    touch-action: none;
  }

  .results-sheet-handle-wrap:active {
    cursor: grabbing;
  }

  .results-sheet-handle {
    width: 3.4rem;
    height: 0.34rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(226, 232, 240, 0.58), rgba(148, 163, 184, 0.94));
    box-shadow: 0 1px 0 rgba(255, 255, 255, 0.16);
  }

  .results-sheet-close {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    flex: 0 0 auto;
  }

  .results-sheet-close:active {
    transform: translateY(1px);
  }

  #table-results-view .rfd-actions-panel .rfd-dock-header {
    padding-top: 0.45rem !important;
    padding-bottom: 0.9rem !important;
    position: sticky;
    top: 0;
    z-index: 2;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.9));
    backdrop-filter: blur(16px);
  }

  #table-results-view .rfd-actions-panel > .flex-1 {
    overflow-y: auto;
    padding-bottom: calc(1.4rem + env(safe-area-inset-bottom, 0px));
  }

  #table-results-view .rfd-actions-panel .dock-card {
    border-radius: 1.25rem !important;
  }

  #table-results-view .rfd-actions-panel button {
    min-height: 46px;
  }

  #results-mobile-actions {
    display: none !important;
  }
}

@media (min-width: 1025px) {
  #results-actions-sheet-backdrop {
    display: none !important;
  }

  .results-sheet-handle-wrap {
    display: none !important;
  }

  .results-sheet-close {
    display: none !important;
  }

  #table-results-view .rfd-actions-panel {
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    transform: none !important;
    transition: none;
  }
}

/* ============================================================
   Builder mobile sheet
   ============================================================ */

#builder-mobile-sheet-backdrop {
  position: fixed;
  inset: 0;
  z-index: 58;
  display: block;
  border: 0;
  background: rgba(2, 8, 23, 0.52);
  backdrop-filter: blur(4px);
  -webkit-backdrop-filter: blur(4px);
  opacity: 1;
  transition: opacity 280ms cubic-bezier(.22, 1, .36, 1);
}

#builder-mobile-sheet-backdrop.hidden {
  display: block;
  opacity: 0;
  pointer-events: none;
}

#builder-mobile-sheet {
  display: none;
}

@media (max-width: 1024px) {
  #builder-sidebar,
  #sidebar-backdrop {
    display: none !important;
  }

  #app-header {
    position: sticky;
    top: 0;
    z-index: 72;
    justify-content: center;
    min-height: 4.5rem;
    padding-inline: 0.85rem;
  }

  #header-brand {
    position: absolute;
    left: 50%;
    transform: translateX(-50%);
    justify-content: center;
    text-align: center;
    pointer-events: none;
  }

  #header-brand .app-logo-slot {
    pointer-events: auto;
  }

  #header-brand > div:last-child {
    font-size: 1.05rem;
    font-weight: 800;
    letter-spacing: -0.02em;
  }

  #header-actions {
    width: 100%;
    justify-content: space-between;
    gap: 0.45rem;
    padding-inline-end: 0;
  }

  #header-actions > * {
    flex: 0 0 auto;
  }

  #header-actions .rfd-links-menu > summary,
  #header-actions > button,
  #header-actions > a {
    min-width: 44px;
    min-height: 44px;
    padding-inline: 0.85rem;
  }

  #header-actions .rfd-links-menu > summary {
    border-radius: 14px;
  }

  #builder-view {
    padding-bottom: calc(20rem + 6rem + env(safe-area-inset-bottom, 0px));
  }

  #builder-view .p-6,
  #builder-view .md\:p-10 {
    padding: 1rem 0.9rem 0 !important;
  }

  #builder-hero {
    margin-bottom: 0 !important;
    padding: 0 !important;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
  }

  #builder-hero::before,
  #builder-hero > #main-icon-container {
    display: none !important;
  }

  #builder-mobile-sheet {
    position: fixed;
    left: 0.75rem;
    right: 0.75rem;
    bottom: calc(5.9rem + env(safe-area-inset-bottom, 0px));
    z-index: 59;
    display: flex;
    flex-direction: column;
    border-radius: 20px 20px 0 0;
    border: 1px solid rgba(148, 163, 184, 0.16);
    border-bottom: 0;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.985), rgba(15, 23, 42, 0.96));
    box-shadow: 0 -18px 44px rgba(2, 8, 23, 0.4);
    overflow: hidden;
    transform: translate3d(0, calc(100% - 5.7rem), 0);
    transition: transform 420ms cubic-bezier(.22, 1, .36, 1), box-shadow 260ms ease;
    will-change: transform;
  }

  #builder-mobile-sheet[data-sheet-state="collapsed"] {
    transform: translate3d(0, calc(100% - 5.7rem), 0);
  }

  #builder-mobile-sheet[data-sheet-state="half"] {
    transform: translate3d(0, calc(100% - 57dvh), 0);
  }

  #builder-mobile-sheet[data-sheet-state="full"] {
    transform: translate3d(0, calc(0.75rem - var(--rfd-mobile-header-offset)), 0);
  }

  #builder-mobile-sheet.is-dragging {
    transition: none;
    transform: translate3d(0, calc(var(--builder-sheet-base, 0px) + var(--builder-sheet-drag, 0px)), 0);
  }

  #builder-mobile-sheet[data-sheet-state="collapsed"].is-dragging {
    --builder-sheet-base: calc(100% - 5.7rem);
  }

  #builder-mobile-sheet[data-sheet-state="half"].is-dragging {
    --builder-sheet-base: calc(100% - 57dvh);
  }

  #builder-mobile-sheet[data-sheet-state="full"].is-dragging {
    --builder-sheet-base: calc(0.75rem - var(--rfd-mobile-header-offset));
  }

  .builder-sheet-handle-wrap {
    display: flex;
    align-items: center;
    justify-content: center;
    width: 100%;
    min-height: 32px;
    padding: 0.55rem 1rem 0.25rem;
    border: 0;
    background: transparent;
    touch-action: none;
  }

  .builder-sheet-handle {
    width: 3.4rem;
    height: 0.34rem;
    border-radius: 999px;
    background: linear-gradient(90deg, rgba(226, 232, 240, 0.56), rgba(148, 163, 184, 0.92));
  }

  .builder-mobile-sheet-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 0.15rem 1rem 0.9rem;
    border-bottom: 1px solid rgba(148, 163, 184, 0.12);
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.98), rgba(15, 23, 42, 0.9));
  }

  .builder-mobile-sheet-kicker {
    font-size: 0.7rem;
    line-height: 1;
    text-transform: uppercase;
    letter-spacing: 0.18em;
    font-weight: 800;
    color: #93c5fd;
  }

  .builder-mobile-sheet-title {
    margin-top: 0.35rem;
    font-size: 1.08rem;
    font-weight: 800;
    color: #fff;
  }

  .builder-sheet-close {
    width: 44px;
    height: 44px;
    border-radius: 999px;
    border: 1px solid rgba(148, 163, 184, 0.2);
    background: rgba(255, 255, 255, 0.06);
    color: #f8fafc;
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 auto;
  }

  #builder-mobile-sheet-content {
    overflow-y: auto;
    padding: 0.9rem 0.95rem calc(1.2rem + env(safe-area-inset-bottom, 0px));
  }

  #builder-mobile-sheet #builder-sidebar-top {
    display: flex;
    align-items: center;
    justify-content: space-between;
    padding: 0 0 0.8rem !important;
    margin-bottom: 0.8rem !important;
    border-bottom: 1px solid rgba(148, 163, 184, 0.1);
  }

  #builder-mobile-sheet #builder-sidebar-top button[data-action="toggle-sidebar"] {
    display: none !important;
  }

  #builder-mobile-sheet #builder-sidebar-title {
    font-size: 0.78rem;
    color: #cbd5e1;
    letter-spacing: 0.18em;
  }

  #builder-mobile-sheet #filter-count {
    min-height: 32px;
    padding-inline: 0.65rem;
    font-size: 0.72rem;
    font-weight: 800;
  }

  #builder-mobile-sheet #sidebar-container {
    padding-inline: 0 !important;
    padding-bottom: 0 !important;
    space-y: 0.35rem;
  }

  #builder-mobile-sheet .sidebar-item {
    min-height: 48px;
    border-radius: 1rem !important;
    font-size: 0.9rem;
  }

  #builder-mobile-sheet #main-title {
    font-size: clamp(1.3rem, 4.8vw, 1.75rem);
    line-height: 1.08;
    letter-spacing: -0.03em;
  }

  #builder-mobile-sheet #main-subtitle {
    margin-top: 0.45rem;
    font-size: 0.93rem;
    line-height: 1.5;
    color: rgba(226, 232, 240, 0.84);
  }

  #builder-mobile-sheet #db-msg {
    margin-top: 0.6rem !important;
    font-size: 0.88rem !important;
    line-height: 1.45;
    color: rgba(226, 232, 240, 0.9) !important;
    font-weight: 700;
  }

  #builder-mobile-sheet #builder-primary-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.7rem;
    margin-top: 0.95rem;
    padding: 0;
    position: static;
    background: transparent;
    box-shadow: none;
  }

  #builder-mobile-sheet #builder-primary-actions > button[data-action="reset-all"],
  #builder-mobile-sheet #builder-primary-actions > button[data-action="save-preset"] {
    min-height: 46px;
    justify-content: center;
    font-size: 0.84rem;
  }

  #builder-mobile-sheet #builder-primary-actions > #btn-search {
    grid-column: 1 / -1;
    min-height: 52px;
    width: 100%;
    justify-content: center;
    font-size: 0.98rem;
    letter-spacing: 0.16em;
  }

  #builder-mobile-sheet #builder-status-pills {
    display: grid !important;
    grid-template-columns: 1fr;
    gap: 0.65rem;
    margin-top: 1rem;
  }

  #builder-mobile-sheet #pill-db,
  #builder-mobile-sheet #pill-airports {
    min-height: 52px;
    border-radius: 1rem;
    padding: 0.9rem 1rem;
    background: rgba(255, 255, 255, 0.06) !important;
    border: 1px solid rgba(148, 163, 184, 0.14) !important;
    font-size: 0.86rem;
    font-weight: 700;
    line-height: 1.45;
    color: #e2e8f0 !important;
  }

  #builder-mobile-sheet #pill-db-val,
  #builder-mobile-sheet #pill-airports-val {
    color: #f8fafc !important;
    font-weight: 800;
    font-size: 0.92rem;
  }

  #builder-mobile-sheet #pill-rows-val {
    color: #f8fafc !important;
    font-weight: 900;
    font-size: 1.02rem;
    letter-spacing: 0.01em;
  }

  #builder-mobile-sheet #pill-airports .mx-2 {
    color: rgba(148, 163, 184, 0.46) !important;
  }

  #builder-mobile-sheet #system-status-panel {
    margin-top: 0.8rem;
  }

  body.builder-sheet-open,
  body.results-sheet-open {
    overflow: hidden;
  }
}

@media (max-width: 640px) {
  #app-header {
    min-height: 4rem;
    padding-inline: 0.7rem;
  }

  #header-brand .app-logo-slot {
    transform: scale(0.92);
    transform-origin: center;
  }

  #header-brand > div:last-child {
    font-size: 0.98rem;
    letter-spacing: -0.03em;
  }

  #header-actions {
    gap: 0.35rem;
  }

  #header-actions .rfd-links-menu > summary,
  #header-actions > button,
  #header-actions > a {
    min-width: 44px;
    min-height: 44px;
    padding-inline: 0.7rem;
  }

  #header-actions .rfd-links-menu > summary .rfd-links-chevron {
    display: none;
  }

  #btn-load-db {
    padding-inline: 0.8rem !important;
  }
}

@media (max-width: 540px) {
  #app-header {
    padding-inline: 0.6rem;
  }

  #header-brand {
    max-width: calc(100% - 8.75rem);
  }

  #header-brand > div:last-child {
    font-size: 0.92rem;
  }

  #header-actions {
    gap: 0.3rem;
  }

  #header-actions [data-mobile-priority="secondary"] {
    display: none !important;
  }

  #header-actions .rfd-links-menu > summary,
  #header-actions > button,
  #header-actions > a {
    padding-inline: 0.65rem;
    border-radius: 13px;
  }

  #btn-load-db .hidden.sm\:inline,
  #btn-shop .hidden.sm\:inline {
    display: none !important;
  }
}

@media (max-width: 430px) {
  #app-header {
    min-height: 3.8rem;
    padding-inline: 0.5rem;
  }

  #header-brand {
    max-width: calc(100% - 7.5rem);
  }

  #header-brand .app-logo-slot {
    transform: scale(0.86);
  }

  #header-brand > div:last-child {
    font-size: 0.86rem;
    font-weight: 780;
  }

  #header-actions {
    gap: 0.25rem;
  }

  #header-actions .rfd-links-menu > summary,
  #header-actions > button,
  #header-actions > a {
    min-width: 42px;
    min-height: 42px;
    padding-inline: 0.58rem;
  }
}

@media (max-width: 768px) {
  #builder-mobile-sheet {
    left: 0.5rem;
    right: 0.5rem;
    bottom: calc(5.6rem + env(safe-area-inset-bottom, 0px));
  }

  #builder-mobile-sheet[data-sheet-state="half"] {
    transform: translate3d(0, calc(100% - 62dvh), 0);
  }
}

@media (min-width: 1025px) {
  #builder-mobile-sheet,
  #builder-mobile-sheet-backdrop {
    display: none !important;
  }
}

/* ============================================================
   Responsive refinement: mobile portrait / tablet landscape
   ============================================================ */

#mobile-mode-chips,
#tablet-mode-rail {
  display: none;
}

.mobile-mode-chips-scroll,
.tablet-mode-rail-grid {
  display: flex;
  gap: 0.6rem;
}

.mobile-mode-chip,
.tablet-mode-pill {
  min-height: 48px;
  border-radius: 999px;
  border: 1px solid rgba(148, 163, 184, 0.16);
  background: rgba(255, 255, 255, 0.05);
  color: #cbd5e1;
  font-size: 0.76rem;
  font-weight: 800;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.5rem;
  transition: background 180ms ease, color 180ms ease, border-color 180ms ease, transform 180ms ease;
}

.mobile-mode-chip.active,
.tablet-mode-pill.active {
  color: #fff;
  border-color: rgba(96, 165, 250, 0.35);
  background: linear-gradient(135deg, rgba(37, 99, 235, 0.34), rgba(14, 165, 233, 0.2));
  box-shadow: 0 12px 28px rgba(37, 99, 235, 0.18);
}

@media (max-width: 767px) {
  #mobile-mode-tabbar {
    display: block !important;
  }

  #tablet-mode-rail {
    display: none !important;
  }

  #builder-view {
    padding-bottom: calc(23rem + 6rem + env(safe-area-inset-bottom, 0px));
  }

  #builder-mobile-sheet-backdrop {
    background: rgba(2, 8, 23, 0.4);
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  #builder-mobile-sheet {
    left: 0.55rem;
    right: 0.55rem;
    bottom: calc(5.65rem + env(safe-area-inset-bottom, 0px));
    border-radius: 24px 24px 0 0;
  }

  #builder-mobile-sheet[data-sheet-state="half"] {
    transform: translate3d(0, calc(100% - 66dvh), 0);
  }

  #builder-mobile-sheet #builder-primary-actions > button[data-action="reset-all"],
  #builder-mobile-sheet #builder-primary-actions > button[data-action="save-preset"],
  #builder-mobile-sheet #builder-primary-actions > #btn-search,
  #results-mobile-actions > button,
  #results-mobile-actions button,
  #results-support-wrap button[data-action="toggle-mobile-support"] {
    min-height: 48px;
  }

  #mobile-mode-chips {
    display: block !important;
    order: 3;
  }

  .mobile-mode-chips-scroll {
    overflow-x: auto;
    padding-bottom: 0.15rem;
    scroll-snap-type: x proximity;
    -ms-overflow-style: none;
    scrollbar-width: none;
  }

  .mobile-mode-chips-scroll::-webkit-scrollbar {
    display: none;
  }

  .mobile-mode-chip {
    flex: 0 0 auto;
    padding: 0.8rem 0.95rem;
    scroll-snap-align: start;
  }

  #builder-mobile-sheet #db-msg,
  #builder-mobile-sheet #pill-db,
  #builder-mobile-sheet #pill-airports {
    color: rgba(241, 245, 249, 0.96) !important;
  }

  #builder-mobile-sheet #pill-rows-val {
    font-size: 1.08rem;
    font-weight: 900;
  }
}

@media (max-width: 479px) {
  #mobile-mode-tabbar .mobile-mode-tab {
    min-height: 52px;
  }

  #builder-mobile-sheet {
    left: 0;
    right: 0;
    bottom: 0;
    border-radius: 24px 24px 0 0;
  }

  #builder-mobile-sheet[data-sheet-state="half"] {
    transform: translate3d(0, calc(100% - 68dvh), 0);
  }

  #builder-mobile-sheet #builder-primary-actions {
    gap: 0.6rem;
  }

  #builder-mobile-sheet #builder-primary-actions > button[data-action="reset-all"],
  #builder-mobile-sheet #builder-primary-actions > button[data-action="save-preset"] {
    font-size: 0.8rem;
  }

  #builder-mobile-sheet #builder-primary-actions > #btn-search {
    min-height: 54px;
  }

  #results-actions-sheet-backdrop {
    backdrop-filter: blur(10px);
    -webkit-backdrop-filter: blur(10px);
  }

  #table-results-view .rfd-actions-panel[data-sheet-state="half"] {
    transform: translate3d(0, calc(100% - 66dvh), 0);
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  #mobile-mode-tabbar,
  #builder-mobile-sheet,
  #builder-mobile-sheet-backdrop {
    display: none !important;
  }

  #app-workspace {
    display: grid;
    grid-template-columns: minmax(270px, 30%) minmax(0, 70%);
    align-items: stretch;
    overflow: hidden;
  }

  #builder-sidebar {
    position: relative !important;
    top: auto !important;
    left: auto !important;
    bottom: auto !important;
    display: flex !important;
    width: auto !important;
    min-width: 0;
    border-right: 1px solid rgba(148, 163, 184, 0.12);
    border-radius: 0 !important;
    box-shadow: none !important;
    background: linear-gradient(180deg, rgba(15, 23, 42, 0.88), rgba(15, 23, 42, 0.74));
  }

  #builder-sidebar.builder-sidebar-collapsed {
    width: 5.25rem !important;
    min-width: 5.25rem !important;
  }

  #builder-sidebar-top {
    padding-inline: 1rem;
    padding-top: 1rem;
  }

  #builder-sidebar-top button[data-action="toggle-sidebar"] {
    display: inline-flex !important;
    width: 2.75rem;
    height: 2.75rem;
  }

  #builder-sidebar.builder-sidebar-collapsed [data-sidebar-toggle-icon] {
    transform: rotate(180deg);
  }

  #tablet-mode-rail {
    display: block !important;
  }

  .tablet-mode-rail-grid {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tablet-mode-pill {
    width: 100%;
    padding: 0.8rem 0.7rem;
  }

  #builder-view {
    padding-inline: 0;
    overflow-y: auto;
  }

  #builder-hero {
    margin-bottom: 1.25rem !important;
  }

  #builder-primary-actions > button[data-action="reset-all"],
  #builder-primary-actions > button[data-action="save-preset"],
  #builder-primary-actions > #btn-search {
    min-height: 48px;
  }

  #db-msg,
  #pill-db,
  #pill-airports {
    color: rgba(241, 245, 249, 0.95) !important;
    font-weight: 700;
  }

  #pill-rows-val {
    font-weight: 900;
  }

  #table-results-view > .flex-1.flex.overflow-hidden {
    display: flex;
    flex-direction: row;
    gap: 0;
  }

  #table-results-view #results-main-column {
    order: 2;
    flex: 1 1 auto;
    min-width: 0;
  }

  #table-results-view .rfd-actions-panel {
    order: 1;
    display: flex !important;
    position: relative;
    left: auto;
    right: auto;
    bottom: auto;
    top: auto;
    width: 30% !important;
    min-width: 270px;
    max-width: 360px;
    border-right: 1px solid rgba(148, 163, 184, 0.16) !important;
    border-left: 0 !important;
    border-top: 0 !important;
    border-bottom: 0 !important;
    border-radius: 0 !important;
    box-shadow: none !important;
    transform: none !important;
    transition: width 320ms cubic-bezier(.22, 1, .36, 1), min-width 320ms cubic-bezier(.22, 1, .36, 1), opacity 220ms ease;
  }

  #table-results-view .rfd-actions-panel.tablet-collapsed {
    width: 5.5rem !important;
    min-width: 5.5rem;
  }

  #table-results-view .rfd-actions-panel.tablet-collapsed .rfd-dock-header > :not(.results-sheet-close),
  #table-results-view .rfd-actions-panel.tablet-collapsed > .flex-1 {
    opacity: 0;
    pointer-events: none;
  }

  #table-results-view .rfd-actions-panel.tablet-collapsed .rfd-dock-header {
    min-height: 100%;
    display: flex;
    align-items: flex-start;
    justify-content: flex-end;
  }

  #table-results-view .rfd-actions-panel .rfd-dock-header {
    position: sticky;
    top: 0;
    backdrop-filter: blur(14px);
  }

  .results-sheet-handle-wrap {
    display: none !important;
  }

  .results-sheet-close {
    display: inline-flex !important;
    min-width: 44px;
    min-height: 44px;
  }

  #results-actions-sheet-backdrop,
  #results-mobile-actions {
    display: none !important;
  }

  #results-list-scroll {
    padding: 1rem;
  }

  #table-results-view #flights-table thead th,
  #table-results-view #flights-table tbody td {
    font-size: 0.8rem;
  }
}

@media (max-width: 1024px) {
  #mobile-mode-tabbar {
    display: block !important;
  }

  #builder-mobile-sheet,
  #builder-mobile-sheet-backdrop,
  #mobile-mode-chips,
  #tablet-mode-rail,
  #btn-mobile-modes,
  #mobile-modes-menu {
    display: none !important;
  }

  #sidebar-backdrop {
    display: none !important;
  }

  body.sidebar-open #sidebar-backdrop {
    display: block !important;
  }

  #builder-sidebar {
    display: flex !important;
    position: fixed !important;
    top: var(--rfd-mobile-header-offset) !important;
    left: 0 !important;
    bottom: calc(5.75rem + env(safe-area-inset-bottom, 0px)) !important;
    width: min(86vw, 22rem) !important;
    max-width: 22rem !important;
    min-width: 0 !important;
    height: auto !important;
    border-radius: 0 1.25rem 1.25rem 0 !important;
    transform: translateX(-108%);
    transition: transform 0.25s ease;
    z-index: 90;
    box-shadow: 0 24px 48px rgba(2, 8, 23, 0.42) !important;
    overflow-y: auto;
  }

  body.sidebar-open #builder-sidebar {
    transform: translateX(0);
  }

  #builder-sidebar.builder-sidebar-collapsed {
    width: min(86vw, 22rem) !important;
    min-width: 0 !important;
  }

  #builder-primary-actions {
    position: static !important;
    bottom: auto !important;
    display: flex !important;
    flex-wrap: wrap;
    align-items: center;
    justify-content: flex-start;
    gap: 0.65rem;
    padding: 0 !important;
    margin-top: 0.75rem;
    border-radius: 0 !important;
    background: transparent !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    box-shadow: none !important;
  }

  #builder-primary-actions > button {
    width: auto !important;
    flex: 0 0 auto;
  }

  #builder-primary-actions > #btn-search {
    grid-column: auto !important;
    width: auto !important;
    min-height: 46px;
  }

  #builder-view {
    padding-bottom: calc(8.5rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ============================================================
   Responsive polish — mobile/tablet CTA density & header layout
   ============================================================ */

@media (max-width: 1024px) {
  #app-header {
    flex-wrap: wrap;
    align-items: center;
    row-gap: 0.65rem;
    height: auto;
    min-height: 4.25rem;
    padding-block: 0.75rem;
  }

  #header-brand {
    flex: 1 1 auto;
    min-width: 0;
  }

  #header-actions {
    flex: 1 1 100%;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr));
    gap: 0.55rem;
    width: 100%;
    overflow: visible !important;
  }

  #header-actions > *,
  #header-actions .rfd-links-menu {
    min-width: 0;
  }

  #header-actions .rfd-links-menu > summary,
  #header-actions > button,
  #header-actions > a {
    width: 100%;
    min-width: 0;
    justify-content: center;
    text-align: center;
  }

  #btn-load-db,
  #auth-btn-wrap,
  #btn-shop {
    grid-column: span 2;
  }

  #builder-primary-actions {
    display: grid !important;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
    gap: 0.75rem;
    width: 100%;
  }

  #builder-primary-actions > button[data-action="reset-all"],
  #builder-primary-actions > button[data-action="save-preset"] {
    width: 100% !important;
    min-width: 0;
  }

  #builder-primary-actions > #btn-search {
    grid-column: 1 / -1 !important;
    width: 100% !important;
    min-height: 50px;
  }

  #builder-status-pills {
    gap: 0.55rem;
  }

  #builder-status-pills > div {
    flex: 1 1 16rem;
  }

  #results-mobile-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 0.75rem;
    padding: 0.85rem;
  }

  #results-mobile-actions > button,
  #results-mobile-actions button {
    min-width: 0;
    min-height: 48px;
    justify-content: center;
  }

  #results-mobile-advanced,
  #results-support-content {
    gap: 0.7rem;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  #app-header {
    padding-inline: 1rem;
  }

  #header-actions {
    grid-template-columns: repeat(6, minmax(0, 1fr));
    align-items: stretch;
  }

  #header-actions [data-mobile-priority="secondary"] {
    display: inline-flex !important;
  }

  #header-actions .rfd-links-menu > summary,
  #header-actions > button,
  #header-actions > a {
    min-height: 46px;
    padding-inline: 0.8rem;
    font-size: 0.78rem;
  }

  #btn-load-db,
  #auth-btn-wrap,
  #btn-shop {
    grid-column: span 2;
  }

  #builder-hero {
    align-items: flex-start;
  }

  #builder-primary-actions {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }

  #builder-primary-actions > #btn-search {
    grid-column: span 3 !important;
  }

  #builder-status-pills {
    flex-wrap: nowrap;
  }

  #builder-status-pills > div {
    flex: 1 1 0;
  }

  #results-toolbar {
    height: auto;
    min-height: 3.5rem;
    padding-block: 0.65rem;
  }

  #results-toolbar-actions {
    flex-wrap: wrap;
    justify-content: flex-end;
    gap: 0.5rem;
  }
}

@media (max-width: 767px) {
  #app-header {
    display: grid !important;
    grid-template-columns: 42px minmax(0, 1fr) auto;
    grid-template-areas:
      "filter brand primary"
      "secondary secondary secondary";
    align-items: center;
    row-gap: 0.45rem;
    column-gap: 0.55rem;
    padding-inline: 0.7rem;
    padding-top: 0.65rem;
    padding-bottom: 0.55rem;
    background: rgba(15, 27, 45, 0.88) !important;
    backdrop-filter: blur(18px) saturate(140%);
    -webkit-backdrop-filter: blur(18px) saturate(140%);
    border-bottom: 1px solid rgba(121, 145, 173, 0.12);
  }

  #header-brand {
    grid-area: brand;
    min-width: 0;
    justify-self: stretch;
    justify-content: center;
    gap: 0.5rem;
    text-align: center;
  }

  #header-brand .app-logo-slot {
    flex: 0 0 auto;
    transform: scale(0.94);
  }

  #header-brand > div:last-child {
    font-size: 0.94rem;
    font-weight: 860;
    letter-spacing: -0.03em;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #header-actions {
    grid-area: primary;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 0.35rem;
    width: auto;
    overflow: visible !important;
    padding-bottom: 0;
    flex: 0 0 auto;
  }

  #header-actions > *,
  #header-actions .rfd-links-menu,
  #auth-btn-wrap {
    min-width: 0;
  }

  #header-actions [data-mobile-priority="secondary"] {
    position: relative !important;
    left: auto;
    right: auto;
    top: auto;
    display: inline-flex !important;
    gap: 0.35rem;
    overflow-x: auto;
    overflow-y: hidden;
    padding: 0.05rem 0 0.05rem;
    scroll-snap-type: x proximity;
    -ms-overflow-style: none;
    scrollbar-width: none;
    z-index: auto;
  }

  #header-actions [data-mobile-priority="secondary"]::-webkit-scrollbar {
    display: none;
  }

  #header-actions .rfd-links-menu > summary,
  #header-actions > button,
  #header-actions > a,
  #auth-btn-wrap > button {
    width: auto;
    min-width: 40px;
    min-height: 40px;
    padding-inline: 0.7rem;
    border-radius: 13px;
    justify-content: center;
    white-space: nowrap;
  }

  #header-actions [data-mobile-priority="secondary"],
  #header-actions [data-mobile-priority="secondary"].btn-shop-style,
  #header-actions [data-mobile-priority="secondary"] .rfd-links-menu > summary {
    min-height: 34px;
    border-radius: 999px;
    background: transparent !important;
    border: 0 !important;
    box-shadow: none !important;
    backdrop-filter: none !important;
    -webkit-backdrop-filter: none !important;
    color: rgba(191, 219, 254, 0.88) !important;
    padding-inline: 0.2rem;
  }

  #header-actions [data-mobile-priority="secondary"] .hidden.sm\:inline {
    display: inline !important;
  }

  #header-actions [data-mobile-priority="secondary"] .rfd-links-chevron {
    display: none !important;
  }

  #header-actions > .rfd-links-menu:not([data-mobile-priority="primary"]),
  #header-actions > #btn-shop {
    display: none !important;
  }

  #btn-load-db,
  #auth-btn-wrap,
  #btn-shop {
    grid-column: auto;
  }

  #btn-load-db {
    order: 2;
  }

  #auth-btn-wrap {
    order: 3;
  }

  #builder-view {
    padding-top: 0.85rem !important;
  }

  #builder-hero {
    gap: 0.9rem;
    margin-bottom: 1.1rem !important;
  }

  #builder-hero > .flex-1 > .flex {
    gap: 0.85rem;
  }

  #builder-primary-actions {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  #builder-primary-actions > button {
    min-height: 46px;
  }

  #builder-primary-actions > #btn-search {
    min-height: 52px;
    letter-spacing: 0.08em;
  }

  #builder-status-pills {
    flex-direction: column;
    align-items: stretch;
  }

  #builder-status-pills > div {
    width: 100%;
  }

  #results-mobile-actions {
    grid-template-columns: 1fr;
  }

  #results-mobile-actions > button,
  #results-mobile-actions button,
  #results-mobile-actions [data-flight-info-root] > button,
  #results-mobile-actions [data-registration-info-root] > button,
  #results-mobile-actions [data-airport-info-root] > button,
  #results-mobile-actions [data-ai-diff-root] > button,
  #results-mobile-actions [data-briefing-root] > button,
  #results-mobile-actions [data-announcement-root] > button,
  #results-mobile-actions [data-charts-info-root] > button,
  #results-mobile-actions [data-weather-info-root] > button {
    width: 100%;
  }
}

@media (max-width: 540px) {
  #app-header {
    grid-template-columns: 40px minmax(0, 1fr) auto;
    padding-inline: 0.6rem;
    row-gap: 0.38rem;
  }

  #header-brand {
    max-width: none;
    justify-content: center;
  }

  #header-brand > div:last-child {
    font-size: 0.88rem;
    max-width: 100%;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #header-actions {
    gap: 0.3rem;
  }

  #header-actions .rfd-links-menu > summary,
  #header-actions > button,
  #header-actions > a,
  #auth-btn-wrap > button {
    min-height: 38px;
    min-width: 38px;
    padding-inline: 0.58rem;
    font-size: 0.72rem;
  }

  #header-actions [data-mobile-priority="secondary"],
  #header-actions [data-mobile-priority="secondary"] .rfd-links-menu > summary {
    min-height: 32px;
    font-size: 0.68rem;
    padding-inline: 0.16rem;
  }

  #btn-load-db .hidden.sm\:inline,
  #btn-shop .hidden.sm\:inline,
  #btn-login .hidden.sm\:inline,
  #btn-user-menu .hidden.sm\:inline {
    display: none !important;
  }

  #builder-primary-actions {
    grid-template-columns: 1fr;
  }

  #builder-primary-actions > #btn-search {
    grid-column: auto !important;
  }
}

@media (max-width: 430px) {
  #app-header {
    grid-template-columns: 38px minmax(0, 1fr) auto;
    padding-inline: 0.55rem;
    column-gap: 0.45rem;
  }

  #header-brand {
    gap: 0.38rem;
  }

  #header-brand .app-logo-slot {
    transform: scale(0.88);
    transform-origin: center left;
  }

  #header-brand > div:last-child {
    font-size: 0.81rem;
  }

  #header-actions {
    gap: 0.28rem;
  }

  #header-actions .rfd-links-menu > summary,
  #header-actions > button,
  #header-actions > a,
  #auth-btn-wrap > button {
    min-height: 36px;
    min-width: 36px;
    padding-inline: 0.52rem;
    font-size: 0.69rem;
    border-radius: 12px;
  }

  #header-actions [data-mobile-priority="secondary"],
  #header-actions [data-mobile-priority="secondary"] .rfd-links-menu > summary {
    min-height: 30px;
    font-size: 0.66rem;
    padding-inline: 0.14rem;
  }

  #builder-primary-actions {
    gap: 0.6rem;
  }

  #builder-primary-actions > button[data-action="reset-all"],
  #builder-primary-actions > button[data-action="save-preset"],
  #builder-primary-actions > #btn-search {
    font-size: 0.78rem;
  }
}

/* ============================================================
   Responsive polish — premium mobile/tablet hierarchy
   ============================================================ */

@media (max-width: 1024px) {
  #builder-view > .p-6,
  #builder-view > .p-6.md\:p-10 {
    padding: 1rem !important;
  }

  #builder-view .max-w-5xl {
    max-width: none !important;
  }

  #builder-hero {
    padding: 1rem;
    border-radius: 1.4rem;
    background: linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.025));
    border: 1px solid rgba(121, 145, 173, 0.16);
    box-shadow: 0 14px 34px rgba(5, 14, 30, 0.16);
  }

  #main-icon-container {
    width: 3rem;
    height: 3rem;
    border-radius: 1rem;
    flex: 0 0 auto;
  }

  #main-title {
    font-size: clamp(1.35rem, 2.4vw, 2rem) !important;
    line-height: 1.15;
  }

  #main-subtitle {
    font-size: 0.88rem !important;
    line-height: 1.55;
    max-width: 62ch;
  }

  #db-msg {
    margin-top: 0.85rem !important;
    font-size: 0.8rem !important;
    flex-wrap: wrap;
  }

  #empty-state {
    min-height: 16rem !important;
    padding: 1.35rem 1rem !important;
    border-radius: 1.4rem !important;
  }

  #empty-state i {
    font-size: 2rem !important;
    margin-bottom: 0.4rem !important;
  }

  #empty-state p:first-of-type {
    font-size: 0.98rem;
    color: #edf4ff;
  }

  #empty-state p:last-of-type {
    max-width: 34rem;
    line-height: 1.65;
  }

  #builder-sidebar {
    backdrop-filter: blur(18px) saturate(120%);
    -webkit-backdrop-filter: blur(18px) saturate(120%);
  }

  #sidebar-container {
    padding-bottom: 1.25rem;
  }

  .sidebar-item {
    min-height: 3.1rem;
    border-radius: 1rem !important;
  }

  #results-toolbar {
    margin: 0.8rem 0.8rem 0;
    border-radius: 1.25rem !important;
  }

  #results-list-scroll {
    padding: 0.8rem !important;
  }

  #results-summary-bar {
    height: auto;
    min-height: 3.25rem;
    row-gap: 0.35rem;
    flex-wrap: wrap;
    padding-block: 0.6rem;
  }

  #results-support-wrap {
    padding-inline: 0.8rem;
  }
}

@media (min-width: 768px) and (max-width: 1024px) {
  #builder-hero {
    padding: 1.15rem 1.2rem;
  }

  #builder-hero > .flex-1 > .flex {
    align-items: flex-start;
  }

  #builder-primary-actions > button[data-action="reset-all"],
  #builder-primary-actions > button[data-action="save-preset"],
  #builder-primary-actions > #btn-search {
    border-radius: 1rem !important;
  }

  #builder-status-pills {
    margin-top: 0.9rem !important;
  }

  #table-results-view > .flex-1.flex.overflow-hidden {
    padding-inline: 0.8rem;
    padding-top: 0.8rem;
    gap: 0.8rem;
  }

  #table-results-view .rfd-actions-panel {
    border-radius: 1.25rem 0 0 1.25rem !important;
    overflow: hidden;
  }

  #table-results-view .rfd-actions-panel .dock-card {
    border-radius: 1rem !important;
  }

  #results-toolbar-actions > button {
    min-height: 42px;
    border-radius: 0.95rem !important;
  }

  #flights-table {
    min-width: 920px;
  }
}

@media (max-width: 767px) {
  #builder-view > .p-6,
  #builder-view > .p-6.md\:p-10 {
    padding: 0.85rem !important;
  }

  #builder-hero {
    flex-direction: column;
    align-items: stretch !important;
    padding: 0.95rem;
  }

  #builder-hero > .flex-1 > .flex {
    flex-direction: column;
    align-items: stretch !important;
  }

  #main-icon-container {
    width: 2.85rem;
    height: 2.85rem;
  }

  #main-title {
    font-size: 1.25rem !important;
  }

  #main-subtitle {
    font-size: 0.84rem !important;
  }

  #builder-primary-actions > button[data-action="reset-all"],
  #builder-primary-actions > button[data-action="save-preset"],
  #builder-primary-actions > #btn-search {
    border-radius: 1rem !important;
    box-shadow: none !important;
  }

  #builder-mobile-sheet {
    box-shadow: 0 -18px 44px rgba(2, 8, 23, 0.42);
  }

  .builder-mobile-sheet-topbar {
    padding-bottom: 0.9rem;
    margin-bottom: 0.9rem;
    border-bottom: 1px solid rgba(121, 145, 173, 0.12);
  }

  #builder-mobile-sheet #sidebar-container {
    display: grid;
    gap: 0.7rem;
  }

  #builder-mobile-sheet .sidebar-item {
    min-height: 3.2rem;
    padding-inline: 0.95rem;
  }

  #mobile-mode-tabbar {
    padding-bottom: max(0.3rem, env(safe-area-inset-bottom, 0px));
  }

  #mobile-mode-tabbar .mobile-mode-tab {
    border-radius: 1rem;
    min-height: 56px;
  }

  #results-toolbar {
    margin: 0.7rem 0.7rem 0;
    padding-inline: 0.8rem;
  }

  #results-toolbar-actions {
    gap: 0.45rem;
    flex-wrap: wrap;
    justify-content: flex-end;
  }

  #results-toolbar-actions > button {
    min-height: 42px;
    border-radius: 0.95rem !important;
  }

  #results-list-scroll {
    padding: 0.7rem !important;
  }

  #flights-table {
    min-width: 760px;
  }

  #results-summary-bar {
    padding-inline: 0.9rem;
  }

  #results-support-wrap {
    padding-inline: 0.7rem;
    padding-bottom: 0.35rem;
  }

  #results-support-content .rfd-support-strip,
  #results-support-content .support-icon-btn {
    border-radius: 1rem !important;
  }
}

@media (max-width: 540px) {
  #builder-view > .p-6,
  #builder-view > .p-6.md\:p-10 {
    padding: 0.75rem !important;
  }

  #builder-hero {
    padding: 0.85rem;
    border-radius: 1.15rem;
  }

  #main-title {
    font-size: 1.14rem !important;
  }

  #main-subtitle {
    font-size: 0.81rem !important;
  }

  #db-msg {
    font-size: 0.76rem !important;
  }

  #empty-state {
    min-height: 14rem !important;
    padding: 1.1rem 0.9rem !important;
  }

  #results-toolbar {
    margin-inline: 0.55rem;
  }

  #results-toolbar-actions {
    width: 100%;
    justify-content: stretch;
  }

  #results-toolbar-actions > button {
    flex: 1 1 calc(50% - 0.3rem);
  }
}

@media (max-width: 430px) {
  #builder-hero {
    gap: 0.75rem;
  }

  #main-icon-container {
    width: 2.65rem;
    height: 2.65rem;
  }

  #results-toolbar {
    margin-inline: 0.45rem;
    border-radius: 1rem !important;
  }

  #results-toolbar-actions > button,
  #builder-primary-actions > button[data-action="reset-all"],
  #builder-primary-actions > button[data-action="save-preset"],
  #builder-primary-actions > #btn-search,
  #results-mobile-actions > button,
  #results-mobile-actions button {
    min-height: 44px;
  }
}

/* ============================================================
   Emergency mobile fix — prevent overlapping nav/sidebar systems
   ============================================================ */

@media (max-width: 767px) {
  #sidebar-toggle-tab,
  #mobile-mode-tabbar,
  #mobile-mode-chips,
  #tablet-mode-rail,
  #btn-mobile-modes,
  #mobile-modes-menu,
  #results-actions-sheet-backdrop {
    display: none !important;
  }

  #sidebar-backdrop {
    display: none !important;
  }

  #builder-sidebar,
  #builder-sidebar.builder-sidebar-collapsed,
  body.sidebar-open #builder-sidebar,
  body.sidebar-open #sidebar-backdrop {
    display: none !important;
    transform: none !important;
    width: 0 !important;
    min-width: 0 !important;
    max-width: 0 !important;
    overflow: hidden !important;
    pointer-events: none !important;
  }

  #app-workspace {
    display: block !important;
    overflow: visible !important;
  }

  #builder-view {
    width: 100% !important;
    max-width: 100% !important;
    padding-top: 0.65rem !important;
    padding-bottom: 1.25rem !important;
    overflow-x: hidden !important;
  }

  #app-header {
    display: grid !important;
    grid-template-columns: 38px minmax(0, 1fr) auto auto auto;
    align-items: center;
    gap: 0.4rem;
    min-height: auto;
    padding: 0.6rem 0.7rem !important;
    background: rgba(15, 27, 45, 0.94) !important;
    border-bottom: 1px solid rgba(121, 145, 173, 0.12);
    backdrop-filter: blur(16px);
    -webkit-backdrop-filter: blur(16px);
  }

  #header-brand {
    grid-column: 2;
    justify-content: flex-start !important;
    min-width: 0;
    gap: 0.38rem;
  }

  #header-brand > div:last-child {
    font-size: 0.84rem !important;
    font-weight: 850;
    white-space: nowrap;
    overflow: hidden;
    text-overflow: ellipsis;
  }

  #header-actions {
    grid-column: 3 / 6;
    display: flex !important;
    align-items: center;
    justify-content: flex-end;
    gap: 0.28rem;
    width: auto !important;
    flex-wrap: nowrap !important;
    overflow: visible !important;
  }

  #header-actions > * {
    flex: 0 0 auto;
  }

  #header-actions [data-mobile-priority="secondary"],
  #btn-load-db,
  #btn-shop {
    display: none !important;
  }

  #header-actions .rfd-links-menu > summary,
  #header-actions > button,
  #header-actions > a,
  #auth-btn-wrap > button {
    min-width: 36px !important;
    width: 36px !important;
    height: 36px !important;
    min-height: 36px !important;
    padding: 0 !important;
    border-radius: 12px !important;
  }

  #header-actions .hidden.sm\:inline,
  #header-actions .rfd-links-chevron {
    display: none !important;
  }

  #builder-view > .p-6,
  #builder-view > .p-6.md\:p-10 {
    padding: 0.85rem !important;
  }

  #builder-hero {
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.75rem;
    margin-bottom: 0.9rem !important;
    padding: 0.95rem !important;
  }

  #builder-hero > .flex-1 > .flex {
    display: flex;
    flex-direction: column;
    align-items: stretch !important;
    gap: 0.75rem;
  }

  #main-title {
    font-size: 1.18rem !important;
    line-height: 1.15;
  }

  #main-subtitle {
    font-size: 0.83rem !important;
    line-height: 1.45;
  }

  #db-msg {
    font-size: 0.76rem !important;
    margin-top: 0.55rem !important;
  }

  #builder-primary-actions {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
    width: 100%;
  }

  #builder-primary-actions > button,
  #builder-primary-actions > #btn-search {
    width: 100% !important;
    min-height: 48px !important;
    justify-content: center;
    border-radius: 14px !important;
  }

  #builder-status-pills {
    display: grid !important;
    grid-template-columns: 1fr !important;
    gap: 0.65rem !important;
  }

  #builder-status-pills > div {
    width: 100%;
    min-width: 0;
    padding: 0.9rem 1rem !important;
    border-radius: 18px !important;
  }

  #pill-airports {
    flex-wrap: wrap;
    row-gap: 0.35rem;
  }

  #empty-state {
    min-height: 14rem !important;
    padding: 1rem !important;
  }
}

/* ============================================================
   Mobile footer modes — builder only
   ============================================================ */

@media (max-width: 767px) {
  #mobile-mode-tabbar {
    display: block !important;
    position: fixed;
    left: 0.55rem;
    right: 0.55rem;
    bottom: calc(0.5rem + env(safe-area-inset-bottom, 0px));
    z-index: 95;
    padding: 0.45rem;
    border-radius: 1.15rem;
    background: rgba(15, 27, 45, 0.94);
    border: 1px solid rgba(121, 145, 173, 0.14);
    box-shadow: 0 18px 40px rgba(2, 8, 23, 0.34);
    backdrop-filter: blur(16px) saturate(135%);
    -webkit-backdrop-filter: blur(16px) saturate(135%);
  }

  body.results-visible #mobile-mode-tabbar,
  #map-detail-view:not(.hidden) ~ #mobile-mode-tabbar {
    display: none !important;
  }

  #mobile-mode-tabbar .mobile-mode-tab {
    min-height: 52px;
    border-radius: 0.95rem;
    color: rgba(226, 232, 240, 0.78);
    background: transparent;
  }

  #mobile-mode-tabbar .mobile-mode-tab.active {
    background: linear-gradient(180deg, rgba(59, 130, 246, 0.3), rgba(37, 99, 235, 0.18));
    border-color: rgba(96, 165, 250, 0.26);
    box-shadow: inset 0 1px 0 rgba(255,255,255,0.08);
  }

  #builder-view {
    padding-bottom: calc(6.25rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ============================================================
   Mobile footer modes + sidebar restore
   ============================================================ */

@media (max-width: 767px) {
  #mobile-mode-tabbar {
    display: block !important;
  }

  #mobile-mode-tabbar > div,
  #mobile-mode-tabbar .mx-auto,
  #mobile-mode-tabbar .grid {
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.45rem !important;
    align-items: stretch;
  }

  #mobile-mode-tabbar .mobile-mode-tab {
    width: 100%;
    min-width: 0;
    flex-direction: column;
  }

  #builder-sidebar,
  #builder-sidebar.builder-sidebar-collapsed {
    display: flex !important;
    position: fixed !important;
    top: calc(var(--rfd-mobile-header-offset, 4.5rem) + 0.45rem) !important;
    left: 0.65rem !important;
    bottom: calc(5.95rem + env(safe-area-inset-bottom, 0px)) !important;
    width: min(84vw, 21rem) !important;
    max-width: 21rem !important;
    min-width: 0 !important;
    height: auto !important;
    border-radius: 1.25rem !important;
    transform: translateX(-115%) !important;
    transition: transform 0.24s ease !important;
    z-index: 96 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    pointer-events: auto !important;
    box-shadow: 0 24px 48px rgba(2, 8, 23, 0.42) !important;
  }

  body.sidebar-open #builder-sidebar,
  body.sidebar-open #builder-sidebar.builder-sidebar-collapsed {
    display: flex !important;
    transform: translateX(0) !important;
  }

  #sidebar-backdrop {
    position: fixed !important;
    inset: 0 !important;
    background: rgba(2, 8, 23, 0.42) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
    z-index: 95 !important;
  }

  body.sidebar-open #sidebar-backdrop {
    display: block !important;
  }

  #header-actions > button[data-action="toggle-sidebar"] {
    display: grid !important;
  }
}

/* ============================================================
   Mobile mode bar — full width equal tabs
   ============================================================ */

@media (max-width: 767px) {
  #mobile-mode-tabbar {
    left: 0.55rem !important;
    right: 0.55rem !important;
    width: auto !important;
  }

  #mobile-mode-tabbar > div,
  #mobile-mode-tabbar .mx-auto,
  #mobile-mode-tabbar nav,
  #mobile-mode-tabbar .grid {
    width: 100% !important;
    max-width: none !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.4rem !important;
  }

  #mobile-mode-tabbar .mobile-mode-tab {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    flex: 1 1 0 !important;
    justify-self: stretch !important;
    align-self: stretch !important;
    text-align: center !important;
  }

  #mobile-mode-tabbar .mobile-mode-tab span {
    display: block;
    width: 100%;
    text-align: center;
  }
}

/* ============================================================
   Mobile final fix — full-width mode footer + working filter sheet
   ============================================================ */

@media (max-width: 767px) {
  #mobile-mode-tabbar {
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100% !important;
    padding: 0.4rem 0.45rem calc(0.4rem + env(safe-area-inset-bottom, 0px)) !important;
    border-radius: 0 !important;
  }

  #mobile-mode-tabbar > div {
    width: 100% !important;
    margin: 0 !important;
    border-radius: 1rem !important;
  }

  #mobile-mode-tabbar > div > div {
    width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.35rem !important;
  }

  #mobile-mode-tabbar .mobile-mode-tab {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    padding-inline: 0.15rem !important;
  }

  #builder-mobile-sheet-backdrop {
    display: none !important;
  }

  body.sidebar-open #builder-mobile-sheet-backdrop,
  body.builder-sheet-open #builder-mobile-sheet-backdrop {
    display: block !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 97 !important;
    background: rgba(2, 8, 23, 0.42) !important;
    backdrop-filter: blur(6px);
    -webkit-backdrop-filter: blur(6px);
  }

  #builder-mobile-sheet {
    display: none !important;
  }

  body.sidebar-open #builder-mobile-sheet,
  body.builder-sheet-open #builder-mobile-sheet {
    display: block !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    top: auto !important;
    z-index: 98 !important;
    border-radius: 1.4rem 1.4rem 0 0 !important;
    transform: translate3d(0, 0, 0) !important;
    max-height: min(78vh, 720px) !important;
    overflow: hidden !important;
    box-shadow: 0 -18px 44px rgba(2, 8, 23, 0.42) !important;
  }

  body.sidebar-open #builder-mobile-sheet-content,
  body.builder-sheet-open #builder-mobile-sheet-content {
    overflow-y: auto !important;
    max-height: calc(min(78vh, 720px) - 4.5rem) !important;
  }

  #builder-sidebar,
  #builder-sidebar.builder-sidebar-collapsed {
    display: none !important;
  }

  #header-actions > button[data-action="toggle-sidebar"] {
    display: grid !important;
  }
}

/* ============================================================
   Mobile strict layout — full-width footer tabs + left filter drawer
   ============================================================ */

@media (max-width: 767px) {
  /* --- Footer modes: truly full width --- */
  #mobile-mode-tabbar {
    display: block !important;
    position: fixed !important;
    inset: auto 0 0 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 0.35rem 0.35rem calc(0.35rem + env(safe-area-inset-bottom, 0px)) !important;
    margin: 0 !important;
    z-index: 95 !important;
    border-radius: 0 !important;
    box-sizing: border-box !important;
  }

  #mobile-mode-tabbar > div {
    width: 100% !important;
    max-width: 100% !important;
    margin: 0 !important;
    border-radius: 1rem !important;
    box-sizing: border-box !important;
  }

  #mobile-mode-tabbar > div > div {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.3rem !important;
    padding: 0.3rem !important;
    box-sizing: border-box !important;
  }

  #mobile-mode-tabbar .mobile-mode-tab {
    width: 100% !important;
    max-width: none !important;
    min-width: 0 !important;
    min-height: 56px !important;
    padding: 0.45rem 0.2rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    text-align: center !important;
    border-radius: 0.9rem !important;
    box-sizing: border-box !important;
  }

  #mobile-mode-tabbar .mobile-mode-tab i {
    font-size: 0.95rem !important;
  }

  #mobile-mode-tabbar .mobile-mode-tab span {
    display: block !important;
    width: 100% !important;
    text-align: center !important;
    font-size: 0.68rem !important;
    line-height: 1.05 !important;
    white-space: normal !important;
  }

  body.results-visible #mobile-mode-tabbar {
    display: none !important;
  }

  #builder-view {
    padding-bottom: calc(6.4rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* --- Filters: left drawer, not bottom sheet --- */
  #builder-mobile-sheet,
  #builder-mobile-sheet-backdrop,
  body.sidebar-open #builder-mobile-sheet,
  body.builder-sheet-open #builder-mobile-sheet,
  body.sidebar-open #builder-mobile-sheet-backdrop,
  body.builder-sheet-open #builder-mobile-sheet-backdrop {
    display: none !important;
    pointer-events: none !important;
  }

  #sidebar-backdrop {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 96 !important;
    background: rgba(2, 8, 23, 0.42) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
  }

  body.sidebar-open #sidebar-backdrop {
    display: block !important;
  }

  #builder-sidebar,
  #builder-sidebar.builder-sidebar-collapsed {
    display: flex !important;
    position: fixed !important;
    top: calc(var(--rfd-mobile-header-offset, 4.5rem) + 0.35rem) !important;
    left: 0.55rem !important;
    bottom: calc(6.1rem + env(safe-area-inset-bottom, 0px)) !important;
    width: min(84vw, 20.5rem) !important;
    max-width: 20.5rem !important;
    min-width: 0 !important;
    height: auto !important;
    margin: 0 !important;
    border-radius: 0 1.2rem 1.2rem 0 !important;
    transform: translateX(-115%) !important;
    transition: transform 0.24s ease !important;
    z-index: 97 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    pointer-events: auto !important;
    box-shadow: 0 24px 48px rgba(2, 8, 23, 0.42) !important;
  }

  body.sidebar-open #builder-sidebar,
  body.sidebar-open #builder-sidebar.builder-sidebar-collapsed {
    display: flex !important;
    transform: translateX(0) !important;
  }

  #builder-sidebar-top button[data-action="toggle-sidebar"],
  #sidebar-toggle-tab {
    display: none !important;
  }

  #header-actions > button[data-action="toggle-sidebar"] {
    display: grid !important;
  }
}

/* ============================================================
   Mobile footer tabs — bigger and truly full width
   ============================================================ */

@media (max-width: 767px) {
  #mobile-mode-tabbar {
    inset-inline: 0 !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    padding: 0.25rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  #mobile-mode-tabbar > div {
    width: calc(100vw - 0.5rem) !important;
    max-width: calc(100vw - 0.5rem) !important;
    margin: 0 auto !important;
    border-radius: 1rem !important;
  }

  #mobile-mode-tabbar > div > div,
  #mobile-mode-tabbar .grid {
    width: 100% !important;
    max-width: 100% !important;
    display: grid !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.2rem !important;
    padding: 0.35rem !important;
  }

  #mobile-mode-tabbar .mobile-mode-tab {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 64px !important;
    height: 64px !important;
    padding: 0.45rem 0.15rem !important;
    border-radius: 0.9rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.35rem !important;
    text-align: center !important;
    overflow: hidden !important;
  }

  #mobile-mode-tabbar .mobile-mode-tab i {
    font-size: 1rem !important;
    line-height: 1 !important;
  }

  #mobile-mode-tabbar .mobile-mode-tab span {
    display: block !important;
    width: 100% !important;
    max-width: 100% !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    line-height: 1.05 !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: keep-all !important;
    overflow-wrap: anywhere !important;
  }

  #builder-view {
    padding-bottom: calc(7rem + env(safe-area-inset-bottom, 0px)) !important;
  }
}

/* ============================================================
   Mobile verified fix — exact footer wrapper + exact left drawer
   ============================================================ */

@media (max-width: 767px) {
  /* Target the exact HTML structure from index.html */
  #mobile-mode-tabbar {
    display: block !important;
    position: fixed !important;
    left: 0 !important;
    right: 0 !important;
    bottom: 0 !important;
    width: 100vw !important;
    max-width: 100vw !important;
    margin: 0 !important;
    padding: 0.25rem 0.25rem calc(0.35rem + env(safe-area-inset-bottom, 0px)) !important;
    z-index: 95 !important;
    box-sizing: border-box !important;
  }

  #mobile-mode-tabbar > .mx-3 {
    display: block !important;
    width: calc(100vw - 0.5rem) !important;
    max-width: calc(100vw - 0.5rem) !important;
    margin: 0 auto !important;
    box-sizing: border-box !important;
  }

  #mobile-mode-tabbar > .mx-3 > .grid.grid-cols-4 {
    display: grid !important;
    width: 100% !important;
    max-width: 100% !important;
    grid-template-columns: repeat(4, minmax(0, 1fr)) !important;
    gap: 0.25rem !important;
    padding: 0.35rem !important;
    box-sizing: border-box !important;
  }

  #mobile-mode-tabbar > .mx-3 > .grid.grid-cols-4 > .mobile-mode-tab {
    width: 100% !important;
    min-width: 0 !important;
    max-width: none !important;
    min-height: 66px !important;
    height: 66px !important;
    padding: 0.45rem 0.12rem !important;
    border-radius: 0.95rem !important;
    display: flex !important;
    flex-direction: column !important;
    align-items: center !important;
    justify-content: center !important;
    gap: 0.32rem !important;
    text-align: center !important;
    box-sizing: border-box !important;
  }

  #mobile-mode-tabbar > .mx-3 > .grid.grid-cols-4 > .mobile-mode-tab i {
    font-size: 1rem !important;
    line-height: 1 !important;
  }

  #mobile-mode-tabbar > .mx-3 > .grid.grid-cols-4 > .mobile-mode-tab span {
    display: block !important;
    width: 100% !important;
    font-size: 0.72rem !important;
    font-weight: 800 !important;
    line-height: 1.05 !important;
    text-align: center !important;
    white-space: normal !important;
    word-break: normal !important;
    overflow-wrap: anywhere !important;
  }

  body.results-visible #mobile-mode-tabbar {
    display: none !important;
  }

  #builder-view {
    padding-bottom: calc(7.1rem + env(safe-area-inset-bottom, 0px)) !important;
  }

  /* Exact left drawer behavior */
  #builder-mobile-sheet,
  #builder-mobile-sheet-backdrop {
    display: none !important;
  }

  #builder-sidebar,
  #builder-sidebar.builder-sidebar-collapsed {
    display: flex !important;
    position: fixed !important;
    top: calc(var(--rfd-mobile-header-offset, 4.5rem) + 0.35rem) !important;
    left: 0 !important;
    bottom: calc(7.1rem + env(safe-area-inset-bottom, 0px)) !important;
    width: min(84vw, 20rem) !important;
    max-width: 20rem !important;
    min-width: 0 !important;
    margin: 0 !important;
    border-radius: 0 1.1rem 1.1rem 0 !important;
    transform: translateX(-108%) !important;
    transition: transform 0.22s ease !important;
    z-index: 97 !important;
    overflow-y: auto !important;
    overflow-x: hidden !important;
    box-shadow: 0 24px 48px rgba(2, 8, 23, 0.42) !important;
    pointer-events: auto !important;
  }

  body.sidebar-open #builder-sidebar,
  body.sidebar-open #builder-sidebar.builder-sidebar-collapsed {
    transform: translateX(0) !important;
  }

  #sidebar-backdrop {
    display: none !important;
    position: fixed !important;
    inset: 0 !important;
    z-index: 96 !important;
    background: rgba(2, 8, 23, 0.42) !important;
    backdrop-filter: blur(6px) !important;
    -webkit-backdrop-filter: blur(6px) !important;
  }

  body.sidebar-open #sidebar-backdrop {
    display: block !important;
  }
}

/* ============================================================
   Mobile sidebar polish + cleaner header
   ============================================================ */

@media (max-width: 767px) {
  /* Header cleanup only */
  #app-header {
    min-height: 3.85rem !important;
    padding: 0.6rem 0.7rem !important;
    gap: 0.45rem !important;
    background: linear-gradient(180deg, rgba(15,27,45,0.96), rgba(15,27,45,0.9)) !important;
    border-bottom: 1px solid rgba(121,145,173,0.12) !important;
    box-shadow: 0 10px 26px rgba(2, 8, 23, 0.18) !important;
  }

  #header-brand {
    align-items: center !important;
    gap: 0.45rem !important;
  }

  #header-brand .app-logo-slot {
    transform: scale(0.92);
    transform-origin: center left;
  }

  #header-brand > div:last-child {
    font-size: 0.88rem !important;
    letter-spacing: -0.02em;
  }

  #header-actions > button[data-action="toggle-sidebar"],
  #header-actions > .rfd-links-menu > summary,
  #header-actions > button,
  #header-actions > a,
  #auth-btn-wrap > button {
    min-width: 38px !important;
    width: 38px !important;
    min-height: 38px !important;
    height: 38px !important;
    border-radius: 12px !important;
    background: rgba(255,255,255,0.05) !important;
    border: 1px solid rgba(121,145,173,0.14) !important;
  }

  /* Left drawer: visible close arrow + stable layout */
  #builder-sidebar,
  #builder-sidebar.builder-sidebar-collapsed {
    padding-top: 0.6rem !important;
    background: linear-gradient(180deg, rgba(15,27,45,0.98), rgba(15,27,45,0.94)) !important;
    border-right: 1px solid rgba(121,145,173,0.12) !important;
  }

  #builder-sidebar-top {
    position: sticky !important;
    top: 0 !important;
    z-index: 2 !important;
    padding: 0.35rem 0.85rem 0.75rem !important;
    margin-bottom: 0.2rem !important;
    background: linear-gradient(180deg, rgba(15,27,45,0.98), rgba(15,27,45,0.9)) !important;
    border-bottom: 1px solid rgba(121,145,173,0.1) !important;
  }

  #builder-sidebar-title {
    font-size: 0.72rem !important;
    color: #b8c6dc !important;
  }

  #builder-sidebar-meta {
    gap: 0.45rem !important;
  }

  #filter-count {
    min-width: 1.85rem;
    text-align: center;
  }

  #builder-sidebar-top button[data-action="toggle-sidebar"] {
    display: inline-flex !important;
    width: 2rem !important;
    height: 2rem !important;
    min-width: 2rem !important;
    min-height: 2rem !important;
    border-radius: 999px !important;
    align-items: center !important;
    justify-content: center !important;
    background: rgba(255,255,255,0.06) !important;
    border: 1px solid rgba(121,145,173,0.16) !important;
    color: #dce7f7 !important;
    box-shadow: 0 8px 18px rgba(2, 8, 23, 0.18) !important;
  }

  #builder-sidebar-top button[data-action="toggle-sidebar"] i[data-sidebar-toggle-icon] {
    display: inline-block !important;
    font-size: 0.8rem !important;
  }

  #sidebar-container {
    padding: 0.4rem 0.45rem 1rem !important;
    gap: 0.35rem !important;
  }

  #sidebar-container .sidebar-item {
    min-height: 3rem !important;
    padding-inline: 0.9rem !important;
    border-radius: 1rem !important;
  }
}

/* ============================================================
   Mobile scroll + sidebar stability fix
   ============================================================ */

@media (max-width: 767px) {
  body,
  body.sidebar-open,
  body.builder-sheet-open {
    overflow-y: auto !important;
    overflow-x: hidden !important;
    position: static !important;
    height: auto !important;
    max-height: none !important;
  }

  .rfd-viewport,
  #app,
  #app-workspace,
  main,
  #builder-view {
    overflow-x: hidden !important;
  }

  #builder-view {
    overflow-y: auto !important;
    -webkit-overflow-scrolling: touch;
  }

  #builder-sidebar,
  #builder-sidebar.builder-sidebar-collapsed {
    visibility: visible !important;
  }

  body:not(.sidebar-open) #builder-sidebar,
  body:not(.sidebar-open) #builder-sidebar.builder-sidebar-collapsed {
    transform: translateX(-108%) !important;
  }

  body.sidebar-open #builder-sidebar,
  body.sidebar-open #builder-sidebar.builder-sidebar-collapsed {
    transform: translateX(0) !important;
  }
}

/* ============================================================
   Mobile final-final: accessible header ribbon + persistent left drawer
   ============================================================ */

@media (max-width: 767px) {
  #app-header {
    grid-template-columns: 38px minmax(0, 1fr) !important;
    grid-template-areas:
      "filter brand"
      "actions actions" !important;
    align-items: center !important;
    row-gap: 0.45rem !important;
  }

  #header-brand {
    grid-area: brand !important;
    justify-content: flex-start !important;
    min-width: 0 !important;
  }

  #header-actions {
    grid-area: actions !important;
    display: flex !important;
    flex-wrap: nowrap !important;
    width: 100% !important;
    overflow-x: auto !important;
    overflow-y: hidden !important;
    gap: 0.4rem !important;
    padding: 0.05rem 0 0.15rem !important;
    scrollbar-width: none;
    -ms-overflow-style: none;
  }

  #header-actions::-webkit-scrollbar {
    display: none;
  }

  #header-actions > *,
  #header-actions .rfd-links-menu,
  #auth-btn-wrap,
  #btn-load-db,
  #btn-shop {
    display: inline-flex !important;
    flex: 0 0 auto !important;
  }

  #header-actions .rfd-links-menu > summary,
  #header-actions > button,
  #header-actions > a,
  #auth-btn-wrap > button {
    width: auto !important;
    min-width: max-content !important;
    min-height: 38px !important;
    height: 38px !important;
    padding: 0 0.78rem !important;
    border-radius: 999px !important;
    white-space: nowrap !important;
  }

  #header-actions .hidden.sm\:inline {
    display: inline !important;
  }

  #builder-sidebar,
  #builder-sidebar.builder-sidebar-collapsed {
    will-change: transform;
  }
}
