:root {
  color-scheme: light dark;
  --bg: #f4efe6;
  --panel: rgba(255, 251, 244, 0.9);
  --panel-strong: rgba(255, 248, 237, 0.98);
  --panel-muted: rgba(230, 222, 207, 0.55);
  --text: #19252d;
  --muted: #61717b;
  --line: rgba(23, 41, 50, 0.12);
  --accent: #2f7d84;
  --accent-strong: #255f65;
  --accent-soft: rgba(47, 125, 132, 0.12);
  --accent-warm: #d9a441;
  --success: #2d8a57;
  --success-soft: rgba(45, 138, 87, 0.16);
  --danger: #a95542;
  --calendar-divider: rgba(97, 113, 123, 0.32);
  --shadow: 0 24px 50px rgba(18, 34, 41, 0.12);
  --backdrop:
    radial-gradient(circle at top left, rgba(217, 164, 65, 0.22), transparent 30%),
    radial-gradient(circle at top right, rgba(47, 125, 132, 0.22), transparent 26%),
    linear-gradient(180deg, #efe6d9 0%, #f7f4ef 45%, #efe5d8 100%);
  --font-sans: "Avenir Next", "Segoe UI", "Trebuchet MS", sans-serif;
}

:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #10161b;
  --panel: rgba(22, 31, 38, 0.92);
  --panel-strong: rgba(27, 38, 46, 0.98);
  --panel-muted: rgba(255, 255, 255, 0.03);
  --text: #eef4f5;
  --muted: #9fb0b7;
  --line: rgba(255, 255, 255, 0.08);
  --accent: #4fa0a7;
  --accent-strong: #66bbc2;
  --accent-soft: rgba(79, 160, 167, 0.14);
  --accent-warm: #d9a441;
  --success: #5fc287;
  --success-soft: rgba(95, 194, 135, 0.18);
  --danger: #cb8b77;
  --calendar-divider: rgba(159, 176, 183, 0.34);
  --shadow: 0 24px 50px rgba(0, 0, 0, 0.35);
  --backdrop:
    radial-gradient(circle at top left, rgba(79, 160, 167, 0.16), transparent 30%),
    radial-gradient(circle at top right, rgba(217, 164, 65, 0.16), transparent 28%),
    linear-gradient(180deg, #141c21 0%, #0f1519 50%, #162126 100%);
}

@media (max-width: 980px) {
  :root {
    --backdrop: linear-gradient(180deg, #efe6d9 0%, #f7f4ef 48%, #efe5d8 100%);
  }

  :root[data-theme="dark"] {
    --backdrop: linear-gradient(180deg, #141c21 0%, #0f1519 52%, #162126 100%);
  }
}

* {
  box-sizing: border-box;
}

html,
body {
  margin: 0;
  min-height: 100%;
}

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

body {
  position: relative;
  isolation: isolate;
  font-family: var(--font-sans);
  color: var(--text);
  background: var(--bg);
}

body::before {
  content: "";
  position: fixed;
  inset: 0;
  z-index: -1;
  pointer-events: none;
  background: var(--backdrop);
}

a {
  color: inherit;
  text-decoration: none;
}

button,
input,
textarea {
  font: inherit;
}

button,
.button-primary,
.button-secondary,
.button-danger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

.page-login,
.page-dashboard {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 24px;
  padding: max(24px, env(safe-area-inset-top))
    max(24px, env(safe-area-inset-right))
    max(24px, env(safe-area-inset-bottom))
    max(24px, env(safe-area-inset-left));
}

.login-shell,
.dashboard-shell {
  width: min(1180px, 100%);
  margin: 0 auto;
}

.login-shell {
  display: grid;
  grid-template-columns: minmax(0, 420px) minmax(0, 1fr);
  gap: 24px;
  align-items: stretch;
  min-height: calc(100vh - 48px);
}

.auth-shell {
  width: min(460px, 100%);
  display: flex;
  align-items: center;
  justify-content: center;
}

.login-panel,
.hero-panel,
.card {
  min-width: 0;
  border: 1px solid var(--line);
  border-radius: 28px;
  background: var(--panel);
  box-shadow: var(--shadow);
  backdrop-filter: blur(16px);
}

.login-panel,
.hero-panel {
  padding: 32px;
}

.auth-panel {
  width: 100%;
  padding: clamp(24px, 5vw, 36px);
}

.auth-panel h1 {
  font-size: 2.7rem;
}

.auth-panel .lede {
  margin-bottom: 0;
}

.auth-panel .microcopy:last-child {
  margin-bottom: 0;
}

.auth-panel .microcopy {
  text-align: right;
}

.auth-panel .microcopy a {
  color: var(--accent-strong);
  font-weight: 700;
  text-decoration: underline;
  text-decoration-thickness: 1px;
  text-underline-offset: 4px;
}

.auth-panel .microcopy a:hover {
  color: var(--accent);
}

.auth-resend-form {
  display: flex;
  justify-content: flex-end;
  margin-top: 14px;
}

.brand-mark,
.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.18em;
  font-size: 0.75rem;
  font-weight: 700;
  color: var(--accent);
}

h1,
h2 {
  margin: 10px 0 12px;
  line-height: 1.05;
}

h1 {
  font-size: clamp(2rem, 5vw, 3.4rem);
}

h2 {
  font-size: clamp(1.55rem, 3vw, 2.2rem);
}

.lede,
.microcopy,
.hero-copy p,
.hero-meta p,
.stat-detail,
.placeholder-card p {
  color: var(--muted);
  line-height: 1.6;
}

.login-form {
  display: grid;
  gap: 16px;
  margin-top: 24px;
}

.login-form label {
  display: grid;
  gap: 8px;
}

.panel-actions {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.form-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
}

.disconnect-form {
  margin-top: 12px;
}

.settings-subsection {
  margin-top: 26px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.calendar-feed-list {
  display: grid;
  gap: 14px;
  margin-top: 14px;
}

.calendar-feed-row {
  display: grid;
  grid-template-columns: minmax(160px, 0.8fr) minmax(0, 1.4fr);
  gap: 14px;
  align-items: start;
  padding: 14px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
}

.calendar-feed-row .admin-help-copy {
  margin: 4px 0 0;
}

.calendar-feed-url-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: start;
}

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

.calendar-feed-subscribe {
  min-height: 24px;
  padding: 4px 10px;
  font-size: 0.76rem;
  line-height: 1;
}

.calendar-feed-url {
  display: block;
  min-width: 0;
  overflow-wrap: anywhere;
  padding: 8px 10px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: rgba(255, 255, 255, 0.04);
  color: var(--text);
  font-size: 0.78rem;
  line-height: 1.45;
}

.login-form .inline-checkbox {
  grid-template-columns: auto 1fr;
  align-items: start;
  gap: 12px;
}

.inline-checkbox input {
  margin-top: 4px;
}

.login-form span {
  font-size: 0.92rem;
  font-weight: 600;
}

.login-form input,
.assistant-box textarea {
  width: 100%;
  padding: 14px 16px;
  border-radius: 16px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
}

.button-primary,
.button-secondary,
.button-danger,
.theme-trigger,
.theme-option {
  border: 0;
  border-radius: 999px;
  padding: 12px 18px;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, color 120ms ease;
}

.button-primary {
  background: var(--accent);
  color: #f7fbfb;
  font-weight: 700;
}

.button-secondary {
  background: var(--panel-muted);
  color: var(--text);
}

.button-danger {
  background: var(--danger);
  color: #fff8f5;
  font-weight: 700;
}

.button-primary:hover,
.button-secondary:hover,
.button-danger:hover,
.theme-trigger:hover,
.theme-option:hover,
.segment:hover,
.tab-link:hover {
  transform: translateY(-1px);
}

.hero-panel {
  display: grid;
  gap: 20px;
  align-content: center;
  background:
    linear-gradient(180deg, rgba(255, 255, 255, 0.08), transparent 32%),
    var(--panel);
}

.aircraft-illustration {
  width: 100%;
  max-height: 360px;
  object-fit: contain;
  object-position: center;
  display: block;
  margin: 0 auto;
}

.topbar {
  display: flex;
  justify-content: space-between;
  gap: 18px;
  align-items: flex-end;
  margin-bottom: 16px;
}

.topbar-copy {
  max-width: 760px;
}

.topbar-actions {
  display: flex;
  gap: 12px;
  align-items: center;
  flex-wrap: wrap;
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-muted);
}

.topbar-menu,
.theme-menu,
.segmented,
.tab-strip {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}

.segmented {
  padding: 6px;
  border-radius: 999px;
  background: var(--panel-muted);
}

.theme-menu {
  position: relative;
}

.topbar-menu {
  position: relative;
}

.menu-trigger,
.theme-trigger {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  min-width: 0;
  padding: 12px 14px;
  background: var(--panel-muted);
  color: var(--text);
  font-weight: 600;
}

.menu-trigger {
  border: 0;
  border-radius: 999px;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, color 120ms ease;
}

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

.account-trigger {
  width: 44px;
  height: 44px;
  padding: 0;
}

.user-icon {
  width: 18px;
  height: 18px;
  display: inline-flex;
  color: var(--text);
}

.user-icon svg {
  width: 18px;
  height: 18px;
  fill: currentColor;
}

.theme-trigger-icon,
.theme-trigger-caret {
  color: var(--muted);
}

.menu-panel,
.theme-dropdown {
  position: absolute;
  top: calc(100% + 10px);
  right: 0;
  z-index: 10;
  min-width: 180px;
  padding: 8px;
  display: grid;
  gap: 6px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.menu-panel[hidden],
.theme-dropdown[hidden] {
  display: none;
}

.account-dropdown {
  min-width: 280px;
}

.menu-heading {
  margin: 0;
  font-weight: 700;
}

.menu-note {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  line-height: 1.5;
}

.menu-note-accent {
  color: var(--accent);
  font-weight: 700;
}

.menu-service-section {
  display: grid;
  gap: 8px;
}

.menu-service-summary {
  display: grid;
  gap: 5px;
  padding: 6px 6px 4px;
}

.menu-service-heading-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}

.menu-service-heading-row .menu-heading {
  min-width: 0;
}

.menu-service-heading-row .status-pill {
  flex: 0 0 auto;
  font-size: 0.76rem;
  padding: 5px 10px;
}

.menu-link-emphasis {
  font-weight: 700;
  color: var(--accent-strong);
}

.menu-divider {
  height: 1px;
  background: var(--line);
  margin: 2px 0;
}

.menu-panel form {
  margin: 0;
}

.menu-link,
.menu-button {
  width: 100%;
  display: flex;
  justify-content: flex-start;
  align-items: center;
  padding: 12px 14px;
  border: 0;
  border-radius: 14px;
  background: transparent;
  color: var(--text);
  font: inherit;
  text-align: left;
  cursor: pointer;
  text-decoration: none;
}

.menu-link:hover,
.menu-button:hover {
  background: var(--panel-muted);
}

.theme-option {
  width: 100%;
  justify-content: space-between;
  background: transparent;
  color: var(--muted);
  border-radius: 14px;
}

.segment {
  background: transparent;
  color: var(--muted);
  padding: 10px 14px;
}

.theme-option.active,
.segment.active {
  background: var(--panel-strong);
  color: var(--text);
}

.theme-option-check {
  opacity: 0;
}

.theme-option.active .theme-option-check {
  opacity: 1;
}

.debug-dropdown {
  min-width: 230px;
}

.debug-menu-form {
  display: grid;
  gap: 10px;
}

.debug-menu-toggle {
  display: flex;
  align-items: center;
  gap: 10px;
  color: var(--text);
  font-size: 0.92rem;
  font-weight: 700;
}

.debug-menu-toggle input {
  margin: 0;
}

.hero-grid,
.panel-grid {
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 20px;
}

.panel-grid {
  align-items: start;
}

.overview-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.65fr) minmax(280px, 0.95fr);
  gap: 20px;
  align-items: start;
}

.overview-sidebar,
.overview-main {
  display: grid;
  gap: 20px;
  align-content: start;
  min-width: 0;
}

.overview-bottom-grid {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: start;
}

.analytics-layout {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(280px, 1fr);
  gap: 20px;
  align-items: start;
}

.analytics-dashboard {
  grid-template-columns: 1fr;
  align-items: start;
}

.analytics-section-nav {
  position: sticky;
  top: 12px;
  z-index: 5;
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
  align-items: center;
  padding: 8px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: color-mix(in srgb, var(--panel) 90%, transparent);
  backdrop-filter: blur(14px);
}

.analytics-section-nav a {
  display: inline-flex;
  min-height: 36px;
  align-items: center;
  justify-content: center;
  padding: 0 13px;
  border: 1px solid transparent;
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 650;
  text-decoration: none;
}

.analytics-section-nav a:hover,
.analytics-section-nav a:focus-visible {
  border-color: rgba(79, 160, 167, 0.44);
  background: rgba(79, 160, 167, 0.12);
  color: var(--text);
}

.analytics-section-nav a[aria-current="page"] {
  border-color: rgba(79, 160, 167, 0.5);
  background: var(--accent);
  color: white;
  box-shadow: 0 8px 18px rgba(47, 125, 132, 0.18);
}

.analytics-section {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 20px;
  align-items: start;
  scroll-margin-top: 86px;
}

.analytics-section[hidden] {
  display: none;
}

.analytics-section-heading {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 6px;
  align-items: end;
  padding-top: 4px;
}

.analytics-section-heading h2 {
  margin: 4px 0 0;
  font-size: clamp(1.25rem, 2vw, 1.65rem);
}

.analytics-members-period-control {
  display: grid;
  gap: 8px;
  justify-items: end;
  min-width: 0;
}

.analytics-members-period-control > span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.analytics-summary-card,
.analytics-insights-card,
.analytics-recency-card,
.analytics-airfields-card,
.analytics-longest-flights-card,
.analytics-heatmap-card,
.analytics-maintenance-card {
  grid-column: 1 / -1;
}

.analytics-dashboard .section-card {
  padding: 22px 24px;
}

.analytics-dashboard .section-heading {
  align-items: flex-start;
  margin-bottom: 18px;
}

.analytics-dashboard h2 {
  margin: 6px 0 8px;
  font-size: clamp(1.35rem, 2vw, 1.85rem);
  font-weight: 650;
  line-height: 1.12;
  letter-spacing: 0;
}

.analytics-period-segmented {
  display: grid;
  grid-template-columns: repeat(4, minmax(84px, 1fr));
  align-self: flex-start;
  min-width: min(100%, 360px);
}

.analytics-period-segmented .segment {
  justify-content: center;
  white-space: nowrap;
}

.recent-flights-layout {
  display: grid;
  grid-template-columns: 1fr;
}

.admin-shell .topbar-copy {
  max-width: 680px;
}

.admin-tab-strip {
  margin-bottom: 20px;
}

.admin-back-link {
  text-decoration: none;
}

.admin-copy {
  margin: 0 0 18px;
  color: var(--muted);
}

.admin-log-stats {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
  margin: 0 0 18px;
}

.admin-log-stat-card {
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-muted);
}

.admin-log-stat-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-log-stat-value {
  margin-top: 6px;
  font-size: 1.15rem;
  font-weight: 700;
}

.admin-launch-button {
  min-height: 44px;
}

.admin-export-button {
  text-decoration: none;
}

.admin-debug-copy {
  display: flex;
  align-items: center;
  gap: 12px;
  flex-wrap: wrap;
}

.admin-debug-file-log-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 10px 12px;
  align-items: center;
  margin: 16px 0 0;
}

.admin-debug-file-log-toggle {
  display: grid;
  gap: 4px;
  min-width: 0;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-muted);
  color: var(--text);
}

.admin-debug-file-log-toggle span {
  font-weight: 700;
}

.admin-debug-file-log-toggle small {
  color: var(--muted);
}

.admin-debug-file-log-actions {
  display: flex;
  gap: 10px;
  align-self: stretch;
  flex-wrap: wrap;
}

.admin-debug-file-log-button {
  align-self: stretch;
}

.admin-debug-file-log-actions .admin-debug-file-log-button {
  flex: 1 1 130px;
}

