/* ICY WIND ERP V36 — somente complemento visual. Tema claro = CSS aprovado. */
.erp-theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:6px;min-width:86px;width:auto!important;min-height:37px;border:1px solid #d9e4f3!important;border-radius:9px;background:#fff7e1!important;color:#644600!important;padding:0 10px!important;font-size:18px!important;white-space:nowrap}
.erp-theme-toggle .theme-label{font-size:11px;font-weight:850}
.erp-theme-toggle:hover{background:#ffe8a0!important}
@media(max-width:490px){.erp-theme-toggle{min-width:38px;padding:0 7px!important}.erp-theme-toggle .theme-label{display:none}}
html[data-erp-theme="dark"]{color-scheme:dark;--iw-bg:#0c121d;--iw-surface:#182233;--iw-surface-alt:#202d41;--iw-hover:#29384f;--iw-border:#35465f;--iw-text:#edf4ff;--iw-title:#fff5d8;--iw-muted:#bdcce1;--iw-yellow:#ffcc49;--iw-link:#87bdff;background:var(--iw-bg);color:var(--iw-text)}
html[data-erp-theme="dark"] body,html[data-erp-theme="dark"] .main-column,html[data-erp-theme="dark"] main{background:var(--iw-bg);color:var(--iw-text)}
html[data-erp-theme="dark"] .sidebar{background:linear-gradient(180deg,#070b14,#111a29 55%,#070d19);box-shadow:3px 0 20px #0005}
html[data-erp-theme="dark"] .sidebar .nav-item.active{color:#1b2430;background:linear-gradient(110deg,#ffe58f,#f7b829)}
html[data-erp-theme="dark"] .topbar{background:#141d2b;box-shadow:0 2px 18px #0005;border-bottom:1px solid var(--iw-border)}
html[data-erp-theme="dark"] .search-wrap,html[data-erp-theme="dark"] .search-results{background:var(--iw-surface-alt);border-color:var(--iw-border);color:var(--iw-text)}
html[data-erp-theme="dark"] .search-wrap input,html[data-erp-theme="dark"] .search-result{color:var(--iw-text)}
html[data-erp-theme="dark"] .search-wrap input::placeholder{color:#a1b3cb}
html[data-erp-theme="dark"] .search-result{background:transparent}
html[data-erp-theme="dark"] .search-result:hover,html[data-erp-theme="dark"] .top-icon:hover{background:var(--iw-hover)}
html[data-erp-theme="dark"] .top-icon,html[data-erp-theme="dark"] .user-name{color:var(--iw-text)}
html[data-erp-theme="dark"] .top-icon.help{border-color:#b4c7df}
html[data-erp-theme="dark"] .erp-theme-toggle{background:#362d1b!important;border-color:#80612a!important;color:#ffe0a0!important}
html[data-erp-theme="dark"] .erp-theme-toggle:hover{background:#4b3820!important}
html[data-erp-theme="dark"] .welcome h1,html[data-erp-theme="dark"] .section-page-title h1,html[data-erp-theme="dark"] .module-placeholder h1{color:var(--iw-title)}
html[data-erp-theme="dark"] .welcome p,html[data-erp-theme="dark"] .user-name small,html[data-erp-theme="dark"] .chart-footnote{color:var(--iw-muted)}
html[data-erp-theme="dark"] .date-badge,html[data-erp-theme="dark"] .online-badge{background:var(--iw-surface);border-color:var(--iw-border);color:var(--iw-muted)}
html[data-erp-theme="dark"] .metric,html[data-erp-theme="dark"] .panel,html[data-erp-theme="dark"] .op-card,html[data-erp-theme="dark"] .op-stat,html[data-erp-theme="dark"] .report-actions,html[data-erp-theme="dark"] .report-kpi,html[data-erp-theme="dark"] .report-panel,html[data-erp-theme="dark"] .saas-kpi,html[data-erp-theme="dark"] .saas-panel{background:var(--iw-surface);border-color:var(--iw-border);box-shadow:0 7px 20px #0003;color:var(--iw-text)}
html[data-erp-theme="dark"] .metric-people,html[data-erp-theme="dark"] .metric-products,html[data-erp-theme="dark"] .metric-receivable,html[data-erp-theme="dark"] .metric-payable,html[data-erp-theme="dark"] .metric-os,html[data-erp-theme="dark"] .metric-profit{background:linear-gradient(140deg,#19283e,#172234)}
html[data-erp-theme="dark"] .metric-title,html[data-erp-theme="dark"] .metric strong,html[data-erp-theme="dark"] .panel h2,html[data-erp-theme="dark"] .op-card h2,html[data-erp-theme="dark"] .sale-heading,html[data-erp-theme="dark"] .sale-toolbar h2,html[data-erp-theme="dark"] .report-panel h2,html[data-erp-theme="dark"] .report-section-title,html[data-erp-theme="dark"] .saas-panel h2,html[data-erp-theme="dark"] .saas-header h1,html[data-erp-theme="dark"] .log-form-card h3{color:var(--iw-title)}
html[data-erp-theme="dark"] .metric small,html[data-erp-theme="dark"] .panel h2 small,html[data-erp-theme="dark"] .forecast-box small,html[data-erp-theme="dark"] .op-muted,html[data-erp-theme="dark"] .op-empty,html[data-erp-theme="dark"] .op-toolbar .quick-info,html[data-erp-theme="dark"] .report-note,html[data-erp-theme="dark"] .report-panel h2 small,html[data-erp-theme="dark"] .saas-muted,html[data-erp-theme="dark"] .saas-header p{color:var(--iw-muted)}
html[data-erp-theme="dark"] .forecast-box,html[data-erp-theme="dark"] .profit-piece,html[data-erp-theme="dark"] .shortcut,html[data-erp-theme="dark"] .future-grid button,html[data-erp-theme="dark"] .op-detail-grid>div,html[data-erp-theme="dark"] .quote-due-panel,html[data-erp-theme="dark"] .quote-cost-summary,html[data-erp-theme="dark"] .quote-revision-box,html[data-erp-theme="dark"] .quote-share-panel,html[data-erp-theme="dark"] .company-print-preview,html[data-erp-theme="dark"] .sale-confirm,html[data-erp-theme="dark"] .report-status,html[data-erp-theme="dark"] .saas-note{background:var(--iw-surface-alt);border-color:var(--iw-border);color:var(--iw-text)}
html[data-erp-theme="dark"] .forecast-box:hover,html[data-erp-theme="dark"] .shortcut:hover,html[data-erp-theme="dark"] .future-grid button:hover{background:var(--iw-hover)}
html[data-erp-theme="dark"] .forecast-box strong,html[data-erp-theme="dark"] .op-detail-grid strong,html[data-erp-theme="dark"] .quote-due-head,html[data-erp-theme="dark"] .sale-date-line b{color:var(--iw-text)}
html[data-erp-theme="dark"] .profit-total,html[data-erp-theme="dark"] .op-total,html[data-erp-theme="dark"] .sale-grand,html[data-erp-theme="dark"] .log-cost-preview{background:#153c32;color:#b8f8d9}
html[data-erp-theme="dark"] .shortcut{color:var(--iw-text)}
html[data-erp-theme="dark"] .alert-row{background:#252b37;border-color:var(--iw-border);color:var(--iw-text)}
html[data-erp-theme="dark"] .chart-selectors select,html[data-erp-theme="dark"] .op-input,html[data-erp-theme="dark"] .op-select,html[data-erp-theme="dark"] .op-textarea,html[data-erp-theme="dark"] .op-search input,html[data-erp-theme="dark"] .report-actions input,html[data-erp-theme="dark"] .saas-form input,html[data-erp-theme="dark"] .saas-form select,html[data-erp-theme="dark"] .saas-form textarea,html[data-erp-theme="dark"] .report-actions select,html[data-erp-theme="dark"] #operationBody input:not([type="checkbox"]):not([type="radio"]),html[data-erp-theme="dark"] #operationBody textarea,html[data-erp-theme="dark"] #operationBody select{background:#101b2b;color:var(--iw-text);border-color:#4a5870}
html[data-erp-theme="dark"] input::placeholder,html[data-erp-theme="dark"] textarea::placeholder{color:#a1b2c9;opacity:1}
html[data-erp-theme="dark"] #operationBody label,html[data-erp-theme="dark"] .op-form label,html[data-erp-theme="dark"] .op-linehead label,html[data-erp-theme="dark"] .log-field,html[data-erp-theme="dark"] .sale-fields label,html[data-erp-theme="dark"] .sale-summary label,html[data-erp-theme="dark"] .report-actions label,html[data-erp-theme="dark"] .saas-form label{color:#d0dcef}
html[data-erp-theme="dark"] .op-btn:not(.main):not(.good):not(.danger),html[data-erp-theme="dark"] .op-row-actions button,html[data-erp-theme="dark"] .op-tabstrip button:not(.active),html[data-erp-theme="dark"] .outline-btn,html[data-erp-theme="dark"] .report-pills button,html[data-erp-theme="dark"] .saas-btn:not(.primary),html[data-erp-theme="dark"] .staff-tabs button:not(.active){background:var(--iw-surface-alt);color:#e2ecff;border-color:var(--iw-border)}
html[data-erp-theme="dark"] .op-btn.main{background:#ffcc49;color:#1b2532}
html[data-erp-theme="dark"] .op-btn.danger{background:#512b32;color:#ffc3c8;border-color:#854c56}
html[data-erp-theme="dark"] .op-btn.good{background:#173e32;color:#b6f1d0;border-color:#356953}
html[data-erp-theme="dark"] .op-tablewrap,html[data-erp-theme="dark"] .report-tables,html[data-erp-theme="dark"] .sale-results{border-color:var(--iw-border)}
html[data-erp-theme="dark"] .op-table thead,html[data-erp-theme="dark"] .report-tables th,html[data-erp-theme="dark"] .saas-table th{background:#24344c;color:#f0d490}
html[data-erp-theme="dark"] .op-table th,html[data-erp-theme="dark"] .op-table td,html[data-erp-theme="dark"] .report-tables th,html[data-erp-theme="dark"] .report-tables td,html[data-erp-theme="dark"] .saas-table th,html[data-erp-theme="dark"] .saas-table td{border-color:var(--iw-border)}
html[data-erp-theme="dark"] .op-table tbody tr:hover{background:var(--iw-hover)}
html[data-erp-theme="dark"] .report-tables td,html[data-erp-theme="dark"] .saas-table td,html[data-erp-theme="dark"] .saas-table td small{color:var(--iw-muted)}
html[data-erp-theme="dark"] .op-note,html[data-erp-theme="dark"] .staff-list-note,html[data-erp-theme="dark"] .saas-state,html[data-erp-theme="dark"] .fiscal-v18-box,html[data-erp-theme="dark"] .fiscal-gateway-message{background:#25364e;border-color:#47617f;color:#dceaff}
html[data-erp-theme="dark"] .op-goodnote{background:#143b30;color:#b1efd0;border-color:#336b56}
html[data-erp-theme="dark"] .op-warnnote,html[data-erp-theme="dark"] .fiscal-parts-warning,html[data-erp-theme="dark"] .staff-security-note{background:#44351e;color:#ffe1ac;border-color:#927242}
html[data-erp-theme="dark"] .op-badge,html[data-erp-theme="dark"] .log-status{background:#2d405b;color:#e2efff}
html[data-erp-theme="dark"] .op-badge.aprovado,html[data-erp-theme="dark"] .op-badge.finalizada,html[data-erp-theme="dark"] .log-concluida{background:#154638;color:#b5f5d5}
html[data-erp-theme="dark"] .op-badge.pendente,html[data-erp-theme="dark"] .op-badge.em-andamento,html[data-erp-theme="dark"] .log-pendente,html[data-erp-theme="dark"] .log-em_rota{background:#53401e;color:#ffe3a2}
html[data-erp-theme="dark"] .op-badge.recusado,html[data-erp-theme="dark"] .op-badge.cancelada,html[data-erp-theme="dark"] .log-cancelada{background:#532d36;color:#ffbdc7}
html[data-erp-theme="dark"] .sale-found,html[data-erp-theme="dark"] .saas-table button{background:#1b2b42;color:var(--iw-text);border-color:var(--iw-border)}
html[data-erp-theme="dark"] .sale-found:hover{background:var(--iw-hover)}
html[data-erp-theme="dark"] .sale-found small,html[data-erp-theme="dark"] .sale-sub{color:var(--iw-muted)}
html[data-erp-theme="dark"] #saasView{background:var(--iw-bg);color:var(--iw-text)}
html[data-erp-theme="dark"] .saas-kpi b,html[data-erp-theme="dark"] .report-kpi b{color:#ffe2a0}
html[data-erp-theme="dark"] .saas-kpi span,html[data-erp-theme="dark"] .report-kpi small{color:var(--iw-muted)}
html[data-erp-theme="dark"] .log-detail-text>p,html[data-erp-theme="dark"] .log-detail-text h3,html[data-erp-theme="dark"] .log-history li{color:var(--iw-text)}
html[data-erp-theme="dark"] .log-section,html[data-erp-theme="dark"] .log-history{border-color:var(--iw-border)}
html[data-erp-theme="dark"] .op-v23-dialog{background:var(--iw-surface);color:var(--iw-text)}
html[data-erp-theme="dark"] .icy-auth-card{background:#182333;color:var(--iw-text)}
html[data-erp-theme="dark"] .icy-auth-card h1,html[data-erp-theme="dark"] .icy-auth-card h2{color:var(--iw-title)}
html[data-erp-theme="dark"] .icy-auth-card label,html[data-erp-theme="dark"] .icy-auth-card p{color:var(--iw-muted)}
html[data-erp-theme="dark"] .icy-auth-card input{background:#111c2a;border-color:var(--iw-border);color:var(--iw-text)}
html[data-erp-theme="dark"] .icy-auth-card .icy-auth-caution{background:#3c2e1a;color:#ffe2ad;border-color:#72592e}
html[data-erp-theme="dark"] #revenueChart text{fill:#c3d3e9!important}
html[data-erp-theme="dark"] #revenueChart line{stroke:#40516a!important}
html[data-erp-theme="dark"] .chart-footnote,html[data-erp-theme="dark"] .alert-copy small{color:var(--iw-muted)}
/* PDFs e impressões permanecem com fundo branco e texto preto. */
@media print{
 html[data-erp-theme="dark"]{color-scheme:light!important}
 html[data-erp-theme="dark"] body,html[data-erp-theme="dark"] main,html[data-erp-theme="dark"] .op-card,html[data-erp-theme="dark"] .report-panel,html[data-erp-theme="dark"] .report-kpi,html[data-erp-theme="dark"] #printSheet{background:#fff!important;color:#111!important;box-shadow:none!important}
 html[data-erp-theme="dark"] .op-card *,html[data-erp-theme="dark"] .report-panel *,html[data-erp-theme="dark"] #printSheet *{color:#111!important}
 html[data-erp-theme="dark"] .sidebar,html[data-erp-theme="dark"] .topbar{display:none!important}
}
