:root {
  /* Brand */
  --brand-darkest:    #001322;
  --brand-navy:       #003057;
  --brand-blue:       #007BC1;
  --brand-blue-hover: #005a8e;
  --brand-blue-light: #0d92ec;
  --brand-green:      #3dd68c;
  --brand-teal:       #3f9e95;

  /* Backgrounds */
  --bg-body:          #e0eff8;
  --bg-filter:        #e0f0f9;
  --bg-filter-border: #a5c8de;

  /* Text */
  --text-nav:    #7aadc8;
  --text-slate:  #1e293b;   /* primary dark slate text */
  --text-muted:  #59636d;   /* muted labels/hints — AA on white & tints */
  --text-accent: #2e6580;   /* blue accent labels/prefixes — AA everywhere */

  /* Borders */
  --border-hair: #d5d5d5;  /* subtle gray hairline / icon */

  /* Status */
  --status-pending:          #f59600;
  --status-avail-confirmed:  #198754;
  --status-selected:         #0d6efd;
  --status-contracted:       #6f42c1;
  --status-avail-requested:  #6c757d;
  --status-unavail:          #adb5bd;
  --status-declined:         #dc3545;
  --status-closed:           #000000;

  /* Rows */
  --row-selected-bg: #004f8a;
}
/* ── Skip navigation (ADA) ─────────────────────────────────── */
.skip-link {
  position: absolute;
  top: -48px;
  left: 0;
  background: #000;
  color: #fff;
  padding: 8px 16px;
  z-index: 9999;
  font-size: 0.875rem;
  text-decoration: none;
  border-radius: 0 0 4px 0;
  transition: top 0.1s;
}
.skip-link:focus { top: 0; }

/* ── Body ──────────────────────────────────────────────────── */
body { font-family: 'Inter', sans-serif; background: var(--bg-body); }

/* ── Shared card panel header (used by multiple panels) ──── */
.panel-header { background: var(--brand-navy) !important; border-bottom: none; }

/* ── Bootstrap btn-primary rebrand ────────────────────────── */
.btn-primary {
  background-color: var(--brand-blue) !important;
  border-color: var(--brand-blue) !important;
}
.btn-primary:hover {
  background-color: var(--brand-blue-hover) !important;
  border-color: var(--brand-blue-hover) !important;
}
.btn-primary:focus, .btn-primary:active, .btn-primary.active {
  background-color: var(--brand-blue-hover) !important;
  border-color: var(--brand-blue-hover) !important;
  box-shadow: 0 0 0 0.25rem rgba(0,123,193,.25) !important;
}

