/* ════════════════════════════════════════════════════════════════
   CualityX — Tema claro/oscuro para las apps MÓVILES empresariales
   Las apps móviles (prefijos cm/fm/im/jm/rh/mk/fe) están diseñadas en
   oscuro (consistente con el modo oscuro y con el escritorio empresarial).
   Aquí sólo overrideamos a CLARO cuando html[data-theme="light"], para que
   respeten el tema elegido por el usuario en Configuración. Los acentos
   semánticos (verde=ok, rojo=alerta, dorado/ámbar) se mantienen en ambos.
   ════════════════════════════════════════════════════════════════ */

/* Contenedores raíz → fondo claro + texto oscuro */
html[data-theme="light"] .cm-wrap,
html[data-theme="light"] .fm-wrap,
html[data-theme="light"] .im-wrap,
html[data-theme="light"] .jm-wrap,
html[data-theme="light"] .mk-wrap,
html[data-theme="light"] .fe-wrap,
html[data-theme="light"] .rh-wrap {
  background: #f4f6fb !important;
  color: #1e293b !important;
}

/* Barras de pestañas / topbars claras */
html[data-theme="light"] .cm-tabs,
html[data-theme="light"] .fm-tabs,
html[data-theme="light"] .im-tabs,
html[data-theme="light"] .jm-tabs,
html[data-theme="light"] .mk-tabs,
html[data-theme="light"] .rh-tabs {
  background: #f4f6fb !important;
  border-bottom-color: rgba(0,0,0,.08) !important;
}
html[data-theme="light"] .cm-tab,
html[data-theme="light"] .fm-tab,
html[data-theme="light"] .im-tab,
html[data-theme="light"] .jm-tab,
html[data-theme="light"] .mk-tab,
html[data-theme="light"] .rh-tab {
  background: rgba(0,0,0,.04) !important;
  color: rgba(30,41,59,.6) !important;
}

/* Tarjetas, KPIs, filas, inputs → superficie blanca con bordes suaves */
html[data-theme="light"] .cm-kpi, html[data-theme="light"] .cm-card,
html[data-theme="light"] .fm-kpi, html[data-theme="light"] .fm-row, html[data-theme="light"] .fm-search input,
html[data-theme="light"] .im-kpi, html[data-theme="light"] .im-row, html[data-theme="light"] .im-search input, html[data-theme="light"] .im-pos-prod,
html[data-theme="light"] .jm-kpi, html[data-theme="light"] .jm-card, html[data-theme="light"] .jm-row,
html[data-theme="light"] .mk-card, html[data-theme="light"] .mk-row, html[data-theme="light"] .mk-search input,
html[data-theme="light"] .fe-card, html[data-theme="light"] .fe-col, html[data-theme="light"] .fe-tk,
html[data-theme="light"] .rh-kpi, html[data-theme="light"] .rh-row, html[data-theme="light"] .rh-search input,
html[data-theme="light"] .cm-search input, html[data-theme="light"] .cm-task {
  background: #ffffff !important;
  border-color: rgba(0,0,0,.08) !important;
  color: #1e293b !important;
}

/* Texto principal de tarjetas/filas en oscuro */
html[data-theme="light"] .cm-kpi-val, html[data-theme="light"] .cm-card-title, html[data-theme="light"] .cm-d-title,
html[data-theme="light"] .fm-kpi-val, html[data-theme="light"] .fm-row-t,
html[data-theme="light"] .im-kpi-val, html[data-theme="light"] .im-row-t,
html[data-theme="light"] .jm-kpi-val, html[data-theme="light"] .jm-card-t, html[data-theme="light"] .jm-row-t,
html[data-theme="light"] .mk-card-t, html[data-theme="light"] .mk-row-t, html[data-theme="light"] .mk-d-t,
html[data-theme="light"] .fe-card-t, html[data-theme="light"] .fe-tk-t, html[data-theme="light"] .fe-btitle,
html[data-theme="light"] .rh-kpi-val, html[data-theme="light"] .rh-row-t, html[data-theme="light"] .rh-d-name,
html[data-theme="light"] .cm-task-text, html[data-theme="light"] .im-stock {
  color: #1e293b !important;
}

/* Texto secundario / tenue */
html[data-theme="light"] .cm-kpi-lbl, html[data-theme="light"] .cm-card-sub, html[data-theme="light"] .cm-mini,
html[data-theme="light"] .fm-kpi-lbl, html[data-theme="light"] .fm-row-s,
html[data-theme="light"] .im-kpi-lbl, html[data-theme="light"] .im-row-s, html[data-theme="light"] .im-price,
html[data-theme="light"] .jm-kpi-lbl, html[data-theme="light"] .jm-card-s, html[data-theme="light"] .jm-row-s,
html[data-theme="light"] .mk-card-s, html[data-theme="light"] .mk-row-s, html[data-theme="light"] .mk-d-seller,
html[data-theme="light"] .fe-card-s, html[data-theme="light"] .fe-tk-meta,
html[data-theme="light"] .rh-kpi-lbl, html[data-theme="light"] .rh-row-s, html[data-theme="light"] .rh-d-pos,
html[data-theme="light"] .cm-sec, html[data-theme="light"] .fm-sec, html[data-theme="light"] .im-sec,
html[data-theme="light"] .jm-sec, html[data-theme="light"] .rh-sec {
  color: rgba(30,41,59,.55) !important;
}

/* Inputs / selects de hojas (sheets) en claro */
html[data-theme="light"] .cm-input, html[data-theme="light"] .cm-select, html[data-theme="light"] .cm-textarea,
html[data-theme="light"] .fm-input, html[data-theme="light"] .fm-select, html[data-theme="light"] .fm-textarea,
html[data-theme="light"] .im-input, html[data-theme="light"] .im-select,
html[data-theme="light"] .jm-input, html[data-theme="light"] .jm-select,
html[data-theme="light"] .mk-input, html[data-theme="light"] .mk-select, html[data-theme="light"] .mk-textarea,
html[data-theme="light"] .fe-input {
  background: #ffffff !important;
  border-color: rgba(0,0,0,.15) !important;
  color: #1e293b !important;
}