.admin-debug-file-log-detail {
  display: flex;
  grid-column: 1 / -1;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-debug-file-log-detail code {
  color: var(--text);
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-debug-error {
  color: var(--danger);
}

.admin-status-grid {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.admin-status-row {
  display: grid;
  grid-template-columns: minmax(140px, 0.4fr) minmax(0, 1fr);
  gap: 14px;
  align-items: center;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-muted);
}

.admin-status-row span:first-child {
  color: var(--muted);
  font-size: 0.84rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-status-row code {
  white-space: normal;
  overflow-wrap: anywhere;
}

.admin-backup-status-grid {
  margin-bottom: 18px;
}

.admin-backup-table code {
  overflow-wrap: anywhere;
}

.admin-help-copy {
  margin: 16px 0 0;
  color: var(--muted);
}

.admin-settings-block {
  display: grid;
  gap: 10px;
  margin-top: 18px;
}

.admin-settings-block .admin-help-copy {
  margin-top: 0;
}

.whatsapp-pairing-block {
  display: grid;
  gap: 14px;
  margin-top: 18px;
}

.whatsapp-notification-block {
  display: grid;
  gap: 14px;
  margin-top: 28px;
  padding-top: 22px;
  border-top: 1px solid var(--line);
}

.whatsapp-groups-list {
  display: grid;
  gap: 10px;
}

.whatsapp-groups-list[hidden] {
  display: none;
}

.whatsapp-group-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
}

.whatsapp-group-row.is-selected {
  border-color: rgba(86, 190, 204, 0.75);
  background: rgba(86, 190, 204, 0.12);
}

.whatsapp-group-label {
  display: grid;
  min-width: 0;
  gap: 4px;
}

.whatsapp-group-label strong,
.whatsapp-group-label span {
  min-width: 0;
  overflow-wrap: anywhere;
}

.whatsapp-group-label span {
  color: var(--muted);
  font-size: 0.9rem;
}

.whatsapp-pairing-code-block {
  display: grid;
  gap: 12px;
  margin: 18px 0;
}

.form-label {
  display: block;
  color: var(--text-muted);
  font-weight: 800;
  font-size: 0.78rem;
  letter-spacing: 0;
  text-transform: uppercase;
}

.inline-form-row {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  align-items: center;
  margin-top: 8px;
}

.compact-input {
  max-width: 260px;
}

.whatsapp-pairing-code-panel {
  display: grid;
  gap: 8px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
}

.whatsapp-pairing-code-panel[hidden],
.whatsapp-qr-panel[hidden],
.admin-empty-state[hidden] {
  display: none;
}

.whatsapp-pairing-code-panel strong {
  font-family: var(--font-mono);
  font-size: 1.6rem;
  letter-spacing: 0;
}

.whatsapp-qr-panel {
  display: grid;
  justify-items: start;
  gap: 10px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-muted);
}

.whatsapp-qr-panel img {
  display: block;
  width: min(320px, 100%);
  height: auto;
  border-radius: 8px;
  background: #fff;
}

.admin-map-provider-options {
  display: grid;
  gap: 10px;
}

.admin-map-provider-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-muted);
}

.admin-map-provider-option input {
  width: 18px;
  height: 18px;
  margin-top: 3px;
}

.admin-map-provider-option span {
  display: grid;
  gap: 4px;
  min-width: 0;
}

.admin-map-provider-option span span {
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-ai-form {
  display: grid;
  gap: 18px;
}

.admin-ai-field {
  display: grid;
  gap: 8px;
}

.admin-ai-field span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 650;
}

.admin-ai-field input,
.admin-ai-field select,
.admin-ai-field textarea {
  width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
  color: var(--text);
}

.admin-ai-model-grid {
  display: grid;
  grid-template-columns: minmax(220px, 1.4fr) repeat(2, minmax(160px, 1fr));
  gap: 14px;
}

.admin-ai-search-settings {
  display: grid;
  gap: 12px;
}

.admin-ai-field textarea {
  min-height: 280px;
  resize: vertical;
  line-height: 1.5;
}

.admin-ai-context-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 10px;
}

.admin-ai-document-picker {
  display: grid;
  gap: 12px;
}

.admin-ai-document-grid {
  display: grid;
  gap: 10px;
  max-height: 340px;
  overflow: auto;
  padding-right: 4px;
}

.admin-ai-document-option {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-muted);
  color: var(--text);
}

.admin-ai-document-option input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
}

.admin-ai-document-option:has(input:disabled) {
  opacity: 0.7;
}

.admin-ai-document-option span {
  min-width: 0;
  display: grid;
  gap: 4px;
}

.admin-ai-document-option code,
.admin-ai-document-meta {
  color: var(--muted);
  overflow-wrap: anywhere;
}

.admin-ai-document-warning {
  color: var(--danger);
  font-size: 0.9rem;
  overflow-wrap: anywhere;
}

.admin-ai-checkbox {
  display: flex;
  gap: 10px;
  align-items: flex-start;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-muted);
  color: var(--text);
}

.admin-ai-checkbox input {
  width: 18px;
  height: 18px;
  margin-top: 2px;
  flex: 0 0 auto;
}

.admin-ai-context-previews {
  display: grid;
  gap: 12px;
  margin-top: 24px;
}

.admin-ai-context-preview-heading {
  display: grid;
  gap: 6px;
}

.admin-ai-context-preview-heading h3,
.admin-ai-context-preview-heading p {
  margin: 0;
}

.admin-ai-context-preview-heading p {
  color: var(--muted);
  line-height: 1.5;
}

.admin-ai-context-preview {
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-muted);
  overflow: hidden;
}

.admin-ai-context-preview summary {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  padding: 14px 16px;
  cursor: pointer;
  font-weight: 750;
}

