/* =====================================================================
   IJV Crew EFB - design tokens + components.
   REDESIGN: change the tokens in the two :root blocks below; components
   only use var(--ijv-*), never hard-coded colours.
   ===================================================================== */
:root {
  --ijv-bg: #eef1f6;
  --ijv-card: #ffffff;
  --ijv-sub: #f5f7fb;
  --ijv-nested: #ffffff;
  --ijv-text: #1b2433;
  --ijv-muted: #64748b;
  --ijv-border: #e2e7ef;
  --ijv-brand: #0d2b52;          /* primary (navy)            */
  --ijv-brand-2: #16457d;
  --ijv-on-brand: #ffffff;
  --ijv-accent: #d2232a;         /* Indonesian red            */
  --ijv-gold: #e8a33d;           /* highlight / active        */
  --ijv-on-gold: #1b2433;
  --ijv-ok: #0f9d58;  --ijv-ok-bg: #dcf5e7;
  --ijv-warn: #c26a00; --ijv-warn-bg: #fff1d6;
  --ijv-err: #d42a2a;  --ijv-err-bg: #fde3e3;
  --ijv-info: #1d63c4; --ijv-info-bg: #e2edfc;
  --ijv-header: linear-gradient(100deg, #0d2b52 0%, #16457d 100%);
  --ijv-th: #0d2b52; --ijv-th-text: #ffffff;
  --ijv-row-alt: #f8fafc; --ijv-row-hover: #eef3f9;
  --ijv-icon-bg: rgba(13, 43, 82, .08);
  --ijv-glass: rgba(255, 255, 255, .92);
  --ijv-shadow: 0 1px 2px rgba(16, 24, 40, .06), 0 4px 14px rgba(16, 24, 40, .06);
  --ijv-shadow-lg: 0 18px 48px rgba(16, 24, 40, .18);
  --ijv-radius: 10px;
  --ijv-radius-sm: 6px;
  --ijv-font: "Plus Jakarta Sans", system-ui, -apple-system, "Segoe UI", Roboto, Arial, sans-serif;
  --ijv-mono: "JetBrains Mono", ui-monospace, "SFMono-Regular", Menlo, Consolas, monospace;
  --ijv-gutter: 16px;
  --ijv-max: 1180px;
  color-scheme: light;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    --ijv-bg: #070b13; --ijv-card: #111a29; --ijv-sub: #0b1220; --ijv-nested: #172236;
    --ijv-text: #e8eef7; --ijv-muted: #93a4ba; --ijv-border: #1f2b40;
    --ijv-brand: #f2b84b; --ijv-brand-2: #f5c96f; --ijv-on-brand: #111a29; --ijv-accent: #ff5a5f;
    --ijv-ok: #34d399; --ijv-ok-bg: #0d2a20; --ijv-warn: #fbbf24; --ijv-warn-bg: #2b2108; --ijv-err: #f87171; --ijv-err-bg: #2c1012; --ijv-info: #7cb3ff; --ijv-info-bg: #0f2038;
    --ijv-header: linear-gradient(100deg, #0f1726 0%, #18243a 100%);
    --ijv-th: #0f1726; --ijv-th-text: #f2b84b; --ijv-row-alt: #0d1524; --ijv-row-hover: #172236;
    --ijv-icon-bg: rgba(242, 184, 75, .1); --ijv-glass: rgba(17, 26, 41, .92);
    --ijv-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .3); color-scheme: dark;
  }
}
:root[data-theme="dark"] {
  --ijv-bg: #070b13; --ijv-card: #111a29; --ijv-sub: #0b1220; --ijv-nested: #172236;
  --ijv-text: #e8eef7; --ijv-muted: #93a4ba; --ijv-border: #1f2b40;
  --ijv-brand: #f2b84b; --ijv-brand-2: #f5c96f; --ijv-on-brand: #111a29; --ijv-accent: #ff5a5f;
  --ijv-ok: #34d399; --ijv-ok-bg: #0d2a20; --ijv-warn: #fbbf24; --ijv-warn-bg: #2b2108; --ijv-err: #f87171; --ijv-err-bg: #2c1012; --ijv-info: #7cb3ff; --ijv-info-bg: #0f2038;
  --ijv-header: linear-gradient(100deg, #0f1726 0%, #18243a 100%);
  --ijv-th: #0f1726; --ijv-th-text: #f2b84b; --ijv-row-alt: #0d1524; --ijv-row-hover: #172236;
  --ijv-icon-bg: rgba(242, 184, 75, .1); --ijv-glass: rgba(17, 26, 41, .92);
  --ijv-shadow: 0 1px 2px rgba(0, 0, 0, .4), 0 4px 14px rgba(0, 0, 0, .3); color-scheme: dark;
}

/* ---------- base ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--ijv-bg); color: var(--ijv-text); font: 14px/1.5 var(--ijv-font); min-height: 100vh; overflow-x: hidden; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; line-height: 1.2; }
.mono { font-family: var(--ijv-mono); }
.muted { color: var(--ijv-muted); }
.small { font-size: 12px; }
.hidden { display: none !important; }
.right { text-align: right; }
.center { text-align: center; }
.nowrap { white-space: nowrap; }
.ok { color: var(--ijv-ok); } .warn { color: var(--ijv-warn); } .err { color: var(--ijv-err); }
.page { max-width: var(--ijv-max); margin: 0 auto; padding: 84px var(--ijv-gutter) 120px; }
body[data-chrome="bare"] .page { padding: 0; max-width: none; }
body[data-chrome="app"] .page { padding: 0; max-width: none; }
body[data-chrome="map"] .page { padding: 0; max-width: none; }
.loading-block { display: flex; align-items: center; gap: 10px; justify-content: center; padding: 48px 0; color: var(--ijv-muted); }
.spinner { width: 18px; height: 18px; border: 2px solid var(--ijv-border); border-top-color: var(--ijv-brand); border-radius: 50%; animation: spin .8s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.noscript { padding: 24px; text-align: center; }

/* ---------- top bar ---------- */
.topbar { position: fixed; inset: 0 0 auto 0; z-index: 40; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 10px var(--ijv-gutter); pointer-events: none; }
.topbar > * { pointer-events: auto; }
.tb-group { display: flex; gap: 8px; align-items: center; min-width: 0; }
.glass { background: var(--ijv-glass); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); border: 1px solid var(--ijv-border); border-radius: var(--ijv-radius); box-shadow: var(--ijv-shadow); }
.tb-pill { display: flex; align-items: center; gap: 10px; height: 42px; padding: 0 14px; font-weight: 700; white-space: nowrap; }
.tb-pill .sep { width: 1px; height: 18px; background: var(--ijv-border); }
.tb-callsign { color: var(--ijv-gold); }
.tb-btn { height: 42px; min-width: 42px; display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 0 12px; cursor: pointer; text-decoration: none; font-weight: 700; font-size: 13px; }
.tb-btn:hover { border-color: var(--ijv-brand); }
.tb-status { font-size: 18px; }
.tb-status.on { color: var(--ijv-ok); } .tb-status.off { color: var(--ijv-muted); }
.rank-badge { background: var(--ijv-gold); color: var(--ijv-on-gold); font-size: 11px; font-weight: 800; border-radius: 4px; padding: 1px 6px; letter-spacing: .04em; }
.demo-badge { background: var(--ijv-accent); color: #fff; font-size: 10px; font-weight: 800; border-radius: 4px; padding: 2px 6px; letter-spacing: .08em; }
.menu { position: absolute; top: 52px; right: var(--ijv-gutter); width: 240px; padding: 6px; z-index: 50; }
.menu a, .menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 10px 12px; border: 0; background: none; text-align: left; text-decoration: none; border-radius: var(--ijv-radius-sm); cursor: pointer; font-weight: 600; }
.menu a:hover, .menu button:hover { background: var(--ijv-sub); }
.menu hr { border: 0; border-top: 1px solid var(--ijv-border); margin: 6px 0; }
.menu .danger { color: var(--ijv-err); }
.tb-quick { display: flex; gap: 6px; }
.tb-quick .tb-btn { min-width: 52px; }
.tb-hide-sm { }
@media (max-width: 560px) { .tb-hide-sm { display: none !important; } .tb-pill { padding: 0 10px; gap: 8px; } .tb-btn { padding: 0 8px; min-width: 38px; } .topbar { gap: 4px; } .tb-group { gap: 6px; } }

