:root {
  --bg: #050b12;
  --panel: #06131d;
  --panel-2: #091a27;
  --panel-3: #0b2231;
  --border: rgba(93, 199, 255, 0.14);
  --text: #eaf6ff;
  --muted: #8ea8ba;
  --accent: #ff1788;
  --accent-2: #5dd0ff;
  --ok: #1ed79b;
  --warn: #ffc44d;
  --danger: #ff5577;
  --shadow: 0 18px 40px rgba(0, 0, 0, 0.35);
  --body-bg:
    radial-gradient(circle at top left, rgba(93, 208, 255, 0.12), transparent 24%),
    radial-gradient(circle at top right, rgba(255, 23, 136, 0.10), transparent 18%),
    linear-gradient(180deg, #050b12 0%, #041018 45%, #02070d 100%);
  --sidebar-bg: linear-gradient(180deg, #041019 0%, #020912 100%);
  --sidebar-border: rgba(255, 255, 255, 0.04);
  --topbar-user-bg: rgba(255, 255, 255, 0.02);
  --topbar-user-border: rgba(255, 255, 255, 0.05);
  --card-bg: linear-gradient(180deg, rgba(6,19,29,.98), rgba(5,15,22,.98));
  --card-header-border: rgba(255,255,255,.05);
  --table-head-border: rgba(255,255,255,.06);
  --table-row-border: rgba(255,255,255,.04);
  --table-row-hover: rgba(255,255,255,.02);
  --btn-outline-bg: rgba(255,255,255,.03);
  --btn-outline-text: #e8f4fb;
  --btn-outline-border: rgba(255,255,255,.08);
  --btn-outline-hover: rgba(255,255,255,.06);
  --input-bg: rgba(255,255,255,.03);
  --input-text: #fff;
  --input-border: rgba(255,255,255,.09);
  --input-placeholder: #7890a0;
  --input-focus-border: rgba(93,208,255,.42);
  --input-focus-ring: rgba(93,208,255,.08);
  --nav-icon-dashboard: #5dd0ff;
  --nav-icon-pilots: #7cc8ff;
  --nav-icon-requests: #5de5a9;
  --nav-icon-files: #8fd0ff;
  --nav-icon-screens: #ff9fe0;
  --nav-icon-profile: #ffb86b;
  --nav-icon-streams: #d68cff;
  --nav-icon-sop: #ffe06c;
  --nav-icon-guestbook: #ff8ca6;
  --nav-icon-admin: #62f190;
}

html[data-theme="light"] {
  --bg: #f2f7fb;
  --panel: #ffffff;
  --panel-2: #edf4fb;
  --panel-3: #e3eef8;
  --border: rgba(10, 65, 100, 0.12);
  --text: #142736;
  --muted: #5e7687;
  --accent: #d91a73;
  --accent-2: #0a87c9;
  --ok: #14935f;
  --warn: #bb7f09;
  --danger: #c23b53;
  --shadow: 0 18px 34px rgba(14, 51, 78, 0.14);
  --body-bg:
    radial-gradient(circle at top left, rgba(57, 150, 203, 0.14), transparent 24%),
    radial-gradient(circle at top right, rgba(217, 26, 115, 0.09), transparent 20%),
    linear-gradient(180deg, #f7fbff 0%, #ecf4fb 52%, #e8f2fb 100%);
  --sidebar-bg: linear-gradient(180deg, #f8fbff 0%, #edf5fc 100%);
  --sidebar-border: rgba(13, 61, 94, 0.12);
  --topbar-user-bg: rgba(255, 255, 255, 0.9);
  --topbar-user-border: rgba(16, 62, 93, 0.14);
  --card-bg: linear-gradient(180deg, rgba(255,255,255,.98), rgba(246,251,255,.98));
  --card-header-border: rgba(11, 67, 104, 0.12);
  --table-head-border: rgba(12, 76, 116, 0.16);
  --table-row-border: rgba(15, 76, 118, 0.10);
  --table-row-hover: rgba(10, 135, 201, 0.06);
  --btn-outline-bg: rgba(11, 96, 145, 0.05);
  --btn-outline-text: #0f3f5c;
  --btn-outline-border: rgba(11, 96, 145, 0.18);
  --btn-outline-hover: rgba(11, 96, 145, 0.12);
  --input-bg: #ffffff;
  --input-text: #122b3b;
  --input-border: rgba(17, 82, 124, 0.24);
  --input-placeholder: #7a94a6;
  --input-focus-border: rgba(10, 135, 201, 0.56);
  --input-focus-ring: rgba(10, 135, 201, 0.12);
  --nav-icon-dashboard: #007fbe;
  --nav-icon-pilots: #1a76bd;
  --nav-icon-requests: #0e8b58;
  --nav-icon-files: #2a79b7;
  --nav-icon-screens: #b7489a;
  --nav-icon-profile: #b46b0d;
  --nav-icon-streams: #8a4bcf;
  --nav-icon-sop: #a67600;
  --nav-icon-guestbook: #c13a61;
  --nav-icon-admin: #108a44;
}

* { box-sizing: border-box; }
html, body { min-height: 100%; }
html { color-scheme: dark; }
html[data-theme="light"] { color-scheme: light; }
body {
  margin: 0;
  background: var(--body-bg);
  color: var(--text);
  font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

a { text-decoration: none; }

.app-shell {
  display: grid;
  grid-template-columns: 260px 1fr;
  min-height: 100vh;
}

.sidebar {
  position: sticky;
  top: 0;
  height: 100vh;
  padding: 22px 18px;
  background: var(--sidebar-bg);
  border-right: 1px solid var(--sidebar-border);
}

.brand-block {
  padding: 8px 10px 18px;
  border-bottom: 1px solid rgba(255,255,255,0.05);
  margin-bottom: 18px;
}

.brand-logo {
  width: 100%;
  max-width: 210px;
  display: block;
  margin: 4px auto 0;
}

.brand-logo-light {
  display: none;
}

html[data-theme="light"] .brand-logo-dark {
  display: none;
}

html[data-theme="light"] .brand-logo-light {
  display: block;
}

.brand-kicker {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 11px;
  margin-bottom: 10px;
}

.brand-title {
  font-size: 40px;
  line-height: 1;
  font-weight: 800;
  letter-spacing: .04em;
  margin: 0;
}

.brand-title .accent { color: var(--accent); }
.brand-sub {
  margin-top: 8px;
  color: var(--muted);
  font-size: 13px;
}

.nav-group-label {
  color: #6f8797;
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 11px;
  margin: 18px 10px 8px;
}

.nav-link-avi {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 12px 14px;
  margin-bottom: 6px;
  color: var(--text);
  border-radius: 14px;
  transition: .18s ease;
}

.nav-link-avi:hover,
.nav-link-avi.active {
  background: linear-gradient(90deg, rgba(255,23,136,.14), rgba(93,208,255,.10));
  color: #fff;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.05);
}

.nav-icon {
  width: 30px;
  height: 30px;
  flex: 0 0 30px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  opacity: .92;
}

.nav-link-avi:hover .nav-icon,
.nav-link-avi.active .nav-icon {
  opacity: 1;
  filter: saturate(1.1) brightness(1.06);
}

.nav-icon-dashboard { color: var(--nav-icon-dashboard); }
.nav-icon-pilots { color: var(--nav-icon-pilots); }
.nav-icon-requests { color: var(--nav-icon-requests); }
.nav-icon-files { color: var(--nav-icon-files); }
.nav-icon-screens { color: var(--nav-icon-screens); }
.nav-icon-profile { color: var(--nav-icon-profile); }
.nav-icon-streams { color: var(--nav-icon-streams); }
.nav-icon-sop { color: var(--nav-icon-sop); }
.nav-icon-guestbook { color: var(--nav-icon-guestbook); }
.nav-icon-admin { color: var(--nav-icon-admin); }

.main-wrap {
  padding: 26px 28px 42px;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}

.page-content {
  flex: 1 1 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 22px;
  gap: 20px;
}

.acars-download-banner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
  margin-bottom: 20px;
  padding: 16px 18px;
  border-radius: 16px;
  border: 1px solid rgba(93, 208, 255, 0.44);
  background:
    linear-gradient(115deg, rgba(6, 23, 36, 0.94), rgba(16, 49, 78, 0.82)),
    radial-gradient(circle at top right, rgba(255, 23, 136, 0.16), transparent 42%);
  box-shadow: 0 10px 24px rgba(5, 18, 30, 0.3);
}

.acars-download-banner-left {
  min-width: 0;
}

.acars-download-title {
  font-size: 18px;
  font-weight: 800;
  letter-spacing: .01em;
  color: #d8f2ff;
}

.acars-download-desc {
  margin-top: 4px;
  color: #b7d3e6;
  font-size: 14px;
}

.acars-download-version {
  display: inline-block;
  margin-left: 8px;
  font-weight: 700;
  color: #7fdcff;
}

.acars-download-steps {
  margin-top: 8px;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.acars-download-steps span {
  display: inline-flex;
  align-items: center;
  padding: 5px 8px;
  border-radius: 10px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(255, 255, 255, 0.04);
  color: #cbe5f4;
  font-size: 12px;
}

.acars-download-banner-actions {
  flex: 0 0 auto;
}

.acars-download-btn {
  padding: 12px 16px;
  min-width: 180px;
  text-align: center;
}

.topbar-title {
  font-size: 15px;
  text-transform: uppercase;
  letter-spacing: .22em;
  color: var(--muted);
}

.topbar-user {
  display: flex;
  align-items: center;
  gap: 12px;
  background: var(--topbar-user-bg);
  border: 1px solid var(--topbar-user-border);
  padding: 8px 12px;
  border-radius: 16px;
}

.topbar-actions {
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
}

.topbar-actions form {
  margin: 0;
}

.topbar-support {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.topbar-support-label {
  font-size: 12px;
  font-weight: 700;
  color: var(--muted);
  letter-spacing: 0.02em;
}

.topbar-support-link {
  padding: 6px 10px;
  font-size: 12px;
  line-height: 1.2;
}

.theme-toggle {
  min-width: 124px;
}

.user-badge {
  width: 56px;
  height: 56px;
  border-radius: 12px;
  background: linear-gradient(135deg, rgba(255,23,136,.18), rgba(93,208,255,.18));
  display: grid;
  place-items: center;
  font-weight: 700;
  overflow: hidden;
}

.user-badge-logo {
  width: 100%;
  height: 100%;
  object-fit: contain;
  display: block;
}

.user-badge-logo-light {
  display: none;
}

html[data-theme="light"] .user-badge-logo-dark {
  display: none;
}

html[data-theme="light"] .user-badge-logo-light {
  display: block;
}

.hero {
  position: relative;
  overflow: hidden;
  min-height: 240px;
  border-radius: 24px;
  background:
    linear-gradient(120deg, rgba(2, 16, 30, .86) 0%, rgba(19, 53, 88, .58) 42%, rgba(37, 82, 134, .36) 100%),
    url('/static/hero.jpg') center/cover no-repeat;
  border: 1px solid rgba(255,255,255,.06);
  box-shadow: var(--shadow);
  padding: 34px 38px;
}

.hero::after {
  content: "";
  position: absolute;
  inset: 0;
  border-top: 2px solid rgba(255, 23, 136, 0.78);
  border-radius: 24px;
  pointer-events: none;
}

.hero-kicker {
  color: #c7d6e3;
  font-size: 16px;
  letter-spacing: .18em;
  text-transform: uppercase;
  margin-bottom: 10px;
}

.hero-title {
  font-size: clamp(38px, 4vw, 68px);
  font-weight: 800;
  margin: 0;
  line-height: .95;
}

.hero-title span { color: var(--accent); }
.hero-sub {
  margin-top: 14px;
  max-width: 560px;
  color: #d8e4ee;
  font-size: 15px;
}

.hero-live-zone {
  padding: 30px 34px;
}

.hero-live-grid {
  display: grid;
  grid-template-columns: 1.25fr .95fr;
  gap: 18px;
  align-items: stretch;
}

.hero-live-title {
  margin-top: 20px;
  font-size: clamp(32px, 3.4vw, 54px);
}

.hero-live-subtitle {
  margin-top: 6px;
  font-size: 19px;
  letter-spacing: .06em;
  text-transform: uppercase;
  color: #8ee3ff;
  font-weight: 700;
}

.hero-live-cards {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
}

.hero-live-card {
  border: 1px solid rgba(93, 208, 255, .26);
  background: linear-gradient(145deg, rgba(8, 27, 40, .85), rgba(6, 22, 32, .7));
  border-radius: 14px;
  padding: 12px 12px 10px;
  min-height: 88px;
}

.hero-live-value {
  margin-top: 8px;
  font-size: 20px;
  font-weight: 800;
  color: #d8f2ff;
}

.section-divider {
  grid-column: span 12;
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 10px 2px 2px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .16em;
  font-size: 12px;
  font-weight: 700;
}

.section-divider::before {
  content: "";
  width: 34px;
  height: 2px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent), var(--accent-2));
}

.competition-card {
  min-height: 150px;
}

.lb-badge {
  display: inline-flex;
  align-items: center;
  padding: 4px 8px;
  border-radius: 999px;
  border: 1px solid rgba(255, 255, 255, .1);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: .03em;
  margin: 2px 5px 2px 0;
}

.lb-badge.neutral {
  color: var(--muted);
  background: rgba(255, 255, 255, .04);
}

.lb-badge.flag {
  color: #ffd8df;
  background: rgba(255, 85, 119, .16);
  border-color: rgba(255, 85, 119, .34);
}

.lb-badge.butter {
  color: #b8ffd8;
  background: rgba(30, 215, 155, .18);
  border-color: rgba(30, 215, 155, .34);
  box-shadow: 0 0 12px rgba(30, 215, 155, .28);
}

.lb-badge.smooth {
  color: #c7f5ff;
  background: rgba(93, 208, 255, .16);
  border-color: rgba(93, 208, 255, .32);
}

.lb-badge.hard {
  color: #ffd5dd;
  background: rgba(255, 85, 119, .2);
  border-color: rgba(255, 85, 119, .38);
  box-shadow: 0 0 10px rgba(255, 85, 119, .32);
}

.lb-badge.bouncy {
  color: #ffe6bc;
  background: rgba(255, 196, 77, .18);
  border-color: rgba(255, 196, 77, .34);
}

.lb-badge.sop-eligible {
  color: #ffe9ab;
  background: rgba(237, 178, 46, .22);
  border-color: rgba(237, 178, 46, .45);
  box-shadow: 0 0 12px rgba(237, 178, 46, .3);
}

.rollout-fpm-label span {
  display: inline-block;
  padding: 3px 8px;
  border-radius: 999px;
  background: rgba(11, 25, 39, .82);
  border: 1px solid rgba(255, 255, 255, .25);
  color: #f8fbff;
  font-size: 11px;
  font-weight: 700;
  white-space: nowrap;
  box-shadow: 0 6px 14px rgba(0, 0, 0, .28);
}

.acars-aircraft-marker-icon {
  background: transparent !important;
  background-color: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
  filter: none !important;
  mask: none !important;
  -webkit-mask-image: none !important;
  mix-blend-mode: normal !important;
  color: initial !important;
  opacity: 1 !important;
  transform-origin: 50% 50% !important;
  backface-visibility: hidden;
  -webkit-backface-visibility: hidden;
  image-rendering: auto;
  will-change: transform, rotate;
}

#activeFlightMap .leaflet-pane,
#activeFlightMap .leaflet-pane * {
  filter: none;
  mask: none;
  -webkit-mask-image: none;
  mix-blend-mode: normal;
}

#activeFlightMap .leaflet-marker-pane .acars-aircraft-marker-icon {
  opacity: 1 !important;
  background: transparent !important;
  background-color: transparent !important;
}

.acars-aircraft-icon {
  background: transparent !important;
  border: 0 !important;
  box-shadow: none !important;
}

.acars-aircraft-icon .acars-aircraft-icon-inner {
  width: 100%;
  height: 100%;
  display: flex;
  align-items: center;
  justify-content: center;
}

.acars-aircraft-rotor {
  display: flex;
  align-items: center;
  justify-content: center;
  transform-origin: 50% 50%;
  will-change: transform;
}

.section-grid {
  display: grid;
  grid-template-columns: repeat(12, 1fr);
  gap: 18px;
  margin-top: 18px;
}

.card-avi {
  background: var(--card-bg);
  border: 1px solid var(--border);
  border-radius: 20px;
  box-shadow: var(--shadow);
  overflow: hidden;
}

.card-avi-header {
  padding: 16px 18px;
  border-bottom: 1px solid var(--card-header-border);
  color: var(--text);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.card-avi-body { padding: 18px; }
.metric-card {
  padding: 16px 18px;
  min-height: 124px;
  position: relative;
}
.metric-label {
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .12em;
  font-size: 12px;
}
.metric-value {
  font-size: 36px;
  font-weight: 800;
  margin-top: 14px;
}
.metric-hint {
  color: var(--muted);
  font-size: 13px;
  margin-top: 6px;
}
.metric-value.accent { color: var(--accent); }
.metric-value.cyan { color: var(--accent-2); }
.metric-value.green { color: var(--ok); }
.metric-value.red { color: var(--danger); }

.table-avi {
  width: 100%;
  border-collapse: collapse;
}
.table-avi th {
  text-align: left;
  font-size: 12px;
  color: var(--muted);
  letter-spacing: .08em;
  text-transform: uppercase;
  padding: 12px 14px;
  border-bottom: 1px solid var(--table-head-border);
}
.table-avi td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--table-row-border);
  color: var(--text);
  vertical-align: top;
}
.table-avi tr:hover td { background: var(--table-row-hover); }
.table-avi tr.active-flight-row-selected td {
  background: rgba(93, 208, 255, 0.14);
  border-bottom-color: rgba(93, 208, 255, 0.32);
}

.badge-avi {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 12px;
  font-weight: 600;
  border: 1px solid rgba(255,255,255,.08);
  background: rgba(255,255,255,.03);
}
.badge-avi.ok { color: #b9ffd5; background: rgba(30,215,155,.12); border-color: rgba(30,215,155,.25); }
.badge-avi.warn { color: #ffe3a7; background: rgba(255,196,77,.12); border-color: rgba(255,196,77,.25); }
.badge-avi.accent { color: #ffd1e7; background: rgba(255,23,136,.12); border-color: rgba(255,23,136,.25); }

.lang-switch-avi {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 12px;
  border: 1px solid rgba(255, 255, 255, 0.14);
  background: rgba(5, 18, 30, 0.38);
  backdrop-filter: blur(4px);
}

.lang-switch-label {
  font-size: 12px;
  color: #cfe4f1;
  letter-spacing: .06em;
  text-transform: uppercase;
}

.lang-switch-actions {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.lang-switch-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 68px;
  padding: 6px 10px;
}

.lang-switch-link.active {
  border-color: rgba(93, 208, 255, .72);
  color: #7fdcff;
  background: rgba(93, 208, 255, .10);
}

.topbar-lang-switch {
  padding: 6px 8px;
  border-radius: 10px;
}

.topbar-lang-switch .lang-switch-label {
  font-size: 11px;
}

.topbar-lang-switch .lang-switch-link {
  min-width: 40px;
  padding: 5px 8px;
}

.ranking-controls {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.ranking-controls-label {
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
  letter-spacing: .08em;
}

.ranking-limit-group {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.ranking-limit-btn {
  padding: 7px 10px;
  border-radius: 10px;
  font-size: 12px;
}

.ranking-limit-btn.active {
  border-color: rgba(93, 208, 255, .72);
  color: #7fdcff;
  background: rgba(93, 208, 255, .10);
}

.btn-avi,
.btn-avi-outline,
.btn-avi-danger,
.btn-avi-warning {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  font-weight: 700;
  font-size: 14px;
  transition: .18s ease;
}
.btn-avi { background: linear-gradient(135deg, var(--accent), #ff4ba6); color: white; }
.btn-avi:hover { filter: brightness(1.06); }
.btn-avi-outline { background: var(--btn-outline-bg); color: var(--btn-outline-text); border: 1px solid var(--btn-outline-border); }
.btn-avi-outline:hover { background: var(--btn-outline-hover); }
.btn-avi-danger { background: rgba(255,85,119,.14); color: #ffd6df; border: 1px solid rgba(255,85,119,.24); }
.btn-avi-warning { background: rgba(255,196,77,.14); color: #ffe6b0; border: 1px solid rgba(255,196,77,.24); }

.form-control-avi {
  width: 100%;
  background: var(--input-bg);
  color: var(--input-text);
  border: 1px solid var(--input-border);
  border-radius: 14px;
  padding: 12px 14px;
  outline: none;
}
.form-control-avi::placeholder { color: var(--input-placeholder); }
.form-control-avi:focus { border-color: var(--input-focus-border); box-shadow: 0 0 0 4px var(--input-focus-ring); }

.muted { color: var(--muted); }
.page-title {
  font-size: 28px;
  font-weight: 800;
  margin: 0;
}
.page-subtitle { color: var(--muted); margin-top: 6px; }

.flight-strip {
  display: grid;
  grid-template-columns: 1fr auto 1fr auto;
  gap: 16px;
  align-items: center;
  padding: 18px;
}
.flight-strip .apt {
  font-size: 34px;
  font-weight: 800;
}
.flight-strip .label { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .12em; }
.flight-arrow {
  color: var(--accent);
  font-size: 28px;
  font-weight: 800;
}

.empty-state {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

.pilot-row-self td {
  background: rgba(93, 208, 255, .08);
}

.my-compare-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(160px, 1fr));
  gap: 12px;
}

.my-compare-item {
  border: 1px solid var(--border);
  border-radius: 12px;
  padding: 12px;
  background: var(--card-bg);
}

.my-compare-item-wide {
  grid-column: 1 / -1;
}

.table-responsive {
  width: 100%;
  overflow-x: auto;
}

.latest-landings-card .card-avi-header {
  align-items: center;
}

.table-avi-landings {
  min-width: 1120px;
}

.table-avi-landings th,
.table-avi-landings td {
  white-space: nowrap;
}

.sop-formula {
  padding: 14px 16px;
  border: 1px solid rgba(93,208,255,.24);
  border-radius: 14px;
  background: linear-gradient(180deg, rgba(8,31,46,.84), rgba(7,25,38,.84));
  color: #d8f1ff;
}

.sop-formula code,
.table-avi code {
  color: #9ee6ff;
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  font-size: 12px;
}

.site-footer {
  margin-top: 22px;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--border);
  background: var(--card-bg);
}

.site-footer-main {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.site-copy {
  color: var(--muted);
  font-size: 13px;
}

.site-legal-links {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  color: var(--muted);
  font-size: 13px;
}

.site-legal-links a {
  color: var(--accent-2);
}

.site-legal-links a:hover {
  color: #9ee6ff;
}

.site-views-inline {
  color: var(--accent-2);
  font-weight: 700;
  font-size: 12px;
}

.admin-online-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #2ce56f;
  font-size: 14px;
  line-height: 1;
  text-shadow: 0 0 8px rgba(44, 229, 111, 0.45);
}

html[data-theme="light"] .nav-link-avi:hover,
html[data-theme="light"] .nav-link-avi.active {
  color: #0d334c;
  background: linear-gradient(90deg, rgba(217,26,115,.12), rgba(10,135,201,.12));
  box-shadow: inset 0 0 0 1px rgba(10, 77, 118, .12);
}

html[data-theme="light"] .topbar-title {
  color: #557082;
}

html[data-theme="light"] .acars-download-banner {
  border-color: rgba(10, 103, 155, 0.34);
  background:
    linear-gradient(115deg, rgba(255, 255, 255, 0.97), rgba(231, 244, 253, 0.96)),
    radial-gradient(circle at top right, rgba(217, 26, 115, 0.12), transparent 42%);
  box-shadow: 0 10px 24px rgba(14, 51, 78, 0.12);
}

html[data-theme="light"] .acars-download-title {
  color: #11384f;
}

html[data-theme="light"] .acars-download-desc {
  color: #4b6e83;
}

html[data-theme="light"] .acars-download-version {
  color: #0a6b9f;
}

html[data-theme="light"] .acars-download-steps span {
  border-color: rgba(11, 88, 132, 0.2);
  background: rgba(11, 88, 132, 0.06);
  color: #305e77;
}

html[data-theme="light"] .site-legal-links a:hover {
  color: #0a679b;
}

html[data-theme="light"] .lang-switch-avi {
  border-color: rgba(20, 72, 112, .18);
  background: rgba(255, 255, 255, .62);
}

html[data-theme="light"] .lang-switch-label {
  color: #4a6478;
}

html[data-theme="light"] .lang-switch-link.active {
  border-color: rgba(10, 103, 155, .58);
  color: #0a679b;
  background: rgba(10, 103, 155, .08);
}

html[data-theme="light"] .hero-live-card {
  border-color: rgba(10, 103, 155, .24);
  background: linear-gradient(145deg, rgba(255, 255, 255, .92), rgba(241, 248, 254, .94));
}

html[data-theme="light"] .hero-live-subtitle {
  color: #0b6b9f;
}

html[data-theme="light"] .hero-live-value {
  color: #12394e;
}

html[data-theme="light"] .table-avi tr.active-flight-row-selected td {
  background: rgba(10, 135, 201, 0.14);
  border-bottom-color: rgba(10, 135, 201, 0.32);
}

html[data-theme="light"] .rollout-fpm-label span {
  background: rgba(255, 255, 255, .92);
  border-color: rgba(11, 88, 132, .28);
  color: #14384d;
}

@media (max-width: 1100px) {
  .app-shell { grid-template-columns: 1fr; }
  .sidebar {
    position: static;
    height: auto;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 8px;
    padding: 12px;
    border-right: 0;
    border-bottom: 1px solid var(--sidebar-border);
  }
  .brand-block {
    flex: 1 1 220px;
    margin-bottom: 0;
    border-bottom: 0;
    padding: 6px 8px 10px;
  }
  .brand-logo {
    max-width: 180px;
    margin: 0;
  }
  .nav-group-label {
    display: none;
  }
  .nav-link-avi {
    margin-bottom: 0;
    padding: 9px 12px;
    border-radius: 12px;
    font-size: 14px;
  }
  .main-wrap { padding: 16px 16px 28px; }
  .hero-live-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 900px) {
  .section-grid {
    grid-template-columns: 1fr;
    gap: 14px;
  }
  .section-grid > * {
    grid-column: 1 / -1 !important;
  }
  .topbar-user {
    width: 100%;
    align-items: flex-start;
    flex-wrap: wrap;
  }
  .topbar-actions {
    width: 100%;
  }
  .topbar-actions .btn-avi-outline,
  .topbar-actions .btn-avi {
    flex: 1 1 140px;
    text-align: center;
  }
  .topbar-actions form {
    flex: 1 1 140px;
  }
  .topbar-actions form .btn-avi-outline {
    width: 100%;
  }
  .acars-download-banner {
    flex-direction: column;
    align-items: flex-start;
  }
  .acars-download-banner-actions {
    width: 100%;
  }
  .acars-download-btn {
    width: 100%;
    min-width: 0;
  }
  .metric-value {
    font-size: 30px;
  }
  .hero-live-zone {
    padding: 22px 20px;
  }
  .hero-live-cards {
    grid-template-columns: 1fr 1fr;
  }
  .my-compare-grid {
    grid-template-columns: repeat(2, minmax(140px, 1fr));
  }
}

@media (max-width: 760px) {
  .main-wrap { padding: 16px 14px 28px; }
  .hero { padding: 24px 20px; min-height: 200px; }
  .hero-live-title {
    margin-top: 12px;
    font-size: clamp(30px, 10vw, 42px);
  }
  .hero-live-subtitle {
    font-size: 14px;
  }
  .hero-live-cards {
    grid-template-columns: 1fr;
  }
  .flight-strip { grid-template-columns: 1fr; text-align: center; }
  .topbar {
    flex-direction: column;
    align-items: flex-start;
  }
  .topbar-user {
    gap: 10px;
    padding: 10px;
  }
  .user-badge {
    width: 46px;
    height: 46px;
  }
  .table-avi th,
  .table-avi td {
    padding: 10px 8px;
    white-space: nowrap;
  }
  .card-avi-body {
    padding: 14px;
  }
  .theme-toggle {
    min-width: 100%;
  }
  .site-footer-main {
    flex-direction: column;
    align-items: flex-start;
  }
  .my-compare-grid {
    grid-template-columns: 1fr;
  }
}
