: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: #ffd166;
  --manifest-aff: #8ac9ff;
  --manifest-sport: #8ee6c7;
  --manifest-coach: #c89bff;
}

* {
  box-sizing: border-box;
}

body.manifest-display {
  margin: 0;
  font-family:
    "Rubik",
    system-ui,
    -apple-system,
    sans-serif;
  background: var(--manifest-bg);
  color: var(--manifest-text);
  overflow: hidden;
}

body.manifest-display.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: #f1c85b;
  --manifest-aff: #77b5ff;
  --manifest-sport: #6bcfb0;
  --manifest-coach: #b98bff;
}

.manifest-shell {
  height: 100vh;
  display: flex;
  flex-direction: column;
  padding: 16px 20px;
  gap: 12px;
  overflow: hidden;
}

.manifest-shell.is-tv-mode {
  padding: 8px 10px;
  gap: 8px;
}

.manifest-shell.is-tv-mode .manifest-pager,
.manifest-shell.is-tv-mode .manifest-nav,
.manifest-shell.is-tv-mode .manifest-powered-footer {
  display: none !important;
}

.manifest-shell.is-tv-mode .manifest-grid {
  gap: 8px;
}

.manifest-shell.is-tv-mode .manifest-card-header {
  min-height: 50px;
  padding: 6px 10px;
}

.manifest-shell.is-tv-mode .manifest-card-countdown {
  font-size: clamp(24px, 2.5vw, 40px);
}

.manifest-shell.is-tv-mode .manifest-group-title {
  font-size: 13px;
}

.manifest-shell.is-tv-mode .manifest-crew-name {
  font-size: 11px;
}

.manifest-shell.is-tv-mode .manifest-tag {
  font-size: 9px;
  padding: 1px 4px;
}

.manifest-shell.is-tv-mode .manifest-group {
  padding: 2px 4px;
}

.manifest-shell.is-tv-mode .manifest-crew-row {
  padding: 0px 3px;
}

.manifest-header {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 16px;
}

.manifest-brand {
  display: flex;
  align-items: center;
  gap: 14px;
  min-width: 320px;
  min-height: 96px;
}

.manifest-brand-text {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.manifest-logo {
  height: 96px;
  width: auto;
  max-width: 420px;
  object-fit: contain;
  display: block;
}

.manifest-logo--img {
  background: transparent;
  border: none;
  padding: 0;
  filter: drop-shadow(0 6px 14px rgba(0, 0, 0, 0.35));
}

.manifest-logo--placeholder {
  width: 96px;
  height: 96px;
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.08);
  border: 1px solid var(--manifest-border);
  padding: 6px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  color: var(--manifest-muted);
  letter-spacing: 0.06em;
  font-size: 16px;
}

.manifest-title {
  font-size: 26px;
  letter-spacing: 0.04em;
  font-weight: 700;
  text-transform: uppercase;
}

.manifest-subtitle {
  color: var(--manifest-muted);
  font-size: 14px;
}

.manifest-meta {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  justify-content: flex-end;
  position: relative;
  margin-left: auto;
}

