h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #666;
    font-size: 0.875rem;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

.form-floating > .form-control-plaintext::placeholder, .form-floating > .form-control::placeholder {
    color: var(--bs-secondary-color);
    text-align: end;
}

.form-floating > .form-control-plaintext:focus::placeholder, .form-floating > .form-control:focus::placeholder {
    text-align: start;
}

/* ===== MUDBLAZOR STYLING FIXES ===== */

/* Reset and Base Styles for MudBlazor */
*, *::before, *::after {
    box-sizing: border-box;
}

html, body {
    font-family: 'Roboto', sans-serif;
    margin: 0;
    padding: 0;
    height: 100%;
    background: linear-gradient(135deg, #f5f7fa 0%, #c3cfe2 100%);
}

#app {
    height: 100%;
}

/* Enhanced form styling */
.mud-paper {
    background: rgba(255, 255, 255, 0.95) !important;
    backdrop-filter: blur(10px);
    border: 1px solid rgba(255, 255, 255, 0.2);
}

/* Clean form field styling */
.mud-input-root-outlined {
    border-radius: 8px !important;
}

.mud-input-outlined .mud-input-outlined-border {
    border-color: #e0e0e0 !important;
    border-width: 1px !important;
}

.mud-input-outlined:hover .mud-input-outlined-border {
    border-color: #1976d2 !important;
}

.mud-input-outlined.mud-input-focused .mud-input-outlined-border {
    border-color: #1976d2 !important;
    border-width: 2px !important;
}

/* Remove ugly focus rings and artifacts */
.mud-input-root {
    background-color: transparent !important;
}

.mud-input-outlined {
    background-color: #ffffff !important;
}

.mud-input-outlined .mud-input-root {
    background-color: #ffffff !important;
}

.mud-input-outlined .mud-input-slot {
    background-color: #ffffff !important;
}

/* Remove blue shading artifacts on hover and focus */
.mud-input-outlined:not(.mud-input-error):not(.mud-disabled):hover .mud-input-adornment,
.mud-input-outlined .mud-input-adornment {
    background-color: transparent !important;
}

.mud-input-outlined.mud-input-focused .mud-input-slot {
    background-color: #ffffff !important;
}

/* Fix for text field background consistency */
.mud-input-outlined .mud-input-adornment-start,
.mud-input-outlined .mud-input-adornment-end {
    background-color: #ffffff !important;
}

