/* TRN-UI-LIGHT-1 2026-10-29 — light operational workspace for Training & Qualifications.
   Presentation only. Every rule is scoped to #section-training (the Training module page) or to
   #tq-host (the Type ratings dialog host the governed view appends to <body>). No global selector.
   The global Verum header, sidebar, the Training header and the module tab bar stay dark;
   the tab panes, panels, tables, filters, forms, histories, Review screens and dialogs are light.
   ID-scoped selectors (+ !important where an older !important or an inline style exists) win over
   the legacy dark trn-* rules and the views' inline <style> blocks without editing their logic. */

/* ── Page canvas behind the panes ── */
#section-training { background: #eef1f5 !important; }
#section-training > .trn-header { background: #0b1324 !important; border: 1px solid #1e293b !important; border-radius: 6px !important; }
#section-training > .trn-header h2 { color: #f8fafc !important; }
#section-training > .trn-header p, #section-training > .trn-header .trn-eyebrow { color: #94a3b8 !important; }

/* ── Module tab bar: stays dark; selected tab clearly marked; transition into the light pane ── */
#section-training > .trn-subtab-bar { background: #0b1324 !important; border-color: #1e293b !important; margin-bottom: 0 !important; }
#section-training > .trn-subtab-bar > .trn-stab-btn { color: #94a3b8 !important; }
#section-training > .trn-subtab-bar > .trn-stab-btn:hover { color: #e2e8f0 !important; }
#section-training > .trn-subtab-bar > .trn-stab-btn.active { color: #ffffff !important; border-bottom: 3px solid #3b82f6 !important; background: rgba(59,130,246,.16) !important; }
#section-training > .trn-subtab-bar > .trn-stab-btn:focus-visible { outline: 2px solid #93c5fd !important; outline-offset: -2px; }

/* ── Light panes (Qualifications, Sessions, Instructors, Attendance, Course Catalogue) ── */
#section-training > .trn-stab-pane { background: #f7f8fa !important; border: 1px solid #d5dbe3 !important; border-top: 3px solid #3b82f6 !important; color: #0f172a !important; }
#section-training .trn-stab-pane .trn-panel { background: #ffffff !important; border: 1px solid #d5dbe3 !important; box-shadow: 0 1px 2px rgba(15,23,42,.06) !important; color: #0f172a !important; }
#section-training .trn-stab-pane .trn-panel-head { border-bottom-color: #e2e8f0 !important; background: transparent !important; }
#section-training .trn-stab-pane .trn-panel-head h3, #section-training .trn-stab-pane h3, #section-training .trn-stab-pane h4 { color: #0f172a !important; }
#section-training .trn-stab-pane .trn-panel-head p { color: #475569 !important; }
#section-training .trn-stab-pane .trn-panel-tag { background: #f1f5f9 !important; border-color: #d5dbe3 !important; color: #334155 !important; }
#section-training .trn-stab-pane b, #section-training .trn-stab-pane strong { color: inherit !important; }

/* inner role tabs (Flight Crew / Cabin Crew …) sit inside the light pane */
#section-training .trn-stab-pane .trn-subtab-bar { background: #ffffff !important; border: 1px solid #d5dbe3 !important; border-radius: 6px !important; }
#section-training .trn-stab-pane .trn-stab-btn { color: #475569 !important; }
#section-training .trn-stab-pane .trn-stab-btn.active { color: #1d4ed8 !important; border-bottom-color: #1d4ed8 !important; }

/* ── Tables: pale header, white body, horizontal scroll preserved ── */
#section-training .trn-stab-pane .trn-matrix-wrap { background: #ffffff !important; border: 1px solid #d5dbe3 !important; overflow-x: auto !important; }
#section-training .trn-stab-pane table { background: #ffffff !important; color: #0f172a !important; }
#section-training .trn-stab-pane table thead th, #section-training .trn-stab-pane table th,
#tq-host table th { background: #eef2f7 !important; color: #334155 !important; border-bottom: 1px solid #d5dbe3 !important; }
#section-training .trn-stab-pane table td, #tq-host table td { background: #ffffff !important; color: #0f172a !important; border-top: 1px solid #e5e9ef !important; border-bottom-color: #e5e9ef !important; }
#section-training .trn-stab-pane table tbody tr:hover td { background: #f5f8fc !important; }

