:root {
  color-scheme: light;
  --font-brand: "DIN Condensed", "DIN Alternate", "Bahnschrift Condensed", "Aptos Narrow", "Arial Narrow", ui-sans-serif, system-ui, sans-serif;
  --font-ui: "Bahnschrift", "DIN Alternate", "Aptos", "Segoe UI", ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, sans-serif;
  --brand-navy: #071a2f;
  --brand-navy-2: #0b2743;
  --brand-slate: #53616f;
  --brand-cyan: #00aee8;
  --brand-cyan-strong: #008ec2;
  --ink: #101c29;
  --muted: #53616f;
  --line: #cbd5df;
  --surface: #ffffff;
  --surface-raised: #ffffff;
  --band: #f2f5f8;
  --accent: var(--brand-navy);
  --accent-strong: var(--brand-cyan-strong);
  --on-accent: #ffffff;
  --warn: #b33f2f;
  --gold: #d7a441;
  --jump-bg: #e8f7fc;
  --jump-border: #9bd8ea;
  --jump-ink: #075574;
  --selection-bg: #fff9ea;
  --selection-border: #e2bd65;
  --selection-ink: #5c430b;
  --focus: var(--brand-cyan);
  --tabs-offset: 0px;
}

html.theme-dark,
body.theme-dark {
  color-scheme: dark;
  --brand-navy: #071827;
  --brand-navy-2: #0d253a;
  --brand-slate: #9aa9b8;
  --brand-cyan: #34d6ff;
  --brand-cyan-strong: #78e5ff;
  --ink: #eef6fb;
  --muted: #a8b6c3;
  --line: #304557;
  --surface: #101d2b;
  --surface-raised: #172839;
  --band: #07111d;
  --accent: var(--brand-cyan);
  --accent-strong: var(--brand-cyan-strong);
  --on-accent: #06111d;
  --warn: #e27a69;
  --gold: #e0b65a;
  --jump-bg: #0c2d40;
  --jump-border: #245e78;
  --jump-ink: #9eeaff;
  --selection-bg: #2c2718;
  --selection-border: #8b6d2d;
  --selection-ink: #f0d27b;
  --focus: var(--brand-cyan);
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  color: var(--ink);
  background: var(--band);
  font-family: var(--font-ui);
  font-variant-numeric: tabular-nums;
}

body.admin-page {
  min-height: 100vh;
  background: var(--band);
}

body.account-page {
  min-height: 100vh;
  display: grid;
  place-items: center;
  padding: clamp(16px, 4vw, 48px);
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-2) 100%);
}

.account-shell {
  width: min(960px, 100%);
  display: grid;
  grid-template-columns: minmax(0, 1.12fr) minmax(320px, 0.88fr);
  gap: clamp(28px, 4vw, 44px);
  padding: clamp(16px, 2.5vw, 24px);
  border: 1px solid color-mix(in srgb, var(--brand-cyan) 38%, transparent);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 22px 48px rgba(3, 16, 31, 0.34);
}

.account-brand-panel {
  display: grid;
  align-content: center;
  gap: 30px;
  min-height: 520px;
  padding: clamp(24px, 5vw, 52px);
  background: var(--brand-navy);
  color: #ffffff;
  border-radius: 6px;
  border-right: 3px solid var(--brand-cyan);
}

.account-brand-lockup {
  display: grid;
  grid-template-columns: 86px minmax(0, 1fr);
  align-items: center;
  gap: 18px;
  width: min(390px, 100%);
}

.account-icon {
  width: 86px;
  height: 86px;
}

.account-wordmark {
  width: min(276px, 100%);
  height: auto;
}

.account-brand-copy {
  display: grid;
  gap: 10px;
  max-width: 520px;
}

.account-brand-copy .eyebrow {
  color: var(--brand-cyan);
}

.account-brand-copy h1 {
  font-size: clamp(42px, 6vw, 76px);
}

.account-brand-copy p:not(.eyebrow) {
  margin: 0;
  color: color-mix(in srgb, #ffffff 76%, var(--brand-cyan));
  font-size: 16px;
  font-weight: 700;
  line-height: 1.45;
}

.account-card {
  position: relative;
  display: grid;
  align-content: center;
  gap: 14px;
  min-height: 520px;
  padding: clamp(22px, 4vw, 40px) clamp(22px, 4vw, 40px) clamp(70px, 7vw, 86px) 0;
}

.account-card h2 {
  font-size: 28px;
}

.account-copy,
.account-note {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.45;
}

.account-session-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 12px;
  width: min(430px, 100%);
}

.account-sign-out {
  min-height: 30px;
  padding: 5px 10px;
  font-size: 12px;
}

.account-signed-in-actions {
  display: grid;
  gap: 12px;
  width: min(430px, 100%);
}

.account-signed-in-actions[hidden] {
  display: none;
}

.account-signed-in-actions .account-link-button {
  justify-self: start;
}

.account-form {
  display: grid;
  gap: 12px;
  width: min(430px, 100%);
  margin-top: 4px;
}

.account-form[hidden] {
  display: none;
}

.account-support-form {
  margin-top: 10px;
  padding-top: 14px;
  border-top: 1px solid var(--line);
}

.account-link-button[hidden] {
  display: none;
}

.account-form label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.password-field {
  position: relative;
  display: block;
}

.password-field input {
  padding-right: 72px;
}

.password-toggle {
  position: absolute;
  top: 50%;
  right: 8px;
  min-height: 28px;
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  transform: translateY(-50%);
  cursor: pointer;
}

.password-toggle:hover {
  color: var(--ink);
  border-color: var(--brand-cyan);
}

.account-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  margin-top: 4px;
}

.account-login-actions {
  display: grid;
  grid-template-columns: 1fr auto auto 1fr;
  justify-content: stretch;
  align-items: start;
  width: 100%;
  margin-bottom: 42px;
}

.account-login-actions > .btn-primary {
  grid-column: 2;
}

.account-login-actions > a[href="create-account.html"] {
  grid-column: 3;
}

.account-login-actions a[href="forgot-password.html"] {
  grid-column: 2 / 4;
  justify-self: center;
  width: max-content;
}

#accountSupportToggle {
  position: absolute;
  right: 0;
  bottom: 0;
}

.account-corner-action {
  position: absolute;
  right: 0;
  bottom: 0;
}

.account-support-action {
  min-height: 0;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.account-support-action:hover {
  border-color: transparent;
  background: transparent;
  color: var(--accent-strong);
}

.create-account-actions {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: start;
  width: min(430px, 100%);
  margin-bottom: 42px;
}

.create-account-actions .btn-primary {
  grid-column: 1;
}

.create-account-actions a[href="index.html"] {
  grid-column: 3;
}

.account-status {
  min-height: 20px;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.account-status:empty {
  display: none;
}

.account-status.is-success {
  color: var(--brand-cyan-strong);
}

.account-status.is-warning,
.account-status.is-error {
  color: var(--warn);
}

.account-email-display {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.45;
}

.account-email-display strong {
  color: var(--ink);
  font-weight: 900;
}

.password-requirements {
  display: grid;
  gap: 6px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--jump-bg) 54%, var(--surface));
}

.password-requirements p,
.password-requirements ul {
  margin: 0;
}

.password-requirements p {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.password-requirements ul {
  display: grid;
  gap: 3px;
  padding-left: 18px;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
  line-height: 1.35;
}

.account-link-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 38px;
  padding: 8px 14px;
  border-radius: 8px;
  font-weight: 900;
  text-decoration: none;
  text-transform: uppercase;
}

body.is-import-focus .summary-grid,
body.is-import-focus .calendar-panel {
  display: none;
}

.profile-main {
  width: min(1180px, calc(100% - 32px));
  margin: 28px auto 56px;
}

.profile-route-panel {
  display: block;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 24px;
  align-items: end;
  padding: 28px clamp(16px, 4vw, 48px);
  background: linear-gradient(135deg, var(--brand-navy) 0%, var(--brand-navy-2) 100%);
  border-bottom: 3px solid var(--brand-cyan);
  color: #ffffff;
}

.brand-lockup {
  display: flex;
  align-items: center;
  gap: 12px;
  min-width: 0;
}

.brand-copy {
  position: relative;
  display: block;
  min-width: 0;
}

.brand-lockup .eyebrow {
  position: absolute;
  top: clamp(17px, 1.95vw, 24px);
  left: clamp(72px, 7.3vw, 96px);
  z-index: 1;
  margin: 0;
  line-height: 1;
}

.brand-logo-image {
  display: block;
  width: clamp(236px, 24vw, 312px);
  height: auto;
}

.topbar-meta {
  display: flex;
  align-items: center;
  gap: 14px;
  flex-wrap: wrap;
}

.topbar-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
}

.topbar-action {
  min-height: 32px;
  padding: 6px 10px;
  font-size: 12px;
  font-weight: 800;
}

.topbar-action-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  text-decoration: none;
}

.dev-tier-toggle {
  border-color: color-mix(in srgb, var(--gold) 62%, var(--line));
  color: var(--selection-ink);
}

.dev-tier-toggle.is-free-tier {
  background: color-mix(in srgb, var(--gold) 28%, var(--surface));
  color: var(--selection-ink);
}

.eyebrow {
  margin: 0 0 4px;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

h1,
h2 {
  margin: 0;
}

h1 {
  font-family: var(--font-brand);
  font-size: clamp(32px, 4.5vw, 54px);
  font-weight: 900;
  line-height: 0.95;
  text-transform: uppercase;
}

h2 {
  font-family: var(--font-brand);
  font-size: 20px;
  font-weight: 900;
  text-transform: uppercase;
}

.profile-button {
  display: inline-flex;
  align-items: center;
  gap: 10px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--brand-cyan) 42%, transparent);
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-navy-2) 86%, #ffffff);
  color: #ffffff;
  cursor: pointer;
}

.profile-button-copy {
  display: grid;
  gap: 2px;
  text-align: left;
}

.profile-button-copy strong {
  font-size: 13px;
}

.profile-button-copy span {
  color: color-mix(in srgb, var(--brand-cyan) 64%, #ffffff);
  font-size: 12px;
  font-weight: 700;
}

.profile-avatar {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 40px;
  height: 40px;
  overflow: hidden;
  border-radius: 8px;
  background: var(--brand-cyan);
  color: var(--brand-navy);
  font-size: 14px;
  font-weight: 900;
}

.profile-avatar img {
  width: 100%;
  height: 100%;
  object-fit: cover;
}

.profile-avatar-large {
  width: fit-content;
  min-width: 112px;
  width: 112px;
  height: 112px;
  font-size: 28px;
}

main {
  padding: 14px clamp(16px, 4vw, 48px) 48px;
}

.current-dataset-banner {
  flex: 1 1 260px;
  min-width: min(460px, 100%);
  margin: 0;
  display: flex;
  align-items: center;
  min-height: 86px;
  padding: 10px 16px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--jump-bg) 72%, var(--surface));
}

.current-dataset-banner p {
  width: 100%;
  margin: 0;
  color: var(--accent-strong);
  font-size: 14px;
  font-weight: 500;
  line-height: 1.15;
}

.dataset-banner-kicker {
  font-size: 13px;
  font-weight: 500;
}

.dataset-banner-package {
  display: inline-block;
  font-size: clamp(20px, 2.1vw, 25px);
  font-weight: 850;
}

.import-panel {
  display: grid;
  gap: 16px;
  margin: 0 0 20px;
  padding: 18px;
  background: var(--surface);
  border: 2px solid var(--brand-cyan);
  border-radius: 8px;
}

.section-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
  min-width: 0;
}

.section-header h2 {
  margin: 0;
  color: var(--ink);
  font-size: 20px;
  line-height: 1.15;
}

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

.accordion-toggle {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 6px;
  min-height: 36px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  cursor: pointer;
}

.accordion-chevron {
  width: 8px;
  height: 8px;
  border-right: 2px solid currentColor;
  border-bottom: 2px solid currentColor;
  transform: rotate(45deg) translateY(-2px);
  transition: transform 160ms ease;
}

.accordion-toggle[aria-expanded="true"] .accordion-chevron {
  transform: rotate(225deg) translateY(-2px);
}

.accordion-content.is-collapsed,
.filters.is-collapsed > :not(.section-header),
.airport-avoid.is-collapsed {
  display: none;
}

html[data-workspace-calendar-expanded="false"] #calendarContent,
html[data-workspace-filters-expanded="false"] .filters > :not(.section-header),
html[data-workspace-city-avoid-expanded="false"] .airport-avoid {
  display: none;
}

body.workspace-is-hydrating .tabs,
body.workspace-is-hydrating main {
  opacity: 0;
}

.import-content {
  display: grid;
  gap: 12px;
}

.import-help {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.4;
}

.import-controls {
  display: grid;
  grid-template-columns: minmax(280px, 1fr) minmax(260px, auto);
  gap: 12px;
  align-items: start;
}

.import-file-picker {
  min-width: 0;
}

.import-file-help {
  display: grid;
  gap: 2px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
  line-height: 1.35;
  text-transform: none;
}

.import-file-help strong {
  color: var(--accent-strong);
  font-weight: 900;
}

.import-actions {
  display: grid;
  gap: 8px;
  justify-items: end;
  min-height: 40px;
}

.import-action-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  width: 100%;
}

.import-action-row button {
  min-width: 118px;
}

.import-fleet-row {
  display: grid;
  grid-template-columns: max-content minmax(62px, 1fr) minmax(62px, 1fr);
  align-items: center;
  gap: 8px;
}

