/* Final compatibility layer for legacy Bootstrap/custom components. */

[data-theme="dark"] body,
[data-theme="dark"] .hi-main-content,
[data-theme="dark"] main,
[data-theme="dark"] .container-xl {
    background-color: var(--bg-main) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .card,
[data-theme="dark"] .card-body,
[data-theme="dark"] .modal-content,
[data-theme="dark"] .dropdown-menu,
[data-theme="dark"] .list-group-item,
[data-theme="dark"] .toast,
[data-theme="dark"] .popover,
[data-theme="dark"] .admin-panel,
[data-theme="dark"] .admin-card,
[data-theme="dark"] .admin-icon-card,
[data-theme="dark"] .crm-card,
[data-theme="dark"] .crm-profile-hero,
[data-theme="dark"] .crm-profile-nav,
[data-theme="dark"] .crm-profile-metrics div,
[data-theme="dark"] .crm-overview-strip div,
[data-theme="dark"] .crm-toolbar,
[data-theme="dark"] .crm-info-list div,
[data-theme="dark"] .cart-card,
[data-theme="dark"] .cart-summary,
[data-theme="dark"] .checkout-card,
[data-theme="dark"] .store-card,
[data-theme="dark"] .product-card,
[data-theme="dark"] .support-assist-card {
    background: var(--bg-card) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
    box-shadow: var(--shadow-soft) !important;
}

[data-theme="dark"] .crm-card,
[data-theme="dark"] .admin-panel,
[data-theme="dark"] .admin-card,
[data-theme="dark"] .card,
[data-theme="dark"] .store-card,
[data-theme="dark"] .product-card,
[data-theme="dark"] .cart-card,
[data-theme="dark"] .checkout-card,
[data-theme="dark"] .support-assist-card,
[data-theme="dark"] .store-assist-panel {
    border-color: var(--border-soft) !important;
}

[data-theme="dark"] .bg-white,
[data-theme="dark"] .bg-light,
[data-theme="dark"] [style*="background: #fff"],
[data-theme="dark"] [style*="background:#fff"],
[data-theme="dark"] [style*="background: white"],
[data-theme="dark"] [style*="background:white"],
[data-theme="dark"] [style*="background-color: #fff"],
[data-theme="dark"] [style*="background-color:#fff"],
[data-theme="dark"] [style*="background-color: white"],
[data-theme="dark"] [style*="background-color:white"] {
    background: var(--bg-card) !important;
}

[data-theme="dark"] .table,
[data-theme="dark"] table,
[data-theme="dark"] .tabla {
    --bs-table-bg: var(--table-bg);
    --bs-table-color: var(--text-main);
    --bs-table-border-color: var(--border-color);
    --bs-table-hover-bg: var(--table-hover);
    background: var(--table-bg) !important;
    color: var(--text-main) !important;
    border-color: var(--border-color) !important;
}

[data-theme="dark"] .table > :not(caption) > * > *,
[data-theme="dark"] table td,
[data-theme="dark"] table th,
[data-theme="dark"] .tabla td,
[data-theme="dark"] .tabla th {
    background-color: transparent !important;
    color: inherit !important;
    border-color: var(--border-soft) !important;
}

[data-theme="dark"] thead,
[data-theme="dark"] .table thead,
[data-theme="dark"] .tabla thead {
    background: var(--table-head-bg) !important;
}

[data-theme="dark"] .table,
[data-theme="dark"] table,
[data-theme="dark"] .tabla,
[data-theme="dark"] .table-bordered,
[data-theme="dark"] .table-responsive {
    box-shadow: none !important;
}

[data-theme="dark"] input,
[data-theme="dark"] select,
[data-theme="dark"] textarea,
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-select,
[data-theme="dark"] .tbhe,
[data-theme="dark"] .selectop,
[data-theme="dark"] .chatinputfloat {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--input-text) !important;
}

[data-theme="dark"] input::placeholder,
[data-theme="dark"] textarea::placeholder {
    color: var(--input-placeholder) !important;
}

