/* ════════════════════════════════════════════════════════════════
   FALCON DIGI — DARK MODE LAYER  (css/dark-mode.css)
   Loaded LAST in <head>. Applies only when <html data-theme="dark">.
   Light mode is untouched. Everything is inside @media screen so
   printing / PDFs always stay light.
   ════════════════════════════════════════════════════════════════ */
@media screen {

/* ─────────── 1. PALETTE (one source of truth) ─────────── */
html[data-theme="dark"]{
  color-scheme: dark;                         /* native date pickers, selects, scrollbars go dark */
  --bg:#0b1220;
  --bg-secondary:#111a2b;
  --card:#131c2e;
  --card-bg:#131c2e;
  --surface-2:#1a2539;
  --surface-3:#212e45;
  --border:#243149;
  --border-strong:#33425e;
  --text:#e6ebf3;
  --text-mid:#c2cad8;
  --text-muted:#94a0b6;
  --text-faint:#6f7c94;
  --primary-glow:rgba(129,140,248,.14);
  --primary-text:#a5b4fc;                     /* primary used AS TEXT on dark */
  --red:#f26a6e;
  --emerald:#34d399;
  --amber:#f5b335;
  --cyan:#22d3ee;
  --amber-light:rgba(245,179,53,.14);
  --red-light:rgba(242,106,110,.14);
  --emerald-light:rgba(52,211,153,.14);
  --shadow-sm:0 1px 2px rgba(0,0,0,.45);
  --shadow:0 6px 18px rgba(0,0,0,.45);
  --shadow-md:0 6px 18px rgba(0,0,0,.45);
  --shadow-lg:0 18px 48px rgba(0,0,0,.55);
  background:var(--bg);
}
html[data-theme="dark"] body{background:var(--bg);color:var(--text)}

/* ─────────── 2. TEXT, LINKS, SELECTION, SCROLLBARS ─────────── */
html[data-theme="dark"] ::selection{background:rgba(129,140,248,.35);color:#fff}
html[data-theme="dark"] :is(h1,h2,h3,h4,h5,h6,.page-title,.table-title,.form-section-title,.card-title,.dw-title,.dash-card-title,.fx-card-title,.stg-page-title,.stg-card-head,.tpl-section-title,.fsec-title,.modal-title,.modal-head-title,.cfm-title,.qsp-title,.notif-panel-title,.profile-dd-name){color:var(--text)}
html[data-theme="dark"] :is(.page-subtitle,.form-label,.stg-page-sub,.stg-option-sub,.stg-toggle-sub,.cfm-hint,.cfm-note,.qsp-sub,.profile-dd-email,.pag-info){color:var(--text-muted)}
html[data-theme="dark"] :is(.fx-link,.fx-a,.dw-viewall,.nt-foot-link,a:not(.btn):not([class*="nav"])){color:var(--primary-text)}
html[data-theme="dark"] kbd,html[data-theme="dark"] code{background:var(--surface-2)!important;border-color:var(--border-strong)!important;color:var(--text)!important}
html[data-theme="dark"] hr{border-color:var(--border)}
html[data-theme="dark"] *{scrollbar-color:#33425e transparent}
html[data-theme="dark"] ::-webkit-scrollbar{width:10px;height:10px}
html[data-theme="dark"] ::-webkit-scrollbar-track{background:transparent}
html[data-theme="dark"] ::-webkit-scrollbar-thumb{background:#2b3852;border-radius:10px;border:2px solid var(--bg)}
html[data-theme="dark"] ::-webkit-scrollbar-thumb:hover{background:#3b4b6b}

/* ─────────── 3. APP SHELL: navbar, sidebar, main ─────────── */
html[data-theme="dark"] .navbar{background:rgba(15,22,37,.92);border-color:var(--border);box-shadow:0 1px 0 var(--border);-webkit-backdrop-filter:saturate(1.3) blur(10px);backdrop-filter:saturate(1.3) blur(10px)}
html[data-theme="dark"] .logo-text{color:var(--text)}
html[data-theme="dark"] .nav-search{background:var(--surface-2);border-color:var(--border)}
html[data-theme="dark"] .nav-search input{color:var(--text);background:transparent}
html[data-theme="dark"] .nav-notif-btn{background:var(--surface-2);border-color:var(--border);color:var(--text-mid)}
html[data-theme="dark"] #dash-health-badge{background:var(--surface-2);border-color:var(--border)!important;color:var(--text-mid)}
html[data-theme="dark"] .sidebar{background:#0f1726;border-color:var(--border)}
html[data-theme="dark"] .sidebar-label{color:var(--text-faint)}
html[data-theme="dark"] .nav-item{color:var(--text-muted)}
html[data-theme="dark"] .nav-item .icon,html[data-theme="dark"] .nav-item svg{color:inherit}
html[data-theme="dark"] .nav-item:hover{background:var(--surface-2);color:var(--text)}
html[data-theme="dark"] .nav-item.active{background:rgba(129,140,248,.16);color:#c7d2fe}
html[data-theme="dark"] .sidebar-quick-add{background:var(--surface-3);color:var(--text-mid);border-color:var(--border-strong)}
html[data-theme="dark"] .sidebar-footer,html[data-theme="dark"] .collapse-btn{border-color:var(--border);color:var(--text-muted)}
html[data-theme="dark"] .main{background:var(--bg)}

/* ─────────── 4. SURFACES: cards, panels, dropdowns ─────────── */
html[data-theme="dark"] :is(.card,.table-card,.dw-card,.dash-kpi-card,.dash-card,.bkpi,.inv-kpi,.sales-kpi,.fx-card,.fx-k,.fx-kpi,.stg-card,.tpl-section,.fsec,.cfm-card,.tpl-card,.settings-grid>.card){background:var(--card);border-color:var(--border);color:var(--text);box-shadow:var(--shadow-sm)}
html[data-theme="dark"] :is(.dkpi-label,.dkpi-value,.bkpi-val,.sales-kpi-val,.inv-kpi-val,.recv-bucket-val){color:var(--text)}
html[data-theme="dark"] :is(.dkpi-sub,.bkpi-lbl,.bkpi-sub,.inv-kpi-lbl,.sales-chart-note,.recv-bucket-lbl){color:var(--text-muted)}
html[data-theme="dark"] :is(.notif-panel,.profile-dropdown,.csel-menu,.dropdown-menu,#cp-cust-dropdown){background:var(--card);border-color:var(--border-strong);color:var(--text);box-shadow:var(--shadow-lg)}
html[data-theme="dark"] :is(.notif-panel-hdr,.profile-dd-hdr){border-color:var(--border);background:transparent}
html[data-theme="dark"] .profile-dd-item{color:var(--text-mid)}
html[data-theme="dark"] .profile-dd-item:hover,html[data-theme="dark"] .csel-opt:hover{background:var(--surface-2);color:var(--text)}
html[data-theme="dark"] .profile-dd-item.danger{color:var(--red)}
html[data-theme="dark"] .profile-dd-sep{background:var(--border)}
html[data-theme="dark"] .csel-opt{color:var(--text-mid)}
html[data-theme="dark"] .csel-opt.selected{background:rgba(129,140,248,.14);color:#c7d2fe}
html[data-theme="dark"] .csel-section-label{color:var(--text-faint)}
html[data-theme="dark"] .csel-btn{background:var(--surface-2);border-color:var(--border);color:var(--text)}
/* inline-styled pop-ups in index.html */
html[data-theme="dark"] :is(#dash-dr-popup,#rev-dr-popup,#cust-daterange-panel,#stmt-cust-menu,#rpt-cust-menu,#cust-drop-menu,#dom-cust-menu,#host-cust-menu,#svc-cust-menu,#bemail-cust-menu,#exp-cust-menu){background:var(--card)!important;border-color:var(--border-strong)!important;box-shadow:var(--shadow-lg)!important}
html[data-theme="dark"] :is(#stmt-cust-list,#rpt-cust-list,#cust-drop-list,#dom-cust-list,#host-cust-list,#svc-cust-list,#bemail-cust-list,#exp-cust-list,#cp-cust-dropdown)>*{color:var(--text)}
html[data-theme="dark"] :is(#stmt-cust-list,#rpt-cust-list,#cust-drop-list,#dom-cust-list,#host-cust-list,#svc-cust-list,#bemail-cust-list,#exp-cust-list,#cp-cust-dropdown)>*:hover{background:var(--surface-2)!important}

/* ─────────── 5. FORM CONTROLS (all forms in the portal) ─────────── */
html[data-theme="dark"] :is(.form-input,.form-control,.nfl-input,.select-filter,.filter-sel,.pag-size,.nt-select,.nt-tags,.nrm-time-input,.nrm-repeat-sel,.tinp-sm,.tsel-sm,.fxb-amt,.fxb-row select,.fxb-inl input,.fx-nav input,input[type="text"],input[type="email"],input[type="tel"],input[type="number"],input[type="date"],input[type="time"],input[type="datetime-local"],input[type="search"],input[type="url"],input[type="password"],select,textarea):not(.nfl-label){background-color:var(--surface-2);border-color:var(--border);color:var(--text)}
html[data-theme="dark"] :is(input,select,textarea):hover:not(:disabled):not([readonly]){border-color:var(--border-strong)}
html[data-theme="dark"] :is(input,select,textarea):focus{border-color:#818cf8;outline:none;box-shadow:0 0 0 3px rgba(129,140,248,.22)}
html[data-theme="dark"] :is(input,textarea)::placeholder{color:var(--text-faint);opacity:1}
html[data-theme="dark"] :is(input,select,textarea):disabled,html[data-theme="dark"] :is(input,textarea)[readonly]{background-color:#0f1828!important;color:var(--text-muted);border-color:var(--border)}
html[data-theme="dark"] option,html[data-theme="dark"] optgroup{background:#172136;color:var(--text)}
html[data-theme="dark"] optgroup{color:var(--text-faint)}
/* Chrome autofill paints fields white/yellow — keep them dark */
html[data-theme="dark"] input:-webkit-autofill,html[data-theme="dark"] input:-webkit-autofill:hover,html[data-theme="dark"] input:-webkit-autofill:focus,html[data-theme="dark"] textarea:-webkit-autofill,html[data-theme="dark"] select:-webkit-autofill{-webkit-text-fill-color:var(--text)!important;-webkit-box-shadow:0 0 0 1000px var(--surface-2) inset!important;caret-color:var(--text);transition:background-color 9999s}
/* calendar / clock icons visible */
html[data-theme="dark"] ::-webkit-calendar-picker-indicator{filter:invert(.8);opacity:.75;cursor:pointer}
html[data-theme="dark"] input[type="checkbox"],html[data-theme="dark"] input[type="radio"]{accent-color:#818cf8}
html[data-theme="dark"] .search-box{background:var(--surface-2);border-color:var(--border)}
html[data-theme="dark"] .search-box input{background:transparent!important;border:none;color:var(--text)}
html[data-theme="dark"] .nfl-label:not(.cfl .nfl-label){color:var(--text-muted)}
html[data-theme="dark"] :is(.nfl-icon,.nfl-input-wrap>i,.nfl-input-wrap>svg){color:var(--text-faint)}
html[data-theme="dark"] .nfl-phone-wrap{background:var(--surface-2);border-color:var(--border)}
html[data-theme="dark"] .nfl-phone-prefix{background:var(--surface-3);border-color:var(--border);color:var(--text-mid)}
html[data-theme="dark"] .nfl-req,html[data-theme="dark"] .req{color:#f87171!important}

/* custom "Select customer" triggers (inline styles in index.html) */
html[data-theme="dark"] :is(#stmt-cust-trigger,#rpt-cust-trigger,#cust-drop-trigger,#exp-cust-trigger,#f-salesperson-sel){background:var(--surface-2)!important;border-color:var(--border)!important;color:var(--text-muted)!important;box-shadow:none!important}
html[data-theme="dark"] #f-salesperson-sel{color:var(--text)!important}
html[data-theme="dark"] :is(#stmt-cust-search,#rpt-cust-search,#cust-drop-search,#dom-cust-search,#host-cust-search,#svc-cust-search,#bemail-cust-search,#exp-cust-search){background:var(--bg)!important;border-color:var(--border)!important;color:var(--text)!important}
/* label text that was hard-coded slate on the trigger once a value is chosen */
html[data-theme="dark"] :is(#cust-drop-label,#stmt-cust-label,#rpt-cust-label,#exp-cust-label){color:inherit}
html[data-theme="dark"] :is(#cust-drop-trigger,#stmt-cust-trigger,#rpt-cust-trigger,#exp-cust-trigger) [style*="color"]{color:var(--text)!important}

/* ─────────── 6. REDESIGNED MODAL FORMS (.cfm floating-label cards) ─────────── */
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfm{box-shadow:0 28px 70px -12px rgba(0,0,0,.75),0 0 0 1px var(--border)!important}
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfm-body{background:var(--bg)!important}
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfm-card{background:var(--card);border-color:var(--border);box-shadow:none}
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfm-ico{background:rgba(129,140,248,.16);color:#a5b4fc}
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfl .nfl-input{background:var(--surface-2)!important;border-color:var(--border)!important;color:var(--text)!important;box-shadow:none!important}
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfl .nfl-input:hover{border-color:var(--border-strong)!important}
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfl .nfl-input:focus{border-color:#818cf8!important;box-shadow:0 0 0 4px rgba(129,140,248,.2)!important}
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfl .nfl-label{color:var(--text-muted)!important}
/* label sitting on the border: needs the FIELD colour behind it, not white */
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfl .nfl-input:focus ~ .nfl-label,
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfl .nfl-input:not(:placeholder-shown) ~ .nfl-label,
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfl.cfl-fix .nfl-label,
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfl.cfl-sel .nfl-label,
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfl .nfl-input:-webkit-autofill ~ .nfl-label{background:linear-gradient(to bottom,var(--card) 50%,var(--surface-2) 50%)!important;color:var(--text-mid)!important}
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfl .nfl-input:focus ~ .nfl-label{color:#a5b4fc!important}
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfl .nfl-icon{color:var(--text-faint)!important}
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfl .nfl-input-wrap:focus-within .nfl-icon{color:#a5b4fc!important}
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfl.cfl-phone .nfl-phone-prefix{background:rgba(129,140,248,.18)!important;color:#c7d2fe!important}
html[data-theme="dark"] :is(#modal-customer,#modal-crm-lead,#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfm .cmodal-footer{background:var(--card)!important;border-color:var(--border)!important}
/* custom customer pickers + read-only auto dates inside these modals */
html[data-theme="dark"] :is(#dom-cust-trigger,#host-cust-trigger,#svc-cust-trigger,#bemail-cust-trigger){background:var(--surface-2)!important;border-color:var(--border)!important;color:var(--text-muted)!important}
html[data-theme="dark"] :is(#dom-cust-trigger,#host-cust-trigger,#svc-cust-trigger,#bemail-cust-trigger) span{color:inherit}
html[data-theme="dark"] :is(#dom-cust-trigger,#host-cust-trigger,#svc-cust-trigger,#bemail-cust-trigger)[style*="color: rgb(15"] span,
html[data-theme="dark"] :is(#dom-cust-label,#host-cust-label,#svc-cust-label,#bemail-cust-label)[style*="color"]{color:var(--text)!important}
html[data-theme="dark"] :is(#modal-domain,#modal-hosting,#modal-bemail,#modal-service) :is(input[readonly],#f-de,#f-hrenewal,#f-berenewal,#f-sr){background:#0f1828!important;color:var(--text-mid)!important;opacity:1!important}
html[data-theme="dark"] :is(#modal-domain,#modal-hosting,#modal-bemail,#modal-service) .cfl input[readonly] ~ .nfl-label{background:linear-gradient(to bottom,var(--card) 50%,#0f1828 50%)!important}

/* ─────────── 7. MODALS, DRAWERS, OVERLAYS ─────────── */
html[data-theme="dark"] :is(.modal-overlay,.modal-backdrop,.drawer-bg){background:rgba(2,6,15,.72)}
html[data-theme="dark"] :is(.modal,.drawer,.nrm-box){background:var(--card);border-color:var(--border);color:var(--text);box-shadow:0 28px 70px -12px rgba(0,0,0,.75),0 0 0 1px var(--border)}
html[data-theme="dark"] :is(.modal-head,.modal-title,.drawer-head,.nrm-header){border-color:var(--border);color:var(--text);background:transparent}
html[data-theme="dark"] :is(.modal-footer,.cmodal-footer,.drawer-foot,.nrm-footer){background:var(--card);border-color:var(--border)}
html[data-theme="dark"] .drawer-body,html[data-theme="dark"] .modal-body,html[data-theme="dark"] .cmodal-body{background:transparent;color:var(--text)}
html[data-theme="dark"] .cmodal-section-label{color:var(--text-muted);border-color:var(--border)}
html[data-theme="dark"] .modal-close{color:var(--text-muted)}
html[data-theme="dark"] .modal-close:hover{color:var(--text);background:var(--surface-2)}
html[data-theme="dark"] .cmodal-header .modal-close{color:rgba(255,255,255,.85)}
/* delete-confirm uses a var that was never defined */
html[data-theme="dark"] #modal-delete-confirm .cmodal-body>div:first-child{background:var(--surface-2)!important}
html[data-theme="dark"] #modal-delete-confirm .cmodal-body>div:first-child>div:first-child{background:rgba(242,106,110,.16)!important}
/* Create-portal / portal-manager modals are fully inline-styled */
html[data-theme="dark"] .pm-tab{color:var(--text-muted)!important}
html[data-theme="dark"] .pm-tab.active{color:#c7d2fe!important;border-bottom-color:#818cf8!important}

/* ─────────── 8. TABLES & LISTS ─────────── */
html[data-theme="dark"] :is(.main,.modal,.drawer) table{color:var(--text)}
html[data-theme="dark"] :is(.main,.modal,.drawer) thead th,html[data-theme="dark"] :is(.table-header,.inv-tbl-hdr,.item-col-hdr,.fx-cl-head,.stg-tax-hdr,.fxb-head){background:var(--surface-2);color:var(--text-muted);border-color:var(--border)}
html[data-theme="dark"] .fx-main thead th{background:var(--card)}
html[data-theme="dark"] :is(.main,.modal,.drawer) td{border-color:var(--border)}
html[data-theme="dark"] :is(.main,.modal,.drawer) tbody tr:hover>td{background:rgba(148,163,184,.06)}
html[data-theme="dark"] .table-header{background:transparent}
html[data-theme="dark"] .fx-table tfoot td,html[data-theme="dark"] .fx-table tr.fx-tot td,html[data-theme="dark"] .fx-budtable tr.fx-grp td{background:var(--surface-2)}
html[data-theme="dark"] :is(.inv-list-scroll,.inv-list-col,.inv-detail-col,.inv-detail-wrap,.inv-container){background:var(--card);border-color:var(--border)}
html[data-theme="dark"] .inv-tab-heading{background:var(--card);border-color:var(--border)}
html[data-theme="dark"] .inv-detail-header{background:var(--card);border-color:var(--border)}
html[data-theme="dark"] .inv-detail-body{background:var(--bg)}
html[data-theme="dark"] .inv-doc-frame{background:#fff;border-radius:8px;box-shadow:0 0 0 1px var(--border),0 10px 30px rgba(0,0,0,.45)}
html[data-theme="dark"] .inv-pays-bar{background:var(--card);border-color:var(--border);color:var(--text)}
html[data-theme="dark"] .inv-bulk-bar{background:var(--surface-2);border-color:var(--border);color:var(--text)}
html[data-theme="dark"] [class*="inv-row"]:not(.inv-row-cb),html[data-theme="dark"] .inv-card{border-color:var(--border);color:var(--text)}
html[data-theme="dark"] [class*="inv-row"]:not(.inv-row-cb):hover,html[data-theme="dark"] .inv-card:hover{background:rgba(148,163,184,.06)}
html[data-theme="dark"] :is(.inv-row,.inv-card).active,html[data-theme="dark"] :is(.inv-row,.inv-card).selected{background:rgba(129,140,248,.12)}
html[data-theme="dark"] .pag-footer{background:var(--card)!important;border-color:var(--border)!important}
html[data-theme="dark"] .empty-state,html[data-theme="dark"] .inv-card-empty{color:var(--text-muted)}
html[data-theme="dark"] .empty-state h3{color:var(--text)}

/* ─────────── 9. BUTTONS, TABS, PAGINATION, SWITCHES ─────────── */
html[data-theme="dark"] :is(.btn-outline,.btn-ghost){background:transparent;border-color:var(--border-strong);color:var(--text-mid)}
html[data-theme="dark"] :is(.btn-outline,.btn-ghost):hover{background:var(--surface-2);color:var(--text);border-color:#46577a}
html[data-theme="dark"] .btn-primary{box-shadow:0 4px 14px rgba(99,102,241,.28)}
html[data-theme="dark"] .btn-danger{background:#dc2f36;border-color:#dc2f36;color:#fff}
html[data-theme="dark"] .tabs,html[data-theme="dark"] #billing-tabs{background:var(--bg)!important;border-color:var(--border)}
html[data-theme="dark"] .tab{color:var(--text-muted)}
html[data-theme="dark"] .tab:hover{color:var(--text)}
html[data-theme="dark"] .tab.active{color:#c7d2fe;border-color:#818cf8}
html[data-theme="dark"] :is(.pag-btn,.pag-num,.pag-btns button){background:var(--surface-2);border-color:var(--border);color:var(--text-mid)}
html[data-theme="dark"] :is(.pag-btn,.pag-btns button):hover:not(:disabled){background:var(--surface-3);color:var(--text)}
html[data-theme="dark"] :is(.pag-btn,.pag-btns button):disabled{opacity:.4}
html[data-theme="dark"] :is(.pag-btn.active,.pag-btns button.active,.pag-num.active){background:#6366f1;border-color:#6366f1;color:#fff}
html[data-theme="dark"] .pagination-bar{border-color:var(--border);background:transparent}
html[data-theme="dark"] .sw-track{background:#2a3650}
html[data-theme="dark"] .sw-track .sw-thumb{background:#e6ebf3}
html[data-theme="dark"] .sw-track.on{background:#6366f1}
html[data-theme="dark"] .stg-toggle-slider{background:#2a3650}
html[data-theme="dark"] :is(.fs-btn,.wl-btn,.tpl-type-btn,.dash-qf-btn,.rev-qf-btn,.fx-chipbtn,.nrm-quick-btn,.nt-btn,.nt-icon-btn){background:var(--surface-2)!important;border-color:var(--border)!important;color:var(--text-mid)!important}
html[data-theme="dark"] :is(.fs-btn,.wl-btn,.tpl-type-btn,.dash-qf-btn,.rev-qf-btn,.nrm-quick-btn,.nt-btn,.nt-icon-btn):hover{background:var(--surface-3)!important;color:var(--text)!important}
html[data-theme="dark"] :is(.fs-btn.active,.wl-btn.active,.tpl-type-btn.active,.dash-qf-btn.active,.rev-qf-btn.active,.nrm-quick-btn.active,.nrm-quick-btn.selected){background:rgba(129,140,248,.18)!important;border-color:#818cf8!important;color:#c7d2fe!important}
html[data-theme="dark"] .fx-chipbtn.on{background:rgba(242,106,110,.14)!important;border-color:var(--red)!important;color:#fca5a5!important}
html[data-theme="dark"] .qs-launcher{background:var(--surface-2);border-color:var(--border)}
html[data-theme="dark"] .qsp{background:rgba(19,28,46,.94)}

/* ─────────── 10. DASHBOARD ─────────── */
html[data-theme="dark"] .dkpi-bar{opacity:.85}
html[data-theme="dark"] .dkpi-glow{opacity:.35}
html[data-theme="dark"] .dw-head{border-color:var(--border)}
html[data-theme="dark"] .dw-body>*{border-color:var(--border)}
html[data-theme="dark"] .dw-playbtn{background:var(--surface-2)!important;border-color:var(--border)!important;color:var(--text-muted)!important}
html[data-theme="dark"] #dash-dr-field,html[data-theme="dark"] #rev-dr-field{background:var(--surface-2)!important;border-color:var(--border)!important;color:var(--text-mid)!important}
html[data-theme="dark"] #dash-pl-kpi>*,html[data-theme="dark"] #rev-kpi-row>*{background:var(--surface-2)!important;border-color:var(--border)!important}
html[data-theme="dark"] #renewal-count-pill{background:rgba(245,179,53,.16)!important;color:#fcd34d!important}
html[data-theme="dark"] #dash-renewal-filter{background:var(--surface-2)!important;color:var(--text)!important;border-color:var(--border)!important}
html[data-theme="dark"] .recv-bar-track{background:var(--surface-3)}

/* ─────────── 11. BILLING ─────────── */
html[data-theme="dark"] :is(.totals-box,.pay-summary,.cn-linked,.rec-summary,.fxb-sum,.fxb-help,.fx-bs>div,.fxb-row,.fxb-switch,.fxb-un){background:var(--surface-2);border-color:var(--border);color:var(--text)}
html[data-theme="dark"] .trow{border-color:var(--border);color:var(--text-mid)}
html[data-theme="dark"] .trow.final{color:var(--text);border-color:var(--border-strong)}
html[data-theme="dark"] :is(.attach-zone,.drop-zone){background:var(--surface-2);border-color:var(--border-strong);color:var(--text-muted)}
html[data-theme="dark"] :is(.attach-zone,.drop-zone).drag-over,html[data-theme="dark"] .drop-zone.dragover{border-color:#818cf8;background:rgba(129,140,248,.1)}
html[data-theme="dark"] .add-item-btn{background:transparent;border-color:var(--border-strong);color:var(--primary-text)}
html[data-theme="dark"] .add-item-btn:hover{background:rgba(129,140,248,.1)}
html[data-theme="dark"] .items-drag-wrap>*{border-color:var(--border)}
html[data-theme="dark"] .fsec-step{background:rgba(129,140,248,.18);color:#c7d2fe}
html[data-theme="dark"] .stg-sub-head{color:var(--text-muted);border-color:var(--border)}
html[data-theme="dark"] :is(.stg-option-row,.stg-radio-row,.stg-toggle-row){border-color:var(--border)}
html[data-theme="dark"] .stg-option-label,html[data-theme="dark"] .stg-toggle-label{color:var(--text)}
html[data-theme="dark"] .stg-checkmark{background:var(--surface-2);border-color:var(--border-strong)}
html[data-theme="dark"] .tpl-preview-frame{background:var(--surface-2);border-color:var(--border)}
html[data-theme="dark"] .tpl-preview-label{color:var(--text-muted)}
html[data-theme="dark"] .tpl-chk{color:var(--text-mid)}
html[data-theme="dark"] #billing-api-error{background:rgba(242,106,110,.12)!important;color:#fca5a5!important;border-color:rgba(242,106,110,.4)!important}
html[data-theme="dark"] #drawer-type-badge{box-shadow:0 4px 14px rgba(0,0,0,.4)!important}
html[data-theme="dark"] .bill-tab-search input{background:var(--surface-2);border-color:var(--border);color:var(--text)}
html[data-theme="dark"] .bill-tab-search-x:hover{background:var(--surface-3);color:var(--text)}
/* status badges coming from billing.css with pale backgrounds */
html[data-theme="dark"] :is(.badge,.status-badge,.inv-badge,[class*="badge-"]):not(.notif-badge):not(.dkpi-badge){border-color:transparent}

/* ─────────── 12. EXPENSES ─────────── */
html[data-theme="dark"] .fx-tabs,html[data-theme="dark"] .fx-seg,html[data-theme="dark"] .fx-nav{background:var(--surface-2);border-color:var(--border)}
html[data-theme="dark"] .fx-seg button.on{background:var(--card);color:#c7d2fe}
html[data-theme="dark"] .fx-nav button{color:var(--text-mid)}
html[data-theme="dark"] .fx-nav button:hover{background:var(--surface-3)}
html[data-theme="dark"] .fx-nav-label{color:var(--text)}
html[data-theme="dark"] .fx-bar,html[data-theme="dark"] .fx-bar.sm{background:var(--surface-3);border-color:var(--border)}
html[data-theme="dark"] .fx-cl-detail,html[data-theme="dark"] .fx-hdetail>td{background:var(--bg)!important}
html[data-theme="dark"] .fx-cl.loss .fx-cl-row{background:rgba(242,106,110,.07)}
html[data-theme="dark"] .fx-kind{background:var(--surface-3);color:var(--text-mid)}
html[data-theme="dark"] .fx-kind.initial{background:rgba(129,140,248,.16);color:#c7d2fe}
html[data-theme="dark"] .fx-due{background:var(--surface-3);color:var(--text-muted)}
html[data-theme="dark"] .fx-warn{background:rgba(245,179,53,.12);color:#fcd34d}
html[data-theme="dark"] #exp-toggle-wrap>div{background:var(--surface-2)!important;border-color:var(--border)!important}
html[data-theme="dark"] #f-exp-invoice-wrap,html[data-theme="dark"] #f-exp-ren-invoice-wrap{background:var(--surface-2)!important;border-color:var(--border-strong)!important}

/* ─────────── 13. NOTES ─────────── */
html[data-theme="dark"] :is(.nt-root,.nt-main,.nt-editor,.nt-scroll){background:var(--bg)}
html[data-theme="dark"] .nt-side{background:var(--card);border-color:var(--border)}
html[data-theme="dark"] :is(.nt-ed-top,.nt-fmt,.nt-foot){background:var(--card);border-color:var(--border)}
html[data-theme="dark"] .nt-doc{color:var(--text)}
html[data-theme="dark"] .nt-title-input{background:transparent!important;border:none;color:var(--text)}
html[data-theme="dark"] .nt-search{background:var(--surface-2);border-color:var(--border)}
html[data-theme="dark"] .nt-search input{background:transparent!important;border:none;color:var(--text)}
html[data-theme="dark"] .nf-btn{color:var(--text-mid)}
html[data-theme="dark"] .nf-btn:hover{background:var(--surface-2);color:var(--text)}
html[data-theme="dark"] .nf-sep{background:var(--border)}
html[data-theme="dark"] #editor-rich-content{color:var(--text)}
html[data-theme="dark"] #editor-rich-content:empty::before{color:var(--text-faint)}
html[data-theme="dark"] #editor-rich-content :is(table,td,th){border-color:var(--border-strong)}
html[data-theme="dark"] #editor-rich-content blockquote{border-color:#818cf8;color:var(--text-mid);background:rgba(129,140,248,.06)}
html[data-theme="dark"] #editor-rich-content :not(pre)>code{background:var(--surface-2)}
html[data-theme="dark"] .nc-color-dot[data-color="default"]{background:var(--surface-3)!important;border:1px solid var(--border-strong)}
html[data-theme="dark"] .nc-checklist-item{border-color:var(--border)}
html[data-theme="dark"] .nc-checklist-item :is(input[type="text"],[contenteditable]){background:transparent!important;color:var(--text)}
html[data-theme="dark"] .nt-hint{color:var(--text-faint)}

/* ─────────── 14. MISC ─────────── */
html[data-theme="dark"] .toast{background:#1b2740;border-color:var(--border-strong);color:var(--text);box-shadow:var(--shadow-lg)}
html[data-theme="dark"] #page-load-overlay{background:var(--bg)}
html[data-theme="dark"] .plo-text{color:var(--text-muted)}
html[data-theme="dark"] .settings-nav-item{color:var(--text-mid)}
html[data-theme="dark"] .settings-nav-item:hover{background:var(--surface-2);color:var(--text)}
html[data-theme="dark"] .settings-nav-item.active{background:rgba(129,140,248,.14);color:#c7d2fe}
html[data-theme="dark"] .nrm-cal-grid>*{color:var(--text-mid)}
html[data-theme="dark"] .nrm-cal-grid>*:hover{background:var(--surface-2)}
html[data-theme="dark"] .nrm-btn-cancel,html[data-theme="dark"] .nrm-btn-clear{background:var(--surface-2);border-color:var(--border);color:var(--text-mid)}

/* ─────────── 15. PAPER STAYS PAPER ───────────
   Anything rendered into the PDF/print area keeps the light theme. */
html[data-theme="dark"] :is(#print-area,.html2pdf__container,.no-dark){
  color-scheme:light;
  --bg:#f8fafc;--card:#fff;--card-bg:#fff;--surface-2:#f1f5f9;--border:#e2e8f0;--border-strong:#cbd5e1;
  --text:#0f172a;--text-mid:#334155;--text-muted:#64748b;--text-faint:#94a3b8;
  background:#fff;color:#0f172a;
}

} /* end @media screen */

/* ════ 16. CATCH-ALL for colours hard-coded in inline styles (JS-rendered HTML too) ════
   Matches both the literal style text and the form the browser writes when JS sets el.style. */
@media screen{
html[data-theme="dark"] :is([style*="background:#fff" i],[style*="background: #fff" i],[style*="background-color:#fff" i],[style*="background-color: #fff" i],[style*="background: rgb(255, 255, 255)" i],[style*="background-color: rgb(255, 255, 255)" i],[style*="background:#ffffff" i],[style*="background: #ffffff" i],[style*="background-color:#ffffff" i],[style*="background-color: #ffffff" i],[style*="background: rgb(255, 255, 255)" i],[style*="background-color: rgb(255, 255, 255)" i],[style*="background:white" i],[style*="background: white" i],[style*="background-color:white" i],[style*="background-color: white" i],[style*="background: rgb(255, 255, 255)" i],[style*="background-color: rgb(255, 255, 255)" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){background:var(--card)!important}
html[data-theme="dark"] :is([style*="background:#f8fafc" i],[style*="background: #f8fafc" i],[style*="background-color:#f8fafc" i],[style*="background-color: #f8fafc" i],[style*="background: rgb(248, 250, 252)" i],[style*="background-color: rgb(248, 250, 252)" i],[style*="background:#f9fafb" i],[style*="background: #f9fafb" i],[style*="background-color:#f9fafb" i],[style*="background-color: #f9fafb" i],[style*="background: rgb(249, 250, 251)" i],[style*="background-color: rgb(249, 250, 251)" i],[style*="background:#f1f5f9" i],[style*="background: #f1f5f9" i],[style*="background-color:#f1f5f9" i],[style*="background-color: #f1f5f9" i],[style*="background: rgb(241, 245, 249)" i],[style*="background-color: rgb(241, 245, 249)" i],[style*="background:#f3f4f6" i],[style*="background: #f3f4f6" i],[style*="background-color:#f3f4f6" i],[style*="background-color: #f3f4f6" i],[style*="background: rgb(243, 244, 246)" i],[style*="background-color: rgb(243, 244, 246)" i],[style*="background:#f6f8fc" i],[style*="background: #f6f8fc" i],[style*="background-color:#f6f8fc" i],[style*="background-color: #f6f8fc" i],[style*="background: rgb(246, 248, 252)" i],[style*="background-color: rgb(246, 248, 252)" i],[style*="background:#f4f6fb" i],[style*="background: #f4f6fb" i],[style*="background-color:#f4f6fb" i],[style*="background-color: #f4f6fb" i],[style*="background: rgb(244, 246, 251)" i],[style*="background-color: rgb(244, 246, 251)" i],[style*="background:#fafafa" i],[style*="background: #fafafa" i],[style*="background-color:#fafafa" i],[style*="background-color: #fafafa" i],[style*="background: rgb(250, 250, 250)" i],[style*="background-color: rgb(250, 250, 250)" i],[style*="background:#f5f5f5" i],[style*="background: #f5f5f5" i],[style*="background-color:#f5f5f5" i],[style*="background-color: #f5f5f5" i],[style*="background: rgb(245, 245, 245)" i],[style*="background-color: rgb(245, 245, 245)" i],[style*="background:#f8f9fa" i],[style*="background: #f8f9fa" i],[style*="background-color:#f8f9fa" i],[style*="background-color: #f8f9fa" i],[style*="background: rgb(248, 249, 250)" i],[style*="background-color: rgb(248, 249, 250)" i],[style*="background:#eef2f7" i],[style*="background: #eef2f7" i],[style*="background-color:#eef2f7" i],[style*="background-color: #eef2f7" i],[style*="background: rgb(238, 242, 247)" i],[style*="background-color: rgb(238, 242, 247)" i],[style*="background:#f0f2f5" i],[style*="background: #f0f2f5" i],[style*="background-color:#f0f2f5" i],[style*="background-color: #f0f2f5" i],[style*="background: rgb(240, 242, 245)" i],[style*="background-color: rgb(240, 242, 245)" i],[style*="background:#e2e8f0" i],[style*="background: #e2e8f0" i],[style*="background-color:#e2e8f0" i],[style*="background-color: #e2e8f0" i],[style*="background: rgb(226, 232, 240)" i],[style*="background-color: rgb(226, 232, 240)" i],[style*="background:#e5e7eb" i],[style*="background: #e5e7eb" i],[style*="background-color:#e5e7eb" i],[style*="background-color: #e5e7eb" i],[style*="background: rgb(229, 231, 235)" i],[style*="background-color: rgb(229, 231, 235)" i],[style*="background:#eef2ff" i],[style*="background: #eef2ff" i],[style*="background-color:#eef2ff" i],[style*="background-color: #eef2ff" i],[style*="background: rgb(238, 242, 255)" i],[style*="background-color: rgb(238, 242, 255)" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){background:var(--surface-2)!important}
html[data-theme="dark"] :is([style*="background:#fee2e2" i],[style*="background: #fee2e2" i],[style*="background-color:#fee2e2" i],[style*="background-color: #fee2e2" i],[style*="background: rgb(254, 226, 226)" i],[style*="background-color: rgb(254, 226, 226)" i],[style*="background:#fef2f2" i],[style*="background: #fef2f2" i],[style*="background-color:#fef2f2" i],[style*="background-color: #fef2f2" i],[style*="background: rgb(254, 242, 242)" i],[style*="background-color: rgb(254, 242, 242)" i],[style*="background:#fecaca" i],[style*="background: #fecaca" i],[style*="background-color:#fecaca" i],[style*="background-color: #fecaca" i],[style*="background: rgb(254, 202, 202)" i],[style*="background-color: rgb(254, 202, 202)" i],[style*="background:#fff1f2" i],[style*="background: #fff1f2" i],[style*="background-color:#fff1f2" i],[style*="background-color: #fff1f2" i],[style*="background: rgb(255, 241, 242)" i],[style*="background-color: rgb(255, 241, 242)" i],[style*="background:#ffe4e6" i],[style*="background: #ffe4e6" i],[style*="background-color:#ffe4e6" i],[style*="background-color: #ffe4e6" i],[style*="background: rgb(255, 228, 230)" i],[style*="background-color: rgb(255, 228, 230)" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){background:rgba(242,106,110,.14)!important}
html[data-theme="dark"] :is([style*="background:#dcfce7" i],[style*="background: #dcfce7" i],[style*="background-color:#dcfce7" i],[style*="background-color: #dcfce7" i],[style*="background: rgb(220, 252, 231)" i],[style*="background-color: rgb(220, 252, 231)" i],[style*="background:#f0fdf4" i],[style*="background: #f0fdf4" i],[style*="background-color:#f0fdf4" i],[style*="background-color: #f0fdf4" i],[style*="background: rgb(240, 253, 244)" i],[style*="background-color: rgb(240, 253, 244)" i],[style*="background:#d1fae5" i],[style*="background: #d1fae5" i],[style*="background-color:#d1fae5" i],[style*="background-color: #d1fae5" i],[style*="background: rgb(209, 250, 229)" i],[style*="background-color: rgb(209, 250, 229)" i],[style*="background:#ecfdf5" i],[style*="background: #ecfdf5" i],[style*="background-color:#ecfdf5" i],[style*="background-color: #ecfdf5" i],[style*="background: rgb(236, 253, 245)" i],[style*="background-color: rgb(236, 253, 245)" i],[style*="background:#bbf7d0" i],[style*="background: #bbf7d0" i],[style*="background-color:#bbf7d0" i],[style*="background-color: #bbf7d0" i],[style*="background: rgb(187, 247, 208)" i],[style*="background-color: rgb(187, 247, 208)" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){background:rgba(52,211,153,.14)!important}
html[data-theme="dark"] :is([style*="background:#fef3c7" i],[style*="background: #fef3c7" i],[style*="background-color:#fef3c7" i],[style*="background-color: #fef3c7" i],[style*="background: rgb(254, 243, 199)" i],[style*="background-color: rgb(254, 243, 199)" i],[style*="background:#fffbeb" i],[style*="background: #fffbeb" i],[style*="background-color:#fffbeb" i],[style*="background-color: #fffbeb" i],[style*="background: rgb(255, 251, 235)" i],[style*="background-color: rgb(255, 251, 235)" i],[style*="background:#fef9c3" i],[style*="background: #fef9c3" i],[style*="background-color:#fef9c3" i],[style*="background-color: #fef9c3" i],[style*="background: rgb(254, 249, 195)" i],[style*="background-color: rgb(254, 249, 195)" i],[style*="background:#fefce8" i],[style*="background: #fefce8" i],[style*="background-color:#fefce8" i],[style*="background-color: #fefce8" i],[style*="background: rgb(254, 252, 232)" i],[style*="background-color: rgb(254, 252, 232)" i],[style*="background:#fff7ed" i],[style*="background: #fff7ed" i],[style*="background-color:#fff7ed" i],[style*="background-color: #fff7ed" i],[style*="background: rgb(255, 247, 237)" i],[style*="background-color: rgb(255, 247, 237)" i],[style*="background:#ffedd5" i],[style*="background: #ffedd5" i],[style*="background-color:#ffedd5" i],[style*="background-color: #ffedd5" i],[style*="background: rgb(255, 237, 213)" i],[style*="background-color: rgb(255, 237, 213)" i],[style*="background:#fde68a" i],[style*="background: #fde68a" i],[style*="background-color:#fde68a" i],[style*="background-color: #fde68a" i],[style*="background: rgb(253, 230, 138)" i],[style*="background-color: rgb(253, 230, 138)" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){background:rgba(245,179,53,.14)!important}
html[data-theme="dark"] :is([style*="background:#dbeafe" i],[style*="background: #dbeafe" i],[style*="background-color:#dbeafe" i],[style*="background-color: #dbeafe" i],[style*="background: rgb(219, 234, 254)" i],[style*="background-color: rgb(219, 234, 254)" i],[style*="background:#eff6ff" i],[style*="background: #eff6ff" i],[style*="background-color:#eff6ff" i],[style*="background-color: #eff6ff" i],[style*="background: rgb(239, 246, 255)" i],[style*="background-color: rgb(239, 246, 255)" i],[style*="background:#e0f2fe" i],[style*="background: #e0f2fe" i],[style*="background-color:#e0f2fe" i],[style*="background-color: #e0f2fe" i],[style*="background: rgb(224, 242, 254)" i],[style*="background-color: rgb(224, 242, 254)" i],[style*="background:#f0f9ff" i],[style*="background: #f0f9ff" i],[style*="background-color:#f0f9ff" i],[style*="background-color: #f0f9ff" i],[style*="background: rgb(240, 249, 255)" i],[style*="background-color: rgb(240, 249, 255)" i],[style*="background:#e0e7ff" i],[style*="background: #e0e7ff" i],[style*="background-color:#e0e7ff" i],[style*="background-color: #e0e7ff" i],[style*="background: rgb(224, 231, 255)" i],[style*="background-color: rgb(224, 231, 255)" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){background:rgba(96,140,255,.15)!important}
html[data-theme="dark"] :is([style*="background:#ede9fe" i],[style*="background: #ede9fe" i],[style*="background-color:#ede9fe" i],[style*="background-color: #ede9fe" i],[style*="background: rgb(237, 233, 254)" i],[style*="background-color: rgb(237, 233, 254)" i],[style*="background:#f5f3ff" i],[style*="background: #f5f3ff" i],[style*="background-color:#f5f3ff" i],[style*="background-color: #f5f3ff" i],[style*="background: rgb(245, 243, 255)" i],[style*="background-color: rgb(245, 243, 255)" i],[style*="background:#f3e8ff" i],[style*="background: #f3e8ff" i],[style*="background-color:#f3e8ff" i],[style*="background-color: #f3e8ff" i],[style*="background: rgb(243, 232, 255)" i],[style*="background-color: rgb(243, 232, 255)" i],[style*="background:#faf5ff" i],[style*="background: #faf5ff" i],[style*="background-color:#faf5ff" i],[style*="background-color: #faf5ff" i],[style*="background: rgb(250, 245, 255)" i],[style*="background-color: rgb(250, 245, 255)" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){background:rgba(167,139,250,.15)!important}
html[data-theme="dark"] :is([style*="background:#fce7f3" i],[style*="background: #fce7f3" i],[style*="background-color:#fce7f3" i],[style*="background-color: #fce7f3" i],[style*="background: rgb(252, 231, 243)" i],[style*="background-color: rgb(252, 231, 243)" i],[style*="background:#fdf2f8" i],[style*="background: #fdf2f8" i],[style*="background-color:#fdf2f8" i],[style*="background-color: #fdf2f8" i],[style*="background: rgb(253, 242, 248)" i],[style*="background-color: rgb(253, 242, 248)" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){background:rgba(244,114,182,.14)!important}
html[data-theme="dark"] :is([style*="background:#cffafe" i],[style*="background: #cffafe" i],[style*="background-color:#cffafe" i],[style*="background-color: #cffafe" i],[style*="background: rgb(207, 250, 254)" i],[style*="background-color: rgb(207, 250, 254)" i],[style*="background:#ecfeff" i],[style*="background: #ecfeff" i],[style*="background-color:#ecfeff" i],[style*="background-color: #ecfeff" i],[style*="background: rgb(236, 254, 255)" i],[style*="background-color: rgb(236, 254, 255)" i],[style*="background:#ccfbf1" i],[style*="background: #ccfbf1" i],[style*="background-color:#ccfbf1" i],[style*="background-color: #ccfbf1" i],[style*="background: rgb(204, 251, 241)" i],[style*="background-color: rgb(204, 251, 241)" i],[style*="background:#f0fdfa" i],[style*="background: #f0fdfa" i],[style*="background-color:#f0fdfa" i],[style*="background-color: #f0fdfa" i],[style*="background: rgb(240, 253, 250)" i],[style*="background-color: rgb(240, 253, 250)" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){background:rgba(34,211,238,.13)!important}
html[data-theme="dark"] :is([style*="color:#0f172a" i],[style*="color: #0f172a" i],[style*="color: rgb(15, 23, 42);" i],[style*="color:#111827" i],[style*="color: #111827" i],[style*="color: rgb(17, 24, 39);" i],[style*="color:#1e293b" i],[style*="color: #1e293b" i],[style*="color: rgb(30, 41, 59);" i],[style*="color:#1f2937" i],[style*="color: #1f2937" i],[style*="color: rgb(31, 41, 55);" i],[style*="color:#111" i],[style*="color: #111" i],[style*="color: rgb(17, 17, 17);" i],[style*="color:#000" i],[style*="color: #000" i],[style*="color: rgb(0, 0, 0);" i],[style*="color:black" i],[style*="color: black" i],[style*="color: rgb(0, 0, 0);" i],[style*="color:#222" i],[style*="color: #222" i],[style*="color: rgb(34, 34, 34);" i],[style*="color:#333" i],[style*="color: #333" i],[style*="color: rgb(51, 51, 51);" i],[style*="color:#212529" i],[style*="color: #212529" i],[style*="color: rgb(33, 37, 41);" i],[style*="color:#1a1a1a" i],[style*="color: #1a1a1a" i],[style*="color: rgb(26, 26, 26);" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){color:var(--text)!important}
html[data-theme="dark"] :is([style*="color:#334155" i],[style*="color: #334155" i],[style*="color: rgb(51, 65, 85);" i],[style*="color:#374151" i],[style*="color: #374151" i],[style*="color: rgb(55, 65, 81);" i],[style*="color:#475569" i],[style*="color: #475569" i],[style*="color: rgb(71, 85, 105);" i],[style*="color:#4b5563" i],[style*="color: #4b5563" i],[style*="color: rgb(75, 85, 99);" i],[style*="color:#444" i],[style*="color: #444" i],[style*="color: rgb(68, 68, 68);" i],[style*="color:#555" i],[style*="color: #555" i],[style*="color: rgb(85, 85, 85);" i],[style*="color:#495057" i],[style*="color: #495057" i],[style*="color: rgb(73, 80, 87);" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){color:var(--text-mid)!important}
html[data-theme="dark"] :is([style*="color:#64748b" i],[style*="color: #64748b" i],[style*="color: rgb(100, 116, 139);" i],[style*="color:#6b7280" i],[style*="color: #6b7280" i],[style*="color: rgb(107, 114, 128);" i],[style*="color:#666" i],[style*="color: #666" i],[style*="color: rgb(102, 102, 102);" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){color:var(--text-muted)!important}
html[data-theme="dark"] :is([style*="color:#991b1b" i],[style*="color: #991b1b" i],[style*="color: rgb(153, 27, 27);" i],[style*="color:#b91c1c" i],[style*="color: #b91c1c" i],[style*="color: rgb(185, 28, 28);" i],[style*="color:#dc2626" i],[style*="color: #dc2626" i],[style*="color: rgb(220, 38, 38);" i],[style*="color:#7f1d1d" i],[style*="color: #7f1d1d" i],[style*="color: rgb(127, 29, 29);" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){color:#fca5a5!important}
html[data-theme="dark"] :is([style*="color:#166534" i],[style*="color: #166534" i],[style*="color: rgb(22, 101, 52);" i],[style*="color:#15803d" i],[style*="color: #15803d" i],[style*="color: rgb(21, 128, 61);" i],[style*="color:#047857" i],[style*="color: #047857" i],[style*="color: rgb(4, 120, 87);" i],[style*="color:#065f46" i],[style*="color: #065f46" i],[style*="color: rgb(6, 95, 70);" i],[style*="color:#14532d" i],[style*="color: #14532d" i],[style*="color: rgb(20, 83, 45);" i],[style*="color:#16a34a" i],[style*="color: #16a34a" i],[style*="color: rgb(22, 163, 74);" i],[style*="color:#059669" i],[style*="color: #059669" i],[style*="color: rgb(5, 150, 105);" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){color:#6ee7b7!important}
html[data-theme="dark"] :is([style*="color:#92400e" i],[style*="color: #92400e" i],[style*="color: rgb(146, 64, 14);" i],[style*="color:#b45309" i],[style*="color: #b45309" i],[style*="color: rgb(180, 83, 9);" i],[style*="color:#a16207" i],[style*="color: #a16207" i],[style*="color: rgb(161, 98, 7);" i],[style*="color:#854d0e" i],[style*="color: #854d0e" i],[style*="color: rgb(133, 77, 14);" i],[style*="color:#78350f" i],[style*="color: #78350f" i],[style*="color: rgb(120, 53, 15);" i],[style*="color:#c2410c" i],[style*="color: #c2410c" i],[style*="color: rgb(194, 65, 12);" i],[style*="color:#9a3412" i],[style*="color: #9a3412" i],[style*="color: rgb(154, 52, 18);" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){color:#fcd34d!important}
html[data-theme="dark"] :is([style*="color:#1e40af" i],[style*="color: #1e40af" i],[style*="color: rgb(30, 64, 175);" i],[style*="color:#1d4ed8" i],[style*="color: #1d4ed8" i],[style*="color: rgb(29, 78, 216);" i],[style*="color:#1e3a8a" i],[style*="color: #1e3a8a" i],[style*="color: rgb(30, 58, 138);" i],[style*="color:#2563eb" i],[style*="color: #2563eb" i],[style*="color: rgb(37, 99, 235);" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){color:#93c5fd!important}
html[data-theme="dark"] :is([style*="color:#5b21b6" i],[style*="color: #5b21b6" i],[style*="color: rgb(91, 33, 182);" i],[style*="color:#6d28d9" i],[style*="color: #6d28d9" i],[style*="color: rgb(109, 40, 217);" i],[style*="color:#4c1d95" i],[style*="color: #4c1d95" i],[style*="color: rgb(76, 29, 149);" i],[style*="color:#7c3aed" i],[style*="color: #7c3aed" i],[style*="color: rgb(124, 58, 237);" i],[style*="color:#4338ca" i],[style*="color: #4338ca" i],[style*="color: rgb(67, 56, 202);" i],[style*="color:#3730a3" i],[style*="color: #3730a3" i],[style*="color: rgb(55, 48, 163);" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){color:#c4b5fd!important}
html[data-theme="dark"] :is([style*="color:#9d174d" i],[style*="color: #9d174d" i],[style*="color: rgb(157, 23, 77);" i],[style*="color:#be185d" i],[style*="color: #be185d" i],[style*="color: rgb(190, 24, 93);" i],[style*="color:#831843" i],[style*="color: #831843" i],[style*="color: rgb(131, 24, 67);" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){color:#f9a8d4!important}
html[data-theme="dark"] :is([style*="color:#155e75" i],[style*="color: #155e75" i],[style*="color: rgb(21, 94, 117);" i],[style*="color:#0e7490" i],[style*="color: #0e7490" i],[style*="color: rgb(14, 116, 144);" i],[style*="color:#0f766e" i],[style*="color: #0f766e" i],[style*="color: rgb(15, 118, 110);" i],[style*="color:#115e59" i],[style*="color: #115e59" i],[style*="color: rgb(17, 94, 89);" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){color:#67e8f9!important}
html[data-theme="dark"] :is([style*="solid #e2e8f0" i],[style*="solid  #e2e8f0" i],[style*="solid rgb(226, 232, 240)" i],[style*="solid #e5e7eb" i],[style*="solid  #e5e7eb" i],[style*="solid rgb(229, 231, 235)" i],[style*="solid #e5e9f2" i],[style*="solid  #e5e9f2" i],[style*="solid rgb(229, 233, 242)" i],[style*="solid #dfe4ee" i],[style*="solid  #dfe4ee" i],[style*="solid rgb(223, 228, 238)" i],[style*="solid #cbd5e1" i],[style*="solid  #cbd5e1" i],[style*="solid rgb(203, 213, 225)" i],[style*="solid #f1f5f9" i],[style*="solid  #f1f5f9" i],[style*="solid rgb(241, 245, 249)" i],[style*="solid #d1d5db" i],[style*="solid  #d1d5db" i],[style*="solid rgb(209, 213, 219)" i],[style*="solid #eee" i],[style*="solid  #eee" i],[style*="solid rgb(238, 238, 238)" i],[style*="solid #ddd" i],[style*="solid  #ddd" i],[style*="solid rgb(221, 221, 221)" i],[style*="solid #e0e0e0" i],[style*="solid  #e0e0e0" i],[style*="solid rgb(224, 224, 224)" i]):not(:is(#print-area,.html2pdf__container,.no-dark,.inv-doc-frame) *){border-color:var(--border)!important}
}
