:root {
    --grid-list-height: calc(100vh - 258px);
    --grid-list2-height: calc(100vh - 258px);
    --admin-primary: #d32f2f;
    --admin-secondary: #f06292;
    --admin-background: #f5f5f5;
    --admin-surface: #ffffff;
}

html, body {
    font-family: 'Roboto', 'Helvetica Neue', Helvetica, Arial, sans-serif;
    margin: 0;
    padding: 0;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: var(--admin-primary);
    text-decoration: none;
}

a:hover {
    color: #b71c1c;
    text-decoration: underline;
}

.content {
    padding-top: 1.1rem;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #4caf50;
}

.invalid {
    outline: 1px solid #f44336;
}

.validation-message {
    color: #f44336;
    font-size: 0.875rem;
    margin-top: 0.25rem;
}

.mud-list.mud-list-padding{
    padding: 0;
}

.loading-progress {
    position: relative;
    display: block;
    width: 8rem;
    height: 8rem;
    margin: 20vh auto 1rem 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: var(--admin-primary);
            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");
    }

.linear-progress {
    background: silver;
    width: 50vw;
    margin: 20% auto;
    height: 1rem;
    border-radius: 10rem;
    overflow: hidden;
    position: relative;
}

    .linear-progress:after {
        content: '';
        position: absolute;
        inset: 0;
        background: var(--admin-primary);
        scale: var(--blazor-load-percentage, 0%) 100%;
        transform-origin: left top;
        transition: scale ease-out 0.5s;
    }

#blazor-error-ui {
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    display: none;
    left: 0;
    padding: 0.6rem 1.25rem 0.7rem 1.25rem;
    position: fixed;
    width: 100%;
    z-index: 1000;
    margin: 20px 0;
}

    #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+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA9MjY3Ljg3OSA2OS41ODc3IDI2Ny44Nzk2OS4zLjI3LjM4NyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::before {
        content: "An error has occurred. "
    }

.mud-button-label{
    padding-left: 5px;
    padding-right:5px;
}

.mud-shrink ~ label.mud-input-label.mud-input-label-inputcontrol {
    color: black; 
    font-size: 1.1rem;
}

.mud-input.mud-input-filled {
    position: relative;
    transition: background-color 200ms cubic-bezier(0,0,.2,1) 0ms;
    background-color: rgba(0,0,0,0.04);
    border-radius: 4px;
}

.mud-table-root .mud-table-head .mud-table-cell {
    font-weight: 600 !important;
    line-height: 1.5rem;
}

.mud-table-dense * .mud-table-row .mud-table-cell {
    padding: 6px 6px 6px 6px;
    padding-inline-start: 6px;
    padding-inline-end: 6px;
}

.mud-table-row-pointer .mud-table-body .mud-table-cell:hover {
    cursor: pointer;
}

.mud-expand-panel .mud-expand-panel-header {
    padding-left: 10px;
    padding-right: 10px;
    padding-top: 10px;
    padding-bottom: 10px;
    background-color: var(--mud-palette-background-gray);
}

.mud-expand-panel.mud-panel-expanded {
    margin: 16px 0;
    border-radius: inherit;
    transition-delay: 0ms;
}

.mud-expand-panel {
    flex: 1 0 100%;
    max-width: 100%;
    position: relative;
    transition: margin .3s cubic-bezier(.25,.8,.5,1);
    transition-delay: 100ms;
    color: var(--mud-palette-text-primary);
    background-color: var(--mud-palette-surface);
    margin-top: 8px;
}

    .mud-expand-panel.mud-expand-panel-border {
        border-bottom: 0px solid var(--mud-palette-lines-default);
    }

    .mud-expand-panel:last-child {
        border-bottom-left-radius: inherit;
        border-bottom-right-radius: inherit;
    }

    .mud-expand-panel .mud-expand-panel-content {
        padding:0;
        flex: 1 1 auto;
        max-width: 100%;
    }

.text-muted {
    color: #6c757d;
}

input.mud-input-slot {
    text-transform: var(--text-transform, none);
}

/*
    Alinha o texto do cabeçalho da tabela no centro
*/
.mud-simple-table table * tr > td, .mud-simple-table table * tr th {
    text-align: center !important;
    padding: 6px !important;
}

/*
  Altera o tamanho do icon size smal dos botões
*/
.mud-icon-size-small {
    font-size: 1rem;
}
/*
    ALtera o tamanho do start icon dos botões
*/
.mud-button-icon-size-small > *:first-child {
    font-size: 12px;
}

/* site.css */
.main-layout-background {
    background-image: url('/images/logo.png');
    background-size: cover;
    background-position: center;
    background-repeat: no-repeat;
    height: 100vh;
    width: 100%;
}

