/* V1.7.87 — tema escuro. O modo claro mantém os estilos existentes. */
.vitro-theme-toggle{display:inline-flex;align-items:center;justify-content:center;gap:7px;white-space:nowrap;border:1px solid #cbd9d1;border-radius:8px;padding:8px 11px;background:#fff;color:#135e4a;font-weight:600;cursor:pointer}
.vitro-theme-toggle:hover{border-color:#008c73;background:#ecf8f3}
.vitro-theme-toggle:focus-visible{outline:3px solid #56bea6;outline-offset:2px}
.vitro-theme-toggle span:first-child{font-size:20px;line-height:1}
html[data-theme="escuro"]{color-scheme:dark;background:#101b1d;color:#e7f1ef}
html[data-theme="escuro"] body,html[data-theme="escuro"] main{background:#101b1d;color:#e7f1ef}
html[data-theme="escuro"] header,html[data-theme="escuro"] footer{background:#101b1d;color:#d2e4de;border-color:#334c49}
html[data-theme="escuro"] header p,html[data-theme="escuro"] .user small{color:#a7c0b9}
html[data-theme="escuro"] .sidebar{background:linear-gradient(150deg,#06271f,#07382c 50%,#06261e)}
html[data-theme="escuro"] .panel,html[data-theme="escuro"] .stat,html[data-theme="escuro"] .card,html[data-theme="escuro"] .modal,html[data-theme="escuro"] .modal-content,html[data-theme="escuro"] .dialog,html[data-theme="escuro"] .box,html[data-theme="escuro"] .table-wrap,html[data-theme="escuro"] .table-container,html[data-theme="escuro"] .vitro-notify-panel{background:#1b2b2d;color:#e7f1ef;border-color:#38504e;box-shadow:none}
html[data-theme="escuro"] .banner,html[data-theme="escuro"] .banner.glass,html[data-theme="escuro"] .banner.stone{background-color:#243d39;color:#eff9f5}
html[data-theme="escuro"] .banner .art{opacity:.45}
html[data-theme="escuro"] .stat .symbol{background:#264b40;color:#88dfba}
html[data-theme="escuro"] input,html[data-theme="escuro"] textarea,html[data-theme="escuro"] select,html[data-theme="escuro"] .header-right input{background:#162628;color:#eff9f5;border-color:#45605b}
html[data-theme="escuro"] input::placeholder,html[data-theme="escuro"] textarea::placeholder{color:#a2b8b3}
html[data-theme="escuro"] table,html[data-theme="escuro"] tbody,html[data-theme="escuro"] thead,html[data-theme="escuro"] tr,html[data-theme="escuro"] td,html[data-theme="escuro"] th{background-color:#1b2b2d;color:#e7f1ef;border-color:#38504e}
html[data-theme="escuro"] tr:nth-child(even) td{background-color:#223638}
html[data-theme="escuro"] .ghost,html[data-theme="escuro"] .vitro-theme-toggle,html[data-theme="escuro"] button:not(.primary):not(.active):not(.vitro-help-trigger):not(.vitro-help-whatsapp):not(.vitro-notify-trigger){background-color:#263b3d;color:#e5f2ee;border-color:#46615b}
html[data-theme="escuro"] .vitro-theme-toggle:hover,html[data-theme="escuro"] button:not(.primary):hover{background-color:#31514b}
html[data-theme="escuro"] .vitro-help-panel{background:#192a2b;color:#e7f1ef}
html[data-theme="escuro"] .vitro-help-header,html[data-theme="escuro"] .vitro-help-item{border-color:#3b5751}
html[data-theme="escuro"] .vitro-help-item,html[data-theme="escuro"] .vitro-help-article{background:#243b3b;color:#e7f1ef}
html[data-theme="escuro"] .vitro-help-item small,html[data-theme="escuro"] .vitro-help-header small{color:#b5c8c2}
html[data-theme="escuro"] .vitro-help-search-label input{background:#152628;color:#e7f1ef;border-color:#46615b}
html[data-theme="escuro"] .vitro-help-trigger{color:#0b5d4f}
html[data-theme="escuro"] a:not(.vitro-help-whatsapp){color:#7edbc3}
@media(max-width:700px){.vitro-theme-toggle{padding:7px 9px;gap:4px}.vitro-theme-toggle span:last-child{font-size:12px}}


/* V1.7.89 — Correção de contraste e superfícies no modo escuro.
   Todas as regras são restritas a data-theme=escuro; modo claro permanece intacto. */
html[data-theme="escuro"]{
  --dark-surface:#1b2b2d;--dark-raised:#24393a;--dark-border:#405955;
  --dark-text:#edf6f3;--dark-muted:#b7ccc6;--dark-accent:#79dec2;
}
html[data-theme="escuro"] #content,
html[data-theme="escuro"] .vitro-dashboard{color:var(--dark-text)}
/* Superfícies de todos os módulos, inclusive dashboard e cartões gerados via JS */
html[data-theme="escuro"] :is(.vitro-panel,.vitro-metric,.vitro-recent,.vitro-calc,.vitro-shortcuts,.vitro-shortcut-card,.vitro-calendar-compact,.vitro-alert,.vitro-goal,.vitro-middle,.vitro-upper,.vitro-rightstack,.vitro-row-secondary,.vitro-row-three,.pj-card,.pj-metrics>div,.st-metrics>div,.st-readonly,.prod-stock,.prod-tech-item,.fin-card,.fin-flow-summary>div,.order-payment-summary,.rp-metric,.rp-panel,.pricing-section,.pricing-preview,.model-form,.model-fields,.prod-create,.prod-edit,.price-modal,.price-modal-info,.commercial-info,.commercial-saved,.quote-area-preview,.quote-area-summary,.quote-composition-row td,.quote-total-highlight,.card-item,.panel,.stat,.login,.tabs,.tabs button,.quick button,.vitro-notify-item){
  background:var(--dark-surface)!important;color:var(--dark-text)!important;
  border-color:var(--dark-border)!important;box-shadow:none!important;
}
/* Elementos elevados e áreas de edição */
html[data-theme="escuro"] :is(.vitro-shortcut-card,.vitro-recent tbody tr:nth-child(even),.vitro-calc .tabs button,.pj-preview,.st-table th,.rp-table th,.fin-scroll th,.prod-material-table th,.model-list-table th,.order-items-table th,.vitro-day,.vitro-daylabel,.vitro-day-client,.vitro-calendar-compact button,.vitro-alert>div,.vitro-notify-item:hover){background:var(--dark-raised)!important;color:var(--dark-text)!important;border-color:var(--dark-border)!important}
/* Títulos, números e descrições com cores fixas no CSS legado */
html[data-theme="escuro"] #content :is(h1,h2,h3,h4,h5,h6,strong,b,label,legend,summary),
html[data-theme="escuro"] #content :is(.pj-metrics strong,.st-metrics strong,.fin-card strong,.fin-flow-summary strong,.rp-metric strong,.rp-head h2,.vitro-metric strong,.stat strong,.vitro-recent strong,.vitro-calc strong,.card-item h3){color:var(--dark-text)!important}
html[data-theme="escuro"] #content :is(small,.muted,.empty,.card-item p,.pj-metrics small,.st-metrics small,.fin-card small,.fin-flow-summary small,.fin-head p,.rp-metric small,.rp-metric span,.rp-toolbar small,.vitro-chart-empty,.vitro-calendar-compact small){color:var(--dark-muted)!important}
html[data-theme="escuro"] #content :is(p,span,div,td,th){border-color:var(--dark-border)}
/* Inputs e botões: manter estados primários, alertas e indicadores visíveis */
html[data-theme="escuro"] #content :is(input,select,textarea,option),
html[data-theme="escuro"] :is(.modal,.dialog,.price-modal,.vitro-help-panel) :is(input,select,textarea,option){background:#152729!important;color:#f2faf7!important;border-color:#56736b!important}
html[data-theme="escuro"] #content :is(.tabs button,.st-tabs button,.fin-tabs button,.rp-tabs button,.vitro-calc button:not(.primary),.secondary,.ghost){background:#29423f!important;color:#eaf8f2!important;border-color:#56736b!important}
html[data-theme="escuro"] #content :is(.tabs button.active,.st-tabs button.active,.fin-tabs button.active,.rp-tabs button.active){background:#14634e!important;color:white!important;border-color:#53a58c!important}
html[data-theme="escuro"] #content :is(.primary,button.primary){background:#087f64!important;color:#fff!important}
html[data-theme="escuro"] #content :is(.pill,.st-ok){background:#184d3e!important;color:#a3f0cd!important}
html[data-theme="escuro"] #content :is(.warning,.st-low,.rp-warning,.pj-error,.st-error,.fin-error){background:#493820!important;color:#ffdd99!important;border-color:#81663a!important}
html[data-theme="escuro"] #content :is(.st-empty,.error){color:#ffaaa6!important}
html[data-theme="escuro"] #content :is(.total,.quote-area-preview,.quote-area-summary,.commercial-saved){background:#194537!important;color:#c7f6e1!important}
/* Cabeçalhos de tabelas e linhas não devem permanecer brancos */
html[data-theme="escuro"] #content :is(table,thead,tbody,tr,td,th){color:var(--dark-text);border-color:var(--dark-border)}
html[data-theme="escuro"] #content :is(th,thead tr,thead td){background:#29423f!important;color:#e8f5ef!important}
html[data-theme="escuro"] #content tbody tr:nth-child(odd) td{background:#1b2b2d!important}
html[data-theme="escuro"] #content tbody tr:nth-child(even) td{background:#25393a!important}
html[data-theme="escuro"] #content tbody tr:hover td{background:#31504b!important}
/* Calendário e legendas de gráficos */
html[data-theme="escuro"] #content :is(.vitro-calendar-compact,.vitro-day,.vitro-daylabel,.vitro-days,.vitro-chart-empty,.vitro-welcome){color:var(--dark-text)!important}
html[data-theme="escuro"] #content :is(.vitro-calendar-compact,.vitro-day,.vitro-daylabel){border-color:var(--dark-border)!important}
html[data-theme="escuro"] #content :is(.vitro-recent,.vitro-calc,.vitro-panel,.vitro-metric) :is(small,p){color:var(--dark-muted)}
/* Preservar o documento de impressão e a marca da empresa */
html[data-theme="escuro"] .quote-paper,html[data-theme="escuro"] .quote-paper *{color:#172c25}
html[data-theme="escuro"] .quote-paper{background:#fff!important;border-color:#d8e4de!important}
html[data-theme="escuro"] .quote-paper th{background:#eaf3ee!important;color:#172c25!important}
html[data-theme="escuro"] .quote-paper td{background:#fff!important;color:#172c25!important}
html[data-theme="escuro"] .vitro-help-card{background:#e5f4f0!important;color:#08695f!important}
html[data-theme="escuro"] .vitro-help-trigger,html[data-theme="escuro"] .vitro-help-trigger *{color:#08695f!important}
html[data-theme="escuro"] .vitro-help-whatsapp{background:#25d366!important;color:white!important}
@media print{html[data-theme="escuro"] .quote-paper,html[data-theme="escuro"] .quote-paper *{color:#172c25!important}}

/* V1.7.89 — Produção: correção exclusiva do modo escuro. */
html[data-theme="escuro"] .prod-module :is(.prod-metric,.prod-order,.prod-create,.prod-stage-list,.prod-empty,.prod-stock,.prod-detail){background:#1b2b2d!important;color:#edf6f3!important;border-color:#405955!important;box-shadow:none!important}
html[data-theme="escuro"] .prod-module :is(.prod-metric small,.prod-stage-list small,.prod-order p,.prod-head small,.prod-bottom span,.prod-detail p){color:#b7ccc6!important}
html[data-theme="escuro"] .prod-module :is(.prod-metric strong,.prod-order strong,.prod-order b,.prod-stage-list b,.prod-detail b,.prod-detail h4){color:#edf6f3!important}
html[data-theme="escuro"] .prod-module .prod-detail{background:#24393a!important}
html[data-theme="escuro"] .prod-module .prod-status{background:#194c3e!important;color:#b5f1d5!important}
html[data-theme="escuro"] .prod-module .prod-progress{background:#36534c!important}
html[data-theme="escuro"] .prod-module .prod-progress>div{background:#00a394!important}
html[data-theme="escuro"] .prod-module .prod-stage-list span{background:#194c3e!important;color:#a8ead1!important}
html[data-theme="escuro"] .prod-module :is(.prod-items-table table,.prod-items-table td,.prod-stock table,.prod-stock td){background:#1b2b2d!important;color:#edf6f3!important;border-color:#405955!important}
html[data-theme="escuro"] .prod-module :is(.prod-items-table th,.prod-stock th){background:#29423f!important;color:#edf6f3!important;border-color:#405955!important}
html[data-theme="escuro"] .prod-module .prod-warning{background:#493820!important;color:#ffdd99!important;border-color:#81663a!important}
html[data-theme="escuro"] .prod-module :is(input,select,textarea){background:#152729!important;color:#f2faf7!important;border-color:#56736b!important}
html[data-theme="escuro"] .prod-module :is(input::placeholder,textarea::placeholder){color:#a7c0b8!important}
/* No modo claro, todas as regras anteriores permanecem inalteradas. */

/* V1.8.00 - padrao de icone de impressao */
button:has(> .vitro-printer-icon){display:inline-flex;align-items:center;justify-content:center;gap:7px}
.vitro-printer-icon{display:inline-block;flex:none;vertical-align:middle}