/* Professional button styling */
.mud-button-filled.mud-primary {
    background: linear-gradient(45deg, #1976d2, #1e88e5) !important;
    box-shadow: 0 2px 8px rgba(25, 118, 210, 0.3) !important;
    transition: all 0.3s cubic-bezier(0.4, 0, 0.2, 1) !important;
}

.mud-button-filled.mud-primary:hover {
    background: linear-gradient(45deg, #1565c0, #1976d2) !important;
    box-shadow: 0 4px 12px rgba(25, 118, 210, 0.4) !important;
    transform: translateY(-1px) !important;
}

/* Enhanced checkbox styling */
.mud-checkbox {
    margin-right: 8px !important;
}

/* Optimized form field spacing */
.mud-input-margin-dense {
    margin-bottom: 8px !important;
}

.mb-2 .mud-input-root {
    margin-bottom: 8px !important;
}

/* Remove excessive spacing between form elements */
.mud-form .mud-input-control-input-container {
    margin-bottom: 0 !important;
}

/* Link styling improvements */
.mud-link {
    text-decoration: none !important;
    transition: color 0.2s ease !important;
}

.mud-link:hover {
    color: #1565c0 !important;
}

/* Ensure proper text field rendering */
.mud-input-text {
    background-color: transparent !important;
}

/* Modern utility classes */
.min-vh-100 {
    min-height: 100vh;
}

/* Dense form fields for better UX - reduced height */
.mud-input-root.mud-input-margin-dense {
    margin-top: 2px !important;
    margin-bottom: 2px !important;
}

.mud-input-outlined.mud-input-margin-dense .mud-input-slot {
    padding: 8px 12px !important;
    min-height: 40px !important;
    height: 40px !important;
    font-size: 0.875rem !important;
}

/* Reduce overall MudTextField height */
.mud-input-control {
    min-height: 40px !important;
}

.mud-input-control .mud-input {
    min-height: 40px !important;
    height: 40px !important;
}

.mud-input-outlined .mud-input-root {
    min-height: 40px !important;
}

/* Autofill styling (keep text readable, avoid yellow background) */
.mud-input-outlined input:-webkit-autofill,
.mud-input-outlined input:-webkit-autofill:hover,
.mud-input-outlined input:-webkit-autofill:focus {
    -webkit-text-fill-color: #424242 !important;
    -webkit-box-shadow: 0 0 0px 1000px #ffffff inset !important;
    transition: background-color 5000s ease-in-out 0s !important;
}

/* Slight tweak so default MudBlazor floating label remains crisp */
.mud-input-label.mud-input-label-inputted {
    font-size: 0.70rem !important;
    font-weight: 500;
}

/* Helper class applied by JS when value present (incl. autofill) */
.mud-input-has-value .mud-input-label:not(.mud-input-label-inputted) {
    transform: translate(12px, -6px) scale(.85) !important;
}

/* Hide "MudTextField1" in error messages - use proper field names */
.mud-input-helper-text {
    font-size: 0.75rem !important;
    margin-top: 4px !important;
}

.validation-message {
    color: #f44336 !important;
    font-size: 0.75rem !important;
}

/* Reduce adornment sizes for dense fields */
.mud-input-outlined.mud-input-margin-dense .mud-input-adornment {
    padding: 0 8px !important;
    font-size: 1.125rem !important;
}

/* Fix email field alignment issues */
.mud-input-adornment-start {
    padding-left: 12px !important;
}

.mud-input-slot {
    text-align: left !important;
}

.py-2 {
    padding-top: 0.5rem !important;
    padding-bottom: 0.5rem !important;
}

.py-3 {
    padding-top: 0.75rem !important;
    padding-bottom: 0.75rem !important;
}

.py-4 {
    padding-top: 1rem !important;
    padding-bottom: 1rem !important;
}

.mb-1 {
    margin-bottom: 0.25rem !important;
}

.mb-2 {
    margin-bottom: 0.5rem !important;
}

.mb-3 {
    margin-bottom: 0.75rem !important;
}

.mt-2 {
    margin-top: 0.5rem !important;
}

.mt-4 {
    margin-top: 1rem !important;
}

.gap-3 {
    gap: 0.75rem !important;
}

.gap-4 {
    gap: 1rem !important;
}

.text-muted {
    color: #6c757d !important;
}

.text-decoration-none {
    text-decoration: none !important;
}

.font-weight-medium {
    font-weight: 500 !important;
}

/* Ensure proper Material Design elevation */
.mud-paper {
    box-shadow: 0px 2px 1px -1px rgba(0,0,0,0.2), 
                0px 1px 1px 0px rgba(0,0,0,0.14), 
                0px 1px 3px 0px rgba(0,0,0,0.12) !important;
}

/* Loading animation improvements */
.mud-progress-circular {
    color: inherit !important;
}

/* Button improvements */
.mud-button-root {
    text-transform: none !important;
    font-weight: 500 !important;
}

/* Alert improvements */
.mud-alert {
    border-radius: 8px !important;
}

/* Form improvements */
.mud-form {
    width: 100%;
}

/* Fix checkbox styling */
.mud-checkbox .mud-button-root {
    border-radius: 4px !important;
}

/* Responsive improvements */
@media (max-width: 600px) {
    .mud-container {
        padding-left: 16px !important;
        padding-right: 16px !important;
    }
    
    .mud-paper {
        margin: 8px !important;
    }
}