/* Full-screen splash screen styling with background image - Tema BackOffice */
#splash-screen {
    position: fixed;
    top: 0;
    left: 0;
    width: 100%;
    height: 100%;
    background: linear-gradient(135deg, var(--admin-primary) 0%, #b71c1c 100%);
    display: flex;
    justify-content: center;
    align-items: center;
    z-index: 9999;
    font-family: 'Roboto', 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
    transition: opacity 0.5s ease-out;
}

/* Popup container styling - Tema BackOffice */
#splash-screen-popup {
    font-family: 'Roboto', var(--body-font);
    -webkit-font-smoothing: antialiased;
    background-color: var(--admin-surface);
    color: #424242;
    --accent-fill-rest: var(--admin-primary);
    user-select: none;
    padding: 30px;
    border-radius: 16px;
    box-shadow: 0 8px 32px rgba(211, 47, 47, 0.3);
    text-align: center;
    width: 500px;
    height: 300px;
    border: 2px solid rgba(211, 47, 47, 0.1);
}

/* Fade-out animation for splash screen */
#splash-screen.hidden {
    opacity: 0;
    pointer-events: none;
}

/* Text styling inside the popup - Tema BackOffice */
#splash-screen-popup h1 {
    font-size: 32px;
    font-weight: 600;
    margin-top: 12px;
    line-height: 30px;
    margin: 12px 0px 0px 0px;
    user-select: none;
    outline: none;
    color: var(--admin-primary);
}

#splash-screen-popup h2 {
    font-size: 24px;
    font-weight: 400;
    line-height: 32px;
    margin: 24px 0px 50px 0px;
    user-select: none;
    outline: none;
    color: #666;
}

#splash-screen-popup h3 {
    font-size: 12px;
    font-weight: 300;
    margin: 0px;
    user-select: none;
    outline: none;
    color: #666;
}

#splash-screen-popup p {
    user-select: none;
    outline: none;
}

#splash-screen-popup img {
    width: 200px;
    height: 70px;
    margin: 20px 0px 0px 0px;
    outline: none;
    filter: drop-shadow(0 2px 4px rgba(211, 47, 47, 0.2));
}

/* Loading bar container - Tema BackOffice */
.loading-bar-container {
    height: 4px;
    background-color: rgba(211, 47, 47, 0.1);
    width: 70%;
    border-radius: 2px;
    overflow: hidden;
    margin: 20px auto;
}

/* Loading bar element - Tema BackOffice */
.loading-bar {
    width: 100%;
    border-radius: 2px;
    height: 4px;
    background: linear-gradient(90deg, var(--admin-primary), var(--admin-secondary));
    animation: indeterminateAnimation 0.75s infinite linear;
    transform-origin: 0% 50%;
    box-shadow: 0 1px 3px rgba(211, 47, 47, 0.3);
}

/* Keyframes for the indeterminate progress bar */
@keyframes indeterminateAnimation {
    0% {
        transform: translateX(0) scaleX(0);
    }

    40% {
        transform: translateX(0) scaleX(0.4);
    }

    100% {
        transform: translateX(100%) scaleX(0.5);
    }
}

.app-logo {
    width: 57px;
    height: 40px; /* This will maintain the aspect ratio */
    margin-left: 0px
}

.table-row-selected {
    background-color: #DDDDDD !important;
}

.mud-input-control.mud-field .mud-input-slot {
    height: auto;
    min-height: var(--field-min-height, 17px); /* fallback is 50px */
}

.font-weight-bold {
    font-weight: 600 !important;
}

/* Custom styles for Admin App - Tema BackOffice */
.white-link {
    color: white !important;
}

.white-link:hover {
    color: #ffcdd2 !important;
}

/* Loading spinner customization - Tema BackOffice */
.mud-progress-circular-svg {
    color: var(--admin-primary);
}

/* Form validation styles - Tema BackOffice */
.mud-input-error .mud-input-slot {
    border-color: #f44336 !important;
}

.mud-input-success .mud-input-slot {
    border-color: #4caf50 !important;
}

/* Card hover effects - Tema BackOffice */
.mud-card:hover {
    box-shadow: 0 4px 8px rgba(211, 47, 47, 0.12);
    transition: box-shadow 0.3s ease;
}

code {
    color: var(--admin-primary);
    background-color: #ffebee;
    padding: 0.2rem 0.4rem;
    border-radius: 3px;
    font-family: 'Consolas', 'Monaco', 'Courier New', monospace;
}

/* Responsive utilities for small screens */
@media (max-width: 768px) {
    .loading-progress {
        width: 6rem;
        height: 6rem;
    }
    
    .loading-progress-text {
        font-size: 0.875rem;
    }

    #splash-screen-popup {
        width: 90%;
        height: auto;
        padding: 20px;
    }
    
    #splash-screen-popup h1 {
        font-size: 24px;
    }
    
    #splash-screen-popup img {
        width: 150px;
        height: 50px;
    }
}