/* ==========================================================================
   Base Styles
   ========================================================================== */
html, body {
    font-family: 'Source Sans Pro', -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
    font-size: 1rem;
    font-weight: 400;
    height: 100%;
    overflow-x: hidden;
    background-color: #f4f6f9;
}

h1:focus {
    outline: none;
}

a, .btn-link {
    color: #007bff;
}

.btn-primary {
    color: #fff;
    background-color: #007bff;
    border-color: #0069d9;
}

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

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

code {
    color: #c02d76;
}

.sort-asc::after {
    content: " \25B2";
}

.sort-desc::after {
    content: " \25BC";
}

/* ==========================================================================
   Blazor Error UI & Loading
   ========================================================================== */
#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+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlw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Nzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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");
}

/* ==========================================================================
   ITFlow Layout - Wrapper
   ========================================================================== */
.wrapper {
    min-height: 100vh;
    position: relative;
}

/* ==========================================================================
   ITFlow Layout - Top Navbar
   ========================================================================== */
.main-header {
    position: fixed !important;
    top: 0;
    left: 250px;
    right: 0;
    z-index: 1030;
    height: 57px;
    display: flex !important;
    align-items: center;
    padding: 0 0.5rem;
    background-color: #343a40 !important;
    transition: left 0.3s ease-in-out;
}

.main-header .navbar-nav {
    display: flex;
    flex-direction: row !important;
    align-items: center;
    list-style: none;
    margin: 0;
    padding: 0;
    flex-wrap: nowrap;
}

.main-header .navbar-nav .nav-item {
    padding: 0;
    font-size: 1rem;
}

.main-header .navbar-nav .nav-link {
    color: rgba(255, 255, 255, 0.8) !important;
    padding: 0.5rem 0.75rem;
    cursor: pointer;
    text-decoration: none;
    display: flex;
    align-items: center;
    background: none;
    border: none;
    font-size: 1rem;
}

.main-header .navbar-nav .nav-link:hover {
    color: #fff !important;
}

.main-header .navbar-nav .nav-link i {
    font-size: 1.2rem;
}

/* Search form in navbar */
.main-header .form-control-navbar {
    background-color: rgba(255, 255, 255, 0.2) !important;
    border: none !important;
    color: #fff !important;
    border-radius: 0.25rem 0 0 0.25rem;
    height: 31px;
}

.main-header .form-control-navbar::placeholder {
    color: rgba(255, 255, 255, 0.6);
}

.main-header .form-control-navbar:focus {
    background-color: rgba(255, 255, 255, 0.3) !important;
    color: #fff !important;
    box-shadow: none !important;
    border: none !important;
}

.main-header .btn-navbar {
    background-color: rgba(255, 255, 255, 0.2);
    border: none;
    color: rgba(255, 255, 255, 0.8);
    padding: 0.25rem 0.75rem;
    height: 31px;
    border-radius: 0 0.25rem 0.25rem 0;
}

.main-header .btn-navbar:hover {
    background-color: rgba(255, 255, 255, 0.3);
    color: #fff;
}

/* User dropdown in navbar */
.main-header .dropdown {
    position: relative;
}

.main-header .dropdown-menu {
    position: absolute;
    right: 0;
    top: 100%;
    min-width: 200px;
    background: #fff;
    border: 1px solid rgba(0, 0, 0, .15);
    border-radius: 0.25rem;
    box-shadow: 0 0.5rem 1rem rgba(0, 0, 0, .175);
    z-index: 1050;
    margin-top: 0.25rem;
}

.main-header .dropdown-header {
    padding: 0.5rem 1rem;
    font-weight: 600;
    color: #6c757d;
    font-size: 0.875rem;
}

.main-header .dropdown-item {
    padding: 0.5rem 1rem;
    color: #212529;
    text-decoration: none;
    display: block;
    cursor: pointer;
    background: none;
    border: none;
    width: 100%;
    text-align: left;
    font-size: 0.875rem;
}

