/* Audited module-specific components. Screen-only: never recolor PDFs or printed forms. */
@media screen {
/* Solid primary red keeps white button labels above 4.5:1, including the light end of old gradients. */
html[data-ferro-theme=light] body.ferro-premium :is(button,.btn,.button,a.primary,button.primary,.primary-button,.action-link,.hero-button,.edit-employee-button){background:#bf1e3d!important;color:#fff!important;border-color:#a61936!important}
html[data-ferro-theme=light] body.ferro-premium :is(button.primary,a.primary,button.btn-primary,a.btn-primary)[class]{background:#bf1e3d!important;color:#fff!important;border-color:#a61936!important}
html[data-ferro-theme=light] body.ferro-premium :is(.secondary,.secondary-button,.btn-secondary,.btn-light,.btn-outline-secondary,.btn-outline-light,.btn-outline-primary,.btn-outline-success,.btn-outline-warning,.button.ghost,.qty button,.ferro-motion,.fp-motion-toggle){background:#e2edf9!important;color:#234c77!important;border-color:#9fb7d0!important;box-shadow:none!important}
html[data-ferro-theme=light] body.ferro-premium :is(.btn-success,.whatsapp,.btn-whatsapp,.button.wa){background:#176448!important;color:#fff!important;border-color:#15583d!important}
html[data-ferro-theme=light] body.ferro-premium :is(.btn-danger,.danger-button,.small-danger,.btn-outline-danger,.purchase-danger,.cl-button.cl-danger,.user-action-delete,.remove,.remove-item,.remove-pending-supplier,.payroll-remove,.delete-button){background:#a61936!important;color:#fff!important;border-color:#9d1838!important}
html[data-ferro-theme=light] body.ferro-premium .iw{--iw-muted:#405771!important;--iw-line:#b9cadf!important;--iw-panel:#fff!important}
/* Shared panels, client directory, reports, supplier requests and stock cards. */
html[data-ferro-theme=light] body.ferro-premium :is(.cl-card,.cl-stats article,.iw-card,.iw-wizard,.iw-product,.iw-filters,.iw-empty,.iw-metrics>a,.ipc-summary article,.ipc-guide article,.ipc-item,.ipc-readonly .ipc-item,.request-card,.contact-choice,.supplier-response details,.quote-state,.purchase-order-card,.client-group,.pg-provider,.method-fields,.fr-metric,.payroll-rate-box,.review-actions,.payment-pricing-help,.ferro-pdf-dialog){background:#fff!important;color:#14263d!important;border-color:#b9cadf!important;box-shadow:0 4px 16px #14263d0a}
html[data-ferro-theme=light] body.ferro-premium :is(.iw-hero,.fr-hero,.request-hero,.ipc-approval,.collection-discount,.caja-tax-controls,.purchase-dialog-head,.ferro-pdf-head){background:#edf3fa!important;color:#14263d!important;border-color:#a9bfd8!important}
html[data-ferro-theme=light] body.ferro-premium :is(.iw-card,.iw-product,.iw-metrics,.ipc-item,.ipc-summary,.pg-provider,.cl-card,.cl-stats,.request-card,.quote-state,.purchase-order-card,.fr-metric,.payroll-live-totals,.purchases,.metric-card) :is(strong,b,h1,h2,h3,h4,dt,dd){color:#14263d!important}
html[data-ferro-theme=light] body.ferro-premium :is(.cl-muted,.cl-card small,.cl-stats span,.cl-data dt,.iw p,.iw-helper,.iw-placeholder,.iw-product-stock span,.iw-product-label span,.iw-facts dt,.ib-values span,.ipc-count-card small,.ipc-count-card dt,.ipc-item-name span,.ipc-item-name small,.ipc-item label,.ipc-item .ipc-reason span,.ipc-save span,.ipc-pages span,.inventory-name-suggest>small,.inventory-suggestion-status,.inventory-category small,.expense-hint,.expense-data dt,.cd-muted,.treasury-hint,.caja-line small,.collection-tag,.collection-discount p,.collection-discount small,.pg-identity>span,.pg-amount small,.pg-explanation,.pg-help,.pg-scroll-note,.request-hero p,.request-card p,.request-card small,.section-heading p,.form-help,.contact-choice small,.supplier-response p,.comparison-item header small,.unselected-row,.purchase-order-card span,.product-photo small,.product .price small,.price-picker-help,.price-picked-info,.quote-description-count,.fr-report p,.fr-currency-title span,.fr-metric small,.fr-metric span,.fr-table small,.fr-account summary span,.payroll-rate-box p,.payroll-bcv .panel-actions>span,.metric-card span,.metric-card.primary span,.metric-card.primary small,.sidebar-brand span,.sidebar-section small,.sidebar-footer small){color:#405771!important}
html[data-ferro-theme=light] body.ferro-premium :is(.iw-eyebrow,.cd-type,.request-number,.selection-count,.cl-eyebrow,.fr-eyebrow){color:#a61936!important}
/* Form controls override local rules loaded inside a page body as well as global styles. */
html[data-ferro-theme=light] body.ferro-premium :is(.purchases,.cl-card,.collection-fields,.inventory-category,.price-picker-modal,.fr-report,.method-fields) :is(input:not([type=checkbox]):not([type=radio]),select,textarea){background:#fff!important;color:#14263d!important;border-color:#8fa8c3!important;color-scheme:light!important}
html[data-ferro-theme=light] body.ferro-premium[data-ferro-module=pagar] #paymentMethodForm :is(input,select){background:#fff!important;color:#14263d!important;border-color:#8fa8c3!important;color-scheme:light!important}
html[data-ferro-theme=light] body.ferro-premium[data-ferro-module=pagar] .method-fields :is(label,small){color:#405771!important}
html[data-ferro-theme=light] body.ferro-premium :is(.purchases label,.collection-fields label,.price-picker-filters label,.fr-report label,.request-form label,.contact-form label,.supplier-response label,.quote-link-form label){color:#14263d!important}
html[data-ferro-theme=light] body.ferro-premium :is(.purchases p,.purchases small){color:#405771!important}
html[data-ferro-theme=light] body.ferro-premium :is(.price-picker-modal,.method-fields,.fr-report) input::placeholder{color:#526b84!important}
html[data-ferro-theme=light] body.ferro-premium[data-ferro-module=pagar] #paymentMethodForm input::placeholder{color:#526b84!important}
/* Quotes: internal markup, item numbers, validation and catalog/inventory picker. */
html[data-ferro-theme=light] body.ferro-premium #quoteForm :is(.quote-profit-default,.quote-item-number){background:#edf3fa!important;color:#14263d!important;border-color:#a9bfd8!important}
html[data-ferro-theme=light] body.ferro-premium #quoteForm .quote-profit-help,html[data-ferro-theme=light] body.ferro-premium :is(#quoteItemCount,#priceProductStatus){color:#405771!important}
html[data-ferro-theme=light] body.ferro-premium :is(.price-picker-modal .modal-content,.price-picker-modal .price-result,.inventory-suggestion-list,.iw .inventory-suggestion-list button,#caja-search-results button){background:#f4f7fc!important;color:#14263d!important;border-color:#9fb7d0!important}
html[data-ferro-theme=light] body.ferro-premium :is(.price-picker-modal .price-result small,.inventory-suggestion-list small,.inventory-suggestion-list span){color:#405771!important}
html[data-ferro-theme=light] body.ferro-premium .price-picker-modal .price-result .price{color:#14263d!important}
html[data-ferro-theme=light] body.ferro-premium :is(.price-picker-modal .price-result:hover,.price-picker-modal .price-result:focus-visible,.iw .inventory-suggestion-list button:hover,.iw .inventory-suggestion-list button[aria-selected=true]){background:#dceafb!important;color:#14263d!important;border-color:#527da9!important}
html[data-ferro-theme=light] body.ferro-premium :is(.price-source,.cd-aliases span,#items .tag){background:#e2edf9!important;color:#234c77!important;border-color:#a9bfd8!important}
/* Bordered navigation and secondary buttons must remain readable without becoming primary actions. */
html[data-ferro-theme=light] body.ferro-premium :is(.iw-nav a,.iw-link-button,.cl-button.cl-secondary,.collection-discount .collection-fill,.pg-expand,.pg-view,.fr-report .fr-download,.fr-shortcuts a,.ferro-pdf-head button,.ferro-pdf-head a,.price-picker-modal .btn-close,.catalog-admin a.secondary,.ferro-back-toolbar .ferro-back-link){background:#e2edf9!important;color:#234c77!important;border-color:#9fb7d0!important;box-shadow:none!important;filter:none!important}
html[data-ferro-theme=light] body.ferro-premium .user-actions .user-action:not(.user-action-delete){background:#e2edf9!important;color:#234c77!important;border-color:#9fb7d0!important}
html[data-ferro-theme=light] body.ferro-premium :is(.iw-nav a:hover,.ferro-back-toolbar .ferro-back-link:hover,.fr-shortcuts a:hover){background:#d3e4f8!important;color:#14263d!important}
html[data-ferro-theme=light] body.ferro-premium :is(.pg-provider>summary,.fr-account summary,details summary){color:#14263d!important}
html[data-ferro-theme=light] body.ferro-premium :is(.pg-provider>summary:hover,.client-group>summary:hover){background:#edf3fa!important}
html[data-ferro-theme=light] body.ferro-premium .client-group>summary::before{color:#234c77!important}
/* Read-only fields, thumbnails and neutral wizard steps. Do not alter image pixels. */
html[data-ferro-theme=light] body.ferro-premium :is(.iw-thumb,.iw-summary-photo,.iw-detail-photo,.iw-photo-stage,.ipc-photo-empty,.ipc-item>img,.product-photo button,.product-photo .no-photo){background:#edf3fa!important;color:#405771!important;border-color:#9fb7d0!important}
html[data-ferro-theme=light] body.ferro-premium :is(.iw-photo-stage svg,.iw-empty>svg,.iw [data-photo-name]){color:#405771!important}
html[data-ferro-theme=light] body.ferro-premium .iw .iw-cutout-stage{background-color:#fff!important;background-image:linear-gradient(45deg,#dce6f0 25%,transparent 25%),linear-gradient(-45deg,#dce6f0 25%,transparent 25%),linear-gradient(45deg,transparent 75%,#dce6f0 75%),linear-gradient(-45deg,transparent 75%,#dce6f0 75%)!important}
html[data-ferro-theme=light] body.ferro-premium .iw-metrics svg{background:#e2edf9!important;color:#234c77!important;box-shadow:none!important}
html[data-ferro-theme=light] body.ferro-premium .iw-steps li{color:#405771!important;border-color:#b9cadf!important}
html[data-ferro-theme=light] body.ferro-premium .iw-steps li span{background:#e2edf9!important;color:#234c77!important}
html[data-ferro-theme=light] body.ferro-premium .iw-steps li.current{color:#a61936!important;border-color:#bc2342!important}
html[data-ferro-theme=light] body.ferro-premium .iw-steps li.current span{background:#a61936!important;color:#fff!important}
html[data-ferro-theme=light] body.ferro-premium :is(.payroll-entry-table input[readonly],.expense-page .expense-confirm){background:#e0f3e9!important;color:#15583d!important;border-color:#91c7ad!important}
html[data-ferro-theme=light] body.ferro-premium .payroll-entry-table td[data-label]::before{color:#405771!important}
html[data-ferro-theme=light] body.ferro-premium :is(.payroll-live-totals strong,.fr-account summary,.ipc-item label strong){color:#14263d!important}
html[data-ferro-theme=light] body.ferro-premium .payroll-bcv #payrollCopyNotice .action-link{background:#e2edf9!important;color:#234c77!important;border-color:#9fb7d0!important}
html[data-ferro-theme=light] body.ferro-premium .fr-table th{background:#e9f0f8!important;color:#314d70!important;border-color:#b9cadf!important}
/* Keep business meaning: warning=amber, error/overdue=red, paid/ready=green. */
html[data-ferro-theme=light] body.ferro-premium :is(.iw-notice,.ipc-note,.iw-tag.warn,.ipc-status,.expense-warning,.expense-state.pending,.collection-warning,.quote-form-errors,.status-borrador){background:#fff2d6!important;color:#775212!important;border-color:#c4a45f!important}
html[data-ferro-theme=light] body.ferro-premium :is(.iw-tag:not(.warn),.ipc-status.ready,.ipc-status.applied,.ipc-ready,.expense-state.posted,.success-note,.tag.good,.status-respondida,.status-con-respuestas,.status-ordenes-generadas){background:#e0f3e9!important;color:#15583d!important;border-color:#91c7ad!important}
html[data-ferro-theme=light] body.ferro-premium :is(.ipc-status.cancelled,.status-anulada,.status-anulado){background:#fde8ed!important;color:#9d1838!important;border-color:#d48b9d!important}
html[data-ferro-theme=light] body.ferro-premium :is(.ipc-done,.tag.fast,.status-enviada,.status-programada,.status-en-proceso){background:#e2edf9!important;color:#234c77!important;border-color:#9fb7d0!important}
html[data-ferro-theme=light] body.ferro-premium :is(.ib-ready,.iw-success-icon,.collection-preview,.price-picker-modal .price-stock,.pg-identity .pg-clear){color:#15583d!important}
html[data-ferro-theme=light] body.ferro-premium :is(.ib-issues,.cd-warning,.payroll-rate-warning,#quoteForm .quote-calc-status,.iw [data-photo-editor][aria-busy=true] [data-photo-name]){color:#775212!important}
html[data-ferro-theme=light] body.ferro-premium :is(.treasury-error,.iw-alert-text,.ipc-difference,.pg-identity .pg-overdue,.fr-table .fr-negative,#quoteForm .quote-field-error){color:#9d1838!important}
html[data-ferro-theme=light] body.ferro-premium .ib-issues a{color:#234c77!important}
html[data-ferro-theme=light] body.ferro-premium .comparison-table .is-selected{background:#e0f3e9!important;color:#15583d!important}
html[data-ferro-theme=light] body.ferro-premium :is(.purchase-dialog,#productImageDialog){background:#fff!important;color:#14263d!important;border-color:#9fb7d0!important}
html[data-ferro-theme=light] body.ferro-premium #productImageDialog p{color:#405771!important}
/* Visible focus and borders across every module. */
html[data-ferro-theme=light] body.ferro-premium :is(a,button,input,select,textarea,summary):focus-visible{outline:3px solid #285c96!important;outline-offset:2px}
}