.admin-ai-context-preview summary span:last-child {
  color: var(--muted);
  font-size: 0.82rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.admin-ai-context-preview pre {
  margin: 0;
  padding: 0 16px 16px;
  color: var(--muted);
  white-space: pre-wrap;
  overflow-wrap: anywhere;
  line-height: 1.45;
}

.admin-debug-console {
  display: grid;
  gap: 12px;
}

.admin-debug-session-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.admin-debug-session {
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-debug-stream {
  min-height: 360px;
  max-height: 60vh;
  overflow: auto;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: color-mix(in srgb, var(--panel-strong) 86%, black 14%);
  font-family: "SFMono-Regular", "Menlo", "Monaco", monospace;
  font-size: 0.84rem;
  line-height: 1.5;
}

.debug-console-line {
  white-space: pre-wrap;
  word-break: break-word;
}

.debug-console-line + .debug-console-line {
  margin-top: 6px;
}

.debug-console-empty {
  color: var(--muted);
}

.admin-log-filters {
  display: grid;
  gap: 14px;
  margin: 0 0 18px;
}

.admin-filter-group {
  display: grid;
  gap: 8px;
}

.admin-filter-label {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-filter-links {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.admin-filter-link {
  display: inline-flex;
  align-items: center;
  min-height: 36px;
  padding: 0 12px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  text-decoration: none;
  background: var(--panel-muted);
}

.admin-filter-link.active {
  color: var(--text);
  border-color: var(--accent);
  background: color-mix(in srgb, var(--accent) 18%, transparent);
}

.admin-pagination {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 12px;
  margin-top: 16px;
}

.admin-pagination-label {
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-pagination-link {
  color: var(--text);
  text-decoration: none;
}

.admin-pagination-link.disabled {
  color: var(--muted);
  pointer-events: none;
}

.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: grid;
  place-items: center;
  padding: 24px;
  background: rgba(5, 10, 16, 0.64);
  backdrop-filter: blur(10px);
}

.modal-backdrop[hidden] {
  display: none;
}

.modal-panel {
  width: min(100%, 720px);
  border: 1px solid var(--line);
  border-radius: 24px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.modal-backdrop.is-booking-submitting {
  cursor: progress;
}

.modal-backdrop.is-booking-submitting .modal-panel {
  pointer-events: none;
}

.booking-submit-progress {
  position: absolute;
  inset: 0;
  z-index: 2;
  display: grid;
  place-content: center;
  gap: 12px;
  padding: 24px;
  color: var(--text);
  text-align: center;
  background: color-mix(in srgb, var(--panel-strong) 88%, transparent);
  backdrop-filter: blur(4px);
}

.booking-submit-progress[hidden] {
  display: none;
}

.booking-submit-spinner {
  width: 30px;
  height: 30px;
  margin: 0 auto;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: booking-submit-spin 900ms linear infinite;
}

.booking-submit-progress-text {
  font-weight: 700;
}

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

.modal-panel-form {
  padding: 24px;
}

.modal-heading {
  margin-bottom: 18px;
}

.modal-summary {
  margin: 4px 0 0;
  color: var(--muted);
}

.booking-modal-panel {
  width: min(100%, 620px);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.booking-action-form {
  --booking-control-height: 40px;
  --booking-label-gap: 8px;
  --booking-label-height: 19px;
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  align-items: start;
  gap: 14px 12px;
}

.booking-date-picker {
  grid-column: 1 / -1;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-muted);
}

.booking-date-picker-header {
  display: grid;
  grid-template-columns: 40px 1fr 40px;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.booking-date-picker-title {
  text-align: center;
  font-size: 0.88rem;
  font-weight: 800;
  color: var(--muted);
  text-transform: uppercase;
}

.booking-date-picker-months {
  position: relative;
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 28px;
}

.booking-date-picker-months::before {
  position: absolute;
  top: 4px;
  bottom: 2px;
  left: 50%;
  width: 1px;
  background: linear-gradient(
    180deg,
    transparent,
    var(--calendar-divider) 12%,
    var(--calendar-divider) 88%,
    transparent
  );
  content: "";
  pointer-events: none;
  transform: translateX(-0.5px);
}

.booking-date-picker-month {
  min-width: 0;
}

.booking-date-picker-month-title {
  margin-bottom: 8px;
  font-size: 0.82rem;
  font-weight: 800;
  color: var(--text);
}

.booking-date-picker-weekdays,
.booking-date-picker-grid {
  display: grid;
  grid-template-columns: repeat(7, minmax(0, 1fr));
  gap: 4px;
}

.booking-date-picker-weekdays {
  margin-bottom: 4px;
  color: var(--muted);
  font-size: 0.62rem;
  font-weight: 800;
  text-align: center;
}

.booking-date-picker-day {
  position: relative;
  min-width: 0;
  aspect-ratio: 1;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 8px;
  background: transparent;
  color: var(--text);
  font-size: 0.78rem;
  font-weight: 700;
  cursor: pointer;
}

.booking-date-picker-day:hover {
  border-color: rgba(79, 160, 167, 0.5);
  background: var(--accent-soft);
}

.booking-date-picker-day.is-outside-month {
  color: var(--muted);
  opacity: 0.6;
}

.booking-date-picker-day.is-booked-partial {
  border-color: rgba(217, 164, 65, 0.42);
  background: rgba(217, 164, 65, 0.18);
  box-shadow: inset 0 -3px 0 rgba(217, 164, 65, 0.82);
}

.booking-date-picker-day.is-booked-full {
  border-color: rgba(169, 85, 66, 0.46);
  background: rgba(169, 85, 66, 0.2);
  box-shadow: inset 0 -3px 0 rgba(169, 85, 66, 0.86);
}

.booking-date-picker-day.is-booked-own::after {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 5px;
  height: 5px;
  border-radius: 999px;
  background: var(--accent);
  content: "";
}

.booking-date-picker-day.is-in-range {
  background: var(--accent-soft);
}

.booking-date-picker-day.is-selected {
  background: var(--accent);
  color: #fff;
}

.booking-date-picker-day.is-today {
  border-color: rgba(79, 160, 167, 0.7);
}

.booking-date-picker-day:disabled {
  color: var(--muted);
  cursor: default;
  opacity: 0.35;
}

.booking-action-form + .booking-action-form {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
}

.booking-action-form label {
  display: grid;
  gap: 8px;
}

.booking-action-form label span {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: var(--booking-label-height);
}

.booking-date-fields,
.booking-time-select-fields {
  display: contents;
}

.booking-date-fields > label,
.booking-time-select-fields > label {
  min-width: 0;
}

.booking-date-fields > label:first-child,
.booking-time-select-fields > label:first-child {
  grid-column: 1;
}

.booking-date-fields > label:last-child,
.booking-time-select-fields > label:last-child {
  grid-column: 2;
}

.booking-type-field {
  grid-column: 3 / -1;
  display: grid;
  gap: 8px;
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.booking-type-field legend {
  padding: 0;
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 700;
  line-height: var(--booking-label-height);
}

.booking-type-segmented {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: stretch;
  gap: 12px;
  margin-top: var(--booking-label-gap);
  min-height: var(--booking-control-height);
  height: var(--booking-control-height);
  padding: 0;
  border: 0;
  background: transparent;
}

.booking-type-choice {
  position: relative;
  display: block !important;
  height: 100%;
  min-width: 0;
}

.booking-action-form .booking-type-choice input[type="radio"] {
  position: absolute;
  width: 1px;
  height: 1px;
  margin: 0;
  padding: 0;
  opacity: 0;
  pointer-events: none;
}

.booking-type-choice span {
  display: grid;
  height: 100%;
  min-height: 0;
  place-items: center;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-strong);
  color: var(--muted);
  font-size: 0.88rem;
  font-weight: 800;
  line-height: 1.1;
  cursor: pointer;
}

.booking-type-choice input:focus-visible + span {
  outline: 2px solid var(--accent);
  outline-offset: 2px;
}

.booking-type-choice input:checked + span {
  border-color: transparent;
  background: var(--accent);
  color: #fff;
}

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

.booking-time-detail-fields {
  grid-column: 3 / -1;
  display: grid;
  align-items: start;
  align-content: start;
  gap: 6px;
  min-height: 0;
  min-width: 0;
}

.booking-full-day-note {
  grid-column: 1 / -1;
  display: flex;
  min-height: var(--booking-control-height);
  height: var(--booking-control-height);
  align-items: center;
  padding: 0 14px;
  border: 1px solid rgba(79, 160, 167, 0.34);
  border-radius: 12px;
  background: var(--accent-soft);
  color: var(--text);
  font-family: system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 0.95rem;
  font-weight: 600;
  letter-spacing: 0;
  line-height: 1.3;
}

.booking-batch-summary {
  grid-column: 1 / -1;
  padding: 12px 14px;
  border: 1px solid rgba(79, 160, 167, 0.34);
  border-radius: 14px;
  background: var(--accent-soft);
}

.booking-batch-summary-title {
  font-weight: 800;
}

.booking-batch-summary ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
  font-size: 0.9rem;
}

.booking-batch-summary li + li {
  margin-top: 4px;
}

.booking-hour-range {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  gap: 3px;
  margin-top: calc(var(--booking-label-height) + var(--booking-label-gap));
  padding: 6px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: var(--panel-muted);
}

.booking-hour-slot {
  min-width: 0;
  min-height: 30px;
  padding: 0;
  border: 1px solid transparent;
  border-radius: 7px;
  background: transparent;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  cursor: pointer;
}

.booking-hour-slot:hover {
  border-color: rgba(79, 160, 167, 0.5);
  background: var(--accent-soft);
  color: var(--text);
}

.booking-hour-slot.is-selected {
  border-color: rgba(47, 125, 132, 0.5);
  background: var(--accent);
  color: #fff;
}

.booking-same-slots-toggle {
  grid-column: 1 / -1;
  align-self: start;
  display: flex !important;
  align-items: center;
  justify-content: flex-start;
  gap: 6px;
  min-height: 20px;
  padding: 0 2px;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--text);
}

.booking-same-slots-toggle[hidden] {
  display: none !important;
}

.booking-action-form .booking-same-slots-toggle input[type="checkbox"] {
  flex: 0 0 auto;
  width: 14px;
  height: 14px;
  margin: 0;
  padding: 0;
  border-radius: 3px;
  accent-color: var(--accent);
}

.booking-same-slots-toggle span {
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 700;
  line-height: 1.15;
}

.booking-range-hint {
  grid-column: 1 / -1;
  min-height: 30px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  line-height: 1.2;
}

.booking-warning-space {
  grid-column: 1 / -1;
  display: grid;
  align-items: start;
  min-height: 0;
}

.booking-conflicts {
  grid-column: 1 / -1;
  min-height: 72px;
  padding: 10px 12px;
  border: 1px solid rgba(210, 107, 82, 0.45);
  border-radius: 14px;
  background: rgba(210, 107, 82, 0.12);
  color: var(--text);
}

.booking-conflicts-message {
  font-weight: 700;
}

.booking-conflicts ul {
  margin: 8px 0 0;
  padding-left: 18px;
  color: var(--muted);
}

.booking-conflicts li + li {
  margin-top: 4px;
}

.booking-conflicts-more {
  margin-top: 8px;
  color: var(--muted);
  font-size: 0.9rem;
}

.booking-action-form input,
.booking-action-form select {
  width: 100%;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-strong);
  color: var(--text);
}

.booking-action-form .booking-date-fields input,
.booking-action-form .booking-time-select-fields select {
  box-sizing: border-box;
  min-width: 0;
  min-height: var(--booking-control-height);
  height: var(--booking-control-height);
  padding: 9px 10px;
  border-radius: 12px;
  font-size: 0.88rem;
  font-weight: 600;
}

.booking-cancel-form {
  grid-template-columns: 1fr;
}

.booking-action-form-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.booking-action-form-actions-split {
  justify-content: space-between;
}

.booking-action-button {
  width: 42px;
  min-width: 42px;
  height: 42px;
  min-height: 42px;
  flex: 0 0 auto;
  padding: 0;
  border-radius: 999px;
  font-size: 1.35rem;
  font-weight: 800;
  line-height: 1;
}

.booking-action-glyph {
  display: inline-block;
  transform: translateY(-1px);
}

.admin-create-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 14px;
}

.admin-create-form label {
  display: grid;
  gap: 8px;
}

.admin-create-form label span {
  color: var(--muted);
  font-size: 0.9rem;
}

.admin-create-button {
  height: 48px;
}

.admin-create-form input,
.admin-create-form select,
.admin-profile-form input,
.admin-action-select-label select {
  width: 100%;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-strong);
  color: var(--text);
}

.admin-profile-form {
  display: grid;
  gap: 10px;
}

.admin-profile-form label {
  display: grid;
  gap: 6px;
}

.admin-profile-form label span,
.admin-user-status {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-edit-user-button {
  width: 32px;
  height: 32px;
  font-size: 0.95rem;
}

.admin-edit-modal-actions {
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  flex-wrap: wrap;
}

.admin-edit-extra-actions {
  margin-top: 18px;
  padding-top: 18px;
  border-top: 1px solid var(--line);
  display: grid;
  gap: 10px;
}

.admin-edit-extra-actions form {
  margin: 0;
  display: grid;
  gap: 8px;
}

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

.admin-role-toggle {
  grid-column: 1 / -1;
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.admin-role-toggle input {
  width: 18px;
  height: 18px;
}

.admin-create-actions {
  grid-column: 1 / -1;
  display: flex;
  justify-content: flex-end;
  gap: 10px;
  margin-top: 4px;
}

.admin-backup-confirm-form {
  margin-top: 20px;
}

.admin-confirm-form {
  margin-top: 20px;
}

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

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

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

.admin-table th {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.admin-user-name {
  font-weight: 700;
}

.admin-user-handle,
.admin-user-current {
  color: var(--muted);
  font-size: 0.92rem;
}

.admin-action-cell {
  width: 1%;
  white-space: nowrap;
}

.admin-action-stack {
  display: grid;
  gap: 8px;
}

.admin-action-cell form {
  margin: 0;
}

.admin-action-cell form:first-child {
  display: grid;
  gap: 8px;
}

.admin-action-select-label {
  display: grid;
  gap: 6px;
}

.admin-action-select-label span {
  color: var(--muted);
  font-size: 0.82rem;
}

.admin-action-button {
  border-radius: 12px;
  background: var(--panel-muted);
}

.admin-action-button-danger {
  color: var(--danger);
}

.admin-action-disabled {
  color: var(--muted);
  font-size: 0.92rem;
  white-space: nowrap;
}

.admin-empty-state {
  color: var(--muted);
}

.admin-log-table td:nth-child(7) {
  min-width: 360px;
}

.admin-log-table th:first-child,
.admin-log-table td:first-child {
  min-width: 200px;
  white-space: nowrap;
}

.log-status-pill {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.log-status-success {
  color: var(--success);
  background: rgba(80, 190, 110, 0.12);
}

.log-status-pending {
  color: var(--warning);
  background: rgba(217, 164, 65, 0.12);
}

.log-status-failure {
  color: var(--danger);
  background: rgba(214, 92, 92, 0.12);
}

.admin-health-table td:first-child {
  min-width: 300px;
}

.admin-health-table td:nth-child(3),
.admin-health-table td:nth-child(4) {
  min-width: 230px;
}

.admin-health-table td:nth-child(5) {
  min-width: 150px;
}

.admin-health-detail,
.admin-health-muted,
.admin-health-log-cell small {
  color: var(--muted);
}

.admin-health-detail {
  margin-top: 4px;
  max-width: 560px;
}

.admin-health-meta {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
  margin-top: 8px;
}

.admin-health-meta-item {
  padding: 4px 8px;
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.admin-health-log-cell {
  display: grid;
  gap: 4px;
}

.admin-health-log-cell small {
  max-width: 340px;
  overflow-wrap: anywhere;
}

.admin-health-table td:nth-child(5) span {
  display: block;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
}

.admin-health-table td:nth-child(5) strong {
  display: block;
  margin-top: 4px;
}

.admin-health-jobs-heading {
  margin-top: 24px;
}

.admin-health-jobs-heading h3 {
  margin: 0 0 8px;
  font-size: 1rem;
}

.health-status-pill {
  display: inline-flex;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  padding: 5px 10px;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.health-status-ok {
  color: var(--success);
  background: var(--success-soft);
}

.health-status-warn {
  color: color-mix(in srgb, var(--accent-warm) 70%, var(--text) 30%);
  background: rgba(217, 164, 65, 0.16);
}

.health-status-error {
  color: var(--danger);
  background: rgba(214, 92, 92, 0.12);
}

.hero-card {
  grid-column: span 12;
  display: grid;
  grid-template-columns: minmax(240px, 0.84fr) minmax(380px, 1.16fr);
  gap: 12px;
  align-items: center;
  min-height: 236px;
  padding: 22px 24px;
  position: relative;
}

.hero-meta h2 {
  font-size: clamp(1.75rem, 2.5vw, 2.35rem);
  letter-spacing: -0.03em;
}

.hero-meta {
  padding-left: 4px;
}

.aircraft-status-card {
  grid-column: span 12;
}

.aircraft-reference-section {
  grid-column: span 12;
  display: grid;
  gap: 14px;
  min-width: 0;
}

.aircraft-reference-panel {
  align-items: stretch;
}

.aircraft-detail-list {
  display: grid;
  gap: 0;
}

.aircraft-serviceability-row,
.aircraft-detail-row {
  display: grid;
  grid-template-columns: minmax(170px, 0.7fr) minmax(0, 1.3fr);
  gap: 14px;
  align-items: center;
  padding: 11px 0;
  border-bottom: 1px solid rgba(126, 152, 167, 0.16);
}

.aircraft-detail-row:last-child {
  border-bottom: 0;
}

.aircraft-detail-row-due-soon .aircraft-detail-value,
.aircraft-detail-row-overdue .aircraft-detail-value {
  justify-self: start;
  width: fit-content;
  max-width: 100%;
  box-sizing: border-box;
  padding: 6px 12px;
  border-radius: 999px;
  font-weight: 600;
}

.aircraft-detail-row-due-soon .aircraft-detail-value {
  border: 1px solid rgba(217, 164, 65, 0.45);
  background: rgba(217, 164, 65, 0.12);
  color: var(--accent-warm);
}

.aircraft-detail-row-overdue .aircraft-detail-value {
  border: 1px solid rgba(214, 92, 92, 0.42);
  background: rgba(214, 92, 92, 0.12);
  color: var(--danger);
}

.aircraft-serviceability-row .status-pill {
  justify-self: start;
  width: fit-content;
}

.aircraft-detail-key {
  color: var(--text-muted);
  font-weight: 700;
}

.aircraft-detail-value {
  color: var(--text);
  font-weight: 500;
  overflow-wrap: anywhere;
}

.home-airfield-line {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
}

.home-airfield-weather-link {
  display: inline-flex;
  align-items: center;
  text-decoration: none;
}

.home-airfield-weather-link:hover {
  transform: translateY(-1px);
}

.home-airfield-weather-link:focus-visible {
  outline: 2px solid var(--accent);
  outline-offset: 3px;
  border-radius: 999px;
}

.status-pill {
  display: inline-flex;
  align-items: center;
  padding: 6px 12px;
  border-radius: 999px;
  background: var(--accent-soft);
  color: var(--accent-strong);
  font-size: 0.88rem;
  font-weight: 700;
}

.status-connected {
  background: var(--success-soft);
  color: var(--success);
}

.status-error {
  background: rgba(214, 92, 92, 0.12);
  color: var(--danger);
}

.icon-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 34px;
  height: 34px;
  border-radius: 999px;
  background: var(--panel-muted);
  color: var(--text);
  border: 1px solid var(--line);
  transition: transform 120ms ease, background-color 120ms ease, color 120ms ease;
}

.icon-action:hover {
  transform: translateY(-1px);
  background: var(--panel-strong);
  border-color: rgba(217, 164, 65, 0.28);
}

.tab-strip {
  margin: 0 0 18px;
}

.tab-link {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  position: relative;
  padding: 12px 18px;
  border-radius: 999px;
  background: var(--panel-muted);
  color: var(--muted);
  font-weight: 600;
}

.tab-link.active {
  background: var(--panel-strong);
  color: var(--text);
  border: 1px solid var(--line);
}

.aircraft-tab-in-flight-badge {
  display: none;
  padding: 3px 7px;
  border-radius: 999px;
  background: rgba(217, 164, 65, 0.18);
  color: var(--accent-strong);
  font-size: 0.72rem;
  font-weight: 800;
  line-height: 1;
}

.tab-link.aircraft-tab-in-flight .aircraft-tab-in-flight-badge {
  display: inline-flex;
}

.alert {
  margin-bottom: 20px;
  padding: 14px 18px;
  border-radius: 18px;
}

.alert-with-action {
  display: flex;
  align-items: center;
  justify-content: space-between;
  flex-wrap: wrap;
  gap: 14px;
}

.alert-with-action span {
  min-width: 0;
}

.alert-action {
  flex: 0 0 auto;
}

.alert-error {
  background: rgba(169, 85, 66, 0.12);
  color: var(--danger);
}

.alert-warn {
  background: rgba(217, 164, 65, 0.12);
  color: var(--text);
}

.alert-note {
  margin-bottom: 16px;
}

.section-card {
  padding: 24px;
}

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

.schedule-card .section-heading {
  align-items: flex-start;
}

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

.section-heading-actions .admin-heading-form {
  margin: 0;
}

.booking-overview-actions {
  display: grid;
  justify-items: end;
  align-items: center;
}

.booking-summary-actions {
  display: grid;
  justify-items: end;
}

.booking-action-icon-row {
  display: flex;
  align-items: flex-start;
  justify-content: flex-end;
  gap: 10px;
}

.refresh-status-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
  flex: 0 0 auto;
}

.refresh-meta {
  font-size: 0.75rem;
  line-height: 1.4;
  color: var(--muted);
  text-align: right;
  white-space: nowrap;
}

.weather-station-form {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.weather-station-label {
  font-size: 0.82rem;
  color: var(--muted);
  font-weight: 600;
}

.weather-station-input {
  width: 88px;
  padding: 10px 12px;
  border-radius: 14px;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  color: var(--text);
  text-transform: uppercase;
}

.weather-station-grid {
  display: grid;
  gap: 18px;
}

.weather-station-card,
.weather-report-card {
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: 20px;
}

.weather-station-card {
  padding: 18px;
}

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

.weather-station-header h3 {
  margin: 6px 0 0;
  font-size: 1.35rem;
  line-height: 1.1;
}

.weather-station-location {
  margin: 8px 0 0;
  color: var(--muted);
  font-size: 0.92rem;
  line-height: 1.45;
}

.weather-station-meta {
  display: grid;
  justify-items: end;
  gap: 8px;
}

.weather-station-meta .refresh-meta-stale {
  color: rgb(230, 191, 103);
}

.weather-station-tag {
  display: inline-flex;
  align-items: center;
  padding: 5px 10px;
  border-radius: 999px;
  background: var(--panel-muted);
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
}

.weather-station-source-tag {
  margin-top: 10px;
}

.weather-station-tag-stale {
  background: rgba(217, 164, 65, 0.18);
  color: var(--text);
}

.weather-report-grid {
  display: grid;
  grid-template-columns: minmax(0, 0.95fr) minmax(0, 1.15fr);
  gap: 14px;
  align-items: start;
}

.weather-report-card {
  padding: 16px;
}

.weather-report-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
  margin-bottom: 12px;
}

.weather-report-label {
  margin-bottom: 4px;
  font-size: 1rem;
  font-weight: 800;
  letter-spacing: 0.05em;
  text-transform: uppercase;
}

.weather-report-label-metar {
  color: #4fa0ff;
}

.weather-report-label-taf {
  color: #f0a23c;
}

.weather-report-meta {
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
}

.weather-report-meta-stale {
  color: rgb(230, 191, 103);
}

.weather-report-badge {
  display: flex;
  align-items: center;
  justify-content: flex-end;
}

.weather-report-pre {
  margin: 0;
  white-space: pre-wrap;
  word-break: break-word;
  font-size: 0.78rem;
  line-height: 1.5;
  font-family: "SFMono-Regular", "Cascadia Code", "Source Code Pro", monospace;
}

.weather-empty-copy {
  margin: 0;
  color: var(--muted);
  font-size: 0.88rem;
  line-height: 1.5;
}

.weather-field-rows {
  margin: 0;
  display: grid;
  gap: 8px;
}

.weather-field-row {
  display: grid;
  grid-template-columns: minmax(92px, 120px) minmax(0, 1fr);
  gap: 10px;
  align-items: start;
}

.weather-field-row dt {
  margin: 0;
  font-size: 0.76rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--muted);
}

.weather-field-row dd {
  margin: 0;
  font-size: 0.96rem;
  line-height: 1.35;
  color: var(--text);
}

.weather-field-value-stale {
  color: rgb(230, 191, 103);
}

.weather-category-pill {
  font-size: 0.82rem;
  line-height: 1;
}

.weather-category-pill-caution {
  background: rgba(217, 164, 65, 0.18);
  color: rgb(230, 191, 103);
}

.weather-category-pill-alert {
  background: rgba(169, 85, 66, 0.22);
  color: rgb(223, 136, 116);
}

.taf-segment-list {
  display: grid;
  gap: 10px;
}

.taf-segment-card {
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.taf-segment-card:first-child {
  margin-top: 0;
}

.taf-segment-title {
  margin-bottom: 10px;
  font-size: 0.9rem;
  font-weight: 700;
  line-height: 1.35;
  color: #f0a23c;
}

.taf-validity-row {
  margin-bottom: 12px;
  padding: 10px 12px;
  border-radius: 14px;
  background: rgba(240, 162, 60, 0.12);
  color: #f0a23c;
  font-size: 0.88rem;
  font-weight: 700;
  line-height: 1.4;
}

.taf-validity-row-expired {
  background: rgba(169, 85, 66, 0.18);
  color: rgb(223, 136, 116);
}

.weather-raw-block {
  margin-top: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.weather-raw-title {
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.weather-raw-header {
  display: flex;
  align-items: center;
  margin-bottom: 8px;
}

.weather-raw-title-group {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.weather-copy-button {
  width: 24px;
  height: 24px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-muted);
  color: var(--muted);
  display: inline-flex;
  align-items: center;
  justify-content: center;
  padding: 0;
  font-size: 0.72rem;
  cursor: pointer;
  transition: transform 120ms ease, background-color 120ms ease, color 120ms ease;
}

.weather-copy-button:hover {
  transform: translateY(-1px);
  background: var(--panel-strong);
  color: var(--text);
}

.weather-copy-button.copied {
  color: var(--success);
  border-color: rgba(95, 194, 135, 0.35);
  background: rgba(95, 194, 135, 0.12);
}

.weather-raw-block pre {
  padding: 10px 12px;
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.03);
}

.checklist-page {
  display: grid;
  gap: 16px;
}

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

.checklist-hero-actions,
.checklist-install-actions {
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
  justify-content: flex-end;
}

.checklist-hero h2 {
  margin-bottom: 8px;
}

.checklist-hero p {
  max-width: 780px;
  margin: 0;
  color: var(--muted);
  line-height: 1.6;
}

.checklist-install-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  align-items: flex-start;
  gap: 16px;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.checklist-install-panel[hidden] {
  display: none;
}

[data-checklist-install-open][hidden] {
  display: none;
}

[data-checklist-install-prompt][hidden] {
  display: none;
}

.checklist-install-panel h3 {
  margin: 4px 0 6px;
  font-size: 1.05rem;
}

.checklist-install-panel p {
  max-width: 740px;
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.checklist-install-copy {
  min-width: 0;
}

.checklist-install-steps {
  display: grid;
  gap: 8px;
  margin: 14px 0 0;
  padding: 0;
  list-style: none;
}

.checklist-install-steps li {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 10px;
  align-items: start;
  color: var(--text);
  line-height: 1.45;
}

.checklist-install-step-number {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 28px;
  height: 28px;
  border: 1px solid color-mix(in srgb, var(--accent), transparent 36%);
  border-radius: 999px;
  color: var(--accent-strong);
  font-size: 0.82rem;
  font-weight: 900;
  line-height: 1;
}

.checklist-install-step-text strong {
  color: var(--text);
}

.checklist-phase-tabs {
  display: grid;
  gap: 10px;
  align-self: start;
  padding: 14px;
  position: sticky;
  top: 18px;
}

.checklist-phase-tabs-header {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: center;
}

.checklist-phase-tabs-header strong {
  color: var(--muted);
  font-size: 0.82rem;
}

.checklist-phase-list {
  display: grid;
  gap: 4px;
}

.checklist-phase-link {
  display: grid;
  grid-template-columns: 28px minmax(0, 1fr);
  gap: 8px;
  align-items: center;
  border: 1px solid transparent;
  border-radius: 10px;
  color: var(--muted);
  line-height: 1.15;
  padding: 7px 8px;
  text-decoration: none;
}

.checklist-phase-link:hover {
  color: var(--text);
  background: rgba(255, 255, 255, 0.04);
}

.checklist-phase-link.active {
  color: var(--text);
  background: var(--panel-strong);
  border-color: var(--line);
}

.checklist-phase-index {
  color: var(--accent);
  font-size: 0.7rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.checklist-phase-title {
  font-size: 0.84rem;
  font-weight: 800;
  overflow-wrap: anywhere;
}

.checklist-layout {
  display: grid;
  grid-template-columns: minmax(180px, 0.48fr) minmax(0, 2fr);
  gap: 16px;
  align-items: start;
}

.checklist-main,
.checklist-reference-panel,
.checklist-reference {
  display: grid;
  gap: 16px;
  min-width: 0;
}

.checklist-reference-panel {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: start;
}

.checklist-section,
.checklist-reference-card {
  min-width: 0;
}

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

.checklist-section-heading h3,
.checklist-reference-card h3 {
  margin: 6px 0 6px;
  font-size: 1.25rem;
  line-height: 1.15;
}

.checklist-section-heading p {
  margin: 0;
  color: var(--muted);
  line-height: 1.5;
}

.checklist-items {
  display: grid;
}

.checklist-item {
  display: grid;
  grid-template-columns: 22px minmax(150px, 0.78fr) minmax(180px, 1fr);
  gap: 8px 12px;
  align-items: start;
  padding: 10px 0;
  border-top: 1px solid var(--line);
}

.checklist-item:first-child {
  border-top: 0;
}

.checklist-checkbox {
  width: 18px;
  height: 18px;
  margin: 1px 0 0;
  accent-color: var(--accent);
}

.checklist-challenge {
  font-weight: 800;
  color: var(--text);
  overflow-wrap: anywhere;
}

.checklist-response {
  color: var(--text);
  line-height: 1.45;
  overflow-wrap: anywhere;
}

.checklist-note {
  grid-column: 3;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
}

.checklist-reference {
  position: sticky;
  top: 18px;
}

.checklist-reference-card {
  padding: 18px;
}

.checklist-reference-card h3 {
  margin-top: 0;
}

.checklist-reference-rows {
  display: grid;
  gap: 8px;
}

.checklist-reference-row {
  display: grid;
  gap: 3px;
  padding-top: 8px;
  border-top: 1px solid var(--line);
}

.checklist-reference-row:first-child {
  padding-top: 0;
  border-top: 0;
}

.checklist-reference-row span {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 800;
  letter-spacing: 0.04em;
  text-transform: uppercase;
}

.checklist-reference-row strong {
  color: var(--text);
  font-size: 0.96rem;
  line-height: 1.35;
}

.checklist-reference-note {
  margin: 12px 0 0;
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.45;
}

.page-cockpit-checklist {
  min-height: 100vh;
  min-height: 100dvh;
  padding: 0;
  background:
    linear-gradient(180deg, rgba(47, 125, 132, 0.12), transparent 28%),
    var(--backdrop);
}

.cockpit-checklist-shell {
  --cockpit-checklist-scale: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: grid;
  grid-template-rows: auto 1fr;
  gap: 12px;
  padding:
    max(14px, env(safe-area-inset-top))
    max(14px, env(safe-area-inset-right))
    max(14px, env(safe-area-inset-bottom))
    max(14px, env(safe-area-inset-left));
}

body.checklist-fallback-fullscreen {
  overflow: hidden;
}

.cockpit-checklist-shell.is-fullscreen-fallback {
  position: fixed;
  inset: 0;
  z-index: 1000;
  overflow: auto;
  background: var(--backdrop);
  -webkit-overflow-scrolling: touch;
}

.cockpit-checklist-topbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 16px;
  align-items: start;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.cockpit-checklist-title h1 {
  margin: 5px 0 5px;
  font-size: clamp(1.45rem, 3vw, 2.25rem);
  line-height: 1.05;
}

.cockpit-checklist-title p {
  margin: 0;
  color: var(--muted);
  line-height: 1.45;
}

.cockpit-checklist-actions {
  display: grid;
  justify-items: end;
  gap: 8px;
  max-width: 640px;
}

.cockpit-checklist-action-buttons {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.cockpit-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 48px;
  min-height: 44px;
  padding-inline: 12px;
  font-weight: 800;
  line-height: 1;
}

.cockpit-icon-button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.cockpit-icon-button[aria-disabled="true"],
.cockpit-icon-button.is-disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.cockpit-toolbar-icon {
  width: 1.15em;
  height: 1.15em;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
}

.cockpit-update-button {
  margin-left: auto;
}

.cockpit-help-tooltip {
  position: fixed;
  z-index: 1200;
  max-width: min(340px, calc(100vw - 24px));
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
  color: var(--text);
  font-size: 0.86rem;
  font-weight: 750;
  line-height: 1.35;
  pointer-events: none;
}

.cockpit-help-tooltip-main {
  display: block;
}

.cockpit-help-tooltip-detail {
  display: block;
  margin-top: 6px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 450;
}

.cockpit-help-tooltip[hidden] {
  display: none;
}

.cockpit-fullscreen-button[hidden] {
  display: none;
}

.cockpit-checklist-status {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 800;
}

.cockpit-checklist-status span {
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel);
}

.cockpit-checklist-status span[data-status="ready"],
.cockpit-checklist-status span[data-status="online"] {
  color: var(--success);
  border-color: rgba(45, 138, 87, 0.48);
  background: var(--success-soft);
}

.cockpit-checklist-status span[data-status="not-ready"] {
  color: var(--danger);
  border-color: rgba(176, 42, 55, 0.42);
  background: rgba(176, 42, 55, 0.1);
}

.cockpit-checklist-status span[data-status="offline"] {
  color: var(--muted);
  border-color: rgba(149, 116, 35, 0.42);
  background: rgba(149, 116, 35, 0.12);
}

.cockpit-checklist-status span[data-status="checking"] {
  color: var(--muted);
  border-color: rgba(47, 125, 132, 0.42);
  background: rgba(47, 125, 132, 0.12);
}

.cockpit-update-notice {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  padding: 12px 14px;
  border: 1px solid rgba(47, 125, 132, 0.35);
  border-radius: 12px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.cockpit-update-notice[hidden] {
  display: none;
}

.cockpit-update-notice-text {
  display: grid;
  gap: 3px;
  min-width: 0;
  line-height: 1.35;
}

.cockpit-update-notice-text strong {
  font-size: 0.95rem;
}

.cockpit-update-notice-text span {
  color: var(--muted);
  font-size: 0.84rem;
}

.cockpit-update-notice-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: 8px;
}

.cockpit-checklist-layout {
  min-height: 0;
  display: grid;
  grid-template-columns: minmax(190px, 0.45fr) minmax(0, 1.55fr);
  gap: 12px;
  align-content: start;
  align-items: start;
}

.cockpit-phase-nav {
  position: sticky;
  top: max(12px, env(safe-area-inset-top));
  display: grid;
  gap: 4px;
  max-height: calc(100vh - 32px);
  max-height: calc(100dvh - 32px);
  overflow: auto;
  padding: 7px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel);
  -webkit-overflow-scrolling: touch;
}

.cockpit-phase-button {
  display: grid;
  grid-template-columns: 24px minmax(0, 1fr) auto;
  gap: 5px;
  align-items: center;
  width: 100%;
  min-height: 40px;
  padding: 6px 8px;
  border: 1px solid transparent;
  border-radius: 12px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-align: left;
}

.cockpit-phase-button.active {
  color: var(--text);
  background: var(--panel-strong);
  border-color: var(--accent);
}

.cockpit-phase-button.is-complete {
  color: var(--text);
  background: var(--success-soft);
  border-color: rgba(45, 138, 87, 0.46);
}

.cockpit-phase-button.is-complete.active {
  border-color: var(--success);
}

.cockpit-phase-button.is-complete .cockpit-phase-index,
.cockpit-phase-button.is-complete .cockpit-phase-progress {
  color: var(--success);
}

.cockpit-phase-button-reference .cockpit-phase-index,
.cockpit-phase-button-reference .cockpit-phase-name {
  color: var(--success);
}

.cockpit-phase-index {
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 900;
}

.cockpit-phase-name {
  min-width: 0;
  font-weight: 850;
  line-height: 1.15;
  overflow-wrap: anywhere;
}

.cockpit-phase-progress {
  color: var(--accent-warm);
  font-size: 0.76rem;
  font-weight: 900;
  white-space: nowrap;
}

.cockpit-checklist-stage {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.cockpit-checklist-section {
  min-width: 0;
  padding: 18px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
  box-shadow: var(--shadow);
}

.cockpit-checklist-section[hidden] {
  display: none;
}

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

.cockpit-section-heading > div:first-child {
  min-width: 0;
}

.cockpit-section-heading-aside {
  flex: 0 0 auto;
  display: grid;
  justify-items: end;
  gap: 8px;
}

.cockpit-section-heading h2 {
  margin: 5px 0;
  font-size: calc(1.8rem * var(--cockpit-checklist-scale));
  line-height: 1.05;
}

.cockpit-section-heading p {
  margin: 0;
  color: var(--muted);
  font-size: calc(0.98rem * var(--cockpit-checklist-scale));
  line-height: 1.35;
}

.cockpit-section-progress {
  flex: 0 0 auto;
  color: var(--accent-warm);
  font-size: calc(1rem * var(--cockpit-checklist-scale));
}

.cockpit-checklist-items {
  display: grid;
  gap: 8px;
}

.cockpit-checklist-item {
  display: grid;
  grid-template-columns: 30px minmax(180px, 0.8fr) minmax(220px, 1fr);
  gap: 8px 14px;
  align-items: center;
  min-height: 58px;
  padding: 12px 14px;
  border: 1px solid var(--line);
  border-radius: 12px;
  background: rgba(255, 255, 255, 0.04);
  cursor: pointer;
}

.cockpit-checklist-item.is-complete {
  background: var(--success-soft);
  border-color: rgba(45, 138, 87, 0.38);
}

.cockpit-checklist-checkbox {
  width: 22px;
  height: 22px;
  margin: 0;
  accent-color: var(--success);
}

.cockpit-checklist-challenge,
.cockpit-checklist-response {
  color: var(--text);
  font-size: calc(1.08rem * var(--cockpit-checklist-scale));
  line-height: 1.3;
  overflow-wrap: anywhere;
}

.cockpit-checklist-challenge {
  font-weight: 900;
}

.cockpit-checklist-response {
  font-weight: 650;
}

.cockpit-checklist-note {
  grid-column: 3;
  color: var(--muted);
  font-size: calc(0.88rem * var(--cockpit-checklist-scale));
  line-height: 1.35;
}

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

.cockpit-section-actions button:disabled {
  cursor: not-allowed;
  opacity: 0.45;
}

.cockpit-phase-button-reference {
  grid-template-columns: 34px minmax(0, 1fr);
}

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

.cockpit-reference-section .checklist-reference-card {
  background: var(--panel);
}

.cockpit-reference-section .checklist-reference-card h3 {
  font-size: calc(1.25rem * var(--cockpit-checklist-scale));
}

.cockpit-reference-section .checklist-reference-row span {
  font-size: calc(0.78rem * var(--cockpit-checklist-scale));
}

.cockpit-reference-section .checklist-reference-row strong {
  font-size: calc(0.96rem * var(--cockpit-checklist-scale));
}

.cockpit-reference-section .checklist-reference-note {
  font-size: calc(0.84rem * var(--cockpit-checklist-scale));
}

@media (display-mode: standalone) {
  [data-checklist-install-open],
  .checklist-install-panel,
  .cockpit-fullscreen-button {
    display: none;
  }
}

.cockpit-checklist-shell[data-checklist-standalone="true"] [data-checklist-install-open],
.cockpit-checklist-shell[data-checklist-standalone="true"] .cockpit-fullscreen-button {
  display: none;
}

.documents-layout {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  align-items: start;
}

.documents-list-card,
.documents-preview-card {
  min-width: 0;
}

.documents-list-card {
  overflow: hidden;
}

.documents-heading {
  align-items: flex-start;
}

.documents-heading h2 {
  margin-bottom: 0;
}

.documents-refresh-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.documents-refresh-form {
  align-items: center;
  justify-content: flex-end;
}

.documents-sort-control {
  display: grid;
  gap: 6px;
  justify-items: end;
  margin: -8px 0 14px;
  min-width: fit-content;
}

.documents-sort-label {
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.12em;
  text-transform: uppercase;
}

.documents-sort-segmented {
  justify-content: flex-end;
}

.documents-sort-segmented .segment {
  padding: 8px 10px;
  font-size: 0.8rem;
}

.documents-error {
  display: grid;
  gap: 6px;
}

.documents-error strong {
  display: block;
}

.documents-error span {
  color: var(--text);
}

.documents-list {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 430px), 1fr));
  gap: 10px;
  max-height: min(34vh, 330px);
  overflow-y: auto;
  padding-right: 4px;
  scrollbar-gutter: stable;
}

.document-row {
  display: grid;
  grid-template-columns: 52px minmax(0, 1fr);
  gap: 12px;
  align-items: start;
  min-height: 74px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-muted);
  transition: border-color 120ms ease, transform 120ms ease, background-color 120ms ease;
}

.document-row:hover,
.document-row.is-selected {
  transform: translateY(-1px);
  border-color: rgba(47, 125, 132, 0.35);
  background: var(--accent-soft);
}

.document-kind-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 48px;
  height: 40px;
  border-radius: 12px;
  background: var(--panel-strong);
  color: var(--accent);
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0.08em;
}

.document-row-main {
  min-width: 0;
  display: grid;
  gap: 3px;
}

.document-row-title {
  color: var(--text);
  font-weight: 700;
  line-height: 1.25;
  overflow-wrap: anywhere;
}

.document-row-meta {
  color: var(--muted);
  font-size: 0.82rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.documents-empty-state,
.documents-preview-placeholder {
  padding: 20px;
  border: 1px dashed var(--line);
  border-radius: 18px;
  color: var(--muted);
  line-height: 1.55;
}

.documents-preview-placeholder-action {
  box-sizing: border-box;
  display: grid;
  gap: 14px;
  place-content: center;
  justify-items: center;
  min-height: inherit;
  text-align: center;
}

.documents-preview-placeholder-action p {
  max-width: 38rem;
  margin: 0;
}

.documents-preview-card {
  display: grid;
  gap: 14px;
}

.documents-preview-content {
  display: grid;
  gap: 14px;
}

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

.documents-preview-header h2 {
  margin-bottom: 4px;
  overflow-wrap: anywhere;
}

.documents-preview-header .microcopy {
  margin: 0;
  overflow-wrap: anywhere;
}

.documents-preview-actions {
  display: flex;
  flex: 0 0 auto;
  gap: 8px;
}

.documents-preview-body {
  position: relative;
  min-height: 620px;
  overflow: hidden;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
}

.documents-preview-loading {
  position: absolute;
  inset: 0;
  z-index: 1;
  display: grid;
  place-content: center;
  gap: 12px;
  min-height: 100%;
  padding: 24px;
  color: var(--muted);
  text-align: center;
  background: var(--panel-strong);
}

.documents-preview-spinner {
  width: 30px;
  height: 30px;
  margin: 0 auto;
  border: 3px solid var(--line);
  border-top-color: var(--accent);
  border-radius: 999px;
  animation: documents-preview-spin 900ms linear infinite;
}

.documents-preview-content[data-documents-preview-state="loaded"] .documents-preview-loading {
  display: none;
}

.documents-preview-frame {
  display: block;
  width: 100%;
  height: min(76vh, 920px);
  min-height: 620px;
  border: 0;
  background: #fff;
}

.documents-preview-content[data-documents-preview-state="loading"] .documents-preview-frame {
  opacity: 0;
}

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

.inline-icon-form {
  display: inline-flex;
}

.tracking-summary {
  padding-top: 2px;
}

.tracking-flight-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin: 0 0 10px;
  color: var(--text);
}

.tracking-flight-status span {
  width: 10px;
  height: 10px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 4px rgba(79, 160, 167, 0.16);
}

.tracking-flight-status-active strong {
  color: var(--accent-strong);
}

.tracking-refresh-block {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  gap: 6px;
}

.hero-refresh-block {
  position: absolute;
  top: 18px;
  right: 18px;
}

.tracking-flight-rows {
  margin: -2px 0 0 28px;
  display: flex;
  flex-direction: column;
  gap: 4px;
  color: var(--text-muted);
}

.tracking-flight-row {
  display: grid;
  grid-template-columns: 72px 210px auto;
  column-gap: 14px;
  align-items: baseline;
  font-size: 0.9rem;
  line-height: 1.35;
  color: var(--muted);
}

.tracking-flight-row-key {
  color: inherit;
  font-weight: 700;
}

.tracking-flight-row-airport,
.tracking-flight-row-time {
  color: inherit;
}

.tracking-flight-row-time {
  white-space: nowrap;
}

.recent-flights-copy {
  margin: 0;
  max-width: none;
  line-height: 1.35;
}

.recent-flights-heading {
  margin-bottom: 6px;
  display: grid;
  gap: 6px;
}

.recent-flights-card {
  position: relative;
}

.recent-flights-heading-top {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
  padding-right: 126px;
}

.recent-flights-heading-title h2 {
  margin-bottom: 0;
}

.recent-flights-heading-meta {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 16px;
}

.recent-flights-time-toggle {
  flex: 0 0 auto;
}

.recent-flights-time-toggle {
  display: flex;
  justify-content: flex-end;
}

.recent-flights-source-switch {
  display: flex;
  justify-content: flex-start;
  margin-bottom: 14px;
}

.recent-flights-filters {
  align-items: center;
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  justify-content: flex-start;
  margin-bottom: 14px;
  padding-top: 12px;
  border-top: 1px solid var(--line);
}

.recent-flights-scope-segmented .segment {
  min-width: 112px;
  text-align: center;
}

.tech-log-filter-form {
  align-items: end;
  display: flex;
  flex-wrap: wrap;
  gap: 10px;
}

.tech-log-filter-form label {
  color: var(--muted);
  display: grid;
  gap: 5px;
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.tech-log-filter-form select {
  min-width: 156px;
}

.tech-log-view-segmented {
  margin-left: auto;
}

.tech-log-view-segmented .segment {
  min-width: 94px;
  text-align: center;
}

.recent-flights-copy-stack {
  flex: 1 1 auto;
  min-width: 0;
}

.recent-flights-heading-meta .recent-flights-copy {
  margin-bottom: 0;
}

.recent-flights-freshness {
  color: var(--muted);
  margin-top: 4px;
}

.recent-flights-refresh-block {
  position: absolute;
  top: 18px;
  right: 18px;
}

.tech-log-submission-panel {
  border: 1px solid var(--line);
  border-radius: 14px;
  margin: 0 0 16px;
  padding: 14px;
  background: rgba(255, 255, 255, 0.025);
}

.tech-log-submission-summary {
  align-items: start;
  display: flex;
  gap: 12px;
  justify-content: space-between;
  margin-bottom: 12px;
}

.tech-log-submission-summary h3 {
  font-size: 1rem;
  margin: 0 0 3px;
}

.tech-log-submission-list {
  display: grid;
  gap: 8px;
  list-style: none;
  margin: 8px 0 0;
  padding: 0;
}

.tech-log-submission-item {
  align-items: center;
  background: rgba(255, 255, 255, 0.035);
  border: 1px solid rgba(255, 255, 255, 0.08);
  border-radius: 10px;
  display: flex;
  gap: 10px;
  justify-content: space-between;
  padding: 8px 10px;
}

.tech-log-submission-item-main {
  align-items: center;
  display: flex;
  gap: 8px;
  min-width: 0;
}

.tech-log-submission-item-main > span:last-child {
  overflow-wrap: anywhere;
}

.tech-log-modal-panel {
  width: min(100%, 860px);
  max-height: calc(100vh - 48px);
  max-height: calc(100dvh - 48px);
  overflow-y: auto;
  overscroll-behavior: contain;
  -webkit-overflow-scrolling: touch;
}

.tech-log-modal-content {
  padding: 18px;
}

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

.tech-log-modal-panel .tech-log-form-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}

.tech-log-submission-form {
  display: grid;
  gap: 12px;
}

.tech-log-form-grid {
  display: grid;
  gap: 10px;
  grid-template-columns: repeat(7, minmax(96px, 1fr));
}

.tech-log-submission-form .field {
  min-width: 0;
}

.tech-log-submission-form input,
.tech-log-submission-form select,
.tech-log-submission-form textarea {
  width: 100%;
}

.tech-log-calculated-field output {
  align-items: center;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid var(--line);
  border-radius: 12px;
  color: var(--text);
  display: flex;
  min-height: 42px;
  padding: 10px 12px;
  font-variant-numeric: tabular-nums;
}

.tech-log-comments-field {
  grid-column: span 2;
}

.tech-log-preview-line {
  border: 1px dashed var(--line);
  border-radius: 12px;
  color: var(--text);
  font-size: 0.9rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
  padding: 10px 12px;
  font-variant-numeric: tabular-nums;
}

.tech-log-form-actions {
  display: flex;
  gap: 10px;
  justify-content: flex-end;
}

.tech-log-form-errors,
.tech-log-form-warnings {
  border-radius: 12px;
  margin: 0 0 10px;
  padding: 10px 12px 10px 28px;
}

.tech-log-client-error {
  background: rgba(197, 74, 62, 0.12);
  border-radius: 12px;
  color: #f0aaa1;
  margin: 0;
  padding: 10px 12px;
}

.tech-log-form-errors {
  background: rgba(197, 74, 62, 0.12);
  color: #f0aaa1;
}

.tech-log-form-warnings {
  background: rgba(217, 164, 65, 0.12);
  color: #f0d08a;
}

.tech-log-status {
  background: rgba(255, 255, 255, 0.06);
  border: 1px solid var(--line);
  border-radius: 999px;
  color: var(--text);
  display: inline-flex;
  font-size: 0.76rem;
  font-weight: 700;
  line-height: 1;
  padding: 5px 8px;
  white-space: nowrap;
}

.tech-log-row-pending .tech-log-status,
.tech-log-row-pending_correction .tech-log-status {
  background: rgba(217, 164, 65, 0.14);
  border-color: rgba(217, 164, 65, 0.4);
}

.tech-log-row-matched .tech-log-status {
  background: rgba(83, 143, 111, 0.16);
  border-color: rgba(83, 143, 111, 0.42);
}

.tech-log-row-approved .tech-log-status {
  background: rgba(74, 129, 178, 0.16);
  border-color: rgba(74, 129, 178, 0.42);
}

.tech-log-row-removed .tech-log-status {
  background: rgba(141, 151, 166, 0.14);
  border-color: rgba(141, 151, 166, 0.36);
}

.tech-log-row-needs_review .tech-log-status,
.tech-log-row-warning {
  color: #f0d08a;
}

.tech-log-row-warning {
  font-weight: 650;
}

.tech-log-edit-link {
  text-decoration: none;
}

.tech-log-row-actions {
  align-items: center;
  display: flex;
  flex-wrap: nowrap;
  gap: 4px;
  justify-content: flex-end;
}

.tech-log-row-action-form {
  margin: 0;
}

.tech-log-row-action-form button,
.tech-log-row-actions .icon-action {
  height: 30px;
  min-width: 0;
  padding: 0;
  width: 30px;
}

.tech-log-row-actions svg {
  fill: none;
  height: 17px;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2;
  width: 17px;
}

.tech-log-action-cell-empty {
  color: transparent;
}

.tech-log-table .tech-log-action-cell {
  padding-left: 6px;
  padding-right: 6px;
  text-align: right;
  white-space: nowrap;
  width: 104px;
}

.tech-log-table-compact .tech-log-action-cell {
  width: 104px;
}

@media (max-width: 980px) {
  .tech-log-action-cell-empty {
    display: none !important;
  }
}

.logbook-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: rgba(255, 255, 255, 0.02);
}

.logbook-table {
  width: 100%;
  border-collapse: collapse;
  min-width: 1040px;
  table-layout: fixed;
}

table.tech-log-table-extended {
  min-width: 2124px;
}

table.tech-log-table-compact {
  min-width: 1162px;
}

.tech-log-col-date {
  width: 110px;
}

.tech-log-col-crew {
  width: 166px;
}

.tech-log-col-aircraft-hours {
  width: 118px;
}

.tech-log-col-place {
  width: 150px;
}

.tech-log-col-time {
  width: 88px;
}

.tech-log-col-hours {
  width: 92px;
}

.tech-log-col-tach {
  width: 100px;
}

.tech-log-col-uplift {
  width: 86px;
}

.tech-log-col-oil {
  width: 74px;
}

.tech-log-col-comments {
  width: 180px;
}

.tech-log-col-status {
  width: 128px;
}

.tech-log-col-flags {
  width: 220px;
}

.tech-log-col-spend {
  width: 100px;
}

.tech-log-col-action {
  width: 104px;
}

.tech-log-col-compact-date {
  width: 82px;
}

.tech-log-col-compact-crew {
  width: 166px;
}

.tech-log-col-compact-aircraft-hours {
  width: 90px;
}

.tech-log-col-compact-place {
  width: 169px;
}

.tech-log-col-compact-time {
  width: 66px;
}

.tech-log-col-compact-hours {
  width: 74px;
}

.tech-log-col-compact-uplift {
  width: 68px;
}

.tech-log-col-compact-status {
  width: 104px;
}

.tech-log-col-compact-action {
  width: 104px;
}

.logbook-col-date {
  width: 124px;
}

.logbook-col-from,
.logbook-col-to {
  width: 21%;
}

.logbook-col-off,
.logbook-col-on,
.logbook-col-time {
  width: 72px;
}

.logbook-col-notes,
.logbook-col-member {
  width: 212px;
}

.logbook-col-spend {
  width: 96px;
}

.logbook-col-map {
  width: 68px;
}

.logbook-table thead th {
  padding: 12px 14px;
  text-align: left;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.14em;
  color: var(--accent);
  border-bottom: 1px solid var(--line);
  background: rgba(255, 255, 255, 0.02);
}

.logbook-table tbody td {
  padding: 13px 14px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.05);
  color: var(--text-muted);
  vertical-align: top;
  overflow-wrap: anywhere;
}