/* ── Filters and form controls: white, visible border, focus and disabled ── */
#section-training .trn-stab-pane input, #section-training .trn-stab-pane select, #section-training .trn-stab-pane textarea,
#section-training .trn-gov-dlg input, #section-training .trn-gov-dlg select, #section-training .trn-gov-dlg textarea,
#tq-host input, #tq-host select, #tq-host textarea {
  background: #ffffff !important; color: #0f172a !important; border: 1px solid #94a3b8 !important; border-radius: 4px !important; }
#section-training .trn-stab-pane input:focus, #section-training .trn-stab-pane select:focus, #section-training .trn-stab-pane textarea:focus,
#section-training .trn-gov-dlg input:focus, #section-training .trn-gov-dlg select:focus, #section-training .trn-gov-dlg textarea:focus,
#tq-host input:focus, #tq-host select:focus, #tq-host textarea:focus {
  outline: 2px solid #2563eb !important; outline-offset: 0; border-color: #2563eb !important; }
#section-training input:disabled, #section-training select:disabled, #section-training textarea:disabled,
#tq-host input:disabled, #tq-host select:disabled, #tq-host textarea:disabled { background: #f1f5f9 !important; color: #64748b !important; border-color: #cbd5e1 !important; cursor: not-allowed; }
#section-training input::placeholder, #section-training textarea::placeholder, #tq-host input::placeholder, #tq-host textarea::placeholder { color: #64748b !important; }
#section-training .trn-gov-f, #tq-host .trn-gov-f { color: #334155 !important; font-weight: 600; }
#section-training input[type="checkbox"], #tq-host input[type="checkbox"] { accent-color: #1d4ed8; }

/* ── Buttons: ghost = white outline; primary (Confirm/Review) = blue; destructive stays red ── */
#section-training .trn-bulk-btn, #tq-host .trn-bulk-btn { background: #1d4ed8 !important; color: #ffffff !important; border: 1px solid #1d4ed8 !important; }
#section-training .trn-bulk-btn:hover, #tq-host .trn-bulk-btn:hover { background: #1e40af !important; }
#section-training .trn-bulk-btn.trn-bulk-btn-ghost, #tq-host .trn-bulk-btn.trn-bulk-btn-ghost { background: #ffffff !important; color: #1e3a8a !important; border: 1px solid #94a3b8 !important; }
#section-training .trn-bulk-btn.trn-bulk-btn-ghost:hover, #tq-host .trn-bulk-btn.trn-bulk-btn-ghost:hover { background: #eff4ff !important; }
#section-training .trn-bulk-btn[style*="#b91c1c"], #tq-host .trn-bulk-btn[style*="#b91c1c"],
#section-training .trn-bulk-btn.trn-bulk-btn-ghost[style*="#b91c1c"], #tq-host .trn-bulk-btn.trn-bulk-btn-ghost[style*="#b91c1c"] { background: #b91c1c !important; border-color: #991b1b !important; color: #ffffff !important; }
#section-training .trn-bulk-btn.trn-bulk-btn-ghost[style*="#b91c1c"]:hover, #tq-host .trn-bulk-btn.trn-bulk-btn-ghost[style*="#b91c1c"]:hover,
#section-training .trn-bulk-btn[style*="#b91c1c"]:hover, #tq-host .trn-bulk-btn[style*="#b91c1c"]:hover { background: #991b1b !important; color: #ffffff !important; }
#section-training .trn-bulk-btn:disabled, #tq-host .trn-bulk-btn:disabled { background: #e2e8f0 !important; color: #64748b !important; border-color: #cbd5e1 !important; cursor: not-allowed; }
#section-training .trn-bulk-btn:focus-visible, #tq-host .trn-bulk-btn:focus-visible { outline: 2px solid #2563eb !important; outline-offset: 2px; }
#section-training .trn-stab-pane .pill, #section-training .trn-stab-pane .pill-slate { background: #f1f5f9 !important; color: #1e293b !important; border: 1px solid #cbd5e1 !important; }