/* Hojas inferiores (sheets) y filas de detalle en claro */
html[data-theme="light"] .cm-sheet, html[data-theme="light"] .fm-sheet, html[data-theme="light"] .im-sheet,
html[data-theme="light"] .jm-sheet, html[data-theme="light"] .mk-sheet, html[data-theme="light"] .fe-sheet {
  background: #ffffff !important;
  color: #1e293b !important;
}
html[data-theme="light"] .cm-d-row, html[data-theme="light"] .rh-d-row {
  border-top-color: rgba(0,0,0,.08) !important;
}
html[data-theme="light"] .cm-d-row .v, html[data-theme="light"] .rh-d-row .v { color: #1e293b !important; }
html[data-theme="light"] .cm-d-row .k, html[data-theme="light"] .rh-d-row .k { color: rgba(30,41,59,.5) !important; }

/* Columnas de flujos en claro */
html[data-theme="light"] .fe-col { background: rgba(0,0,0,.03) !important; }

/* ════════════════════════════════════════════════════════════════
   TEMA OSCURO para apps empresariales de ESCRITORIO (claras por defecto)
   Se aplican cuando html[data-theme="dark"]. Acentos de marca preservados.
   ════════════════════════════════════════════════════════════════ */

/* ── CRM (acento rojo) ── */
html[data-theme="dark"] #win-crm .crm-shell{background:#15151f !important}
html[data-theme="dark"] #win-crm .crm-nav-bar{background:#1e1e2e !important;border-bottom-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-nav-tab{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-nav-tab:hover{color:#e8e9ed !important}
html[data-theme="dark"] #win-crm .crm-view-title{color:#e8e9ed !important}
html[data-theme="dark"] #win-crm .crm-icon-btn{background:#1e1e2e !important;color:rgba(232,233,237,.6) !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-icon-btn:hover{background:#2a2a3a !important;color:#EF4444 !important;border-color:#EF4444 !important}
html[data-theme="dark"] #win-crm .crm-modal-box{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-modal-header{color:#e8e9ed !important;border-bottom-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-modal-footer{background:#15151f !important;border-top-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-modal-close{background:#2a2a3a !important;color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-modal-close:hover{background:#3a3a4a !important;color:#EF4444 !important}
html[data-theme="dark"] #win-crm .crm-btn-secondary{background:#1e1e2e !important;color:#e8e9ed !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-btn-secondary:hover{background:#2a2a3a !important;color:#e8e9ed !important}
html[data-theme="dark"] #win-crm .crm-btn-ghost{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-btn-ghost:hover{background:#2a2a3a !important;color:#e8e9ed !important}
html[data-theme="dark"] #win-crm .crm-label{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-input{background:#1e1e2e !important;color:#e8e9ed !important;border-color:rgba(255,255,255,.12) !important}
html[data-theme="dark"] #win-crm .crm-input::placeholder{color:rgba(232,233,237,.4) !important}
html[data-theme="dark"] #win-crm .crm-textarea{background:#1e1e2e !important;color:#e8e9ed !important;border-color:rgba(255,255,255,.12) !important}
html[data-theme="dark"] #win-crm .crm-textarea::placeholder{color:rgba(232,233,237,.4) !important}
html[data-theme="dark"] #win-crm .crm-select{background:#1e1e2e !important;color:#e8e9ed !important;border-color:rgba(255,255,255,.12) !important}
html[data-theme="dark"] #win-crm .crm-dash-card{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-dash-card:hover{border-color:rgba(255,255,255,.2) !important}
html[data-theme="dark"] #win-crm .crm-dash-card-label{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-dash-card-value{color:#e8e9ed !important}
html[data-theme="dark"] #win-crm .crm-dash-card-sub{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-pipeline-col{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-pipeline-col-header{border-bottom-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-pipeline-col-name{color:#e8e9ed !important}
html[data-theme="dark"] #win-crm .crm-pipeline-col-count{background:#2a2a3a !important;color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-pipeline-col-value{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-deal-card{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-deal-card:hover{background:#252535 !important;border-color:rgba(255,255,255,.2) !important}
html[data-theme="dark"] #win-crm .crm-deal-card-title{color:#e8e9ed !important}
html[data-theme="dark"] #win-crm .crm-deal-card-company{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-deal-card-date{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-deal-row{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-deal-row:hover{background:#252535 !important;border-color:rgba(255,255,255,.2) !important}
html[data-theme="dark"] #win-crm .crm-deal-row-title{color:#e8e9ed !important}
html[data-theme="dark"] #win-crm .crm-deal-row-sub{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-contact-row{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-contact-row:hover{background:#252535 !important}
html[data-theme="dark"] #win-crm .crm-contact-name{color:#e8e9ed !important}
html[data-theme="dark"] #win-crm .crm-contact-meta{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-timeline::before{background:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-timeline-content{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-timeline-title{color:#e8e9ed !important}
html[data-theme="dark"] #win-crm .crm-timeline-time{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-timeline-body{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-task-row{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-task-check{border-color:rgba(255,255,255,.2) !important}
html[data-theme="dark"] #win-crm .crm-task-text{color:#e8e9ed !important}
html[data-theme="dark"] #win-crm .crm-task-text.crm-task-done{color:rgba(232,233,237,.4) !important}
html[data-theme="dark"] #win-crm .crm-task-deal{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-progress{background:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-section-title{color:#e8e9ed !important}
html[data-theme="dark"] #win-crm .crm-section-sub{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-empty-title{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-empty-sub{color:rgba(232,233,237,.5) !important}
html[data-theme="dark"] #win-crm .crm-mini-deal{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-mini-deal-title{color:#e8e9ed !important}
html[data-theme="dark"] #win-crm .crm-mini-deal-meta{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-dash-sidebar-section{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-dash-sidebar-title{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-form-tabs{border-bottom-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-form-tab{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-form-tab:hover{color:#e8e9ed !important}
html[data-theme="dark"] #win-crm .crm-note-entry{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-note-author{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-note-date{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-note-text{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-conversion-table th,html[data-theme="dark"] #win-crm .crm-forecast-table th{color:rgba(232,233,237,.6) !important;border-bottom-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-conversion-table td,html[data-theme="dark"] #win-crm .crm-forecast-table td{color:#e8e9ed !important;border-bottom-color:rgba(255,255,255,.08) !important}
html[data-theme="dark"] #win-crm .crm-search-dropdown{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-search-result{color:#e8e9ed !important}
html[data-theme="dark"] #win-crm .crm-search-result:hover{background:rgba(255,255,255,.05) !important}
html[data-theme="dark"] #win-crm .crm-search-result-sub{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-cal-month{color:#e8e9ed !important}
html[data-theme="dark"] #win-crm .crm-cal-grid{background:rgba(255,255,255,.05) !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-cal-day-header{background:#1e1e2e !important;color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-cal-cell{background:#15151f !important}
html[data-theme="dark"] #win-crm .crm-cal-cell-other{background:#1a1a26 !important}
html[data-theme="dark"] #win-crm .crm-cal-date{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-sort-header{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-notif-panel{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-notif-header{color:#e8e9ed !important;border-bottom-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-notif-item{border-bottom-color:rgba(255,255,255,.08) !important}
html[data-theme="dark"] #win-crm .crm-notif-text{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-attachment-row{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-attachment-meta{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-auto-rule{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-auto-rule-text{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-crm .crm-goal-bar{background:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-pipeline-select{background:#1e1e2e !important;color:#e8e9ed !important;border-color:rgba(255,255,255,.12) !important}
html[data-theme="dark"] #win-crm .crm-onboarding{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-crm .crm-onboarding-title{color:#e8e9ed !important}
html[data-theme="dark"] #win-crm ::-webkit-scrollbar-thumb{background:rgba(255,255,255,.2) !important}

/* ── Finanzas (acento verde) ── */
html[data-theme="dark"] #win-finanzas .fin-shell{background:#15151f !important}
html[data-theme="dark"] #win-finanzas .fin-toolbar{background:#1e1e2e !important;border-bottom-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-finanzas .fin-toolbar-title{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-toolbar-sub{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-toolbar-search{background:#1e1e2e !important;border-color:rgba(255,255,255,.12) !important}
html[data-theme="dark"] #win-finanzas .fin-toolbar-search input{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-toolbar-search input::placeholder{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-stat-strip{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-finanzas .fin-stat-item{border-right-color:rgba(255,255,255,.08) !important}
html[data-theme="dark"] #win-finanzas .fin-stat-label{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-stat-value{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-stat-sub{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-card{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-finanzas .fin-card-header{background:#252535 !important;border-bottom-color:rgba(255,255,255,.08) !important}
html[data-theme="dark"] #win-finanzas .fin-card-title{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-modal-box{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-finanzas .fin-modal-header{background:#252535 !important;border-bottom-color:rgba(255,255,255,.1) !important;color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-modal-close{background:#2a2a3a !important;color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-modal-body{background:#1e1e2e !important;color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-modal-footer{background:#252535 !important;border-top-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-finanzas .fin-btn-secondary{background:#1e1e2e !important;color:#9ca3af !important;border-color:rgba(255,255,255,.12) !important}
html[data-theme="dark"] #win-finanzas .fin-btn-secondary:hover{background:#252535 !important;color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-btn-icon{background:#1e1e2e !important;color:rgba(232,233,237,.6) !important;border-color:rgba(255,255,255,.12) !important}
html[data-theme="dark"] #win-finanzas .fin-btn-sm{background:#1e1e2e !important;color:#9ca3af !important;border-color:rgba(255,255,255,.12) !important}
html[data-theme="dark"] #win-finanzas .fin-input{background:#1e1e2e !important;color:#e8e9ed !important;border-color:rgba(255,255,255,.12) !important}
html[data-theme="dark"] #win-finanzas .fin-select{background:#1e1e2e !important;color:#e8e9ed !important;border-color:rgba(255,255,255,.12) !important}
html[data-theme="dark"] #win-finanzas .fin-label{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-textarea{background:#1e1e2e !important;color:#e8e9ed !important;border-color:rgba(255,255,255,.12) !important}
html[data-theme="dark"] #win-finanzas .fin-tx-row{border-bottom-color:rgba(255,255,255,.08) !important}
html[data-theme="dark"] #win-finanzas .fin-tx-name{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-tx-cat{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-tx-date{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-table-header{background:#252535 !important;border-bottom-color:rgba(255,255,255,.1) !important;color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-aging-label{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-aging-track{background:#252535 !important}
html[data-theme="dark"] #win-finanzas .fin-aging-amount{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-budget-row{border-bottom-color:rgba(255,255,255,.08) !important}
html[data-theme="dark"] #win-finanzas .fin-budget-cat{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-budget-track{background:#252535 !important}
html[data-theme="dark"] #win-finanzas .fin-budget-vals{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-budget-variance{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-goal-card{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-finanzas .fin-goal-name{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-goal-desc{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-goal-progress{background:#252535 !important}
html[data-theme="dark"] #win-finanzas .fin-goal-stats{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-chart-label{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-summary-item{border-bottom-color:rgba(255,255,255,.08) !important}
html[data-theme="dark"] #win-finanzas .fin-summary-label{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-summary-value{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-recent-name{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-recent-amount{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-empty-title{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-empty-sub{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-guide-section h3{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-guide-section p,html[data-theme="dark"] #win-finanzas .fin-guide-section li{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-pill{background:#1e1e2e !important;border-color:rgba(255,255,255,.12) !important;color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-report-card{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-finanzas .fin-pl-row{color:#e8e9ed !important;border-bottom-color:rgba(255,255,255,.08) !important}
html[data-theme="dark"] #win-finanzas .fin-pl-header{background:#252535 !important;border-bottom-color:rgba(255,255,255,.1) !important;color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-hbar-label{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-hbar-track{background:#252535 !important}
html[data-theme="dark"] #win-finanzas .fin-hbar-val{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-forecast-row{color:#e8e9ed !important;border-bottom-color:rgba(255,255,255,.08) !important}
html[data-theme="dark"] #win-finanzas .fin-forecast-header{background:#252535 !important;border-bottom-color:rgba(255,255,255,.1) !important;color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-cal-title{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-cal-grid{background:rgba(255,255,255,.08) !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-finanzas .fin-cal-dow{background:#252535 !important;color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-cal-cell{background:#1e1e2e !important}
html[data-theme="dark"] #win-finanzas .fin-cal-cell.fin-cal-other{background:#252535 !important}
html[data-theme="dark"] #win-finanzas .fin-cal-day{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-notif-panel{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-finanzas .fin-notif-header{background:#252535 !important;border-bottom-color:rgba(255,255,255,.1) !important;color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-notif-item{border-bottom-color:rgba(255,255,255,.08) !important}
html[data-theme="dark"] #win-finanzas .fin-notif-text{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-notif-sub{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-onboarding-title{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-onboarding-sub{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-audit-detail{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-audit-date{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-finanzas .fin-search-dropdown{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-finanzas .fin-search-result{color:#e8e9ed !important}
html[data-theme="dark"] #win-finanzas .fin-currency-select{background:#1e1e2e !important;color:rgba(232,233,237,.6) !important;border-color:rgba(255,255,255,.12) !important}

/* ── Mercado Empresarial (acento azul) ── */
html[data-theme="dark"] #win-mercado-empresarial .me-shell{background:#15151f !important;color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-header-search{background:#1e1e2e !important;color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-nav-bar{border-bottom-color:rgba(255,255,255,.1) !important;background:#15151f !important}
html[data-theme="dark"] #win-mercado-empresarial .me-nav-tab{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-filters-sidebar{border-right-color:rgba(255,255,255,.1) !important;background:#15151f !important}
html[data-theme="dark"] #win-mercado-empresarial .me-filter-group-title{color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-filter-option{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-filter-price-input{border-color:rgba(255,255,255,.1) !important;background:#1e1e2e !important;color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-main{background:#15151f !important}
html[data-theme="dark"] #win-mercado-empresarial .me-results-header{background:#1e1e2e !important;border-bottom-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-results-count{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-results-sort{border-color:rgba(255,255,255,.1) !important;background:#1e1e2e !important;color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-product-list{background:#1e1e2e !important}
html[data-theme="dark"] #win-mercado-empresarial .me-product-item{border-bottom-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-product-item:hover{background:#252535 !important}
html[data-theme="dark"] #win-mercado-empresarial .me-product-item-title{color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-product-item-price{color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-product-item-seller{color:rgba(232,233,237,.5) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-btn-secondary{border-color:rgba(255,255,255,.1) !important;background:#1e1e2e !important;color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-icon-btn{border-color:rgba(255,255,255,.1) !important;background:#1e1e2e !important;color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-modal-box{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-modal-header{border-bottom-color:rgba(255,255,255,.1) !important;color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-modal-footer{border-top-color:rgba(255,255,255,.1) !important;background:#252535 !important}
html[data-theme="dark"] #win-mercado-empresarial .me-label{color:rgba(232,233,237,.5) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-input,html[data-theme="dark"] #win-mercado-empresarial .me-textarea,html[data-theme="dark"] #win-mercado-empresarial .me-select{border-color:rgba(255,255,255,.1) !important;background:#1e1e2e !important;color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-dash-card{border-color:rgba(255,255,255,.1) !important;background:#1e1e2e !important}
html[data-theme="dark"] #win-mercado-empresarial .me-dash-card-label{color:rgba(232,233,237,.5) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-dash-card-value{color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-profile-card{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-profile-card-name{color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-profile-stat{background:#1e1e2e !important;border-color:rgba(255,255,255,.1) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-profile-stat-value{color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-detail-title{color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-detail-price{color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-detail-desc{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-detail-seller{border-color:rgba(255,255,255,.1) !important;background:#252535 !important}
html[data-theme="dark"] #win-mercado-empresarial .me-detail-seller-name{color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-list-row{border-color:rgba(255,255,255,.1) !important;background:#1e1e2e !important}
html[data-theme="dark"] #win-mercado-empresarial .me-list-row:hover{background:#252535 !important}
html[data-theme="dark"] #win-mercado-empresarial .me-list-row-title{color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-list-row-sub{color:rgba(232,233,237,.5) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-inquiry-item,html[data-theme="dark"] #win-mercado-empresarial .me-review-item{border-color:rgba(255,255,255,.1) !important;background:#1e1e2e !important}
html[data-theme="dark"] #win-mercado-empresarial .me-inquiry-from,html[data-theme="dark"] #win-mercado-empresarial .me-review-author{color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-inquiry-msg,html[data-theme="dark"] #win-mercado-empresarial .me-review-text{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-section-title{color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial .me-empty-title{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-empty-desc{color:rgba(232,233,237,.5) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-tab{color:rgba(232,233,237,.6) !important}
html[data-theme="dark"] #win-mercado-empresarial .me-msn-chat-input,html[data-theme="dark"] #win-mercado-empresarial .me-od-chat-input{border-color:rgba(255,255,255,.1) !important;background:#1e1e2e !important;color:#e8e9ed !important}
html[data-theme="dark"] #win-mercado-empresarial ::-webkit-scrollbar-thumb{background:rgba(232,233,237,.2) !important}

/* ════════════════════════════════════════════════════════════════
   APPS BASADAS EN VARIABLES CSS → re-tematizar redefiniendo variables
   (cubre TODA la app porque todo usa var(...)). Acentos preservados.
   ════════════════════════════════════════════════════════════════ */

/* ── Inventarios (claro por defecto) → OSCURO ── */
html[data-theme="dark"] #win-inventarios{
  --inv-bg:#15151f; --inv-bg-alt:#1a1a26; --inv-bg-ter:#1e1e2e; --inv-hover:#252535;
  --inv-text:#e8e9ed; --inv-text-sec:#9ca3af; --inv-text-mut:#6b7280;
  --inv-border:#2a2a3a; --inv-border-lt:rgba(255,255,255,.06);
  --inv-accent-light:rgba(245,158,11,.18); --inv-accent-lighter:rgba(245,158,11,.30);
  --inv-shadow-xs:0 1px 3px rgba(0,0,0,.4); --inv-shadow-sm:0 4px 12px rgba(0,0,0,.5);
  --inv-shadow-md:0 8px 24px rgba(0,0,0,.55); --inv-shadow-lg:0 12px 40px rgba(0,0,0,.6);
}