/* ---------- dock ---------- */
.dock { position: fixed; left: 50%; transform: translateX(-50%); bottom: 12px; z-index: 40; display: flex; align-items: center; max-width: calc(100% - 24px); padding: 6px; gap: 2px; }
.dock-scroll { display: flex; gap: 2px; overflow-x: auto; scrollbar-width: none; scroll-behavior: smooth; }
.dock-scroll::-webkit-scrollbar { display: none; }
.dock a { flex: 0 0 auto; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 2px; min-width: 64px; height: 54px; padding: 4px 8px; text-decoration: none; font-size: 10.5px; font-weight: 700; border-radius: var(--ijv-radius-sm); color: var(--ijv-text); }
.dock a i { font-size: 18px; color: var(--ijv-brand); }
.dock a:hover { background: var(--ijv-sub); }
.dock a.active { background: var(--ijv-gold); color: var(--ijv-on-gold); }
.dock a.active i { color: var(--ijv-on-gold); }
.dock a.disabled { opacity: .35; pointer-events: none; }
.dock-arrow { flex: 0 0 auto; width: 26px; height: 54px; border: 0; background: none; cursor: pointer; color: var(--ijv-muted); font-size: 16px; }
.dock-arrow[hidden] { display: none; }
.dock-badge { position: absolute; margin: -22px 0 0 22px; background: var(--ijv-accent); color: #fff; border-radius: 10px; font-size: 9px; padding: 0 5px; min-width: 16px; text-align: center; }

/* ---------- page header & cards ---------- */
.page-header { background: var(--ijv-header); color: #fff; border-radius: var(--ijv-radius); padding: 18px 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 16px; box-shadow: var(--ijv-shadow); overflow: hidden; position: relative; }
.page-header::after { content: ""; position: absolute; inset: 0; background: repeating-linear-gradient(135deg, rgba(255,255,255,.04) 0 2px, transparent 2px 14px); pointer-events: none; }
.page-header h1 { font-size: 20px; font-weight: 800; display: flex; gap: 10px; align-items: center; }
.page-header .ph-right { font-weight: 800; font-size: 18px; letter-spacing: .02em; }
.card { background: var(--ijv-card); border: 1px solid var(--ijv-border); border-radius: var(--ijv-radius); box-shadow: var(--ijv-shadow); margin-bottom: 16px; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px; background: var(--ijv-header); color: #fff; font-weight: 800; font-size: 12.5px; letter-spacing: .06em; text-transform: uppercase; }
.card-head.light { background: transparent; color: var(--ijv-text); border-bottom: 1px solid var(--ijv-border); }
.card-head button.collapse-btn { background: none; border: 0; color: inherit; cursor: pointer; font-size: 16px; }
.card.collapsed .card-body { display: none; }
.card.collapsed .collapse-btn i { transform: rotate(-90deg); }
.card-body { padding: 16px; }
.card-body.flush { padding: 0; }
.section-title { font-size: 12px; font-weight: 800; letter-spacing: .1em; text-transform: uppercase; color: var(--ijv-muted); margin: 0 0 12px; padding-bottom: 10px; border-bottom: 1px solid var(--ijv-border); }
.grid { display: grid; gap: 12px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g6 { grid-template-columns: repeat(6, minmax(0, 1fr)); }
@media (max-width: 900px) { .g4, .g6 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 520px) { .g2, .g3 { grid-template-columns: minmax(0, 1fr); } }
.item .lbl { font-size: 11px; font-weight: 800; letter-spacing: .08em; color: var(--ijv-muted); text-transform: uppercase; }
.item .val { font-weight: 700; font-size: 15px; word-break: break-word; }
.item .val.big { font-size: 22px; font-weight: 800; }
.item .sub { font-size: 12px; color: var(--ijv-muted); }
.tile { background: var(--ijv-sub); border: 1px solid var(--ijv-border); border-radius: var(--ijv-radius-sm); padding: 12px; }
.kpi { background: var(--ijv-card); border: 1px solid var(--ijv-border); border-radius: var(--ijv-radius); padding: 16px; box-shadow: var(--ijv-shadow); }
.kpi i { color: var(--ijv-brand); font-size: 18px; }
.kpi .v { font-size: 26px; font-weight: 800; margin-top: 6px; }
.kpi .l { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; }
.kpi .s { font-size: 12px; color: var(--ijv-muted); }

/* ---------- home ---------- */
.wordmark { text-align: center; margin: 4px 0 18px; }
.wordmark img { height: 54px; }
.flight-strip { padding: 14px 0 10px; }
.fs-top { display: flex; justify-content: space-between; padding: 0 16px; }
.fs-apt b { font-size: 18px; font-weight: 800; display: block; }
.fs-apt span { font-size: 11px; color: var(--ijv-muted); text-transform: uppercase; }
.fs-mid { text-align: center; font-weight: 700; }
.fs-svg { width: 100%; height: 110px; display: block; }
.fs-foot { text-align: center; font-size: 12px; font-weight: 600; line-height: 1.5; }
.checkin-btn { display: block; width: 100%; padding: 14px; text-align: center; font-weight: 800; letter-spacing: .12em; border-radius: var(--ijv-radius); text-decoration: none; background: var(--ijv-gold); color: var(--ijv-on-gold); margin-bottom: 16px; border: 0; cursor: pointer; }
.checkin-btn.done { background: var(--ijv-ok-bg); color: var(--ijv-ok); }
.menu-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 14px; }
@media (min-width: 760px) { .menu-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); } }
.menu-btn { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 10px; min-height: 100px; padding: 16px; text-decoration: none; background: var(--ijv-sub); border: 1px solid var(--ijv-border); border-radius: var(--ijv-radius-sm); font-weight: 700; text-align: center; transition: transform .12s, border-color .12s; }
.menu-btn i { font-size: 24px; color: var(--ijv-brand); }
.menu-btn:hover { transform: translateY(-2px); border-color: var(--ijv-brand); }
.menu-btn.disabled { opacity: .4; pointer-events: none; }
.menu-btn .ext { font-size: 10px; color: var(--ijv-muted); }

/* ---------- forms ---------- */
.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > label, .lbl-sm { font-size: 11px; font-weight: 800; letter-spacing: .08em; text-transform: uppercase; color: var(--ijv-muted); }
.input, select.input, textarea.input { width: 100%; padding: 10px 12px; border: 1px solid var(--ijv-border); background: var(--ijv-sub); border-radius: var(--ijv-radius-sm); outline: none; min-height: 40px; }
.input:focus { border-color: var(--ijv-brand); box-shadow: 0 0 0 3px var(--ijv-icon-bg); }
.input.sm { padding: 4px 6px; min-height: 30px; font-size: 13px; }
.input.cell { padding: 2px 4px; min-height: 26px; font-size: 12px; text-align: center; background: var(--ijv-nested); width: 100%; min-width: 52px; }
textarea.input { min-height: 90px; resize: vertical; }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: var(--ijv-radius-sm); border: 1px solid transparent; font-weight: 800; letter-spacing: .03em; cursor: pointer; text-decoration: none; background: var(--ijv-brand); color: var(--ijv-on-brand); min-height: 40px; }
.btn:hover { filter: brightness(1.08); }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn.gold { background: var(--ijv-gold); color: var(--ijv-on-gold); }
.btn.red { background: var(--ijv-err); color: #fff; }
.btn.ok { background: var(--ijv-ok); color: #fff; }
.btn.ghost { background: transparent; color: var(--ijv-text); border-color: var(--ijv-border); }
.btn.sm { padding: 6px 10px; min-height: 30px; font-size: 12px; }
.btn.block { width: 100%; }
.btn-row { display: flex; flex-wrap: wrap; gap: 10px; }
.switch { position: relative; display: inline-block; width: 42px; height: 24px; flex: 0 0 auto; }
.switch input { opacity: 0; width: 0; height: 0; }
.slider { position: absolute; inset: 0; background: var(--ijv-border); border-radius: 24px; cursor: pointer; transition: .2s; }
.slider::before { content: ""; position: absolute; width: 18px; height: 18px; left: 3px; top: 3px; background: #fff; border-radius: 50%; transition: .2s; box-shadow: 0 1px 3px rgba(0,0,0,.3); }
.switch input:checked + .slider { background: var(--ijv-ok); }
.switch input:checked + .slider::before { transform: translateX(18px); }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip { padding: 7px 12px; border: 1px solid var(--ijv-border); background: var(--ijv-sub); border-radius: 999px; font-weight: 700; font-size: 12.5px; cursor: pointer; user-select: none; }
.chip.on { background: var(--ijv-brand); color: var(--ijv-on-brand); border-color: var(--ijv-brand); }
.chip.cargo::after { content: " ▣"; font-size: 10px; }
.chip.dis { opacity: .35; pointer-events: none; }
.seg { display: inline-flex; background: var(--ijv-sub); border: 1px solid var(--ijv-border); border-radius: var(--ijv-radius-sm); padding: 3px; gap: 2px; flex-wrap: wrap; }
.seg button { border: 0; background: none; padding: 7px 12px; border-radius: 5px; font-weight: 700; font-size: 12.5px; cursor: pointer; }
.seg button.on { background: var(--ijv-card); box-shadow: var(--ijv-shadow); color: var(--ijv-brand); }
input[type=range] { width: 100%; accent-color: var(--ijv-brand); }
.dual-range { position: relative; height: 30px; }
.dual-range input { position: absolute; inset: 0; pointer-events: none; background: none; -webkit-appearance: none; appearance: none; }
.dual-range input::-webkit-slider-thumb { pointer-events: auto; -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--ijv-brand); border: 2px solid #fff; cursor: pointer; }
.dual-range input::-moz-range-thumb { pointer-events: auto; width: 16px; height: 16px; border-radius: 50%; background: var(--ijv-brand); border: 2px solid #fff; cursor: pointer; }
.dual-range .track { position: absolute; left: 0; right: 0; top: 13px; height: 4px; background: var(--ijv-border); border-radius: 4px; }
.dual-range .fill { position: absolute; top: 13px; height: 4px; background: var(--ijv-brand); border-radius: 4px; }
.notif-box { background: var(--ijv-sub); border: 1px solid var(--ijv-border); border-radius: var(--ijv-radius-sm); padding: 10px 12px; margin-bottom: 10px; }
.notif-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; font-weight: 700; font-size: 12.5px; text-transform: uppercase; letter-spacing: .04em; }
.tip { position: relative; cursor: help; color: var(--ijv-muted); }
.tip:hover::after { content: attr(data-tip); position: absolute; left: 50%; bottom: 140%; transform: translateX(-50%); width: 240px; padding: 8px 10px; background: var(--ijv-text); color: var(--ijv-card); font-size: 12px; font-weight: 500; text-transform: none; letter-spacing: 0; border-radius: 6px; z-index: 20; }

/* ---------- tables ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { background: var(--ijv-th); color: var(--ijv-th-text); font-size: 11px; font-weight: 800; letter-spacing: .06em; text-transform: uppercase; padding: 8px 10px; text-align: left; white-space: nowrap; }
table.t td { padding: 8px 10px; border-bottom: 1px solid var(--ijv-border); vertical-align: middle; }
table.t tr:nth-child(even) td { background: var(--ijv-row-alt); }
table.t tbody tr:hover td { background: var(--ijv-row-hover); }
table.t.compact td, table.t.compact th { padding: 5px 8px; }
table.t tr.clickable { cursor: pointer; }
table.t tr.total td { font-weight: 800; border-top: 2px solid var(--ijv-text); }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; }
.kv dt { font-size: 11px; font-weight: 800; color: var(--ijv-muted); letter-spacing: .06em; text-transform: uppercase; }
.kv dd { margin: 0; font-weight: 700; }

/* ---------- badges & status ---------- */
.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11px; font-weight: 800; letter-spacing: .04em; background: var(--ijv-sub); border: 1px solid var(--ijv-border); white-space: nowrap; }
.badge.ok { background: var(--ijv-ok-bg); color: var(--ijv-ok); border-color: transparent; }
.badge.warn { background: var(--ijv-warn-bg); color: var(--ijv-warn); border-color: transparent; }
.badge.err { background: var(--ijv-err-bg); color: var(--ijv-err); border-color: transparent; }
.badge.info { background: var(--ijv-info-bg); color: var(--ijv-info); border-color: transparent; }
.badge.brand { background: var(--ijv-brand); color: var(--ijv-on-brand); border-color: transparent; }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; background: var(--ijv-muted); }
.dot.green { background: var(--ijv-ok); } .dot.amber { background: var(--ijv-warn); } .dot.red { background: var(--ijv-err); }
.cat-VFR { background: #16a34a; color: #fff; } .cat-MVFR { background: #2563eb; color: #fff; } .cat-IFR { background: #dc2626; color: #fff; } .cat-LIFR { background: #a21caf; color: #fff; } .cat-UNK { background: var(--ijv-muted); color: #fff; }
.banner { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--ijv-radius-sm); margin-bottom: 16px; font-weight: 600; }
.banner.info { background: var(--ijv-info-bg); color: var(--ijv-info); }
.banner.warn { background: var(--ijv-warn-bg); color: var(--ijv-warn); }
.banner.err { background: var(--ijv-err-bg); color: var(--ijv-err); }
.banner.ok { background: var(--ijv-ok-bg); color: var(--ijv-ok); }
.empty { text-align: center; padding: 40px 16px; color: var(--ijv-muted); }
.empty i { font-size: 34px; display: block; margin-bottom: 8px; color: var(--ijv-brand); opacity: .6; }

/* ---------- doc / mono blocks ---------- */
pre.doc { font-family: var(--ijv-mono); font-size: 12.5px; line-height: 1.45; background: var(--ijv-nested); border: 1px solid var(--ijv-border); border-radius: var(--ijv-radius-sm); padding: 16px; margin: 0; overflow-x: auto; white-space: pre; }
pre.doc.paper { background: #fffef7; color: #1b1b1b; }
:root[data-theme="dark"] pre.doc.paper { background: #0e1525; color: #e8eef7; }
.wx-raw { font-family: var(--ijv-mono); font-size: 12.5px; background: var(--ijv-sub); padding: 10px 12px; border-radius: var(--ijv-radius-sm); border: 1px solid var(--ijv-border); word-break: break-word; }

/* ---------- navlog ---------- */
.navlog { font-size: 12px; }
.navlog table.t td, .navlog table.t th { padding: 4px 6px; text-align: center; }
.navlog .wpt { font-weight: 800; text-align: left !important; }
.navlog tr.passed td { opacity: .55; }
.navlog tr.latest td { background: var(--ijv-ok-bg) !important; }
.navlog tr.fir td { background: var(--ijv-info-bg) !important; color: var(--ijv-info); font-weight: 700; text-align: left !important; font-size: 11px; }
.navlog tr.r2 td { border-bottom: 2px solid var(--ijv-border); }
.navlog tr.etp td { background: var(--ijv-warn-bg) !important; }
.navlog .diff-neg { color: var(--ijv-err); font-weight: 800; } .navlog .diff-pos { color: var(--ijv-ok); font-weight: 800; }
.sticky-controls { position: sticky; top: 64px; z-index: 5; display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; padding: 10px; margin-bottom: 12px; }

/* ---------- modal & toasts ---------- */
.modal-back { position: fixed; inset: 0; background: rgba(5, 10, 20, .55); z-index: 80; display: flex; align-items: center; justify-content: center; padding: 16px; }
.modal { background: var(--ijv-card); border-radius: var(--ijv-radius); box-shadow: var(--ijv-shadow-lg); width: min(520px, 100%); max-height: calc(100vh - 32px); overflow: auto; padding: 22px; }
.modal.wide { width: min(900px, 100%); }
.modal h3 { font-size: 18px; margin-bottom: 10px; }
.modal .m-icon { width: 46px; height: 46px; border-radius: 12px; display: flex; align-items: center; justify-content: center; font-size: 22px; background: var(--ijv-warn-bg); color: var(--ijv-warn); margin: 0 auto 12px; }
.toasts { position: fixed; top: 64px; right: 12px; z-index: 90; display: flex; flex-direction: column; gap: 8px; width: min(360px, calc(100% - 24px)); }
.toast { display: flex; gap: 10px; padding: 12px 14px; border-radius: var(--ijv-radius-sm); background: var(--ijv-card); border: 1px solid var(--ijv-border); box-shadow: var(--ijv-shadow-lg); border-left: 4px solid var(--ijv-info); animation: tin .25s ease; }
.toast.success { border-left-color: var(--ijv-ok); } .toast.warning { border-left-color: var(--ijv-warn); } .toast.error { border-left-color: var(--ijv-err); }
.toast b { display: block; font-size: 13px; } .toast p { margin: 0; font-size: 12.5px; color: var(--ijv-muted); }
.toast.out { opacity: 0; transform: translateX(20px); transition: .25s; }
@keyframes tin { from { opacity: 0; transform: translateX(20px); } }
.notif-pill { position: fixed; top: 62px; left: 50%; transform: translateX(-50%); z-index: 45; width: min(560px, calc(100% - 24px)); padding: 12px 14px; }
.notif-pill .np-head { display: flex; justify-content: space-between; gap: 10px; align-items: center; }
.notif-pill .np-body { font-size: 13px; color: var(--ijv-muted); max-height: 3em; overflow: hidden; }
.notif-pill.expanded .np-body { max-height: none; }
.install-bar { position: fixed; left: 12px; right: 12px; bottom: 82px; z-index: 46; padding: 12px 14px; display: flex; gap: 12px; align-items: center; max-width: 520px; margin: 0 auto; }

/* ---------- logon ---------- */
.logon-wrap { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 16px; }
.logon-card { display: grid; grid-template-columns: 380px 1fr; width: min(1100px, 100%); min-height: min(720px, calc(100vh - 32px)); background: var(--ijv-card); border-radius: 14px; overflow: hidden; box-shadow: var(--ijv-shadow-lg); }
.logon-left { display: flex; flex-direction: column; border-right: 1px solid var(--ijv-border); min-height: 0; }
.logon-head { text-align: center; padding: 28px 24px 18px; border-bottom: 1px solid var(--ijv-border); }
.logon-head img { height: 58px; }
.logon-head h2 { font-size: 18px; letter-spacing: .14em; color: var(--ijv-brand); margin-top: 12px; }
.logon-head p { margin: 4px 0 0; font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: var(--ijv-muted); }
.logon-form { padding: 20px 24px; overflow-y: auto; flex: 1; }
.logon-foot { padding: 12px 20px; font-size: 11px; text-align: center; color: var(--ijv-muted); border-top: 1px solid var(--ijv-border); background: var(--ijv-sub); }
.logon-foot .warnline { color: var(--ijv-warn); font-weight: 700; margin-bottom: 4px; }
.logon-right { position: relative; background: var(--ijv-header); background-size: cover; background-position: center; transition: background-image .6s; }
.logon-right .hero-text { position: absolute; right: 32px; bottom: 32px; text-align: right; color: #fff; text-shadow: 0 2px 18px rgba(0,0,0,.5); }
.logon-right .hero-text h1 { font-size: 46px; font-weight: 800; }
.logon-right .hero-text p { font-family: var(--ijv-mono); color: var(--ijv-gold); margin: 6px 0 0; }
@media (max-width: 900px) { .logon-card { grid-template-columns: 1fr; } .logon-right { display: none; } }

/* ---------- misc components ---------- */
.list-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 0; border-bottom: 1px solid var(--ijv-border); }
.list-row:last-child { border-bottom: 0; }
.bar { height: 8px; border-radius: 6px; background: var(--ijv-sub); overflow: hidden; }
.bar > span { display: block; height: 100%; background: var(--ijv-brand); border-radius: 6px; }
.loadbar { margin-top: 12px; }
.loadbar .track { height: 6px; background: var(--ijv-sub); border-radius: 6px; overflow: hidden; }
.loadbar .fill { height: 100%; width: 0; background: var(--ijv-gold); transition: width .3s; }
.map-box { height: 420px; border-radius: var(--ijv-radius-sm); overflow: hidden; border: 1px solid var(--ijv-border); background: var(--ijv-sub); position: relative; }
.legend { display: flex; flex-wrap: wrap; gap: 12px; font-size: 12px; margin-top: 10px; }
.legend span { display: inline-flex; gap: 6px; align-items: center; }
.sw { width: 14px; height: 4px; border-radius: 2px; display: inline-block; }
.svg-chart { width: 100%; height: auto; display: block; }
.svg-chart text { fill: var(--ijv-muted); font-size: 10px; font-family: var(--ijv-font); }
.heat { display: grid; grid-template-columns: repeat(24, 1fr); gap: 2px; }
.heat div { aspect-ratio: 1; border-radius: 2px; background: var(--ijv-brand); }
.trip-card { border: 1px solid var(--ijv-border); border-radius: var(--ijv-radius-sm); margin-bottom: 12px; background: var(--ijv-card); }
.trip-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; padding: 10px 12px; border-bottom: 1px solid var(--ijv-border); flex-wrap: wrap; }
.trip-card.dragging { opacity: .5; } .trip-card.drag-over { outline: 2px dashed var(--ijv-brand); }
.drag-handle { cursor: grab; color: var(--ijv-muted); }
.layover-row td { background: var(--ijv-sub) !important; font-size: 11px; font-weight: 700; color: var(--ijv-muted); text-align: center; }
.route-pill { font-weight: 800; white-space: nowrap; }
.cal { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.cal div { min-height: 70px; border: 1px solid var(--ijv-border); border-radius: 6px; padding: 6px; font-size: 11px; background: var(--ijv-sub); }
.cal b { display: block; }
.strike-meter { display: flex; gap: 8px; }
.strike-meter span { flex: 1; height: 10px; border-radius: 5px; background: var(--ijv-sub); border: 1px solid var(--ijv-border); }
.strike-meter span.on { background: var(--ijv-err); border-color: var(--ijv-err); }
.checklist-item { display: flex; gap: 10px; align-items: center; padding: 10px 12px; border-bottom: 1px solid var(--ijv-border); cursor: pointer; }
.checklist-item .resp { margin-left: auto; font-weight: 800; font-family: var(--ijv-mono); font-size: 12px; text-align: right; }
.checklist-item.done { opacity: .5; }
.checklist-item.done .ck { color: var(--ijv-ok); }
.footer-note { text-align: center; font-size: 11.5px; color: var(--ijv-muted); padding: 10px 16px 100px; }
.footer-note .warnline { color: var(--ijv-warn); font-weight: 700; }
body[data-chrome="bare"] .footer-note, body[data-chrome="app"] .footer-note, body[data-chrome="map"] .footer-note { display: none; }

/* ---------- full-screen tool apps (performance) ---------- */
.perf-app { min-height: 100vh; background: #1d2026; color: #e9edf3; display: flex; flex-direction: column; font-size: 14px; }
.perf-top { display: flex; align-items: stretch; background: #2a2e36; border-bottom: 1px solid #3a3f49; }
.perf-top .title { padding: 14px 20px; font-size: 20px; font-weight: 800; letter-spacing: .06em; flex: 1; display: flex; align-items: center; gap: 12px; }
.perf-top .reg { padding: 8px 16px; text-align: center; background: #22252c; border-left: 1px solid #3a3f49; font-weight: 800; }
.perf-top .reg small { display: block; font-weight: 600; color: #a6adbb; }
.perf-tabs { display: flex; overflow-x: auto; background: #24272e; border-bottom: 1px solid #3a3f49; }
.perf-tabs button { background: none; border: 0; color: #a6adbb; padding: 12px 16px; font-weight: 800; letter-spacing: .05em; cursor: pointer; white-space: nowrap; border-bottom: 3px solid transparent; }
.perf-tabs button.on { color: #fff; border-bottom-color: #ff9f1a; }
.perf-body { flex: 1; padding: 16px; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 16px; max-width: 1200px; width: 100%; margin: 0 auto; }
@media (max-width: 820px) { .perf-body { grid-template-columns: minmax(0, 1fr); } }
.perf-panel { background: #262a32; border: 1px solid #3a3f49; border-radius: 8px; overflow: hidden; }
.perf-panel h4 { margin: 0; padding: 10px 14px; background: #2f343d; font-size: 12px; letter-spacing: .1em; color: #a6adbb; }
.perf-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 10px 14px; border-bottom: 1px solid #333842; }
.perf-row label { font-size: 12px; font-weight: 700; letter-spacing: .06em; color: #a6adbb; text-transform: uppercase; }
.perf-row input, .perf-row select { background: #1b1e24; border: 1px solid #454b57; color: #fff; border-radius: 5px; padding: 6px 8px; width: 150px; text-align: right; font-weight: 700; }
.perf-row .v { font-weight: 800; font-family: var(--ijv-mono); }
.perf-out .big { font-size: 26px; font-weight: 800; font-family: var(--ijv-mono); color: #58e07a; }
.perf-out .bad { color: #ff6b6b; }
.perf-foot { display: flex; gap: 10px; padding: 12px 16px; background: #2a2e36; border-top: 1px solid #3a3f49; flex-wrap: wrap; }
.perf-foot button { border-radius: 999px; border: 1px solid #555c69; background: #33373f; color: #fff; padding: 10px 18px; font-weight: 800; letter-spacing: .05em; cursor: pointer; }
.perf-foot button.primary { background: #ff9f1a; border-color: #ff9f1a; color: #1d2026; margin-left: auto; }
.perf-foot .ver { align-self: center; color: #a6adbb; font-size: 12px; }
.perf-foot .ver b { color: #58e07a; }
.rwy-graphic { padding: 14px; }
.rwy-graphic .strip { position: relative; height: 34px; background: #3b3f47; border-radius: 4px; }
.rwy-graphic .need { position: absolute; left: 0; top: 0; bottom: 0; background: rgba(88, 224, 122, .55); border-radius: 4px 0 0 4px; }
.rwy-graphic .need.bad { background: rgba(255, 107, 107, .6); }


/* ---------- Garuda OFP package ---------- */
.gtabs { display: flex; gap: 4px; overflow-x: auto; background: var(--ijv-sub); border: 1px solid var(--ijv-border); border-radius: var(--ijv-radius-sm); padding: 4px; margin-bottom: 10px; }
.gtabs button { flex: 1 0 auto; border: 0; background: none; padding: 9px 14px; border-radius: 6px; font-weight: 700; font-size: 13px; color: var(--ijv-muted); cursor: pointer; white-space: nowrap; }
.gtabs button.on { background: var(--ijv-card); color: var(--ijv-brand); box-shadow: var(--ijv-shadow); }
.gfill { display: flex; flex-wrap: wrap; gap: 6px 14px; align-items: center; font-size: 12.5px; font-weight: 700; margin: 0 2px 10px; }
.gfill .ok { color: var(--ijv-ok); } .gfill .todo { color: var(--ijv-warn); }
.gdoc, .gnav { --g-paper: #fffef9; --g-ink: #111; --g-fill: #fff6c2; --g-fill-line: #9a7b00; }
.gdoc {
  background: var(--g-paper); color: var(--g-ink); border: 1px solid var(--ijv-border); border-radius: var(--ijv-radius-sm); box-shadow: var(--ijv-shadow); overflow-x: auto; }
[data-theme="dark"] :is(.gdoc, .gnav) { --g-paper: #15181d; --g-ink: #e6e6e6; --g-fill: #3a3313; --g-fill-line: #e5c14a; }
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) :is(.gdoc, .gnav) { --g-paper: #15181d; --g-ink: #e6e6e6; --g-fill: #3a3313; --g-fill-line: #e5c14a; } }
.gdoc-head { display: flex; justify-content: space-between; font: 600 11px var(--ijv-mono); color: #7d7d7d; padding: 8px 14px 0; letter-spacing: .04em; }
.gdoc-body { padding: 6px 14px 18px; min-width: min-content; }
.gdoc-foot { font: 11px var(--ijv-mono); color: #7d7d7d; text-align: center; margin: 0; padding: 0 14px 12px; }
.g-pre { font-family: "Courier New", Courier, var(--ijv-mono); font-size: 13px; line-height: 1.45; margin: 0; white-space: pre; color: inherit; background: none; }
.g-nav { margin-top: 0; }
.g-fir { color: var(--ijv-info); }
.gf { font: inherit; color: inherit; width: 4ch; box-sizing: content-box; padding: 0; margin: 0; border: 0; border-bottom: 1px dotted var(--g-fill-line);
  background: var(--g-fill); border-radius: 0; vertical-align: baseline; height: 1.25em; letter-spacing: 0; text-transform: uppercase; }
.gf::placeholder { color: var(--g-fill-line); opacity: .75; }
.gf:focus { outline: 2px solid var(--ijv-brand); outline-offset: 1px; }
.gf.bad { background: var(--ijv-err-bg); color: var(--ijv-err); }
.gf.sign { font-style: italic; font-weight: 700; }
.g-diff { font-weight: 700; } .g-diff.neg { color: var(--ijv-err); } .g-diff.pos { color: var(--ijv-ok); }
.g-box { border: 2px solid currentColor; margin: 6px 0; max-width: 75ch; font-family: "Courier New", Courier, var(--ijv-mono); font-size: 13px; }
.g-box-h { background: #add8e6; color: #000; text-align: center; font-weight: 700; border-bottom: 1px solid currentColor; padding: 2px; line-height: 1.25; }
.g-box-b { white-space: pre-wrap; padding: 6px 8px; line-height: 1.4; }
.g-notam-h { text-align: center; font: 700 14px "Courier New", Courier, var(--ijv-mono); margin: 6px 0 14px; }
.g-cols { column-count: 2; column-gap: 2rem; column-rule: 1px solid var(--ijv-border); font: 12.5px/1.4 "Courier New", Courier, var(--ijv-mono); }
@media (max-width: 760px) { .g-cols { column-count: 1; } .g-pre, .g-box, .g-wx { font-size: 11px; } .gdoc-body { padding: 4px 8px 14px; } }
.g-ngroup { margin-bottom: 14px; } .g-ngroup > b { display: block; border-bottom: 1px solid currentColor; margin: 8px 0 6px; }
.g-ngroup p { margin: 0 0 10px; break-inside: avoid; }
.g-wx { font: 13px/1.45 "Courier New", Courier, var(--ijv-mono); margin: 14px 0; max-width: 80ch; } .g-wx b { display: block; margin-bottom: 4px; }
/* Garuda-style navlog page */
.gnav table.t td, .gnav table.t th { font-family: "Courier New", Courier, var(--ijv-mono); font-size: 12.5px; padding: 3px 6px; text-align: right; white-space: nowrap; }
.gnav table.t th { text-align: right; }
.gnav .l { text-align: left !important; }
.gnav tr.r1 td { border-bottom: 0; padding-top: 6px; }
.gnav tr.r2 td { border-bottom: 2px solid var(--ijv-border); padding-bottom: 6px; }
.gnav table.t tbody tr td, .gnav table.t tbody tr:nth-child(even) td { background: var(--ijv-card); }
.gnav input.gf { height: 1.5em; }
.gnav tr.alt td { background: var(--ijv-row-alt) !important; }
.gnav tr.passed td { opacity: .55; } .gnav tr.passed td:has(input) { opacity: 1; }
.gnav tr.latest td { background: var(--ijv-ok-bg) !important; }
.gnav tr.fir td { background: var(--ijv-info-bg) !important; color: var(--ijv-info); font-weight: 700; text-align: left; font-size: 11.5px; }
.gnav tr.etp td { background: var(--ijv-warn-bg) !important; text-align: left; }
.gnav td.diff { vertical-align: middle; font-weight: 800; border-left: 1px solid var(--ijv-border); }
.gnav .diff.neg { color: var(--ijv-err); } .gnav .diff.pos { color: var(--ijv-ok); }
.gnav input.gf { width: 4ch; text-align: center; }
.gnav input.gf.num { width: 6ch; text-align: right; }
.gnav .wpt { font-weight: 800; }

/* ---------- print ---------- */
@media print {
  #topbar, #dock, .no-print, .toasts, .notif-pill, .install-bar, .sticky-controls button { display: none !important; }
  body { background: #fff; color: #000; }
  .page { padding: 0; max-width: none; }
  .card { box-shadow: none; break-inside: avoid; }
  .page-header { background: none; color: #000; border: 1px solid #000; }
  table.t th { background: #eee; color: #000; }
  .gsec[hidden] { display: block !important; }
  .gsec { break-after: page; }
  .gdoc { box-shadow: none; border: 0; overflow: visible; --g-paper: #fff; --g-ink: #000; --g-fill: transparent; }
  .gdoc-body { padding: 0; }
  .g-pre { font-size: 10.5pt; }
  .gf { border-bottom: 1px dotted #000; }
  .gf::placeholder { color: #000; opacity: 1; }
  .gnav input.gf { border-bottom: 1px dotted #000; background: none; }
}
