:root {
  --navy-950: #082440;
  --navy-900: #0d2f55;
  --navy-800: #123b69;
  --navy-700: #1a4c84;
  --blue-100: #e9f2fc;
  --blue-050: #f4f8fc;
  --page: #eef2f6;
  --white: #ffffff;
  --text: #17212b;
  --muted: #607080;
  --border: #d4dce5;
  --success-bg: #e2f5e7;
  --success-text: #17602f;
  --warning-bg: #fff3d5;
  --warning-text: #735200;
  --error-bg: #fde8e8;
  --error-text: #8b1f1f;
  --shadow: 0 8px 28px rgba(20, 35, 50, 0.09);
  --radius: 14px;
}

* { box-sizing: border-box; }

html {
  min-width: 320px;
  min-height: 100%;
  background: var(--page);
}

body {
  min-width: 320px;
  min-height: 100vh;
  margin: 0;
  background: var(--page);
  color: var(--text);
  font-family:
    Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI",
    sans-serif;
}

button,
input,
textarea {
  font: inherit;
}

button,
.button,
.drop-zone {
  -webkit-tap-highlight-color: transparent;
}

.hidden { display: none !important; }

.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.noscript {
  padding: 15px;
  background: var(--warning-bg);
  color: var(--warning-text);
  font-weight: 750;
  text-align: center;
}

.topbar {
  background: var(--white);
  border-bottom: 1px solid var(--border);
}

.topbar-inner {
  display: flex;
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 20px 24px;
  align-items: center;
  justify-content: space-between;
  gap: 24px;
}

h1,
h2,
h3,
p {
  margin-top: 0;
}

h1 {
  margin-bottom: 2px;
  color: var(--navy-950);
  font-size: clamp(1.9rem, 5vw, 2.75rem);
  line-height: 1.05;
}

h2 {
  margin-bottom: 6px;
  color: var(--navy-950);
  font-size: 1.55rem;
}

h3 {
  margin-bottom: 5px;
  color: var(--navy-950);
}

.eyebrow {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 850;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}

.version-label {
  margin-bottom: 0;
  color: var(--muted);
  font-size: 0.78rem;
}

.muted {
  margin-bottom: 0;
  color: var(--muted);
}

.view-tabs {
  display: flex;
  padding: 4px;
  border-radius: 10px;
  background: var(--blue-100);
  gap: 4px;
}

.tab-button {
  min-height: 38px;
  padding: 0 14px;
  border: 0;
  border-radius: 8px;
  background: transparent;
  color: var(--navy-800);
  cursor: pointer;
  font-weight: 750;
}

.tab-button.active {
  background: var(--white);
  box-shadow: 0 2px 8px rgba(20,35,50,0.1);
  color: var(--navy-950);
}

.page-shell {
  width: min(1120px, 100%);
  margin: 0 auto;
  padding: 24px;
}

.panel {
  padding: 22px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--white);
  box-shadow: var(--shadow);
}

.panel + .panel {
  margin-top: 18px;
}

.panel-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.panel-heading.compact {
  margin-bottom: 14px;
}

.button {
  display: inline-flex;
  min-height: 44px;
  padding: 0 17px;
  border: 1px solid transparent;
  border-radius: 9px;
  align-items: center;
  justify-content: center;
  gap: 8px;
  cursor: pointer;
  font-weight: 780;
  line-height: 1;
  text-decoration: none;
}

.button:disabled {
  cursor: not-allowed;
  opacity: 0.52;
}

.button-primary {
  background: var(--navy-700);
  color: var(--white);
}

.button-primary:hover:not(:disabled) {
  background: var(--navy-950);
}

.button-secondary {
  border-color: var(--border);
  background: var(--white);
  color: var(--navy-950);
}

.button-secondary:hover:not(:disabled) {
  background: var(--blue-050);
}

.button-danger {
  border-color: #efc0c0;
  background: #fff7f7;
  color: #9b2424;
}

.button-small {
  min-height: 36px;
  padding: 0 12px;
  font-size: 0.82rem;
}

.import-metadata-grid {
  display: grid;
  grid-template-columns: 1.3fr 0.6fr 1.3fr;
  gap: 14px;
  margin-top: 20px;
}

label > span,
.field-label {
  display: block;
  margin-bottom: 5px;
  color: #425364;
  font-size: 0.76rem;
  font-weight: 760;
}

input,
textarea {
  width: 100%;
  border: 1px solid #bdc9d5;
  border-radius: 8px;
  background: var(--white);
  color: var(--text);
}

input {
  min-height: 41px;
  padding: 0 10px;
}

textarea {
  padding: 10px;
  resize: vertical;
  line-height: 1.45;
}

input:focus,
textarea:focus {
  outline: 3px solid rgba(39,112,183,0.16);
  border-color: var(--navy-700);
}

.drop-zone {
  display: flex;
  min-height: 180px;
  margin-top: 18px;
  padding: 24px;
  border: 2px dashed #9eb3c8;
  border-radius: 12px;
  background: var(--blue-050);
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  cursor: pointer;
  text-align: center;
}

.drop-zone.dragging {
  border-color: var(--navy-700);
  background: var(--blue-100);
}

.drop-zone > span:last-child {
  color: var(--muted);
  font-size: 0.8rem;
}

.drop-icon {
  font-size: 2rem;
}

.image-preview-panel {
  margin-top: 18px;
}

.image-preview-heading {
  display: flex;
  margin-bottom: 10px;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.image-preview-heading strong,
.image-preview-heading span {
  display: block;
}

.image-frame {
  display: flex;
  min-height: 200px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background:
    linear-gradient(45deg, #edf1f4 25%, transparent 25%),
    linear-gradient(-45deg, #edf1f4 25%, transparent 25%),
    linear-gradient(45deg, transparent 75%, #edf1f4 75%),
    linear-gradient(-45deg, transparent 75%, #edf1f4 75%);
  background-color: #f9fbfc;
  background-position: 0 0, 0 8px, 8px -8px, -8px 0;
  background-size: 16px 16px;
  align-items: center;
  justify-content: center;
}

.image-frame img {
  display: block;
  max-width: 100%;
  max-height: 560px;
  border: 1px solid #b9c5d0;
  border-radius: 6px;
  background: var(--white);
}

.action-row {
  display: flex;
  margin-top: 18px;
  gap: 10px;
  flex-wrap: wrap;
}

.ocr-status {
  margin-top: 18px;
  padding: 16px;
  border: 1px solid #c4d7e9;
  border-radius: 10px;
  background: var(--blue-050);
}

.progress-heading {
  display: flex;
  margin-bottom: 9px;
  justify-content: space-between;
  gap: 12px;
}

.progress-track {
  overflow: hidden;
  height: 11px;
  border-radius: 999px;
  background: #d6e1ec;
}

.progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: var(--navy-700);
  transition: width 180ms ease;
}

.ocr-status p {
  margin: 9px 0 0;
  font-size: 0.8rem;
}

.notice {
  margin-top: 16px;
  padding: 13px 15px;
  border-radius: 9px;
  line-height: 1.5;
}

.notice ul {
  margin: 8px 0 0;
  padding-left: 20px;
}

.notice-warning {
  background: var(--warning-bg);
  color: var(--warning-text);
}

.notice-error {
  background: var(--error-bg);
  color: var(--error-text);
}

.notice-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.manual-text-panel {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--border);
}

.manual-text-panel label + label {
  display: block;
  margin-top: 12px;
}

.manual-text-panel .button {
  margin-top: 14px;
}

.privacy-panel {
  display: flex;
  align-items: flex-start;
  gap: 13px;
}

.privacy-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.45;
}

.privacy-icon {
  font-size: 1.45rem;
}

.status-card {
  display: grid;
  grid-template-columns: minmax(0, 1.4fr) auto;
  gap: 20px;
  padding: 24px;
  border-radius: var(--radius);
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.14), transparent 35%),
    var(--navy-950);
  color: var(--white);
  box-shadow: var(--shadow);
}

.status-card h2 {
  margin: 10px 0 5px;
  color: var(--white);
  font-size: clamp(1.55rem, 4vw, 2.15rem);
}

.status-card p {
  margin-bottom: 0;
  color: #dce8f4;
}

.pill {
  display: inline-flex;
  padding: 5px 10px;
  border-radius: 999px;
  align-items: center;
  font-size: 0.7rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.pill-light {
  background: rgba(255,255,255,0.94);
  color: var(--navy-800);
}

.pill-success {
  background: var(--success-bg);
  color: var(--success-text);
}

.status-metrics {
  display: flex;
  gap: 12px;
}

.metric {
  min-width: 105px;
  padding: 13px;
  border-radius: 10px;
  background: rgba(255,255,255,0.1);
  text-align: center;
}

.metric span,
.release-strip span {
  display: block;
  color: #dce8f4;
  font-size: 0.7rem;
}

.metric strong {
  display: block;
  margin-top: 3px;
  font-size: 1.7rem;
}

.release-strip {
  grid-column: 1 / -1;
  padding-top: 16px;
  border-top: 1px solid rgba(255,255,255,0.18);
}

.release-strip strong {
  display: block;
  margin-top: 4px;
  font-size: 1.04rem;
}

.dashboard-actions {
  display: flex;
  margin: 18px 0;
  gap: 10px;
  flex-wrap: wrap;
}

.duty-list {
  display: grid;
  gap: 18px;
}

.duty-card {
  overflow: hidden;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(20,35,50,0.07);
}

.duty-header {
  display: flex;
  min-height: 52px;
  padding: 13px 18px;
  background: var(--navy-700);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  color: var(--white);
}

.duty-header h3 {
  margin: 0;
  color: var(--white);
  font-size: 1.06rem;
}

.duty-date {
  color: #dce8f4;
  font-size: 0.82rem;
}

.duty-summary {
  display: grid;
  grid-template-columns: repeat(5, 1fr);
  gap: 1px;
  background: var(--border);
  border-bottom: 1px solid var(--border);
}

.summary-cell {
  padding: 11px 7px;
  background: var(--blue-100);
  text-align: center;
}

.summary-cell span {
  display: block;
  color: var(--muted);
  font-size: 0.65rem;
  font-weight: 760;
  text-transform: uppercase;
}

.summary-cell strong {
  display: block;
  margin-top: 3px;
  color: var(--navy-950);
  font-size: 0.96rem;
}

.flight-row {
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
}

.flight-grid {
  display: grid;
  grid-template-columns: minmax(110px, 1fr) minmax(230px, 2fr) 76px;
  align-items: center;
  gap: 18px;
}

.flight-number {
  color: var(--navy-950);
  font-size: 1.03rem;
  font-weight: 850;
}

.aircraft {
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.74rem;
}

.route {
  display: grid;
  grid-template-columns: 1fr auto 1fr;
  align-items: center;
  gap: 13px;
}

.airport:first-child { text-align: right; }
.airport:last-child { text-align: left; }

.airport-time {
  display: block;
  font-size: 1.02rem;
  font-weight: 820;
}

.airport-code {
  display: block;
  color: var(--navy-700);
  font-size: 0.84rem;
  font-weight: 850;
}

.route-arrow {
  color: var(--muted);
  font-size: 1.35rem;
}

.duration {
  text-align: center;
}

.duration span {
  display: block;
  color: var(--muted);
  font-size: 0.67rem;
}

.duration strong {
  display: block;
  margin-top: 2px;
}

.sit-line {
  margin-top: 10px;
  color: var(--muted);
  font-size: 0.79rem;
  text-align: center;
}

.layover-row {
  display: flex;
  padding: 14px 18px;
  align-items: center;
  gap: 12px;
  background: #f2f4f6;
}

.layover-icon {
  display: grid;
  width: 38px;
  height: 38px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: #dde4eb;
  place-items: center;
  color: var(--navy-950);
  font-size: 1.1rem;
}

.layover-label,
.layover-row strong,
.layover-row small {
  display: block;
}

.layover-label {
  color: var(--muted);
  font-size: 0.66rem;
  font-weight: 750;
  text-transform: uppercase;
}

.layover-row small {
  margin-top: 2px;
  color: var(--muted);
}

.empty-state {
  padding: 38px 24px;
  border: 1px dashed #aab9c7;
  border-radius: 12px;
  background: var(--white);
  text-align: center;
}

.empty-state-icon {
  display: block;
  margin-bottom: 8px;
  font-size: 2.2rem;
}

.confidence-badge {
  display: grid;
  min-width: 90px;
  min-height: 70px;
  padding: 8px;
  border-radius: 12px;
  background: var(--blue-100);
  place-items: center;
  color: var(--navy-950);
  font-size: 1.35rem;
  font-weight: 850;
  text-align: center;
}

.confidence-badge small {
  display: block;
  color: var(--muted);
  font-size: 0.62rem;
  text-transform: uppercase;
}

.review-trip-fields {
  display: grid;
  grid-template-columns: 1.2fr 1fr 0.45fr;
  gap: 12px;
  margin: 20px 0;
}

.review-duty {
  overflow: hidden;
  margin-top: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
}

.review-duty-header {
  display: flex;
  padding: 12px 14px;
  background: var(--navy-800);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  color: var(--white);
}

.review-duty-header h3 {
  margin: 0;
  color: var(--white);
}

.review-duty-body {
  padding: 14px;
}

.review-summary-grid {
  display: grid;
  grid-template-columns: repeat(6, 1fr);
  gap: 10px;
}

.review-flight {
  margin-top: 14px;
  padding: 14px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--blue-050);
}

.review-flight-heading {
  display: flex;
  margin-bottom: 11px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.review-flight-heading strong {
  color: var(--navy-950);
}

.review-flight-grid {
  display: grid;
  grid-template-columns: 0.55fr 0.7fr 0.8fr 0.8fr 0.8fr 0.8fr;
  gap: 9px;
}

.review-flight-grid.secondary {
  grid-template-columns: 0.8fr 0.9fr 0.8fr 0.8fr;
  margin-top: 9px;
}

.review-layover {
  display: grid;
  grid-template-columns: 0.8fr 0.8fr 1fr;
  gap: 10px;
  margin-top: 14px;
  padding: 13px;
  border-radius: 10px;
  background: #f1f3f5;
}

.review-duty-actions {
  display: flex;
  margin-top: 12px;
  justify-content: space-between;
  gap: 10px;
}

.sticky-actions {
  position: sticky;
  bottom: 10px;
  display: flex;
  margin-top: 22px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: rgba(255,255,255,0.96);
  box-shadow: 0 8px 24px rgba(20,35,50,0.12);
  justify-content: flex-end;
  gap: 10px;
  z-index: 5;
}

.raw-ocr-details {
  margin-top: 18px;
  padding-top: 16px;
  border-top: 1px solid var(--border);
}

.raw-ocr-details summary {
  cursor: pointer;
  color: var(--navy-800);
  font-weight: 760;
}

.raw-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 12px;
  margin-top: 12px;
}

