/* LineOps / NxtOps - Dashboard Live Flights & Latest Arrivals Boards
   Unified Qatar-Inspired 5-Star Airline Intranet Light Design System */

.dashboard-live-board {
  position: relative;
  overflow: hidden;
  max-width: 1192px;
  width: calc(100% - 32px);
  margin: 0 auto 36px auto;
  padding: 28px 32px 30px;
  border-radius: 16px;
  background: #ffffff;
  border: 1px solid #dbdee8;
  box-shadow: 0 4px 16px rgba(31, 33, 43, 0.06);
  color: #1f212b;
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  display: flex;
  flex-direction: column;
  gap: 20px;
  box-sizing: border-box;
}

.dashboard-live-board .eyebrow {
  margin: 0 0 2px 0;
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 1px;
  text-transform: uppercase;
  color: #5c0931;
}

/* Header */
.live-board-header {
  display: flex;
  justify-content: space-between;
  align-items: flex-start;
  gap: 20px;
  flex-wrap: wrap;
}

.live-board-header-left {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.live-board-title-row {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.live-board-title-row h2 {
  font-family: var(--font-jotia, 'Outfit', sans-serif);
  font-size: 28px;
  font-weight: 300;
  letter-spacing: 0;
  color: #1f212b;
  margin: 0;
  line-height: 1.2;
}

.live-board-status-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 4px 12px;
  border-radius: 999px;
  background: rgba(92, 9, 49, 0.08);
  border: 1px solid rgba(92, 9, 49, 0.2);
  font-size: 11px;
  font-weight: 600;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #5c0931;
}

.live-board-status-pill .pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #5c0931;
  box-shadow: 0 0 8px rgba(92, 9, 49, 0.45);
}

.live-board-desc {
  margin: 0;
  font-size: 13.5px;
  line-height: 1.5;
  color: #4a525d;
}

