/* =========================
   HERO SECTION
========================= */

.hero-container {
  position: relative;
  height: 200px;
  border-radius: 16px;
  overflow: hidden;
  background-image: url('/image/images/clouds.png');
  background-size: cover;
  background-position: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.15);
}

.hero-container::before {
  content: '';
  position: absolute;
  inset: 0;
  background: linear-gradient(
    90deg,
    rgba(75, 0, 130, 0.9) 0%,
    rgba(75, 0, 130, 0.75) 35%,
    rgba(75, 0, 130, 0.4) 55%,
    rgba(75, 0, 130, 0) 75%
  );
  z-index: 1;
}

.hero-content {
  position: relative;
  z-index: 2;
  display: flex;
  align-items: center;
  justify-content: space-between;
  height: 100%;
  padding: 0 60px;
}

.hero-text h2 {
  color: #fff;
  font-weight: 700;
  font-size: 2rem;
  margin-bottom: 8px;
}

.hero-text p {
  color: #e0d8ff;
  font-size: 1rem;
  margin: 0;
}

.hero-plane img {
  height: 200px;
  max-width: 600px;
  object-fit: contain;
}

.hero-divider {
  height: 2px;
  width: 620px;
  max-width: 60vw;
  margin: 10px 0 12px;
  background: linear-gradient(
    90deg,
    rgba(255, 255, 255, 1) 0%,
    rgba(255, 255, 255, 0.75) 40%,
    rgba(255, 255, 255, 0.2) 65%,
    rgba(255, 255, 255, 0) 100%
  );
  border-radius: 999px;
  box-shadow: 0 0 8px rgba(255, 255, 255, 0.3);
}

@media (max-width: 992px) {
  .hero-content {
    padding: 0 30px;
  }

  .hero-plane img {
    height: 140px;
  }

  .hero-text h2 {
    font-size: 1.5rem;
  }
}

/* =========================
   GLOBAL UTILITIES
========================= */

.rank-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.5rem;
  padding: 0.25rem 0.6rem;
  border-radius: 999px;
  background: rgba(255, 77, 0, 0.12);
  color: #ff4d00;
  font-weight: 700;
  font-size: 0.85rem;
}

.rank-insignia {
  width: 28px;
  height: 28px;
  object-fit: contain;
}

.av-page-wrap {
  width: 100%;
  max-width: 1400px;
  margin: 0 auto;
  padding-left: 24px;
  padding-right: 24px;
}

@media (min-width: 1600px) {
  .av-page-wrap {
    max-width: 1500px;
  }
}

@media (min-width: 2000px) {
  .av-page-wrap {
    max-width: 1600px;
  }
}

.av-container {
  max-width: 1200px;
}

/* =========================
   CARD SYSTEM
========================= */

.av-card {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  overflow: hidden;
}

.av-card-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 14px 16px;
  color: #fff;
  background: rgba(75, 0, 130, 1);
  border-bottom: none;
}

.av-card-title {
  font-weight: 700;
  font-size: 1rem;
  color: #fff;
}

.av-card-body {
  padding: 16px;
}

.av-pill {
  display: inline-block;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 0.75rem;
  font-weight: 700;
  background: rgba(75, 0, 130, 0.12);
  color: rgba(75, 0, 130, 1);
}

.av-card-headerright .av-pill {
  background: rgba(255, 255, 255, 0.2);
  color: #fff;
}

.h-100 > .av-card,
.row.align-items-stretch > div > .av-card {
  height: 100%;
}

/* =========================
   BUTTONS / LINKS / INPUTS
========================= */

.av-btn {
  background: #ff4d00;
  border: none;
  color: #fff;
  font-weight: 800;
  font-size: 0.95rem;
  border-radius: 12px;
  padding: 12px 18px;
}

.av-btn:hover {
  opacity: 0.95;
}

.av-btn-outline,
.av-btn-secondary {
  border-radius: 12px;
  font-weight: 800;
  padding: 10px 14px;
}

.av-btn-secondary:hover {
  background: rgba(75, 0, 130, 0.06);
}

.av-btn-xs {
  padding: 6px 12px;
  font-size: 0.8rem;
  border-radius: 10px;
  font-weight: 800;
}

.av-btn-lite {
  border-radius: 12px !important;
  font-weight: 800 !important;
}

.av-link {
  color: #4b0082;
  text-decoration: none;
  font-weight: 700;
}

.av-link:hover {
  text-decoration: underline;
}

.av-input {
  border-radius: 12px;
  padding: 10px 12px;
}

/* =========================
   STAT CARDS
========================= */

.row.g-3.mb-4 > [class*="col-"] {
  display: flex;
}

.av-stat {
  flex: 1;
  display: flex;
  height: 100%;
  gap: 14px;
  align-items: center;
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08);
  padding: 16px;
  min-height: 110px;
  transition: transform 0.2s ease, box-shadow 0.2s ease;
}

.av-stat:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 45px rgba(0, 0, 0, 0.12);
}

.av-stat-icon {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255, 77, 0, 0.12);
  color: #ff4d00;
  font-size: 1.25rem;
}

.av-stat-label {
  font-size: 0.85rem;
  color: rgba(0, 0, 0, 0.55);
  font-weight: 600;
  margin-bottom: 2px;
}

.av-stat-value {
  font-size: 1.6rem;
  font-weight: 800;
  line-height: 1.1;
}

.av-rank-bar {
  height: 8px;
  margin-top: 6px;
}

.av-rank-sub {
  margin-top: 6px;
  font-size: 0.75rem;
}

.av-rank-bar-fill {
  height: 100%;
  background: #ff4d00;
  width: 0;
  transition: width 0.6s ease;
}

/* =========================
   MAP / METAR / BOOKINGS
========================= */

.av-map-wrap {
  padding: 0;
}

.av-map-wrap .leaflet-container {
  border-radius: 0 0 16px 16px;
}

.av-metar-wrap {
  padding: 10px 12px 0 12px;
}

.av-metar-anchor {
  display: block;
  width: 100%;
  height: 170px;
  font-size: 0.95rem;
}

.av-metar-standalone {
  border-radius: 14px;
  overflow: hidden;
}

[id^="metartaf-"] {
  background: #4b0082 !important;
  color: #ffffff !important;
  border-radius: 12px;
  overflow: hidden;
}

[id^="metartaf-"] * {
  color: #ffffff !important;
}

[id^="metartaf-"] a {
  color: #ffffff !important;
}


.av-booking-wrap table,
.av-flights-table table {
  width: 100%;
  border-collapse: separate;
  border-spacing: 0;
}

.av-booking-wrap table th,
.av-flights-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(0, 0, 0, 0.5);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 10px 8px;
}

.av-booking-wrap table td,
.av-flights-table td {
  padding: 10px 8px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  vertical-align: middle;
}

.av-booking-wrap table tr:last-child td,
.av-flights-table tr:last-child td {
  border-bottom: 0;
}

/* =========================
   NAVBAR
========================= */

.navbar.av-navbar,
.av-navbar {
  background: rgba(75, 0, 130, 1) !important;
}

.navbar.av-navbar .navbar-brand,
.navbar.av-navbar .nav-link,
.av-nav-username {
  color: #fff !important;
}

.navbar.av-navbar .nav-link:hover {
  opacity: 0.85;
}

.av-nav-logo {
  height: 40px;
  object-fit: contain;
}

.av-nav-avatar {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.35);
}

.av-dropdown {
  border-radius: 14px;
  padding: 8px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.18);
}

.av-dropdown .dropdown-item {
  border-radius: 10px;
  padding: 10px 12px;
  font-weight: 700;
}

.av-dropdown .dropdown-item:hover {
  background: rgba(75, 0, 130, 0.08);
}
.av-theme-toggle {
  width: 44px;
  height: 44px;
  border-radius: 14px;
  border: 1px solid rgba(255,255,255,0.14);
  background: rgba(246, 244, 244, 0.08);
  color: #fff;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transition: all 0.2s ease;
}

.av-theme-toggle:hover {
  background: rgba(255,255,255,0.14);
  color: #fff;
}

body.theme-light .av-theme-toggle {
  border-color: rgba(0,0,0,0.08);
  background: rgba(0,0,0,0.04);
  color: #ffffffcf;
}

/* =========================
   AUTH
========================= */

.av-auth-page {
  min-height: 100vh;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 0;
  position: relative;
  overflow: hidden;
}

.av-auth-bg {
  position: absolute;
  inset: 0;
  background: radial-gradient(
    circle at 20% 10%,
    rgba(106, 27, 191, 0.55) 0%,
    rgba(75, 0, 130, 0.9) 40%,
    rgba(58, 0, 102, 1) 100%
  );
  animation: avGradient 10s ease-in-out infinite alternate;
  z-index: 0;
}

.av-auth-bg::after {
  content: '';
  position: absolute;
  inset: -30%;
  background:
    radial-gradient(circle at 20% 65%, rgba(255, 255, 255, 0.1) 0%, rgba(255, 255, 255, 0) 55%),
    radial-gradient(circle at 55% 75%, rgba(255, 255, 255, 0.08) 0%, rgba(255, 255, 255, 0) 55%),
    radial-gradient(circle at 80% 55%, rgba(255, 255, 255, 0.07) 0%, rgba(255, 255, 255, 0) 60%);
  filter: blur(10px);
  opacity: 0.9;
}

.av-auth-page .container {
  position: relative;
  z-index: 1;
}

.av-auth-card {
  background: rgba(255, 255, 255, 0.96);
  border-radius: 20px;
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.35);
  overflow: hidden;
  backdrop-filter: blur(10px);
}

