:root {
  --manifest-bg: #0f131a;
  --manifest-panel: #171f2b;
  --manifest-panel-2: #1f2a3a;
  --manifest-border: #2c384a;
  --manifest-text: #e8edf4;
  --manifest-muted: #9aa7b7;
  --manifest-accent: #55c6ff;
  --manifest-danger: #ff5c5c;
  --manifest-warning: #ffb74d;
  --manifest-success: #4cd57b;
  --manifest-secondary: #7f8b9d;
  --manifest-tandem: #1557b0;
  --manifest-aff: #00472d;
  --manifest-sport: #8ee6c7;
  --manifest-coach: #c89bff;
}

body.manifest-display.theme-light,
:is(body.manifest-display, .manifest-theme).theme-light {
  --manifest-bg: #f4f6fb;
  --manifest-panel: #ffffff;
  --manifest-panel-2: #f1f4f9;
  --manifest-border: #d7dee8;
  --manifest-text: #182132;
  --manifest-muted: #556176;
  --manifest-accent: #1b6ef3;
  --manifest-danger: #cc2c2c;
  --manifest-warning: #ff8f2b;
  --manifest-success: #2c9f5d;
  --manifest-secondary: #6b7788;
  --manifest-tandem: #1557b0;
  --manifest-aff: #00472d;
  --manifest-sport: #6bcfb0;
  --manifest-coach: #b98bff;
}

.manifest-card {
  background: var(--manifest-panel);
  border: 1px solid var(--manifest-border);
  border-radius: 12px;
  display: flex;
  flex-direction: column;
  overflow: hidden;
  flex: 1;
  min-width: 0;
  min-height: 0;
}

.manifest-card-header {
  padding: 8px 10px;
  background: var(--manifest-panel-2);
  display: grid;
  grid-template-columns: minmax(64px, 1fr) minmax(70px, auto) minmax(80px, 1fr);
  align-items: center;
  gap: 6px;
  border-bottom: 1px solid var(--manifest-border);
  min-height: 68px;
  min-width: 0;
  overflow: visible;
}

/* Header background follows the load status so the change is visible from
   afar; "open" keeps the plain panel. */
.manifest-card-header.status-boarding {
  background: linear-gradient(rgba(37, 99, 235, 0.26), rgba(37, 99, 235, 0.26)), var(--manifest-panel-2);
  border-bottom: 3px solid #2563eb;
}

.manifest-card-header.status-auto {
  background: linear-gradient(rgba(14, 165, 233, 0.26), rgba(14, 165, 233, 0.26)), var(--manifest-panel-2);
  border-bottom: 3px solid #0ea5e9;
}

.manifest-card-header.status-refueling {
  background: linear-gradient(rgba(245, 158, 11, 0.26), rgba(245, 158, 11, 0.26)), var(--manifest-panel-2);
  border-bottom: 3px solid #f59e0b;
}

.manifest-card-header.status-departed {
  background: linear-gradient(rgba(220, 38, 38, 0.26), rgba(220, 38, 38, 0.26)), var(--manifest-panel-2);
  border-bottom: 3px solid #dc2626;
}

.manifest-card-header.status-closed {
  background: linear-gradient(rgba(124, 58, 237, 0.26), rgba(124, 58, 237, 0.26)), var(--manifest-panel-2);
  border-bottom: 3px solid #7c3aed;
}

.manifest-card-header.status-flight {
  background: linear-gradient(rgba(124, 58, 237, 0.26), rgba(124, 58, 237, 0.26)), var(--manifest-panel-2);
  border-bottom: 3px solid #7c3aed;
}

.manifest-card-header.status-standby {
  background: linear-gradient(rgba(100, 116, 139, 0.26), rgba(100, 116, 139, 0.26)), var(--manifest-panel-2);
  border-bottom: 3px solid #64748b;
}

.manifest-card-right-meta {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 4px;
  justify-self: end;
  min-width: 62px;
  max-width: none;
  overflow: visible;
}

.manifest-card-status-text {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 0;
  max-width: none;
  padding: 4px 10px;
  border-radius: 999px;
  border: 2px solid transparent;
  font-size: clamp(12px, 0.97vw, 14px);
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: #fff;
  white-space: nowrap;
  overflow: visible;
  line-height: 1.05;
}

