.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
}

    #blazor-error-ui .dismiss {
        cursor: pointer;
        position: absolute;
        right: 0.75rem;
        top: 0.5rem;
    }

.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."
    }

.loading-progress {
    position: absolute;
    display: block;
    width: 8rem;
    height: 8rem;
    inset: 20vh 0 auto 0;
    margin: 0 auto 0 auto;
}

    .loading-progress circle {
        fill: none;
        stroke: #e0e0e0;
        stroke-width: 0.6rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        .loading-progress circle:last-child {
            stroke: #1b6ec2;
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 0.05s ease-in-out;
        }

.loading-progress-text {
    position: absolute;
    text-align: center;
    font-weight: bold;
    inset: calc(20vh + 3.25rem) 0 auto 0.2rem;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

code {
    color: #c02d76;
}

.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;
}

/* ===== MOBILE RESPONSIVENESS FIXES ===== */

/* Enable proper scrolling on all pages */
html, body {
    overflow-x: hidden;
    overflow-y: auto;
    min-height: 100vh;
}

/* Fix body overflow once app is loaded */
body:has(.mud-layout) {
    overflow: auto;
}

/* Ensure main content can scroll properly and expands to push footer down */
.mud-main-content {
    overflow-y: auto;
    overflow-x: hidden;
    flex: 1 0 auto;
    display: flex;
    flex-direction: column;
}

/* Mobile-first container padding */
@media (max-width: 599.98px) {
    /* Reduce container padding on mobile */
    .mud-container {
        padding-left: 12px !important;
        padding-right: 12px !important;
    }
    
    /* Reduce paper/card padding on mobile */
    .mud-paper.pa-4,
    .mud-card.pa-4 {
        padding: 12px !important;
    }
    
    .mud-paper.pa-6,
    .mud-card.pa-6 {
        padding: 16px !important;
    }
    
    .mud-paper.pa-8,
    .mud-card.pa-8 {
        padding: 20px !important;
    }
    
    /* Reduce top margin on mobile */
    .mt-4 {
        margin-top: 12px !important;
    }
    
    .mt-8 {
        margin-top: 20px !important;
    }
}

/* ===== APP BAR / NAVIGATION RESPONSIVENESS ===== */

/* Hide navigation text on small screens, show only icons */
@media (max-width: 599.98px) {
    /* Hide navigation text in app bar buttons for unauthenticated users */
    .mud-appbar nav .mud-button .mud-button-label {
        display: none;
    }
    
    /* Make nav buttons icon-only */
    .mud-appbar nav .mud-button {
        min-width: 44px;
        padding: 8px;
    }
    
    /* Reduce app bar title size on mobile */
    .mud-appbar .mud-typography-h5 {
        font-size: 1.1rem;
    }
    
    /* Reduce app bar padding */
    .mud-appbar .mud-toolbar {
        padding-left: 8px;
        padding-right: 8px;
    }
}

/* ===== TYPOGRAPHY RESPONSIVENESS ===== */

/* Responsive heading sizes */
@media (max-width: 599.98px) {
    /* Make h1 headings smaller on mobile */
    .mud-typography-h1 {
        font-size: 2rem !important;
        line-height: 1.2 !important;
        word-wrap: break-word;
        overflow-wrap: break-word;
        hyphens: auto;
    }
    
    /* Make h2 headings smaller on mobile */
    .mud-typography-h2 {
        font-size: 1.5rem !important;
        line-height: 1.3 !important;
    }
    
    /* Make h4 headings smaller on mobile */
    .mud-typography-h4 {
        font-size: 1.25rem !important;
        line-height: 1.3 !important;
    }
    
    /* Make h5 subheadings smaller on mobile */
    .mud-typography-h5 {
        font-size: 1rem !important;
        line-height: 1.4 !important;
    }
    
    /* Improve body text readability */
    .mud-typography-body1 {
        font-size: 0.95rem;
        line-height: 1.5;
    }
}

/* ===== BUTTON RESPONSIVENESS ===== */

@media (max-width: 599.98px) {
    /* Stack buttons vertically on mobile when in a row */
    .mud-stack[style*="flex-direction: row"] {
        flex-direction: column !important;
        align-items: stretch !important;
    }
    
    /* Full width buttons in hero sections on mobile */
    .mud-paper .mud-button-group,
    [role="group"] .mud-button {
        width: 100%;
    }
    
    /* Make large buttons more appropriately sized */
    .mud-button-large {
        padding: 10px 20px;
        font-size: 0.9rem;
    }
}

/* ===== GRID / CARD RESPONSIVENESS ===== */

@media (max-width: 599.98px) {
    /* Ensure cards don't overflow */
    .mud-card {
        max-width: 100%;
        overflow: hidden;
    }
    
    /* Card actions should wrap on mobile */
    .mud-card-actions {
        flex-wrap: wrap;
        gap: 8px;
    }
    
    .mud-card-actions .mud-button {
        flex-shrink: 0;
    }
}

/* ===== DIALOG RESPONSIVENESS ===== */

@media (max-width: 599.98px) {
    /* Make dialogs full width on mobile */
    .mud-dialog {
        margin: 8px !important;
        max-height: calc(100vh - 16px) !important;
        width: calc(100vw - 16px) !important;
        max-width: calc(100vw - 16px) !important;
    }
    
    .mud-dialog-content {
        padding: 16px !important;
    }
    
    .mud-dialog-actions {
        padding: 8px 16px 16px !important;
        flex-wrap: wrap;
        gap: 8px;
    }
}

/* ===== DRAWER RESPONSIVENESS ===== */

@media (max-width: 599.98px) {
    /* Make drawer overlay the content on mobile */
    .mud-drawer {
        position: fixed !important;
        z-index: 1200;
    }
    
    .mud-drawer-open-responsive-md-left,
    .mud-drawer-open-responsive-lg-left {
        width: 280px !important;
    }
}

/* ===== TABLE RESPONSIVENESS ===== */

@media (max-width: 599.98px) {
    /* Make tables horizontally scrollable */
    .mud-table-container {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Reduce table cell padding on mobile */
    .mud-table-cell {
        padding: 8px !important;
    }
}

/* ===== FORM RESPONSIVENESS ===== */

@media (max-width: 599.98px) {
    /* Full width form fields on mobile */
    .mud-input,
    .mud-select,
    .mud-input-control {
        width: 100%;
    }
    
    /* Stack form action buttons */
    .mud-form .mud-stack[style*="flex-direction: row"] {
        flex-direction: column !important;
    }
}

/* ===== TABS RESPONSIVENESS ===== */

@media (max-width: 599.98px) {
    /* Make tabs scrollable on mobile */
    .mud-tabs-header {
        overflow-x: auto;
        -webkit-overflow-scrolling: touch;
    }
    
    /* Reduce tab panel padding on mobile */
    .mud-tabs .mud-tab-panel {
        padding: 12px !important;
    }
}

/* ===== LIST RESPONSIVENESS ===== */

@media (max-width: 599.98px) {
    /* Stack list item content vertically if needed */
    .mud-list-item .d-flex.justify-space-between {
        flex-direction: column;
        align-items: flex-start !important;
        gap: 8px;
    }
    
    /* Reduce list item padding */
    .mud-list-item {
        padding: 12px 8px !important;
    }
}

/* ===== CHIP RESPONSIVENESS ===== */

@media (max-width: 599.98px) {
    /* Wrap chips */
    .mud-chipset {
        flex-wrap: wrap;
    }
    
    .mud-chip {
        margin: 2px;
    }
}

/* ===== FIX HERO SECTION BUTTON GROUP ===== */

@media (max-width: 599.98px) {
    /* Hero section buttons should stack */
    [role="group"][aria-label*="Account"] {
        flex-direction: column !important;
        width: 100%;
    }
    
    [role="group"][aria-label*="Account"] .mud-button {
        width: 100%;
        margin: 4px 0 !important;
    }
}

/* ===== PREVENT TEXT OVERFLOW ===== */

.mud-typography {
    word-wrap: break-word;
    overflow-wrap: break-word;
}

/* Prevent awkward word breaks in headings */
h1, h2, h3, h4, h5, h6,
.mud-typography-h1,
.mud-typography-h2,
.mud-typography-h3,
.mud-typography-h4,
.mud-typography-h5,
.mud-typography-h6 {
    word-break: normal;
    overflow-wrap: normal;
    hyphens: none;
}

/* ===== MOBILE UTILITY CLASSES ===== */

/* Full width button on mobile only */
@media (max-width: 599.98px) {
    .mobile-full-width {
        width: 100% !important;
    }
    
    /* Stack flexbox items vertically on mobile */
    .flex-column {
        flex-direction: column !important;
    }
}

/* Responsive heading that looks like h1 on desktop, smaller on mobile */
.mud-typography-h1-responsive {
    font-size: 2rem;
    font-weight: 400;
    line-height: 1.2;
}

@media (min-width: 600px) {
    .mud-typography-h1-responsive {
        font-size: 3rem;
    }
}

@media (min-width: 960px) {
    .mud-typography-h1-responsive {
        font-size: 3.75rem;
    }
}

/* ===== STACK RESPONSIVE DIRECTIONS ===== */

/* MudBlazor responsive flex utilities */
@media (max-width: 599.98px) {
    .flex-sm-row {
        flex-direction: column !important;
    }
}

@media (min-width: 600px) {
    .flex-sm-row {
        flex-direction: row !important;
    }
}

/* ===== RESPONSIVE MARGIN/PADDING ADJUSTMENTS ===== */

@media (max-width: 599.98px) {
    /* Reduce vertical margins on mobile */
    .mb-md-6 {
        margin-bottom: 16px !important;
    }
    
    .mt-md-8 {
        margin-top: 16px !important;
    }
    
    /* Reduce padding on mobile */
    .pa-md-8 {
        padding: 16px !important;
    }
}

/* ===== INDEX.HTML BODY SCROLL FIX ===== */

/* The body:has(.mud-layout) rule above handles scroll enabling after app loads */

/* ===== STICKY FOOTER POSITIONING ===== */

/* Ensure the layout fills the full viewport height */
.mud-layout {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* Note: .mud-main-content flex properties are defined earlier in this file 
   alongside the overflow properties for proper sticky footer behavior */

/* Footer should not grow but maintain its natural height */
.mud-layout > footer {
    flex-shrink: 0;
}