html[data-theme="light"] { color-scheme: light; }

.theme-selector {
    display: inline-flex;
    flex-shrink: 0;
    align-items: center;
    max-width: 100%;
    margin: .5rem .75rem;
    padding: 2px;
    border: 1px solid var(--bs-border-color, #ced4da);
    border-radius: 999px;
    background: var(--bs-body-bg, #fff);
    color: var(--bs-body-color, #495057);
}
.theme-option {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    width: 44px;
    height: 44px;
    padding: 0;
    border: 0;
    border-radius: 50%;
    background: transparent;
    color: inherit;
}
.theme-option:hover { background: var(--theme-soft, #e9ecef); }
.theme-option[aria-pressed="true"] { background: var(--primary-action, #0d6efd); color: #fff; }
.theme-option:focus-visible { outline: 2px solid var(--theme-accent, var(--primary, #0d6efd)); outline-offset: 2px; }
.panel-profile-menu .theme-selector { background: #212529; color: #fff; border-color: #6c757d; }

html[data-theme="dark"] {
    color-scheme: dark;
    --theme-bg: #12181f;
    --theme-surface: #1c252f;
    --theme-soft: #26323e;
    --theme-border: #465563;
    --theme-text: #e6edf3;
    --theme-muted: #b0bdc9;
    --theme-accent: #a4d85d;
    --theme-success: #7ddba4;
    --theme-success-bg: #203d30;
    --theme-success-hover-bg: #1e4e35;
    --theme-success-hover-text: #dbffe8;
    --theme-warning: #ffe29a;
    --theme-warning-bg: #443915;
    --theme-warning-hover-bg: #58491b;
    --theme-warning-hover-text: #fff1c6;
    --theme-danger: #ff9e9e;
    --theme-danger-bg: #442629;
    --theme-danger-hover-bg: #642934;
    --theme-danger-hover-text: #ffe0e0;
    --theme-info: #80d1e5;
    --theme-info-bg: #173940;
    --theme-info-text: #c8eff5;
    --bs-body-bg: var(--theme-bg);
    --bs-body-bg-rgb: 18, 24, 31;
    --bs-body-color: var(--theme-text);
    --bs-body-color-rgb: 230, 237, 243;
    --bs-border-color: var(--theme-border);
    --bs-border-color-translucent: var(--theme-border);
    --bs-link-color: var(--theme-accent);
    --bs-link-hover-color: var(--theme-text);
    --bs-heading-color: var(--theme-text);
    --bs-secondary-color: var(--theme-muted);
    --bs-tertiary-bg: var(--theme-soft);
    --light: var(--theme-soft);
    --dark: var(--theme-text);
    --text-dark: var(--theme-text);
    --text-muted: var(--theme-muted);
    --body-color: var(--theme-text);
    --headings-color: var(--theme-text);
    --border-light: var(--theme-border);
    --surface: var(--theme-surface);
    --surface-soft: var(--theme-soft);
    --primary-soft: #2b3d24;
    --expected-delivery-color: var(--theme-info);
    --panel-border: var(--theme-border);
    --panel-muted: var(--theme-muted);
    --panel-surface: var(--theme-bg);
    --datatable-border: var(--theme-border);
    --datatable-surface: var(--theme-surface);
    --datatable-surface-soft: var(--theme-soft);
    --datatable-text: var(--theme-text);
    --datatable-muted: var(--theme-muted);
    --datatable-accent: var(--theme-accent);
    --datatable-accent-dark: var(--theme-accent);
    --datatable-accent-soft: var(--primary-soft);
    --selection-border: var(--theme-border);
    --selection-surface: var(--theme-soft);
    --selection-text: var(--theme-text);
    --selection-accent: var(--theme-accent);
    --selection-accent-dark: var(--theme-accent);
    --selection-accent-soft: var(--primary-soft);
    --page-loading-background: var(--theme-bg);
    --page-loading-glow: var(--theme-soft);
    --page-loading-text: var(--theme-text);
    --page-loading-muted: var(--theme-muted);
    --page-loading-track: var(--theme-border);
    --page-loading-primary: var(--theme-accent);
    background: var(--theme-bg);
}
html[data-theme="dark"]:is(.theme-admin, .theme-dropshipping) {
    --theme-accent: #8dbbff;
    --primary-soft: #223b5c;
}
html[data-theme="dark"] :is(body, .client-page, .documents-page, .search-content-wrapper,
    .data-page-bg, .cart-page, .contact-page, .order-detail, .order-line-summary) {
    background-color: var(--theme-bg);
    color: var(--theme-text);
}
html[data-theme="dark"] :is(.catalog-page, .search-page) {
    --search-border: var(--theme-border);
    --search-background: var(--theme-bg);
}
html[data-theme="dark"] .auth-login {
    --auth-primary: var(--primary-action-hover);
    --auth-text: var(--theme-text);
    --auth-muted: var(--theme-muted);
    --auth-border: var(--theme-border);
    --auth-surface: var(--theme-soft);
    --login-tint: var(--theme-border);
    --login-surface: var(--theme-soft);
}
html[data-theme="dark"] .security-page {
    --security-accent: var(--theme-accent);
    --security-border: var(--theme-border);
    --security-muted-bg: var(--theme-soft);
    color: var(--theme-text);
}
html[data-theme="dark"] .report-page {
    --report-primary: var(--primary-action-hover);
    --report-border: var(--theme-border);
    background: var(--theme-bg);
}
html[data-theme="dark"] .report-page .report-field-icon { color: var(--theme-accent); }
html[data-theme="dark"] .report-page .report-info { background: var(--theme-info-bg); color: var(--theme-text); }
html[data-theme="dark"] .report-page .report-success { background: var(--theme-success-bg); color: var(--theme-text); }
html[data-theme="dark"] .report-page .alert-danger { background: var(--theme-danger-bg); color: var(--theme-danger); border-color: #81505a; }
html[data-theme="dark"] .profile-page :is(.contact-item, .icon-wrapper) { background: var(--theme-soft); }
html[data-theme="dark"] .profile-page .contact-item:hover { background: var(--primary-soft); }
html[data-theme="dark"] .profile-page :is(.icon-wrapper, .contact-item i) { color: var(--theme-accent); }
html[data-theme="dark"] .profile-page .info-label { color: var(--theme-muted); }
html[data-theme="dark"] .profile-page .alert-info { background: var(--theme-soft) !important; color: var(--theme-text); }

/* Bootstrap 5.2 and the store template use fixed light surfaces. */
html[data-theme="dark"] :is(.bg-white, .bg-light) {
    background-color: var(--theme-surface) !important;
}
html[data-theme="dark"] :is(.fixed-top, .page-header.cart-page-header) {
    background: var(--theme-surface);
    border-color: var(--theme-border);
}
html[data-theme="dark"] .page-header.cart-page-header h1 { color: var(--theme-text); }
html[data-theme="dark"] .page-header.cart-page-header p { color: var(--theme-muted); }
html[data-theme="dark"] .cart-page-header h1 i { color: var(--theme-accent); }
html[data-theme="dark"] :is(.hero-alternative, .sales-rankings, .ranking-header,
    .initial-state-container, .ranking-placeholder-image) {
    background: var(--theme-soft);
    border-color: var(--theme-border);
}
html[data-theme="dark"] .ranking-placeholder-copy {
    background: linear-gradient(var(--theme-border) 0 12px, transparent 12px 20px, var(--theme-soft) 20px);
}
html[data-theme="dark"] :is(.ranking-eyebrow, .hero-btn-onsale-outline, .hero-btn-outlet-outline,
    .initial-state-icon i, .clickable-card h4) { color: var(--theme-accent); }
html[data-theme="dark"] .clickable-feature:hover .clickable-card { background: var(--theme-soft) !important; }
html[data-theme="dark"] .ranking-product-button:is(:hover, :focus-visible) { background: var(--theme-soft); }
html[data-theme="dark"] .category-pill.active {
    background: linear-gradient(135deg, var(--primary-action), var(--primary-action-hover));
    color: #fff;
    border-color: var(--theme-accent);
}
html[data-theme="dark"] .category-pill:is(:hover, :focus-visible):not(.active) {
    color: var(--theme-accent);
    border-color: var(--theme-accent);
}
html[data-theme="dark"] .clickable-feature:is(:hover, :focus-visible) .clickable-card h5 { color: var(--theme-accent); }
html[data-theme="dark"] :is(.subsection-card, .subsection-image-wrap, .ranking-product img, .category-pill, .ranking-position) {
    background: var(--theme-surface);
    border-color: var(--theme-border);
}
html[data-theme="dark"] :is(.category-pill, .ranking-position) { color: var(--theme-text); }
html[data-theme="dark"] .subsection-code { background: var(--theme-soft); color: var(--theme-accent); }
html[data-theme="dark"] .subsection-action { color: var(--theme-accent); }
html[data-theme="dark"] .ranking-position.is-top {
    background: linear-gradient(135deg, #ffb300, #f57c00);
    color: #3f2d00;
}
html[data-theme="dark"] .auth-login .change-email-btn { background: var(--theme-surface); color: var(--theme-accent); }
html[data-theme="dark"] .auth-login .change-email-btn:hover { background: var(--theme-soft); }
html[data-theme="dark"] :is(.card, .modal-content, .offcanvas, .dropdown-menu, .list-group-item,
    .accordion-item, .accordion-button, .popover, .toast, .document-action-dialog,
    .product-card, .search-product-shell, .search-empty-state, .search-filters-panel,
    .similar-product-card, .clients-table-shell, .customer-panel, .client-invoice-card,
    .tracking-panel, .selection-card, .user-info-card, .contact-panel, .category-panel,
    .feature-item, .floating-icon, .order-panel,
    .cart-checkout-bar, .cart-selection-bar, .cart-confirmation-summary,
    .hero-btn-onsale-outline, .hero-btn-outlet-outline,
    .search-results-toolbar, .search-presentation-options summary, .search-filter-chip,
    .similar-quantity-control, .login-loading, .accordion-catalogue .accordion-body) {
    background: var(--theme-surface);
    color: var(--theme-text);
    border-color: var(--theme-border);
    --bs-card-bg: var(--theme-surface);
    --bs-card-color: var(--theme-text);
    --bs-modal-bg: var(--theme-surface);
    --bs-modal-color: var(--theme-text);
    --bs-dropdown-bg: var(--theme-surface);
    --bs-dropdown-color: var(--theme-text);
    --bs-dropdown-link-color: var(--theme-text);
    --bs-dropdown-link-hover-bg: var(--theme-soft);
    --bs-dropdown-link-hover-color: var(--theme-text);
    --bs-dropdown-link-disabled-color: var(--theme-muted);
}
html[data-theme="dark"] main .card-header:not(.bg-primary),
html[data-theme="dark"] :is(.card-footer, .modal-footer, .toast-header, .input-group-text, .documents-initial-state,
    .document-email-summary, .tracking-data-item, .search-filters-heading, .search-load-more,
    .price-changes-summary, .login-email-summary) {
    background: var(--theme-soft);
    color: var(--theme-text);
    border-color: var(--theme-border);
}
html[data-theme="dark"] :is(h1, h2, h3, h4, h5, h6, .product-title, .dropdown-item,
    .form-label, .form-floating > label, .security-help summary, .document-action-dialog h2,
    .document-action-dialog h3, .documents-initial-state h3) { color: var(--theme-text); }
html[data-theme="dark"] main :is(h1, h2, h3, h4) { color: var(--theme-text); }
html[data-theme="dark"] :is(.text-dark, .text-body) { color: var(--theme-text) !important; }
html[data-theme="dark"] :is(.text-muted, .text-secondary, .text-black-50) { color: var(--theme-muted) !important; }
html[data-theme="dark"] :is(.text-primary, .link-primary) { color: var(--theme-accent) !important; }
html[data-theme="dark"] :is(a:not(.btn):not(.badge):not(.nav-link):not(.dropdown-item):not(.text-white):where(:not(.alert-link)), .btn-link) { color: var(--theme-accent); }
html[data-theme="dark"] :is(.navbar-light .navbar-nav .nav-link, .product-title a) { color: var(--theme-text); }
html[data-theme="dark"] :is(.documents-initial-state p, .document-recovery-dialog p,
    .security-page-heading p, .search-empty-state p, .search-results-status) { color: var(--theme-muted); }
html[data-theme="dark"] :is(.user-info-card .info-value, .form-group label,
    .cart-product-meta, .cart-tool-heading, .cart-info-summary, .cart-selection-count,
    .cart-summary-total, .cart-checkout-label, .cart-checkout-total, .cart-summary-link,
    .cart-item-label, .cart-unit-price, .cart-confirmation-facts dt, .cart-confirmation-facts dd,
    .cart-description-column > .fw-bold, .cart-item-price .price:not(.text-danger):not(.text-muted),
    .cart-item-discount .discount, .cart-item-total .total, .contact-section-heading p,
    .contact-counter, .contact-privacy, .product-quantity-control label span) { color: var(--theme-text); }
html[data-theme="dark"] .text-success { color: var(--theme-success) !important; }
html[data-theme="dark"] .text-danger { color: var(--theme-danger) !important; }
html[data-theme="dark"] .text-info { color: var(--theme-info) !important; }

html[data-theme="dark"] :is(.form-control, .form-select, .dt-input,
    .select2-container--default .select2-selection--single,
    .select2-container--default .select2-selection--multiple, .select2-dropdown,
    .select2-search__field, #searchFormHeader .search-input-shell,
    #searchFormHeader .search-clear-query, #modalShowUser input[readonly]) {
    background-color: var(--theme-surface);
    color: var(--theme-text);
    border-color: var(--theme-border);
}
html[data-theme="dark"] :is(.form-select, .select2) {
    --bs-form-select-bg-img: url("data:image/svg+xml,%3csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3e%3cpath fill='none' stroke='%23e6edf3' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-image: var(--bs-form-select-bg-img);
}
html[data-theme="dark"] .select2 {
    background-color: var(--theme-surface);
    color: var(--theme-text);
    border-color: var(--theme-border);
}
html[data-theme="dark"] .select2-container--default .select2-selection--single .select2-selection__rendered { color: var(--theme-text) !important; }
html[data-theme="dark"] .select2-container--disabled .select2-selection { background-color: var(--theme-soft) !important; color: var(--theme-muted); }
html[data-theme="dark"] .select2-container--focus .select2-selection,
html[data-theme="dark"] .select2-container--open .select2-selection { outline: 2px solid var(--theme-accent); outline-offset: 2px; }
html[data-theme="dark"] :is(.form-control, .select2-search__field)::placeholder { color: var(--theme-muted); opacity: 1; }
html[data-theme="dark"] :is(.form-control:disabled, .form-control[readonly], .form-select:disabled) { background-color: var(--theme-soft); }
html[data-theme="dark"] .select2-container--default .select2-selection__rendered { color: var(--theme-text); }
html[data-theme="dark"] .select2-container--default .select2-selection__choice { background: var(--theme-soft); color: var(--theme-text); }
html[data-theme="dark"] :is(.form-control, .form-select):focus {
    border-color: var(--theme-accent);
    box-shadow: 0 0 0 .2rem rgba(141, 187, 255, .25);
}
html[data-theme="dark"] :is(button, a, input, select, textarea):focus-visible { outline-color: var(--theme-accent); }
html[data-theme="dark"] .btn-close:not(.btn-close-white) { filter: invert(1) grayscale(100%) brightness(200%); }
html[data-theme] .btn:is(.bg-white, .bg-light) { color: var(--theme-text, #49545d); }
html[data-theme] .btn:is(.bg-white, .bg-light):is(:hover, :focus-visible, :active):not(:disabled):not(.disabled) {
    background-color: var(--theme-soft, #e9ecef) !important;
    color: var(--theme-text, #49545d);
}

html[data-theme="dark"] .table,
html[data-theme="dark"] :is(.table-light, .table-success, .table-danger, .table-warning, .table-info, .table-primary, .table-secondary) {
    --bs-table-bg: var(--theme-surface);
    --bs-table-color: var(--theme-text);
    --bs-table-striped-bg: var(--theme-soft);
    --bs-table-striped-color: var(--theme-text);
    --bs-table-hover-bg: var(--theme-soft);
    --bs-table-hover-color: var(--theme-text);
    --bs-table-active-bg: var(--theme-soft);
    --bs-table-active-color: var(--theme-text);
    --bs-table-border-color: var(--theme-border);
    color: var(--theme-text);
    border-color: var(--theme-border);
}
html[data-theme="dark"] .table > :not(caption) > * > * { color: var(--bs-table-color); background-color: var(--bs-table-bg); border-color: var(--theme-border); }
html[data-theme="dark"] .table-light { --bs-table-bg: var(--theme-soft); }
html[data-theme="dark"] :is(.page-link, .btn-light, .btn-outline-secondary, .btn-outline-dark) {
    color: var(--theme-text);
    background-color: var(--theme-surface);
    border-color: var(--theme-border);
}
html[data-theme="dark"] :is(.page-link, .btn-light, .btn-outline-secondary, .btn-outline-dark):is(:hover, :focus-visible) { background-color: var(--theme-soft); color: var(--theme-text); }
html[data-theme="dark"] :is(.active > .page-link, .page-link.active) { background: var(--primary-action); color: #fff; }
html[data-theme="dark"] div.dt-container .dt-paging .dt-paging-button:is(.current, :hover:not(.disabled)) { color: #12181f !important; }
html[data-theme="dark"] .dt-container .dt-processing { background: var(--theme-surface); }
html[data-theme="dark"] .dt-container table.dataTable tbody td { border-color: var(--theme-border) !important; }
html[data-theme="dark"] .dt-container table.dataTable:is(.stripe, .display) > tbody > tr:nth-child(odd) > * {
    box-shadow: inset 0 0 0 9999px var(--theme-soft);
}
html[data-theme="dark"] .dt-container table.dataTable:is(.hover, .display) > tbody > tr:hover > * {
    box-shadow: inset 0 0 0 9999px var(--primary-soft);
}
html[data-theme="dark"] .security-steps [aria-current="step"] span { color: var(--theme-bg); }
@media (max-width: 767.98px) {
    html[data-theme="dark"] .panel-record-table tbody tr { background: var(--theme-surface); }
    html[data-theme="dark"] .panel-record-table tfoot { background: var(--theme-soft); }
    html[data-theme="dark"] .panel-record-table .panel-cell-identity { color: var(--theme-text); border-color: var(--theme-border); }
}
html[data-theme="dark"] :is(#trackingModal .tracking-panel, #trackingModal .tracking-data-item,
    #confirmOrderModal .shipping-benefit-card, .cart-page .cart-products-table .quantity,
    .cart-page .cart-products-table thead th, .order-mobile-table .mobile-card > td,
    .order-product-row > td, .search-product-pricing, .product-card > .p-3 > .border-bottom) {
    background: var(--theme-surface);
    color: var(--theme-text);
    border-color: var(--theme-border);
}
html[data-theme="dark"] :is(.cart-page table tbody tr:hover td, .cart-page .quantity .btn) { background: var(--theme-soft); color: var(--theme-text); }
html[data-theme="dark"] .cart-page table thead th {
    --bs-table-bg: var(--theme-soft);
    background: var(--theme-soft) !important;
    color: var(--theme-text);
    border-color: var(--theme-border);
}
html[data-theme="dark"] .cart-page #envioGratisAlmacen {
    background-color: var(--theme-soft) !important;
    color: var(--theme-text);
}
html[data-theme="dark"] .cart-page .cart-products-table :is(.discount, .total) { color: var(--theme-text); }
html[data-theme="dark"] .cart-page .delete-item {
    background: var(--theme-surface);
    color: var(--theme-danger);
    border: 1px solid #9f5f66;
    box-shadow: none;
}
html[data-theme="dark"] .cart-page .delete-item:is(:hover, :focus-visible, :active) {
    background: #4a2429;
    color: #ffc3c3;
    border-color: #e99c9c;
}
html[data-theme="dark"] :is(.search-content-wrapper, .catalog-products) :is(.show-similar-btn, .tramos-link) { background: var(--theme-surface); color: var(--theme-accent); }
html[data-theme="dark"] .login-loading {
    --login-tint: var(--theme-border);
    --login-surface: var(--theme-soft);
}
html[data-theme="dark"] .login-loading::backdrop { background: rgb(18 24 31 / 96%); }
html[data-theme="dark"] .auth-login .form-control:focus { background: var(--theme-surface); color: var(--theme-text); }

html[data-theme="dark"] .navbar .nav-item:hover .dropdown-menu { background: var(--theme-surface) !important; }
html[data-theme="dark"] .navbar .dropdown-menu a:hover {
    background: var(--theme-soft);
    color: var(--theme-accent);
}
html[data-theme="dark"] :is(.search-filters-heading h2, .search-filter-group summary) { color: var(--theme-text); }
html[data-theme="dark"] :is(.search-toolbar-group legend, .search-active-filters-label) { color: var(--theme-text); }
html[data-theme="dark"] :is(.search-clear-filters, .search-load-more) { color: var(--theme-muted); }
html[data-theme="dark"] .search-clear-filters:is(:hover, :focus-visible),
html[data-theme="dark"] .search-filter-chip:is(:hover, :focus-visible) {
    background: var(--theme-soft);
    color: var(--theme-accent);
}
html[data-theme="dark"] .search-load-more .btn {
    background: var(--theme-surface);
    color: var(--theme-accent);
    border-color: var(--theme-border);
}
html[data-theme="dark"] .search-load-more .btn:is(:hover, :focus-visible) { background: var(--theme-soft); color: var(--theme-accent); }
html[data-theme="dark"] .search-presentation-group #toggle-view[aria-pressed="true"] {
    background: var(--theme-soft);
    color: var(--theme-accent);
    border-color: var(--theme-accent);
}
html[data-theme="dark"] #filtersBlock :is(.select2, .select2-selection, .select2-dropdown, .select2-search__field, .select2-results) {
    background-color: var(--theme-surface);
    color: var(--theme-text);
    border-color: var(--theme-border);
}
html[data-theme="dark"] #filtersBlock .select2-selection__choice { background: var(--theme-soft); color: var(--theme-text); border-color: var(--theme-border); }
html[data-theme="dark"] #filtersBlock .select2-container--focus .select2-selection { outline-color: var(--theme-accent); }
html[data-theme="dark"] .cart-info-badge { background: var(--primary-soft) !important; border-color: var(--theme-border) !important; }
html[data-theme="dark"] .cart-info-badge::before { color: var(--theme-text); }
html[data-theme="dark"] .cart-info-badge .cart-reduce-btn { background: transparent; color: var(--theme-danger); border-color: currentColor; }
html[data-theme="dark"] .cart-info-badge .cart-reduce-btn:is(:hover, :focus-visible) { background: #4a2429; color: #ffc3c3; }
html[data-theme="dark"] :is(.product-quantity-control, .similar-quantity-control) button { color: var(--theme-accent); }
html[data-theme="dark"] :is(.product-quantity-control, .similar-quantity-control) button:is(:hover, :focus-visible):not(:disabled) { background: var(--primary-action); color: #fff; }
html[data-theme="dark"] :is(.product-quantity-control, .similar-quantity-control) button:disabled { background: var(--theme-soft); color: var(--theme-muted); }
html[data-theme="dark"] #imageViewerModal :is(.viewer-thumbnail, #imageViewerCarousel .carousel-item img) { background: var(--theme-surface); }
html[data-theme="dark"] #imageViewerModal .viewer-thumbnail.active { border-color: var(--theme-accent); }
html[data-theme="dark"] .select2-container--default :is(.select2-search__field, .select2-selection__placeholder,
    .select2-selection__clear, .select2-selection__choice__remove) { color: var(--theme-muted); }
html[data-theme="dark"] .select2-container--default .select2-selection__choice__remove:hover {
    background: var(--theme-soft);
    color: var(--theme-text);
}
html[data-theme="dark"] .select2-container--default :is(.select2-results__option--selected,
    .select2-results__option[aria-selected="true"]) { background: var(--theme-soft); color: var(--theme-text); }
html[data-theme="dark"] .select2-container--default .select2-results__option--highlighted[aria-selected] {
    background: var(--primary-action);
    color: #fff;
}
html[data-theme="dark"] .select2-container--default .select2-results__option--disabled { color: var(--theme-muted); }
html[data-theme="dark"] :is(.product-image-wrapper, .open-article-modal, .open-article-modal img,
    .product-image-wrapper img, .similar-product-image) {
    background: var(--theme-surface) !important;
    border-color: var(--theme-border) !important;
}
html[data-theme="dark"] #articleInfoModal {
    --article-detail-heading: var(--theme-text);
    --bs-primary: var(--theme-accent);
}
html[data-theme="dark"] #articleInfoModal :is(.price-box, .product-price, .action-box,
    .qty-box, .description-box, .dimensions-box, .article-discount-card, .info-badge, .brand-badge) {
    background: var(--theme-soft) !important;
    border-color: var(--theme-border) !important;
    color: var(--theme-text);
}
html[data-theme="dark"] #articleInfoModal :is(#articleCarousel, #articleCarousel .carousel-item img,
    #articleThumbnails img) { background: var(--theme-surface); }
html[data-theme="dark"] #articleInfoModal :is(#articleInfoPrice, .qty-input) { color: var(--theme-text) !important; }
html[data-theme="dark"] #articleInfoModal :is(.article-price-label, #articleInfoPrice.article-price-previous) { color: var(--theme-muted) !important; }
html[data-theme="dark"] #articleInfoModal :is(.article-discount-row strong, .qty-btn) { color: var(--theme-accent); }
html[data-theme="dark"] #articleInfoModal #articleInfoRetailPrice { color: var(--theme-danger); }
html[data-theme="dark"] #articleInfoModal .product-summary { border-color: var(--theme-border) !important; }
html[data-theme="dark"] :is(.similar-products-loading, .document-recovery-art, .document-mail-art) { background: var(--theme-soft); }
html[data-theme="dark"] :is(.bg-primary, .bg-success, .bg-danger, .bg-dark, .bg-secondary):is(.modal-header, .card-header) :is(h2, h3, h4, h5, h6) { color: #fff; }
html[data-theme="dark"] .auth-login .auth-login-card > .card-header h3 { color: #fff; }
html[data-theme="dark"] body.auth-login.bg-primary { background: var(--theme-bg) !important; }

html[data-theme="dark"] .modal .modal-body { background: var(--theme-surface); color: var(--theme-text); }
html[data-theme="dark"] .modal .modal-header.bg-primary { background: var(--primary-action-hover, #0a58ca) !important; }
html[data-theme="dark"] .modal .modal-header.bg-success { background: #146c43 !important; }
html[data-theme="dark"] .modal .modal-header.bg-danger { background: #a92330 !important; }
html[data-theme="dark"] .modal .modal-header .opacity-75 { opacity: .9 !important; }
html[data-theme="dark"] .modal .modal-header:is(.bg-warning, .bg-info),
html[data-theme="dark"] .modal .modal-header:is(.bg-warning, .bg-info) * { color: #17212b !important; }
html[data-theme="dark"] .modal .modal-header:is(.bg-warning, .bg-info) .btn-close { filter: none !important; }
html[data-theme="dark"] .badge.bg-primary { background-color: var(--primary-soft) !important; color: var(--theme-accent) !important; }
html[data-theme="dark"] .badge.bg-success { background-color: var(--theme-success-bg) !important; color: var(--theme-success) !important; }
html[data-theme="dark"] .badge.bg-danger { background-color: var(--theme-danger-bg) !important; color: var(--theme-danger) !important; }
html[data-theme="dark"] .badge.bg-warning { background-color: var(--theme-warning-bg) !important; color: var(--theme-warning) !important; }
html[data-theme="dark"] .badge.bg-info { background-color: var(--theme-info-bg) !important; color: var(--theme-info-text) !important; }
html[data-theme="dark"] .form-text,
html[data-theme="dark"] .modal .selection-option small,
html[data-theme="dark"] .modal .download-choice small,
html[data-theme="dark"] .modal .client-information-field dt { color: var(--theme-muted); }
html[data-theme="dark"] .invalid-feedback { color: var(--theme-danger); }
html[data-theme="dark"] .valid-feedback { color: var(--theme-success); }
html[data-theme="dark"] .form-check-input:not(:checked) { background-color: var(--theme-soft); border-color: var(--theme-muted); }
html[data-theme="dark"] .alert { border-color: var(--theme-border); }
html[data-theme="dark"] .alert .alert-link { color: inherit; }
html[data-theme="dark"] .alert-primary { background: var(--primary-soft); color: var(--theme-text); }
html[data-theme="dark"] .alert-info { background: var(--theme-info-bg); color: var(--theme-info-text); }
html[data-theme="dark"] .alert-success { background: var(--theme-success-bg); color: #9ce4b7; }
html[data-theme="dark"] .alert-warning { background: var(--theme-warning-bg); color: var(--theme-warning); }
html[data-theme="dark"] .alert-danger { background: var(--theme-danger-bg); color: var(--theme-danger); }
html[data-theme="dark"] :is(.alert-light, .alert-secondary, .alert-dark) { background: var(--theme-soft); color: var(--theme-text); }
html[data-theme="dark"] .table-success { --bs-table-bg: var(--theme-success-bg); }
html[data-theme="dark"] .table-danger { --bs-table-bg: var(--theme-danger-bg); }
html[data-theme="dark"] .table-warning { --bs-table-bg: var(--theme-warning-bg); }
html[data-theme="dark"] .table-info { --bs-table-bg: var(--theme-info-bg); }
html[data-theme="dark"] :is(.table-primary, .table-secondary) { --bs-table-bg: var(--theme-soft); }
html[data-theme="dark"] .modal :is(.selection-option, .download-choice, .client-select-panel) {
    background: var(--theme-surface);
    color: var(--theme-text);
    border-color: var(--theme-border);
}
html[data-theme="dark"] .modal .selection-option:is(:hover, :focus-visible) { background: var(--theme-soft); }
html[data-theme="dark"] .modal .download-choice:has(input:checked) { background: var(--primary-soft); border-color: var(--theme-accent); }
html[data-theme="dark"] .modal :is(.client-information-name, .client-information-field dd) { color: var(--theme-text); }
html[data-theme="dark"] .modal :is(.client-information-field dt i, .client-invoice-total) { color: var(--theme-accent); }
html[data-theme="dark"] .modal :is(.client-invoices .store-filter-controls, .client-document-switch, .client-invoice-status, .customer-empty-state) {
    background: var(--theme-soft);
    color: var(--theme-text);
    border-color: var(--theme-border);
}
html[data-theme="dark"] .modal .client-document-switch > .btn:not(.active) { background: transparent; color: var(--theme-text); }
html[data-theme="dark"] .modal .client-document-switch > .btn.active { color: #fff; }
html[data-theme="dark"] .price-changes-table tbody tr { --price-change-color: var(--theme-muted); --price-change-soft: var(--theme-soft); background: var(--theme-surface); }
html[data-theme="dark"] .price-changes-table .price-change--down { --price-change-color: var(--theme-success); --price-change-soft: var(--theme-success-bg); }
html[data-theme="dark"] .price-changes-table .price-change--up { --price-change-color: var(--theme-danger); --price-change-soft: var(--theme-danger-bg); }
html[data-theme="dark"] :is(.price-changes-code, .price-changes-old .price-changes-amount, .price-changes-note) { color: var(--theme-muted); }
html[data-theme="dark"] .price-changes-count { color: var(--theme-accent); }
html[data-theme="dark"] #trackingModal :is(.tracking-panel, .tracking-event-card, .tracking-map-card) { background: var(--theme-surface); border-color: var(--theme-border); }
html[data-theme="dark"] #trackingModal .tracking-data-item { background: var(--theme-soft); }
html[data-theme="dark"] #trackingModal .tracking-value { color: var(--theme-text); }
html[data-theme="dark"] #trackingModal .tracking-data-icon { background: var(--primary-soft); color: var(--theme-accent); }
html[data-theme="dark"] #trackingModal .tracking-event-marker { border-color: var(--theme-surface); }
html[data-theme="dark"] #responseModal #responseMessage,
html[data-theme="dark"] #addTrackingDropshippingModal .mb-3,
html[data-theme="dark"] #createOrderModal .create-order-section { background: var(--theme-soft); border-color: var(--theme-border); }
html[data-theme="dark"] #viewPdfModal { --pdf-ink: var(--theme-text); --pdf-accent: var(--primary-action-hover); }
html[data-theme="dark"] #viewPdfModal :is(.pdf-viewer-body, .pdf-viewer-toolbar, .pdf-viewer-statusbar) { background: var(--theme-soft); color: var(--theme-text); border-color: var(--theme-border); }
html[data-theme="dark"] #viewPdfModal .pdf-viewer-toolbar .btn:not(.pdf-viewer-download),
html[data-theme="dark"] #viewPdfModal #pdfPageNumber { background: var(--theme-surface); color: var(--theme-text); border-color: var(--theme-border); }
html[data-theme="dark"] #viewPdfModal .pdf-viewer-toolbar .btn:hover:not(:disabled):not(.pdf-viewer-download) { background: var(--theme-soft); color: var(--theme-accent); }
html[data-theme="dark"] #changePasswordModal .input-group .btn { background: var(--theme-soft); color: var(--theme-text); border-color: var(--theme-border); }
html[data-theme="dark"] #changePasswordModal .input-group .btn:is(:hover, :focus-visible) { background: var(--theme-surface); color: var(--theme-accent); }
html[data-theme="dark"] #changePasswordModal .password-requirements { background: var(--theme-soft) !important; }
html[data-theme="dark"] .modal #btn-block-cart { color: #17212b !important; }
html[data-theme="dark"] #similarProductsModal .similar-products-loading { background: var(--theme-soft); color: var(--theme-text); }

html[data-theme="dark"] .badge:is(.bg-secondary, .bg-light, .bg-dark) { background-color: var(--theme-soft) !important; color: var(--theme-muted) !important; }
html[data-theme="dark"] code { color: #ff9ed0; }
html[data-theme="dark"] :is(.breadcrumb-item.active, .documents-mobile-sort label, .subsection-empty p,
    .sb-sidenav .sb-sidenav-menu-heading) { color: var(--theme-muted); }
html[data-theme="dark"] .custom-name-wrapper > .card { background: var(--theme-surface) !important; }
html[data-theme="dark"] .custom-name-wrapper :is(.form-control, .input-group-text) {
    background: var(--theme-soft) !important;
    border-color: var(--theme-border) !important;
}
html[data-theme="dark"] .custom-name-wrapper :is(.input-group-text i) { color: var(--theme-accent) !important; }
html[data-theme="dark"] .security-danger-zone { background: var(--theme-danger-bg); border-color: var(--theme-border); }
html[data-theme="dark"] .security-recovery-warning { color: var(--theme-warning); }
html[data-theme="dark"] :is(.two-fa-banner, .two-fa-banner-dropshipping) { background: var(--theme-info-bg) !important; }
html[data-theme="dark"] :is(.two-fa-banner, .two-fa-banner-dropshipping) :is(h3, h4, strong) { color: var(--theme-text); }
html[data-theme="dark"] :is(.two-fa-banner, .two-fa-banner-dropshipping) .btn-link { color: var(--theme-muted) !important; }
html[data-theme="dark"] :is(.two-fa-banner-btn-enable, .two-fa-banner-dropshipping-btn-enable) { background: linear-gradient(135deg, #0369a1, #0c4a6e); }
html[data-theme="dark"] :is(.two-fa-banner-message, .two-fa-banner-dropshipping-message) { color: var(--theme-muted); }
html[data-theme="dark"] .whatsapp-close-btn { background: rgb(0 0 0 / 55%); }
html[data-theme="dark"] .whatsapp-close-btn:hover { background: rgb(0 0 0 / 65%); }
html[data-theme="dark"] :is(.offers-showcase, .offer-card, .offer-image-wrapper, .cart-tool-heading,
    .pvp-panel, .pvp-save-bar, .pvp-general, .code-search-page .code-search-help) {
    background: var(--theme-surface);
    border-color: var(--theme-border);
}
html[data-theme="dark"] .pvp-panel p { color: var(--theme-muted); }
html[data-theme="dark"] :is(.add-box-to-cart-btn, .similar-add-box-btn, #modal-add-box-to-cart) {
    background: var(--theme-surface);
    color: var(--theme-accent);
    border: 1px solid var(--theme-accent);
}
html[data-theme="dark"] :is(.add-box-to-cart-btn, .similar-add-box-btn, #modal-add-box-to-cart):is(:hover, :focus-visible, :active):not(:disabled):not(.disabled) {
    background: var(--primary-soft);
    color: var(--theme-accent);
    border-color: var(--theme-accent);
}
html[data-theme="dark"] :is(.click-badge, .badge-custom) { background: linear-gradient(135deg, var(--primary-action), var(--primary-action-hover)); }
html[data-theme="dark"] .topbar.bg-primary { background: var(--primary-action) !important; }
html[data-theme="dark"] .topbar .text-secondary { color: #fff !important; }
html[data-theme="dark"] .featurs-icon.bg-secondary { background-color: var(--primary-soft) !important; }
html[data-theme="dark"] .featurs-icon.bg-secondary .text-white { color: var(--theme-accent) !important; }
html[data-theme="dark"] .whatsapp-button-circle { background: linear-gradient(135deg, #128c7e, #075e54); }
html[data-theme="dark"] .pvp-page { color: var(--theme-text); }
html[data-theme="dark"] .pvp-change-label { color: var(--theme-accent); }
html[data-theme="dark"] .longDescription-container { background: var(--theme-soft) !important; }
html[data-theme="dark"] #modal-article-count { background-color: var(--theme-soft) !important; }
html[data-theme="dark"] .security-secret { background: var(--theme-soft); border-color: var(--theme-border); }
html[data-theme="dark"] :is(.offers-loading, .offers-swipe-hint) { color: var(--theme-muted); }
html[data-theme="dark"] .cart-page h3 { color: var(--theme-text) !important; }
html[data-theme="dark"] .documents-page .btn-group { background: var(--theme-soft); border-color: var(--theme-border); }
html[data-theme="dark"] .list-group-item.bg-danger.bg-opacity-10 { background: var(--theme-danger-bg) !important; }

html[data-theme] .btn:focus-visible {
    outline: 3px solid var(--theme-accent, var(--primary-action-hover));
    outline-offset: 3px;
}