.manifest-clock {
  font-family:
    "Rubik",
    system-ui,
    -apple-system,
    sans-serif;
  font-variant-numeric: tabular-nums;
  padding: 10px 14px 9px;
  border-radius: 14px;
  background: var(--manifest-panel-2);
  border: 1px solid var(--manifest-border);
  min-width: 220px;
  text-align: right;
  color: var(--manifest-text);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.manifest-clock-day {
  font-size: 13px;
  font-weight: 500;
  color: var(--manifest-muted);
  letter-spacing: 0.02em;
}

.manifest-clock-time {
  display: inline-flex;
  align-items: baseline;
  justify-content: flex-end;
  line-height: 1;
  gap: 3px;
}

.manifest-clock-hhmm {
  font-size: 43px;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: var(--manifest-text);
}

.manifest-clock-sec {
  font-size: 18px;
  font-weight: 500;
  color: var(--manifest-muted);
  opacity: 0.85;
}

@media (max-width: 1280px) {
  .manifest-brand {
    min-width: 220px;
    min-height: 74px;
    gap: 10px;
  }
  .manifest-logo {
    height: 74px;
    max-width: 290px;
  }
  .manifest-title {
    font-size: 20px;
    letter-spacing: 0.03em;
  }
  .manifest-subtitle {
    font-size: 12px;
  }
  .manifest-clock {
    min-width: 182px;
    padding: 8px 11px 8px;
  }
  .manifest-clock-hhmm {
    font-size: 34px;
  }
  .manifest-clock-sec {
    font-size: 15px;
  }
}

@media (max-width: 980px) {
  .manifest-header {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-rows: auto auto;
    align-items: start;
    gap: 8px 10px;
  }
  .manifest-brand {
    grid-column: 1;
    grid-row: 1;
    min-width: 0;
    min-height: 62px;
    gap: 8px;
  }
  .manifest-logo {
    height: 58px;
    max-width: 180px;
  }
  .manifest-title {
    font-size: 16px;
    line-height: 1.05;
  }
  .manifest-subtitle {
    font-size: 11px;
  }
  .manifest-clock {
    grid-column: 2;
    grid-row: 1;
    justify-self: end;
    align-self: start;
    min-width: 150px;
    padding: 7px 10px 7px;
  }
  .manifest-clock-day {
    font-size: 11px;
  }
  .manifest-clock-hhmm {
    font-size: 30px;
  }
  .manifest-clock-sec {
    font-size: 13px;
  }
  .manifest-meta {
    grid-column: 1 / -1;
    grid-row: 2;
    justify-content: flex-start;
    gap: 8px;
  }
  .manifest-badge {
    font-size: 12px;
    padding: 5px 10px;
  }
  .manifest-tools-toggle {
    min-width: 180px;
    padding: 5px 10px;
  }
}

@media (max-width: 640px) {
  .manifest-shell {
    padding: 10px;
    gap: 10px;
  }
  .manifest-header {
    gap: 7px 8px;
  }
  .manifest-logo {
    height: 48px;
    max-width: 140px;
  }
  .manifest-title {
    font-size: 14px;
  }
  .manifest-subtitle {
    font-size: 10px;
  }
  .manifest-clock {
    min-width: 126px;
    border-radius: 10px;
    padding: 5px 8px 6px;
  }
  .manifest-clock-day {
    font-size: 10px;
  }
  .manifest-clock-hhmm {
    font-size: 24px;
  }
  .manifest-clock-sec {
    font-size: 11px;
  }
  .manifest-meta {
    gap: 6px;
  }
  .manifest-badge {
    font-size: 11px;
    padding: 4px 8px;
  }
  .manifest-tools-toggle {
    min-width: 164px;
  }
}

.manifest-badge {
  background: var(--manifest-panel);
  border: 1px solid var(--manifest-border);
  padding: 6px 12px;
  border-radius: 999px;
  font-size: 13px;
  color: var(--manifest-muted);
}

.manifest-badge strong {
  color: var(--manifest-text);
  font-weight: 600;
}

.manifest-weather {
  background: var(--manifest-panel);
  border: 1px solid var(--manifest-border);
  border-radius: 12px;
  padding: 7px 11px;
  min-width: 300px;
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.manifest-weather-top {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.manifest-weather-title {
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--manifest-muted);
}

.manifest-weather-updated {
  font-size: 11px;
  color: var(--manifest-muted);
}

.manifest-weather-main {
  font-size: 19px;
  font-weight: 700;
  color: var(--manifest-text);
  line-height: 1.1;
  display: flex;
  align-items: center;
  gap: 5px;
  flex-wrap: wrap;
}

.manifest-weather-arrow {
  display: inline-flex;
  justify-content: center;
  width: 20px;
  color: var(--manifest-accent);
  transform-origin: center;
  font-weight: 800;
  line-height: 1;
}

.manifest-weather-dot {
  color: var(--manifest-muted);
}

.manifest-weather-dir {
  color: var(--manifest-text);
}

.manifest-weather-wind,
.manifest-weather-temp {
  font-weight: 800;
}

.manifest-weather-layers {
  font-size: 11px;
  color: var(--manifest-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manifest-weather.is-calm .manifest-weather-main {
  color: #22c55e;
}

.manifest-weather.is-moderate .manifest-weather-main {
  color: #f59e0b;
}

.manifest-weather.is-strong .manifest-weather-main {
  color: #f97316;
}

.manifest-weather.is-alert .manifest-weather-main {
  color: #ef4444;
}

.manifest-main {
  flex: 1;
  min-height: 0;
  display: flex;
  gap: 12px;
  align-items: stretch;
}

.manifest-grid {
  flex: 1;
  display: grid;
  grid-template-columns: repeat(var(--manifest-cols, 3), minmax(0, 1fr));
  grid-template-rows: repeat(var(--manifest-rows, 1), minmax(0, 1fr));
  gap: var(--manifest-gap, 16px);
  align-items: stretch;
  position: relative;
  overflow: hidden;
}

.manifest-grid-shell {
  position: relative;
  flex: 1;
  min-width: 0;
  display: flex;
  overflow: hidden;
  padding: 0;
}

.manifest-sondeo {
  width: 250px;
  min-width: 250px;
  background: var(--manifest-panel);
  border: 1px solid var(--manifest-border);
  border-radius: 12px;
  padding: 10px;
  display: flex;
  flex-direction: column;
  gap: 8px;
  overflow: hidden;
}

.manifest-sondeo-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  font-size: 12px;
  font-weight: 700;
  color: var(--manifest-muted);
}

.manifest-sondeo-updated {
  font-weight: 500;
  opacity: 0.9;
}

.manifest-sondeo-surface {
  font-size: 15px;
  font-weight: 800;
  line-height: 1.15;
  color: var(--manifest-text);
  padding: 6px 8px;
  border-radius: 8px;
  border: 1px solid var(--manifest-border);
  background: var(--manifest-panel-2);
  min-height: 88px;
}

.manifest-sondeo-surface-grid {
  display: grid;
  grid-template-columns: 1fr auto;
  grid-template-rows: auto 1fr;
  gap: 4px 8px;
  align-items: stretch;
  min-height: 74px;
}

.manifest-sondeo-surface-main {
  grid-column: 1;
  grid-row: 1;
  font-size: 19px;
  font-weight: 900;
  letter-spacing: 0.02em;
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.manifest-sondeo-surface-speed {
  font-weight: 900;
  font-size: 22px;
}

.manifest-sondeo-surface-dir {
  color: var(--manifest-text);
  font-weight: 900;
  font-size: 18px;
}

.manifest-sondeo-surface-lower {
  grid-column: 1;
  grid-row: 2;
  display: inline-flex;
  align-items: flex-end;
  gap: 8px;
  align-self: end;
}

.manifest-sondeo-surface-temp {
  grid-column: 2;
  grid-row: 1;
  justify-self: end;
  font-size: 18px;
  font-weight: 900;
}

.manifest-sondeo-surface-arrow {
  font-size: 34px;
  line-height: 1;
  color: var(--manifest-accent);
  transform-origin: center;
}

.manifest-sondeo-surface-label {
  grid-column: 2;
  grid-row: 2;
  justify-self: end;
  align-self: end;
  font-size: 13px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--manifest-muted);
}

.manifest-sondeo-list {
  display: flex;
  flex-direction: column;
  gap: 4px;
  overflow: auto;
  padding-right: 2px;
}

.manifest-sondeo-row {
  display: grid;
  grid-template-columns: 52px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 11px;
  padding: 4px 5px;
  border-radius: 7px;
  border: 1px solid var(--manifest-border);
  background: var(--manifest-panel-2);
}

.manifest-sondeo-alt {
  color: #6b7280;
  font-weight: 700;
}

.manifest-sondeo-alt--key {
  color: #111827;
  font-weight: 900;
}

.manifest-sondeo-wind {
  color: var(--manifest-text);
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manifest-sondeo-speed {
  font-weight: 800;
  font-size: 14px;
  letter-spacing: 0.01em;
  min-width: 42px;
  text-align: right;
}

.manifest-sondeo-dir {
  color: var(--manifest-text);
  font-weight: 700;
}

.manifest-sondeo-arrow {
  display: inline-flex;
  width: 20px;
  justify-content: center;
  color: var(--manifest-accent);
  transform-origin: center;
  font-weight: 800;
  font-size: 18px;
  line-height: 1;
}

.manifest-sondeo-temp {
  color: var(--manifest-muted);
  font-weight: 700;
}

.manifest-sondeo-empty {
  color: var(--manifest-muted);
  font-size: 12px;
  padding: 6px;
}

.manifest-sondeo-surface.is-calm {
  color: #22c55e;
}

.manifest-sondeo-surface.is-moderate {
  color: #f59e0b;
}

.manifest-sondeo-surface.is-strong {
  color: #f97316;
}

.manifest-sondeo-surface.is-alert {
  color: #ef4444;
}

.manifest-pager {
  display: none !important;
}

.manifest-pager-label {
  font-weight: 600;
  color: var(--manifest-text);
  letter-spacing: 0.04em;
}

.manifest-pager-dots {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.manifest-pager-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
  border: 1px solid var(--manifest-border);
  background: transparent;
  opacity: 0.6;
}

.manifest-pager-dot.is-active {
  background: var(--manifest-accent);
  border-color: transparent;
  opacity: 1;
}

.manifest-nav {
  display: none !important;
}

.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-height: 0;
}

.manifest-card-header {
  padding: 8px 12px;
  background: var(--manifest-panel-2);
  display: grid;
  grid-template-columns: minmax(90px, 1fr) minmax(90px, 1fr) minmax(90px, 1fr);
  align-items: center;
  gap: 8px;
  border-bottom: 1px solid var(--manifest-border);
  min-height: 60px;
}

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

.manifest-card-status-text {
  font-size: clamp(11px, 1.2vw, 14px);
  font-weight: 800;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--manifest-secondary);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  max-width: 100%;
}

.manifest-card-status-text.is-open {
  color: #166534;
}

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

.manifest-card-status-text.is-auto {
  color: #1d4ed8;
}

.manifest-card-status-text.is-refueling {
  color: #b45309;
}

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

.manifest-card-status-text.is-closed,
.manifest-card-status-text.is-flight {
  color: #4c1d95;
}

.manifest-card-status-text.is-standby {
  color: #374151;
}

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

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

.manifest-card-countdown {
  font-size: clamp(34px, 3vw, 50px);
  font-weight: 700;
  color: var(--manifest-success);
  letter-spacing: 0.01em;
  line-height: 0.95;
  text-align: center;
  justify-self: center;
}

.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: 110px;
}

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

.manifest-aircraft-avatar {
  width: 42px;
  height: 42px;
  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 42px;
}

.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: 105px;
  text-overflow: ellipsis;
  overflow: hidden;
}