/* ── Status badges ─────────────────────────────────────────── */
.badge-pending,
.badge-submitted,
.badge-declined,
.badge-avail-confirmed,
.badge-preferred {
  color: #fff; font-size: .75rem;
  max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
  display: inline-block;
}
.badge-pending   { background-color: var(--status-pending); }
.badge-submitted { background-color: var(--brand-navy); }
.badge-declined  { background-color: var(--status-declined); }
.badge-avail-confirmed { background-color: var(--status-avail-confirmed); }
.badge-preferred { background-color: #1a7f4e; }

/* ── Status legend dots ────────────────────────────────────── */
.legend-dot {
  display: inline-block;
  width: 9px; height: 9px;
  border-radius: 2px;
  flex-shrink: 0;
  align-self: center;
}
.legend-dot.pending          { background: var(--status-pending); }
.legend-dot.submitted        { background: var(--brand-navy); }
.legend-dot.avail-confirmed  { background: var(--status-avail-confirmed); }
.legend-dot.selected         { background: var(--status-selected); }
.legend-dot.contracted       { background: var(--status-contracted); }
.legend-dot.avail-requested  { background: var(--status-avail-requested); }
.legend-dot.aircraft-unavail { background: var(--status-unavail); }
.legend-dot.declined         { background: var(--status-declined); }
.legend-dot.closed           { background: var(--status-closed); }

/* ── BAJops branded button ─────────────────────────────────── */
.btn-bajops          { background-color: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.btn-bajops:hover    { background-color: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.btn-bajops:active   { background-color: var(--brand-blue); border-color: var(--brand-blue); color: #fff; }
.btn-bajops:disabled,
.btn-bajops.disabled { opacity: .45; pointer-events: none; }
/* wrapper trick: show not-allowed cursor even with pointer-events:none on child */
.btn-bajops-wrap--disabled { cursor: not-allowed; display: inline-block; }

/* ── Bootstrap utility overrides ──────────────────────────── */
.table-light { background-color: #e0f0f9 !important; }
.sticky-top  { z-index: 0 !important; }
.bg-secondary { --bs-bg-opacity: 1; background-color: rgb(5, 97, 178) !important; }

/* ── Misc shared ───────────────────────────────────────────── */
.dropdown-toggle-custom { display: flex; align-items: center; gap: 6px; }
.top-brand-bar { background: var(--brand-darkest); height: 60px; }

.brand-baj    { font-size: 1.1rem; font-weight: 900; color: #fff; letter-spacing: .5px; }
.brand-baj em { font-style: italic; font-weight: 400; }

.brand-by {
  font-size: .62rem; font-weight: 700;
  color: #d5d5d5; letter-spacing: 4px;
  text-transform: uppercase; opacity: .6;
}

.legacy-link {
  font-size: .72rem; font-weight: 700;
  color: #fff; text-decoration: none;
  letter-spacing: .5px; text-transform: uppercase; opacity: .75;
}
.legacy-link:hover { opacity: 1; text-decoration: underline; }

.sandbox-tools-group {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 0 10px;
  border: 1px solid rgba(255,255,255,.18);
  border-radius: 6px;
  height: 40px;
  position: relative;
}

.sandbox-tools-label {
  position: absolute;
  top: -8px;
  left: 8px;
  font-size: .55rem;
  font-weight: 700;
  letter-spacing: .1em;
  text-transform: uppercase;
  color: rgba(255,255,255,.4);
  background: var(--brand-darkest);
  padding: 0 4px;
  white-space: nowrap;
}

.demo-clear-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  background: transparent;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 4px;
  color: rgba(255,255,255,.7);
  font-size: .68rem;
  font-weight: 500;
  padding: 2px 8px;
  cursor: pointer;
  white-space: nowrap;
  transition: border-color .15s, color .15s;
}
.demo-clear-btn:hover {
  border-color: rgba(255,255,255,.75);
  color: #fff;
}
.demo-btn-active {
  border-color: rgba(255,255,255,.75);
  color: #fff;
  background: rgba(255,255,255,.12);
}

/* Tablet: icon-only buttons */
@media (max-width: 991px) {
  .demo-btn-label { display: none; }
  .demo-clear-btn { padding: 4px 9px; }
}

/* ── Toast system ──────────────────────────────────────────── */
.toast-stack {
  position: fixed;
  bottom: 24px;
  right: 24px;
  z-index: 9999;
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: stretch;
  pointer-events: none;
}

.toast-item {
  display: flex;
  align-items: center;
  gap: 12px;
  padding: 14px 14px 14px 16px;
  border-radius: 8px;
  border: 1px solid;
  font-size: .875rem;
  width: 360px;
  pointer-events: auto;
  opacity: 1;
}

/* Exit: keyframe animation fires the moment the class is added — no transition detection needed */
.toast-exiting {
  animation: toast-fade-out .42s ease forwards;
  pointer-events: none;
}

@keyframes toast-fade-out {
  from { opacity: 1; transform: translateX(0); }
  to   { opacity: 0; transform: translateX(32px); }
}

.toast-blue   { background: #dbeafe; border-color: #93c5fd; color: #1e40af; }
.toast-blue   .toast-icon { color: #2563eb; }

.toast-green  { background: #dcfce7; border-color: #86efac; color: #166534; }
.toast-green  .toast-icon { color: #16a34a; }

.toast-red    { background: #fee2e2; border-color: #fca5a5; color: #991b1b; }
.toast-red    .toast-icon { color: #dc2626; }

.toast-yellow { background: #fef9c3; border-color: #fde047; color: #854d0e; }
.toast-yellow .toast-icon { color: #ca8a04; }

.toast-icon { font-size: 1.15rem; flex-shrink: 0; }

.toast-msg { flex: 1; line-height: 1.45; font-weight: 400; }
.toast-msg strong { font-weight: 600; }

.toast-close {
  flex-shrink: 0;
  background: none;
  border: none;
  cursor: pointer;
  font-size: .8rem;
  line-height: 1;
  padding: 2px 0 2px 4px;
  color: inherit;
  opacity: .45;
  transition: opacity .15s;
}
.toast-close:hover { opacity: .9; }

.main-nav {
  background: var(--brand-navy);
  display: grid;
  grid-template-columns: 180px 1fr auto;
  align-items: stretch;
  height: 72px;
  padding: 0 20px;
  border-bottom: 2px solid #001e35;
}

.demo-operator-logo {
  display: inline-flex;
  min-width: 128px;
  height: 44px;
  align-items: center;
  justify-content: center;
  padding: 0 14px;
  background: #ffffff;
  color: var(--brand-navy);
  font-size: 0.82rem;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.baj-nav-items {
  display: flex;
  list-style: none;
  margin: 0; padding: 0;
  justify-content: center;
  align-items: stretch;
}

.baj-nav-item {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 0 20px;
  cursor: pointer;
  gap: 3px;
  color: var(--text-nav);
  transition: color .15s, background .15s;
  border-bottom: 3px solid transparent;
  font-size: .7rem;
  font-weight: 500;
}

.baj-nav-item i        { font-size: 1.2rem; line-height: 1; }
.baj-nav-item:hover    { color: #fff; background: rgba(255,255,255,.06); }
.baj-nav-item.active   { color: var(--brand-green); border-bottom-color: var(--brand-green); }
.baj-nav-item.active i { color: var(--brand-green); }

.baj-nav-link {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 3px;
  height: 100%;
  padding: 0 20px;
  margin: 0 -20px;
  color: inherit;
  text-decoration: none;
}
/* ── Footer shell ──────────────────────────────────────────── */
.app-footer {
  background: var(--brand-navy);
  width: 100%;
  margin-top: auto;
}

/* ── Inner content (max-width, centered) ───────────────────── */
.app-footer-inner {
  max-width: 1080px;
  margin: 0 auto;
  padding: 2rem 1.5rem 0;
  display: flex;
  gap: 3rem;
  align-items: flex-start;
}

/* ── Legal Disclaimer ──────────────────────────────────────── */
.footer-disclaimer {
  flex: 1;
  padding-bottom: 1.75rem;
}

.footer-section-label {
  font-size: 0.65rem;
  font-weight: 700;
  letter-spacing: 0.14em;
  color: #8fb8d4;
  text-transform: uppercase;
  margin-bottom: 0.6rem;
}

.footer-disclaimer-text {
  font-size: 0.74rem;
  color: #a5cce0;
  line-height: 1.75;
  margin: 0;
}

/* ── Social Links ──────────────────────────────────────────── */
.footer-social {
  padding-bottom: 1.75rem;
  min-width: 120px;
  text-align: center;
}

.footer-social-icons {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 0.6rem;
  margin-top: 0.25rem;
}

.footer-social-link {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 50%;
  background: rgba(255, 255, 255, 0.06);
  color: #a5cce0;
  font-size: 1rem;
  text-decoration: none;
  transition: background 0.18s, color 0.18s;
}

.footer-social-link:hover {
  background: rgba(255, 255, 255, 0.14);
  color: #fff;
}

/* ── Copyright bar ─────────────────────────────────────────── */
.footer-copyright {
  border-top: 1px solid rgba(255, 255, 255, 0.14);
  padding: 0.8rem 1rem;
  font-size: 0.7rem;
  color: var(--text-nav);
  text-align: center;
  letter-spacing: 0.03em;
}