.tech-log-table-compact thead th,
.tech-log-table-compact tbody td {
  padding-left: 10px;
  padding-right: 10px;
}

.tech-log-table-compact thead th {
  font-size: 0.68rem;
  letter-spacing: 0.1em;
}

.logbook-table tbody tr.is-selected td {
  background: rgba(204, 161, 87, 0.08);
}

.logbook-table tbody tr:last-child td {
  border-bottom: 0;
}

.logbook-table tbody td:nth-child(1),
.logbook-table tbody td:nth-child(4),
.logbook-table tbody td:nth-child(5),
.logbook-table tbody td:nth-child(6),
.logbook-table tbody td:nth-child(7) {
  white-space: nowrap;
}

.logbook-table tbody td:nth-child(4),
.logbook-table tbody td:nth-child(5),
.logbook-table tbody td:nth-child(6) {
  font-variant-numeric: tabular-nums;
}

.tech-log-table tbody td:nth-child(3),
.tech-log-table tbody td:nth-child(8),
.tech-log-table tbody td:nth-child(9),
.tech-log-table tbody td:nth-child(10),
.tech-log-table tbody td:nth-child(11) {
  white-space: nowrap;
  font-variant-numeric: tabular-nums;
}

.tech-log-table tbody td:nth-child(2) {
  overflow-wrap: normal;
  white-space: nowrap;
}

