/* =========================
   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;
}

#metartaf-DispoThM {
  background: #4b0082 !important;
  color: #ffffff !important;
  border-radius: 12px;
  overflow: hidden;
}

#metartaf-DispoThM *,
#metartaf-DispoThM 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);
}

/* =========================
   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;
  color: #111;
  background: rgba(255, 255, 255, 0.9);
  padding: 1px 4px;
  border-radius: 3px;
}

.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;
  }
}