/* ── Juntas (claro por defecto) → OSCURO ── */
html[data-theme="dark"] #win-juntas{
  --jnt-bg:#15151f; --jnt-bg-alt:#1a1a26; --jnt-bg-ter:#1e1e2e; --jnt-hover:#252535;
  --jnt-text:#e8e9ed; --jnt-text-sec:#9ca3af; --jnt-text-mut:#6b7280;
  --jnt-border:#2a2a3a; --jnt-accent-light:rgba(245,158,11,.18);
  --jnt-shadow-xs:0 1px 3px rgba(0,0,0,.4); --jnt-shadow-sm:0 4px 12px rgba(0,0,0,.5);
  --jnt-shadow-md:0 8px 24px rgba(0,0,0,.55); --jnt-shadow-lg:0 12px 40px rgba(0,0,0,.6);
}

/* ── NeuroRH (oscuro por defecto) → CLARO ── */
html[data-theme="light"] #win-neurorh .nrh-shell{
  --nrh-bg:#f4f6fb; --nrh-surface-0:#ffffff; --nrh-surface-1:rgba(0,0,0,.03); --nrh-surface-2:rgba(0,0,0,.05);
  --nrh-panel:#ffffff; --nrh-panel-2:#f0f2f8; --nrh-line:rgba(0,0,0,.08); --nrh-line-strong:rgba(0,0,0,.14);
  --nrh-text:#1e293b; --nrh-text-secondary:#64748b; --nrh-muted:#94a3b8;
}