.tech-log-table tbody td:nth-child(4),
.tech-log-table tbody td:nth-child(5) {
  overflow-wrap: anywhere;
  white-space: normal;
}

.logbook-table tbody td:last-child {
  text-align: right;
}

.logbook-table tfoot td {
  padding: 14px;
  border-top: 1px solid var(--line);
  color: var(--text);
  font-weight: 650;
  white-space: nowrap;
}

.logbook-table tfoot td:last-child {
  font-variant-numeric: tabular-nums;
  text-align: right;
}

.logbook-map-link {
  font-size: 0.85rem;
  font-weight: 700;
  color: var(--accent);
  text-decoration: none;
}

.logbook-map-link:hover {
  text-decoration: underline;
}

.recent-flight-map-modal {
  position: fixed;
  inset: 0;
  z-index: 40;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 24px;
}

.recent-flight-map-backdrop {
  position: absolute;
  inset: 0;
  background: rgba(9, 11, 18, 0.76);
  backdrop-filter: blur(12px);
}

.recent-flight-map-card {
  position: relative;
  z-index: 1;
  width: min(1080px, calc(100vw - 48px));
  max-height: calc(100vh - 48px);
  overflow: auto;
  padding: 18px 20px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel);
  box-shadow: 0 24px 70px rgba(0, 0, 0, 0.38);
}

.recent-flight-map-loading-card {
  width: min(420px, calc(100vw - 48px));
  text-align: center;
}

.recent-flight-map-loading-card h3 {
  padding-right: 0;
}

.recent-flight-map-loading-spinner {
  width: 32px;
  height: 32px;
  margin: 18px auto 2px;
  border: 3px solid rgba(255, 255, 255, 0.22);
  border-top-color: var(--accent);
  border-radius: 50%;
  animation: recent-flight-map-spinner 0.8s linear infinite;
}

@keyframes recent-flight-map-spinner {
  to {
    transform: rotate(360deg);
  }
}

.recent-flight-map-close {
  position: absolute;
  top: 14px;
  right: 16px;
  color: var(--muted);
  text-decoration: none;
  font-size: 1.6rem;
  line-height: 1;
}

.recent-flight-map-close:hover {
  color: var(--text);
}

.recent-flight-map-card h3 {
  margin-bottom: 6px;
  padding-right: 28px;
}

.recent-flight-map-detail {
  margin: 0 0 12px;
}

.recent-flight-map-toolbar {
  display: flex;
  align-items: center;
  justify-content: flex-start;
  gap: 12px;
  margin: 0 0 12px;
}

.recent-flight-map-actions {
  display: flex;
  align-items: center;
  gap: 8px;
}

.recent-flight-map-actions + .recent-flight-map-actions {
  margin-left: auto;
}

.recent-flight-map-actions + .recent-flight-map-action {
  margin-left: 0;
}

.recent-flight-map-action {
  flex: 0 0 auto;
  font-size: 1rem;
  font-weight: 800;
  text-decoration: none;
}

.recent-flight-map-action:disabled {
  cursor: not-allowed;
  opacity: 0.42;
  transform: none;
}

.recent-flight-map-action-status {
  min-width: 96px;
  color: var(--muted);
  font-size: 0.8rem;
  text-align: right;
}

.recent-flight-map-frame {
  overflow: auto;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: rgba(255, 255, 255, 0.02);
}

.current-flight-map-card {
  grid-column: 1 / -1;
}

.current-flight-map-card h3 {
  margin: 4px 0 6px;
}

.current-flight-map-detail {
  margin: 0 0 12px;
}

.current-flight-stats {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(118px, 1fr));
  gap: 8px;
  margin: 0 0 14px;
}

.current-flight-stats div {
  padding: 9px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-muted);
}

.current-flight-stats dt {
  margin: 0 0 2px;
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 800;
  text-transform: uppercase;
}

.current-flight-stats dd {
  margin: 0;
  color: var(--text);
  font-size: 0.96rem;
  font-weight: 800;
}

.current-flight-map-card .recent-flight-map-frame {
  max-width: 100%;
  max-height: 330px;
}

.current-flight-map-card .recent-flight-airmate-frame {
  margin: 0;
}

.recent-flight-map-frame[data-flight-map-pannable="true"] {
  cursor: grab;
}

.recent-flight-map-frame.is-panning {
  cursor: grabbing;
  user-select: none;
}

.recent-flight-map-zoom-shell {
  position: relative;
  max-width: none;
}

.recent-flight-map-zoom-shell [data-flight-map-content] {
  transform-origin: top left;
}

.recent-flight-airmate-frame {
  overflow: auto;
  width: fit-content;
  max-width: 100%;
  margin: 0 auto;
  background: rgba(221, 229, 233, 0.96);
}

.recent-flight-airmate-map {
  position: relative;
  overflow: hidden;
  background: #dce7ed;
}

.recent-flight-airmate-tile {
  position: absolute;
  width: 256px;
  height: 256px;
  object-fit: cover;
}