.manifest-card-status-text.is-open {
  background: #16a34a;
  border-color: #12823c;
}

.manifest-card-status-text.is-boarding {
  background: #2563eb;
  border-color: #1d4ed8;
}

.manifest-card-status-text.is-auto {
  background: #0ea5e9;
  border-color: #0284c7;
}

.manifest-card-status-text.is-refueling {
  background: #f59e0b;
  border-color: #d97706;
  color: #1f2937;
}

.manifest-card-status-text.is-departed {
  background: #dc2626;
  border-color: #b91c1c;
}

.manifest-card-status-text.is-closed,
.manifest-card-status-text.is-flight {
  background: #7c3aed;
  border-color: #6d28d9;
}

.manifest-card-status-text.is-standby {
  background: #64748b;
  border-color: #475569;
}

.manifest-card-status-text.is-generic {
  background: var(--manifest-secondary);
  border-color: var(--manifest-secondary);
}

.manifest-card-slots-badge {
  margin-left: 0;
  padding: 0;
  border-radius: 0;
  background: transparent;
  border: 0;
  color: var(--manifest-text);
  font-size: clamp(16px, 1.7vw, 23px);
  font-weight: 700;
  letter-spacing: 0.02em;
  white-space: nowrap;
  min-width: max-content;
  text-align: right;
  line-height: 1.05;
  overflow: visible;
}

.manifest-card-slots-badge.is-full {
  background: transparent;
  border-color: transparent;
  color: #b91c1c;
}

.manifest-card-countdown {
  font-size: clamp(33px, 2.85vw, 57px);
  font-weight: 700;
  color: var(--manifest-success);
  letter-spacing: 0.01em;
  line-height: 0.95;
  text-align: center;
  grid-column: 2;
  justify-self: center;
  align-self: center;
  min-width: 42px;
  max-width: 100%;
  white-space: nowrap;
  overflow: visible;
  font-variant-numeric: tabular-nums;
}

.manifest-card-countdown.is-hidden {
  opacity: 0;
  visibility: hidden;
}

.manifest-card-countdown.is-soon {
  color: var(--manifest-warning);
}

.manifest-card-countdown.is-late {
  color: var(--manifest-danger);
}

.manifest-card-aircraft-block {
  width: 100%;
  display: flex;
  align-items: center;
  justify-content: flex-start;
  min-width: 0;
  overflow: hidden;
}

.manifest-aircraft-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
  min-width: 0;
}

.manifest-aircraft-avatar {
  width: 38px;
  height: 38px;
  border-radius: 50%;
  border: 1px solid var(--manifest-border);
  background: var(--manifest-panel);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: var(--manifest-accent);
  overflow: hidden;
  flex: 0 0 38px;
}

.manifest-aircraft-avatar-wrap {
  position: relative;
  display: inline-flex;
}

/* Aircraft's load number of the day: a second sphere to the right of the
   plane, touching it and slightly covering its edge. It stays inside the
   aircraft block, which clips overflow. */
.manifest-aircraft-load-bubble {
  position: absolute;
  top: 50%;
  left: calc(100% - 8px);
  transform: translateY(-50%);
  min-width: 30px;
  height: 30px;
  padding: 0 6px;
  border-radius: 15px;
  border: 2px solid var(--manifest-panel-2);
  background: #1557b0;
  color: #ffffff;
  font-size: 16px;
  font-weight: 800;
  line-height: 26px;
  text-align: center;
  font-variant-numeric: tabular-nums;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.25);
  z-index: 1;
}

.manifest-aircraft-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.manifest-aircraft-reg-under {
  font-size: 13px;
  font-weight: 700;
  color: var(--manifest-text);
  white-space: nowrap;
  max-width: 76px;
  text-overflow: ellipsis;
  overflow: hidden;
}

@media (max-width: 980px) {
  .manifest-card-header {
    grid-template-columns: minmax(52px, 1fr) minmax(64px, auto) minmax(74px, 1fr);
    min-height: 72px;
    gap: 5px;
  }
  .manifest-card-countdown {
    font-size: clamp(30px, 6.3vw, 51px);
  }
  .manifest-card-status-text {
    padding: 4px 8px;
    font-size: 13px;
  }
  .manifest-card-slots-badge {
    font-size: 19px;
  }
  .manifest-aircraft-avatar {
    width: 34px;
    height: 34px;
    flex-basis: 34px;
  }
  .manifest-aircraft-reg-under {
    max-width: 66px;
    font-size: 12px;
  }
}