.av-auth-header {
  padding: 18px 18px 16px 18px;
  background: linear-gradient(90deg, #4b0082 0%, #6a1bbf 100%);
  color: #fff;
}

.av-auth-brand {
  display: flex;
  align-items: center;
  gap: 12px;
}

.av-auth-logo {
  width: 46px;
  height: 46px;
  border-radius: 14px;
  object-fit: contain;
  background: rgba(255, 255, 255, 0.12);
  padding: 7px;
}

.av-auth-title {
  font-weight: 800;
  font-size: 1.25rem;
  line-height: 1.2;
}

.av-auth-subtitle {
  opacity: 0.9;
  font-size: 0.9rem;
}

.av-auth-body,
.av-auth-body-inner {
  padding: 18px;
}

@keyframes avGradient {
  0% { transform: scale(1) translate3d(0, 0, 0); }
  100% { transform: scale(1.05) translate3d(-1%, -1%, 0); }
}

/* =========================
   PROFILE
========================= */

.av-profile-header {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 14px 40px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  position: relative;
}

.av-profile-topbar {
  height: 8px;
  background: linear-gradient(90deg, #4b0082 0%, #6a1bbf 60%, #ff4d00 120%);
}

.av-profile-status {
  position: absolute;
  top: 12px;
  right: 12px;
  border-radius: 999px;
  padding: 4px 10px;
  font-weight: 800;
  font-size: 0.72rem;
  letter-spacing: 0.05em;
  box-shadow: 0 3px 8px rgba(0, 0, 0, 0.15);
}

.av-profile-email {
  color: rgba(0, 0, 0, 0.65);
  font-weight: 700;
  font-size: 0.9rem;
}

.av-profile-inner {
  padding: 18px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.av-profile-avatar {
  width: 84px;
  height: 84px;
  border-radius: 18px;
  object-fit: cover;
  border: 3px solid rgba(75, 0, 130, 0.15);
  box-shadow: 0 10px 25px rgba(0, 0, 0, 0.1);
  background: #f6f4ff;
}

.av-profile-name {
  font-weight: 900;
  font-size: 1.6rem;
  line-height: 1.1;
  color: #14121a;
}

.av-profile-sub {
  color: rgba(0, 0, 0, 0.65);
  font-weight: 600;
  margin-top: 4px;
}

.av-profile-flag {
  font-size: 0.8rem;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.45);
  margin-left: 8px;
}

.av-chip {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  padding: 0.45rem 0.7rem;
  border-radius: 999px;
  border: 1px solid rgba(0, 0, 0, 0.08);
  background: #fff;
  color: rgba(0, 0, 0, 0.75);
  font-weight: 700;
  font-size: 0.85rem;
}

.av-discord-btn {
  border-radius: 12px;
  font-weight: 700;
  padding: 10px 14px;
  border: 1px solid #5865F2;
  color: #5865F2;
  background: #fff;
}

.av-discord-btn:hover {
  background: #5865F2;
  color: #fff;
  border-color: #5865F2;
}

.av-discord-disconnect {
  border-color: #dc3545;
  color: #dc3545;
}

.av-discord-disconnect:hover {
  background: #dc3545;
  color: #fff;
}

.av-details-compact {
  padding: 12px 16px;
  height: auto !important;
  min-height: 0 !important;
  overflow: visible !important;
}

.av-details-compact table {
  width: 100%;
}

.av-details-compact table td,
.av-details-compact table th {
  padding: 6px 0 !important;
  vertical-align: top;
  white-space: normal;
}

.av-details-compact .av-detail-value {
  overflow-wrap: anywhere;
  word-break: break-word;
}

.av-profile-right .av-card {
  height: auto !important;
}

.av-award-card {
  background: #fff;
  border-radius: 12px;
  padding: 14px;
  text-align: center;
  border: 1px solid rgba(0, 0, 0, 0.05);
  transition: all 0.15s ease;
}

.av-award-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.08);
}

.av-award-img {
  max-width: 90px;
  margin-bottom: 8px;
}

.av-award-name {
  font-size: 0.85rem;
  font-weight: 700;
  color: #444;
}

@media (max-width: 992px) {
  .av-profile-inner {
    flex-direction: column;
    align-items: flex-start;
  }

  .av-profile-inner > div:last-child {
    width: 100%;
    align-items: flex-start !important;
  }
}

/* =========================
   FLIGHT CARDS / FLIGHT SEARCH
========================= */

.av-flightcard {
  background: #fff;
  border-radius: 16px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.1);
  padding: 14px 16px;
  overflow: hidden;
}

.av-flightcard-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.av-flightcard-primary {
  background: #eaf8ee;
  border: 1px solid #7ac48a;
  box-shadow: inset 4px 0 0 #28a745;
}

.av-flightcard-secondary {
  background: #fff8db;
  border: 1px solid #e4c65a;
  box-shadow: inset 4px 0 0 #f0ad4e;
}

.av-flightcard-tour {
  border-left: 4px solid #28a745;
  background: rgba(40, 167, 69, 0.04);
  box-shadow: 0 0 0 1px rgba(40, 167, 69, 0.15);
}

.av-flight-ident {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
}

.av-flight-badge {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  background: rgba(75, 0, 130, 0.12);
  color: rgba(75, 0, 130, 1);
  font-weight: 900;
  font-size: 0.8rem;
}

.av-badge-tour {
  background-color: #28a745;
  color: #fff;
  font-weight: 600;
  font-size: 0.75rem;
  padding: 4px 8px;
  border-radius: 6px;
  margin-left: 6px;
}

.av-flight-route {
  font-weight: 900;
  font-size: 1.15rem;
}

.av-flight-sub {
  margin-top: 4px;
}

.av-flightcard-right {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-shrink: 0;
}

.av-flightcard-meta {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 12px;
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.av-meta-item {
  display: flex;
  flex-direction: column;
  gap: 2px;
  padding: 10px 10px;
  border-radius: 14px;
  background: rgba(0, 0, 0, 0.02);
}

.av-meta-item i {
  color: rgba(75, 0, 130, 1);
  margin-bottom: 4px;
}

.av-meta-label {
  font-size: 0.72rem;
  color: rgba(0, 0, 0, 0.55);
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

.av-meta-value {
  font-size: 0.98rem;
  font-weight: 900;
}

.av-meta-sub {
  font-size: 0.78rem;
  color: rgba(0, 0, 0, 0.55);
}

.av-flightcard-notes {
  margin-top: 12px;
  padding-top: 12px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  color: rgba(0, 0, 0, 0.7);
  font-size: 0.92rem;
}

.av-filter-label {
  font-size: 0.78rem;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.6);
  text-transform: uppercase;
  letter-spacing: 0.03em;
  margin-bottom: 0.35rem;
}

.av-filterbar {
  padding: 2px;
}

.av-filterbar .form-control,
.av-filterbar .form-select {
  border-radius: 12px;
}

.av-jumpseat-note {
  width: 100%;
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.8rem;
  color: #4b0082;
  background: rgba(75, 0, 130, 0.08);
  border-left: 3px solid rgba(75, 0, 130, 0.45);
  border-radius: 8px;
  padding: 6px 10px;
  margin-top: 6px;
}

.av-jumpseat-plane {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #4b0082;
  font-size: 0.8rem;
  animation: avJumpseatPlane 3s ease-in-out infinite;
}

@keyframes avJumpseatPlane {
  0% { transform: translateX(0px); opacity: 0.8; }
  50% { transform: translateX(6px); opacity: 1; }
  100% { transform: translateX(0px); opacity: 0.8; }
}

@media (max-width: 992px) {
  .av-flightcard-meta {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

/* =========================
   LIVE PROGRESS / WORKFLOW / OPS
========================= */

.av-live-progress {
  width: 100%;
}

.av-live-progress .av-chip {
  background: rgba(75, 0, 130, 0.06);
  border-color: rgba(75, 0, 130, 0.1);
}

.av-live-progress-track {
  position: relative;
  height: 12px;
  border-radius: 999px;
  overflow: visible;
}

.av-live-progress-fill {
  height: 100%;
  border-radius: 999px;
  transition: width 0.35s ease;
}

.av-live-progress-plane {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.95rem;
  line-height: 1;
  transition: left 0.35s ease;
  z-index: 2;
}

.av-workflow-row {
  display: flex;
  align-items: center;
  gap: 0.75rem;
  flex-wrap: wrap;
}

.av-workflow-step {
  display: flex;
  flex-direction: column;
  align-items: center;
  min-width: 110px;
  text-align: center;
}

.av-workflow-circle {
  width: 38px;
  height: 38px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 800;
  background: #e9ecef;
  color: #6c757d;
  border: 2px solid #dee2e6;
}

.av-workflow-label {
  margin-top: 0.45rem;
  font-size: 0.85rem;
  font-weight: 600;
  color: #6c757d;
  line-height: 1.2;
}

.av-workflow-line {
  flex: 1 1 40px;
  height: 4px;
  border-radius: 999px;
  background: #e9ecef;
  min-width: 30px;
}

.av-workflow-step.is-complete .av-workflow-circle {
  background: #2f9e44;
  border-color: #2f9e44;
  color: #fff;
}

.av-workflow-step.is-complete .av-workflow-label {
  color: #226c32;
}

.av-workflow-step.is-current .av-workflow-circle {
  background: #eaf2ff;
  border-color: #0d6efd;
  color: #0d6efd;
}

.av-workflow-step.is-current .av-workflow-label {
  color: #0d6efd;
}

.av-workflow-line.is-complete {
  background: #2f9e44;
}

.av-ops-row {
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
  border-radius: 16px;
  padding: 14px 16px;
  box-shadow: 0 6px 18px rgba(0, 0, 0, 0.04);
}

.av-ops-row + .av-ops-row {
  margin-top: 10px;
}

.av-ops-table-wrap,
.av-ops-embedded,
.av-airline-ops-section .av-ops-embedded {
  border-radius: 16px;
  overflow: hidden;
  background: #fff;
  border: 1px solid rgba(0, 0, 0, 0.06);
}

.av-ops-table {
  margin: 0;
}

.av-ops-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 12px 14px;
  background: #faf9fd;
  white-space: nowrap;
}

.av-ops-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  vertical-align: middle;
}

.av-ops-table tbody tr:last-child td {
  border-bottom: 0;
}

.av-ops-current-user {
  background: rgba(75, 0, 130, 0.06);
}

.av-ops-phase {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 800;
  white-space: nowrap;
}

.av-ops-phase.phase-yellow {
  background: #fff8db;
  color: #7a6400;
}

.av-ops-phase.phase-blue {
  background: #eff6ff;
  color: #1d4ed8;
}

.av-ops-phase.phase-green {
  background: #eaf8ee;
  color: #226c32;
}

.av-ops-phase.phase-orange {
  background: #fff1e6;
  color: #c05621;
}

.av-ops-phase.phase-neutral {
  background: #f1f3f5;
  color: #495057;
}

.av-ops-mini-progress {
  position: relative;
  width: 100%;
  height: 8px;
  border-radius: 999px;
  background: rgba(75, 0, 130, 0.1);
  overflow: visible;
}

.av-ops-mini-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4b0082 0%, #ff4d00 100%);
  transition: width 2s linear;
}

