/* ==========================================================
   Light/Dawn Mode Text Color Safety Overrides
   Ensures readable dark text on light backgrounds
   ========================================================== */

/* ROOT CSS VARIABLE OVERRIDES FOR LIGHT MODE */
html.light,
html.sacred-light,
body.light,
body.sacred-light {
    /* Text colors - dark text for light backgrounds */
    --text: #1a1f2e !important;
    --text-strong: #0f1422 !important;
    --text-primary: #1a1f2e !important;
    --text-secondary: #4a5568 !important;
    --text-muted: #5a6478 !important;
    --ghost-text: #374151 !important;
    --control-text: #1a1f2e !important;
    --sacred-text: #1a1f2e !important;
    --sacred-text-muted: #4a5568 !important;
    --sacred-text-dim: #5a6478 !important;
    --vt-muted: #4a5568 !important;

    /* Background colors - light backgrounds */
    --card-bg: rgba(255, 255, 255, 0.95) !important;
    --control-bg: rgba(0, 0, 0, 0.04) !important;
    --ghost-bg: rgba(0, 0, 0, 0.03) !important;
    --ghost-hover-bg: rgba(0, 0, 0, 0.06) !important;
    --panel-bg: rgba(255, 255, 255, 0.95) !important;
    --body-bg: #f8fafc !important;
    --sacred-bg: #f8fafc !important;

    /* Border colors */
    --card-border: rgba(0, 0, 0, 0.12) !important;
    --control-border: rgba(0, 0, 0, 0.15) !important;
    --sacred-border: rgba(0, 0, 0, 0.12) !important;
}

/* Force dark text on main content containers including sacred-body */
html.light .app-body,
html.sacred-light .app-body,
body.light .app-body,
body.sacred-light .app-body,
html.light .sacred-content,
html.sacred-light .sacred-content,
body.light .sacred-content,
body.sacred-light .sacred-content,
html.light .app-main,
html.sacred-light .app-main,
body.light .app-main,
body.sacred-light .app-main,
html.light .sacred-body,
html.sacred-light .sacred-body,
body.light .sacred-body,
body.sacred-light .sacred-body,
html.light .app-shell,
html.sacred-light .app-shell,
body.light .app-shell,
body.sacred-light .app-shell {
    color: #1a1f2e !important;
    background: #f8fafc !important;
}

/* Ensure all child elements inherit dark text in light mode */
html.light .app-body *,
html.sacred-light .app-body *,
body.light .app-body *,
body.sacred-light .app-body *,
html.light .sacred-content *,
html.sacred-light .sacred-content *,
body.light .sacred-content *,
body.sacred-light .sacred-content * {
    color: inherit;
}

/* Override Bootstrap text-white/text-light utility classes */
html.light .app-body .text-white,
html.sacred-light .app-body .text-white,
body.light .app-body .text-white,
body.sacred-light .app-body .text-white,
html.light .app-body .text-light,
html.sacred-light .app-body .text-light,
body.light .app-body .text-light,
body.sacred-light .app-body .text-light {
    color: #1a1f2e !important;
}

/* Preserve proper colors for interactive elements */
html.light .btn-primary,
html.sacred-light .btn-primary,
body.light .btn-primary,
body.sacred-light .btn-primary,
html.light .btn-success,
html.sacred-light .btn-success,
body.light .btn-success,
body.sacred-light .btn-success,
html.light .btn-danger,
html.sacred-light .btn-danger,
body.light .btn-danger,
body.sacred-light .btn-danger {
    color: #ffffff !important;
}

/* Keep badge text colors appropriate */
html.light .badge.bg-primary,
html.sacred-light .badge.bg-primary,
body.light .badge.bg-primary,
body.sacred-light .badge.bg-primary,
html.light .badge.bg-success,
html.sacred-light .badge.bg-success,
body.light .badge.bg-success,
body.sacred-light .badge.bg-success,
html.light .badge.bg-danger,
html.sacred-light .badge.bg-danger,
body.light .badge.bg-danger,
body.sacred-light .badge.bg-danger,
html.light .badge.bg-dark,
html.sacred-light .badge.bg-dark,
body.light .badge.bg-dark,
body.sacred-light .badge.bg-dark {
    color: #ffffff !important;
}

/* Cards and panels in light mode */
html.light .card,
html.sacred-light .card,
body.light .card,
body.sacred-light .card,
html.light .sacred-panel,
html.sacred-light .sacred-panel,
body.light .sacred-panel,
body.sacred-light .sacred-panel,
html.light .sacred-card,
html.sacred-light .sacred-card,
body.light .sacred-card,
body.sacred-light .sacred-card {
    color: #1a1f2e !important;
    background: rgba(255, 255, 255, 0.95) !important;
}

/* Table text in light mode */
html.light table,
html.sacred-light table,
body.light table,
body.sacred-light table,
html.light .table,
html.sacred-light .table,
body.light .table,
body.sacred-light .table {
    color: #1a1f2e !important;
}

html.light th,
html.sacred-light th,
body.light th,
body.sacred-light th {
    color: #4a5568 !important;
}

html.light td,
html.sacred-light td,
body.light td,
body.sacred-light td {
    color: #1a1f2e !important;
}

/* Form controls in light mode */
html.light .form-control,
html.sacred-light .form-control,
body.light .form-control,
body.sacred-light .form-control,
html.light .form-select,
html.sacred-light .form-select,
body.light .form-select,
body.sacred-light .form-select,
html.light input,
html.sacred-light input,
body.light input,
body.sacred-light input,
html.light textarea,
html.sacred-light textarea,
body.light textarea,
body.sacred-light textarea,
html.light select,
html.sacred-light select,
body.light select,
body.sacred-light select {
    color: #1a1f2e !important;
    background-color: #ffffff !important;
}

/* Labels and headings in light mode */
html.light label,
html.sacred-light label,
body.light label,
body.sacred-light label {
    color: #1a1f2e !important;
}

html.light h1,
html.light h2,
html.light h3,
html.light h4,
html.light h5,
html.light h6,
html.sacred-light h1,
html.sacred-light h2,
html.sacred-light h3,
html.sacred-light h4,
html.sacred-light h5,
html.sacred-light h6,
body.light h1,
body.light h2,
body.light h3,
body.light h4,
body.light h5,
body.light h6,
body.sacred-light h1,
body.sacred-light h2,
body.sacred-light h3,
body.sacred-light h4,
body.sacred-light h5,
body.sacred-light h6 {
    color: #1a1f2e !important;
}

/* Muted text should still be visible */
html.light .text-muted,
html.sacred-light .text-muted,
body.light .text-muted,
body.sacred-light .text-muted {
    color: #5a6478 !important;
}

/* Secondary text */
html.light .text-secondary,
html.sacred-light .text-secondary,
body.light .text-secondary,
body.sacred-light .text-secondary {
    color: #4a5568 !important;
}

/* Links should remain visible but distinct */
html.light a:not(.btn):not(.nav-link),
html.sacred-light a:not(.btn):not(.nav-link),
body.light a:not(.btn):not(.nav-link),
body.sacred-light a:not(.btn):not(.nav-link) {
    color: #2563eb !important;
}

html.light a:not(.btn):not(.nav-link):hover,
html.sacred-light a:not(.btn):not(.nav-link):hover,
body.light a:not(.btn):not(.nav-link):hover,
body.sacred-light a:not(.btn):not(.nav-link):hover {
    color: #1d4ed8 !important;
}

/* Dropdown menus */
html.light .dropdown-menu,
html.sacred-light .dropdown-menu,
body.light .dropdown-menu,
body.sacred-light .dropdown-menu {
    background: #ffffff !important;
    color: #1a1f2e !important;
}

html.light .dropdown-item,
html.sacred-light .dropdown-item,
body.light .dropdown-item,
body.sacred-light .dropdown-item {
    color: #1a1f2e !important;
}

/* Modal content */
html.light .modal-content,
html.sacred-light .modal-content,
body.light .modal-content,
body.sacred-light .modal-content {
    background: #ffffff !important;
    color: #1a1f2e !important;
}

html.light .modal-header,
html.sacred-light .modal-header,
body.light .modal-header,
body.sacred-light .modal-header,
html.light .modal-body,
html.sacred-light .modal-body,
body.light .modal-body,
body.sacred-light .modal-body,
html.light .modal-footer,
html.sacred-light .modal-footer,
body.light .modal-footer,
body.sacred-light .modal-footer {
    color: #1a1f2e !important;
}

/* Tooltips */
html.light .tooltip-inner,
html.sacred-light .tooltip-inner,
body.light .tooltip-inner,
body.sacred-light .tooltip-inner {
    background: #1a1f2e !important;
    color: #ffffff !important;
}

/* Prevent any inline white text styles from affecting light mode content */
html.light [style*="color: #fff"],
html.light [style*="color:#fff"],
html.light [style*="color: white"],
html.light [style*="color:white"],
html.light [style*="color: rgb(255, 255, 255)"],
html.sacred-light [style*="color: #fff"],
html.sacred-light [style*="color:#fff"],
html.sacred-light [style*="color: white"],
html.sacred-light [style*="color:white"],
html.sacred-light [style*="color: rgb(255, 255, 255)"],
body.light [style*="color: #fff"],
body.light [style*="color:#fff"],
body.light [style*="color: white"],
body.light [style*="color:white"],
body.light [style*="color: rgb(255, 255, 255)"],
body.sacred-light [style*="color: #fff"],
body.sacred-light [style*="color:#fff"],
body.sacred-light [style*="color: white"],
body.sacred-light [style*="color:white"],
body.sacred-light [style*="color: rgb(255, 255, 255)"] {
    color: #1a1f2e !important;
}