.import-fleet-label {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.import-fleet-button {
  min-width: 62px;
  font-weight: 900;
}

.import-fleet-button.is-ghost {
  border-color: color-mix(in srgb, var(--line) 78%, var(--surface));
  background: color-mix(in srgb, var(--surface) 72%, var(--band));
  color: color-mix(in srgb, var(--muted) 58%, var(--surface));
}

.import-fleet-button.is-detected {
  border-color: var(--line);
  background: var(--surface);
  color: var(--ink);
}

.import-fleet-button.is-active {
  border-color: var(--accent-strong);
  background: var(--accent);
  color: var(--on-accent);
}

.import-fleet-button.is-active:disabled {
  opacity: 1;
  border-color: var(--accent-strong);
  background: var(--accent);
  color: var(--on-accent);
}

.btn-secondary.import-fleet-button.is-active:hover,
.btn-secondary.import-fleet-button.is-active:focus,
.btn-secondary.import-fleet-button.is-active:focus-visible,
.btn-secondary.import-fleet-button.is-active:active,
.btn-secondary.import-fleet-button.is-active:disabled:hover {
  opacity: 1;
  border-color: var(--accent-strong);
  background: var(--accent);
  color: var(--on-accent);
}

.import-fleet-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  grid-column: 2 / -1;
  min-height: 34px;
  min-width: 132px;
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--band);
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.1;
  text-align: center;
  text-transform: uppercase;
  white-space: nowrap;
}

.import-fleet-status.is-active {
  border-color: var(--accent-strong);
  background: color-mix(in srgb, var(--accent) 14%, var(--surface));
  color: var(--accent-strong);
}

.import-status {
  grid-column: 1 / -1;
  padding-top: 8px;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.import-status[hidden] {
  display: none;
}

.import-status.is-error {
  color: var(--warn);
}

.import-status.is-error strong {
  color: var(--accent-strong);
}

.import-status.is-success {
  color: var(--accent-strong);
}

.import-status.is-processing {
  color: var(--warn);
  font-weight: 900;
  animation: import-processing-pulse 850ms ease-in-out infinite;
}

.current-package-strip {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 4px;
  align-items: center;
  padding: 6px 8px;
  border: 1px solid color-mix(in srgb, var(--accent) 42%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--jump-bg) 68%, var(--surface));
}

.current-package-primary {
  min-width: 0;
}

.current-package-strip h3 {
  margin: 0 0 4px;
  color: var(--ink);
  font-size: 16px;
  line-height: 1.2;
}

.current-package-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
}

.offline-package-status {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  line-height: 1.25;
}

.offline-package-status.is-ready {
  color: var(--accent-strong);
}

.offline-package-status.is-offline {
  color: var(--gold);
}

.offline-package-status.is-error {
  color: var(--danger);
}

.package-management-grid {
  display: grid;
  grid-template-columns: minmax(320px, 1fr) minmax(320px, 1fr);
  gap: 10px;
  align-items: start;
}

.package-card {
  display: grid;
  align-content: start;
  gap: 8px;
  min-height: 100%;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 84%, var(--band));
}

.package-card-header {
  display: grid;
  gap: 4px;
}

.package-card-header .eyebrow,
.package-card-header h3 {
  margin: 0;
}

.import-new-files-card .import-controls {
  grid-template-columns: 1fr;
  align-items: start;
}

.import-new-files-card .import-actions {
  align-self: start;
  justify-items: stretch;
  justify-self: end;
  margin-top: 0;
  width: min(360px, 100%);
}

.import-new-files-card .import-file-picker {
  display: grid;
  gap: 4px;
}

.import-new-files-card .import-file-picker input {
  width: 100%;
}

.import-new-files-card .import-file-help {
  display: grid;
  gap: 2px;
  font-size: 11px;
  line-height: 1.25;
}

.import-new-files-card .import-file-help strong,
.import-new-files-card .import-file-help span {
  white-space: nowrap;
}

.import-new-files-card .import-action-row button {
  min-width: 0;
}

.import-new-files-card .import-fleet-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.import-new-files-card .import-fleet-label,
.import-new-files-card .import-fleet-status {
  grid-column: 1 / -1;
}

.package-card h3 {
  color: var(--ink);
  font-size: 15px;
  line-height: 1.2;
}

.package-card-status {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.3;
}

.package-details {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 6px 10px;
  margin: 0;
}

.package-details div {
  min-width: 0;
}

.package-details dt {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.1;
  text-transform: uppercase;
}

.package-details dd {
  margin: 2px 0 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
  line-height: 1.25;
}

.available-package-list {
  display: grid;
  gap: 6px;
}

.available-package-option {
  display: grid;
  align-content: start;
  gap: 6px;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, var(--band));
}

.global-package-notice {
  border: 1px solid color-mix(in srgb, var(--gold) 70%, var(--line));
  background: color-mix(in srgb, var(--gold) 16%, var(--surface));
}

.global-package-notice.is-empty {
  border-color: var(--line);
  background: color-mix(in srgb, var(--surface) 84%, var(--band));
}

.package-fleet-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 8px;
  align-self: end;
  justify-self: center;
  width: min(220px, 100%);
}

.package-fleet-action {
  min-width: 0;
}

.package-fleet-action.is-active {
  border-color: var(--accent);
  background: var(--accent);
  color: var(--on-accent);
}

.package-fleet-action.is-ghost:disabled {
  border-color: color-mix(in srgb, var(--line) 70%, var(--muted));
  background: color-mix(in srgb, var(--muted) 18%, var(--surface));
  color: color-mix(in srgb, var(--muted) 82%, var(--ink));
  opacity: 0.42;
}

.admin-topbar {
  position: static;
}

.admin-shell {
  width: min(1180px, calc(100% - 32px));
  margin: 0 auto;
  padding: 24px 0 48px;
}

.admin-hero {
  margin-bottom: 18px;
}

.admin-hero h1 {
  margin: 0;
  font-family: var(--font-brand);
  font-size: clamp(34px, 5vw, 54px);
  line-height: 0.95;
  text-transform: uppercase;
}

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

.admin-card {
  gap: 16px;
}

.admin-card h2 {
  margin: 0;
  font-size: 22px;
}

.admin-card h3 {
  margin: 0;
  font-size: 18px;
}

.admin-package-ops-card {
  grid-column: 1 / -1;
}

.admin-package-ops-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.admin-package-pane,
.admin-upload-review-panel,
.admin-inspect-panel {
  display: grid;
  gap: 12px;
  min-width: 0;
}

.admin-pane-header {
  display: grid;
  gap: 2px;
}

.admin-package-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-field,
.admin-filter {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-field input,
.admin-field select,
.admin-filter select {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 8px 10px;
  color: var(--ink);
  background: var(--surface);
  font: inherit;
  font-size: 14px;
  font-weight: 700;
  letter-spacing: 0;
  text-transform: none;
}

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

.admin-publish-gate {
  padding: 9px 10px;
  border: 1px solid color-mix(in srgb, var(--gold) 46%, var(--line));
  border-radius: 6px;
  background: color-mix(in srgb, var(--gold) 13%, var(--surface));
  color: var(--selection-ink);
  font-size: 13px;
  font-weight: 850;
}

.admin-auth-status {
  display: grid;
  gap: 2px;
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 90%, var(--band));
  color: var(--muted);
  font-size: 13px;
  font-weight: 850;
}

.admin-auth-label,
.admin-auth-detail {
  display: block;
}

.admin-auth-label {
  color: var(--ink);
  font-size: 13px;
}

.admin-auth-detail {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.admin-auth-status.is-success {
  border-color: color-mix(in srgb, var(--brand-cyan) 42%, var(--line));
}

.admin-auth-status.is-success .admin-auth-label {
  color: var(--accent-strong);
}

.admin-auth-status.is-error {
  border-color: color-mix(in srgb, var(--warn) 44%, var(--line));
}

.admin-auth-status.is-error .admin-auth-label {
  color: var(--warn);
}

.admin-auth-status.is-processing {
  border-color: color-mix(in srgb, var(--gold) 46%, var(--line));
}

.admin-auth-status.is-processing .admin-auth-label {
  color: var(--selection-ink);
}

body.admin-page[data-admin-auth="pending"] .admin-protected,
body.admin-page[data-admin-auth="locked"] .admin-protected,
body.admin-page:not([data-admin-elevation="unlocked"]) .admin-protected {
  display: none !important;
}

body.admin-page [hidden] {
  display: none !important;
}

.admin-elevation-panel {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 94%, var(--band));
}

.admin-elevation-panel[hidden] {
  display: none;
}

.admin-fallback-panel {
  padding-top: 2px;
}

.admin-fallback-panel summary {
  width: fit-content;
  cursor: pointer;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-fallback-panel[open] {
  display: grid;
  gap: 10px;
  padding: 10px;
  border: 1px dashed var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 94%, var(--band));
}

.admin-inspected-marker {
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-inspected-marker.is-ready {
  color: var(--accent-strong);
}

.admin-upload-review-list {
  display: grid;
  gap: 10px;
}

.admin-upload-review-card {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 90%, var(--band));
}

.admin-upload-review-card h3,
.admin-upload-review-card p {
  margin: 0;
}

.admin-packages-card,
.admin-package-ops-card {
  margin-bottom: 16px;
}

.admin-audit-card {
  margin-bottom: 16px;
}

.admin-user-log-card {
  margin-bottom: 16px;
}

.admin-reports-card {
  margin-bottom: 16px;
}

.admin-report-toolbar {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 10px;
}

.admin-audit-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-audit-table {
  min-width: 620px;
}

.admin-audit-log-table {
  min-width: 920px;
}

.admin-audit-log-detail {
  max-width: 360px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  white-space: normal;
}

.admin-user-log-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(120px, 1fr));
  gap: 10px;
}

.admin-user-log-stats article {
  display: grid;
  gap: 3px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, var(--band));
}

.admin-user-log-stats span,
.admin-table-muted,
.admin-user-cell span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.admin-user-log-stats strong {
  color: var(--ink);
  font-size: 24px;
  line-height: 1;
}

.admin-user-log-table {
  min-width: 980px;
}

.admin-reports-table {
  min-width: 1040px;
}

.admin-report-cell {
  display: grid;
  gap: 5px;
  max-width: 360px;
}

.admin-report-cell strong {
  color: var(--ink);
}

.admin-report-cell span,
.admin-report-cell summary {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
}

.admin-report-cell pre {
  max-height: 180px;
  overflow: auto;
  margin: 6px 0 0;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: color-mix(in srgb, var(--surface) 92%, var(--band));
  color: var(--ink);
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
  font-size: 11px;
  white-space: pre-wrap;
}

.admin-report-actions {
  display: grid;
  gap: 8px;
  min-width: 190px;
}

.admin-user-shell {
  max-width: 1180px;
}

.admin-user-hero {
  display: grid;
  gap: 8px;
}

.admin-user-crm-grid {
  display: grid;
  gap: 16px;
}

.admin-user-summary-card {
  grid-column: 1 / -1;
}

.admin-user-summary {
  display: grid;
  gap: 14px;
}

.admin-user-summary-identity {
  display: grid;
  gap: 3px;
}

.admin-user-summary-identity h2,
.admin-user-summary-identity p {
  margin: 0;
}

.admin-user-summary-identity p {
  color: var(--muted);
  font-weight: 750;
}

.admin-user-crm-stats {
  grid-template-columns: repeat(4, minmax(120px, 1fr));
}

.admin-user-packages-card {
  grid-column: 1 / -1;
}

.admin-user-controls {
  display: grid;
  gap: 10px;
}

.admin-checkbox-field {
  display: flex;
  align-items: center;
  gap: 8px;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
}

.admin-checkbox-field input {
  width: 16px;
  height: 16px;
  accent-color: var(--accent);
}

.admin-user-support-note-field textarea {
  min-height: 96px;
  resize: vertical;
}

.admin-user-packages-table {
  min-width: 760px;
}

.admin-user-cell {
  display: grid;
  gap: 2px;
}

.admin-user-cell strong {
  color: var(--ink);
}

.admin-packages-header {
  display: flex;
  align-items: end;
  justify-content: space-between;
  gap: 16px;
}

.admin-table-wrap {
  overflow-x: auto;
}

.admin-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 820px;
}

.admin-package-catalog-pane .admin-table {
  min-width: 560px;
}

.admin-table th,
.admin-table td {
  border-bottom: 1px solid var(--line);
  padding: 10px 8px;
  text-align: left;
  vertical-align: middle;
}

.admin-table th {
  color: var(--muted);
  font-size: 12px;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-status-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--surface);
  color: var(--ink);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.admin-status-published {
  border-color: color-mix(in srgb, var(--brand-cyan) 55%, var(--line));
  background: color-mix(in srgb, var(--brand-cyan) 16%, var(--surface));
}

.admin-status-vetted {
  border-color: color-mix(in srgb, var(--gold) 60%, var(--line));
  background: color-mix(in srgb, var(--gold) 18%, var(--surface));
}

.admin-status-retired {
  color: var(--muted);
  background: color-mix(in srgb, var(--muted) 10%, var(--surface));
}

.admin-inspect-card,
.admin-inspect-panel,
.admin-upload-review-panel {
  margin-bottom: 24px;
}

.admin-inspect-details {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

@media (min-width: 700px) {
  .available-package-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: stretch;
  }

  .available-package-option {
    min-height: 100%;
  }
}

@keyframes import-processing-pulse {
  0%,
  100% {
    color: var(--warn);
  }

  50% {
    color: #f04b37;
  }
}

.summary-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
  margin-bottom: 20px;
}

.metric {
  min-height: 72px;
  padding: 12px 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.metric .label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
}

.metric .value {
  margin-top: 4px;
  font-size: 24px;
  font-weight: 850;
}

.tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px;
  position: sticky;
  top: 0;
  z-index: 60;
  margin: 0;
  padding: 12px clamp(16px, 4vw, 48px);
  background: var(--band);
  border-bottom: 1px solid var(--line);
}

