:root {
  --bg: #000000;
  --panel: #161618;
  --panel-2: #1c1c1e;
  --line: #2a2a2e;
  --text: #ffffff;
  --muted: #9a9aa0;
  --faint: #6b6b73;
  --accent: #a5b4fc;
  --accent-text: #0a0a0c;
  --role: #2c4eb3;
  --green: #3ecf8e;
  --amber: #f0a83c;
  --red: #ef6a5c;
  --side: #000000;
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
html, body { margin: 0; min-height: 100%; overflow-x: hidden; max-width: 100%; }
body {
  background: var(--bg);
  color: var(--text);
  font-family: Inter, system-ui, sans-serif;
}
body.nav-open { overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
a:hover { color: #c4cdf9; }
.mono, .input.mono, td.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }

.shell { display: grid; grid-template-columns: 220px 1fr; min-height: 100vh; min-width: 0; }
.sidebar {
  background: var(--side);
  border-right: 1px solid var(--line);
  padding: 18px 12px;
  display: flex;
  flex-direction: column;
  gap: 18px;
  overflow-y: auto;
}
.brand { display: flex; gap: 10px; align-items: center; color: var(--text); padding: 4px 8px 8px; }
.brand strong { display: block; font-size: 15px; }
.brand small { color: var(--muted); font-size: 11px; }
.brand-mark {
  width: 36px; height: 36px; border-radius: 10px;
  background: linear-gradient(160deg, #a5b4fc, #7c8cf0);
  display: grid; place-items: center;
  font-weight: 700; color: var(--accent-text); font-size: 13px;
}
.side-nav { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.nav-group { margin-bottom: 4px; }
.nav-group-btn {
  width: 100%; display: flex; align-items: center; gap: 8px;
  background: none; border: 0; color: var(--muted); font: inherit; font-size: 12px;
  font-weight: 600; letter-spacing: .04em; text-transform: uppercase;
  padding: 8px 10px; cursor: pointer; border-radius: 8px;
}
.nav-group-btn:hover { color: var(--text); }
.nav-chevron { width: 14px; height: 14px; margin-left: auto; transition: transform .15s ease; opacity: .7; }
.nav-group.open .nav-chevron { transform: rotate(180deg); }
.nav-sub { display: none; flex-direction: column; gap: 2px; padding: 0 0 6px; }
.nav-group.open .nav-sub { display: flex; }
.nav-item, .side-nav > a {
  display: flex; align-items: center; gap: 9px;
  color: var(--muted); padding: 8px 10px 8px 12px; border-radius: 10px; font-size: 13.5px;
  border-left: 2px solid transparent;
}
.nav-item:hover, .side-nav > a:hover { background: var(--panel-2); color: var(--text); }
.nav-item.active, .side-nav > a.active {
  background: var(--panel-2); color: var(--text);
  border-left-color: var(--accent);
}
.nav-item.top-level { margin-top: 2px; }
.nav-ico { width: 16px; height: 16px; flex-shrink: 0; opacity: .85; }
.link-btn {
  background: none; border: 0; color: var(--muted); cursor: pointer; padding: 0; font: inherit;
  text-decoration: none; display: inline;
}
.link-btn:hover { color: var(--red); }

.main {
  position: relative;
  padding: 22px 28px 60px; max-width: 1400px; min-width: 0;
  overflow-x: hidden;
  overflow-y: visible;
}
.main::before {
  content: "";
  position: absolute; pointer-events: none;
  width: 520px; height: 520px; border-radius: 50%;
  top: -120px; right: -80px;
  background: radial-gradient(circle, rgba(165,180,252,.14) 0%, transparent 68%);
  z-index: 0;
}
.main > * { position: relative; z-index: 1; }
.topbar {
  display: flex; justify-content: space-between; align-items: center; gap: 16px;
  margin-bottom: 18px; flex-wrap: wrap;
  z-index: 60;
}
.topbar h1 { margin: 0; font-size: 24px; letter-spacing: -0.4px; font-weight: 600; }
.topbar-copy { min-width: 0; flex: 1; }
.topbar-sub:empty { display: none; }
.top-actions { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.muted { color: var(--muted); font-size: 13px; overflow-wrap: anywhere; }
.eyebrow { text-transform: uppercase; letter-spacing: 1.4px; font-size: 11px; color: var(--accent); margin: 0 0 8px; }
.icon-btn {
  width: 38px; height: 38px; border-radius: 999px; display: grid; place-items: center;
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
}
.icon-btn:hover { color: var(--text); border-color: var(--accent); }
.personal-menu { position: relative; }
.personal-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel); border: 1px solid var(--line); color: var(--text);
  border-radius: 999px; padding: 8px 12px; font: inherit; font-size: 13px; cursor: pointer;
}
.personal-pill:hover { border-color: var(--accent); }
.personal-drop {
  position: absolute; right: 0; top: calc(100% + 6px); z-index: 80;
  min-width: 180px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.45);
}
.personal-drop[hidden], .add-menu-panel[hidden] { display: none !important; }
.personal-name { font-weight: 600; font-size: 13px; }
.personal-meta { color: var(--faint); font-size: 11px; margin: 2px 0 10px; }
.avatar {
  width: 36px; height: 36px; border-radius: 50%;
  background: var(--panel-2); border: 1px solid var(--line);
  display: grid; place-items: center; font-weight: 600; font-size: 13px; color: var(--accent);
}

.btn {
  background: var(--accent); color: var(--accent-text); border: 0; border-radius: 10px;
  padding: 10px 16px; font-weight: 600; cursor: pointer; font-family: inherit; font-size: 14px;
  display: inline-flex; align-items: center; justify-content: center;
}
.btn:hover { background: #b8c3fd; }
.btn.secondary { background: transparent; color: var(--text); border: 1px solid var(--line); }
.btn.secondary:hover { border-color: var(--accent); }
.btn.small { padding: 7px 12px; font-size: 12px; }
.btn.danger { background: transparent; color: var(--red); border: 1px solid var(--red); }
.input, select.input {
  width: 100%; background: var(--panel-2); border: 1px solid var(--line); border-radius: 8px;
  color: var(--text); padding: 9px 10px; font: inherit;
}
.input[readonly] { opacity: 0.75; cursor: default; }
input[name="licence_number"] { text-transform: uppercase; }
label { display: block; font-size: 12px; color: var(--muted); }
label .input, label select { margin-top: 6px; }

.panel {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 18px; margin-bottom: 16px;
}
.panel h2 { margin: 0 0 10px; font-size: 16px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 10px; }
.panel-head h2 { margin: 0; }

.flash-stack { display: grid; gap: 8px; margin-bottom: 14px; }
.flash { padding: 10px 12px; border-radius: 8px; font-size: 13px; }
.flash-success, .flash-info { background: rgba(63,214,143,.12); color: var(--green); }
.flash-error { background: rgba(239,106,92,.14); color: var(--red); }
.flash-warning {
  background: rgba(245,158,11,.14); color: #fbbf24;
  border: 1px solid rgba(245,158,11,.35);
}

.stats-grid { display: grid; grid-template-columns: 220px 1fr 1fr; gap: 16px; margin-bottom: 16px; min-width: 0; }
.stats-grid > *, .dash-mid > *, .chart-card, .chart-wide, .gauge-card, .chart-box { min-width: 0; }
.chart-card, .chart-wide, .gauge-card { overflow: hidden; }
.dash-page .main { padding: 14px 18px 24px; max-width: 1280px; }
.dash-page .topbar { margin-bottom: 10px; }
.dash-page .topbar h1 { font-size: 20px; }
.dash-page .topbar .muted { font-size: 12px; margin: 2px 0 0; }
.dash-page .stats-grid { grid-template-columns: 150px 1fr 1fr; gap: 8px; margin-bottom: 8px; }
.dash-page .dash-mid { display: grid; grid-template-columns: 1.3fr .9fr; gap: 8px; margin-bottom: 8px; min-width: 0; }
.dash-page .chart-box { height: 132px; position: relative; width: 100%; overflow: hidden; }
.dash-page .chart-card, .dash-page .chart-wide, .dash-page .gauge-card, .dash-page .panel {
  padding: 10px 12px; margin-bottom: 8px; border-radius: 10px;
}
.dash-page .chart-wide { margin-bottom: 0; }
.dash-page .gauge-card { gap: 6px; padding: 10px 8px; }
.dash-page .gauge { width: 108px; height: 108px; }
.dash-page .gauge-inner { width: 84px; height: 84px; }
.dash-page .gauge-inner .val { font-size: 16px; }
.dash-page .cap { font-size: 10px; margin-bottom: 4px; }
.dash-page .chart-box { height: 132px; position: relative; width: 100%; overflow: hidden; }
.dash-page .chart-box-mid { height: 148px; }
.dash-page .kpi-row { gap: 6px; margin-bottom: 8px; }
.dash-page .kpi { padding: 7px 8px; border-radius: 8px; }
.dash-page .kpi span { font-size: 9px; }
.dash-page .kpi strong { font-size: 13px; }
.dash-page .panel-head { margin-bottom: 6px; }
.dash-page .panel-head h2, .dash-page .panel h2 { font-size: 13px; }
.dash-page table.data { font-size: 12px; }
.dash-page table.data th, .dash-page table.data td { padding: 5px 6px; }
.dash-page .empty { padding: 14px; }
.dash-page .dash-tabs { margin-bottom: 10px; padding-bottom: 6px; }
.dash-page .dash-tabs a { font-size: 12px; padding: 6px 10px; }
.dash-page .previous-log { padding: 14px 16px; }
.dash-page .previous-log h2 { font-size: 15px; }
.dash-tabs {
  display: flex; flex-wrap: wrap; gap: 4px;
  margin: -2px 0 12px; padding-bottom: 8px;
  border-bottom: 1px solid var(--line);
}
.dash-tabs a {
  color: var(--muted); padding: 7px 12px; border-radius: 8px; font-size: 13px;
}
.dash-tabs a.active, .dash-tabs a:hover {
  background: var(--panel-2); color: var(--text);
}
.dash-tabs a.active { box-shadow: inset 0 -2px 0 var(--accent); }
.form-grid.times .span-2 { grid-column: 1 / -1; }
.setup-actions { margin: 4px 0 28px; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
body.setup-gate .shell { grid-template-columns: 1fr; }
body.setup-gate .main { max-width: 980px; margin: 0 auto; }
.chart-card, .chart-wide {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
}
.chart-wide { margin-bottom: 16px; }
.gauge-card.glow .gauge {
  box-shadow: 0 0 32px rgba(165,180,252,.18);
}
.kpi-row { display: grid; grid-template-columns: repeat(8, 1fr); gap: 10px; margin-bottom: 16px; }
.gauge-card, .bars-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 18px;
}
.gauge-card { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.cap { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: 1px; }
.gauge {
  width: 150px; height: 150px; border-radius: 50%;
  background: conic-gradient(var(--accent) calc(var(--pct, 0) * 1%), #2a2a2e 0);
  display: grid; place-items: center;
}
.gauge-inner {
  width: 118px; height: 118px; border-radius: 50%; background: var(--panel);
  display: flex; flex-direction: column; align-items: center; justify-content: center;
}
.gauge-inner .val { font-family: "IBM Plex Mono", monospace; font-size: 24px; color: var(--accent); }
.gauge-inner .unit { font-size: 10px; color: var(--muted); }
.bars-card { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 20px; }
.bar-item .top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.bar-item b { color: var(--text); font-family: "IBM Plex Mono", monospace; }
.bar-track { height: 6px; border-radius: 4px; background: #2a2a2e; overflow: hidden; margin-top: 5px; }
.bar-fill { height: 100%; background: var(--accent); width: 42%; }
.bar-fill.amber { background: var(--amber); }
.bar-fill.green { background: var(--green); }

.kpi {
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.kpi span { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; }
.kpi strong { font-family: "IBM Plex Mono", monospace; font-size: 18px; }

table.data, table.log { width: 100%; border-collapse: collapse; font-size: 13px; }
table.data th, table.data td { padding: 9px 8px; border-bottom: 1px solid var(--line); text-align: left; }
table.data th { color: var(--muted); font-size: 11px; text-transform: uppercase; }
.empty { text-align: center; padding: 28px; color: var(--muted); }

.table-wrap { overflow: auto; background: var(--panel); border: 1px solid var(--line); border-radius: 14px; -webkit-overflow-scrolling: touch; max-width: 100%; }
table.log { min-width: 1680px; font-size: 12px; }
table.log th, table.log td {
  border: 1px solid var(--line); padding: 6px 5px; text-align: center; white-space: nowrap;
  font-family: "IBM Plex Mono", monospace;
}
table.log thead th { background: var(--panel-2); color: var(--muted); font-size: 10px; text-transform: uppercase; }
table.log .grp th { background: #0e0e10; color: var(--faint); }
table.log tfoot td { background: var(--panel-2); color: var(--accent); font-weight: 700; }
table.log tr.sim-row td { background: rgba(165, 180, 252, 0.08); }
table.log .remarks { text-align: left; font-family: Inter, sans-serif; }
.empty-row { color: var(--muted); font-style: italic; padding: 18px !important; }

.form-grid { display: grid; grid-template-columns: repeat(2, 1fr); gap: 14px; }
.form-grid.times { grid-template-columns: repeat(4, 1fr); }
.time-group {
  grid-column: span 2;
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin: 0;
  padding: 8px 10px 10px;
  border: 1px solid var(--line);
  border-radius: 10px;
  min-width: 0;
}
.time-group legend {
  font-size: 11px;
  letter-spacing: 0.06em;
  text-transform: uppercase;
  color: var(--muted);
  padding: 0 4px;
}
.span-2, .check-span { grid-column: span 2; }
.check-span { display: flex; align-items: center; gap: 8px; padding-top: 22px; color: var(--text); }

.steps { display: flex; gap: 8px; list-style: none; padding: 0; margin: 0 0 18px; }
.steps li {
  flex: 1; background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  color: var(--muted); font-size: 13px; min-width: 0;
}
.steps li span {
  width: 22px; height: 22px; border-radius: 50%; display: grid; place-items: center;
  background: var(--panel-2); font-size: 11px; font-weight: 700; flex-shrink: 0;
}
.step-jump {
  width: 100%; display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; min-height: 44px; background: none; border: 0;
  color: inherit; font: inherit; text-align: left; cursor: pointer;
  touch-action: manipulation; -webkit-tap-highlight-color: transparent;
}
.step-jump:disabled { cursor: default; opacity: .55; }
.steps li.current { border-color: var(--accent); color: var(--text); }
.steps li.current span { background: var(--accent); color: var(--accent-text); }
.steps li.current .step-jump:disabled { opacity: 1; }
.steps li.done { color: var(--green); }
.steps li.done .step-jump:hover { color: var(--text); }
.wizard-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
.wizard-actions .btn-cancel { order: 1; }
.wizard-actions .btn-back { order: 2; }
.wizard-actions .btn-continue { order: 3; }
.calc-box {
  margin-top: 14px; padding: 10px 12px; border-radius: 8px;
  background: #0e0e10; color: var(--accent); font-family: "IBM Plex Mono", monospace; font-size: 13px;
  overflow-wrap: anywhere;
}
.pill-row { display: flex; gap: 10px; margin-bottom: 14px; }
.pill {
  border: 1px solid var(--line); border-radius: 999px; padding: 8px 14px; color: var(--text); cursor: pointer;
}
.pill:has(input:checked) { border-color: var(--accent); background: rgba(165,180,252,.14); }
.review { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 18px; margin: 0 0 16px; }
.review div { background: #0e0e10; border-radius: 8px; padding: 10px 12px; }
.review dt { font-size: 11px; color: var(--muted); }
.review dd { margin: 4px 0 0; }

.three-col { display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 12px; }
.inline-add { display: flex; gap: 8px; margin-bottom: 10px; }
.chips { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px; }
.chips li {
  display: flex; align-items: center; gap: 6px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 999px;
  padding: 5px 8px 5px 12px; font-size: 12px;
}
.chip-x { background: none; border: 0; color: var(--faint); cursor: pointer; font-size: 16px; }
.chip-x:hover { color: var(--red); }

.search { min-width: 240px; }
.nav-scrim { display: none; }
.sig-row { display: flex; align-items: center; gap: 12px; margin-top: 12px; }
.sig-thumb { height: 42px; background: #fff; border-radius: 6px; }
.sig-thumb.large { height: 70px; max-width: 100%; }
.sig-box { margin-top: 16px; padding-top: 14px; border-top: 1px solid var(--line); }
.sig-tabs { display: flex; flex-wrap: wrap; gap: 6px; margin: 10px 0; }
.sig-tab {
  background: transparent; color: var(--muted); border: 1px solid var(--line);
  border-radius: 999px; padding: 7px 12px; font: inherit; cursor: pointer;
}
.sig-tab.active, .sig-tab:hover { border-color: var(--accent); color: var(--text); background: rgba(165,180,252,.14); }
.sig-type-wrap, .sig-upload-wrap { display: block; margin-bottom: 10px; }
.sig-type-wrap[hidden], .sig-upload-wrap[hidden] { display: none; }
.sig-pad {
  display: block; width: 100%; height: 160px;
  background: #fff; border: 1px dashed #9aa7b5; border-radius: 10px;
  touch-action: none; cursor: crosshair; max-width: 100%;
}
.modal {
  position: fixed; inset: 0; background: rgba(0,0,0,.72);
  display: grid; place-items: center; z-index: 20;
}
.modal[hidden] { display: none; }
.modal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px; width: min(420px, 92vw); }
.modal-card h3 { margin: 0 0 8px; font-size: 16px; }
.modal-card p { margin: 0 0 10px; font-size: 13px; line-height: 1.4; }
.modal-actions { display: flex; flex-direction: column; gap: 8px; margin-top: 14px; }
.modal-actions .btn { text-align: center; }
.picus-sig-card { width: min(440px, 94vw); }
.remarks-sig {
  display: flex; align-items: center; gap: 10px; margin-top: 8px;
  padding: 8px 10px; border: 1px solid var(--line); border-radius: 10px; background: #121216;
}
.remarks-sig[hidden] { display: none !important; }
.remarks-sig-label { font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; flex-shrink: 0; }
.remarks-sig img {
  height: 36px; max-width: 140px; object-fit: contain; background: #fff; border-radius: 4px; padding: 2px 4px;
}
.remarks-sig-missing { font-size: 12px; color: #f87171; }
.pv-remarks { text-align: left !important; }
.pv-remarks img { height: 16px; max-width: 48px; vertical-align: middle; margin-left: 4px; background: #fff; }

.auth-body { min-height: 100vh; background: #02060c; }
.auth-stage {
  position: relative; min-height: 100vh; overflow: hidden; width: 100%;
  background: #071018 url("../img/airliner.jpg") center 42% / cover no-repeat;
}
.auth-video {
  position: absolute; inset: 0; width: 100%; height: 100%;
  object-fit: cover; filter: saturate(1.1) contrast(1.05);
}
.auth-veil {
  position: absolute; inset: 0;
  background:
    linear-gradient(90deg, rgba(6,12,20,.72) 0%, rgba(6,12,20,.38) 48%, rgba(6,12,20,.70) 100%),
    linear-gradient(180deg, rgba(6,12,20,.18) 0%, rgba(6,12,20,.45) 100%);
}
.auth-layout {
  position: relative; z-index: 1;
  display: grid; grid-template-columns: 1.15fr .85fr; min-height: 100vh;
  width: 100%; max-width: 100%; min-width: 0;
}
.auth-hero { padding: 48px 44px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }
.auth-hero h2 { font-size: clamp(28px, 4vw, 48px); line-height: 1.18; margin: 10px 0 14px; letter-spacing: -0.6px; overflow-wrap: anywhere; }
.auth-kicker {
  margin: 28px 0 0; color: var(--accent); font-family: "IBM Plex Mono", monospace;
  font-size: 12px; letter-spacing: 1.5px; text-transform: uppercase;
}
.auth-lead { font-size: 16px; color: #d5e6f2; max-width: min(560px, 100%); overflow-wrap: anywhere; }
.auth-hero p { max-width: min(560px, 100%); overflow-wrap: anywhere; }
.auth-stills { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin: 22px 0 10px; max-width: min(560px, 100%); min-width: 0; }
.auth-stills figure { margin: 0; min-width: 0; }
.auth-stills img {
  width: 100%; max-width: 100%; height: 92px; object-fit: cover; border-radius: 10px;
  border: 1px solid rgba(255,255,255,.16); display: block;
}
.auth-stills figcaption { font-size: 10px; color: var(--muted); margin-top: 5px; font-family: "IBM Plex Mono", monospace; }
.auth-credit { font-size: 11px; color: var(--faint) !important; }
.auth-panel { display: grid; place-items: center; padding: 32px; min-width: 0; }
.auth-card { width: 100%; max-width: 420px; }
.auth-card.glass {
  background: rgba(10, 16, 24, .72);
  border: 1px solid rgba(255,255,255,.12);
  border-radius: 18px;
  padding: 28px 26px;
  backdrop-filter: blur(16px);
  box-shadow: 0 24px 60px rgba(0,0,0,.35);
}
.auth-card h1 { margin: 0 0 8px; font-size: 28px; }
.stack { display: grid; gap: 12px; margin: 20px 0; }
.center { text-align: center; }
.field-error { color: var(--red); font-size: 12px; display: block; margin-top: 4px; }
.brand-light { color: #fff; }

.suggest { position: relative; min-width: 0; }
.reg-input { display: flex; align-items: center; gap: 8px; min-width: 0; }
.reg-input .input { flex: 1; min-width: 0; text-transform: uppercase; }
.reg-input .btn { flex: 0 0 auto; }
.airport-input .input { flex: 1; min-width: 0; }
.airport-flag, .suggest-flag {
  width: 20px; height: 15px; flex: 0 0 20px; border-radius: 2px;
  object-fit: cover; display: block;
}
.suggest-list {
  position: absolute; left: 0; right: 0; top: calc(100% + 4px); z-index: 40;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  max-height: 280px; overflow: auto; box-shadow: 0 16px 40px rgba(0,0,0,.4);
}
.suggest-item {
  width: 100%; display: grid; grid-template-columns: 20px 52px minmax(0, 1fr); gap: 8px;
  align-items: center; text-align: left; background: none; border: 0; color: var(--text);
  padding: 8px 10px; cursor: pointer; font: inherit; min-width: 0;
}
.suggest-item:hover, .suggest-item.is-active { background: #252528; }
.suggest-icao { font-family: "IBM Plex Mono", monospace; color: var(--accent); font-weight: 600; }
.suggest-text { min-width: 0; overflow: hidden; }
.suggest-name, .suggest-meta {
  display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.suggest-name { font-size: 13px; }
.suggest-meta { font-size: 11px; color: var(--muted); }
.suggest-item-reg { grid-template-columns: minmax(0, 1fr); }
.suggest-item-reg .suggest-icao { letter-spacing: .4px; }

.menu-btn {
  display: none;
  width: 42px; height: 42px; padding: 0;
  flex-direction: column; align-items: center; justify-content: center; gap: 5px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 10px;
  cursor: pointer; flex-shrink: 0;
}
.menu-btn span { display: block; width: 18px; height: 2px; background: var(--text); border-radius: 1px; }


/* ——— For Pilots page patterns ——— */
.empty-start {
  max-width: 380px; margin: 64px auto; text-align: center;
}
.empty-start h2 { font-size: 26px; margin: 0 0 28px; letter-spacing: -0.4px; font-weight: 600; }
.start-stack { display: grid; gap: 10px; margin-bottom: 10px; }
.start-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.start-card {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  background: var(--panel-2); color: var(--text); border-radius: 14px;
  padding: 22px 18px 20px; border: 1px solid transparent; min-height: 96px;
  transition: background .15s ease, border-color .15s ease;
}
.start-card:hover { background: #252528; color: var(--text); border-color: #333338; }
.start-card span { font-size: 15px; font-weight: 500; }
.start-card svg { width: 28px; height: 28px; opacity: .9; }
.start-card.mini { min-height: 88px; padding: 18px 14px; }
.start-card.mini svg { width: 22px; height: 22px; }
.empty-cta { display: grid; gap: 10px; margin-bottom: 18px; }
.empty-cta .btn { width: 100%; justify-content: center; border-radius: 12px; padding: 14px 16px; }
.empty-links { display: flex; justify-content: center; gap: 18px; }
.empty-links a { color: var(--muted); font-size: 13px; }
.empty-links a:hover { color: var(--accent); }

.ov-grid { display: grid; grid-template-columns: 1.15fr .85fr; gap: 14px; margin-bottom: 14px; }
.ov-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 16px 18px;
}
.ov-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel-2); border-radius: 999px; padding: 4px 10px;
  font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em;
}
.ov-metrics { display: grid; grid-template-columns: repeat(4, 1fr); gap: 10px; margin: 14px 0; }
.ov-metrics div span { display: block; font-size: 11px; color: var(--muted); }
.ov-metrics div strong { font-family: "IBM Plex Mono", monospace; font-size: 16px; }
.ov-chart { height: 160px; position: relative; }
.status-ok { color: var(--green); font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; }
.status-warn {
  color: #fecaca; font-weight: 700; font-size: 13px;
  display: inline-flex; align-items: center; gap: 8px;
  background: rgba(220, 38, 38, .18); border: 1px solid rgba(248, 113, 113, .55);
  border-radius: 999px; padding: 6px 12px;
}
.flights-warn-banner {
  display: grid; gap: 4px; margin: 0 0 14px; padding: 12px 14px;
  border-radius: 12px; background: rgba(220, 38, 38, .14);
  border: 1px solid rgba(248, 113, 113, .5); color: #fecaca;
}
.flights-warn-banner strong { color: #fff; font-size: 13px; }
.flights-warn-banner span { font-size: 12px; line-height: 1.4; }
.flights-warn-banner small { color: #fca5a5; font-size: 11px; }
.flight-row.has-warning {
  border-color: rgba(248, 113, 113, .65);
  background: rgba(220, 38, 38, .12);
  box-shadow: inset 3px 0 0 #ef4444;
}
.flight-row.has-warning:hover { border-color: #f87171; }
.flight-warn-box {
  margin: -4px 0 10px; padding: 10px 12px 10px 14px;
  border-radius: 0 0 12px 12px; border: 1px solid rgba(248, 113, 113, .45);
  border-top: 0; background: rgba(220, 38, 38, .16);
  color: #fecaca; font-size: 12px; line-height: 1.4; font-weight: 600;
}
.flight-warn-ico {
  display: grid; place-items: center; width: 22px; height: 22px;
  border-radius: 50%; background: #ef4444; color: #fff;
  font-weight: 800; font-size: 12px; flex-shrink: 0;
}
.tag-fault {
  background: rgba(239, 68, 68, .25) !important;
  color: #fecaca !important; border-color: rgba(248, 113, 113, .5);
}
.recency-row { display: flex; gap: 14px; margin: 14px 0; flex-wrap: wrap; }
.recency-list { display: grid; gap: 10px; margin: 14px 0; }
.recency-item { display: flex; justify-content: space-between; gap: 12px; align-items: center; font-size: 12px; flex-wrap: wrap; }
.recency-dot { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.recency-dot i { width: 8px; height: 8px; border-radius: 50%; background: var(--amber); display: inline-block; flex-shrink: 0; }
.tz-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: var(--panel-2); border-radius: 999px; padding: 6px 12px;
  font-size: 12px; color: var(--muted);
}
.add-menu { position: relative; z-index: 70; }
.add-menu-panel {
  position: absolute; right: 0; left: auto; top: calc(100% + 6px); z-index: 80;
  min-width: 220px; max-width: min(260px, calc(100vw - 28px));
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px; box-shadow: 0 12px 40px rgba(0,0,0,.55);
  pointer-events: auto;
}
.add-menu-panel.is-left {
  right: auto; left: 0;
}
.add-menu-panel a {
  display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); font-size: 13px;
}
.add-menu-panel a:hover { background: var(--panel-2); color: var(--text); }
.progress-list { display: grid; gap: 10px; }
.progress-list .top { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.progress-list .top b { color: var(--text); font-family: "IBM Plex Mono", monospace; }
.last-flight {
  display: flex; align-items: center; gap: 16px; flex-wrap: wrap;
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px;
  padding: 12px 16px; margin-bottom: 14px;
}
.last-flight .reg { font-weight: 600; }
.last-flight .route { display: flex; align-items: center; gap: 6px; font-family: "IBM Plex Mono", monospace; }
.last-flight img { width: 18px; height: 13px; border-radius: 2px; }
.by-type { overflow: auto; }

.flights-toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 12px; position: relative; z-index: 50; }
.flights-stats {
  display: grid; grid-template-columns: repeat(4, 1fr); gap: 8px; margin-bottom: 16px;
}
.flights-stats .kpi span { font-size: 10px; }
.flights-stats.has-warning {
  border: 1px solid rgba(248, 113, 113, .55);
  background: rgba(220, 38, 38, .12);
  border-radius: 14px; padding: 10px;
  box-shadow: inset 0 0 0 1px rgba(239, 68, 68, .25);
}
.flights-stats.has-warning .kpi {
  background: rgba(0, 0, 0, .22);
  border-color: rgba(248, 113, 113, .35);
}
.flights-stats.has-warning .kpi strong { color: #fecaca; }
.flights-warn-list {
  margin: 6px 0 0; padding-left: 18px; font-size: 12px; line-height: 1.45;
}
.flights-warn-actions { margin: 10px 0 0; }
.month-group { margin-bottom: 18px; }
.month-label {
  font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em;
  margin: 0 0 8px; padding: 0 4px;
}
.flight-row {
  display: grid; grid-template-columns: 52px 70px minmax(160px, 1.4fr) 100px 64px minmax(140px, 1fr) 28px;
  gap: 10px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 10px 12px; margin-bottom: 6px; color: inherit;
}
.flight-row:hover { border-color: #3a3a40; }
.role-badge {
  display: inline-flex; align-items: center; justify-content: center;
  background: var(--role); color: #fff; border-radius: 8px;
  font-size: 11px; font-weight: 700; padding: 4px 8px; letter-spacing: .04em;
}
.role-badge.copilot { background: #3a3a40; }
.role-badge.dual { background: #0d9488; }
.flight-date { font-size: 12px; color: var(--muted); font-family: "IBM Plex Mono", monospace; }
.flight-route { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.flight-route .codes { font-family: "IBM Plex Mono", monospace; font-weight: 600; }
.flight-route img { width: 16px; height: 12px; border-radius: 2px; }
.flight-times { font-size: 11px; color: var(--faint); font-family: "IBM Plex Mono", monospace; }
.flight-ac { font-size: 12px; }
.flight-ac small { display: block; color: var(--muted); }
.flight-dur { font-family: "IBM Plex Mono", monospace; font-weight: 600; }
.tag-row { display: flex; flex-wrap: wrap; gap: 4px; }
.tag {
  font-size: 10px; color: var(--muted); background: var(--panel-2);
  border-radius: 999px; padding: 3px 7px; letter-spacing: .02em;
}
.sim-chip { color: var(--accent); }

.wizard-tabs {
  display: flex; gap: 4px; margin-bottom: 14px; border-bottom: 1px solid var(--line); padding-bottom: 0;
}
.wizard-tabs span, .wizard-tabs a, .wizard-tabs button {
  background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px;
  padding: 10px 14px; cursor: default; border-bottom: 2px solid transparent; margin-bottom: -1px;
}
.wizard-tabs .on { color: var(--accent); border-bottom-color: var(--accent); }
.start-stop {
  display: grid; grid-template-columns: 1fr auto 1fr; gap: 12px; align-items: start;
}
.start-col, .stop-col {
  background: var(--panel-2); border-radius: 14px; padding: 14px; border: 1px solid var(--line);
}
.start-col h3, .stop-col h3 {
  margin: 0 0 10px; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted);
}
.block-circle {
  width: 96px; height: 96px; border-radius: 50%; margin: 8px auto;
  border: 2px solid var(--accent); display: grid; place-items: center; text-align: center;
  background: rgba(165,180,252,.08);
}
.block-circle strong { display: block; font-family: "IBM Plex Mono", monospace; font-size: 16px; }
.block-circle span { font-size: 10px; color: var(--muted); letter-spacing: .06em; }
.ac-pill {
  display: inline-flex; align-items: center; gap: 6px;
  background: rgba(165,180,252,.18); color: var(--accent);
  border-radius: 999px; padding: 6px 12px; font-size: 13px; font-weight: 600;
}

.totals-filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.range-pill {
  background: var(--panel); border: 1px solid var(--line); color: var(--muted);
  border-radius: 999px; padding: 7px 12px; font-size: 12px; cursor: pointer;
}
.range-pill.on, .range-pill:hover { color: var(--text); border-color: var(--accent); }
.accordion { display: grid; gap: 10px; }
.acc-item {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
}
.acc-head {
  width: 100%; display: flex; justify-content: space-between; align-items: center;
  background: none; border: 0; color: var(--text); font: inherit; font-weight: 600;
  padding: 14px 16px; cursor: pointer; text-align: left;
}
.acc-body { padding: 0 16px 16px; display: grid; gap: 8px; }
.acc-item:not(.open) .acc-body { display: none !important; }
.acc-item.open .acc-body { display: grid !important; }
.acc-chevron { transition: transform .15s ease; color: var(--muted); }
.acc-item:not(.open) .acc-chevron { transform: rotate(-90deg); }
.range-pill { text-decoration: none; }
.pax-box .pax-stepper {
  display: inline-flex; align-items: center; gap: 8px; width: 100%;
}
.pax-box .pax-stepper .stepper-val { flex: 1; text-align: center; }
.acc-card {
  display: flex; justify-content: space-between; align-items: center;
  background: var(--panel-2); border-radius: 10px; padding: 12px 14px;
}
.acc-card span { color: var(--muted); font-size: 12px; }
.acc-card strong { font-family: "IBM Plex Mono", monospace; }

.cal-toolbar { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.cal-grid {
  display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px;
}
.cal-dow { text-align: center; font-size: 11px; color: var(--faint); padding: 6px; }
.cal-day {
  min-height: 88px; border-radius: 10px; background: var(--panel-2);
  padding: 6px; font-size: 12px; color: var(--muted);
  display: flex; flex-direction: column; gap: 3px;
}
.cal-day-head {
  display: flex; justify-content: space-between; align-items: center; gap: 4px;
}
.cal-day-num { font-weight: 600; color: var(--text); }
.cal-day-add {
  width: 22px; height: 22px; border-radius: 6px; border: 1px solid var(--line);
  background: transparent; color: var(--muted); font: inherit; cursor: pointer;
  line-height: 1; padding: 0;
}
.cal-day-add:hover { border-color: var(--accent); color: var(--accent); }
.cal-day.other { opacity: .35; }
.cal-day.today {
  background: rgba(59, 76, 204, .2);
  box-shadow: inset 0 0 0 2px var(--accent);
}
.cal-day.today .cal-day-num {
  background: var(--accent);
  color: #fff;
  width: 24px;
  height: 24px;
  border-radius: 50%;
  display: inline-grid;
  place-items: center;
}
.cal-day.today.has-schedule,
.cal-day.today.has-duty { box-shadow: inset 0 0 0 2px var(--accent); }
.cal-day.selected { outline: 2px solid var(--accent); background: rgba(165,180,252,.1); }
.cal-bar {
  display: flex; flex-direction: column; gap: 1px;
  margin-top: 2px; border-radius: 5px; font-size: 10px; padding: 3px 5px;
  overflow: hidden; text-decoration: none; line-height: 1.2;
}
.cal-bar-flight { background: rgba(34,197,94,.22); color: #bbf7d0; border: 1px solid rgba(34,197,94,.35); }
.cal-bar-meeting, .cal-bar-duty { background: rgba(56,189,248,.18); color: #bae6fd; border: 1px solid rgba(56,189,248,.4); }
.cal-bar-schedule { background: rgba(245,158,11,.28); color: #fde68a; border: 1px solid rgba(245,158,11,.55); }
.cal-day.has-schedule { background: rgba(245,158,11,.22); box-shadow: inset 0 0 0 2px #f59e0b; }
.cal-day.has-duty { background: rgba(56,189,248,.16); box-shadow: inset 0 0 0 2px #38bdf8; }
.cal-day.has-schedule.has-duty {
  background: linear-gradient(135deg, rgba(245,158,11,.28) 0 50%, rgba(56,189,248,.2) 50% 100%);
  box-shadow: inset 0 0 0 2px #f59e0b, inset 0 0 0 4px rgba(56,189,248,.55);
}
.cal-bar-route { font-weight: 700; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cal-bar-time { opacity: .85; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 9px; }
.cal-legend {
  display: flex; gap: 16px; flex-wrap: wrap; margin-top: 12px;
  font-size: 12px; color: var(--muted);
}
.cal-dot {
  display: inline-block; width: 10px; height: 10px; border-radius: 3px; margin-right: 6px; vertical-align: middle;
}
.cal-dot.flight { background: rgba(34,197,94,.7); }
.cal-dot.meeting, .cal-dot.duty { background: #38bdf8; }
.cal-dot.schedule { background: #f59e0b; }
.cal-month-stats { margin-left: auto; font-size: 12px; }
.fab-wrap { position: fixed; right: 24px; bottom: 24px; z-index: 40; }
.fab-menu {
  position: absolute; right: 0; bottom: calc(100% + 10px);
  min-width: 180px; background: var(--panel); border: 1px solid var(--line);
  border-radius: 12px; padding: 6px; box-shadow: 0 12px 40px rgba(0,0,0,.55);
}
.fab-menu a {
  display: block; padding: 10px 12px; border-radius: 8px; color: var(--text); font-size: 13px;
}
.fab-menu a:hover { background: var(--panel-2); }
.fab-add {
  position: static; border: 0; cursor: pointer;
  width: 56px; height: 56px; border-radius: 50%;
  background: var(--accent); color: var(--accent-text);
  display: grid; place-items: center; font-size: 28px; font-weight: 500;
  box-shadow: 0 8px 28px rgba(165,180,252,.35);
}
.cal-day-actions { display: grid; gap: 10px; margin-top: 8px; }
.cal-day-actions .btn { text-align: center; justify-content: center; }
.cal-day-actions a[hidden],
.cal-day-actions p[hidden] { display: none !important; }

.ac-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 12px; }
.ac-type-label { font-size: 13px; color: var(--muted); margin: 18px 0 8px; font-weight: 600; }
.ac-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 14px;
}
.ac-card-link {
  display: block; color: inherit; text-decoration: none; transition: border-color .15s ease, transform .15s ease;
}
.ac-card-link:hover { border-color: var(--accent); }
.ac-card-edit {
  display: inline-block; margin-top: 10px; font-size: 11px; color: var(--accent); font-weight: 600;
}
.ac-ph {
  height: 120px; border-radius: 10px; background: linear-gradient(135deg, #1c1c1e, #2a2a32);
  margin-bottom: 10px; display: grid; place-items: center; color: var(--faint); font-size: 12px;
  overflow: hidden;
}
.ac-ph.has-img { padding: 0; }
.ac-ph img { width: 100%; height: 100%; object-fit: cover; display: block; }
.ac-card h3 { margin: 0 0 4px; font-size: 16px; }
.ac-card .meta { color: var(--muted); font-size: 12px; }
.badge-mp {
  display: inline-block; margin-top: 8px; padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: #1e3a5f; color: #93c5fd;
}
.badge-sim {
  display: inline-block; margin-top: 8px; padding: 2px 8px; border-radius: 999px;
  font-size: 10px; font-weight: 700; letter-spacing: .04em; text-transform: uppercase;
  background: #3b1f0e; color: #fdba74;
}
.ac-card-sim { border-color: #4a3420; }
.ac-ph-sim {
  background: linear-gradient(145deg, #2a1c10, #1a120c) !important;
  color: #fdba74 !important; font-weight: 800; letter-spacing: .06em;
}
.ac-sim-box {
  margin: 12px 0; padding: 14px; border: 1px solid var(--line); border-radius: 12px;
  background: #121216;
}
.ac-kind-row { margin-bottom: 14px; }
.ac-add-wrap { max-width: 520px; margin: 12px auto 40px; }
.ac-add-card {
  position: relative;
  background: var(--panel); border: 1px solid var(--line); border-radius: 20px;
  padding: 28px 24px 22px;
}
.ac-add-close {
  position: absolute; top: 14px; left: 16px; width: 32px; height: 32px;
  border-radius: 999px; display: grid; place-items: center;
  color: var(--muted); background: var(--panel-2); font-size: 20px; line-height: 1;
}
.ac-add-close:hover { color: var(--text); }
.ac-add-hero {
  height: 160px; border-radius: 14px; margin: 8px 0 12px;
  background: radial-gradient(circle at 50% 40%, rgba(165,180,252,.28), transparent 62%), #0c0c10;
  display: grid; place-items: center; overflow: hidden;
}
.ac-add-hero img { width: 100%; height: 100%; object-fit: cover; }
.ac-add-plane { font-size: 48px; opacity: .85; filter: drop-shadow(0 0 24px rgba(165,180,252,.45)); }
.ac-photo-actions {
  display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; margin: 0 0 16px;
}
.ac-photo-upload { cursor: pointer; }
.btn.danger {
  background: rgba(239, 68, 68, .18); color: #fecaca; border: 1px solid rgba(248, 113, 113, .45);
}
.btn.danger:hover { background: rgba(239, 68, 68, .28); }
.ac-add-card h2 { margin: 0 0 6px; font-size: 22px; text-align: center; }
.ac-add-card > .muted { text-align: center; margin: 0 0 18px; }
.ac-lookup-label { display: block; margin-bottom: 4px; }
.ac-lookup-label[hidden],
#aircraftAddForm.is-aircraft #acLocationWrap,
#aircraftAddForm:has(#kindAircraft:checked) #acLocationWrap,
#acAircraftPanel[hidden],
#acSimPanel[hidden],
#acOpWrap[hidden] { display: none !important; }
.ac-lookup-row { display: flex; gap: 8px; margin-top: 6px; }
.ac-lookup-row .input { flex: 1; }
.ac-catalog-box {
  margin: 4px 0 14px;
  padding: 14px;
  border-radius: 14px;
  background: var(--panel-2);
  border: 1px solid var(--line);
}
.ac-catalog-head {
  display: flex; flex-direction: column; gap: 2px;
  margin-bottom: 12px;
}
.ac-catalog-head strong { font-size: 14px; }
.ac-catalog-box #acEndorsementHint {
  display: block; margin-top: 6px; font-size: 12px;
}
.ac-catalog-box input[readonly] {
  opacity: .92;
  cursor: default;
}

.authority-pick { display: grid; gap: 8px; }
.authority-option {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 12px; padding: 12px 14px; cursor: pointer;
}
.authority-option input { accent-color: var(--accent); }
.authority-option.on,
.authority-option:has(input:checked) {
  border-color: var(--accent);
  background: rgba(165,180,252,.1);
}
.authority-option span { display: flex; flex-direction: column; gap: 2px; font-weight: 600; }
.authority-option small { font-weight: 400; color: var(--muted); }

.people-empty {
  max-width: 480px; margin: 40px auto; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 36px 24px;
}

.airport-list { display: grid; gap: 6px; }
.airport-row {
  display: grid; grid-template-columns: 28px 1fr auto; gap: 12px; align-items: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px;
}
.airport-row img { width: 22px; height: 16px; border-radius: 2px; }
.airport-row .codes { font-family: "IBM Plex Mono", monospace; font-weight: 600; }
.airport-row .name { color: var(--muted); font-size: 12px; }
.airport-row .count { color: var(--faint); font-size: 12px; font-family: "IBM Plex Mono", monospace; }
.analytics-label { display: flex; align-items: center; gap: 10px; }
.analytics-flag {
  width: 28px; height: 21px; object-fit: cover; border-radius: 3px;
  border: 1px solid var(--line); flex-shrink: 0; background: var(--panel-2);
}

.import-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 14px; }
.import-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  padding: 22px 18px; color: inherit; display: flex; flex-direction: column; gap: 10px; min-height: 220px;
}
.import-card:hover { border-color: #3a3a42; }
.import-ico { font-size: 28px; line-height: 1; margin-bottom: 4px; }
.import-card h3 { margin: 0; font-size: 16px; color: var(--text); }
.import-card p { margin: 0; color: var(--muted); font-size: 13px; line-height: 1.45; flex: 1; }
.import-card .btn { align-self: flex-start; margin-top: auto; border-radius: 999px; padding: 8px 16px; font-size: 13px; }
.import-card .btn:disabled { opacity: .45; cursor: not-allowed; }

.export-section { margin-bottom: 22px; }
.export-section h2 { font-size: 12px; color: var(--muted); letter-spacing: .1em; text-transform: uppercase; margin: 0 0 10px; }
.export-list { display: grid; gap: 6px; }
.export-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line); border-radius: 12px;
  padding: 14px 16px; color: inherit;
}
.export-row:hover { border-color: var(--accent); }
.export-row img { width: 22px; height: 16px; border-radius: 2px; }
.export-row .grow { flex: 1; }
.export-row small { display: block; color: var(--muted); font-size: 11px; }

.analytics-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 12px; }
.an-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px;
  color: inherit; display: block;
}
.an-card:hover { border-color: var(--accent); }
.an-card h3 { margin: 0 0 6px; font-size: 15px; }
.an-card p { margin: 0 0 10px; color: var(--muted); font-size: 12px; }
.an-card .details { color: var(--accent); font-size: 12px; }

.settings-cards { display: grid; gap: 12px; max-width: 720px; }
.settings-card {
  background: var(--panel); border: 1px solid var(--line); border-radius: 14px; padding: 16px 18px;
}
.settings-card h2 { margin: 0 0 12px; font-size: 15px; }
.toggle-row {
  display: flex; justify-content: space-between; align-items: center;
  padding: 10px 0; border-bottom: 1px solid var(--line); gap: 12px;
}
.toggle-row:last-child { border-bottom: 0; }
.toggle-row span { font-size: 13px; }
.toggle-row small { display: block; color: var(--muted); font-size: 11px; }
.toggle {
  width: 42px; height: 24px; border-radius: 999px; background: #2a2a2e; position: relative; flex-shrink: 0;
  border: 0; cursor: pointer; padding: 0;
}
.toggle::after {
  content: ""; position: absolute; top: 3px; left: 3px;
  width: 18px; height: 18px; border-radius: 50%; background: #fff; transition: transform .15s;
}
.toggle.on { background: var(--accent); }
.toggle.on::after { transform: translateX(18px); }
.toggle input { position: absolute; opacity: 0; inset: 0; cursor: pointer; }

/* FlyLog-style Personal hub */
body.settings-hub-page .main { background: #050506; }
.pers-hub {
  max-width: 520px; margin: 0 auto 40px; display: grid; gap: 14px;
}
.pers-hero { text-align: center; padding: 8px 0 4px; }
.pers-avatar {
  width: 96px; height: 96px; border-radius: 50%; margin: 0 auto 14px;
  background:
    radial-gradient(circle at 30% 30%, rgba(165,180,252,.45), transparent 55%),
    linear-gradient(160deg, #2a3348, #12141a 70%);
  display: grid; place-items: center; overflow: hidden;
  border: 2px solid rgba(255,255,255,.08);
}
.pers-avatar span { font-size: 36px; font-weight: 700; color: #fff; }
.pers-name {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font-size: 20px;
}
.pers-name img { border-radius: 2px; }
.pers-email { color: var(--muted); font-size: 14px; margin-top: 4px; }
.pers-trial {
  background: #17171a; border: 1px solid var(--line); border-radius: 16px;
  padding: 16px 16px 14px; text-align: left;
}
.pers-trial strong { display: block; letter-spacing: .04em; margin-bottom: 6px; }
.pers-trial p { margin: 0 0 14px; color: var(--muted); font-size: 13px; line-height: 1.45; }
.pers-trial-btn {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--accent); color: var(--accent-text);
  border-radius: 999px; padding: 10px 16px; font-weight: 600; font-size: 13px;
}
.pers-menu, .pers-card {
  background: #17171a; border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden;
}
.pers-item {
  display: flex; align-items: center; gap: 14px;
  width: 100%; padding: 14px 16px; color: inherit; text-align: left;
  border: 0; border-bottom: 1px solid #2a2a2e; background: transparent;
  font: inherit; cursor: pointer;
}
.pers-item:last-child { border-bottom: 0; }
.pers-item:hover { background: rgba(255,255,255,.03); }
.pers-ico {
  width: 28px; height: 28px; display: grid; place-items: center; color: #ddd;
}
.pers-ico svg { width: 22px; height: 22px; }
.pers-stack { display: flex; flex-direction: column; gap: 2px; }
.pers-stack small { color: var(--muted); font-size: 12px; }
.pers-biz {
  display: flex; gap: 14px; align-items: center; padding: 16px;
}
.pers-biz-ico {
  width: 48px; height: 48px; border-radius: 50%;
  display: grid; place-items: center; font-size: 22px;
  background: linear-gradient(135deg, #7dd3fc, #a5b4fc 50%, #f9a8d4);
}
.pers-biz p { margin: 4px 0 0; color: var(--muted); font-size: 12px; line-height: 1.4; }
.pers-danger { color: #f0a0a0; }
.pers-danger strong { color: #f0a0a0; }
.pers-danger-form { margin: 0; }
.pers-version { text-align: center; color: var(--muted); font-size: 12px; margin: 8px 0 0; }
.pers-delete { text-align: center; margin: 0; }
.pers-delete a { color: #e88989; font-size: 13px; }
.pers-sub { max-width: 720px; }

.placeholder-page {
  max-width: 480px; margin: 40px auto; text-align: center;
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 40px 24px;
}
.placeholder-page h2 { margin: 0 0 8px; }
.placeholder-page p { color: var(--muted); margin: 0; }
.coming-soon-badge {
  display: inline-block; margin: 0 0 12px; padding: 4px 12px;
  border-radius: 999px; font-size: 12px; font-weight: 600; letter-spacing: .02em;
  color: #fde68a; background: rgba(245, 158, 11, .18); border: 1px solid rgba(245, 158, 11, .35);
}
.nav-soon {
  margin-left: 6px; font-size: 10px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .04em; color: #fbbf24; opacity: .9;
}
.start-card-soon { position: relative; }
.start-card-soon .soon-tag {
  display: block; margin-top: 4px; font-size: 11px; color: #fbbf24; font-weight: 600;
}

/* Leaflet flight map (OSM) */
.map-toolbar {
  display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 12px;
}
.map-hint { margin-left: auto; font-size: 12px; }
.map-shell {
  display: grid;
  grid-template-columns: 1fr minmax(220px, 280px);
  gap: 12px;
  min-height: calc(100vh - 180px);
}
.map-shell-compact {
  grid-template-columns: 1fr;
  min-height: 420px;
}
.flight-map {
  width: 100%;
  min-height: calc(100vh - 180px);
  border-radius: 16px;
  border: 1px solid var(--line);
  overflow: hidden;
  background: #0c0c10;
  z-index: 1;
}
.flight-map-compact { min-height: 420px; }
.map-side {
  background: var(--panel); border: 1px solid var(--line); border-radius: 16px;
  display: flex; flex-direction: column; min-height: 0; max-height: calc(100vh - 180px);
}
.map-side-head {
  display: flex; justify-content: space-between; align-items: center;
  padding: 12px 14px; border-bottom: 1px solid var(--line);
}
.map-side-list {
  overflow: auto; padding: 8px; display: grid; gap: 6px;
}
.map-route-item {
  display: grid; gap: 2px; text-align: left; width: 100%;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px;
  padding: 10px 12px; color: var(--text); cursor: pointer;
}
.map-route-item:hover { border-color: var(--accent); }
.map-route-codes {
  font-family: "IBM Plex Mono", ui-monospace, monospace; font-weight: 600; font-size: 13px;
  display: flex; align-items: center; gap: 4px; flex-wrap: wrap;
}
.map-route-meta { font-size: 11px; color: var(--muted); }
.leaflet-container { font: inherit; background: #0c0c10; }
.leaflet-popup-content-wrapper {
  background: #16161a; color: #f4f4f5; border-radius: 10px; box-shadow: 0 8px 24px rgba(0,0,0,.45);
}
.leaflet-popup-tip { background: #16161a; }
.leaflet-control-layers, .leaflet-bar a {
  background: #16161a !important; color: #e4e4e7 !important; border-color: #2a2a32 !important;
}
@media (max-width: 900px) {
  .map-shell { grid-template-columns: 1fr; min-height: auto; }
  .flight-map { min-height: 52vh; }
  .map-side { max-height: 280px; }
}

@media (max-width: 1100px) {
  .ov-grid, .analytics-grid, .start-stop { grid-template-columns: 1fr; }
  .flights-stats { grid-template-columns: repeat(3, 1fr); }
  .ov-metrics { grid-template-columns: repeat(2, 1fr); }
  .flight-row {
    grid-template-columns: 52px 1fr auto;
  }
}

@media (max-width: 1400px), (pointer: coarse) {
  .shell { grid-template-columns: 1fr; }
  .stats-grid, .three-col, .form-grid, .review, .dash-page .dash-mid, .bars-card {
    grid-template-columns: 1fr;
  }
  .dash-page .stats-grid { grid-template-columns: 1fr 1fr; }
  .dash-page .gauge-card { grid-column: 1 / -1; flex-direction: row; justify-content: space-around; }
  .dash-page .kpi-row { grid-template-columns: repeat(4, 1fr); }
  .form-grid.times { grid-template-columns: repeat(2, 1fr); }
  .time-group { grid-column: 1 / -1; }
  .span-2, .check-span { grid-column: 1 / -1; }
  .check-span { padding-top: 8px; }

  .sidebar {
    display: flex;
    position: fixed;
    inset: 0 auto 0 0;
    width: min(280px, 86vw);
    z-index: 40;
    transform: translateX(-100%);
    transition: transform .2s ease;
    padding-top: max(18px, env(safe-area-inset-top));
    padding-bottom: max(18px, env(safe-area-inset-bottom));
  }
  .sidebar.open { transform: translateX(0); }
  .nav-scrim.is-on {
    display: block; position: fixed; inset: 0; z-index: 35;
    background: rgba(0, 0, 0, .55);
  }
  .menu-btn { display: inline-flex; }
  .main {
    padding: 16px 14px calc(28px + env(safe-area-inset-bottom));
  }
  .dash-page .main { padding: 12px 12px calc(22px + env(safe-area-inset-bottom)); }
  .topbar {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    align-items: center;
    gap: 8px 12px;
    margin-bottom: 14px;
  }
  .topbar:not(:has(.menu-btn)) {
    grid-template-columns: minmax(0, 1fr);
  }
  .topbar h1 { font-size: 20px; }
  .topbar-copy { min-width: 0; grid-column: auto; }
  .topbar-copy .muted {
    font-size: 12px; line-height: 1.4;
    overflow-wrap: break-word; word-break: normal;
  }
  .top-actions {
    grid-column: 1 / -1;
    width: 100%;
    justify-content: flex-end;
    flex-wrap: wrap;
  }
  .top-actions .search { min-width: 0; flex: 1 1 140px; }
  .top-actions .btn { flex: 0 1 auto; min-height: 42px; }
  .top-actions .add-menu { flex: 0 0 auto; }
  body.setup-gate .topbar { align-items: start; }
  body.setup-gate .top-actions { width: auto; justify-content: flex-end; }
  body.setup-gate .top-actions .btn { flex: none; }
  .search { min-width: 0; width: 100%; }
  .flights-toolbar { justify-content: flex-start; }
  .flights-toolbar .add-menu { margin-left: auto; flex: 0 0 auto; }
  .fab-wrap {
    right: max(16px, env(safe-area-inset-right));
    bottom: max(16px, env(safe-area-inset-bottom));
    left: auto;
  }

  .auth-layout { grid-template-columns: 1fr; min-height: 100dvh; width: 100%; }
  .auth-panel { order: -1; width: 100%; padding: max(20px, env(safe-area-inset-top)) 16px 8px; }
  .auth-hero { width: 100%; padding: 12px 16px max(28px, env(safe-area-inset-bottom)); }
  .auth-hero h2 { font-size: 24px; margin: 8px 0 10px; }
  .auth-kicker { margin: 14px 0 0; }
  .auth-card, .auth-card.glass { width: 100%; max-width: 100%; padding: 22px 16px; }
  .auth-stills img { height: 72px; }
  .auth-veil {
    background:
      linear-gradient(180deg, rgba(6,12,20,.70) 0%, rgba(6,12,20,.40) 42%, rgba(6,12,20,.78) 100%);
  }

  .steps { gap: 6px; overflow-x: auto; }
  .steps li { font-size: 12px; }
  .wizard-actions { flex-wrap: wrap; }
  .wizard-actions .btn, .wizard-actions a.btn { flex: 1; min-height: 44px; }
  .panel-head { flex-wrap: wrap; gap: 8px; }
  .btn, .menu-btn, .pill, .link-btn { touch-action: manipulation; }
  .inline-add { flex-wrap: wrap; }
  .input, select.input { font-size: 16px; min-height: 44px; }
  .btn { min-height: 42px; }
}

@media (max-width: 1400px) and (min-width: 641px), (pointer: coarse) and (min-width: 641px) {
  .dash-page .chart-box { height: 150px; }
  .dash-page .chart-box-mid { height: 168px; }
  .steps li { font-size: 12px; }
}

@media (max-width: 900px) {
  .recent-table { overflow: visible; background: transparent; border: 0; }
  .recent-table table.data { min-width: 0; }
  .recent-table thead { display: none; }
  .recent-table tbody { display: grid; gap: 8px; }
  .recent-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
  }
  .recent-table td { border: 0; padding: 3px 0; }
  .recent-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .4px;
  }
  .recent-table td:nth-child(2),
  .recent-table td:last-child { grid-column: 1 / -1; }
  .recent-table td:last-child::before { display: none; }
}

@media (max-width: 640px) {
  .dash-page .stats-grid { grid-template-columns: 1fr; }
  .dash-page .gauge-card { flex-direction: column; }
  .dash-page .kpi-row { grid-template-columns: repeat(2, 1fr); }
  .form-grid.times { grid-template-columns: 1fr; }
  .time-group { grid-template-columns: 1fr; }
  .dash-page .chart-box { height: 160px; }
  .dash-page .chart-box-mid { height: 180px; }
  .auth-hero p:nth-of-type(3) { display: none; }
  .auth-stills { grid-template-columns: 1fr 1fr 1fr; gap: 6px; }
  .auth-stills img { height: 56px; }
  .steps { flex-wrap: wrap; }
  .steps li { flex: 1 1 calc(50% - 6px); }

  .recent-table { overflow: visible; background: transparent; border: 0; }
  .recent-table table.data { min-width: 0; }
  .recent-table thead { display: none; }
  .recent-table tbody { display: grid; gap: 8px; }
  .recent-table tr {
    display: grid;
    grid-template-columns: 1fr 1fr;
    gap: 2px 12px;
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: 10px;
    padding: 10px 12px;
  }
  .recent-table td { border: 0; padding: 3px 0; }
  .recent-table td::before {
    content: attr(data-label);
    display: block;
    font-size: 10px;
    color: var(--muted);
    text-transform: uppercase;
    letter-spacing: .4px;
  }
  .recent-table td:nth-child(2),
  .recent-table td:last-child { grid-column: 1 / -1; }
  .recent-table td:last-child::before { display: none; }
}

/* ——— Flight sheet (For Pilots START/STOP) ——— */
body.flight-popout-page .main {
  background:
    radial-gradient(ellipse at 50% 0%, rgba(165,180,252,.12), transparent 55%),
    #0a0a0c;
  overflow-x: clip;
}
body.flight-popout-page .topbar {
  background: transparent;
  border-bottom-color: transparent;
}
body.flight-popout-page .flight-sheet {
  margin: 8px auto 28px;
  width: min(980px, 100%);
  max-width: 100%;
  min-width: 0;
  box-shadow: 0 28px 90px rgba(0,0,0,.55), 0 0 0 1px rgba(255,255,255,.04);
  overflow: visible;
}
.flight-sheet {
  background: var(--panel);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px 18px 14px;
  max-width: 980px;
  min-width: 0;
}
.fs-tabs {
  display: flex; gap: 4px; margin: 0 0 18px; padding: 4px;
  background: #101012; border: 1px solid var(--line); border-radius: 14px;
}
.fs-tab {
  flex: 1; background: none; border: 0; color: var(--muted); font: inherit; font-size: 13px; font-weight: 600;
  padding: 10px 12px; cursor: pointer; border-radius: 10px;
}
.fs-tab.on {
  color: #fff; background: rgba(165,180,252,.16);
  box-shadow: inset 0 0 0 1px rgba(165,180,252,.5);
}
.fs-tab:disabled { opacity: .4; cursor: not-allowed; }
.fs-panel[hidden], .ac-picker[hidden], .role-menu[hidden], .adjust-sheet[hidden] {
  display: none !important;
}
.fs-extra {
  max-width: 520px; margin: 6px auto 10px;
}
.fs-extra .panel-head { margin-bottom: 8px; }
.fs-extra .panel-head h2 { margin: 0; font-size: 20px; letter-spacing: -.02em; }
.fs-extra > .muted { margin: 0 0 14px; line-height: 1.5; }
.fee-box {
  display: grid; gap: 14px; max-width: 420px;
  background: #17171a; border: 1px solid var(--line); border-radius: 16px;
  padding: 16px;
}
.fee-box-label, .fee-box-notes {
  display: grid; gap: 6px; margin: 0; font-size: 13px; font-weight: 600;
}
.fee-box-input {
  font-size: 22px !important; font-weight: 600; padding: 14px 16px !important;
  letter-spacing: .02em;
}
.fee-box-label small { font-weight: 500; color: var(--muted); margin-left: 6px; }
.fee-rate-line {
  display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap;
  font-size: 13px; color: var(--muted);
}
.fee-rate-line strong { color: var(--text); font-size: 16px; }
.fee-rate-line a { margin-left: auto; color: var(--accent); font-size: 12px; }
.fee-result {
  display: flex; justify-content: space-between; align-items: baseline; gap: 12px;
  padding-top: 8px; border-top: 1px solid var(--line); font-size: 13px; color: var(--muted);
}
.fee-result strong { color: var(--text); font-size: 18px; }
.fee-pay strong { font-size: 26px; }
.fee-missing { margin: 0; color: var(--red); font-size: 12px; }
.pay-head {
  display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; flex-wrap: wrap;
  margin-bottom: 18px;
}
.pay-total { font-size: 32px; font-weight: 700; letter-spacing: -.02em; }
.pay-group { margin-top: 18px; }
.pay-group h2 {
  display: flex; justify-content: space-between; gap: 12px; align-items: baseline;
  margin: 0 0 8px; font-size: 15px;
}
.pax-row { display: flex; gap: 8px; align-items: center; margin: 10px 0; }
.pax-row .input { flex: 1; }
.pax-list { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; }
.pax-list li {
  display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px;
}
.crew-chips { display: flex; flex-wrap: wrap; gap: 6px; width: 100%; }
.crew-chip {
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  border-radius: 999px; padding: 5px 10px; font: inherit; font-size: 12px; cursor: pointer;
}
.crew-chip:hover { border-color: var(--accent); color: var(--accent); }
.fs-grid {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 210px minmax(0, 1fr);
  gap: 16px;
  align-items: stretch;
}
.fs-start, .fs-stop {
  background: var(--panel-2);
  border: 1px solid var(--line);
  border-radius: 18px;
  padding: 16px;
  min-width: 0;
}
.fs-start h3, .fs-stop h3 {
  display: flex; align-items: center; gap: 8px;
  margin: 0 0 14px;
  font-size: 11px;
  letter-spacing: .16em;
  text-transform: uppercase;
  color: var(--muted);
}
.fs-start h3::before, .fs-stop h3::before {
  content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--green);
  box-shadow: 0 0 0 4px rgba(62,207,142,.15);
}
.fs-stop h3::before { background: var(--amber); box-shadow: 0 0 0 4px rgba(240,168,60,.16); }
.flight-sheet.sim-mode .sim-lock {
  opacity: 0.38;
  pointer-events: none;
  user-select: none;
}
.flight-sheet.sim-mode .sim-lock .input,
.flight-sheet.sim-mode .sim-lock button,
.flight-sheet.sim-mode .sim-lock select {
  cursor: not-allowed;
}
.fs-label { display: block; margin-bottom: 10px; font-size: 12px; color: var(--muted); }
.fs-label .input { margin-top: 6px; }
.fs-center {
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 16px;
  padding: 12px 0; position: relative; min-width: 0;
}
.fs-center::before {
  content: ""; position: absolute; top: 28px; bottom: 28px; left: 50%; width: 1px;
  background: linear-gradient(var(--line), rgba(165,180,252,.55), var(--line));
}
.fs-center > * { position: relative; z-index: 1; }
.ac-pill {
  display: inline-flex; align-items: center; justify-content: center; gap: 6px;
  max-width: 100%;
  background: rgba(165,180,252,.2); color: var(--accent);
  border: 1px solid rgba(165,180,252,.35);
  border-radius: 999px; padding: 8px 14px;
  font-size: 12px; font-weight: 600; cursor: pointer;
  font-family: inherit; text-align: center; line-height: 1.3;
}
.ac-pill:hover { background: rgba(165,180,252,.28); }
#acPillText { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 160px; }
.ac-picker {
  position: absolute; top: 44px; left: 50%; transform: translateX(-50%);
  width: min(340px, 92vw); max-height: 70vh; overflow: auto; z-index: 80;
  background: #1a1a1e; border: 1px solid var(--line); border-radius: 14px;
  box-shadow: 0 12px 40px rgba(0,0,0,.55); padding: 10px;
}
.ac-picker-tabs {
  display: flex; gap: 4px; margin: 0 0 10px; padding: 0 2px;
}
.ac-picker-tab {
  flex: 1; border: 1px solid var(--line); background: #121216; color: var(--muted);
  border-radius: 8px; padding: 8px 6px; font-size: 12px; font-weight: 700; cursor: pointer; font: inherit;
}
.ac-picker-tab.on { background: #1a1a22; color: var(--text); border-color: var(--accent); }
.ac-picker-pane[hidden] { display: none !important; }
.ac-picker-head { font-size: 11px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; padding: 4px 6px 8px; }
.ac-picker-list { list-style: none; margin: 0; padding: 0; max-height: 200px; overflow: auto; }
.ac-picker-sep {
  display: flex; align-items: center; gap: 10px;
  margin: 8px 4px; padding: 0; list-style: none; pointer-events: none;
}
.ac-picker-sep::before,
.ac-picker-sep::after {
  content: ""; flex: 1; height: 1px; background: var(--line);
}
.ac-picker-sep span {
  flex: 0 0 auto; font-size: 10px; font-weight: 700; letter-spacing: .08em;
  text-transform: uppercase; color: var(--muted); white-space: nowrap;
}
.ac-picker-item {
  width: 100%; text-align: left; background: none; border: 0; color: var(--text);
  font: inherit; padding: 10px 8px; border-radius: 10px; cursor: pointer;
  display: flex; flex-direction: column; gap: 2px;
}
.ac-picker-item:hover { background: var(--panel-2); }
.ac-picker-item strong { font-size: 13px; }
.ac-picker-item span { font-size: 11px; color: var(--muted); }
.ac-picker-empty { padding: 12px 8px; color: var(--muted); font-size: 13px; }
.ac-picker-add { display: block; padding: 10px 8px; font-size: 13px; }
.ac-picker-new { display: block; padding: 8px 6px 4px; font-size: 11px; color: var(--muted); }
.ac-picker-new .input { margin-top: 6px; }
.flight-sheet .block-circle {
  width: 118px; height: 118px; border-radius: 50%;
  border: 1px solid rgba(165,180,252,.7);
  box-shadow: 0 0 0 8px rgba(165,180,252,.08), 0 10px 30px rgba(0,0,0,.28);
  display: grid; place-items: center; text-align: center;
  background: #121216;
  margin: 0;
}
.flight-sheet .block-circle strong {
  display: block; font-family: "IBM Plex Mono", monospace; font-size: 18px; font-weight: 600;
}
.flight-sheet .block-circle span {
  font-size: 9px; color: var(--muted); letter-spacing: .08em; text-transform: uppercase;
}
.pf-toggle { width: 100%; text-align: center; }
.pf-label {
  display: block; font-size: 10px; color: var(--muted);
  letter-spacing: .08em; text-transform: uppercase; margin-bottom: 6px;
}
.pf-btns {
  display: inline-flex; background: var(--panel-2); border-radius: 999px;
  padding: 3px; border: 1px solid var(--line);
}
.pf-btn {
  border: 0; background: transparent; color: var(--muted); font: inherit;
  font-size: 12px; font-weight: 700; letter-spacing: .04em;
  padding: 7px 16px; border-radius: 999px; cursor: pointer;
}
.pf-btn.on { background: var(--accent); color: var(--accent-text); }
.stepper.is-locked { opacity: .45; }
.stepper.is-locked .stepper-btn { cursor: not-allowed; }
.approach-label { width: 100%; }
.fs-meta .remarks-label,
.fs-meta .rules-label { flex: none; width: auto; margin: 0; }
.stepper-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.stepper-label { display: block; font-size: 10px; color: var(--muted); letter-spacing: .06em; text-transform: uppercase; margin-bottom: 6px; }
.stepper-ctrl { display: flex; align-items: center; gap: 6px; }
.stepper-btn {
  width: 36px; height: 36px; border-radius: 10px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font-size: 18px; cursor: pointer; line-height: 1;
}
.stepper-btn:hover { border-color: var(--accent); color: var(--accent); }
.stepper-val {
  width: 52px; text-align: center; padding-left: 4px; padding-right: 4px;
  -moz-appearance: textfield;
}
.stepper-val::-webkit-outer-spin-button,
.stepper-val::-webkit-inner-spin-button { -webkit-appearance: none; margin: 0; }
.fs-crew {
  display: grid; gap: 12px;
  margin-top: 16px; padding: 14px;
  background: var(--panel-2); border: 1px solid var(--line); border-radius: 18px;
}
.fs-crew-bar {
  display: flex; flex-wrap: wrap; align-items: center; gap: 8px;
}
.fs-meta {
  display: grid; grid-template-columns: minmax(0, 1fr) 150px; gap: 12px; align-items: start;
}
.role-chip {
  display: inline-flex; align-items: center; gap: 8px;
  background: var(--panel-2); border: 1px solid var(--line);
  border-radius: 999px; padding: 6px 12px 6px 6px;
  color: var(--text); font: inherit; cursor: pointer;
}
.role-badge {
  background: var(--role); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 5px 9px; letter-spacing: .04em;
}
.role-name { font-size: 13px; font-weight: 600; }
.role-hint { font-size: 11px; color: var(--muted); }
.pic-name-btn {
  border-radius: 999px;
  min-height: 36px;
}
.pic-name-btn[hidden] { display: none !important; }
.pic-name-popout-card {
  max-height: min(88vh, 720px);
  display: flex;
  flex-direction: column;
}
.people-pick-list-scroll {
  max-height: min(55vh, 420px);
  overflow-y: auto;
  -webkit-overflow-scrolling: touch;
  padding-right: 2px;
  margin-bottom: 12px;
}
.role-popout-card {
  background: #17171a; border: 1px solid var(--line); border-radius: 16px;
  padding: 16px; max-height: min(88vh, 640px); overflow: auto;
}
.role-popout-head {
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.role-popout-sub { margin: 6px 0 14px; font-size: 12px; }
.role-pick-tabs {
  display: grid; grid-template-columns: 1fr 1fr; gap: 8px; margin-bottom: 14px;
}
.role-pick-tabs-3 { grid-template-columns: 1fr 1fr 1fr; }
.role-list-card { padding-bottom: 10px; }
.role-list {
  display: flex; flex-direction: column; gap: 0;
  margin-top: 8px; border: 1px solid var(--line); border-radius: 14px; overflow: hidden;
  background: #121216;
}
.role-list-item {
  display: flex; align-items: center; gap: 12px;
  width: 100%; text-align: left; border: 0; border-bottom: 1px solid var(--line);
  background: transparent; color: var(--text); padding: 14px 12px; cursor: pointer; font: inherit;
}
.role-list-item:last-child { border-bottom: 0; }
.role-list-item.on { background: #1a1a22; }
.role-list-badge {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 48px; height: 36px; border-radius: 8px;
  font-size: 11px; font-weight: 800; letter-spacing: .04em; color: #fff; flex-shrink: 0;
}
.role-list-badge.pic { background: #2c4eb3; }
.role-list-badge.picus { background: #e67e22; }
.role-list-badge.sic { background: #4aa3ff; }
.role-list-badge.dual { background: #22c55e; }
.role-list-badge.spic { background: #15803d; }
.role-list-badge.ins { background: #ef4444; }
.role-list-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.role-list-text strong { font-size: 14px; font-weight: 700; }
.role-list-text small { font-size: 12px; color: var(--muted); }
.role-sic-pick { margin-top: 12px; }
.role-sic-pick[hidden] { display: none !important; }
.role-badge.spic { background: #15803d; }
.role-badge.ins { background: #ef4444; }
.role-badge.copilot { background: #4aa3ff; }
.role-badge.dual { background: #22c55e; }
.instruction-toggle {
  margin-top: 4px;
  padding: 12px;
  background: #121216;
  border: 1px solid var(--line);
  border-radius: 12px;
}
.instruction-toggle .toggle { flex-shrink: 0; }
.role-picus-panel p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.role-badge.picus { background: #e67e22; }
.role-badge.dual { background: #0d9488; }
.role-pick-tab {
  border: 1px solid var(--line); background: #121216; color: var(--text);
  border-radius: 12px; padding: 12px 10px; font: inherit; font-weight: 600;
  cursor: pointer;
}
.role-pick-tab.on {
  border-color: var(--accent); background: rgba(165,180,252,.12); color: #fff;
}
.role-pic-panel p, .role-sic-panel p { margin: 0 0 12px; font-size: 13px; color: var(--muted); }
.people-pick-list { list-style: none; margin: 0 0 12px; padding: 0; display: grid; gap: 8px; }
.people-pick-item {
  display: flex; align-items: center; gap: 10px; width: 100%;
  border: 1px solid var(--line); background: #121216; color: var(--text);
  border-radius: 12px; padding: 12px; font: inherit; cursor: pointer; text-align: left;
}
.people-pick-item:hover, .people-pick-item.on {
  border-color: var(--accent); background: rgba(165,180,252,.1);
}
.people-pick-role {
  background: var(--role); color: #fff; font-size: 11px; font-weight: 700;
  border-radius: 999px; padding: 4px 8px; letter-spacing: .04em;
}
.people-pick-name { font-weight: 600; font-size: 14px; }
.people-pick-empty { margin: 0 0 12px; }
.remarks-label { flex: 1 1 180px; margin: 0; }
.rules-label { flex: 0 0 100px; margin: 0; }
.rules-alarm { display: block; margin-top: 4px; font-size: 11px; color: var(--red); line-height: 1.3; }
.rules-label.is-alarm { color: var(--red); }
.rules-label.is-alarm select {
  border-color: var(--red);
  box-shadow: 0 0 0 3px rgba(239, 106, 92, .35);
  animation: rules-shake .45s ease;
}
@keyframes rules-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-4px); }
  40% { transform: translateX(4px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}
.preview-block { margin-top: 18px; min-width: 0; }
.preview-caption {
  margin: 0 0 8px; font-size: 11px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted);
}
.preview-wrap {
  margin-top: 0;
  display: block;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  overflow-x: auto;
  overflow-y: hidden;
  -webkit-overflow-scrolling: touch;
  overscroll-behavior-x: contain;
  border-radius: 12px;
  background: #fff;
  padding: 8px;
  border: 1px solid #d8d8d8;
  scrollbar-gutter: stable;
  scrollbar-width: thin;
  scrollbar-color: #9ca3af #ececec;
}
.preview-wrap::-webkit-scrollbar { height: 10px; }
.preview-wrap::-webkit-scrollbar-track { background: #ececec; border-radius: 999px; }
.preview-wrap::-webkit-scrollbar-thumb { background: #9ca3af; border-radius: 999px; }
.preview-table {
  display: table;
  width: max-content;
  min-width: 1600px;
  border-collapse: collapse;
  font-size: 10px; color: #111; background: #fff;
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}
.preview-table th, .preview-table td {
  border: 1px solid #ccc; padding: 4px 5px; text-align: center; background: #fff; color: #111;
  vertical-align: middle; white-space: nowrap;
}
.preview-table thead th {
  background: #eee; font-weight: 700; font-size: 9px; line-height: 1.25;
  text-transform: uppercase; letter-spacing: .02em;
}
.preview-table thead tr.grp th {
  background: #e4e4e4; font-family: "IBM Plex Mono", ui-monospace, monospace; font-size: 10px;
}
.preview-table thead th small {
  display: block; font-size: 8px; font-weight: 600; text-transform: none; letter-spacing: 0; color: #444;
}
.preview-table td#pv-type,
.preview-table td#pv-remarks,
.preview-table td#pv-pic-name { text-align: left; white-space: normal; min-width: 72px; max-width: 160px; }
.preview-table tbody td { font-size: 11px; font-weight: 500; }
.flight-sheet .preview-wrap { touch-action: pan-x; }
.adjust-sheet {
  margin-top: 12px; padding: 14px; border-radius: 14px;
  background: var(--panel-2); border: 1px solid var(--line);
  position: relative; z-index: 20;
}
.adjust-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 12px; }
.balance-rules { font-size: 12px; margin: 0 0 10px; line-height: 1.45; }
.balance-msg,
.fs-warning {
  margin: 0 0 12px; padding: 10px 12px; border-radius: 10px;
  background: rgba(245,158,11,.12); border: 1px solid rgba(245,158,11,.4);
  color: #fbbf24; font-size: 12px; line-height: 1.45; font-weight: 600;
}
.fs-warning { margin: 0 0 14px; }
.balance-msg.is-warn,
.fs-warning.is-warn { display: block; }
.flight-sheet.has-balance-warning {
  box-shadow: 0 0 0 1px rgba(245,158,11,.35), 0 28px 90px rgba(0,0,0,.55);
}
.fs-footer {
  display: flex; flex-wrap: wrap; align-items: center; gap: 10px;
  margin-top: 18px; padding-top: 14px; border-top: 1px solid var(--line);
}
.fs-footer-label { font-size: 12px; color: var(--muted); margin-right: auto; }
.btn-save {
  background: var(--accent); color: var(--accent-text); border: 0;
  border-radius: 12px; padding: 12px 26px; font-weight: 700; cursor: pointer;
  font: inherit; min-width: 112px;
}
.btn-save:hover { filter: brightness(1.06); }

@media (max-width: 860px) {
  .fs-grid { grid-template-columns: 1fr; }
  .fs-center { order: -1; padding: 4px 0 8px; }
  .fs-center::before { display: none; }
  .fs-meta { grid-template-columns: 1fr; }
  .stepper-row { grid-template-columns: 1fr; }
  .ac-picker { left: 0; transform: none; width: 100%; }
  .fs-footer { justify-content: stretch; }
  .fs-footer .btn, .fs-footer a.btn { flex: 1; text-align: center; justify-content: center; }
}

/* ——— People / Add crew form ——— */
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0,0,0,0); border: 0;
}
.people-list { display: grid; gap: 8px; max-width: 720px; }
.people-row {
  display: flex; align-items: center; gap: 12px;
  background: var(--panel); border: 1px solid var(--line);
  border-radius: 14px; padding: 12px 14px;
}
.people-row-link {
  text-decoration: none; color: inherit; cursor: pointer;
}
.people-row-link:hover { border-color: var(--accent); }
.people-edit-hint {
  margin-left: auto; font-size: 12px; color: var(--accent); font-weight: 600; flex: 0 0 auto;
}
.people-avatar {
  width: 40px; height: 40px; border-radius: 50%;
  background: #3a3a40; color: #fff; display: grid; place-items: center;
  font-weight: 700; font-size: 14px; overflow: hidden; flex: 0 0 auto;
}
.people-avatar img { width: 100%; height: 100%; object-fit: cover; }
.people-meta .codes { font-weight: 600; }
.people-meta .name { font-size: 12px; color: var(--muted); margin-top: 2px; }
.people-labels { font-size: 11px; color: var(--muted); margin-top: 4px; }
.role-pill {
  display: inline-block; font-size: 10px; font-weight: 700; letter-spacing: .04em;
  padding: 2px 7px; border-radius: 999px; background: var(--role); color: #fff;
}
.role-pill.role-sic { background: #5b6478; }

.person-sheet {
  width: min(420px, 100%);
  margin: 0 auto 24px;
  background: #1c1c1e;
  border: 1px solid var(--line);
  border-radius: 22px;
  padding: 22px 18px 16px;
  box-shadow: 0 24px 80px rgba(0,0,0,.45);
}
.person-avatar-wrap { text-align: center; margin-bottom: 14px; }
.person-avatar-preview {
  width: 88px; height: 88px; border-radius: 50%;
  background: #9a9aa0; margin: 0 auto 10px; overflow: hidden;
}
.person-avatar-preview img { width: 100%; height: 100%; object-fit: cover; display: block; }
.person-change-img {
  display: inline-flex; align-items: center; justify-content: center;
  border: 1px solid rgba(165,180,252,.55); color: var(--accent);
  border-radius: 999px; padding: 6px 14px; font-size: 12px; cursor: pointer;
}
.person-link-flylog {
  width: 100%; margin-bottom: 12px; padding: 12px;
  background: #141416; border: 1px solid var(--line); border-radius: 12px;
  color: var(--accent); font: inherit; font-size: 14px; font-weight: 600;
  opacity: .7; cursor: not-allowed;
}
.person-fields {
  background: #141416; border: 1px solid var(--line); border-radius: 16px;
  overflow: hidden; margin-bottom: 14px;
}
.person-sig-block {
  margin: 0 0 14px;
  padding: 12px;
  background: #141416;
  border: 1px solid var(--line);
  border-radius: 16px;
}
.person-sig-box {
  margin-top: 0;
  padding-top: 0;
  border-top: 0;
}
.person-sig-box .panel-head h2 { font-size: 15px; margin: 0; }
.person-sig-box .sig-pad { height: 140px; }
.person-field { display: block; border-bottom: 1px solid #2a2a2e; }
.person-field:last-of-type { border-bottom: 0; }
.person-input {
  width: 100%; border: 0; background: transparent; color: var(--text);
  font: inherit; font-size: 15px; padding: 14px 14px; outline: none;
}
.person-input::placeholder { color: #8e8e93; }
.person-labels-block { padding: 12px 14px 14px; border-top: 1px solid #2a2a2e; }
.person-labels-title { font-size: 12px; color: var(--muted); margin-bottom: 8px; }
.person-role-row { display: grid; gap: 8px; margin-bottom: 10px; }
.person-role-btn {
  text-align: left; border: 1px solid var(--line); background: #1c1c1e;
  color: var(--text); border-radius: 12px; padding: 10px 12px;
  font: inherit; font-size: 13px; cursor: pointer;
}
.person-role-btn.on {
  border-color: var(--accent);
  background: rgba(165,180,252,.12);
  color: var(--accent);
  font-weight: 600;
}
.person-label-chips { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; }
.person-tag {
  display: inline-flex; align-items: center; gap: 6px;
  background: #000; color: #fff; border-radius: 999px;
  padding: 5px 10px; font-size: 12px; font-weight: 600;
}
.person-tag-x {
  border: 0; background: transparent; color: #aaa; cursor: default; font: inherit; line-height: 1;
}
.person-tag-hint { font-size: 12px; color: var(--muted); }
.person-actions {
  display: flex; justify-content: flex-end; align-items: center; gap: 14px;
}
.person-save {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 10px 18px; border-radius: 12px;
}

.crew-popout[hidden] { display: none !important; }
.crew-popout {
  position: fixed; inset: 0; z-index: 130;
  display: grid; place-items: center; padding: 16px;
}
.crew-popout-scrim {
  position: absolute; inset: 0; border: 0; margin: 0; padding: 0;
  background: rgba(0,0,0,.64); cursor: pointer;
}
.crew-popout-card {
  position: relative; z-index: 1; width: min(440px, 100%);
  max-height: min(92vh, 900px); overflow: auto;
}
.crew-popout-card .person-sheet { margin: 0; width: 100%; }
body.crew-popout-open { overflow: hidden; }

.an-back { margin: 0 0 12px; }
.theme-pick { display: grid; gap: 10px; margin-top: 14px; }
.theme-choice {
  display: flex; align-items: center; gap: 12px; width: 100%;
  text-align: left; padding: 12px 14px; border-radius: 12px;
  border: 1px solid var(--line); background: var(--panel-2); color: var(--text);
  font: inherit; cursor: pointer;
}
.theme-choice small { display: block; color: var(--muted); font-size: 12px; margin-top: 2px; }
.theme-choice.on { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.theme-swatch { width: 36px; height: 36px; border-radius: 10px; flex-shrink: 0; border: 1px solid var(--line); }
.theme-swatch-dark { background: linear-gradient(160deg, #2a2a32, #0c0c0e); }
.theme-swatch-light { background: linear-gradient(160deg, #fff, #e7e9ef); }

html[data-theme="light"] {
  color-scheme: light;
  --bg: #f3f4f7;
  --panel: #ffffff;
  --panel-2: #eef0f4;
  --line: #d7dbe3;
  --text: #17191e;
  --muted: #5d6470;
  --faint: #8a909a;
  --accent: #3b4ccc;
  --accent-text: #ffffff;
  --side: #ffffff;
}
html[data-theme="light"] body { background: var(--bg); color: var(--text); }
html[data-theme="light"] a:hover { color: #2436a8; }
html[data-theme="light"] body.settings-hub-page .main,
html[data-theme="light"] body.flight-popout-page .main { background: var(--bg); }
html[data-theme="light"] .pers-trial,
html[data-theme="light"] .pers-menu,
html[data-theme="light"] .pers-card,
html[data-theme="light"] .fee-box,
html[data-theme="light"] .ac-picker,
html[data-theme="light"] .fs-tabs,
html[data-theme="light"] .flight-sheet .block-circle,
html[data-theme="light"] .role-list,
html[data-theme="light"] .role-popout-card,
html[data-theme="light"] .person-sheet {
  background: #fff;
  color: var(--text);
}
html[data-theme="light"] table.log .grp th,
html[data-theme="light"] .calc-box,
html[data-theme="light"] .review div,
html[data-theme="light"] .remarks-sig,
html[data-theme="light"] .ac-sim-box,
html[data-theme="light"] .ac-picker-tab,
html[data-theme="light"] .instruction-toggle,
html[data-theme="light"] .role-pick-tab,
html[data-theme="light"] .people-pick-item,
html[data-theme="light"] .person-link-flylog,
html[data-theme="light"] .person-fields,
html[data-theme="light"] .person-sig-block,
html[data-theme="light"] .person-role-btn {
  background: var(--panel-2);
  color: var(--text);
}
html[data-theme="light"] .fs-tab.on,
html[data-theme="light"] .role-pick-tab.on { color: var(--text); }
html[data-theme="light"] .role-list-item.on,
html[data-theme="light"] .ac-picker-tab.on { background: #e7eaf6; color: var(--text); }
html[data-theme="light"] .ac-add-hero {
  background: radial-gradient(circle at 50% 40%, rgba(59,76,204,.18), transparent 62%), #eef0f4;
}
html[data-theme="light"] .pers-item,
html[data-theme="light"] .person-field { border-bottom-color: var(--line); }
html[data-theme="light"] .pers-item:hover { background: rgba(0,0,0,.04); }
html[data-theme="light"] .pers-ico { color: #3a3f48; }
html[data-theme="light"] .btn:hover { background: #2f3eb0; }
html[data-theme="light"] .cal-bar-flight { color: #14532d; background: rgba(22, 163, 74, .22); }
html[data-theme="light"] .cal-bar-schedule { color: #92400e; }
html[data-theme="light"] .cal-bar-meeting,
html[data-theme="light"] .cal-bar-duty { color: #0c4a6e; }
html[data-theme="light"] .sidebar { box-shadow: 1px 0 0 var(--line); }