/* ── Agenda Empresarial (crema clara por defecto) → OSCURO ── */
html[data-theme="dark"] #win-agenda-empresarial{
  --bg:#15151f; --ink:#e8e9ed; --muted:#9ca3af;
  --line:rgba(255,255,255,.12); --line-strong:rgba(255,255,255,.22);
  --panel:rgba(255,255,255,.05); --panel-soft:rgba(255,255,255,.03);
  --accent-soft:rgba(201,111,45,.28); --accent-ink:#f0c9a8;
  --shadow:0 18px 44px rgba(0,0,0,.55);
}
/* refuerzo por si el body/shell de la agenda no hereda la variable */
html[data-theme="dark"] #win-agenda-empresarial .shell,
html[data-theme="dark"] #win-agenda-empresarial .enterprise-shell{ background:#15151f !important; color:#e8e9ed !important; }

/* ── Social Empresarial (oscuro estilo FB por defecto) → CLARO ── */
html[data-theme="light"] #win-social-empresarial{
  --fb-bg:#f0f2f5; --fb-surface:#ffffff; --fb-surface-2:#f0f2f5; --fb-hover:#e4e6e9;
  --fb-border:#ced0d4; --fb-text:#1c1e21; --fb-text-sub:#65676b;
}

/* ── Mensajes Empresarial (oscuro por defecto) → CLARO ── */
html[data-theme="light"] #win-mensajes-empresarial .cx-msg-shell{
  --msg-bg-deep:#eef1f5; --msg-bg-panel:#ffffff; --msg-bg-header:#ffffff; --msg-bg-input:rgba(0,0,0,.05);
  --msg-bg-bubble-other:rgba(0,0,0,.06); --msg-bg-hover:rgba(0,0,0,.04); --msg-bg-active:rgba(0,184,122,.12);
  --msg-border:rgba(0,0,0,.08); --msg-border-light:rgba(0,0,0,.06);
  --msg-text-primary:#1c1e21; --msg-text-secondary:rgba(0,0,0,.5);
  --msg-icon:rgba(0,0,0,.45); --msg-icon-hover:rgba(0,0,0,.85);
  --msg-glass-bg:rgba(0,0,0,.03); --msg-glass-border:rgba(0,0,0,.08);
}

