:root {
  font-family: var(--fb-font-body);
  color: var(--fb-text);
  background: var(--fb-page);
  font-synthesis: none;
  --navy: var(--brand-accent);
  --orange: var(--brand-primary);
  --border: var(--fb-border);
  --muted: var(--fb-muted);
}
* {
  box-sizing: border-box;
}
body {
  margin: 0;
  min-height: 100vh;
  background:
    radial-gradient(circle at 90% 2%, rgba(var(--brand-secondary-rgb), .08), transparent 28rem),
    radial-gradient(circle at 5% 14%, rgba(var(--brand-primary-rgb), .07), transparent 34rem),
    linear-gradient(155deg, #f9fbfe 0%, var(--fb-page) 100%);
  background-attachment: fixed;
}
button,
input,
select {
  font: inherit;
}
button,
a,
input,
select,
summary {
  -webkit-tap-highlight-color: transparent;
}
button,
.button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  border: 0;
  border-radius: 10px;
  padding: 13px 20px;
  background: var(--navy);
  color: white;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  min-height: 46px;
}
button:disabled {
  opacity: 0.45;
  cursor: default;
}
button:hover:not(:disabled),
.button:hover {
  filter: brightness(0.96);
}
button:focus-visible,
a:focus-visible,
input:focus-visible,
select:focus-visible,
summary:focus-visible {
  outline: 3px solid #da873e;
  outline-offset: 3px;
}
.primary {
  background: linear-gradient(180deg, var(--brand-primary-light), var(--brand-primary-dark));
  color: var(--brand-on-primary);
}
.secondary {
  background: #edf2f6;
  color: var(--navy);
}
.quiet,
.link {
  background: transparent;
  color: var(--navy);
}
.link {
  padding: 6px;
  min-height: 36px;
  font-size: 14px;
}
.quiet {
  font-weight: 500;
}
header {
  height: 78px;
  background: white;
  border-bottom: 1px solid var(--border);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 max(24px, calc((100vw - 1080px) / 2));
  gap: 16px;
  position: relative;
  box-shadow: 0 8px 28px -20px rgba(var(--brand-accent-rgb), .55);
}
header::after {
  content: "";
  position: absolute;
  right: 0;
  bottom: -1px;
  left: 0;
  height: 3px;
  background: linear-gradient(90deg, var(--brand-primary), var(--brand-secondary));
}
.brand {
  text-decoration: none;
  color: var(--navy);
}
.brand .fb-brand-logo {
  height: 48px;
  max-width: min(245px, 48vw);
}
.brand .fb-brand-name {
  font-size: 24px;
}
.brand [hidden] {
  display: none;
}
.header-right {
  display: flex;
  gap: 20px;
  align-items: center;
  font-size: 14px;
}
.badge {
  background: #eef3f6;
  color: #52677a;
  min-height: 32px;
  padding: 7px 11px;
  font-size: 12px;
  border-radius: 30px;
}
.badge.online {
  color: #216849;
  background: #e9f5ef;
}
.badge.offline {
  color: #965211;
  background: #fff1df;
}
main {
  max-width: 1080px;
  margin: auto;
  padding: 0 24px 64px;
}
.tabs {
  display: flex;
  gap: 28px;
  border-bottom: 1px solid var(--border);
  margin-bottom: 30px;
  overflow: auto;
}
.tabs button {
  border-radius: 0;
  white-space: nowrap;
  background: transparent;
  color: var(--muted);
  padding: 22px 2px 18px;
  border-bottom: 3px solid transparent;
  font-weight: 600;
}
.tabs button[aria-current] {
  border-color: var(--brand-primary);
  color: var(--navy);
}
.tabs #pendingCount:empty {
  display: none;
}
.tabs #pendingCount {
  font-size: 12px;
  background: #e6edf3;
  border-radius: 10px;
  padding: 2px 7px;
}
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 1.8px;
  font-size: 11px;
  font-weight: 750;
  color: var(--muted);
  margin: 0 0 9px;
}
h1 {
  font-size: 30px;
  letter-spacing: -0.7px;
  margin: 0 0 10px;
  font-weight: 700;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.4px;
  margin: 0 0 24px;
}
h3 {
  font-size: 19px;
  margin: 0 0 10px;
}
p {
  line-height: 1.6;
  color: var(--muted);
  margin: 8px 0 18px;
}
#workspaceIntro {
  margin-bottom: 26px;
}
.card {
  background: white;
  border: 1px solid var(--border);
  border-radius: 18px;
  padding: 30px;
  box-shadow: var(--fb-shadow-card);
}
#wizard {
  max-width: 820px;
}
.steps {
  display: flex;
  list-style: none;
  padding: 0 0 24px;
  margin: 0 0 28px;
  border-bottom: 1px solid var(--border);
  counter-reset: step;
  gap: 12px;
}
.steps li {
  display: flex;
  align-items: center;
  gap: 8px;
  color: #768495;
  font-size: 13px;
  flex: 1;
  counter-increment: step;
}
.steps li:before {
  content: counter(step);
  display: grid;
  place-items: center;
  border: 1px solid #dbe3eb;
  border-radius: 50%;
  width: 27px;
  height: 27px;
  flex-shrink: 0;
  font-size: 12px;
}
.steps li.active {
  color: var(--navy);
  font-weight: 700;
}
.steps li.active:before {
  background: var(--navy);
  color: white;
  border-color: var(--navy);
}
.steps li.done:before {
  background: #e8f3ed;
  color: #216849;
  border-color: #e8f3ed;
}
.two-columns {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 22px;
}
label {
  display: flex;
  flex-direction: column;
  gap: 8px;
  font-size: 14px;
  font-weight: 600;
  margin: 0 0 22px;
}
label small {
  font-weight: 400;
  font-size: 12px;
  color: var(--muted);
}
input,
select {
  border: 1px solid #cdd7e1;
  background: #fff;
  color: #16324e;
  border-radius: 9px;
  min-height: 47px;
  padding: 11px 13px;
  width: 100%;
  min-width: 0;
}
input::placeholder {
  color: #8b98a5;
}
input[type="checkbox"] {
  width: 20px;
  height: 20px;
  min-height: 20px;
  accent-color: var(--navy);
}
.actions {
  display: flex;
  gap: 12px;
  justify-content: flex-end;
  align-items: center;
  margin-top: 30px;
  padding-top: 24px;
  border-top: 1px solid var(--border);
  flex-wrap: wrap;
}
.actions > .quiet {
  margin-right: auto;
}
.hint {
  font-size: 13px;
}
.flight-summary {
  background: #f0f5f8;
  color: var(--navy);
  font-size: 14px;
  padding: 12px 16px;
  border-radius: 9px;
  margin: -6px 0 24px;
}
.heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}
.search {
  flex: 1;
  margin-bottom: 0;
}
.sources {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}
.sources button {
  font-size: 14px;
  background: #edf2f6;
  color: var(--navy);
}
.sources button.selected {
  outline: 2px solid var(--navy);
}
.selection-heading {
  border-bottom: 1px solid var(--border);
  margin-top: 22px;
}
.selection-heading p {
  font-size: 14px;
  color: var(--navy);
}
#files {
  max-height: 300px;
  overflow: auto;
}
#files label {
  display: flex;
  flex-direction: row;
  align-items: center;
  padding: 12px 0;
  margin: 0;
  border-bottom: 1px solid #f0f3f5;
  font-weight: 400;
  font-size: 14px;
  gap: 12px;
}
#files label span {
  overflow-wrap: anywhere;
}
#files label small {
  margin-left: auto;
  white-space: nowrap;
}
.recap {
  display: grid;
  grid-template-columns: 160px 1fr;
  gap: 16px;
  margin: 0 0 24px;
}
.recap dt {
  color: var(--muted);
  font-size: 14px;
}
.recap dd {
  margin: 0;
  font-weight: 600;
  overflow-wrap: anywhere;
}
.progress-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  font-size: 13px;
  margin: 20px 0 8px;
}
progress {
  width: 100%;
  height: 10px;
  accent-color: #217450;
  border: 0;
  border-radius: 10px;
  overflow: hidden;
}
progress::-webkit-progress-bar {
  background: #e9eef2;
}
progress::-webkit-progress-value {
  background: #217450;
}
.transfer strong {
  color: #216849;
}
.transfer > button {
  margin: 8px 8px 0 0;
}
.callout {
  background: #fff4e5;
  border-radius: 10px;
  padding: 16px;
  font-size: 14px;
  margin-bottom: 18px;
}
.flight-list .flight-row {
  display: flex;
  gap: 20px;
  justify-content: space-between;
  align-items: center;
  border-bottom: 1px solid var(--border);
  padding: 20px 0;
}
.flight-row:last-child {
  border: 0;
}
.flight-row h3 {
  font-size: 17px;
  margin: 0 0 6px;
}
.flight-row p {
  font-size: 13px;
  margin: 0;
}
.flight-row details {
  margin-top: 8px;
  font-size: 13px;
  color: var(--muted);
}
.flight-row summary {
  cursor: pointer;
}
.tag {
  display: inline-block;
  border-radius: 20px;
  background: #f0f4f7;
  padding: 5px 10px;
  font-size: 12px;
  white-space: nowrap;
}
.tag.ready {
  background: #e9f5ef;
  color: #216849;
}
.tag.failed {
  background: #fdebea;
  color: #9b2c2c;
}
.row-end {
  display: flex;
  flex-direction: column;
  gap: 10px;
  align-items: flex-end;
}
.empty {
  text-align: center;
  padding: 30px 12px;
  color: var(--muted);
}
.filters {
  display: grid;
  grid-template-columns: 2fr 1.3fr 1fr 1fr;
  gap: 16px;
  padding: 22px;
}
.filters label {
  margin: 0;
}
.filters .checkbox {
  grid-column: 1/4;
}
.checkbox {
  flex-direction: row;
  align-items: center;
  gap: 9px;
  font-weight: 400;
}
.settings-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 24px;
}
.settings-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}
.settings-grid h2 {
  margin-bottom: 14px;
}
.settings-grid .hint {
  margin-top: 20px;
}
hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: 26px 0;
}
.login {
  max-width: 500px;
  margin: 50px auto;
}
.login h1 {
  font-size: 29px;
}
.login form {
  margin-top: 28px;
}
.login form > button {
  width: 100%;
}
#notice {
  position: sticky;
  bottom: 16px;
  margin-top: 20px;
  padding: 16px 20px;
  border: 1px solid #e9bf8a;
  background: #fff4e5;
  color: #743d1b;
  border-radius: 12px;
  box-shadow: 0 6px 24px #16324e12;
  line-height: 1.5;
}
#notice.success {
  background: #eaf6ef;
  color: #216849;
  border-color: #b6d7c5;
}
[hidden] {
  display: none !important;
}
@media (max-width: 700px) {
  header {
    height: 65px;
    padding: 0 18px;
  }
  .brand {
    font-size: 21px;
  }
  .header-right {
    gap: 8px;
  }
  #structureName {
    display: none;
  }
  main {
    padding: 0 16px 40px;
  }
  .tabs {
    gap: 20px;
    margin-bottom: 24px;
  }
  .tabs button {
    font-size: 13px;
    padding-top: 19px;
  }
  .card {
    padding: 22px 18px;
    border-radius: 14px;
  }
  h1 {
    font-size: 26px;
  }
  h2 {
    font-size: 21px;
  }
  .two-columns,
  .settings-grid {
    grid-template-columns: 1fr;
    gap: 0;
  }
  .settings-grid {
    gap: 18px;
  }
  .steps {
    gap: 6px;
  }
  .steps li {
    flex-direction: column;
    font-size: 11px;
    gap: 7px;
  }
  .heading {
    align-items: stretch;
    flex-direction: column;
  }
  .actions {
    gap: 8px;
  }
  .actions .primary {
    width: 100%;
    order: -1;
  }
  .filters {
    grid-template-columns: 1fr 1fr;
  }
  .filters label:first-child {
    grid-column: 1/3;
  }
  .filters .checkbox {
    grid-column: auto;
  }
  .filters > button {
    grid-column: 1/3;
  }
  .flight-list .flight-row {
    gap: 12px;
  }
  .row-end button {
    padding: 10px 12px;
    font-size: 13px;
  }
  .recap {
    grid-template-columns: 110px 1fr;
  }
  .progress-row {
    font-size: 12px;
  }
  .login {
    margin: 25px auto;
  }
}