.tab-group {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.tab-group-home {
  flex: 1 1 440px;
  align-items: stretch;
}

.tab-group-home > .tab {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.tab-group-home > .tab:is([data-view-target="home"], [data-tab="import"]) {
  min-width: 86px;
}

.tab-group-selection {
  margin-left: auto;
}

.tab-group-jumps {
  flex: 1 1 100%;
  justify-content: space-between;
  padding: 4px;
  border: 1px solid var(--jump-border);
  border-radius: 8px;
  background: color-mix(in srgb, var(--jump-bg) 65%, transparent);
}

.tab-jump-buttons {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 7px;
}

.tab-divider {
  width: 1px;
  min-height: 42px;
  background: var(--line);
  margin: 0 8px;
}

.tabs-spacer {
  flex: 1 1 auto;
}

.tab,
button,
select,
input {
  font: inherit;
}

.tab {
  border: 1px solid var(--line);
  background: var(--surface);
  color: var(--ink);
  border-radius: 8px;
  padding: 10px 14px;
  font-weight: 800;
  cursor: pointer;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease, transform 120ms ease;
}

.tab:hover {
  transform: translateY(-1px);
}

.tab.is-active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.tab-jump.is-home-active,
.tab-jump.is-home-active:hover,
.tab-jump.is-home-active:focus,
.tab-jump.is-home-active:focus-visible,
.tab-jump.is-home-active:active,
.tab-jump.is-jump-active,
.tab-jump.is-jump-active:hover,
.tab-jump.is-jump-active:focus,
.tab-jump.is-jump-active:focus-visible,
.tab-jump.is-jump-active:active {
  background: var(--accent);
  border-color: var(--accent);
  color: var(--on-accent);
}

.tab[data-tab="selection"]:not(.is-active) {
  background: var(--selection-bg);
  border-color: var(--selection-border);
  color: var(--selection-ink);
}

.tab-jump {
  background: var(--jump-bg);
  border-color: var(--jump-border);
  color: var(--jump-ink);
  padding-inline: 13px;
}

.tab-jump:hover {
  background: color-mix(in srgb, var(--jump-bg) 70%, var(--surface));
}

.is-feature-locked {
  position: relative;
  opacity: 0.72;
}

.is-feature-locked :is(input, select, textarea, button):disabled {
  cursor: not-allowed;
}

.feature-lock-label {
  display: inline-flex;
  width: fit-content;
  align-items: center;
  justify-content: center;
  margin-top: 6px;
  padding: 3px 7px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, var(--accent));
  border-radius: 999px;
  background: color-mix(in srgb, var(--surface) 88%, var(--accent));
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.feature-lock-popup {
  display: grid;
  gap: 3px;
  max-width: 220px;
}

.feature-lock-popup strong {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.feature-lock-popup span {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.tab .feature-lock-label {
  margin-top: 0;
  margin-left: 6px;
}

.panel {
  display: none;
}

.panel.is-active {
  display: block;
}

.import-panel.panel.is-active {
  display: grid;
}

.preferences-grid {
  display: grid;
  gap: 14px;
}

.preferences-card {
  padding: 18px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.preferences-card-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: end;
  margin-bottom: 14px;
}

.profile-editor {
  display: grid;
  grid-template-columns: minmax(300px, 380px) 1px minmax(320px, 760px);
  gap: 24px;
  align-items: start;
  justify-content: start;
}

.profile-media {
  min-width: 0;
  width: 100%;
}

.profile-divider {
  align-self: stretch;
  width: 1px;
  background: var(--line);
}

.profile-avatar-stack {
  display: grid;
  gap: 12px;
  justify-items: start;
  align-items: start;
}

.profile-photo-actions {
  display: grid;
  gap: 8px;
  justify-items: start;
}

.profile-crop-studio {
  display: grid;
  gap: 6px;
  width: min(190px, 100%);
}

.profile-crop-studio[hidden] {
  display: none;
}

.profile-crop-label,
.profile-crop-help {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  line-height: 1.3;
}

.profile-crop-label {
  color: var(--accent-strong);
  font-weight: 900;
  text-transform: uppercase;
}

.profile-crop-stage {
  position: relative;
  width: min(190px, 100%);
  aspect-ratio: 1;
  overflow: hidden;
  border: 2px solid color-mix(in srgb, var(--accent) 72%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--band) 74%, var(--surface));
  cursor: grab;
  touch-action: none;
}

.profile-crop-stage:focus-visible {
  outline: 3px solid var(--brand-cyan);
  outline-offset: 3px;
}

.profile-crop-stage.is-dragging {
  cursor: grabbing;
}

.profile-crop-stage img {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  object-fit: cover;
  user-select: none;
  pointer-events: none;
}

.profile-crop-frame {
  position: absolute;
  inset: 12px;
  border: 2px solid color-mix(in srgb, var(--brand-cyan) 84%, #ffffff);
  border-radius: 6px;
  box-shadow:
    0 0 0 999px rgba(0, 0, 0, 0.16),
    inset 0 0 0 1px rgba(255, 255, 255, 0.28);
  pointer-events: none;
}

.profile-photo-status {
  min-height: 32px;
  width: min(190px, 100%);
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 750;
  line-height: 1.35;
}

.profile-photo-status.is-error {
  color: var(--warn);
}

.profile-upload {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: fit-content;
  min-height: 24px;
  height: 24px;
  padding: 0 10px;
  text-transform: none;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  align-self: start;
}

.profile-photo-button,
.profile-avatar-stack .btn-secondary {
  width: fit-content;
  min-height: 24px;
  height: 24px;
  padding: 0 10px;
  text-transform: none;
  font-size: 11px;
  font-weight: 800;
  line-height: 1;
  text-align: center;
  justify-content: center;
  align-self: start;
}

.profile-subscription-slot {
  display: grid;
  gap: 10px;
  width: 100%;
  min-height: 112px;
  margin-top: 24px;
  padding: 12px;
  align-self: stretch;
  border: 1px solid color-mix(in srgb, var(--line) 76%, var(--accent));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 86%, var(--band));
}

.profile-subscription-slot p {
  margin: 0;
}

.profile-subscription-label {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.profile-subscription-status {
  color: var(--muted);
  font-size: 12px;
  font-weight: 750;
  line-height: 1.35;
}

.subscription-card-header,
.subscription-action-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.subscription-status-badge {
  display: inline-flex;
  align-items: center;
  min-height: 22px;
  padding: 3px 7px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 10px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.subscription-status-paid {
  border-color: color-mix(in srgb, var(--accent) 58%, var(--line));
  background: color-mix(in srgb, var(--accent) 15%, transparent);
  color: var(--accent-strong);
}

.subscription-status-free {
  border-color: color-mix(in srgb, var(--gold) 62%, var(--line));
  background: color-mix(in srgb, var(--gold) 17%, transparent);
  color: var(--selection-ink);
}

.subscription-current {
  display: grid;
  gap: 4px;
}

.subscription-current-title {
  color: var(--ink);
  font-size: 15px;
  font-weight: 900;
  line-height: 1.15;
}

.subscription-section-label {
  margin: 2px 0 -2px;
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.subscription-plan-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 8px;
}

.subscription-plan-card {
  display: grid;
  gap: 3px;
  padding: 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 92%, var(--band));
}

.subscription-plan-card span,
.subscription-detail-list dt,
.subscription-footnote {
  color: var(--muted);
  font-size: 10px;
  font-weight: 900;
  line-height: 1.25;
  text-transform: uppercase;
}

.subscription-plan-card strong {
  color: var(--ink);
  font-size: 16px;
  font-weight: 950;
  line-height: 1.1;
}

.subscription-plan-card small {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  line-height: 1.25;
}

.subscription-plan-card.is-active-term {
  border-color: color-mix(in srgb, #2fbf71 78%, var(--line));
  background: color-mix(in srgb, #2fbf71 16%, var(--surface));
}

.subscription-plan-card.is-expired-term {
  border-color: color-mix(in srgb, #c94f4f 58%, var(--line));
  background: color-mix(in srgb, #c94f4f 9%, var(--surface));
}

.subscription-plan-card.is-expired-term strong {
  text-decoration: line-through;
  text-decoration-thickness: 2px;
}

.subscription-inline-select {
  width: 100%;
  min-height: 32px;
  padding: 0 28px 0 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background-color: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 12px;
  font-weight: 900;
}

.subscription-inline-select:disabled {
  color: var(--muted);
  opacity: 0.72;
}

.subscription-detail-list {
  display: grid;
  gap: 7px;
  margin: 0;
}

.subscription-detail-list div {
  display: grid;
  gap: 2px;
}

.subscription-detail-list dd {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
  color: var(--ink);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.25;
  text-transform: none;
}

.subscription-action-row {
  flex-wrap: wrap;
  justify-content: flex-start;
}

.subscription-action-row button {
  min-height: 32px;
  padding: 0 10px;
  font-size: 11px;
}

.subscription-footnote {
  margin: 0;
  text-transform: none;
  line-height: 1.35;
}

.profile-fields {
  display: grid;
  gap: 12px;
  min-width: 0;
  width: 100%;
  max-width: 760px;
}

.profile-field-divider {
  width: 100%;
  height: 1px;
  margin: 2px 0;
  background: color-mix(in srgb, var(--line) 82%, transparent);
}

.profile-dev-fields {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 10px;
  padding: 10px;
  border: 1px dashed color-mix(in srgb, var(--accent) 45%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 7%, var(--surface));
}

.profile-dev-fields label {
  min-width: 0;
}

.profile-dev-fields.is-readonly input {
  color: var(--muted);
  cursor: not-allowed;
}

body.is-production .profile-dev-fields[data-dev-only="true"] {
  display: none;
}

.preference-threshold-stack {
  display: grid;
  gap: 12px;
}

.preference-long-stay-threshold {
  width: min(360px, 100%);
}

.preference-breakfast-window {
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.preference-breakfast-window legend {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  margin: 0 0 2px;
  padding: 0;
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.preference-breakfast-grid {
  display: grid;
  grid-template-columns: minmax(180px, 420px);
  gap: 10px;
  align-items: end;
}

.preference-threshold-stack label,
.preference-breakfast-grid label {
  min-width: 0;
}

.preference-label-with-help {
  display: inline-flex;
  align-items: center;
  gap: 6px;
}

.preference-help {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 18px;
  height: 18px;
  padding: 0;
  border: 1px solid color-mix(in srgb, var(--accent) 55%, var(--line));
  border-radius: 999px;
  background: transparent;
  color: var(--accent-strong);
  font: inherit;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  cursor: pointer;
}

.preference-apply-button {
  width: fit-content;
  align-self: flex-start;
}

.preference-reset-button {
  width: fit-content;
  border-color: color-mix(in srgb, var(--accent) 45%, var(--line));
  background: color-mix(in srgb, var(--accent) 12%, var(--surface));
  color: var(--accent-strong);
}

.preference-action-row {
  display: flex;
  gap: 10px;
  margin-top: 12px;
  align-self: flex-start;
}

.preferences-note {
  margin: 0;
  color: var(--muted);
  font-size: 13px;
  font-weight: 700;
  line-height: 1.45;
}

.preference-inline-form {
  display: flex;
  gap: 10px;
  align-items: end;
  margin-bottom: 14px;
}

.preference-inline-form label {
  flex: 1 1 auto;
}

.preference-airport-form {
  display: grid;
  grid-template-columns: minmax(160px, 280px) auto;
  align-items: end;
  justify-content: start;
}

.preference-airport-form label {
  min-width: 0;
}

.preference-airport-form .btn-primary {
  width: 72px;
  min-height: 40px;
  padding-top: 8px;
  padding-bottom: 8px;
}

.preference-pill-grid {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.preference-pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 32px;
  padding: 5px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.preference-pill-remove {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 16px;
  height: 16px;
  border-radius: 999px;
  background: color-mix(in srgb, var(--gold) 26%, transparent);
  font-size: 13px;
  line-height: 1;
}

.preference-pill.is-active {
  border-color: rgba(215, 164, 65, 0.65);
  background: #fff8e7;
  color: #8a6225;
  box-shadow: inset 0 0 0 1px rgba(215, 164, 65, 0.18);
}

body.theme-dark .preferences-card,
body.theme-dark .profile-button,
body.theme-dark .preferences-card input,
body.theme-dark .preferences-card select {
  background: var(--surface-raised);
}

body.theme-dark .preferences-card {
  border-color: #3a4b4e;
  box-shadow: 0 10px 24px rgba(0, 0, 0, 0.18);
}

body.theme-dark .preference-reset-button {
  border-color: color-mix(in srgb, var(--accent) 55%, var(--line));
  background: color-mix(in srgb, var(--accent) 18%, var(--surface-raised));
  color: #b6f1ea;
}

.panel-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-bottom: 10px;
}

.filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(150px, 1fr));
  gap: 12px;
  align-items: end;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filter-section-header {
  grid-column: 1 / -1;
  justify-content: space-between;
}

.filter-reset-row {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
}

.filter-reset-row.filter-section-header {
  justify-content: space-between;
}

label,
.filter-group {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.filters label,
.city-avoid-panel,
.calendar-panel {
  transition: background 0.18s ease, border-color 0.18s ease, box-shadow 0.18s ease;
}

.filters label.is-filter-active {
  margin: -4px;
  padding: 4px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--accent) 8%, transparent);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 34%, transparent);
}

.filters label.is-filter-active input,
.filters label.is-filter-active select {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--accent) 14%, transparent);
}

.filters label.is-filter-active.is-filter-pending {
  background: color-mix(in srgb, var(--gold) 18%, transparent);
  color: #8f6210;
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--gold) 58%, transparent);
}

.filters label.is-filter-active.is-filter-pending input,
.filters label.is-filter-active.is-filter-pending select {
  border-color: var(--gold);
  box-shadow: 0 0 0 2px color-mix(in srgb, var(--gold) 24%, transparent);
}

.city-avoid-panel.is-filter-active,
.calendar-panel.is-filter-active {
  border-color: color-mix(in srgb, var(--accent) 72%, var(--line));
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 18%, transparent);
}

input,
select {
  width: 100%;
  min-height: 40px;
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 8px 10px;
  background: white;
  color: var(--ink);
  font-size: 14px;
  text-transform: none;
}

.filter-wide {
  grid-column: 1 / -1;
}

.city-avoid-panel {
  margin-top: 12px;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.filter-divider {
  grid-column: 1 / -1;
  height: 0;
  margin: 2px 0;
  border-top: 1px solid var(--line);
}

.airport-avoid {
  display: grid;
  gap: 10px;
  margin-top: 12px;
}

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

.avoid-title {
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  text-transform: uppercase;
}

.airport-regions {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}

.airport-region {
  display: grid;
  gap: 8px;
  align-content: start;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.airport-region h3 {
  margin: 0;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  text-transform: none;
}

.airport-subgroups {
  display: grid;
  gap: 8px;
}

.airport-subgroup {
  display: grid;
  gap: 6px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.airport-subgroup:first-child {
  padding-top: 0;
  border-top: 0;
}

.airport-subgroup h4 {
  margin: 0;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  text-transform: uppercase;
}

.airport-region.is-quadrants .airport-subgroups {
  grid-template-columns: 1fr 1fr;
  grid-template-areas:
    "europe middle-east"
    "africa middle-east";
  align-items: start;
}

.airport-area-europe {
  grid-area: europe;
}

.airport-area-africa {
  grid-area: africa;
}

.airport-area-middle-east {
  grid-area: middle-east;
  border-left: 1px solid var(--line);
  padding-left: 10px;
}

.airport-buttons {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.airport-btn {
  min-height: 32px;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 13px;
  font-weight: 800;
  cursor: pointer;
}

.airport-btn.is-active {
  border-color: rgba(179, 63, 47, 0.5);
  background: #f7e5e1;
  color: var(--warn);
  box-shadow: inset 0 0 0 1px rgba(179, 63, 47, 0.15);
}

.airport-btn.is-preference-blocked {
  border-color: rgba(215, 164, 65, 0.65);
  background: #fff8e7;
  color: #8a6225;
  box-shadow: inset 0 0 0 1px rgba(215, 164, 65, 0.18);
}

.airport-btn.is-active.is-preference-blocked {
  border-color: rgba(179, 63, 47, 0.6);
  background: linear-gradient(180deg, #fff6df 0%, #f7e5e1 100%);
  color: var(--warn);
}

body.theme-dark .profile-button,
body.theme-dark .btn-secondary,
body.theme-dark .airport-btn,
body.theme-dark .preference-pill,
body.theme-dark .selection-handle,
body.theme-dark .selection-remove {
  background: #1b2729;
  color: var(--ink);
  border-color: var(--line);
}

body.theme-dark .import-fleet-button.is-active,
body.theme-dark .import-fleet-button.is-active:disabled {
  border-color: var(--accent-strong);
  background: var(--brand-cyan);
  color: var(--on-accent);
  opacity: 1;
}

body.theme-dark .btn-primary,
body.theme-dark .tab.is-active,
body.theme-dark .bid-list-actions .is-active,
body.theme-dark .calendar-day.is-selected,
body.theme-dark .calendar-day.is-selected:hover,
body.theme-dark .calendar-day.is-selected:focus {
  background: var(--brand-cyan);
  border-color: var(--brand-cyan-strong);
  color: var(--on-accent);
}

body.theme-dark .profile-avatar {
  background: #213234;
  color: #8de3d6;
}

body.theme-dark .airport-btn.is-preference-blocked,
body.theme-dark .preference-pill.is-active {
  background: #3c2f18;
  color: #ffd58a;
  border-color: rgba(224, 182, 90, 0.55);
  box-shadow: inset 0 0 0 1px rgba(224, 182, 90, 0.16);
}

body.theme-dark .airport-btn.is-active,
body.theme-dark .airport-btn.is-active.is-preference-blocked {
  background: #3a2220;
  color: #ffb4a8;
  border-color: rgba(226, 122, 105, 0.5);
}

.check {
  min-height: 40px;
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #fbfcfc;
}

.check input {
  width: auto;
  min-height: auto;
}

.bid-list-panel {
  display: grid;
  gap: 10px;
  margin: 12px 0;
  padding: 12px 14px;
  background: #fffdf5;
  border: 1px solid rgba(215, 164, 65, 0.55);
  border-left: 5px solid var(--gold);
  border-radius: 8px;
}

.bid-list-summary {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: center;
}

.bid-list-summary h3 {
  margin: 0;
  font-size: 16px;
}

.bid-list-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  justify-content: flex-end;
}

.bid-list-actions .is-active {
  background: var(--accent);
  border-color: var(--accent-strong);
  color: var(--on-accent);
}

.bid-list-items {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
  align-items: center;
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.bid-list-guidance {
  flex-basis: 100%;
  color: var(--muted);
  font-weight: 850;
}

.bid-list-chip {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  min-height: 30px;
  padding: 5px 8px;
  border: 1px solid rgba(215, 164, 65, 0.75);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.bid-list-chip.is-dragging {
  opacity: 0.45;
}

.bid-list-chip.is-drop-target {
  border-color: var(--accent);
  box-shadow: 0 0 0 2px rgba(15, 123, 108, 0.16);
}

.bid-drag-handle {
  color: var(--warn);
  font-weight: 900;
  letter-spacing: 0;
  cursor: grab;
}

.result-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin: 0;
  padding: 10px 0;
  background: var(--band);
  border-bottom: 1px solid var(--line);
}

.result-header span {
  color: var(--muted);
  font-weight: 800;
}

.table-wrap {
  overflow: visible;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

#reservesPanel table {
  min-width: 1040px;
}

#reservesPanel th,
#reservesPanel td {
  padding-left: 10px;
  padding-right: 10px;
}

#reservesPanel th:nth-child(1),
#reservesPanel td:nth-child(1) {
  width: 88px;
  min-width: 88px;
}

#reservesPanel th:nth-child(2),
#reservesPanel td:nth-child(2) {
  width: 92px;
  min-width: 92px;
}

#reservesPanel th:nth-child(3),
#reservesPanel td:nth-child(3) {
  width: 88px;
  min-width: 88px;
}

#reservesPanel th:nth-child(4),
#reservesPanel td:nth-child(4) {
  width: 90px;
  min-width: 90px;
}

#reservesPanel th:nth-child(5),
#reservesPanel td:nth-child(5) {
  width: 150px;
  min-width: 150px;
}

#reservesPanel th:nth-child(6),
#reservesPanel td:nth-child(6) {
  width: 90px;
  min-width: 90px;
}