/* ── Flujos Empresarial (oscuro por defecto) → CLARO (mismas clases que Flujos personal) ── */
html[data-theme="light"] #win-flujos-empresariales>.content{background:#eef1f7 !important;color:#1e293b !important}
html[data-theme="light"] #win-flujos-empresariales .back-btn{background:rgba(0,0,0,.04) !important;color:#1e293b !important;border-color:rgba(0,0,0,.12) !important}
html[data-theme="light"] #win-flujos-empresariales #flujos-add{background:rgba(252,214,129,.22) !important;color:#8a6d12 !important;border-color:rgba(252,214,129,.55) !important}
html[data-theme="light"] #win-flujos-empresariales #flujos-sidebar{background:#ffffff !important;border-right-color:rgba(0,0,0,.08) !important}
html[data-theme="light"] #win-flujos-empresariales #flujos-ai-panel{background:#ffffff !important;border-left-color:rgba(0,0,0,.08) !important}
html[data-theme="light"] #win-flujos-empresariales .flujos-nav-btn{background:rgba(0,0,0,.03) !important;border-color:rgba(0,0,0,.08) !important;color:#1e293b !important}
html[data-theme="light"] #win-flujos-empresariales .flujos-nav-btn.active{background:rgba(242,214,129,.22) !important;border-color:rgba(242,214,129,.55) !important}
html[data-theme="light"] #win-flujos-empresariales .flujos-tool-btn{background:rgba(0,0,0,.04) !important;border-color:rgba(0,0,0,.1) !important;color:#1e293b !important}
html[data-theme="light"] #win-flujos-empresariales .flujos-secondary-btn{background:rgba(0,0,0,.04) !important;border-color:rgba(0,0,0,.12) !important;color:#1e293b !important}
html[data-theme="light"] #win-flujos-empresariales .flujos-column{background:#ffffff !important;border-color:rgba(0,0,0,.08) !important}
html[data-theme="light"] #win-flujos-empresariales .flujos-column-header{border-bottom-color:rgba(0,0,0,.08) !important}
html[data-theme="light"] #win-flujos-empresariales .flujos-story-card{background:rgba(0,0,0,.025) !important;border-color:rgba(0,0,0,.08) !important;color:#1e293b !important}
html[data-theme="light"] #win-flujos-empresariales .flujos-story-card:hover{background:rgba(0,0,0,.05) !important;border-color:rgba(0,0,0,.14) !important}
html[data-theme="light"] #win-flujos-empresariales .flujos-modal-content{background:#ffffff !important;border-color:rgba(0,0,0,.1) !important;color:#1e293b !important}
html[data-theme="light"] #win-flujos-empresariales .flujos-modal-header{border-bottom-color:rgba(0,0,0,.08) !important}
html[data-theme="light"] #win-flujos-empresariales .flujos-modal-close{background:rgba(0,0,0,.05) !important;color:#1e293b !important}
html[data-theme="light"] #win-flujos-empresariales select option{background-color:#ffffff !important;color:#1e293b !important}
html[data-theme="light"] #win-flujos-empresariales #flujos-empty-state{color:#1e293b !important}
html[data-theme="light"] #win-flujos-empresariales #flujos-board input,
html[data-theme="light"] #win-flujos-empresariales #flujos-main-area input,
html[data-theme="light"] #win-flujos-empresariales #flujos-main-area textarea,
html[data-theme="light"] #win-flujos-empresariales .flujos-modal input,
html[data-theme="light"] #win-flujos-empresariales .flujos-modal textarea,
html[data-theme="light"] #win-flujos-empresariales .flujos-modal select,
html[data-theme="light"] #win-flujos-empresariales #flujos-ai-input{background:#ffffff !important;border-color:rgba(0,0,0,.14) !important;color:#1e293b !important}
html[data-theme="light"] #win-flujos-empresariales #flujos-side{background:rgba(0,0,0,.03) !important;border-color:rgba(0,0,0,.08) !important}

