html,body 
{
    margin: 0;
    font-family: Segoe UI,Arial!important;
    font-size: 14px;
    margin: 0 auto;
    background: #f1f1f1;
    width: 100%
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #0071c1;
}

.btn-primary {
    color: #fff;
    background-color: #1b6ec2;
    border-color: #1861ac;
}

.btn:focus, .btn:active:focus, .btn-link.nav-link:focus, .form-control:focus, .form-check-input:focus {
  box-shadow: 0 0 0 0.1rem white, 0 0 0 0.25rem #258cfb;
}

.content {
    padding-top: 1.1rem;
}

/* App container wrapper */
.app-container {
    min-height: 100vh;
    display: flex;
    flex-direction: column;
}

/* App bar styling */
.e-appbar {
    position: fixed !important;
    top: 0;
    left: 0;
    right: 0;
    z-index: 1040;
    height: 48px;
    box-shadow: 0 2px 4px rgba(0,0,0,0.1);
}

/* Main content layout with proper constraints */
.main-content {
    margin-left: 0;
    transition: margin-left 0.3s ease;
    min-height: calc(100vh - 48px); /* Account for app bar height */
    background: #f5f5f5;
    padding-top: 48px; /* Space for fixed app bar */
    overflow-x: hidden;
    width: 100%;
}

/* Container constraints for content */
.main-content .container-fluid {
    max-width: 1400px;
    margin: 0 auto;
    padding: 20px;
}

/* Ensure responsive tables don't break layout */
.main-content .table-responsive {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
}

/* When sidebar is docked/visible, adjust main content */
.e-sidebar.e-dock + .main-content,
.e-sidebar.e-open + .main-content {
    margin-left: 254px; /* Match sidebar width */
}

/* Mobile responsive adjustments */
@media (max-width: 768px) {
    .main-content {
        margin-left: 0 !important;
    }
    
    .main-content .container-fluid {
        padding: 15px;
        max-width: 100%;
    }
}

/* Sidebar specific styling */
.e-sidebar.sidebar-myclass {
    background: #2c3e50;
    box-shadow: 2px 0 5px rgba(0,0,0,0.1);
    position: fixed !important;
    top: 48px; /* Below app bar */
    height: calc(100vh - 48px);
}

.e-sidebar .sidebar {
    height: 100%;
    display: flex;
    flex-direction: column;
}

.e-sidebar .nav-container {
    flex: 1;
    overflow-y: auto;
    padding-bottom: 20px;
}

.valid.modified:not([type=checkbox]) {
    outline: 1px solid #26b050;
}

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#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;
}

    #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: 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: #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;
}


#app_login {
    margin: auto
    width: 600px;
}

#app_login > div > div.slogan > img
{
    width: 300px;
    border-radius: 10px;
    margin-top: 20px;
}

#app_login .watermark {
    color: #c6c6c6;
    padding-left: 8px
}

#app_login {
    color: #fff;
    font-size: 14px;
}

#app_login .header {
    padding: 7px 0 0 15px;
    background: #232b79;
    height: 30px;
    color: #fff
}

#app_login {
    background-color: #fff;
    min-height: 100vh;
    color: black;
}

#app_login .header {
    width: 600px;
    margin: auto;
    height: 5px;
}

#app_login .header img {
    display: none;
}

#app_login .footer {
    width: 600px;
    margin: auto;
    clear: both
}

#app_login #main {
    width: 600px;
    margin: auto;
}

#main > form > div > div.slogan > img {
    width: 100px;
    border-radius: 10px;
    margin-top: 20px;
}

#app_login .upper .login-box {
    margin: auto;
    order: 2;
    display: flex;
    flex-direction: column;
    align-items: center;
    width: 100%;
    max-width: 400px;
}

.home-button {
    position: relative;
    top: -2px;
    height: 31px!important;
    cursor: pointer;
    display: inline
}

#app_login .bottom {
    position: relative;
    height: 450px;
    background: #fff
}

#app_login .slogan {
    text-align: center;
    font-size: 16px;
    line-height: 28px;
    margin: 0px auto;
    color: #363d43;
    order: 1;
    text-align: center;
}

#main > form > div > div.slogan > div:nth-child(2) {
    width: 400px;
    margin: 20px auto;
}

#main > form > div > div.slogan > div:nth-child(3) {
    display: none;
}

#app_login > footer {
    margin-top: 40px;
}

#app_login > footer > div > a:nth-child(1) > img {
    width: 140px;
    margin: auto;
    display: block;
}


#app_login > footer > div > div {
    margin: 40px auto;
    text-align: center;
}

