/* ===== BUTTONS & INPUTS ===== */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 0 12px;
  border-radius: var(--radius-sm);
  border: 1px solid transparent;
  font-size: 12.5px;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background 0.14s, border-color 0.14s, color 0.14s, transform 0.08s;
}

.btn:active {
  transform: translateY(1px);
}

.btn--sm {
  min-height: 34px;
  padding: 0 10px;
  font-size: 12px;
}

.btn--icon {
  min-width: 36px;
  padding: 0 8px;
}

.btn--primary {
  background: rgba(56, 189, 248, 0.18);
  border-color: var(--cyan-border);
  color: #e0f2fe;
}
.btn--primary:hover {
  background: rgba(56, 189, 248, 0.28);
}

.btn--accent {
  background: var(--go-dim);
  border-color: var(--go-border);
  color: var(--go-bright);
}
.btn--accent:hover {
  background: rgba(16, 185, 129, 0.25);
}

.btn--subtle {
  background: var(--bg-surface);
  border-color: var(--border-default);
  color: var(--text-primary);
}
.btn--subtle:hover {
  background: var(--bg-surface-hover);
}

.btn--ghost {
  background: transparent;
  border-color: var(--border-subtle);
  color: var(--text-secondary);
}
.btn--ghost:hover {
  background: var(--bg-surface);
  color: var(--text-primary);
}

.btn--danger-ghost {
  background: transparent;
  border-color: var(--nogo-border);
  color: var(--nogo-bright);
}
.btn--danger-ghost:hover {
  background: var(--nogo-dim);
}

.btn-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.input,
.input-select {
  width: 100%;
  min-height: 38px;
  padding: 6px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-input);
  color: var(--text-primary);
  font-size: 13px;
  transition: border-color 0.15s, box-shadow 0.15s;
}

.input:focus,
.input-select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.22);
}

.input--mono {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
}

.textarea {
  min-height: 62px;
  resize: vertical;
  line-height: 1.4;
}

.input-with-action {
  display: flex;
  gap: 6px;
}

/* Segmented Control */
.segmented {
  display: inline-flex;
  background: var(--bg-input);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  padding: 2px;
  gap: 2px;
}

.segmented__btn {
  min-height: 30px;
  padding: 0 10px;
  border: none;
  border-radius: 4px;
  background: transparent;
  color: var(--text-secondary);
  font-size: 12px;
  font-weight: 600;
}

.segmented__btn.is-active {
  background: var(--bg-surface-hover);
  color: var(--cyan);
}

/* ===== SYNC PILL ===== */
.sync-pill {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-height: 36px;
  padding: 4px 10px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-input);
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.sync-pill:hover {
  border-color: var(--cyan-border);
  background: var(--bg-surface);
}

.sync-dot {
  width: 9px;
  height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
}
.sync-dot--local { background: var(--text-muted); }
.sync-dot--synced { background: var(--go); box-shadow: 0 0 8px var(--go); }
.sync-dot--dirty { background: var(--caution); box-shadow: 0 0 8px var(--caution); }
.sync-dot--syncing { background: var(--cyan); animation: pulse 1s infinite; }
.sync-dot--error { background: var(--nogo); box-shadow: 0 0 8px var(--nogo); }

@keyframes pulse {
  0%, 100% { opacity: 1; transform: scale(1); }
  50% { opacity: 0.45; transform: scale(0.85); }
}

.sync-pill__text {
  display: flex;
  flex-direction: column;
  line-height: 1.15;
}

.sync-state {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-primary);
}

.sync-time {
  font-size: 10.5px;
  color: var(--text-secondary);
}

/* ===== BADGES & STATUS PILLS ===== */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  letter-spacing: 0.05em;
  border: 1px solid transparent;
}

.badge--cyan {
  background: var(--cyan-dim);
  border-color: var(--cyan-border);
  color: var(--cyan);
}

.badge--go {
  background: var(--go-dim);
  border-color: var(--go-border);
  color: var(--go-bright);
}

.badge--caution {
  background: var(--caution-dim);
  border-color: var(--caution-border);
  color: var(--caution-bright);
}

.badge--nogo {
  background: var(--nogo-dim);
  border-color: var(--nogo-border);
  color: var(--nogo-bright);
}

.badge--neutral {
  background: rgba(148, 163, 184, 0.12);
  border-color: var(--border-default);
  color: var(--text-secondary);
}

/* ===== SUB-SECTIONS / CARDS ===== */
.section-card {
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-md);
  padding: 12px;
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.section-card__title {
  margin: 0;
  font-size: 11px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--text-secondary);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

/* Home Base Switcher */
.base-switcher {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 8px;
}