#reservesPanel th:nth-child(7),
#reservesPanel td:nth-child(7) {
  width: 190px;
  min-width: 190px;
}

#reservesPanel th:nth-child(8),
#reservesPanel td:nth-child(8) {
  width: 320px;
  min-width: 320px;
}

#linesPanel table {
  min-width: 1160px;
}

#linesPanel th,
#linesPanel td {
  padding-left: 11px;
  padding-right: 11px;
}

#linesPanel th:nth-child(1),
#linesPanel td:nth-child(1) {
  width: 84px;
  min-width: 84px;
}

#linesPanel th:nth-child(2),
#linesPanel td:nth-child(2) {
  width: 92px;
  min-width: 92px;
}

#linesPanel th:nth-child(3),
#linesPanel td:nth-child(3) {
  width: 82px;
  min-width: 82px;
}

#linesPanel th:nth-child(4),
#linesPanel td:nth-child(4),
#linesPanel th:nth-child(5),
#linesPanel td:nth-child(5) {
  width: 64px;
  min-width: 64px;
}

#linesPanel th:nth-child(6),
#linesPanel td:nth-child(6),
#linesPanel th:nth-child(9),
#linesPanel td:nth-child(9) {
  width: 86px;
  min-width: 86px;
}

#linesPanel th:nth-child(8),
#linesPanel td:nth-child(8) {
  min-width: 210px;
}

#linesPanel th:nth-child(10),
#linesPanel td:nth-child(10) {
  min-width: 320px;
}

#linesPanel th:nth-child(11),
#linesPanel td:nth-child(11) {
  width: 190px;
  min-width: 190px;
}

#trainingPanel table {
  width: 100%;
  min-width: 720px;
}

#trainingPanel th,
#trainingPanel td {
  padding-left: 10px;
  padding-right: 10px;
}

#trainingPanel th:nth-child(1),
#trainingPanel td:nth-child(1) {
  width: 76px;
  min-width: 76px;
}

#trainingPanel th:nth-child(2),
#trainingPanel td:nth-child(2) {
  width: 82px;
  min-width: 82px;
}

#trainingPanel th:nth-child(3),
#trainingPanel td:nth-child(3) {
  width: 72px;
  min-width: 72px;
}

#trainingPanel th:nth-child(4),
#trainingPanel td:nth-child(4) {
  width: 56px;
  min-width: 56px;
}

#trainingPanel th:nth-child(5),
#trainingPanel td:nth-child(5) {
  min-width: 86px;
  padding-left: 6px;
  padding-right: 6px;
}

#trainingPanel th:nth-child(6),
#trainingPanel td:nth-child(6) {
  min-width: 86px;
  padding-left: 6px;
  padding-right: 6px;
}

#trainingPanel th:nth-child(7),
#trainingPanel td:nth-child(7) {
  min-width: 112px;
}

#trainingPanel .training-pattern-cell {
  text-align: right;
  vertical-align: bottom;
}

.training-pattern-layout {
  display: inline-flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 10px;
}

.training-mini-calendar {
  display: inline-grid;
  grid-template-columns: repeat(7, 10px);
  gap: 4px;
  align-items: center;
  justify-content: center;
}

.date-stack {
  display: inline-grid;
  gap: 2px;
  justify-items: center;
  line-height: 1.1;
  white-space: nowrap;
}

.training-window-cell {
  display: inline-grid;
  gap: 7px;
  justify-items: center;
  line-height: 1.1;
}

.training-window-badges {
  display: flex;
  flex-wrap: wrap;
  justify-content: center;
  gap: 5px;
}

.training-window-badge {
  min-height: 22px;
  padding: 4px 7px;
  border: 1px solid transparent;
  border-radius: 7px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  letter-spacing: 0;
  white-space: nowrap;
}

.training-window-badge.is-flex {
  background: #f1f4fb;
  border-color: #8fa3d6;
  color: #334f9d;
}

.training-window-badge.is-split {
  background: #f7e5e1;
  border-color: rgba(179, 63, 47, 0.3);
  color: var(--warn);
}

.training-mini-day {
  width: 10px;
  height: 10px;
  border-radius: 2px;
  border: 1px solid transparent;
  background: color-mix(in srgb, var(--line) 78%, var(--surface));
}

.training-mini-day.is-idle {
  background: color-mix(in srgb, var(--line) 62%, var(--surface));
  border-color: color-mix(in srgb, var(--line) 72%, var(--surface));
}

.training-mini-day.is-training {
  background: var(--accent);
  border-color: var(--accent);
}

.training-mini-day.is-reserve {
  background: var(--gold);
  border-color: var(--gold);
}

.training-mini-day.is-other {
  background: color-mix(in srgb, var(--muted) 55%, var(--surface));
  border-color: color-mix(in srgb, var(--muted) 55%, var(--surface));
}

.training-mini-day.is-empty {
  background: transparent;
}

#tripsPanel table {
  min-width: 880px;
}

#tripsPanel th,
#tripsPanel td {
  padding-left: 9px;
  padding-right: 9px;
}

#tripsPanel th:nth-child(1),
#tripsPanel td:nth-child(1) {
  width: 72px;
  min-width: 72px;
}

#tripsPanel th:nth-child(2),
#tripsPanel td:nth-child(2) {
  width: 94px;
  min-width: 94px;
}

#tripsPanel th:nth-child(3),
#tripsPanel td:nth-child(3) {
  width: 82px;
  min-width: 82px;
}

#tripsPanel th:nth-child(4),
#tripsPanel td:nth-child(4) {
  width: 74px;
  min-width: 74px;
}

#tripsPanel th:nth-child(5),
#tripsPanel td:nth-child(5) {
  width: 74px;
  min-width: 74px;
}

#tripsPanel th:nth-child(6),
#tripsPanel td:nth-child(6) {
  width: 62px;
  min-width: 62px;
}

#tripsPanel th:nth-child(7),
#tripsPanel td:nth-child(7) {
  width: 78px;
  min-width: 78px;
}

#tripsPanel th:nth-child(8),
#tripsPanel td:nth-child(8) {
  width: 62px;
  min-width: 62px;
}

#tripsPanel th:nth-child(9),
#tripsPanel td:nth-child(9) {
  min-width: 280px;
}

table {
  width: 100%;
  min-width: 1080px;
  border-collapse: separate;
  border-spacing: 0;
}

th,
td {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
  font-size: 14px;
}

thead th + th {
  border-left: 1px solid rgba(124, 143, 149, 0.22);
}

.panel table thead th {
  vertical-align: middle;
}

.is-bid-selected td {
  background: #fffaf0;
  box-shadow: inset 0 1px 0 rgba(215, 164, 65, 0.12), inset 0 -1px 0 rgba(215, 164, 65, 0.12);
}

.is-bid-selected td:first-child {
  box-shadow: inset 5px 0 0 var(--gold), inset 0 1px 0 rgba(215, 164, 65, 0.18), inset 0 -1px 0 rgba(215, 164, 65, 0.18);
}

.bid-select {
  display: inline-flex;
  grid-template-columns: none;
  align-items: center;
  gap: 7px;
  color: var(--ink);
  font-size: 14px;
  font-weight: 900;
  text-transform: none;
}

.bid-select input {
  width: 16px;
  height: 16px;
  min-height: 16px;
  accent-color: var(--accent);
  cursor: pointer;
}

.line-name {
  min-width: 34px;
}

.number-cell {
  text-align: center;
}

.carry-in-cell {
  line-height: 1.2;
}

.carry-in-days,
.carry-in-hours {
  display: block;
}

.carry-in-hours {
  margin-top: 2px;
  color: var(--muted);
  font-size: 11px;
  font-weight: 850;
  white-space: nowrap;
}

.paid-detail-inline {
  display: block;
  width: fit-content;
  margin: 2px auto 0;
  padding: 2px 5px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, var(--accent));
  border-radius: 999px;
  color: var(--muted);
  font-size: 9px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
  white-space: nowrap;
}

.nowrap-header {
  white-space: nowrap;
}

.center-header {
  text-align: center;
}

.right-header {
  text-align: right;
}

th {
  background: var(--brand-navy);
  color: #f2fbff;
  font-size: 12px;
  text-transform: uppercase;
}

.panel .table-wrap thead th {
  position: sticky;
  top: var(--tabs-offset);
  z-index: 45;
  box-shadow: 0 1px 0 var(--line), 0 4px 8px rgba(29, 37, 40, 0.08);
}

