/* ═══════════════════════════════════════════════════════════════════
 * CANAVIA — Module-level injected styles
 * [CSP-PHASE-3 BATCH 54 — 2026-05-16]
 *
 * Consolidates 18 `document.createElement('style')` injection sites
 * that previously attached module-specific CSS rules to the document
 * head at boot/runtime. Those <style> elements are governed by the
 * `style-src` CSP directive — having them external lets us drop
 * 'unsafe-inline' from the enforced policy.
 *
 * Each section is delimited by /* @module <file>#<id> *\/ to preserve
 * the mapping back to the originating injection site for future edits.
 * The original injector functions are kept (for backward-compat with
 * anything that probes document.getElementById('<id>')) but their
 * bodies short-circuit immediately.
 * ═══════════════════════════════════════════════════════════════════ */


/* ─────────────────────────────────────────────────────
 * @module canavia-ai.js#ai-styles
 * (AI chat bubble + side panel, lines 49-131)
 * ───────────────────────────────────────────────────── */
#ai-bubble {
  position: fixed; bottom: 20px; right: 20px; z-index: 9998;
  width: 56px; height: 56px; border-radius: 50%;
  background: linear-gradient(135deg, #1565C0, #0D47A1);
  box-shadow: 0 6px 20px rgba(21, 101, 192, 0.4);
  display: flex; align-items: center; justify-content: center;
  cursor: pointer; transition: transform 0.2s, box-shadow 0.2s;
  font-size: 26px; color: white; border: none;
}
#ai-bubble:hover { transform: scale(1.08); box-shadow: 0 8px 24px rgba(21, 101, 192, 0.5); }
#ai-bubble.has-unread::after {
  content: ''; position: absolute; top: 8px; right: 8px;
  width: 10px; height: 10px; background: var(--red); border-radius: 50%;
  border: 2px solid white;
}
#ai-panel {
  position: fixed; bottom: 20px; right: 20px; z-index: 9999;
  width: 400px; height: 580px; max-height: 80vh;
  background: var(--bg1); border: 1px solid var(--b);
  border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,0.3);
  display: none; flex-direction: column; overflow: hidden;
}
#ai-panel.open { display: flex; }
#ai-panel .ai-head {
  padding: 12px 16px; background: linear-gradient(135deg, #1565C0, #0D47A1);
  color: white; display: flex; align-items: center; justify-content: space-between;
}
#ai-panel .ai-head-t { font-size: 14px; font-weight: 600; }
#ai-panel .ai-head-s { font-size: 10px; opacity: 0.85; }
#ai-panel .ai-head button { background: none; border: none; color: white; cursor: pointer; padding: 4px 8px; border-radius: 4px; }
#ai-panel .ai-head button:hover { background: rgba(255,255,255,0.15); }
#ai-messages {
  flex: 1; overflow-y: auto; padding: 14px;
  background: var(--bg2);
  display: flex; flex-direction: column; gap: 10px;
}
#ai-messages::-webkit-scrollbar { width: 6px; }
#ai-messages::-webkit-scrollbar-thumb { background: var(--b2); border-radius: 3px; }
.ai-msg { max-width: 85%; padding: 10px 12px; border-radius: 12px; font-size: 12px; line-height: 1.5; word-wrap: break-word; }
.ai-msg.user { align-self: flex-end; background: #1565C0; color: white; border-bottom-right-radius: 4px; }
.ai-msg.assistant { align-self: flex-start; background: var(--bg3); color: var(--tx1); border-bottom-left-radius: 4px; border: 1px solid var(--b); }
.ai-msg.tool { align-self: flex-start; background: rgba(255,167,38,0.1); color: var(--tx2); border-left: 3px solid var(--amber); font-family: monospace; font-size: 10px; max-width: 95%; padding: 6px 10px; border-radius: 4px; }
.ai-msg.error { align-self: center; background: rgba(244,67,54,0.1); color: var(--red); border: 1px solid var(--red); font-size: 11px; }
.ai-msg.assistant p:first-child { margin-top: 0; }
.ai-msg.assistant p:last-child { margin-bottom: 0; }
.ai-msg.assistant code { background: var(--bg4); padding: 1px 4px; border-radius: 3px; font-size: 11px; }
.ai-msg.assistant pre { background: var(--bg4); padding: 8px; border-radius: 4px; overflow-x: auto; font-size: 11px; }
.ai-msg.assistant ul, .ai-msg.assistant ol { padding-left: 20px; margin: 6px 0; }
.ai-msg.assistant table { border-collapse: collapse; margin: 6px 0; font-size: 11px; }
.ai-msg.assistant th, .ai-msg.assistant td { border: 1px solid var(--b); padding: 3px 6px; text-align: left; }
.ai-msg.assistant th { background: var(--bg4); font-weight: 600; }
.ai-typing { align-self: flex-start; padding: 10px 12px; background: var(--bg3); border-radius: 12px; font-size: 11px; color: var(--tx3); }
.ai-typing::after { content: '●●●'; animation: aipulse 1.4s infinite; letter-spacing: 3px; }
@keyframes aipulse { 0%,60%,100% { opacity: 0.3; } 30% { opacity: 1; } }
#ai-input-area {
  padding: 12px; border-top: 1px solid var(--b); background: var(--bg1);
}
#ai-input {
  width: 100%; padding: 8px 12px; border: 1px solid var(--b2);
  border-radius: 20px; background: var(--bg2); color: var(--tx1);
  font-size: 12px; outline: none; resize: none; font-family: inherit;
}
#ai-input:focus { border-color: #1565C0; }
.ai-quick-row { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 8px; }
.ai-quick { padding: 4px 10px; background: var(--bg3); border: 1px solid var(--b); border-radius: 12px; font-size: 10px; cursor: pointer; color: var(--tx2); transition: all 0.15s; }
.ai-quick:hover { background: #1565C0; color: white; border-color: #1565C0; }
.ai-footer-row { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; }
.ai-meta { font-size: 9px; color: var(--tx3); }


/* ─────────────────────────────────────────────────────
 * @module canavia-api.js#spin-style
 * (Generic spinner @keyframes used by load-ov overlay)
 * ───────────────────────────────────────────────────── */
@keyframes spin { to { transform: rotate(360deg); } }


/* ─────────────────────────────────────────────────────
 * @module canavia-api.js#team-picker-vis-css
 * ([TEAM-PICKER-VIS-FIX-V1] dropdown contrast fix)
 * ───────────────────────────────────────────────────── */
#wTeamHost select { color: var(--tx) !important; background: var(--bg2) !important; }
#wTeamHost select option { color: #fff !important; background: #1a2030 !important; padding: 4px !important; }
#wTeamHost select option:hover { background: #2a3040 !important; }
#wasgnSel option { color: #fff !important; background: #1a2030 !important; padding: 4px !important; }
#wholdReason option { color: #fff !important; background: #1a2030 !important; padding: 4px !important; }


/* ─────────────────────────────────────────────────────
 * @module canavia-core.js#cv-toast-styles
 * (Global toast() notification system)
 * ───────────────────────────────────────────────────── */
#cv-toast-container {
  position: fixed; top: 16px; right: 16px; z-index: 999999;
  display: flex; flex-direction: column; gap: 8px;
  max-width: 380px; pointer-events: none;
}
.cv-toast {
  background: #1e293b; color: #e2e8f0;
  border-radius: 8px; padding: 12px 16px 12px 14px;
  box-shadow: 0 6px 24px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.05);
  font-size: 13px; line-height: 1.4;
  cursor: pointer; pointer-events: auto;
  display: flex; align-items: flex-start; gap: 10px;
  animation: cv-toast-in .28s cubic-bezier(.2,.9,.3,1.2);
  border-left: 4px solid #3b82f6;
  max-width: 380px; word-break: break-word;
}
.cv-toast.removing { animation: cv-toast-out .22s ease-in forwards; }
.cv-toast-icon { font-size: 16px; flex-shrink: 0; line-height: 1.3; }
.cv-toast-body { flex: 1; min-width: 0; }
.cv-toast-success { border-left-color: #22c55e; }
.cv-toast-error   { border-left-color: #ef4444; }
.cv-toast-warning { border-left-color: #f59e0b; }
.cv-toast-info    { border-left-color: #3b82f6; }
body.light-theme .cv-toast, body[data-theme="light"] .cv-toast {
  background: #ffffff; color: #1e293b;
  box-shadow: 0 6px 24px rgba(0,0,0,.12), 0 0 0 1px rgba(0,0,0,.06);
}
@keyframes cv-toast-in {
  from { opacity: 0; transform: translateX(40px) scale(.95); }
  to   { opacity: 1; transform: translateX(0) scale(1); }
}
@keyframes cv-toast-out {
  from { opacity: 1; transform: translateX(0); max-height: 120px; }
  to   { opacity: 0; transform: translateX(40px); max-height: 0; margin-bottom: 0; padding: 0; }
}
@media (max-width: 600px) {
  #cv-toast-container { left: 10px; right: 10px; max-width: none; top: 10px; }
  .cv-toast { max-width: none; }
}


/* ─────────────────────────────────────────────────────
 * @module canavia-core.js#sidebar-groups-css
 * ([SIDEBAR-GROUPS-V1] grouped sidebar nav)
 * ───────────────────────────────────────────────────── */
.sb-separator {
  height: 1px;
  background: rgba(255,255,255,.08);
  margin: 8px 12px;
}
.sb-group-header {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 8px 14px 4px 14px;
  font-size: 10px;
  font-weight: 700;
  letter-spacing: 0.6px;
  text-transform: uppercase;
  color: rgba(255,255,255,.55);
  user-select: none;
  pointer-events: none;
}
.sb-group-header .sb-icon { font-size: 13px; opacity: .75; }
.sb-group-header .sb-label { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sb-indent { padding-left: 24px !important; }
.sb-indent .sb-icon { font-size: 14px; }
body.light-theme .sb-separator { background: rgba(0,0,0,.08); }
body.light-theme .sb-group-header { color: rgba(0,0,0,.55); }
.sidebar.collapsed .sb-group-header .sb-label { display: none; }
.sidebar.collapsed .sb-group-header { justify-content: center; padding: 6px 0; }
.sidebar.collapsed .sb-separator { margin: 6px 8px; }
.sidebar.collapsed .sb-indent { padding-left: 0 !important; }


/* ─────────────────────────────────────────────────────
 * @module canavia-core.js#alrt-perf-css
 * (Alerts page row perf hint)
 * ───────────────────────────────────────────────────── */
.alrt-row { content-visibility: auto; contain-intrinsic-size: 48px; }
.alrt-loading-more { text-align:center; padding:14px; color:var(--tx3); font-size:11px; font-style:italic; }


/* ─────────────────────────────────────────────────────
 * @module canavia-forecast.js#fchub-css
 * (Forecast Hub — toolbar, KPIs, cards, drawer, event rows, kind chips)
 * ───────────────────────────────────────────────────── */
.fchub-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;flex-wrap:wrap;margin-bottom:14px;padding:10px 14px;background:var(--bg2);border:1px solid var(--b);border-radius:var(--rl)}
.fchub-pills{display:flex;gap:6px}
.fchub-pill{font-size:12px;padding:5px 12px;border-radius:999px;background:var(--bg3);color:var(--tx2);border:1px solid var(--b);cursor:pointer;transition:all .15s}
.fchub-pill:hover{background:var(--bg4)}
.fchub-pill.on{background:var(--blue);color:#fff;border-color:var(--blue)}
.fchub-toggle{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--tx3);cursor:pointer;user-select:none}
.fchub-toggle input{cursor:pointer}
.fchub-kpis{display:grid;grid-template-columns:repeat(4,1fr);gap:10px;margin-bottom:14px}
.fchub-kpi{padding:12px 14px;border-radius:var(--rl);border:1px solid var(--b)}
.fchub-kpi.k-red{background:rgba(239,75,75,.08);border-color:rgba(239,75,75,.3)}
.fchub-kpi.k-amb{background:rgba(239,159,39,.08);border-color:rgba(239,159,39,.3)}
.fchub-kpi.k-pur{background:rgba(167,139,250,.08);border-color:rgba(167,139,250,.3)}
.fchub-kpi.k-blu{background:rgba(55,138,221,.08);border-color:rgba(55,138,221,.3)}
.fchub-kpi-l{font-size:10px;color:var(--tx3);text-transform:uppercase;letter-spacing:0.4px;margin-bottom:4px}
.fchub-kpi-v{font-size:24px;font-weight:600}
.fchub-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(220px,1fr));gap:10px}
.fchub-card{padding:12px;border-radius:var(--rl);border:1px solid var(--b);cursor:pointer;transition:transform .12s}
.fchub-card:hover{transform:translateY(-1px)}
.fchub-card.s-critical{background:rgba(239,75,75,.08);border-left:3px solid var(--red)}
.fchub-card.s-warning{background:rgba(239,159,39,.08);border-left:3px solid var(--amber)}
.fchub-card.s-clear{background:rgba(29,158,117,.06);border-left:3px solid var(--green)}
.fchub-card-h{display:flex;justify-content:space-between;align-items:baseline;margin-bottom:4px}
.fchub-card-reg{font-size:14px;font-weight:600}
.fchub-card-st{font-size:9px;letter-spacing:0.4px;text-transform:uppercase;font-weight:600}
.fchub-card-meta{font-size:11px;color:var(--tx3);margin-bottom:8px}
.fchub-card-line{font-size:11px;color:var(--tx2);line-height:1.5}
.fchub-card-line.warn{color:var(--amber)}
.fchub-card-empty{font-size:11px;color:var(--tx3);font-style:italic}
.fchub-drawer-bg{position:fixed;inset:0;background:rgba(0,0,0,0.5);z-index:600;opacity:0;transition:opacity .2s;pointer-events:none}
.fchub-drawer-bg.on{opacity:1;pointer-events:auto}
.fchub-drawer{position:fixed;top:0;right:0;bottom:0;width:480px;max-width:90vw;background:var(--bg);border-left:1px solid var(--b);z-index:601;transform:translateX(100%);transition:transform .25s ease;display:flex;flex-direction:column}
.fchub-drawer.on{transform:translateX(0)}
.fchub-drawer-h{padding:14px 18px;border-bottom:1px solid var(--b);display:flex;justify-content:space-between;align-items:center;background:var(--bg2)}
.fchub-drawer-h-t{font-size:15px;font-weight:600}
.fchub-drawer-h-s{font-size:11px;color:var(--tx3);margin-top:2px}
.fchub-drawer-x{background:transparent;border:1px solid var(--b);color:var(--tx);padding:5px 12px;border-radius:var(--r);cursor:pointer;font-size:11px}
.fchub-drawer-body{flex:1;overflow-y:auto;padding:12px 16px}
.fchub-evt{padding:10px;border:1px solid var(--b);border-radius:var(--r);margin-bottom:8px;background:var(--bg2)}
.fchub-evt.sev-overdue{border-left:3px solid var(--red)}
.fchub-evt.sev-due-soon{border-left:3px solid var(--amber)}
.fchub-evt.sev-upcoming{border-left:3px solid var(--blue)}
.fchub-evt-h{display:flex;justify-content:space-between;align-items:start;gap:10px;margin-bottom:6px}
.fchub-evt-t{font-size:12px;font-weight:500;flex:1;line-height:1.4}
.fchub-evt-d{font-size:10px;color:var(--tx3);font-family:'IBM Plex Mono',monospace;white-space:nowrap}
.fchub-evt-basis{font-size:10px;color:var(--tx3);margin-bottom:6px}
.fchub-evt-checks{display:flex;gap:6px;flex-wrap:wrap;font-size:10px}
.fchub-evt-check{padding:2px 7px;border-radius:10px;display:inline-flex;align-items:center;gap:3px}
.fchub-evt-check.ok{background:rgba(29,158,117,.12);color:var(--green)}
.fchub-evt-check.warn{background:rgba(239,159,39,.12);color:var(--amber)}
.fchub-evt-check.block{background:rgba(239,75,75,.12);color:var(--red)}
.fchub-evt-actions{margin-top:8px;display:flex;gap:6px}
.fchub-evt-btn{font-size:11px;padding:4px 10px;border-radius:var(--r);background:var(--bg3);border:1px solid var(--b);color:var(--tx2);cursor:pointer}
.fchub-evt-btn:hover{background:var(--bg4)}
.fchub-kind{display:inline-block;padding:1px 6px;border-radius:4px;font-size:9px;font-weight:600;text-transform:uppercase;letter-spacing:0.3px;margin-right:4px}
.fchub-kind.amp{background:rgba(127,119,221,.18);color:#7F77DD}
.fchub-kind.ad{background:rgba(29,158,117,.18);color:var(--green)}
.fchub-kind.defect{background:rgba(216,90,48,.18);color:#D85A30}
.fchub-kind.ddl{background:rgba(239,159,39,.18);color:var(--amber)}
.fchub-kind.mod{background:rgba(167,139,250,.18);color:#A78BFA}
.fchub-kind.component{background:rgba(212,83,126,.18);color:#D4537E}
@media (max-width:900px){.fchub-kpis{grid-template-columns:repeat(2,1fr)}.fchub-drawer{width:100%}}


/* ─────────────────────────────────────────────────────
 * @module canavia-forecast.js#fchub-queue-css
 * ([FORECAST-V2-QUEUE] Queue tab — todo list)
 * ───────────────────────────────────────────────────── */
.fchub-tabs{display:flex;gap:4px;margin-bottom:14px;border-bottom:1px solid var(--b)}
.fchub-tab{font-size:13px;padding:8px 16px;cursor:pointer;color:var(--tx3);border-bottom:2px solid transparent;margin-bottom:-1px;display:inline-flex;align-items:center;gap:6px;transition:color .15s}
.fchub-tab:hover{color:var(--tx2)}
.fchub-tab.on{color:var(--blue);border-bottom-color:var(--blue)}
.fchub-tab-b{font-size:10px;padding:1px 6px;border-radius:8px;background:var(--bg3);color:var(--tx2);font-weight:500}
.fchub-tab.on .fchub-tab-b{background:var(--blue);color:#fff}
.fchub-q-bar{display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap;margin-bottom:10px;padding:8px 12px;background:var(--bg2);border:1px solid var(--b);border-radius:var(--r)}
.fchub-q-fpills{display:flex;gap:5px;flex-wrap:wrap}
.fchub-q-fpill{font-size:11px;padding:4px 10px;border-radius:999px;background:var(--bg3);color:var(--tx2);border:1px solid var(--b);cursor:pointer}
.fchub-q-fpill:hover{background:var(--bg4)}
.fchub-q-fpill.on{background:var(--blue);color:#fff;border-color:var(--blue)}
.fchub-q-sort{display:flex;align-items:center;gap:6px;font-size:11px;color:var(--tx3)}
.fchub-q-sort select{background:var(--bg3);color:var(--tx);border:1px solid var(--b);border-radius:var(--r);padding:3px 8px;font-size:11px}
.fchub-q-list{display:flex;flex-direction:column;gap:6px}
.fchub-q-row{display:grid;grid-template-columns:22px 24px 60px 1fr 80px 70px auto;gap:10px;align-items:center;padding:9px 12px;background:var(--bg2);border:1px solid var(--b);border-left-width:3px;border-radius:var(--r);cursor:pointer;transition:background .12s}
.fchub-q-row:hover{background:var(--bg3)}
.fchub-q-row.sev-overdue{border-left-color:var(--red)}
.fchub-q-row.sev-due-soon{border-left-color:var(--amber)}
.fchub-q-row.sev-upcoming{border-left-color:var(--blue)}
.fchub-q-row.fc-q-sel{background:rgba(35,131,226,.10);border-color:var(--blue)}
/* [FC-GREEN-2] queue-level selection checkbox + floating action bar */
.fchub-q-selbox{font-size:14px;text-align:center;color:var(--tx3);cursor:pointer;user-select:none;padding:2px;border-radius:3px;transition:color .12s,background .12s}
.fchub-q-selbox:hover{color:var(--blue);background:rgba(35,131,226,.10)}
.fchub-q-selbox.on{color:var(--blue)}
.fchub-q-selpad{}
.fchub-q-bulkbar{position:sticky;top:8px;z-index:6;display:flex;align-items:center;gap:10px;padding:10px 14px;background:var(--blue);color:#fff;border-radius:var(--rl);margin-bottom:10px;box-shadow:0 4px 12px rgba(0,0,0,.20);font-size:12px}
.fchub-q-bulkbar .n{font-weight:700;font-size:13px}
.fchub-q-bulkbar .spacer{flex:1}
.fchub-q-bulkbar button{padding:6px 12px;background:rgba(255,255,255,.18);color:#fff;border:1px solid rgba(255,255,255,.35);border-radius:var(--r);font-size:11px;font-weight:600;cursor:pointer;transition:background .12s}
.fchub-q-bulkbar button:hover{background:rgba(255,255,255,.30)}
.fchub-q-bulkbar button.primary{background:#fff;color:var(--blue)}
.fchub-q-bulkbar button.primary:hover{background:#f0f0f0}
.fchub-q-sev{font-size:14px;text-align:center}
.fchub-q-title{font-size:12px;line-height:1.4;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fchub-q-basis{font-size:10px;color:var(--tx3);margin-top:2px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fchub-q-ac{font-size:11px;font-weight:600;color:var(--blue)}
.fchub-q-when{font-size:11px;text-align:right;font-family:'IBM Plex Mono',monospace}
.fchub-q-when.late{color:var(--red);font-weight:500}
.fchub-q-when.soon{color:var(--amber)}
.fchub-q-checks{display:flex;gap:3px;align-items:center}
.fchub-q-check{font-size:11px;width:22px;height:22px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;cursor:help}
.fchub-q-check.ok{background:rgba(29,158,117,.15);color:var(--green)}
.fchub-q-check.warn{background:rgba(239,159,39,.18);color:var(--amber)}
.fchub-q-check.block{background:rgba(239,75,75,.18);color:var(--red)}
.fchub-q-check.na{background:var(--bg3);color:var(--tx3)}
.fchub-q-empty{text-align:center;padding:40px 20px;color:var(--tx3);font-size:12px;font-style:italic}
@media (max-width:900px){.fchub-q-row{grid-template-columns:20px 20px 50px 1fr 60px}.fchub-q-when,.fchub-q-checks{display:none}}


/* ─────────────────────────────────────────────────────
 * @module canavia-forecast.js#fchub-cal-css
 * ([FORECAST-V2-CAL] Calendar grid)
 * ───────────────────────────────────────────────────── */
.fc-cal-toolbar{display:flex;align-items:center;justify-content:space-between;gap:12px;margin-bottom:10px;padding:8px 14px;background:var(--bg2);border:1px solid var(--b);border-radius:var(--r)}
.fc-cal-nav{display:flex;gap:5px}
.fc-cal-title{font-size:14px;font-weight:600;letter-spacing:0.4px}
.fc-cal-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:10px;color:var(--tx3);margin-bottom:8px;padding:6px 12px}
.fc-cal-legend span{display:inline-flex;align-items:center;gap:4px}
.fc-cal-dot{width:10px;height:10px;border-radius:2px;display:inline-block}
.dot-amp{background:#7F77DD}
.dot-ad{background:#1d9e75}
.dot-defect{background:#D85A30}
.dot-ddl{background:#ef9f27}
.dot-mod{background:#A78BFA}
.dot-component{background:#D4537E}
.dot-wo{background:#378ADD}
.dot-overdue{background:#ef4b4b}
.fc-cal-grid{display:grid;grid-template-columns:repeat(7,1fr);gap:1px;background:var(--b);border:1px solid var(--b);border-radius:var(--rl);overflow:hidden}
.fc-cal-dow{background:var(--bg3);padding:6px 4px;font-size:10px;font-weight:600;text-transform:uppercase;color:var(--tx3);text-align:center;letter-spacing:0.4px}
.fc-cal-cell{background:var(--bg);min-height:90px;padding:4px 5px;cursor:pointer;display:flex;flex-direction:column;gap:2px;transition:background .12s;position:relative}
.fc-cal-cell:hover{background:var(--bg2)}
.fc-cal-cell.fc-cal-other-month{background:#0a0d14;opacity:0.4}
.fc-cal-cell.fc-cal-other-month .fc-cal-day-num{color:#3a4050}
.fc-cal-cell.fc-cal-weekend{background:#11141d}
.fc-cal-cell.fc-cal-weekend.fc-cal-other-month{background:#080b11}
.fc-cal-cell.fc-cal-today{background:rgba(55,138,221,.18);box-shadow:inset 3px 0 0 var(--blue)}
.fc-cal-cell.fc-cal-today .fc-cal-day-num{color:#fff;font-weight:800;font-size:13px;background:var(--blue);border-radius:50%;width:22px;height:22px;line-height:22px;text-align:center;display:inline-block}
.fc-cal-cell.fc-cal-weekend .fc-cal-day-num{color:#7F77DD}
.fc-cal-cell.fc-cal-drag-over{background:rgba(29,158,117,.18);outline:2px dashed var(--green)}
.fc-cal-day-num{font-size:11px;color:var(--tx2);font-weight:500;margin-bottom:1px}
.fc-cal-tile{font-size:10px;padding:2px 5px;border-radius:3px;display:flex;align-items:center;gap:3px;line-height:1.3;cursor:pointer;background:var(--bg3);border-left:3px solid var(--blue);overflow:hidden;white-space:nowrap;text-overflow:ellipsis}
.fc-cal-tile:hover{filter:brightness(1.15)}
.fc-cal-tile-icon{flex:0 0 auto}
.fc-cal-tile-text{flex:1;overflow:hidden;text-overflow:ellipsis}
.fc-cal-tile.evt-amp{border-left-color:#7F77DD}
.fc-cal-tile.evt-ad{border-left-color:#1d9e75}
.fc-cal-tile.evt-defect{border-left-color:#D85A30}
.fc-cal-tile.evt-ddl{border-left-color:#ef9f27}
.fc-cal-tile.evt-mod{border-left-color:#A78BFA}
.fc-cal-tile.evt-component{border-left-color:#D4537E}
.fc-cal-tile.is-wo{border-left-color:#378ADD;background:rgba(55,138,221,.13)}
.fc-cal-tile.is-aog{background:rgba(239,75,75,.18);border-left-color:#ef4b4b;font-weight:600}
.fc-cal-tile.is-overdue{background:rgba(239,75,75,.13);color:#ef4b4b}
.fc-cal-tile.is-overdue .fc-cal-tile-text{color:#ef4b4b}
.fc-cal-tile.fc-cal-dragging{opacity:0.4}
.fc-cal-more{font-size:9px;color:var(--tx3);font-style:italic;padding:1px 5px}
@media (max-width:900px){.fc-cal-cell{min-height:64px}.fc-cal-tile-text{display:none}.fc-cal-tile{justify-content:center;padding:2px}}


/* ─────────────────────────────────────────────────────
 * @module canavia-forecast.js#fchub-group-css
 * ([FORECAST-V2-QUEUE-CLEAN] collapsible aircraft groups)
 * ───────────────────────────────────────────────────── */
.fchub-q-group{margin-bottom:8px;border:1px solid var(--b);border-radius:var(--rl);overflow:hidden;background:var(--bg2)}
.fchub-q-ghdr{display:grid;grid-template-columns:18px 70px 1fr 90px 1fr 30px;gap:10px;align-items:center;padding:9px 14px;cursor:pointer;background:var(--bg2);transition:background .12s}
.fchub-q-ghdr:hover{background:var(--bg3)}
.fchub-q-gtoggle{font-size:10px;color:var(--tx3);text-align:center}
.fchub-q-greg{font-size:13px;font-weight:600;color:var(--blue)}
.fchub-q-gtype{font-size:11px;color:var(--tx3);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fchub-q-gst{font-size:9px;font-weight:600;letter-spacing:0.4px;text-transform:uppercase;text-align:center}
.fchub-q-gsum{font-size:11px;color:var(--tx2);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
.fchub-q-gcount{font-size:10px;color:var(--tx3);text-align:right;font-family:'IBM Plex Mono',monospace}
.fchub-q-group .fchub-q-list{padding:6px 12px 12px 12px;border-top:1px solid var(--b)}
@media (max-width:900px){.fchub-q-ghdr{grid-template-columns:18px 70px 1fr 60px 30px}.fchub-q-gtype,.fchub-q-gsum{display:none}}
/* [DASH-UX-2 2026-08-12] Dismiss button on notification rows */
.nm-r-x{opacity:0;flex:0 0 auto;background:transparent;border:none;color:var(--tx3);font-size:14px;padding:2px 6px;border-radius:3px;cursor:pointer;transition:opacity .12s,background .12s,color .12s;align-self:center}
.nm-row:hover .nm-r-x{opacity:0.7}
.nm-r-x:hover{opacity:1;background:var(--red);color:#fff}

/* [PLAN-ENH-2 SAFETY] scrollable bordered list inside bulk-delete confirmation modal */
.u-of-y-a-max-260-b-b-r-r-mb10{overflow-y:auto;max-height:260px;border:1px solid var(--b);border-radius:var(--r);margin-bottom:10px}
.u-of-y-a-max-260-b-b-r-r-mb10 table{width:100%;border-collapse:collapse}
.u-of-y-a-max-260-b-b-r-r-mb10 th{position:sticky;top:0;background:var(--bg2);padding:6px 10px;text-align:left;font-weight:500;border-bottom:1px solid var(--b);z-index:1}
.u-of-y-a-max-260-b-b-r-r-mb10 td{padding:5px 10px;border-bottom:1px solid var(--b)}
.u-of-y-a-max-260-b-b-r-r-mb10 tr:last-child td{border-bottom:none}

/* [FC-YELLOW-3] "Show N more" chip for capped-render event groups */
.fchub-q-showmore{margin-top:6px;padding:8px 12px;text-align:center;background:var(--bg3);border:1px dashed var(--b);border-radius:var(--r);font-size:11px;font-weight:500;color:var(--tx2);cursor:pointer;transition:background .12s,color .12s}
.fchub-q-showmore:hover{background:var(--bg4);color:var(--tx1)}


/* ─────────────────────────────────────────────────────
 * @module canavia-forecast.js#fchub-multi-css
 * ([FORECAST-V3-MULTI-WP] multi-select WP creation)
 * ───────────────────────────────────────────────────── */
.fchub-drawer-toolbar{position:sticky;top:-12px;z-index:5;background:var(--bg2);border:1px solid var(--b);border-radius:var(--r);padding:8px 12px;margin-bottom:10px;display:flex;align-items:center;justify-content:space-between;gap:10px;flex-wrap:wrap}
.fchub-evt-chk{cursor:pointer;width:14px;height:14px;flex:0 0 auto;accent-color:var(--blue)}
.fchub-multi-evt-list{max-height:180px;overflow-y:auto;border:1px solid var(--b);border-radius:var(--r);background:var(--bg3);padding:6px 10px;margin-bottom:10px}
.fchub-multi-evt-row{font-size:11px;padding:3px 0;border-bottom:1px dashed var(--b);display:flex;justify-content:space-between;gap:8px}
.fchub-multi-evt-row:last-child{border-bottom:none}


/* ─────────────────────────────────────────────────────
 * @module canavia-forecast.js#fchub-gantt-css
 * (Gantt-chart view)
 * ───────────────────────────────────────────────────── */
.fc-gantt-wrap{border:1px solid var(--b);border-radius:var(--rl);overflow:hidden;background:var(--bg)}
.fc-gantt-head{display:flex;background:var(--bg3);border-bottom:1px solid var(--b);position:sticky;top:0;z-index:5}
.fc-gantt-acreg-head{flex:0 0 130px;padding:8px 10px;font-size:10px;font-weight:600;text-transform:uppercase;color:var(--tx3);letter-spacing:0.4px;border-right:1px solid var(--b)}
.fc-gantt-cells{flex:1;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(28px,1fr)}
.fc-gantt-day-head{padding:5px 2px;text-align:center;border-right:1px solid var(--b);background:var(--bg3)}
.fc-gantt-day-head.is-today{background:rgba(55,138,221,.22);box-shadow:inset 0 -2px 0 var(--blue)}
.fc-gantt-day-head.is-weekend{background:#11141d}
.fc-gantt-dow{font-size:9px;color:var(--tx3);text-transform:uppercase;letter-spacing:0.4px}
.fc-gantt-num{font-size:11px;font-weight:600;color:var(--tx2);margin-top:1px}
.fc-gantt-day-head.is-today .fc-gantt-num{color:#fff}
.fc-gantt-body{max-height:600px;overflow-y:auto}
.fc-gantt-row{display:flex;border-bottom:1px solid var(--b);min-height:42px}
.fc-gantt-row:hover{background:rgba(127,119,221,.04)}
.fc-gantt-acreg{flex:0 0 130px;padding:6px 10px;border-right:1px solid var(--b);cursor:pointer;background:var(--bg2)}
.fc-gantt-acreg:hover{background:var(--bg3)}
.fc-gantt-reg{font-size:12px;font-weight:600;color:var(--blue)}
.fc-gantt-type{font-size:10px;color:var(--tx3);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fc-gantt-cell{border-right:1px solid var(--b);padding:3px 2px;display:flex;flex-direction:column;gap:2px;cursor:pointer;min-height:42px;position:relative;transition:background .12s}
.fc-gantt-cell:hover{background:rgba(127,119,221,.05)}
.fc-gantt-cell.is-today{background:rgba(55,138,221,.10)}
.fc-gantt-cell.is-weekend{background:#11141d}
.fc-gantt-cell.is-today.is-weekend{background:rgba(55,138,221,.16)}
.fc-gantt-cell.fc-gantt-drag-over{background:rgba(29,158,117,.20);outline:2px dashed var(--green);outline-offset:-2px}
.fc-gantt-tile{height:6px;border-radius:2px;background:var(--blue);cursor:pointer;transition:opacity .12s;width:100%}
.fc-gantt-tile:hover{opacity:0.75;height:8px}
.fc-gantt-tile.fc-gantt-dragging{opacity:0.4}
.fc-gantt-tile.evt-amp{background:#7F77DD}
.fc-gantt-tile.evt-ad{background:#1d9e75}
.fc-gantt-tile.evt-defect{background:#D85A30}
.fc-gantt-tile.evt-ddl{background:#ef9f27}
.fc-gantt-tile.evt-mod{background:#A78BFA}
.fc-gantt-tile.evt-component{background:#D4537E}
.fc-gantt-tile.is-wo{background:#378ADD;height:8px}
.fc-gantt-tile.is-aog{background:#ef4b4b;height:10px;animation:pulse-aog 1.4s infinite}
.fc-gantt-tile.is-overdue{background:#ef4b4b}
.fc-gantt-more{font-size:8px;color:var(--tx3);text-align:center;padding:1px}
@keyframes pulse-aog{0%,100%{opacity:1}50%{opacity:0.5}}


/* ─────────────────────────────────────────────────────
 * @module canavia-forecast.js#fchub-cal-vsw-css
 * (Calendar view-switcher button group)
 * ───────────────────────────────────────────────────── */
.fc-cal-view-switch{display:flex;gap:2px;background:var(--bg3);border-radius:6px;padding:2px}
.fc-cal-vbtn{font-size:11px;padding:5px 10px;background:transparent;border:none;color:var(--tx3);cursor:pointer;border-radius:4px;transition:all .12s}
.fc-cal-vbtn:hover{background:var(--bg2);color:var(--tx2)}
.fc-cal-vbtn-active{background:var(--blue);color:#fff;font-weight:600}
.fc-cal-vbtn-active:hover{background:var(--blue);color:#fff}


/* ─────────────────────────────────────────────────────
 * @module canavia-forecast.js#fchub-mech-css
 * (Mechanic-schedule grid)
 * ───────────────────────────────────────────────────── */
.fc-mech-legend{display:flex;gap:14px;flex-wrap:wrap;font-size:10px;color:var(--tx3);margin-bottom:8px;padding:6px 12px}
.fc-mech-legend span{display:inline-flex;align-items:center;gap:4px}
.fc-mech-swatch{width:12px;height:12px;border-radius:2px;display:inline-block;border:1px solid var(--b)}
.fc-mech-swatch.tier-free{background:var(--bg)}
.fc-mech-swatch.tier-light{background:rgba(29,158,117,.25)}
.fc-mech-swatch.tier-busy{background:rgba(239,159,39,.30)}
.fc-mech-swatch.tier-over{background:rgba(239,75,75,.35)}
.fc-mech-swatch.is-off{background:#0a0d14}
.fc-mech-wrap{border:1px solid var(--b);border-radius:var(--rl);overflow:hidden;background:var(--bg)}
.fc-mech-head{display:flex;background:var(--bg3);border-bottom:1px solid var(--b);position:sticky;top:0;z-index:5}
.fc-mech-name-head{flex:0 0 160px;padding:8px 10px;font-size:10px;font-weight:600;text-transform:uppercase;color:var(--tx3);letter-spacing:0.4px;border-right:1px solid var(--b)}
.fc-mech-cells{flex:1;display:grid;grid-auto-flow:column;grid-auto-columns:minmax(56px,1fr)}
.fc-mech-day-head{padding:5px 4px;text-align:center;border-right:1px solid var(--b);background:var(--bg3)}
.fc-mech-day-head.is-today{background:rgba(55,138,221,.22);box-shadow:inset 0 -2px 0 var(--blue)}
.fc-mech-day-head.is-weekend{background:#11141d}
.fc-mech-dow{font-size:9px;color:var(--tx3);text-transform:uppercase;letter-spacing:0.4px}
.fc-mech-num{font-size:11px;font-weight:600;color:var(--tx2);margin-top:1px}
.fc-mech-day-head.is-today .fc-mech-num{color:#fff}
.fc-mech-body{max-height:600px;overflow-y:auto}
.fc-mech-row{display:flex;border-bottom:1px solid var(--b);min-height:60px}
.fc-mech-row:hover{background:rgba(127,119,221,.03)}
.fc-mech-row.is-unassigned{background:rgba(216,90,48,.06)}
.fc-mech-row.is-unassigned .fc-mech-name{background:rgba(216,90,48,.10);font-style:italic;color:var(--tx3)}
.fc-mech-name{flex:0 0 160px;padding:6px 10px;border-right:1px solid var(--b);cursor:pointer;background:var(--bg2);display:flex;flex-direction:column;justify-content:center}
.fc-mech-name:hover{background:var(--bg3)}
.fc-mech-stamp{font-size:11px;font-weight:700;color:var(--blue);letter-spacing:0.3px}
.fc-mech-fullname{font-size:11px;color:var(--tx2);margin-top:1px;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fc-mech-role{font-size:9px;color:var(--tx3);margin-top:1px}
.fc-mech-cell{border-right:1px solid var(--b);padding:3px;display:flex;flex-direction:column;gap:2px;cursor:pointer;min-height:60px;position:relative;transition:background .12s}
.fc-mech-cell:hover{background:rgba(127,119,221,.05)}
.fc-mech-cell.is-today{background:rgba(55,138,221,.08)}
.fc-mech-cell.is-weekend{background:#0d1019}
.fc-mech-cell.is-off{background:repeating-linear-gradient(45deg, #0a0d14, #0a0d14 4px, #11141d 4px, #11141d 8px);opacity:0.6}
.fc-mech-cell.tier-light{background:rgba(29,158,117,.10)}
.fc-mech-cell.tier-busy{background:rgba(239,159,39,.13)}
.fc-mech-cell.tier-over{background:rgba(239,75,75,.18);box-shadow:inset 0 0 0 1px rgba(239,75,75,.4)}
.fc-mech-cell.fc-mech-drag-over{background:rgba(29,158,117,.25);outline:2px dashed var(--green);outline-offset:-2px}
.fc-mech-hrs{font-size:10px;font-weight:700;color:var(--tx2);text-align:right;padding:0 2px}
.fc-mech-cell.tier-busy .fc-mech-hrs{color:var(--amber)}
.fc-mech-cell.tier-over .fc-mech-hrs{color:var(--red)}
.fc-mech-wo{font-size:9px;padding:2px 4px;background:var(--blue);color:#fff;border-radius:2px;cursor:pointer;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis}
.fc-mech-wo:hover{filter:brightness(1.2)}
.fc-mech-wo.is-overdue{background:#ef4b4b}
.fc-mech-wo.is-aog{background:#ef4b4b;animation:pulse-aog 1.4s infinite}
.fc-mech-wo.fc-mech-dragging{opacity:0.4}
.fc-mech-more{font-size:9px;color:var(--tx3);text-align:center;padding:1px}


/* ─────────────────────────────────────────────────────
 * @module canavia-forecast.js#fc-mech-v2-css
 * ([MECH-SCHEDULE-V2] extras)
 * ───────────────────────────────────────────────────── */
.fc-mech-controls{display:flex;gap:6px;align-items:center;margin-bottom:8px;padding:6px 10px;background:var(--bg2);border:1px solid var(--b);border-radius:var(--r)}
.fc-mech-name-head{flex:0 0 200px !important}
.fc-mech-name{flex:0 0 200px !important}
.fc-mech-fullname{display:block;line-height:1.25}
.fc-mech-wo.is-hold{background:#5b6470 !important;opacity:0.7;text-decoration:line-through}
.fc-mech-wo.is-hold:hover{opacity:1}


/* ─────────────────────────────────────────────────────
 * @module canavia-library.js#lib-viewer-styles
 * (Full-screen PDF viewer modal)
 * ───────────────────────────────────────────────────── */
#lib-viewer-backdrop{position:fixed;inset:0;background:rgba(0,0,0,0.75);z-index:999;backdrop-filter:blur(2px);}
#lib-viewer-panel{position:fixed;inset:20px;z-index:1000;background:var(--bg2);border:1px solid var(--b);border-radius:10px;display:flex;flex-direction:column;overflow:hidden;box-shadow:0 10px 40px rgba(0,0,0,0.5);}
#lib-viewer-header{display:flex;align-items:center;gap:12px;padding:10px 14px;border-bottom:1px solid var(--b);background:var(--bg3);flex-shrink:0;}
#lib-viewer-controls{display:flex;align-items:center;gap:4px;flex-shrink:0;}
#lib-viewer-body{flex:1;overflow:auto;background:var(--bg);display:flex;justify-content:center;align-items:flex-start;padding:20px;}
#lib-viewer-loading{color:var(--tx2);font-size:13px;margin-top:40px;}
#lib-viewer-canvas-wrap{position:relative;background:white;box-shadow:0 4px 20px rgba(0,0,0,0.3);}
#lib-viewer-canvas{display:block;}
#lib-viewer-text-overlay{position:absolute;inset:0;pointer-events:none;overflow:hidden;}
.lib-viewer-hl{position:absolute;background:rgba(255,235,59,0.45);border-radius:2px;mix-blend-mode:multiply;}

/* [LIB-FIX-1 2026-08-11] Search-in-doc filter chip + Clear-filter button.
 * Kept CSP-safe (external CSS, no inline styles). */
.lib-filter-chip{font-size:12px;margin-bottom:10px;padding:6px 10px;background:rgba(107,159,255,0.14);border-radius:6px;}
.lib-clear-filter-btn{margin-left:8px;padding:2px 8px;font-size:11px;cursor:pointer;background:var(--bg3);color:var(--tx);border:1px solid var(--b);border-radius:4px;}
.lib-clear-filter-btn:hover{background:var(--bg4);}

/* [LIB-VERSIONS 2026-08-11] Version-history row in the Details panel. */
.lib-version-row{padding:8px 10px;margin-top:6px;background:var(--bg3);border:1px solid var(--b);border-radius:4px;}
.lib-version-row:first-of-type{margin-top:8px;}

/* [LIB-TAGS 2026-08-11] Tag chip — shown in row cells + Details panel + filter. */
.lib-tag-chip{display:inline-block;padding:1px 8px;margin:1px 3px 1px 0;font-size:10px;background:rgba(155,109,255,0.16);color:var(--tp);border:1px solid rgba(155,109,255,0.3);border-radius:10px;letter-spacing:0.2px;}

/* [LIB-XREF 2026-08-11] Library picker modal (reusable across modules). */
.lib-picker-list{max-height:60vh;overflow-y:auto;border:1px solid var(--b);border-radius:6px;}
.lib-picker-row{display:flex;gap:10px;align-items:flex-start;padding:8px 10px;border-bottom:1px solid var(--b);cursor:pointer;}
.lib-picker-row:last-child{border-bottom:none;}
.lib-picker-row:hover{background:var(--bg3);}

/* [LIB-BULK 2026-08-11] Bulk actions bar shown above the list when >0 selected. */
.lib-bulk-bar{display:flex;gap:10px;align-items:center;padding:8px 12px;margin-bottom:8px;background:rgba(107,159,255,0.14);border:1px solid rgba(107,159,255,0.3);border-radius:6px;font-size:12px;}

/* [LIB-EXPIRY 2026-08-11] Row + Details panel expiry status badge.
 * Colour palette matches the app's existing sev-* + s-ok badges so the
 * cue reads consistently with tools calibration / lot expiry / AC docs. */
.lib-expiry-badge{display:inline-block;padding:2px 8px;font-size:10px;font-weight:600;border-radius:10px;letter-spacing:0.2px;}
.lib-expiry-green{background:rgba(0,209,128,0.15);color:#00d180;border:1px solid rgba(0,209,128,0.35);}
.lib-expiry-yellow{background:rgba(245,166,35,0.15);color:#f5a623;border:1px solid rgba(245,166,35,0.35);}
.lib-expiry-amber{background:rgba(255,140,0,0.18);color:#ff8c00;border:1px solid rgba(255,140,0,0.4);}
.lib-expiry-red{background:rgba(255,77,77,0.16);color:#ff4d4d;border:1px solid rgba(255,77,77,0.4);}

/* [LIB-ACL 2026-08-11] "🔒 Restricted" chip inline with the row title. */
.lib-acl-chip{display:inline-block;padding:1px 7px;margin-left:6px;font-size:10px;font-weight:600;background:rgba(155,109,255,0.16);color:#9b6dff;border:1px solid rgba(155,109,255,0.35);border-radius:10px;letter-spacing:0.2px;vertical-align:middle;}

/* [LIB-THUMB 2026-08-11] Page-1 preview thumbnails — full-scope pack:
 * - lib-thumb-list: small in the list row, 80x110 image on a compact
 *   badge with category icon overlay in the corner.
 * - lib-thumb-preview: larger in the Details panel (200x270) with a
 *   hover-zoom to native 400x540 while the cursor is over it.
 * - lib-thumb-picker: 60x80 in the WO attach picker modal.
 * Rendering targets the pdfjs-generated PNG (scale 1.0 on server = ~600px)
 * so downscaling in CSS stays crisp. */
.lib-thumb-th{width:100px;}
.lib-thumb-cell{width:100px;text-align:center;position:relative;padding:6px 4px;}
.lib-thumb-list{width:80px;height:110px;object-fit:cover;object-position:top;border:1px solid var(--b);border-radius:3px;background:var(--bg3);display:block;margin:0 auto;box-shadow:0 1px 3px rgba(0,0,0,0.3);}
.lib-thumb-cat-badge{position:absolute;top:2px;right:6px;font-size:14px;background:var(--bg2);border-radius:50%;width:22px;height:22px;line-height:22px;text-align:center;box-shadow:0 1px 2px rgba(0,0,0,0.4);}
.lib-det-preview-section{text-align:center;padding-bottom:12px;}
.lib-thumb-preview-wrap{display:inline-block;position:relative;margin-top:6px;}
.lib-thumb-preview{width:200px;height:270px;object-fit:cover;object-position:top;border:1px solid var(--b);border-radius:4px;background:var(--bg3);box-shadow:0 3px 10px rgba(0,0,0,0.4);cursor:zoom-in;transition:transform 0.18s ease, box-shadow 0.18s ease;transform-origin:top center;}
.lib-thumb-preview:hover{transform:scale(2);z-index:10;position:relative;box-shadow:0 12px 30px rgba(0,0,0,0.6);}
.lib-thumb-picker{width:60px;height:80px;object-fit:cover;object-position:top;border:1px solid var(--b);border-radius:3px;background:var(--bg3);flex-shrink:0;}


/* ─────────────────────────────────────────────────────
 * @module canavia-library.js#lib-details-styles
 * (Document details right-side panel)
 * ───────────────────────────────────────────────────── */
#lib-det-backdrop{position:fixed;inset:0;background:rgba(0,0,0,0.4);z-index:900;backdrop-filter:blur(1px);}
#lib-det-sidebar{position:fixed;top:0;right:0;bottom:0;width:420px;max-width:95vw;z-index:901;background:var(--bg2);border-left:1px solid var(--b);box-shadow:-4px 0 20px rgba(0,0,0,0.25);display:flex;flex-direction:column;animation:libDetSlideIn 0.2s ease-out;}
@keyframes libDetSlideIn { from { transform: translateX(100%); } to { transform: translateX(0); } }
#lib-det-header{display:flex;align-items:center;gap:10px;padding:14px 16px;border-bottom:1px solid var(--b);background:var(--bg3);flex-shrink:0;}
#lib-det-body{flex:1;overflow-y:auto;padding:14px 16px;}
.lib-det-section{margin-bottom:18px;}
.lib-det-section-title{font-size:10px;font-weight:600;color:var(--tx3);text-transform:uppercase;letter-spacing:1px;margin-bottom:8px;}
.lib-det-row{display:flex;gap:10px;padding:6px 0;border-bottom:1px solid var(--b);align-items:flex-start;}
.lib-det-row:last-child{border-bottom:none;}
.lib-det-k{font-size:11px;color:var(--tx2);min-width:110px;flex-shrink:0;padding-top:1px;}
.lib-det-v{font-size:12px;color:var(--tx);flex:1;word-break:break-word;}


/* ─────────────────────────────────────────────────────
 * @module canavia-stock.js#stock-perf-css
 * (Stock table virtualization hint)
 * ───────────────────────────────────────────────────── */
#sktb tr.stk-row { content-visibility: auto; contain-intrinsic-size: 44px; }
#sktb tr.stk-lots { content-visibility: auto; contain-intrinsic-size: 100px; }
.stk-loading-more { text-align:center; padding:14px; color:var(--tx3); font-size:11px; font-style:italic; }

/* ─────────────────────────────────────────────────────
 * @module canavia-camowo.js#new-request-modal
 * [CAMO-WO-MODAL-V4 2026-08-04] The New CAMO Work Order Request
 * modal needs a stacked (single-column) layout — .fg defaults to
 * `grid-template-columns:1fr 1fr` which scatters section headers
 * across two columns. Inline style="" attributes can't override
 * this because the CSP has style-src-attr:'none', so styles live
 * here as classes instead.
 * ───────────────────────────────────────────────────── */
.cwo-stack { grid-template-columns: 1fr !important; gap: 6px !important; }
.cwo-sect-hdr {
  font-size: 13px;
  font-weight: 700;
  color: var(--blue);
  border-bottom: 1px solid var(--b);
  padding-bottom: 4px;
  margin-top: 16px;
  margin-bottom: 8px;
}
.cwo-sect-hdr.cwo-sect-first { margin-top: 4px; }
.cwo-sect-hdr.cwo-sect-neutral { color: var(--tx3); }
.cwo-info-panel {
  font-size: 11px;
  color: var(--tx3);
  padding: 10px 12px;
  background: rgba(255,255,255,0.03);
  border-radius: 4px;
}
.cwo-info-panel.cwo-info-accent { border-left: 3px solid var(--blue); }
.cwo-cats-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 10px 24px;
  padding: 6px 4px 4px;
  font-size: 11px;
}
.cwo-cat-lbl { cursor: pointer; padding: 6px 0; }
.cwo-cat-lbl input[type="checkbox"] { margin-right: 6px; }

/* [CAMO-WO-TASKS-V1 2026-08-04] Row-builder table for §2 Work
 * Description. Compact, tight-column layout so the desc input
 * gets as much room as possible; # + deadline + action cells
 * are fixed narrow. */
.cwo-tasks-toolbar {
  display: flex;
  gap: 8px;
  justify-content: flex-end;
  margin: 4px 0 8px;
  flex-wrap: wrap;
}
.cwo-tasks-tbl {
  width: 100%;
  border-collapse: collapse;
  font-size: 11px;
  table-layout: fixed;
}
.cwo-tasks-tbl thead th {
  text-align: left;
  padding: 6px 6px;
  color: var(--tx3);
  font-weight: 600;
  border-bottom: 1px solid var(--b);
  text-transform: uppercase;
  font-size: 10px;
  letter-spacing: 0.5px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.cwo-tasks-tbl th.cwo-t-num  { width: 30px; text-align: center; padding: 6px 2px; }
.cwo-tasks-tbl th.cwo-t-desc { width: auto; }
.cwo-tasks-tbl th.cwo-t-ref  { width: 22%; }
.cwo-tasks-tbl th.cwo-t-dead { width: 60px; text-align: center; padding: 6px 4px; }
.cwo-tasks-tbl th.cwo-t-act  { width: 36px; padding: 6px 2px; }
.cwo-tasks-tbl td { padding: 4px 6px; vertical-align: top; }
.cwo-tasks-tbl td.cwo-t-num {
  text-align: center;
  color: var(--tx3);
  font-family: monospace;
  padding-top: 10px;
}
.cwo-tasks-tbl td.cwo-t-act-cell { text-align: center; padding-top: 6px; }
.cwo-tasks-tbl input[type="text"],
.cwo-tasks-tbl input[type="number"] {
  width: 100%;
  padding: 6px 8px;
  background: var(--bg2);
  border: 1px solid var(--b);
  border-radius: 4px;
  color: var(--tx);
  font-size: 11px;
  box-sizing: border-box;
}
.cwo-tasks-tbl input:focus { outline: none; border-color: var(--blue); }
.cwo-tasks-tbl tr.cwo-t-row + tr.cwo-t-row td { border-top: 1px dashed var(--b); }

/* [CAE-CAMO-SEND-V1 2026-08-05] Send-modal cover-letter preview.
 * Mimics a plain email client rendering so the operator sees the
 * final look without having to send a test first. Padding + border
 * make it feel distinct from the form fields above. */
.cwo-send-preview {
  border: 1px solid var(--b);
  border-radius: 6px;
  padding: 14px 16px;
  background: var(--bg2);
  font-family: Arial, sans-serif;
  font-size: 13px;
  line-height: 1.55;
  color: var(--tx);
  max-height: 320px;
  overflow-y: auto;
}
.cwo-send-preview .cwo-prev-subj {
  padding-bottom: 8px;
  margin-bottom: 10px;
  border-bottom: 1px solid var(--b);
  font-weight: 600;
  color: var(--tx);
}
.cwo-send-preview .cwo-prev-lbl {
  display: inline-block;
  min-width: 60px;
  color: var(--tx3);
  font-weight: 500;
  margin-right: 6px;
}
.cwo-send-preview .cwo-prev-body p { margin: 8px 0; }
.cwo-send-preview .cwo-prev-sig { margin-top: 20px !important; }
.cwo-send-preview .cwo-prev-role { color: var(--tx3); font-size: 12px; }
.cwo-send-preview .cwo-prev-att {
  margin-top: 16px !important;
  padding: 8px 12px;
  background: rgba(77, 138, 255, 0.08);
  border-left: 3px solid var(--blue);
  border-radius: 4px;
  font-family: monospace;
  font-size: 12px;
}

/* @module canavia-damage-map.js — DMAP-V1 2026-08-06 */
.dmap-layout{display:flex;gap:12px;min-height:640px;height:calc(100vh - 260px);min-width:0;}
.dmap-side{width:280px;flex-shrink:0;display:flex;flex-direction:column;gap:8px;background:var(--bg2);border:1px solid var(--b);border-radius:6px;padding:10px;min-width:0;box-sizing:border-box;overflow:hidden;}
.dmap-side-hdr{padding-bottom:6px;border-bottom:1px solid var(--b);flex-shrink:0;}
.dmap-toolbar{display:flex;gap:6px;flex-shrink:0;}
.dmap-toolbar .btn{flex:1;min-width:0;}
.dmap-filter{display:flex;gap:4px;padding:6px 0;border-bottom:1px solid var(--b);flex-shrink:0;flex-wrap:wrap;}
.dmap-fbtn{flex:1 1 auto;min-width:44px;padding:5px 6px;background:var(--bg3);border:1px solid var(--b);color:var(--tx2);border-radius:4px;cursor:pointer;font-size:10px;font-family:'IBM Plex Sans',sans-serif;box-sizing:border-box;}
.dmap-fbtn.on{background:var(--blue);color:#fff;border-color:var(--blue);}
.dmap-fbtn:hover:not(.on){background:var(--bg4);}
.dmap-list{flex:1 1 auto;overflow-y:auto;overflow-x:hidden;min-height:0;display:flex;flex-direction:column;gap:4px;padding-top:6px;padding-right:2px;}
.dmap-list-row{display:flex;gap:8px;align-items:center;padding:6px 8px;background:var(--bg3);border:1px solid transparent;border-radius:4px;cursor:pointer;min-width:0;box-sizing:border-box;}
.dmap-list-row:hover{border-color:var(--blue);background:var(--bg4);}
.dmap-list-row-unplaced{opacity:0.6;font-style:italic;}
.dmap-list-row-unplaced:hover{opacity:1;}
.dmap-badge{display:inline-flex;align-items:center;justify-content:center;width:22px;height:22px;border-radius:11px;font-size:10px;font-weight:700;color:#fff;flex-shrink:0;box-sizing:border-box;line-height:1;}
.dmap-badge-defect{background:var(--red);}
.dmap-badge-repair{background:var(--green);}
.dmap-badge-unplaced{background:var(--bg4);color:var(--tx3);border:1px dashed var(--b2);}
.dmap-list-body{flex:1 1 auto;min-width:0;overflow:hidden;}
.dmap-list-ref{font-size:11px;font-weight:600;color:var(--tx);font-family:'IBM Plex Mono',monospace;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dmap-list-desc{font-size:10px;color:var(--tx2);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;}
.dmap-main{flex:1 1 auto;display:flex;flex-direction:column;gap:8px;background:var(--bg2);border:1px solid var(--b);border-radius:6px;padding:10px;min-width:0;min-height:0;box-sizing:border-box;}
@media (max-width: 900px){
  .dmap-layout{flex-direction:column;height:auto;}
  .dmap-side{width:100%;max-height:340px;}
  .dmap-main{min-height:480px;}
}
.dmap-view-bar{display:flex;gap:6px;align-items:center;padding-bottom:6px;border-bottom:1px solid var(--b);}
.dmap-vbtn{padding:5px 12px;background:var(--bg3);border:1px solid var(--b);color:var(--tx2);border-radius:4px;cursor:pointer;font-size:11px;font-family:'IBM Plex Sans',sans-serif;}
.dmap-vbtn.on{background:var(--blue);color:#fff;border-color:var(--blue);}
.dmap-vbtn:hover:not(.on){background:var(--bg4);}
.dmap-canvas-host{flex:1;min-height:520px;background:#0b0e17;border-radius:6px;position:relative;overflow:hidden;}
.dmap-canvas-host.dmap-placing{cursor:crosshair;}
.dmap-canvas-host canvas{display:block;}
.dmap-place-banner{position:absolute;top:10px;left:50%;transform:translateX(-50%);padding:8px 14px;background:rgba(77,138,255,0.9);color:#fff;border-radius:4px;font-size:11px;font-weight:600;pointer-events:none;z-index:10;}
.dmap-label{position:absolute;transform:translate(-50%,-50%);background:rgba(0,0,0,0.75);color:#fff;padding:2px 6px;border-radius:10px;font-size:10px;font-weight:700;font-family:'IBM Plex Mono',monospace;cursor:pointer;pointer-events:auto;user-select:none;border:1px solid rgba(255,255,255,0.3);}
.dmap-label:hover{background:var(--blue);border-color:#fff;}
.dmap-photo-grid{display:grid;grid-template-columns:repeat(auto-fill,minmax(180px,1fr));gap:10px;}
.dmap-photo-cell{position:relative;background:var(--bg3);border:1px solid var(--b);border-radius:6px;overflow:hidden;display:flex;flex-direction:column;}
.dmap-photo-thumb{width:100%;height:120px;object-fit:cover;display:block;cursor:zoom-in;background:#000;}
.dmap-photo-meta{padding:6px 8px;display:flex;flex-direction:column;gap:2px;}
.dmap-photo-del{position:absolute;top:4px;right:4px;padding:2px 8px !important;font-size:11px !important;opacity:0.85;}
.dmap-photo-del:hover{opacity:1;}
.dmap-photo-add{display:flex;gap:8px;align-items:center;margin-top:10px;padding-top:10px;border-top:1px dashed var(--b);}
.dmap-photo-add label.btn{flex-shrink:0;}
.dmap-photo-note{flex:1;min-width:0;padding:6px 10px;background:var(--bg3);border:1px solid var(--b);color:var(--tx);border-radius:4px;font-size:11px;font-family:'IBM Plex Sans',sans-serif;}
.dmap-photo-note:focus{outline:none;border-color:var(--blue);}
.dmap-hist-toggle{display:flex;align-items:center;gap:6px;padding:6px 4px;font-size:10px;color:var(--tx2);cursor:pointer;user-select:none;border-bottom:1px solid var(--b);}
.dmap-hist-toggle input{cursor:pointer;margin:0;}
.dmap-hist-toggle:hover{color:var(--tx);}
.dmap-label-ghost{background:rgba(74,88,120,0.55) !important;border-color:rgba(255,255,255,0.15) !important;font-size:9px !important;font-weight:normal !important;padding:1px 5px !important;opacity:0.85;}
.dmap-label-ghost:hover{background:var(--tx3) !important;color:#fff;}
.dmap-glb-row{display:flex;gap:4px;margin-top:6px;flex-wrap:wrap;}
.dmap-glb-btn{padding:4px 8px;background:var(--bg3);border:1px solid var(--b);color:var(--tx2);border-radius:4px;cursor:pointer;font-size:10px;font-family:'IBM Plex Sans',sans-serif;flex:1 1 auto;min-width:0;text-align:center;box-sizing:border-box;}
.dmap-glb-btn:hover{background:var(--bg4);color:var(--tx);}
.dmap-glb-btn-warn{background:var(--red-d);color:var(--red);border-color:var(--red-d);flex:0 0 auto;}
.dmap-glb-btn-warn:hover{background:var(--red);color:#fff;}
.dmap-empty-box{border:1px dashed var(--b);border-radius:6px;}

/* @module canavia-hr.js#training-matrix
 * [HR-ENH-3 2026-08-08] Training Matrix view — one screen showing every
 * active person × every distinct training on file. Sticky first column
 * so the person name stays visible while scrolling right through many
 * training columns. Colour bands mirror the Training list statuses
 * (t-ok / t-due-soon / t-overdue) plus a muted "missing" state.
 */
.u-hidden{display:none;}
.tm-scroll{overflow-x:auto;max-width:100%;border:1px solid var(--b);border-radius:6px;}
.tm-table{border-collapse:separate;border-spacing:0;width:auto;font-size:11px;}
.tm-table th,.tm-table td{padding:6px 8px;border-bottom:1px solid var(--b);border-right:1px solid var(--b);white-space:nowrap;}
.tm-table thead th{background:var(--bg3);color:var(--tx);font-weight:600;text-align:center;position:sticky;top:0;z-index:2;}
.tm-table thead th.tm-name-col{text-align:left;left:0;z-index:3;}
.tm-table tbody th{background:var(--bg3);color:var(--tx);font-weight:500;text-align:left;position:sticky;left:0;z-index:1;}
.tm-cell{text-align:center;font-weight:600;font-size:14px;line-height:1;cursor:help;}
.tm-cell.ok{color:var(--green);background:rgba(0,201,177,0.08);}
.tm-cell.due{color:var(--amber);background:rgba(247,166,59,0.10);}
.tm-cell.overdue{color:var(--red);background:rgba(255,77,77,0.10);}
.tm-cell.missing{color:var(--tx3);background:transparent;}
.tm-legend{display:flex;gap:12px;padding:6px 0;font-size:10px;color:var(--tx2);}
.tm-legend span{display:inline-flex;align-items:center;gap:4px;}
.tm-role{font-size:9px;color:var(--tx3);font-weight:normal;margin-left:4px;}

/* @module canavia-api.js#pers-modal
 * [HR-ENH-4 2026-08-08] Section divider header used in the personnel
 * edit modal (Contact & Emergency block). Same visual pattern as the
 * Invoice divider in the tools modal but as a proper class so CSP
 * style-src-attr enforcement can't silently drop it.
 */
.hr-sec-divider{margin-top:6px;padding-top:6px;border-top:1px dashed var(--b);}
.hr-sec-title{color:var(--blue);font-weight:600;}

/* HR personnel card — phone + emergency contact block */
.hr-card-contact{margin-top:6px;padding-top:6px;border-top:1px dashed var(--b);font-size:10px;color:var(--tx2);}
.hr-card-contact .hr-card-phone{color:var(--tx);font-family:'IBM Plex Mono',monospace;}
.hr-card-contact .hr-card-ec{color:var(--tx3);margin-top:2px;}
.hr-card-contact .hr-card-ec b{color:var(--tx2);}

/* @module canavia-hr.js#leave-balance-hint
 * [HR-LEAVE-BALANCE-HINT-V1 2026-08-08] Compact callout under the
 * person picker in the leave request modal — shows entitlement,
 * used, remaining, and projected remaining after this request.
 * Horizontal flow (parent .fi.f would have stacked children column).
 */
.lf-balance-hint{
  display:block;
  padding:8px 12px;
  margin:2px 0 8px 0;
  background:var(--bg3);
  border:1px solid var(--b);
  border-left:3px solid var(--blue);
  border-radius:4px;
  font-size:11px;
  color:var(--tx2);
  line-height:1.5;
}
.lf-balance-hint:empty{display:none;}
.lf-balance-hint b{color:var(--tx);font-weight:600;}
.lf-balance-hint .mo{font-family:'IBM Plex Mono',monospace;font-weight:600;}

/* @module canavia-stock.js
 * [STK-UX-6 2026-08-08] Placeholder section header for the Stock
 * module. Adds the same module-boundary marker that HR / GF / CAMO
 * blocks already have, so a future style refactor knows where Stock
 * styles live vs the utility layer. No rules here yet — most stock
 * styles still live in canavia.css and inline attributes in
 * canavia-stock.js (STK-BUG-13 tracks the CSP migration).
 * Add rules under this comment as canavia-stock.js is migrated off
 * inline style="" attributes.
 */

/* @module canavia-stock.js
 * [CAM-SCAN-V1 2026-08-10] Camera-based barcode scanner overlay.
 * Full-viewport dim + white card with live video preview.
 * Overlay opens by adding .on to #camScanOv (via openCamScan).
 */
.cam-scan-ov{
  display:none;
  position:fixed;
  inset:0;
  background:rgba(0,0,0,0.85);
  z-index:9999;
  align-items:center;
  justify-content:center;
  padding:16px;
}
.cam-scan-ov.on{display:flex;}
.cam-scan-box{
  background:var(--bg);
  border:1px solid var(--b);
  border-radius:8px;
  padding:14px;
  width:100%;
  max-width:520px;
  box-shadow:0 8px 32px rgba(0,0,0,0.5);
}
.cam-scan-hd{
  display:flex;
  justify-content:space-between;
  align-items:center;
  margin-bottom:10px;
  color:var(--tx);
  font-size:14px;
}
.cam-scan-vidwrap{
  position:relative;
  width:100%;
  aspect-ratio:4/3;
  background:#000;
  border-radius:4px;
  overflow:hidden;
}
.cam-scan-vidwrap video{
  width:100%;
  height:100%;
  object-fit:cover;
  display:block;
}
.cam-scan-frame{
  position:absolute;
  top:20%;
  left:15%;
  right:15%;
  bottom:20%;
  border:2px solid #0f0;
  border-radius:6px;
  pointer-events:none;
  box-shadow:0 0 0 9999px rgba(0,0,0,0.35);
}
.cam-scan-msg{
  margin-top:8px;
  font-size:12px;
  color:var(--tx2);
  text-align:center;
  min-height:16px;
}
.cam-scan-msg.err{color:var(--red);}
.cam-scan-msg.ok{color:var(--green);}

/* @module canavia-cae.js
 * [CAE-DEEPLINK-V2 2026-08-10] Brief highlight when a version card is
 * jumped-to from an email deep-link (?openCAE=<id>). Two flashes over
 * ~2.4s draw the eye without being annoying — no persistent styling.
 */
.cae-flash{
  animation: cae-flash-kf 1.2s ease-in-out 2;
  box-shadow: 0 0 0 3px var(--amber, #f5a623);
  border-radius: 8px;
}
@keyframes cae-flash-kf{
  0%   { box-shadow: 0 0 0 0    rgba(245,166,35,0.0); }
  50%  { box-shadow: 0 0 0 6px  rgba(245,166,35,0.65); }
  100% { box-shadow: 0 0 0 0    rgba(245,166,35,0.0); }
}


/* [ELB-FIX-6 2026-08-11] Team Logbook filter bar — labeled inputs
 * on one line, wraps cleanly, always visible Clear button (disabled
 * when nothing to clear). Replaces the earlier flex-8 layout where
 * the dropdown and dates were narrow + unaligned. */
.elb-team-filters{display:flex;gap:12px;flex-wrap:wrap;align-items:flex-end;margin-bottom:14px;padding:10px 12px;background:var(--bg3);border:1px solid var(--b);border-radius:6px;}
.elb-team-filter-row{display:flex;flex-direction:column;gap:4px;}
.elb-team-filter-row label{font-size:10px;color:var(--tx3);text-transform:uppercase;letter-spacing:0.5px;font-weight:600;}
.elb-team-filter-row input[type="text"]{min-width:280px;flex:1;padding:6px 10px;background:var(--bg2);color:var(--tx);border:1px solid var(--b);border-radius:4px;font-size:12px;}
.elb-team-filter-row select,.elb-team-filter-row input[type="date"]{min-width:150px;padding:6px 10px;background:var(--bg2);color:var(--tx);border:1px solid var(--b);border-radius:4px;font-size:12px;}
.elb-team-filter-row input:focus,.elb-team-filter-row select:focus{outline:none;border-color:var(--blue);}
.elb-team-clear-btn{align-self:flex-end;margin-bottom:1px;}
.elb-team-clear-btn[disabled]{opacity:0.4;cursor:not-allowed;}

/* @module SMS attachments (SMS-YELLOW-7 2026-08-11) */
.u-row-8-wrap{display:flex;flex-wrap:wrap;gap:8px;}
.u-col-4-c-p6-ro7-w120{display:flex;flex-direction:column;align-items:center;gap:4px;padding:6px;border:1px solid var(--b);border-radius:7px;width:120px;background:var(--bg2);}
.u-w104-h80-ofit-c-ro4{width:104px;height:80px;object-fit:cover;border-radius:4px;display:block;}
.u-w104-h80-c-c-fs28-ro4-bg-gray{width:104px;height:80px;display:flex;align-items:center;justify-content:center;font-size:28px;border-radius:4px;background:var(--bg3);}
.u-wob-c{word-break:break-word;text-align:center;line-height:1.2;}

/* @module canavia-plan.js#fl-gantt — FlightLogger Schedule daily Gantt */
.u-fl-gantt-wrap { overflow: auto; max-height: 60vh; border: 1px solid var(--b); border-radius: 6px; background: var(--bg2); }
.u-fl-gantt { position: relative; min-width: 1200px; }
.u-fl-gantt-hdr { display: grid; grid-template-columns: 100px minmax(0, 1fr); position: sticky; top: 0; z-index: 3; background: var(--bg3); border-bottom: 1px solid var(--b); }
.u-fl-gantt-hdr-corner { padding: 4px 8px; font-size: 11px; font-weight: 700; color: var(--t2); border-right: 1px solid var(--b); }
.u-fl-gantt-hdr-hours { position: relative; height: 22px; }
.u-fl-gantt-hdr-hour { position: absolute; top: 3px; font-size: 11px; color: var(--t1); font-weight: 700; text-align: left; border-left: 1px solid var(--b); padding-left: 4px; height: 100%; box-sizing: border-box; opacity: 0.9; }
.u-fl-gantt-row { display: grid; grid-template-columns: 100px minmax(0, 1fr); border-bottom: 1px solid var(--b); min-height: 34px; }
.u-fl-gantt-row:hover { background: var(--bg3); }
.u-fl-gantt-row-label { padding: 6px 8px; font-weight: 700; font-size: 12px; border-right: 1px solid var(--b); display: flex; align-items: center; background: var(--bg2); position: sticky; left: 0; z-index: 2; }
.u-fl-gantt-row-lane { position: relative; height: 34px; }
.u-fl-gantt-row-lane::before { content: ''; position: absolute; inset: 0; background-image: repeating-linear-gradient(to right, transparent 0, transparent calc((100% / 24) - 1px), var(--b) calc((100% / 24) - 1px), var(--b) calc(100% / 24)); pointer-events: none; opacity: 0.4; }
.u-fl-book { position: absolute; top: 3px; height: 28px; border-radius: 4px; padding: 2px 6px; font-size: 10px; line-height: 1.15; color: #fff; overflow: hidden; cursor: pointer; box-shadow: inset 0 -2px 0 rgba(0,0,0,0.15); }
.u-fl-book-flight { background: linear-gradient(135deg,#3b82f6,#1d4ed8); }
.u-fl-book-maint  { background: linear-gradient(135deg,#71717a,#3f3f46); }
.u-fl-book-check  { background: linear-gradient(135deg,#f59e0b,#b45309); }
.u-fl-book-solo   { background: linear-gradient(135deg,#10b981,#065f46); }
.u-fl-book-now-line { position: absolute; top: 0; bottom: 0; width: 2px; background: #ef4444; pointer-events: none; z-index: 4; }
.u-fl-gantt-empty { padding: 20px; text-align: center; color: var(--t3); font-size: 11px; }

/* @module canavia-core.js#user-modal — Multi-role checkbox grid */
.u-extra-roles-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(160px, 1fr)); gap: 6px 12px; padding: 6px 8px; border: 1px solid var(--b); border-radius: 4px; background: var(--bg3); }
.u-extra-roles-grid label { cursor: pointer; user-select: none; }
.u-extra-roles-grid input[type='checkbox'] { cursor: pointer; }

/* @module canavia-procurement.js#receive-tool-fields — [PROC-TARGET-V1 2026-08-18]
 * Tool-specific fields block shown only when Target is a tool (not Stock).
 * Inline style="display:none" was stripped by CSP style-src-attr:'none'; the
 * class approach here survives the parser and gets toggled via classList. */
.rcv-tool-fields { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: 8px; margin-bottom: 6px; padding: 8px; background: #0a1424; border: 1px dashed var(--blue); border-radius: 4px; }

/* Full-width form control helper (was inline style="width:100%;box-sizing:border-box") */
.u-w-full { width: 100%; box-sizing: border-box; }

/* @module canavia-camo.js#arc-findings — ARC Review findings checklist
 * Clean two-column layout with tidy checkbox+text alignment. */
.arc-findings-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 8px 16px; margin-top: 8px; }
.arc-findings-grid label { display: flex; align-items: flex-start; gap: 8px; padding: 8px 10px; border: 1px solid var(--b); border-radius: 4px; background: var(--bg3); cursor: pointer; user-select: none; font-size: 12px; line-height: 1.35; }
.arc-findings-grid label:hover { background: #182034; border-color: var(--blue); }
.arc-findings-grid input[type="checkbox"] { margin-top: 2px; cursor: pointer; flex-shrink: 0; }
@media (max-width: 700px) { .arc-findings-grid { grid-template-columns: 1fr; } }

/* Section separator utility (top padding + dashed rule above content) */
.u-pt10 { padding-top: 10px; }
.u-bt-dash { border-top: 1px dashed var(--b); }

/* @module canavia-core.js#sortable-tables — [SORTABLE-TABLES-V1 2026-08-20]
 * Any <table class="sortable"> becomes click-to-sort. The JS attaches a
 * sortable-th class + toggles sort-asc / sort-desc on the active header.
 * The ::after pseudo-element renders the direction arrow so text stays
 * aligned. Non-sortable columns (row actions) opt out via data-nosort="1".*/
table.sortable th.sortable-th { cursor: pointer; user-select: none; position: relative; padding-right: 14px !important; white-space: nowrap; }
table.sortable th.sortable-th::after { content: '⇅'; position: absolute; right: 4px; top: 50%; transform: translateY(-50%); font-size: 9px; opacity: 0.35; }
table.sortable th.sort-asc::after  { content: '▲'; opacity: 1; color: var(--blue); }
table.sortable th.sort-desc::after { content: '▼'; opacity: 1; color: var(--blue); }
table.sortable th.sortable-th:hover { background: #182034; }

/* @module canavia-groundfleet.js#edit-compliance-blocks — [GF-EDIT-COMPLIANCE 2026-08-20]
 * Compact grid for the inline Insurance / Permit / R-permit sub-forms
 * inside the Edit Vehicle modal. Two columns on desktop, single column
 * on narrow modals — same responsive pattern as .arc-findings-grid. */
.gf-comp-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 6px 12px; margin-top: 6px; }
.gf-comp-grid .fi { margin-bottom: 0; }
.gf-comp-grid .fi.f, .gf-comp-grid .u-gc-full { grid-column: 1 / -1; }
@media (max-width: 700px) { .gf-comp-grid { grid-template-columns: 1fr; } }

/* [WP-CRS-REISSUED-CLICKABLE 2026-09-16] Make the REISSUED pill
   in the CRS block feel clickable — the click opens CRS History. */
.u-cursor-pointer { cursor: pointer; }
.u-cursor-pointer:hover { filter: brightness(1.15); }