@media (max-width: 980px) {
  .manifest-card-header {
    grid-template-columns: minmax(90px, 1fr) auto minmax(64px, 1fr);
    min-height: 96px;
  }
  .manifest-card-countdown {
    font-size: clamp(30px, 6vw, 42px);
  }
  .manifest-card-status-text {
    font-size: 12px;
  }
  .manifest-card-slots-badge {
    font-size: 21px;
    min-width: 0;
  }
}

.manifest-card-body {
  padding: 6px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  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: 3px;
  overflow-y: auto;
  overflow-x: hidden;
  height: 100%;
}

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

.manifest-group.is-tandem {
  background: rgba(255, 209, 102, 0.12);
  border-color: rgba(255, 209, 102, 0.3);
}

.manifest-group.is-aff {
  background: rgba(138, 201, 255, 0.12);
  border-color: rgba(138, 201, 255, 0.3);
}

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

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

.manifest-group-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.manifest-group-avatar {
  width: 26px;
  height: 26px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--manifest-border);
  flex: 0 0 26px;
}

.manifest-group-title {
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.manifest-group-tags {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

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

.manifest-crew-row {
  display: flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: 4px;
  padding: 1px 4px;
  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--camera {
  background: #0f131a;
  color: #ffffff;
  border-color: #0f131a;
}

.manifest-role--aff {
  background: var(--manifest-aff);
  color: #102033;
}

.manifest-crew-name {
  font-weight: 600;
  font-size: 12px;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  flex: 1 1 auto;
  min-width: 0;
}

.manifest-crew-avatar {
  width: 22px;
  height: 22px;
  border-radius: 50%;
  object-fit: cover;
  border: 1px solid var(--manifest-border);
  flex: 0 0 22px;
}

.manifest-crew-name.is-unassigned {
  color: var(--manifest-muted);
  font-weight: 500;
}

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

.manifest-compliance--header {
  margin-left: auto;
}

.manifest-compliance-icon {
  width: 20px;
  height: 20px;
  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: 11px;
}

.manifest-compliance-icon svg {
  width: 12px;
  height: 12px;
  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: 11px;
  height: 11px;
  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 160px;
  font-size: 11px;
  color: var(--manifest-muted);
  max-width: 100%;
  text-align: right;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  word-break: normal;
  line-height: 1;
  display: inline-flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 6px;
  position: relative;
}

.manifest-crew-right {
  margin-left: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
}

.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);
}

body.manifest-display.theme-light .manifest-equipment-icon {
  filter: none;
}

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

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

.manifest-ban-overlay {
  color: var(--manifest-danger);
  font-size: 12px;
}

.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: 2px 6px;
  border-radius: 8px;
  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: 11px;
  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: 30%;
  font-weight: 800;
  letter-spacing: 0.02em;
}

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