.av-ops-mini-plane {
  position: absolute;
  top: 50%;
  transform: translate(-50%, -50%);
  font-size: 0.75rem;
  color: #4b0082;
  transition: left 2s linear;
  line-height: 1;
}

.av-ops-mini-plane i {
  transform: rotate(45deg);
}

.av-airline-ops-section hr {
  border-top: 1px solid rgba(0, 0, 0, 0.06);
}

.av-airline-ops-section .av-stat {
  min-height: 96px;
}

/* =========================
   LIVE MAP MARKERS
========================= */

.live-aircraft-marker {
  background: transparent !important;
  border: none !important;
}

.live-aircraft-wrap {
  display: flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.live-aircraft-icon {
  width: 14px;
  height: 14px;
  display: block;
  transform-origin: center center;
}

.live-aircraft-callsign {
  font-size: 10px;
  font-weight: 600;
  line-height: 1.15;
  color: #00FF21;
  background-color: #000;
  padding: 2px 5px;
  border-radius: 4px;
  display: inline-block;
}

.av-click-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.av-click-row:hover {
  background: rgba(75, 0, 130, 0.04);
}

/* =========================
   TOURS
========================= */

.av-tour-shell {
  animation: avTourFadeIn 0.25s ease;
}

@keyframes avTourFadeIn {
  from { opacity: 0; transform: translateY(4px); }
  to   { opacity: 1; transform: translateY(0); }
}

.av-tour-shell .av-card,
.av-tour-shell .card {
  border-radius: 18px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  border: 0;
}

.av-tour-empty {
  color: rgba(0, 0, 0, 0.55);
  font-weight: 600;
}

.av-tour-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 10px;
  border-radius: 999px;
  font-size: 0.76rem;
  font-weight: 800;
  letter-spacing: 0.02em;
  white-space: nowrap;
}

.av-tour-pill.completed {
  background: #eaf8ee;
  color: #226c32;
}

.av-tour-pill.progress {
  background: #eff6ff;
  color: #1d4ed8;
}

.av-tour-pill.not-started {
  background: #f1f3f5;
  color: #495057;
}

.av-tour-pill.locked {
  background: #f1f3f5;
  color: #6c757d;
}

.av-tour-pill.next {
  background: rgba(75, 0, 130, 0.12);
  color: rgba(75, 0, 130, 1);
}

.av-tour-pill.award {
  background: rgba(255, 77, 0, 0.12);
  color: #ff4d00;
}

.av-tour-progress {
  margin-top: 8px;
}

.av-tour-progress-label {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 8px;
  font-size: 0.82rem;
  color: rgba(0, 0, 0, 0.58);
  font-weight: 700;
}

.av-tour-progress-bar {
  width: 100%;
  height: 10px;
  border-radius: 999px;
  overflow: hidden;
  background: rgba(75, 0, 130, 0.1);
  box-shadow: inset 0 1px 2px rgba(0, 0, 0, 0.06);
}

.av-tour-progress-fill {
  height: 100%;
  border-radius: 999px;
  background: linear-gradient(90deg, #4b0082 0%, #ff4d00 100%);
  transition: width 0.45s ease;
}

.av-tour-statgrid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.av-tour-stat {
  background: rgba(0, 0, 0, 0.025);
  border-radius: 14px;
  padding: 12px 14px;
}

.av-tour-stat-label {
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  font-weight: 800;
  color: rgba(0, 0, 0, 0.5);
  margin-bottom: 3px;
}

.av-tour-stat-value {
  font-size: 1rem;
  font-weight: 900;
  color: #14121a;
}

.av-tour-banner {
  position: relative;
  background: #fff;
  border-radius: 18px;
  overflow: hidden;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08);
}

.av-tour-banner-image {
  width: 100%;
  height: auto;
  display: block;
}

.av-tour-banner-body {
  padding: 20px 22px;
  background: #fff;
}

.av-tour-banner-meta {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 10px;
}

.av-tour-banner-divider {
  height: 1px;
  background: rgba(0, 0, 0, 0.06);
  margin: 18px 0;
}

.av-tour-title {
  font-size: 1.8rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 6px;
  color: #14121a;
}

.av-tour-subtitle {
  color: rgba(0, 0, 0, 0.58);
  font-weight: 600;
  font-size: 0.95rem;
}

.av-tour-desc {
  color: rgba(0, 0, 0, 0.72);
  margin-top: 10px;
}

.av-tour-section-title {
  font-size: 1.1rem;
  font-weight: 900;
  margin: 0;
}

.av-tour-stack > * + * {
  margin-top: 1rem;
}

.av-tour-map-wrap,
#tour-map {
  background: #f8f7fb;
  border-radius: 16px;
  overflow: hidden;
}

#tour-map .leaflet-popup-content-wrapper {
  border-radius: 12px;
}

#tour-map .leaflet-popup-content {
  font-weight: 600;
  line-height: 1.4;
}

/* Tours index */
.av-tour-index-card {
  background: #fff;
  border-radius: 18px;
  box-shadow: 0 14px 35px rgba(0, 0, 0, 0.08);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  height: 100%;
  transition: transform 0.18s ease, box-shadow 0.18s ease;
}

.av-tour-index-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 18px 42px rgba(0, 0, 0, 0.11);
}

.av-tour-index-image-wrap {
  width: 100%;
  height: 220px;
  overflow: hidden;
  background: #f8f7fb;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
}

.av-tour-index-image {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
  display: block;
}

.av-tour-index-body {
  padding: 18px;
  display: flex;
  flex-direction: column;
  flex: 1;
  gap: 14px;
}

.av-tour-index-main {
  display: flex;
  flex-direction: column;
}

.av-tour-index-title {
  font-size: 1.3rem;
  font-weight: 900;
  line-height: 1.15;
  margin-bottom: 4px;
  color: #14121a;
}

.av-tour-index-meta {
  color: rgba(0, 0, 0, 0.55);
  font-size: 0.85rem;
  font-weight: 700;
}

.av-tour-index-desc {
  color: rgba(0, 0, 0, 0.68);
  margin-top: 10px;
  margin-bottom: 14px;
  display: -webkit-box;
  -webkit-line-clamp: 2;
  -webkit-box-orient: vertical;
  overflow: hidden;
  min-height: 48px;
}

.av-tour-index-actions {
  margin-top: auto;
  padding-top: 14px;
  border-top: 1px solid rgba(0, 0, 0, 0.06);
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
}

.av-tour-index-btn {
  flex-shrink: 0;
  white-space: nowrap;
}

/* Dashboard widget */
.av-tour-widget .av-card-body {
  padding: 16px;
  display: flex;
  flex-direction: column;
  gap: 14px;
}

.av-tour-widget-top {
  display: flex;
  align-items: center;
  gap: 14px;
}

.av-tour-widget-thumb {
  width: 72px;
  height: 72px;
  border-radius: 12px;
  overflow: hidden;
  flex-shrink: 0;
  box-shadow: 0 6px 16px rgba(0, 0, 0, 0.12);
}

.av-tour-widget-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  object-position: center;
}

.av-tour-widget-info {
  min-width: 0;
}

.av-tour-widget .av-tour-index-title {
  font-size: 1.15rem;
  font-weight: 900;
  line-height: 1.15;
  margin: 0 0 4px 0;
  padding: 0;
}

.av-tour-widget .av-tour-index-meta {
  font-size: 0.82rem;
  color: rgba(0, 0, 0, 0.55);
  font-weight: 700;
  margin: 0;
}

.av-tour-widget .av-tour-progress {
  margin: 0;
}

.av-tour-widget .av-tour-progress-label {
  margin-bottom: 6px;
}

.av-tour-widget .av-tour-stat {
  padding: 12px 14px;
  margin: 0;
}

.av-tour-widget .av-tour-stat-label {
  margin-bottom: 4px;
}

.av-tour-widget .av-tour-action-row {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 0;
}

/* Award / leaderboard */
.av-tour-award-row {
  display: flex;
  align-items: center;
  gap: 16px;
}

.av-tour-award-copy {
  min-width: 0;
}

.av-tour-award-title {
  font-weight: 900;
  font-size: 1rem;
  margin-bottom: 4px;
}

.av-tour-award-desc {
  color: rgba(0, 0, 0, 0.62);
  font-size: 0.92rem;
}

.av-tour-award-img {
  max-width: 100px;
  max-height: 100px;
  object-fit: contain;
  display: block;
}

.av-tour-leaderboard-table td:first-child,
.av-tour-leaderboard-table th:first-child {
  width: 54px;
}

.av-tour-rank-badge {
  width: 28px;
  height: 28px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-weight: 900;
  font-size: 0.82rem;
  background: rgba(75, 0, 130, 0.1);
  color: rgba(75, 0, 130, 1);
}

.av-tour-rank-badge.rank-1 {
  background: rgba(255, 193, 7, 0.18);
  color: #946c00;
}

.av-tour-rank-badge.rank-2 {
  background: rgba(108, 117, 125, 0.16);
  color: #495057;
}

.av-tour-rank-badge.rank-3 {
  background: rgba(255, 77, 0, 0.14);
  color: #c2410c;
}

/* Legs table */
.av-tour-legs-table th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(0, 0, 0, 0.55);
  border-bottom: 1px solid rgba(0, 0, 0, 0.08);
  padding: 12px 14px;
  background: #faf9fd;
  white-space: nowrap;
}

.av-tour-legs-table td {
  padding: 14px;
  border-bottom: 1px solid rgba(0, 0, 0, 0.06);
  vertical-align: middle;
}