.base-card {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 10px;
  min-height: 62px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-input);
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.base-card:hover {
  border-color: var(--cyan-border);
}

.base-card.is-active {
  background: var(--cyan-dim);
  border-color: var(--cyan);
}

.base-card__code {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.base-card__tag {
  font-size: 9.5px;
  font-weight: 700;
  padding: 1px 5px;
  border-radius: 3px;
  background: rgba(56, 189, 248, 0.2);
  color: var(--cyan);
}

.base-card__name {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Preset Template Chips */
.preset-group-label {
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-muted);
  text-transform: uppercase;
  margin-top: 2px;
}

.preset-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px;
}

.preset-btn {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 2px;
  padding: 9px 10px;
  min-height: 54px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-surface);
  text-align: left;
  transition: border-color 0.15s, background 0.15s;
}

.preset-btn:hover {
  border-color: var(--cyan-border);
  background: var(--bg-surface-hover);
}

.preset-btn--wide {
  grid-column: 1 / -1;
  border-color: rgba(56, 189, 248, 0.3);
  background: linear-gradient(135deg, rgba(19, 29, 51, 0.95), rgba(14, 34, 56, 0.95));
}

.preset-btn__route {
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.preset-btn__meta {
  font-size: 11px;
  color: var(--text-secondary);
}

/* Form grids */
.form-grid {
  display: grid;
  gap: 10px;
}

.form-grid--2 {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.form-grid--3 {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

.field {
  display: flex;
  flex-direction: column;
  gap: 4px;
  min-width: 0;
}

.field--full {
  grid-column: 1 / -1;
}

.field__label {
  font-size: 11px;
  font-weight: 600;
  color: var(--text-secondary);
}

.cabin-inputs {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
  padding: 10px;
  margin: 12px 0;
  border-radius: var(--radius-sm);
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle);
}

/* ===== GO / NO-GO DECISION SUMMARY BANNER ===== */
.decision-banner {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 14px;
  padding: 14px 16px;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-panel-alt);
}

.decision-banner--go {
  background: linear-gradient(135deg, rgba(16, 185, 129, 0.14), rgba(11, 18, 32, 0.95));
  border-color: var(--go-border);
}

.decision-banner--caution {
  background: linear-gradient(135deg, rgba(245, 158, 11, 0.14), rgba(11, 18, 32, 0.95));
  border-color: var(--caution-border);
}

.decision-banner--nogo {
  background: linear-gradient(135deg, rgba(239, 68, 68, 0.16), rgba(11, 18, 32, 0.95));
  border-color: var(--nogo-border);
}

.decision-lamp {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-width: 86px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  font-family: var(--font-mono);
  font-weight: 800;
  letter-spacing: 0.08em;
  text-align: center;
}

.decision-lamp--go {
  background: var(--go-dim);
  border: 1px solid var(--go);
  color: var(--go-bright);
}
.decision-lamp--caution {
  background: var(--caution-dim);
  border: 1px solid var(--caution);
  color: var(--caution-bright);
}
.decision-lamp--nogo {
  background: var(--nogo-dim);
  border: 1px solid var(--nogo);
  color: var(--nogo-bright);
}

.decision-lamp__verdict {
  font-size: 16px;
  line-height: 1.1;
}

.decision-lamp__score {
  font-size: 11px;
  opacity: 0.9;
  margin-top: 2px;
}

.decision-summary__title {
  margin: 0;
  font-size: 14px;
  font-weight: 700;
  color: var(--text-primary);
}

.decision-summary__meta {
  margin: 4px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.decision-kpis {
  display: flex;
  gap: 10px;
}

.kpi-box {
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  border-radius: var(--radius-sm);
  padding: 7px 10px;
  min-width: 72px;
  text-align: center;
}

.kpi-box__val {
  display: block;
  font-family: var(--font-mono);
  font-size: 15px;
  font-weight: 800;
  color: var(--text-primary);
}

.kpi-box__lbl {
  font-size: 10px;
  color: var(--text-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
}

/* Filter bar inside Board */
.board-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
}

.chip-row {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.filter-chip {
  min-height: 32px;
  padding: 0 10px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-default);
  background: var(--bg-input);
  color: var(--text-secondary);
  font-size: 11.5px;
  font-weight: 600;
}

.filter-chip.is-active {
  background: var(--cyan-dim);
  border-color: var(--cyan-border);
  color: var(--cyan);
}

/* ===== INTERACTIVE ROUTE TREE ===== */
.route-tree {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.tree-origin-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 9px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  font-family: var(--font-mono);
  font-size: 12px;
}

.tree-branch {
  position: relative;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-default);
  background: var(--bg-panel-alt);
  overflow: hidden;
  transition: border-color 0.15s;
}

.tree-branch--primary {
  border-color: var(--cyan-border);
  box-shadow: inset 3px 0 0 var(--cyan);
}

.tree-branch__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  flex-wrap: wrap;
  padding: 10px 12px;
  background: rgba(19, 29, 51, 0.72);
  border-bottom: 1px solid var(--border-subtle);
}

