:root {
    --danger: #E65753;
    --success: #26b050;
    --primary: #009688;
    --secondary: #6c7a89;
    --warning: #ffc107;
    --info: #0d6efd;
    --white: #ffffff;
    --blue: #006bb7;
    --black: #000000;
    --purple: #6f42c1;
    --orange: #fd7e14;
    --brown: #92400E;
    --sidebar-background: #18181B;
    --sidebar-border: #27272A;
    --reports-number-color-bold: #495057;
    --reports-number-color-normal: #111827;
}

html,
body {
    margin: 0;
    padding: 0;
    overflow-x: hidden;
    width: 100%;
    height: 100%;
    /* Hide vertical scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

/* Hide scrollbar for Chrome, Safari and Opera */
html::-webkit-scrollbar,
body::-webkit-scrollbar {
    display: none;
}

/* Prevent horizontal scrolling and hide vertical scrollbars globally */
* {
    box-sizing: border-box;
    font-family: 'Lato', sans-serif !important;
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

*::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

/*
    MUDBLAZOR
*/

/* Override MudBlazor error color to use our custom danger color */
.mud-error,
.mud-error-text,
.mud-error-hover:hover,
.mud-icon-color-error,
.mud-icon-button.mud-error,
.mud-icon-button.mud-error-text,
.mud-icon-button.mud-error-outlined {
    color: var(--danger) !important;
}

.mud-icon-button.mud-error-outlined {
    border-color: var(--danger) !important;
}

.mud-icon-button.mud-error-outlined:hover {
    background-color: rgba(215, 69, 66, 0.1) !important;
    border-color: var(--danger) !important;
}

/* Status Colors Override */
.mud-chip.mud-chip-color-success {
    background-color: #d1fae5 !important;
    color: var(--primary) !important;
}

.mud-chip.mud-chip-color-warning {
    background-color: #fef3c7 !important;
    color: var(--brown) !important;
}


.mud-main-content {
    padding: 1rem !important;
    background-color: #f8f9fa;
    min-height: 100vh;
    transition: margin-left 0.3s ease !important;
    margin-left: 0 !important;
    width: 100%;
    max-width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    /* Hide vertical scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.mud-main-content::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

/* Apply margin to mud-main-content when sidebar is expanded (default) */
.sidebar-expanded .mud-main-content {
    margin-left: 14.5rem !important;
    width: calc(100% - 14.5rem) !important;
    max-width: calc(100% - 14.5rem) !important;
}

/* Responsive adjustments for sidebar-expanded on smaller screens */
@media (max-width: 960px) {
    .sidebar-expanded .mud-main-content {
        margin-left: 14rem !important;
        width: calc(100% - 14rem) !important;
        max-width: calc(100% - 14rem) !important;
    }
}

@media (max-width: 768px) {
    .sidebar-expanded .mud-main-content {
        margin-left: 14rem !important;
        width: calc(100% - 14rem) !important;
        max-width: calc(100% - 14rem) !important;
    }
}

@media (max-width: 640px) {
    .sidebar-expanded .mud-main-content {
        margin-left: 8rem !important;
        width: calc(100% - 8rem) !important;
        max-width: calc(100% - 8rem) !important;
    }
}

@media (max-width: 480px) {
    .sidebar-expanded .mud-main-content {
        margin-left: 6rem !important;
        width: calc(100% - 6rem) !important;
        max-width: calc(100% - 6rem) !important;
    }
}

.sidebar-collapsed .mud-main-content {
    margin-left: 4.75rem !important;
    width: calc(100% - 4.75rem) !important;
    max-width: calc(100% - 4.75rem) !important;
}

.sidebar-collapsed .content-container {
    margin-left: 0 !important;
}

@media (max-width: 768px) {
    .mud-main-content {
        padding: 1rem !important;
    }
}

@media (min-width: 769px) {
    .mud-main-content {
        padding: 1rem !important;
    }
}

@media (min-width: 1200px) {
    .mud-main-content {
        padding: 1rem !important;
    }
}

.content-container {
    max-width: 100%;
    width: 100%;
    box-sizing: border-box;
    overflow-x: hidden;
    /* Take remaining height so report pages (height: 100%) fit and horizontal scrollbar stays visible */
    flex: 1 1 0;
    min-height: 0;
    display: flex;
    flex-direction: column;
    /* Hide vertical scrollbar */
    scrollbar-width: none;
    /* Firefox */
    -ms-overflow-style: none;
    /* IE and Edge */
}

.content-container::-webkit-scrollbar {
    display: none;
    /* Chrome, Safari and Opera */
}

.main-content-wrapper {
    flex: 1;
    display: flex;
    flex-direction: column;
    width: 100%;
    max-width: 100%;
    transition: margin-left 0.3s ease;
    margin-left: 0;
    padding-top: 1rem !important;
    box-sizing: border-box;
    overflow-x: hidden;
}

/* Ensure drawer transitions smoothly */
.mud-drawer {
    transition: width 0.3s ease !important;
    position: fixed !important;
    z-index: 1200 !important;
}

/* Hide MudDrawer paper background since we use custom sidebar */
.mud-drawer .mud-drawer-content {
    background: transparent !important;
    box-shadow: none !important;
}

/* Ensure MudLayout fills the viewport properly */
.mud-layout {
    display: flex;
    width: 100%;
    max-width: 100vw;
    min-height: 100vh;
    overflow-x: hidden;
    position: relative;
    box-sizing: border-box;
}

/* Ensure main content is not hidden behind sidebar */
.mud-layout .mud-main-content {
    flex: 1;
    width: 100%;
}

/* Responsive width for mud-main-content */
@media (max-width: 768px) {
    .mud-layout .mud-main-content {
        max-width: 100%;
        width: 100%;
    }
}

@media (min-width: 769px) and (max-width: 1199px) {
    .mud-layout .mud-main-content {
        max-width: 100%;
        width: 100%;
    }
}

@media (min-width: 1200px) {
    .mud-layout .mud-main-content {
        max-width: 100%;
        width: 100%;
    }
}

@media (min-width: 1400px) {
    .mud-layout .mud-main-content {
        max-width: 100%;
        margin-left: auto;
        margin-right: auto;
    }
}

/* Adjust layout for mobile */
@media (max-width: 960px) {
    .mud-layout {
        display: flex;
        flex-direction: column;
    }
}

a,
.btn-link {
    color: var(--blue);
}


.mud-button-filled.mud-button-filled-primary {
    color: var(--white) !important;
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.mud-button-filled.mud-button-filled-primary:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-primary {
    color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--primary) !important;
}

.mud-button-outlined.mud-button-outlined-primary:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-primary.active {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-info.active {
    background-color: var(--info) !important;
    border-color: var(--info) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-info:hover {
    background-color: var(--info) !important;
    border-color: var(--info) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-info:active {
    background-color: var(--info) !important;
    border-color: var(--info) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-info:disabled {
    background-color: var(--info) !important;
    border-color: var(--info) !important;
    color: var(--white) !important;
}

.btn-primary {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

.btn-primary:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    /* color: var(--white)!important; */
}

.btn-primary:active {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

.btn-outline-primary {
    /* background-color: var(--primary)!important; */
    color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-outline-primary:hover {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

.btn-outline-primary:active {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
    color: var(--white) !important;
}

.btn:focus,
.btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus,
.form-check-input:focus {
    box-shadow: 0 0 0 0.1rem var(--white), 0 0 0 0.25rem var(--blue);
}

.mud-button-filled.mud-button-filled-secondary {
    color: var(--white) !important;
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
}

.mud-button-filled.mud-button-filled-secondary:hover {
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
}

.btn-outline-secondary.mud-button-outlined-secondary {
    color: var(--secondary) !important;
    border-color: var(--secondary) !important;
}

.btn-outline-secondary.mud-button-outlined-secondary:hover {
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
}

.mud-button-filled.mud-button-filled-error {
    color: var(--white) !important;
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.mud-button-filled.mud-button-filled-error:hover {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.mud-button-filled.mud-button-filled-error:active {
    color: var(--white) !important;
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.mud-button-filled.mud-button-filled-error:disabled {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-error {
    color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.mud-button-outlined.mud-button-outlined-error:hover {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-error:active {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-error:disabled {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
    color: var(--white) !important;
}

.mud-button-outlined.mud-button-outlined-error:disabled {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
    color: var(--white) !important;
}

.mud-chip {
    font-weight: 500;
}

.mud-chip-filled.mud-chip-color-error {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
    color: var(--white) !important;
}

.mud-chip-filled.mud-chip-color-error:hover {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.mud-chip-filled.mud-chip-color-error:active {
    background-color: var(--danger) !important;
    border-color: var(--danger) !important;
}

.btn.disabled,
.btn:disabled,
fieldset:disabled .btn {
    pointer-events: none;
    background-color: var(--secondary) !important;
    border-color: var(--secondary) !important;
    opacity: 0.5;
    text-decoration: none !important;
}

.border-primary {
    border-color: var(--primary) !important;
}

.form-check-input:checked {
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-check:checked+.btn-primary,
.btn-primary.active,
.btn-primary.show,
.btn-primary:first-child:active,
:not(.btn-check)+.btn-primary:active {
    color: #fff;
    background-color: var(--primary) !important;
    border-color: var(--primary) !important;
}

.btn-check:checked+.btn:focus-visible,
.btn.active:focus-visible,
.btn.show:focus-visible,
.btn:first-child:active:focus-visible,
:not(.btn-check)+.btn:active:focus-visible {
    box-shadow: none !important;
}

.content {
    padding-top: 1.1rem;
}

h1:focus {
    outline: none;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--primary);
}

.invalid {
    outline: 1px solid var(--danger);
}

.validation-message {
    color: var(--danger);
}

.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."
}

.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;
}


/* Table row hover effects for better usability and clarity */
/* Standard HTML tables */
.table tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.table tbody tr:hover {
    background-color: #f5f5f5 !important;
    cursor: pointer;
}

/* MudBlazor tables - ensure hover effects work */
.mud-table-body tr:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
}

.mud-simple-table tbody tr {
    transition: background-color 0.15s ease-in-out;
}

.mud-simple-table tbody tr:hover {
    background-color: rgba(0, 0, 0, 0.04) !important;
    cursor: pointer;
}