:root {
  color-scheme: dark;
  --bg: #071827;
  --surface: #13293f;
  --surface-2: #10283f;
  --line: #2f4962;
  --text: #eaf3ff;
  --muted: #b7c6d9;
  --accent: #74d8ff;
  --accent-dark: #145e73;
  --good: #32d583;
  --warn: #fdb022;
  --bad: #f97066;
  --shadow: 0 16px 40px rgb(0 0 0 / 20%);
  font-family: Inter, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
}

* { box-sizing: border-box; }

html { background: var(--bg); }

body {
  margin: 0;
  min-width: 320px;
  background:
    radial-gradient(circle at 90% 0, rgb(116 216 255 / 9%), transparent 30rem),
    var(--bg);
  color: var(--text);
}

button, input, select, textarea { font: inherit; }

button, .button {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: .72rem 1rem;
  background: var(--surface-2);
  color: var(--text);
  font-weight: 750;
  cursor: pointer;
  transition: transform .08s ease, border-color .08s ease, background .08s ease;
}

button:hover, .button:hover { border-color: var(--accent); }
button:active, .button:active { transform: translateY(2px); background: var(--accent-dark); }
button.primary { background: #176f84; border-color: var(--accent); }
button.danger { border-color: var(--bad); }
button:disabled { opacity: .48; cursor: not-allowed; }

a { color: var(--accent); }

.app-header {
  position: sticky;
  top: 0;
  z-index: 20;
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  min-height: 92px;
  padding: .75rem clamp(1rem, 2vw, 1.45rem);
  border-bottom: 1px solid var(--line);
  background: rgb(8 27 45 / 96%);
  backdrop-filter: blur(14px);
}

.brand { display: flex; align-items: center; gap: .85rem; min-width: 0; }
.brand-logo {
  width: 72px;
  height: 72px;
  flex: 0 0 72px;
  object-fit: contain;
  filter: drop-shadow(0 10px 22px rgb(0 0 0 / 32%));
}
.version-line { color: #c5d8ec; font-size: .78rem; }
.brand h1 { margin: .12rem 0 0; font-size: clamp(1.4rem, 2.2vw, 2rem); }
.brand p { margin: .16rem 0 0; color: var(--muted); font-size: .9rem; }

.identity {
  display: flex;
  gap: .65rem;
  align-items: center;
  min-width: min(42vw, 420px);
}

.identity select { min-width: 180px; }
.header-actions { display: flex; gap: .65rem; align-items: center; justify-content: flex-end; }
.connection-pill {
  white-space: nowrap;
  border: 1px solid var(--good);
  border-radius: 999px;
  padding: .65rem .85rem;
  color: #d8ffeb;
  background: rgb(50 213 131 / 9%);
  font-weight: 800;
}

.server-access-shell {
  display: grid;
  min-height: 100dvh;
  padding: clamp(1rem, 5vw, 4rem);
  place-items: center;
}

.server-access-card {
  width: min(100%, 620px);
  padding: clamp(1.15rem, 4vw, 2.2rem);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: rgb(13 41 64 / 94%);
  box-shadow: var(--shadow);
}

.server-access-card h1 { margin: .2rem 0 .65rem; }
.server-access-card > p { color: var(--muted); line-height: 1.55; }
.server-login-form { display: grid; gap: .85rem; margin: 1.25rem 0; }
.server-login-form label { display: grid; gap: .42rem; font-weight: 800; }
.server-login-form input { width: 100%; }
.server-access-message {
  display: grid;
  gap: .22rem;
  margin: 1rem 0;
  padding: .9rem 1rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: 16px;
  background: var(--surface-2);
}
.server-access-message.success { border-left-color: var(--good); }
.server-access-message.error { border-left-color: var(--bad); }
.server-access-message span { color: var(--muted); }
.server-mfa-enrollment { display: grid; gap: .7rem; margin: 1rem 0; }
.server-mfa-enrollment h2 { margin: 0; }
.server-mfa-qr {
  width: min(280px, 100%);
  aspect-ratio: 1;
  padding: .65rem;
  border-radius: 14px;
  background: #fff;
}
.server-mfa-enrollment code { overflow-wrap: anywhere; user-select: all; }

.shell {
  display: grid;
  grid-template-columns: 300px minmax(0, 1fr);
  min-height: calc(100vh - 92px);
}

.sidebar {
  position: sticky;
  top: 92px;
  height: calc(100vh - 92px);
  overflow: auto;
  padding: .9rem;
  border-right: 1px solid var(--line);
}

.scope-card, .panel, .metric, .notice, .workflow-step {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: rgb(13 41 64 / 88%);
  box-shadow: var(--shadow);
}

.scope-card { padding: .9rem; margin-bottom: 1rem; }
.scope-card strong { display: block; }
.scope-card small { color: var(--muted); }
.eyebrow {
  margin-bottom: .45rem;
  color: var(--accent);
  font-size: .72rem;
  font-weight: 900;
  letter-spacing: .12em;
  text-transform: uppercase;
}
.homebase-card h2 { margin: 0 0 .35rem; font-size: 1.55rem; }
.homebase-card p { margin: 0; color: var(--muted); line-height: 1.42; }
.sidebar-kpis { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .4rem; }
.sidebar-kpis div {
  padding: .65rem .25rem;
  border-radius: 12px;
  background: rgb(7 24 39 / 52%);
  text-align: center;
}
.sidebar-kpis strong { font-size: 1.4rem; }
.sidebar-kpis small { display: block; font-size: .72rem; }
.nav-heading { display: flex; align-items: center; justify-content: space-between; padding: 0 .25rem .55rem; }
.nav-heading .eyebrow { margin: 0; }

.nav { display: grid; gap: .4rem; }
.nav a {
  display: flex;
  align-items: center;
  min-height: 58px;
  gap: .65rem;
  padding: .58rem .6rem;
  border: 1px solid transparent;
  border-radius: 14px;
  color: var(--text);
  text-decoration: none;
}
.nav a:hover, .nav a.active { background: var(--surface-2); border-color: var(--accent); }
.nav-icon {
  display: grid;
  place-items: center;
  width: 34px;
  height: 34px;
  flex: 0 0 34px;
  border-radius: 10px;
  background: rgb(116 216 255 / 8%);
  color: var(--accent);
  font-size: .78rem;
  font-weight: 950;
}
.nav-copy { min-width: 0; flex: 1; }
.nav-copy strong, .nav-copy small { display: block; }
.nav-copy strong { font-size: .92rem; }
.nav-copy small {
  margin-top: .08rem;
  overflow: hidden;
  color: var(--muted);
  font-size: .7rem;
  line-height: 1.2;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.nav-arrow { color: var(--muted); font-size: 1.25rem; }
.active-scope-card { margin-top: 1rem; }

main { min-width: 0; padding: clamp(1rem, 3vw, 2rem); }
.section-navigation {
  display: flex;
  gap: 1rem;
  align-items: flex-end;
  justify-content: space-between;
  margin-bottom: 1.1rem;
  padding: .35rem 0 .75rem;
  border-bottom: 1px solid var(--line);
}
.section-context { flex: 1 1 260px; min-width: 0; }
.section-context h2 { margin: 0; font-size: clamp(1.25rem, 2.2vw, 1.7rem); }
.section-context p { margin: .18rem 0 0; color: var(--muted); font-size: .86rem; }
.page-head {
  display: flex;
  gap: 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin-bottom: 1rem;
}
.page-head h2 { margin: 0; font-size: clamp(1.7rem, 3vw, 2.5rem); }
.page-head p { margin: .25rem 0 0; color: var(--muted); }
.page-actions { display: flex; gap: .55rem; flex-wrap: wrap; justify-content: flex-end; }

.tabs { display: flex; gap: .45rem; flex-wrap: wrap; justify-content: flex-end; }
.tabs a, .tabs button {
  min-height: 38px;
  padding: .48rem .72rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface);
  text-decoration: none;
  font-weight: 750;
}
.tabs a.active, .tabs button.active { border-color: var(--accent); background: var(--accent-dark); }

.grid { display: grid; gap: 1rem; }
.grid.metrics { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.two { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.three { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.panel { padding: clamp(1rem, 2.5vw, 1.35rem); min-width: 0; }
.panel h3 { margin: 0 0 .85rem; }
.metric { padding: 1rem; }
.metric .value { font-size: clamp(1.7rem, 4vw, 2.8rem); font-weight: 850; }
.metric .label { color: var(--muted); }

.notice {
  padding: .9rem 1rem;
  margin-bottom: 1rem;
  border-left: 6px solid var(--accent);
}
.notice.good { border-left-color: var(--good); }
.notice.warning { border-left-color: var(--warn); }
.notice.error { border-left-color: var(--bad); }
.notice strong { display: block; margin-bottom: .2rem; }
.notice p { margin: .25rem 0; }
.notice .button { display: inline-block; min-height: 0; margin-top: .4rem; padding: .45rem .65rem; }

.inline-status {
  display: flex;
  gap: .45rem .75rem;
  align-items: baseline;
  padding: .55rem .7rem;
  border: 1px solid var(--line);
  border-left: 4px solid var(--good);
  border-radius: 10px;
  background: rgb(7 24 39 / 48%);
  font-size: .84rem;
}
.inline-status.warning { border-left-color: var(--warn); }
.inline-status.error { border-left-color: var(--bad); }
.inline-status span { min-width: 0; color: var(--muted); }
.operation-inline-feedback:empty, .operation-result:empty { display: none; }

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

.field { min-width: 0; }
.field.wide { grid-column: 1 / -1; }
.field label, .field legend {
  display: block;
  margin-bottom: .35rem;
  font-weight: 800;
}
.field input, .field select, .field textarea {
  width: 100%;
  min-height: 48px;
  border: 1px solid var(--line);
  border-radius: 13px;
  padding: .72rem .8rem;
  background: #092238;
  color: var(--text);
}
.field select[multiple] { min-height: 145px; }
.field textarea { min-height: 95px; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus {
  outline: 3px solid rgb(98 218 247 / 25%);
  border-color: var(--accent);
}
.help { display: block; margin-top: .34rem; color: var(--muted); font-size: .85rem; line-height: 1.35; }
.form-actions { display: flex; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.operation-workspace {
  margin-top: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgb(7 24 39 / 35%);
  overflow: clip;
}
.operation-tablist {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .35rem;
  padding: .45rem;
  border-bottom: 1px solid var(--line);
  background: rgb(8 31 50 / 96%);
}
.operation-tablist button {
  display: grid;
  gap: .15rem;
  min-height: 54px;
  padding: .55rem .45rem;
  border-color: transparent;
  text-align: left;
}
.operation-tablist button strong, .operation-tablist button small { display: block; }
.operation-tablist button small { color: var(--muted); font-size: .72rem; line-height: 1.15; }
.operation-tablist button[aria-selected="true"] {
  border-color: var(--accent);
  background: var(--accent-dark);
  color: #fff;
}
.operation-tablist button[aria-selected="true"] small { color: #d8f5ff; }
.operation-tab-mobile { display: none; }
.operation-tab-panel { padding: .85rem; }
.operation-tab-panel[hidden] { display: none; }
.operation-tab-panel > .form-grid { align-items: start; }
.route-weather-briefing, .operation-route-image {
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(7 24 39 / 48%);
}
.route-weather-briefing > header, .operation-route-image > header {
  display: flex;
  gap: .75rem;
  align-items: start;
  justify-content: space-between;
}
.route-weather-briefing h4, .route-weather-briefing p,
.operation-route-image h4, .operation-route-image p { margin: 0; }
.route-weather-briefing header p, .operation-route-image header p { margin-top: .25rem; }
.route-metar-grid, .operation-radio-grid, .landing-check-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .6rem;
  margin-top: .7rem;
}
.route-metar-card, .operation-radio-card, .landing-check-item {
  min-width: 0;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #071827;
}
.route-metar-card strong, .route-metar-card small,
.operation-radio-card strong, .operation-radio-card small { display: block; }
.route-metar-card code { display: block; margin-top: .35rem; white-space: normal; overflow-wrap: anywhere; }
.route-metar-card small, .operation-radio-card small { margin-top: .25rem; color: var(--muted); }
.route-metar-card.current { border-color: var(--good); }
.route-metar-card.stale, .landing-check-item.warning { border-color: var(--warn); }
.landing-check-item.good { border-color: var(--good); }
.operation-frequency-list { display: flex; flex-wrap: wrap; gap: .35rem; margin-top: .45rem; }
.operation-frequency-list span { padding: .25rem .45rem; border: 1px solid var(--line); border-radius: 999px; }
.operation-route-map-stage { height: 300px; }
.operation-satellite-actions { display: flex; flex-wrap: wrap; gap: .55rem; }
.operation-section {
  margin: 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(7 24 39 / 45%);
}
.operation-section > summary {
  display: flex;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  padding: .75rem .85rem;
  cursor: pointer;
  font-weight: 850;
  list-style-position: inside;
}
.operation-section > summary small { color: var(--muted); font-size: .76rem; font-weight: 650; }
.operation-section[open] > summary { border-bottom: 1px solid var(--line); }
.operation-section-body { padding: .8rem; }
.operation-check-summary {
  margin-top: .75rem;
  overflow: hidden;
  border: 1px solid var(--line);
  border-left: 5px solid var(--good);
  border-radius: 13px;
  background: rgb(7 24 39 / 58%);
}
.operation-check-summary.warning { border-left-color: var(--warn); }
.operation-check-summary.error { border-left-color: var(--bad); }
.operation-check-summary > header {
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  padding: .55rem .7rem;
  border-bottom: 1px solid var(--line);
}
.operation-check-summary > header span { color: var(--muted); font-size: .78rem; }
.operation-check-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
  padding: .55rem .7rem;
  border-bottom: 1px solid rgb(71 116 141 / 35%);
}
.operation-check-row:last-child { border-bottom: 0; }
.operation-check-row strong, .operation-check-row small { display: block; }
.operation-check-row small { margin-top: .12rem; color: var(--muted); line-height: 1.25; }
.operation-check-row button, .operation-check-row .button { min-height: 34px; padding: .35rem .55rem; }

.table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 16px; }
table { width: 100%; border-collapse: collapse; min-width: 700px; }
th, td { padding: .8rem; border-bottom: 1px solid var(--line); text-align: left; vertical-align: top; }
th { background: var(--surface-2); color: #c8efff; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgb(98 218 247 / 5%); }
.empty { padding: 1.5rem; text-align: center; color: var(--muted); }

.badge {
  display: inline-block;
  padding: .22rem .5rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
}
.badge.good { border-color: var(--good); color: var(--good); }
.badge.warning { border-color: var(--warn); color: var(--warn); }
.badge.error { border-color: var(--bad); color: var(--bad); }

.signature-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; }
.signature-pad { border: 1px dashed var(--line); border-radius: 16px; padding: .75rem; }
.signature-pad canvas { display: block; width: 100%; height: 150px; background: white; border-radius: 10px; touch-action: none; }
.signature-pad button { min-height: 38px; margin-top: .6rem; padding: .45rem .7rem; }
.signature-line {
  display: grid;
  gap: .5rem;
  min-height: 100px;
  align-content: space-between;
  padding: .8rem;
  border: 1px dashed var(--line);
  border-radius: 16px;
}
.signature-line::after { content: ""; display: block; border-bottom: 1px solid var(--muted); }
.signature-line span { color: var(--muted); }
.compact-grid { margin-top: .55rem; }
.calculation-card, .metar-card {
  display: grid;
  gap: .35rem;
  margin-top: .8rem;
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(7 24 39 / 52%);
}
.calculation-card strong, .metar-card strong { color: var(--accent); }
.calculation-good { border-color: var(--good); }
.calculation-warning { border-color: var(--warn); }
.calculation-card small { color: var(--warn); }
.metar-card code, .airport-card code {
  display: block;
  overflow-wrap: anywhere;
  color: #fff;
  white-space: normal;
}
.airport-card small { color: var(--muted); }
.heatmap-list { display: grid; gap: .85rem; }
.heatmap-list div {
  display: grid;
  grid-template-columns: 70px minmax(40px, 1fr) 100px;
  gap: .8rem;
  align-items: center;
}
.heatmap-list span {
  display: block;
  min-width: 10px;
  height: 22px;
  border-radius: 999px;
  background: linear-gradient(90deg, var(--accent-dark), var(--accent));
}
.geographic-map-panel { margin-top: 1rem; }
.geographic-map-stage {
  position: relative;
  display: block;
  width: 100%;
  height: 460px;
  margin-top: .6rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  overflow: hidden;
  background: #d9edf8;
  isolation: isolate;
}
.geographic-map-stage > canvas,
.geographic-map-stage > .openlayers-map {
  position: absolute;
  inset: 0;
  display: block;
  width: 100%;
  height: 100%;
}
.geographic-map-stage > canvas {
  z-index: 1;
  touch-action: manipulation;
}
.geographic-map-stage > .openlayers-map {
  z-index: 2;
  background: transparent;
  color-scheme: light;
  touch-action: none;
}
.geographic-map-stage > .openlayers-map:not([data-map-engine]) { pointer-events: none; }
.openlayers-map .ol-viewport {
  overflow: hidden;
  border-radius: 13px;
  background: transparent;
}
.openlayers-map .ol-control button {
  width: 2.75rem;
  height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 8px;
  background: rgb(255 255 255 / 94%);
  color: #071827;
  box-shadow: 0 2px 10px rgb(7 24 39 / 22%);
}
.openlayers-map .ol-control button:hover,
.openlayers-map .ol-control button:focus-visible {
  background: #fff;
  color: #005c84;
}
.openlayers-map .ol-attribution {
  max-width: calc(100% - 1rem);
  color: #071827;
  font-size: .7rem;
}
.openlayers-map .ol-attribution a { color: #004e70; }
.map-basemap-status {
  display: block;
  min-height: 1.25rem;
  margin-top: .45rem;
  color: var(--muted);
  font-size: .8rem;
  font-weight: 700;
}
.openlayers-map[data-basemap-status="fallback"] + .map-basemap-status,
.map-basemap-status[data-state="fallback"] {
  color: var(--warn);
}
.geographic-map-panel .button.active {
  border-color: var(--accent);
  background: var(--accent-dark);
}
.map-hover-status {
  display: block;
  min-height: 1.4rem;
  margin-top: .55rem;
  color: var(--text);
  font-weight: 750;
}
.map-legend {
  display: flex;
  gap: .55rem;
  align-items: center;
  flex-wrap: wrap;
  margin-top: .45rem;
  color: var(--muted);
  font-size: .8rem;
}
.map-legend span {
  display: inline-block;
  width: .75rem;
  height: .75rem;
  margin-left: .35rem;
  border-radius: 50%;
}
.weather-dot { background: var(--accent); }
.metar-vfr-dot { background: #38d977; }
.metar-mvfr-dot { background: #ffd54f; }
.metar-ifr-dot { background: #ff5b5b; }
.metar-unknown-dot { background: #94a3b8; }
.airport-dot { background: rgb(234 243 255 / 58%); }
.selected-dot { background: var(--warn); }
.weather-summary {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
  margin: .75rem 0;
}
.weather-summary > div {
  min-width: 0;
  padding: .6rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgb(7 24 39 / 45%);
}
.weather-summary small, .weather-summary strong { display: block; overflow-wrap: anywhere; }
.weather-summary small { color: var(--muted); }
.weather-summary strong { margin-top: .15rem; }
.flight-category {
  display: inline-flex;
  align-items: center;
  min-height: 30px;
  padding: .25rem .55rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-weight: 900;
}
.flight-category.vfr { color: #79efad; background: rgb(56 217 119 / 12%); }
.flight-category.mvfr { color: #ffe28b; background: rgb(255 213 79 / 12%); }
.flight-category.ifr, .flight-category.lifr { color: #ffaaa4; background: rgb(255 91 91 / 13%); }
.flight-category.unknown { color: #cbd5e1; background: rgb(148 163 184 / 12%); }
.weather-hazards, .runway-advice-list { display: flex; gap: .4rem; flex-wrap: wrap; margin: .65rem 0; }
.weather-hazard, .runway-chip {
  display: inline-flex;
  gap: .3rem;
  align-items: center;
  min-height: 34px;
  padding: .35rem .55rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: rgb(7 24 39 / 60%);
  font-size: .8rem;
  font-weight: 800;
}
.weather-hazard.warning, .runway-chip.bad { border-color: var(--bad); color: #ffd5d1; }
.weather-hazard.caution { border-color: var(--warn); color: #ffe5a7; }
.runway-chip.good { border-color: var(--good); color: #b7ffd5; background: rgb(50 213 131 / 11%); }
.runway-chip.neutral { color: var(--muted); }
.runway-briefing, .notam-status {
  margin-top: .7rem;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgb(7 24 39 / 48%);
}
.runway-briefing h4, .notam-status strong { margin: 0; }
.runway-briefing p, .notam-status p { margin: .3rem 0; color: var(--muted); }
.notam-status.closed { border-color: var(--bad); }
.notam-status.open { border-color: var(--good); }
.notam-status.unknown { border-color: #94a3b8; }
.destination-briefing { margin-top: .35rem; }
.flight-route-summary {
  display: flex;
  gap: .9rem;
  align-items: center;
  justify-content: space-between;
  border-left: 5px solid var(--good);
}
.flight-route-summary h3, .flight-route-summary p { margin: .15rem 0; }
.flight-route-summary small { color: var(--muted); }
.flight-route-line {
  display: inline-block;
  width: 2rem;
  height: 4px;
  border-radius: 99px;
  background: var(--good);
  box-shadow: 0 0 0 1px #fff;
}
.rt-control-panel { display: grid; gap: .9rem; }
.rt-language-tabs {
  display: flex;
  gap: .55rem;
  align-items: center;
  flex-wrap: wrap;
}
.rt-language-tabs button.active {
  border-color: var(--accent);
  background: var(--accent);
  color: #061726;
}
.rt-language-tabs span { margin-left: auto; color: var(--muted); font-size: .82rem; }
.rt-status-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .6rem;
}
.rt-status-grid > span {
  display: grid;
  gap: .25rem;
  min-width: 0;
  padding: .7rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgb(7 24 39 / 58%);
}
.rt-status-grid small { color: var(--accent); font-weight: 850; text-transform: uppercase; }
.rt-status-grid strong { font-size: .88rem; overflow-wrap: anywhere; }
.rt-proposal-actions { margin: 0; }
.rt-expected-panel {
  display: grid;
  gap: .5rem;
  padding: .85rem;
  border: 1px solid var(--good);
  border-left: 5px solid var(--good);
  border-radius: 14px;
  background: rgb(50 213 131 / 8%);
}
.rt-expected-panel h3, .rt-expected-panel p { margin: 0; }
.rt-expected-panel small { color: var(--muted); line-height: 1.4; }
.rt-settings-form { display: grid; gap: .75rem; }
.rt-primary-settings {
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(7 24 39 / 45%);
}
.rt-settings {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(7 24 39 / 45%);
}
.rt-settings > summary {
  cursor: pointer;
  padding: .8rem;
  font-weight: 850;
}
.rt-settings[open] > summary { border-bottom: 1px solid var(--line); }
.rt-settings .rt-advanced-settings { padding: .85rem; }
.rt-phrase-section { display: grid; gap: .75rem; margin-top: 1rem; }
.rt-phrase-card {
  display: grid;
  gap: .65rem;
  padding: .9rem;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 15px;
  background: rgb(13 41 64 / 88%);
  box-shadow: var(--shadow);
}
.rt-phrase-card > header {
  display: flex;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
}
.rt-phrase-card > header span { display: grid; gap: .15rem; }
.rt-phrase-card > header small { color: var(--accent); font-weight: 850; }
.rt-spoken-line, .rt-reply {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #0a2236;
}
.rt-spoken-line span, .rt-reply span { min-width: 0; }
.rt-spoken-line b, .rt-reply b { color: var(--accent); }
.rt-spoken-line p, .rt-reply p { margin: .3rem 0; line-height: 1.45; }
.rt-spoken-line small, .rt-reply small { display: block; color: var(--muted); line-height: 1.4; }
.rt-translation {
  margin: 0;
  padding: .6rem .75rem;
  border-left: 3px solid var(--good);
  border-radius: 8px;
  background: rgb(50 213 131 / 9%);
  line-height: 1.45;
}
.rt-reference-grid { margin-top: 1rem; }
.rt-number-reference > summary { cursor: pointer; font-weight: 850; }
.rt-number-reference > div {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(115px, 1fr));
  gap: .35rem;
  max-height: 300px;
  margin-top: .65rem;
  padding: .55rem;
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: #071827;
}
.rt-number-reference span { padding: .3rem .4rem; border-bottom: 1px solid rgb(47 73 98 / 55%); }
.rt-number-reference b { display: inline-block; min-width: 2.25rem; color: var(--accent); }
.rt-library-manager { margin-top: 1rem; }
.error-text { color: var(--bad) !important; }

.workflow { display: grid; gap: .75rem; counter-reset: steps; }
.workflow-step { position: relative; padding: 1rem 1rem 1rem 3.5rem; }
.workflow-step::before {
  counter-increment: steps;
  content: counter(steps);
  position: absolute;
  top: .8rem;
  left: .8rem;
  display: grid;
  place-items: center;
  width: 2rem;
  height: 2rem;
  border-radius: 50%;
  background: var(--accent-dark);
  border: 1px solid var(--accent);
  font-weight: 900;
}
.workflow-step h4 { margin: 0 0 .25rem; }
.workflow-step p { margin: 0; color: var(--muted); }

.money-positive { color: var(--good); }
.money-negative { color: var(--bad); }
.subtle { color: var(--muted); }
.hidden { display: none !important; }
.feature-list { display: grid; gap: .65rem; margin: 0; padding-left: 1.2rem; }
.feature-list li::marker { color: var(--accent); }
.profile-summary dl { display: grid; gap: .55rem; margin: 1rem 0 0; }
.profile-summary dl div {
  display: grid;
  grid-template-columns: minmax(100px, .7fr) 1.3fr;
  gap: .7rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--line);
}
.profile-summary dt { color: var(--muted); }
.profile-summary dd { margin: 0; font-weight: 750; }
.release-card h3 { margin-top: .8rem; }
.mobile-nav, .mobile-section-select { display: none; }

.mobile-more-dialog {
  width: min(620px, calc(100% - 1rem));
  max-height: min(82dvh, 760px);
  margin: auto auto .55rem;
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--accent);
  border-radius: 20px;
  background: #071827;
  color: var(--text);
  box-shadow: 0 24px 80px rgb(0 0 0 / 72%);
}
.mobile-more-dialog::backdrop { background: rgb(1 9 16 / 72%); backdrop-filter: blur(3px); }
.mobile-more-dialog[open] { display: grid; grid-template-rows: auto minmax(0, 1fr); }
.mobile-more-head {
  display: flex;
  gap: .75rem;
  align-items: center;
  justify-content: space-between;
  padding: .8rem;
  border-bottom: 1px solid var(--line);
}
.mobile-more-head h2, .mobile-more-head p { margin: 0; }
.mobile-more-head p { margin-top: .15rem; color: var(--muted); font-size: .78rem; }
.mobile-more-head button { min-width: 44px; min-height: 44px; padding: .45rem; }
.mobile-more-content { display: grid; gap: .65rem; padding: .75rem; overflow: auto; }
.mobile-more-group {
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(13 41 64 / 72%);
}
.mobile-more-group summary {
  display: flex;
  gap: .55rem;
  align-items: center;
  min-height: 48px;
  padding: .6rem .7rem;
  cursor: pointer;
  font-weight: 850;
}
.mobile-more-group.active { border-color: var(--accent); }
.mobile-more-links { display: grid; gap: .35rem; padding: 0 .55rem .55rem; }
.mobile-more-links a {
  display: grid;
  gap: .12rem;
  min-height: 48px;
  padding: .55rem .65rem;
  border: 1px solid transparent;
  border-radius: 11px;
  color: var(--text);
  text-decoration: none;
}
.mobile-more-links a.active { border-color: var(--accent); background: var(--surface-2); }
.mobile-more-links small { color: var(--muted); }

.picker-field { position: relative; }
.picker-control { display: grid; grid-template-columns: minmax(0, 1fr) 44px; gap: .35rem; }
.picker-control .picker-search { min-width: 0; }
.picker-clear { min-height: 48px; padding: .35rem; font-size: 1.35rem; }
.picker-options {
  position: absolute;
  z-index: 80;
  right: 0;
  left: 0;
  max-height: 280px;
  margin-top: .25rem;
  padding: .35rem;
  overflow: auto;
  border: 1px solid var(--accent);
  border-radius: 13px;
  background: #071827;
  box-shadow: 0 18px 45px rgb(0 0 0 / 48%);
}
.picker-options button {
  display: block;
  width: 100%;
  min-height: 42px;
  border: 0;
  border-radius: 9px;
  padding: .55rem .65rem;
  text-align: left;
  background: transparent;
}
.picker-options button:hover, .picker-options button[aria-selected="true"] {
  background: var(--accent-dark);
}
.picker-options button[hidden] { display: none; }
.picker-field[data-picker-locked="true"] .picker-search {
  border-color: rgb(56 189 248 / 35%);
  background: rgb(15 46 69 / 72%);
  cursor: not-allowed;
}
.picker-field[data-picker-locked="true"] .picker-clear { opacity: .35; }

.safety-grid {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: .55rem;
}
.safety-card {
  min-width: 0;
  padding: .75rem;
  border: 1px solid var(--line);
  border-left: 5px solid var(--accent);
  border-radius: 12px;
  background: rgb(7 24 39 / 58%);
}
.safety-card strong, .safety-card span { display: block; }
.safety-card span { margin-top: .2rem; color: var(--muted); font-size: .78rem; line-height: 1.3; }
.safety-card.good { border-left-color: var(--good); }
.safety-card.warning { border-left-color: var(--warn); }
.safety-card.error { border-left-color: var(--bad); }

.planning-head, .planning-nav {
  display: flex;
  gap: 1rem;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
}
.planning-head h3, .planning-head p { margin: 0; }
.planning-head p { margin-top: .25rem; }
.planning-options {
  margin: 1rem 0;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(7 24 39 / 45%);
}
.planning-options summary { padding: .8rem 1rem; cursor: pointer; font-weight: 850; }
.planning-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1.3fr) repeat(3, minmax(150px, .8fr)) minmax(130px, .6fr);
  gap: .65rem;
  align-items: end;
  padding: .85rem;
  border-top: 1px solid var(--line);
}
.planning-toolbar label, .logbook-filters label { display: grid; gap: .3rem; color: var(--muted); font-size: .8rem; font-weight: 750; }
.planning-toolbar select, .logbook-filters select, .logbook-filters input {
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 11px;
  padding: .55rem .65rem;
  background: #092238;
  color: var(--text);
}
.planning-toolbar .check-field { display: flex; align-items: center; min-height: 44px; gap: .45rem; }
.planning-modes { display: flex; gap: .35rem; flex-wrap: wrap; }
.planning-modes button { min-height: 42px; padding: .5rem .7rem; }
.planning-modes button.active { border-color: var(--accent); background: var(--accent-dark); }
.planning-nav { justify-content: center; margin-bottom: .75rem; }
.planning-nav strong { min-width: min(360px, 55vw); text-align: center; text-transform: capitalize; }
.planning-nav button { min-height: 42px; }
.planning-calendar { overflow: auto; border: 1px solid var(--line); border-radius: 14px; background: #071827; }
.planning-weekdays, .planning-month-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(118px, 1fr));
  min-width: 826px;
}
.planning-weekdays { background: var(--surface-2); }
.planning-weekdays span { padding: .55rem; text-align: center; color: var(--accent); font-size: .78rem; font-weight: 850; text-transform: uppercase; }
.planning-day { min-height: 118px; padding: .4rem; border-top: 1px solid var(--line); border-right: 1px solid var(--line); }
.planning-day.outside { opacity: .5; }
.planning-day.today { box-shadow: inset 0 0 0 2px var(--accent); }
.planning-day-number { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 50%; text-decoration: none; font-weight: 850; }
.planning-day.today .planning-day-number { background: var(--accent); color: #071827; }
.planning-day > div, .planning-week-grid section > div, .planning-aircraft-grid section { display: grid; gap: .3rem; }
.booking-chip {
  display: grid;
  gap: .35rem;
  padding: .35rem .4rem;
  border: 1px solid #47748d;
  border-left: 4px solid var(--accent);
  border-radius: 7px;
  background: #123249;
  color: var(--text);
  font-size: .72rem;
}
.booking-chip-main {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .1rem .4rem;
  min-width: 0;
}
.booking-chip small { grid-column: 1 / -1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.booking-flight-action {
  display: inline-flex;
  justify-content: center;
  padding: .35rem .45rem;
  border: 1px solid var(--accent);
  border-radius: 7px;
  color: var(--text);
  text-align: center;
  text-decoration: none;
  font-size: .7rem;
  font-weight: 850;
}
.booking-flight-action:hover { background: var(--accent-dark); }
.booking-chip-actions {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(92px, 1fr));
  gap: .3rem;
}
.booking-edit-action, .booking-delete-action, .booking-not-flown-action {
  display: inline-flex;
  min-height: 34px;
  justify-content: center;
  align-items: center;
  padding: .3rem .4rem;
  border: 1px solid var(--line);
  border-radius: 7px;
  background: transparent;
  color: var(--text);
  text-align: center;
  text-decoration: none;
  font-size: .68rem;
  font-weight: 800;
}
.booking-delete-action { border-color: rgb(255 107 107 / 65%); }
.booking-not-flown-action { border-color: rgb(255 183 3 / 70%); }
.booking-outcome-required { color: var(--warn); font-weight: 800; }
.booking-chip.cancelled { opacity: .55; border-left-color: var(--muted); }
.booking-chip.requested { border-left-color: #b794f4; }
.booking-chip.not_flown { border-left-color: var(--warn); opacity: .82; }
.planning-mobile-list { display: none; }
.planning-week-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(155px, 1fr));
  min-width: 1085px;
}
.planning-week-grid > section { min-height: 360px; padding: .65rem; border-right: 1px solid var(--line); }
.planning-week-grid > section > a { display: grid; gap: .15rem; margin-bottom: .6rem; text-decoration: none; }
.planning-week-grid > section > a small { color: var(--muted); }
.planning-aircraft-grid { display: grid; gap: .65rem; min-width: 720px; padding: .7rem; }
.planning-aircraft-grid section {
  grid-template-columns: minmax(190px, .7fr) repeat(auto-fit, minmax(170px, 1fr));
  align-items: center;
  padding: .6rem;
  border: 1px solid var(--line);
  border-radius: 11px;
}
.planning-aircraft-grid h4 { margin: 0; }
.planning-aircraft-grid h4 small { display: block; color: var(--muted); }
.empty-slot { display: block; padding: .65rem; border: 1px dashed var(--line); border-radius: 8px; color: var(--muted); text-decoration: none; }
.planning-summary { margin-top: .6rem; color: var(--muted); font-size: .82rem; }
.planning-outcome-alert {
  display: grid;
  gap: .5rem;
  margin: .85rem 0;
}
.planning-outcome-alert .form-actions { margin-top: 0; justify-content: flex-start; }
.booking-not-flown-panel { margin-top: 1rem; }
.compact-metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.logbook-filters {
  display: grid;
  grid-template-columns: minmax(250px, 1.5fr) repeat(3, minmax(150px, .7fr));
  gap: .65rem;
  margin: 1rem 0;
}
.logbook-table { min-width: 1800px; }

.history-status-strip {
  display: flex;
  flex-wrap: wrap;
  gap: .45rem;
  margin: .7rem 0;
}

.history-status-strip span {
  display: inline-flex;
  gap: .3rem;
  align-items: center;
  min-height: 34px;
  padding: .35rem .6rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  background: rgb(5 24 39 / 58%);
  font-size: .78rem;
}

.history-status-strip strong { color: var(--text); }

.history-pagination {
  display: flex;
  gap: .7rem;
  align-items: center;
  justify-content: space-between;
  margin-top: .75rem;
  color: var(--muted);
  font-size: .82rem;
}

.loading-line {
  margin: .55rem 0;
  color: var(--accent);
  font-weight: 800;
}

.legacy-aircraft-archive { margin-top: 1rem; }

.legacy-aircraft-toolbar {
  display: grid;
  grid-template-columns: minmax(240px, 1fr) auto;
  gap: .8rem;
  align-items: end;
  margin: .8rem 0;
  color: var(--muted);
  font-size: .82rem;
}

.legacy-aircraft-toolbar label { display: grid; gap: .3rem; font-weight: 800; }

.legacy-aircraft-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}

.legacy-aircraft-card {
  min-width: 0;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: #081f33;
}

.legacy-aircraft-card > a,
.legacy-aircraft-photo-missing {
  display: grid;
  width: 100%;
  aspect-ratio: 16 / 9;
  place-items: center;
  overflow: hidden;
  color: var(--muted);
  background: #061522;
}

.legacy-aircraft-card img { width: 100%; height: 100%; object-fit: cover; }

.legacy-aircraft-card > div:last-child {
  display: grid;
  gap: .3rem;
  padding: .65rem;
}

.legacy-aircraft-card strong { font-size: 1rem; }
.legacy-aircraft-card span { color: var(--text); font-size: .86rem; }
.legacy-aircraft-card small { color: var(--muted); overflow-wrap: anywhere; }
.legacy-aircraft-card .button, .legacy-aircraft-card .badge { justify-self: start; margin-top: .25rem; }

.training-selector {
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgb(7 24 39 / 45%);
}
.training-selector > p { margin: 0 0 .8rem; }
.training-choice-head {
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  margin-bottom: .65rem;
  color: var(--muted);
  font-size: .84rem;
}
.training-filter-row {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) auto;
  gap: .65rem;
  align-items: end;
  margin-bottom: .6rem;
}
.training-filter-row label { display: grid; gap: .3rem; color: var(--muted); font-size: .8rem; font-weight: 800; }
.training-filter-row select {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--accent);
  border-radius: 11px;
  padding: .55rem .65rem;
  background: #092238;
  color: var(--text);
}
.training-selected-count {
  min-width: 88px;
  padding: .55rem .65rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--text);
  text-align: center;
  font-size: .82rem;
  font-weight: 850;
}
.training-selected {
  display: flex;
  gap: .35rem;
  flex-wrap: wrap;
  margin-bottom: .6rem;
  padding: .5rem;
  border: 1px dashed var(--good);
  border-radius: 10px;
}
.training-selected[hidden] { display: none; }
.training-choice-list { display: block; }
.training-phase {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .55rem;
}
.training-phase[hidden] { display: none; }
.training-choice {
  display: grid !important;
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .7rem;
  align-items: start;
  margin: 0 !important;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #092238;
  cursor: pointer;
}
.training-choice:hover { border-color: var(--accent); }
.training-choice input {
  width: 20px !important;
  min-height: 20px !important;
  margin-top: .1rem;
}
.training-choice strong, .training-choice small { display: block; }
.training-choice small { margin-top: .2rem; color: var(--muted); font-weight: 500; line-height: 1.35; }
.training-choice.completed { opacity: .7; cursor: default; }
.training-empty {
  display: grid;
  gap: .25rem;
  padding: .8rem;
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--muted);
}
.training-empty.good { border-color: var(--good); }
.training-empty strong { color: var(--text); }

.syllabus-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) minmax(220px, 1fr) auto auto;
  gap: 1rem;
  align-items: end;
  margin-bottom: 1rem;
}
.syllabus-toolbar label { display: grid; gap: .35rem; color: var(--muted); font-size: .82rem; font-weight: 800; }
.syllabus-toolbar select {
  min-height: 46px;
  border: 1px solid var(--line);
  border-radius: 12px;
  padding: .65rem .75rem;
  background: #092238;
  color: var(--text);
}
.syllabus-toolbar .check-field { display: flex; align-items: center; gap: .5rem; min-height: 46px; }
.syllabus-toolbar .check-field input { width: 20px; height: 20px; }
.syllabus-toolbar strong { display: block; }
.syllabus-metrics { margin-bottom: 1rem; }
.syllabus-readiness .notice { margin-bottom: 1rem; }
.syllabus-list { display: grid; gap: 1rem; }
.syllabus-card {
  padding: 1rem;
  border: 1px solid var(--line);
  border-left: 6px solid var(--accent);
  border-radius: 18px;
  background: rgb(13 41 64 / 88%);
  box-shadow: var(--shadow);
}
.syllabus-card.completed { border-left-color: var(--good); }
.syllabus-card.verification-needed { border-left-color: var(--warn); }
.syllabus-card > header {
  display: flex;
  gap: 1rem;
  justify-content: space-between;
  align-items: flex-start;
}
.syllabus-card h3 { margin: 0; }
.syllabus-card header p { margin: .35rem 0 0; color: var(--muted); }
.syllabus-status { display: flex; gap: .4rem; flex-wrap: wrap; justify-content: flex-end; }
.syllabus-facts {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .55rem;
  margin: .9rem 0;
}
.syllabus-facts span {
  min-width: 0;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  color: var(--muted);
  font-size: .78rem;
}
.syllabus-facts strong { display: block; margin-bottom: .18rem; overflow-wrap: anywhere; color: var(--text); font-size: .92rem; }
.syllabus-attempts {
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgb(7 24 39 / 45%);
}
.syllabus-attempts summary { padding: .75rem; cursor: pointer; font-weight: 800; }
.syllabus-attempts .table-wrap { border-width: 1px 0 0; border-radius: 0 0 12px 12px; }
.syllabus-signoff { margin-top: .85rem; }
.syllabus-signoff-form {
  display: grid;
  grid-template-columns: minmax(220px, 1fr) repeat(2, minmax(170px, .6fr));
  gap: .65rem;
  align-items: end;
  padding: .8rem;
  border: 1px solid var(--accent);
  border-radius: 13px;
  background: rgb(20 94 115 / 15%);
}
.syllabus-signoff-form label { display: grid; gap: .3rem; color: var(--muted); font-size: .8rem; font-weight: 750; }
.syllabus-signoff-form .check-field { display: flex; align-items: center; gap: .5rem; color: var(--text); }
.syllabus-signoff-form .check-field input { width: 20px; height: 20px; }
.syllabus-signoff-form select, .syllabus-signoff-form textarea {
  width: 100%;
  min-height: 44px;
  border: 1px solid var(--line);
  border-radius: 10px;
  padding: .55rem .65rem;
  background: #092238;
  color: var(--text);
}
.syllabus-signoff-form textarea { min-height: 70px; resize: vertical; }
.syllabus-signoff-form .wide { grid-column: 1 / -1; }
.syllabus-signoff-result {
  display: grid;
  gap: .2rem;
  padding: .75rem;
  border: 1px solid var(--good);
  border-radius: 12px;
  color: var(--muted);
}
.syllabus-signoff-result strong { color: var(--good); }
.syllabus-signoff-result small { color: var(--text); }
.syllabus-toolbar label small {
  display: block;
  margin-top: .25rem;
  color: var(--muted);
  font-size: .72rem;
  font-weight: 500;
}

.route-calculation {
  display: grid;
  grid-template-columns: minmax(190px, .45fr) minmax(0, 1.55fr);
  gap: .65rem;
  align-items: start;
}
.route-calculation > .help { grid-column: 1 / -1; }
.route-calculation button { min-height: 46px; }
.maintenance-countdown { align-self: end; }
.club-aircraft-parameters { display: grid; gap: .65rem; }
.club-aircraft-parameter { margin: 0; }
.club-aircraft-parameter summary {
  display: flex;
  gap: .5rem;
  justify-content: space-between;
  align-items: center;
}

.module-toggle-list { display: grid; gap: .55rem; }
.module-toggle-list label {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .7rem;
  align-items: start;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 11px;
  background: rgb(7 24 39 / 45%);
}
.module-toggle-list input { width: 20px; height: 20px; margin-top: .1rem; }
.module-toggle-list strong, .module-toggle-list small { display: block; }
.module-toggle-list small { margin-top: .18rem; color: var(--muted); line-height: 1.3; }

.record-editor { align-self: start; }
.record-toolbar {
  display: flex;
  gap: .8rem 1rem;
  align-items: flex-start;
  justify-content: space-between;
  margin: -.15rem 0 1rem;
  padding-bottom: .75rem;
  border-bottom: 1px solid var(--line);
}
.record-toolbar h3, .record-toolbar p { margin: 0; }
.record-toolbar .eyebrow { margin-bottom: .2rem; }
.record-toolbar-actions, .row-actions, .media-actions {
  display: flex;
  gap: .45rem;
  align-items: center;
  flex-wrap: wrap;
}
.record-toolbar-actions { justify-content: flex-end; }
.compact-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 36px;
  padding: .38rem .58rem;
  border-radius: 10px;
  white-space: nowrap;
  text-decoration: none;
}
.sticky-save {
  position: sticky;
  bottom: .65rem;
  z-index: 18;
  justify-content: flex-end;
  margin: 1rem -.3rem -.3rem;
  padding: .65rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(7 24 39 / 96%);
  box-shadow: 0 -10px 30px rgb(0 0 0 / 28%);
  backdrop-filter: blur(10px);
}
.sticky-save button { min-width: min(100%, 230px); }
.relation-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem;
}
.member-club-assignments { display: grid; gap: .7rem; }
.member-club-assignment {
  display: grid;
  gap: .55rem;
  padding: .7rem;
  border: 1px solid rgb(71 116 141 / 55%);
  border-radius: 12px;
  background: rgb(10 38 58 / 58%);
}
.member-club-assignment-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
}
.member-club-roles { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.member-preferred-aircraft {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .45rem .65rem;
  margin-top: .8rem;
}
.member-preferred-aircraft > strong { grid-column: 1 / -1; }
.dossier-fieldset {
  min-width: 0;
  margin: 0;
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(7 24 39 / 42%);
}
.dossier-fieldset legend { padding: 0 .35rem; }
.linked-records {
  padding: .8rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(7 24 39 / 38%);
}
.record-summary {
  display: grid;
  gap: .5rem;
  margin: .8rem 0 0;
}
.record-summary div {
  display: grid;
  grid-template-columns: minmax(125px, .8fr) minmax(0, 1.2fr);
  gap: .65rem;
  padding-bottom: .45rem;
  border-bottom: 1px solid rgb(71 116 141 / 35%);
}
.record-summary dt { color: var(--muted); }
.record-summary dd { min-width: 0; margin: 0; font-weight: 750; overflow-wrap: anywhere; }
.media-field {
  padding: .75rem;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgb(7 24 39 / 38%);
}
.media-actions { margin-top: .65rem; }
.file-button { position: relative; display: inline-flex; align-items: center; }
.file-button input {
  position: absolute;
  width: 1px;
  height: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}
.attachment-preview {
  display: grid;
  grid-template-columns: 64px minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
  margin-top: .5rem;
  padding: .55rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: #071827;
}
.attachment-preview img {
  width: 64px;
  height: 52px;
  border-radius: 8px;
  object-fit: cover;
}
.attachment-preview strong, .attachment-preview small { display: block; overflow-wrap: anywhere; }
.attachment-preview small { margin-top: .12rem; color: var(--muted); }
.attachment-preview .button { min-height: 36px; padding: .38rem .55rem; text-decoration: none; }
.attachment-icon {
  display: grid;
  place-items: center;
  width: 58px;
  height: 48px;
  border: 1px solid var(--bad);
  border-radius: 8px;
  color: #ffd6d2;
  background: rgb(249 112 102 / 12%);
  font-size: .75rem;
  font-weight: 900;
}
.compact-empty { margin: .25rem 0; padding: .65rem; }

.maintenance-process {
  display: grid;
  grid-template-columns: repeat(6, minmax(105px, 1fr));
  gap: .45rem;
  margin-bottom: 1rem;
  overflow-x: auto;
}
.maintenance-process a, .maintenance-process span {
  display: flex;
  gap: .45rem;
  align-items: center;
  min-height: 48px;
  padding: .5rem .6rem;
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  background: rgb(13 41 64 / 88%);
  text-decoration: none;
  white-space: nowrap;
}
.maintenance-process b {
  display: grid;
  place-items: center;
  width: 25px;
  height: 25px;
  flex: 0 0 25px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
}
.maintenance-process .active {
  border-color: var(--accent);
  background: var(--accent-dark);
}
.maintenance-process .active b { background: var(--accent); color: #06202b; }
.maintenance-selector { margin-bottom: 1rem; padding-block: .8rem; }
.maintenance-selector .field { max-width: 520px; }
.maintenance-metrics { margin-bottom: 1rem; }
.maintenance-component-toolbar {
  display: grid;
  grid-template-columns: minmax(220px, 360px) minmax(240px, 1fr) auto;
  gap: .75rem;
  align-items: end;
  margin: .75rem 0;
}
.maintenance-component-toolbar .form-actions { margin: 0; }
.maintenance-component-table td { vertical-align: top; }
.maintenance-component-table td small { color: var(--muted); }
.document-storage-path {
  display: block;
  max-width: 38rem;
  margin-top: .45rem;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.maintenance-document-identity { margin: .75rem 0 1rem; }
.group-tabs {
  display: flex;
  gap: .4rem;
  margin: .8rem 0;
  padding-bottom: .25rem;
  overflow-x: auto;
}
.group-tabs a {
  flex: 0 0 auto;
  min-height: 38px;
  padding: .48rem .65rem;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  background: var(--surface-2);
  text-decoration: none;
  font-weight: 750;
}
.group-tabs a.active { border-color: var(--accent); background: var(--accent-dark); }
.checklist-toolbar { position: sticky; top: 92px; z-index: 12; padding: .6rem; border: 1px solid var(--line); border-radius: 12px; background: rgb(7 24 39 / 96%); }
.checklist-toolbar strong, .checklist-toolbar small { display: block; }
.checklist-toolbar small { margin-top: .15rem; color: var(--muted); }
.checklist-cards { display: grid; gap: .65rem; }
.checklist-card {
  min-width: 0;
  padding: .7rem;
  border: 1px solid var(--line);
  border-left: 5px solid var(--warn);
  border-radius: 13px;
  background: rgb(7 24 39 / 48%);
}
.checklist-card.ok, .checklist-card.not_applicable { border-left-color: var(--good); }
.checklist-card.defect { border-left-color: var(--bad); }
.checklist-card.deferred { border-left-color: var(--accent); }
.checklist-card > header {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: .55rem;
  align-items: start;
}
.checklist-card > header b {
  display: grid;
  place-items: center;
  width: 28px;
  height: 28px;
  border-radius: 50%;
  background: var(--surface-2);
  color: var(--accent);
}
.checklist-card > header strong, .checklist-card > header small { display: block; }
.checklist-card > header small { margin-top: .18rem; color: var(--muted); font-size: .75rem; overflow-wrap: anywhere; }
.checklist-card .form-grid { grid-template-columns: minmax(175px, .42fr) minmax(0, 1.58fr); }
.field output {
  display: flex;
  align-items: center;
  min-height: 48px;
  padding: .72rem .8rem;
  border: 1px solid var(--line);
  border-radius: 13px;
  background: rgb(7 24 39 / 55%);
  color: var(--accent);
  font-weight: 850;
}

.document-attachments { min-width: 13rem; }
.document-attachments > summary {
  cursor: pointer;
  color: var(--accent);
  font-weight: 850;
}
.document-attachments > div {
  display: grid;
  gap: .4rem;
  margin-top: .5rem;
}
.document-attachments .button {
  min-height: 36px;
  justify-content: flex-start;
  overflow-wrap: anywhere;
  text-align: left;
}
.attachment-link-loading { cursor: progress; opacity: .72; }
.attachment-link-error {
  display: block;
  max-width: 18rem;
  color: var(--bad);
  font-size: .78rem;
  overflow-wrap: anywhere;
}

@media (max-width: 1050px) {
  .grid.metrics { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .form-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.three { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .safety-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .planning-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .planning-modes { grid-column: 1 / -1; }
  .logbook-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .legacy-aircraft-grid { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .syllabus-toolbar { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .syllabus-signoff-form { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .rt-status-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}

@media (max-width: 900px) {
  .app-header { position: static; align-items: flex-start; flex-direction: column; }
  .header-actions { width: 100%; justify-content: space-between; }
  .identity { width: 100%; min-width: 0; }
  .identity select { flex: 1; min-width: 0; }
  .shell { display: block; }
  .sidebar { position: static; height: auto; padding: .75rem; border-right: 0; border-bottom: 1px solid var(--line); }
  .sidebar .homebase-card, .sidebar .nav-heading, .sidebar .nav, .sidebar .active-scope-card { display: none; }
  .sidebar-kpis { margin: 0; }
  .sidebar.route-logbook-new { display: none; }
  .app-header.route-logbook-new .brand p, .route-logbook-new .section-context p { display: none; }
  main { padding: .85rem .85rem calc(6.7rem + env(safe-area-inset-bottom)); }
  main.route-logbook-new { padding-top: .55rem; padding-bottom: calc(11.5rem + env(safe-area-inset-bottom)); }
  .section-navigation { display: block; }
  main.route-logbook-new .section-navigation { margin-bottom: .6rem; padding-bottom: .45rem; }
  .section-navigation .tabs {
    display: none;
  }
  .mobile-section-select {
    display: grid;
    gap: .25rem;
    margin-top: .55rem;
    color: var(--muted);
    font-size: .74rem;
    font-weight: 800;
  }
  .mobile-section-select select { width: 100%; min-height: 44px; }
  .page-head { display: block; }
  .page-actions { justify-content: flex-start; margin-top: .75rem; }
  .form-grid, .grid.two, .grid.three, .signature-grid { grid-template-columns: 1fr; }
  .safety-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .safety-grid .safety-card:last-child { grid-column: 1 / -1; }
  .planning-toolbar, .logbook-filters { grid-template-columns: 1fr; }
  .legacy-aircraft-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .logbook-table th:last-child,
  .logbook-table td:last-child {
    position: sticky;
    right: 0;
    z-index: 4;
    min-width: 190px;
    border-left: 1px solid var(--line);
    background: #0c2b43;
    box-shadow: -12px 0 22px rgb(0 0 0 / 24%);
  }
  .logbook-table th:last-child { z-index: 5; background: var(--surface-2); }
  .logbook-table td:last-child .row-actions {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    justify-content: flex-start;
  }
  .logbook-table td:last-child .row-actions > * { width: 100%; }
  .training-phase, .syllabus-toolbar, .syllabus-facts, .syllabus-signoff-form { grid-template-columns: 1fr; }
  .syllabus-signoff-form .wide { grid-column: auto; }
  .syllabus-card > header { display: grid; }
  .syllabus-status { justify-content: flex-start; }
  .planning-modes { grid-column: auto; }
  .field.wide { grid-column: auto; }
  .operation-panel > h3 { margin-bottom: .35rem; }
  .operation-panel > h3 + .subtle { display: none; }
  .operation-workspace { margin-right: -.15rem; margin-left: -.15rem; }
  .operation-tablist { display: none; }
  .operation-tab-mobile {
    display: grid;
    gap: .25rem;
    padding: .65rem;
    border-bottom: 1px solid var(--line);
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
    background: rgb(8 31 50 / 96%);
  }
  .operation-tab-mobile select { width: 100%; min-height: 46px; }
  .operation-tab-panel { padding: .65rem; }
  .route-weather-briefing > header, .operation-route-image > header { display: grid; }
  .route-weather-briefing > header button, .operation-route-image > header button { width: 100%; }
  .route-metar-grid, .operation-radio-grid, .landing-check-grid { grid-template-columns: 1fr; }
  .operation-route-map-stage { height: 250px; }
  .operation-section .compact-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .55rem; }
  .operation-section .field label { font-size: .8rem; line-height: 1.2; }
  .operation-section .field input { min-height: 42px; padding: .55rem .6rem; }
  .operation-actions {
    position: sticky;
    bottom: calc(4.65rem + env(safe-area-inset-bottom));
    z-index: 55;
    display: grid;
    grid-template-columns: minmax(0, .75fr) minmax(0, 1.25fr);
    margin: .75rem -.45rem 0;
    padding: .55rem;
    border: 1px solid var(--line);
    border-radius: 13px;
    background: rgb(7 24 39 / 96%);
    box-shadow: 0 -10px 26px rgb(0 0 0 / 32%);
  }
  .operation-actions button { width: 100%; min-height: 44px; padding: .55rem .6rem; }
  .operation-check-row { grid-template-columns: 1fr; }
  .operation-check-row button, .operation-check-row .button { justify-self: start; }
  .member-club-roles, .member-preferred-aircraft { grid-template-columns: 1fr; }
  .route-calculation { grid-template-columns: 1fr; }
  .route-calculation > .help { grid-column: auto; }
  .inline-status { display: grid; gap: .15rem; }
  .rt-language-tabs span { width: 100%; margin-left: 0; }
  .mobile-nav {
    position: fixed;
    right: 0;
    bottom: 0;
    left: 0;
    z-index: 60;
    display: grid;
    grid-template-columns: repeat(var(--mobile-nav-items, 5), minmax(0, 1fr));
    gap: .25rem;
    padding: .45rem .55rem calc(.45rem + env(safe-area-inset-bottom));
    border-top: 1px solid var(--line);
    background: rgb(8 27 45 / 97%);
    box-shadow: 0 -12px 30px rgb(0 0 0 / 25%);
  }
  .mobile-nav a, .mobile-nav button {
    display: grid;
    place-items: center;
    min-width: 0;
    min-height: 54px;
    padding: .35rem .2rem;
    border: 1px solid transparent;
    border-radius: 12px;
    color: var(--muted);
    background: transparent;
    text-decoration: none;
  }
  .mobile-nav a.active, .mobile-nav button.active { border-color: var(--accent); background: var(--surface-2); color: var(--text); }
  .mobile-nav a span, .mobile-nav button span { font-weight: 900; }
  .mobile-nav a small, .mobile-nav button small {
    display: block;
    max-width: 100%;
    margin-top: .2rem;
    overflow: hidden;
    font-size: .66rem;
    font-weight: 800;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
}

@media (max-width: 620px) {
  .app-header { gap: .55rem; padding: .7rem .8rem; }
  .brand { gap: .55rem; }
  .brand-logo { width: 42px; height: 42px; flex-basis: 42px; }
  .brand h1 { font-size: 1.35rem; }
  .brand p { display: none; }
  .version-line { font-size: .7rem; }
  .header-actions { align-items: center; flex-direction: row; gap: .5rem; }
  .connection-pill { display: none; }
  .identity { display: grid; grid-template-columns: minmax(0, 1fr) auto; }
  .identity button { min-height: 40px; padding: .45rem .6rem; }
  .sidebar { display: none; }
  main { padding-top: .6rem; }
  .section-navigation { margin-bottom: .55rem; padding-bottom: .4rem; }
  .section-context p { display: none; }
  main.route-logbook-planning > .page-head { display: none; }
  main.route-logbook-planning .planning-head .subtle { display: none; }
  .training-choice-head { display: grid; gap: .25rem; }
  .training-filter-row { grid-template-columns: minmax(0, 1fr) auto; }
  .training-choice {
    grid-template-columns: auto minmax(0, 1fr);
    gap: .55rem;
    padding: .6rem;
  }
  .training-choice > .badge { grid-column: 2; justify-self: start; }
  .training-choice small {
    display: -webkit-box;
    overflow: hidden;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
  }
  .picker-options {
    position: fixed;
    right: .75rem;
    bottom: calc(5rem + env(safe-area-inset-bottom));
    left: .75rem;
    max-height: min(55dvh, 420px);
    margin: 0;
    z-index: 120;
  }
  .planning-calendar { display: none; }
  .planning-mobile-list {
    display: grid;
    gap: .7rem;
  }
  .planning-mobile-list > section {
    display: grid;
    gap: .45rem;
    padding: .65rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #071827;
  }
  .planning-mobile-list > section > header {
    display: flex;
    gap: .5rem;
    justify-content: space-between;
    align-items: center;
    text-transform: capitalize;
  }
  .planning-mobile-list .booking-chip small {
    overflow: visible;
    white-space: normal;
  }
  .planning-mobile-list .booking-flight-action { min-height: 40px; align-items: center; }
  .geographic-map-stage { height: 340px; }
  .flight-route-summary { display: grid; }
  .weather-summary { grid-template-columns: 1fr 1fr; }
  .openlayers-map .ol-control button { width: 44px; height: 44px; }
  .rt-status-grid { grid-template-columns: 1fr; }
  .rt-phrase-card > header, .rt-spoken-line, .rt-reply { grid-template-columns: 1fr; }
  .rt-phrase-card > header { display: grid; }
  .rt-spoken-line button, .rt-reply button { width: 100%; }
  .maintenance-component-toolbar { grid-template-columns: 1fr; }
  .history-status-strip span { width: 100%; border-radius: 10px; }
  .history-pagination { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; text-align: center; }
  .legacy-aircraft-toolbar { grid-template-columns: 1fr; }
  .legacy-aircraft-grid { grid-template-columns: 1fr; }
  .maintenance-component-table,
  .maintenance-component-table tbody {
    display: block;
    width: 100%;
  }
  .maintenance-component-table thead { display: none; }
  .maintenance-component-table tr {
    display: grid;
    gap: .15rem;
    margin: .6rem;
    padding: .6rem;
    border: 1px solid var(--line);
    border-radius: 12px;
    background: #0a263d;
  }
  .maintenance-component-table td {
    display: grid;
    grid-template-columns: 7.2rem minmax(0, 1fr);
    gap: .5rem;
    padding: .35rem 0;
    border: 0;
    overflow-wrap: anywhere;
  }
  .maintenance-component-table td::before {
    color: var(--muted);
    font-size: .78rem;
    font-weight: 850;
  }
  .maintenance-component-table td:nth-child(1)::before { content: "Categorie"; }
  .maintenance-component-table td:nth-child(2)::before { content: "Onderdeel"; }
  .maintenance-component-table td:nth-child(3)::before { content: "P/N · type"; }
  .maintenance-component-table td:nth-child(4)::before { content: "Serienummer"; }
  .maintenance-component-table td:nth-child(5)::before { content: "Inspectiecyclus"; }
  .maintenance-component-table td:nth-child(6)::before { content: "Laatste"; }
  .maintenance-component-table td:nth-child(7)::before { content: "Volgende"; }
  .maintenance-component-table td:nth-child(8)::before { content: "TBO"; }
  .maintenance-component-table td:nth-child(9)::before { content: "Installatie / TTIS"; }
  .maintenance-component-table td:nth-child(10)::before { content: "Status"; }
  .maintenance-component-table td:nth-child(11)::before { content: "Actie"; }
}

@media (max-width: 480px) {
  .grid.metrics { grid-template-columns: 1fr 1fr; }
  .metric { padding: .75rem; }
  .panel { padding: .85rem; }
  .profile-summary dl div { grid-template-columns: 1fr; gap: .15rem; }
}

@media print {
  .app-header, .sidebar, .mobile-nav, .page-actions, .tabs, button { display: none !important; }
  .shell { display: block; }
  main { padding: 0; }
  body, .panel, .metric { background: white; color: black; box-shadow: none; }
  .panel, .metric, .table-wrap { border-color: #777; }
}