.av-tour-legs-table tbody tr:last-child td {
  border-bottom: 0;
}

.av-tour-legs-table tbody tr:hover {
  background: rgba(75, 0, 130, 0.025);
}

.av-tour-legs-table td:last-child {
  width: 180px;
}

.av-tour-route-code {
  font-weight: 900;
  font-size: 1rem;
}

.av-tour-route-name {
  color: rgba(0, 0, 0, 0.58);
  font-size: 0.85rem;
  margin-top: 4px;
}

.av-tour-leg-row-current {
  background: rgba(75, 0, 130, 0.04);
}

.av-tour-leg-row-completed {
  background: rgba(40, 167, 69, 0.04);
}

.av-tour-leg-row-locked {
  opacity: 0.86;
}

.av-tour-leg-actions {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 8px;
}

.av-tour-leg-actions-inline {
  display: flex;
  align-items: center;
  gap: 10px;
}

.av-tour-airport-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.av-tour-airport-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(75, 0, 130, 0.08);
  color: #14121a;
  font-weight: 900;
  font-size: 0.95rem;
}

.av-tour-airport-arrow {
  color: rgba(75, 0, 130, 1);
  font-weight: 900;
}

/* =========================
   RESPONSIVE
========================= */

@media (max-width: 992px) {
  .av-tour-statgrid {
    grid-template-columns: 1fr;
  }

  .av-tour-title {
    font-size: 1.45rem;
  }

  .av-tour-index-title {
    font-size: 1.15rem;
  }

  .av-tour-index-desc {
    min-height: 0;
  }

  .av-tour-index-actions,
  .av-tour-widget .av-tour-action-row,
  .av-tour-action-row {
    flex-direction: column;
    align-items: stretch;
  }

  .av-tour-index-btn {
    width: 100%;
    text-align: center;
  }

  .av-tour-award-row {
    align-items: flex-start;
  }
}

/* =========================
   TOUR ADMIN LEGS TABLE
========================= */

.av-tour-admin-legs-table {
  margin: 0;
}

.av-tour-admin-legs-table thead th {
  font-size: 0.8rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: rgba(0,0,0,.55);
  background: #faf9fd;
  border-bottom: 1px solid rgba(0,0,0,.08);
  padding: 14px 18px;
  white-space: nowrap;
  vertical-align: middle;
}

.av-tour-admin-legs-table tbody td {
  padding: 16px 18px;
  border-bottom: 1px solid rgba(0,0,0,.06);
  vertical-align: middle;
}

.av-tour-admin-legs-table tbody tr:last-child td {
  border-bottom: 0;
}

.av-tour-admin-legs-table tbody tr:hover {
  background: rgba(75,0,130,.025);
}

.av-tour-admin-leg-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 36px;
  height: 36px;
  padding: 0 10px;
  border-radius: 10px;
  background: rgba(75,0,130,.10);
  color: rgba(75,0,130,1);
  font-weight: 900;
  font-size: 0.95rem;
  line-height: 1;
}

.av-tour-admin-route {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  font-weight: 800;
  font-size: 1.05rem;
  color: #14121a;
}

.av-tour-admin-route i {
  color: rgba(75,0,130,.55);
  font-size: 0.95rem;
}

.av-tour-admin-aircraft {
  color: rgba(0,0,0,.78);
  font-weight: 600;
}

