/* ═══════════════════════════════════════════════════════════════════
 * 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: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-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 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}}


/* ─────────────────────────────────────────────────────
 * @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;}


/* ─────────────────────────────────────────────────────
 * @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; }