.selection-summary {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  margin: 12px 0;
}

.selection-summary-copy {
  display: grid;
  gap: 6px;
}

.selection-summary h2 {
  margin: 0;
}

.selection-help {
  max-width: none;
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  text-align: left;
}

.selection-export {
  display: grid;
  gap: 10px;
  margin: 0 0 12px;
  padding: 14px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.selection-export-header {
  display: flex;
  justify-content: space-between;
  gap: 14px;
  align-items: start;
}

.selection-export-header h3 {
  margin: 0;
  font-size: 16px;
}

.selection-export-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.selection-submit-link {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px;
  padding: 10px 12px;
  border: 1px solid color-mix(in srgb, var(--accent) 35%, var(--line));
  border-radius: 8px;
  background: color-mix(in srgb, var(--jump-bg) 70%, var(--surface));
}

.selection-submit-label {
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.selection-submit-link a {
  color: var(--accent-strong);
  font-size: 15px;
  font-weight: 850;
  text-decoration: none;
}

.selection-submit-link a:hover {
  text-decoration: underline;
}

.selection-output {
  min-height: 156px;
  resize: vertical;
  font-family: ui-monospace, SFMono-Regular, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  font-size: 13px;
  line-height: 1.45;
}

.selection-output-status {
  min-height: 18px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 700;
}

.selection-table-wrap table {
  min-width: 920px;
}

.selection-rank {
  width: 86px;
}

.selection-handle {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  min-height: 32px;
  padding: 5px 8px;
  border: 1px solid rgba(215, 164, 65, 0.75);
  border-radius: 8px;
  background: white;
  color: var(--ink);
  font-size: 13px;
  font-weight: 850;
  cursor: grab;
}

.selection-type {
  display: inline-flex;
  min-height: 24px;
  align-items: center;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
}

.selection-type-line {
  background: color-mix(in srgb, var(--brand-cyan) 13%, #ffffff);
  color: var(--accent-strong);
}

.selection-type-mixed {
  background: #f5efe4;
  color: #8a6225;
}

.selection-type-training {
  background: #eef1fa;
  color: #4458a6;
}

.selection-type-reserve {
  background: #f5efe4;
  color: #8a6225;
}

.selection-details {
  color: var(--ink);
  font-weight: 700;
}

.selection-line-cell {
  font-weight: 850;
  cursor: pointer;
}

.selection-detail-pills {
  display: flex;
  flex-wrap: wrap;
  gap: 6px;
}

.selection-detail-pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 850;
  white-space: nowrap;
}

.selection-detail-pill-line {
  background: color-mix(in srgb, var(--brand-cyan) 13%, #ffffff);
  color: var(--accent-strong);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--brand-cyan) 24%, transparent);
}

.selection-detail-pill-warn {
  background: #f7e5e1;
  color: var(--warn);
  box-shadow: inset 0 0 0 1px rgba(179, 63, 47, 0.28);
}

.selection-detail-pill-deadhead {
  background: #fff4ef;
  color: #9f5138;
  box-shadow: inset 0 0 0 1px rgba(179, 63, 47, 0.22);
}

.selection-detail-pill-training {
  background: #eef1fa;
  color: #4458a6;
  box-shadow: inset 0 0 0 1px rgba(68, 88, 166, 0.18);
}

.selection-detail-pill-reserve {
  background: #f5efe4;
  color: #8a6225;
  box-shadow: inset 0 0 0 1px rgba(138, 98, 37, 0.18);
}

.selection-detail-empty {
  color: var(--muted);
}

.selection-remove {
  min-height: 30px;
  padding: 5px 9px;
  border: 1px solid rgba(179, 63, 47, 0.3);
  border-radius: 8px;
  background: #fff7f5;
  color: var(--warn);
  font-size: 13px;
  font-weight: 850;
  cursor: pointer;
}

.selection-row.is-dragging {
  opacity: 0.5;
}

.selection-row.is-drop-target td {
  background: #f4fbf9;
  box-shadow: inset 0 1px 0 rgba(15, 123, 108, 0.16), inset 0 -1px 0 rgba(15, 123, 108, 0.16);
}

.selection-row.is-moved-up td {
  animation: selection-move-up-flash 1440ms ease-out;
}

.selection-row.is-moved-down td {
  animation: selection-move-down-flash 1440ms ease-out;
}

.selection-row.is-moved-up .selection-line-cell strong {
  display: inline-block;
  animation: selection-line-rise 1440ms ease-out;
}

.selection-row.is-moved-down .selection-line-cell strong {
  display: inline-block;
  animation: selection-line-drop 1440ms ease-out;
}

@keyframes selection-move-up-flash {
  0% {
    background: color-mix(in srgb, #21a667 32%, var(--surface));
    box-shadow: inset 0 0 0 2px rgba(33, 166, 103, 0.75);
  }
  38% {
    background: color-mix(in srgb, #21a667 20%, var(--surface));
    box-shadow: inset 0 0 0 2px rgba(33, 166, 103, 0.5);
  }
  100% {
    background: transparent;
    box-shadow: inset 0 0 0 0 transparent;
  }
}

@keyframes selection-move-down-flash {
  0% {
    background: color-mix(in srgb, #d94d42 34%, var(--surface));
    box-shadow: inset 0 0 0 2px rgba(217, 77, 66, 0.78);
  }
  38% {
    background: color-mix(in srgb, #d94d42 22%, var(--surface));
    box-shadow: inset 0 0 0 2px rgba(217, 77, 66, 0.5);
  }
  100% {
    background: transparent;
    box-shadow: inset 0 0 0 0 transparent;
  }
}

@keyframes selection-line-rise {
  0% {
    opacity: 0.25;
    transform: translateY(16px) scale(0.98);
  }
  18% {
    opacity: 1;
    transform: translateY(-2px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

@keyframes selection-line-drop {
  0% {
    opacity: 0.25;
    transform: translateY(-16px) scale(0.98);
  }
  18% {
    opacity: 1;
    transform: translateY(2px) scale(1.04);
  }
  100% {
    opacity: 1;
    transform: translateY(0) scale(1);
  }
}

.selection-rank-control {
  display: inline-grid;
  grid-template-columns: auto auto auto;
  align-items: center;
  gap: 4px;
}

.selection-rank {
  position: relative;
}

.selection-move-badge {
  position: absolute;
  left: 50%;
  top: calc(100% - 4px);
  z-index: 3;
  transform: translate(-50%, -2px);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 54px;
  min-height: 24px;
  padding: 3px 8px;
  border: 1px solid currentColor;
  border-radius: 999px;
  background: var(--surface);
  font-size: 11px;
  font-weight: 950;
  line-height: 1;
  white-space: nowrap;
  pointer-events: none;
  animation: selection-rank-badge 1440ms ease-out forwards;
}

.selection-move-badge-up {
  color: #21a667;
  box-shadow: 0 8px 18px rgba(33, 166, 103, 0.2);
}

.selection-move-badge-down {
  color: #d94d42;
  box-shadow: 0 8px 18px rgba(217, 77, 66, 0.2);
}

@keyframes selection-rank-badge {
  0% {
    opacity: 0;
    transform: translate(-50%, 4px) scale(0.92);
  }
  18% {
    opacity: 1;
    transform: translate(-50%, -7px) scale(1);
  }
  70% {
    opacity: 1;
    transform: translate(-50%, -9px) scale(1);
  }
  100% {
    opacity: 0;
    transform: translate(-50%, -15px) scale(0.98);
  }
}

.selection-move {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 30px;
  min-width: 30px;
  min-height: 30px;
  padding: 0;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: var(--surface);
  color: var(--muted);
  font-size: 18px;
  line-height: 1;
  font-weight: 900;
  cursor: pointer;
}

.trip-stack {
  display: grid;
  gap: 5px;
}

.trip-chip {
  display: block;
  width: fit-content;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-cyan) 13%, #ffffff);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.reserve-chip {
  background: var(--selection-bg);
  border: 1px solid var(--selection-border);
  color: var(--selection-ink);
}

.reserve-chip.is-flex-reserve {
  background: #f1f4fb;
  border-color: #8fa3d6;
  color: #334f9d;
}

.reserve-chip.has-soft-conflict {
  background: #f8e8e4;
  border-color: #d08f82;
  color: var(--warn);
}

.split-line-marker {
  width: fit-content;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 6px;
  background: #f7e5e1;
  color: var(--warn);
  box-shadow: inset 0 0 0 1px rgba(179, 63, 47, 0.3);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
}

.airport-route-reserve-marker {
  width: fit-content;
  min-height: 22px;
  padding: 3px 7px;
  border-radius: 6px;
  background: color-mix(in srgb, var(--gold) 16%, var(--surface));
  color: var(--selection-ink);
  box-shadow: inset 0 0 0 1px rgba(157, 105, 17, 0.35);
  font-size: 11px;
  font-weight: 900;
}

.airport-route-stack {
  display: grid;
  gap: 5px;
}

.airport-route {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px;
}

.airport-hop {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  white-space: nowrap;
}

.airport-split-marker {
  margin: 1px 0;
}

.airport-stop {
  display: inline-flex;
  align-items: center;
  position: relative;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 8px;
  background: white;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
  font-size: 12px;
  font-weight: 750;
}

.airport-stop.is-deadhead::after {
  content: "";
  position: absolute;
  left: 5px;
  right: 5px;
  top: 50%;
  height: 2px;
  border-radius: 2px;
  background: currentColor;
  opacity: 0.65;
  transform: rotate(-16deg);
}

.airport-stop.is-min-rest {
  background: #ffe7e3;
  color: var(--warn);
  box-shadow: inset 0 0 0 1px rgba(179, 63, 47, 0.35);
}

.airport-stop.is-long-stay {
  background: #ccefd8;
  color: #0b5a2b;
  box-shadow: inset 0 0 0 2px rgba(11, 90, 43, 0.35);
  font-weight: 850;
}

.airport-stop.is-min-rest.is-long-stay {
  background: linear-gradient(135deg, #ffe7e3 0 50%, #e5f6ec 50% 100%);
  color: var(--warn);
}

.is-muted-airport-route .airport-stop {
  background: color-mix(in srgb, var(--surface) 90%, var(--band));
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
  font-weight: 750;
}

.is-muted-airport-route .airport-stop::after {
  content: none;
}

.sit-break {
  width: 3px;
  align-self: stretch;
  min-height: 26px;
  margin: 0 5px;
  border-radius: 3px;
  background: var(--warn);
}

.remarks-list {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 5px;
  width: auto;
}

.line-detail-row {
  display: none;
}

.trip-detail-row {
  display: none;
}

.reserve-detail-row {
  display: none;
}

.ipad-only-dh {
  display: none;
}

.line-detail-grid {
  display: grid;
  gap: 10px;
}

.line-detail-panel {
  display: grid;
  gap: 6px;
}

.line-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
}

.line-detail-label {
  color: var(--muted);
  font-size: 11px;
  font-weight: 900;
  letter-spacing: 0;
  text-transform: uppercase;
}

.btn-secondary.report-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 26px;
  padding: 5px 9px;
  border-radius: 6px;
  font-size: 11px;
  font-weight: 900;
  line-height: 1.05;
  white-space: nowrap;
}

.report-button-inline {
  width: fit-content;
  margin: 4px 0 0 auto;
}

.line-detail-bottom-action {
  display: flex;
  justify-content: flex-end;
  margin-top: auto;
}

.line-detail-action-row {
  display: flex;
  align-items: flex-end;
  justify-content: space-between;
  gap: 12px;
}

.line-detail-action-row > :first-child {
  flex: 1 1 auto;
  min-width: 0;
}

.report-button-bottom {
  width: fit-content;
}

.line-detail-empty {
  color: var(--muted);
  font-size: 13px;
  font-weight: 750;
}

.paid-detail-placeholder {
  display: grid;
  gap: 3px;
  width: fit-content;
  max-width: 260px;
  padding: 8px 10px;
  border: 1px solid color-mix(in srgb, var(--line) 72%, var(--accent));
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, var(--band));
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.3;
}

.paid-detail-placeholder strong {
  color: var(--accent-strong);
  font-size: 11px;
  font-weight: 900;
  line-height: 1;
  text-transform: uppercase;
}

.remark-item {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  min-height: 22px;
  padding: 3px 7px;
  border: 0;
  border-radius: 7px;
  background: #f7e5e1;
  color: var(--warn);
  font-size: 11px;
  font-weight: 900;
  line-height: 1.15;
  white-space: nowrap;
  box-shadow: inset 0 0 0 1px rgba(179, 63, 47, 0.28);
}

.remark-mini-pill {
  cursor: help;
}

.remark-item.is-min-rest {
  box-shadow: inset 0 0 0 2px rgba(179, 63, 47, 0.35);
}

.remark-mini-pill:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

.remark-item-full {
  display: inline-flex;
  min-height: 24px;
  padding: 6px 8px;
  border-radius: 8px;
  font-size: 12px;
  font-weight: 400;
  line-height: 1.35;
  white-space: normal;
  cursor: default;
}

.remark-item-full strong {
  font-weight: 850;
}

.remark-item-full.is-min-rest,
.remark-item-full.is-multiline {
  display: inline-grid;
  gap: 1px;
  max-width: min(360px, 100%);
}

.remark-prefix,
.remark-detail {
  display: block;
}

.remark-item.is-long-stay {
  background: #ccefd8;
  color: #0b5a2b;
  box-shadow: inset 0 0 0 2px rgba(11, 90, 43, 0.35);
}

.remark-popup {
  display: grid;
  gap: 6px;
  max-width: min(360px, 78vw);
}

tbody tr:hover {
  background: #f9fbfa;
}

.name-cell {
  font-weight: 850;
  color: var(--accent-strong);
  cursor: pointer;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 16px;
}

.calendar-actions {
  display: flex;
  gap: 10px;
}

.btn-primary,
.btn-secondary {
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent-strong);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.reset-lines-btn {
  font-weight: 800;
}

.btn-secondary:hover {
  background: #f0f3f2;
}

.btn-secondary.account-support-action {
  min-height: 0;
  padding: 0;
  border-color: transparent;
  background: transparent;
  color: var(--muted);
  font-size: 12px;
  text-decoration: underline;
  text-underline-offset: 3px;
}

.btn-secondary.account-support-action:hover {
  border-color: transparent;
  background: transparent;
  color: var(--accent-strong);
}

.avoid-calendar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-month {
  margin-bottom: 10px;
  text-align: center;
  font-size: 22px;
  font-weight: 850;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}

.calendar-label {
  text-align: center;
  font-weight: 700;
  font-size: 11px;
  color: var(--muted);
  text-transform: uppercase;
}

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

.calendar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 52px;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #f9fbfa;
  color: var(--ink);
  text-align: center;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.calendar-day:hover:not([disabled]):not(.is-selected) {
  background: #e9f3f1;
}

.calendar-day.is-selected,
.calendar-day.is-selected:hover,
.calendar-day.is-selected:focus {
  background: var(--accent);
  border-color: var(--accent-strong);
  color: var(--on-accent);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, #ffffff 28%, var(--accent));
  outline: 0;
}

.calendar-day.is-outside {
  background: #f2f6f4;
  color: var(--muted);
  cursor: default;
  opacity: 0.5;
}

.calendar-day-number {
  font-size: 16px;
  font-weight: 700;
  line-height: 1;
}

.calendar-day-weekday {
  font-size: 10px;
  color: currentColor;
}

.pill-list {
  display: flex;
  flex-wrap: wrap;
  gap: 4px;
}

.pill {
  display: inline-flex;
  align-items: center;
  min-height: 24px;
  padding: 3px 7px;
  border-radius: 8px;
  background: color-mix(in srgb, var(--brand-cyan) 13%, #ffffff);
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 800;
}

.warn {
  color: var(--warn);
  font-weight: 800;
}

.route {
  max-width: 460px;
  color: #364548;
  line-height: 1.45;
}

.route-segments {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
}

.route-segments-balanced {
  display: grid;
  gap: 2px;
}

.route-line {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 4px 0;
}

.route-token {
  white-space: nowrap;
  margin-right: 8px;
}

.route-segments-muted {
  color: var(--muted);
  font-weight: 750;
}

.route-segments-muted .route-separator {
  color: var(--line);
}

.route-separator {
  color: var(--warn);
  font-weight: 900;
  line-height: 1;
}

#linesPanel th:nth-child(3),
#linesPanel td:nth-child(3) {
  text-align: right;
}

#linesPanel th:nth-child(4),
#linesPanel td:nth-child(4),
#linesPanel th:nth-child(5),
#linesPanel td:nth-child(5),
#linesPanel th:nth-child(6),
#linesPanel td:nth-child(6),
#linesPanel th:nth-child(9),
#linesPanel td:nth-child(9),
#tripsPanel th:nth-child(4),
#tripsPanel td:nth-child(4),
#tripsPanel th:nth-child(5),
#tripsPanel td:nth-child(5),
#tripsPanel th:nth-child(6),
#tripsPanel td:nth-child(6),
#tripsPanel th:nth-child(7),
#tripsPanel td:nth-child(7),
#tripsPanel th:nth-child(8),
#tripsPanel td:nth-child(8),
#trainingPanel th:nth-child(2),
#trainingPanel td:nth-child(2),
#trainingPanel th:nth-child(3),
#trainingPanel td:nth-child(3),
#trainingPanel th:nth-child(4),
#trainingPanel td:nth-child(4),
#trainingPanel th:nth-child(5),
#trainingPanel td:nth-child(5),
#trainingPanel th:nth-child(6),
#trainingPanel td:nth-child(6),
#trainingPanel th:nth-child(7),
#trainingPanel td:nth-child(7),
#reservesPanel th:nth-child(3),
#reservesPanel td:nth-child(3),
#reservesPanel th:nth-child(4),
#reservesPanel td:nth-child(4),
#reservesPanel th:nth-child(6),
#reservesPanel td:nth-child(6) {
  text-align: center;
}

#linesPanel td:nth-child(10),
#tripsPanel td:nth-child(9),
#reservesPanel td:nth-child(7) {
  text-align: left;
}

.calendar-panel {
  margin: 24px 0;
  padding: 16px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: 8px;
}

.calendar-header {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 16px;
  margin-bottom: 0;
}

.calendar-header h2 {
  margin: 0;
  font-size: 18px;
}

.calendar-panel .accordion-content:not(.is-collapsed) {
  margin-top: 16px;
}

.calendar-actions {
  display: flex;
  gap: 10px;
}

.btn-primary,
.btn-secondary {
  min-height: 36px;
  padding: 8px 14px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--ink);
  font-size: 14px;
  font-weight: 700;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.btn-primary {
  background: var(--accent);
  color: var(--on-accent);
  border-color: var(--accent-strong);
}

.btn-primary:hover {
  background: var(--accent-strong);
}

.btn-secondary:hover {
  background: #f0f3f2;
}

.avoid-calendar {
  display: flex;
  flex-direction: column;
  gap: 12px;
}

.calendar-weekdays {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 8px;
  margin-bottom: 4px;
}

.calendar-label {
  text-align: center;
  font-weight: 700;
  font-size: 12px;
  color: var(--muted);
  text-transform: uppercase;
}

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

.calendar-day {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  min-height: 50px;
  padding: 6px 4px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: #f9fbfa;
  color: var(--ink);
  text-align: center;
  font-size: 11px;
  cursor: pointer;
  transition: background 0.2s, border-color 0.2s;
}

.calendar-day.weekend:not(.is-selected):not(.is-outside) {
  background: #eef7f3;
}

.calendar-day:hover:not([disabled]):not(.is-selected) {
  background: #e9f3f1;
}

.calendar-day.is-selected,
.calendar-day.is-selected:hover,
.calendar-day.is-selected:focus {
  background: var(--accent);
  border-color: var(--accent-strong);
  color: var(--on-accent);
  box-shadow: inset 0 0 0 2px color-mix(in srgb, #ffffff 28%, var(--accent));
  outline: 0;
}

.calendar-day.is-outside {
  background: #f2f6f4;
  color: var(--muted);
  cursor: default;
  opacity: 0.5;
}

.deadhead-cell,
.deadhead-count {
  cursor: pointer;
}

.hover-popup {
  position: fixed;
  z-index: 100;
  max-width: min(360px, calc(100vw - 24px));
  min-width: 0;
  padding: 8px;
  background: #ffffff;
  border: 1px solid #c7d2cf;
  border-radius: 8px;
  box-shadow: 0 12px 24px rgba(20, 34, 39, 0.22);
  color: var(--ink);
  font-size: 12px;
  line-height: 1.25;
  pointer-events: none;
}

.support-modal {
  position: fixed;
  inset: 0;
  z-index: 120;
  display: grid;
  place-items: center;
  padding: 24px;
}

.confirm-modal {
  position: fixed;
  inset: 0;
  z-index: 130;
  display: grid;
  place-items: center;
  padding: 24px;
}

.support-modal[hidden],
.confirm-modal[hidden] {
  display: none;
}

.support-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 22, 0.58);
}

.confirm-modal-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(12, 20, 22, 0.62);
}

.support-modal-card {
  position: relative;
  width: min(760px, calc(100vw - 24px));
  max-height: min(calc(100vh - 48px), 900px);
  overflow: auto;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(20, 34, 39, 0.24);
}

.confirm-modal-card {
  position: relative;
  display: grid;
  gap: 12px;
  width: min(420px, calc(100vw - 32px));
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  box-shadow: 0 18px 40px rgba(20, 34, 39, 0.28);
}

.confirm-modal-card h2 {
  font-size: 22px;
}

.confirm-modal-message {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  font-weight: 700;
  line-height: 1.4;
}

.confirm-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.confirm-modal-actions button {
  min-width: 112px;
}

.support-modal-header {
  display: flex;
  justify-content: space-between;
  gap: 16px;
  align-items: start;
  margin-bottom: 14px;
}

.support-modal-body {
  display: grid;
  gap: 12px;
}

.faq-item,
.contact-workflow-intro {
  display: grid;
  gap: 8px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, var(--band));
}