.av-tour-admin-actions {
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.av-tour-admin-actions .btn {
  min-width: 84px;
}

@media (max-width: 992px) {
  .av-tour-admin-legs-table thead th,
  .av-tour-admin-legs-table tbody td {
    padding: 12px 14px;
  }

  .av-tour-admin-route {
    font-size: 0.98rem;
    gap: 8px;
  }

  .av-tour-admin-actions {
    justify-content: flex-start;
  }
}
/* =========================
   COMMUNITY / SUPPORT CARD
========================= */

.av-community-card{
  display:flex;
  gap:14px;
  align-items:flex-start;

  background:#fff;
  border-radius:14px;
  padding:16px;

  border:1px solid rgba(0,0,0,.05);

  transition:all .15s ease;
}

.av-community-card:hover{
  transform:translateY(-2px);
  box-shadow:0 6px 18px rgba(0,0,0,.08);
}

.av-community-icon{
  width:44px;
  height:44px;

  border-radius:12px;

  display:flex;
  align-items:center;
  justify-content:center;

  background:rgba(75,0,130,.12);
  color:#4b0082;

  font-size:1.2rem;
}

.av-community-title{
  font-weight:800;
  font-size:1rem;
}

.av-community-text{
  font-size:.9rem;
  color:rgba(0,0,0,.6);
}

/* =========================
   TOUR ADMIN DRAG SORT
========================= */

.av-tour-admin-leg-cell {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.av-tour-admin-drag-handle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border-radius: 8px;
  color: rgba(75,0,130,.65);
  background: rgba(75,0,130,.06);
  cursor: grab;
}

.av-tour-admin-drag-handle:hover {
  background: rgba(75,0,130,.12);
  color: rgba(75,0,130,1);
}

.av-tour-admin-drag-handle:active {
  cursor: grabbing;
}

.av-tour-admin-row-ghost {
  opacity: 0.45;
  background: rgba(75,0,130,.08);
}

.av-tour-admin-row-chosen {
  background: rgba(75,0,130,.04);
}

/* =========================
   TOUR COMPLETION CELEBRATION
========================= */

.av-tour-completion-card{
  position: relative;
  overflow: hidden;
  border-radius: 18px;
  background: linear-gradient(135deg, #4b0082 0%, #6a1bbf 55%, #ff4d00 140%);
  color: #fff;
  box-shadow: 0 18px 45px rgba(75,0,130,.22);
  transition: opacity .2s ease, transform .2s ease;
}

.av-tour-completion-glow{
  position: absolute;
  inset: 0;
  background:
    radial-gradient(circle at 15% 25%, rgba(255,255,255,.22) 0%, rgba(255,255,255,0) 30%),
    radial-gradient(circle at 80% 30%, rgba(255,255,255,.16) 0%, rgba(255,255,255,0) 28%),
    radial-gradient(circle at 50% 100%, rgba(255,255,255,.10) 0%, rgba(255,255,255,0) 35%);
  pointer-events: none;
}

.av-tour-completion-inner{
  position: relative;
  z-index: 1;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 20px;
  padding: 22px 24px;
}

.av-tour-completion-left{
  display: flex;
  align-items: center;
  gap: 16px;
  min-width: 0;
}

.av-tour-completion-badge{
  width: 58px;
  height: 58px;
  border-radius: 16px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: rgba(255,255,255,.18);
  color: #fff;
  font-size: 1.35rem;
  box-shadow: inset 0 0 0 1px rgba(255,255,255,.18);
  flex-shrink: 0;
}

.av-tour-completion-kicker{
  font-size: .78rem;
  text-transform: uppercase;
  letter-spacing: .08em;
  font-weight: 800;
  opacity: .9;
  margin-bottom: 4px;
}

.av-tour-completion-title{
  font-size: 1.6rem;
  font-weight: 900;
  line-height: 1.1;
  margin-bottom: 6px;
}

.av-tour-completion-text{
  color: rgba(255,255,255,.9);
  font-size: .95rem;
  line-height: 1.45;
}

.av-tour-completion-right{
  display: flex;
  align-items: center;
  gap: 12px;
  flex-shrink: 0;
}

.av-tour-completion-award{
  width: 78px;
  height: 78px;
  object-fit: contain;
  border-radius: 14px;
  background: rgba(255,255,255,.12);
  padding: 8px;
}

@media (max-width: 992px){
  .av-tour-completion-inner{
    flex-direction: column;
    align-items: flex-start;
  }

  .av-tour-completion-right{
    width: 100%;
    justify-content: space-between;
  }

  .av-tour-completion-title{
    font-size: 1.3rem;
  }
}

/* =========================
   COMPLETED TOURS PROFILE
========================= */

.av-completed-tour-card{
  background:#fff;
  border-radius:14px;
  border:1px solid rgba(0,0,0,.06);
  padding:16px;
  transition:transform .15s ease, box-shadow .15s ease;
  height:100%;
}

.av-completed-tour-card:hover{
  transform:translateY(-2px);
  box-shadow:0 8px 22px rgba(0,0,0,.08);
}

.av-completed-tour-top{
  display:flex;
  align-items:flex-start;
  gap:12px;
}

.av-completed-tour-check{
  width:40px;
  height:40px;
  border-radius:12px;
  display:flex;
  align-items:center;
  justify-content:center;
  background:#eaf8ee;
  color:#28a745;
  font-size:1rem;
  flex-shrink:0;
}

.av-completed-tour-title{
  font-size:1rem;
  font-weight:900;
  line-height:1.2;
  color:#14121a;
}

.av-completed-tour-code{
  font-size:.82rem;
  color:rgba(0,0,0,.55);
  font-weight:700;
  margin-top:3px;
}

.av-completed-tour-meta{
  margin-top:10px;
  font-size:.88rem;
  color:rgba(0,0,0,.62);
}

/* =========================
   MY BIDS
========================= */

.av-bid-summary{
  border-radius:16px;
  padding:16px;
  background:#fff;
  border:1px solid rgba(0,0,0,.06);
}

.av-bid-summary-primary{
  background:#eaf8ee;
  border:1px solid #7ac48a;
  box-shadow:inset 4px 0 0 #28a745;
}

.av-bid-summary-secondary{
  background:#fff8db;
  border:1px solid #e4c65a;
  box-shadow:inset 4px 0 0 #f0ad4e;
}

.av-bid-summary-top{
  display:flex;
  align-items:flex-start;
  justify-content:space-between;
  gap:12px;
}

.av-bid-summary-code{
  font-size:1.15rem;
  font-weight:900;
  line-height:1.1;
  color:#14121a;
}

.av-bid-summary-route{
  margin-top:4px;
  font-weight:700;
  color:rgba(0,0,0,.7);
}

.av-bid-status-pill{
  display:inline-flex;
  align-items:center;
  padding:6px 10px;
  border-radius:999px;
  font-size:.76rem;
  font-weight:800;
  white-space:nowrap;
}

.av-bid-status-pill-primary{
  background:#28a745;
  color:#fff;
}

.av-bid-status-pill-secondary{
  background:#f0ad4e;
  color:#212529;
}

.av-bid-summary-actions{
  display:flex;
  flex-wrap:wrap;
  gap:10px;
}

@media (max-width: 992px){
  .av-bid-summary-top{
    flex-direction:column;
    align-items:flex-start;
  }

  .av-bid-summary-actions{
    flex-direction:column;
    align-items:stretch;
  }
}
.av-simbrief-page {
  max-width: 1400px;
  margin: 0 auto;
  padding: 1rem 0 2rem;
}

.av-simbrief-hero {
  border-radius: 18px;
  padding: 1.25rem 1.5rem;
  background: linear-gradient(135deg, #4b0082 0%, #6a1bbf 100%);
  color: #fff;
  box-shadow: 0 18px 40px rgba(75, 0, 130, 0.18);
}

.av-simbrief-kicker {
  font-size: 0.8rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  opacity: 0.82;
}

.av-simbrief-title {
  margin: 0.2rem 0 0;
  font-weight: 900;
}

.av-simbrief-meta {
  margin-top: 0.35rem;
  color: rgba(255,255,255,0.88);
  font-size: 0.95rem;
  font-weight: 600;
}

.av-simbrief-card {
  border-radius: 16px;
  box-shadow: 0 10px 24px rgba(17, 24, 39, 0.06);
}

#advanced-config-panel .card {
  margin-bottom: 0.75rem;
}

.av-notification-dropdown {
  position: relative;
}

.av-notification-btn {
  position: relative;
  border: 0;
  color: #fff;
  background: transparent;
  border-radius: 12px;
  min-width: 44px;
  height: 44px;
}

.av-notification-btn:hover,
.av-notification-btn:focus {
  color: #fff;
  background: rgba(255,255,255,0.08);
  border-color: rgba(255,255,255,0.28);
}

.av-notification-badge {
  position: absolute;
  top: -6px;
  right: -6px;
  min-width: 20px;
  height: 20px;
  padding: 0 6px;
  border-radius: 999px;
  background: #ff4d00;
  color: #fff;
  font-size: 11px;
  font-weight: 800;
  line-height: 20px;
  text-align: center;
}

.av-notification-menu {
  width: 340px;
  max-height: 420px;
  overflow: hidden;
  border-radius: 14px;
  box-shadow: 0 12px 30px rgba(0,0,0,0.15);
}

.av-notification-menu-header,
.av-notification-menu-footer {
  padding: 14px 16px;
  background: #fff;
}

.av-notification-menu-header {
  border-bottom: 1px solid #eee;
  font-weight: 800;
}

.av-notification-markall {
  font-size: 12px;
  text-decoration: none;
}

.av-notification-menu-body {
  max-height: 320px;
  overflow-y: auto;
}

.av-notification-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 12px 14px;
  border-bottom: 1px solid #f1f1f1;
  background: #fff;
  text-align: left;
}

.av-notification-item.is-unread {
  background: rgba(75, 0, 130, 0.06);
}

.av-notification-item:hover {
  background: rgba(75, 0, 130, 0.10);
}

.av-notification-item-icon {
  width: 32px;
  height: 32px;
  border-radius: 8px;
  background: rgba(75, 0, 130, 0.1);
  color: #4b0082;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 14px;
  flex: 0 0 32px;
}

.av-notification-item-title {
  font-weight: 700;
  font-size: 14px;
  color: #111827;
  margin-bottom: 2px;
}

.av-notification-item-body {
  font-size: 13px;
  color: #4b5563;
  line-height: 1.3;
}

.av-notification-item-time {
  font-size: 11px;
  color: #9ca3af;
  margin-top: 4px;
}

.av-notification-empty {
  padding: 18px 16px;
  color: #6b7280;
}

.av-notification-row {
  display: flex;
  align-items: flex-start;
  gap: 14px;
  padding: 18px;
  border-bottom: 1px solid #f3f4f6;
}

.av-notification-row.is-unread {
  background: rgba(75, 0, 130, 0.04);
}

.av-notification-row-icon {
  width: 42px;
  height: 42px;
  border-radius: 12px;
  background: rgba(75, 0, 130, 0.08);
  color: #4b0082;
  display: flex;
  align-items: center;
  justify-content: center;
  flex: 0 0 42px;
}

.av-notification-row-title {
  font-weight: 800;
  color: #111827;
  margin-bottom: 4px;
}

.av-notification-row-body {
  color: #4b5563;
  line-height: 1.5;
}

.av-notification-row-time {
  margin-top: 6px;
  color: #9ca3af;
  font-size: 13px;
}

.av-notification-row-content {
  flex: 1 1 auto;
}

.av-notification-row-actions {
  flex: 0 0 auto;
} 

@media (max-width: 575px) {
  .av-notification-menu {
    width: 92vw;
  }

.av-notification-menu-header {
  padding: 12px 14px;
  border-bottom: 1px solid #eee;
  font-weight: 800;
  font-size: 14px;
}

.av-notification-markall {
  font-size: 12px;
  color: #4b0082;
  font-weight: 600;
}
.av-notification-menu-footer {
  padding: 10px 14px;
  border-top: 1px solid #eee;
  text-align: center;
}

.av-notification-menu-footer a {
  font-size: 13px;
  font-weight: 700;
  color: #4b0082;
  text-decoration: none;
}

  .av-notification-row {
    flex-direction: column;
  }
}
.av-notification-item.dropdown-item {
  display: flex !important;
}

.av-auth-page--split {
  background:
    radial-gradient(circle at top left, rgba(109, 40, 217, 0.22), transparent 26%),
    radial-gradient(circle at top right, rgba(25, 211, 197, 0.10), transparent 20%),
    linear-gradient(180deg, #080812 0%, #0b0d1a 38%, #090914 100%);
}

.av-auth-shell {
  position: relative;
  z-index: 2;
  max-width: 1320px;
}

.av-auth-split-card {
  display: grid;
  grid-template-columns: 1.05fr 0.95fr;
  min-height: 760px;
  border-radius: 28px;
  overflow: hidden;
  box-shadow: 0 30px 90px rgba(0, 0, 0, 0.38);
  border: 1px solid rgba(255,255,255,0.08);
  background: rgba(12, 14, 30, 0.62);
  backdrop-filter: blur(14px);
}

.av-auth-side {
  position: relative;
  overflow: hidden;
  padding: 42px 38px;
  background:
    radial-gradient(circle at top left, rgba(109, 40, 217, 0.30), transparent 28%),
    radial-gradient(circle at top right, rgba(25, 211, 197, 0.10), transparent 20%),
    linear-gradient(135deg, rgba(20, 18, 48, 0.96), rgba(9, 10, 20, 0.96));
  color: #f6f8ff;
}

.av-auth-side::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.02), rgba(255,255,255,0)),
    radial-gradient(circle at 70% 20%, rgba(255,216,77,0.08), transparent 24%);
  pointer-events: none;
}

.av-auth-side-inner {
  position: relative;
  z-index: 2;
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  height: 100%;
}

.av-auth-side-logo {
  height: 48px;
  width: auto;
  display: block;
  margin-bottom: 18px;
}

.av-auth-eyebrow {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  width: fit-content;
  padding: 8px 12px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: #c9d0e8;
  font-size: 0.86rem;
  margin-bottom: 22px;
}

.av-auth-eyebrow-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #19d3c5;
  box-shadow: 0 0 0 6px rgba(25, 211, 197, 0.12);
}

.av-auth-side-title {
  font-size: clamp(2.4rem, 4vw, 4.3rem);
  line-height: 0.98;
  letter-spacing: -0.05em;
  font-weight: 800;
  margin-bottom: 18px;
  max-width: 9ch;
}

.av-auth-side-copy {
  color: #c9d0e8;
  font-size: 1.04rem;
  line-height: 1.85;
  max-width: 58ch;
  margin-bottom: 28px;
}

.av-auth-feature-list {
  display: grid;
  gap: 14px;
  margin-top: 10px;
}

.av-auth-feature {
  display: flex;
  gap: 14px;
  align-items: flex-start;
  padding: 14px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.08);
}

.av-auth-feature-icon {
  width: 42px;
  height: 42px;
  border-radius: 14px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  background: rgba(255,255,255,0.06);
  font-size: 1.1rem;
}

.av-auth-feature strong {
  display: block;
  font-size: 0.96rem;
  margin-bottom: 4px;
}

.av-auth-feature span {
  display: block;
  color: #c9d0e8;
  font-size: 0.9rem;
  line-height: 1.6;
}

.av-auth-side-note {
  margin-top: 22px;
  color: rgba(255,255,255,0.68);
  font-size: 0.82rem;
  line-height: 1.5;
}

.av-auth-form-pane {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 30px;
  background:
    linear-gradient(180deg, rgba(255,255,255,0.05), rgba(255,255,255,0.02));
}

.av-auth-form-card {
  width: 100%;
  max-width: 620px;
  background: rgba(255,255,255,0.96);
  border-radius: 24px;
  overflow: hidden;
  box-shadow: 0 22px 60px rgba(0,0,0,0.24);
}