.manifest-card-body {
  padding: 5px;
  display: flex;
  flex-direction: column;
  gap: 3px;
  overflow: hidden;
  flex: 1;
}

.manifest-slot-line {
  display: flex;
  gap: 8px;
  align-items: center;
  font-size: 13px;
  color: var(--manifest-muted);
}

.manifest-slot-pill {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--manifest-border);
  padding: 2px 8px;
  border-radius: 999px;
  font-size: 12px;
  color: var(--manifest-text);
}

.manifest-jumpers {
  display: flex;
  flex-direction: column;
  gap: 2px;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
}

.manifest-group {
  display: flex;
  flex-direction: column;
  gap: 1px;
  padding: 3px 5px;
  border-radius: 8px;
  background: var(--manifest-panel-2);
  border: 1px solid var(--manifest-border);
}

.manifest-group.is-tandem {
  background: #1557b0;
  border-color: #0f4590;
}

.manifest-group.is-aff {
  background: #00472d;
  border-color: #003722;
}

.manifest-group.is-sport {
  background: #f2f4f7;
  border-color: #d5dbe5;
}

.manifest-group.is-sport .manifest-group-title,
.manifest-group.is-sport .manifest-group-compact-rig,
.manifest-group.is-sport .manifest-tag--fun {
  color: #182033;
}

.manifest-group.is-coach {
  background: rgba(200, 155, 255, 0.12);
  border-color: rgba(200, 155, 255, 0.2);
}

/* Grupo hecho a mano en embarques (fun en coaching con su instructor…). Marrón: no se confunde con el azul del
   tándem, el verde del AFF ni el ámbar/rojo de la cuenta atrás. Lo copian la vista del personal y la app. */
.manifest-group.is-grouped {
  background: #6b4423;
  border-color: #4e3018;
}

.manifest-group.is-grouped .manifest-group-header {
  margin: -1px -2px 4px;
  padding: 5px 6px;
  border-radius: 7px;
  background: #6b4423;
  border: 1px solid #4e3018;
  color: #ffffff;
}

.manifest-group.is-grouped .manifest-group-title {
  color: #ffffff;
  font-weight: 700;
}

.manifest-group.is-grouped .manifest-crew-row {
  background: #ffffff;
  border-color: #d6bfa6;
}

.manifest-group.is-grouped .manifest-crew-name,
.manifest-group.is-grouped .manifest-crew-rig {
  color: #1f2937;
}

.manifest-group.is-grouped .manifest-tag {
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.9);
  color: #6b4423;
}

.manifest-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 4px;
  flex-wrap: nowrap;
  min-width: 0;
}

.manifest-group-header-main {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  flex: 1 1 0;
}

.manifest-group-title-stack {
  display: flex;
  flex-direction: column;
  gap: 2px;
  min-width: 0;
  flex: 1 1 0;
}

.manifest-group-avatar {
  width: clamp(34px, 2.15vw, 44px);
  height: clamp(34px, 2.15vw, 44px);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.82);
  flex: 0 0 clamp(34px, 2.15vw, 44px);
  background: var(--manifest-panel);
  box-shadow: 0 2px 7px rgba(0, 0, 0, 0.22);
}

.image_gallery.manifest-group-avatar,
.image_gallery.manifest-crew-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  padding: 0;
}

.manifest-profile-gallery-link {
  display: block;
  width: 100%;
  height: 100%;
  border-radius: inherit;
  overflow: hidden;
}