.toast {
  position: fixed;
  right: 18px;
  bottom: 18px;
  max-width: min(380px, calc(100vw - 36px));
  padding: 13px 16px;
  border-radius: 9px;
  background: var(--navy-950);
  box-shadow: 0 8px 28px rgba(0,0,0,0.24);
  color: var(--white);
  z-index: 20;
}

footer {
  padding: 22px;
  color: var(--muted);
  font-size: 0.78rem;
  text-align: center;
}

footer p { margin: 0; }

@media (max-width: 820px) {
  .import-metadata-grid,
  .review-trip-fields {
    grid-template-columns: 1fr 0.5fr;
  }

  .import-metadata-grid label:last-child,
  .review-trip-fields label:first-child {
    grid-column: 1 / -1;
  }

  .review-summary-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .review-flight-grid {
    grid-template-columns: repeat(3, 1fr);
  }

  .review-flight-grid.secondary {
    grid-template-columns: repeat(2, 1fr);
  }
}

@media (max-width: 720px) {
  .topbar-inner,
  .page-shell {
    padding-left: 13px;
    padding-right: 13px;
  }

  .topbar-inner,
  .panel-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .view-tabs {
    width: 100%;
  }

  .tab-button {
    flex: 1;
  }

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

  .status-metrics {
    width: 100%;
  }

  .metric { flex: 1; }
  .release-strip { grid-column: auto; }
  .duty-summary { grid-template-columns: repeat(3, 1fr); }
  .flight-grid { grid-template-columns: 1fr auto; }

  .route {
    grid-column: 1 / -1;
    grid-row: 2;
  }

  .duration {
    grid-column: 2;
    grid-row: 1;
  }

  .raw-grid {
    grid-template-columns: 1fr;
  }

  .sticky-actions {
    position: static;
    flex-direction: column-reverse;
  }

  .sticky-actions .button {
    width: 100%;
  }
}

@media (max-width: 520px) {
  .panel,
  .status-card {
    padding: 17px;
  }

  .import-metadata-grid,
  .review-trip-fields,
  .review-summary-grid,
  .review-flight-grid,
  .review-flight-grid.secondary,
  .review-layover {
    grid-template-columns: 1fr 1fr;
  }

  .import-metadata-grid label:last-child,
  .review-trip-fields label:first-child {
    grid-column: 1 / -1;
  }

  .action-row .button {
    width: 100%;
  }

  .image-preview-heading {
    align-items: stretch;
    flex-direction: column;
  }
}


/* ================================================================
   Version 0.3.0 — live trip status and operations
   ================================================================ */

.button-warning {
  border-color: #e4c46f;
  background: #fff8df;
  color: #775500;
}

.button-ghost {
  border-color: transparent;
  background: #f1f4f7;
  color: #425364;
}

.live-status-card {
  overflow: hidden;
  padding: 24px;
  border-radius: var(--radius);
  background: var(--navy-950);
  box-shadow: var(--shadow);
  color: var(--white);
  transition: background 180ms ease;
}

.status-tone-home {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.17), transparent 38%),
    linear-gradient(135deg, #14532d, #166534);
}

.status-tone-air {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.18), transparent 38%),
    linear-gradient(135deg, #0b4f87, #1167a8);
}

.status-tone-ground {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.16), transparent 38%),
    linear-gradient(135deg, #183f6d, #235b92);
}

.status-tone-layover {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.14), transparent 38%),
    linear-gradient(135deg, #332f64, #514b8f);
}

.status-tone-warning {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.16), transparent 38%),
    linear-gradient(135deg, #795300, #9b6b00);
}

.status-tone-danger {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.14), transparent 38%),
    linear-gradient(135deg, #771f1f, #a22929);
}

.status-tone-neutral {
  background:
    radial-gradient(circle at top right, rgba(255,255,255,0.12), transparent 38%),
    linear-gradient(135deg, #364554, #536474);
}

.live-status-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 20px;
}

.live-status-heading h2 {
  margin: 10px 0 5px;
  color: var(--white);
  font-size: clamp(1.7rem, 5vw, 2.5rem);
}

.live-status-heading p {
  margin: 0;
  color: rgba(255,255,255,0.82);
}

.live-indicator {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  align-items: center;
  gap: 7px;
  background: rgba(255,255,255,0.14);
  font-size: 0.72rem;
  font-weight: 820;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.live-dot {
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: #8df5aa;
  box-shadow: 0 0 0 4px rgba(141,245,170,0.16);
}

.status-icon {
  display: grid;
  width: 66px;
  height: 66px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: rgba(255,255,255,0.12);
  place-items: center;
  font-size: 2rem;
}

.status-information-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-top: 22px;
}

.status-info-block {
  min-height: 105px;
  padding: 13px;
  border: 1px solid rgba(255,255,255,0.12);
  border-radius: 10px;
  background: rgba(255,255,255,0.09);
}

.status-info-block span,
.status-info-block small {
  display: block;
  color: rgba(255,255,255,0.76);
}

.status-info-block span {
  font-size: 0.68rem;
  font-weight: 730;
  text-transform: uppercase;
}

.status-info-block strong {
  display: block;
  margin: 5px 0 3px;
  font-size: clamp(1.25rem, 3vw, 1.65rem);
}

.status-info-block small {
  font-size: 0.72rem;
  line-height: 1.35;
}

.status-info-home {
  grid-column: span 2;
}

.trip-progress-track {
  overflow: hidden;
  height: 8px;
  margin-top: 17px;
  border-radius: 999px;
  background: rgba(255,255,255,0.16);
}

.trip-progress-bar {
  width: 0;
  height: 100%;
  border-radius: inherit;
  background: rgba(255,255,255,0.88);
  transition: width 400ms ease;
}

.status-alerts {
  display: grid;
  gap: 8px;
  margin-top: 14px;
}

.status-alert {
  display: flex;
  padding: 12px 14px;
  border-radius: 9px;
  align-items: flex-start;
  gap: 10px;
  background: #fff3d5;
  color: #6d4d00;
}

.status-alert-cancelled,
.status-alert-missed {
  background: #fde8e8;
  color: #8b1f1f;
}

.status-alert p {
  margin: 0;
  line-height: 1.4;
}

.simulation-panel,
.operations-panel {
  margin-top: 18px;
}

.switch-control {
  display: inline-flex;
  min-height: 42px;
  padding: 8px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  align-items: center;
  gap: 9px;
  background: var(--blue-050);
  cursor: pointer;
}

.switch-control input {
  width: 18px;
  min-height: 18px;
  margin: 0;
}

.switch-control span {
  margin: 0;
  color: var(--navy-900);
  font-size: 0.8rem;
}

.clock-control-grid {
  display: grid;
  grid-template-columns: minmax(230px, 0.8fr) minmax(0, 1.5fr);
  gap: 16px;
  margin-top: 16px;
  align-items: end;
}