.recent-flight-airmate-feature-overlay {
  position: absolute;
  inset: 0;
  z-index: 1;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.recent-flight-airmate-feature-overlay[hidden] {
  display: none;
}

.recent-flight-airspace-shape {
  fill: rgba(40, 101, 184, 0.055);
  stroke: rgba(20, 70, 165, 0.9);
  stroke-width: 1.8;
  vector-effect: non-scaling-stroke;
}

.recent-flight-airspace-restricted .recent-flight-airspace-shape,
.recent-flight-airspace-prohibited .recent-flight-airspace-shape,
.recent-flight-airspace-danger .recent-flight-airspace-shape {
  fill: rgba(210, 58, 72, 0.04);
  stroke: rgba(190, 38, 55, 0.92);
  stroke-dasharray: 6 4;
}

.recent-flight-airspace-label,
.recent-flight-airspace-detail,
.recent-flight-airport-label {
  paint-order: stroke;
  stroke: rgba(255, 255, 255, 0.88);
  stroke-linejoin: round;
  stroke-width: 3px;
  font-family: system-ui, -apple-system, BlinkMacSystemFont, "Segoe UI", sans-serif;
  font-size: 10px;
  font-weight: 800;
}

.recent-flight-airspace-label {
  fill: #153e9c;
}

.recent-flight-airspace-detail {
  fill: rgba(21, 62, 156, 0.86);
  font-size: 8px;
  font-weight: 700;
}

.recent-flight-airspace-restricted .recent-flight-airspace-label,
.recent-flight-airspace-prohibited .recent-flight-airspace-label,
.recent-flight-airspace-danger .recent-flight-airspace-label {
  fill: #a51f2e;
}

.recent-flight-airspace-restricted .recent-flight-airspace-detail,
.recent-flight-airspace-prohibited .recent-flight-airspace-detail,
.recent-flight-airspace-danger .recent-flight-airspace-detail {
  fill: rgba(165, 31, 46, 0.86);
}

.recent-flight-airport-atz {
  fill: none;
  stroke: rgba(210, 58, 72, 0.9);
  stroke-dasharray: 5 4;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.recent-flight-airport-marker {
  fill: #e34755;
  stroke: #ffffff;
  stroke-width: 1.5;
  vector-effect: non-scaling-stroke;
}

.recent-flight-airport-label {
  fill: #8e1f2a;
  font-size: 9px;
}

.recent-flight-airmate-feature-overlay[data-flight-map-overlay-detail="overview"]
  .recent-flight-airspace-label,
.recent-flight-airmate-feature-overlay[data-flight-map-overlay-detail="overview"]
  .recent-flight-airspace-detail,
.recent-flight-airmate-feature-overlay[data-flight-map-overlay-detail="overview"]
  .recent-flight-airport-group,
.recent-flight-airmate-feature-overlay[data-flight-map-overlay-detail="reduced"]
  .recent-flight-airspace-detail,
.recent-flight-airmate-feature-overlay[data-flight-map-overlay-detail="reduced"]
  .recent-flight-airport-atz,
.recent-flight-airmate-feature-overlay[data-flight-map-overlay-detail="reduced"]
  .recent-flight-airport-label {
  display: none;
}

.recent-flight-airmate-feature-overlay[data-flight-map-overlay-detail="overview"]
  .recent-flight-airspace-shape {
  fill: rgba(40, 101, 184, 0.025);
  stroke-opacity: 0.82;
}

.recent-flight-track-overlay {
  position: absolute;
  inset: 0;
  z-index: 2;
  width: 100%;
  height: 100%;
  pointer-events: none;
}

.recent-flight-track-casing,
.recent-flight-track-line {
  fill: none;
  stroke-linecap: round;
  stroke-linejoin: round;
  vector-effect: non-scaling-stroke;
}

.recent-flight-track-casing {
  stroke: rgba(255, 255, 255, 0.92);
  stroke-width: 6;
}

.recent-flight-track-line {
  stroke: #d92755;
  stroke-width: 3;
}

.recent-flight-track-start {
  fill: #1b8a5a;
  stroke: #ffffff;
  stroke-width: 3;
}

.recent-flight-track-end {
  fill: #d92755;
  stroke: #ffffff;
  stroke-width: 3;
}

.recent-flight-map-attribution {
  padding: 6px 10px;
  color: #24303a;
  font-size: 0.72rem;
  background: rgba(255, 255, 255, 0.88);
}

.recent-flight-map-image {
  display: block;
  width: 100%;
  height: auto;
}

.icon-action-button {
  border: 1px solid var(--line);
  background: var(--panel-strong);
}

.booking-range-segmented {
  flex-wrap: nowrap;
  gap: 4px;
  padding: 5px;
}

.booking-range-segmented .segment {
  white-space: nowrap;
  padding: 10px 12px;
  font-size: 0.94rem;
}

.weather-time-segmented {
  gap: 3px;
  padding: 4px;
}

.weather-time-segmented .segment {
  white-space: nowrap;
  padding: 7px 10px;
  font-size: 0.82rem;
  letter-spacing: 0.02em;
}

.booking-calendar-shell {
  margin-bottom: 22px;
  display: grid;
  gap: 14px;
}

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

.calendar-legend {
  display: flex;
  gap: 14px;
  flex-wrap: wrap;
  color: var(--muted);
  font-size: 0.82rem;
}

.calendar-nav {
  display: inline-flex;
  gap: 8px;
}

.calendar-nav-button {
  width: 36px;
  height: 36px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 1px solid var(--line);
  border-radius: 999px;
  background: var(--panel-muted);
  color: var(--text);
  font-size: 1.4rem;
  font-weight: 700;
  line-height: 1;
  transition: transform 120ms ease, border-color 120ms ease;
}

.calendar-nav-button:hover {
  transform: translateY(-1px);
  border-color: rgba(79, 160, 167, 0.5);
}

.calendar-nav-button-disabled {
  opacity: 0.36;
  pointer-events: none;
}

.calendar-legend-item {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.calendar-legend-swatch {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 1px solid var(--line);
}

.calendar-legend-available {
  background: var(--panel-muted);
}

.calendar-legend-partial {
  background: rgba(217, 164, 65, 0.22);
}

.calendar-legend-full {
  background: rgba(169, 85, 66, 0.24);
}

.calendar-legend-own {
  background: var(--accent-soft);
  box-shadow: 0 0 0 2px rgba(79, 160, 167, 0.22);
}

.calendar-month-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 14px;
}

.calendar-month-grid-detailed {
  grid-template-columns: 1fr;
}

.calendar-month-grid-compact {
  grid-template-columns: repeat(2, minmax(220px, 1fr));
}

.calendar-month-card {
  padding: 14px 14px 12px;
  border: 1px solid var(--line);
  border-radius: 20px;
  background: var(--panel-strong);
}

.calendar-month-title {
  margin-bottom: 10px;
  font-size: 0.88rem;
  font-weight: 700;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}

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

.calendar-weekdays {
  margin-bottom: 6px;
}

.calendar-week {
  margin-bottom: 6px;
}

.calendar-week:last-child {
  margin-bottom: 0;
}

.calendar-weekday {
  text-align: center;
  font-size: 0.72rem;
  font-weight: 700;
  color: var(--muted);
  text-transform: uppercase;
}

.calendar-day {
  position: relative;
  width: 100%;
  min-height: 34px;
  aspect-ratio: 1;
  padding: 6px 4px;
  display: flex;
  align-items: center;
  justify-content: center;
  border-radius: 10px;
  border: 1px solid var(--line);
  font-size: 0.84rem;
  font-weight: 700;
  color: var(--text);
  cursor: pointer;
}

.calendar-day-number {
  line-height: 1;
}

.calendar-month-grid-detailed .calendar-day {
  min-height: 108px;
  aspect-ratio: auto;
}

.calendar-month-grid-detailed .calendar-day-detailed {
  padding: 8px 6px 6px;
  display: grid;
  align-content: start;
  justify-items: stretch;
  gap: 6px;
}

.calendar-month-grid-detailed .calendar-day-detailed .calendar-day-number {
  justify-self: start;
}

.calendar-day-details {
  display: grid;
  gap: 5px;
  width: 100%;
  min-width: 0;
}

.calendar-day-detail {
  display: grid;
  gap: 2px;
  min-width: 0;
}

.calendar-day-detail-time,
.calendar-day-detail-name,
.calendar-day-more {
  font-size: 0.56rem;
  font-weight: 600;
  line-height: 1.2;
}

.calendar-day-detail-time {
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}

.calendar-day-detail-name,
.calendar-day-more {
  line-clamp: 1;
  -webkit-line-clamp: 1;
  display: -webkit-box;
  -webkit-box-orient: vertical;
  overflow: hidden;
}

.calendar-day-detail:only-child .calendar-day-detail-name {
  line-clamp: 2;
  -webkit-line-clamp: 2;
}

.calendar-day-detail-name {
  font-weight: 500;
}

.calendar-day-more {
  font-weight: 700;
  white-space: nowrap;
}

.calendar-day-more {
  color: var(--muted);
}

.calendar-day-available {
  background: rgba(255, 255, 255, 0.04);
}

.calendar-day-partial {
  background: rgba(217, 164, 65, 0.24);
  border-color: rgba(217, 164, 65, 0.18);
  color: var(--text);
}

.calendar-day-full {
  background: rgba(169, 85, 66, 0.24);
  border-color: rgba(169, 85, 66, 0.18);
  color: var(--text);
}

.calendar-day-outside {
  background: transparent;
  color: var(--muted);
  border-style: dashed;
  opacity: 0.72;
}

.calendar-day-empty {
  background: transparent;
  border-color: transparent;
  color: transparent;
  opacity: 0;
}

.calendar-day-own {
  border-color: rgba(79, 160, 167, 0.55);
  box-shadow: inset 0 0 0 1px rgba(79, 160, 167, 0.26);
}

.calendar-own-dot {
  position: absolute;
  top: 4px;
  right: 4px;
  width: 6px;
  height: 6px;
  border-radius: 999px;
  background: var(--accent);
}

.calendar-day-today {
  outline: 2px solid rgba(245, 248, 250, 0.86);
  outline-offset: 2px;
}

.calendar-day-past {
  filter: grayscale(0.35);
  opacity: 0.42;
  cursor: default;
}

.single-panel > .section-card {
  grid-column: 1 / -1;
}

.booking-pill,
.day-block,
.stat-card,
.leaderboard-row,
.placeholder-box,
.assistant-box {
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: 20px;
}

.booking-pill {
  width: 100%;
  padding: 16px;
  margin-bottom: 12px;
  display: block;
  text-align: left;
  color: var(--text);
}

.booking-pill-action,
.schedule-row-action {
  cursor: pointer;
}

.booking-pill-action:hover,
.schedule-row-action:hover,
.calendar-day:not(:disabled):hover {
  border-color: rgba(79, 160, 167, 0.5);
}

.booking-date {
  color: var(--muted);
  font-size: 0.9rem;
}

.booking-time {
  margin-top: 8px;
  font-size: 1.05rem;
  font-weight: 700;
}

.booking-label {
  margin-top: 4px;
}

.booking-list-groups {
  display: grid;
  gap: 12px;
}

.booking-list-group {
  padding: 0 0 12px;
  border-bottom: 1px solid var(--line);
}

.booking-list-group:last-child {
  padding-bottom: 0;
  border-bottom: 0;
}

.booking-list-group-header {
  display: grid;
  grid-template-columns: max-content 1fr;
  align-items: center;
  gap: 12px;
  margin-bottom: 10px;
}

.booking-list-group-date {
  justify-self: end;
  white-space: nowrap;
}

.booking-list-group-weekday {
  color: var(--muted);
  font-weight: 700;
}

.schedule-row {
  display: grid;
  grid-template-columns: 108px 1fr;
  gap: 12px;
  padding: 6px 0;
  border-top: 1px solid var(--line);
  width: 100%;
  color: var(--text);
  text-align: left;
  background: transparent;
  border-right: 0;
  border-bottom: 0;
  border-left: 0;
}

.schedule-row:first-of-type {
  border-top: 0;
  padding-top: 0;
}

.schedule-time {
  font-weight: 700;
}

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

.stat-card {
  padding: 18px;
}

.stat-title {
  color: var(--muted);
  font-size: 0.88rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.stat-value {
  margin: 8px 0 10px;
  font-size: clamp(1.8rem, 4vw, 2.5rem);
  font-weight: 700;
}

.leaderboard-layout {
  display: grid;
  grid-template-columns: 240px 1fr;
  gap: 20px;
  align-items: start;
}

.pie-placeholder {
  width: min(240px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  border-radius: 50%;
  background:
    radial-gradient(circle at center, var(--panel-strong) 0 37%, transparent 38%),
    conic-gradient(from 220deg, rgba(47, 125, 132, 0.8), rgba(217, 164, 65, 0.8), rgba(169, 85, 66, 0.8), rgba(47, 125, 132, 0.8));
  border: 1px solid var(--line);
}

.leaderboard-list {
  display: grid;
  gap: 10px;
}

.leaderboard-row {
  display: grid;
  grid-template-columns: 14px 1.5fr 90px 1.2fr;
  gap: 12px;
  align-items: center;
  padding: 14px 16px;
}

.swatch {
  width: 14px;
  height: 14px;
  border-radius: 50%;
}

.leaderboard-value {
  font-weight: 700;
}

.leaderboard-detail {
  color: var(--muted);
  text-align: right;
}

.analytics-source-meta {
  margin: 6px 0 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.45;
  max-width: 720px;
}

.analytics-warning {
  margin-bottom: 16px;
}

.analytics-period-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.analytics-period-card {
  display: block;
  border: 1px solid var(--line);
  background: var(--panel-strong);
  border-radius: 18px;
  color: inherit;
  padding: 16px;
  text-decoration: none;
  transition: border-color 0.18s ease, transform 0.18s ease, background 0.18s ease;
}

.analytics-period-card:hover,
.analytics-period-card:focus-visible {
  background: var(--panel);
  border-color: rgba(79, 160, 167, 0.46);
  transform: translateY(-1px);
}

.analytics-period-card:focus-visible {
  outline: 2px solid rgba(79, 160, 167, 0.72);
  outline-offset: 3px;
}

.analytics-period-card.is-selected {
  border-color: rgba(79, 160, 167, 0.62);
  box-shadow: 0 0 0 1px rgba(79, 160, 167, 0.16) inset;
}

.analytics-period-card-top {
  display: grid;
  grid-template-columns: 1fr max-content;
  gap: 10px;
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.analytics-period-card-top strong {
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 650;
}

.analytics-period-card-main {
  display: grid;
  gap: 6px;
  margin: 16px 0 10px;
  font-size: 1.25rem;
  font-weight: 650;
  line-height: 1.18;
}

.analytics-period-card-detail {
  color: var(--muted);
  font-size: 0.84rem;
  line-height: 1.4;
}

.analytics-maintenance {
  display: grid;
  gap: 18px;
}

.analytics-maintenance-summary-card {
  display: flex;
  gap: 16px;
  align-items: center;
  justify-content: space-between;
  min-width: 0;
  padding: 16px 18px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
}

.analytics-maintenance-summary-card div {
  display: grid;
  gap: 5px;
  min-width: 0;
}

.analytics-maintenance-summary-card span {
  color: var(--muted);
  font-size: 0.82rem;
  font-weight: 650;
  text-transform: uppercase;
  letter-spacing: 0.06em;
}

.analytics-maintenance-summary-card strong {
  color: var(--text);
  font-size: clamp(1.6rem, 2.4vw, 2.3rem);
  line-height: 1.05;
}

.analytics-maintenance-summary-card p {
  margin: 0;
  color: var(--muted);
  font-size: 0.9rem;
  text-align: right;
}

.analytics-maintenance-detail-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(280px, 0.8fr);
  gap: 18px;
  align-items: start;
}

.analytics-maintenance-panel,
.analytics-maintenance-latest {
  min-width: 0;
  display: grid;
  gap: 12px;
}

.analytics-maintenance-panel h3,
.analytics-maintenance-latest h3 {
  margin: 0;
  font-size: 1rem;
}

.analytics-maintenance-trend-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(68px, 1fr));
  gap: 10px;
  align-items: end;
  min-height: 176px;
}

.analytics-maintenance-trend-column {
  display: grid;
  grid-template-rows: 108px auto auto auto;
  gap: 6px;
  min-width: 0;
}

.analytics-insight-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 12px;
}

.analytics-insight-tile {
  display: grid;
  align-content: start;
  gap: 8px;
  min-width: 0;
  min-height: 168px;
  padding: 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
}

.analytics-insight-tile > span {
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}

.analytics-insight-tile strong {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: 1.35rem;
  font-weight: 650;
  line-height: 1.16;
}

.analytics-insight-tile div {
  font-weight: 650;
  line-height: 1.3;
}

.analytics-insight-tile p {
  margin: 0;
  color: var(--muted);
  font-size: 0.86rem;
  line-height: 1.42;
}

.analytics-bar-list {
  display: grid;
  gap: 12px;
}

.analytics-bar-row {
  display: grid;
  grid-template-columns: minmax(92px, 0.9fr) minmax(160px, 2fr) minmax(74px, max-content);
  gap: 10px 14px;
  align-items: center;
}

.analytics-bar-label {
  font-weight: 650;
  min-width: 0;
}

.analytics-bar-track {
  height: 12px;
  overflow: hidden;
  border-radius: 999px;
  background: var(--panel-strong);
  border: 1px solid var(--line);
}

.analytics-bar-fill {
  display: block;
  height: 100%;
  border-radius: inherit;
}

.analytics-bar-value {
  font-weight: 650;
  white-space: nowrap;
}

.analytics-bar-detail {
  grid-column: 2 / -1;
  color: var(--muted);
  font-size: 0.88rem;
}

.analytics-trend-chart {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(72px, 1fr));
  gap: 12px;
  align-items: end;
  min-height: 188px;
}

.analytics-trend-column {
  display: grid;
  grid-template-rows: 118px auto auto auto;
  gap: 6px;
  min-width: 0;
}

.analytics-trend-bar-shell {
  display: flex;
  align-items: flex-end;
  min-height: 118px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
  overflow: hidden;
}

.analytics-trend-bar {
  display: block;
  width: 100%;
  background: linear-gradient(180deg, rgba(79, 160, 167, 0.9), rgba(47, 125, 132, 0.86));
}

.analytics-trend-label,
.analytics-trend-value,
.analytics-trend-count {
  text-align: center;
  font-size: 0.84rem;
}

.analytics-trend-label {
  color: var(--muted);
}

.analytics-trend-value {
  font-weight: 650;
}

.analytics-trend-count {
  color: var(--muted);
  font-size: 0.76rem;
}

.analytics-trend-summary {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 10px;
  margin-bottom: 18px;
}

.analytics-trend-summary > div {
  display: grid;
  gap: 4px;
  padding: 12px;
  border: 1px solid var(--line);
  border-radius: 16px;
  background: var(--panel-strong);
}