/* ── Badges (aviation-style) ── */
#section-training .trn-gov-tag, #tq-host .trn-gov-tag { border: 1px solid transparent; font-weight: 600; }
#section-training .trn-gov-tag.ok,  #tq-host .trn-gov-tag.ok  { background: #dcfce7 !important; color: #166534 !important; border-color: #86efac !important; }
#section-training .trn-gov-tag.due, #tq-host .trn-gov-tag.due { background: #fef3c7 !important; color: #92400e !important; border-color: #fcd34d !important; }
#section-training .trn-gov-tag.bad, #tq-host .trn-gov-tag.bad { background: #fee2e2 !important; color: #991b1b !important; border-color: #fca5a5 !important; }
#section-training .trn-gov-tag.na,  #tq-host .trn-gov-tag.na  { background: #f1f5f9 !important; color: #475569 !important; border-color: #cbd5e1 !important; }
#section-training .trn-gov-tag.rec, #tq-host .trn-gov-tag.rec { background: #e0e7ff !important; color: #3730a3 !important; border-color: #a5b4fc !important; }
#section-training .q-valid   { background: #dcfce7 !important; color: #166534 !important; border-color: #86efac !important; }
#section-training .q-due     { background: #fef3c7 !important; color: #92400e !important; border-color: #fcd34d !important; }
#section-training .q-expired { background: #fee2e2 !important; color: #991b1b !important; border-color: #fca5a5 !important; }

/* ── Dialogs: dark translucent overlay only behind an open dialog; centred white box ── */
#section-training .trn-gov-dlg, #tq-host .trn-gov-dlg { background: rgba(15,23,42,.55) !important; display: flex !important; align-items: center !important; justify-content: center !important; z-index: 9500 !important; }
#section-training .trn-gov-dlg-box, #tq-host .trn-gov-dlg-box {
  background: #ffffff !important; color: #0f172a !important; border: 1px solid #d5dbe3 !important;
  box-shadow: 0 18px 48px rgba(15,23,42,.28) !important; max-height: 88vh; overflow: auto; }
#section-training .trn-gov-dlg-box h4, #tq-host .trn-gov-dlg-box h4 { color: #0f172a !important; }
#section-training .trn-gov-kv b, #tq-host .trn-gov-kv b { color: #475569 !important; }
#section-training .trn-gov-note, #tq-host .trn-gov-note { color: #475569 !important; }
#section-training .trn-gov-err, #tq-host .trn-gov-err { color: #b91c1c !important; font-weight: 600; }

/* ── Inline colours written by the views/legacy catalogue: remap pale-on-dark to dark-on-light ── */
#section-training .trn-stab-pane [style*="color:#e2e8f0"], #section-training .trn-stab-pane [style*="color:#cbd5e1"],
#section-training .trn-gov-dlg [style*="color:#e2e8f0"], #tq-host [style*="color:#e2e8f0"] { color: #0f172a !important; }
#section-training .trn-stab-pane [style*="color:#94a3b8"], #section-training .trn-stab-pane [style*="color:#64748b"],
#section-training .trn-gov-dlg [style*="color:#94a3b8"], #section-training .trn-gov-dlg [style*="color:#64748b"],
#tq-host [style*="color:#94a3b8"], #tq-host [style*="color:#64748b"] { color: #475569 !important; }
#section-training [style*="color:#fca5a5"], #tq-host [style*="color:#fca5a5"] { color: #b91c1c !important; }
#section-training .trn-stab-pane [style*="color:#93c5fd"], #section-training .trn-stab-pane [style*="color:#a5b4fc"] { color: #1d4ed8 !important; }
#section-training .trn-stab-pane [style*="color:#86efac"], #section-training .trn-stab-pane [style*="color:#34d399"] { color: #166534 !important; }
#section-training .trn-stab-pane [style*="color:#fcd34d"], #section-training .trn-stab-pane [style*="color:#fde047"] { color: #92400e !important; }
#section-training .trn-stab-pane [style*="background:#0b1220"], #section-training .trn-stab-pane [style*="background:#020617"],
#section-training .trn-stab-pane [style*="background:#0f172a"], #section-training .trn-stab-pane [style*="background: #0f172a"],
#section-training .trn-stab-pane [style*="background:rgba(15,23,42"], #section-training .trn-stab-pane [style*="background: rgba(15"] {
  background: #ffffff !important; color: #0f172a !important; border-color: #cbd5e1 !important; }