.manifest-profile-gallery-img {
  display: block;
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.manifest-group-title {
  font-size: clamp(14px, 1.05vw, 18px);
  font-weight: 700;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  min-width: 0;
}

.manifest-group-tags {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  flex-wrap: nowrap;
  justify-content: flex-end;
  margin-left: auto;
  flex: 0 0 auto;
  min-width: max-content;
}

.manifest-group-tags-stack {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 3px;
}

.manifest-group-tags-stack .manifest-tag {
  width: fit-content;
}

.manifest-group-primary-meta {
  margin-left: auto;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 3px;
  flex: 0 0 auto;
  min-width: 0;
}

.manifest-group-primary-meta .manifest-group-tags {
  margin-left: 0;
}

/* AFF: the student's name keeps at least ~45% of the header; the course
   label shrinks and ellipsizes instead of pushing the name out. */
.manifest-group.is-aff .manifest-group-primary-meta {
  flex: 0 1 auto;
  max-width: 55%;
}

.manifest-group-primary-meta .manifest-group-tags,
.manifest-group-primary-meta .manifest-group-tags-stack,
.manifest-group-primary-meta .manifest-group-tags-stack .manifest-tag {
  min-width: 0;
  max-width: 100%;
}

.manifest-group-primary-meta .manifest-tag--aff {
  display: inline-flex;
  align-items: center;
  gap: 2px;
  white-space: nowrap;
}

.manifest-group-primary-meta .manifest-tag-aff-course {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manifest-group-primary-meta .manifest-tag-aff-arrow,
.manifest-group-primary-meta .manifest-tag-aff-phase {
  flex: 0 0 auto;
}

.manifest-group-primary-rig {
  max-width: 150px;
  font-size: clamp(10px, 0.75vw, 13px);
  line-height: 1.1;
  color: #1f2937;
  background: rgba(255, 255, 255, 0.96);
  border: 1px solid rgba(255, 255, 255, 0.9);
  border-radius: 7px;
  padding: 2px 6px;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  box-shadow: 0 1px 3px rgba(0, 0, 0, 0.18);
}

.manifest-group-primary-rig span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manifest-group-primary-rig.is-pending {
  color: var(--manifest-danger);
  background: #fff2f2;
  border-color: #f2c7c7;
}

.manifest-group-primary-rig .manifest-equipment-icon-wrap {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}

.manifest-group.is-aff .manifest-group-header {
  margin: -1px -2px 4px;
  padding: 5px 6px;
  border-radius: 7px;
  background: #00472d;
  border: 1px solid #003722;
  color: #ffffff;
}

.manifest-group.is-tandem .manifest-group-header {
  margin: -1px -2px 4px;
  padding: 5px 6px;
  border-radius: 7px;
  background: #1557b0;
  border: 1px solid #0f4590;
  color: #ffffff;
}

.manifest-group.is-tandem .manifest-group-title {
  color: #ffffff;
}

.manifest-group.is-aff .manifest-group-title {
  color: #ffffff;
}

.manifest-group.is-tandem .manifest-crew-row,
.manifest-group.is-aff .manifest-crew-row {
  background: #ffffff;
}

.manifest-group.is-tandem .manifest-crew-row {
  border-color: #bfdbfe;
}

.manifest-group.is-aff .manifest-crew-row {
  border-color: #bfd9cf;
}

.manifest-group.is-tandem .manifest-crew-name,
.manifest-group.is-tandem .manifest-crew-rig,
.manifest-group.is-aff .manifest-crew-name,
.manifest-group.is-aff .manifest-crew-rig {
  color: #1f2937;
}

.manifest-group.is-aff .manifest-tag--aff {
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.85);
  color: #00472d;
}

.manifest-group.is-aff .manifest-tag--count {
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.9);
  color: #00472d;
}

.manifest-group.is-tandem .manifest-tag--count {
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.9);
  color: #1557b0;
}

.manifest-group.is-tandem .manifest-tag:not(.manifest-tag--count) {
  background: #ffffff;
  border-color: rgba(255, 255, 255, 0.9);
  color: #1557b0;
}

.manifest-group.is-tandem .manifest-group-avatar,
.manifest-group.is-aff .manifest-group-avatar {
  width: clamp(34px, 2.05vw, 42px);
  height: clamp(34px, 2.05vw, 42px);
  flex-basis: clamp(34px, 2.05vw, 42px);
}

.manifest-group.is-tandem .manifest-group-title,
.manifest-group.is-aff .manifest-group-title {
  font-size: clamp(14px, 1.05vw, 18px);
  font-weight: 700;
}

.manifest-group.is-aff .manifest-compliance {
  gap: 4px;
}