/* List groups */
html.light .list-group-item,
html.sacred-light .list-group-item,
body.light .list-group-item,
body.sacred-light .list-group-item {
    color: #1a1f2e !important;
    background: #ffffff !important;
}

/* Alerts - keep appropriate background but ensure text is readable */
html.light .alert,
html.sacred-light .alert,
body.light .alert,
body.sacred-light .alert {
    color: inherit !important;
}

/* Preserve the floating AI panel's own theme */
html.light .floating-ai-panel,
html.sacred-light .floating-ai-panel,
body.light .floating-ai-panel,
body.sacred-light .floating-ai-panel,
html.light .floating-ai-panel *,
html.sacred-light .floating-ai-panel *,
body.light .floating-ai-panel *,
body.sacred-light .floating-ai-panel * {
    color: inherit;
}

/* ==========================================================
   Component-Level Scoped CSS Overrides (High Specificity)
   These target specific Blazor component styles that use hardcoded white
   ========================================================== */

/* LLM Command Bar - Force dark text in light mode */
html.light .llm-command-bar,
html.sacred-light .llm-command-bar,
html.light .llm-command-bar *,
html.sacred-light .llm-command-bar *,
html.light [b-llmcommandbar] *,
html.sacred-light [b-llmcommandbar] * {
    color: #1a1f2e !important;
}

/* Daily Check-In component */
html.light .daily-checkin,
html.sacred-light .daily-checkin,
html.light .daily-checkin *,
html.sacred-light .daily-checkin * {
    color: #1a1f2e !important;
}

html.light .daily-checkin .card,
html.sacred-light .daily-checkin .card {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #1a1f2e !important;
}

/* Onboarding Wizard */
html.light .onboarding-wizard,
html.sacred-light .onboarding-wizard,
html.light .onboarding-wizard *,
html.sacred-light .onboarding-wizard * {
    color: #1a1f2e !important;
}

html.light .wizard-step,
html.sacred-light .wizard-step {
    color: #1a1f2e !important;
}

html.light .wizard-content,
html.sacred-light .wizard-content {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #1a1f2e !important;
}

/* Pre-Filing Checklist */
html.light .pre-filing-checklist,
html.sacred-light .pre-filing-checklist,
html.light .pre-filing-checklist *,
html.sacred-light .pre-filing-checklist * {
    color: #1a1f2e !important;
}

/* Refund Tracker */
html.light .refund-tracker,
html.sacred-light .refund-tracker,
html.light .refund-tracker *,
html.sacred-light .refund-tracker * {
    color: #1a1f2e !important;
}

/* Validation Alert */
html.light .validation-alert,
html.sacred-light .validation-alert,
html.light .validation-alert *,
html.sacred-light .validation-alert * {
    color: #1a1f2e !important;
}

/* Quick Actions */
html.light .quick-actions,
html.sacred-light .quick-actions,
html.light .quick-actions *,
html.sacred-light .quick-actions * {
    color: #1a1f2e !important;
}

/* Empty State */
html.light .empty-state,
html.sacred-light .empty-state,
html.light .empty-state *,
html.sacred-light .empty-state * {
    color: #1a1f2e !important;
}

/* Tax Progress Mini */
html.light .tax-progress-mini,
html.sacred-light .tax-progress-mini,
html.light .tax-progress-mini *,
html.sacred-light .tax-progress-mini * {
    color: #1a1f2e !important;
}

/* Quick Start Tips */
html.light .quick-start-tips,
html.sacred-light .quick-start-tips,
html.light .quick-start-tips *,
html.sacred-light .quick-start-tips * {
    color: #1a1f2e !important;
}

/* SmartUpload page */
html.light .smart-upload,
html.sacred-light .smart-upload,
html.light .smart-upload *,
html.sacred-light .smart-upload * {
    color: #1a1f2e !important;
}

html.light .upload-zone,
html.sacred-light .upload-zone {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #1a1f2e !important;
    border-color: #d0d5dd !important;
}

/* AdminSetup page */
html.light .admin-setup,
html.sacred-light .admin-setup,
html.light .admin-setup *,
html.sacred-light .admin-setup * {
    color: #1a1f2e !important;
}

/* PFS (Personal Financial Statement) page */
html.light .pfs-page,
html.sacred-light .pfs-page,
html.light .pfs-page *,
html.sacred-light .pfs-page * {
    color: #1a1f2e !important;
}

html.light .view-select,
html.sacred-light .view-select {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #1a1f2e !important;
    border-color: #d0d5dd !important;
}

html.light .btn.ghost,
html.sacred-light .btn.ghost {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #1a1f2e !important;
}

/* Page container overrides */
html.light .page-container,
html.sacred-light .page-container,
html.light .page-container *,
html.sacred-light .page-container * {
    color: #1a1f2e !important;
}

/* Dashboard page */
html.light .dashboard,
html.sacred-light .dashboard,
html.light .dashboard *,
html.sacred-light .dashboard * {
    color: #1a1f2e !important;
}

/* General span and p elements in main content */
html.light .sacred-content span,
html.sacred-light .sacred-content span,
html.light .sacred-content p,
html.sacred-light .sacred-content p,
html.light .sacred-content div,
html.sacred-light .sacred-content div {
    color: #1a1f2e !important;
}

/* Preserve button text colors */
html.light .btn-primary,
html.sacred-light .btn-primary,
html.light .btn-success,
html.sacred-light .btn-success,
html.light .btn-danger,
html.sacred-light .btn-danger,
html.light .btn-warning,
html.sacred-light .btn-warning,
html.light .btn-info,
html.sacred-light .btn-info,
html.light .sacred-btn-primary,
html.sacred-light .sacred-btn-primary {
    color: #ffffff !important;
}

/* Fix icon colors - preserve them */
html.light .bi,
html.sacred-light .bi,
html.light .fa,
html.sacred-light .fa,
html.light [class*="icon"],
html.sacred-light [class*="icon"] {
    color: currentColor !important;
}

/* Stat cards/boxes */
html.light .stat-card,
html.sacred-light .stat-card,
html.light .stat-box,
html.sacred-light .stat-box,
html.light .metric-card,
html.sacred-light .metric-card {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #1a1f2e !important;
}

html.light .stat-card *,
html.sacred-light .stat-card *,
html.light .stat-box *,
html.sacred-light .stat-box *,
html.light .metric-card *,
html.sacred-light .metric-card * {
    color: #1a1f2e !important;
}

/* Fix header text */
html.light .app-header,
html.sacred-light .app-header,
html.light .sacred-header,
html.sacred-light .sacred-header {
    color: #1a1f2e !important;
}

html.light .app-header *,
html.sacred-light .app-header *,
html.light .sacred-header *,
html.sacred-light .sacred-header * {
    color: #1a1f2e !important;
}

/* Navigation should remain dark/themed */
html.light .app-nav,
html.sacred-light .app-nav,
html.light .sacred-nav-container,
html.sacred-light .sacred-nav-container {
    background: #1a1f2e !important;
    color: #ffffff !important;
}

html.light .app-nav *,
html.sacred-light .app-nav *,
html.light .sacred-nav-container *,
html.sacred-light .sacred-nav-container * {
    color: #c4c9d8 !important;
}

html.light .app-nav a:hover,
html.sacred-light .app-nav a:hover,
html.light .sacred-nav-container a:hover,
html.sacred-light .sacred-nav-container a:hover {
    color: #ffffff !important;
}

/* Brand text in nav */
html.light .sacred-brand-text,
html.sacred-light .sacred-brand-text {
    color: #ffffff !important;
}

/* ==========================================================
   BLAZOR SCOPED STYLE OVERRIDES (Ultimate Specificity)
   These use attribute selectors to match Blazor's scoped styles
   ========================================================== */

/* Override ALL elements in app-body in light mode with max specificity */
html.light .app-body *[class],
html.sacred-light .app-body *[class],
body.light .app-body *[class],
body.sacred-light .app-body *[class],
html.light .sacred-content *[class],
html.sacred-light .sacred-content *[class],
body.light .sacred-content *[class],
body.sacred-light .sacred-content *[class] {
    color: #1a1f2e !important;
}

/* Re-preserve button text colors with even higher specificity */
html.light .app-body .btn-primary[class],
html.sacred-light .app-body .btn-primary[class],
body.light .app-body .btn-primary[class],
body.sacred-light .app-body .btn-primary[class],
html.light .app-body .btn-success[class],
html.sacred-light .app-body .btn-success[class],
body.light .app-body .btn-success[class],
body.sacred-light .app-body .btn-success[class],
html.light .app-body .btn-danger[class],
html.sacred-light .app-body .btn-danger[class],
body.light .app-body .btn-danger[class],
body.sacred-light .app-body .btn-danger[class],
html.light .app-body .btn-warning[class],
html.sacred-light .app-body .btn-warning[class],
body.light .app-body .btn-warning[class],
body.sacred-light .app-body .btn-warning[class],
html.light .app-body .btn-info[class],
html.sacred-light .app-body .btn-info[class],
body.light .app-body .btn-info[class],
body.sacred-light .app-body .btn-info[class] {
    color: #ffffff !important;
}

/* Re-preserve badge colors with max specificity */
html.light .app-body .badge[class*="bg-"],
html.sacred-light .app-body .badge[class*="bg-"],
body.light .app-body .badge[class*="bg-"],
body.sacred-light .app-body .badge[class*="bg-"] {
    color: #ffffff !important;
}