#app_login > footer > div > div > div:nth-child(1) {
    display: none;
    margin: auto;
}

#app_login > footer > div > a:visited, #app_login > footer > div > a {
    display: block;
    color: black;
    margin: auto;
    text-align: center;
    text-decoration: none;
}

#app_login > footer > div > a:hover {
    text-decoration: underline;
}

#microsoft-signin {
    display: flex;
    flex-direction: column;
    gap: 20px;
}

#microsoft-signin a:first-child {
    display: flex;
    align-items: center;
    justify-content: center;
    font-family: 'Segoe UI', sans-serif;
    font-weight: 600;
    font-size: 15px;
    height: 41px;
    padding: 0 12px;
    border: none;
    border-radius: 2px;
    text-decoration: none;
    cursor: pointer;
    background-color: #FFFFFF;
    color: #5E5E5E;
    border: 1px solid #8C8C8C;
    margin-top: 40px;
}

#microsoft-signin a:first-child img {
    margin-right: 12px;
    width: 16px;
    height: 16px;
}

#microsoft-signin a:first-child:hover {
    opacity: 0.9;
}

#microsoft-signin a:first-child span {
    color: inherit;
}

#microsoft-signin a:nth-child(2):visited, #microsoft-signin a:nth-child(2) {
    margin: 20px auto 40px;
    display: inline-block;
    text-decoration: none;
    color: #000;
}

#microsoft-signin a:nth-child(2):hover {
    text-decoration: underline;
}

#app_login :target {
    display: block;
}

#app .header a,#app .header a:hover,#app .header a:visited,#app_login .header a,#app_login .header a:hover,#app_login .header a:visited {
    color: #ffc800;
    font-size: 14px;
    font-weight: bold;
    text-decoration: none;
    margin-left: 5px;
    margin-right: 8px;
    float: right;
    margin-top: 3px
}

#app_login .header #logout {
    display: none
}

#app_login select {
    margin-left: 10px;
    font-size: 16px;
    padding: 8px;
    border: 1px solid #ccc;
    border-radius: 4px;
    transition: border-color 0.3s;
}

#app_login select:focus {
    outline: none;
}

/* ===== Toast Notifications - Global Styling ===== */
/* Position toasts below the header at the top-right */
.custom-toast.e-toast-container {
    top: 70px !important;
    right: 20px !important;
    z-index: 10000 !important;
}

.custom-toast .e-toast {
    box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
    border-radius: 8px;
    min-width: 350px;
    animation: slideInRight 0.3s ease-out;
}

@keyframes slideInRight {
    from {
        transform: translateX(100%);
        opacity: 0;
    }
    to {
        transform: translateX(0);
        opacity: 1;
    }
}

.custom-toast .e-toast.e-toast-success {
    background: #d1e7dd;
    border-left: 4px solid #198754;
    color: #0f5132;
}

.custom-toast .e-toast.e-toast-success .e-toast-icon {
    color: #198754;
}

.custom-toast .e-toast.e-toast-danger {
    background: #f8d7da;
    border-left: 4px solid #dc3545;
    color: #842029;
}

.custom-toast .e-toast.e-toast-danger .e-toast-icon {
    color: #dc3545;
}

.custom-toast .e-toast.e-toast-warning {
    background: #fff3cd;
    border-left: 4px solid #ffc107;
    color: #856404;
}

.custom-toast .e-toast.e-toast-warning .e-toast-icon {
    color: #ffc107;
}

.custom-toast .e-toast.e-toast-info {
    background: #cfe2ff;
    border-left: 4px solid #0d6efd;
    color: #084298;
}

.custom-toast .e-toast.e-toast-info .e-toast-icon {
    color: #0d6efd;
}

.custom-toast .e-toast .e-toast-title {
    font-weight: 600;
    font-size: 1rem;
    margin-bottom: 0.25rem;
}

.custom-toast .e-toast .e-toast-content {
    font-size: 0.875rem;
    line-height: 1.4;
}

.custom-toast .e-toast .e-toast-close-icon {
    color: inherit;
    opacity: 0.7;
    font-size: 1.2rem;
}

.custom-toast .e-toast .e-toast-close-icon:hover {
    opacity: 1;
    transform: scale(1.1);
}

/* Responsive toast positioning */
@media (max-width: 768px) {
    .custom-toast.e-toast-container {
        top: 60px !important;
        right: 10px !important;
        left: 10px !important;
    }

    .custom-toast .e-toast {
        min-width: auto;
        width: 100%;
    }
}