/* ════════════════════════════════════════════════════════════════
   SHELL MÓVIL: topbar y barra inferior siguen el TEMA (no el wallpaper)
   Así la barra de arriba se ve limpia y consistente (como estudiante)
   en todas las apps, sin importar el fondo de pantalla del perfil.
   ════════════════════════════════════════════════════════════════ */
/* Barra SÓLIDA de ancho completo SOLO cuando hay una app abierta (.cx-m-inapp),
   como Configuración. El HOME/launcher conserva su barra de vidrio sobre el
   wallpaper (no se toca). */
.cx-m-shell.cx-m-inapp .cx-m-topbar{ margin:0 !important; border-radius:0 !important; backdrop-filter:none !important; -webkit-backdrop-filter:none !important; }
.cx-m-shell.cx-m-inapp .cx-m-topbar::before, .cx-m-shell.cx-m-inapp .cx-m-topbar::after, .cx-m-shell.cx-m-inapp .cx-m-topbar-glow, .cx-m-shell.cx-m-inapp .cx-m-topbar-border{ display:none !important; }
html[data-theme="light"] .cx-m-shell.cx-m-inapp .cx-m-topbar{ background:#ffffff !important; box-shadow:0 1px 0 0 rgba(0,0,0,.06), 0 2px 12px -6px rgba(0,0,0,.12) !important; }
html[data-theme="light"] .cx-m-shell.cx-m-inapp .cx-m-topbar-title{ color:#1e293b !important; text-shadow:none !important; }
html[data-theme="light"] .cx-m-shell.cx-m-inapp .cx-m-topbar-hamburger, html[data-theme="light"] .cx-m-shell.cx-m-inapp .cx-m-topbar-btn{ color:#1e293b !important; }
html[data-theme="light"] .cx-m-shell.cx-m-inapp .cx-m-topbar-hamburger svg, html[data-theme="light"] .cx-m-shell.cx-m-inapp .cx-m-topbar-btn svg{ filter:none !important; }
html[data-theme="dark"] .cx-m-shell.cx-m-inapp .cx-m-topbar{ background:#15151f !important; box-shadow:0 2px 12px -6px rgba(0,0,0,.5) !important; }
html[data-theme="dark"] .cx-m-shell.cx-m-inapp .cx-m-topbar-title{ color:#f0f0ff !important; }

/* Contenido de la app cubre el wallpaper con el color del tema (no en el home) */
html[data-theme="light"] .cx-m-appview, html[data-theme="light"] .cx-m-appview-content{ background:#f4f6fb !important; }
html[data-theme="dark"] .cx-m-appview, html[data-theme="dark"] .cx-m-appview-content{ background:#15151f !important; }

html[data-theme="light"] .cx-m-tabbar{ background:rgba(255,255,255,.97) !important; border-top:1px solid rgba(0,0,0,.08) !important; }
html[data-theme="light"] .cx-m-tabbar-tab{ color:rgba(30,41,59,.5) !important; }
html[data-theme="dark"] .cx-m-tabbar{ background:rgba(21,21,31,.97) !important; border-top:1px solid rgba(255,255,255,.08) !important; }
html[data-theme="dark"] .cx-m-tabbar-tab{ color:rgba(240,240,255,.55) !important; }

/* FABs de las apps empresariales: por encima de la barra inferior del shell */
.cm-fab, .fm-fab, .im-fab, .jm-fab, .fe-fab, .mk-fab{ bottom:calc(76px + env(safe-area-inset-bottom,0px)) !important; }

/* ════════════════════════════════════════════════════════════════
   Apps ESTUDIANTILES diseñadas SOLO en claro → soporte de modo OSCURO.
   (AprendeX=sxm, Campus=msca, Sueños=msd, Plus=mspp, Experiencias=mspr,
    Values S=msv). Antes ignoraban el tema y se veían claras siempre.
   Aquí, cuando html[data-theme="dark"], oscurecemos contenedor, superficies
   (cards/sheets/inputs/paneles) y texto. Se RESPETAN colores semánticos y de
   estado (badges, opciones de quiz, botones peligro) excluyéndolos.
   ════════════════════════════════════════════════════════════════ */

/* Contenedor raíz → fondo oscuro + texto claro heredable */
html[data-theme="dark"] .sxm-wrap,
html[data-theme="dark"] .msca-root,
html[data-theme="dark"] .msd-body,
html[data-theme="dark"] .mspp-wrap,
html[data-theme="dark"] .mspr-body,
html[data-theme="dark"] .msv-wrap{ background:#15151f !important; color:#f0f0ff !important; }

/* ── AprendeX (sxm) ── */
html[data-theme="dark"] .sxm-deck, html[data-theme="dark"] .sxm-deck-progress, html[data-theme="dark"] .sxm-card-item,
html[data-theme="dark"] .sxm-flashcard, html[data-theme="dark"] .sxm-stat-card2, html[data-theme="dark"] .sxm-stats-bar,
html[data-theme="dark"] .sxm-stats-card, html[data-theme="dark"] .sxm-stats-item, html[data-theme="dark"] .sxm-done-stat,
html[data-theme="dark"] .sxm-filter-btn, html[data-theme="dark"] .sxm-study-bar, html[data-theme="dark"] .sxm-gen-sheet,
html[data-theme="dark"] .sxm-toast, html[data-theme="dark"] .sxm-ai-chat, html[data-theme="dark"] .sxm-ai-input,
html[data-theme="dark"] .sxm-ai-msg-bubble, html[data-theme="dark"] .sxm-ai-sug, html[data-theme="dark"] .sxm-ia-header,
html[data-theme="dark"] .sxm-ia-input-row, html[data-theme="dark"] .sxm-ia-wrap{ background:#22243a !important; border-color:rgba(255,255,255,.1) !important; color:#f0f0ff !important; }
html[data-theme="dark"] .sxm-card-q, html[data-theme="dark"] .sxm-deck-name, html[data-theme="dark"] .sxm-done-title,
html[data-theme="dark"] .sxm-flashcard-text, html[data-theme="dark"] .sxm-hero-title, html[data-theme="dark"] .sxm-htitle,
html[data-theme="dark"] .sxm-stats-title, html[data-theme="dark"] .sxm-ai-chat-title{ color:#f0f0ff !important; }

/* ── Campus (msca) ── */
html[data-theme="dark"] .msca-card, html[data-theme="dark"] .msca-stat-card, html[data-theme="dark"] .msca-tabs,
html[data-theme="dark"] .msca-tag, html[data-theme="dark"] .msca-input, html[data-theme="dark"] .msca-modal,
html[data-theme="dark"] .msca-ai-header, html[data-theme="dark"] .msca-ai-input-row, html[data-theme="dark"] .msca-ai-msg-ai,
html[data-theme="dark"] .msca-comment-bubble, html[data-theme="dark"] .msca-reactions-popup, html[data-theme="dark"] .msca-btn-secondary,
html[data-theme="dark"] .msca-icon-btn, html[data-theme="dark"] .msca-msg-theirs{ background:#22243a !important; border-color:rgba(255,255,255,.1) !important; color:#f0f0ff !important; }
html[data-theme="dark"] .msca-comment-text, html[data-theme="dark"] .msca-ge-name, html[data-theme="dark"] .msca-hero-title,
html[data-theme="dark"] .msca-modal-title, html[data-theme="dark"] .msca-notif-text, html[data-theme="dark"] .msca-post-text,
html[data-theme="dark"] .msca-profile-bio, html[data-theme="dark"] .msca-profile-name, html[data-theme="dark"] .msca-profile-stat-n,
html[data-theme="dark"] .msca-user-name, html[data-theme="dark"] .msca-filter-btn{ color:#f0f0ff !important; }

/* ── Sueños (msd) ── */
html[data-theme="dark"] .msd-card, html[data-theme="dark"] .msd-stat-card, html[data-theme="dark"] .msd-stat-card-grid,
html[data-theme="dark"] .msd-activity-card, html[data-theme="dark"] .msd-cat-card, html[data-theme="dark"] .msd-reward-card,
html[data-theme="dark"] .msd-studio-card, html[data-theme="dark"] .msd-team-card, html[data-theme="dark"] .msd-update-card,
html[data-theme="dark"] .msd-detail-hero, html[data-theme="dark"] .msd-checkout-card, html[data-theme="dark"] .msd-confirm-box,
html[data-theme="dark"] .msd-ed-section, html[data-theme="dark"] .msd-search, html[data-theme="dark"] .msd-select,
html[data-theme="dark"] .msd-sort-select, html[data-theme="dark"] .msd-quick-amount, html[data-theme="dark"] .msd-my-compact,
html[data-theme="dark"] .msd-my-compact-bar, html[data-theme="dark"] .msd-ai-input, html[data-theme="dark"] .msd-ai-bubble-msg,
html[data-theme="dark"] .msd-ai-sug, html[data-theme="dark"] .msd-step-pill, html[data-theme="dark"] .msd-steps-row,
html[data-theme="dark"] .msd-filter-chip, html[data-theme="dark"] .msd-btn-ghost, html[data-theme="dark"] .msd-btn-outline{ background:#22243a !important; border-color:rgba(255,255,255,.1) !important; color:#f0f0ff !important; }
html[data-theme="dark"] .msd-card-title, html[data-theme="dark"] .msd-activity-text, html[data-theme="dark"] .msd-empty-title,
html[data-theme="dark"] .msd-hero-title, html[data-theme="dark"] .msd-label, html[data-theme="dark"] .msd-motiv-title,
html[data-theme="dark"] .msd-my-compact-title, html[data-theme="dark"] .msd-my-section-title, html[data-theme="dark"] .msd-stat-val,
html[data-theme="dark"] .msd-step-num, html[data-theme="dark"] .msd-detail-back, html[data-theme="dark"] .msd-section-divider-text,
html[data-theme="dark"] .msd-ai-chat-title{ color:#f0f0ff !important; }

/* ── Plus (mspp / sp / uv) ── */
html[data-theme="dark"] .mspp-card, html[data-theme="dark"] .mspp-info-card, html[data-theme="dark"] .mspp-plan-card,
html[data-theme="dark"] .mspp-stat, html[data-theme="dark"] .mspp-activity-item, html[data-theme="dark"] .mspp-bottom-nav,
html[data-theme="dark"] .mspp-chat, html[data-theme="dark"] .mspp-chat-ai, html[data-theme="dark"] .mspp-chat-input,
html[data-theme="dark"] .mspp-chat-input-wrap, html[data-theme="dark"] .mspp-chat-sug, html[data-theme="dark"] .mspp-idx-input,
html[data-theme="dark"] .mspp-btn-secondary, html[data-theme="dark"] .sp-btn-soft, html[data-theme="dark"] .uv-comp-card,
html[data-theme="dark"] .uv-modal-card, html[data-theme="dark"] .uv-skill-card, html[data-theme="dark"] .uv-mission-box{ background:#22243a !important; border-color:rgba(255,255,255,.1) !important; color:#f0f0ff !important; }
html[data-theme="dark"] .mspp-card-title, html[data-theme="dark"] .mspp-banner-title, html[data-theme="dark"] .mspp-info-title,
html[data-theme="dark"] .mspp-info-desc, html[data-theme="dark"] .mspp-plan-title, html[data-theme="dark"] .mspp-quick-card-name,
html[data-theme="dark"] .mspp-quick-card-desc, html[data-theme="dark"] .mspp-activity-text, html[data-theme="dark"] .uv-comp-name,
html[data-theme="dark"] .uv-comp-desc, html[data-theme="dark"] .uv-section-title, html[data-theme="dark"] .uv-skill-name,
html[data-theme="dark"] .uv-aeiou-label{ color:#f0f0ff !important; }

/* ── Experiencias (mspr) ── */
html[data-theme="dark"] .mspr-stat-card, html[data-theme="dark"] .mspr-recent-card, html[data-theme="dark"] .mspr-game-card,
html[data-theme="dark"] .mspr-game-screen, html[data-theme="dark"] .mspr-results-card, html[data-theme="dark"] .mspr-rank-item,
html[data-theme="dark"] .mspr-badge-card, html[data-theme="dark"] .mspr-event-item, html[data-theme="dark"] .mspr-cat,
html[data-theme="dark"] .mspr-search, html[data-theme="dark"] .mspr-q-box, html[data-theme="dark"] .mspr-ai-panel,
html[data-theme="dark"] .mspr-ai-input, html[data-theme="dark"] .mspr-ai-input-row, html[data-theme="dark"] .mspr-ia-header,
html[data-theme="dark"] .mspr-ia-input, html[data-theme="dark"] .mspr-ia-sug, html[data-theme="dark"] .mspr-btn-soft,
html[data-theme="dark"] .mspr-streak-box, html[data-theme="dark"] .mspr-xpbar, html[data-theme="dark"] .mspr-xpbar-track{ background:#22243a !important; border-color:rgba(255,255,255,.1) !important; color:#f0f0ff !important; }
html[data-theme="dark"] .mspr-badge-name, html[data-theme="dark"] .mspr-cta-card-title, html[data-theme="dark"] .mspr-event-desc,
html[data-theme="dark"] .mspr-game-title, html[data-theme="dark"] .mspr-hero-title, html[data-theme="dark"] .mspr-q-text,
html[data-theme="dark"] .mspr-rank-name, html[data-theme="dark"] .mspr-recent-name, html[data-theme="dark"] .mspr-recent-title,
html[data-theme="dark"] .mspr-tab, html[data-theme="dark"] .mspr-xpbar-name, html[data-theme="dark"] .mspr-ai-title,
html[data-theme="dark"] .mspr-section-divider-text, html[data-theme="dark"] .mspr-game-hdr-title{ color:#f0f0ff !important; }

/* ── Values S (msv) ── */
html[data-theme="dark"] .msv-bubble, html[data-theme="dark"] .msv-ia-msgs, html[data-theme="dark"] .msv-msgs,
html[data-theme="dark"] .msv-prog-card, html[data-theme="dark"] .msv-stat-card, html[data-theme="dark"] .msv-sheet,
html[data-theme="dark"] .msv-sheet-input, html[data-theme="dark"] .msv-textarea, html[data-theme="dark"] .msv-suggestion,
html[data-theme="dark"] .msv-hist-item, html[data-theme="dark"] .msv-folder-chip, html[data-theme="dark"] .msv-greeting-chip,
html[data-theme="dark"] .msv-conv-folder-tag, html[data-theme="dark"] .msv-style-btn, html[data-theme="dark"] .msv-typing,
html[data-theme="dark"] .msv-msg-act, html[data-theme="dark"] .msv-sheet-btn-cancel{ background:#22243a !important; border-color:rgba(255,255,255,.1) !important; color:#f0f0ff !important; }
html[data-theme="dark"] .msv-bubble, html[data-theme="dark"] .msv-hist-item, html[data-theme="dark"] .msv-suggestion,
html[data-theme="dark"] .msv-prog-card, html[data-theme="dark"] .msv-stat-card{ color:#f0f0ff !important; }

/* Inputs/áreas de texto de estas apps: fondo un poco más hundido + placeholder claro */
html[data-theme="dark"] .sxm-ai-input, html[data-theme="dark"] .msca-input, html[data-theme="dark"] .msd-search,
html[data-theme="dark"] .msd-select, html[data-theme="dark"] .mspp-chat-input, html[data-theme="dark"] .mspp-idx-input,
html[data-theme="dark"] .mspr-search, html[data-theme="dark"] .mspr-ai-input, html[data-theme="dark"] .msv-textarea,
html[data-theme="dark"] .msv-sheet-input{ background:#1a1c2e !important; }