.contact-choice {
  border: 0;
  padding: 0;
  margin: 0 0 20px;
}
.contact-choice legend {
  font-size: 14px;
  font-weight: 600;
  margin-bottom: 10px;
}
.contact-toggle {
  display: flex;
  gap: 6px;
  padding: 5px;
  background: #edf2f6;
  border-radius: 12px;
  max-width: 340px;
}
.contact-toggle button {
  flex: 1;
  background: transparent;
  color: var(--muted);
  min-height: 42px;
}
.contact-toggle button[aria-pressed="true"] {
  background: var(--navy);
  color: white;
  box-shadow: 0 2px 5px #123b6715;
}
.sd-number {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  flex-shrink: 0;
  min-width: 76px;
  max-width: 110px;
  padding: 12px;
  border-radius: 12px;
  background: #fff1e5;
  color: var(--orange);
}
.sd-number small {
  font-size: 11px;
  font-weight: 600;
  white-space: nowrap;
}
.sd-number strong {
  font-size: 34px;
  line-height: 1.2;
  overflow-wrap: anywhere;
  max-width: 100%;
}
dialog { width: min(680px, calc(100% - 32px)); max-height: 85vh; overflow: auto; border: 1px solid #dbe3e7; border-radius: 18px; padding: 28px; color: #203247; box-shadow: 0 16px 70px #142d3c33; }
dialog::backdrop { background: #13293888; }
.detail-heading { display: flex; justify-content: space-between; align-items: center; gap: 16px; }
.history-scopes { display:flex; gap:8px; margin:18px 0; flex-wrap:wrap; }
.history-scopes button { background:white; color:#314c5a; border:1px solid #cbd8df; }
.history-scopes button[aria-pressed="true"] { background:#203e51; color:white; }
.flight-time { margin:16px 0; padding:12px 0; border-bottom:1px solid #e0e7eb; }
.flight-time summary { cursor:pointer; color:#516879; }
#passengerStep { max-width:620px; margin:auto; }
#detailNotice { margin-top:20px; }
@media (min-width:701px) {
  #passengerStep { display:grid; grid-template-columns:1fr 1fr; gap:18px 24px; max-width:720px; }
  #pilotStep { display:contents; }
  #pilotStep h2 { grid-column:1/-1; margin-bottom:2px; }
  #pilotStep > label { grid-column:1; grid-row:2; }
  #passengerStep > label:first-of-type { grid-column:2; grid-row:2; }
  #passengerStep .flight-time { grid-column:1/-1; grid-row:3; margin:0; }
  #passengerStep .contact-choice { grid-column:1; grid-row:4; margin:0; }
  #passengerStep > label:nth-of-type(2) { grid-column:2; grid-row:4; }
  #passengerStep > p, #passengerStep > .actions { grid-column:1/-1; margin:0; }
  #passengerStep label { margin-bottom:0; }
}
.flight-row > .sd-number + div {
  flex: 1;
  min-width: 0;
}
@media (max-width: 700px) {
  .sd-number {
    min-width: 60px;
    max-width: 80px;
    padding: 10px 7px;
  }
  .sd-number strong {
    font-size: 28px;
  }
  .flight-row:has(.sd-number) {
    flex-wrap: wrap;
  }
  .flight-row:has(.sd-number) > .row-end {
    flex-basis: 100%;
    flex-direction: row;
    justify-content: flex-end;
    align-items: center;
  }
}