.manifest-group.is-aff .manifest-compliance-icon {
  width: 17px;
  height: 17px;
  font-size: 9px;
}

.manifest-group.is-aff .manifest-compliance-icon svg {
  width: 10px;
  height: 10px;
}

.manifest-group.is-aff .manifest-compliance-ban {
  right: -3px;
  bottom: -3px;
  width: 9px;
  height: 9px;
}

.manifest-group.is-aff .manifest-tag {
  font-size: 9px;
  padding: 1px 5px;
}

.manifest-group-crew {
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.manifest-crew-row {
  display: grid;
  grid-template-columns: auto auto minmax(0, 1fr) max-content;
  align-items: center;
  gap: 6px;
  padding: 3px 5px;
  border-radius: 6px;
  background: var(--manifest-panel);
  border: 1px solid var(--manifest-border);
  font-size: 11px;
}

.manifest-crew-row--pilot {
  padding: 4px 6px;
}

.manifest-role {
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 12px;
  font-weight: 700;
  color: #0f131a;
  background: var(--manifest-accent);
  border: 1px solid rgba(0, 0, 0, 0.15);
}

.manifest-role svg {
  width: 14px;
  height: 14px;
  stroke: currentColor;
  fill: none;
  stroke-width: 2;
}

.manifest-role--pax {
  background: var(--manifest-accent);
  color: #0c1b2a;
}

.manifest-role--inline {
  width: 28px;
  height: 28px;
}

.manifest-role--group {
  background: var(--manifest-secondary);
  color: #f5f8ff;
  border-color: rgba(255, 255, 255, 0.24);
}

.manifest-role--pilot {
  background: var(--manifest-warning);
  color: #1f1602;
}

.manifest-role--pilot svg {
  width: 16px;
  height: 16px;
  stroke-width: 1.9;
}

.manifest-role--camera {
  background: #0f131a;
  color: #ffffff;
  border-color: #0f131a;
}

.manifest-internal-camera {
  width: 22px;
  height: 22px;
  flex: 0 0 22px;
  box-shadow: 0 0 0 2px rgba(255, 255, 255, 0.18);
}

.manifest-role--aff {
  background: #2563eb;
  color: #f8fafc;
}

.manifest-crew-name {
  font-weight: 700;
  font-size: clamp(13px, 0.95vw, 16px);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}

.manifest-crew-name.has-handcam {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 1px;
  white-space: normal;
  line-height: 1.05;
}

.manifest-crew-name-text {
  max-width: 100%;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.manifest-crew-avatar {
  width: clamp(30px, 1.75vw, 38px);
  height: clamp(30px, 1.75vw, 38px);
  border-radius: 50%;
  object-fit: cover;
  border: 2px solid rgba(255, 255, 255, 0.78);
  flex: 0 0 clamp(30px, 1.75vw, 38px);
  background: var(--manifest-panel-2);
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.2);
}

.manifest-crew-name.is-unassigned {
  color: var(--manifest-danger);
  font-weight: 800;
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: 0 1 auto;
  max-width: 100%;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 92, 92, 0.08);
  border: 1px solid rgba(255, 92, 92, 0.26);
}

.manifest-crew-name-text.is-unassigned {
  color: var(--manifest-danger);
  font-weight: 800;
  position: relative;
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 92, 92, 0.08);
  border: 1px solid rgba(255, 92, 92, 0.26);
}

.manifest-handcam-badge {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  border: 1px solid #ffd79b;
  background: #fff5df;
  color: #8b4d00;
  border-radius: 999px;
  padding: 2px 7px;
  font-size: 10px;
  font-weight: 800;
  line-height: 1.1;
  white-space: nowrap;
  box-shadow: 0 1px 2px rgba(15, 23, 42, 0.12);
}

.manifest-handcam-badge i {
  font-size: 9px;
}

.manifest-group-title.is-unassigned {
  color: var(--manifest-danger);
  font-weight: 800;
  position: relative;
  display: inline-flex;
  align-items: center;
  width: max-content;
  max-width: 100%;
  padding: 1px 5px;
  border-radius: 5px;
  background: rgba(255, 92, 92, 0.08);
  border: 1px solid rgba(255, 92, 92, 0.26);
}