.analytics-trend-summary span {
  color: var(--muted);
  font-size: 0.74rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.analytics-trend-summary strong {
  font-size: 1.05rem;
  font-weight: 650;
}

.analytics-heatmap {
  display: grid;
  gap: 16px;
}

.analytics-heatmap-period {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.analytics-heatmap-controls {
  display: grid;
  grid-template-columns: minmax(180px, max-content) minmax(0, 1fr);
  gap: 14px 18px;
  align-items: start;
}

.analytics-heatmap-control {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}

.analytics-heatmap-control legend {
  margin-bottom: 8px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.analytics-heatmap-metric {
  display: flex;
  flex-wrap: wrap;
  gap: 8px;
}

.analytics-heatmap-metric legend {
  flex-basis: 100%;
}

.analytics-heatmap-choice,
.analytics-heatmap-user-option {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  min-width: 0;
  color: var(--text);
  font-weight: 650;
}

.analytics-heatmap-choice {
  padding: 9px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-strong);
}

.analytics-heatmap-choice:has(input:checked) {
  border-color: rgba(79, 160, 167, 0.54);
  background: rgba(79, 160, 167, 0.14);
}

.analytics-heatmap-users {
  display: grid;
  gap: 8px;
}

.analytics-heatmap-user-all {
  width: fit-content;
}

.analytics-heatmap-user-list {
  display: flex;
  flex-wrap: wrap;
  gap: 8px 14px;
  max-height: 112px;
  overflow: auto;
  padding: 2px 2px 4px;
}

.analytics-heatmap-user-option span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-heatmap-summary {
  display: flex;
  flex-wrap: wrap;
  gap: 6px 12px;
  align-items: baseline;
}

.analytics-heatmap-summary strong {
  font-size: 1.08rem;
  font-weight: 650;
}

.analytics-heatmap-summary span {
  color: var(--muted);
}

.analytics-heatmap-wrap {
  border-radius: 12px;
}

.analytics-heatmap-table {
  min-width: 920px;
  table-layout: fixed;
}

.analytics-weekday-heatmap-table {
  min-width: 620px;
}

.analytics-heatmap-table th,
.analytics-heatmap-table td {
  text-align: center;
}

.analytics-heatmap-table th:first-child,
.analytics-heatmap-table td:first-child {
  width: 86px;
}

.analytics-heatmap-table tbody th {
  color: var(--muted);
  font-size: 1rem;
  font-weight: 750;
  letter-spacing: 0.02em;
  background: var(--panel-strong);
}

.analytics-heatmap-cell {
  height: 48px;
  background: rgba(47, 125, 132, var(--heatmap-alpha, 0));
  color: var(--text);
  font-size: 1rem;
  font-weight: 650;
  transition: background-color 0.18s ease, color 0.18s ease;
}

.analytics-heatmap-cell.is-empty {
  background: var(--panel);
  color: transparent;
}

.analytics-heatmap-cell.is-strong {
  color: #fff;
}

.analytics-table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: 18px;
}

.analytics-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}

.analytics-table th,
.analytics-table td {
  padding: 10px 12px;
  border-bottom: 1px solid var(--line);
  text-align: left;
  vertical-align: middle;
  white-space: nowrap;
}

.analytics-table th {
  color: var(--muted);
  font-size: 0.72rem;
  text-transform: uppercase;
  letter-spacing: 0.08em;
  background: var(--panel-strong);
}

.analytics-table-users th:nth-child(1),
.analytics-table-users td:nth-child(1) {
  width: 34%;
}

.analytics-table-users td:nth-child(n + 2),
.analytics-table-users th:nth-child(n + 2) {
  text-align: right;
}

.analytics-table-maintenance th:nth-child(1),
.analytics-table-maintenance td:nth-child(1) {
  width: 120px;
}

.analytics-table-maintenance th:nth-child(2),
.analytics-table-maintenance td:nth-child(2) {
  width: 160px;
}

.analytics-table-maintenance th:nth-child(3),
.analytics-table-maintenance td:nth-child(3) {
  white-space: normal;
}

.analytics-table-maintenance th:nth-child(4),
.analytics-table-maintenance td:nth-child(4) {
  width: 110px;
  text-align: right;
}

.analytics-table-recency th:nth-child(n + 2),
.analytics-table-recency td:nth-child(n + 2) {
  text-align: right;
}

.analytics-recency-member {
  display: grid;
  gap: 3px;
  min-width: 0;
}

.analytics-recency-member strong,
.analytics-recency-member span {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
}

.analytics-recency-member span {
  color: var(--muted);
  font-size: 0.82rem;
}

.analytics-recency-status {
  display: inline-grid;
  min-width: 78px;
  justify-content: center;
  padding: 5px 9px;
  border: 1px solid var(--line);
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 650;
}

.analytics-recency-status-current {
  border-color: rgba(79, 160, 167, 0.44);
  background: rgba(79, 160, 167, 0.14);
}

.analytics-recency-status-recent {
  border-color: rgba(217, 164, 65, 0.46);
  background: rgba(217, 164, 65, 0.14);
}

.analytics-recency-status-dormant {
  border-color: rgba(187, 101, 71, 0.46);
  background: rgba(187, 101, 71, 0.14);
}

.analytics-table tbody tr:last-child td {
  border-bottom: 0;
}

.analytics-airfield-summary {
  display: grid;
  grid-template-columns: minmax(190px, 260px) minmax(0, 1fr);
  gap: 26px;
  align-items: center;
}

.analytics-airfield-controls {
  display: flex;
  justify-content: flex-end;
}

.analytics-chart-period,
.analytics-table-period,
.analytics-airfield-period {
  margin: 4px 0 0;
  color: var(--muted);
  font-size: 0.82rem;
}

.analytics-airfield-control {
  display: grid;
  gap: 5px;
  color: var(--muted);
  font-size: 0.74rem;
  font-weight: 650;
  letter-spacing: 0.07em;
  text-transform: uppercase;
}

.analytics-airfield-control select {
  min-width: 176px;
  padding: 10px 12px;
  border: 1px solid var(--line);
  border-radius: 10px;
  background: var(--panel-strong);
  color: var(--text);
  font: inherit;
  letter-spacing: 0;
  text-transform: none;
}

.analytics-airfield-pie {
  position: relative;
  display: grid;
  place-items: center;
  width: min(240px, 100%);
  aspect-ratio: 1;
  margin: 0 auto;
  border: 1px solid var(--line);
  border-radius: 50%;
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.03);
}

.analytics-airfield-pie-center {
  display: grid;
  place-items: center;
  width: 46%;
  aspect-ratio: 1;
  border-radius: 50%;
  background: var(--panel);
  border: 1px solid var(--line);
}

.analytics-airfield-pie-center strong {
  font-size: 1.45rem;
  font-weight: 650;
  line-height: 1;
}

.analytics-airfield-pie-center span {
  color: var(--muted);
  font-size: 0.78rem;
}

.analytics-airfield-tooltip {
  position: absolute;
  z-index: 2;
  left: 50%;
  top: 50%;
  transform: translate(-50%, calc(-100% - 10px));
  max-width: min(220px, 86vw);
  padding: 7px 10px;
  border: 1px solid var(--line);
  border-radius: 8px;
  background: var(--panel-strong);
  box-shadow: 0 12px 30px rgba(15, 23, 42, 0.22);
  color: var(--text);
  font-size: 0.8rem;
  font-weight: 650;
  line-height: 1.25;
  pointer-events: none;
  white-space: nowrap;
}

.analytics-airfield-tooltip[hidden] {
  display: none;
}

.analytics-airfield-list {
  display: grid;
  gap: 9px;
}

.analytics-airfield-row {
  display: grid;
  grid-template-columns: 12px minmax(0, 1fr) max-content 48px;
  gap: 12px;
  align-items: center;
  min-width: 0;
  padding: 8px 0;
  border-bottom: 1px solid var(--line);
}

.analytics-airfield-row:last-child {
  border-bottom: 0;
}

.analytics-airfield-swatch {
  width: 12px;
  height: 12px;
  border-radius: 50%;
}

.analytics-airfield-name {
  min-width: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.analytics-airfield-count {
  font-weight: 650;
}

.analytics-airfield-percent {
  color: var(--muted);
  text-align: right;
}

.analytics-airfield-empty {
  padding: 10px 0;
}

.empty-state,
.placeholder-box {
  padding: 18px;
  color: var(--muted);
}

.empty-state-with-action {
  display: grid;
  gap: 12px;
  justify-items: start;
}

.empty-state-action {
  color: var(--text);
}

.hero-card .aircraft-illustration {
  max-height: 250px;
  transform: scale(1.08);
  transform-origin: center;
}

.assistant-box {
  padding: 16px;
  display: grid;
  gap: 12px;
}

.assistant-box textarea {
  min-height: 160px;
  resize: vertical;
  line-height: 1.5;
}

.ai-chat-toggle {
  position: relative;
  display: inline-grid;
  place-items: center;
  width: 38px;
  height: 38px;
  border: 0;
  border-radius: 50%;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
}

.ai-chat-toggle input {
  position: absolute;
  inline-size: 1px;
  block-size: 1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
}

.ai-chat-toggle span:not(.sr-only) {
  display: inline-grid;
  place-items: center;
}

.ai-chat-toggle svg {
  width: 21px;
  height: 21px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.ai-text-toggle span:not(.sr-only) {
  font-size: 0.72rem;
  font-weight: 800;
  letter-spacing: 0;
  line-height: 1;
}

.ai-chat-toggle:hover,
.ai-chat-toggle:focus-within {
  background: var(--panel-muted);
  color: var(--text);
}

.ai-chat-toggle:has(input:checked) {
  background: rgba(79, 160, 167, 0.16);
  color: var(--accent);
}

.ai-chat-toggle:has(input:disabled) {
  cursor: not-allowed;
  opacity: 0.56;
}

.sr-only {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
  border: 0;
}

.ai-chat-card {
  display: grid;
  gap: 16px;
}

.ai-auth-panel {
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-muted);
}

.ai-auth-panel {
  display: grid;
  grid-template-columns: minmax(0, 1fr) max-content max-content;
  gap: 14px;
  align-items: center;
  padding: 16px;
}

.ai-auth-copy {
  display: grid;
  gap: 8px;
  min-width: 0;
}

.ai-auth-panel p {
  margin: 4px 0 0;
  color: var(--muted);
  line-height: 1.5;
}

.ai-auth-panel a {
  color: var(--accent);
  font-weight: 650;
  overflow-wrap: anywhere;
}

.ai-auth-title {
  font-weight: 700;
}

.ai-auth-open-link {
  color: var(--text);
  justify-self: start;
  text-decoration: none;
}

.ai-auth-url,
.ai-auth-help {
  font-size: 0.88rem;
}

.ai-auth-code-block {
  display: grid;
  gap: 6px;
  justify-items: start;
}

.ai-auth-code-label {
  color: var(--muted);
  font-size: 0.78rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: 0.08em;
}

.ai-device-code {
  padding: 10px 14px;
  border: 1px solid var(--line);
  border-radius: 14px;
  background: var(--panel-strong);
  font-size: 1.15rem;
  font-weight: 800;
  letter-spacing: 0.12em;
}

.ai-chat-transcript {
  max-height: 520px;
  overflow: auto;
  display: grid;
  gap: 14px;
  padding: 4px;
}

.ai-chat-transcript-empty {
  max-height: none;
}

.ai-chat-message {
  display: flex;
  flex-direction: column;
  gap: 6px;
  align-items: flex-start;
  max-width: min(760px, 100%);
}

.ai-chat-message-user {
  justify-self: end;
  align-items: flex-end;
}

.ai-chat-message-assistant {
  justify-self: start;
}

.ai-chat-meta {
  display: flex;
  gap: 8px;
  align-items: center;
  justify-content: space-between;
  color: var(--muted);
  font-size: 0.8rem;
}

.ai-chat-meta span {
  color: var(--text);
  font-weight: 700;
}

.ai-chat-meta-actions {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-left: auto;
}

.ai-chat-copy-button {
  width: 22px;
  height: 22px;
  font-size: 0.68rem;
  flex: 0 0 auto;
}

.ai-chat-bubble {
  width: fit-content;
  max-width: 100%;
  padding: 14px 16px;
  border: 1px solid var(--line);
  border-radius: 18px;
  background: var(--panel-strong);
  line-height: 1.55;
  overflow-wrap: anywhere;
}

.ai-chat-bubble p,
.ai-chat-bubble h1,
.ai-chat-bubble h2,
.ai-chat-bubble h3,
.ai-chat-bubble h4,
.ai-chat-bubble h5,
.ai-chat-bubble h6,
.ai-chat-bubble ul,
.ai-chat-bubble ol,
.ai-chat-bubble blockquote,
.ai-chat-bubble table,
.ai-chat-bubble pre {
  margin: 0 0 10px;
}

.ai-chat-bubble p:last-child,
.ai-chat-bubble h1:last-child,
.ai-chat-bubble h2:last-child,
.ai-chat-bubble h3:last-child,
.ai-chat-bubble h4:last-child,
.ai-chat-bubble h5:last-child,
.ai-chat-bubble h6:last-child,
.ai-chat-bubble ul:last-child,
.ai-chat-bubble ol:last-child,
.ai-chat-bubble blockquote:last-child,
.ai-chat-bubble table:last-child,
.ai-chat-bubble pre:last-child {
  margin-bottom: 0;
}

.ai-chat-bubble h1,
.ai-chat-bubble h2,
.ai-chat-bubble h3,
.ai-chat-bubble h4,
.ai-chat-bubble h5,
.ai-chat-bubble h6 {
  font-size: 1rem;
  line-height: 1.35;
}

.ai-chat-bubble a {
  color: var(--accent-strong);
  text-decoration: underline;
  text-underline-offset: 2px;
}

.ai-chat-bubble ul,
.ai-chat-bubble ol {
  padding-left: 20px;
}

.ai-chat-bubble blockquote {
  padding-left: 12px;
  border-left: 3px solid var(--line);
  color: var(--muted);
}

.ai-chat-bubble table {
  display: block;
  width: 100%;
  overflow-x: auto;
  border-collapse: collapse;
  white-space: nowrap;
}

.ai-chat-bubble th,
.ai-chat-bubble td {
  padding: 8px 10px;
  border: 1px solid var(--line);
  text-align: left;
  vertical-align: top;
}

.ai-chat-bubble th {
  background: var(--panel-muted);
  color: var(--text);
  font-weight: 750;
}

.ai-chat-bubble code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, monospace;
  font-size: 0.92em;
  background: rgba(255, 255, 255, 0.5);
  border-radius: 4px;
  padding: 1px 4px;
}

.ai-chat-bubble pre {
  overflow-x: auto;
  background: rgba(255, 255, 255, 0.55);
  border: 1px solid var(--line);
  border-radius: 8px;
  padding: 10px;
}

.ai-chat-bubble pre code {
  display: block;
  background: transparent;
  padding: 0;
}

.ai-chat-message-user .ai-chat-bubble {
  background: rgba(79, 160, 167, 0.14);
  border-color: rgba(79, 160, 167, 0.34);
}

.ai-chat-message-pending .ai-chat-bubble {
  display: inline-flex;
  gap: 10px;
  align-items: center;
  justify-self: start;
  width: max-content;
  max-width: 100%;
  color: var(--muted);
}

.ai-typing-dots {
  display: inline-flex;
  gap: 4px;
  align-items: center;
}

.ai-typing-dots span {
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: currentColor;
  opacity: 0.36;
  animation: ai-typing-dot 1.1s infinite ease-in-out;
}

.ai-typing-dots span:nth-child(2) {
  animation-delay: 0.16s;
}

.ai-typing-dots span:nth-child(3) {
  animation-delay: 0.32s;
}

@keyframes ai-typing-dot {
  0%,
  80%,
  100% {
    transform: translateY(0);
    opacity: 0.36;
  }

  40% {
    transform: translateY(-3px);
    opacity: 0.9;
  }
}

.tab-link .ai-tab-pending-dots,
.tab-link .ai-tab-unread-dot {
  display: none;
}

.tab-link.ai-tab-pending .ai-tab-pending-dots {
  display: inline-flex;
}

.tab-link.ai-tab-pending .ai-tab-pending-dots span {
  width: 5px;
  height: 5px;
}

.tab-link.ai-tab-unread .ai-tab-unread-dot {
  display: inline-block;
  width: 8px;
  height: 8px;
  border-radius: 50%;
  background: var(--accent);
  box-shadow: 0 0 0 3px rgba(79, 160, 167, 0.18);
}

.ai-chat-actions {
  display: flex;
  gap: 10px;
  justify-content: space-between;
  align-items: center;
  flex-wrap: wrap;
}

.ai-chat-tools,
.ai-chat-submit-actions {
  display: flex;
  gap: 10px;
  align-items: center;
  flex-wrap: wrap;
}

.ai-chat-submit-button {
  width: 46px;
  height: 46px;
  padding: 0;
  border-radius: 50%;
}

.ai-chat-submit-button svg {
  width: 22px;
  height: 22px;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 2.3;
}

.ai-chat-submit-button .ai-chat-stop-icon {
  display: none;
}

.ai-chat-card[data-ai-chat-pending="true"] .ai-chat-submit-icon {
  display: none;
}

.ai-chat-card[data-ai-chat-pending="true"] .ai-chat-stop-icon {
  display: block;
}