/* Re-preserve nav dark styling */
html.light .app-nav[class] *,
html.sacred-light .app-nav[class] *,
body.light .app-nav[class] *,
body.sacred-light .app-nav[class] *,
html.light .sacred-nav-container[class] *,
html.sacred-light .sacred-nav-container[class] *,
body.light .sacred-nav-container[class] *,
body.sacred-light .sacred-nav-container[class] * {
    color: #c4c9d8 !important;
}

/* Progress bars text preservation */
html.light .progress-bar[class],
html.sacred-light .progress-bar[class],
body.light .progress-bar[class],
body.sacred-light .progress-bar[class] {
    color: #ffffff !important;
}

/* Floating AI panel should keep its own styling */
html.light .floating-ai-panel[class] *,
html.sacred-light .floating-ai-panel[class] *,
body.light .floating-ai-panel[class] *,
body.sacred-light .floating-ai-panel[class] * {
    color: inherit !important;
}

/* Override Blazor scoped style attributes directly */
html.light [b-llmopsnav] *,
html.sacred-light [b-llmopsnav] *,
body.light [b-llmopsnav] *,
body.sacred-light [b-llmopsnav] * {
    color: #c4c9d8 !important;
}

html.light [b-dashboard] *:not(.btn):not(.badge):not(.progress-bar),
html.sacred-light [b-dashboard] *:not(.btn):not(.badge):not(.progress-bar),
body.light [b-dashboard] *:not(.btn):not(.badge):not(.progress-bar),
body.sacred-light [b-dashboard] *:not(.btn):not(.badge):not(.progress-bar) {
    color: #1a1f2e !important;
}

/* Generic scoped style override - catches all Blazor scoped components */
html.light [class*="b-"] .card-body *:not(.btn):not(.badge),
html.sacred-light [class*="b-"] .card-body *:not(.btn):not(.badge),
body.light [class*="b-"] .card-body *:not(.btn):not(.badge),
body.sacred-light [class*="b-"] .card-body *:not(.btn):not(.badge) {
    color: #1a1f2e !important;
}

/* Fix any white text spans or divs with inline white color */
html.light span[style*="color: white"],
html.light span[style*="color:#fff"],
html.light span[style*="color: #fff"],
html.light div[style*="color: white"],
html.light div[style*="color:#fff"],
html.light div[style*="color: #fff"],
html.sacred-light span[style*="color: white"],
html.sacred-light span[style*="color:#fff"],
html.sacred-light span[style*="color: #fff"],
html.sacred-light div[style*="color: white"],
html.sacred-light div[style*="color:#fff"],
html.sacred-light div[style*="color: #fff"],
body.light span[style*="color: white"],
body.light span[style*="color:#fff"],
body.light span[style*="color: #fff"],
body.light div[style*="color: white"],
body.light div[style*="color:#fff"],
body.light div[style*="color: #fff"],
body.sacred-light span[style*="color: white"],
body.sacred-light span[style*="color:#fff"],
body.sacred-light span[style*="color: #fff"],
body.sacred-light div[style*="color: white"],
body.sacred-light div[style*="color:#fff"],
body.sacred-light div[style*="color: #fff"] {
    color: #1a1f2e !important;
}

/* Ensure small text is visible */
html.light small,
html.sacred-light small,
body.light small,
body.sacred-light small {
    color: #4a5568 !important;
}

/* Card titles and headers */
html.light .card-header *,
html.sacred-light .card-header *,
body.light .card-header *,
body.sacred-light .card-header *,
html.light .card-title,
html.sacred-light .card-title,
body.light .card-title,
body.sacred-light .card-title {
    color: #1a1f2e !important;
}

/* Text in metric/stat boxes */
html.light .metric-value,
html.sacred-light .metric-value,
body.light .metric-value,
body.sacred-light .metric-value,
html.light .stat-value,
html.sacred-light .stat-value,
body.light .stat-value,
body.sacred-light .stat-value,
html.light .metric-label,
html.sacred-light .metric-label,
body.light .metric-label,
body.sacred-light .metric-label {
    color: #1a1f2e !important;
}

/* ==========================================================
   BLAZOR SCOPED CSS COMPONENT OVERRIDES
   Target specific component CSS that hardcodes white text
   ========================================================== */

/* AdminSetup page */
html.light .admin-section-title,
html.sacred-light .admin-section-title,
body.light .admin-section-title,
body.sacred-light .admin-section-title {
    color: #1a1f2e !important;
}

/* PFS page - view selects and ghost buttons */
html.light .view-select,
html.sacred-light .view-select,
body.light .view-select,
body.sacred-light .view-select {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #1a1f2e !important;
}

html.light .btn.ghost,
html.sacred-light .btn.ghost,
body.light .btn.ghost,
body.sacred-light .btn.ghost {
    background: rgba(0, 0, 0, 0.05) !important;
    color: #1a1f2e !important;
}

/* SmartUpload page */
html.light .upload-area,
html.sacred-light .upload-area,
body.light .upload-area,
body.sacred-light .upload-area,
html.light .file-item,
html.sacred-light .file-item,
body.light .file-item,
body.sacred-light .file-item,
html.light .category-badge,
html.sacred-light .category-badge,
body.light .category-badge,
body.sacred-light .category-badge {
    color: #1a1f2e !important;
}

/* ComplianceTracker page - status badges */
html.light .compliance-status,
html.sacred-light .compliance-status,
body.light .compliance-status,
body.sacred-light .compliance-status {
    color: #ffffff !important; /* Keep white on colored badges */
}

html.light .compliance-item,
html.sacred-light .compliance-item,
body.light .compliance-item,
body.sacred-light .compliance-item,
html.light .compliance-card,
html.sacred-light .compliance-card,
body.light .compliance-card,
body.sacred-light .compliance-card {
    color: #1a1f2e !important;
}

/* DeductionOptimizer page - filters and selects */
html.light .entity-filter,
html.sacred-light .entity-filter,
body.light .entity-filter,
body.sacred-light .entity-filter,
html.light .opt-container select,
html.sacred-light .opt-container select,
body.light .opt-container select,
body.sacred-light .opt-container select {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #1a1f2e !important;
}

/* TaxFilingWizard page */
html.light .wizard-step-title,
html.sacred-light .wizard-step-title,
body.light .wizard-step-title,
body.sacred-light .wizard-step-title,
html.light .filing-step,
html.sacred-light .filing-step,
body.light .filing-step,
body.sacred-light .filing-step {
    color: #1a1f2e !important;
}

/* FinancialReports page */
html.light .report-filter,
html.sacred-light .report-filter,
body.light .report-filter,
body.sacred-light .report-filter,
html.light .reports select,
html.sacred-light .reports select,
body.light .reports select,
body.sacred-light .reports select {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #1a1f2e !important;
}

/* LlmWorkspace page */
html.light .llm-workspace,
html.sacred-light .llm-workspace,
body.light .llm-workspace,
body.sacred-light .llm-workspace,
html.light .llm-workspace *:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.badge),
html.sacred-light .llm-workspace *:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.badge),
body.light .llm-workspace *:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.badge),
body.sacred-light .llm-workspace *:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.badge) {
    color: #1a1f2e !important;
}

/* GuidancePanel component */
html.light .guidance-panel,
html.sacred-light .guidance-panel,
body.light .guidance-panel,
body.sacred-light .guidance-panel,
html.light .guidance-panel *:not(.btn-primary):not(.btn-success):not(.badge),
html.sacred-light .guidance-panel *:not(.btn-primary):not(.btn-success):not(.badge),
body.light .guidance-panel *:not(.btn-primary):not(.btn-success):not(.badge),
body.sacred-light .guidance-panel *:not(.btn-primary):not(.btn-success):not(.badge) {
    color: #1a1f2e !important;
}

/* LlmCommandBar component */
html.light .llm-command-bar,
html.sacred-light .llm-command-bar,
body.light .llm-command-bar,
body.sacred-light .llm-command-bar,
html.light .llm-command-bar *:not(.btn-primary):not(.btn-success):not(.badge),
html.sacred-light .llm-command-bar *:not(.btn-primary):not(.btn-success):not(.badge),
body.light .llm-command-bar *:not(.btn-primary):not(.btn-success):not(.badge),
body.sacred-light .llm-command-bar *:not(.btn-primary):not(.btn-success):not(.badge) {
    color: #1a1f2e !important;
}

/* Universal fix for any element with scoped b- attributes */
html.light *[class*=" b-"]:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.badge):not(.progress-bar):not(.nav-link),
html.sacred-light *[class*=" b-"]:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.badge):not(.progress-bar):not(.nav-link),
body.light *[class*=" b-"]:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.badge):not(.progress-bar):not(.nav-link),
body.sacred-light *[class*=" b-"]:not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.badge):not(.progress-bar):not(.nav-link) {
    color: #1a1f2e !important;
}

/* Fix CSS variables for light mode to use dark text */
html.light,
html.sacred-light,
body.light,
body.sacred-light {
    --text-color: #1a1f2e !important;
    --text-default: #1a1f2e !important;
    --body-color: #1a1f2e !important;
    --content-color: #1a1f2e !important;
    --form-label-color: #1a1f2e !important;
    --heading-color: #1a1f2e !important;
}

/* ==========================================================
   Component-scoped form element fixes
   These target specific Blazor isolated styles
   ========================================================== */