.manifest-compliance {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.manifest-compliance--header {
  margin-left: 0;
  gap: 4px;
}

.manifest-compliance--crew {
  margin-top: 0;
  gap: 3px;
}

.manifest-compliance-icon {
  width: 16px;
  height: 16px;
  border-radius: 999px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
  color: var(--manifest-muted);
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--manifest-border);
  font-size: 8px;
}

.manifest-compliance-icon svg {
  width: 9px;
  height: 9px;
  stroke: currentColor;
  fill: none;
  stroke-width: 1.8;
}

.manifest-compliance-icon i {
  font-size: 11px;
  line-height: 1;
}

.manifest-compliance-icon.is-ok {
  color: #0f2b16;
  background: rgba(76, 213, 123, 0.95);
  border-color: rgba(76, 213, 123, 0.95);
}

.manifest-compliance-icon.is-missing {
  color: #ffffff;
  background: rgba(255, 92, 92, 0.95);
  border-color: rgba(255, 92, 92, 0.95);
}

.manifest-compliance-ban {
  position: absolute;
  right: -3px;
  bottom: -4px;
  width: 8px;
  height: 8px;
  color: #ffffff;
}

.manifest-compliance-ban svg {
  width: 100%;
  height: 100%;
  stroke: #ffffff;
  fill: rgba(0, 0, 0, 0.28);
  stroke-width: 2;
}

.manifest-crew-rig {
  margin-left: 0;
  flex: 0 1 auto;
  font-size: clamp(11px, 0.85vw, 14px);
  font-weight: 600;
  color: var(--manifest-muted);
  max-width: none;
  text-align: right;
  overflow: visible;
  text-overflow: clip;
  white-space: nowrap;
  word-break: normal;
  line-height: 1.05;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
  position: relative;
}

/* Rig on two lines (model / number), always flush right. */
.manifest-rig-lines {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  text-align: right;
  line-height: 1.1;
  min-width: 0;
  max-width: 100%;
}