.faq-item h3 {
  margin: 0;
  font-size: 15px;
}

.faq-item p,
.contact-workflow-intro p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.contact-workflow {
  display: grid;
  gap: 12px;
}

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

.contact-workflow label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.contact-message {
  width: 100%;
  min-height: 132px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
}

.contact-summary {
  min-height: min(32vh, 320px);
}

.report-panel {
  display: grid;
  gap: 10px;
}

.report-panel p {
  margin: 0;
  color: var(--muted);
  font-size: 14px;
  line-height: 1.45;
}

.report-summary-card {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: color-mix(in srgb, var(--surface) 88%, var(--band));
  color: var(--ink);
  font-size: 14px;
  font-weight: 800;
  line-height: 1.35;
}

.report-notes-label {
  display: grid;
  gap: 6px;
  color: var(--muted);
  font-size: 12px;
  font-weight: 900;
  text-transform: uppercase;
}

.report-notes {
  width: 100%;
  min-height: 120px;
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: inherit;
  font-size: 14px;
  line-height: 1.45;
  resize: vertical;
  text-transform: none;
}

.report-payload {
  width: 100%;
  min-height: min(46vh, 420px);
  padding: 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font: 12px/1.45 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", monospace;
  resize: vertical;
}

.report-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 10px;
}

.report-copy-status {
  min-width: 11ch;
  color: var(--muted);
  font-size: 13px;
  font-weight: 800;
}

.subscription-checkout-actions {
  justify-content: center;
  flex-wrap: wrap;
}

.subscription-checkout-actions button {
  min-width: 130px;
}

.subscription-checkout-status {
  flex: 0 0 100%;
  min-height: 1.4em;
  text-align: center;
}

.hover-popup p {
  margin: 0 0 8px;
  font-weight: 700;
}

.hover-popup ul {
  margin: 0;
  padding-left: 18px;
}

.hover-popup li {
  margin: 4px 0;
}

.deadhead-popup {
  display: grid;
  gap: 6px;
}

.deadhead-popup-title {
  color: var(--ink);
  font-size: 12px;
  font-weight: 850;
}

.paid-detail-popup p {
  margin: 0;
  color: var(--muted);
  font-size: 12px;
  font-weight: 800;
  line-height: 1.35;
}

.deadhead-popup-list {
  display: grid;
  gap: 3px;
}

.deadhead-popup-row {
  display: grid;
  grid-template-columns: minmax(32px, auto) minmax(46px, auto) minmax(68px, auto) minmax(42px, auto) minmax(38px, auto);
  gap: 6px;
  align-items: center;
  padding: 5px 6px;
  background: #f7faf9;
  border: 1px solid var(--line);
  border-radius: 6px;
  white-space: nowrap;
}

.deadhead-popup:not(:has(.deadhead-popup-trip)) .deadhead-popup-row {
  grid-template-columns: minmax(46px, auto) minmax(68px, auto) minmax(42px, auto) minmax(38px, auto);
}

.deadhead-popup-trip,
.deadhead-popup-row strong {
  color: var(--warn);
  font-weight: 850;
}

.airport-popup {
  display: grid;
  gap: 2px;
}

.airport-popup strong {
  color: var(--accent-strong);
  font-size: 12px;
  font-weight: 900;
}

.airport-popup span {
  color: var(--ink);
  font-size: 12px;
  font-weight: 750;
}

.line-route-popup {
  display: grid;
  gap: 6px;
  max-width: min(520px, calc(100vw - 24px));
}

.line-route-title {
  color: var(--accent-strong);
  font-size: 13px;
  font-weight: 900;
}

.line-route-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(48px, auto));
  gap: 3px;
  align-items: center;
}

.reserve-route-grid {
  grid-template-columns: minmax(64px, auto) minmax(70px, auto);
}

.line-route-grid strong,
.line-route-cell {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 4px 5px;
  border-radius: 5px;
  background: #f7faf9;
  color: var(--ink);
  font-size: 11px;
  font-weight: 800;
  text-align: center;
  white-space: nowrap;
}

.line-route-grid strong {
  background: var(--brand-navy);
  color: #f2fbff;
  text-transform: uppercase;
}

.line-route-cell.is-stay {
  background: #f7f9f8;
  color: #b2bcbe;
  font-weight: 700;
}

.line-route-cell.is-reserve {
  background: var(--selection-bg);
  color: var(--selection-ink);
}

.line-route-split {
  grid-column: 1 / -1;
  padding: 4px 6px;
  border-radius: 6px;
  background: #f7e5e1;
  color: var(--warn);
  font-size: 11px;
  font-weight: 900;
  text-align: center;
}

body.theme-dark .airport-region,
body.theme-dark .check,
body.theme-dark .bid-list-panel,
body.theme-dark .bid-list-chip,
body.theme-dark .selection-handle,
body.theme-dark .filters,
body.theme-dark .calendar-panel,
body.theme-dark .city-avoid-panel,
body.theme-dark .table-wrap,
body.theme-dark tbody tr:hover,
body.theme-dark .calendar-day,
body.theme-dark .hover-popup,
body.theme-dark .deadhead-popup-row,
body.theme-dark .line-route-grid strong,
body.theme-dark .line-route-cell {
  background: #1b2729;
  border-color: var(--line);
  color: var(--ink);
}

body.theme-dark th {
  background: #223033;
  color: #d8e5e4;
}

body.theme-dark td {
  color: #d8e5e4;
}

body.theme-dark .result-header {
  background: var(--band);
}

body.theme-dark #linesPanel .line-detail-row > td,
body.theme-dark #reservesPanel .reserve-detail-row > td,
body.theme-dark #tripsPanel .trip-detail-row > td {
  background: #10191b;
  border-bottom-color: rgba(255, 255, 255, 0.72);
}

body.theme-dark .line-detail-label {
  color: #8da0a3;
}

body.theme-dark .line-detail-empty {
  color: #7f9093;
}

body.theme-dark .is-bid-selected td {
  background: #302813;
  box-shadow: inset 0 1px 0 rgba(224, 182, 90, 0.12), inset 0 -1px 0 rgba(224, 182, 90, 0.12);
}