#section-training .trn-stab-pane [style*="border-bottom:1px solid #1e293b"], #section-training .trn-stab-pane [style*="border-top:1px solid #1e293b"],
#section-training .trn-stab-pane [style*="border:1px solid #1e293b"], #section-training .trn-stab-pane [style*="#334155"] { border-color: #d5dbe3 !important; }

/* ── Legacy shared pieces still shown inside the panes (KPI cards, action bar, striped rows, add buttons, catalogue pills) ── */
#section-training .trn-stab-pane .trn-kpi-card { background: #ffffff !important; border: 1px solid #d5dbe3 !important; box-shadow: 0 1px 2px rgba(15,23,42,.06) !important; }
#section-training .trn-stab-pane .trn-kpi-label, #section-training .trn-stab-pane .trn-kpi-sub { color: #475569 !important; }
#section-training .trn-stab-pane .trn-kpi-val { color: #0f172a !important; }
#section-training .trn-stab-pane .trn-action-bar { background: #ffffff !important; border: 1px solid #d5dbe3 !important; }
#section-training .trn-stab-pane .trn-search-icon { color: #334155 !important; }
#section-training .trn-stab-pane table tbody tr, #section-training .trn-stab-pane table thead tr, #tq-host table tr { background: #ffffff !important; }
#section-training .trn-stab-pane .trn-add-course-btn { background: #ffffff !important; color: #1d4ed8 !important; border: 1px solid #94a3b8 !important; }
#section-training .trn-stab-pane .trn-add-course-btn:hover { background: #eff4ff !important; }
#section-training .trn-stab-pane [style*="color:#f87171"], #section-training .trn-stab-pane [style*="color: #f87171"], #section-training .trn-stab-pane [style*="color:#ef4444"] { color: #b91c1c !important; }
#section-training .trn-stab-pane [style*="color:#fbbf24"], #section-training .trn-stab-pane [style*="color: #fbbf24"], #section-training .trn-stab-pane [style*="color:#f59e0b"] { color: #92400e !important; }
#section-training .trn-stab-pane [style*="color:#818cf8"], #section-training .trn-stab-pane [style*="color: #818cf8"], #section-training .trn-stab-pane [style*="color:#60a5fa"] { color: #3730a3 !important; }
#section-training .trn-stab-pane [style*="color:#4ade80"], #section-training .trn-stab-pane [style*="color:#22c55e"] { color: #166534 !important; }
/* Upcoming Sessions list (Qualifications right column) */
#section-training .trn-stab-pane .trn-sessions-list > * { background: #ffffff !important; border-color: #e2e8f0 !important; }
#section-training .trn-stab-pane .tsi-date { background: #e0e7ff !important; }
#section-training .trn-stab-pane .tsi-date-day { color: #1e3a8a !important; }
#section-training .trn-stab-pane .tsi-date-month { color: #3730a3 !important; }
#section-training .trn-stab-pane .tsi-course { color: #0f172a !important; }
#section-training .trn-stab-pane .tsi-meta { color: #475569 !important; }

