/* Final backend dark-mode compatibility layer for legacy widgets. */
[data-theme="dark"] .vendor-status-page,
[data-theme="dark"] .vendor-status-page [style*="background: #f8f9fa"],
[data-theme="dark"] .vendor-status-page [style*="background:#f8f9fa"] {
    background-color: var(--app-surface) !important;
    color: var(--app-text) !important;
    border-color: var(--app-border) !important;
}

[data-theme="dark"] .vendor-status-page .info-card {
    background-color: var(--app-surface) !important;
    color: var(--app-text) !important;
    border-top-color: var(--app-border) !important;
    border-right-color: var(--app-border) !important;
    border-bottom-color: var(--app-border) !important;
}

[data-theme="dark"] .vendor-status-page h1,
[data-theme="dark"] .vendor-status-page h2,
[data-theme="dark"] .vendor-status-page h3,
[data-theme="dark"] .vendor-status-page h4,
[data-theme="dark"] .vendor-status-page h5,
[data-theme="dark"] .vendor-status-page h6,
[data-theme="dark"] .vendor-status-page strong {
    color: var(--app-text-strong) !important;
}

[data-theme="dark"] .vendor-status-page .text-muted,
[data-theme="dark"] .vendor-status-page small {
    color: var(--app-text-muted) !important;
}

[data-theme="dark"] .vendor-status-page .reason-box {
    background: rgba(244, 63, 94, .11) !important;
    border-color: rgba(253, 164, 175, .28) !important;
    color: var(--app-text) !important;
}

[data-theme="dark"] .vendor-status-page .timeline-dot.pending-step {
    background: var(--app-surface-muted) !important;
    color: var(--app-text-muted) !important;
}

[data-theme="dark"] .vendor-status-page .timeline-content h6 {
    color: var(--app-text) !important;
}

[data-theme="dark"] .vendor-status-page .timeline-content p {
    color: var(--app-text-muted) !important;
}

[data-theme="dark"] .oc-chat-panel,
[data-theme="dark"] .oc-chat-list-header,
[data-theme="dark"] .oc-chat-active-header,
[data-theme="dark"] .oc-chat-messages,
[data-theme="dark"] .oc-chat-input-area,
[data-theme="dark"] .oc-conversation-list {
    background-color: var(--app-surface) !important;
    color: var(--app-text) !important;
    border-color: var(--app-border) !important;
}

[data-theme="dark"] .oc-conv-item:hover,
[data-theme="dark"] .oc-chat-message:hover {
    background-color: var(--app-surface-muted) !important;
}

[data-theme="dark"] .oc-conv-preview,
[data-theme="dark"] .oc-conv-meta,
[data-theme="dark"] .oc-chat-message-meta,
[data-theme="dark"] .oc-chat-empty {
    color: var(--app-text-muted) !important;
}

[data-theme="dark"] .oc-chat-input,
[data-theme="dark"] .oc-chat-textarea,
[data-theme="dark"] .oc-chat-search {
    background-color: var(--app-surface-muted) !important;
    color: var(--app-text) !important;
    border-color: var(--app-border-strong) !important;
}

[data-theme="dark"] .oc-chat-input::placeholder,
[data-theme="dark"] .oc-chat-textarea::placeholder,
[data-theme="dark"] .oc-chat-search::placeholder {
    color: var(--app-text-subtle) !important;
}

[data-theme="dark"] .oc-new-chat-btn,
[data-theme="dark"] .oc-back-btn {
    color: var(--app-primary) !important;
    border-color: var(--app-primary) !important;
}

[data-theme="dark"] .oc-new-chat-btn:hover,
[data-theme="dark"] .oc-back-btn:hover {
    background-color: var(--app-surface-muted) !important;
}

[data-theme="dark"] .oc-chat-toggle,
[data-theme="dark"] .oc-chat-header {
    box-shadow: var(--app-shadow-md);
}

[data-theme="dark"] .select2-container--default .select2-selection__rendered,
[data-theme="dark"] .select2-container--default .select2-selection__placeholder,
[data-theme="dark"] .select2-container--default .select2-selection__arrow {
    color: var(--app-text) !important;
}