.live-board-header-right {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.live-board-sync-note {
  font-size: 12px;
  font-weight: 500;
  color: #4a525d;
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.live-board-sync-note .sync-indicator {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #059669;
}

.btn-board-radar {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  height: 38px;
  min-height: 38px;
  padding: 0 18px;
  border-radius: 999px;
  background: #5c0931;
  border: 1px solid #5c0931;
  color: #ffffff;
  font-size: 12.5px;
  font-weight: 600;
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  cursor: pointer;
  transition: background 0.18s ease, border-color 0.18s ease, transform 0.18s ease, box-shadow 0.18s ease;
  box-shadow: 0 4px 12px rgba(92, 9, 49, 0.22);
}

.btn-board-radar:hover {
  background: #730b3d;
  border-color: #730b3d;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 6px 16px rgba(92, 9, 49, 0.3);
}

.btn-board-radar svg {
  width: 15px;
  height: 15px;
  color: currentColor;
}

/* Toolbar: Filters and Search */
.live-board-toolbar {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.live-board-filters {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px;
  border-radius: 999px;
  background: #f2f3fa;
  border: 1px solid #dbdee8;
  flex-wrap: wrap;
}

.board-filter-btn {
  background: transparent;
  border: 1px solid transparent;
  height: 32px;
  padding: 0 14px;
  border-radius: 999px;
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  font-size: 12px;
  font-weight: 600;
  color: #4a525d;
  cursor: pointer;
  transition: all 0.18s ease;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.board-filter-btn:hover {
  color: #5c0931;
  background: rgba(255, 255, 255, 0.7);
}

.board-filter-btn.is-active {
  background: #5c0931;
  border-color: #5c0931;
  color: #ffffff;
  box-shadow: 0 2px 8px rgba(92, 9, 49, 0.22);
}

.filter-badge-count {
  font-size: 10.5px;
  font-weight: 700;
  padding: 1px 7px;
  border-radius: 999px;
  background: rgba(31, 33, 43, 0.08);
  color: #1f212b;
}

.board-filter-btn.is-active .filter-badge-count {
  background: rgba(255, 255, 255, 0.22);
  color: #ffffff;
}

.board-search-wrap {
  position: relative;
  display: inline-flex;
  align-items: center;
  width: 310px;
  min-width: 280px;
  max-width: 100%;
}

.board-search-icon {
  position: absolute;
  left: 14px;
  width: 15px;
  height: 15px;
  color: #6e7780;
  pointer-events: none;
}

.board-search-input {
  width: 100% !important;
  height: 38px !important;
  min-height: 38px !important;
  max-height: 38px !important;
  padding: 0 34px 0 38px !important;
  border-radius: 999px !important;
  background: #f8f9fc !important;
  border: 1px solid #dbdee8 !important;
  color: #1f212b !important;
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif) !important;
  font-size: 13px !important;
  font-weight: 500 !important;
  outline: none !important;
  box-shadow: none !important;
  box-sizing: border-box !important;
  transition: border-color 0.15s ease, background 0.15s ease, box-shadow 0.15s ease !important;
}

.board-search-input:focus {
  border-color: #5c0931 !important;
  background: #ffffff !important;
  box-shadow: 0 0 0 3px rgba(92, 9, 49, 0.12) !important;
}

.board-search-input::placeholder {
  color: #6e7780 !important;
  font-weight: 400 !important;
  opacity: 1 !important;
}

.board-search-clear {
  position: absolute;
  right: 12px;
  background: transparent;
  border: none;
  color: #6e7780;
  cursor: pointer;
  padding: 0;
  display: none;
  font-size: 14px;
  line-height: 1;
}

.board-search-clear:hover {
  color: #5c0931;
}

.board-search-clear.is-visible {
  display: block;
}

/* Board Table Container */
.live-board-table-container {
  width: 100%;
  overflow-x: auto;
  border-radius: 12px;
  background: #ffffff;
  border: 1px solid #dbdee8;
}

.live-board-table {
  width: 100%;
  min-width: 0;
  border-collapse: collapse;
  text-align: left;
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
}

.live-board-table th {
  padding: 11px 10px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.7px;
  text-transform: uppercase;
  color: #4a525d;
  border-bottom: 1px solid #dbdee8;
  background: #f2f3fa;
  white-space: nowrap;
}

.live-board-table td {
  padding: 12px 10px;
  font-size: 13px;
  color: #1f212b;
  border-bottom: 1px solid #ebeff5;
  vertical-align: middle;
  transition: background 0.15s ease;
}

.live-board-table th:first-child,
.live-board-table td:first-child {
  padding-left: 16px;
}

.live-board-table th:last-child,
.live-board-table td:last-child {
  padding-right: 16px;
}

.live-board-table:not(.arrivals-table) th:last-child,
.live-board-table:not(.arrivals-table) td:last-child {
  width: 1%;
  white-space: nowrap;
}

.live-board-table tbody tr:last-child td {
  border-bottom: none;
}

.live-board-row {
  cursor: pointer;
  transition: background 0.15s ease;
}

.live-board-row:hover td {
  background: #f8f9fc;
}

/* Pilot active flight highlight row */
.live-board-row.is-pilot-row td {
  border-bottom-color: rgba(5, 150, 105, 0.2);
  background: #ecfdf5;
}

.live-board-row.is-pilot-row:hover td {
  background: #d1fae5;
}

/* Flight column */
.flight-cell-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
}

.carrier-logo-mini {
  width: 68px;
  height: 32px;
  background: transparent;
  border: none;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  overflow: hidden;
  flex-shrink: 0;
}

.carrier-logo-mini img {
  width: 100%;
  height: 100%;
  max-width: 66px;
  max-height: 30px;
  object-fit: contain;
  object-position: left center;
  display: block;
  filter: none;
  transition: transform 0.18s ease;
}

.live-board-row:hover .carrier-logo-mini img {
  transform: scale(1.04);
}

.carrier-fallback-badge {
  font-family: var(--font-jotia, 'Outfit', sans-serif);
  font-size: 14px;
  font-weight: 700;
  color: #5c0931;
  letter-spacing: 0.6px;
  text-transform: uppercase;
}

.flight-number-group {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.flight-callsign-text {
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  font-weight: 700;
  font-size: 13.5px;
  color: #1f212b;
  letter-spacing: -0.1px;
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.pilot-tag {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  line-height: 1.25;
  padding: 2px 7px;
  border-radius: 999px;
  background: #ecfdf5;
  color: #059669;
  border: 1px solid #a7f3d0;
  white-space: nowrap;
  flex-shrink: 0;
}

.status-arrived-badge {
  font-size: 9.5px;
  font-weight: 700;
  letter-spacing: 0.4px;
  line-height: 1.25;
  padding: 2px 7px;
  border-radius: 999px;
  background: rgba(92, 9, 49, 0.08);
  color: #5c0931;
  border: 1px solid rgba(92, 9, 49, 0.2);
  white-space: nowrap;
  flex-shrink: 0;
}

.flight-airline-name {
  font-size: 11.5px;
  color: #4a525d;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 150px;
}

/* Pilot column */
.pilot-cell-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
}

.pilot-name-text {
  font-weight: 600;
  color: #1f212b;
  font-size: 13px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 175px;
}

.pilot-rank-sub {
  font-size: 11.5px;
  color: #6e7780;
  white-space: nowrap;
}

/* Route column */
.route-cell-wrap {
  display: flex;
  align-items: center;
  gap: 6px;
  white-space: nowrap;
}

.route-endpoint {
  display: flex;
  flex-direction: column;
  gap: 1px;
}

.route-code-row {
  display: flex;
  align-items: center;
  gap: 4px;
}

.route-flag {
  font-size: 12.5px;
  line-height: 1;
}

.route-code {
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  font-size: 13.5px;
  font-weight: 700;
  color: #1f212b;
  letter-spacing: 0.3px;
}

.route-city {
  font-size: 11px;
  color: #4a525d;
  white-space: nowrap;
  max-width: 82px;
  overflow: hidden;
  text-overflow: ellipsis;
}

.route-arrow {
  color: #5c0931;
  font-size: 12.5px;
  font-weight: 700;
  padding: 0 1px;
  flex-shrink: 0;
}

/* Aircraft column */
.aircraft-cell-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.aircraft-type-text {
  font-weight: 600;
  font-size: 13px;
  color: #1f212b;
  white-space: nowrap;
}

.aircraft-network-sub {
  font-size: 11px;
  color: #6e7780;
  white-space: nowrap;
}

/* Telemetry column (Alt / Speed) */
.telem-cell-wrap {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.telem-alt-text {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-weight: 600;
  font-size: 12.5px;
  color: #5c0931;
  white-space: nowrap;
}

.telem-speed-text {
  font-size: 11px;
  color: #4a525d;
  white-space: nowrap;
}

/* Progress column */
.progress-cell-wrap {
  display: flex;
  flex-direction: column;
  gap: 5px;
  min-width: 110px;
}

.board-progress-bar {
  width: 100%;
  height: 6px;
  border-radius: 999px;
  background: #e2e8f0;
  overflow: hidden;
  position: relative;
}

.board-progress-fill {
  height: 100%;
  border-radius: inherit;
  background: #5c0931;
  transition: width 0.4s ease;
}

.is-pilot-row .board-progress-fill {
  background: #059669;
}

.progress-meta-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  color: #4a525d;
  white-space: nowrap;
}

.progress-pct-text {
  font-weight: 700;
  color: #1f212b;
}

/* Status / Phase Badges */
.phase-badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 999px;
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.5px;
  text-transform: uppercase;
  white-space: nowrap;
}

.phase-cruise {
  background: #eff6ff;
  border: 1px solid #bfdbfe;
  color: #1d4ed8;
}

.phase-climb {
  background: #f5f3ff;
  border: 1px solid #ddd6fe;
  color: #6d28d9;
}

.phase-descent {
  background: rgba(92, 9, 49, 0.08);
  border: 1px solid rgba(92, 9, 49, 0.22);
  color: #5c0931;
}

.phase-ground {
  background: #fffbeb;
  border: 1px solid #fde68a;
  color: #b45309;
}

/* Action button */
.btn-board-track {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 6px 12px;
  border-radius: 999px;
  background: #f2f3fa;
  border: 1px solid #dbdee8;
  color: #5c0931;
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  font-size: 11.5px;
  font-weight: 700;
  cursor: pointer;
  transition: all 0.15s ease;
  white-space: nowrap;
}

.btn-board-track:hover {
  background: #5c0931;
  border-color: #5c0931;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 3px 10px rgba(92, 9, 49, 0.22);
}

.btn-board-track svg {
  width: 12px;
  height: 12px;
}

/* Empty state */
.live-board-empty {
  padding: 48px 24px;
  text-align: center;
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 12px;
}

.live-board-empty p {
  margin: 0;
  font-size: 14px;
  color: #4a525d;
}

.btn-reset-filters {
  background: #ffffff;
  border: 1.5px solid #5c0931;
  color: #5c0931;
  padding: 8px 18px;
  border-radius: 999px;
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  font-size: 12.5px;
  font-weight: 600;
  cursor: pointer;
  transition: all 0.15s ease;
}

.btn-reset-filters:hover {
  background: #5c0931;
  color: #ffffff;
}

/* Responsive adjustments */
@media (max-width: 1050px) {
  .dashboard-live-board {
    padding: 24px 20px;
  }
  .live-board-header {
    flex-direction: column;
    align-items: flex-start;
  }
  .live-board-header-right {
    width: 100%;
    justify-content: space-between;
  }
  .live-board-toolbar {
    flex-direction: column;
    align-items: stretch;
  }
  .board-search-wrap {
    width: 100%;
    min-width: 100%;
  }
  .live-board-table {
    min-width: 820px;
  }
}

/* Latest Community Arrivals Card Styles */
.dashboard-arrivals-board {
  margin-top: 0;
}

.arrivals-pill {
  background: #ecfdf5 !important;
  border-color: #a7f3d0 !important;
  color: #059669 !important;
}

.arrivals-pulse-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
  background: #059669;
  box-shadow: 0 0 8px rgba(5, 150, 105, 0.45);
  animation: arrivalsPulse 2.4s infinite ease-in-out;
}

@keyframes arrivalsPulse {
  0% { transform: scale(0.95); opacity: 0.85; }
  50% { transform: scale(1.15); opacity: 1; }
  100% { transform: scale(0.95); opacity: 0.85; }
}

.btn-arrivals-refresh {
  cursor: pointer;
  background: #ffffff;
  border: 1.5px solid #5c0931;
  color: #5c0931;
  height: 38px;
  min-height: 38px;
  padding: 0 16px;
  border-radius: 999px;
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  font-size: 12.5px;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  box-shadow: none;
  transition: all 0.18s ease;
}

.btn-arrivals-refresh:hover {
  background: #5c0931;
  border-color: #5c0931;
  color: #ffffff;
  transform: translateY(-1px);
  box-shadow: 0 4px 12px rgba(92, 9, 49, 0.22);
}

.arrivals-table .landing-cell-wrap {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.touchdown-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 10px;
  border-radius: 999px;
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.2px;
  width: fit-content;
  white-space: nowrap;
}

.touchdown-badge.is-butter {
  color: #059669;
  background: #ecfdf5;
  border: 1px solid #a7f3d0;
}

.touchdown-badge.is-normal {
  color: #1d4ed8;
  background: #eff6ff;
  border: 1px solid #bfdbfe;
}

.touchdown-badge.is-firm {
  color: #b45309;
  background: #fffbeb;
  border: 1px solid #fde68a;
}

.touchdown-badge.is-hard {
  color: #dc2626;
  background: #fef2f2;
  border: 1px solid #fecaca;
}

.touchdown-sub {
  font-size: 11px;
  color: #4a525d;
  letter-spacing: 0.1px;
  white-space: nowrap;
}

.arrival-time-cell {
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.arrival-time-relative {
  font-family: var(--font-graphik, 'Plus Jakarta Sans', sans-serif);
  font-weight: 600;
  font-size: 13px;
  color: #1f212b;
  white-space: nowrap;
}

.arrival-time-exact {
  font-size: 11px;
  color: #6e7780;
  white-space: nowrap;
}

.arrival-duration-badge {
  font-family: var(--font-mono, 'JetBrains Mono', monospace);
  font-size: 12px;
  font-weight: 600;
  color: #1f212b;
  background: #f2f3fa;
  border: 1px solid #dbdee8;
  padding: 4px 10px;
  border-radius: 999px;
  display: inline-block;
  white-space: nowrap;
}