/* ── LIC-MED-1A 2026-10-29 — #lic-host (the Licences dialog host the licences view appends to <body>) takes exactly the #tq-host rules above, generated rule-for-rule; no other change ── */
#lic-host table th { background: #eef2f7 !important; color: #334155 !important; border-bottom: 1px solid #d5dbe3 !important; }
#lic-host table td { background: #ffffff !important; color: #0f172a !important; border-top: 1px solid #e5e9ef !important; border-bottom-color: #e5e9ef !important; }
#lic-host input, #lic-host select, #lic-host textarea { background: #ffffff !important; color: #0f172a !important; border: 1px solid #94a3b8 !important; border-radius: 4px !important; }
#lic-host input:focus, #lic-host select:focus, #lic-host textarea:focus { outline: 2px solid #2563eb !important; outline-offset: 0; border-color: #2563eb !important; }
#lic-host input:disabled, #lic-host select:disabled, #lic-host textarea:disabled { background: #f1f5f9 !important; color: #64748b !important; border-color: #cbd5e1 !important; cursor: not-allowed; }
#lic-host input::placeholder, #lic-host textarea::placeholder { color: #64748b !important; }
#lic-host .trn-gov-f { color: #334155 !important; font-weight: 600; }
#lic-host input[type="checkbox"] { accent-color: #1d4ed8; }
#lic-host .trn-bulk-btn { background: #1d4ed8 !important; color: #ffffff !important; border: 1px solid #1d4ed8 !important; }
#lic-host .trn-bulk-btn:hover { background: #1e40af !important; }
#lic-host .trn-bulk-btn.trn-bulk-btn-ghost { background: #ffffff !important; color: #1e3a8a !important; border: 1px solid #94a3b8 !important; }
#lic-host .trn-bulk-btn.trn-bulk-btn-ghost:hover { background: #eff4ff !important; }
#lic-host .trn-bulk-btn[style*="#b91c1c"], #lic-host .trn-bulk-btn.trn-bulk-btn-ghost[style*="#b91c1c"] { background: #b91c1c !important; border-color: #991b1b !important; color: #ffffff !important; }
#lic-host .trn-bulk-btn.trn-bulk-btn-ghost[style*="#b91c1c"]:hover, #lic-host .trn-bulk-btn[style*="#b91c1c"]:hover { background: #991b1b !important; color: #ffffff !important; }
#lic-host .trn-bulk-btn:disabled { background: #e2e8f0 !important; color: #64748b !important; border-color: #cbd5e1 !important; cursor: not-allowed; }
#lic-host .trn-bulk-btn:focus-visible { outline: 2px solid #2563eb !important; outline-offset: 2px; }
#lic-host .trn-gov-tag { border: 1px solid transparent; font-weight: 600; }
#lic-host .trn-gov-tag.ok { background: #dcfce7 !important; color: #166534 !important; border-color: #86efac !important; }
#lic-host .trn-gov-tag.due { background: #fef3c7 !important; color: #92400e !important; border-color: #fcd34d !important; }
#lic-host .trn-gov-tag.bad { background: #fee2e2 !important; color: #991b1b !important; border-color: #fca5a5 !important; }
#lic-host .trn-gov-tag.na { background: #f1f5f9 !important; color: #475569 !important; border-color: #cbd5e1 !important; }
#lic-host .trn-gov-tag.rec { background: #e0e7ff !important; color: #3730a3 !important; border-color: #a5b4fc !important; }
#lic-host .trn-gov-dlg { background: rgba(15,23,42,.55) !important; display: flex !important; align-items: center !important; justify-content: center !important; z-index: 9500 !important; }
#lic-host .trn-gov-dlg-box { background: #ffffff !important; color: #0f172a !important; border: 1px solid #d5dbe3 !important; box-shadow: 0 18px 48px rgba(15,23,42,.28) !important; max-height: 88vh; overflow: auto; }
#lic-host .trn-gov-dlg-box h4 { color: #0f172a !important; }
#lic-host .trn-gov-kv b { color: #475569 !important; }
#lic-host .trn-gov-note { color: #475569 !important; }
#lic-host .trn-gov-err { color: #b91c1c !important; font-weight: 600; }
#lic-host [style*="color:#e2e8f0"] { color: #0f172a !important; }
#lic-host [style*="color:#94a3b8"], #lic-host [style*="color:#64748b"] { color: #475569 !important; }
#lic-host [style*="color:#fca5a5"] { color: #b91c1c !important; }
#lic-host table tr { background: #ffffff !important; }