.manifest-group-compact-rig {
  margin-left: auto;
  max-width: 100%;
  font-size: 11px;
  color: var(--manifest-muted);
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.1;
  display: inline-flex;
  align-items: center;
  justify-content: flex-end;
  gap: 6px;
}

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

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

.manifest-row.is-tandem {
  background: rgba(255, 209, 102, 0.16);
  border-color: rgba(255, 209, 102, 0.3);
}

.manifest-row.is-aff {
  background: rgba(138, 201, 255, 0.16);
  border-color: rgba(138, 201, 255, 0.3);
}

.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);
}

.manifest-empty {
  flex: 1;
  background: transparent;
  border: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 18px;
}

.manifest-empty-box {
  width: min(720px, 100%);
  background: var(--manifest-panel);
  border: 1px dashed var(--manifest-border);
  border-radius: 18px;
  padding: 28px 32px;
  text-align: center;
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.08);
}

.manifest-empty-title {
  color: var(--manifest-text);
  font-size: 30px;
  font-weight: 700;
  letter-spacing: 0.01em;
  line-height: 1.1;
}

.manifest-empty-text {
  margin-top: 10px;
  color: var(--manifest-muted);
  font-size: 18px;
  line-height: 1.5;
}

.manifest-tools {
  position: relative;
}