/* DeductionOptimizer and other pages with .entity-filter */
html.light .entity-filter,
html.sacred-light .entity-filter,
body.light .entity-filter,
body.sacred-light .entity-filter,
html.light .opt-container select,
html.sacred-light .opt-container select,
body.light .opt-container select,
body.sacred-light .opt-container select {
    color: #1a1f2e !important;
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

/* Ghost buttons in light mode */
html.light .btn.ghost,
html.sacred-light .btn.ghost,
body.light .btn.ghost,
body.sacred-light .btn.ghost {
    color: #1a1f2e !important;
    background: rgba(0, 0, 0, 0.05) !important;
}

/* General select/input elements in app-body */
html.light .app-body select,
html.sacred-light .app-body select,
body.light .app-body select,
body.sacred-light .app-body select,
html.light .sacred-content select,
html.sacred-light .sacred-content select,
body.light .sacred-content select,
body.sacred-light .sacred-content select,
html.light .app-body input:not([type="checkbox"]):not([type="radio"]),
html.sacred-light .app-body input:not([type="checkbox"]):not([type="radio"]),
body.light .app-body input:not([type="checkbox"]):not([type="radio"]),
body.sacred-light .app-body input:not([type="checkbox"]):not([type="radio"]) {
    color: #1a1f2e !important;
}

/* Form control text in light mode */
html.light .app-body .form-control,
html.sacred-light .app-body .form-control,
body.light .app-body .form-control,
body.sacred-light .app-body .form-control,
html.light .app-body .form-select,
html.sacred-light .app-body .form-select,
body.light .app-body .form-select,
body.sacred-light .app-body .form-select {
    color: #1a1f2e !important;
    background-color: #ffffff !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

/* Placeholder text */
html.light .app-body input::placeholder,
html.sacred-light .app-body input::placeholder,
body.light .app-body input::placeholder,
body.sacred-light .app-body input::placeholder,
html.light .app-body textarea::placeholder,
html.sacred-light .app-body textarea::placeholder,
body.light .app-body textarea::placeholder,
body.sacred-light .app-body textarea::placeholder {
    color: #6b7280 !important;
}

/* Link text in light mode */
html.light .app-body a:not(.btn):not(.nav-link),
html.sacred-light .app-body a:not(.btn):not(.nav-link),
body.light .app-body a:not(.btn):not(.nav-link),
body.sacred-light .app-body a:not(.btn):not(.nav-link) {
    color: #2563eb !important;
}

/* SmartUpload and AdminSetup specific fixes */
html.light .upload-zone,
html.sacred-light .upload-zone,
body.light .upload-zone,
body.sacred-light .upload-zone,
html.light .upload-zone *,
html.sacred-light .upload-zone *,
body.light .upload-zone *,
body.sacred-light .upload-zone * {
    color: #1a1f2e !important;
}

html.light .admin-setup-container,
html.sacred-light .admin-setup-container,
body.light .admin-setup-container,
body.sacred-light .admin-setup-container,
html.light .admin-setup-container *:not(.btn-primary):not(.btn-success):not(.badge),
html.sacred-light .admin-setup-container *:not(.btn-primary):not(.btn-success):not(.badge),
body.light .admin-setup-container *:not(.btn-primary):not(.btn-success):not(.badge),
body.sacred-light .admin-setup-container *:not(.btn-primary):not(.btn-success):not(.badge) {
    color: #1a1f2e !important;
}

/* PFS and FinancialReports page fixes */
html.light .pfs-container,
html.sacred-light .pfs-container,
body.light .pfs-container,
body.sacred-light .pfs-container,
html.light .pfs-container *:not(.btn-primary):not(.btn-success):not(.badge),
html.sacred-light .pfs-container *:not(.btn-primary):not(.btn-success):not(.badge),
body.light .pfs-container *:not(.btn-primary):not(.btn-success):not(.badge),
body.sacred-light .pfs-container *:not(.btn-primary):not(.btn-success):not(.badge) {
    color: #1a1f2e !important;
}

html.light .reports-container,
html.sacred-light .reports-container,
body.light .reports-container,
body.sacred-light .reports-container,
html.light .reports-container *:not(.btn-primary):not(.btn-success):not(.badge),
html.sacred-light .reports-container *:not(.btn-primary):not(.btn-success):not(.badge),
body.light .reports-container *:not(.btn-primary):not(.btn-success):not(.badge),
body.sacred-light .reports-container *:not(.btn-primary):not(.btn-success):not(.badge) {
    color: #1a1f2e !important;
}

/* TaxFilingWizard page fixes */
html.light .wizard-container,
html.sacred-light .wizard-container,
body.light .wizard-container,
body.sacred-light .wizard-container,
html.light .wizard-container *:not(.btn-primary):not(.btn-success):not(.badge),
html.sacred-light .wizard-container *:not(.btn-primary):not(.btn-success):not(.badge),
body.light .wizard-container *:not(.btn-primary):not(.btn-success):not(.badge),
body.sacred-light .wizard-container *:not(.btn-primary):not(.btn-success):not(.badge) {
    color: #1a1f2e !important;
}

/* ComplianceTracker page fixes */
html.light .compliance-container,
html.sacred-light .compliance-container,
body.light .compliance-container,
body.sacred-light .compliance-container,
html.light .compliance-container *:not(.btn-primary):not(.btn-success):not(.badge),
html.sacred-light .compliance-container *:not(.btn-primary):not(.btn-success):not(.badge),
body.light .compliance-container *:not(.btn-primary):not(.btn-success):not(.badge),
body.sacred-light .compliance-container *:not(.btn-primary):not(.btn-success):not(.badge) {
    color: #1a1f2e !important;
}

/* NUCLEAR OPTION: Force dark text on all possible text containers in light mode */
/* This catches any remaining elements with inherited or hardcoded white text */
html.light,
html.sacred-light,
body.light,
body.sacred-light {
    color: #1a1f2e !important;
}

/* Force all direct children text to be dark */
html.light > *,
html.sacred-light > *,
body.light > *,
body.sacred-light > * {
    color: #1a1f2e;
}

/* Catch page-specific containers that may still show white text */
html.light .page,
html.sacred-light .page,
body.light .page,
body.sacred-light .page,
html.light .content,
html.sacred-light .content,
body.light .content,
body.sacred-light .content,
html.light .container,
html.sacred-light .container,
body.light .container,
body.sacred-light .container,
html.light .container-fluid,
html.sacred-light .container-fluid,
body.light .container-fluid,
body.sacred-light .container-fluid,
html.light .row,
html.sacred-light .row,
body.light .row,
body.sacred-light .row,
html.light [class*="col-"],
html.sacred-light [class*="col-"],
body.light [class*="col-"],
body.sacred-light [class*="col-"] {
    color: #1a1f2e !important;
}

/* Override any inline white text colors */
html.light [style*="color: #fff"],
html.sacred-light [style*="color: #fff"],
body.light [style*="color: #fff"],
body.sacred-light [style*="color: #fff"],
html.light [style*="color:#fff"],
html.sacred-light [style*="color:#fff"],
body.light [style*="color:#fff"],
body.sacred-light [style*="color:#fff"],
html.light [style*="color: white"],
html.sacred-light [style*="color: white"],
body.light [style*="color: white"],
body.sacred-light [style*="color: white"] {
    color: #1a1f2e !important;
}

/* Catch nav elements */
html.light .nav,
html.sacred-light .nav,
body.light .nav,
body.sacred-light .nav,
html.light .navbar,
html.sacred-light .navbar,
body.light .navbar,
body.sacred-light .navbar {
    color: #1a1f2e !important;
}

/* Specific Dashboard/Hub stats - preserve colors on dark backgrounds only */
html.light .stat-card,
html.sacred-light .stat-card,
body.light .stat-card,
body.sacred-light .stat-card,
html.light .hub-stat,
html.sacred-light .hub-stat,
body.light .hub-stat,
body.sacred-light .hub-stat,
html.light .metric-card,
html.sacred-light .metric-card,
body.light .metric-card,
body.sacred-light .metric-card {
    color: #1a1f2e !important;
}

/* Override for modal content */
html.light .modal-content,
html.sacred-light .modal-content,
body.light .modal-content,
body.sacred-light .modal-content {
    background: #ffffff !important;
    color: #1a1f2e !important;
}

html.light .modal-header,
html.light .modal-body,
html.light .modal-footer,
html.sacred-light .modal-header,
html.sacred-light .modal-body,
html.sacred-light .modal-footer,
body.light .modal-header,
body.light .modal-body,
body.light .modal-footer,
body.sacred-light .modal-header,
body.sacred-light .modal-body,
body.sacred-light .modal-footer {
    color: #1a1f2e !important;
}

/* Dropdown menus */
html.light .dropdown-menu,
html.sacred-light .dropdown-menu,
body.light .dropdown-menu,
body.sacred-light .dropdown-menu {
    background: #ffffff !important;
    color: #1a1f2e !important;
}

html.light .dropdown-item,
html.sacred-light .dropdown-item,
body.light .dropdown-item,
body.sacred-light .dropdown-item {
    color: #1a1f2e !important;
}

/* Popover and tooltip content */
html.light .popover,
html.sacred-light .popover,
body.light .popover,
body.sacred-light .popover,
html.light .tooltip-inner,
html.sacred-light .tooltip-inner,
body.light .tooltip-inner,
body.sacred-light .tooltip-inner {
    background: #ffffff !important;
    color: #1a1f2e !important;
}

/* Placeholder text - slightly lighter for contrast but still readable */
html.light input::placeholder,
html.sacred-light input::placeholder,
body.light input::placeholder,
body.sacred-light input::placeholder,
html.light textarea::placeholder,
html.sacred-light textarea::placeholder,
body.light textarea::placeholder,
body.sacred-light textarea::placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}

/* Ensure alert text is readable */
html.light .alert,
html.sacred-light .alert,
body.light .alert,
body.sacred-light .alert {
    color: #1a1f2e !important;
}

/* Keep colored button text white */
html.light .btn-primary,
html.light .btn-success,
html.light .btn-danger,
html.light .btn-warning,
html.light .btn-info,
html.sacred-light .btn-primary,
html.sacred-light .btn-success,
html.sacred-light .btn-danger,
html.sacred-light .btn-warning,
html.sacred-light .btn-info,
body.light .btn-primary,
body.light .btn-success,
body.light .btn-danger,
body.light .btn-warning,
body.light .btn-info,
body.sacred-light .btn-primary,
body.sacred-light .btn-success,
body.sacred-light .btn-danger,
body.sacred-light .btn-warning,
body.sacred-light .btn-info {
    color: #ffffff !important;
}

/* ==========================================================
   NUCLEAR LIGHT MODE OVERRIDES - Blazor Scoped CSS Fix
   These override ALL hardcoded white/light text in component styles
   ========================================================== */

/* Override ALL scoped Blazor component text to dark colors in light mode */
html.light [class*="b-"],
html.sacred-light [class*="b-"],
body.light [class*="b-"],
body.sacred-light [class*="b-"] {
    color: #1a1f2e !important;
}

/* Ensure all text inside scoped components is dark */
html.light [class*="b-"] *:not(.btn):not(.badge):not(.btn *):not(.badge *),
html.sacred-light [class*="b-"] *:not(.btn):not(.badge):not(.btn *):not(.badge *),
body.light [class*="b-"] *:not(.btn):not(.badge):not(.btn *):not(.badge *),
body.sacred-light [class*="b-"] *:not(.btn):not(.badge):not(.btn *):not(.badge *) {
    color: inherit !important;
}

/* Status text in Dashboard and all status-related elements */
html.light .status-text,
html.sacred-light .status-text,
body.light .status-text,
body.sacred-light .status-text,
html.light .info-value,
html.sacred-light .info-value,
body.light .info-value,
body.sacred-light .info-value,
html.light .info-label,
html.sacred-light .info-label,
body.light .info-label,
body.sacred-light .info-label {
    color: #1a1f2e !important;
}

/* Dashboard specific elements */
html.light .dash-year,
html.sacred-light .dash-year,
body.light .dash-year,
body.sacred-light .dash-year,
html.light .dash-view,
html.sacred-light .dash-view,
body.light .dash-view,
body.sacred-light .dash-view {
    color: #1a1f2e !important;
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.1) !important;
}

