/*
  App-wide dark mode for the Blair dashboard (owner 2026-10-15). public/js/theme.js sets
  html[data-theme="dark"] for a person who has the switch (Firestore ui_v2_config/active.pages.dark_mode)
  and chose dark (users/{uid}.ui_theme). Kit tabs flip through the Blair Kit tokens; this file darkens the
  OLD (not yet rebuilt) tabs by overriding the shell's base colors. Colors from the kit's dark tokens.
  Scoped to body.blair-shell so standalone pages (/rr, /tickets, /owner) are never touched.
*/
html[data-theme="dark"] body.blair-shell{background:#08182A;color:#C7D1DB;color-scheme:dark}
html[data-theme="dark"] .blair-shell :is(.bg-white,.card,.sf-card,.perm-card,#drilldown-panel){background-color:#0F2338!important}
html[data-theme="dark"] .blair-shell :is(.bg-slate-50,.bg-gray-50,.sf-card-header,.sf-card-footer,.perm-panel){background-color:#0C1F33!important}
html[data-theme="dark"] .blair-shell :is(.bg-slate-100,.bg-gray-100,.perm-badge){background-color:#132B44!important}
html[data-theme="dark"] .blair-shell :is(.bg-slate-200,.bg-gray-200){background-color:#1D3651!important}
html[data-theme="dark"] .blair-shell :is(.hover\:bg-slate-50:hover,.hover\:bg-slate-100:hover,.hover\:bg-gray-50:hover,.hover\:bg-blue-50:hover){background-color:#132B44!important}
/* text */
html[data-theme="dark"] .blair-shell :is(.text-slate-900,.text-slate-800,.text-gray-900,.text-gray-800,.text-black,.kpi-value,.sf-metric,.sf-card-title,#drilldown-title,.perm-card-title,h1,h2,h3,h4){color:#F1F4F8!important}
html[data-theme="dark"] .blair-shell :is(.text-slate-700,.text-slate-600,.text-gray-700,.text-gray-600,.perm-child-label){color:#C7D1DB!important}
html[data-theme="dark"] .blair-shell :is(.text-slate-500,.text-slate-400,.text-gray-500,.text-gray-400,.kpi-label,.sf-metric-label,.section-note){color:#8194A8!important}
html[data-theme="dark"] .blair-shell :is(.text-slate-300,.text-gray-300){color:#64768B!important}
/* borders */
html[data-theme="dark"] .blair-shell :is(.border,.border-b,.border-t,.border-l,.border-r,.border-slate-100,.border-slate-200,.border-slate-300,.border-gray-100,.border-gray-200,.border-gray-300,.divide-y>*,.sf-card,.sf-card-header,.sf-card-footer,.perm-card){border-color:#1D3651!important}
/* tables */
html[data-theme="dark"] .blair-shell :is(.data-table,.mini-table) th{background:#0C1F33!important;color:#8194A8!important;border-color:#1D3651!important}
html[data-theme="dark"] .blair-shell :is(.data-table,.mini-table) td{color:#C7D1DB!important;border-color:#1D3651!important}
html[data-theme="dark"] .blair-shell :is(.data-table tr:hover td,.mini-table tbody tr:hover td){background:#132B44!important}
html[data-theme="dark"] .blair-shell table:not(.bk-table) :is(th,td){border-color:#1D3651}
/* form controls */
html[data-theme="dark"] .blair-shell :is(input:not([type=checkbox]):not([type=radio]):not([type=range]),select,textarea,.filter-select){background-color:#132B44!important;color:#F1F4F8!important;border-color:#2C4A6A!important}
html[data-theme="dark"] .blair-shell ::placeholder{color:#64768B}
/* soft tinted badges and banners: keep the hue, drop the glare */
html[data-theme="dark"] .blair-shell :is(.bg-blue-50,.bg-blue-100,.bg-indigo-50,.bg-indigo-100,.rc-badge-in){background-color:rgba(66,132,255,.16)!important}
html[data-theme="dark"] .blair-shell :is(.bg-emerald-50,.bg-emerald-100,.bg-green-50,.bg-green-100,.bg-teal-100,.rc-badge-ok){background-color:rgba(20,184,166,.16)!important}
html[data-theme="dark"] .blair-shell :is(.bg-amber-50,.bg-amber-100,.bg-yellow-50,.bg-yellow-100,.bg-orange-50,.bg-orange-100,.rc-badge-out){background-color:rgba(240,101,0,.16)!important}
html[data-theme="dark"] .blair-shell :is(.bg-red-50,.bg-red-100,.bg-rose-50,.bg-rose-100,.rc-badge-miss){background-color:rgba(240,68,56,.16)!important}
html[data-theme="dark"] .blair-shell :is(.bg-purple-50,.bg-purple-100,.bg-violet-50,.bg-violet-100){background-color:rgba(144,56,255,.18)!important}
html[data-theme="dark"] .blair-shell :is(.text-blue-600,.text-blue-700,.text-blue-800,.text-indigo-700,.rc-badge-in){color:#A3C6FF!important}
html[data-theme="dark"] .blair-shell :is(.text-emerald-600,.text-emerald-700,.text-emerald-800,.text-green-600,.text-green-700,.text-green-800,.text-teal-700,.rc-badge-ok){color:#5EEAD4!important}
html[data-theme="dark"] .blair-shell :is(.text-amber-600,.text-amber-700,.text-amber-800,.text-orange-700,.text-yellow-800,.rc-badge-out){color:#FFA666!important}
html[data-theme="dark"] .blair-shell :is(.text-red-500,.text-red-600,.text-red-700,.text-red-800,.text-rose-700,.rc-badge-miss){color:#FDA29B!important}
html[data-theme="dark"] .blair-shell :is(.text-purple-700,.text-violet-700){color:#C89DFF!important}
html[data-theme="dark"] .blair-shell :is(.border-blue-100,.border-blue-200,.border-emerald-100,.border-emerald-200,.border-amber-200,.border-amber-300,.border-red-100,.border-red-200,.border-violet-100){border-color:#2C4A6A!important}
html[data-theme="dark"] .blair-shell .badge:not([class*="badge-"]){background:#132B44;color:#C7D1DB}
html[data-theme="dark"] .blair-shell #drilldown-header{border-color:#1D3651}
html[data-theme="dark"] .blair-shell .shadow-sm,.blair-shell .shadow{box-shadow:0 1px 2px rgba(0,0,0,.4)}
html[data-theme="dark"] .blair-shell .btn:not(.btn-primary):not([class*="btn-danger"]){background:#132B44;color:#F1F4F8;border-color:#2C4A6A}
html[data-theme="dark"] .blair-shell .btn:not(.btn-primary):hover{background:#1D3651}
/* the header theme switch */
#theme-toggle{display:none}
#theme-toggle.on{display:inline-flex}
/* second pass after the first real-tab check (LO Stats › Headless Calls) */
html[data-theme="dark"] .blair-shell :is(.bg-sky-50,.bg-sky-100,.bg-cyan-50,.bg-cyan-100){background-color:rgba(66,132,255,.16)!important}
html[data-theme="dark"] .blair-shell :is(.bg-teal-50,.bg-lime-50){background-color:rgba(20,184,166,.16)!important}
html[data-theme="dark"] .blair-shell :is(.text-blue-900,.text-sky-700,.text-sky-800,.text-sky-900,.text-indigo-900,.text-cyan-800){color:#A3C6FF!important}
html[data-theme="dark"] .blair-shell :is(.text-emerald-900,.text-green-900,.text-teal-800,.text-teal-900){color:#5EEAD4!important}
html[data-theme="dark"] .blair-shell :is(.text-amber-900,.text-orange-800,.text-orange-900,.text-yellow-900){color:#FFA666!important}
html[data-theme="dark"] .blair-shell :is(.text-red-900,.text-rose-800,.text-rose-900){color:#FDA29B!important}
html[data-theme="dark"] .blair-shell :is(.border-sky-100,.border-sky-200,.border-green-200,.border-emerald-300,.border-teal-200){border-color:#2C4A6A!important}
/* inline light backgrounds written straight into old tabs' markup (e.g. Marketing's zebra rows) */
html[data-theme="dark"] .blair-shell :is([style*="background:#fff"],[style*="background: #fff"],[style*="background:#f8fafc"],[style*="background: #f8fafc"],[style*="background:#f1f5f9"],[style*="background: #f1f5f9"],[style*="background:#fafafa"],[style*="background:white"],[style*="background-color:#fff"],[style*="background:#f9fafb"],[style*="background:#F8FAFC"],[style*="background:#FFF"]){background:#0F2338!important}
html[data-theme="dark"] .blair-shell :is([style*="color:#0B0B0B"],[style*="color:#0b0b0b"],[style*="color:#1e293b"],[style*="color:#0f172a"],[style*="color:#111"],[style*="color: #1e293b"],[style*="color:#16325c"]){color:#F1F4F8!important}
html[data-theme="dark"] .blair-shell :is([style*="color:#334155"],[style*="color:#475569"],[style*="color:#384656"]){color:#C7D1DB!important}
