/* ========================================
   DARK THEME - Overrides for all pages
   Applied when [data-theme="dark"] is set
   ======================================== */

/* ========================================
   1. PAGE BANNERS
   ======================================== */
[data-theme="dark"] .page-banner,
[data-theme="dark"] .banner {
    background: linear-gradient(135deg, #172554 0%, #1e3a5f 100%);
    border-color: #1e40af;
}

[data-theme="dark"] .page-banner h1,
[data-theme="dark"] .page-banner .banner-content h1,
[data-theme="dark"] .banner h1 {
    color: #93c5fd;
}

[data-theme="dark"] .page-banner h1 i,
[data-theme="dark"] .page-banner .banner-content h1 i,
[data-theme="dark"] .banner h1 i {
    color: #60a5fa;
}

[data-theme="dark"] .page-banner p,
[data-theme="dark"] .page-banner .banner-content p,
[data-theme="dark"] .banner p {
    color: #60a5fa;
}

[data-theme="dark"] .profile-selector label {
    color: #93c5fd;
}

[data-theme="dark"] .profile-select {
    background-color: #334155;
    color: #e2e8f0;
    border-color: #2563eb;
}

/* ========================================
   2. FORM CARDS
   ======================================== */
[data-theme="dark"] .form-card,
[data-theme="dark"] .templates-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .form-card:hover,
[data-theme="dark"] .templates-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .form-card-header,
[data-theme="dark"] .templates-header {
    background: #0f172a;
    border-bottom-color: #334155;
}

[data-theme="dark"] .form-card-title i {
    color: #60a5fa;
}

[data-theme="dark"] .form-card-title h2 {
    color: #e2e8f0;
}

[data-theme="dark"] .form-card-footer {
    background: #0f172a;
    border-top-color: #334155;
}

[data-theme="dark"] .templates-content {
    background: #0f172a;
}

/* ========================================
   3. FORM ELEMENTS
   ======================================== */
[data-theme="dark"] .form-control,
[data-theme="dark"] .form-input,
[data-theme="dark"] .form-textarea,
[data-theme="dark"] .notes-textarea,
[data-theme="dark"] .status-select {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}

[data-theme="dark"] .form-control:focus,
[data-theme="dark"] .form-input:focus,
[data-theme="dark"] .form-textarea:focus,
[data-theme="dark"] .notes-textarea:focus,
[data-theme="dark"] .status-select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .form-control::placeholder,
[data-theme="dark"] .form-input::placeholder,
[data-theme="dark"] .form-textarea::placeholder {
    color: #64748b;
}

[data-theme="dark"] .form-group label {
    color: #cbd5e1;
}

[data-theme="dark"] .form-hint {
    color: #64748b;
}

[data-theme="dark"] .section-description {
    color: #94a3b8;
}

[data-theme="dark"] select.form-control {
    background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 12 12'%3E%3Cpath fill='%2394a3b8' d='M6 8L1 3h10z'/%3E%3C/svg%3E");
}

[data-theme="dark"] .filter-group label {
    color: #94a3b8;
}

/* ========================================
   4. BUTTONS
   ======================================== */
[data-theme="dark"] .btn-secondary,
[data-theme="dark"] .btn-outline,
[data-theme="dark"] .btn-toggle,
[data-theme="dark"] .btn-refresh {
    background: #334155;
    color: #cbd5e1;
    border-color: #475569;
}

[data-theme="dark"] .btn-secondary:hover,
[data-theme="dark"] .btn-outline:hover,
[data-theme="dark"] .btn-toggle:hover,
[data-theme="dark"] .btn-refresh:hover {
    background: #475569;
    border-color: #64748b;
    color: #e2e8f0;
}

[data-theme="dark"] .btn-test {
    background: #1e293b;
    color: #60a5fa;
    border-color: #3b82f6;
}

[data-theme="dark"] .btn-test:hover:not(:disabled) {
    background: #172554;
}

[data-theme="dark"] .btn-test:disabled {
    color: #64748b;
    border-color: #475569;
}

/* ========================================
   5. CARDS (generic)
   ======================================== */
[data-theme="dark"] .card,
[data-theme="dark"] .chart-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .card-header,
[data-theme="dark"] .chart-header {
    background: #0f172a;
    border-bottom-color: #334155;
}

[data-theme="dark"] .card-header h2,
[data-theme="dark"] .chart-header h2 {
    color: #e2e8f0;
}

[data-theme="dark"] .card-header h2 i,
[data-theme="dark"] .chart-header h2 i {
    color: #60a5fa;
}

/* ========================================
   6. MODALS
   ======================================== */
[data-theme="dark"] .modal-overlay {
    background: rgba(0, 0, 0, 0.7);
}

[data-theme="dark"] .modal-content {
    background: #1e293b;
    box-shadow: 0 20px 60px rgba(0, 0, 0, 0.5);
}

[data-theme="dark"] .modal-header {
    border-bottom-color: #334155;
}

[data-theme="dark"] .modal-header h3 {
    color: #e2e8f0;
}

[data-theme="dark"] .modal-header h3 i {
    color: #60a5fa;
}

[data-theme="dark"] .modal-close {
    color: #94a3b8;
    background: #334155;
}

[data-theme="dark"] .modal-close:hover {
    color: #e2e8f0;
    background: #475569;
}

[data-theme="dark"] .modal-body {
    color: #cbd5e1;
}

[data-theme="dark"] .modal-body p {
    color: #94a3b8;
}

[data-theme="dark"] .modal-body h4 {
    color: #e2e8f0;
}

[data-theme="dark"] .modal-footer {
    background: #0f172a;
    border-top-color: #334155;
}

[data-theme="dark"] .modal-compact label {
    color: #cbd5e1;
}

[data-theme="dark"] .modal-compact .form-input {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}

[data-theme="dark"] .modal-compact .form-input:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* ========================================
   7. TABLES
   ======================================== */
[data-theme="dark"] .contacts-table-container {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .contacts-table th {
    background: #0f172a;
    color: #94a3b8;
    border-bottom-color: #334155;
}

[data-theme="dark"] .contacts-table td {
    color: #cbd5e1;
    border-bottom-color: #1e293b;
}

[data-theme="dark"] .contacts-table tr:hover {
    background: #334155;
}

[data-theme="dark"] .contact-name {
    color: #e2e8f0;
}

[data-theme="dark"] .contact-email {
    color: #60a5fa;
}

[data-theme="dark"] .contact-date {
    color: #64748b;
}

[data-theme="dark"] .contact-source {
    background: #334155;
    color: #94a3b8;
}

/* ========================================
   8. STATUS BADGES & CHIPS
   ======================================== */
[data-theme="dark"] .status-new {
    background: #1e3a5f;
    color: #60a5fa;
}

[data-theme="dark"] .status-contacted {
    background: #451a03;
    color: #fbbf24;
}

[data-theme="dark"] .status-qualified {
    background: #2e1065;
    color: #a78bfa;
}

[data-theme="dark"] .status-converted {
    background: #052e16;
    color: #4ade80;
}

[data-theme="dark"] .status-lost {
    background: #450a0a;
    color: #f87171;
}

[data-theme="dark"] .status-badge.processed {
    background: #052e16;
    color: #4ade80;
}

[data-theme="dark"] .status-badge.processing {
    background: #451a03;
    color: #fbbf24;
}

[data-theme="dark"] .status-badge.error {
    background: #450a0a;
    color: #f87171;
}

[data-theme="dark"] .badge-info {
    background: #172554;
    color: #60a5fa;
}

[data-theme="dark"] .badge-required {
    background: #450a0a;
    color: #f87171;
}

[data-theme="dark"] .badge-default {
    background: #172554;
    color: #93c5fd;
}

[data-theme="dark"] .badge-free {
    background: #052e16;
    color: #4ade80;
}

[data-theme="dark"] .stat-chip {
    background: #334155;
    color: #cbd5e1;
    border-color: #475569;
}

[data-theme="dark"] .current-template {
    background: #052e16;
    color: #4ade80;
}

[data-theme="dark"] .current-template i {
    color: #4ade80;
}

/* Provider statuses */
[data-theme="dark"] .provider-status.configured {
    background: #052e16;
    color: #4ade80;
}

[data-theme="dark"] .provider-status.not-configured {
    background: #334155;
    color: #64748b;
}

/* ========================================
   9. ALERTS & INFO BOXES
   ======================================== */
[data-theme="dark"] .alert-success {
    background: #052e16;
    border-color: #166534;
    color: #4ade80;
}

[data-theme="dark"] .alert-error,
[data-theme="dark"] .alert-danger {
    background: #450a0a;
    border-color: #991b1b;
    color: #f87171;
}

[data-theme="dark"] .alert-warning {
    background: #451a03;
    border-color: #92400e;
    color: #fbbf24;
}

[data-theme="dark"] .info-box,
[data-theme="dark"] .security-info {
    background: #172554;
    border-color: #1e40af;
}

[data-theme="dark"] .info-box i,
[data-theme="dark"] .security-info > i {
    color: #60a5fa;
}

[data-theme="dark"] .info-box p {
    color: #93c5fd;
}

[data-theme="dark"] .security-info strong {
    color: #93c5fd;
}

[data-theme="dark"] .security-info p {
    color: #94a3b8;
}

[data-theme="dark"] .retention-info {
    background: #451a03;
    border-color: #92400e;
    color: #fbbf24;
}

[data-theme="dark"] .retention-info > i {
    color: #f59e0b;
}

[data-theme="dark"] .retention-info strong {
    color: #fcd34d;
}

/* ========================================
   10. TOGGLE SWITCHES
   ======================================== */
[data-theme="dark"] .toggle-row {
    background: #0f172a;
    border-color: #334155;
}

[data-theme="dark"] .toggle-title {
    color: #e2e8f0;
}

[data-theme="dark"] .toggle-desc {
    color: #94a3b8;
}

[data-theme="dark"] .toggle-slider {
    background-color: #475569;
}

[data-theme="dark"] .toggle-slider:before {
    background-color: #e2e8f0;
}

[data-theme="dark"] .toggle-switch {
    background: #475569;
}

[data-theme="dark"] .toggle-switch::after {
    background: #e2e8f0;
}

[data-theme="dark"] .toggle-text {
    color: #cbd5e1;
}

/* ========================================
   11. EMPTY STATES
   ======================================== */
[data-theme="dark"] .empty-state,
[data-theme="dark"] .empty-state-premium,
[data-theme="dark"] .empty-state-card,
[data-theme="dark"] .empty-state-chart {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .empty-state .empty-icon,
[data-theme="dark"] .empty-state-premium .empty-icon,
[data-theme="dark"] .empty-icon {
    background: linear-gradient(135deg, #172554 0%, #1e3a5f 100%);
}

[data-theme="dark"] .empty-state .empty-icon i,
[data-theme="dark"] .empty-state-premium .empty-icon i,
[data-theme="dark"] .empty-icon i {
    color: #60a5fa;
}

[data-theme="dark"] .empty-state .empty-content h4,
[data-theme="dark"] .empty-state-premium .empty-content h4,
[data-theme="dark"] .empty-state-premium h4,
[data-theme="dark"] .empty-content h4 {
    color: #e2e8f0;
}

[data-theme="dark"] .empty-state .empty-content p,
[data-theme="dark"] .empty-state-premium .empty-content p,
[data-theme="dark"] .empty-state-premium p,
[data-theme="dark"] .empty-content p {
    color: #64748b;
}

/* ========================================
   12. TIPS & INFO ITEMS
   ======================================== */
[data-theme="dark"] .tip-item {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .tip-item:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .tip-icon-blue {
    background: linear-gradient(135deg, #172554 0%, #1e3a5f 100%);
}

[data-theme="dark"] .tip-icon-purple {
    background: linear-gradient(135deg, #2e1065 0%, #3b0764 100%);
}

[data-theme="dark"] .tip-text strong {
    color: #e2e8f0;
}

[data-theme="dark"] .tip-text p {
    color: #94a3b8;
}

[data-theme="dark"] .tip-link {
    color: #a78bfa;
}

[data-theme="dark"] .tip-link:hover {
    color: #c4b5fd;
}

/* ========================================
   13. TEMPLATES (reponses page)
   ======================================== */
[data-theme="dark"] .category-tab {
    background: #334155;
    border-color: #475569;
    color: #94a3b8;
}

[data-theme="dark"] .category-tab:hover {
    border-color: #3b82f6;
    color: #60a5fa;
}

[data-theme="dark"] .category-tab.active {
    background: #3b82f6;
    border-color: #3b82f6;
    color: white;
}

[data-theme="dark"] .template-item {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .template-item:hover {
    border-color: #2563eb;
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .template-icon {
    background: linear-gradient(135deg, #172554 0%, #1e3a5f 100%);
    color: #60a5fa;
}

[data-theme="dark"] .template-info h4 {
    color: #e2e8f0;
}

[data-theme="dark"] .template-info p {
    color: #64748b;
}

[data-theme="dark"] .template-use-btn {
    background: #172554;
    color: #60a5fa;
}

[data-theme="dark"] .template-use-btn:hover {
    background: #3b82f6;
    color: white;
}

/* ========================================
   14. VARIABLES SECTION (reponses)
   ======================================== */
[data-theme="dark"] .variables-section {
    background: #0f172a;
    border-color: #334155;
}

[data-theme="dark"] .variables-header i {
    color: #60a5fa;
}

[data-theme="dark"] .variables-header strong {
    color: #e2e8f0;
}

[data-theme="dark"] .variable-item code {
    background: #334155;
    color: #60a5fa;
    border-color: #475569;
}

[data-theme="dark"] .variable-item span {
    color: #64748b;
}

/* ========================================
   15. AVATAR UPLOAD
   ======================================== */
[data-theme="dark"] .avatar-circle {
    border-color: #475569;
}

[data-theme="dark"] .avatar-placeholder {
    background: linear-gradient(135deg, #172554 0%, #1e3a5f 100%);
    color: #60a5fa;
}

[data-theme="dark"] .avatar-badge {
    border-color: #1e293b;
}

[data-theme="dark"] .avatar-delete-btn {
    background: #334155;
    color: #f87171;
    border-color: #7f1d1d;
}

[data-theme="dark"] .avatar-delete-btn:hover {
    background: #450a0a;
    border-color: #dc2626;
}

/* ========================================
   16. UPLOAD ZONE (knowledge base)
   ======================================== */
[data-theme="dark"] .upload-zone {
    border-color: #475569;
    background: linear-gradient(135deg, #0f172a 0%, #172554 100%);
}

[data-theme="dark"] .upload-zone:hover {
    border-color: #3b82f6;
    background: linear-gradient(135deg, #172554 0%, #1e3a5f 100%);
}

[data-theme="dark"] .upload-zone.drag-over {
    border-color: #3b82f6;
    background: #1e3a5f;
}

[data-theme="dark"] .upload-icon-circle {
    background: linear-gradient(135deg, #172554 0%, #1e3a5f 100%);
}

[data-theme="dark"] .upload-icon-circle i {
    color: #60a5fa;
}

[data-theme="dark"] .upload-zone h3 {
    color: #e2e8f0;
}

[data-theme="dark"] .upload-zone p {
    color: #94a3b8;
}

[data-theme="dark"] .format-tag {
    background: #334155;
    color: #cbd5e1;
    border-color: #475569;
}

[data-theme="dark"] .format-tag i {
    color: #60a5fa;
}

[data-theme="dark"] .upload-progress {
    background: #0f172a;
    border-color: #334155;
}

[data-theme="dark"] .progress-bar {
    background: #334155;
}

[data-theme="dark"] .progress-text {
    color: #94a3b8;
}

[data-theme="dark"] .upload-profile-row {
    background: #0f172a;
    border-color: #334155;
}

[data-theme="dark"] .upload-profile-row label {
    color: #94a3b8;
}

/* ========================================
   17. DOCUMENT CARDS (knowledge base)
   ======================================== */
[data-theme="dark"] .document-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .document-card:hover {
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.3);
    border-color: #475569;
}

[data-theme="dark"] .document-header {
    background: #0f172a;
    border-bottom-color: #334155;
}

[data-theme="dark"] .document-icon {
    background: linear-gradient(135deg, #172554 0%, #1e3a5f 100%);
}

[data-theme="dark"] .document-icon i {
    color: #60a5fa;
}

[data-theme="dark"] .document-name {
    color: #e2e8f0;
}

[data-theme="dark"] .document-meta {
    color: #64748b;
}

[data-theme="dark"] .document-summary {
    color: #94a3b8;
}

[data-theme="dark"] .document-actions {
    border-top-color: #334155;
}

[data-theme="dark"] .document-category {
    background: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .btn-icon {
    color: #94a3b8;
}

[data-theme="dark"] .btn-icon:hover {
    background: #334155;
    color: #e2e8f0;
}

/* ========================================
   18. PROCESSING STATUS
   ======================================== */
[data-theme="dark"] .status-indicator {
    background: #052e16;
    color: #4ade80;
    box-shadow: 0 4px 16px rgba(0, 0, 0, 0.4);
}

[data-theme="dark"] .processing-status.processing .status-indicator {
    background: #451a03;
    color: #fbbf24;
}

[data-theme="dark"] .processing-status.error .status-indicator {
    background: #450a0a;
    color: #f87171;
}

/* ========================================
   19. TEST ZONE (API config)
   ======================================== */
[data-theme="dark"] .test-zone.test-success {
    background: #052e16;
    border-color: #166534;
    color: #4ade80;
}

[data-theme="dark"] .test-zone.test-error {
    background: #450a0a;
    border-color: #991b1b;
    color: #f87171;
}

[data-theme="dark"] .test-zone.test-info {
    background: #172554;
    border-color: #1e40af;
    color: #60a5fa;
}

/* ========================================
   20. PROVIDER CARD (API config)
   ======================================== */
[data-theme="dark"] .provider-card {
    border-left-color: #334155;
}

[data-theme="dark"] .provider-card.has-key {
    border-left-color: #10b981;
}

/* ========================================
   21. DASHBOARD - Stats & Quick Actions
   ======================================== */
[data-theme="dark"] .stat-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .stat-card:hover {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] .stat-card.alert {
    border-color: #7f1d1d;
    background: linear-gradient(135deg, #1e293b 0%, #450a0a 100%);
}

[data-theme="dark"] .stat-icon {
    background: #172554;
    color: #60a5fa;
}

[data-theme="dark"] .stat-icon.alert {
    background: #450a0a;
    color: #f87171;
}

[data-theme="dark"] .stat-value {
    color: #e2e8f0;
}

[data-theme="dark"] .stat-label {
    color: #94a3b8;
}

[data-theme="dark"] .stat-trend.positive {
    background: #052e16;
    color: #4ade80;
}

[data-theme="dark"] .stat-trend.negative {
    background: #450a0a;
    color: #f87171;
}

[data-theme="dark"] .stat-link {
    color: #f87171;
}

[data-theme="dark"] .stat-count,
[data-theme="dark"] .status-count {
    color: #60a5fa;
}

[data-theme="dark"] .quick-action-card {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .quick-action-card:hover {
    border-color: #3b82f6;
    box-shadow: 0 4px 12px rgba(59, 130, 246, 0.2);
}

[data-theme="dark"] .quick-action-icon {
    background: #172554;
    color: #60a5fa;
}

[data-theme="dark"] .quick-action-card:hover .quick-action-icon {
    background: #3b82f6;
    color: #fff;
}

[data-theme="dark"] .quick-action-content h3 {
    color: #e2e8f0;
}

[data-theme="dark"] .quick-action-content span {
    color: #64748b;
}

[data-theme="dark"] .section-header h2 {
    color: #93c5fd;
}

[data-theme="dark"] .section-header h2 i {
    color: #60a5fa;
}

/* ========================================
   22. DASHBOARD - Activity & Status
   ======================================== */
[data-theme="dark"] .activity-item {
    background: #0f172a;
    border-color: #334155;
}

[data-theme="dark"] .activity-item:hover {
    background: #172554;
    border-color: #1e40af;
}

[data-theme="dark"] .activity-icon {
    background: #172554;
    color: #60a5fa;
}

[data-theme="dark"] .activity-text {
    color: #cbd5e1;
}

[data-theme="dark"] .activity-meta {
    color: #64748b;
}

[data-theme="dark"] .activity-time {
    color: #94a3b8;
}

[data-theme="dark"] .status-item {
    background: #0f172a;
    border-color: #334155;
}

[data-theme="dark"] .status-label {
    color: #cbd5e1;
}

[data-theme="dark"] .status-label i {
    color: #94a3b8;
}

[data-theme="dark"] .status-value.active {
    color: #4ade80;
}

[data-theme="dark"] .status-value.inactive {
    color: #64748b;
}

[data-theme="dark"] .status-item.status-warning {
    background: #451a03;
    border-color: #92400e;
}

[data-theme="dark"] .status-value.warning {
    color: #fbbf24;
}

[data-theme="dark"] .status-value.muted {
    color: #64748b;
}

/* ========================================
   23. DASHBOARD - Chart & Opportunity
   ======================================== */
[data-theme="dark"] .legend-item {
    color: #94a3b8;
}

[data-theme="dark"] .bar-value {
    color: #94a3b8;
}

[data-theme="dark"] .chart-label {
    border-top-color: #334155;
}

[data-theme="dark"] .day-name {
    color: #cbd5e1;
}

[data-theme="dark"] .day-date {
    color: #64748b;
}

[data-theme="dark"] .opportunity-card {
    background: linear-gradient(135deg, #172554 0%, #1e3a5f 100%);
    border-color: #1e40af;
}

[data-theme="dark"] .opportunity-count {
    color: #93c5fd;
}

[data-theme="dark"] .preview-label {
    color: #60a5fa;
}

[data-theme="dark"] .preview-text {
    color: #93c5fd;
}

[data-theme="dark"] .btn-opportunity.btn-secondary {
    background: #1e293b;
    color: #93c5fd;
    border-color: #1e40af;
}

[data-theme="dark"] .btn-opportunity.btn-secondary:hover {
    background: #172554;
}

[data-theme="dark"] .dashboard-filter {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .dashboard-filter label {
    color: #94a3b8;
}

[data-theme="dark"] .dashboard-filter select {
    background-color: #334155;
    border-color: #475569;
    color: #e2e8f0;
}

[data-theme="dark"] .dashboard-filter select:focus {
    border-color: #3b82f6;
    box-shadow: 0 0 0 3px rgba(59, 130, 246, 0.2);
}

/* ========================================
   24. CONVERSATIONS PAGE
   ======================================== */
[data-theme="dark"] .conversations-list,
[data-theme="dark"] .conversation-detail {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .list-header,
[data-theme="dark"] .detail-header {
    background: #0f172a;
    border-bottom-color: #334155;
}

[data-theme="dark"] .list-header h3,
[data-theme="dark"] .detail-header h3 {
    color: #e2e8f0;
}

[data-theme="dark"] .list-header h3 i,
[data-theme="dark"] .detail-header h3 i {
    color: #60a5fa;
}

[data-theme="dark"] .list-count {
    background: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .conversation-item {
    border-bottom-color: #334155;
}

[data-theme="dark"] .conversation-item:hover {
    background: #334155;
}

[data-theme="dark"] .conversation-item.active {
    background: #172554;
    border-left-color: #3b82f6;
}

[data-theme="dark"] .conversation-widget {
    background: #172554;
    color: #60a5fa;
}

[data-theme="dark"] .conversation-date {
    color: #64748b;
}

[data-theme="dark"] .conversation-preview {
    color: #cbd5e1;
}

[data-theme="dark"] .conversation-stats {
    color: #64748b;
}

[data-theme="dark"] .messages-container {
    background: #0f172a;
}

[data-theme="dark"] .message-bot {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}

[data-theme="dark"] .loading-state {
    color: #94a3b8;
}

/* ========================================
   25. CONTACTS - Action buttons
   ======================================== */
[data-theme="dark"] .action-btn {
    background: #334155;
    border-color: #475569;
    color: #94a3b8;
}

[data-theme="dark"] .action-btn:hover {
    background: #172554;
    color: #60a5fa;
    border-color: #1e40af;
}

[data-theme="dark"] .action-btn.delete:hover {
    background: #450a0a;
    color: #f87171;
    border-color: #991b1b;
}

[data-theme="dark"] .text-muted {
    color: #64748b;
}

[data-theme="dark"] .detail-row {
    border-bottom-color: #334155;
}

[data-theme="dark"] .detail-label {
    color: #94a3b8;
}

[data-theme="dark"] .detail-value {
    color: #e2e8f0;
}

[data-theme="dark"] .custom-data-header {
    border-top-color: #334155;
}

[data-theme="dark"] .custom-data-header strong {
    color: #94a3b8;
}

[data-theme="dark"] .notes-section label {
    color: #cbd5e1;
}

/* ========================================
   26. BOT PROFILES
   ======================================== */
[data-theme="dark"] .profiles-list {
    background: #1e293b;
    border-color: #334155;
}

[data-theme="dark"] .profile-row {
    border-bottom-color: #334155;
}

[data-theme="dark"] .profile-row:hover {
    background: #334155;
}

[data-theme="dark"] .profile-avatar {
    background: linear-gradient(135deg, #172554, #1e3a5f);
}

[data-theme="dark"] .avatar-placeholder {
    color: #60a5fa;
}

[data-theme="dark"] .status-dot {
    border-color: #1e293b;
}

[data-theme="dark"] .profile-name-line h3 {
    color: #e2e8f0;
}

[data-theme="dark"] .profile-bot-name {
    color: #94a3b8;
}

[data-theme="dark"] .profile-desc {
    color: #64748b;
}

[data-theme="dark"] .meta-tag.tag-sector {
    background: #052e16;
    color: #4ade80;
}

[data-theme="dark"] .meta-tag.tag-widgets {
    background: #334155;
    color: #94a3b8;
    border-color: #475569;
}

[data-theme="dark"] .meta-tag.tag-default {
    background: #334155;
    color: #94a3b8;
}

[data-theme="dark"] .meta-tag.tag-openai {
    background: #052e16;
    color: #4ade80;
}

[data-theme="dark"] .meta-tag.tag-mistral {
    background: #431407;
    color: #fb923c;
}

[data-theme="dark"] .meta-tag.tag-claude {
    background: #2e1065;
    color: #c084fc;
}

[data-theme="dark"] .meta-tag.tag-grok {
    background: #172554;
    color: #60a5fa;
}

[data-theme="dark"] .btn-icon.btn-edit:hover { background: #172554; color: #60a5fa; }
[data-theme="dark"] .btn-icon.btn-default:hover { background: #451a03; color: #fbbf24; }
[data-theme="dark"] .btn-icon.btn-toggle:hover { background: #334155; color: #cbd5e1; }
[data-theme="dark"] .btn-icon.btn-delete:hover { background: #450a0a; color: #f87171; }

[data-theme="dark"] .form-section {
    border-bottom-color: #334155;
}

[data-theme="dark"] .form-section h4 {
    color: #93c5fd;
}

[data-theme="dark"] .form-section h4 i {
    color: #60a5fa;
}

/* ========================================
   27. COMPETENCE PAGE
   ======================================== */
[data-theme="dark"] .competence-toggle {
    background: #0f172a;
    border-bottom-color: #334155;
}

[data-theme="dark"] .competence-icon.service {
    background: #1e3a5f;
    color: #60a5fa;
}

[data-theme="dark"] .competence-icon.leads {
    background: #451a03;
    color: #fbbf24;
}

[data-theme="dark"] .competence-icon.support {
    background: #2e1065;
    color: #a78bfa;
}

[data-theme="dark"] .competence-title h3 {
    color: #e2e8f0;
}

[data-theme="dark"] .competence-title span {
    color: #94a3b8;
}

[data-theme="dark"] .option-item {
    background: #0f172a;
    border-color: #334155;
}

[data-theme="dark"] .option-item:hover {
    background: #172554;
    border-color: #1e40af;
}

[data-theme="dark"] .option-item span {
    color: #cbd5e1;
}

[data-theme="dark"] .settings-card.disabled .competence-toggle {
    background: #0f172a;
}

/* ========================================
   28. FLOW CONVERSATION (canvas)
   ======================================== */
[data-theme="dark"] .flow-page-wrapper {
    background: #0f172a;
}

/* ========================================
   29. LOGIN PAGE
   ======================================== */
[data-theme="dark"] body {
    background: #0f172a;
}

[data-theme="dark"] .container,
[data-theme="dark"] .login-container {
    background: #1e293b;
    box-shadow: 0 4px 6px rgba(0, 0, 0, 0.3);
}

[data-theme="dark"] h2 {
    color: #e2e8f0;
}

[data-theme="dark"] label {
    color: #94a3b8;
}

[data-theme="dark"] input[type="text"],
[data-theme="dark"] input[type="password"],
[data-theme="dark"] input[type="email"] {
    background: #334155;
    color: #e2e8f0;
    border-color: #475569;
}

[data-theme="dark"] .toggle-password {
    color: #94a3b8;
}

[data-theme="dark"] .footer {
    color: #64748b;
}

[data-theme="dark"] .footer a {
    color: #60a5fa;
}

[data-theme="dark"] .error {
    color: #f87171;
}

[data-theme="dark"] .remember-me {
    color: #94a3b8;
}

[data-theme="dark"] .message.success {
    background-color: #052e16;
    color: #4ade80;
    border-color: #166534;
}

[data-theme="dark"] .message.error {
    background-color: #450a0a;
    color: #f87171;
    border-color: #991b1b;
}

[data-theme="dark"] .info-text {
    color: #94a3b8;
}

[data-theme="dark"] .back-link a {
    color: #60a5fa;
}

[data-theme="dark"] .password-rules {
    color: #94a3b8;
}

/* ========================================
   30. DASHBOARD - Alert Banner
   ======================================== */
[data-theme="dark"] .alert-banner {
    background: linear-gradient(135deg, #450a0a 0%, #7f1d1d 100%);
    border-color: #991b1b;
}

[data-theme="dark"] .alert-banner:hover {
    background: linear-gradient(135deg, #7f1d1d 0%, #991b1b 100%);
    box-shadow: 0 4px 12px rgba(220, 38, 38, 0.3);
}

[data-theme="dark"] .alert-content strong {
    color: #fca5a5;
}

[data-theme="dark"] .alert-content span {
    color: #f87171;
}

[data-theme="dark"] .alert-action {
    color: #f87171;
}