/* Card and hero sections */
html.light .hero-cta,
html.sacred-light .hero-cta,
body.light .hero-cta,
body.sacred-light .hero-cta,
html.light .ghost-text,
html.sacred-light .ghost-text,
body.light .ghost-text,
body.sacred-light .ghost-text {
    color: #1a1f2e !important;
}

/* Ghost buttons need special handling */
html.light .btn.ghost,
html.sacred-light .btn.ghost,
body.light .btn.ghost,
body.sacred-light .btn.ghost,
html.light .hero-cta.ghost,
html.sacred-light .hero-cta.ghost,
body.light .hero-cta.ghost,
body.sacred-light .hero-cta.ghost {
    color: #1a1f2e !important;
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
}

html.light .btn.ghost:hover,
html.sacred-light .btn.ghost:hover,
body.light .btn.ghost:hover,
body.sacred-light .btn.ghost:hover {
    background: rgba(0, 0, 0, 0.1) !important;
    color: #1a1f2e !important;
}

/* Urgent and warning text - keep colored but ensure readable */
html.light .urgent-text strong,
html.sacred-light .urgent-text strong,
body.light .urgent-text strong,
body.sacred-light .urgent-text strong {
    color: #1a1f2e !important;
}

/* Suggestion chips and pills */
html.light .suggestion-chip,
html.sacred-light .suggestion-chip,
body.light .suggestion-chip,
body.sacred-light .suggestion-chip,
html.light .pill,
html.sacred-light .pill,
body.light .pill,
body.sacred-light .pill {
    color: #1a1f2e !important;
    background: rgba(0, 0, 0, 0.06) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

/* Control text - generic controls */
html.light .control-text,
html.sacred-light .control-text,
body.light .control-text,
body.sacred-light .control-text {
    color: #1a1f2e !important;
}

/* Override CSS variables with light mode fallbacks */
html.light,
html.sacred-light,
body.light,
body.sacred-light {
    --text-1: #1a1f2e !important;
    --text-strong: #0f1422 !important;
    --text-primary: #1a1f2e !important;
    --ghost-text: #374151 !important;
    --control-text: #1a1f2e !important;
}

/* All paragraphs and spans in light mode */
html.light p,
html.sacred-light p,
body.light p,
body.sacred-light p,
html.light span:not(.btn span):not(.badge),
html.sacred-light span:not(.btn span):not(.badge),
body.light span:not(.btn span):not(.badge),
body.sacred-light span:not(.btn span):not(.badge) {
    color: #1a1f2e !important;
}

/* Small text and labels */
html.light small,
html.sacred-light small,
body.light small,
body.sacred-light small,
html.light .small,
html.sacred-light .small,
body.light .small,
body.sacred-light .small {
    color: #4a5568 !important;
}

/* List items */
html.light li,
html.sacred-light li,
body.light li,
body.sacred-light li,
html.light ul,
html.sacred-light ul,
body.light ul,
body.sacred-light ul {
    color: #1a1f2e !important;
}

/* Strong and bold text */
html.light strong,
html.sacred-light strong,
body.light strong,
body.sacred-light strong,
html.light b,
html.sacred-light b,
body.light b,
body.sacred-light b {
    color: #0f1422 !important;
}

/* Ensure colored badges keep white text */
html.light .badge.bg-primary,
html.light .badge.bg-success,
html.light .badge.bg-danger,
html.light .badge.bg-dark,
html.light .badge.bg-info,
html.sacred-light .badge.bg-primary,
html.sacred-light .badge.bg-success,
html.sacred-light .badge.bg-danger,
html.sacred-light .badge.bg-dark,
html.sacred-light .badge.bg-info,
body.light .badge.bg-primary,
body.light .badge.bg-success,
body.light .badge.bg-danger,
body.light .badge.bg-dark,
body.light .badge.bg-info,
body.sacred-light .badge.bg-primary,
body.sacred-light .badge.bg-success,
body.sacred-light .badge.bg-danger,
body.sacred-light .badge.bg-dark,
body.sacred-light .badge.bg-info {
    color: #ffffff !important;
}

/* Warning badges can have dark text */
html.light .badge.bg-warning,
html.sacred-light .badge.bg-warning,
body.light .badge.bg-warning,
body.sacred-light .badge.bg-warning {
    color: #1a1f2e !important;
}

/* Alert boxes with colored backgrounds */
html.light .alert-success,
html.light .alert-danger,
html.light .alert-warning,
html.light .alert-info,
html.sacred-light .alert-success,
html.sacred-light .alert-danger,
html.sacred-light .alert-warning,
html.sacred-light .alert-info,
body.light .alert-success,
body.light .alert-danger,
body.light .alert-warning,
body.light .alert-info,
body.sacred-light .alert-success,
body.sacred-light .alert-danger,
body.sacred-light .alert-warning,
body.sacred-light .alert-info {
    color: #1a1f2e !important;
}

/* Nav menu items */
html.light .nav-link:not(.active),
html.sacred-light .nav-link:not(.active),
body.light .nav-link:not(.active),
body.sacred-light .nav-link:not(.active) {
    color: #374151 !important;
}

html.light .nav-link.active,
html.sacred-light .nav-link.active,
body.light .nav-link.active,
body.sacred-light .nav-link.active {
    color: #2563eb !important;
}

/* Sidebar and menu text */
html.light .sidebar,
html.sacred-light .sidebar,
body.light .sidebar,
body.sacred-light .sidebar,
html.light .sacred-sidebar,
html.sacred-light .sacred-sidebar,
body.light .sacred-sidebar,
body.sacred-light .sacred-sidebar {
    color: #1a1f2e !important;
}

html.light .sidebar *,
html.sacred-light .sidebar *,
body.light .sidebar *,
body.sacred-light .sidebar *,
html.light .sacred-sidebar *,
html.sacred-light .sacred-sidebar *,
body.light .sacred-sidebar *,
body.sacred-light .sacred-sidebar * {
    color: inherit !important;
}

/* Code and pre blocks */
html.light code,
html.sacred-light code,
body.light code,
body.sacred-light code,
html.light pre,
html.sacred-light pre,
body.light pre,
body.sacred-light pre {
    color: #1a1f2e !important;
    background: #f3f4f6 !important;
}

/* ==========================================================
   Dashboard Page Specific Overrides
   ========================================================== */

/* Dashboard container and hero */
html.light .dash-container,
html.sacred-light .dash-container,
body.light .dash-container,
body.sacred-light .dash-container,
html.light .dash-hero,
html.sacred-light .dash-hero,
body.light .dash-hero,
body.sacred-light .dash-hero {
    color: #1a1f2e !important;
}

html.light .dash-container *,
html.sacred-light .dash-container *,
body.light .dash-container *,
body.sacred-light .dash-container * {
    color: #1a1f2e !important;
}

/* Dashboard hero content */
html.light .hero-content,
html.sacred-light .hero-content,
body.light .hero-content,
body.sacred-light .hero-content {
    color: #1a1f2e !important;
}

html.light .hero-content h1,
html.sacred-light .hero-content h1,
body.light .hero-content h1,
body.sacred-light .hero-content h1 {
    color: #1a1f2e !important;
}

html.light .dash-subtitle,
html.sacred-light .dash-subtitle,
body.light .dash-subtitle,
body.sacred-light .dash-subtitle {
    color: #4a5568 !important;
}

/* Urgent deadline bar */
html.light .urgent-deadline-bar,
html.sacred-light .urgent-deadline-bar,
body.light .urgent-deadline-bar,
body.sacred-light .urgent-deadline-bar {
    color: #1a1f2e !important;
}

html.light .urgent-text,
html.sacred-light .urgent-text,
body.light .urgent-text,
body.sacred-light .urgent-text {
    color: #1a1f2e !important;
}

/* Chart card */
html.light .chart-card,
html.sacred-light .chart-card,
body.light .chart-card,
body.sacred-light .chart-card {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #1a1f2e !important;
}

html.light .chart-card *,
html.sacred-light .chart-card *,
body.light .chart-card *,
body.sacred-light .chart-card * {
    color: #1a1f2e !important;
}

/* Dashboard metric labels and values */
html.light .metric-label,
html.sacred-light .metric-label,
body.light .metric-label,
body.sacred-light .metric-label {
    color: #4a5568 !important;
}

html.light .metric-value,
html.sacred-light .metric-value,
body.light .metric-value,
body.sacred-light .metric-value {
    color: #1a1f2e !important;
}

html.light .metric-sub,
html.sacred-light .metric-sub,
body.light .metric-sub,
body.sacred-light .metric-sub {
    color: #5a6478 !important;
}

/* Dashboard controls */
html.light .dash-controls,
html.sacred-light .dash-controls,
body.light .dash-controls,
body.sacred-light .dash-controls {
    color: #1a1f2e !important;
}

html.light .dash-view,
html.sacred-light .dash-view,
body.light .dash-view,
body.sacred-light .dash-view,
html.light .dash-year,
html.sacred-light .dash-year,
body.light .dash-year,
body.sacred-light .dash-year {
    background: rgba(255, 255, 255, 0.98) !important;
    color: #1a1f2e !important;
    border-color: #d0d5dd !important;
}

/* Action buttons in dashboard */
html.light .action,
html.sacred-light .action,
body.light .action,
body.sacred-light .action {
    color: #1a1f2e !important;
    background: rgba(255, 255, 255, 0.98) !important;
    border-color: #d0d5dd !important;
}

/* Return status badge */
html.light .return-status,
html.sacred-light .return-status,
body.light .return-status,
body.sacred-light .return-status {
    color: #1a1f2e !important;
}

/* Returns preview */
html.light .returns-preview,
html.sacred-light .returns-preview,
body.light .returns-preview,
body.sacred-light .returns-preview,
html.light .returns-preview *,
html.sacred-light .returns-preview *,
body.light .returns-preview *,
body.sacred-light .returns-preview * {
    color: #1a1f2e !important;
}

/* Preserve primary CTA buttons white text */
html.light .hero-cta.primary,
html.sacred-light .hero-cta.primary,
body.light .hero-cta.primary,
body.sacred-light .hero-cta.primary {
    color: #ffffff !important;
}

/* ==========================================================
   AGGRESSIVE UNIVERSAL LIGHT MODE TEXT OVERRIDES
   These are the strongest possible selectors to catch any
   remaining white-on-white text issues
   ========================================================== */

/* Universal dark text override for ALL content in light mode */
html.light main,
html.sacred-light main,
body.light main,
body.sacred-light main,
html.light article,
html.sacred-light article,
body.light article,
body.sacred-light article,
html.light section:not(.sidebar),
html.sacred-light section:not(.sidebar),
body.light section:not(.sidebar),
body.sacred-light section:not(.sidebar) {
    color: #1a1f2e !important;
}

/* Catch all for any text that inherited white color */
html.light [style*="color: rgb(255"],
html.sacred-light [style*="color: rgb(255"],
body.light [style*="color: rgb(255"],
body.sacred-light [style*="color: rgb(255"],
html.light [style*="color: rgba(255"],
html.sacred-light [style*="color: rgba(255"],
body.light [style*="color: rgba(255"],
body.sacred-light [style*="color: rgba(255"] {
    color: #1a1f2e !important;
}

/* Override any remaining #fff text in app content areas */
html.light .page,
html.sacred-light .page,
body.light .page,
body.sacred-light .page,
html.light .container,
html.sacred-light .container,
body.light .container,
body.sacred-light .container,
html.light .container-fluid,
html.sacred-light .container-fluid,
body.light .container-fluid,
body.sacred-light .container-fluid {
    color: #1a1f2e !important;
}

/* Table text - extremely common source of white text issues */
html.light table,
html.sacred-light table,
body.light table,
body.sacred-light table,
html.light table th,
html.sacred-light table th,
body.light table th,
body.sacred-light table th,
html.light table td,
html.sacred-light table td,
body.light table td,
body.sacred-light table td,
html.light .table,
html.sacred-light .table,
body.light .table,
body.sacred-light .table,
html.light .table th,
html.sacred-light .table th,
body.light .table th,
body.sacred-light .table th,
html.light .table td,
html.sacred-light .table td,
body.light .table td,
body.sacred-light .table td {
    color: #1a1f2e !important;
}

/* Headers - h1 to h6 */
html.light h1,
html.sacred-light h1,
body.light h1,
body.sacred-light h1,
html.light h2,
html.sacred-light h2,
body.light h2,
body.sacred-light h2,
html.light h3,
html.sacred-light h3,
body.light h3,
body.sacred-light h3,
html.light h4,
html.sacred-light h4,
body.light h4,
body.sacred-light h4,
html.light h5,
html.sacred-light h5,
body.light h5,
body.sacred-light h5,
html.light h6,
html.sacred-light h6,
body.light h6,
body.sacred-light h6 {
    color: #0f1422 !important;
}

/* Paragraph text */
html.light p,
html.sacred-light p,
body.light p,
body.sacred-light p,
html.light span:not(.badge):not(.btn),
html.sacred-light span:not(.badge):not(.btn),
body.light span:not(.badge):not(.btn),
body.sacred-light span:not(.badge):not(.btn),
html.light label,
html.sacred-light label,
body.light label,
body.sacred-light label {
    color: #1a1f2e !important;
}

/* List items */
html.light li,
html.sacred-light li,
body.light li,
body.sacred-light li,
html.light dt,
html.sacred-light dt,
body.light dt,
body.sacred-light dt,
html.light dd,
html.sacred-light dd,
body.light dd,
body.sacred-light dd {
    color: #1a1f2e !important;
}

/* Small and secondary text */
html.light small,
html.sacred-light small,
body.light small,
body.sacred-light small,
html.light .small,
html.sacred-light .small,
body.light .small,
body.sacred-light .small {
    color: #4a5568 !important;
}

/* Alert text should stay dark */
html.light .alert:not(.alert-danger):not(.alert-warning):not(.alert-success):not(.alert-info),
html.sacred-light .alert:not(.alert-danger):not(.alert-warning):not(.alert-success):not(.alert-info),
body.light .alert:not(.alert-danger):not(.alert-warning):not(.alert-success):not(.alert-info),
body.sacred-light .alert:not(.alert-danger):not(.alert-warning):not(.alert-success):not(.alert-info) {
    color: #1a1f2e !important;
}

/* Card text override */
html.light .card,
html.sacred-light .card,
body.light .card,
body.sacred-light .card,
html.light .card-body,
html.sacred-light .card-body,
body.light .card-body,
body.sacred-light .card-body,
html.light .card-header,
html.sacred-light .card-header,
body.light .card-header,
body.sacred-light .card-header,
html.light .card-footer,
html.sacred-light .card-footer,
body.light .card-footer,
body.sacred-light .card-footer,
html.light .card-title,
html.sacred-light .card-title,
body.light .card-title,
body.sacred-light .card-title,
html.light .card-text,
html.sacred-light .card-text,
body.light .card-text,
body.sacred-light .card-text {
    color: #1a1f2e !important;
    background-color: #ffffff !important;
}

/* Modal text */
html.light .modal-content,
html.sacred-light .modal-content,
body.light .modal-content,
body.sacred-light .modal-content,
html.light .modal-header,
html.sacred-light .modal-header,
body.light .modal-header,
body.sacred-light .modal-header,
html.light .modal-body,
html.sacred-light .modal-body,
body.light .modal-body,
body.sacred-light .modal-body,
html.light .modal-footer,
html.sacred-light .modal-footer,
body.light .modal-footer,
body.sacred-light .modal-footer,
html.light .modal-title,
html.sacred-light .modal-title,
body.light .modal-title,
body.sacred-light .modal-title {
    color: #1a1f2e !important;
    background-color: #ffffff !important;
}

/* Tooltip/Popover in light mode */
html.light .tooltip-inner,
html.sacred-light .tooltip-inner,
body.light .tooltip-inner,
body.sacred-light .tooltip-inner {
    color: #ffffff !important;
    background-color: #1a1f2e !important;
}

/* EXCEPTION LIST - These should keep white text */
html.light .btn-primary,
html.sacred-light .btn-primary,
body.light .btn-primary,
body.sacred-light .btn-primary,
html.light .btn-success,
html.sacred-light .btn-success,
body.light .btn-success,
body.sacred-light .btn-success,
html.light .btn-danger,
html.sacred-light .btn-danger,
body.light .btn-danger,
body.sacred-light .btn-danger,
html.light .btn-warning,
html.sacred-light .btn-warning,
body.light .btn-warning,
body.sacred-light .btn-warning,
html.light .btn-info,
html.sacred-light .btn-info,
body.light .btn-info,
body.sacred-light .btn-info,
html.light .badge.bg-primary,
html.sacred-light .badge.bg-primary,
body.light .badge.bg-primary,
body.sacred-light .badge.bg-primary,
html.light .badge.bg-success,
html.sacred-light .badge.bg-success,
body.light .badge.bg-success,
body.sacred-light .badge.bg-success,
html.light .badge.bg-danger,
html.sacred-light .badge.bg-danger,
body.light .badge.bg-danger,
body.sacred-light .badge.bg-danger,
html.light .badge.bg-info,
html.sacred-light .badge.bg-info,
body.light .badge.bg-info,
body.sacred-light .badge.bg-info,
html.light .badge.bg-dark,
html.sacred-light .badge.bg-dark,
body.light .badge.bg-dark,
body.sacred-light .badge.bg-dark {
    color: #ffffff !important;
}

/* ==========================================================
   SCOPED CSS OVERRIDES FOR LIGHT MODE
   Override white text from .razor.css scoped styles
   ========================================================== */

/* LlmCommandBar scoped overrides - keep dark background with light text */
html.light .cmd-palette,
html.sacred-light .cmd-palette,
body.light .cmd-palette,
body.sacred-light .cmd-palette {
    background: rgba(15, 20, 34, 0.98) !important;
    color: #ffffff !important;
}

html.light .cmd-palette *,
html.sacred-light .cmd-palette *,
body.light .cmd-palette *,
body.sacred-light .cmd-palette * {
    color: inherit !important;
}

/* DeductionOptimizer scoped CSS overrides */
html.light .opt-container .entity-filter,
html.sacred-light .opt-container .entity-filter,
body.light .opt-container .entity-filter,
body.sacred-light .opt-container .entity-filter,
html.light .opt-container select,
html.sacred-light .opt-container select,
body.light .opt-container select,
body.sacred-light .opt-container select {
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
    color: #1a1f2e !important;
}

html.light .opt-container .btn.ghost,
html.sacred-light .opt-container .btn.ghost,
body.light .opt-container .btn.ghost,
body.sacred-light .opt-container .btn.ghost {
    background: rgba(0, 0, 0, 0.06) !important;
    color: #1a1f2e !important;
}

/* Dashboard checklist override */
html.light .checklist li::before,
html.sacred-light .checklist li::before,
body.light .checklist li::before,
body.sacred-light .checklist li::before {
    color: rgba(0, 0, 0, 0.4) !important;
}

html.light .checklist li,
html.sacred-light .checklist li,
body.light .checklist li,
body.sacred-light .checklist li {
    color: #4a5568 !important;
}

html.light .checklist li.done,
html.sacred-light .checklist li.done,
body.light .checklist li.done,
body.sacred-light .checklist li.done {
    color: #059669 !important;
}

/* FinancialReports scoped overrides */
html.light .report-container,
html.sacred-light .report-container,
body.light .report-container,
body.sacred-light .report-container {
    color: #1a1f2e !important;
}

/* ComplianceTracker scoped overrides */
html.light .compliance-container,
html.sacred-light .compliance-container,
body.light .compliance-container,
body.sacred-light .compliance-container {
    color: #1a1f2e !important;
}

/* LlmWorkspace scoped overrides - keep dark theme for LLM interface */
html.light .llm-workspace,
html.sacred-light .llm-workspace,
body.light .llm-workspace,
body.sacred-light .llm-workspace {
    background: rgba(15, 20, 34, 0.98) !important;
    color: #ffffff !important;
}

/* SmartUpload scoped overrides */
html.light .smart-upload-container,
html.sacred-light .smart-upload-container,
body.light .smart-upload-container,
body.sacred-light .smart-upload-container {
    color: #1a1f2e !important;
}

html.light .upload-zone,
html.sacred-light .upload-zone,
body.light .upload-zone,
body.sacred-light .upload-zone {
    background: rgba(0, 0, 0, 0.02) !important;
    border-color: rgba(0, 0, 0, 0.15) !important;
    color: #1a1f2e !important;
}

/* TaxFilingWizard scoped overrides */
html.light .wizard-container,
html.sacred-light .wizard-container,
body.light .wizard-container,
body.sacred-light .wizard-container {
    color: #1a1f2e !important;
}

html.light .quick-reply-btn:hover,
html.sacred-light .quick-reply-btn:hover,
body.light .quick-reply-btn:hover,
body.sacred-light .quick-reply-btn:hover {
    color: #ffffff !important;
}

/* GuidancePanel scoped overrides */
html.light .guidance-container,
html.sacred-light .guidance-container,
body.light .guidance-container,
body.sacred-light .guidance-container {
    color: #1a1f2e !important;
}

/* Force dark text on all card/panel content in light mode */
html.light .card-body,
html.sacred-light .card-body,
body.light .card-body,
body.sacred-light .card-body,
html.light .panel-body,
html.sacred-light .panel-body,
body.light .panel-body,
body.sacred-light .panel-body,
html.light .sacred-panel-body,
html.sacred-light .sacred-panel-body,
body.light .sacred-panel-body,
body.sacred-light .sacred-panel-body {
    color: #1a1f2e !important;
}

/* List items in light mode */
html.light ul li,
html.sacred-light ul li,
body.light ul li,
body.sacred-light ul li,
html.light ol li,
html.sacred-light ol li,
body.light ol li,
body.sacred-light ol li {
    color: #1a1f2e !important;
}

/* Headings in light mode */
html.light h1,
html.sacred-light h1,
body.light h1,
body.sacred-light h1,
html.light h2,
html.sacred-light h2,
body.light h2,
body.sacred-light h2,
html.light h3,
html.sacred-light h3,
body.light h3,
body.sacred-light h3,
html.light h4,
html.sacred-light h4,
body.light h4,
body.sacred-light h4,
html.light h5,
html.sacred-light h5,
body.light h5,
body.sacred-light h5,
html.light h6,
html.sacred-light h6,
body.light h6,
body.sacred-light h6 {
    color: #0f1422 !important;
}

/* Labels and form text */
html.light label,
html.sacred-light label,
body.light label,
body.sacred-light label,
html.light .form-label,
html.sacred-light .form-label,
body.light .form-label,
body.sacred-light .form-label {
    color: #1a1f2e !important;
}

/* Placeholder text in light mode */
html.light ::placeholder,
html.sacred-light ::placeholder,
body.light ::placeholder,
body.sacred-light ::placeholder {
    color: #6b7280 !important;
    opacity: 1 !important;
}

/* Stats and metrics text */
html.light .stat-value,
html.sacred-light .stat-value,
body.light .stat-value,
body.sacred-light .stat-value,
html.light .metric-value,
html.sacred-light .metric-value,
body.light .metric-value,
body.sacred-light .metric-value {
    color: #0f1422 !important;
}

html.light .stat-label,
html.sacred-light .stat-label,
body.light .stat-label,
body.sacred-light .stat-label,
html.light .metric-label,
html.sacred-light .metric-label,
body.light .metric-label,
body.sacred-light .metric-label {
    color: #4a5568 !important;
}

/* Description and help text */
html.light .description,
html.sacred-light .description,
body.light .description,
body.sacred-light .description,
html.light .help-text,
html.sacred-light .help-text,
body.light .help-text,
body.sacred-light .help-text,
html.light .text-muted,
html.sacred-light .text-muted,
body.light .text-muted,
body.sacred-light .text-muted {
    color: #6b7280 !important;
}

/* Ensure all divs and spans have readable text by default */
html.light div:not([class*="btn"]):not([class*="badge"]):not([class*="floating-ai"]):not([class*="cmd-palette"]):not([class*="llm-"]),
html.sacred-light div:not([class*="btn"]):not([class*="badge"]):not([class*="floating-ai"]):not([class*="cmd-palette"]):not([class*="llm-"]),
body.light div:not([class*="btn"]):not([class*="badge"]):not([class*="floating-ai"]):not([class*="cmd-palette"]):not([class*="llm-"]),
body.sacred-light div:not([class*="btn"]):not([class*="badge"]):not([class*="floating-ai"]):not([class*="cmd-palette"]):not([class*="llm-"]) {
    color: #1a1f2e !important;
}

html.light span:not([class*="btn"]):not([class*="badge"]):not([class*="floating-ai"]):not([class*="cmd-palette"]):not([class*="llm-"]),
html.sacred-light span:not([class*="btn"]):not([class*="badge"]):not([class*="floating-ai"]):not([class*="cmd-palette"]):not([class*="llm-"]),
body.light span:not([class*="btn"]):not([class*="badge"]):not([class*="floating-ai"]):not([class*="cmd-palette"]):not([class*="llm-"]),
body.sacred-light span:not([class*="btn"]):not([class*="badge"]):not([class*="floating-ai"]):not([class*="cmd-palette"]):not([class*="llm-"]) {
    color: #1a1f2e !important;
}

/* ==========================================================
   FINAL NUCLEAR OVERRIDE FOR LIGHT/DAWN MODE
   Last-resort fix to ensure ALL text is dark on light backgrounds
   ========================================================== */
html.light *:not(.btn):not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.badge):not([class*="bg-"]):not(.text-white):not(.nav-link.active):not(.floating-ai *):not(.cmd-palette *),
html.sacred-light *:not(.btn):not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.badge):not([class*="bg-"]):not(.text-white):not(.nav-link.active):not(.floating-ai *):not(.cmd-palette *),
body.light *:not(.btn):not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.badge):not([class*="bg-"]):not(.text-white):not(.nav-link.active):not(.floating-ai *):not(.cmd-palette *),
body.sacred-light *:not(.btn):not(.btn-primary):not(.btn-success):not(.btn-danger):not(.btn-warning):not(.btn-info):not(.badge):not([class*="bg-"]):not(.text-white):not(.nav-link.active):not(.floating-ai *):not(.cmd-palette *) {
    color: #1a1f2e !important;
}