.manifest-rig-line {
  max-width: 100%;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manifest-crew-right {
  margin-left: auto;
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: center;
  gap: 2px;
  min-width: 42px;
  width: max-content;
  max-width: none;
}

.manifest-crew-rig.is-pending {
  color: var(--manifest-danger);
  font-weight: 600;
}

.manifest-equipment {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 12px;
  color: var(--manifest-muted);
}

.manifest-equipment.is-pending {
  color: var(--manifest-danger);
  font-weight: 600;
}

.manifest-equipment-icon {
  width: 16px;
  height: 16px;
  object-fit: contain;
  filter: brightness(0) invert(1);
}

.manifest-equipment-icon-wrap {
  width: 18px;
  height: 18px;
  flex: 0 0 18px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  position: relative;
}

:is(body.manifest-display, .manifest-theme).theme-light .manifest-equipment-icon {
  filter: none;
}

.manifest-equipment-icon-wrap.is-pending .manifest-equipment-icon {
  filter: brightness(0) saturate(100%) invert(25%) sepia(92%) saturate(3770%)
    hue-rotate(350deg) brightness(92%) contrast(96%);
}

:is(body.manifest-display, .manifest-theme).theme-light
  .manifest-equipment-icon-wrap.is-pending
  .manifest-equipment-icon {
  filter: brightness(0) saturate(100%) invert(25%) sepia(92%) saturate(3770%)
    hue-rotate(350deg) brightness(92%) contrast(96%);
}

.manifest-equipment-missing-icon {
  color: var(--manifest-danger);
  font-size: 14px;
  line-height: 1;
}

.manifest-equipment-icon-wrap.is-pending::after {
  content: "";
  position: absolute;
  width: 17px;
  height: 2px;
  border-radius: 999px;
  background: var(--manifest-danger);
  transform: rotate(-42deg);
  box-shadow:
    0 0 0 1px var(--manifest-panel),
    0 0 2px var(--manifest-panel);
}

.manifest-ban-overlay {
  position: absolute;
  left: 50%;
  top: 50%;
  transform: translate(-50%, -50%);
  color: var(--manifest-danger);
  font-size: 17px;
  line-height: 1;
  text-shadow:
    0 0 2px var(--manifest-panel),
    0 0 2px var(--manifest-panel);
}

.manifest-row {
  display: grid;
  grid-template-columns: 1fr auto;
  gap: 8px;
  align-items: center;
  padding: 6px 10px;
  border-radius: 10px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid transparent;
  font-size: 14px;
}

.manifest-row .row-name {
  font-weight: 600;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manifest-row .row-tags {
  display: flex;
  gap: 6px;
  align-items: center;
  color: var(--manifest-muted);
  font-size: 12px;
}

.manifest-tag {
  padding: 1px 4px;
  border-radius: 6px;
  background: rgba(0, 0, 0, 0.3);
  border: 1px solid rgba(255, 255, 255, 0.1);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-size: 9px;
  color: var(--manifest-text);
}

.manifest-tag--count {
  background: rgba(127, 139, 157, 0.25);
  border-color: rgba(127, 139, 157, 0.5);
}

.manifest-tag--jm {
  background: rgba(59, 130, 246, 0.2);
  border-color: rgba(59, 130, 246, 0.6);
  color: #dbeafe;
}

.manifest-tag--discipline {
  background: #4b5563;
  border-color: #374151;
  color: #ffffff;
  font-size: 9px;
  font-weight: 800;
  letter-spacing: 0.02em;
}

.manifest-tag--aff {
  background: var(--manifest-aff);
  border-color: #003722;
  color: #ffffff;
}

.manifest-tag-aff-arrow {
  font-size: 0.9em;
  margin: 0 1px;
}

.manifest-tag-aff-course {
  margin-left: 3px;
  font-weight: 900;
}

.manifest-tag-aff-phase {
  font-size: 1.28em;
  font-weight: 900;
  line-height: 1;
}

.manifest-tag--fun {
  background: rgba(142, 230, 199, 0.18);
  border-color: rgba(142, 230, 199, 0.42);
  color: var(--manifest-text);
}

.manifest-group--compact {
  padding-top: 4px;
  padding-bottom: 4px;
}

.manifest-group--compact .manifest-group-avatar {
  width: clamp(32px, 1.9vw, 40px);
  height: clamp(32px, 1.9vw, 40px);
  flex-basis: clamp(32px, 1.9vw, 40px);
}

.manifest-group--compact .manifest-group-title {
  font-size: clamp(14px, 1.05vw, 18px);
}

.manifest-group--compact .manifest-equipment-icon-wrap {
  width: 15px;
  height: 15px;
  flex-basis: 15px;
}

.manifest-group-compact-rig {
  font-size: clamp(11px, 0.8vw, 14px);
  font-weight: 600;
  letter-spacing: 0.02em;
  color: var(--manifest-text);
  background: rgba(127, 139, 157, 0.16);
  border: 1px solid rgba(127, 139, 157, 0.42);
  border-radius: 6px;
  padding: 2px 7px;
  white-space: nowrap;
  overflow: hidden;
  line-height: 1.2;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  flex: 0 1 auto;
  min-width: 0;
}

/* Solo jumper: rig on one line under the name, left-aligned. */
.manifest-group-compact-rig--line {
  align-self: flex-start;
  justify-content: flex-start;
  max-width: 100%;
}

.manifest-group-compact-rig--line > span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manifest-group-compact-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 4px;
  min-width: 0;
  max-width: 50%;
  flex: 0 1 auto;
}

.manifest-group-compact-rig.is-pending {
  color: var(--manifest-danger);
  font-weight: 600;
}

.manifest-row.is-tandem {
  background: rgba(21, 87, 176, 0.16);
  border-color: rgba(21, 87, 176, 0.34);
}

.manifest-row.is-aff {
  background: rgba(0, 71, 45, 0.16);
  border-color: rgba(0, 71, 45, 0.34);
}

.manifest-row.is-sport {
  background: rgba(142, 230, 199, 0.12);
  border-color: rgba(142, 230, 199, 0.2);
}

.manifest-row.is-coach {
  background: rgba(200, 155, 255, 0.16);
  border-color: rgba(200, 155, 255, 0.3);
}


/* Over the aircraft's seats: allowed (the organizer lets the operator overbook on purpose) but impossible to miss. */
.manifest-card.is-overbooked { border-color: var(--manifest-danger); box-shadow: 0 0 0 2px var(--manifest-danger); }
.manifest-card.is-overbooked .manifest-card-slots, .manifest-card.is-overbooked .manifest-slot-badge { color: var(--manifest-danger); }
.manifest-card-overbooked { background: color-mix(in srgb, var(--manifest-danger) 14%, transparent); color: var(--manifest-danger); font-weight: 700; font-size: .78rem; text-align: center; padding: 3px 6px; }

/* Compact density: the same card, tighter — the organizer's master board fits a whole day on a tablet. */
.manifest-card--compact { border-radius: 10px; font-size: 12px; }
.manifest-card--compact .manifest-card-header { min-height: 46px; padding: 4px 7px; gap: 4px; }
.manifest-card--compact .manifest-card-countdown { font-size: 1.45rem; }
.manifest-card--compact .manifest-aircraft-avatar { width: 26px; height: 26px; }
.manifest-card--compact .manifest-jumpers { padding: 4px; gap: 4px; }
.manifest-card--compact .manifest-group { border-radius: 7px; }
.manifest-card--compact .manifest-row, .manifest-card--compact .manifest-crew-row { padding: 2px 4px; min-height: 0; gap: 4px; }
.manifest-card--compact .manifest-crew-avatar, .manifest-card--compact .manifest-row-avatar { width: 20px; height: 20px; }
.manifest-card--compact .manifest-rig-lines { font-weight: 700; font-size: 10px; }
.manifest-rig-lines > :first-child { font-weight: 700; }
/* Dense card, solo jumper: the name takes the whole first line; activity tags and the rig share the second. */
.manifest-card--compact .manifest-group--compact .manifest-group-title-stack { min-width: 0; flex: 1 1 auto; }
.manifest-card--compact .manifest-group-compact-line { display: flex; align-items: center; gap: 4px; min-width: 0; flex-wrap: wrap; }
.manifest-card--compact .manifest-group-compact-line .manifest-tags { flex: none; }
.manifest-card--compact .manifest-group-compact-right { max-width: none; flex: none; }
/* Dense card: a crew member's rig goes to its own line under the name, so the name is never squeezed */
.manifest-card--compact .manifest-crew-row:has(.manifest-crew-rig) { grid-template-columns: auto auto minmax(0, 1fr); }
.manifest-card--compact .manifest-crew-row:has(.manifest-crew-rig) .manifest-crew-right { grid-column: 3 / -1; grid-row: 2; margin-left: 0; align-items: flex-start; width: auto; min-width: 0; }
/* Dense card crew row (owner, 2026-11-05): the photo as big as the row allows, the role (pilot, AFF, camera) as a badge on
   the photo instead of its own column, and a readable rig name. */
.manifest-card--compact .manifest-crew-row { position: relative; grid-template-columns: auto minmax(0, 1fr) max-content; column-gap: 6px; }
.manifest-card--compact .manifest-crew-row > .manifest-role { position: absolute; left: 24px; bottom: 1px; z-index: 2; width: 17px; height: 17px; font-size: 9px; border: 2px solid #fff; box-shadow: 0 1px 2px rgba(0, 0, 0, .3); }
.manifest-card--compact .manifest-crew-row > .manifest-role svg { width: 11px; height: 11px; }
.manifest-card--compact .manifest-crew-avatar,
.manifest-card--compact .manifest-crew-row > .manifest-row-avatar { width: 36px; height: 36px; flex-basis: 36px; grid-row: span 2; }
.manifest-card--compact .manifest-crew-row:has(.manifest-crew-rig) { grid-template-columns: auto minmax(0, 1fr); }
.manifest-card--compact .manifest-crew-row:has(.manifest-crew-rig) .manifest-crew-right { grid-column: 2 / -1; grid-row: 2; }
.manifest-card--compact .manifest-rig-lines { font-size: 12px; font-weight: 800; letter-spacing: .02em; }

/* Same size for every person's name on a card: crew rows (instructor, camera) read like a fun jumper's title
   (owner, 2026-11-05). The rig's own name (AVALON14) goes first and stronger than its type. */
.manifest-crew-name { font-size: clamp(14px, 1.05vw, 18px); }
.manifest-rig-name { font-weight: 900; }
.manifest-rig-line:not(.manifest-rig-name) { font-weight: 500; }