.main-header .dropdown-item:hover {
    background-color: #f8f9fa;
}

.main-header .dropdown-divider {
    border-top: 1px solid #e9ecef;
    margin: 0.25rem 0;
}

/* ==========================================================================
   ITFlow Layout - Sidebar
   ========================================================================== */
.main-sidebar {
    position: fixed !important;
    top: 0;
    left: 0;
    bottom: 0;
    width: 250px;
    z-index: 1038;
    background-color: #343a40 !important;
    overflow-y: auto;
    overflow-x: hidden;
    transition: transform 0.3s ease-in-out;
    scrollbar-width: thin;
    scrollbar-color: rgba(255, 255, 255, 0.2) transparent;
}

.main-sidebar::-webkit-scrollbar {
    width: 6px;
}

.main-sidebar::-webkit-scrollbar-thumb {
    background-color: rgba(255, 255, 255, 0.2);
    border-radius: 3px;
}

/* Brand */
.brand-link {
    display: flex !important;
    align-items: center;
    height: 57px;
    padding: 0.8125rem 1rem;
    font-size: 1.25rem;
    line-height: 1.5;
    color: rgba(255, 255, 255, 0.8) !important;
    border-bottom: 1px solid #4b545c;
    text-decoration: none !important;
    white-space: nowrap;
    overflow: hidden;
}

.brand-link:hover {
    color: #fff !important;
    text-decoration: none !important;
}

.brand-text {
    font-weight: 300;
}

/* Sidebar inner */
.sidebar {
    padding-top: 0.5rem;
    padding-bottom: 1rem;
}

/* ==========================================================================
   ITFlow Layout - Sidebar Navigation
   ========================================================================== */
.nav-sidebar {
    list-style: none !important;
    padding: 0 !important;
    margin: 0 !important;
    display: flex;
    flex-direction: column;
}

.nav-sidebar > .nav-item {
    margin-bottom: 0;
    width: 100%;
}

.nav-sidebar > .nav-item > .nav-link,
.nav-sidebar .nav-link {
    display: flex !important;
    align-items: center;
    padding: 0.5rem 1rem !important;
    color: #c2c7d0 !important;
    text-decoration: none !important;
    border-radius: 0 !important;
    position: relative;
    white-space: nowrap;
    transition: background-color 0.15s ease-in-out, color 0.15s ease-in-out;
    border-left: 3px solid transparent;
    height: auto;
    line-height: 1.5;
}

.nav-sidebar .nav-link:hover {
    background-color: rgba(255, 255, 255, 0.1) !important;
    color: #fff !important;
}

.nav-sidebar .nav-link.active {
    background-color: rgba(255, 255, 255, 0.08) !important;
    color: #fff !important;
    border-left-color: #007bff !important;
}

.nav-sidebar .nav-link.active .nav-icon {
    color: #fff !important;
}

/* Nav Icons */
.nav-icon {
    width: 1.6rem;
    font-size: 1.05rem;
    margin-right: 0.5rem;
    text-align: center;
    color: rgba(255, 255, 255, 0.6);
    flex-shrink: 0;
}

.nav-sidebar .nav-link:hover .nav-icon {
    color: rgba(255, 255, 255, 0.8);
}

/* Nav text */
.nav-sidebar .nav-link p {
    margin: 0;
    display: inline;
    white-space: nowrap;
    font-size: 0.95rem;
}

/* Section Headers */
.nav-sidebar .nav-header {
    padding: 1.2rem 1rem 0.5rem !important;
    font-size: 0.75rem;
    font-weight: 600;
    color: #8aa2b2 !important;
    text-transform: uppercase;
    letter-spacing: 0.05em;
    white-space: nowrap;
    overflow: hidden;
    list-style: none;
    background: none !important;
    border: none !important;
}

/* Nav Badge */
.nav-badge {
    margin-left: auto;
    font-size: 0.75rem;
    padding: 0.2em 0.5em;
    border-radius: 0.25rem;
    font-weight: 400;
    min-width: 1.5em;
    text-align: center;
}