/* Restore white text on colored buttons in light mode */
html.light .btn-primary,
html.sacred-light .btn-primary,
body.light .btn-primary,
body.sacred-light .btn-primary,
html.light .btn-success,
html.sacred-light .btn-success,
body.light .btn-success,
body.sacred-light .btn-success,
html.light .btn-danger,
html.sacred-light .btn-danger,
body.light .btn-danger,
body.sacred-light .btn-danger,
html.light .btn-warning,
html.sacred-light .btn-warning,
body.light .btn-warning,
body.sacred-light .btn-warning,
html.light .btn-info,
html.sacred-light .btn-info,
body.light .btn-info,
body.sacred-light .btn-info {
    color: #ffffff !important;
}

/* Restore badge text colors */
html.light .badge,
html.sacred-light .badge,
body.light .badge,
body.sacred-light .badge {
    color: #ffffff !important;
}

/* Restore floating AI panel text (dark theme inside) */
html.light .floating-ai,
html.sacred-light .floating-ai,
body.light .floating-ai,
body.sacred-light .floating-ai,
html.light .floating-ai *,
html.sacred-light .floating-ai *,
body.light .floating-ai *,
body.sacred-light .floating-ai * {
    color: #e4e8f0 !important;
}

/* Restore command palette text (dark theme inside) */
html.light .cmd-palette,
html.sacred-light .cmd-palette,
body.light .cmd-palette,
body.sacred-light .cmd-palette,
html.light .cmd-palette *,
html.sacred-light .cmd-palette *,
body.light .cmd-palette *,
body.sacred-light .cmd-palette * {
    color: #e4e8f0 !important;
}

