:root {
    /* Application Theme */
    --mud-typography-default-family: "Hanken Grotesk", system-ui, -apple-system, "Segoe UI", sans-serif, "Apple Color Emoji", "Segoe UI Emoji";
    --mud-typography-default-size: 0.95rem;
    --mud-typography-default-weight: 400;

    /* Navy-led palette — must mirror ThemeDefinitions.PaletteLight to prevent token drift. */
    --mud-palette-background: #F4F7FB;
    --mud-palette-background-gray: #F1F4F9;
    --mud-palette-surface: #ffffff;

    --mud-palette-primary: #2B5CE6;
    --mud-palette-secondary: #1B4FB0;
    --mud-palette-tertiary: #0E9F8E;
    /* teal signal accent */
    --mud-palette-info: #2563EB;
    --mud-palette-success: #15803D;
    --mud-palette-warning: #D97706;
    --mud-palette-error: #C0392B;

    --mud-palette-error-text: #7f1d1d;
    --mud-palette-error-contrast-text: #ffffff;
    --mud-palette-error-contrast: #ffffff;

    --mud-palette-text-primary: #0F1B33;
    --mud-palette-text-secondary: #51607A;
    --mud-palette-text-disabled: rgba(15, 27, 51, 0.38);

    --mud-palette-lines-default: #E3E8F0;
    --mud-palette-lines-inputs: #E3E8F0;
    --mud-palette-table-lines: #E3E8F0;
    --mud-palette-divider: #E3E8F0;

    --mud-default-borderradius: 10px;
    /* rounder */
    --mud-default-transition: all 0.18s cubic-bezier(0.4, 0, 0.2, 1);
    --dfm-radius-xs: 6px;
    --dfm-radius-sm: 10px;
    --dfm-radius-md: 14px;
    --dfm-radius-lg: 16px;
    --dfm-elevation-sm: 0 1px 2px rgba(15, 27, 51, 0.06), 0 1px 3px rgba(15, 27, 51, 0.08);
    --dfm-elevation-md: 0 10px 24px rgba(15, 27, 51, 0.10);
    --dfm-elevation-lg: 0 18px 44px rgba(15, 27, 51, 0.14);

    /* Credit Bureau Colors */
    --bureau-equifax-color: #ef4444;
    /* red-500 */
    --bureau-experian-color: #2196F3;
    /* blue-500 */
    --bureau-transunion-color: #06b6d4;
    /* cyan-500 */
}

.mono-num {
    font-family: "IBM Plex Mono", monospace;
    font-variant-numeric: tabular-nums;
}

.shared-data-table-wrapper td[data-label="Amount"],
.shared-data-table-wrapper td[data-label="Balance"],
.shared-data-table-wrapper td[data-label="Credit Limit"],
.shared-data-table-wrapper td[data-label="High Balance"],
.shared-data-table-wrapper td[data-label="Limit"],
.shared-data-table-wrapper td[data-label="Monthly Payment"],
.shared-data-table-wrapper td[data-label="Payment"],
.shared-data-table-wrapper td[data-label="Past Due"],
.shared-data-table-wrapper td[data-label="Score"],
.shared-data-table-wrapper td[data-label="Utilization"],
.credit-score-header .mud-typography-h4,
.credit-score-header .mud-typography-h5,
.score-comparison .mud-typography-h5 {
    font-family: "IBM Plex Mono", monospace;
    font-variant-numeric: tabular-nums;
}

.mud-snackbar-content-error,
.mud-snackbar-content.mud-snackbar-content-error,
.mud-snackbar.mud-snackbar-error,
.mud-snackbar-error {
    background-color: var(--mud-palette-error) !important;
    color: var(--mud-palette-error-contrast-text) !important;
}

.mud-snackbar-content-error *,
.mud-snackbar-content.mud-snackbar-content-error * {
    color: inherit !important;
}

.mud-alert-filled-error,
.mud-alert-outlined-error,
.mud-alert-text-error,
.mud-alert-error {
    background-color: #fee2e2 !important; /* red-100 - slightly more visible */
    color: #991b1b !important; /* red-800 - darker for better contrast */
    border-color: #f87171 !important; /* red-400 */
    border-left: 4px solid #dc2626 !important; /* red-600 accent */
}

.mud-alert-filled-error *,
.mud-alert-outlined-error *,
.mud-alert-text-error *,
.mud-alert-error * {
    color: inherit !important;
}

.mud-typography-h1 {
    font-weight: 700;
    font-size: 2.25rem;
    line-height: 1.2;
}

.mud-typography-h2 {
    font-weight: 700;
    font-size: 1.875rem;
    line-height: 1.25;
}

.mud-typography-h3 {
    font-weight: 600;
    font-size: 1.5rem;
    line-height: 1.3;
}

.mud-typography-h4 {
    font-weight: 600;
    font-size: 1.25rem;
    line-height: 1.35;
}

.mud-typography-h5 {
    font-weight: 600;
    font-size: 1.125rem;
    line-height: 1.4;
}

.mud-typography-h6 {
    font-weight: 600;
    font-size: 1rem;
    line-height: 1.5;
}

.mud-typography-subtitle1 {
    font-weight: 600;
    font-size: .975rem;
}

.mud-typography-subtitle2 {
    font-weight: 600;
    font-size: .875rem;
}

.mud-typography-body1 {
    font-size: .95rem;
    line-height: 1.7;
}

.mud-typography-body2 {
    font-size: .875rem;
    line-height: 1.6;
}

.mud-button-root {
    font-weight: 600;
}

.dfm-file-upload-input-overlay {
    opacity: 0;
}

.workspace-grid {
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
    --workspace-grid-columns: 12;
    --workspace-grid-gutter: 24px;
}

.workspace-grid-12 {
    display: grid;
    grid-template-columns: repeat(12, minmax(0, 1fr));
    gap: var(--workspace-grid-gutter, 24px);
    width: 100%;
    max-width: 1320px;
    margin: 0 auto;
}

/* Temporary (overlay) drawers are content surfaces — letter preview, notes, etc.
   The theme's DrawerBackground is the dark navy reserved for the mini nav sidebar,
   but MudBlazor applies it to every drawer; in light mode that renders near-black
   text on navy. Restore surface colors for all temporary drawers. */
.mud-drawer.mud-drawer-temporary {
    background-color: var(--mud-palette-surface);
    color: var(--mud-palette-text-primary);
}