/* ==========================================================================
   ITFlow Layout - Content Wrapper
   ========================================================================== */
.content-wrapper {
    margin-left: 250px;
    margin-top: 57px;
    min-height: calc(100vh - 57px - 57px);
    background-color: #f4f6f9 !important;
    padding: 1.25rem;
    transition: margin-left 0.3s ease-in-out;
}

/* ==========================================================================
   ITFlow Layout - Footer
   ========================================================================== */
.main-footer {
    margin-left: 250px;
    padding: 1rem 1.25rem;
    background-color: #fff;
    border-top: 1px solid #dee2e6;
    color: #869099;
    font-size: 0.875rem;
    transition: margin-left 0.3s ease-in-out;
}

.main-footer a {
    color: #007bff;
    text-decoration: none;
}

.main-footer a:hover {
    text-decoration: underline;
}

/* ==========================================================================
   ITFlow Layout - Sidebar Overlay (Mobile)
   ========================================================================== */
.sidebar-overlay {
    display: none;
    position: fixed;
    top: 0;
    left: 0;
    right: 0;
    bottom: 0;
    background-color: rgba(0, 0, 0, 0.5);
    z-index: 1037;
    cursor: pointer;
}

/* ==========================================================================
   ITFlow Layout - Responsive
   ========================================================================== */
@media (max-width: 767.98px) {
    .main-sidebar {
        transform: translateX(-250px);
    }

    .main-header {
        left: 0 !important;
    }

    .content-wrapper {
        margin-left: 0 !important;
    }

    .main-footer {
        margin-left: 0 !important;
    }

    .sidebar-open .main-sidebar {
        transform: translateX(0) !important;
    }

    .sidebar-open .sidebar-overlay {
        display: block !important;
    }
}

/* ==========================================================================
   ITFlow Layout - Cards & Widgets
   ========================================================================== */
.card {
    box-shadow: 0 0 1px rgba(0, 0, 0, .125), 0 1px 3px rgba(0, 0, 0, .2);
    margin-bottom: 1rem;
    border: 0;
    border-radius: 0.25rem;
}

.card-header {
    background-color: transparent;
    border-bottom: 1px solid rgba(0, 0, 0, .125);
    padding: 0.75rem 1.25rem;
}

.card-body {
    padding: 1.25rem;
}

/* Small box / info box (dashboard widgets) */
.small-box {
    border-radius: 0.25rem;
    box-shadow: 0 0 1px rgba(0, 0, 0, .125), 0 1px 3px rgba(0, 0, 0, .2);
    display: block;
    margin-bottom: 1rem;
    position: relative;
    padding: 1.25rem;
    color: #fff;
}

.small-box .inner h3 {
    font-size: 2.2rem;
    font-weight: 700;
    margin: 0 0 0.5rem;
}

.small-box .inner p {
    font-size: 1rem;
    margin: 0;
}

.small-box .icon {
    position: absolute;
    top: 0.75rem;
    right: 1rem;
    font-size: 4rem;
    opacity: 0.15;
}

.bg-info { background-color: #17a2b8 !important; }
.bg-success { background-color: #28a745 !important; }
.bg-warning { background-color: #ffc107 !important; }
.bg-danger { background-color: #dc3545 !important; }
.bg-primary { background-color: #007bff !important; }

/* Content Header (page titles) */
.content-header {
    padding: 0 0 1rem 0;
}

.content-header h1 {
    font-size: 1.8rem;
    margin: 0;
    font-weight: 400;
}

/* ==========================================================================
   Action dropdowns inside responsive tables
   --------------------------------------------------------------------------
   Bootstrap's .table-responsive sets overflow-x: auto, which per the CSS spec
   forces overflow-y to compute to auto as well. On a short table (e.g. a
   single row) an open action menu is then clipped and a scrollbar appears.
   While a menu is open, let the wrapper overflow so the menu can escape.
   ========================================================================== */
.table-responsive:has(.dropdown-menu.show) {
    overflow: visible;
}