/* ==========================================================
   Custom Button/Action Components - Keep white text on primary bg
   ========================================================== */
html.light .summary-action,
html.sacred-light .summary-action,
body.light .summary-action,
body.sacred-light .summary-action,
html.light .btn-upload-doc,
html.sacred-light .btn-upload-doc,
body.light .btn-upload-doc,
body.sacred-light .btn-upload-doc,
html.light .btn-add-metric,
html.sacred-light .btn-add-metric,
body.light .btn-add-metric,
body.sacred-light .btn-add-metric,
html.light .btn-submit,
html.sacred-light .btn-submit,
body.light .btn-submit,
body.sacred-light .btn-submit,
html.light [class*="btn-primary"],
html.sacred-light [class*="btn-primary"],
body.light [class*="btn-primary"],
body.sacred-light [class*="btn-primary"] {
    color: #ffffff !important;
}

/* ==========================================================
   Dashboard Specific Overrides for CSS Variable Fallbacks
   These target elements that use var(--*, #fff) with white fallbacks
   ========================================================== */

/* Dashboard urgent text and strong text */
html.light .urgent-text strong,
html.sacred-light .urgent-text strong,
body.light .urgent-text strong,
body.sacred-light .urgent-text strong {
    color: #0f1422 !important;
}

/* Dashboard controls - select boxes, year picker */
html.light .dash-year,
html.sacred-light .dash-year,
body.light .dash-year,
body.sacred-light .dash-year,
html.light .dash-view,
html.sacred-light .dash-view,
body.light .dash-view,
body.sacred-light .dash-view {
    color: #1a1f2e !important;
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

/* Ghost buttons throughout the app */
html.light .btn.ghost,
html.sacred-light .btn.ghost,
body.light .btn.ghost,
body.sacred-light .btn.ghost,
html.light .hero-cta.ghost,
html.sacred-light .hero-cta.ghost,
body.light .hero-cta.ghost,
body.sacred-light .hero-cta.ghost,
html.light .return-btn.ghost,
html.sacred-light .return-btn.ghost,
body.light .return-btn.ghost,
body.sacred-light .return-btn.ghost {
    color: #1a1f2e !important;
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

html.light .btn.ghost:hover,
html.sacred-light .btn.ghost:hover,
body.light .btn.ghost:hover,
body.sacred-light .btn.ghost:hover,
html.light .hero-cta.ghost:hover,
html.sacred-light .hero-cta.ghost:hover,
body.light .hero-cta.ghost:hover,
body.sacred-light .hero-cta.ghost:hover,
html.light .return-btn.ghost:hover,
html.sacred-light .return-btn.ghost:hover,
body.light .return-btn.ghost:hover,
body.sacred-light .return-btn.ghost:hover {
    color: #0f1422 !important;
    background: rgba(0, 0, 0, 0.1) !important;
}

/* Suggestion chips */
html.light .suggestion-chip,
html.sacred-light .suggestion-chip,
body.light .suggestion-chip,
body.sacred-light .suggestion-chip {
    color: #1a1f2e !important;
    background: rgba(0, 0, 0, 0.05) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

/* DeductionOptimizer and FinancialReports selects */
html.light .entity-filter,
html.sacred-light .entity-filter,
body.light .entity-filter,
body.sacred-light .entity-filter,
html.light .report-filter,
html.sacred-light .report-filter,
body.light .report-filter,
body.sacred-light .report-filter,
html.light .opt-container select,
html.sacred-light .opt-container select,
body.light .opt-container select,
body.sacred-light .opt-container select,
html.light .reports select,
html.sacred-light .reports select,
body.light .reports select,
body.sacred-light .reports select {
    color: #1a1f2e !important;
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

/* View selects - PFS and other pages */
html.light .view-select,
html.sacred-light .view-select,
body.light .view-select,
body.sacred-light .view-select {
    color: #1a1f2e !important;
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

/* Component-specific buttons that need white text on colored backgrounds */
html.light .ctx-btn.primary,
html.sacred-light .ctx-btn.primary,
body.light .ctx-btn.primary,
body.sacred-light .ctx-btn.primary,
html.light .ctx-trigger,
html.sacred-light .ctx-trigger,
body.light .ctx-trigger,
body.sacred-light .ctx-trigger,
html.light .onboard-next,
html.sacred-light .onboard-next,
body.light .onboard-next,
body.sacred-light .onboard-next,
html.light .step-btn.primary,
html.sacred-light .step-btn.primary,
body.light .step-btn.primary,
body.sacred-light .step-btn.primary,
html.light .wizard-action.primary,
html.sacred-light .wizard-action.primary,
body.light .wizard-action.primary,
body.sacred-light .wizard-action.primary,
html.light .check-action.primary,
html.sacred-light .check-action.primary,
body.light .check-action.primary,
body.sacred-light .check-action.primary {
    color: #ffffff !important;
}

/* LlmWorkspace ghost buttons and prompt labels */
html.light .ws-actions .btn.ghost,
html.sacred-light .ws-actions .btn.ghost,
body.light .ws-actions .btn.ghost,
body.sacred-light .ws-actions .btn.ghost {
    color: #1a1f2e !important;
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

html.light .prompt-label,
html.sacred-light .prompt-label,
body.light .prompt-label,
body.sacred-light .prompt-label {
    color: #1a1f2e !important;
}

/* SmartUpload elements */
html.light .upload-progress,
html.sacred-light .upload-progress,
body.light .upload-progress,
body.sacred-light .upload-progress,
html.light .upload-status,
html.sacred-light .upload-status,
body.light .upload-status,
body.sacred-light .upload-status {
    color: #1a1f2e !important;
}

/* TaxFilingWizard elements */
html.light .wizard-step-title,
html.sacred-light .wizard-step-title,
body.light .wizard-step-title,
body.sacred-light .wizard-step-title,
html.light .wizard-content,
html.sacred-light .wizard-content,
body.light .wizard-content,
body.sacred-light .wizard-content {
    color: #1a1f2e !important;
}

/* General ghost buttons */
html.light .btn.ghost,
html.sacred-light .btn.ghost,
body.light .btn.ghost,
body.sacred-light .btn.ghost {
    color: #1a1f2e !important;
    background: rgba(0, 0, 0, 0.04) !important;
    border-color: rgba(0, 0, 0, 0.12) !important;
}

/* Ensure all span, div, p elements default to dark text in light mode */
html.light .sacred-body span:not(.badge):not([class*="btn"]),
html.sacred-light .sacred-body span:not(.badge):not([class*="btn"]),
body.light .sacred-body span:not(.badge):not([class*="btn"]),
body.sacred-light .sacred-body span:not(.badge):not([class*="btn"]),
html.light .sacred-body div:not(.badge):not([class*="btn"]),
html.sacred-light .sacred-body div:not(.badge):not([class*="btn"]),
body.light .sacred-body div:not(.badge):not([class*="btn"]),
body.sacred-light .sacred-body div:not(.badge):not([class*="btn"]),
html.light .sacred-body p,
html.sacred-light .sacred-body p,
body.light .sacred-body p,
body.sacred-light .sacred-body p {
    color: #1a1f2e;
}