.av-auth-form-head {
  padding: 20px 22px 18px;
  background: linear-gradient(90deg, #4b0082 0%, #6a1bbf 100%);
  color: #fff;
}

.av-auth-alert {
  border-radius: 14px;
  margin-bottom: 18px;
}

.av-auth-label {
  font-weight: 700;
  color: #1f2437;
  margin-bottom: 7px;
}

.av-auth-input {
  min-height: 48px;
  border-radius: 14px !important;
  border: 1px solid rgba(75, 0, 130, 0.10);
  background: #f8f8fc;
  box-shadow: none !important;
}

.av-auth-input:focus {
  border-color: rgba(106, 27, 191, 0.35);
  box-shadow: 0 0 0 3px rgba(106, 27, 191, 0.08) !important;
  background: #ffffff;
}

.av-auth-check {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  color: #4d546f;
  font-size: 0.92rem;
  line-height: 1.6;
}

.av-auth-submit {
  border-radius: 14px !important;
  min-height: 50px;
  font-size: 1rem;
  letter-spacing: 0.01em;
  box-shadow: 0 14px 34px rgba(255, 77, 0, 0.20);
}

.av-auth-orb {
  position: absolute;
  border-radius: 999px;
  filter: blur(40px);
  pointer-events: none;
  z-index: 1;
  opacity: 0.28;
}

.av-auth-orb-1 {
  width: 280px;
  height: 280px;
  background: rgba(109, 40, 217, 0.34);
  top: 8%;
  left: 4%;
}

.av-auth-orb-2 {
  width: 260px;
  height: 260px;
  background: rgba(25, 211, 197, 0.16);
  right: 6%;
  bottom: 10%;
}

@media (max-width: 1199px) {
  .av-auth-split-card {
    grid-template-columns: 1fr;
  }

  .av-auth-side {
    padding: 34px 28px;
  }

  .av-auth-form-pane {
    padding: 24px;
  }

  .av-auth-side-title {
    max-width: none;
  }
}

@media (max-width: 767px) {
  .av-auth-page {
    padding: 1.5rem 0;
  }

  .av-auth-side,
  .av-auth-form-pane {
    padding: 20px;
  }

  .av-auth-form-head,
  .av-auth-body-inner {
    padding-left: 18px;
    padding-right: 18px;
  }

  .av-auth-feature-list {
    gap: 10px;
  }
}

/* =========================
   DARK MODE - CREW PORTAL
========================= */

.theme-dark {
  --av-bg: #0b0d14;
  --av-surface: #131727;
  --av-surface-2: #181d30;
  --av-surface-3: #1d2338;
  --av-text: #f5f7ff;
  --av-text-muted: rgba(214, 221, 245, 0.72);
  --av-border: rgba(255, 255, 255, 0.08);
  --av-shadow: 0 18px 40px rgba(0, 0, 0, 0.34);

  --av-purple: #4b0082;
  --av-purple-2: #6a1bbf;
  --av-orange: #ff4d00;
}

.theme-dark body,
body.theme-dark {
  background: var(--av-bg);
  color: var(--av-text);
}

.theme-dark #app,
.theme-dark .container-fluid {
  background: transparent;
}

.theme-dark .container-fluid.py-4 {
  background:
    radial-gradient(circle at 20% -10%, rgba(106,27,191,0.25), transparent 40%),
    radial-gradient(circle at 80% -20%, rgba(0,180,255,0.15), transparent 45%),
    linear-gradient(180deg, #070910 0%, #0b0d14 100%);
}

/* Core cards / surfaces */
.theme-dark .av-card,
.theme-dark .av-stat,
.theme-dark .av-flightcard,
.theme-dark .av-profile-header,
.theme-dark .av-award-card,
.theme-dark .av-tour-index-card,
.theme-dark .av-tour-banner,
.theme-dark .av-community-card,
.theme-dark .av-ops-row,
.theme-dark .av-bid-summary,
.theme-dark .av-completed-tour-card,
.theme-dark .av-ops-table-wrap,
.theme-dark .av-ops-embedded,
.theme-dark .av-airline-ops-section .av-ops-embedded,
.theme-dark .av-tour-map-wrap,
.theme-dark #tour-map,
.theme-dark .av-simbrief-card {
  background: linear-gradient(180deg, rgba(24,29,48,0.98), rgba(18,22,36,0.98));
  color: var(--av-text);
  border: 1px solid var(--av-border);
  box-shadow: var(--av-shadow);
}
.theme-dark .av-card,
.theme-dark .av-stat {
  transition: all 0.2s ease;
}

.theme-dark .av-card:hover,
.theme-dark .av-stat:hover {
  transform: translateY(-4px);
  box-shadow: 0 25px 60px rgba(0,0,0,0.45);
}
/* Card headers stay branded */
.theme-dark .av-card-header {
  background: linear-gradient(
    90deg,
    #4b0082 0%,
    #6a1bbf 60%,
    #7c3aed 100%
  );color: #fff;
}

.theme-dark .av-card-title {
  color: #fff;
}

/* Stats */
.theme-dark .av-stat-label,
.theme-dark .av-meta-label,
.theme-dark .av-tour-index-meta,
.theme-dark .av-profile-sub,
.theme-dark .av-profile-email,
.theme-dark .av-community-text,
.theme-dark .av-stat-sub,
.theme-dark .av-tour-subtitle,
.theme-dark .av-tour-desc,
.theme-dark .av-tour-index-desc,
.theme-dark .av-tour-award-desc,
.theme-dark .av-tour-route-name,
.theme-dark .av-meta-sub,
.theme-dark .av-flightcard-notes,
.theme-dark .av-filter-label,
.theme-dark .av-empty,
.theme-dark .av-tour-empty,
.theme-dark .av-completed-tour-meta,
.theme-dark .av-completed-tour-code,
.theme-dark .av-bid-summary-route {
  color: var(--av-text-muted) !important;
}

.theme-dark .av-stat-value,
.theme-dark .av-profile-name,
.theme-dark .av-tour-title,
.theme-dark .av-tour-index-title,
.theme-dark .av-tour-award-title,
.theme-dark .av-flight-route,
.theme-dark .av-tour-route-code,
.theme-dark .av-meta-value,
.theme-dark .av-bid-summary-code,
.theme-dark .av-completed-tour-title,
.theme-dark .av-community-title {
  color: var(--av-text);
}

/* Secondary boxes inside cards */
.theme-dark .av-meta-item,
.theme-dark .av-tour-stat,
.theme-dark .av-chip,
.theme-dark .av-filterbar,
.theme-dark .av-details-compact,
.theme-dark .av-workflow-circle,
.theme-dark .av-workflow-line {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
  color: var(--av-text);
}

.theme-dark .av-card,
.theme-dark .av-stat,
.theme-dark .av-flightcard {
  backdrop-filter: blur(10px);
  background: linear-gradient(
    180deg,
    rgba(26,30,48,0.85),
    rgba(16,19,32,0.95)
  );
  border: 1px solid rgba(255,255,255,0.06);
}

.theme-dark .av-chip {
  border: 1px solid rgba(255,255,255,0.08);
}

.theme-dark .av-stat-icon,
.theme-dark .rank-badge {
  background: rgba(255, 77, 0, 0.16);
  color: var(--av-orange);
}

/* Tables */
.theme-dark table,
.theme-dark .table {
  background: transparent !important;
  color: var(--av-text);
}

.theme-dark table thead,
.theme-dark table th {
  background: rgba(255,255,255,0.03) !important;
  color: var(--av-text-muted) !important;
}

.theme-dark table td {
  background: transparent !important;
  color: var(--av-text);
  border-color: rgba(255,255,255,0.06) !important;
}

.theme-dark table tr {
  background: transparent !important;
}

.theme-dark table tr:hover {
  background: rgba(255,255,255,0.04) !important;
}
.theme-dark .av-booking-wrap table th,
.theme-dark .av-flights-table th,
.theme-dark .av-ops-table th,
.theme-dark .av-tour-legs-table th,
.theme-dark .av-tour-admin-legs-table thead th {
  background: rgba(255,255,255,0.03);
  color: var(--av-text-muted);
  border-bottom: 1px solid rgba(255,255,255,0.08);
}

.theme-dark .av-booking-wrap table td,
.theme-dark .av-flights-table td,
.theme-dark .av-ops-table td,
.theme-dark .av-tour-legs-table td,
.theme-dark .av-tour-admin-legs-table tbody td {
  color: var(--av-text);
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

.theme-dark .av-click-row:hover,
.theme-dark .av-ops-table tbody tr:hover,
.theme-dark .av-tour-legs-table tbody tr:hover,
.theme-dark .av-tour-admin-legs-table tbody tr:hover {
  background: rgba(255,255,255,0.03);
}

/* Pills / badges */
.theme-dark .av-pill,
.theme-dark .av-flight-badge,
.theme-dark .av-tour-pill.next,
.theme-dark .av-tour-rank-badge,
.theme-dark .av-tour-admin-leg-badge,
.theme-dark .av-tour-airport-badge {
  background: rgba(106, 27, 191, 0.18);
  color: #e8dcff;
}

.theme-dark .av-card-headerright .av-pill {
  background: rgba(255,255,255,0.12);
  color: #fff;
}

.theme-dark .av-tour-pill.not-started,
.theme-dark .av-tour-pill.locked,
.theme-dark .av-ops-phase.phase-neutral {
  background: rgba(255,255,255,0.08);
  color: var(--av-text-muted);
}

.theme-dark .av-tour-pill.progress,
.theme-dark .av-ops-phase.phase-blue {
  background: rgba(59,130,246,0.16);
  color: #b9d4ff;
}

.theme-dark .av-tour-pill.completed,
.theme-dark .av-ops-phase.phase-green {
  background: rgba(34,197,94,0.16);
  color: #b9f4c8;
}

.theme-dark .av-tour-pill.award,
.theme-dark .av-ops-phase.phase-orange {
  background: rgba(255,77,0,0.16);
  color: #ffd2bf;
}

.theme-dark .av-ops-phase.phase-yellow {
  background: rgba(255,216,77,0.14);
  color: #ffe79f;
}

/* Inputs / selects */
.theme-dark .form-control,
.theme-dark .form-select {
  background: rgba(255,255,255,0.06);
  border: 1px solid rgba(255,255,255,0.12);
}

.theme-dark .form-control:focus,
.theme-dark .form-select:focus {
  border-color: #ff4d00;
  box-shadow: 0 0 0 2px rgba(255,77,0,0.15);
}

.theme-dark .form-control:focus,
.theme-dark .form-select:focus,
.theme-dark .av-input:focus {
  background: rgba(255,255,255,0.08);
  color: var(--av-text);
  border-color: rgba(255,216,77,0.40);
  box-shadow: 0 0 0 3px rgba(255,216,77,0.08);
}

.theme-dark .form-select option {
  background: #151a2b;
  color: #f5f7ff;
}

/* Profile / special sections */
.theme-dark .av-profile-avatar {
  background: rgba(255,255,255,0.04);
  border-color: rgba(255,255,255,0.08);
}

.theme-dark .av-profile-topbar {
  background: linear-gradient(90deg, #4b0082 0%, #6a1bbf 60%, #ff4d00 120%);
}

.theme-dark .av-discord-btn {
  background: rgba(255,255,255,0.03);
  color: #cfd6ff;
  border-color: rgba(88,101,242,0.55);
}

.theme-dark .av-discord-btn:hover {
  background: #5865F2;
  color: #fff;
}

/* Tour specific */
.theme-dark .av-tour-banner-body {
  background: transparent;
}

.theme-dark .av-tour-progress-bar,
.theme-dark .av-ops-mini-progress {
  background: rgba(255,255,255,0.08);
}

.theme-dark .av-tour-index-image-wrap {
  background: #0f1322;
  border-bottom: 1px solid rgba(255,255,255,0.06);
}

/* Flight card variants */
.theme-dark .av-flightcard-primary {
  background: rgba(34,197,94,0.10);
  border: 1px solid rgba(122,196,138,0.45);
  box-shadow: inset 4px 0 0 #28a745;
}

.theme-dark .av-flightcard-secondary {
  background: rgba(255,216,77,0.10);
  border: 1px solid rgba(228,198,90,0.45);
  box-shadow: inset 4px 0 0 #f0ad4e;
}

.theme-dark .av-flightcard-tour {
  background: rgba(40,167,69,0.08);
  box-shadow: inset 4px 0 0 #28a745, 0 0 0 1px rgba(40,167,69,0.18);
}

/* Bid summaries */
.theme-dark .av-bid-summary {
  background: var(--av-surface);
  border: 1px solid var(--av-border);
}

.theme-dark .av-bid-summary-primary {
  background: rgba(34,197,94,0.10);
  border: 1px solid rgba(122,196,138,0.45);
}

.theme-dark .av-bid-summary-secondary {
  background: rgba(255,216,77,0.10);
  border: 1px solid rgba(228,198,90,0.45);
}

/* Notifications */
.theme-dark .av-notification-menu,
.theme-dark .av-dropdown {
  background: #151a2b;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: 0 18px 40px rgba(0,0,0,0.35);
}

.theme-dark .av-dropdown .dropdown-item,
.theme-dark .dropdown-item {
  color: var(--av-text);
}

.theme-dark .av-dropdown .dropdown-item:hover,
.theme-dark .dropdown-item:hover {
  background: rgba(255,255,255,0.05);
}

/* Live map callsigns */
.theme-dark .live-aircraft-callsign {
  color: #00FF21;
  background: #000000;
  border-color: #fff;
}

/* Keep hero intact but slightly richer */
.theme-dark .hero-container {
  box-shadow: 0 18px 40px rgba(0, 0, 0, 0.28);
}

/* Links */
.theme-dark .av-link {
  color: #c9b3ff;
}

.theme-dark .av-link:hover {
  color: #eadfff;
}

/* Auth pages should not inherit dashboard dark overrides */
body.av-auth-body.theme-dark {
  background: inherit;
}

/* =========================
   DARK MODE - PROFILE PIREPS WIDGET
========================= */

.theme-dark .av-profile-right,
.theme-dark .av-profile-right .av-card,
.theme-dark .theme-dark-pireps,
.theme-dark .widget-user-pireps,
.theme-dark .table-responsive {
  background: transparent !important;
}

.theme-dark .av-card .table,
.theme-dark .av-card table,
.theme-dark .widget-user-pireps .table,
.theme-dark .widget-user-pireps table {
  width: 100%;
  background: transparent !important;
  color: var(--av-text) !important;
  border-color: rgba(255,255,255,0.06) !important;
}

.theme-dark .av-card .table thead th,
.theme-dark .av-card table thead th,
.theme-dark .widget-user-pireps .table thead th,
.theme-dark .widget-user-pireps table thead th {
  background: rgba(255,255,255,0.03) !important;
  color: var(--av-text-muted) !important;
  border-bottom: 1px solid rgba(255,255,255,0.08) !important;
}

.theme-dark .av-card .table td,
.theme-dark .av-card table td,
.theme-dark .widget-user-pireps .table td,
.theme-dark .widget-user-pireps table td {
  background: transparent !important;
  color: var(--av-text) !important;
  border-color: rgba(255,255,255,0.06) !important;
}

.theme-dark .av-card .table tbody tr,
.theme-dark .av-card table tbody tr,
.theme-dark .widget-user-pireps .table tbody tr,
.theme-dark .widget-user-pireps table tbody tr {
  background: transparent !important;
}

.theme-dark .av-card .table tbody tr:hover,
.theme-dark .av-card table tbody tr:hover,
.theme-dark .widget-user-pireps .table tbody tr:hover,
.theme-dark .widget-user-pireps table tbody tr:hover {
  background: rgba(255,255,255,0.03) !important;
}

.theme-dark .av-card .table a,
.theme-dark .av-card table a,
.theme-dark .widget-user-pireps .table a,
.theme-dark .widget-user-pireps table a {
  color: #9fc3ff !important;
}

.theme-dark .av-card .table a:hover,
.theme-dark .av-card table a:hover,
.theme-dark .widget-user-pireps .table a:hover,
.theme-dark .widget-user-pireps table a:hover {
  color: #c6dcff !important;
}

.theme-dark .av-card .table .badge,
.theme-dark .widget-user-pireps .table .badge {
  box-shadow: none;
}

/* Fix any light header/title blocks inside widget output */
.theme-dark .av-card .card,
.theme-dark .av-card .panel,
.theme-dark .av-card .well,
.theme-dark .widget-user-pireps .card,
.theme-dark .widget-user-pireps .panel,
.theme-dark .widget-user-pireps .well {
  background: transparent !important;
  color: var(--av-text) !important;
  border: 0 !important;
  box-shadow: none !important;
}

/* Pilot Details card - force readable left labels */
.theme-dark .av-details-compact .d-flex.justify-content-between > span:first-child,
.theme-dark .av-details-compact .d-flex.justify-content-between > .text-muted,
.theme-dark .av-details-compact .d-flex.justify-content-between span.text-muted {
  color: #aeb8d8 !important;
}

/* Pilot Details card - keep values bright */
.theme-dark .av-details-compact .d-flex.justify-content-between > span:last-child,
.theme-dark .av-details-compact .d-flex.justify-content-between > .fw-bold,
.theme-dark .av-details-compact .d-flex.justify-content-between strong,
.theme-dark .av-details-compact .d-flex.justify-content-between .av-link {
  color: #f5f7ff !important;
}

/* Divider line in first row */
.theme-dark .av-details-compact .border-bottom {
  border-color: rgba(255,255,255,0.08) !important;
}
.theme-dark .av-detail-label {
  color: #aeb8d8 !important;
}

/* =========================
   DARK MODE - DASHBOARD TEXT FIXES
========================= */

/* Generic card body text inside dashboard cards */
.theme-dark .av-card-body,
.theme-dark .av-card-body p,
.theme-dark .av-card-body li,
.theme-dark .av-card-body small,
.theme-dark .av-card-body span,
.theme-dark .av-card-body div {
  color: var(--av-text);
}

/* Muted text inside card bodies */
.theme-dark .av-card-body .text-muted,
.theme-dark .av-card-body .text-body-secondary,
.theme-dark .av-card-body .text-secondary,
.theme-dark .av-card-body small,
.theme-dark .av-card-body .small {
  color: var(--av-text-muted) !important;
}

/* Latest News / news-style cards */
.theme-dark .av-card-body .card-title,
.theme-dark .av-card-body h1,
.theme-dark .av-card-body h2,
.theme-dark .av-card-body h3,
.theme-dark .av-card-body h4,
.theme-dark .av-card-body h5,
.theme-dark .av-card-body h6,
.theme-dark .av-card-body .news-title,
.theme-dark .av-card-body .post-title {
  color: var(--av-text) !important;
}

.theme-dark .av-card-body .card-text,
.theme-dark .av-card-body .news-body,
.theme-dark .av-card-body .post-body,
.theme-dark .av-card-body .news-content,
.theme-dark .av-card-body .post-content {
  color: var(--av-text-muted) !important;
}

/* Completed tours widget / dashboard widget text */
.theme-dark .av-tour-widget,
.theme-dark .av-tour-widget * {
  color: var(--av-text);
}

.theme-dark .av-tour-widget .av-tour-index-meta,
.theme-dark .av-tour-widget .av-tour-progress-label,
.theme-dark .av-tour-widget .av-tour-stat-label,
.theme-dark .av-tour-widget .text-muted,
.theme-dark .av-tour-widget .small {
  color: var(--av-text-muted) !important;
}

/* News card buttons/links */
.theme-dark .av-card-body .btn-outline-secondary,
.theme-dark .av-card-body .btn-outline-dark {
  color: var(--av-text-muted);
  border-color: rgba(255,255,255,0.16);
  background: transparent;
}

.theme-dark .av-card-body .btn-outline-secondary:hover,
.theme-dark .av-card-body .btn-outline-dark:hover {
  color: var(--av-text);
  background: rgba(255,255,255,0.06);
  border-color: rgba(255,255,255,0.24);
}

/* Horizontal rules / separators inside dark cards */
.theme-dark .av-card-body hr,
.theme-dark .av-card hr {
  border-color: rgba(255,255,255,0.08) !important;
  opacity: 1;
}

/* Links inside dashboard cards */
.theme-dark .av-card-body a {
  color: #b9cfff;
}

.theme-dark .av-card-body a:hover {
  color: #dbe6ff;
}

/* =========================
   DARK MODE - TOURS / SEARCH / DROPDOWNS
========================= */

/* Tours page lingering dark text */
.theme-dark .av-tour-shell,
.theme-dark .av-tour-shell * {
  color: var(--av-text);
}

.theme-dark .av-tour-shell .text-muted,
.theme-dark .av-tour-shell .small,
.theme-dark .av-tour-shell small,
.theme-dark .av-tour-shell .av-tour-index-meta,
.theme-dark .av-tour-shell .av-tour-index-desc,
.theme-dark .av-tour-shell .av-tour-subtitle,
.theme-dark .av-tour-shell .av-tour-desc,
.theme-dark .av-tour-shell .av-tour-progress-label,
.theme-dark .av-tour-shell .av-tour-stat-label,
.theme-dark .av-tour-shell .av-tour-route-name,
.theme-dark .av-tour-shell .av-tour-award-desc,
.theme-dark .av-tour-shell .av-tour-empty {
  color: var(--av-text-muted) !important;
}

.theme-dark .av-tour-shell .av-tour-title,
.theme-dark .av-tour-shell .av-tour-index-title,
.theme-dark .av-tour-shell .av-tour-award-title,
.theme-dark .av-tour-shell .av-tour-stat-value,
.theme-dark .av-tour-shell .av-tour-route-code {
  color: var(--av-text) !important;
}

/* Flight search selects and dropdown options */
.theme-dark .av-filterbar .form-control,
.theme-dark .av-filterbar .form-select,
.theme-dark .av-filterbar select,
.theme-dark .av-flightcard .form-control,
.theme-dark .av-flightcard .form-select,
.theme-dark .av-flightcard select {
  background: rgba(255,255,255,0.05) !important;
  color: var(--av-text) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}

.theme-dark .av-filterbar .form-control::placeholder,
.theme-dark .av-flightcard .form-control::placeholder {
  color: rgba(214,221,245,0.55) !important;
}

.theme-dark .av-filterbar select option,
.theme-dark .av-filterbar .form-select option,
.theme-dark .av-flightcard select option,
.theme-dark .av-flightcard .form-select option {
  background: #151a2b !important;
  color: #f5f7ff !important;
}

/* Bootstrap dropdown menus - airline ops menu */
.theme-dark .dropdown-menu,
.theme-dark .av-dropdown,
.theme-dark .navbar .dropdown-menu {
  background: #151a2b !important;
  color: var(--av-text) !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
  box-shadow: 0 18px 40px rgba(0,0,0,0.35) !important;
}

.theme-dark .dropdown-item,
.theme-dark .av-dropdown .dropdown-item,
.theme-dark .navbar .dropdown-menu .dropdown-item {
  color: var(--av-text) !important;
  background: transparent !important;
}

.theme-dark .dropdown-item:hover,
.theme-dark .dropdown-item:focus,
.theme-dark .av-dropdown .dropdown-item:hover,
.theme-dark .av-dropdown .dropdown-item:focus,
.theme-dark .navbar .dropdown-menu .dropdown-item:hover,
.theme-dark .navbar .dropdown-menu .dropdown-item:focus {
  color: var(--av-text) !important;
  background: rgba(255,255,255,0.05) !important;
}

.theme-dark .dropdown-divider {
  border-color: rgba(255,255,255,0.08) !important;
}

/* Notification dropdown / menu */
.theme-dark .av-notification-menu,
.theme-dark .av-notification-menu-header,
.theme-dark .av-notification-menu-footer {
  background: #151a2b !important;
  color: var(--av-text) !important;
}

.theme-dark .av-notification-menu-header,
.theme-dark .av-notification-menu-footer {
  border-color: rgba(255,255,255,0.08) !important;
}

.theme-dark .av-notification-menu-body,
.theme-dark .av-notification-list {
  background: transparent !important;
}

.theme-dark .av-notification-item {
  background: transparent !important;
  color: var(--av-text) !important;
  border-bottom: 1px solid rgba(255,255,255,0.06) !important;
}

.theme-dark .av-notification-item:hover {
  background: rgba(255,255,255,0.04) !important;
}

.theme-dark .av-notification-title,
.theme-dark .av-notification-message,
.theme-dark .av-notification-route {
  color: var(--av-text) !important;
}

.theme-dark .av-notification-time,
.theme-dark .av-notification-meta,
.theme-dark .av-notification-subtext,
.theme-dark .av-notification-item .text-muted,
.theme-dark .av-notification-item small {
  color: var(--av-text-muted) !important;
}

.theme-dark .av-notification-menu a,
.theme-dark .av-notification-menu-footer a {
  color: #b9cfff !important;
}

.theme-dark .av-notification-menu a:hover,
.theme-dark .av-notification-menu-footer a:hover {
  color: #dbe6ff !important;
}

/* If notifications use card/panel wrappers internally */
.theme-dark .av-notification-menu .card,
.theme-dark .av-notification-menu .panel,
.theme-dark .av-notification-menu .list-group,
.theme-dark .av-notification-menu .list-group-item {
  background: transparent !important;
  color: var(--av-text) !important;
  border-color: rgba(255,255,255,0.06) !important;
}

/* Scrollable dropdown content */
.theme-dark .av-notification-menu ::-webkit-scrollbar-thumb {
  background: rgba(255,255,255,0.16);
  border-radius: 999px;
}

.theme-dark .av-notification-menu ::-webkit-scrollbar-track {
  background: rgba(255,255,255,0.04);
}

/* =========================
   DARK MODE - FINAL CLEANUP
========================= */

/* 1) Notifications text */
.theme-dark .av-notification-item,
.theme-dark .av-notification-item * {
  color: var(--av-text) !important;
}

.theme-dark .av-notification-item .text-muted,
.theme-dark .av-notification-item .small,
.theme-dark .av-notification-item small,
.theme-dark .av-notification-item .notification-time,
.theme-dark .av-notification-item .notification-meta {
  color: var(--av-text-muted) !important;
}

.theme-dark .av-notification-item strong,
.theme-dark .av-notification-item .fw-bold,
.theme-dark .av-notification-item .fw-semibold,
.theme-dark .av-notification-item .notification-title,
.theme-dark .av-notification-item .notification-message,
.theme-dark .av-notification-item .notification-route {
  color: #f5f7ff !important;
}

/* 2) My PIREPs filter/search selects + options */
.theme-dark .av-card .form-control,
.theme-dark .av-card .form-select,
.theme-dark .av-card select {
  background: rgba(255,255,255,0.05) !important;
  color: #f5f7ff !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
}

.theme-dark .av-card .form-control::placeholder,
.theme-dark .av-card .form-select::placeholder {
  color: rgba(214,221,245,0.55) !important;
}

.theme-dark .av-card select option,
.theme-dark .av-card .form-select option {
  background: #151a2b !important;
  color: #f5f7ff !important;
}

/* Select2 support, if any pages use it */
.theme-dark .select2-container--default .select2-selection--single,
.theme-dark .select2-container--default .select2-selection--multiple {
  background: rgba(255,255,255,0.05) !important;
  border: 1px solid rgba(255,255,255,0.10) !important;
  color: #f5f7ff !important;
}

.theme-dark .select2-container--default .select2-selection--single .select2-selection__rendered,
.theme-dark .select2-container--default .select2-selection--multiple .select2-selection__rendered {
  color: #f5f7ff !important;
}

.theme-dark .select2-dropdown {
  background: #151a2b !important;
  border: 1px solid rgba(255,255,255,0.08) !important;
}

.theme-dark .select2-results__option {
  color: #f5f7ff !important;
  background: transparent !important;
}

.theme-dark .select2-results__option--highlighted[aria-selected],
.theme-dark .select2-results__option--highlighted[data-selected] {
  background: rgba(255,255,255,0.06) !important;
  color: #f5f7ff !important;
}

/* 3) Replace brown icon tiles with cooler dark-mode tiles */
.theme-dark .av-stat-icon,
.theme-dark .av-community-icon,
.theme-dark .av-completed-tour-check,
.theme-dark .av-tour-completion-badge,
.theme-dark .av-workflow-circle,
.theme-dark .av-flightcard .av-stat-icon,
.theme-dark .av-ops-row .av-stat-icon {
  background: linear-gradient(135deg, rgba(106,27,191,0.22), rgba(25,211,197,0.10)) !important;
  color: #cdb7ff !important;
  border: 1px solid rgba(255,255,255,0.08);
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.04);
}

/* Keep orange only where it matters */
.theme-dark .av-btn,
.theme-dark .btn.av-btn {
  background: #ff5a0a;
  color: #fff;
}

/* If any icon tiles should stay status-colored, exempt these */
.theme-dark .av-completed-tour-check {
  background: rgba(34,197,94,0.18) !important;
  color: #b9f4c8 !important;
}

/* 4) Labels on forms */
.theme-dark label,
.theme-dark .form-label {
  color: var(--av-text-muted);
}

/* 5) Reset button readability */
.theme-dark .btn-outline-secondary,
.theme-dark .btn-outline-dark,
.theme-dark .btn.btn-outline-secondary,
.theme-dark .btn.btn-outline-dark {
  color: var(--av-text-muted) !important;
  border-color: rgba(255,255,255,0.14) !important;
  background: transparent !important;
}

.theme-dark .btn-outline-secondary:hover,
.theme-dark .btn-outline-dark:hover,
.theme-dark .btn.btn-outline-secondary:hover,
.theme-dark .btn.btn-outline-dark:hover {
  color: #f5f7ff !important;
  background: rgba(255,255,255,0.06) !important;
  border-color: rgba(255,255,255,0.24) !important;
}


.theme-dark .leaflet-control-zoom a,
.theme-dark .leaflet-bar a {
  background: rgba(21, 26, 43, 0.92) !important;
  color: #f5f7ff !important;
  border-color: rgba(255,255,255,0.08) !important;
  backdrop-filter: blur(8px);
}

.theme-dark .leaflet-control-zoom a:hover,
.theme-dark .leaflet-bar a:hover {
  background: rgba(35, 43, 68, 0.95) !important;
}

.theme-dark .leaflet-control-attribution {
  background: rgba(21, 26, 43, 0.82) !important;
  color: rgba(214,221,245,0.72) !important;
}

.theme-dark .leaflet-control-attribution a {
  color: #b9cfff !important;
}
.theme-dark .av-map-wrap .leaflet-tile-pane {
  filter: brightness(0.92) contrast(0.9);
  border-top: 1px solid rgba(255,255,255,0.04);
}

body.theme-dark .live-aircraft-callsign,
body.theme-light .live-aircraft-callsign,
.live-aircraft-callsign {
  color: #00FF21 !important;
  background-color: #00000080 !important;
  
}