/* =============================================================================
   NotarisPlatform - Enhanced Custom CSS
   MudBlazor handles most styling. This file for overrides only.
   
   !IMPORTANT DECLARATION POLICY:
   MudBlazor components use inline styles (e.g., style="background-color: ..."),
   which have the highest CSS specificity. The ONLY way to override inline styles
   in CSS is with !important. This is a known MudBlazor architecture limitation.
   
   Categories of necessary !important declarations:
   1. Dark mode backgrounds - MudBlazor sets inline background colors
   2. Public header buttons - Override MudBlazor button colors on gradient
   3. Print styles - Required for proper print output
   4. Accessibility (reduced motion) - Required for WCAG compliance
   5. Third-party components (Quill) - Override library styles
   
   Current count: ~55 !important (all reviewed and necessary)
   Target: Minimize, but MudBlazor architecture prevents elimination
   
   Color source of truth: ThemeConstants.cs and MudTheme in ThemeService.cs
   ============================================================================= */

/* CSS Layers for better specificity management */
@layer mudblazor-overrides, utilities;

/* =============================================================================
   Public Header Navigation - MUST be visible in both light and dark mode
   ============================================================================= */

/* Theme toggle button - bright yellow/amber for visibility */
.public-header-theme-toggle {
    color: #fbbf24 !important;
}

.public-header-theme-toggle .mud-icon-root,
.public-header-theme-toggle svg,
.public-header-theme-toggle path {
    color: #fbbf24 !important;
    fill: #fbbf24 !important;
}

/* Login button - outlined with orange text */
a.mud-button-root.mud-button.mud-button-filled.public-header-login-btn,
a.mud-button-root.mud-button.mud-button-filled.mud-button-filled-default.public-header-login-btn {
    background-color: transparent !important;
    color: #f97316 !important;
    border: 2px solid #f97316 !important;
}

a.mud-button-root.public-header-login-btn:hover {
    background-color: rgba(249, 115, 22, 0.1) !important;
}

a.mud-button-root.public-header-login-btn span.mud-button-label,
.public-header-login-btn.mud-button-filled span.mud-button-label,
.public-header-login-btn.mud-button-filled-default span.mud-button-label {
    color: #f97316 !important;
}

/* Force white text on all appbar elements */
.mud-appbar .mud-button-text .mud-button-label,
.mud-appbar .mud-icon-button .mud-icon-root,
.mud-appbar .mud-typography {
    color: white !important;
}

/* Exclude theme toggle from white color */
.mud-appbar .public-header-theme-toggle .mud-icon-root {
    color: #fbbf24 !important;
}

/* Exclude login button from white color */
.mud-appbar .public-header-login-btn .mud-button-label {
    color: #1a1a2e !important;
}