body.theme-dark .is-bid-selected td:first-child {
  box-shadow: inset 5px 0 0 var(--gold), inset 0 1px 0 rgba(224, 182, 90, 0.14), inset 0 -1px 0 rgba(224, 182, 90, 0.14);
}

body.theme-dark .trip-chip,
body.theme-dark .pill,
body.theme-dark .selection-type-line {
  background: #173133;
  color: #8fe0d3;
}

body.theme-dark .selection-export,
body.theme-dark .selection-output {
  background: #162022;
  color: var(--ink);
  border-color: var(--line);
}

body.theme-dark .current-dataset-banner {
  background: #173133;
  border-color: rgba(71, 197, 179, 0.28);
}

body.theme-dark .current-dataset-banner p {
  color: #8fe0d3;
}

body.theme-dark .selection-submit-link {
  background: #173133;
  border-color: rgba(71, 197, 179, 0.28);
}

body.theme-dark .selection-submit-label {
  color: #b9c7ca;
}

body.theme-dark .selection-submit-link a {
  color: #8fe0d3;
}

body.theme-dark .support-modal-card,
body.theme-dark .confirm-modal-card,
body.theme-dark .faq-item,
body.theme-dark .contact-workflow-intro {
  background: #162022;
  border-color: var(--line);
}

body.theme-dark .contact-message,
body.theme-dark .report-payload,
body.theme-dark .report-notes,
body.theme-dark .report-summary-card {
  background: #101d2b;
  color: var(--ink);
  border-color: var(--line);
}

body.theme-dark .selection-type-mixed {
  background: #312815;
  color: #f0d27b;
  border-color: #8b6d2d;
}

body.theme-dark .selection-move-badge {
  background: #10191b;
}

body.theme-dark .reserve-chip,
body.theme-dark .selection-type-reserve,
body.theme-dark .selection-detail-pill-reserve,
body.theme-dark .line-route-cell.is-reserve {
  background: #312815;
  color: #f0d27b;
  border-color: #8b6d2d;
}

body.theme-dark .reserve-chip.is-flex-reserve,
body.theme-dark .training-window-badge.is-flex,
body.theme-dark .selection-type-training,
body.theme-dark .selection-detail-pill-training {
  background: #1d2740;
  color: #a8bcff;
  border-color: #6073aa;
}

body.theme-dark .reserve-chip.has-soft-conflict,
body.theme-dark .split-line-marker,
body.theme-dark .training-window-badge.is-split,
body.theme-dark .line-route-split,
body.theme-dark .selection-detail-pill-warn,
body.theme-dark .selection-detail-pill-deadhead,
body.theme-dark .remark-item {
  background: #3a2220;
  color: #ffb4a8;
  border-color: rgba(226, 122, 105, 0.45);
  box-shadow: none;
}

body.theme-dark .selection-detail-pill-line {
  background: #173133;
  color: #8fe0d3;
  border-color: rgba(71, 197, 179, 0.4);
  box-shadow: none;
}

body.theme-dark .remark-item.is-long-stay,
body.theme-dark .airport-stop.is-long-stay {
  background: #173723;
  color: #9ce0b1;
  border-left-color: #3ea162;
  box-shadow: inset 0 0 0 1px rgba(62, 161, 98, 0.3);
}

body.theme-dark .airport-stop {
  background: #1b2729;
  color: var(--muted);
  box-shadow: inset 0 0 0 1px var(--line);
}

body.theme-dark .airport-stop.is-min-rest {
  background: #3a2220;
  color: #ffb4a8;
  box-shadow: inset 0 0 0 1px rgba(226, 122, 105, 0.45);
}

body.theme-dark .airport-stop.is-min-rest.is-long-stay {
  background: linear-gradient(135deg, #3a2220 0 50%, #173723 50% 100%);
  color: #ffb4a8;
}

body.theme-dark .calendar-day.weekend:not(.is-selected):not(.is-outside),
body.theme-dark .calendar-day:hover:not([disabled]):not(.is-selected),
body.theme-dark .selection-row.is-drop-target td {
  background: #173133;
}

body.theme-dark .calendar-day.is-selected,
body.theme-dark .calendar-day.is-selected:hover,
body.theme-dark .calendar-day.is-selected:focus {
  background: var(--brand-cyan);
  background-color: var(--brand-cyan);
  color: var(--on-accent);
  border-color: var(--brand-cyan-strong);
  box-shadow: inset 0 0 0 1px rgba(6, 17, 29, 0.18);
  outline: 0;
}

body.theme-dark .btn-primary,
body.theme-dark .tab.is-active,
body.theme-dark .bid-list-actions .is-active,
body.theme-dark .import-fleet-button.is-active,
body.theme-dark .import-fleet-button.is-active:disabled {
  background: var(--brand-cyan);
  background-color: var(--brand-cyan);
  border-color: var(--brand-cyan-strong);
  color: var(--on-accent);
}

body.theme-dark .calendar-day.is-outside,
body.theme-dark .line-route-cell.is-stay {
  background: #141d1f;
  color: #7f9093;
}

body.theme-dark .btn-secondary:hover,
body.theme-dark .airport-btn:hover,
body.theme-dark .preference-pill:hover {
  background: #223033;
}

body.theme-dark input,
body.theme-dark select,
body.theme-dark textarea,
body.theme-dark .import-file-picker input[type=\"file\"] {
  background: #1b2729;
  color: var(--ink);
  border-color: var(--line);
}

body.theme-dark .route {
  color: var(--muted);
}

.empty {
  padding: 28px;
  color: var(--muted);
  text-align: center;
}

@media (min-width: 1201px) {
  .tabs {
    display: grid;
    grid-template-columns: minmax(340px, 440px) auto minmax(360px, 1fr);
    grid-template-areas: "home primary jumps";
    align-items: stretch;
    column-gap: 22px;
    row-gap: 8px;
    padding-top: 10px;
    padding-bottom: 10px;
  }

  .tabs > .tab-divider {
    display: none;
  }

  .tab-group {
    flex-wrap: nowrap;
  }

  .tab {
    white-space: nowrap;
  }

  .tab-group-home {
    grid-area: home;
  }

  .tab-group-primary {
    grid-area: primary;
  }

  .tab-group-jumps {
    grid-area: jumps;
    justify-self: stretch;
    margin-left: 0;
  }

  .import-actions {
    justify-items: stretch;
    width: min(360px, 100%);
  }

  .import-action-row button {
    flex: 1 1 0;
  }

  .import-fleet-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    align-items: center;
  }

  .import-fleet-label,
  .import-fleet-status {
    grid-column: 1 / -1;
  }

  .import-fleet-button,
  .import-fleet-status {
    width: 100%;
  }

  .tab-group-home {
    flex-wrap: nowrap;
    min-width: 0;
  }

  .current-dataset-banner {
    min-width: 0;
    min-height: 42px;
    padding: 8px 14px;
  }

  .current-dataset-banner p {
    font-size: 12px;
    line-height: 1.15;
  }

  .dataset-banner-package {
    font-size: 17px;
  }

  #linesPanel th:nth-child(11),
  #linesPanel td:nth-child(11) {
    width: 260px;
    min-width: 260px;
  }

  #linesPanel .line-summary-row .remarks-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    width: auto;
    max-width: 250px;
    gap: 4px;
  }

  #linesPanel .line-summary-row .remark-item {
    min-height: 22px;
    padding: 3px 7px;
    border-radius: 7px;
    font-size: 11px;
    line-height: 1.15;
  }

  #linesPanel .line-summary-row .remark-item.is-long-stay {
    display: inline-flex;
    max-width: none;
  }

  #linesPanel .line-summary-row .remark-mini-pill.is-min-rest {
    width: fit-content;
    max-width: none;
    box-sizing: border-box;
  }

  #reservesPanel th:nth-child(5),
  #reservesPanel td:nth-child(5) {
    text-align: center;
  }

  #reservesPanel .reserve-summary-row .reserve-remarks-cell .remarks-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    width: auto;
    gap: 8px;
  }

  #reservesPanel .reserve-summary-row .reserve-remarks-cell .remark-mini-pill {
    max-width: none;
  }


  #trainingPanel .training-window-cell {
    display: inline-grid;
    grid-template-columns: 1fr;
    justify-items: center;
    gap: 7px;
  }

  #trainingPanel .training-window-badges {
    justify-content: center;
  }

  #trainingPanel .date-stack {
    display: inline-flex;
    gap: 8px;
    align-items: center;
    justify-content: center;
  }

  #trainingPanel .date-stack span + span::before {
    content: "-";
    margin-right: 8px;
    color: var(--muted);
    font-weight: 850;
  }
}

.selection-print-view {
  display: none;
}

@media print {
  body > :not(#selectionPrintView) {
    display: none !important;
  }

  #selectionPrintView {
    display: block !important;
    padding: 0;
    color: #1d2528;
    font-family: Inter, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  }

  .selection-print-header {
    margin-bottom: 18px;
    padding-bottom: 10px;
    border-bottom: 2px solid #0f7b6c;
  }

  .selection-print-header p {
    margin: 0 0 4px;
    color: #0b5f54;
    font-size: 11px;
    font-weight: 900;
    letter-spacing: 0;
    text-transform: uppercase;
  }

  .selection-print-header h1 {
    margin: 0;
    font-size: 24px;
    line-height: 1.2;
  }

  .selection-print-lines {
    margin: 0;
    white-space: pre-wrap;
    font: 13px/1.55 ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, "Liberation Mono", "Courier New", monospace;
  }
}