@media (max-width: 980px) {
  .tech-log-form-grid {
    grid-template-columns: repeat(4, minmax(0, 1fr));
  }

  .tech-log-view-segmented {
    margin-left: 0;
    width: 100%;
  }

  .tech-log-table-wrap {
    background: transparent;
    border: 0;
    overflow: visible;
  }

  table.tech-log-table {
    display: block;
    min-width: 0;
  }

  .tech-log-table thead,
  .tech-log-table tfoot {
    display: none;
  }

  .tech-log-table tbody {
    display: grid;
    gap: 10px;
  }

  .tech-log-table tbody tr {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
  }

  .tech-log-table tbody td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: grid;
    gap: 3px;
    padding: 9px 10px;
    white-space: normal;
  }

  .tech-log-table tbody td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .tech-log-table tbody td:nth-child(14),
  .tech-log-table tbody td:nth-child(16),
  .tech-log-table tbody td:nth-child(18),
  .tech-log-table tbody td:last-child {
    grid-column: 1 / -1;
  }

  .tech-log-table tbody td:last-child {
    text-align: left;
  }

  .login-shell,
  .hero-grid,
  .panel-grid,
  .overview-layout,
  .overview-bottom-grid,
  .analytics-layout,
  .analytics-dashboard,
  .analytics-section,
  .checklist-layout,
  .documents-layout {
    grid-template-columns: 1fr;
  }

  .aircraft-detail-panel {
    display: block;
  }

  .aircraft-detail-panel > .card + .card {
    margin-top: 20px;
  }

  .aircraft-detail-panel > .aircraft-reference-section {
    margin-top: 20px;
  }

  .tab-strip {
    flex-wrap: nowrap;
    overflow-x: auto;
    padding-bottom: 6px;
    scrollbar-width: thin;
    -webkit-overflow-scrolling: touch;
  }

  .tab-link {
    flex: 0 0 auto;
  }

  .checklist-hero {
    display: grid;
  }

  .checklist-hero-actions,
  .checklist-install-actions {
    justify-content: flex-start;
  }

  .checklist-install-panel {
    display: grid;
    grid-template-columns: 1fr;
  }

  .checklist-phase-tabs {
    position: static;
  }

  .checklist-phase-list {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 6px;
  }

  .checklist-phase-link {
    min-width: 0;
  }

  .checklist-phase-link.active {
    order: -1;
  }

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

  .checklist-reference {
    position: static;
  }

  .cockpit-checklist-topbar,
  .cockpit-checklist-layout {
    grid-template-columns: 1fr;
  }

  .cockpit-checklist-layout {
    grid-template-rows: auto auto;
  }

  .cockpit-checklist-topbar {
    position: relative;
  }

  .cockpit-checklist-title {
    padding-right: min(220px, 42vw);
  }

  .cockpit-checklist-actions {
    justify-items: start;
    max-width: none;
  }

  .cockpit-checklist-status {
    position: absolute;
    top: 16px;
    right: 16px;
    max-width: min(220px, 42vw);
    justify-content: flex-end;
  }

  .cockpit-checklist-action-buttons {
    justify-content: flex-start;
  }

  .cockpit-update-notice {
    align-items: stretch;
    flex-direction: column;
  }

  .cockpit-update-notice-actions {
    justify-content: flex-start;
  }

  .cockpit-checklist-shell[data-checklist-standalone="true"] .cockpit-checklist-title {
    padding-right: 0;
  }

  .cockpit-checklist-shell[data-checklist-standalone="true"] .brand-mark,
  .cockpit-checklist-shell[data-checklist-standalone="true"] .cockpit-checklist-title h1 {
    box-sizing: border-box;
    padding-right: min(220px, 42vw);
  }

  .cockpit-checklist-shell[data-checklist-standalone="true"] .cockpit-checklist-title p {
    max-width: calc(100% - 190px);
    padding-right: 0;
    white-space: nowrap;
    font-size: clamp(0.72rem, 1.9vw, 0.9rem);
    line-height: 1.25;
  }

  .cockpit-checklist-shell[data-checklist-standalone="true"] .cockpit-checklist-action-buttons {
    position: absolute;
    right: 16px;
    bottom: 16px;
    justify-content: flex-end;
    gap: 5px;
  }

  .cockpit-checklist-shell[data-checklist-standalone="true"] .cockpit-icon-button {
    min-width: 42px;
    padding: 10px 8px;
  }

  .cockpit-checklist-shell[data-checklist-standalone="true"] .cockpit-update-button {
    margin-left: 0;
  }

  .cockpit-phase-nav {
    position: static;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    gap: 2px 5px;
    max-height: none;
    overflow: visible;
    padding: 5px;
  }

  .cockpit-phase-button {
    grid-row: var(--phase-mobile-row);
    grid-column: var(--phase-mobile-column);
    grid-template-columns: 22px minmax(0, 1fr) auto;
    gap: 4px;
    min-height: 30px;
    padding: 3px 6px;
    border-radius: 8px;
  }

  .cockpit-phase-index {
    display: block;
    font-size: 0.72rem;
  }

  .cockpit-phase-name {
    font-size: 0.92rem;
    line-height: 1.08;
  }

  .cockpit-phase-progress {
    font-size: 0.82rem;
  }

  .ai-auth-panel {
    grid-template-columns: 1fr;
  }

  .ai-auth-open-link {
    width: 100%;
  }

  .admin-ai-model-grid {
    grid-template-columns: 1fr;
  }

  .ai-auth-code-block,
  .ai-device-code {
    width: 100%;
  }

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

  .analytics-maintenance-detail-grid {
    grid-template-columns: 1fr;
  }

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

  .analytics-airfield-summary {
    grid-template-columns: 1fr;
  }

  .analytics-heatmap-controls {
    grid-template-columns: 1fr;
  }

  .hero-card {
    grid-column: 1 / -1;
    justify-self: stretch;
    width: 100%;
  }

  .hero-card,
  .leaderboard-layout {
    grid-template-columns: 1fr;
  }

  .calendar-month-grid-detailed .calendar-day {
    min-height: 100px;
  }

  .calendar-month-grid-compact {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 720px) {
  .page-login,
  .page-dashboard {
    padding: 16px;
    padding: max(16px, env(safe-area-inset-top))
      max(16px, env(safe-area-inset-right))
      max(16px, env(safe-area-inset-bottom))
      max(16px, env(safe-area-inset-left));
  }

  .modal-backdrop {
    place-items: start center;
    padding: 8px;
  }

  .modal-panel-form {
    padding: 20px;
  }

  .booking-modal-panel,
  .tech-log-modal-panel {
    max-height: calc(100vh - 16px);
    max-height: calc(100dvh - 16px);
  }

  .tech-log-modal-content {
    padding: 12px;
  }

  .auth-shell {
    min-height: calc(100vh - 32px);
    align-items: flex-start;
  }

  .auth-panel {
    padding: 24px;
  }

  .auth-panel h1 {
    font-size: 2rem;
  }

  .topbar,
  .section-heading,
  .day-block header,
  .weather-station-header,
  .leaderboard-row {
    grid-template-columns: 1fr;
    display: grid;
  }

  .section-heading-actions {
    justify-content: stretch;
  }

  .tech-log-modal-heading {
    display: flex;
    grid-template-columns: none;
    margin-bottom: 8px;
  }

  .recent-flights-heading-meta {
    display: grid;
    grid-template-columns: 1fr;
  }

  .recent-flights-heading-top {
    display: grid;
    grid-template-columns: 1fr;
    padding-right: 0;
  }

  .recent-flights-time-toggle {
    justify-content: stretch;
  }

  .recent-flights-filters {
    justify-content: stretch;
  }

  .tech-log-view-segmented {
    margin-left: 0;
    width: 100%;
  }

  .tech-log-submission-summary,
  .tech-log-form-actions {
    display: grid;
    grid-template-columns: 1fr;
    justify-items: stretch;
  }

  .tech-log-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    gap: 8px;
  }

  .tech-log-modal-panel .tech-log-form-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .tech-log-comments-field {
    grid-column: 1 / -1;
  }

  .tech-log-submission-panel {
    padding: 12px;
  }

  .tech-log-submission-item {
    align-items: stretch;
    display: grid;
  }

  .tech-log-submission-item-main {
    align-items: flex-start;
  }

  .tech-log-submission-item .tech-log-row-actions {
    justify-content: flex-start;
  }

  .tech-log-table-wrap {
    background: transparent;
    border: 0;
    overflow: visible;
  }

  table.tech-log-table {
    display: block;
    min-width: 0;
  }

  .tech-log-table thead,
  .tech-log-table tfoot {
    display: none;
  }

  .tech-log-table tbody {
    display: grid;
    gap: 10px;
  }

  .tech-log-table tbody tr {
    background: rgba(255, 255, 255, 0.025);
    border: 1px solid var(--line);
    border-radius: 12px;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    overflow: hidden;
  }

  .tech-log-table tbody td {
    border-bottom: 1px solid rgba(255, 255, 255, 0.05);
    display: grid;
    gap: 3px;
    padding: 9px 10px;
    white-space: normal;
  }

  .tech-log-table tbody td::before {
    color: var(--muted);
    content: attr(data-label);
    font-size: 0.68rem;
    font-weight: 750;
    letter-spacing: 0.07em;
    text-transform: uppercase;
  }

  .tech-log-table tbody td:nth-child(14),
  .tech-log-table tbody td:nth-child(16),
  .tech-log-table tbody td:nth-child(18) {
    grid-column: 1 / -1;
  }

  .tech-log-table tbody td:last-child {
    grid-column: 1 / -1;
    text-align: left;
  }

  .calendar-feed-row,
  .calendar-feed-url-row {
    grid-template-columns: 1fr;
  }

  .calendar-feed-actions {
    justify-self: start;
  }

  .admin-debug-copy {
    align-items: flex-start;
  }

  .admin-debug-session-row {
    align-items: flex-start;
  }

  .admin-debug-file-log-form {
    grid-template-columns: 1fr;
  }

  .admin-log-stats {
    grid-template-columns: 1fr;
  }

  .recent-flights-refresh-block {
    position: static;
  }

  .refresh-status-block {
    align-items: stretch;
  }

  .refresh-meta {
    text-align: left;
    white-space: normal;
  }

  .booking-overview-actions,
  .booking-summary-actions {
    justify-items: start;
    width: 100%;
  }

  .booking-action-icon-row {
    justify-content: flex-start;
  }

  .booking-overview-actions .refresh-status-block,
  .booking-summary-actions .refresh-status-block {
    justify-self: start;
    align-items: flex-start;
  }

  .booking-overview-actions .booking-range-segmented {
    justify-self: stretch;
  }

  .topbar-actions {
    width: auto;
    justify-self: start;
    flex-wrap: nowrap;
    border-radius: 999px;
  }

  .topbar-menu,
  .theme-menu {
    width: auto;
    flex: 0 0 auto;
  }

  .menu-trigger,
  .theme-trigger {
    width: auto;
    min-width: 44px;
    height: 44px;
    padding: 0 12px;
  }

  .account-trigger {
    width: 44px;
    padding: 0;
  }

  .admin-back-link {
    width: auto;
    padding: 12px 14px;
  }

  .menu-panel,
  .theme-dropdown {
    left: 0;
    right: auto;
    width: min(100%, 280px);
  }

  .tab-strip {
    margin-inline: -4px;
    padding-inline: 4px;
  }

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

  .analytics-period-grid,
  .analytics-insight-grid,
  .analytics-bar-row {
    grid-template-columns: 1fr;
  }

  .analytics-maintenance-summary-card {
    align-items: flex-start;
    flex-direction: column;
  }

  .analytics-maintenance-summary-card p {
    text-align: left;
  }

  .analytics-section-nav {
    position: static;
  }

  .analytics-section-nav a {
    flex: 1 1 calc(50% - 8px);
  }

  .analytics-section-heading {
    grid-template-columns: 1fr;
  }

  .analytics-members-period-control {
    justify-items: stretch;
  }

  .analytics-period-segmented {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
  }

  .analytics-airfield-controls,
  .analytics-airfield-control,
  .analytics-airfield-control select {
    width: 100%;
  }

  .analytics-heatmap-metric,
  .analytics-heatmap-choice,
  .analytics-heatmap-user-list {
    width: 100%;
  }

  .analytics-heatmap-choice {
    justify-content: center;
  }

  .analytics-heatmap-user-list {
    display: grid;
    grid-template-columns: 1fr;
    max-height: 156px;
  }

  .analytics-bar-detail {
    grid-column: auto;
  }

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

  .analytics-maintenance-trend-chart {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

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

  .analytics-table th,
  .analytics-table td {
    padding: 9px 10px;
    font-size: 0.9rem;
  }

  .analytics-airfield-row {
    grid-template-columns: 12px minmax(0, 1fr) max-content;
  }

  .analytics-airfield-percent {
    display: none;
  }

  .weather-report-grid {
    grid-template-columns: 1fr;
  }

  .hero-card {
    overflow: hidden;
    padding: 20px 18px;
    gap: 10px;
  }

  .hero-refresh-block {
    position: static;
    order: 1;
    justify-self: end;
    max-width: 100%;
  }

  .hero-card .aircraft-illustration {
    order: 2;
    width: min(100%, 320px);
    max-height: 150px;
    max-width: 100%;
    transform: none;
  }

  .hero-card .hero-meta {
    order: 3;
    min-width: 0;
    padding-left: 0;
  }

  .hero-meta h2 {
    font-size: 1.75rem;
    line-height: 1.08;
    overflow-wrap: anywhere;
  }

  .aircraft-serviceability-row,
  .aircraft-detail-row {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .tracking-flight-rows {
    margin-left: 0;
  }

  .tracking-flight-row {
    grid-template-columns: 78px minmax(0, 1fr);
    row-gap: 2px;
  }

  .tracking-flight-row-time {
    grid-column: 2;
    white-space: normal;
  }

  .checklist-phase-tabs-header {
    align-items: flex-start;
  }

  .checklist-reference-panel {
    grid-template-columns: 1fr;
  }

  .checklist-item {
    grid-template-columns: 22px minmax(0, 1fr);
  }

  .checklist-response,
  .checklist-note {
    grid-column: 2;
  }

  .checklist-reference-card {
    padding: 16px;
  }

  .cockpit-checklist-shell {
    padding:
      max(10px, env(safe-area-inset-top))
      max(10px, env(safe-area-inset-right))
      max(10px, env(safe-area-inset-bottom))
      max(10px, env(safe-area-inset-left));
  }

  .cockpit-phase-nav,
  .cockpit-reference-grid {
    grid-template-columns: 1fr;
  }

  .cockpit-checklist-item {
    grid-template-columns: 30px minmax(0, 1fr);
  }

  .cockpit-checklist-response,
  .cockpit-checklist-note {
    grid-column: 2;
  }

  .cockpit-section-heading {
    display: grid;
  }

  .documents-preview-header {
    display: grid;
    grid-template-columns: 1fr;
  }

  .documents-refresh-block {
    align-items: flex-start;
  }

  .documents-refresh-form {
    justify-content: flex-start;
  }

  .documents-sort-control {
    justify-items: start;
    min-width: 0;
    width: 100%;
  }

  .documents-sort-segmented {
    display: grid;
    grid-template-columns: 1fr;
    width: 100%;
  }

  .documents-list {
    max-height: 320px;
  }

  .documents-preview-actions {
    justify-content: flex-start;
  }

  .documents-preview-body,
  .documents-preview-frame {
    min-height: 420px;
  }

  .booking-range-segmented {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    width: 100%;
    border-radius: 20px;
  }

  .booking-range-segmented .segment {
    justify-content: center;
    min-height: 42px;
    padding: 9px 10px;
  }

  .calendar-month-grid {
    grid-template-columns: 1fr;
  }

  .calendar-toolbar {
    align-items: flex-start;
  }

  .calendar-legend {
    gap: 10px 12px;
    font-size: 0.78rem;
  }

  .calendar-month-card {
    padding: 12px;
    border-radius: 18px;
  }

  .calendar-weekdays,
  .calendar-week {
    gap: 4px;
  }

  .calendar-month-grid-detailed .calendar-day {
    min-height: 42px;
    aspect-ratio: 1;
  }

  .calendar-month-grid-detailed .calendar-day-detailed {
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 4px;
  }

  .calendar-month-grid-detailed .calendar-day-detailed .calendar-day-number {
    justify-self: center;
  }

  .calendar-day-details {
    position: absolute;
    width: 1px;
    height: 1px;
    margin: -1px;
    padding: 0;
    overflow: hidden;
    clip: rect(0 0 0 0);
    white-space: nowrap;
    border: 0;
  }

  .overview-sidebar > .section-card,
  .overview-main > .section-card {
    min-width: 0;
  }

  .booking-list-group-header {
    grid-template-columns: 1fr;
    gap: 4px;
  }

  .booking-list-group-date {
    justify-self: start;
    white-space: normal;
  }

  .booking-date-picker-months,
  .booking-action-form {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .booking-type-field,
  .booking-time-detail-fields {
    grid-column: 1 / -1;
  }

  .booking-hour-range {
    grid-template-columns: repeat(6, minmax(0, 1fr));
  }

  .booking-date-picker-months {
    gap: 14px;
  }

  .booking-date-picker-months::before {
    display: none;
  }

  .schedule-row {
    grid-template-columns: 1fr;
  }

  .leaderboard-row {
    gap: 8px;
  }

  .leaderboard-detail {
    text-align: left;
  }
}