.manifest-tools-toggle {
  border: 1px solid var(--manifest-border);
  background: var(--manifest-panel);
  border-radius: 999px;
  padding: 6px 12px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  color: inherit;
  cursor: pointer;
  min-width: 220px;
}

.manifest-tools-icon {
  grid-area: icon;
  font-size: 15px;
  color: var(--manifest-muted);
  line-height: 1;
}

.manifest-tools-title {
  grid-area: title;
  color: var(--manifest-text);
  font-weight: 600;
  font-size: 13px;
}

.manifest-tools-hint {
  color: var(--manifest-muted);
  font-size: 12px;
  font-weight: 600;
  letter-spacing: 0.01em;
}

.manifest-tools-panel {
  position: absolute;
  top: calc(100% + 8px);
  right: 0;
  min-width: 620px;
  max-width: 72vw;
  border: 1px solid var(--manifest-border);
  background: var(--manifest-panel);
  border-radius: 12px;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.22);
  padding: 10px;
  display: none;
  z-index: 40;
}

.manifest-tools.is-open .manifest-tools-panel {
  display: block;
}

.manifest-controls-warning {
  margin-top: 8px;
  padding: 7px 10px;
  border-radius: 8px;
  border: 1px solid rgba(239, 68, 68, 0.45);
  background: rgba(239, 68, 68, 0.1);
  color: #ef4444;
  font-size: 12px;
  font-weight: 600;
}