/* iPad layout: company target is iPad 10th generation with cellular. */
@media (min-width: 768px) and (max-width: 1200px) {
  :root {
    --ipad-nav-square: 68px;
    --ipad-nav-action-width: 86px;
  }

  .topbar {
    gap: 16px;
    align-items: center;
    padding: 20px 24px;
  }

  .brand-lockup {
    gap: 12px;
  }

  .brand-mark {
    width: 50px;
    height: 50px;
  }

  h1 {
    font-size: 40px;
  }

  .topbar-meta {
    justify-content: flex-end;
    gap: 10px;
  }

  .topbar-action,
  .profile-button {
    min-height: 36px;
  }

  main {
    padding: 12px 24px 36px;
  }

  .tabs {
    gap: 8px;
    padding: 10px 24px;
  }

  .tabs > .tab-divider:nth-of-type(1),
  .tabs > .tab-divider:nth-of-type(3) {
    display: none;
  }

  .tab-group {
    gap: 6px;
  }

  .tab {
    min-height: 40px;
    padding: 9px 12px;
  }

  .tab-group-home {
    flex: 1 0 100%;
    align-items: center;
  }

  .tab-group-home > .tab:is([data-view-target="home"], [data-tab="import"]) {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    flex: 0 0 var(--ipad-nav-action-width);
    width: var(--ipad-nav-action-width);
    min-width: var(--ipad-nav-action-width);
    height: var(--ipad-nav-square);
    min-height: var(--ipad-nav-square);
    padding: 0;
  }

  .tab-divider {
    min-height: 36px;
    margin: 0 4px;
  }

  .current-dataset-banner {
    flex: 1 1 auto;
    margin-bottom: 0;
    min-height: var(--ipad-nav-square);
    padding: 12px 14px;
    justify-content: center;
    text-align: center;
  }

  .import-panel {
    grid-template-columns: 1fr;
    gap: 14px;
    padding: 16px;
  }

  .import-controls {
    grid-template-columns: minmax(260px, 1fr) minmax(260px, auto);
  }

  .tab-group-jumps {
    flex: 1 0 100%;
    width: 100%;
    max-width: 100%;
  }

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

  .metric {
    min-height: 72px;
    padding: 12px 14px;
  }

  .metric .value {
    font-size: 24px;
  }

  .table-wrap {
    overflow: visible;
  }

  #linesPanel table {
    min-width: 100%;
  }

  #linesPanel th:nth-child(1),
  #linesPanel td:nth-child(1) {
    width: 76px;
    min-width: 76px;
  }

  #linesPanel th:nth-child(2),
  #linesPanel td:nth-child(2) {
    width: 82px;
    min-width: 82px;
  }

  #linesPanel th:nth-child(3),
  #linesPanel td:nth-child(3) {
    width: 74px;
    min-width: 74px;
    text-align: center;
  }

  #linesPanel th:nth-child(4),
  #linesPanel td:nth-child(4),
  #linesPanel th:nth-child(5),
  #linesPanel td:nth-child(5) {
    width: 56px;
    min-width: 56px;
  }

  #linesPanel th:nth-child(6),
  #linesPanel td:nth-child(6) {
    width: 78px;
    min-width: 78px;
  }

  #linesPanel th:nth-child(7),
  #linesPanel td:nth-child(7) {
    width: 66px;
    min-width: 66px;
  }

  #linesPanel th:nth-child(8),
  #linesPanel td:nth-child(8) {
    min-width: 170px;
  }

  #linesPanel .ipad-only-dh {
    display: table-cell;
  }

  #linesPanel .desktop-dh-header,
  #linesPanel .desktop-dh-cell,
  #linesPanel .line-airports-header,
  #linesPanel .line-remarks-header,
  #linesPanel .line-summary-row td:nth-child(10),
  #linesPanel .line-summary-row td:nth-child(11) {
    display: none;
  }

  #linesPanel .line-detail-row {
    display: table-row;
  }

  #linesPanel .line-detail-row > td {
    padding: 10px 12px 16px 76px;
    background: #fbfdfc;
    border-bottom: 3px solid var(--line);
  }

  #linesPanel .line-detail-grid {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "airports"
      "remarks";
    align-items: start;
  }

  #linesPanel .line-detail-dh {
    display: none;
  }

  #linesPanel .line-detail-airports {
    grid-area: airports;
  }

  #linesPanel .line-detail-remarks {
    grid-area: remarks;
  }

  #linesPanel .line-detail-value {
    justify-self: center;
  }

  #linesPanel .line-detail-airports .airport-route-stack {
    gap: 7px;
  }

  #linesPanel .line-detail-airports .airport-route {
    max-width: 26rem;
  }

  #linesPanel .line-detail-remarks .remarks-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    width: auto;
  }

  #linesPanel .line-detail-remarks .remark-item-full {
    max-width: min(360px, 100%);
  }

  #tripsPanel table {
    min-width: 100%;
  }

  #tripsPanel th:nth-child(1),
  #tripsPanel td:nth-child(1) {
    width: 72px;
    min-width: 72px;
  }

  #tripsPanel th:nth-child(2),
  #tripsPanel td:nth-child(2) {
    width: 108px;
    min-width: 108px;
  }

  #tripsPanel th:nth-child(3),
  #tripsPanel td:nth-child(3) {
    width: 86px;
    min-width: 86px;
  }

  #tripsPanel th:nth-child(4),
  #tripsPanel td:nth-child(4),
  #tripsPanel th:nth-child(5),
  #tripsPanel td:nth-child(5),
  #tripsPanel th:nth-child(7),
  #tripsPanel td:nth-child(7) {
    width: 82px;
    min-width: 82px;
  }

  #tripsPanel th:nth-child(6),
  #tripsPanel td:nth-child(6),
  #tripsPanel th:nth-child(8),
  #tripsPanel td:nth-child(8) {
    width: 58px;
    min-width: 58px;
  }

  #tripsPanel thead th:nth-child(9),
  #tripsPanel thead th:nth-child(10),
  #tripsPanel .trip-summary-row td:nth-child(9),
  #tripsPanel .trip-summary-row td:nth-child(10) {
    display: none;
  }

  #tripsPanel .trip-detail-row {
    display: table-row;
  }

  #tripsPanel .trip-detail-row > td {
    padding: 10px 12px 14px 94px;
    background: #fbfdfc;
    border-bottom: 3px solid var(--line);
  }

  #tripsPanel .trip-detail-route {
    display: grid;
    gap: 10px;
  }

  #tripsPanel .trip-detail-route .route-segments {
    max-width: min(42rem, 100%);
    max-height: calc((1em * 1.45 * 2) + 6px);
    gap: 6px 0;
    overflow: hidden;
  }

  #tripsPanel .trip-detail-remarks .remarks-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    width: auto;
  }

  #tripsPanel .trip-detail-remarks .remark-item-full {
    max-width: min(360px, 100%);
  }

  .selection-table-wrap table {
    min-width: 100%;
  }

  #reservesPanel table {
    min-width: 100%;
  }

  #reservesPanel th:nth-child(1),
  #reservesPanel td:nth-child(1) {
    width: 76px;
    min-width: 76px;
  }

  #reservesPanel th:nth-child(2),
  #reservesPanel td:nth-child(2) {
    width: 82px;
    min-width: 82px;
  }

  #reservesPanel th:nth-child(3),
  #reservesPanel td:nth-child(3) {
    width: 74px;
    min-width: 74px;
  }

  #reservesPanel th:nth-child(4),
  #reservesPanel td:nth-child(4) {
    width: 58px;
    min-width: 58px;
  }

  #reservesPanel th:nth-child(5),
  #reservesPanel td:nth-child(5) {
    width: 138px;
    min-width: 138px;
    text-align: center;
  }

  #reservesPanel th:nth-child(6),
  #reservesPanel td:nth-child(6) {
    width: 72px;
    min-width: 72px;
    text-align: center;
  }

  #reservesPanel th:nth-child(7),
  #reservesPanel td:nth-child(7) {
    min-width: 172px;
  }

  #reservesPanel .reserve-remarks-header,
  #reservesPanel .reserve-summary-row .reserve-remarks-cell {
    display: none;
  }

  #reservesPanel .reserve-detail-row {
    display: table-row;
  }

  #reservesPanel .reserve-detail-row > td {
    padding: 10px 12px 14px 76px;
    background: #fbfdfc;
    border-bottom: 3px solid var(--line);
  }

  #reservesPanel .reserve-detail-grid {
    grid-template-columns: minmax(0, 1fr);
    align-items: start;
  }

  #reservesPanel .reserve-detail-remarks .remarks-list {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-start;
    width: auto;
  }

  #reservesPanel .reserve-detail-remarks .remark-item-full {
    max-width: min(360px, 100%);
  }

  th,
  td {
    padding-top: 10px;
    padding-bottom: 10px;
  }

  #linesPanel th,
  #linesPanel td,
  #tripsPanel th,
  #tripsPanel td,
  #reservesPanel th,
  #reservesPanel td,
  #trainingPanel th,
  #trainingPanel td {
    padding-left: 6px;
    padding-right: 6px;
  }

  .hover-popup {
    max-width: min(560px, calc(100vw - 32px));
  }
}

@media (min-width: 768px) and (max-width: 1200px) {
  body.theme-dark #linesPanel .line-detail-row > td,
  body.theme-dark #reservesPanel .reserve-detail-row > td,
  body.theme-dark #tripsPanel .trip-detail-row > td {
    background: #10191b;
    border-bottom-color: rgba(255, 255, 255, 0.72);
  }
}

@media (min-width: 960px) and (max-width: 1200px) and (orientation: landscape) {
  :root {
    --ipad-nav-square: 56px;
    --ipad-nav-action-width: 80px;
  }

  .import-panel {
    gap: 12px;
    margin: 0 0 18px;
    padding: 14px 16px;
  }

  .import-help {
    margin-top: 6px;
  }

  .import-controls {
    grid-template-columns: minmax(420px, 1fr) minmax(250px, auto);
    align-items: start;
  }

  .import-actions {
    align-self: start;
    margin-top: 25px;
  }

  .tabs {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "home home"
      "primary primary"
      "jumps jumps";
    align-items: center;
  }

  .tabs > .tab-divider {
    display: none;
  }

  .tab-group-home {
    display: grid;
    grid-template-columns: auto auto minmax(0, 1fr);
    grid-area: home;
    align-items: stretch;
    width: 100%;
  }

  .tab-group-primary {
    grid-area: primary;
    justify-self: start;
  }

  .tab-group-jumps {
    grid-area: jumps;
    justify-self: stretch;
    flex: 1 1 100%;
    width: 100%;
  }

  .current-dataset-banner {
    flex: 1 1 auto;
    min-width: 0;
    min-height: var(--ipad-nav-square);
    max-width: none;
  }

  .current-dataset-banner p {
    width: 100%;
    text-align: center;
  }

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

  main,
  .panel,
  .results-block,
  .table-wrap {
    min-width: 0;
    max-width: 100%;
  }

  .table-wrap {
    overflow: visible;
  }

  #linesPanel .trip-stack {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 6px 8px;
  }

  #linesPanel .trip-stack .trip-chip,
  #linesPanel .trip-stack .split-line-marker {
    flex: 0 0 auto;
  }

  #linesPanel .line-detail-airports .airport-route-stack {
    gap: 8px;
  }

  #linesPanel .line-detail-airports .airport-route {
    max-width: none;
    gap: 7px;
  }

  #linesPanel .line-detail-airports .airport-stop {
    min-height: 28px;
    padding: 5px 10px;
    font-size: 13px;
  }

  #linesPanel .line-detail-airports .sit-break {
    margin-inline: 7px;
  }

  #linesPanel .line-detail-remarks .remarks-list-by-trip {
    display: grid;
    gap: 7px;
    width: auto;
  }

  #linesPanel .line-detail-remarks .remark-trip-row {
    display: grid;
    grid-template-columns: max-content minmax(0, 1fr);
    gap: 8px;
    align-items: start;
  }

  #linesPanel .line-detail-remarks .remark-trip-label {
    min-height: 24px;
    padding-top: 6px;
    color: var(--muted);
    font-size: 11px;
    font-weight: 900;
  }

  #linesPanel .line-detail-remarks .remark-trip-items {
    display: flex;
    flex-wrap: wrap;
    gap: 6px;
  }
}

@media (min-width: 768px) and (max-width: 920px) {
  .topbar {
    display: grid;
    grid-template-columns: 1fr;
    align-items: start;
  }

  .topbar-meta {
    justify-content: flex-start;
  }

  .tabs {
    align-items: stretch;
  }

  .tabs-spacer {
    flex-basis: 100%;
  }

  .tab-group-preferences {
    margin-left: auto;
  }

  .import-panel {
    grid-template-columns: 1fr;
  }

  .import-controls {
    grid-template-columns: minmax(300px, 1fr) minmax(260px, auto);
    align-items: start;
  }

  .import-actions {
    justify-items: end;
    margin-top: 21px;
  }

  .import-action-row {
    justify-content: flex-end;
  }

  .import-action-row button {
    flex: 1 1 0;
  }

  .import-actions {
    justify-items: stretch;
    width: min(260px, 100%);
  }

  .import-fleet-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
    align-items: center;
  }

  .import-fleet-label {
    grid-column: 1 / -1;
    justify-self: center;
    text-align: center;
  }

  .import-fleet-status {
    grid-column: 1 / -1;
    width: 100%;
  }

  #linesPanel .line-detail-grid {
    grid-template-columns: minmax(300px, 1fr) minmax(230px, 0.72fr);
    grid-template-areas: "airports remarks";
    column-gap: 69px;
  }

  #linesPanel .line-detail-remarks {
    align-self: start;
    box-sizing: border-box;
    padding-left: 6px;
  }

  #trainingPanel .date-inline {
    white-space: nowrap;
  }

  #linesPanel .line-detail-remarks .remarks-list-by-trip {
    display: grid;
    gap: 8px;
    width: auto;
  }

  #linesPanel .line-detail-remarks .remark-trip-row {
    display: grid;
    gap: 4px;
  }

  #linesPanel .line-detail-remarks .remark-trip-label {
    min-height: 0;
    padding-top: 0;
    color: var(--text);
    font-size: 13px;
    font-weight: 400;
  }

  #linesPanel .line-detail-remarks .remark-trip-items {
    display: flex;
    flex-wrap: wrap;
    gap: 5px;
  }

}

@media (max-width: 920px) {
  .current-package-strip {
    grid-template-columns: minmax(260px, 1fr) auto;
    align-items: center;
  }

  .package-management-grid {
    grid-template-columns: 1fr;
  }

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

  .package-fleet-actions {
    width: min(220px, 100%);
  }

  .account-shell {
    grid-template-columns: 1fr;
    gap: 18px;
  }

  .account-brand-panel {
    min-height: auto;
    border-right: 0;
    border-bottom: 3px solid var(--brand-cyan);
  }

  .account-card {
    min-height: auto;
    padding: 0;
  }

  #accountSupportToggle,
  .account-corner-action {
    position: static;
    grid-column: 1 / -1;
    justify-self: end;
  }

  #accountSupportToggle.account-corner-action,
  #developerContactToggle.account-corner-action {
    position: absolute;
    right: 0;
    bottom: 0;
  }

  .topbar {
    display: block;
  }

  .topbar-meta {
    margin-top: 12px;
  }

  .summary-grid,
  .filters,
  .import-panel,
  .import-controls {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .import-status {
    grid-column: 1 / -1;
  }

  .import-fleet-status {
    flex: 1 0 100%;
    width: 100%;
  }

  .airport-regions {
    grid-template-columns: 1fr;
  }

  .airport-region.is-quadrants .airport-subgroups {
    grid-template-columns: 1fr;
    grid-template-areas: none;
  }

  .airport-area-europe,
  .airport-area-africa,
  .airport-area-middle-east {
    grid-area: auto;
  }

  .airport-area-middle-east {
    border-left: 0;
    padding-left: 0;
  }
}

@media (max-width: 560px) {
  .import-new-files-card .import-controls {
    grid-template-columns: 1fr;
  }

  .import-new-files-card .import-actions {
    margin-top: 0;
  }

  .current-package-strip {
    grid-template-columns: 1fr;
    align-items: start;
  }

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

  .package-fleet-actions {
    width: min(220px, 100%);
  }

  .account-brand-lockup {
    grid-template-columns: 68px minmax(0, 1fr);
    gap: 14px;
  }

  .account-icon {
    width: 68px;
    height: 68px;
  }

  .summary-grid,
  .filters,
  .import-panel {
    grid-template-columns: 1fr;
  }

  .preference-breakfast-grid {
    grid-template-columns: 1fr;
  }

  .contact-field-grid {
    grid-template-columns: 1fr;
  }

  .import-controls {
    grid-template-columns: minmax(300px, 1fr) minmax(260px, auto);
    align-items: start;
  }

  .import-actions {
    justify-items: end;
    margin-top: 21px;
  }

  .import-action-row {
    justify-content: flex-end;
  }

  .profile-editor {
    grid-template-columns: 1fr;
    gap: 16px;
  }

  .profile-fields {
    max-width: none;
  }

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

  .profile-divider {
    display: none;
  }

  .tabs {
    overflow-x: auto;
    flex-wrap: nowrap;
  }

  .tab-group {
    flex-wrap: nowrap;
  }

  .tabs-spacer {
    flex-basis: 12px;
  }
}

@media (min-width: 768px) and (max-width: 920px) {
  .topbar {
    display: grid;
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand profile"
      "actions actions";
    column-gap: 18px;
    row-gap: 10px;
    align-items: start;
  }

  .brand-lockup {
    grid-area: brand;
  }

  .topbar-meta {
    display: contents;
  }

  .topbar-actions {
    grid-area: actions;
    justify-content: flex-end;
  }

  .profile-button {
    grid-area: profile;
    justify-self: end;
    align-self: start;
  }

  .import-panel {
    grid-template-columns: 1fr;
  }

  .import-controls {
    grid-template-columns: minmax(300px, 1fr) minmax(260px, auto);
    align-items: start;
  }

  .import-actions {
    justify-items: end;
    margin-top: 21px;
  }

  .import-action-row {
    justify-content: flex-end;
  }

  .tabs-spacer {
    flex-basis: 100%;
  }

  .tab-group-preferences {
    margin-left: auto;
  }
}

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

  .admin-packages-header {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-package-toolbar {
    align-items: stretch;
    flex-direction: column;
  }

  .admin-user-log-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-user-crm-stats {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .admin-inspect-details {
    grid-template-columns: 1fr;
  }
}
