.tpma-card-flight-live{
  grid-column: 1 / -1;
  padding: 18px;
  background:
    radial-gradient(circle at top left, rgba(201,171,3,0.18), transparent 42%),
    linear-gradient(160deg, rgba(9,13,23,0.92), rgba(3,10,20,0.88));
  border: 1px solid rgba(255,255,255,0.12);
  box-shadow: 0 28px 80px rgba(0,0,0,0.26);
}

.tpma-flight-live-head{
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: flex-start;
  margin-bottom: 16px;
}

.tpma-flight-live-sub{
  margin: 8px 0 0;
  max-width: 56ch;
  color: rgba(255,255,255,0.72);
  font-size: 0.96rem;
}

.tpma-flight-head-actions{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.tpma-flight-picker{
  display: grid;
  gap: 10px;
}

.tpma-flight-label{
  font-size: 0.82rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255,255,255,0.56);
}

.tpma-flight-picker-bar{
  position: relative;
}

.tpma-flight-picker-input{
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(255,255,255,0.06);
  color: #f8fafc;
  font-size: 1rem;
  outline: none;
  box-shadow: inset 0 1px 0 rgba(255,255,255,0.05);
}

.tpma-flight-picker-input:focus{
  border-color: rgba(201,171,3,0.65);
  box-shadow: 0 0 0 3px rgba(201,171,3,0.16);
}

.tpma-flight-picker-results{
  position: absolute;
  top: calc(100% + 8px);
  left: 0;
  right: 0;
  z-index: 8;
  display: grid;
  gap: 6px;
  padding: 10px;
  border-radius: 18px;
  border: 1px solid rgba(255,255,255,0.12);
  background: rgba(3,10,20,0.96);
  box-shadow: 0 18px 50px rgba(0,0,0,0.36);
  max-height: 280px;
  overflow: auto;
}

.tpma-flight-result{
  width: 100%;
  padding: 10px 12px;
  border: 0;
  border-radius: 14px;
  background: rgba(255,255,255,0.04);
  color: inherit;
  text-align: left;
  cursor: pointer;
  display: grid;
  gap: 3px;
}

.tpma-flight-result:hover,
.tpma-flight-result:focus-visible{
  background: rgba(201,171,3,0.13);
  outline: none;
}

.tpma-flight-result-code{
  font-weight: 800;
  color: #fff7cc;
}

.tpma-flight-result-copy{
  color: rgba(255,255,255,0.72);
  font-size: 0.94rem;
}

.tpma-flight-picked{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  align-items: center;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.76);
}

.tpma-flight-picked strong{
  color: #fff7cc;
}

.tpma-flight-status{
  color: rgba(255,255,255,0.68);
  font-size: 0.94rem;
}

.tpma-flight-status[data-tone="loading"]{
  color: #fde68a;
}

.tpma-flight-status[data-tone="ok"]{
  color: #bef264;
}

.tpma-flight-status[data-tone="warn"]{
  color: #fcd34d;
}

.tpma-flight-status[data-tone="error"]{
  color: #fca5a5;
}

.tpma-flight-grid{
  margin-top: 18px;
  display: grid;
  grid-template-columns: minmax(0, 1.08fr) minmax(320px, 0.92fr);
  gap: 16px;
}

.tpma-flight-panel{
  min-width: 0;
  padding: 14px;
  border-radius: 22px;
  background: rgba(255,255,255,0.04);
  border: 1px solid rgba(255,255,255,0.1);
}

.tpma-flight-panel-head{
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 12px;
}

.tpma-flight-panel-head h2{
  margin: 0;
  font-size: 1rem;
}

.tpma-flight-panel-meta{
  color: rgba(255,255,255,0.55);
  font-size: 0.88rem;
}

.tpma-flight-board{
  display: grid;
  gap: 8px;
}

.tpma-flight-row{
  width: 100%;
  border: 0;
  border-radius: 18px;
  padding: 12px 14px;
  background: rgba(255,255,255,0.03);
  color: inherit;
  cursor: pointer;
  display: grid;
  grid-template-columns: minmax(0, 1.2fr) auto;
  gap: 12px;
  align-items: center;
  text-align: left;
  transition: transform 0.16s ease, background 0.16s ease, border-color 0.16s ease;
  border: 1px solid transparent;
}

.tpma-flight-row:hover,
.tpma-flight-row:focus-visible{
  outline: none;
  transform: translateY(-1px);
  background: rgba(255,255,255,0.06);
}

.tpma-flight-row.is-active{
  border-color: rgba(201,171,3,0.52);
  background: rgba(201,171,3,0.12);
}

.tpma-flight-row-main{
  min-width: 0;
  display: grid;
  gap: 4px;
}

.tpma-flight-row-flight{
  font-weight: 800;
  letter-spacing: 0.02em;
  color: #fff7cc;
}

.tpma-flight-row-route{
  color: rgba(255,255,255,0.72);
  font-size: 0.93rem;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.tpma-flight-row-meta{
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  justify-content: flex-end;
  align-items: center;
  color: rgba(255,255,255,0.68);
  font-size: 0.88rem;
}

.tpma-flight-pill{
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.08);
  color: #fff;
  font-weight: 700;
}

.tpma-flight-row[data-flight-tone="stand"] .tpma-flight-pill{
  background: rgba(148,163,184,0.16);
}

.tpma-flight-row[data-flight-tone="taxi"] .tpma-flight-pill{
  background: rgba(96,165,250,0.18);
}

.tpma-flight-row[data-flight-tone="rolling"] .tpma-flight-pill{
  background: rgba(245,158,11,0.22);
}