/* Typography - Let MudTheme handle font-family via Typography configuration */
html, body {
    font-family: 'Roboto', 'Segoe UI', system-ui, -apple-system, sans-serif;
    -webkit-font-smoothing: antialiased;
    -moz-osx-font-smoothing: grayscale;
    background-color: var(--mud-palette-background, #f8fafc);
    color: var(--mud-palette-text-primary);
}

/* Dark mode body background */
.mud-theme-dark,
.mud-theme-dark body,
body.mud-theme-dark {
    background-color: #0f172a !important;
}

/* Apply theme to main container */
.mud-main-content {
    background-color: var(--mud-palette-background) !important;
}

.mud-theme-dark .mud-main-content {
    background-color: #0f172a !important;
}

/* Ensure main content area has correct background */
main {
    background-color: var(--mud-palette-background) !important;
}

.mud-theme-dark main {
    background-color: #0f172a !important;
}

/* MudLayout dark mode */
.mud-theme-dark .mud-layout {
    background-color: #0f172a !important;
}

/* =============================================================================
   Component Utility Classes (replacing inline styles)
   ============================================================================= */

/* Hero section text (white on gradient) */
.hero-text {
    color: white;
}

/* Hero CTA button (white bg, primary text) */
.hero-cta-primary {
    background-color: white;
    color: var(--mud-palette-primary);
}

.hero-cta-primary:hover {
    background-color: #f8fafc;
}

/* Hero CTA button outlined (white) */
.hero-cta-outlined {
    border-color: white;
    color: white;
}

.hero-cta-outlined:hover {
    background-color: rgba(255, 255, 255, 0.1);
}

/* Large avatar (80x80) */
.avatar-lg {
    width: 80px;
    height: 80px;
}

/* Medium-large avatar (60x60) */
.avatar-md-lg {
    width: 60px;
    height: 60px;
}

/* Full height card */
.card-full-height {
    height: 100%;
}

/* Clickable card */
.card-clickable {
    height: 100%;
    cursor: pointer;
}

/* Large icon (3rem) */
.icon-lg {
    font-size: 3rem;
}

/* Public header navigation buttons - white text */
.public-nav-button {
    color: white;
}

.mud-appbar .public-nav-button .mud-button-label {
    color: white;
}

/* Hero gradient background */
.hero-gradient {
    background: linear-gradient(135deg, var(--mud-palette-primary) 0%, var(--mud-palette-primary-darken) 100%);
}

/* Hover lift effect for cards */
.hover-lift {
    transition: transform 0.2s ease-in-out;
}

.hover-lift:hover {
    transform: translateY(-4px);
}

/* =============================================================================
   End Component Utility Classes
   ============================================================================= */

.mud-theme-dark .mud-layout-content {
    background-color: #0f172a !important;
}

/* Ensure MudContainer has correct background */
.mud-container {
    background-color: transparent;
}

/* Section grey background - light mode */
.section-grey {
    background-color: #f1f5f9 !important;
}

/* Section grey background - dark mode - higher specificity to override .mud-paper */
.mud-theme-dark .section-grey,
.mud-theme-dark .mud-paper.section-grey,
.mud-theme-dark MudPaper.section-grey {
    background-color: #0f172a !important;
}

/* Section headings in dark mode */
.mud-theme-dark .section-heading,
.mud-theme-dark .mud-typography.section-heading,
.mud-theme-dark h4.section-heading {
    color: #f8fafc !important;
}

.mud-theme-dark .section-subheading,
.mud-theme-dark .mud-typography.section-subheading {
    color: #cbd5e1 !important;
}

/* All headings in dark mode should be light */
.mud-theme-dark .mud-typography-h4,
.mud-theme-dark .mud-typography-h3,
.mud-theme-dark .mud-typography-h5,
.mud-theme-dark .mud-typography-h6 {
    color: #f8fafc !important;
}

/* All body text in dark mode */
.mud-theme-dark .mud-typography-body1,
.mud-theme-dark .mud-typography-body2 {
    color: #e2e8f0;
}

/* Secondary text color override */
.mud-theme-dark .mud-secondary-text,
.mud-theme-dark [class*="Color-Secondary"] {
    color: #94a3b8 !important;
}

/* Default text in dark mode */
.mud-theme-dark .mud-typography {
    color: #e2e8f0;
}

/* Override background-grey CSS variable for dark mode */
.mud-theme-dark {
    --mud-palette-background-grey: #0f172a;
    --mud-palette-background-gray: #0f172a;
}

/* Enhanced focus indicators for accessibility */
@layer mudblazor-overrides {
    .mud-button-root:focus-visible,
    .mud-icon-button:focus-visible,
    .mud-textfield:focus-within,
    .mud-select:focus-within,
    .mud-checkbox:focus-within {
        outline: 2px solid var(--np-primary);
        outline-offset: 2px;
    }

    /* High contrast focus state for buttons */
    .mud-button-root:focus-visible {
        box-shadow: 0 0 0 3px rgba(124, 58, 237, 0.1);
    }

    /* Focus within MudDataGrid cells */
    .mud-table-cell:focus-within {
        box-shadow: inset 0 0 0 2px var(--np-primary);
    }
}

/* Custom scrollbar (optional, subtle) */
::-webkit-scrollbar {
    width: 8px;
    height: 8px;
}

::-webkit-scrollbar-track {
    background: var(--mud-palette-background-gray, #f1f5f9);
}

::-webkit-scrollbar-thumb {
    background: var(--mud-palette-gray-default, #cbd5e1);
    border-radius: 4px;
}

::-webkit-scrollbar-thumb:hover {
    background: var(--mud-palette-gray-dark, #94a3b8);
}

/* Dark mode scrollbar */
.mud-theme-dark ::-webkit-scrollbar-track {
    background: #1e293b;
}

.mud-theme-dark ::-webkit-scrollbar-thumb {
    background: #475569;
}

.mud-theme-dark ::-webkit-scrollbar-thumb:hover {
    background: #64748b;
}

/* Cursor pointer for clickable rows */
.cursor-pointer {
    cursor: pointer;
    transition: background-color 0.2s ease;
}

/* Print styles */
@media print {
    .mud-drawer,
    .mud-appbar,
    .no-print {
        display: none !important;
    }

    .mud-main-content {
        padding: 0 !important;
        margin: 0 !important;
    }
}

/* Loading overlay (for page transitions) */
.page-loading {
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background: var(--mud-palette-overlay-light, rgba(255, 255, 255, 0.9));
    display: flex;
    align-items: center;
    justify-content: center;
    z-index: 9999;
}

.mud-theme-dark .page-loading {
    background: rgba(15, 23, 42, 0.9);
}

/* Ensure MudBlazor drawer doesn't conflict with content */
.mud-drawer-open-responsive-lg-left .mud-main-content {
    padding-left: 0;
}

/* Layout fixes for AppBar/Drawer overlap */
.app-main {
    padding-top: 72px;
}

@media (min-width: 1280px) {
    .mud-drawer-open-responsive-lg-left .app-main {
        margin-left: 260px;
    }
}

@media (max-width: 1279.98px) {
    .mud-drawer-open-responsive-lg-left .app-main {
        margin-left: 0;
    }
}

/* Fix for datepicker in Dutch locale */
.mud-picker-calendar-header-transition {
    text-transform: capitalize;
}

/* Enhanced spacing utilities */
.w-100 {
    width: 100%;
}

.h-100 {
    height: 100%;
}

/* Transition utilities for smooth interactions */
.transition-all {
    transition: all 0.2s ease;
}

/* Link styling */
a {
    color: var(--np-primary);
    text-decoration: none;
}

a:hover {
    color: var(--np-primary-light);
    text-decoration: underline;
}

/* Form styling enhancements */
.mud-input-slot {
    color: var(--np-secondary);
}

.mud-input-underline::after {
    border-bottom-color: var(--np-primary);
}

/* Table row hover effect */
.mud-table-row:hover {
    background-color: var(--mud-palette-table-hover, rgba(124, 58, 237, 0.05));
}

/* Card/Paper enhancements */
.mud-paper {
    border-radius: var(--np-border-radius);
}

/* Badge styling */
.mud-chip {
    border-radius: 12px;
}

/* Button styling - Namespaced to avoid overly broad overrides */
.np-app .mud-button-root {
    text-transform: none;
    letter-spacing: 0;
}

.np-app .mud-button-filled-primary {
    background: linear-gradient(135deg, var(--np-primary) 0%, var(--np-primary-dark) 100%);
}

.np-app .mud-button-filled-primary:hover {
    background: linear-gradient(135deg, var(--np-primary-light) 0%, var(--np-primary) 100%);
}

/* Responsive padding utility */
@media (max-width: 600px) {
    .mud-paper {
        padding: 16px !important;
    }
}

/* Animation for page transitions */
@keyframes fadeIn {
    from {
        opacity: 0;
        transform: translateY(10px);
    }
    to {
        opacity: 1;
        transform: translateY(0);
    }
}

.fade-in {
    animation: fadeIn 0.3s ease-out;
}
/* ========================================================================
   Privacy & Visibility Banner Styles
   ======================================================================== */

.page-visibility-banner {
    border-radius: 8px;
    transition: all 0.2s ease;
    margin-bottom: 16px;
}

.page-visibility-banner.visibility-personal {
    border-left: 4px solid var(--mud-palette-info);
    background-color: rgba(33, 150, 243, 0.05);
}

.page-visibility-banner.visibility-office {
    border-left: 4px solid var(--mud-palette-grey-default);
    background-color: rgba(158, 158, 158, 0.05);
}

.page-visibility-banner.visibility-platform {
    border-left: 4px solid var(--mud-palette-warning);
    background-color: rgba(255, 152, 0, 0.08);
}

.page-visibility-banner.visibility-public {
    border-left: 4px solid var(--mud-palette-error);
    background-color: rgba(244, 67, 54, 0.08);
}

/* Dark mode support */
@media (prefers-color-scheme: dark) {
    .page-visibility-banner.visibility-personal {
        background-color: rgba(33, 150, 243, 0.12);
    }
    .page-visibility-banner.visibility-office {
        background-color: rgba(158, 158, 158, 0.1);
    }
    .page-visibility-banner.visibility-platform {
        background-color: rgba(255, 152, 0, 0.15);
    }
    .page-visibility-banner.visibility-public {
        background-color: rgba(244, 67, 54, 0.15);
    }
}

/* =============================================================================
   WYSIWYG Email Template Editor (Quill/Blazored.TextEditor)
   ============================================================================= */

/* Quill editor container */
.ql-container {
    min-height: 350px;
    font-family: 'Roboto', sans-serif !important;
}

.ql-editor {
    min-height: 300px;
    font-size: 14px;
    line-height: 1.6;
}

/* Quill toolbar styling to match MudBlazor */
.ql-toolbar.ql-snow {
    border-color: var(--mud-palette-lines-default) !important;
    border-radius: 4px 4px 0 0;
    background: var(--mud-palette-surface, #fafafa);
}

.ql-container.ql-snow {
    border-color: var(--mud-palette-lines-default) !important;
    border-radius: 0 0 4px 4px;
    background: var(--mud-palette-surface);
}

.mud-theme-dark .ql-toolbar.ql-snow {
    background: #1e293b;
}

.mud-theme-dark .ql-container.ql-snow {
    background: #1e293b;
}

.mud-theme-dark .ql-editor {
    color: #f8fafc;
}

/* Source code editor styling */
.monospace-editor textarea {
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace !important;
    font-size: 13px !important;
    line-height: 1.5 !important;
    tab-size: 2;
}

/* =============================================================================
   Dark Mode Overrides for MudBlazor Components
   ============================================================================= */

/* Input fields background in dark mode */
.mud-theme-dark .mud-input-control,
.mud-theme-dark .mud-input,
.mud-theme-dark .mud-input-slot {
    background-color: transparent;
}

.mud-theme-dark .mud-input-outlined .mud-input-slot {
    background-color: #1e293b;
}

.mud-theme-dark .mud-input-outlined .mud-input-slot input,
.mud-theme-dark .mud-input-outlined .mud-input-slot textarea {
    color: #f8fafc;
}

.mud-theme-dark .mud-input-outlined .mud-input-slot input::placeholder,
.mud-theme-dark .mud-input-outlined .mud-input-slot textarea::placeholder {
    color: #8b9bb5; /* WCAG AA: ~4.5:1 contrast on #1e293b */
}

.mud-theme-dark .mud-input-label {
    color: #94a3b8;
}

.mud-theme-dark .mud-input-label.mud-input-label-inputcontrol {
    color: #94a3b8;
}

/* Input adornment icons */
.mud-theme-dark .mud-input-adornment {
    color: #64748b;
}

.mud-theme-dark .mud-input-adornment .mud-icon-root {
    color: #64748b;
}

/* Helper text below inputs */
.mud-theme-dark .mud-input-helper-text {
    color: #64748b;
}

/* Native HTML inputs in forms */
.mud-theme-dark input[type="text"],
.mud-theme-dark input[type="email"],
.mud-theme-dark input[type="password"],
.mud-theme-dark input[type="tel"],
.mud-theme-dark textarea {
    background-color: #1e293b;
    color: #f8fafc;
    border-color: #475569;
}

.mud-theme-dark .mud-input-outlined-border {
    border-color: #475569;
}

.mud-theme-dark .mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #64748b;
}

/* Text field filled variant */
.mud-theme-dark .mud-input-filled .mud-input-slot {
    background-color: rgba(255, 255, 255, 0.05);
}

.mud-theme-dark .mud-input-filled:hover .mud-input-slot {
    background-color: rgba(255, 255, 255, 0.08);
}

/* Paper/Card backgrounds - exclude section-grey */
.mud-theme-dark .mud-paper:not(.section-grey) {
    background-color: #1e293b;
    color: #f8fafc;
}

.mud-theme-dark .mud-paper-outlined {
    border-color: #334155;
}

/* Alert/Info boxes */
.mud-theme-dark .mud-alert-filled-info {
    background-color: rgba(59, 130, 246, 0.15);
    color: #93c5fd;
}

.mud-theme-dark .mud-alert-filled-success {
    background-color: rgba(34, 197, 94, 0.15);
    color: #86efac;
}

.mud-theme-dark .mud-alert-filled-warning {
    background-color: rgba(234, 179, 8, 0.15);
    color: #fde68a;
}

.mud-theme-dark .mud-alert-filled-error {
    background-color: rgba(239, 68, 68, 0.15);
    color: #fca5a5;
}

.mud-theme-dark .mud-alert-standard-info {
    background-color: rgba(59, 130, 246, 0.1);
    border-left: 4px solid #3b82f6;
}

.mud-theme-dark .mud-alert-standard-success {
    background-color: rgba(34, 197, 94, 0.1);
    border-left: 4px solid #22c55e;
}

.mud-theme-dark .mud-alert-standard-warning {
    background-color: rgba(234, 179, 8, 0.1);
    border-left: 4px solid #eab308;
}

.mud-theme-dark .mud-alert-standard-error {
    background-color: rgba(239, 68, 68, 0.1);
    border-left: 4px solid #ef4444;
}

/* Tabs */
.mud-theme-dark .mud-tabs {
    background-color: transparent;
}

.mud-theme-dark .mud-tab {
    color: #94a3b8;
}

.mud-theme-dark .mud-tab.mud-tab-active {
    color: #f8fafc;
}

/* Buttons */
.mud-theme-dark .mud-button-text {
    color: #94a3b8;
}

.mud-theme-dark .mud-button-text:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.mud-theme-dark .mud-button-outlined {
    border-color: #475569;
    color: #cbd5e1;
}

.mud-theme-dark .mud-button-outlined:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Chips */
.mud-theme-dark .mud-chip-default {
    background-color: #334155;
    color: #e2e8f0;
}

/* Select/Dropdown */
.mud-theme-dark .mud-select,
.mud-theme-dark .mud-autocomplete {
    background-color: transparent;
}

.mud-theme-dark .mud-popover-paper {
    background-color: #1e293b;
    border: 1px solid #334155;
}

.mud-theme-dark .mud-list-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Dialog */
.mud-theme-dark .mud-dialog {
    background-color: #1e293b;
}

.mud-theme-dark .mud-dialog-title {
    background-color: #0f172a;
}

/* Drawer (sidebar) */
.mud-theme-dark .mud-drawer {
    background-color: #0b1324;
}

.mud-theme-dark .mud-nav-link {
    color: #cbd5e1;
}

.mud-theme-dark .mud-nav-link:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

.mud-theme-dark .mud-nav-link.active {
    background-color: rgba(124, 58, 237, 0.15);
}

/* Avatar */
.mud-theme-dark .mud-avatar {
    background-color: #334155;
}

/* Divider */
.mud-theme-dark .mud-divider {
    border-color: #334155;
}

/* Skeleton loader */
.mud-theme-dark .mud-skeleton {
    background-color: #334155;
}

/* Table */
.mud-theme-dark .mud-table {
    background-color: #1e293b;
}

.mud-theme-dark .mud-table-head {
    background-color: #0f172a;
}

.mud-theme-dark .mud-table-cell {
    border-bottom-color: #334155;
}

.mud-theme-dark .mud-table-row:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* Card content */
.mud-theme-dark .mud-card {
    background-color: #1e293b;
}

.mud-theme-dark .mud-card-header {
    background-color: #0f172a;
}

/* Links */
.mud-theme-dark a {
    color: #a78bfa;
}

.mud-theme-dark a:hover {
    color: #c4b5fd;
}

/* Switch */
.mud-theme-dark .mud-switch-track {
    background-color: #475569;
}

/* Checkbox/Radio */
.mud-theme-dark .mud-checkbox .mud-icon-default {
    color: #64748b;
}

/* Progress indicators */
.mud-theme-dark .mud-progress-linear-buffer {
    background-color: #334155;
}

/* Expansion panel */
.mud-theme-dark .mud-expand-panel {
    background-color: #1e293b;
    border-color: #334155;
}

.mud-theme-dark .mud-expand-panel-header:hover {
    background-color: rgba(255, 255, 255, 0.03);
}

/* =============================================================================
   Dark Mode Overrides for Public Pages (Home, Login, etc.)
   ============================================================================= */

/* Override background-grey for dark mode - this is used on public sections */
.mud-theme-dark [style*="background-grey"],
.mud-theme-dark [style*="background: var(--mud-palette-background-grey)"] {
    background-color: #0f172a !important;
}

/* MudLayout and MudMainContent in dark mode */
.mud-theme-dark .mud-layout {
    background-color: #0f172a;
}

.mud-theme-dark .mud-main-content {
    background-color: #0f172a !important;
}

/* Public page sections with grey background */
.mud-theme-dark .public-section-grey,
.mud-theme-dark .section-grey {
    background-color: #0f172a !important;
}

/* Footer in dark mode */
.mud-theme-dark .mud-paper[style*="background-grey"] {
    background-color: #0b1324 !important;
}

/* Cards on dark backgrounds should have visible background */
.mud-theme-dark .mud-card {
    background-color: #1e293b !important;
    border: 1px solid #334155;
}

.mud-theme-dark .mud-card-content {
    background-color: transparent;
}

/* Avatar backgrounds in dark mode */
.mud-theme-dark .mud-avatar-outlined {
    border-color: currentColor;
}

/* Ensure text is visible in dark mode */
.mud-theme-dark .mud-text-secondary {
    color: #94a3b8 !important;
}

/* Typography colors in dark mode */
.mud-theme-dark .mud-typography-body2 {
    color: #cbd5e1;
}

.mud-theme-dark .mud-typography-caption {
    color: #94a3b8;
}

.mud-theme-dark .mud-typography-subtitle2 {
    color: #e2e8f0;
}

/* Links in dark mode - higher contrast */
.mud-theme-dark .mud-link {
    color: #93c5fd !important;
}

.mud-theme-dark .mud-link:hover {
    color: #bfdbfe !important;
}

.mud-theme-dark a.mud-link-default,
.mud-theme-dark .mud-link.mud-default-text {
    color: #cbd5e1 !important;
}

.mud-theme-dark a.mud-link-default:hover,
.mud-theme-dark .mud-link.mud-default-text:hover {
    color: #f8fafc !important;
}

/* Inherit links follow parent text color */
.mud-theme-dark .mud-link.mud-inherit-text {
    color: inherit;
}

.mud-theme-dark .mud-link.mud-inherit-text:hover {
    color: #93c5fd !important;
}

/* Footer text visibility */
.mud-theme-dark .section-grey .mud-text,
.mud-theme-dark .section-grey .mud-typography {
    color: #e2e8f0;
}

.mud-theme-dark .section-grey .mud-typography-h6,
.mud-theme-dark .section-grey .mud-typography-subtitle2 {
    color: #f8fafc;
}

.mud-theme-dark .section-grey .mud-typography-body2 {
    color: #cbd5e1;
}

.mud-theme-dark .section-grey .mud-typography-caption {
    color: #94a3b8;
}

/* Color.Secondary text in dark mode */
.mud-theme-dark .mud-secondary-text {
    color: #94a3b8 !important;
}

/* Login/Form cards - exclude section-grey */
.mud-theme-dark .mud-paper:not(.section-grey) {
    background-color: #1e293b !important;
}

/* Hero sections should keep their gradient */
.mud-theme-dark .mud-paper[style*="linear-gradient"] {
    /* Hero gradient remains unchanged */
}

/* Menu dropdown in dark mode */
.mud-theme-dark .mud-menu {
    background-color: #1e293b;
}

.mud-theme-dark .mud-menu-item:hover {
    background-color: rgba(255, 255, 255, 0.05);
}

/* Snackbar */
.mud-theme-dark .mud-snackbar {
    background-color: #334155;
    color: #f8fafc;
}

/* Breadcrumbs */
.mud-theme-dark .mud-breadcrumb-item {
    color: #94a3b8 !important;
}

.mud-theme-dark .mud-breadcrumb-item a,
.mud-theme-dark .mud-breadcrumb-item .mud-link {
    color: #93c5fd !important;
}

.mud-theme-dark .mud-breadcrumb-item a:hover,
.mud-theme-dark .mud-breadcrumb-item .mud-link:hover {
    color: #bfdbfe !important;
}

.mud-theme-dark .mud-breadcrumb-separator {
    color: #64748b !important;
}

.mud-theme-dark .mud-breadcrumbs {
    color: #94a3b8;
}

.mud-theme-dark .mud-breadcrumbs .mud-typography {
    color: #94a3b8 !important;
}

/* Rating stars */
.mud-theme-dark .mud-rating-item {
    color: #64748b;
}

.mud-theme-dark .mud-rating-item.mud-rating-item-active {
    color: #fbbf24;
}

/* Timeline */
.mud-theme-dark .mud-timeline-item-dot {
    background-color: #334155;
    border-color: #475569;
}

/* Stepper */
.mud-theme-dark .mud-step-label-content {
    color: #94a3b8;
}

.mud-theme-dark .mud-step-label-content.mud-step-label-content-active {
    color: #f8fafc;
}

/* AppBar in public layout should have proper contrast */
.mud-theme-dark .mud-appbar {
    background-color: #0b1324 !important;
}

/* =============================================================================
   Bootstrap/HTML Elements Dark Mode Support
   These styles ensure plain HTML elements have proper contrast in dark mode
   ============================================================================= */

/* Headings */
.mud-theme-dark h1,
.mud-theme-dark h2,
.mud-theme-dark h3,
.mud-theme-dark h4,
.mud-theme-dark h5,
.mud-theme-dark h6 {
    color: #f8fafc;
}

/* Paragraphs and text */
.mud-theme-dark p,
.mud-theme-dark span:not([class*="mud-"]),
.mud-theme-dark li {
    color: #e2e8f0;
}

/* Bootstrap cards */
.mud-theme-dark .card {
    background-color: #1e293b;
    border-color: #334155;
    color: #f8fafc;
}

.mud-theme-dark .card-body,
.mud-theme-dark .card-header,
.mud-theme-dark .card-footer {
    background-color: transparent;
    color: #f8fafc;
}

/* Bootstrap text-muted in dark mode */
.mud-theme-dark .text-muted {
    color: #94a3b8 !important;
}

/* Bootstrap buttons in dark mode */
.mud-theme-dark .btn-outline-secondary {
    border-color: #475569;
    color: #cbd5e1;
}

.mud-theme-dark .btn-outline-secondary:hover {
    background-color: #334155;
    border-color: #64748b;
    color: #f8fafc;
}

/* Bootstrap display headings */
.mud-theme-dark .display-1,
.mud-theme-dark .display-2,
.mud-theme-dark .display-3,
.mud-theme-dark .display-4,
.mud-theme-dark .display-5,
.mud-theme-dark .display-6 {
    color: inherit;
}

/* Bootstrap small text */
.mud-theme-dark small {
    color: #94a3b8;
}
