
:root{--t-bg:#f5f6f8;--t-surface:#fff;--t-surface2:#f5f6f8;--t-text:#24272b;--t-muted:#707782;--t-line:#e6e8eb;--t-side:#24272b;--t-side-text:#d4d7db;--t-accent:#c99628;--t-accent-text:#191919;--t-soft:#fbf3e3;--t-soft-text:#936b20;--t-nav:#51462f;--t-nav-text:#f2cf82;--t-input:#fff;--t-head:#f5f6f7;color-scheme:light}
html[data-mp-theme="dark"]{--t-bg:#111923;--t-surface:#1c2837;--t-surface2:#263547;--t-text:#f0f4fa;--t-muted:#b4c1d0;--t-line:#3b4b5e;--t-side:#0d1520;--t-side-text:#d8e2ee;--t-accent:#e4b54e;--t-accent-text:#17202b;--t-soft:#344151;--t-soft-text:#f4d084;--t-nav:#5a4724;--t-nav-text:#ffe3a1;--t-input:#202e3f;--t-head:#29394b;color-scheme:dark}
html[data-mp-theme="blue"]{--t-bg:#eef3fa;--t-surface:#fff;--t-surface2:#f1f6fc;--t-text:#17304f;--t-muted:#60758f;--t-line:#d8e3f0;--t-side:#102e59;--t-side-text:#d9e8fa;--t-accent:#1263b1;--t-accent-text:#fff;--t-soft:#e5f0ff;--t-soft-text:#17599d;--t-nav:#174e8e;--t-nav-text:#fff;--t-input:#fff;--t-head:#eaf2fb;color-scheme:light}
html[data-mp-theme="green"]{--t-bg:#eef6f2;--t-surface:#fff;--t-surface2:#f3faf6;--t-text:#173d36;--t-muted:#59786e;--t-line:#d7e8df;--t-side:#103c3d;--t-side-text:#d9eee8;--t-accent:#177c59;--t-accent-text:#fff;--t-soft:#e1f4e9;--t-soft-text:#176d4f;--t-nav:#176e53;--t-nav-text:#fff;--t-input:#fff;--t-head:#e8f4ed;color-scheme:light}
/* A única camada cromática do sistema: inclui páginas e componentes montados dinamicamente. */
html body,html .main,html .content{background:var(--t-bg)!important;color:var(--t-text)!important}
html .sidebar{background:var(--t-side)!important;color:var(--t-side-text)!important}
html .sidebar .nav{color:var(--t-side-text)!important}
html .sidebar .nav.active,html .sidebar .nav:hover{background:var(--t-nav)!important;color:var(--t-nav-text)!important}
html .sidebar .nav-section{background:var(--t-nav)!important;color:var(--t-nav-text)!important}
html .top,html .tile,html .panel,html .empty,html .login-panel,html .lic-panel,html .org-form,html .mp-kpi,html .mp-report,html .alert-card,html .mp-emp-card,html .mp-theme-dialog,html .mp-theme-option{background:var(--t-surface)!important;color:var(--t-text)!important;border-color:var(--t-line)!important}
html .top,html .tile,html .panel,html .empty,html .lic-panel,html .org-form,html .mp-kpi,html .mp-report,html .mp-emp-table-2029 th,html .mp-emp-table-2029 td,html .org-table th,html .org-table td{border-color:var(--t-line)!important}
html .org-table th,html .mp-emp-table-2029 th,html thead th,html .mp-theme-option-preview{background:var(--t-head)!important;color:var(--t-text)!important}
html input:not([type="checkbox"]):not([type="radio"]),html select,html textarea,html .back,html .logout,html .org-tabs button,html .org-actions button,html .org-table button,html .lic-field input,html .lic-field select,html .lic-field textarea{background:var(--t-input)!important;color:var(--t-text)!important;border-color:var(--t-line)!important}
html input::placeholder,html textarea::placeholder{color:var(--t-muted)!important;opacity:1}
html .top p,html .tile p,html .alert p,html .footnote,html .mp-kpi small,html .mp-kpi>span,html .login-panel .form p,html .org-fields label,html .lic-field,html .status{color:var(--t-muted)!important}
html .symbol,html .chip{background:var(--t-soft)!important;color:var(--t-soft-text)!important}
html .primary,html .mp-theme-save{background:var(--t-accent)!important;color:var(--t-accent-text)!important;border-color:var(--t-accent)!important}
html .tile span:last-child,html .brand .mp{color:var(--t-accent)!important}
html .org-tabs button.org-selected{background:var(--t-soft)!important;color:var(--t-soft-text)!important;border-color:var(--t-accent)!important}
html .org-actions button:first-child{background:var(--t-accent)!important;color:var(--t-accent-text)!important}
html .tile:hover{border-color:var(--t-accent)!important}
html .mp-theme-trigger{width:auto!important;white-space:nowrap;padding:9px 12px;border:1px solid var(--t-line);border-radius:8px;background:var(--t-surface);color:var(--t-text);cursor:pointer;font-size:12px}
html .mp-theme-overlay{position:fixed;inset:0;background:#0009;z-index:2147483000;display:grid;place-items:center;padding:18px}
html .mp-theme-dialog{width:min(680px,100%);max-height:92vh;overflow:auto;border:1px solid var(--t-line);border-radius:16px;padding:24px;box-shadow:0 25px 80px #0005}
html .mp-theme-dialog h2{margin:0 0 6px;font-size:21px}html .mp-theme-dialog p{color:var(--t-muted);font-size:13px;margin:0 0 20px}
html .mp-theme-options{display:grid;grid-template-columns:repeat(2,minmax(0,1fr));gap:12px}
html .mp-theme-option{border:2px solid var(--t-line)!important;border-radius:12px;padding:10px;text-align:left;cursor:pointer}
html .mp-theme-option[aria-pressed="true"]{border-color:var(--t-accent)!important;box-shadow:0 0 0 2px var(--t-accent)}
html .mp-theme-option-preview{height:85px;display:flex;overflow:hidden;border-radius:7px;margin-bottom:10px}
html .mp-theme-option-preview i{display:block;width:26%}html .mp-theme-option-preview b{display:flex;flex:1;padding:9px;gap:7px;align-items:flex-start}html .mp-theme-option-preview em{display:block;flex:1;height:42px;border-radius:5px}
html .mp-theme-option strong{display:block;color:var(--t-text)}html .mp-theme-option small{color:var(--t-muted)}
html .mp-theme-footer{display:flex;justify-content:flex-end;gap:10px;margin-top:20px}html .mp-theme-footer button{width:auto!important;padding:10px 17px;border-radius:8px;border:1px solid var(--t-line);cursor:pointer}
@media(max-width:600px){html .mp-theme-options{grid-template-columns:1fr}html .mp-theme-trigger{margin:8px 0}}


/* v20.50: contrast repair for all four themes; inherit foreground from surface. */
html .tile,html .panel,html .lic-panel,html .org-form,html .mp-report,html .mp-kpi,html .alert-card,html .mp-emp-card,html .mp-theme-dialog,html .mp-theme-option { color:var(--t-text)!important; }
html .tile h1,html .tile h2,html .tile h3,html .tile h4,html .panel h1,html .panel h2,html .panel h3,html .panel h4,html .panel .section-title,html .lic-panel h1,html .lic-panel h2,html .lic-panel h3,html .org-form h1,html .org-form h2,html .mp-kpi strong,html .mp-report strong,html .mp-emp-card h2,html .mp-emp-card h3 { color:var(--t-text)!important; }
html .tile p,html .tile small,html .tile .muted,html .panel p,html .panel small,html .panel .admin-note,html .lic-panel p,html .lic-panel small,html .org-form p,html .org-form small,html .mp-report small,html .mp-emp-card p { color:var(--t-muted)!important; }
html .tile button:not(.primary),html .panel button:not(.primary):not(.mp-nat-danger),html .lic-panel button:not(.primary),html .mp-report button:not(.primary) { color:var(--t-text)!important; }
html .tile a,html .panel a,html .lic-panel a { color:var(--t-soft-text)!important; }
html .tile .symbol,html .tile .chip,html .panel .symbol,html .panel .chip { color:var(--t-soft-text)!important; }
html[data-mp-theme='dark'] .tile,html[data-mp-theme='dark'] .panel,html[data-mp-theme='dark'] .lic-panel,html[data-mp-theme='dark'] .mp-report { color-scheme:dark; }
html .mp-nat-icon,html .mp-nat-bulk,html .mp-nat-cancel { background:var(--t-surface)!important;color:var(--t-text)!important;border-color:var(--t-line)!important; }
html .mp-nat-danger {color:#b5252c!important;background:var(--t-surface)!important}
html[data-mp-theme='dark'] .mp-nat-danger {color:#ff9b9e!important}
html .mp-nat-modal {background:var(--t-surface)!important;color:var(--t-text)!important}
html .mp-nat-modal h2,html .mp-nat-modal label {color:var(--t-text)!important}