[data-theme="dark"] input:focus,
[data-theme="dark"] select:focus,
[data-theme="dark"] textarea:focus,
[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .tbhe:focus {
    border-color: var(--primary-color) !important;
    box-shadow: 0 0 0 .18rem var(--focus-ring) !important;
}

[data-theme="dark"] h1,
[data-theme="dark"] h2,
[data-theme="dark"] h3,
[data-theme="dark"] h4,
[data-theme="dark"] h5,
[data-theme="dark"] h6,
[data-theme="dark"] label,
[data-theme="dark"] .fw-bold,
[data-theme="dark"] .admin-card-title,
[data-theme="dark"] .crm-card-head h2,
[data-theme="dark"] .cart-title,
[data-theme="dark"] .cart-item-name,
[data-theme="dark"] .cart-item-price,
[data-theme="dark"] .cart-sum-title {
    color: var(--text-main) !important;
}

[data-theme="dark"] .text-muted,
[data-theme="dark"] small,
[data-theme="dark"] .admin-text-soft,
[data-theme="dark"] .admin-card-meta,
[data-theme="dark"] .crm-muted,
[data-theme="dark"] .crm-list-item span,
[data-theme="dark"] .crm-list-item small,
[data-theme="dark"] .cart-muted {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .btn-outline-dark,
[data-theme="dark"] .btn-outline-light,
[data-theme="dark"] .crm-btn,
[data-theme="dark"] .icon-action,
[data-theme="dark"] .hi-icon-btn,
[data-theme="dark"] .hi-radio-btn {
    background: var(--bg-elevated) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] hr,
[data-theme="dark"] .dropdown-divider,
[data-theme="dark"] .border,
[data-theme="dark"] .border-top,
[data-theme="dark"] .border-bottom,
[data-theme="dark"] .border-start,
[data-theme="dark"] .border-end,
[data-theme="dark"] .admin-form-actions,
[data-theme="dark"] .crm-card-head,
[data-theme="dark"] .cart-card-head,
[data-theme="dark"] .od-card-head {
    border-color: var(--border-soft) !important;
}

[data-theme="dark"] .btn-dark,
[data-theme="dark"] .btn-primary,
[data-theme="dark"] .crm-btn.primary,
[data-theme="dark"] .hi-btn-primary {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--text-inverse) !important;
}

[data-theme="dark"] a {
    color: #7dd3fc;
}

[data-theme="dark"] .nav-link,
[data-theme="dark"] .dropdown-item,
[data-theme="dark"] .hi-menuv-link,
[data-theme="dark"] .hi-secnav-link,
[data-theme="dark"] .crm-profile-nav a {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .nav-link:hover,
[data-theme="dark"] .dropdown-item:hover,
[data-theme="dark"] .hi-menuv-link:hover,
[data-theme="dark"] .hi-secnav-link:hover,
[data-theme="dark"] .crm-profile-nav a:hover,
[data-theme="dark"] .crm-profile-nav a.active {
    background: var(--bg-hover) !important;
    color: var(--text-main) !important;
}

/* Store/catalog/checkout surfaces */
[data-theme="dark"] .pd-breadcrumb-bar,
[data-theme="dark"] .pd-main-img-wrap,
[data-theme="dark"] .pd-tabs-card,
[data-theme="dark"] .pd-rel-card,
[data-theme="dark"] .pd-thumb,
[data-theme="dark"] .pd-qty-control,
[data-theme="dark"] .pd-btn-share,
[data-theme="dark"] .pd-btn-fav,
[data-theme="dark"] .st-filters,
[data-theme="dark"] .st-table-wrap,
[data-theme="dark"] .act-menu,
[data-theme="dark"] .prod-panel,
[data-theme="dark"] .prod-tabs-bar,
[data-theme="dark"] .cart-card,
[data-theme="dark"] .cart-summary,
[data-theme="dark"] .cart-qty-ctrl,
[data-theme="dark"] .cart-remove,
[data-theme="dark"] .cart-subli-card,
[data-theme="dark"] .cart-subli-foot,
[data-theme="dark"] .od-card,
[data-theme="dark"] .checkout-panel,
[data-theme="dark"] .checkout-summary,
[data-theme="dark"] .checkout-card,
[data-theme="dark"] .svc-card,
[data-theme="dark"] .hd-card,
[data-theme="dark"] .hd-request-card,
[data-theme="dark"] .service-card {
    background:
        radial-gradient(circle at top right, rgba(20, 184, 166, .08), transparent 32%),
        linear-gradient(180deg, #121a2a 0%, #0f172a 100%) !important;
    border-color: var(--border-soft) !important;
    color: var(--text-main) !important;
    box-shadow: var(--shadow-soft) !important;
}

/* Legacy store and catalog modules: keep the same soft panel language as Admin. */
[data-theme="dark"] .pd-page,
[data-theme="dark"] .pd-tabs-section,
[data-theme="dark"] .pd-related-section,
[data-theme="dark"] #mainContent,
[data-theme="dark"] .sf-page,
[data-theme="dark"] .ls-page,
[data-theme="dark"] .ord-page {
    background: var(--bg-main) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .sf-page {
    --sf-bg: var(--bg-main);
    --sf-bg-deep: #0b1120;
    --sf-surface: rgba(18, 26, 42, .92);
    --sf-surface-strong: #121a2a;
    --sf-text: var(--text-main);
    --sf-text-soft: var(--text-secondary);
    --sf-border: rgba(148, 163, 184, .14);
    --sf-border-strong: rgba(148, 163, 184, .24);
    --sf-accent: var(--primary-color);
    --sf-accent-strong: #5eead4;
    --sf-accent-soft: rgba(20, 184, 166, .16);
    --sf-shadow-sm: var(--shadow-soft);
    --sf-shadow-md: var(--shadow-soft);
    --sf-shadow-lg: var(--shadow-strong);
}

[data-theme="dark"] .sf-section,
[data-theme="dark"] .sf-category,
[data-theme="dark"] .sf-card,
[data-theme="dark"] .sf-product-card,
[data-theme="dark"] .sf-hero-product,
[data-theme="dark"] .sf-hero-copy,
[data-theme="dark"] .sf-hero-visual-panel,
[data-theme="dark"] .sf-topbar,
[data-theme="dark"] .sf-nav-search,
[data-theme="dark"] .sf-category-card,
[data-theme="dark"] .sf-catalog-section,
[data-theme="dark"] .sf-chip,
[data-theme="dark"] .sf-results-meta span,
[data-theme="dark"] .sf-spinner,
[data-theme="dark"] .sf-empty-state,
[data-theme="dark"] .sf-card-button,
[data-theme="dark"] .sf-icon-link,
[data-theme="dark"] .sf-nav-clear,
[data-theme="dark"] .ls-sidebar,
[data-theme="dark"] .ls-searchbar,
[data-theme="dark"] .sf-search-panel,
[data-theme="dark"] .sf-dropdown,
[data-theme="dark"] .ls-shell,
[data-theme="dark"] .ls-filter-card,
[data-theme="dark"] .ls-card,
[data-theme="dark"] .ls-card-img,
[data-theme="dark"] .ls-cat-count,
[data-theme="dark"] .ls-empty-link,
[data-theme="dark"] .ls-load-more,
[data-theme="dark"] .of-card,
[data-theme="dark"] .of-img,
[data-theme="dark"] .of-empty-link,
[data-theme="dark"] .ord-stat,
[data-theme="dark"] .ord-toolbar,
[data-theme="dark"] .ord-table-card,
[data-theme="dark"] .ord-panel,
[data-theme="dark"] .prod-panel-head,
[data-theme="dark"] .img-thumb-card,
[data-theme="dark"] .img-thumb-card .img-actions,
[data-theme="dark"] .pd-spec-row,
[data-theme="dark"] .pd-rv-item,
[data-theme="dark"] .pd-rv-form,
[data-theme="dark"] .act-btn,
[data-theme="dark"] .prod-btn-outline,
[data-theme="dark"] .prod-btn-danger {
    background: rgba(30, 41, 59, .62) !important;
    border-color: rgba(148, 163, 184, .14) !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
}

[data-theme="dark"] .sf-card:hover,
[data-theme="dark"] .sf-product-card:hover,
[data-theme="dark"] .sf-hero-product:hover,
[data-theme="dark"] .sf-category-card:hover,
[data-theme="dark"] .sf-card-button:hover,
[data-theme="dark"] .sf-icon-link:hover,
[data-theme="dark"] .sf-nav-clear:hover,
[data-theme="dark"] .sf-chip:hover,
[data-theme="dark"] .sf-chip.is-active,
[data-theme="dark"] .ls-card:hover,
[data-theme="dark"] .ls-cat-link:hover,
[data-theme="dark"] .ls-cat-link.active,
[data-theme="dark"] .ls-sort-link:hover,
[data-theme="dark"] .ls-sort-link.active,
[data-theme="dark"] .ls-load-more:hover,
[data-theme="dark"] .of-card:hover,
[data-theme="dark"] .pd-rel-card:hover,
[data-theme="dark"] .act-btn:hover,
[data-theme="dark"] .prod-btn-outline:hover,
[data-theme="dark"] .prod-btn-danger:hover {
    background: rgba(20, 184, 166, .16) !important;
    border-color: rgba(20, 184, 166, .38) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .st-table-header,
[data-theme="dark"] .st-table thead tr,
[data-theme="dark"] .st-table tbody tr:hover,
[data-theme="dark"] .ord-table-head,
[data-theme="dark"] .ord-table tbody tr:hover,
[data-theme="dark"] .prod-tabs-bar,
[data-theme="dark"] .pd-tab-nav {
    background: rgba(15, 23, 42, .68) !important;
    border-color: var(--border-soft) !important;
}

[data-theme="dark"] .st-table td,
[data-theme="dark"] .st-table th,
[data-theme="dark"] .ord-table td,
[data-theme="dark"] .ord-table th,
[data-theme="dark"] .prod-panel-footer,
[data-theme="dark"] .prod-section-title,
[data-theme="dark"] .pd-divider,
[data-theme="dark"] .pd-tab-nav,
[data-theme="dark"] .act-sep {
    border-color: var(--border-soft) !important;
}

[data-theme="dark"] .pd-title,
[data-theme="dark"] .pd-price-main,
[data-theme="dark"] .pd-section-title,
[data-theme="dark"] .pd-spec-val,
[data-theme="dark"] .pd-rel-name,
[data-theme="dark"] .pd-rel-price,
[data-theme="dark"] .pd-rv-author,
[data-theme="dark"] .pd-rv-form h4,
[data-theme="dark"] .pd-rv-avg,
[data-theme="dark"] .prod-name,
[data-theme="dark"] .stk-ok,
[data-theme="dark"] .st-table-header-title,
[data-theme="dark"] .st-table td,
[data-theme="dark"] .ls-bc-active,
[data-theme="dark"] .ls-search-input,
[data-theme="dark"] .ls-sort-select,
[data-theme="dark"] .ls-count strong,
[data-theme="dark"] .ls-card-name,
[data-theme="dark"] .ls-price,
[data-theme="dark"] .sf-brand,
[data-theme="dark"] .sf-brand:hover,
[data-theme="dark"] .sf-brand-copy strong,
[data-theme="dark"] .sf-nav-search input,
[data-theme="dark"] .sf-nav-search select,
[data-theme="dark"] .sf-select-wrap select,
[data-theme="dark"] .sf-nav-links a:hover,
[data-theme="dark"] .sf-hero-copy h1,
[data-theme="dark"] .sf-section-head h2,
[data-theme="dark"] .sf-title,
[data-theme="dark"] .sf-card-title,
[data-theme="dark"] .sf-product-title,
[data-theme="dark"] .sf-product-price,
[data-theme="dark"] .sf-category-card strong,
[data-theme="dark"] .sf-card-body h3,
[data-theme="dark"] .sf-product-body h3,
[data-theme="dark"] .sf-card-price-wrap strong,
[data-theme="dark"] .sf-count-pill,
[data-theme="dark"] .sf-empty-state h3,
[data-theme="dark"] .sf-hero-product-copy strong,
[data-theme="dark"] .of-topbar-title,
[data-theme="dark"] .of-name,
[data-theme="dark"] .of-price-new,
[data-theme="dark"] .ord-header-left h1,
[data-theme="dark"] .ord-stat-num,
[data-theme="dark"] .ord-table-head strong,
[data-theme="dark"] .ord-num,
[data-theme="dark"] .ord-panel-num,
[data-theme="dark"] .ord-panel-total,
[data-theme="dark"] .ord-items-name,
[data-theme="dark"] .ord-items-sub,
[data-theme="dark"] .ord-items-total,
[data-theme="dark"] .prod-panel-head strong,
[data-theme="dark"] .prod-tab-btn.active,
[data-theme="dark"] .od-title,
[data-theme="dark"] .od-meta-item .val,
[data-theme="dark"] .od-item-name strong,
[data-theme="dark"] .od-item-sub,
[data-theme="dark"] .od-total-row.main {
    color: var(--text-main) !important;
}

/* Cart and customer order pages */
[data-theme="dark"] .cart-page,
[data-theme="dark"] .od-page,
[data-theme="dark"] .mo-page {
    background: var(--bg-main) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .mo-page {
    --mo-bg: var(--bg-main);
    --mo-surface: #121a2a;
    --mo-surface-soft: rgba(30, 41, 59, .62);
    --mo-border: rgba(148, 163, 184, .14);
    --mo-text: var(--text-main);
    --mo-soft: var(--text-secondary);
    --mo-muted: var(--text-muted);
    --mo-accent: var(--primary-color);
    --mo-accent-soft: rgba(20, 184, 166, .16);
    --mo-shadow: var(--shadow-soft);
    --mo-shadow-lg: var(--shadow-soft);
}

[data-theme="dark"] .cart-title,
[data-theme="dark"] .cart-card-head,
[data-theme="dark"] .cart-item-name,
[data-theme="dark"] .cart-item-price,
[data-theme="dark"] .cart-subli-name,
[data-theme="dark"] .cart-sum-title,
[data-theme="dark"] .cart-sum-row.total,
[data-theme="dark"] .mo-title,
[data-theme="dark"] .mo-count-number,
[data-theme="dark"] .mo-empty h2,
[data-theme="dark"] .mo-meta-value,
[data-theme="dark"] .mo-product,
[data-theme="dark"] .mo-inline-link {
    color: var(--text-main) !important;
}

[data-theme="dark"] .cart-title-count,
[data-theme="dark"] .cart-empty,
[data-theme="dark"] .cart-item-sku,
[data-theme="dark"] .cart-item-unit,
[data-theme="dark"] .cart-subli-sub,
[data-theme="dark"] .cart-sum-row,
[data-theme="dark"] .cart-continue,
[data-theme="dark"] .cart-secure,
[data-theme="dark"] .mo-count-label,
[data-theme="dark"] .mo-results,
[data-theme="dark"] .mo-meta-label,
[data-theme="dark"] .mo-note,
[data-theme="dark"] .mo-product-sub,
[data-theme="dark"] .mo-eligibility,
[data-theme="dark"] .mo-reset-link,
[data-theme="dark"] .od-back,
[data-theme="dark"] .od-num,
[data-theme="dark"] .od-meta-item .key,
[data-theme="dark"] .od-item-name span,
[data-theme="dark"] .od-item-price,
[data-theme="dark"] .od-item-qty,
[data-theme="dark"] .od-total-row,
[data-theme="dark"] .od-tl-sub,
[data-theme="dark"] .od-tl-label,
[data-theme="dark"] .od-tl-label.muted {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .cart-item,
[data-theme="dark"] .cart-card-head,
[data-theme="dark"] .cart-sum-row.total,
[data-theme="dark"] .cart-subli-card,
[data-theme="dark"] .cart-subli-foot,
[data-theme="dark"] .od-card-head,
[data-theme="dark"] .od-item-row,
[data-theme="dark"] .od-total-row.main,
[data-theme="dark"] .mo-card-head {
    border-color: var(--border-soft) !important;
}

[data-theme="dark"] .cart-item:hover,
[data-theme="dark"] .cart-subli-foot,
[data-theme="dark"] .cart-item-img,
[data-theme="dark"] .cart-subli-img,
[data-theme="dark"] .od-card-head,
[data-theme="dark"] .mo-card-head,
[data-theme="dark"] .mo-toolbar-form,
[data-theme="dark"] .mo-count-pill,
[data-theme="dark"] .mo-empty,
[data-theme="dark"] .mo-action-link,
[data-theme="dark"] .mo-chip {
    background: rgba(30, 41, 59, .62) !important;
    border-color: rgba(148, 163, 184, .14) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .cart-remove:hover,
[data-theme="dark"] .mo-action-link:hover,
[data-theme="dark"] .mo-chip:hover,
[data-theme="dark"] .mo-chip.active {
    background: rgba(20, 184, 166, .16) !important;
    border-color: rgba(20, 184, 166, .38) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .cart-qty-btn,
[data-theme="dark"] .cart-remove {
    color: var(--text-main) !important;
}

[data-theme="dark"] .cart-remove {
    border-color: rgba(248, 113, 113, .32) !important;
    color: #fca5a5 !important;
}

[data-theme="dark"] .cart-checkout-btn,
[data-theme="dark"] .cart-btn-store {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--text-inverse) !important;
}

[data-theme="dark"] .mo-search-input {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--input-text) !important;
    -webkit-text-fill-color: var(--input-text) !important;
    box-shadow: none !important;
}

[data-theme="dark"] .mo-search-input::placeholder {
    color: var(--text-muted) !important;
    -webkit-text-fill-color: var(--text-muted) !important;
}

[data-theme="dark"] .od-tl-sub code {
    background: rgba(15, 23, 42, .75) !important;
    border: 1px solid var(--border-soft) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .od-badge.pendiente,
[data-theme="dark"] .mo-badge.pendiente {
    background: rgba(245, 158, 11, .16) !important;
    color: #fcd34d !important;
}

[data-theme="dark"] .od-badge.pagada,
[data-theme="dark"] .mo-badge.pagada {
    background: rgba(16, 185, 129, .16) !important;
    color: #86efac !important;
}

[data-theme="dark"] .od-badge.cancelada,
[data-theme="dark"] .mo-badge.cancelada {
    background: rgba(239, 68, 68, .16) !important;
    color: #fca5a5 !important;
}

[data-theme="dark"] .od-badge.completada,
[data-theme="dark"] .od-badge.enviada,
[data-theme="dark"] .mo-badge.completada,
[data-theme="dark"] .mo-badge.enviada {
    background: rgba(59, 130, 246, .16) !important;
    color: #93c5fd !important;
}

[data-theme="dark"] .pd-desc-short,
[data-theme="dark"] .pd-desc-text,
[data-theme="dark"] .pd-check-list li,
[data-theme="dark"] .pd-quantity-label,
[data-theme="dark"] .pd-rv-text,
[data-theme="dark"] .pd-rating-count,
[data-theme="dark"] .pd-price-main small,
[data-theme="dark"] .pd-breadcrumb,
[data-theme="dark"] .pd-breadcrumb a,
[data-theme="dark"] .prod-form-grid .form-label,
[data-theme="dark"] .prod-tab-btn,
[data-theme="dark"] .prod-sku-tag,
[data-theme="dark"] .st-table-count,
[data-theme="dark"] .st-table th,
[data-theme="dark"] .act-mi,
[data-theme="dark"] .ls-bc,
[data-theme="dark"] .ls-bc-sep,
[data-theme="dark"] .ls-sidebar-title,
[data-theme="dark"] .ls-cat-link,
[data-theme="dark"] .ls-sort-link,
[data-theme="dark"] .ls-cat-count,
[data-theme="dark"] .ls-count,
[data-theme="dark"] .ls-card-ph,
[data-theme="dark"] .ls-price-old,
[data-theme="dark"] .ls-empty,
[data-theme="dark"] .sf-brand-copy small,
[data-theme="dark"] .sf-nav-links a,
[data-theme="dark"] .sf-nav-search > i,
[data-theme="dark"] .sf-kicker,
[data-theme="dark"] .ls-card-cat,
[data-theme="dark"] .ls-card-desc,
[data-theme="dark"] .sf-muted,
[data-theme="dark"] .sf-card-subtitle,
[data-theme="dark"] .sf-hero-copy p,
[data-theme="dark"] .sf-hero-product-copy small,
[data-theme="dark"] .sf-category-card p,
[data-theme="dark"] .sf-card-body p,
[data-theme="dark"] .sf-product-body p,
[data-theme="dark"] .sf-empty-state p,
[data-theme="dark"] .sf-card-category,
[data-theme="dark"] .sf-product-topline span,
[data-theme="dark"] .sf-product-topline small,
[data-theme="dark"] .sf-card-price-wrap small,
[data-theme="dark"] .sf-product-price-old,
[data-theme="dark"] .sf-product-stock,
[data-theme="dark"] .sf-results-meta span,
[data-theme="dark"] .sf-product-meta,
[data-theme="dark"] .ord-btn,
[data-theme="dark"] .ord-fsel,
[data-theme="dark"] .ord-stat-label {
    color: var(--text-secondary) !important;
}

/* Reader editorial pages */
[data-theme="dark"] .rd-page {
    color: var(--text-main) !important;
}

[data-theme="dark"] .rd-title,
[data-theme="dark"] .rd-body,
[data-theme="dark"] .rd-body h1,
[data-theme="dark"] .rd-body h2,
[data-theme="dark"] .rd-body h3,
[data-theme="dark"] .rd-body h4 {
    color: var(--text-main) !important;
}

[data-theme="dark"] .rd-meta,
[data-theme="dark"] .rd-article-date,
[data-theme="dark"] .rd-widget-title,
[data-theme="dark"] .rd-toc-item,
[data-theme="dark"] .rd-toc-item.rd-toc-sub,
[data-theme="dark"] .rd-cat-link,
[data-theme="dark"] .of-topbar-back,
[data-theme="dark"] .of-count,
[data-theme="dark"] .of-empty,
[data-theme="dark"] .of-price-old {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .rd-widget,
[data-theme="dark"] .rd-body blockquote,
[data-theme="dark"] .rd-body pre,
[data-theme="dark"] .rd-body code,
[data-theme="dark"] .rd-body th,
[data-theme="dark"] .rd-body tr:nth-child(even) td,
[data-theme="dark"] .rd-edit-btn {
    background: rgba(30, 41, 59, .62) !important;
    border-color: rgba(148, 163, 184, .14) !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
}

[data-theme="dark"] .rd-title-sep,
[data-theme="dark"] .rd-article-footer,
[data-theme="dark"] .rd-body h2,
[data-theme="dark"] .rd-body th,
[data-theme="dark"] .rd-body td,
[data-theme="dark"] .rd-body hr,
[data-theme="dark"] .rd-gallery {
    border-color: var(--border-soft) !important;
}

[data-theme="dark"] .rd-toc-item:hover,
[data-theme="dark"] .rd-toc-item.active,
[data-theme="dark"] .rd-edit-btn:hover {
    background: rgba(20, 184, 166, .16) !important;
    border-color: rgba(20, 184, 166, .38) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .rd-hero {
    box-shadow: var(--shadow-soft) !important;
}

[data-theme="dark"] .of-page {
    background: var(--bg-main) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .of-topbar {
    border-color: var(--border-soft) !important;
}

[data-theme="dark"] .of-img-ph,
[data-theme="dark"] .of-empty i {
    color: var(--text-muted) !important;
}

[data-theme="dark"] .of-btn-add,
[data-theme="dark"] .of-empty-link {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--text-inverse) !important;
}

[data-theme="dark"] .of-btn-add *,
[data-theme="dark"] .of-empty-link * {
    color: inherit !important;
}

[data-theme="dark"] .pd-rv-field input,
[data-theme="dark"] .pd-rv-field textarea,
[data-theme="dark"] .pd-qty-input,
[data-theme="dark"] .cart-qty-input,
[data-theme="dark"] .st-search,
[data-theme="dark"] .st-fsel,
[data-theme="dark"] .ord-search input,
[data-theme="dark"] .ord-fsel,
[data-theme="dark"] .sf-search-input,
[data-theme="dark"] .sf-search-panel input,
[data-theme="dark"] .ls-search,
[data-theme="dark"] .ls-search-input,
[data-theme="dark"] .ls-sort-select,
[data-theme="dark"] .prod-panel input,
[data-theme="dark"] .prod-panel select,
[data-theme="dark"] .prod-panel textarea {
    background: var(--input-bg) !important;
    color: var(--input-text) !important;
    -webkit-text-fill-color: var(--input-text) !important;
    border-color: var(--input-border) !important;
}

[data-theme="dark"] .st-search::placeholder,
[data-theme="dark"] .ord-search input::placeholder,
[data-theme="dark"] .sf-search-input::placeholder,
[data-theme="dark"] .ls-search::placeholder,
[data-theme="dark"] .ls-search-input::placeholder,
[data-theme="dark"] .sf-nav-search input::placeholder,
[data-theme="dark"] .prod-panel input::placeholder,
[data-theme="dark"] .prod-panel textarea::placeholder {
    color: var(--text-muted) !important;
    -webkit-text-fill-color: var(--text-muted) !important;
}

[data-theme="dark"] .pd-btn-cart,
[data-theme="dark"] .pd-rv-btn,
[data-theme="dark"] .pd-rel-btn,
[data-theme="dark"] .cart-btn-store,
[data-theme="dark"] .cart-checkout,
[data-theme="dark"] .prod-btn-dark {
    background: var(--primary-color) !important;
    border-color: var(--primary-color) !important;
    color: var(--text-inverse) !important;
}

[data-theme="dark"] .pd-btn-cart *,
[data-theme="dark"] .pd-rv-btn *,
[data-theme="dark"] .pd-rel-btn *,
[data-theme="dark"] .cart-btn-store *,
[data-theme="dark"] .cart-checkout *,
[data-theme="dark"] .prod-btn-dark *,
[data-theme="dark"] .btn-green * {
    color: inherit !important;
}

[data-theme="dark"] .act-mi:hover,
[data-theme="dark"] .ls-cat-link:hover,
[data-theme="dark"] .ls-sort-link:hover {
    background: rgba(20, 184, 166, .14) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .sf-nav-search input:-webkit-autofill,
[data-theme="dark"] .sf-nav-search input:-webkit-autofill:hover,
[data-theme="dark"] .sf-nav-search input:-webkit-autofill:focus {
    -webkit-text-fill-color: var(--input-text) !important;
    -webkit-box-shadow: 0 0 0 1000px var(--input-bg) inset !important;
    caret-color: var(--input-text) !important;
}

[data-theme="dark"] .sf-select-wrap,
[data-theme="dark"] .ls-sort-select,
[data-theme="dark"] .ls-topbar,
[data-theme="dark"] .sf-feature-shell {
    border-color: var(--border-soft) !important;
}

[data-theme="dark"] .sf-select-wrap::after {
    border-color: var(--text-secondary) !important;
}

[data-theme="dark"] .sf-select-wrap select option,
[data-theme="dark"] .ls-sort-select option {
    background: var(--bg-elevated) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .sf-hero-product-media,
[data-theme="dark"] .sf-card-media,
[data-theme="dark"] .sf-product-media,
[data-theme="dark"] .sf-hero-product-fallback,
[data-theme="dark"] .sf-card-no-image {
    background: rgba(15, 23, 42, .72) !important;
    color: var(--text-muted) !important;
}

[data-theme="dark"] .sf-category-meta,
[data-theme="dark"] .sf-badge {
    background: rgba(30, 41, 59, .84) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-soft) !important;
}

[data-theme="dark"] .sf-accent-cyan .sf-category-icon,
[data-theme="dark"] .sf-accent-cyan .sf-category-meta {
    background: rgba(34, 211, 238, .16) !important;
    color: #67e8f9 !important;
}

[data-theme="dark"] .sf-accent-violet .sf-category-icon,
[data-theme="dark"] .sf-accent-violet .sf-category-meta {
    background: rgba(129, 140, 248, .16) !important;
    color: #c4b5fd !important;
}

[data-theme="dark"] .sf-accent-blue .sf-category-icon,
[data-theme="dark"] .sf-accent-blue .sf-category-meta {
    background: rgba(59, 130, 246, .16) !important;
    color: #93c5fd !important;
}

[data-theme="dark"] .sf-accent-emerald .sf-category-icon,
[data-theme="dark"] .sf-accent-emerald .sf-category-meta {
    background: rgba(16, 185, 129, .16) !important;
    color: #86efac !important;
}

[data-theme="dark"] .sf-accent-orange .sf-category-icon,
[data-theme="dark"] .sf-accent-orange .sf-category-meta {
    background: rgba(249, 115, 22, .16) !important;
    color: #fdba74 !important;
}

[data-theme="dark"] .sf-accent-slate .sf-category-icon,
[data-theme="dark"] .sf-accent-slate .sf-category-meta {
    background: rgba(148, 163, 184, .16) !important;
    color: #cbd5e1 !important;
}

[data-theme="dark"] .sf-icon-cta,
[data-theme="dark"] .ls-empty-link {
    background: var(--primary-color) !important;
    color: var(--text-inverse) !important;
}

[data-theme="dark"] .sf-cart-link span {
    background: var(--primary-color) !important;
    color: var(--text-inverse) !important;
    box-shadow: 0 10px 22px rgba(20, 184, 166, .24) !important;
}

[data-theme="dark"] .sb-activo,
[data-theme="dark"] .pd-badge-cat,
[data-theme="dark"] .pd-rv-alert-ok {
    background: rgba(16, 185, 129, .16) !important;
    color: #86efac !important;
}

[data-theme="dark"] .sb-inactivo,
[data-theme="dark"] .sc-no {
    background: rgba(148, 163, 184, .14) !important;
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .sb-borrador {
    background: rgba(245, 158, 11, .16) !important;
    color: #fcd34d !important;
}

[data-theme="dark"] .sc-yes {
    background: rgba(59, 130, 246, .16) !important;
    color: #93c5fd !important;
}

/* Admin and service modules should feel like panels, not terminal grids. */
[data-theme="dark"] .admin-panel,
[data-theme="dark"] .admin-card,
[data-theme="dark"] .admin-icon-card {
    background: linear-gradient(180deg, rgba(18, 26, 42, .98), rgba(15, 23, 42, .98)) !important;
}

/* Legacy Admin landing cards (/Admin): these were built for light mode with black icon classes. */
[data-theme="dark"] body.admin-page .menuadmin {
    background:
        radial-gradient(circle at top right, rgba(20, 184, 166, .10), transparent 34%),
        linear-gradient(180deg, #121a2a 0%, #0f172a 100%) !important;
    border: 1px solid var(--border-soft) !important;
    border-radius: 14px !important;
    color: var(--text-main) !important;
    box-shadow: var(--shadow-soft) !important;
}

[data-theme="dark"] body.admin-page .menuadmin > .alineatop > i {
    color: var(--primary-color) !important;
}

[data-theme="dark"] body.admin-page .menuadmin h4,
[data-theme="dark"] body.admin-page .menuadmin .fmcool,
[data-theme="dark"] body.admin-page .menuadmin .fmcool h4 {
    background: transparent !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] body.admin-page .menuadmincn {
    background: rgba(30, 41, 59, .62) !important;
    border: 1px solid rgba(148, 163, 184, .12) !important;
    border-radius: 10px !important;
    color: var(--text-main) !important;
    box-shadow: none !important;
    transition: background-color .16s ease, border-color .16s ease, transform .14s ease;
}

[data-theme="dark"] body.admin-page .menuadmincn:hover {
    background: rgba(20, 184, 166, .18) !important;
    border-color: rgba(20, 184, 166, .42) !important;
    color: var(--text-main) !important;
    transform: translateY(-1px);
}

[data-theme="dark"] body.admin-page .menuadmincn .etiquetas,
[data-theme="dark"] body.admin-page .menuadmincn a,
[data-theme="dark"] body.admin-page .menuadmincn div {
    color: var(--text-main) !important;
}

[data-theme="dark"] body.admin-page .menuadmincn i,
[data-theme="dark"] body.admin-page .icblack24,
[data-theme="dark"] body.admin-page .icblack32,
[data-theme="dark"] body.admin-page .icblack48,
[data-theme="dark"] body.admin-page .iconblack64 {
    color: #7dd3fc !important;
}

[data-theme="dark"] body.admin-page .menuadmincn:hover i,
[data-theme="dark"] body.admin-page .menuadmincn:hover .etiquetas {
    color: #ffffff !important;
}

[data-theme="dark"] .admin-panel-header,
[data-theme="dark"] .fmmodhead {
    background: linear-gradient(135deg, #172033, #1e293b) !important;
    border-color: var(--border-soft) !important;
}

[data-theme="dark"] .admin-icon-card__icon,
[data-theme="dark"] .crm-dashboard-actions i {
    background: var(--primary-soft) !important;
    color: var(--primary-color) !important;
}

[data-theme="dark"] .support-page .hd-request-card,
[data-theme="dark"] .support-page .support-card,
[data-theme="dark"] .support-page .service-card,
[data-theme="dark"] .support-page .card {
    background: linear-gradient(180deg, rgba(18, 26, 42, .98), rgba(15, 23, 42, .98)) !important;
    border-color: var(--border-soft) !important;
}

/* Support portal uses its own --hd-* tokens; remap them in dark mode. */
[data-theme="dark"] body.support-page {
    --hd-bg: var(--bg-main);
    --hd-white: #121a2a;
    --hd-border: rgba(148, 163, 184, .14);
    --hd-border2: rgba(148, 163, 184, .24);
    --hd-text: var(--text-main);
    --hd-text-2: var(--text-secondary);
    --hd-text-soft: var(--text-muted);
    --hd-accent: var(--primary-color);
    --hd-accent-bg: rgba(20, 184, 166, .16);
    --hd-green: #86efac;
    --hd-green-bg: rgba(16, 185, 129, .16);
    --hd-amber: #fcd34d;
    --hd-amber-bg: rgba(245, 158, 11, .16);
    --hd-red: #fca5a5;
    --hd-red-bg: rgba(239, 68, 68, .16);
    --hd-shadow: var(--shadow-soft);
    --hd-shadow-md: var(--shadow-soft);
    background: var(--bg-main) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] body.support-page .hi-sticky-wrap > div > nav.navbar,
[data-theme="dark"] .hd-page-shell,
[data-theme="dark"] .hd-portal {
    background: var(--bg-main) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .hd-create-form-card,
[data-theme="dark"] .hd-create-info-card,
[data-theme="dark"] .hd-step-card,
[data-theme="dark"] .hd-search-card,
[data-theme="dark"] .hd-detail-card,
[data-theme="dark"] .hd-detail-item,
[data-theme="dark"] .hd-detail-progress,
[data-theme="dark"] .hd-activity-card,
[data-theme="dark"] .hd-empty-state,
[data-theme="dark"] .hd-inline-note,
[data-theme="dark"] .hd-service-summary,
[data-theme="dark"] .hd-request-progress,
[data-theme="dark"] .hd-request-submeta span,
[data-theme="dark"] .fmformwhite,
[data-theme="dark"] body.support-page .fmsvcfloat,
[data-theme="dark"] body.support-page .formfloat,
[data-theme="dark"] .svcdesc,
[data-theme="dark"] .h5.fmcool,
[data-theme="dark"] .fmcool.h5 {
    background:
        radial-gradient(circle at top right, rgba(20, 184, 166, .08), transparent 32%),
        linear-gradient(180deg, #121a2a 0%, #0f172a 100%) !important;
    border-color: var(--border-soft) !important;
    color: var(--text-main) !important;
    box-shadow: var(--shadow-soft) !important;
}

[data-theme="dark"] .hd-step-card,
[data-theme="dark"] .hd-detail-item,
[data-theme="dark"] .hd-activity-card,
[data-theme="dark"] .hd-detail-progress,
[data-theme="dark"] .hd-request-progress,
[data-theme="dark"] .hd-request-submeta span,
[data-theme="dark"] .hd-inline-note,
[data-theme="dark"] .svcdesc {
    background: rgba(30, 41, 59, .62) !important;
    box-shadow: none !important;
}

[data-theme="dark"] .hd-portal-title,
[data-theme="dark"] .hd-page-title,
[data-theme="dark"] .hd-section-head h3,
[data-theme="dark"] .hd-step-head h3,
[data-theme="dark"] .hd-service-summary-head strong,
[data-theme="dark"] .hd-detail-card-head h3,
[data-theme="dark"] .hd-detail-item strong,
[data-theme="dark"] .hd-activity-top strong,
[data-theme="dark"] .hd-request-title,
[data-theme="dark"] .formheadclear,
[data-theme="dark"] .fmformwhite .tabla td,
[data-theme="dark"] .svcls > .h5,
[data-theme="dark"] .hd-empty-state h3 {
    color: var(--text-main) !important;
}

[data-theme="dark"] .hd-portal-sub,
[data-theme="dark"] .hd-page-subtitle,
[data-theme="dark"] .hd-step-head p,
[data-theme="dark"] .hd-create-steps,
[data-theme="dark"] .hd-field label,
[data-theme="dark"] .hd-field-help,
[data-theme="dark"] .hd-service-summary-head p,
[data-theme="dark"] .hd-detail-card-head p,
[data-theme="dark"] .hd-detail-item label,
[data-theme="dark"] .hd-activity-text,
[data-theme="dark"] .hd-activity-meta,
[data-theme="dark"] .hd-request-date,
[data-theme="dark"] .hd-request-group,
[data-theme="dark"] .hd-request-snippet,
[data-theme="dark"] .hd-request-action,
[data-theme="dark"] .hd-empty-state p,
[data-theme="dark"] .svcls > div,
[data-theme="dark"] .svcls div {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] body.support-page .hi-sticky-wrap > div > nav .nav-link.ahpe:hover,
[data-theme="dark"] body.support-page .hi-sticky-wrap > div > nav .nav-item.menucolor .nav-link.ahpe,
[data-theme="dark"] body.support-page .hi-sticky-wrap > div > nav .nav-item.menucolor > a,
[data-theme="dark"] body.support-page .hi-sticky-wrap > div > nav .menu-item.active > a,
[data-theme="dark"] body.support-page .hi-sticky-wrap > div > nav .menu-item.menucolor > a,
[data-theme="dark"] .hd-btn-secondary:hover,
[data-theme="dark"] .btnclear:hover {
    background: rgba(20, 184, 166, .16) !important;
    border-color: rgba(20, 184, 166, .38) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .hd-btn-primary,
[data-theme="dark"] .hd-step-number {
    background: var(--primary-color) !important;
    color: var(--text-inverse) !important;
}

[data-theme="dark"] .hd-btn-secondary,
[data-theme="dark"] .btnclear {
    background: rgba(30, 41, 59, .62) !important;
    border-color: var(--border-soft) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] input.tbhe,
[data-theme="dark"] input.tbher,
[data-theme="dark"] select.tbhe,
[data-theme="dark"] select.tbher,
[data-theme="dark"] select.selectop,
[data-theme="dark"] textarea.tbhe,
[data-theme="dark"] textarea.formsvc,
[data-theme="dark"] textarea.tabla,
[data-theme="dark"] .hd-search-input-wrap > .hd-search-input,
[data-theme="dark"] .hd-search-input-wrap > input.hd-search-input,
[data-theme="dark"] .search-input-wrapper > .hd-search-input {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--input-text) !important;
    -webkit-text-fill-color: var(--input-text) !important;
}

[data-theme="dark"] input.tbhe::placeholder,
[data-theme="dark"] input.tbher::placeholder,
[data-theme="dark"] textarea.tbhe::placeholder,
[data-theme="dark"] textarea.formsvc::placeholder,
[data-theme="dark"] textarea.tabla::placeholder,
[data-theme="dark"] .hd-search-input::placeholder {
    color: var(--text-muted) !important;
    -webkit-text-fill-color: var(--text-muted) !important;
}

[data-theme="dark"] .fmformwhite .tabla td,
[data-theme="dark"] .gridrowx,
[data-theme="dark"] tr.hrdyndat > td {
    border-color: var(--border-soft) !important;
}

[data-theme="dark"] .gridrowx:hover {
    background: rgba(20, 184, 166, .14) !important;
}

[data-theme="dark"] .gridrowcol {
    color: var(--text-main) !important;
}

[data-theme="dark"] .hd-badge-success {
    background: rgba(16, 185, 129, .16) !important;
    color: #86efac !important;
}

[data-theme="dark"] .hd-badge-info {
    background: rgba(59, 130, 246, .16) !important;
    color: #93c5fd !important;
}

[data-theme="dark"] .hd-badge-warn {
    background: rgba(245, 158, 11, .16) !important;
    color: #fcd34d !important;
}

[data-theme="dark"] .hd-badge-danger {
    background: rgba(239, 68, 68, .16) !important;
    color: #fca5a5 !important;
}

[data-theme="dark"] .hd-badge-neutral,
[data-theme="dark"] .hd-detail-eyebrow,
[data-theme="dark"] .hd-service-summary-meta span {
    background: rgba(148, 163, 184, .14) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .hi-theme-toggle.active {
    background: var(--primary-soft) !important;
    color: var(--text-main) !important;
}

/* Marcy / StoreAssist / SupportAssist */
[data-theme="dark"] .store-assist-panel,
[data-theme="dark"] .support-assist-card,
[data-theme="dark"] .chat-float {
    background: rgba(17, 24, 39, .88) !important;
    border: 1px solid var(--glass-border) !important;
    color: var(--text-main) !important;
    backdrop-filter: blur(18px);
    box-shadow: var(--shadow-strong) !important;
}

[data-theme="dark"] .store-assist-panel {
    border-radius: 22px !important;
}

[data-theme="dark"] .store-assist-launch {
    background: linear-gradient(135deg, #0f766e, #1e40af) !important;
    color: var(--text-inverse) !important;
    box-shadow: 0 18px 45px rgba(0, 0, 0, .42) !important;
}

[data-theme="dark"] .store-assist-legacy-header,
[data-theme="dark"] .support-assist-head,
[data-theme="dark"] .store-assist-head,
[data-theme="dark"] .chat-header {
    background: linear-gradient(135deg, rgba(15, 23, 42, .96), rgba(30, 41, 59, .92)) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .store-assist-panel .chatcontainer,
[data-theme="dark"] .support-assist-body .chatcontainer,
[data-theme="dark"] .chat-float .chatcontainer,
[data-theme="dark"] .marcelacontenedor .chatcontainer,
[data-theme="dark"] .chatcontainertareas,
[data-theme="dark"] #chatMessages {
    background: rgba(2, 6, 23, .52) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .store-assist-panel .chat-loader-wrap,
[data-theme="dark"] .support-assist-body .chat-loader-wrap {
    background: rgba(15, 23, 42, .88) !important;
    border: 1px solid var(--border-color);
    color: var(--text-main) !important;
    backdrop-filter: blur(12px);
}

[data-theme="dark"] .store-assist-panel .chat-loader-label,
[data-theme="dark"] .support-assist-body .chat-loader-label,
[data-theme="dark"] .store-assist-head p,
[data-theme="dark"] .store-assist-note,
[data-theme="dark"] .support-assist-head p,
[data-theme="dark"] .support-assist-counter,
[data-theme="dark"] .marcy-suggestions-title,
[data-theme="dark"] .marcy-suggestion-group strong,
[data-theme="dark"] .marcy-suggestion-chip small,
[data-theme="dark"] .marcy-suggestion-link small {
    color: var(--text-secondary) !important;
}

[data-theme="dark"] .store-assist-message,
[data-theme="dark"] .support-assist-message,
[data-theme="dark"] .store-assist-message-bot,
[data-theme="dark"] .bot-message,
[data-theme="dark"] .message-content,
[data-theme="dark"] .message-text,
[data-theme="dark"] .marcy-suggestions-card,
[data-theme="dark"] .marcy-suggestion-chip,
[data-theme="dark"] .marcy-suggestion-link {
    background: var(--bg-elevated) !important;
    color: var(--text-main) !important;
    border: 1px solid var(--border-color);
}

[data-theme="dark"] .store-assist-message-user,
[data-theme="dark"] .support-assist-message-user,
[data-theme="dark"] .user-message {
    background: var(--primary-color) !important;
    color: var(--text-inverse) !important;
}

[data-theme="dark"] .store-assist-chip,
[data-theme="dark"] .support-assist-chip,
[data-theme="dark"] .store-assist-group a,
[data-theme="dark"] .support-assist-suggestions,
[data-theme="dark"] .support-assist-note,
[data-theme="dark"] #inputContainer {
    background: var(--bg-elevated) !important;
    border-color: var(--border-color) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] .chatinputfloat,
[data-theme="dark"] .chatinput,
[data-theme="dark"] #userInput {
    background: var(--input-bg) !important;
    border-color: var(--input-border) !important;
    color: var(--input-text) !important;
    -webkit-text-fill-color: var(--input-text) !important;
}

[data-theme="dark"] .sendButton {
    background: var(--primary-color) !important;
    color: var(--text-inverse) !important;
}

[data-theme="dark"] #chatMessages table,
[data-theme="dark"] #preview table {
    background: var(--bg-elevated) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] #chatMessages table th,
[data-theme="dark"] #preview table th {
    background: rgba(15, 23, 42, .78) !important;
    color: var(--text-main) !important;
}

[data-theme="dark"] #chatMessages table td,
[data-theme="dark"] #chatMessages table th,
[data-theme="dark"] #preview table td,
[data-theme="dark"] #preview table th {
    border-color: var(--border-soft) !important;
}

[data-theme="dark"] #chatMessages code,
[data-theme="dark"] #chatMessages pre {
    background: #020617 !important;
    color: #e5e7eb !important;
    border-color: var(--border-color) !important;
}

@media (prefers-reduced-motion: no-preference) {
    .store-assist-panel,
    .support-assist-card,
    .theme-card,
    .crm-card,
    .admin-card,
    .card {
        transition: background-color .16s ease, border-color .16s ease, color .16s ease;
    }
}