.tpma-flight-row[data-flight-tone="airborne"] .tpma-flight-pill{
  background: rgba(16,185,129,0.22);
}

.tpma-flight-row[data-flight-tone="departed"] .tpma-flight-pill{
  background: rgba(99,102,241,0.22);
}

.tpma-flight-radar-wrap{
  display: grid;
  gap: 12px;
}

.tpma-flight-map{
  width: 100%;
  min-height: 460px;
  display: block;
  border-radius: 26px;
  overflow: hidden;
  background:
    radial-gradient(circle at top left, rgba(201,171,3,0.12), transparent 36%),
    linear-gradient(160deg, rgba(7,19,31,0.96), rgba(2,10,20,0.94));
  border: 1px solid rgba(255,255,255,0.08);
}

.tpma-flight-map.leaflet-container{
  font: inherit;
  color: #f8fafc;
}

.tpma-flight-map .leaflet-tile{
  filter: saturate(0.92) contrast(1.03) brightness(0.9);
}

.tpma-flight-map .leaflet-control-zoom{
  border: 0;
  box-shadow: 0 14px 32px rgba(0,0,0,0.28);
}

.tpma-flight-map .leaflet-control-zoom a{
  width: 34px;
  height: 34px;
  line-height: 32px;
  border: 0;
  background: rgba(3,10,20,0.9);
  color: #fff7cc;
}

.tpma-flight-map .leaflet-control-zoom a:hover,
.tpma-flight-map .leaflet-control-zoom a:focus-visible{
  background: rgba(201,171,3,0.18);
  color: #ffffff;
  outline: none;
}

.tpma-flight-map .leaflet-control-attribution{
  background: rgba(3,10,20,0.76);
  color: rgba(255,255,255,0.6);
  padding: 2px 8px;
  border-radius: 12px 0 0 0;
}

.tpma-flight-map .leaflet-popup-content-wrapper,
.tpma-flight-map .leaflet-popup-tip{
  background: rgba(3,10,20,0.96);
  color: #f8fafc;
  box-shadow: 0 20px 44px rgba(0,0,0,0.34);
}

.tpma-flight-map .leaflet-popup-content{
  margin: 10px 12px;
}

.tpma-flight-map-divicon{
  background: transparent;
  border: 0;
}

.tpma-flight-map-chip{
  position: relative;
  width: 56px;
  height: 56px;
  display: flex;
  align-items: center;
  justify-content: center;
}

.tpma-flight-map-chip::after{
  content: "";
  position: absolute;
  inset: 10px;
  border-radius: 999px;
  background: rgba(3,10,20,0.82);
  border: 1px solid rgba(255,255,255,0.14);
  box-shadow: 0 12px 26px rgba(0,0,0,0.26);
}

.tpma-flight-map-chip.is-active::after{
  inset: 6px;
  background: rgba(201,171,3,0.18);
  border-color: rgba(254,240,138,0.88);
  box-shadow: 0 0 0 1px rgba(254,240,138,0.4), 0 0 24px rgba(250,204,21,0.34);
}

.tpma-flight-map-glyph{
  position: relative;
  z-index: 2;
  width: 28px;
  height: 28px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  transform: rotate(var(--flight-rotation, 0deg));
  filter: drop-shadow(0 2px 4px rgba(0,0,0,0.22));
}

.tpma-flight-map-glyph svg{
  width: 100%;
  height: 100%;
  display: block;
}

.tpma-flight-map-callout{
  position: absolute;
  left: 50%;
  top: 7px;
  transform: translate(-50%, -115%);
  z-index: 3;
  padding: 4px 8px;
  border-radius: 999px;
  background: rgba(3,10,20,0.94);
  border: 1px solid rgba(254,240,138,0.34);
  color: #fff7cc;
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.03em;
  white-space: nowrap;
  box-shadow: 0 10px 22px rgba(0,0,0,0.24);
}

.tpma-flight-popup{
  display: grid;
  gap: 4px;
}

.tpma-flight-popup strong{
  color: #fff7cc;
}

.tpma-flight-popup span{
  color: rgba(255,255,255,0.72);
  font-size: 0.86rem;
}

.tpma-flight-detail{
  display: grid;
  gap: 8px;
  padding: 12px 14px;
  border-radius: 16px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.72);
}

.tpma-flight-detail strong{
  color: #fff7cc;
}

.tpma-flight-detail-grid{
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.tpma-flight-detail-grid span{
  display: inline-flex;
  align-items: center;
  min-height: 28px;
  padding: 0 10px;
  border-radius: 999px;
  background: rgba(255,255,255,0.05);
  border: 1px solid rgba(255,255,255,0.08);
  color: rgba(255,255,255,0.78);
  font-size: 0.84rem;
}

.tpma-flight-empty{
  padding: 18px 16px;
  border-radius: 18px;
  background: rgba(255,255,255,0.04);
  color: rgba(255,255,255,0.62);
}

.tpma-flight-source{
  margin-top: 14px;
  color: rgba(255,255,255,0.52);
  font-size: 0.86rem;
}

@media (max-width: 980px){
  .tpma-flight-grid{
    grid-template-columns: 1fr;
  }
}

@media (max-width: 640px){
  .tpma-card-flight-live{
    padding: 14px;
  }

  .tpma-flight-live-head{
    flex-direction: column;
  }

  .tpma-flight-row{
    grid-template-columns: 1fr;
  }

  .tpma-flight-row-meta{
    justify-content: flex-start;
  }

  .tpma-flight-map{
    min-height: 360px;
  }
}