.manifest-controls-warning.is-hidden {
  display: none;
}

.manifest-controls {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
}

.manifest-control {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  background: var(--manifest-panel);
  border: 1px solid var(--manifest-border);
  border-radius: 999px;
  padding: 6px 10px;
  color: var(--manifest-text);
  font-size: 12px;
}

.manifest-control--check {
  padding: 6px 10px;
}

.manifest-check-option {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0;
  color: var(--manifest-text);
  font-size: 12px;
  font-weight: 600;
}

.manifest-check-option input[type="checkbox"] {
  accent-color: var(--manifest-accent);
}

.is-hidden-by-toggle {
  display: none !important;
}

.manifest-control-label {
  color: var(--manifest-muted);
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
  font-size: 10px;
}

.manifest-control-value {
  min-width: 36px;
  text-align: center;
  font-weight: 700;
}

.manifest-control-btn {
  border: 1px solid var(--manifest-border);
  background: var(--manifest-panel-2);
  color: var(--manifest-text);
  border-radius: 999px;
  padding: 4px 8px;
  font-size: 12px;
  cursor: pointer;
  transition:
    transform 0.15s ease,
    box-shadow 0.15s ease,
    border-color 0.15s ease;
}

.manifest-control-btn:hover {
  border-color: var(--manifest-accent);
  box-shadow: 0 0 0 2px rgba(85, 198, 255, 0.2);
}

.manifest-control-btn:active {
  transform: scale(0.96);
}

.manifest-control-select {
  border: 1px solid var(--manifest-border);
  background: var(--manifest-panel-2);
  color: var(--manifest-text);
  border-radius: 999px;
  padding: 4px 10px;
  font-size: 12px;
  outline: none;
}

.manifest-theme-btn.is-active {
  background: var(--manifest-accent);
  color: #0f131a;
  border-color: transparent;
}

@media (max-width: 980px) {
  .manifest-tools-panel {
    right: auto;
    left: 0;
    min-width: 320px;
    max-width: 95vw;
  }
}

@media (max-width: 1200px) {
  .manifest-shell {
    padding: 16px;
    padding-bottom: 64px;
  }

  .manifest-grid {
    grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
  }
}

.manifest-powered-footer {
  display: flex;
  justify-content: center;
  padding: 6px 0 4px;
}

.manifest-powered-link {
  pointer-events: auto;
  display: inline-flex;
  align-items: center;
  gap: 8px;
  padding: 5px 12px;
  border-radius: 999px;
  border: 1px solid var(--manifest-border);
  background: rgba(255, 255, 255, 0.85);
  color: #111827;
  font-size: 12px;
  font-weight: 600;
  text-decoration: none;
  text-transform: lowercase;
}

body.manifest-display.theme-dark .manifest-powered-link {
  background: rgba(15, 19, 26, 0.85);
  color: var(--manifest-text);
}

.manifest-powered-link:hover {
  text-decoration: none;
  color: inherit;
}

.manifest-powered-logo {
  width: 16px;
  height: 16px;
  object-fit: contain;
}