.quick-jump-buttons {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.operations-list {
  display: grid;
  gap: 12px;
  margin-top: 16px;
}

.operation-card {
  padding: 15px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: var(--blue-050);
}

.operation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.operation-route {
  margin-left: 8px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.flight-status-chip {
  display: inline-flex;
  margin-left: 7px;
  padding: 4px 8px;
  border-radius: 999px;
  align-items: center;
  white-space: nowrap;
  font-size: 0.66rem;
  font-weight: 820;
  text-transform: uppercase;
}

.flight-status-neutral {
  background: #e5eaf0;
  color: #405264;
}

.flight-status-success {
  background: #dff4e5;
  color: #17602f;
}

.flight-status-air {
  background: #dceefe;
  color: #0b4f87;
}

.flight-status-warning {
  background: #fff0c9;
  color: #735200;
}

.flight-status-danger {
  background: #fde1e1;
  color: #8b1f1f;
}

.operation-times {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px;
  margin-top: 12px;
}

.operation-times > div {
  padding: 9px 11px;
  border-radius: 8px;
  background: var(--white);
}

.operation-times span,
.operation-times strong {
  display: block;
}

.operation-times span {
  color: var(--muted);
  font-size: 0.67rem;
  text-transform: uppercase;
}

.operation-times strong {
  margin-top: 3px;
  color: var(--navy-900);
  font-size: 0.83rem;
}

.operation-fields {
  display: grid;
  grid-template-columns: 160px 180px;
  gap: 10px;
  margin-top: 11px;
}

.operation-buttons {
  display: flex;
  margin-top: 12px;
  gap: 7px;
  flex-wrap: wrap;
}

.operation-actual {
  margin: 11px 0 0;
  color: var(--muted);
  font-size: 0.76rem;
}

.trip-timeline-section {
  margin-top: 24px;
}

.section-heading {
  display: flex;
  margin-bottom: 14px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

@media (max-width: 860px) {
  .status-information-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .status-info-home {
    grid-column: span 2;
  }

  .clock-control-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 620px) {
  .live-status-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .status-icon {
    display: none;
  }

  .status-information-grid {
    grid-template-columns: 1fr 1fr;
  }

  .status-info-home {
    grid-column: 1 / -1;
  }

  .operation-heading,
  .operation-times {
    align-items: stretch;
    grid-template-columns: 1fr;
  }

  .operation-heading {
    display: flex;
    flex-direction: column;
  }

  .operation-fields {
    grid-template-columns: 1fr 1fr;
  }

  .operation-buttons .button {
    flex: 1 1 130px;
  }
}

@media (max-width: 430px) {
  .status-information-grid,
  .operation-fields {
    grid-template-columns: 1fr;
  }

  .status-info-home {
    grid-column: auto;
  }
}


/* Version 0.3.1 route-verification additions */

.route-review-banner {
  margin-top: 18px;
  padding: 14px 16px;
  border: 1px solid #a9c6e3;
  border-radius: 10px;
  background: #edf6ff;
}

.route-review-banner span,
.route-review-banner strong,
.route-review-banner small {
  display: block;
}

.route-review-banner span {
  color: #52677c;
  font-size: 0.68rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.route-review-banner strong {
  margin: 5px 0;
  color: #0d2f55;
  font-size: clamp(1rem, 3vw, 1.3rem);
  overflow-wrap: anywhere;
}

.route-review-banner small {
  color: #607080;
}


/* ================================================================
   Version 0.4.0 — secure live FlightAware integration
   ================================================================ */

select {
  width: 100%;
  min-height: 41px;
  padding: 0 10px;
  border: 1px solid #bdc9d5;
  border-radius: 8px;
  background: #ffffff;
  color: var(--text);
  font: inherit;
}

.live-provider-panel {
  margin-top: 18px;
}

.connection-badge,
.provider-badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  align-items: center;
  font-size: 0.68rem;
  font-weight: 820;
  text-transform: uppercase;
}

.connection-configured {
  background: #dff4e5;
  color: #17602f;
}

.connection-not-configured {
  background: #fff0c9;
  color: #735200;
}

.provider-badge {
  margin-left: 8px;
  background: #dceefe;
  color: #0b4f87;
}

.live-settings-grid {
  display: grid;
  grid-template-columns: 1.3fr 1fr 0.65fr 0.75fr;
  gap: 11px;
  margin-top: 17px;
}

.live-toggle-row,
.live-provider-actions {
  display: flex;
  margin-top: 13px;
  gap: 9px;
  flex-wrap: wrap;
}

.live-connection-status {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 9px;
  margin-top: 14px;
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--blue-050);
}

.live-connection-status > div {
  min-width: 0;
}

.live-connection-status span,
.live-connection-status strong {
  display: block;
}

.live-connection-status span {
  color: var(--muted);
  font-size: 0.67rem;
  text-transform: uppercase;
}

.live-connection-status strong {
  margin-top: 3px;
  color: var(--navy-900);
  font-size: 0.86rem;
  overflow-wrap: anywhere;
}

.live-sync-error {
  grid-column: 1 / -1;
  margin: 2px 0 0;
  color: #8b1f1f;
  font-size: 0.78rem;
}

.live-setup-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.78rem;
  line-height: 1.4;
}

.live-flight-details {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 7px;
  margin-top: 11px;
  padding: 10px;
  border-radius: 8px;
  background: #ffffff;
}

.live-flight-details span,
.live-flight-details strong {
  display: block;
}

.live-flight-details span {
  color: var(--muted);
  font-size: 0.68rem;
}

.live-flight-details strong {
  margin-top: 2px;
  color: var(--navy-900);
  font-size: 0.78rem;
}

.live-flight-error {
  margin: 10px 0 0;
  color: #8b1f1f;
  font-size: 0.76rem;
}

@media (max-width: 940px) {
  .live-settings-grid {
    grid-template-columns: 1fr 1fr;
  }

  .live-url-field {
    grid-column: 1 / -1;
  }

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

@media (max-width: 620px) {
  .live-settings-grid,
  .live-connection-status {
    grid-template-columns: 1fr;
  }

  .live-url-field,
  .live-sync-error {
    grid-column: auto;
  }

  .live-provider-actions .button {
    width: 100%;
  }

  .live-flight-details {
    grid-template-columns: 1fr 1fr;
  }
}


/* Version 0.4.2 — FlightAware active-window status */

.live-flight-deferred {
  margin: 10px 0 0;
  padding: 9px 11px;
  border-radius: 8px;
  background: #eef4fb;
  color: #35526e;
  font-size: 0.76rem;
  line-height: 1.45;
}


/* ================================================================
   Version 0.5.0 — Google sign-in, Firestore sync, and trip history
   ================================================================ */

.topbar-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  flex-wrap: wrap;
}

.auth-controls {
  min-height: 42px;
}

.cloud-header-status {
  display: inline-flex;
  max-width: 240px;
  min-height: 40px;
  padding: 7px 11px;
  border-radius: 9px;
  align-items: center;
  background: var(--blue-050);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 700;
  line-height: 1.25;
}

.signed-in-user {
  display: flex;
  min-height: 44px;
  padding: 5px 6px 5px 8px;
  border: 1px solid var(--border);
  border-radius: 11px;
  align-items: center;
  gap: 8px;
  background: var(--white);
}

.signed-in-user img,
.user-initials {
  width: 32px;
  height: 32px;
  flex: 0 0 auto;
  border-radius: 50%;
}

.signed-in-user img {
  object-fit: cover;
}

.user-initials {
  display: grid;
  background: var(--navy-800);
  color: var(--white);
  place-items: center;
  font-size: 0.72rem;
  font-weight: 850;
}

.signed-in-user div {
  min-width: 0;
}

.signed-in-user strong,
.signed-in-user small {
  display: block;
  max-width: 170px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.signed-in-user strong {
  color: var(--navy-950);
  font-size: 0.78rem;
}

.signed-in-user small {
  color: var(--muted);
  font-size: 0.66rem;
}

.cloud-sync-panel {
  display: flex;
  margin-top: 14px;
  align-items: center;
  gap: 14px;
}

.cloud-sync-active {
  border-color: #a7d4b4;
  background: #f7fcf8;
}

.cloud-sync-icon {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--blue-100);
  color: var(--navy-800);
  place-items: center;
  font-size: 1.45rem;
  font-weight: 900;
}

.cloud-sync-active .cloud-sync-icon {
  background: var(--success-bg);
  color: var(--success-text);
}

.cloud-sync-main {
  min-width: 0;
  flex: 1;
}

.cloud-sync-main h2,
.cloud-sync-panel h2 {
  margin-bottom: 4px;
  font-size: 1.15rem;
}

.cloud-sync-actions {
  display: flex;
  margin-left: auto;
  gap: 8px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

.trip-library-intro {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.trip-library-group {
  margin-top: 24px;
}

.trip-count {
  display: grid;
  min-width: 34px;
  height: 34px;
  padding: 0 8px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--navy-800);
  place-items: center;
  font-size: 0.8rem;
  font-weight: 850;
}

.cloud-trip-list {
  display: grid;
  gap: 12px;
}

.cloud-trip-card {
  padding: 17px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(20, 35, 50, 0.06);
}

.cloud-trip-card-active {
  border-color: #75a8d4;
  box-shadow: 0 0 0 2px rgba(26, 76, 132, 0.08);
}

.cloud-trip-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.cloud-trip-card-heading h3 {
  margin: 7px 0 3px;
}

.cloud-trip-card-heading p {
  margin: 0;
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 650;
}

.trip-bucket,
.active-trip-label {
  display: inline-flex;
  padding: 4px 8px;
  border-radius: 999px;
  font-size: 0.64rem;
  font-weight: 850;
  letter-spacing: 0.03em;
  text-transform: uppercase;
}

.trip-bucket-current {
  background: #dceefe;
  color: #0b4f87;
}

.trip-bucket-upcoming {
  background: #ede6ff;
  color: #59419a;
}

.trip-bucket-completed {
  background: var(--success-bg);
  color: var(--success-text);
}

.trip-bucket-archived {
  background: #e8ebee;
  color: #596673;
}

.active-trip-label {
  background: #fff0c9;
  color: #735200;
}

.cloud-trip-meta {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 7px 14px;
  margin-top: 13px;
  padding: 11px;
  border-radius: 9px;
  background: var(--blue-050);
  color: var(--muted);
  font-size: 0.76rem;
}

.cloud-trip-meta strong {
  color: var(--navy-900);
}

.cloud-trip-actions {
  display: flex;
  margin-top: 13px;
  gap: 7px;
  flex-wrap: wrap;
}

.cloud-pulse {
  animation: cloudPulse 1.2s ease-in-out infinite;
}

@keyframes cloudPulse {
  0%, 100% { opacity: 0.55; transform: scale(0.96); }
  50% { opacity: 1; transform: scale(1.04); }
}

@media (max-width: 940px) {
  .topbar-inner {
    align-items: flex-start;
  }

  .topbar-actions {
    align-items: flex-end;
    flex-direction: column;
  }

  .cloud-sync-panel {
    align-items: flex-start;
    flex-wrap: wrap;
  }

  .cloud-sync-actions {
    width: 100%;
    margin-left: 62px;
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .topbar-inner,
  .topbar-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .view-tabs {
    overflow-x: auto;
  }

  .tab-button {
    flex: 1 0 auto;
  }

  .signed-in-user {
    justify-content: space-between;
  }

  .signed-in-user strong,
  .signed-in-user small {
    max-width: 220px;
  }

  .cloud-sync-actions {
    margin-left: 0;
  }

  .cloud-sync-actions .button,
  .trip-library-intro .button {
    width: 100%;
  }

  .trip-library-intro,
  .cloud-trip-card-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .cloud-trip-meta {
    grid-template-columns: 1fr;
  }
}


/* ================================================================
   Version 0.6.0 — secure, revocable read-only trip sharing
   ================================================================ */

.share-trip-dialog {
  width: min(680px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 15px;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(15, 30, 45, 0.28);
}

.share-trip-dialog::backdrop {
  background: rgba(12, 25, 38, 0.62);
  backdrop-filter: blur(3px);
}

.share-dialog-shell {
  margin: 0;
}

.share-dialog-header {
  display: flex;
  padding: 20px 22px 15px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
}

.share-dialog-header h2 {
  margin: 3px 0 0;
}

.dialog-close-button {
  width: 38px;
  height: 38px;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: var(--blue-050);
  color: var(--navy-900);
  cursor: pointer;
  font-size: 1.55rem;
  line-height: 1;
}

.share-dialog-content {
  padding: 20px 22px 24px;
}

.share-dialog-section {
  display: grid;
  gap: 17px;
}

.share-privacy-callout,
.share-active-callout {
  padding: 14px;
  border-radius: 11px;
}

.share-privacy-callout {
  border: 1px solid #d7e5f3;
  background: #f4f8fc;
}

.share-active-callout {
  display: flex;
  border: 1px solid #abd8b7;
  align-items: flex-start;
  gap: 11px;
  background: #f3fbf5;
}

.share-privacy-callout p,
.share-active-callout p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.48;
}

.share-active-icon {
  display: grid;
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--success-bg);
  color: var(--success-text);
  place-items: center;
  font-weight: 900;
}

.share-expiration-control,
.share-link-field {
  display: grid;
  gap: 7px;
  color: var(--navy-900);
  font-size: 0.78rem;
  font-weight: 780;
}

.share-expiration-control select,
.share-link-field input {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
  color: var(--navy-950);
}

.share-expiration-control select {
  padding: 0 12px;
}

.share-link-field > div {
  display: flex;
  gap: 8px;
}

.share-link-field input {
  min-width: 0;
  padding: 0 11px;
  flex: 1;
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.72rem;
}

.share-dialog-actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.share-security-note {
  margin: 0;
  padding-top: 4px;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
}

.shared-header-label {
  display: inline-flex;
  min-height: 42px;
  padding: 8px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  align-items: center;
  gap: 7px;
  background: var(--white);
  color: var(--navy-900);
  font-size: 0.78rem;
  font-weight: 800;
}

.shared-view-banner {
  display: flex;
  margin-bottom: 14px;
  align-items: center;
  gap: 14px;
  border-color: #c7d9e8;
  background: linear-gradient(135deg, #f7fbff, #f2f7fc);
}

.shared-view-lock {
  display: grid;
  width: 48px;
  height: 48px;
  flex: 0 0 auto;
  border-radius: 50%;
  background: var(--blue-100);
  place-items: center;
  font-size: 1.25rem;
}

.shared-view-main {
  min-width: 0;
  flex: 1;
}

.shared-view-main h2 {
  margin: 2px 0 4px;
}

.shared-view-main p {
  margin: 0;
  color: var(--muted);
  font-size: 0.8rem;
  line-height: 1.45;
}

.shared-view-timestamps {
  display: grid;
  min-width: 190px;
  text-align: right;
}

.shared-view-timestamps span,
.shared-view-timestamps small {
  color: var(--muted);
  font-size: 0.68rem;
}

.shared-view-timestamps strong {
  color: var(--navy-950);
  font-size: 0.84rem;
}

.share-mode-pending body {
  visibility: hidden;
}

.share-mode .view-tabs,
.share-mode #authControls,
.share-mode footer {
  display: none !important;
}

.share-mode .topbar-actions {
  display: flex;
}

.share-mode .app-main {
  min-height: calc(100vh - 95px);
}

.share-mode .live-status-card,
.share-mode .duty-card,
.share-mode .panel {
  user-select: text;
}

.shared-view-error {
  min-height: 55vh;
}

@media (max-width: 700px) {
  .share-link-field > div,
  .share-dialog-actions,
  .shared-view-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .share-dialog-actions .button,
  .share-link-field .button {
    width: 100%;
  }

  .shared-view-timestamps {
    min-width: 0;
    text-align: left;
  }
}


/* ================================================================
   Version 0.7.0 — Firebase Cloud Messaging push notifications
   ================================================================ */

.notification-dialog {
  width: min(760px, calc(100vw - 28px));
  max-height: calc(100vh - 32px);
  padding: 0;
  border: 0;
  border-radius: 15px;
  overflow: auto;
  background: var(--white);
  box-shadow: 0 24px 70px rgba(15, 30, 45, 0.28);
}

.notification-dialog::backdrop {
  background: rgba(12, 25, 38, 0.62);
  backdrop-filter: blur(3px);
}

.notification-dialog-shell {
  margin: 0;
}

.notification-dialog-header {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 2;
  padding: 20px 22px 15px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  justify-content: space-between;
  gap: 14px;
  background: var(--white);
}

.notification-dialog-header h2 {
  margin: 3px 0 0;
}

.notification-dialog-content {
  display: grid;
  padding: 20px 22px 25px;
  gap: 18px;
}

.notification-device-card {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.notification-device-card > div {
  padding: 12px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--blue-050);
}

.notification-device-card span,
.background-monitor-status span {
  display: block;
  color: var(--muted);
  font-size: 0.68rem;
  font-weight: 700;
}

.notification-device-card strong,
.background-monitor-status strong {
  display: block;
  margin-top: 3px;
  color: var(--navy-950);
  font-size: 0.82rem;
}

.notification-dialog-section {
  display: grid;
  padding-top: 17px;
  border-top: 1px solid var(--border);
  gap: 14px;
}

.notification-dialog-section h3 {
  margin: 2px 0 0;
  font-size: 1rem;
}

.notification-action-row {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

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

.notification-checkbox {
  display: flex;
  min-height: 44px;
  padding: 9px 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  align-items: center;
  gap: 9px;
  background: var(--white);
  color: var(--navy-900);
  font-size: 0.78rem;
  font-weight: 700;
}

.notification-checkbox input {
  width: 18px;
  height: 18px;
  flex: 0 0 auto;
}

.notification-delay-control {
  display: grid;
  max-width: 280px;
  gap: 6px;
  color: var(--navy-900);
  font-size: 0.76rem;
  font-weight: 750;
}

.notification-delay-control select {
  min-height: 43px;
  padding: 0 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
}

.notification-monitor-badge {
  display: inline-flex;
  padding: 5px 9px;
  border-radius: 999px;
  background: #e8ebee;
  color: #596673;
  font-size: 0.66rem;
  font-weight: 850;
  text-transform: uppercase;
}

.notification-monitor-active {
  background: var(--success-bg);
  color: var(--success-text);
}

.background-monitor-status {
  padding: 12px;
  border-radius: 10px;
  background: var(--blue-050);
}

.background-monitor-status small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.7rem;
}

.background-monitor-status p {
  margin: 8px 0 0;
  color: var(--danger-text);
  font-size: 0.74rem;
}

.notification-history-list {
  display: grid;
  gap: 8px;
}

.notification-history-list article {
  position: relative;
  padding: 11px 120px 11px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
}

.notification-history-list strong {
  display: block;
  color: var(--navy-950);
  font-size: 0.8rem;
}

.notification-history-list p {
  margin: 3px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
}

.notification-history-list small {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--muted);
  font-size: 0.66rem;
}

.notification-empty-history,
.notification-browser-note {
  margin: 0;
  font-size: 0.73rem;
}

.notification-browser-note {
  padding: 11px;
  border-radius: 9px;
  background: #fff8e6;
  color: #6a5521;
  line-height: 1.45;
}

@media (max-width: 700px) {
  .notification-device-card,
  .notification-preference-grid {
    grid-template-columns: 1fr;
  }

  .notification-action-row {
    flex-direction: column;
  }

  .notification-action-row .button {
    width: 100%;
  }

  .notification-history-list article {
    padding-right: 12px;
  }

  .notification-history-list small {
    position: static;
    display: block;
    margin-top: 6px;
  }
}


/* ================================================================
   Version 0.8.0 — installable PWA, offline shell, and live trip map
   ================================================================ */

.header-utility-controls {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 9px;
  flex-wrap: wrap;
}

.pwa-controls {
  min-height: 38px;
}

.pwa-installed-badge {
  display: inline-flex;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid #b8dcc2;
  border-radius: 9px;
  align-items: center;
  gap: 6px;
  background: var(--success-bg);
  color: var(--success-text);
  font-size: 0.72rem;
  font-weight: 800;
}

.network-status-banner {
  display: flex;
  position: sticky;
  top: 0;
  z-index: 20;
  padding: 10px max(18px, calc((100vw - 1180px) / 2));
  align-items: center;
  gap: 10px;
  background: #fff1c9;
  color: #624d18;
  box-shadow: 0 4px 14px rgba(72, 55, 14, 0.14);
}

.network-status-banner > span {
  font-size: 1.15rem;
}

.network-status-banner strong,
.network-status-banner p {
  display: block;
  margin: 0;
}

.network-status-banner p {
  margin-top: 2px;
  font-size: 0.74rem;
  line-height: 1.4;
}

.mct-offline .live-indicator .live-dot {
  background: #c88a00;
  box-shadow: 0 0 0 5px rgba(200, 138, 0, 0.15);
}

.trip-map-panel {
  padding: 0;
  overflow: hidden;
}

.trip-map-content {
  min-height: 340px;
}

.trip-map-loading {
  display: grid;
  min-height: 340px;
  place-items: center;
  align-content: center;
  gap: 9px;
  color: var(--muted);
}

.trip-map-loading span {
  font-size: 2rem;
}

.trip-map-heading {
  display: flex;
  padding: 17px 18px 13px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.trip-map-heading h2 {
  margin: 2px 0 4px;
  font-size: 1.25rem;
}

.trip-map-heading p {
  margin: 0;
}

.trip-map-actions {
  display: flex;
  gap: 7px;
}

.trip-map-stage {
  min-height: 330px;
  padding: 0 12px;
}

.trip-map-svg {
  display: block;
  width: 100%;
  max-height: 530px;
  border-radius: 14px;
  background: #e5f2f8;
}

.trip-map-ocean {
  fill: url(#tripMapOcean);
}

.trip-map-grid line {
  stroke: rgba(51, 94, 127, 0.15);
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.trip-map-land {
  fill: #d6dfd4;
  stroke: #a9b7aa;
  stroke-width: 0.8;
  fill-rule: evenodd;
  vector-effect: non-scaling-stroke;
}

.trip-map-leg {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 4;
  opacity: 0.95;
  filter: url(#tripMapShadow);
}

.trip-map-leg-complete {
  stroke: #3c9971;
}

.trip-map-leg-active {
  stroke: #ef8d32;
  stroke-width: 6;
}

.trip-map-leg-upcoming {
  stroke: #527fa7;
  stroke-dasharray: 10 9;
  opacity: 0.75;
}

.trip-map-leg-cancelled {
  stroke: #bb4c4c;
  stroke-dasharray: 5 7;
}

.trip-map-airport circle {
  fill: #ffffff;
  stroke: #174974;
  stroke-width: 2.5;
  vector-effect: non-scaling-stroke;
}

.trip-map-airport .trip-map-airport-core {
  fill: #174974;
  stroke: none;
}

.trip-map-airport text {
  fill: #123b69;
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.94);
  stroke-width: 5px;
  stroke-linejoin: round;
  font-size: 18px;
  font-weight: 900;
  letter-spacing: 0.03em;
}

.trip-map-airport-approximate circle {
  stroke-dasharray: 3 3;
}

.trip-map-aircraft circle {
  fill: #ef8d32;
  stroke: #ffffff;
  stroke-width: 4;
  filter: url(#tripMapShadow);
  vector-effect: non-scaling-stroke;
}

.trip-map-aircraft path {
  fill: #ffffff;
  stroke: #a55210;
  stroke-width: 1;
  vector-effect: non-scaling-stroke;
}

.trip-map-current-airport circle:first-child {
  fill: rgba(42, 129, 187, 0.18);
  stroke: #2a81bb;
  stroke-width: 2;
  vector-effect: non-scaling-stroke;
}

.trip-map-current-airport circle:last-child {
  fill: #2a81bb;
  stroke: #ffffff;
  stroke-width: 3;
  vector-effect: non-scaling-stroke;
}

.trip-map-footer {
  display: flex;
  padding: 12px 18px 16px;
  border-top: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  gap: 16px;
}

.trip-map-footer p {
  max-width: 620px;
  margin: 0;
  color: var(--muted);
  font-size: 0.72rem;
  line-height: 1.45;
  text-align: right;
}

.trip-map-legend {
  display: flex;
  gap: 12px;
  flex-wrap: wrap;
}

.trip-map-legend span {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.trip-map-legend-line {
  display: inline-block;
  width: 25px;
  height: 0;
  border-top: 4px solid;
  border-radius: 99px;
}

.trip-map-legend-complete {
  border-color: #3c9971;
}

.trip-map-legend-active {
  border-color: #ef8d32;
}

.trip-map-legend-upcoming {
  border-color: #527fa7;
  border-top-style: dashed;
}

.shared-view-banner .trip-map-panel {
  margin-top: 0;
}

.share-mode .trip-map-actions button {
  pointer-events: auto;
}

@media (max-width: 940px) {
  .header-utility-controls {
    width: 100%;
    justify-content: flex-end;
  }

  .trip-map-footer {
    align-items: flex-start;
    flex-direction: column;
  }

  .trip-map-footer p {
    text-align: left;
  }
}

@media (max-width: 700px) {
  .header-utility-controls {
    align-items: stretch;
    flex-direction: column;
  }

  .pwa-controls .button,
  .pwa-installed-badge {
    width: 100%;
    justify-content: center;
  }

  .network-status-banner {
    position: relative;
    padding: 10px 14px;
  }

  .trip-map-heading {
    align-items: stretch;
    flex-direction: column;
  }

  .trip-map-actions {
    width: 100%;
  }

  .trip-map-actions .button {
    flex: 1;
  }

  .trip-map-stage {
    min-height: 250px;
    padding: 0;
  }

  .trip-map-svg {
    min-height: 270px;
    border-radius: 0;
  }

  .trip-map-footer {
    padding: 12px 14px 15px;
  }

  .trip-map-legend {
    gap: 9px;
  }

  .trip-map-airport text {
    font-size: 21px;
  }

  .trip-timeline-section .duty-list {
    display: grid;
    grid-auto-flow: column;
    grid-auto-columns: min(88vw, 620px);
    gap: 12px;
    padding: 3px 4px 14px;
    overflow-x: auto;
    overscroll-behavior-inline: contain;
    scroll-snap-type: x mandatory;
    scrollbar-width: thin;
  }

  .trip-timeline-section .duty-card {
    height: fit-content;
    scroll-snap-align: start;
    scroll-snap-stop: always;
  }
}

@media (display-mode: standalone) {
  body {
    overscroll-behavior-y: none;
  }

  .topbar {
    padding-top: env(safe-area-inset-top);
  }

  .page-shell {
    padding-bottom: max(22px, env(safe-area-inset-bottom));
  }
}


/* ================================================================
   Version 0.9.0 — diagnostics, usage safeguards, backup, and privacy
   ================================================================ */

.system-intro-panel {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.system-status-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  margin-top: 14px;
  gap: 12px;
}

.system-status-card {
  min-height: 138px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--white);
  box-shadow: 0 4px 16px rgba(20, 35, 50, 0.05);
}

.system-status-card > span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.system-status-card > strong {
  display: block;
  margin-top: 8px;
  color: var(--navy-950);
  font-size: 1.1rem;
}

.system-status-card > p {
  margin: 7px 0 0;
  color: var(--muted);
  font-size: 0.74rem;
  line-height: 1.45;
}

.system-status-good {
  border-color: #b7dcc1;
  background: #f7fcf8;
}

.system-status-warning {
  border-color: #e6d39d;
  background: #fffaf0;
}

.system-section {
  margin-top: 16px;
}

.system-count-grid,
.system-detail-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.system-count-grid > div,
.system-detail-grid > div {
  min-height: 88px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--blue-050);
}

.system-count-grid span,
.system-detail-grid span {
  display: block;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
}

.system-count-grid strong,
.system-detail-grid strong {
  display: block;
  margin-top: 5px;
  color: var(--navy-950);
  font-size: 1.12rem;
}

.system-detail-grid small {
  display: block;
  margin-top: 3px;
  color: var(--muted);
  font-size: 0.65rem;
}

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

.usage-safeguard-grid article {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--white);
}

.usage-safeguard-grid article > strong {
  display: block;
  margin-bottom: 9px;
  color: var(--navy-900);
  font-size: 0.8rem;
}

.usage-safeguard-grid article > div {
  display: flex;
  padding: 4px 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  color: var(--muted);
  font-size: 0.72rem;
}

.usage-safeguard-grid b {
  color: var(--navy-950);
}

.system-consent-control {
  display: flex;
  margin-top: 15px;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  align-items: flex-start;
  gap: 11px;
  background: #f7fafc;
}

.system-consent-control input {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
}

.system-consent-control strong,
.system-consent-control small {
  display: block;
}

.system-consent-control strong {
  color: var(--navy-950);
  font-size: 0.8rem;
}

.system-consent-control small {
  margin-top: 4px;
  color: var(--muted);
  font-size: 0.7rem;
  line-height: 1.42;
}

.system-action-row {
  display: flex;
  margin-top: 14px;
  gap: 8px;
  flex-wrap: wrap;
}

.system-error-list {
  display: grid;
  margin-top: 14px;
  gap: 8px;
}

.system-error-list article {
  position: relative;
  padding: 11px 130px 11px 12px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
}

.system-error-list article > div {
  display: flex;
  align-items: center;
  gap: 8px;
}

.system-error-list strong {
  display: block;
  color: var(--navy-950);
  font-size: 0.77rem;
}

.system-error-list article > div span {
  display: inline-flex;
  padding: 3px 6px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--navy-800);
  font-size: 0.58rem;
  font-weight: 800;
  text-transform: uppercase;
}

.system-error-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.69rem;
}

.system-error-list small {
  position: absolute;
  top: 12px;
  right: 12px;
  color: var(--muted);
  font-size: 0.64rem;
}

.privacy-action-list {
  display: grid;
  gap: 9px;
}

.privacy-action-list article {
  display: flex;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--white);
}

.privacy-action-list strong {
  color: var(--navy-950);
  font-size: 0.82rem;
}

.privacy-action-list p {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.42;
}

.privacy-danger-zone {
  border-color: #e0b1b1 !important;
  background: #fff8f8 !important;
}

@media (max-width: 940px) {
  .system-status-grid,
  .system-count-grid,
  .system-detail-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 700px) {
  .system-intro-panel,
  .privacy-action-list article {
    align-items: stretch;
    flex-direction: column;
  }

  .system-intro-panel .button,
  .privacy-action-list .button,
  .system-action-row .button {
    width: 100%;
  }

  .system-status-grid,
  .system-count-grid,
  .system-detail-grid,
  .usage-safeguard-grid {
    grid-template-columns: 1fr;
  }

  .system-action-row {
    flex-direction: column;
  }

  .system-error-list article {
    padding-right: 12px;
  }

  .system-error-list small {
    position: static;
    display: block;
    margin-top: 6px;
  }
}


/* ================================================================
   Version 1.0.0 — release candidate experience and accessibility
   ================================================================ */

.skip-link {
  position: fixed;
  top: 8px;
  left: 8px;
  z-index: 1000;
  padding: 10px 14px;
  border-radius: 8px;
  background: #ffffff;
  color: #123b69;
  font-weight: 850;
  box-shadow: 0 4px 18px rgba(12, 28, 45, 0.28);
  transform: translateY(-150%);
}

.skip-link:focus {
  transform: translateY(0);
}

.release-health-control {
  min-height: 38px;
}

.release-health-pill {
  display: inline-flex;
  min-height: 38px;
  padding: 7px 11px;
  border: 1px solid var(--border);
  border-radius: 999px;
  align-items: center;
  gap: 6px;
  background: var(--white);
  color: var(--navy-900);
  cursor: pointer;
  font-size: 0.7rem;
  font-weight: 850;
}

.release-health-good {
  border-color: #b8dcc2;
  background: var(--success-bg);
  color: var(--success-text);
}

.release-health-warning {
  border-color: #e4c98b;
  background: #fff8e6;
  color: #745611;
}

.release-health-offline {
  border-color: #bdc8d2;
  background: #f1f4f7;
  color: #4b5d6e;
}

.mobile-bottom-nav {
  display: none;
}

.release-recovery-panel {
  display: flex;
  position: fixed;
  right: 18px;
  bottom: 18px;
  left: 18px;
  z-index: 80;
  max-width: 980px;
  margin: 0 auto;
  padding: 13px 15px;
  border: 1px solid #e1ae72;
  border-radius: 12px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: #fff8e8;
  color: #644613;
  box-shadow: 0 16px 46px rgba(38, 31, 18, 0.24);
}

.release-recovery-panel strong,
.release-recovery-panel p {
  display: block;
  margin: 0;
}

.release-recovery-panel p {
  margin-top: 3px;
  font-size: 0.73rem;
  line-height: 1.42;
}

.release-recovery-actions {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.release-onboarding-dialog {
  width: min(760px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: auto;
  background: var(--white);
  box-shadow: 0 28px 84px rgba(10, 25, 40, 0.35);
}

.release-onboarding-dialog::backdrop {
  background: rgba(8, 22, 35, 0.68);
  backdrop-filter: blur(4px);
}

.release-onboarding-shell {
  margin: 0;
}

.release-onboarding-shell > header,
.release-onboarding-shell > footer {
  display: flex;
  position: sticky;
  z-index: 2;
  padding: 17px 20px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--white);
}

.release-onboarding-shell > header {
  top: 0;
  border-bottom: 1px solid var(--border);
}

.release-onboarding-shell > footer {
  bottom: 0;
  border-top: 1px solid var(--border);
}

.release-onboarding-shell h2 {
  margin: 2px 0 0;
}

.onboarding-progress {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  margin: 0;
  padding: 14px 20px;
  list-style: none;
  background: var(--blue-050);
}

.onboarding-progress li {
  display: grid;
  position: relative;
  place-items: center;
  gap: 5px;
  color: var(--muted);
  text-align: center;
}

.onboarding-progress li:not(:last-child)::after {
  position: absolute;
  top: 14px;
  right: -50%;
  left: 50%;
  height: 2px;
  background: #cbd7e1;
  content: "";
}

.onboarding-progress li span {
  display: grid;
  z-index: 1;
  width: 29px;
  height: 29px;
  border: 2px solid #b6c5d2;
  border-radius: 999px;
  place-items: center;
  background: var(--white);
  font-size: 0.7rem;
  font-weight: 900;
}

.onboarding-progress li.active span,
.onboarding-progress li.complete span {
  border-color: #276f9e;
  background: #276f9e;
  color: #ffffff;
}

.onboarding-progress li.complete:not(:last-child)::after {
  background: #55a67b;
}

.onboarding-progress small {
  font-size: 0.62rem;
  font-weight: 750;
}

.release-onboarding-body {
  min-height: 310px;
  padding: 26px 22px;
}

.onboarding-hero {
  display: grid;
  min-height: 250px;
  place-items: center;
  align-content: center;
  text-align: center;
}

.onboarding-hero > span {
  font-size: 3.3rem;
}

.onboarding-hero h2 {
  margin: 12px 0 7px;
}

.onboarding-hero p {
  max-width: 560px;
  margin: 0;
  color: var(--muted);
  line-height: 1.55;
}

.onboarding-fields,
.help-settings-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.onboarding-fields label,
.help-settings-grid label {
  display: grid;
  gap: 6px;
}

.onboarding-fields span,
.help-settings-grid span {
  color: var(--navy-900);
  font-size: 0.72rem;
  font-weight: 750;
}

.onboarding-check-card {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 12px;
  background: var(--blue-050);
}

.onboarding-check-card span,
.onboarding-check-card strong {
  display: block;
}

.onboarding-check-card span {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 800;
  text-transform: uppercase;
}

.onboarding-check-card strong {
  margin-top: 6px;
  color: var(--navy-950);
  font-size: 1.2rem;
}

.onboarding-check-card p {
  margin: 8px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.onboarding-action-grid {
  display: flex;
  margin-top: 14px;
  gap: 8px;
  flex-wrap: wrap;
}

.onboarding-health-results {
  display: grid;
  gap: 9px;
}

.onboarding-health-line {
  display: flex;
  padding: 11px;
  border: 1px solid var(--border);
  border-radius: 9px;
  align-items: center;
  gap: 10px;
}

.onboarding-health-line > span {
  display: grid;
  width: 29px;
  height: 29px;
  flex: 0 0 auto;
  border-radius: 999px;
  place-items: center;
  font-weight: 900;
}

.onboarding-health-line.good > span {
  background: var(--success-bg);
  color: var(--success-text);
}

.onboarding-health-line.warning > span {
  background: #fff1c9;
  color: #76550b;
}

.onboarding-health-line strong,
.onboarding-health-line small {
  display: block;
}

.onboarding-health-line strong {
  color: var(--navy-950);
  font-size: 0.78rem;
}

.onboarding-health-line small {
  margin-top: 2px;
  color: var(--muted);
  font-size: 0.68rem;
}

.health-spinner {
  font-size: 2rem;
  animation: release-spin 2s linear infinite;
}

.help-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.help-section {
  margin-top: 15px;
}

.help-section > h2 {
  margin: 3px 0 14px;
}

.help-switch {
  margin-top: 12px;
}

.help-definition-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.help-definition-grid article {
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: var(--blue-050);
}

.help-definition-grid strong {
  color: var(--navy-950);
  font-size: 0.8rem;
}

.help-definition-grid p {
  margin: 5px 0 0;
  color: var(--muted);
  font-size: 0.71rem;
  line-height: 1.45;
}

.help-section details {
  padding: 11px 0;
  border-top: 1px solid var(--border);
}

.help-section details:last-child {
  border-bottom: 1px solid var(--border);
}

.help-section summary {
  color: var(--navy-950);
  cursor: pointer;
  font-weight: 800;
}

.help-section details p,
.help-section details ol {
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.55;
}

.help-list {
  margin: 0;
  padding-left: 21px;
  color: var(--muted);
  font-size: 0.76rem;
  line-height: 1.6;
}

.trip-library-tools {
  display: grid;
  margin-top: 14px;
  gap: 12px;
}

.trip-library-search {
  display: grid;
  max-width: 620px;
  gap: 6px;
}

.trip-library-search span {
  color: var(--navy-900);
  font-size: 0.72rem;
  font-weight: 750;
}

.trip-library-filters {
  display: flex;
  gap: 7px;
  flex-wrap: wrap;
}

.compact-empty-state {
  margin-top: 14px;
  min-height: 220px;
}

.data-freshness-banner {
  display: flex;
  margin: -1px -1px 14px;
  padding: 9px 12px;
  border-radius: 11px 11px 0 0;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  font-size: 0.71rem;
}

.data-freshness-banner span {
  font-weight: 900;
  text-transform: uppercase;
}

.data-freshness-banner strong {
  font-size: 0.72rem;
}

.data-freshness-good {
  background: var(--success-bg);
  color: var(--success-text);
}

.data-freshness-warning {
  background: #fff2cf;
  color: #70520d;
}

.data-freshness-danger {
  background: #fde7e7;
  color: #8b2929;
}

.data-freshness-neutral {
  background: #edf2f6;
  color: #4b6072;
}

.operation-data-source {
  display: inline-flex;
  margin-bottom: 7px;
  padding: 4px 7px;
  border-radius: 999px;
  font-size: 0.59rem;
  font-weight: 850;
  text-transform: uppercase;
}

.operation-data-source-good {
  background: var(--success-bg);
  color: var(--success-text);
}

.operation-data-source-warning {
  background: #fff2cf;
  color: #70520d;
}

.operation-data-source-danger {
  background: #fde7e7;
  color: #8b2929;
}

.operation-data-source-neutral {
  background: #edf2f6;
  color: #4b6072;
}

@keyframes release-spin {
  to { transform: rotate(360deg); }
}

@media (max-width: 900px) {
  .help-definition-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .onboarding-fields,
  .help-settings-grid {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 700px) {
  body {
    padding-bottom: calc(72px + env(safe-area-inset-bottom));
  }

  .view-tabs {
    display: none;
  }

  .mobile-bottom-nav {
    display: grid;
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    grid-template-columns: repeat(5, minmax(0, 1fr));
    padding: 6px 5px max(6px, env(safe-area-inset-bottom));
    border-top: 1px solid var(--border);
    background: rgba(255, 255, 255, 0.97);
    box-shadow: 0 -8px 28px rgba(20, 35, 50, 0.12);
    backdrop-filter: blur(12px);
  }

  .mobile-bottom-nav button {
    display: grid;
    min-height: 51px;
    padding: 4px;
    border: 0;
    border-radius: 9px;
    place-items: center;
    gap: 1px;
    background: transparent;
    color: var(--muted);
  }

  .mobile-bottom-nav button > span {
    font-size: 1rem;
  }

  .mobile-bottom-nav button small {
    font-size: 0.6rem;
    font-weight: 800;
  }

  .mobile-bottom-nav button.active {
    background: var(--blue-100);
    color: var(--navy-900);
  }

  .release-recovery-panel,
  .help-hero {
    align-items: stretch;
    flex-direction: column;
  }

  .release-recovery-panel {
    bottom: calc(76px + env(safe-area-inset-bottom));
  }

  .release-recovery-actions {
    flex-direction: column;
  }

  .release-recovery-actions .button,
  .help-hero .button {
    width: 100%;
  }

  .onboarding-progress small {
    display: none;
  }

  .release-onboarding-body {
    min-height: 360px;
    padding: 20px 15px;
  }

  .help-definition-grid {
    grid-template-columns: 1fr;
  }

  .trip-library-filters {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .trip-library-filters .button {
    width: 100%;
  }

  .compact-mobile-cards .trip-timeline-section .duty-list {
    grid-auto-columns: min(82vw, 500px);
  }

  .compact-mobile-cards .duty-summary {
    grid-template-columns: repeat(3, minmax(0, 1fr));
  }
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    scroll-behavior: auto !important;
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

@media (forced-colors: active) {
  .release-health-pill,
  .operation-data-source,
  .data-freshness-banner,
  .mobile-bottom-nav button.active {
    border: 1px solid CanvasText;
  }
}


/* ================================================================
   Version 1.0.3 — cleaner Current Trip interface
   ================================================================ */

.compact-trip-tools {
  display: flex;
  margin: 12px 0;
  padding: 10px 12px;
  border: 1px solid var(--border);
  border-radius: 12px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--white);
  box-shadow: 0 4px 14px rgba(20, 35, 50, 0.05);
}

.compact-trip-tools-status,
.compact-trip-tools-actions {
  display: flex;
  align-items: center;
  gap: 7px;
  flex-wrap: wrap;
}

.compact-trip-tools-actions {
  justify-content: flex-end;
}

.compact-trip-tools-actions .button {
  min-height: 36px;
  padding: 7px 11px;
  font-size: 0.7rem;
}

.compact-status-chip {
  display: inline-flex;
  min-height: 30px;
  padding: 5px 9px;
  border-radius: 999px;
  align-items: center;
  gap: 6px;
  font-size: 0.65rem;
  font-weight: 850;
  white-space: nowrap;
}

.compact-status-chip small {
  font-size: 0.59rem;
  font-weight: 700;
  opacity: 0.8;
}

.compact-status-good {
  background: var(--success-bg);
  color: var(--success-text);
}

.compact-status-warning {
  background: #fff2cf;
  color: #70520d;
}

.compact-status-danger {
  background: #fde7e7;
  color: #8b2929;
}

.compact-status-neutral {
  background: #edf2f6;
  color: #4b6072;
}

.trip-tools-dialog {
  width: min(900px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 0;
  border-radius: 16px;
  overflow: hidden;
  background: var(--white);
  box-shadow: 0 28px 84px rgba(10, 25, 40, 0.36);
}

.trip-tools-dialog::backdrop {
  background: rgba(8, 22, 35, 0.67);
  backdrop-filter: blur(4px);
}

.trip-tools-dialog-fallback-open {
  display: block;
  position: fixed;
  inset: 12px;
  z-index: 100;
  margin: auto;
}

.trip-tools-dialog-shell {
  display: flex;
  max-height: calc(100vh - 24px);
  flex-direction: column;
}

.trip-tools-dialog-shell > header,
.trip-tools-dialog-shell > footer {
  display: flex;
  padding: 15px 18px;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  background: var(--white);
}

.trip-tools-dialog-shell > header {
  border-bottom: 1px solid var(--border);
}

.trip-tools-dialog-shell > footer {
  border-top: 1px solid var(--border);
  justify-content: flex-end;
}

.trip-tools-dialog-shell > header h2 {
  margin: 2px 0 4px;
}

.trip-tools-dialog-shell > header p:last-child {
  margin: 0;
}

.trip-tools-dialog-content {
  padding: 10px 18px 18px;
  overflow: auto;
  overscroll-behavior: contain;
}

.trip-tools-dialog-content > details {
  border-bottom: 1px solid var(--border);
}

.trip-tools-dialog-content > details:first-child {
  border-top: 1px solid var(--border);
}

.trip-tools-dialog-content > details > summary {
  padding: 14px 3px;
  color: var(--navy-950);
  cursor: pointer;
  font-size: 0.82rem;
  font-weight: 850;
}

.trip-tools-detail-content {
  padding: 0 2px 16px;
}

.trip-tools-action-grid {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.trip-tools-detail-heading {
  display: flex;
  margin-bottom: 10px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.trip-tools-detail-heading h3 {
  margin: 0;
}

.trip-tools-detail-heading p {
  margin: 4px 0 0;
}

.trip-tools-embedded-panel > .panel,
.trip-tools-embedded-panel .live-provider-panel,
.trip-tools-embedded-panel .simulation-panel {
  margin: 0;
  border: 0;
  box-shadow: none;
  background: var(--blue-050);
}

.trip-tools-embedded-panel .data-freshness-banner {
  margin: -1px -1px 12px;
}

.trip-tools-operations-list {
  max-height: 56vh;
  padding-right: 3px;
  overflow: auto;
}

@media (max-width: 820px) {
  .compact-trip-tools {
    align-items: stretch;
    flex-direction: column;
  }

  .compact-trip-tools-actions {
    justify-content: flex-start;
  }
}

@media (max-width: 700px) {
  .compact-trip-tools {
    padding: 9px;
  }

  .compact-trip-tools-status {
    overflow-x: auto;
    flex-wrap: nowrap;
    scrollbar-width: none;
  }

  .compact-trip-tools-status::-webkit-scrollbar {
    display: none;
  }

  .compact-trip-tools-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .compact-trip-tools-actions .button {
    width: 100%;
  }

  .trip-tools-dialog {
    width: calc(100vw - 12px);
    max-height: calc(100vh - 12px);
    border-radius: 13px;
  }

  .trip-tools-dialog-shell {
    max-height: calc(100vh - 12px);
  }

  .trip-tools-dialog-shell > header,
  .trip-tools-dialog-shell > footer,
  .trip-tools-dialog-content {
    padding-right: 13px;
    padding-left: 13px;
  }

  .trip-tools-action-grid {
    display: grid;
    grid-template-columns: 1fr;
  }

  .trip-tools-action-grid .button {
    width: 100%;
  }

  .trip-tools-detail-heading {
    align-items: stretch;
    flex-direction: column;
  }
}


/* Version 1.1.0 */
.tools-grid {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(300px, 0.75fr);
  gap: 14px;
  margin-top: 14px;
}
.tools-live-panel { grid-row: span 2; }
.tools-live-panel .live-provider-panel { margin: 0; }
.tools-hero {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.no-active-trips-state { min-height: 440px; }
.empty-state-actions {
  display: flex;
  justify-content: center;
  gap: 8px;
  flex-wrap: wrap;
}
.reroute-banner { margin-bottom: 14px; }
.shared-view-notification-button {
  align-self: center;
  white-space: nowrap;
}
.system-clock-testing { margin-bottom: 14px; }
@media (max-width: 860px) {
  .tools-grid { grid-template-columns: 1fr; }
  .tools-live-panel { grid-row: auto; }
}
@media (max-width: 700px) {
  .tools-hero { align-items: stretch; flex-direction: column; }
  .tools-hero .button { width: 100%; }
  .shared-view-banner { align-items: stretch; }
  .shared-view-notification-button { width: 100%; }
}


/* Version 1.1.1 — pairing navigation and deletion */
.trip-delete-prominent {
  margin-left: auto;
  border-width: 2px;
  font-weight: 900;
}

.archived-trip-group {
  margin-top: 24px;
  padding-top: 18px;
  border-top: 2px solid var(--border);
}

.archived-trip-help {
  margin: -4px 0 12px;
}

.archived-trip-group .cloud-trip-card {
  background: #f7f9fb;
  box-shadow: none;
}

@media (max-width: 700px) {
  .cloud-trip-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .cloud-trip-actions .button {
    width: 100%;
  }

  .cloud-trip-actions .trip-delete-prominent {
    grid-column: 1 / -1;
    margin-left: 0;
  }
}


/* Version 1.2.0 — flexible pairing import and airport labels */
.import-method-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 7px;
  margin: 16px 0 13px;
  padding: 5px;
  border-radius: 13px;
  background: var(--blue-050);
}

.import-method-tab {
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  background: transparent;
  color: var(--navy-800);
  cursor: pointer;
  font: inherit;
  font-size: 0.76rem;
  font-weight: 850;
}

.import-method-tab.active {
  background: var(--white);
  color: var(--blue-700);
  box-shadow: 0 3px 11px rgba(20, 45, 70, 0.12);
}

.import-method-panel {
  padding-top: 4px;
}

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

.image-source-card {
  display: flex;
  min-height: 150px;
  padding: 20px;
  border: 2px dashed var(--border-strong);
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 7px;
  text-align: center;
  cursor: pointer;
  background: var(--white);
  transition:
    border-color 150ms ease,
    background 150ms ease,
    transform 150ms ease;
}

.image-source-card:hover,
.image-source-card:focus-within,
.image-source-card.dragging {
  border-color: var(--blue-500);
  background: var(--blue-050);
  transform: translateY(-1px);
}

.image-source-card strong {
  color: var(--navy-950);
}

.image-source-card span:last-child {
  color: var(--text-muted);
  font-size: 0.72rem;
}

.import-file-note {
  margin: 9px 0 13px;
  font-size: 0.7rem;
}

.optional-text-details {
  margin: 10px 0;
}

.optional-text-details summary {
  cursor: pointer;
  font-weight: 800;
}

.manual-entry-panel {
  padding: 18px;
  border: 1px solid var(--border);
  border-radius: 14px;
  background: var(--blue-050);
}

.manual-entry-intro {
  display: flex;
  margin-bottom: 14px;
  align-items: flex-start;
  gap: 13px;
}

.manual-entry-intro h3 {
  margin: 0 0 5px;
}

.manual-entry-intro p {
  margin: 0;
}

.manual-entry-icon {
  display: grid;
  width: 44px;
  height: 44px;
  border-radius: 12px;
  place-items: center;
  background: var(--white);
  font-size: 1.25rem;
}

.shared-airport-display-control {
  display: flex;
  min-width: 180px;
  align-items: center;
  gap: 7px;
}

.shared-airport-display-control span {
  font-size: 0.69rem;
  font-weight: 850;
}

.shared-airport-display-control select {
  min-height: 36px;
}

.trip-map-airport text {
  font-size: 10px;
  font-weight: 850;
}

@media (max-width: 700px) {
  .import-method-tabs {
    grid-template-columns: 1fr;
  }

  .image-source-grid {
    grid-template-columns: 1fr;
  }

  .image-source-card {
    min-height: 125px;
  }

  .shared-airport-display-control {
    width: 100%;
    justify-content: space-between;
  }

  .shared-airport-display-control select {
    flex: 1;
  }
}


/* Version 1.2.1 — guided pairing completion */
.import-metadata-hidden {
  display: none;
}

.import-method-tabs {
  margin-top: 20px;
  padding: 0;
  gap: 12px;
  background: transparent;
}

.import-method-tab {
  display: flex;
  min-height: 124px;
  padding: 17px 14px;
  border: 1px solid var(--border);
  border-radius: 14px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 4px;
  background: var(--white);
  box-shadow: 0 4px 14px rgba(20, 35, 50, 0.05);
}

.import-method-tab:hover,
.import-method-tab:focus-visible {
  border-color: var(--blue-400);
  background: var(--blue-050);
}

.import-method-tab.active {
  border: 2px solid var(--navy-700);
  background: var(--blue-050);
  color: var(--blue-800);
  box-shadow: 0 7px 20px rgba(26, 91, 150, 0.14);
}

.import-method-tab strong,
.import-method-tab small {
  display: block;
}

.import-method-tab small {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 700;
}

.import-method-icon {
  margin-bottom: 4px;
  font-size: 1.35rem;
}

.review-export-hidden {
  display: none;
}

.import-retained-note {
  margin-bottom: 14px;
  padding: 10px 13px;
  border: 1px solid var(--border);
  border-radius: 10px;
  background: #f7f9fb;
  color: var(--text);
}

.import-retained-note summary {
  cursor: pointer;
  font-weight: 850;
}

.import-retained-note ul {
  margin: 9px 0 0 18px;
}

.import-retained-success {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 9px;
  background: var(--success-bg);
  color: var(--success-text);
}

.guided-completion {
  margin: 14px 0;
  padding: 18px;
  border-radius: 14px;
}

.guided-completion-needed {
  border: 1px solid #e1b85f;
  background: #fffaf0;
}

.guided-completion-complete {
  border: 1px solid #8fc5a3;
  background: var(--success-bg);
  color: var(--success-text);
}

.guided-completion-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 18px;
}

.guided-completion-heading h3 {
  margin: 2px 0 5px;
}

.guided-completion-heading p:last-child {
  margin: 0;
}

.completion-progress-ring {
  display: grid;
  width: 76px;
  height: 76px;
  flex: 0 0 76px;
  border: 6px solid #f0d28d;
  border-radius: 999px;
  place-content: center;
  text-align: center;
  background: var(--white);
}

.completion-progress-ring strong {
  font-size: 1.2rem;
  line-height: 1;
}

.completion-progress-ring span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.61rem;
  font-weight: 800;
}

.completion-check {
  display: grid;
  width: 60px;
  height: 60px;
  flex: 0 0 60px;
  border-radius: 999px;
  place-content: center;
  background: var(--white);
  font-size: 1.7rem;
  font-weight: 900;
}

.completion-question-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 11px;
  margin: 16px 0;
}

.completion-question {
  display: flex;
  padding: 13px;
  border: 2px solid transparent;
  border-radius: 11px;
  flex-direction: column;
  gap: 7px;
  background: var(--white);
}

.completion-question-missing {
  border-color: #d9a841;
}

.completion-question-conflict {
  border-color: #d66a63;
  background: #fff7f6;
}

.completion-question-uncertain {
  border-color: #7aa9d4;
  background: #f6fbff;
}

.completion-question-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 8px;
}

.completion-question-heading small {
  padding: 3px 6px;
  border-radius: 999px;
  background: #edf2f6;
  font-size: 0.56rem;
  font-weight: 850;
  text-transform: uppercase;
  white-space: nowrap;
}

.completion-question-reason {
  color: var(--text-muted);
  font-size: 0.67rem;
  line-height: 1.35;
}

.completion-question .button {
  align-self: flex-start;
}

.full-pairing-review {
  margin-top: 14px;
  border: 1px solid var(--border);
  border-radius: 13px;
  overflow: hidden;
  background: var(--white);
}

.full-pairing-review > summary {
  display: flex;
  min-height: 62px;
  padding: 13px 16px;
  align-items: center;
  cursor: pointer;
  background: #f7f9fb;
}

.full-pairing-review > summary span,
.full-pairing-review > summary strong,
.full-pairing-review > summary small {
  display: block;
}

.full-pairing-review > summary small {
  margin-top: 3px;
  color: var(--text-muted);
  font-weight: 650;
}

.full-pairing-review-body {
  padding: 0 15px 16px;
}

.review-field-needs-input input {
  border: 2px solid #d9a841;
  background: #fffaf0;
}

.review-field-needs-review input {
  border: 2px solid #7aa9d4;
  background: #f6fbff;
}

#savePairingButton:disabled {
  cursor: not-allowed;
  opacity: 0.68;
}

@media (max-width: 760px) {
  .completion-question-grid {
    grid-template-columns: 1fr;
  }

  .guided-completion-heading {
    align-items: flex-start;
  }
}

@media (max-width: 700px) {
  .import-method-tabs {
    grid-template-columns: 1fr;
  }

  .import-method-tab {
    min-height: 88px;
    align-items: flex-start;
    text-align: left;
  }

  .guided-completion {
    padding: 14px;
  }

  .guided-completion-heading {
    flex-direction: column;
  }

  .completion-progress-ring {
    width: auto;
    height: auto;
    padding: 8px 11px;
    border-width: 3px;
    border-radius: 10px;
    place-content: initial;
    text-align: left;
  }

  .completion-progress-ring strong,
  .completion-progress-ring span {
    display: inline;
  }

  .import-retained-success {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Version 2.0.0 — Import Studio */
.import-studio-panel {
  overflow: hidden;
}

.import-studio-header {
  display: flex;
  padding-bottom: 17px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  justify-content: space-between;
  gap: 18px;
}

.import-studio-header h2 {
  margin: 2px 0 6px;
}

.import-studio-header p:last-child {
  max-width: 760px;
  margin: 0;
  color: var(--text-muted);
}

.import-studio-beta {
  padding: 7px 10px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--blue-800);
  font-size: 0.64rem;
  font-weight: 900;
  text-transform: uppercase;
  white-space: nowrap;
}

.studio-basics {
  margin: 14px 0 4px;
  border: 1px solid var(--border);
  border-radius: 11px;
  background: #f8fafc;
}

.studio-basics > summary {
  display: flex;
  padding: 11px 13px;
  cursor: pointer;
}

.studio-basics > summary span,
.studio-basics > summary strong,
.studio-basics > summary small {
  display: block;
}

.studio-basics > summary small {
  margin-top: 2px;
  color: var(--text-muted);
}

.studio-basics-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
  padding: 0 13px 13px;
}

.studio-source-section,
.studio-analysis-section {
  padding-top: 22px;
}

.studio-analysis-section {
  margin-top: 22px;
  border-top: 1px solid var(--border);
}

.studio-section-heading {
  display: flex;
  margin-bottom: 13px;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.studio-section-heading h3 {
  margin: 2px 0 4px;
}

.studio-section-heading p:last-child {
  max-width: 720px;
  margin: 0;
  color: var(--text-muted);
}

.studio-count {
  padding: 6px 9px;
  border-radius: 999px;
  background: #eef3f7;
  color: var(--navy-800);
  font-size: 0.68rem;
  font-weight: 900;
  white-space: nowrap;
}

.studio-source-actions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 10px;
}

.studio-source-action {
  display: flex;
  min-height: 116px;
  padding: 16px;
  border: 1px solid var(--border);
  border-radius: 13px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  gap: 3px;
  background: var(--white);
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: center;
  box-shadow: 0 4px 13px rgba(20, 35, 50, 0.05);
}

.studio-source-action:hover,
.studio-source-action:focus-visible {
  border-color: var(--blue-500);
  background: var(--blue-050);
}

.studio-source-action > span {
  margin-bottom: 4px;
  font-size: 1.25rem;
  font-weight: 900;
}

.studio-source-action strong,
.studio-source-action small {
  display: block;
}

.studio-source-action small {
  color: var(--text-muted);
  font-size: 0.65rem;
  font-weight: 700;
}

.studio-drop-zone {
  display: flex;
  min-height: 72px;
  margin-top: 10px;
  padding: 13px;
  border: 2px dashed var(--border-strong);
  border-radius: 12px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  cursor: pointer;
  background: #fafcfd;
  text-align: center;
}

.studio-drop-zone span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.68rem;
}

.studio-drop-zone.dragging,
.studio-drop-zone:focus-visible {
  border-color: var(--blue-600);
  background: var(--blue-050);
}

.studio-text-composer {
  margin-top: 12px;
  padding: 14px;
  border: 1px solid var(--blue-300);
  border-radius: 13px;
  background: var(--blue-050);
}

.studio-source-list {
  display: grid;
  gap: 9px;
  margin-top: 13px;
}

.studio-source-card {
  display: grid;
  grid-template-columns: 34px 112px minmax(0, 1fr) auto;
  min-height: 94px;
  padding: 9px;
  border: 1px solid var(--border);
  border-radius: 12px;
  align-items: center;
  gap: 10px;
  background: var(--white);
}

.studio-source-processing {
  border-color: var(--blue-400);
  background: var(--blue-050);
}

.studio-source-error {
  border-color: #d46a64;
  background: #fff7f6;
}

.studio-source-order {
  display: grid;
  width: 28px;
  height: 28px;
  border-radius: 999px;
  place-items: center;
  background: var(--navy-900);
  color: var(--white);
  font-size: 0.68rem;
  font-weight: 900;
}

.studio-source-preview {
  display: grid;
  width: 112px;
  height: 74px;
  padding: 0;
  border: 1px solid var(--border);
  border-radius: 8px;
  overflow: hidden;
  place-items: center;
  background: #f4f7f9;
  cursor: pointer;
}

.studio-source-preview img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.studio-source-text-preview {
  display: -webkit-box;
  padding: 7px;
  overflow: hidden;
  color: var(--text-muted);
  font-family: ui-monospace, SFMono-Regular, Consolas, monospace;
  font-size: 0.53rem;
  line-height: 1.35;
  text-align: left;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 5;
}

.studio-source-copy {
  min-width: 0;
}

.studio-source-title {
  display: flex;
  min-width: 0;
  align-items: center;
  gap: 6px;
}

.studio-source-title strong {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.studio-source-copy > span,
.studio-source-copy > small {
  display: block;
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.64rem;
}

.studio-source-copy > small {
  color: var(--blue-700);
  font-weight: 850;
}

.studio-source-error {
  margin: 5px 0 0;
  color: #923a34;
  font-size: 0.65rem;
}

.studio-source-controls {
  display: flex;
  align-items: center;
  gap: 5px;
}

.studio-empty-sources {
  display: flex;
  min-height: 140px;
  margin-top: 13px;
  border: 1px solid var(--border);
  border-radius: 13px;
  align-items: center;
  justify-content: center;
  flex-direction: column;
  background: #fafcfd;
  text-align: center;
}

.studio-empty-sources > span {
  margin-bottom: 5px;
  font-size: 1.45rem;
}

.studio-empty-sources p {
  margin: 4px 0 0;
  color: var(--text-muted);
}

.studio-enhanced-toggle {
  display: flex;
  padding: 13px;
  border: 1px solid var(--border);
  border-radius: 12px;
  align-items: flex-start;
  gap: 11px;
  background: #f8fafc;
}

.studio-enhanced-toggle input {
  width: 19px;
  height: 19px;
  margin-top: 2px;
}

.studio-enhanced-toggle strong,
.studio-enhanced-toggle small {
  display: block;
}

.studio-enhanced-toggle small {
  margin-top: 4px;
  color: var(--text-muted);
  line-height: 1.4;
}

.studio-progress {
  margin-top: 13px;
  padding: 13px;
  border: 1px solid var(--blue-300);
  border-radius: 12px;
  background: var(--blue-050);
}

.studio-progress-heading {
  display: flex;
  margin-bottom: 7px;
  align-items: center;
  justify-content: space-between;
}

.studio-progress p {
  margin: 7px 0 0;
  color: var(--text-muted);
}

.studio-primary-actions {
  display: flex;
  margin-top: 14px;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.button-large {
  min-height: 48px;
  padding-inline: 22px;
}

.studio-privacy-panel {
  display: flex;
  align-items: flex-start;
  gap: 12px;
}

.studio-privacy-panel > div:first-child {
  font-size: 1.25rem;
}

.studio-privacy-panel p {
  margin: 4px 0 0;
  color: var(--text-muted);
}

.import-studio-review-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  margin-bottom: 13px;
  padding: 15px;
  border: 1px solid var(--blue-300);
  border-radius: 13px;
  align-items: center;
  gap: 15px;
  background: var(--blue-050);
}

.import-review-summary-copy h3 {
  margin: 2px 0 4px;
}

.import-review-summary-copy p:last-child {
  margin: 0;
  color: var(--text-muted);
}

.import-review-summary-metrics {
  display: flex;
  gap: 8px;
}

.import-review-summary-metrics span {
  display: grid;
  min-width: 64px;
  min-height: 55px;
  padding: 6px;
  border-radius: 9px;
  place-content: center;
  background: var(--white);
  text-align: center;
}

.import-review-summary-metrics strong,
.import-review-summary-metrics small {
  display: block;
}

.import-review-summary-metrics strong {
  font-size: 1.02rem;
}

.import-review-summary-metrics small {
  color: var(--text-muted);
  font-size: 0.56rem;
  font-weight: 850;
  text-transform: uppercase;
}

.import-conflicts-panel {
  margin-bottom: 13px;
  border: 1px solid #dba754;
  border-radius: 11px;
  background: #fffaf0;
}

.import-conflicts-panel > summary {
  padding: 10px 12px;
  cursor: pointer;
  font-weight: 850;
}

.import-conflicts-panel > div {
  display: grid;
  gap: 8px;
  padding: 0 12px 12px;
}

.import-conflicts-panel article {
  padding: 9px;
  border-radius: 8px;
  background: var(--white);
}

.import-conflicts-panel ul {
  margin: 7px 0 0 17px;
}

.import-conflicts-panel li small {
  margin-left: 5px;
  color: var(--text-muted);
}

.import-field-source-button {
  align-self: flex-start;
}

.import-source-dialog {
  width: min(1100px, calc(100vw - 24px));
  max-height: calc(100vh - 24px);
  padding: 0;
  border: 0;
  border-radius: 15px;
  overflow: hidden;
}

.import-source-dialog::backdrop {
  background: rgba(5, 16, 28, 0.68);
}

.import-source-dialog-shell > header {
  display: flex;
  min-height: 68px;
  padding: 13px 16px;
  border-bottom: 1px solid var(--border);
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.import-source-dialog-shell h2 {
  margin: 2px 0 0;
}

.import-source-dialog-body {
  display: grid;
  grid-template-columns: 250px minmax(0, 1fr);
  min-height: 560px;
  max-height: calc(100vh - 94px);
}

.import-source-nav {
  padding: 10px;
  overflow-y: auto;
  border-right: 1px solid var(--border);
  background: #f7f9fb;
}

.import-source-nav button {
  display: grid;
  width: 100%;
  padding: 10px;
  border: 1px solid transparent;
  border-radius: 9px;
  grid-template-columns: 26px minmax(0, 1fr);
  column-gap: 7px;
  background: transparent;
  color: var(--text);
  cursor: pointer;
  font: inherit;
  text-align: left;
}

.import-source-nav button.active {
  border-color: var(--blue-400);
  background: var(--white);
}

.import-source-nav button > span {
  grid-row: span 2;
  display: grid;
  width: 24px;
  height: 24px;
  border-radius: 999px;
  place-items: center;
  background: var(--navy-900);
  color: var(--white);
  font-size: 0.58rem;
  font-weight: 900;
}

.import-source-nav strong,
.import-source-nav small {
  display: block;
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.import-source-nav small {
  color: var(--text-muted);
  font-size: 0.59rem;
}

.import-source-preview {
  padding: 14px;
  overflow: auto;
  background: #e9eef2;
}

.import-source-image-stage {
  display: grid;
  min-height: 480px;
  place-items: start center;
}

.import-source-image-stage img {
  max-width: 100%;
  height: auto;
  border-radius: 7px;
  box-shadow: 0 8px 28px rgba(12, 28, 42, 0.2);
}

.import-source-text-stage {
  min-height: 480px;
  margin: 0;
  padding: 14px;
  border-radius: 8px;
  overflow: auto;
  background: var(--white);
  white-space: pre-wrap;
}

.import-source-preview details {
  margin-top: 11px;
  padding: 10px;
  border-radius: 8px;
  background: var(--white);
}

@media (max-width: 800px) {
  .studio-basics-grid,
  .studio-source-actions {
    grid-template-columns: 1fr;
  }

  .studio-source-action {
    min-height: 84px;
    align-items: flex-start;
    text-align: left;
  }

  .studio-source-card {
    grid-template-columns: 30px 82px minmax(0, 1fr);
  }

  .studio-source-preview {
    width: 82px;
    height: 64px;
  }

  .studio-source-controls {
    grid-column: 2 / -1;
    justify-content: flex-end;
  }

  .import-studio-review-summary {
    grid-template-columns: 1fr;
  }

  .import-review-summary-metrics {
    justify-content: flex-start;
  }

  .import-source-dialog-body {
    grid-template-columns: 1fr;
  }

  .import-source-nav {
    display: flex;
    max-height: 120px;
    overflow-x: auto;
    border-right: 0;
    border-bottom: 1px solid var(--border);
  }

  .import-source-nav button {
    min-width: 210px;
  }
}

@media (max-width: 600px) {
  .import-studio-header,
  .studio-section-heading {
    flex-direction: column;
  }

  .studio-source-card {
    grid-template-columns: 28px minmax(0, 1fr);
  }

  .studio-source-preview {
    grid-column: 2;
    width: 100%;
    height: 120px;
  }

  .studio-source-copy,
  .studio-source-controls {
    grid-column: 2;
  }

  .studio-primary-actions .button {
    width: 100%;
  }
}


/* Version 2.0.1 — current trip and 30-day archive lifecycle */
.archive-retention-label {
  color: #8b4f08;
  font-weight: 850;
}

.cloud-trip-card-active {
  border: 2px solid var(--navy-700);
  box-shadow: 0 8px 24px rgba(26, 91, 150, 0.14);
}

.active-trip-label {
  background: var(--blue-100);
  color: var(--blue-800);
}

.archived-trip-group .cloud-trip-card {
  opacity: 0.94;
}

.archived-trip-group
  [data-trip-action="make-current"] {
  border-color: transparent;
  background: var(--navy-700);
  color: var(--white);
}

.archived-trip-group
  [data-trip-action="make-current"]:hover:not(:disabled) {
  background: var(--navy-950);
}


/* Version 2.0.3 — standard primary-button appearance */
.archived-trip-group
  .make-current-button-v202,
.cloud-trip-card:has(.trip-bucket-archived)
  .make-current-button-v202 {
  display: inline-flex !important;
  visibility: visible !important;
  opacity: 1 !important;
  min-height: 36px;
  border-color: transparent !important;
  background: var(--navy-700) !important;
  color: var(--white) !important;
  align-items: center;
  justify-content: center;
}

.archived-trip-group
  .make-current-button-v202:hover:not(:disabled),
.cloud-trip-card:has(.trip-bucket-archived)
  .make-current-button-v202:hover:not(:disabled) {
  background: var(--navy-950) !important;
  color: var(--white) !important;
}

.archived-trip-group
  .make-current-button-v202:focus-visible,
.cloud-trip-card:has(.trip-bucket-archived)
  .make-current-button-v202:focus-visible {
  outline: 3px solid var(--blue-100);
  outline-offset: 2px;
}

.archived-trip-group
  .make-current-button-v202:disabled {
  opacity: 0.52 !important;
}

@media (max-width: 700px) {
  .archived-trip-group
    .make-current-button-v202 {
    grid-column: 1 / -1;
    width: 100%;
  }
}


/* Version 2.1.0 — Delay Intelligence */
.flight-row-operational {
  border-left: 4px solid var(--border);
}

.flight-time-comparison {
  margin: 12px 0 4px;
  border: 1px solid var(--border);
  border-radius: 11px;
  overflow: hidden;
  background: var(--white);
}

.flight-time-heading,
.flight-time-line {
  display: grid;
  grid-template-columns:
    minmax(74px, 0.75fr)
    repeat(3, minmax(100px, 1fr));
  gap: 8px;
  padding: 8px 10px;
  align-items: center;
}

.flight-time-heading {
  background: #f1f5f8;
  color: var(--text-muted);
  font-size: 0.59rem;
  font-weight: 900;
  text-transform: uppercase;
}

.flight-time-line + .flight-time-line {
  border-top: 1px solid var(--border);
}

.flight-time-line > span,
.flight-time-line > strong {
  min-width: 0;
}

.flight-time-line span strong,
.flight-time-line span small {
  display: block;
}

.flight-time-line span small {
  margin-top: 2px;
  color: var(--text-muted);
  font-size: 0.58rem;
  line-height: 1.25;
}

.flight-operational-footer {
  display: flex;
  min-height: 25px;
  padding: 5px 2px 0;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
  color: var(--text-muted);
  font-size: 0.63rem;
}

.flight-operational-footer strong {
  color: #8b4f08;
}

.delay-impact-panel {
  margin-top: 12px;
}

.delay-impact-clear {
  border-color: #9cc8a8;
  background: var(--success-bg);
}

.delay-impact-clear h2 {
  margin: 2px 0 4px;
}

.delay-impact-clear p:last-child {
  margin: 0;
}

.delay-impact-danger {
  border: 2px solid #bc4a42;
  background: #fff7f6;
}

.delay-impact-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 9px;
}

.delay-impact-grid > div {
  min-height: 70px;
  padding: 10px;
  border: 1px solid var(--border);
  border-radius: 9px;
  background: var(--white);
}

.delay-impact-grid span,
.delay-impact-grid strong {
  display: block;
}

.delay-impact-grid span {
  color: var(--text-muted);
  font-size: 0.61rem;
  font-weight: 800;
}

.delay-impact-grid strong {
  margin-top: 5px;
}

.delay-warning-text {
  color: #995a08;
}

.delay-major-text {
  color: #a52e28;
}

.status-alert > div {
  min-width: 0;
  flex: 1;
}

.status-alert > div p {
  margin: 0;
}

.status-alert > div .button {
  margin-top: 8px;
}

.status-alert-danger,
.status-alert-cancelled,
.status-alert-diverted,
.status-alert-missed,
.status-alert-rest-risk {
  border-color: #cf6a63;
  background: #fff4f3;
  color: #7c2924;
}

.status-alert-warning,
.status-alert-tight,
.status-alert-downline-delay,
.status-alert-rest-reduced {
  border-color: #e0b65d;
  background: #fffaf0;
}

.flight-status-danger {
  background: #a52e28;
  color: var(--white);
}

@media (max-width: 840px) {
  .delay-impact-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .flight-time-heading {
    display: none;
  }

  .flight-time-line {
    grid-template-columns: 90px 1fr;
    gap: 6px 10px;
  }

  .flight-time-line > span {
    display: grid;
    grid-template-columns: 115px minmax(0, 1fr);
    align-items: start;
  }

  .flight-time-line > span::before {
    color: var(--text-muted);
    font-size: 0.58rem;
    font-weight: 900;
    text-transform: uppercase;
  }

  .flight-time-line > span:nth-child(2)::before {
    content: "Scheduled";
  }

  .flight-time-line > span:nth-child(3)::before {
    content: "Estimate / projection";
  }

  .flight-time-line > span:nth-child(4)::before {
    content: "Actual";
  }
}

@media (max-width: 560px) {
  .delay-impact-grid {
    grid-template-columns: 1fr;
  }

  .flight-time-line {
    grid-template-columns: 1fr;
  }

  .flight-time-line > span {
    grid-template-columns: 105px minmax(0, 1fr);
  }

  .flight-operational-footer {
    align-items: flex-start;
    flex-direction: column;
  }
}


/* Version 2.1.2 — verified time and visible demonstration mode */
.time-reliability-host {
  position: fixed;
  z-index: 1200;
  right: 16px;
  bottom: 16px;
  width: min(520px, calc(100vw - 32px));
  pointer-events: none;
}

.time-reliability-host[hidden] {
  display: none;
}

.time-reliability-banner {
  display: flex;
  padding: 13px;
  border: 2px solid;
  border-radius: 12px;
  align-items: center;
  justify-content: space-between;
  gap: 13px;
  background: var(--white);
  box-shadow: 0 10px 32px rgba(9, 23, 37, 0.24);
  pointer-events: auto;
}

.time-reliability-banner strong,
.time-reliability-banner p {
  display: block;
}

.time-reliability-banner p {
  margin: 4px 0 0;
  font-size: 0.68rem;
  line-height: 1.4;
}

.time-reliability-demo {
  border-color: #c46621;
  background: #fff8ef;
  color: #6c330b;
}

.time-reliability-corrected {
  border-color: var(--navy-700);
  background: #f4f8fb;
  color: var(--navy-950);
}

@media (max-width: 620px) {
  .time-reliability-host {
    right: 10px;
    bottom: 10px;
    width: calc(100vw - 20px);
  }

  .time-reliability-banner {
    align-items: stretch;
    flex-direction: column;
  }

  .time-reliability-banner .button {
    width: 100%;
  }
}


/* Version 2.2.0 — pairing structure and map clarity */
.current-trip-top-actions {
  display: flex;
  margin-bottom: 12px;
  padding: 12px 14px;
  border: 1px solid var(--border);
  border-radius: 12px;
  align-items: center;
  justify-content: space-between;
  gap: 16px;
  background: var(--white);
}

.current-trip-top-actions h2,
.current-trip-top-actions p {
  margin: 0;
}

.current-trip-top-actions h2 {
  margin-top: 2px;
  font-size: 1.08rem;
}

.current-share-button {
  min-width: 130px;
}

.ground-duty-row,
.review-ground-activity {
  margin: 10px 0;
  padding: 12px;
  border: 1px solid #8eabc2;
  border-radius: 11px;
  background: #f4f8fb;
}

.ground-duty-row {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: 11px;
}

.ground-duty-row strong,
.ground-duty-row span,
.ground-duty-row small {
  display: block;
}

.ground-duty-icon {
  display: grid;
  width: 32px;
  height: 32px;
  border-radius: 50%;
  place-items: center;
  background: var(--navy-700);
  color: var(--white);
}

.ground-duty-label {
  color: var(--text-muted);
  font-size: 0.66rem;
  font-weight: 800;
}

.ground-duty-chip {
  padding: 5px 8px;
  border-radius: 999px;
  background: var(--blue-100);
  color: var(--navy-950);
  font-size: 0.59rem;
  font-weight: 900;
  white-space: nowrap;
}

.ground-duty-explanation {
  margin: 8px 0 0;
}

.trip-map-direction-arrow {
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
  filter: url(#tripMapShadow);
}

.trip-map-direction-complete {
  fill: #3c9971;
}

.trip-map-direction-active {
  fill: #ef8d32;
}

.trip-map-direction-upcoming {
  fill: #527fa7;
}

.trip-map-direction-cancelled {
  fill: #bb4c4c;
}

@media (max-width: 620px) {
  .current-trip-top-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .current-share-button {
    width: 100%;
  }

  .ground-duty-row {
    grid-template-columns: auto minmax(0, 1fr);
  }

  .ground-duty-chip {
    grid-column: 1 / -1;
    text-align: center;
  }
}


/* Version 2.3.0 — temporary shared sleeping status */
.current-trip-primary-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 8px;
  flex-wrap: wrap;
}

.crew-rest-top-button {
  min-width: 122px;
  gap: 6px;
}

.crew-rest-dialog {
  width: min(520px, calc(100vw - 28px));
  padding: 0;
  border: 0;
  border-radius: 14px;
  background: var(--white);
  box-shadow: 0 18px 60px rgba(8, 25, 40, 0.28);
}

.crew-rest-dialog::backdrop {
  background: rgba(8, 25, 40, 0.52);
}

.crew-rest-dialog-shell {
  padding: 0;
}

.crew-rest-dialog-header {
  display: flex;
  padding: 16px 18px;
  border-bottom: 1px solid var(--border);
  align-items: flex-start;
  justify-content: space-between;
  gap: 12px;
}

.crew-rest-dialog-header h2,
.crew-rest-dialog-header p {
  margin: 0;
}

.crew-rest-dialog-header h2 {
  margin-top: 3px;
}

.crew-rest-dialog-content {
  padding: 18px;
}

.crew-rest-description {
  margin: 0 0 16px;
  line-height: 1.45;
}

.crew-rest-active-card {
  display: flex;
  margin-bottom: 16px;
  padding: 13px;
  border: 1px solid #8eabc2;
  border-radius: 12px;
  align-items: center;
  gap: 12px;
  background: #f4f8fb;
}

.crew-rest-active-card p,
.crew-rest-active-card strong {
  display: block;
  margin: 0;
}

.crew-rest-active-card p {
  margin-top: 4px;
  font-size: 0.76rem;
  line-height: 1.4;
}

.crew-rest-active-icon {
  font-size: 2rem;
  line-height: 1;
}

.crew-rest-duration-label {
  margin: 0 0 8px;
  font-weight: 850;
}

.crew-rest-duration-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 8px;
}

.crew-rest-duration-button {
  min-height: 68px;
  flex-direction: column;
  gap: 1px;
}

.crew-rest-duration-button strong,
.crew-rest-duration-button span {
  display: block;
}

.crew-rest-duration-button strong {
  font-size: 1.2rem;
}

.crew-rest-duration-button span {
  font-size: 0.66rem;
}

.crew-rest-wake-button {
  width: 100%;
  margin-top: 14px;
}

.shared-sleeping-status {
  display: flex;
  margin-bottom: 12px;
  padding: 15px 17px;
  border: 2px solid #8eabc2;
  align-items: center;
  gap: 14px;
  background: #f4f8fb;
}

.shared-sleeping-status h2,
.shared-sleeping-status p {
  margin: 0;
}

.shared-sleeping-status h2 {
  margin-top: 2px;
}

.shared-sleeping-status p:last-child {
  margin-top: 5px;
  line-height: 1.4;
}

.shared-sleeping-icon {
  display: grid;
  width: 54px;
  height: 54px;
  flex: 0 0 54px;
  border-radius: 50%;
  place-items: center;
  background: var(--navy-700);
  font-size: 2rem;
}

@media (max-width: 680px) {
  .current-trip-primary-actions {
    width: 100%;
    align-items: stretch;
    flex-direction: column;
  }

  .current-trip-primary-actions .button,
  .crew-rest-top-button {
    width: 100%;
  }

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

  .shared-sleeping-status {
    align-items: flex-start;
  }
}


/* Version 2.5.0 — flexible pairing import */
.review-segment-note {
  grid-column: 1 / -1;
  margin: 4px 0 10px;
  padding: 10px 12px;
  border: 1px solid #8eabc2;
  border-radius: 10px;
  background: #f4f8fb;
  color: var(--navy-950);
}

.review-segment-note strong,
.review-segment-note span {
  display: block;
}

.review-segment-note span {
  margin-top: 3px;
  color: var(--text-muted);
  font-size: 0.69rem;
  line-height: 1.4;
}

/* v2.7.0 settings and appearance */
html[data-mct-theme="night"], body[data-mct-theme="night"] {
  --navy-950: #e6e8eb;
  --navy-900: #d6dbe0;
  --navy-800: #8ab1e6;
  --navy-700: #5b8fd9;
  --blue-100: #252b32;
  --blue-050: #1b2026;
  --page: #111418;
  --white: #1b2026;
  --text: #e6e8eb;
  --muted: #aab0b7;
  --border: #39414a;
  --success-bg: #183525;
  --success-text: #8bd5a3;
  --warning-bg: #3a3015;
  --warning-text: #efcf76;
  --error-bg: #3d1b1b;
  --error-text: #f0a0a0;
  --shadow: 0 8px 28px rgba(0, 0, 0, .35);
  color-scheme: dark;
}
html[data-mct-theme="aircraft"], body[data-mct-theme="aircraft"] {
  --navy-950: #e35a5a;
  --navy-900: #c94444;
  --navy-800: #b33434;
  --navy-700: #8b2020;
  --blue-100: #190505;
  --blue-050: #100303;
  --page: #050000;
  --white: #100303;
  --text: #d94a4a;
  --muted: #9f3434;
  --border: #4a1111;
  --success-bg: #160303;
  --success-text: #b73b3b;
  --warning-bg: #240604;
  --warning-text: #e4573d;
  --error-bg: #2a0303;
  --error-text: #f25a5a;
  --shadow: none;
  color-scheme: dark;
}
html[data-mct-theme="aircraft"] img:not(.pairing-image):not(.app-logo),
body[data-mct-theme="aircraft"] img:not(.pairing-image):not(.app-logo) { filter: brightness(.55) sepia(.45) saturate(1.8) hue-rotate(315deg); }
html[data-mct-theme="aircraft"] input,
html[data-mct-theme="aircraft"] textarea,
html[data-mct-theme="aircraft"] select,
body[data-mct-theme="aircraft"] input,
body[data-mct-theme="aircraft"] textarea,
body[data-mct-theme="aircraft"] select { background: #090101 !important; color: #d94a4a !important; border-color: #4a1111 !important; }
html[data-mct-theme="aircraft"] .button-primary,
body[data-mct-theme="aircraft"] .button-primary { background: #681515 !important; color: #e35a5a !important; border-color: #8b2020 !important; }
html[data-mct-theme="aircraft"] .button-secondary,
html[data-mct-theme="aircraft"] .button-ghost,
body[data-mct-theme="aircraft"] .button-secondary,
body[data-mct-theme="aircraft"] .button-ghost { background: #100303 !important; color: #c94444 !important; border-color: #4a1111 !important; }
html[data-mct-theme="aircraft"] a, body[data-mct-theme="aircraft"] a { color: #d94a4a; }
.review-heading-actions { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; justify-content: flex-end; }
.settings-panel + .settings-panel { margin-top: 18px; }
.settings-hint { margin: 10px 0 0; color: var(--muted); font-size: .9rem; }
.appearance-options { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.appearance-option { min-height: 132px; padding: 14px; border: 2px solid var(--border); border-radius: var(--radius); background: var(--white); color: var(--text); text-align: left; cursor: pointer; }
.appearance-option.selected { border-color: var(--navy-700); box-shadow: 0 0 0 2px color-mix(in srgb, var(--navy-700) 28%, transparent); }
.appearance-option strong, .appearance-option small { display: block; }
.appearance-option small { margin-top: 4px; color: var(--muted); }
.appearance-swatch { display: block; width: 100%; height: 36px; margin-bottom: 10px; border-radius: 8px; border: 1px solid var(--border); }
.appearance-swatch-day { background: linear-gradient(90deg,#eef2f6 0 50%,#123b69 50%); }
.appearance-swatch-night { background: linear-gradient(90deg,#111418 0 50%,#5b8fd9 50%); }
.appearance-swatch-aircraft { background: linear-gradient(90deg,#050000 0 50%,#681515 50%); }
.settings-feedback-form { display: grid; gap: 14px; }
.settings-feedback-form label { display: grid; gap: 6px; font-weight: 700; }
.settings-feedback-form textarea, .settings-feedback-form select { width: 100%; }
.settings-danger-zone { border-color: color-mix(in srgb, var(--error-text) 42%, var(--border)); }
@media (max-width: 720px) { .appearance-options { grid-template-columns: 1fr; } .review-heading-actions { justify-content: flex-start; } }
html[data-mct-theme="aircraft"] .button-danger,
html[data-mct-theme="aircraft"] .button-warning,
html[data-mct-theme="aircraft"] .flight-status-warning,
html[data-mct-theme="aircraft"] .active-trip-label,
html[data-mct-theme="aircraft"] .notification-browser-note,
html[data-mct-theme="aircraft"] .network-status-banner,
html[data-mct-theme="aircraft"] .privacy-danger-zone,
html[data-mct-theme="aircraft"] .release-health-warning,
html[data-mct-theme="aircraft"] .data-freshness-warning,
html[data-mct-theme="aircraft"] .operation-data-source-warning,
html[data-mct-theme="aircraft"] .compact-status-warning,
html[data-mct-theme="aircraft"] .guided-completion-needed,
html[data-mct-theme="aircraft"] .completion-question-conflict,
html[data-mct-theme="aircraft"] .completion-question-uncertain,
html[data-mct-theme="aircraft"] .review-field-needs-input input,
html[data-mct-theme="aircraft"] .review-field-needs-review input,
html[data-mct-theme="aircraft"] .studio-source-error,
html[data-mct-theme="aircraft"] .import-conflicts-panel,
html[data-mct-theme="aircraft"] .delay-impact-danger,
html[data-mct-theme="aircraft"] .status-alert-diverted,
html[data-mct-theme="aircraft"] .status-alert-missed,
html[data-mct-theme="aircraft"] .status-alert-rest-risk,
html[data-mct-theme="aircraft"] .status-alert-tight,
html[data-mct-theme="aircraft"] .status-alert-downline-delay,
html[data-mct-theme="aircraft"] .status-alert-rest-reduced,
html[data-mct-theme="aircraft"] .time-reliability-demo { background: #160303 !important; color: #d94a4a !important; border-color: #4a1111 !important; }

/* v2.7.1 — hardened Night/Aircraft appearance and desktop theme controls */
.appearance-option { position: relative; z-index: 1; pointer-events: auto !important; user-select: none; }
.appearance-option * { pointer-events: none; }

html[data-mct-theme="aircraft"],
html[data-mct-theme="aircraft"] body,
body[data-mct-theme="aircraft"] {
  background-color: #050000 !important;
  color: #d94a4a !important;
}

html[data-mct-theme="aircraft"] :is(
  .topbar, .topbar-inner, .page-shell, .app-view,
  .panel, .card, .trip-card, .duty-card, .flight-card,
  .settings-panel, .import-review, .review-card, .review-section,
  .status-card, .status-panel, .timeline-card, .timeline-item,
  .notification-card, .notification-panel, .share-card,
  .modal, .modal-content, .dialog, dialog, details, summary,
  .notice, .alert, .warning, .error, .success,
  .import-source-card, .studio-source-card, .source-card,
  .completion-question, .completion-panel, .guided-completion,
  .release-card, .release-panel, .delay-impact-card,
  .map-card, .trip-map-shell, .trip-map-panel,
  .auth-card, .help-card, .archive-card,
  table, thead, tbody, tr, th, td
) {
  background-color: #100303 !important;
  color: #d94a4a !important;
  border-color: #4a1111 !important;
  box-shadow: none !important;
}

html[data-mct-theme="aircraft"] :is(
  .muted, .text-muted, .secondary-text, small, .settings-hint,
  .eyebrow, .meta, .subtle
) { color: #9f3434 !important; }

html[data-mct-theme="aircraft"] :is(
  button, .button, .tab-button, .appearance-option,
  input, textarea, select, option
) {
  background-color: #100303 !important;
  color: #d94a4a !important;
  border-color: #4a1111 !important;
  box-shadow: none !important;
}

html[data-mct-theme="aircraft"] :is(
  .button-primary, .tab-button.active, .appearance-option.selected
) {
  background-color: #681515 !important;
  color: #e35a5a !important;
  border-color: #8b2020 !important;
}

html[data-mct-theme="aircraft"] :is(
  .notice-warning, .warning, .flight-status-warning,
  .data-freshness-warning, .operation-data-source-warning,
  .completion-question-conflict, .completion-question-uncertain,
  .import-conflicts-panel
) {
  background-color: #240604 !important;
  color: #e4573d !important;
  border-color: #6b1a12 !important;
}

html[data-mct-theme="aircraft"] :is(
  .notice-error, .error, .status-alert-missed, .status-alert-diverted,
  .delay-impact-danger, .settings-danger-zone
) {
  background-color: #2a0303 !important;
  color: #f25a5a !important;
  border-color: #741515 !important;
}

html[data-mct-theme="aircraft"] :is(
  .notice-success, .success, .status-good
) {
  background-color: #160303 !important;
  color: #b73b3b !important;
  border-color: #4a1111 !important;
}

html[data-mct-theme="aircraft"] ::selection {
  background: #8b2020 !important;
  color: #050000 !important;
}

html[data-mct-theme="aircraft"] svg [fill="#fff"],
html[data-mct-theme="aircraft"] svg [fill="#ffffff"],
html[data-mct-theme="aircraft"] svg [fill="white"] { fill: #d94a4a !important; }
html[data-mct-theme="aircraft"] svg [stroke="#fff"],
html[data-mct-theme="aircraft"] svg [stroke="#ffffff"],
html[data-mct-theme="aircraft"] svg [stroke="white"] { stroke: #d94a4a !important; }

html[data-mct-theme="aircraft"] .appearance-swatch-day,
html[data-mct-theme="aircraft"] .appearance-swatch-night,
html[data-mct-theme="aircraft"] .appearance-swatch-aircraft {
  filter: brightness(.5) saturate(.75) sepia(.25);
}

/* AircrewTracker brand identity */
.brand-identity {
  display: flex;
  align-items: center;
  gap: 0.85rem;
  min-width: 0;
}
.brand-logo {
  width: clamp(52px, 6vw, 74px);
  height: clamp(52px, 6vw, 74px);
  flex: 0 0 auto;
  object-fit: cover;
  border-radius: 22%;
  box-shadow: 0 8px 24px rgba(0, 99, 190, 0.2);
}
@media (max-width: 640px) {
  .brand-logo { width: 52px; height: 52px; }
  .brand-identity { gap: 0.6rem; }
}
html[data-mct-theme="aircraft"] .brand-logo {
  filter: brightness(.62) saturate(.35) sepia(.35) hue-rotate(315deg);
  box-shadow: none;
}

/* Unmatched OCR flight candidates must be visible before saving. */
.import-possible-legs { margin: 14px 0; }
.import-possible-legs > p { margin: 8px 0 12px; }
.import-possible-leg { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 13px; padding: 12px 0; border-top: 1px solid currentColor; }
.import-possible-leg strong { min-width: 145px; }
.import-possible-leg small { flex-basis: 100%; }
.import-possible-leg-buttons { display: flex; gap: 8px; flex-wrap: wrap; }

/* High-resolution, interactive OpenStreetMap tile map. */
.trip-map-leaflet {width:100%;height:clamp(320px,48vw,550px);min-height:320px;border-radius:14px;background:#dceaf1;z-index:0;}
.trip-map-stage .leaflet-container {font-family:inherit;}
.trip-aircraft-icon {background:transparent;border:0;text-align:center;color:#176fa7;text-shadow:0 1px 3px white;}
.trip-aircraft-icon span {display:block;font-size:29px;line-height:30px;transform:rotate(-35deg);}
@media(max-width:640px){.trip-map-leaflet{height:320px;min-height:320px;border-radius:0;}}

.auth-sign-in-options{display:flex;gap:.5rem;align-items:center;flex-wrap:wrap}.auth-sign-in-options .auth-sign-in-button{white-space:nowrap}@media(max-width:640px){.auth-sign-in-options{display:grid;grid-template-columns:1fr}.auth-sign-in-options .auth-sign-in-button{width:100%}}