.tree-branch__left {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.tree-branch__name {
  font-size: 13.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.tree-branch__path {
  font-family: var(--font-mono);
  font-size: 11.5px;
  color: var(--cyan);
}

.tree-branch__right {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.tree-legs {
  padding: 10px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.leg-connector {
  display: flex;
  align-items: center;
  gap: 8px;
  padding-left: 16px;
  font-family: var(--font-mono);
  font-size: 11px;
  color: var(--text-secondary);
}

.leg-connector__line {
  width: 2px;
  height: 18px;
  background: var(--cyan-border);
}

.leg-connector--tight {
  color: var(--caution-bright);
}

.leg-connector--illegal {
  color: var(--nogo-bright);
}

/* Individual Flight Leg Card */
.leg-card {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 14px;
  padding: 11px 12px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
}

.leg-card--go { border-left: 3px solid var(--go); }
.leg-card--caution { border-left: 3px solid var(--caution); }
.leg-card--nogo { border-left: 3px solid var(--nogo); }

.leg-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.leg-flight-id {
  font-family: var(--font-mono);
  font-size: 13.5px;
  font-weight: 800;
  color: var(--text-primary);
}

.leg-route-pair {
  font-family: var(--font-mono);
  font-size: 13px;
  font-weight: 700;
  color: var(--cyan);
}

.leg-times {
  font-family: var(--font-mono);
  font-size: 12px;
  color: var(--text-secondary);
}

.leg-meta-row {
  display: flex;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
  margin-top: 5px;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.leg-note {
  margin-top: 6px;
  font-size: 12px;
  color: #cbd5e1;
  background: rgba(19, 29, 51, 0.65);
  border-left: 2px solid var(--border-default);
  padding: 5px 8px;
  border-radius: 0 4px 4px 0;
}

.leg-controls {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-content: space-between;
  gap: 8px;
}

/* Quick Seat/Standby Steppers (gate-friendly) */
.load-steppers {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.stepper {
  display: inline-flex;
  align-items: center;
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-sm);
  overflow: hidden;
}

.stepper__label {
  padding: 0 6px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.stepper__btn {
  min-width: 30px;
  min-height: 32px;
  border: none;
  background: transparent;
  color: var(--text-primary);
  font-weight: 700;
  font-size: 14px;
}

.stepper__btn:hover {
  background: var(--bg-surface-hover);
  color: var(--cyan);
}

.stepper__val {
  min-width: 24px;
  text-align: center;
  font-family: var(--font-mono);
  font-size: 12.5px;
  font-weight: 800;
}

.cabin-pills {
  display: flex;
  gap: 4px;
  font-family: var(--font-mono);
  font-size: 11px;
}

.cabin-pill {
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.cabin-pill strong {
  color: var(--text-primary);
}

/* ===== RESPONSIVE FLIGHT LOAD TABLE ===== */
.table-wrap {
  width: 100%;
  overflow-x: auto;
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-input);
}

.load-table {
  width: 100%;
  border-collapse: collapse;
  font-size: 12.5px;
}

.load-table th {
  text-align: left;
  padding: 9px 10px;
  background: var(--bg-surface);
  border-bottom: 1px solid var(--border-default);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  letter-spacing: 0.06em;
  color: var(--text-secondary);
  white-space: nowrap;
}

.load-table td {
  padding: 9px 10px;
  border-bottom: 1px solid var(--border-subtle);
  vertical-align: middle;
}

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

.load-table tbody tr:hover {
  background: rgba(56, 189, 248, 0.05);
}

/* Mobile-friendly stacked table cards on narrow viewports */
@media (max-width: 720px) {
  .load-table thead {
    display: none;
  }

  .load-table,
  .load-table tbody,
  .load-table tr,
  .load-table td {
    display: block;
    width: 100%;
  }

  .load-table tr {
    border-bottom: 2px solid var(--border-default);
    padding: 8px 10px;
  }

  .load-table td {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 12px;
    padding: 6px 2px;
    border-bottom: 1px dashed var(--border-subtle);
    text-align: right;
  }

  .load-table td:last-child {
    border-bottom: none;
    justify-content: flex-end;
    padding-top: 8px;
  }

  .load-table td::before {
    content: attr(data-label);
    font-family: var(--font-mono);
    font-size: 10.5px;
    font-weight: 700;
    text-transform: uppercase;
    color: var(--text-muted);
    text-align: left;
  }
}

/* ===== AIRPORT & WEATHER RISK PANEL ===== */
.airport-card {
  border-radius: var(--radius-md);
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel-alt);
  padding: 11px 12px;
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.airport-card--LOW { border-left: 3px solid var(--go); }
.airport-card--MOD { border-left: 3px solid var(--caution); }
.airport-card--HIGH { border-left: 3px solid var(--nogo); }

.airport-card__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.airport-code {
  font-family: var(--font-mono);
  font-size: 16px;
  font-weight: 800;
  color: var(--text-primary);
  display: flex;
  align-items: center;
  gap: 6px;
}

.airport-role {
  font-size: 9.5px;
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  color: var(--cyan);
  border: 1px solid var(--cyan-border);
}

.airport-name {
  font-size: 11.5px;
  color: var(--text-secondary);
}

.risk-toggle {
  display: inline-flex;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-input);
  overflow: hidden;
}

.risk-toggle__btn {
  min-width: 44px;
  min-height: 30px;
  border: none;
  background: transparent;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--text-muted);
}

.risk-toggle__btn.is-active[data-risk="LOW"] {
  background: var(--go-dim);
  color: var(--go-bright);
}
.risk-toggle__btn.is-active[data-risk="MOD"] {
  background: var(--caution-dim);
  color: var(--caution-bright);
}
.risk-toggle__btn.is-active[data-risk="HIGH"] {
  background: var(--nogo-dim);
  color: var(--nogo-bright);
}

.metar-box {
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  padding: 7px 8px;
  border-radius: var(--radius-xs);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: #bae6fd;
  word-break: break-word;
}

.airport-intel {
  font-size: 11.5px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.airport-intel strong {
  color: var(--text-primary);
}

.airport-note-input {
  min-height: 44px;
  font-size: 12px;
}

/* ===== MODALS ===== */
.modal {
  padding: 0;
  border: none;
  background: transparent;
  max-width: min(640px, calc(100vw - 20px));
  width: 100%;
  color: var(--text-primary);
}

.modal::backdrop {
  background: rgba(3, 7, 15, 0.78);
  backdrop-filter: blur(5px);
}

.modal__card {
  background: var(--bg-panel);
  border: 1px solid var(--border-default);
  border-radius: var(--radius-lg);
  box-shadow: var(--shadow-modal);
  overflow: hidden;
  display: flex;
  flex-direction: column;
  max-height: calc(100dvh - 32px);
}

.modal__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  background: var(--bg-panel-alt);
  border-bottom: 1px solid var(--border-subtle);
}

.modal__title {
  margin: 0;
  font-size: 15px;
  font-weight: 800;
}

.modal__subtitle {
  margin: 3px 0 0;
  font-size: 12px;
  color: var(--text-secondary);
}

.modal__body {
  padding: 16px;
  overflow-y: auto;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.modal__footer {
  padding: 12px 16px;
  background: var(--bg-panel-alt);
  border-top: 1px solid var(--border-subtle);
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.modal__footer--spread {
  justify-content: space-between;
}

.info-banner {
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--cyan-dim);
  border: 1px solid var(--cyan-border);
  font-size: 12px;
  line-height: 1.45;
  color: #e0f2fe;
}

.toggle-row {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  cursor: pointer;
}

.toggle-row input[type="checkbox"] {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  accent-color: var(--cyan);
}

.sync-diagnostic {
  font-family: var(--font-mono);
  font-size: 11.5px;
  padding: 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  color: var(--text-secondary);
}

.trip-list {
  display: flex;
  flex-direction: column;
  gap: 8px;
}

.trip-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 10px 12px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
}

.trip-row.is-current {
  border-color: var(--cyan-border);
  background: var(--cyan-dim);
}

.divider {
  height: 1px;
  background: var(--border-subtle);
}

.backup-bar {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.file-btn {
  cursor: pointer;
}

/* ===== TOASTS ===== */
.toast-region {
  position: fixed;
  bottom: 16px;
  right: 16px;
  z-index: 100;
  display: flex;
  flex-direction: column;
  gap: 8px;
  max-width: min(360px, calc(100vw - 24px));
}

.toast {
  padding: 10px 14px;
  border-radius: var(--radius-sm);
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
  box-shadow: var(--shadow-panel);
  font-size: 12.5px;
  font-weight: 600;
  color: var(--text-primary);
  animation: toastIn 0.18s ease-out;
}

.toast--go { border-color: var(--go-border); color: var(--go-bright); }
.toast--caution { border-color: var(--caution-border); color: var(--caution-bright); }
.toast--nogo { border-color: var(--nogo-border); color: var(--nogo-bright); }

@keyframes toastIn {
  from { opacity: 0; transform: translateY(8px); }
  to { opacity: 1; transform: translateY(0); }
}

.empty-state {
  text-align: center;
  padding: 28px 16px;
  border: 1px dashed var(--border-default);
  border-radius: var(--radius-md);
  color: var(--text-secondary);
}

/* Mobile Touch Target Guarantees */
@media (max-width: 859px) {
  .btn,
  .input,
  .input-select,
  .sync-pill,
  .filter-chip,
  .stepper__btn,
  .risk-toggle__btn {
    min-height: var(--touch-min);
  }

  .stepper__btn {
    min-width: 38px;
  }

  .decision-banner {
    grid-template-columns: 1fr;
    gap: 10px;
  }

  .decision-kpis {
    display: grid;
    grid-template-columns: repeat(3, 1fr);
  }

  .leg-card {
    grid-template-columns: 1fr;
  }

  .leg-controls {
    align-items: stretch;
  }

  .load-steppers {
    justify-content: space-between;
  }

  .cabin-inputs {
    grid-template-columns: repeat(2, 1fr);
  }

  .form-grid--2,
  .form-grid--3 {
    grid-template-columns: 1fr;
  }

  .toast-region {
    left: 12px;
    right: 12px;
    bottom: 12px;
    max-width: none;
  }
}

/* ===== PLAN A-D SLOT BAR & BOTTLENECK STRIP ===== */
.bottleneck-strip {
  margin-top: 8px;
  padding: 6px 9px;
  border-radius: var(--radius-xs);
  background: rgba(8, 13, 24, 0.72);
  border: 1px solid var(--border-subtle);
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  font-size: 11.5px;
}

.bottleneck-strip__label {
  font-family: var(--font-mono);
  font-size: 10px;
  font-weight: 800;
  letter-spacing: 0.06em;
  color: var(--caution-bright);
}

.plan-slot-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
  padding: 9px 11px;
  border-radius: var(--radius-sm);
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle);
}

.plan-slot-bar__left,
.plan-slot-bar__actions {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}

.plan-pill {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  padding: 3px 8px;
  border-radius: var(--radius-pill);
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  border: 1px solid var(--border-subtle);
}

.plan-pill small {
  font-family: var(--font-sans);
  font-weight: 500;
  opacity: 0.85;
}

.plan-pill--active {
  background: var(--cyan-dim);
  border-color: var(--cyan-border);
  color: var(--text-primary);
}

.plan-pill--empty {
  background: var(--bg-input);
  color: var(--text-muted);
  border-style: dashed;
}

.plan-tag {
  display: inline-flex;
  align-items: center;
  padding: 2px 7px;
  border-radius: 4px;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.06em;
}

.plan-tag--A { background: rgba(56, 189, 248, 0.22); color: #7dd3fc; border: 1px solid var(--cyan-border); }
.plan-tag--B { background: rgba(167, 139, 250, 0.2); color: #c4b5fd; border: 1px solid rgba(167, 139, 250, 0.45); }
.plan-tag--C { background: rgba(245, 158, 11, 0.18); color: #fcd34d; border: 1px solid var(--caution-border); }
.plan-tag--D { background: rgba(148, 163, 184, 0.18); color: #cbd5e1; border: 1px solid var(--border-default); }

/* ===== VISUAL MULTI-LEG ROUTE STRIP & CONNECTORS ===== */
.route-strip {
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
  padding: 8px 12px;
  background: rgba(6, 10, 18, 0.65);
  border-bottom: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 12px;
}

.route-node {
  padding: 2px 8px;
  border-radius: 4px;
  font-weight: 800;
  letter-spacing: 0.04em;
  background: var(--bg-surface);
  border: 1px solid var(--border-default);
}

.route-node--origin { color: var(--cyan); border-color: var(--cyan-border); }
.route-node--hub { color: #e2e8f0; }
.route-node--dest { color: var(--go-bright); border-color: var(--go-border); }

.route-hop {
  color: var(--text-muted);
  font-size: 11px;
}

.route-layover {
  padding: 1px 6px;
  border-radius: var(--radius-pill);
  font-size: 10.5px;
  font-weight: 700;
  background: rgba(56, 189, 248, 0.12);
  color: var(--cyan);
  border: 1px solid var(--cyan-border);
}

.route-layover--warn {
  background: var(--caution-dim);
  color: var(--caution-bright);
  border-color: var(--caution-border);
}

.route-layover--critical {
  background: var(--nogo-dim);
  color: var(--nogo-bright);
  border-color: var(--nogo-border);
}

.conn-card {
  display: flex;
  align-items: stretch;
  gap: 10px;
  margin-left: 12px;
  padding: 7px 10px;
  border-radius: var(--radius-sm);
  background: rgba(15, 23, 42, 0.8);
  border: 1px dashed var(--border-default);
  font-size: 11.5px;
}

.conn-card--warn {
  border-color: var(--caution-border);
  background: rgba(245, 158, 11, 0.08);
}

.conn-card--critical {
  border-color: var(--nogo-border);
  background: rgba(239, 68, 68, 0.1);
}

.conn-card__spine {
  width: 3px;
  border-radius: 2px;
  background: var(--cyan);
  flex-shrink: 0;
}

.conn-card--warn .conn-card__spine { background: var(--caution); }
.conn-card--critical .conn-card__spine { background: var(--nogo); }

.conn-card__content {
  display: flex;
  flex-direction: column;
  gap: 4px;
  flex: 1;
}

.conn-card__top {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.conn-inline-edit {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  margin-left: auto;
  font-size: 11px;
}

.conn-card__transfer {
  color: #cbd5e1;
  font-size: 11.5px;
}

/* ===== FAST INLINE STANDBY & ZED LOAD CALCULATOR ===== */
.leg-card--calc {
  display: flex;
  flex-direction: column;
  gap: 10px;
}

.leg-card--bottleneck {
  box-shadow: 0 0 0 1px rgba(245, 158, 11, 0.45);
}

.leg-calc__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.ratio-pill {
  padding: 2px 7px;
  border-radius: var(--radius-pill);
  background: var(--bg-surface);
  border: 1px solid var(--border-subtle);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
  color: var(--text-primary);
}

.lfo-toggle {
  min-height: 32px;
  padding: 0 9px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-default);
  background: var(--bg-panel);
  color: var(--text-secondary);
  font-family: var(--font-mono);
  font-size: 11px;
  font-weight: 700;
}

.lfo-toggle.is-active {
  background: var(--nogo-dim);
  border-color: var(--nogo-border);
  color: var(--nogo-bright);
}

.inline-calc-grid {
  display: grid;
  grid-template-columns: minmax(88px, 1fr) minmax(84px, 1fr) repeat(4, minmax(60px, 74px)) minmax(150px, 1.5fr);
  gap: 7px;
  align-items: end;
}

.calc-field {
  display: flex;
  flex-direction: column;
  gap: 3px;
  min-width: 0;
}

.calc-field__lbl {
  font-family: var(--font-mono);
  font-size: 9.5px;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  color: var(--text-muted);
}

.inline-input,
.inline-num,
.inline-select {
  width: 100%;
  min-height: 34px;
  padding: 4px 7px;
  border-radius: var(--radius-xs);
  border: 1px solid var(--border-default);
  background: var(--bg-panel);
  color: var(--text-primary);
  font-size: 12px;
}

.inline-num {
  font-family: var(--font-mono);
  font-variant-numeric: tabular-nums;
  font-weight: 700;
  text-align: center;
}

.inline-num--main { border-color: rgba(16, 185, 129, 0.35); }
.inline-num--sb { border-color: rgba(245, 158, 11, 0.38); }
.inline-num--xs { width: 64px; min-height: 28px; padding: 2px 5px; }

.inline-input:focus,
.inline-num:focus,
.inline-select:focus {
  outline: none;
  border-color: var(--cyan);
  box-shadow: 0 0 0 2px rgba(56, 189, 248, 0.2);
}

.leg-calc__footer {
  display: flex;
  flex-direction: column;
  gap: 4px;
}

.leg-terminal-tag {
  font-size: 11.5px;
  color: #bae6fd;
}

.leg-reasons {
  font-size: 11.5px;
  color: var(--text-secondary);
}

/* ===== ZED CARRIER & CHECKLIST SLIDE-OUT DRAWER ===== */
.drawer-backdrop {
  position: fixed;
  inset: 0;
  z-index: 60;
  background: rgba(3, 7, 15, 0.68);
  backdrop-filter: blur(4px);
}

.drawer {
  position: fixed;
  top: 0;
  right: 0;
  bottom: 0;
  z-index: 70;
  width: min(460px, 100vw);
  background: var(--bg-panel);
  border-left: 1px solid var(--border-default);
  box-shadow: var(--shadow-modal);
  display: flex;
  flex-direction: column;
  transform: translateX(100%);
  transition: transform 0.22s ease-out;
  pointer-events: none;
}

.drawer.is-open {
  transform: translateX(0);
  pointer-events: auto;
}

.drawer__header {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 10px;
  padding: 14px 16px;
  background: var(--bg-panel-alt);
  border-bottom: 1px solid var(--border-subtle);
}

.drawer__title {
  margin: 0;
  font-size: 13.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.drawer__subtitle {
  margin: 3px 0 0;
  font-size: 11.5px;
  color: var(--text-secondary);
}

.drawer__tabs {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 6px;
  padding: 10px 14px;
  background: var(--bg-canvas);
  border-bottom: 1px solid var(--border-subtle);
}

.drawer__tab {
  min-height: 40px;
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  border-radius: var(--radius-sm);
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel-alt);
  color: var(--text-secondary);
  font-size: 12.5px;
  font-weight: 700;
}

.drawer__tab.is-active {
  background: var(--cyan-dim);
  border-color: var(--cyan-border);
  color: var(--cyan);
}

.drawer__body {
  flex: 1;
  overflow-y: auto;
  padding: 14px;
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.drawer-toolbar {
  display: flex;
  gap: 8px;
  align-items: center;
}

.progress-track {
  width: 100%;
  height: 7px;
  border-radius: var(--radius-pill);
  background: var(--bg-input);
  overflow: hidden;
  border: 1px solid var(--border-subtle);
}

.progress-fill {
  height: 100%;
  background: var(--cyan);
  transition: width 0.2s ease;
}

.progress-fill--go {
  background: var(--go);
}

.checklist-items {
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.checklist-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  padding: 8px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
}

.checklist-row.is-done {
  border-color: var(--go-border);
  background: rgba(16, 185, 129, 0.08);
}

.checklist-row.is-done span {
  text-decoration: line-through;
  color: var(--text-secondary);
}

.checklist-label {
  display: flex;
  align-items: center;
  gap: 10px;
  flex: 1;
  cursor: pointer;
  font-size: 13px;
}

.checklist-checkbox {
  width: 19px;
  height: 19px;
  accent-color: var(--go);
  flex-shrink: 0;
}

.btn--xs {
  min-height: 28px;
  padding: 0 8px;
  font-size: 11px;
}

.zed-list {
  display: flex;
  flex-direction: column;
  gap: 9px;
}

.zed-card {
  padding: 11px 12px;
  border-radius: var(--radius-md);
  background: var(--bg-panel-alt);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.zed-card__header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.zed-card__title {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.zed-code {
  display: inline-grid;
  place-items: center;
  min-width: 34px;
  padding: 2px 6px;
  border-radius: 4px;
  background: var(--cyan-dim);
  border: 1px solid var(--cyan-border);
  font-family: var(--font-mono);
  font-size: 12px;
  font-weight: 800;
  color: var(--cyan);
}

.zed-card__row {
  font-size: 12px;
  color: var(--text-secondary);
  line-height: 1.4;
}

.zed-field-lbl {
  font-weight: 700;
  color: var(--text-primary);
  margin-right: 4px;
}

/* Responsive Inline Calculator Grid for Tablet & Mobile */
@media (max-width: 1100px) {
  .inline-calc-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }
  .calc-field--prio {
    grid-column: 1 / -1;
  }
}

@media (max-width: 859px) {
  .inline-calc-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .calc-field--prio {
    grid-column: 1 / -1;
  }
  .inline-input,
  .inline-num,
  .inline-select,
  .lfo-toggle,
  .drawer__tab {
    min-height: var(--touch-min);
  }
  .conn-inline-edit {
    margin-left: 0;
  }
}

/* ===== HUB RIPPLE-EFFECT STATUS STRIP ===== */
.hub-ripple-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 6px 14px;
  min-height: 44px;
  background: rgba(6, 10, 18, 0.96);
  border-bottom: 1px solid var(--border-subtle);
  flex-wrap: wrap;
}

.ripple-bar__meta {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

.ripple-bar__title {
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 800;
  letter-spacing: 0.08em;
  color: var(--text-muted);
}

.ripple-pills {
  display: flex;
  align-items: center;
  gap: 6px;
  overflow-x: auto;
  flex: 1;
  padding: 2px 0;
  scrollbar-width: thin;
}

.ripple-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  min-height: 30px;
  padding: 2px 8px;
  border-radius: var(--radius-pill);
  border: 1px solid var(--border-subtle);
  background: var(--bg-panel);
  font-family: var(--font-mono);
  font-size: 11px;
  white-space: nowrap;
  flex-shrink: 0;
  transition: border-color 0.14s, background 0.14s;
}

.ripple-pill:hover {
  border-color: var(--cyan-border);
  background: var(--bg-surface);
}

.ripple-pill--MOD {
  border-color: var(--caution-border);
  background: rgba(245, 158, 11, 0.1);
}

.ripple-pill--HIGH {
  border-color: var(--nogo-border);
  background: rgba(239, 68, 68, 0.14);
}

.ripple-dot {
  width: 7px;
  height: 7px;
  border-radius: 50%;
}
.ripple-dot--LOW { background: var(--go); }
.ripple-dot--MOD { background: var(--caution); }
.ripple-dot--HIGH { background: var(--nogo); box-shadow: 0 0 6px var(--nogo); }

.ripple-code {
  font-weight: 800;
  color: var(--text-primary);
}

.ripple-tag {
  font-size: 10px;
  font-weight: 700;
  color: var(--text-secondary);
}

.ripple-pill--MOD .ripple-tag { color: var(--caution-bright); }
.ripple-pill--HIGH .ripple-tag { color: var(--nogo-bright); }

.ripple-bar__right {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-shrink: 0;
}

/* ===== ROUTE NODE FAA ALERTS & DEP/ARR WINDOW RISK ===== */
.node-alert {
  display: inline-block;
  margin-left: 5px;
  padding: 0 5px;
  border-radius: 3px;
  font-size: 9.5px;
  font-weight: 800;
  vertical-align: middle;
}

.node-alert--mod {
  background: var(--caution-dim);
  color: var(--caution-bright);
  border: 1px solid var(--caution-border);
}

.node-alert--high {
  background: var(--nogo-dim);
  color: var(--nogo-bright);
  border: 1px solid var(--nogo-border);
}

.window-risk-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.window-risk-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 3px 8px;
  border-radius: var(--radius-xs);
  background: rgba(15, 23, 42, 0.85);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  color: var(--text-secondary);
}

.window-risk-pill--MOD { border-color: var(--caution-border); }
.window-risk-pill--HIGH { border-color: var(--nogo-border); }

/* ===== LIVE FEED TELEMETRY & AIRPORT METRICS ===== */
.feed-status-card {
  padding: 9px 10px;
  border-radius: var(--radius-sm);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  font-size: 11px;
  display: flex;
  flex-direction: column;
  gap: 6px;
}

.feed-status-card__row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  flex-wrap: wrap;
}

.feed-notice {
  color: var(--caution-bright);
  font-size: 11px;
  line-height: 1.35;
}

.airport-card--focused {
  box-shadow: 0 0 0 1px var(--cyan);
}

.disruption-banner {
  padding: 7px 9px;
  border-radius: var(--radius-xs);
  font-size: 11.5px;
  line-height: 1.38;
  border: 1px solid var(--border-subtle);
}

.disruption-banner--LOW {
  background: rgba(16, 185, 129, 0.08);
  border-color: var(--go-border);
  color: #d1fae5;
}

.disruption-banner--MOD {
  background: rgba(245, 158, 11, 0.1);
  border-color: var(--caution-border);
  color: #fef3c7;
}

.disruption-banner--HIGH {
  background: rgba(239, 68, 68, 0.13);
  border-color: var(--nogo-border);
  color: #fee2e2;
}

.faa-alert-box {
  padding: 7px 9px;
  border-radius: var(--radius-xs);
  font-family: var(--font-mono);
  font-size: 11px;
  line-height: 1.4;
  display: flex;
  flex-direction: column;
  gap: 3px;
}

.faa-alert-box--MOD {
  background: var(--caution-dim);
  border: 1px solid var(--caution-border);
  color: var(--caution-bright);
}

.faa-alert-box--HIGH {
  background: var(--nogo-dim);
  border: 1px solid var(--nogo-border);
  color: var(--nogo-bright);
}

.faa-alert-box__title {
  font-weight: 800;
  letter-spacing: 0.05em;
}

.faa-normal-row {
  display: flex;
  align-items: center;
  gap: 6px;
  font-size: 11px;
  color: var(--text-secondary);
}

.wx-metrics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 6px;
}

.wx-metric {
  padding: 6px 7px;
  border-radius: var(--radius-xs);
  background: var(--bg-input);
  border: 1px solid var(--border-subtle);
  display: flex;
  flex-direction: column;
  gap: 2px;
}

.wx-metric__lbl {
  font-family: var(--font-mono);
  font-size: 9px;
  font-weight: 700;
  letter-spacing: 0.05em;
  color: var(--text-muted);
}

.wx-metric__val {
  font-family: var(--font-mono);
  font-size: 11.5px;
  font-weight: 700;
  color: var(--text-primary);
}

.metar-details {
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.metar-summary {
  cursor: pointer;
  font-family: var(--font-mono);
  font-size: 10.5px;
  font-weight: 700;
  color: var(--cyan);
  user-select: none;
}

.metar-box--taf {
  margin-top: 4px;
  color: #cbd5e1;
  font-size: 10.5px;
}

@media (max-width: 859px) {
  .hub-ripple-bar {
    padding: 8px 10px;
    gap: 6px;
  }
  .ripple-pill {
    min-height: 36px;
    padding: 4px 10px;
  }
  .wx-metrics-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