/* ── LIC-MED-2A 2026-10-29 — #med-host (the Medicals dialog host the medicals view appends to <body>) takes exactly the #tq-host rules above, generated rule-for-rule; no other change ── */
#med-host table th { background: #eef2f7 !important; color: #334155 !important; border-bottom: 1px solid #d5dbe3 !important; }
#med-host table td { background: #ffffff !important; color: #0f172a !important; border-top: 1px solid #e5e9ef !important; border-bottom-color: #e5e9ef !important; }
#med-host input, #med-host select, #med-host textarea { background: #ffffff !important; color: #0f172a !important; border: 1px solid #94a3b8 !important; border-radius: 4px !important; }
#med-host input:focus, #med-host select:focus, #med-host textarea:focus { outline: 2px solid #2563eb !important; outline-offset: 0; border-color: #2563eb !important; }
#med-host input:disabled, #med-host select:disabled, #med-host textarea:disabled { background: #f1f5f9 !important; color: #64748b !important; border-color: #cbd5e1 !important; cursor: not-allowed; }
#med-host input::placeholder, #med-host textarea::placeholder { color: #64748b !important; }
#med-host .trn-gov-f { color: #334155 !important; font-weight: 600; }
#med-host input[type="checkbox"] { accent-color: #1d4ed8; }
#med-host .trn-bulk-btn { background: #1d4ed8 !important; color: #ffffff !important; border: 1px solid #1d4ed8 !important; }
#med-host .trn-bulk-btn:hover { background: #1e40af !important; }
#med-host .trn-bulk-btn.trn-bulk-btn-ghost { background: #ffffff !important; color: #1e3a8a !important; border: 1px solid #94a3b8 !important; }
#med-host .trn-bulk-btn.trn-bulk-btn-ghost:hover { background: #eff4ff !important; }
#med-host .trn-bulk-btn[style*="#b91c1c"], #med-host .trn-bulk-btn.trn-bulk-btn-ghost[style*="#b91c1c"] { background: #b91c1c !important; border-color: #991b1b !important; color: #ffffff !important; }
#med-host .trn-bulk-btn.trn-bulk-btn-ghost[style*="#b91c1c"]:hover, #med-host .trn-bulk-btn[style*="#b91c1c"]:hover { background: #991b1b !important; color: #ffffff !important; }
#med-host .trn-bulk-btn:disabled { background: #e2e8f0 !important; color: #64748b !important; border-color: #cbd5e1 !important; cursor: not-allowed; }
#med-host .trn-bulk-btn:focus-visible { outline: 2px solid #2563eb !important; outline-offset: 2px; }
#med-host .trn-gov-tag { border: 1px solid transparent; font-weight: 600; }
#med-host .trn-gov-tag.ok { background: #dcfce7 !important; color: #166534 !important; border-color: #86efac !important; }
#med-host .trn-gov-tag.due { background: #fef3c7 !important; color: #92400e !important; border-color: #fcd34d !important; }
#med-host .trn-gov-tag.bad { background: #fee2e2 !important; color: #991b1b !important; border-color: #fca5a5 !important; }
#med-host .trn-gov-tag.na { background: #f1f5f9 !important; color: #475569 !important; border-color: #cbd5e1 !important; }
#med-host .trn-gov-tag.rec { background: #e0e7ff !important; color: #3730a3 !important; border-color: #a5b4fc !important; }
#med-host .trn-gov-dlg { background: rgba(15,23,42,.55) !important; display: flex !important; align-items: center !important; justify-content: center !important; z-index: 9500 !important; }
#med-host .trn-gov-dlg-box { background: #ffffff !important; color: #0f172a !important; border: 1px solid #d5dbe3 !important; box-shadow: 0 18px 48px rgba(15,23,42,.28) !important; max-height: 88vh; overflow: auto; }
#med-host .trn-gov-dlg-box h4 { color: #0f172a !important; }
#med-host .trn-gov-kv b { color: #475569 !important; }
#med-host .trn-gov-note { color: #475569 !important; }
#med-host .trn-gov-err { color: #b91c1c !important; font-weight: 600; }
#med-host [style*="color:#e2e8f0"] { color: #0f172a !important; }
#med-host [style*="color:#94a3b8"], #med-host [style*="color:#64748b"] { color: #475569 !important; }
#med-host [style*="color:#fca5a5"] { color: #b91c1c !important; }
#med-host table tr { background: #ffffff !important; }
