/* Global Dark/Brand Mode Support for All Pages */
/* This file provides comprehensive dark and brand mode compatibility */

/* Override CSS variable for better border visibility - aligned with industry standards (20-30% range) */
[data-bs-theme="dark"],
[data-bs-theme="brand"] {
    --tb-border-color: rgba(255, 255, 255, 0.3) !important;
    --tb-border-color-translucent: rgba(255, 255, 255, 0.3) !important;
}

/* Override all hardcoded light backgrounds */
[data-bs-theme="dark"] div[style*="background: #f8f9fa"],
[data-bs-theme="dark"] div[style*="background:#f8f9fa"],
[data-bs-theme="dark"] div[style*="background-color: #f8f9fa"],
[data-bs-theme="dark"] div[style*="background-color:#f8f9fa"],
[data-bs-theme="brand"] div[style*="background: #f8f9fa"],
[data-bs-theme="brand"] div[style*="background:#f8f9fa"],
[data-bs-theme="brand"] div[style*="background-color: #f8f9fa"],
[data-bs-theme="brand"] div[style*="background-color:#f8f9fa"] {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Override all hardcoded white backgrounds */
[data-bs-theme="dark"] div[style*="background: #fff"],
[data-bs-theme="dark"] div[style*="background:#fff"],
[data-bs-theme="dark"] div[style*="background: white"],
[data-bs-theme="dark"] div[style*="background:white"],
[data-bs-theme="dark"] div[style*="background-color: #fff"],
[data-bs-theme="dark"] div[style*="background-color:#fff"],
[data-bs-theme="dark"] div[style*="background-color: white"],
[data-bs-theme="dark"] div[style*="background-color:white"],
[data-bs-theme="brand"] div[style*="background: #fff"],
[data-bs-theme="brand"] div[style*="background:#fff"],
[data-bs-theme="brand"] div[style*="background: white"],
[data-bs-theme="brand"] div[style*="background:white"],
[data-bs-theme="brand"] div[style*="background-color: #fff"],
[data-bs-theme="brand"] div[style*="background-color:#fff"],
[data-bs-theme="brand"] div[style*="background-color: white"],
[data-bs-theme="brand"] div[style*="background-color:white"] {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
}

/* Override hardcoded dark text colors */
[data-bs-theme="dark"] div[style*="color: #2d3748"],
[data-bs-theme="dark"] div[style*="color:#2d3748"],
[data-bs-theme="dark"] p[style*="color: #2d3748"],
[data-bs-theme="dark"] p[style*="color:#2d3748"],
[data-bs-theme="dark"] span[style*="color: #2d3748"],
[data-bs-theme="dark"] span[style*="color:#2d3748"],
[data-bs-theme="dark"] h1[style*="color: #2d3748"],
[data-bs-theme="dark"] h1[style*="color:#2d3748"],
[data-bs-theme="dark"] h2[style*="color: #2d3748"],
[data-bs-theme="dark"] h2[style*="color:#2d3748"],
[data-bs-theme="dark"] h3[style*="color: #2d3748"],
[data-bs-theme="dark"] h3[style*="color:#2d3748"],
[data-bs-theme="dark"] h4[style*="color: #2d3748"],
[data-bs-theme="dark"] h4[style*="color:#2d3748"],
[data-bs-theme="dark"] h5[style*="color: #2d3748"],
[data-bs-theme="dark"] h5[style*="color:#2d3748"],
[data-bs-theme="dark"] h6[style*="color: #2d3748"],
[data-bs-theme="dark"] h6[style*="color:#2d3748"],
[data-bs-theme="brand"] div[style*="color: #2d3748"],
[data-bs-theme="brand"] div[style*="color:#2d3748"],
[data-bs-theme="brand"] p[style*="color: #2d3748"],
[data-bs-theme="brand"] p[style*="color:#2d3748"],
[data-bs-theme="brand"] span[style*="color: #2d3748"],
[data-bs-theme="brand"] span[style*="color:#2d3748"],
[data-bs-theme="brand"] h1[style*="color: #2d3748"],
[data-bs-theme="brand"] h1[style*="color:#2d3748"],
[data-bs-theme="brand"] h2[style*="color: #2d3748"],
[data-bs-theme="brand"] h2[style*="color:#2d3748"],
[data-bs-theme="brand"] h3[style*="color: #2d3748"],
[data-bs-theme="brand"] h3[style*="color:#2d3748"],
[data-bs-theme="brand"] h4[style*="color: #2d3748"],
[data-bs-theme="brand"] h4[style*="color:#2d3748"],
[data-bs-theme="brand"] h5[style*="color: #2d3748"],
[data-bs-theme="brand"] h5[style*="color:#2d3748"],
[data-bs-theme="brand"] h6[style*="color: #2d3748"],
[data-bs-theme="brand"] h6[style*="color:#2d3748"] {
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Override hardcoded #333 text colors */
[data-bs-theme="dark"] div[style*="color: #333"],
[data-bs-theme="dark"] div[style*="color:#333"],
[data-bs-theme="dark"] p[style*="color: #333"],
[data-bs-theme="dark"] p[style*="color:#333"],
[data-bs-theme="dark"] span[style*="color: #333"],
[data-bs-theme="dark"] span[style*="color:#333"],
[data-bs-theme="dark"] h1[style*="color: #333"],
[data-bs-theme="dark"] h1[style*="color:#333"],
[data-bs-theme="dark"] h2[style*="color: #333"],
[data-bs-theme="dark"] h2[style*="color:#333"],
[data-bs-theme="brand"] div[style*="color: #333"],
[data-bs-theme="brand"] div[style*="color:#333"],
[data-bs-theme="brand"] p[style*="color: #333"],
[data-bs-theme="brand"] p[style*="color:#333"],
[data-bs-theme="brand"] span[style*="color: #333"],
[data-bs-theme="brand"] span[style*="color:#333"],
[data-bs-theme="brand"] h1[style*="color: #333"],
[data-bs-theme="brand"] h1[style*="color:#333"],
[data-bs-theme="brand"] h2[style*="color: #333"],
[data-bs-theme="brand"] h2[style*="color:#333"] {
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Override hardcoded gray text colors */
[data-bs-theme="dark"] div[style*="color: #718096"],
[data-bs-theme="dark"] div[style*="color:#718096"],
[data-bs-theme="dark"] p[style*="color: #718096"],
[data-bs-theme="dark"] p[style*="color:#718096"],
[data-bs-theme="dark"] span[style*="color: #718096"],
[data-bs-theme="dark"] span[style*="color:#718096"],
[data-bs-theme="brand"] div[style*="color: #718096"],
[data-bs-theme="brand"] div[style*="color:#718096"],
[data-bs-theme="brand"] p[style*="color: #718096"],
[data-bs-theme="brand"] p[style*="color:#718096"],
[data-bs-theme="brand"] span[style*="color: #718096"],
[data-bs-theme="brand"] span[style*="color:#718096"] {
    color: var(--tb-text-muted, #adb5bd) !important;
}

/* Override gradient backgrounds with light colors */
[data-bs-theme="dark"] div[style*="background: linear-gradient"][style*="#f8f9fa"],
[data-bs-theme="dark"] div[style*="background:linear-gradient"][style*="#f8f9fa"],
[data-bs-theme="dark"] div[style*="background: linear-gradient"][style*="#ffffff"],
[data-bs-theme="dark"] div[style*="background:linear-gradient"][style*="#ffffff"],
[data-bs-theme="brand"] div[style*="background: linear-gradient"][style*="#f8f9fa"],
[data-bs-theme="brand"] div[style*="background:linear-gradient"][style*="#f8f9fa"],
[data-bs-theme="brand"] div[style*="background: linear-gradient"][style*="#ffffff"],
[data-bs-theme="brand"] div[style*="background:linear-gradient"][style*="#ffffff"] {
    background: linear-gradient(135deg, var(--tb-dark-bg-subtle, #1a1d29) 0%, var(--tb-dark, #212529) 100%) !important;
}

/* Card backgrounds in dark/brand mode - 25% base, 35% hover aligns with common patterns */
[data-bs-theme="dark"] .card,
[data-bs-theme="brand"] .card {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

[data-bs-theme="dark"] .card:hover,
[data-bs-theme="brand"] .card:hover {
    border-color: rgba(255, 255, 255, 0.25) !important;
}

[data-bs-theme="dark"] .card-body,
[data-bs-theme="brand"] .card-body {
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Table backgrounds */
[data-bs-theme="dark"] .table,
[data-bs-theme="brand"] .table {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .table thead th,
[data-bs-theme="brand"] .table thead th {
    color: var(--tb-body-color, #e9ecef) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

[data-bs-theme="dark"] .table tbody td,
[data-bs-theme="brand"] .table tbody td {
    color: var(--tb-body-color, #e9ecef) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

[data-bs-theme="dark"] .table tbody tr,
[data-bs-theme="brand"] .table tbody tr {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
}

[data-bs-theme="dark"] .table tbody tr:hover,
[data-bs-theme="brand"] .table tbody tr:hover {
    background: var(--tb-dark, #212529) !important;
}

/* Form controls - 30% opacity aligns with Material Design and Apple HIG standards */
[data-bs-theme="dark"] .form-control,
[data-bs-theme="dark"] .form-select,
[data-bs-theme="brand"] .form-control,
[data-bs-theme="brand"] .form-select {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.3) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .form-control:focus,
[data-bs-theme="dark"] .form-select:focus,
[data-bs-theme="brand"] .form-control:focus,
[data-bs-theme="brand"] .form-select:focus {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: #667eea !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] input[readonly][style*="background-color: #f8f9fa"],
[data-bs-theme="brand"] input[readonly][style*="background-color: #f8f9fa"] {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Text muted colors */
[data-bs-theme="dark"] .text-muted,
[data-bs-theme="brand"] .text-muted {
    color: var(--tb-text-muted, #adb5bd) !important;
}

/* Badge colors */
[data-bs-theme="dark"] .badge,
[data-bs-theme="brand"] .badge {
    color: white !important;
}

/* Button secondary in dark/brand mode */
[data-bs-theme="dark"] .btn-secondary,
[data-bs-theme="brand"] .btn-secondary {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .btn-secondary:hover,
[data-bs-theme="brand"] .btn-secondary:hover {
    background-color: var(--tb-dark, #212529) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Alert backgrounds */
[data-bs-theme="dark"] .alert,
[data-bs-theme="brand"] .alert {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Modal backgrounds */
[data-bs-theme="dark"] .modal-content,
[data-bs-theme="brand"] .modal-content {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

[data-bs-theme="dark"] .modal-body,
[data-bs-theme="brand"] .modal-body {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .modal-footer,
[data-bs-theme="brand"] .modal-footer {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-top-color: rgba(255, 255, 255, 0.25) !important;
}

/* Dropdown menus */
[data-bs-theme="dark"] .dropdown-menu,
[data-bs-theme="brand"] .dropdown-menu {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

[data-bs-theme="dark"] .dropdown-item,
[data-bs-theme="brand"] .dropdown-item {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .dropdown-item:hover,
[data-bs-theme="brand"] .dropdown-item:hover {
    background-color: var(--tb-dark, #212529) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* List group */
[data-bs-theme="dark"] .list-group-item,
[data-bs-theme="brand"] .list-group-item {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Pagination */
[data-bs-theme="dark"] .page-link,
[data-bs-theme="brand"] .page-link {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .page-link:hover,
[data-bs-theme="brand"] .page-link:hover {
    background-color: var(--tb-dark, #212529) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .page-item.active .page-link,
[data-bs-theme="brand"] .page-item.active .page-link {
    background-color: #667eea !important;
    border-color: #667eea !important;
    color: white !important;
}

/* Breadcrumb */
[data-bs-theme="dark"] .breadcrumb,
[data-bs-theme="brand"] .breadcrumb {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
}

[data-bs-theme="dark"] .breadcrumb-item a,
[data-bs-theme="brand"] .breadcrumb-item a {
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Nav tabs */
[data-bs-theme="dark"] .nav-tabs .nav-link,
[data-bs-theme="brand"] .nav-tabs .nav-link {
    color: var(--tb-body-color, #e9ecef) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

[data-bs-theme="dark"] .nav-tabs .nav-link.active,
[data-bs-theme="brand"] .nav-tabs .nav-link.active {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) rgba(255, 255, 255, 0.25) var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Tooltip */
[data-bs-theme="dark"] .tooltip .tooltip-inner,
[data-bs-theme="brand"] .tooltip .tooltip-inner {
    background-color: var(--tb-dark, #212529) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Popover */
[data-bs-theme="dark"] .popover,
[data-bs-theme="brand"] .popover {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .popover-header,
[data-bs-theme="brand"] .popover-header {
    background-color: var(--tb-dark, #212529) !important;
    border-bottom-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Progress bars */
[data-bs-theme="dark"] .progress,
[data-bs-theme="brand"] .progress {
    background-color: var(--tb-dark, #212529) !important;
}

/* Code blocks */
[data-bs-theme="dark"] code,
[data-bs-theme="dark"] pre,
[data-bs-theme="brand"] code,
[data-bs-theme="brand"] pre {
    background-color: var(--tb-dark, #212529) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Blockquote */
[data-bs-theme="dark"] blockquote,
[data-bs-theme="brand"] blockquote {
    border-left-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Specific class overrides for common patterns */
[data-bs-theme="dark"] .widget-card .card-header,
[data-bs-theme="brand"] .widget-card .card-header {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-bottom-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .alert-item,
[data-bs-theme="brand"] .alert-item {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .alert-item:hover,
[data-bs-theme="brand"] .alert-item:hover {
    background: var(--tb-dark, #212529) !important;
    border-color: var(--tb-border-color, rgba(255, 255, 255, 0.35)) !important;
}

[data-bs-theme="dark"] .folder-item:hover,
[data-bs-theme="brand"] .folder-item:hover {
    background: linear-gradient(135deg, var(--tb-dark-bg-subtle, #1a1d29) 0%, var(--tb-dark, #212529) 100%) !important;
    border-color: #667eea !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Override any remaining hardcoded backgrounds in style tags */
[data-bs-theme="dark"] style ~ *,
[data-bs-theme="brand"] style ~ * {
    /* This won't work, but we'll handle it via class selectors */
}

/* Ensure all elements with specific background classes get dark mode */
[data-bs-theme="dark"] [class*="bg-light"],
[data-bs-theme="brand"] [class*="bg-light"] {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] [class*="bg-white"],
[data-bs-theme="brand"] [class*="bg-white"] {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Index.php specific styles */
[data-bs-theme="dark"] .stat-widget:hover,
[data-bs-theme="brand"] .stat-widget:hover {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
}

[data-bs-theme="dark"] .alert-item .alert-title,
[data-bs-theme="brand"] .alert-item .alert-title {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .alert-item .alert-desc,
[data-bs-theme="brand"] .alert-item .alert-desc {
    color: var(--tb-text-muted, #adb5bd) !important;
}

[data-bs-theme="dark"] .stat-card-title,
[data-bs-theme="brand"] .stat-card-title {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .stat-card-desc,
[data-bs-theme="brand"] .stat-card-desc {
    color: var(--tb-text-muted, #adb5bd) !important;
}

[data-bs-theme="dark"] .filter-section,
[data-bs-theme="brand"] .filter-section {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

[data-bs-theme="dark"] .pagination-container,
[data-bs-theme="brand"] .pagination-container {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Domains.php specific styles */
[data-bs-theme="dark"] .domain-card .card-header,
[data-bs-theme="brand"] .domain-card .card-header {
    background: linear-gradient(135deg, var(--tb-dark-bg-subtle, #1a1d29) 0%, var(--tb-dark, #212529) 100%) !important;
    border-bottom-color: rgba(255, 255, 255, 0.25) !important;
}

[data-bs-theme="dark"] .domain-card .card-body,
[data-bs-theme="brand"] .domain-card .card-body {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
}

[data-bs-theme="dark"] .domain-title,
[data-bs-theme="brand"] .domain-title {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .domain-attributes,
[data-bs-theme="brand"] .domain-attributes {
    background: linear-gradient(135deg, var(--tb-dark-bg-subtle, #1a1d29) 0%, var(--tb-dark, #212529) 100%) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

[data-bs-theme="dark"] .domain-attributes .col-4,
[data-bs-theme="brand"] .domain-attributes .col-4 {
    border-right-color: rgba(255, 255, 255, 0.25) !important;
}

[data-bs-theme="dark"] .folder-drop-zone,
[data-bs-theme="brand"] .folder-drop-zone {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: #667eea !important;
    color: #667eea !important;
}

[data-bs-theme="dark"] .folder-drop-zone.drag-over,
[data-bs-theme="brand"] .folder-drop-zone.drag-over {
    background-color: rgba(102, 126, 234, 0.2) !important;
    border-color: #667eea !important;
}

[data-bs-theme="dark"] .card-title,
[data-bs-theme="brand"] .card-title {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .empty-state,
[data-bs-theme="brand"] .empty-state {
    color: var(--tb-text-muted, #adb5bd) !important;
}

[data-bs-theme="dark"] .domain-card.expiring-soon,
[data-bs-theme="brand"] .domain-card.expiring-soon {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.2) 0%, var(--tb-dark-bg-subtle, #1a1d29) 100%) !important;
    border-color: #ffc107 !important;
}

[data-bs-theme="dark"] .domain-card.expired-domain,
[data-bs-theme="brand"] .domain-card.expired-domain {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.2) 0%, var(--tb-dark-bg-subtle, #1a1d29) 100%) !important;
    border-color: #dc3545 !important;
}

/* AI Domain Discovery specific */
[data-bs-theme="dark"] .ai-background #discoveryResults *,
[data-bs-theme="brand"] .ai-background #discoveryResults * {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .ai-background #discoveryResults h5,
[data-bs-theme="dark"] .ai-background #discoveryResults h6,
[data-bs-theme="brand"] .ai-background #discoveryResults h5,
[data-bs-theme="brand"] .ai-background #discoveryResults h6 {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .ai-background .card-body,
[data-bs-theme="brand"] .ai-background .card-body {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Domain Watch specific */
[data-bs-theme="dark"] .domain-card.expiring-soon,
[data-bs-theme="brand"] .domain-card.expiring-soon {
    background: linear-gradient(135deg, rgba(255, 193, 7, 0.15) 0%, var(--tb-dark-bg-subtle, #1a1d29) 100%) !important;
}

[data-bs-theme="dark"] .domain-card.expired-domain,
[data-bs-theme="brand"] .domain-card.expired-domain {
    background: linear-gradient(135deg, rgba(220, 53, 69, 0.15) 0%, var(--tb-dark-bg-subtle, #1a1d29) 100%) !important;
}

/* Manage 2FA specific */
[data-bs-theme="dark"] .action-section,
[data-bs-theme="brand"] .action-section {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

[data-bs-theme="dark"] .action-section h3,
[data-bs-theme="brand"] .action-section h3 {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .action-section p,
[data-bs-theme="brand"] .action-section p {
    color: var(--tb-text-muted, #adb5bd) !important;
}

[data-bs-theme="dark"] .form-label,
[data-bs-theme="brand"] .form-label {
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Profile page specific */
[data-bs-theme="dark"] #welcome-message,
[data-bs-theme="brand"] #welcome-message {
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Welcome card section - Organic Neural Network + AI + Centralization pattern with varied hub positions */
[data-bs-theme="dark"] .card-body.bg-danger-subtle,
[data-bs-theme="brand"] .card-body.bg-danger-subtle {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    background-image: 
        url("data:image/svg+xml,%3Csvg width='600' height='600' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cstyle%3E.central-hub%7Bfill:%23667eea;opacity:0.8;filter:drop-shadow(0 0 6px %23667eea);%7D.node-large%7Bfill:%23667eea;opacity:0.7;filter:drop-shadow(0 0 4px %23667eea);%7D.node-medium%7Bfill:%23764ba2;opacity:0.6;filter:drop-shadow(0 0 3px %23764ba2);%7D.node-small%7Bfill:%236363f1;opacity:0.5;filter:drop-shadow(0 0 2px %236363f1);%7D.connection-strong%7Bstroke:%23667eea;stroke-width:2;opacity:0.4;%7D.connection-medium%7Bstroke:%23764ba2;stroke-width:1.5;opacity:0.3;%7D.connection-weak%7Bstroke:%236363f1;stroke-width:1;opacity:0.25;stroke-dasharray:3,3;%7D.ai-pulse%7Bfill:%23667eea;opacity:0.2;%7D%3C/style%3E%3C/defs%3E%3Cg%3E%3C!-- Central Hub 1 - Varied position --%3E%3Ccircle class='central-hub' cx='145' cy='185' r='10'/%3E%3Ccircle class='ai-pulse' cx='145' cy='185' r='16'/%3E%3Ccircle class='ai-pulse' cx='145' cy='185' r='24'/%3E%3C!-- Nodes around Hub 1 --%3E%3Ccircle class='node-large' cx='145' cy='75' r='7'/%3E%3Ccircle class='node-medium' cx='285' cy='105' r='5'/%3E%3Ccircle class='node-large' cx='275' cy='215' r='6'/%3E%3Ccircle class='node-medium' cx='165' cy='365' r='5'/%3E%3Ccircle class='node-small' cx='45' cy='285' r='4'/%3E%3Ccircle class='node-medium' cx='25' cy='165' r='5'/%3E%3Ccircle class='node-small' cx='85' cy='95' r='3'/%3E%3Ccircle class='node-small' cx='235' cy='95' r='4'/%3E%3Ccircle class='node-medium' cx='305' cy='205' r='5'/%3E%3Ccircle class='node-small' cx='235' cy='345' r='4'/%3E%3Ccircle class='node-small' cx='55' cy='365' r='3'/%3E%3Ccircle class='node-medium' cx='15' cy='225' r='5'/%3E%3Ccircle class='node-small' cx='105' cy='145' r='3'/%3E%3Ccircle class='node-small' cx='215' cy='165' r='4'/%3E%3Ccircle class='node-small' cx='175' cy='305' r='3'/%3E%3C!-- Connections from Hub 1 --%3E%3Cline class='connection-strong' x1='145' y1='185' x2='145' y2='75'/%3E%3Cline class='connection-strong' x1='145' y1='185' x2='285' y2='105'/%3E%3Cline class='connection-strong' x1='145' y1='185' x2='275' y2='215'/%3E%3Cline class='connection-strong' x1='145' y1='185' x2='165' y2='365'/%3E%3Cline class='connection-strong' x1='145' y1='185' x2='45' y2='285'/%3E%3Cline class='connection-strong' x1='145' y1='185' x2='25' y2='165'/%3E%3C!-- Inter-node connections --%3E%3Cline class='connection-medium' x1='145' y1='75' x2='85' y2='95'/%3E%3Cline class='connection-medium' x1='145' y1='75' x2='235' y2='95'/%3E%3Cline class='connection-medium' x1='285' y1='105' x2='305' y2='205'/%3E%3Cline class='connection-medium' x1='285' y1='105' x2='215' y2='165'/%3E%3Cline class='connection-medium' x1='275' y1='215' x2='305' y2='205'/%3E%3Cline class='connection-medium' x1='275' y1='215' x2='235' y2='345'/%3E%3Cline class='connection-medium' x1='165' y1='365' x2='235' y2='345'/%3E%3Cline class='connection-medium' x1='165' y1='365' x2='55' y2='365'/%3E%3Cline class='connection-medium' x1='45' y1='285' x2='15' y2='225'/%3E%3Cline class='connection-medium' x1='25' y1='165' x2='15' y2='225'/%3E%3Cline class='connection-medium' x1='25' y1='165' x2='105' y2='145'/%3E%3Cline class='connection-medium' x1='105' y1='145' x2='145' y2='75'/%3E%3Cline class='connection-medium' x1='215' y1='165' x2='175' y2='305'/%3E%3Cline class='connection-weak' x1='85' y1='95' x2='105' y2='145'/%3E%3Cline class='connection-weak' x1='235' y1='95' x2='215' y2='165'/%3E%3Cline class='connection-weak' x1='175' y1='305' x2='165' y2='365'/%3E%3Cline class='connection-weak' x1='55' y1='365' x2='45' y2='285'/%3E%3Cline class='connection-weak' x1='15' y1='225' x2='45' y2='285'/%3E%3C!-- Central Hub 2 - Different position --%3E%3Ccircle class='central-hub' cx='455' cy='415' r='9'/%3E%3Ccircle class='ai-pulse' cx='455' cy='415' r='15'/%3E%3Ccircle class='ai-pulse' cx='455' cy='415' r='22'/%3E%3C!-- Nodes around Hub 2 --%3E%3Ccircle class='node-large' cx='455' cy='305' r='6'/%3E%3Ccircle class='node-medium' cx='575' cy='335' r='5'/%3E%3Ccircle class='node-large' cx='565' cy='445' r='7'/%3E%3Ccircle class='node-medium' cx='475' cy='555' r='5'/%3E%3Ccircle class='node-small' cx='355' cy='525' r='4'/%3E%3Ccircle class='node-medium' cx='335' cy='405' r='5'/%3E%3Ccircle class='node-small' cx='395' cy='335' r='3'/%3E%3Ccircle class='node-small' cx='545' cy='335' r='4'/%3E%3Ccircle class='node-medium' cx='585' cy='445' r='5'/%3E%3Ccircle class='node-small' cx='545' cy='585' r='4'/%3E%3Ccircle class='node-small' cx='365' cy='605' r='3'/%3E%3Ccircle class='node-medium' cx='325' cy='465' r='5'/%3E%3Ccircle class='node-small' cx='415' cy='385' r='3'/%3E%3Ccircle class='node-small' cx='525' cy='405' r='4'/%3E%3Ccircle class='node-small' cx='485' cy='545' r='3'/%3E%3C!-- Connections from Hub 2 --%3E%3Cline class='connection-strong' x1='455' y1='415' x2='455' y2='305'/%3E%3Cline class='connection-strong' x1='455' y1='415' x2='575' y2='335'/%3E%3Cline class='connection-strong' x1='455' y1='415' x2='565' y2='445'/%3E%3Cline class='connection-strong' x1='455' y1='415' x2='475' y2='555'/%3E%3Cline class='connection-strong' x1='455' y1='415' x2='355' y2='525'/%3E%3Cline class='connection-strong' x1='455' y1='415' x2='335' y2='405'/%3E%3C!-- Inter-node connections Hub 2 --%3E%3Cline class='connection-medium' x1='455' y1='305' x2='395' y2='335'/%3E%3Cline class='connection-medium' x1='455' y1='305' x2='545' y2='335'/%3E%3Cline class='connection-medium' x1='575' y1='335' x2='585' y2='445'/%3E%3Cline class='connection-medium' x1='575' y1='335' x2='525' y2='405'/%3E%3Cline class='connection-medium' x1='565' y1='445' x2='585' y2='445'/%3E%3Cline class='connection-medium' x1='565' y1='445' x2='545' y2='585'/%3E%3Cline class='connection-medium' x1='475' y1='555' x2='545' y2='585'/%3E%3Cline class='connection-medium' x1='475' y1='555' x2='365' y2='605'/%3E%3Cline class='connection-medium' x1='355' y1='525' x2='325' y2='465'/%3E%3Cline class='connection-medium' x1='335' y1='405' x2='325' y2='465'/%3E%3Cline class='connection-medium' x1='335' y1='405' x2='415' y2='385'/%3E%3Cline class='connection-medium' x1='415' y1='385' x2='455' y2='305'/%3E%3Cline class='connection-medium' x1='525' y1='405' x2='485' y2='545'/%3E%3Cline class='connection-weak' x1='395' y1='335' x2='415' y2='385'/%3E%3Cline class='connection-weak' x1='545' y1='335' x2='525' y2='405'/%3E%3Cline class='connection-weak' x1='485' y1='545' x2='475' y2='555'/%3E%3Cline class='connection-weak' x1='365' y1='605' x2='355' y2='525'/%3E%3Cline class='connection-weak' x1='325' y1='465' x2='355' y2='525'/%3E%3C!-- Cross-connections between hubs --%3E%3Cline class='connection-weak' x1='275' y1='215' x2='335' y2='405'/%3E%3Cline class='connection-weak' x1='305' y1='205' x2='415' y2='385'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.05) 50%, var(--tb-dark-bg-subtle, #1a1d29) 100%) !important;
    background-size: 600px 600px, 100% 100% !important;
    background-position: -50px -30px, 0 0 !important;
    background-repeat: repeat, no-repeat !important;
    color: var(--tb-body-color, #e9ecef) !important;
    border: 1px solid rgba(102, 126, 234, 0.25) !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15) !important;
    position: relative;
    overflow: hidden;
}

/* Subtle AI pulse animation - positioned dynamically */
[data-bs-theme="dark"] .card-body.bg-danger-subtle::before,
[data-bs-theme="brand"] .card-body.bg-danger-subtle::before {
    content: '';
    position: absolute;
    top: 30.8%;
    left: 24.2%;
    width: 24px;
    height: 24px;
    margin: -12px 0 0 -12px;
    background: radial-gradient(circle, rgba(102, 126, 234, 0.5) 0%, transparent 70%);
    border-radius: 50%;
    pointer-events: none;
    z-index: 0;
    animation: aiPulse 3s ease-in-out infinite;
}

@keyframes aiPulse {
    0%, 100% { 
        transform: scale(1);
        opacity: 0.4;
    }
    50% { 
        transform: scale(1.6);
        opacity: 0.6;
    }
}

[data-bs-theme="dark"] .card-body.bg-danger-subtle > *,
[data-bs-theme="brand"] .card-body.bg-danger-subtle > * {
    position: relative;
    z-index: 1;
}

/* Alternative: Organic pattern with varied hub positions for inline background-image override */
[data-bs-theme="dark"] .card-body.bg-danger-subtle[style*="background-image"],
[data-bs-theme="brand"] .card-body.bg-danger-subtle[style*="background-image"] {
    background: 
        url("data:image/svg+xml,%3Csvg width='600' height='600' xmlns='http://www.w3.org/2000/svg'%3E%3Cdefs%3E%3Cstyle%3E.central-hub%7Bfill:%23667eea;opacity:0.8;filter:drop-shadow(0 0 6px %23667eea);%7D.node-large%7Bfill:%23667eea;opacity:0.7;filter:drop-shadow(0 0 4px %23667eea);%7D.node-medium%7Bfill:%23764ba2;opacity:0.6;filter:drop-shadow(0 0 3px %23764ba2);%7D.node-small%7Bfill:%236363f1;opacity:0.5;filter:drop-shadow(0 0 2px %236363f1);%7D.connection-strong%7Bstroke:%23667eea;stroke-width:2;opacity:0.4;%7D.connection-medium%7Bstroke:%23764ba2;stroke-width:1.5;opacity:0.3;%7D.connection-weak%7Bstroke:%236363f1;stroke-width:1;opacity:0.25;stroke-dasharray:3,3;%7D.ai-pulse%7Bfill:%23667eea;opacity:0.2;%7D%3C/style%3E%3C/defs%3E%3Cg%3E%3C!-- Central Hub 1 - Varied position --%3E%3Ccircle class='central-hub' cx='145' cy='185' r='10'/%3E%3Ccircle class='ai-pulse' cx='145' cy='185' r='16'/%3E%3Ccircle class='ai-pulse' cx='145' cy='185' r='24'/%3E%3C!-- Nodes around Hub 1 --%3E%3Ccircle class='node-large' cx='145' cy='75' r='7'/%3E%3Ccircle class='node-medium' cx='285' cy='105' r='5'/%3E%3Ccircle class='node-large' cx='275' cy='215' r='6'/%3E%3Ccircle class='node-medium' cx='165' cy='365' r='5'/%3E%3Ccircle class='node-small' cx='45' cy='285' r='4'/%3E%3Ccircle class='node-medium' cx='25' cy='165' r='5'/%3E%3Ccircle class='node-small' cx='85' cy='95' r='3'/%3E%3Ccircle class='node-small' cx='235' cy='95' r='4'/%3E%3Ccircle class='node-medium' cx='305' cy='205' r='5'/%3E%3Ccircle class='node-small' cx='235' cy='345' r='4'/%3E%3Ccircle class='node-small' cx='55' cy='365' r='3'/%3E%3Ccircle class='node-medium' cx='15' cy='225' r='5'/%3E%3Ccircle class='node-small' cx='105' cy='145' r='3'/%3E%3Ccircle class='node-small' cx='215' cy='165' r='4'/%3E%3Ccircle class='node-small' cx='175' cy='305' r='3'/%3E%3C!-- Connections from Hub 1 --%3E%3Cline class='connection-strong' x1='145' y1='185' x2='145' y2='75'/%3E%3Cline class='connection-strong' x1='145' y1='185' x2='285' y2='105'/%3E%3Cline class='connection-strong' x1='145' y1='185' x2='275' y2='215'/%3E%3Cline class='connection-strong' x1='145' y1='185' x2='165' y2='365'/%3E%3Cline class='connection-strong' x1='145' y1='185' x2='45' y2='285'/%3E%3Cline class='connection-strong' x1='145' y1='185' x2='25' y2='165'/%3E%3C!-- Inter-node connections --%3E%3Cline class='connection-medium' x1='145' y1='75' x2='85' y2='95'/%3E%3Cline class='connection-medium' x1='145' y1='75' x2='235' y2='95'/%3E%3Cline class='connection-medium' x1='285' y1='105' x2='305' y2='205'/%3E%3Cline class='connection-medium' x1='285' y1='105' x2='215' y2='165'/%3E%3Cline class='connection-medium' x1='275' y1='215' x2='305' y2='205'/%3E%3Cline class='connection-medium' x1='275' y1='215' x2='235' y2='345'/%3E%3Cline class='connection-medium' x1='165' y1='365' x2='235' y2='345'/%3E%3Cline class='connection-medium' x1='165' y1='365' x2='55' y2='365'/%3E%3Cline class='connection-medium' x1='45' y1='285' x2='15' y2='225'/%3E%3Cline class='connection-medium' x1='25' y1='165' x2='15' y2='225'/%3E%3Cline class='connection-medium' x1='25' y1='165' x2='105' y2='145'/%3E%3Cline class='connection-medium' x1='105' y1='145' x2='145' y2='75'/%3E%3Cline class='connection-medium' x1='215' y1='165' x2='175' y2='305'/%3E%3Cline class='connection-weak' x1='85' y1='95' x2='105' y2='145'/%3E%3Cline class='connection-weak' x1='235' y1='95' x2='215' y2='165'/%3E%3Cline class='connection-weak' x1='175' y1='305' x2='165' y2='365'/%3E%3Cline class='connection-weak' x1='55' y1='365' x2='45' y2='285'/%3E%3Cline class='connection-weak' x1='15' y1='225' x2='45' y2='285'/%3E%3C!-- Central Hub 2 - Different position --%3E%3Ccircle class='central-hub' cx='455' cy='415' r='9'/%3E%3Ccircle class='ai-pulse' cx='455' cy='415' r='15'/%3E%3Ccircle class='ai-pulse' cx='455' cy='415' r='22'/%3E%3C!-- Nodes around Hub 2 --%3E%3Ccircle class='node-large' cx='455' cy='305' r='6'/%3E%3Ccircle class='node-medium' cx='575' cy='335' r='5'/%3E%3Ccircle class='node-large' cx='565' cy='445' r='7'/%3E%3Ccircle class='node-medium' cx='475' cy='555' r='5'/%3E%3Ccircle class='node-small' cx='355' cy='525' r='4'/%3E%3Ccircle class='node-medium' cx='335' cy='405' r='5'/%3E%3Ccircle class='node-small' cx='395' cy='335' r='3'/%3E%3Ccircle class='node-small' cx='545' cy='335' r='4'/%3E%3Ccircle class='node-medium' cx='585' cy='445' r='5'/%3E%3Ccircle class='node-small' cx='545' cy='585' r='4'/%3E%3Ccircle class='node-small' cx='365' cy='605' r='3'/%3E%3Ccircle class='node-medium' cx='325' cy='465' r='5'/%3E%3Ccircle class='node-small' cx='415' cy='385' r='3'/%3E%3Ccircle class='node-small' cx='525' cy='405' r='4'/%3E%3Ccircle class='node-small' cx='485' cy='545' r='3'/%3E%3C!-- Connections from Hub 2 --%3E%3Cline class='connection-strong' x1='455' y1='415' x2='455' y2='305'/%3E%3Cline class='connection-strong' x1='455' y1='415' x2='575' y2='335'/%3E%3Cline class='connection-strong' x1='455' y1='415' x2='565' y2='445'/%3E%3Cline class='connection-strong' x1='455' y1='415' x2='475' y2='555'/%3E%3Cline class='connection-strong' x1='455' y1='415' x2='355' y2='525'/%3E%3Cline class='connection-strong' x1='455' y1='415' x2='335' y2='405'/%3E%3C!-- Inter-node connections Hub 2 --%3E%3Cline class='connection-medium' x1='455' y1='305' x2='395' y2='335'/%3E%3Cline class='connection-medium' x1='455' y1='305' x2='545' y2='335'/%3E%3Cline class='connection-medium' x1='575' y1='335' x2='585' y2='445'/%3E%3Cline class='connection-medium' x1='575' y1='335' x2='525' y2='405'/%3E%3Cline class='connection-medium' x1='565' y1='445' x2='585' y2='445'/%3E%3Cline class='connection-medium' x1='565' y1='445' x2='545' y2='585'/%3E%3Cline class='connection-medium' x1='475' y1='555' x2='545' y2='585'/%3E%3Cline class='connection-medium' x1='475' y1='555' x2='365' y2='605'/%3E%3Cline class='connection-medium' x1='355' y1='525' x2='325' y2='465'/%3E%3Cline class='connection-medium' x1='335' y1='405' x2='325' y2='465'/%3E%3Cline class='connection-medium' x1='335' y1='405' x2='415' y2='385'/%3E%3Cline class='connection-medium' x1='415' y1='385' x2='455' y2='305'/%3E%3Cline class='connection-medium' x1='525' y1='405' x2='485' y2='545'/%3E%3Cline class='connection-weak' x1='395' y1='335' x2='415' y2='385'/%3E%3Cline class='connection-weak' x1='545' y1='335' x2='525' y2='405'/%3E%3Cline class='connection-weak' x1='485' y1='545' x2='475' y2='555'/%3E%3Cline class='connection-weak' x1='365' y1='605' x2='355' y2='525'/%3E%3Cline class='connection-weak' x1='325' y1='465' x2='355' y2='525'/%3E%3C!-- Cross-connections between hubs --%3E%3Cline class='connection-weak' x1='275' y1='215' x2='335' y2='405'/%3E%3Cline class='connection-weak' x1='305' y1='205' x2='415' y2='385'/%3E%3C/g%3E%3C/svg%3E"),
        linear-gradient(135deg, rgba(102, 126, 234, 0.08) 0%, rgba(118, 75, 162, 0.05) 50%, var(--tb-dark-bg-subtle, #1a1d29) 100%) !important;
    background-size: 600px 600px, 100% 100% !important;
    background-position: -50px -30px, 0 0 !important;
    background-repeat: repeat, no-repeat !important;
    color: var(--tb-body-color, #e9ecef) !important;
    border: 1px solid rgba(102, 126, 234, 0.25) !important;
    box-shadow: 0 4px 20px rgba(102, 126, 234, 0.15) !important;
    position: relative;
    overflow: hidden;
}

/* Admin pages - settings section */
[data-bs-theme="dark"] .settings-section,
[data-bs-theme="brand"] .settings-section {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Override all card headers globally */
[data-bs-theme="dark"] .card-header,
[data-bs-theme="brand"] .card-header {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-bottom-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .card-header h5,
[data-bs-theme="dark"] .card-header h6,
[data-bs-theme="brand"] .card-header h5,
[data-bs-theme="brand"] .card-header h6 {
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Override all text colors that might be hardcoded */
[data-bs-theme="dark"] .text-dark,
[data-bs-theme="brand"] .text-dark {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] [style*="color: #6c757d"],
[data-bs-theme="dark"] [style*="color:#6c757d"],
[data-bs-theme="brand"] [style*="color: #6c757d"],
[data-bs-theme="brand"] [style*="color:#6c757d"] {
    color: var(--tb-text-muted, #adb5bd) !important;
}

[data-bs-theme="dark"] [style*="color: #495057"],
[data-bs-theme="dark"] [style*="color:#495057"],
[data-bs-theme="brand"] [style*="color: #495057"],
[data-bs-theme="brand"] [style*="color:#495057"] {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] [style*="color: #2c3e50"],
[data-bs-theme="dark"] [style*="color:#2c3e50"],
[data-bs-theme="brand"] [style*="color: #2c3e50"],
[data-bs-theme="brand"] [style*="color:#2c3e50"] {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] [style*="color: #666"],
[data-bs-theme="dark"] [style*="color:#666"],
[data-bs-theme="brand"] [style*="color: #666"],
[data-bs-theme="brand"] [style*="color:#666"] {
    color: var(--tb-text-muted, #adb5bd) !important;
}

/* Override gradient backgrounds in style attributes */
[data-bs-theme="dark"] [style*="background: linear-gradient"][style*="#ffffff"],
[data-bs-theme="dark"] [style*="background:linear-gradient"][style*="#ffffff"],
[data-bs-theme="dark"] [style*="background: linear-gradient"][style*="#fff"],
[data-bs-theme="dark"] [style*="background:linear-gradient"][style*="#fff"],
[data-bs-theme="brand"] [style*="background: linear-gradient"][style*="#ffffff"],
[data-bs-theme="brand"] [style*="background:linear-gradient"][style*="#ffffff"],
[data-bs-theme="brand"] [style*="background: linear-gradient"][style*="#fff"],
[data-bs-theme="brand"] [style*="background:linear-gradient"][style*="#fff"] {
    background: linear-gradient(135deg, var(--tb-dark-bg-subtle, #1a1d29) 0%, var(--tb-dark, #212529) 100%) !important;
}

/* Chart containers and widgets */
[data-bs-theme="dark"] .chart-widget,
[data-bs-theme="brand"] .chart-widget {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
}

[data-bs-theme="dark"] .chart-widget .card-body,
[data-bs-theme="brand"] .chart-widget .card-body {
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Overview cards with gradients - keep gradients but ensure text is readable */
[data-bs-theme="dark"] .overview-card,
[data-bs-theme="brand"] .overview-card {
    color: white !important;
}

[data-bs-theme="dark"] .overview-card *,
[data-bs-theme="brand"] .overview-card * {
    color: inherit !important;
}

/* Admin pages - error log items */
[data-bs-theme="dark"] .error-log-item,
[data-bs-theme="brand"] .error-log-item {
    background: rgba(220, 53, 69, 0.15) !important;
    border-left-color: #dc3545 !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Admin pages - editable fields */
[data-bs-theme="dark"] .editable-field:hover,
[data-bs-theme="brand"] .editable-field:hover {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
}

/* Admin pages - health section */
[data-bs-theme="dark"] .health-section,
[data-bs-theme="brand"] .health-section {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Admin pages - stats cards */
[data-bs-theme="dark"] .stats-card,
[data-bs-theme="brand"] .stats-card {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .stats-card .stat-value,
[data-bs-theme="brand"] .stats-card .stat-value {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .stats-card .stat-label,
[data-bs-theme="brand"] .stats-card .stat-label {
    color: var(--tb-text-muted, #adb5bd) !important;
}

/* Admin pages - table wrappers */
[data-bs-theme="dark"] .expenses-table-wrapper,
[data-bs-theme="dark"] .discoveries-table-wrapper,
[data-bs-theme="dark"] .folders-table-wrapper,
[data-bs-theme="brand"] .expenses-table-wrapper,
[data-bs-theme="brand"] .discoveries-table-wrapper,
[data-bs-theme="brand"] .folders-table-wrapper {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
}

/* Override all remaining hardcoded backgrounds in CSS classes */
[data-bs-theme="dark"] .bg-danger-subtle,
[data-bs-theme="brand"] .bg-danger-subtle {
    background-color: rgba(220, 53, 69, 0.15) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .bg-warning-subtle,
[data-bs-theme="brand"] .bg-warning-subtle {
    background-color: rgba(255, 193, 7, 0.15) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .bg-info-subtle,
[data-bs-theme="brand"] .bg-info-subtle {
    background-color: rgba(23, 162, 184, 0.15) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .bg-success-subtle,
[data-bs-theme="brand"] .bg-success-subtle {
    background-color: rgba(40, 167, 69, 0.15) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Override any remaining e9ecef backgrounds (light gray borders/hovers) */
[data-bs-theme="dark"] [style*="background: #e9ecef"],
[data-bs-theme="dark"] [style*="background:#e9ecef"],
[data-bs-theme="dark"] [style*="background-color: #e9ecef"],
[data-bs-theme="dark"] [style*="background-color:#e9ecef"],
[data-bs-theme="brand"] [style*="background: #e9ecef"],
[data-bs-theme="brand"] [style*="background:#e9ecef"],
[data-bs-theme="brand"] [style*="background-color: #e9ecef"],
[data-bs-theme="brand"] [style*="background-color:#e9ecef"] {
    background: var(--tb-dark, #212529) !important;
    background-color: var(--tb-dark, #212529) !important;
}

/* Override dee2e6 borders */
[data-bs-theme="dark"] [style*="border-color: #dee2e6"],
[data-bs-theme="dark"] [style*="border-color:#dee2e6"],
[data-bs-theme="brand"] [style*="border-color: #dee2e6"],
[data-bs-theme="brand"] [style*="border-color:#dee2e6"] {
    border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Override any remaining hardcoded text colors */
[data-bs-theme="dark"] [style*="color: #212529"],
[data-bs-theme="dark"] [style*="color:#212529"],
[data-bs-theme="brand"] [style*="color: #212529"],
[data-bs-theme="brand"] [style*="color:#212529"] {
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Ensure all divs with inline background styles get dark mode */
[data-bs-theme="dark"] div[style*="background"],
[data-bs-theme="brand"] div[style*="background"] {
    /* This is too broad, but we'll handle specific cases above */
}

/* Override any table-light classes globally */
[data-bs-theme="dark"] .table-light,
[data-bs-theme="brand"] .table-light {
    --tb-table-bg: var(--tb-dark-bg-subtle, #1a1d29) !important;
    --tb-table-color: var(--tb-body-color, #e9ecef) !important;
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .table-light thead,
[data-bs-theme="brand"] .table-light thead {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .table-light th,
[data-bs-theme="brand"] .table-light th {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

[data-bs-theme="dark"] .table-light td,
[data-bs-theme="brand"] .table-light td {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

[data-bs-theme="dark"] .table-light tbody tr:hover,
[data-bs-theme="brand"] .table-light tbody tr:hover {
    background-color: var(--tb-dark, #212529) !important;
}

/* Override any input readonly backgrounds */
[data-bs-theme="dark"] input[readonly],
[data-bs-theme="brand"] input[readonly] {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Override any textarea readonly backgrounds */
[data-bs-theme="dark"] textarea[readonly],
[data-bs-theme="brand"] textarea[readonly] {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Override any select readonly backgrounds */
[data-bs-theme="dark"] select[readonly],
[data-bs-theme="brand"] select[readonly] {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Ensure all h1-h6 headings are visible */
[data-bs-theme="dark"] h1,
[data-bs-theme="dark"] h2,
[data-bs-theme="dark"] h3,
[data-bs-theme="dark"] h4,
[data-bs-theme="dark"] h5,
[data-bs-theme="dark"] h6,
[data-bs-theme="brand"] h1,
[data-bs-theme="brand"] h2,
[data-bs-theme="brand"] h3,
[data-bs-theme="brand"] h4,
[data-bs-theme="brand"] h5,
[data-bs-theme="brand"] h6 {
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Override any p tags that might have hardcoded colors */
[data-bs-theme="dark"] p,
[data-bs-theme="brand"] p {
    color: inherit;
}

/* Override any span tags */
[data-bs-theme="dark"] span,
[data-bs-theme="brand"] span {
    color: inherit;
}

/* Override any div tags */
[data-bs-theme="dark"] div,
[data-bs-theme="brand"] div {
    color: inherit;
}

/* Ensure links are visible */
[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item),
[data-bs-theme="brand"] a:not(.btn):not(.nav-link):not(.dropdown-item) {
    color: #667eea !important;
}

[data-bs-theme="dark"] a:not(.btn):not(.nav-link):not(.dropdown-item):hover,
[data-bs-theme="brand"] a:not(.btn):not(.nav-link):not(.dropdown-item):hover {
    color: #764ba2 !important;
}

/* Override any remaining background images that might have light colors */
[data-bs-theme="dark"] [style*="background-image"],
[data-bs-theme="brand"] [style*="background-image"] {
    /* Keep background images but ensure content is readable */
}

/* Ensure all labels are visible */
[data-bs-theme="dark"] label,
[data-bs-theme="brand"] label {
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Override any small tags */
[data-bs-theme="dark"] small,
[data-bs-theme="brand"] small {
    color: var(--tb-text-muted, #adb5bd) !important;
}

/* Override any strong/bold tags */
[data-bs-theme="dark"] strong,
[data-bs-theme="dark"] b,
[data-bs-theme="brand"] strong,
[data-bs-theme="brand"] b {
    color: inherit;
}

/* Override any code/pre tags that might have light backgrounds */
[data-bs-theme="dark"] code:not([class]),
[data-bs-theme="dark"] pre:not([class]),
[data-bs-theme="brand"] code:not([class]),
[data-bs-theme="brand"] pre:not([class]) {
    background-color: var(--tb-dark, #212529) !important;
    color: var(--tb-body-color, #e9ecef) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Status Pages CSS dark/brand mode overrides */
[data-bs-theme="dark"] .status-page-card,
[data-bs-theme="brand"] .status-page-card {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .status-page-card .card-header,
[data-bs-theme="brand"] .status-page-card .card-header {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-bottom-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .status-page-card .card-body,
[data-bs-theme="brand"] .status-page-card .card-body {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .status-page-badge,
[data-bs-theme="brand"] .status-page-badge {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .status-page-actions,
[data-bs-theme="brand"] .status-page-actions {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

[data-bs-theme="dark"] .status-page-actions .btn-outline-primary,
[data-bs-theme="brand"] .status-page-actions .btn-outline-primary {
    border-color: #667eea !important;
    color: #667eea !important;
}

[data-bs-theme="dark"] .status-page-actions .btn-outline-primary:hover,
[data-bs-theme="brand"] .status-page-actions .btn-outline-primary:hover {
    background: #667eea !important;
    color: white !important;
}

/* Override JavaScript-set inline styles - use attribute selectors */
[data-bs-theme="dark"] [style*="background-color: #fff"],
[data-bs-theme="dark"] [style*="background-color:#fff"],
[data-bs-theme="dark"] [style*="background-color: white"],
[data-bs-theme="dark"] [style*="background-color:white"],
[data-bs-theme="brand"] [style*="background-color: #fff"],
[data-bs-theme="brand"] [style*="background-color:#fff"],
[data-bs-theme="brand"] [style*="background-color: white"],
[data-bs-theme="brand"] [style*="background-color:white"] {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
}

/* Override any element with inline color styles set by JS */
[data-bs-theme="dark"] [style*="color: #718096"],
[data-bs-theme="brand"] [style*="color: #718096"] {
    color: var(--tb-text-muted, #adb5bd) !important;
}

/* Folder manager JS styles - override card backgrounds */
[data-bs-theme="dark"] .folder-item[style*="background"],
[data-bs-theme="brand"] .folder-item[style*="background"] {
    /* Keep folder colors but ensure text is readable */
    color: white !important;
}

/* Ensure all dynamically created elements get dark mode */
[data-bs-theme="dark"] [id*="Content"] div,
[data-bs-theme="dark"] [id*="Content"] p,
[data-bs-theme="dark"] [id*="Content"] span,
[data-bs-theme="brand"] [id*="Content"] div,
[data-bs-theme="brand"] [id*="Content"] p,
[data-bs-theme="brand"] [id*="Content"] span {
    color: inherit;
}

/* Override any remaining alert backgrounds */
[data-bs-theme="dark"] .alert-info,
[data-bs-theme="brand"] .alert-info {
    background-color: rgba(23, 162, 184, 0.15) !important;
    border-color: rgba(23, 162, 184, 0.3) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .alert-danger,
[data-bs-theme="brand"] .alert-danger {
    background-color: rgba(220, 53, 69, 0.15) !important;
    border-color: rgba(220, 53, 69, 0.3) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .alert-warning,
[data-bs-theme="brand"] .alert-warning {
    background-color: rgba(255, 193, 7, 0.15) !important;
    border-color: rgba(255, 193, 7, 0.3) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .alert-success,
[data-bs-theme="brand"] .alert-success {
    background-color: rgba(40, 167, 69, 0.15) !important;
    border-color: rgba(40, 167, 69, 0.3) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Override any remaining Bootstrap utility classes */
[data-bs-theme="dark"] .bg-body,
[data-bs-theme="brand"] .bg-body {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
}

[data-bs-theme="dark"] .bg-body-secondary,
[data-bs-theme="brand"] .bg-body-secondary {
    background-color: var(--tb-dark, #212529) !important;
}

[data-bs-theme="dark"] .bg-body-tertiary,
[data-bs-theme="brand"] .bg-body-tertiary {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
}

/* Override any text utility classes */
[data-bs-theme="dark"] .text-body,
[data-bs-theme="brand"] .text-body {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .text-body-secondary,
[data-bs-theme="brand"] .text-body-secondary {
    color: var(--tb-text-muted, #adb5bd) !important;
}

[data-bs-theme="dark"] .text-body-tertiary,
[data-bs-theme="brand"] .text-body-tertiary {
    color: var(--tb-text-muted, #adb5bd) !important;
}

/* Override border utility classes */
[data-bs-theme="dark"] .border,
[data-bs-theme="dark"] .border-top,
[data-bs-theme="dark"] .border-bottom,
[data-bs-theme="dark"] .border-start,
[data-bs-theme="dark"] .border-end,
[data-bs-theme="brand"] .border,
[data-bs-theme="brand"] .border-top,
[data-bs-theme="brand"] .border-bottom,
[data-bs-theme="brand"] .border-start,
[data-bs-theme="brand"] .border-end {
    border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Ensure all dynamically loaded content gets proper colors */
[data-bs-theme="dark"] [data-dynamic-content],
[data-bs-theme="brand"] [data-dynamic-content] {
    color: inherit;
}

/* Override any remaining hardcoded colors in JavaScript-generated content */
[data-bs-theme="dark"] [style*="background-color: #fef2f2"],
[data-bs-theme="brand"] [style*="background-color: #fef2f2"] {
    background-color: rgba(220, 53, 69, 0.15) !important;
}

[data-bs-theme="dark"] [style*="background-color: #e7f3ff"],
[data-bs-theme="brand"] [style*="background-color: #e7f3ff"] {
    background-color: rgba(102, 126, 234, 0.15) !important;
}

[data-bs-theme="dark"] [style*="background-color: #d4edda"],
[data-bs-theme="brand"] [style*="background-color: #d4edda"] {
    background-color: rgba(40, 167, 69, 0.15) !important;
}

[data-bs-theme="dark"] [style*="background-color: #fff3cd"],
[data-bs-theme="brand"] [style*="background-color: #fff3cd"] {
    background-color: rgba(255, 193, 7, 0.15) !important;
}

[data-bs-theme="dark"] [style*="background-color: #d1ecf1"],
[data-bs-theme="brand"] [style*="background-color: #d1ecf1"] {
    background-color: rgba(23, 162, 184, 0.15) !important;
}

[data-bs-theme="dark"] [style*="background-color: #f8d7da"],
[data-bs-theme="brand"] [style*="background-color: #f8d7da"] {
    background-color: rgba(220, 53, 69, 0.15) !important;
}

/* Monitoring Services - White card fix */
[data-bs-theme="dark"] .monitoring-item,
[data-bs-theme="brand"] .monitoring-item {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .monitoring-item .monitoring-info,
[data-bs-theme="brand"] .monitoring-item .monitoring-info {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .monitoring-item .monitoring-url,
[data-bs-theme="brand"] .monitoring-item .monitoring-url {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .monitoring-item .monitoring-url strong,
[data-bs-theme="brand"] .monitoring-item .monitoring-url strong {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .monitoring-item .monitoring-meta,
[data-bs-theme="brand"] .monitoring-item .monitoring-meta {
    color: var(--tb-text-muted, #adb5bd) !important;
}

[data-bs-theme="dark"] .monitoring-item .status-badge,
[data-bs-theme="brand"] .monitoring-item .status-badge {
    color: white !important;
}

/* Quick Stats - Fix dark text on dark background */
[data-bs-theme="dark"] .stat-widget .stat-value,
[data-bs-theme="brand"] .stat-widget .stat-value {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .stat-widget .stat-label,
[data-bs-theme="brand"] .stat-widget .stat-label {
    color: var(--tb-text-muted, #adb5bd) !important;
}

/* Ensure stat-widget background is dark in dark/brand mode - 25% base, 35% hover */
[data-bs-theme="dark"] .stat-widget,
[data-bs-theme="brand"] .stat-widget {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

[data-bs-theme="dark"] .stat-widget:hover,
[data-bs-theme="brand"] .stat-widget:hover {
    background: var(--tb-dark, #212529) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Fix any white backgrounds in card-body that might contain monitoring items */
[data-bs-theme="dark"] .card-body .monitoring-item,
[data-bs-theme="brand"] .card-body .monitoring-item {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
}

/* Fix renewal items */
[data-bs-theme="dark"] .renewal-item,
[data-bs-theme="brand"] .renewal-item {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .renewal-item .item-title,
[data-bs-theme="brand"] .renewal-item .item-title {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .renewal-item .item-meta,
[data-bs-theme="brand"] .renewal-item .item-meta {
    color: var(--tb-text-muted, #adb5bd) !important;
}

[data-bs-theme="dark"] .renewal-item .item-value,
[data-bs-theme="brand"] .renewal-item .item-value {
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Fix activity items */
[data-bs-theme="dark"] .activity-item,
[data-bs-theme="brand"] .activity-item {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .activity-item .activity-title,
[data-bs-theme="brand"] .activity-item .activity-title {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .activity-item .activity-meta,
[data-bs-theme="brand"] .activity-item .activity-meta {
    color: var(--tb-text-muted, #adb5bd) !important;
}

/* Fix content monitoring status items */
[data-bs-theme="dark"] .content-monitoring-item,
[data-bs-theme="brand"] .content-monitoring-item {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Fix expense summary items */
[data-bs-theme="dark"] .expense-item,
[data-bs-theme="brand"] .expense-item {
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .expense-item .expense-title,
[data-bs-theme="brand"] .expense-item .expense-title {
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .expense-item .expense-value,
[data-bs-theme="brand"] .expense-item .expense-value {
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Fix no-data-state */
[data-bs-theme="dark"] .no-data-state,
[data-bs-theme="brand"] .no-data-state {
    color: var(--tb-text-muted, #adb5bd) !important;
}

[data-bs-theme="dark"] .no-data-state p,
[data-bs-theme="brand"] .no-data-state p {
    color: var(--tb-text-muted, #adb5bd) !important;
}

/* Fix breadcrumb and page-title-box backgrounds in dark/brand mode */
[data-bs-theme="dark"] .page-title-box,
[data-bs-theme="brand"] .page-title-box {
    background-color: transparent !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .page-title-box .breadcrumb,
[data-bs-theme="brand"] .page-title-box .breadcrumb {
    background-color: transparent !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .page-title-box .breadcrumb-item,
[data-bs-theme="brand"] .page-title-box .breadcrumb-item {
    background-color: transparent !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .page-title-box .breadcrumb-item.active,
[data-bs-theme="brand"] .page-title-box .breadcrumb-item.active {
    background-color: transparent !important;
    background: transparent !important;
    color: var(--tb-text-muted, #adb5bd) !important;
}

[data-bs-theme="dark"] .page-title-box .breadcrumb-item a,
[data-bs-theme="brand"] .page-title-box .breadcrumb-item a {
    background-color: transparent !important;
    background: transparent !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .page-title-box h4,
[data-bs-theme="brand"] .page-title-box h4 {
    background-color: transparent !important;
    background: transparent !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Ensure no background is applied to breadcrumb container */
[data-bs-theme="dark"] .breadcrumb,
[data-bs-theme="brand"] .breadcrumb {
    background-color: transparent !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .breadcrumb-item,
[data-bs-theme="brand"] .breadcrumb-item {
    background-color: transparent !important;
    background: transparent !important;
}

/* Fix any row or container that might have background */
[data-bs-theme="dark"] .page-title-box .row,
[data-bs-theme="brand"] .page-title-box .row {
    background-color: transparent !important;
    background: transparent !important;
}

[data-bs-theme="dark"] .page-title-box .col-md-5,
[data-bs-theme="dark"] .page-title-box .col-md-6,
[data-bs-theme="dark"] .page-title-box .col,
[data-bs-theme="brand"] .page-title-box .col-md-5,
[data-bs-theme="brand"] .page-title-box .col-md-6,
[data-bs-theme="brand"] .page-title-box .col {
    background-color: transparent !important;
    background: transparent !important;
}

/* Fix Status Pages table header in dark/brand mode */
[data-bs-theme="dark"] #statusPagesTable th,
[data-bs-theme="brand"] #statusPagesTable th {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
}

/* Fix Status Pages table cells in dark/brand mode */
[data-bs-theme="dark"] #statusPagesTable td,
[data-bs-theme="brand"] #statusPagesTable td {
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Fix theme badges in dark/brand mode */
[data-bs-theme="dark"] .theme-badge.default,
[data-bs-theme="brand"] .theme-badge.default {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

[data-bs-theme="dark"] .theme-badge.minimal,
[data-bs-theme="brand"] .theme-badge.minimal {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
    border: 1px solid rgba(255, 255, 255, 0.25) !important;
}

/* Fix status badges in dark/brand mode for better contrast */
[data-bs-theme="dark"] .status-badge.active,
[data-bs-theme="brand"] .status-badge.active {
    background-color: rgba(13, 202, 240, 0.2) !important;
    color: #0dcaf0 !important;
    border: 1px solid rgba(13, 202, 240, 0.3) !important;
}

[data-bs-theme="dark"] .status-badge.inactive,
[data-bs-theme="brand"] .status-badge.inactive {
    background-color: rgba(220, 53, 69, 0.2) !important;
    color: #dc3545 !important;
    border: 1px solid rgba(220, 53, 69, 0.3) !important;
}

[data-bs-theme="dark"] .status-badge.pending,
[data-bs-theme="brand"] .status-badge.pending {
    background-color: rgba(255, 193, 7, 0.2) !important;
    color: #ffc107 !important;
    border: 1px solid rgba(255, 193, 7, 0.3) !important;
}

/* Status badge up/down for monitoring - dark/brand mode */
[data-bs-theme="dark"] .status-badge.up,
[data-bs-theme="brand"] .status-badge.up {
    background-color: rgba(13, 202, 240, 0.2) !important;
    color: #0dcaf0 !important;
    border: 1px solid rgba(13, 202, 240, 0.3) !important;
}

[data-bs-theme="dark"] .status-badge.down,
[data-bs-theme="brand"] .status-badge.down {
    background-color: rgba(220, 53, 69, 0.2) !important;
    color: #dc3545 !important;
    border: 1px solid rgba(220, 53, 69, 0.3) !important;
}

/* Fix action buttons with yellow background in dark/brand mode */
[data-bs-theme="dark"] .btn-warning,
[data-bs-theme="brand"] .btn-warning {
    background-color: rgba(255, 193, 7, 0.2) !important;
    border-color: rgba(255, 193, 7, 0.3) !important;
    color: #ffc107 !important;
}

[data-bs-theme="dark"] .btn-warning i,
[data-bs-theme="dark"] .btn-warning svg,
[data-bs-theme="brand"] .btn-warning i,
[data-bs-theme="brand"] .btn-warning svg {
    color: #ffc107 !important;
}

/* Fix Status Pages modals in dark/brand mode */
/* Form controls - inputs, selects, textareas */
[data-bs-theme="dark"] .modal .form-control,
[data-bs-theme="dark"] .modal input.form-control,
[data-bs-theme="dark"] .modal textarea.form-control,
[data-bs-theme="brand"] .modal .form-control,
[data-bs-theme="brand"] .modal input.form-control,
[data-bs-theme="brand"] .modal textarea.form-control {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-top-width: 1px !important;
    border-right-width: 1px !important;
    border-bottom-width: 1px !important;
    border-left-width: 1px !important;
}

[data-bs-theme="dark"] .modal .form-control:focus,
[data-bs-theme="brand"] .modal .form-control:focus {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
    border-color: var(--tb-primary, #6366f1) !important;
}

[data-bs-theme="dark"] .modal .form-control::placeholder,
[data-bs-theme="brand"] .modal .form-control::placeholder {
    color: var(--tb-text-muted, #adb5bd) !important;
    opacity: 0.7 !important;
}

/* Form selects */
[data-bs-theme="dark"] .modal .form-select,
[data-bs-theme="dark"] .modal select.form-select,
[data-bs-theme="brand"] .modal .form-select,
[data-bs-theme="brand"] .modal select.form-select {
    --tb-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='%23e9ecef' stroke-linecap='round' stroke-linejoin='round' stroke-width='2' d='m2 5 6 6 6-6'/%3e%3c/svg%3e");
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-top-width: 1px !important;
    border-right-width: 1px !important;
    border-bottom-width: 1px !important;
    border-left-width: 1px !important;
}

[data-bs-theme="dark"] .modal .form-select:focus,
[data-bs-theme="brand"] .modal .form-select:focus {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
    border-color: var(--tb-primary, #6366f1) !important;
}

/* Form text (descriptive text) */
[data-bs-theme="dark"] .modal .form-text,
[data-bs-theme="brand"] .modal .form-text {
    color: var(--tb-text-muted, #adb5bd) !important;
}

/* Form labels */
[data-bs-theme="dark"] .modal .form-label,
[data-bs-theme="brand"] .modal .form-label {
    color: var(--tb-body-color, #e9ecef) !important;
}

/* Input group text */
[data-bs-theme="dark"] .modal .input-group-text,
[data-bs-theme="brand"] .modal .input-group-text {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    border-width: 1px !important;
    border-style: solid !important;
}

/* Service items in modals */
[data-bs-theme="dark"] .modal .service-item,
[data-bs-theme="brand"] .modal .service-item {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    border-color: rgba(255, 255, 255, 0.25) !important;
    color: var(--tb-body-color, #e9ecef) !important;
}

[data-bs-theme="dark"] .modal .service-item .service-display-name,
[data-bs-theme="dark"] .modal .service-item input.service-display-name,
[data-bs-theme="brand"] .modal .service-item .service-display-name,
[data-bs-theme="brand"] .modal .service-item input.service-display-name {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
    border: 1px solid rgba(255, 255, 255, 0.5) !important;
    border-color: rgba(255, 255, 255, 0.5) !important;
    border-width: 1px !important;
    border-style: solid !important;
    border-top-width: 1px !important;
    border-right-width: 1px !important;
    border-bottom-width: 1px !important;
    border-left-width: 1px !important;
}

[data-bs-theme="dark"] .modal .service-item .service-display-name::placeholder,
[data-bs-theme="brand"] .modal .service-item .service-display-name::placeholder {
    color: var(--tb-text-muted, #adb5bd) !important;
    opacity: 0.7 !important;
}

[data-bs-theme="dark"] .modal .service-item .service-url,
[data-bs-theme="brand"] .modal .service-item .service-url {
    color: var(--tb-text-muted, #adb5bd) !important;
}

[data-bs-theme="dark"] .modal .service-item small.text-muted,
[data-bs-theme="brand"] .modal .service-item small.text-muted {
    color: var(--tb-text-muted, #adb5bd) !important;
}

/* Textareas */
[data-bs-theme="dark"] .modal textarea.form-control,
[data-bs-theme="brand"] .modal textarea.form-control {
    background-color: var(--tb-dark-bg-subtle, #1a1d29) !important;
    background: var(--tb-dark-bg-subtle, #1a1d29) !important;
    color: var(--tb-body-color, #e9ecef) !important;
    border: 1px solid rgba(255, 255, 255, 0.4) !important;
    border-color: rgba(255, 255, 255, 0.4) !important;
    border-width: 1px !important;
    border-style: solid !important;
}

[data-bs-theme="dark"] .modal textarea.form-control::placeholder,
[data-bs-theme="brand"] .modal textarea.form-control::placeholder {
    color: var(--tb-text-muted, #adb5bd) !important;
    opacity: 0.7 !important;
}

/* Form check labels */
[data-bs-theme="dark"] .modal .form-check-label,
[data-bs-theme="brand"] .modal .form-check-label {
    color: var(--tb-body-color, #e9ecef) !important;
}

