html, body {
    font-family: 'Outfit', -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
}

/* ── Breadcrumb ──────────────────────────────────────────────────────────── */
.breadcrumb {
    --bs-breadcrumb-divider: '›';
    --bs-breadcrumb-divider-color: #adb5bd;
    margin-bottom: 0;
    flex-wrap: nowrap;
    align-items: center;
    font-size: 0.9375rem;
}

.breadcrumb-item + .breadcrumb-item::before {
    color: #adb5bd;
    padding: 0 0.45rem;
}

.breadcrumb-item a,
.breadcrumb-item .df-crumb-btn {
    color: #6c757d;
    text-decoration: none;
    font-weight: 400;
}

.breadcrumb-item a:hover,
.breadcrumb-item .df-crumb-btn:hover {
    color: #1b6ec2;
    text-decoration: underline;
}

.breadcrumb-item.active {
    color: #1a1a2e;
    font-weight: 600;
}

nav[aria-label="breadcrumb"] {
    margin-bottom: 1rem;
}
/* ─────────────────────────────────────────────────────────────────────────── */

a, .btn-link {
    color: #006bb7;
}

.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: 0.4rem;
}

h1:focus {
    outline: none;
}

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

.invalid {
    outline: 1px solid #e50000;
}

.validation-message {
    color: #e50000;
}

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFB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Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

    .blazor-error-boundary::after {
        content: "An error has occurred."
    }

.darker-border-checkbox.form-check-input {
    border-color: #929292;
}

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

/* =========================================================================
   Sidebar collapsed-rail state.
   Driven by `html.sidebar-collapsed`, which an inline <head> script in
   App.razor applies synchronously from localStorage BEFORE first paint.
   This avoids the flash that previously occurred when the per-checkbox
   state was reset by Blazor Web App's enhanced-navigation DOM swaps.
   These rules live in app.css (not the scoped MainLayout.razor.css) so
   they target <html> reliably without the per-component [b-xxx] scope
   attribute Blazor adds to scoped selectors.
   ========================================================================= */
@media (min-width: 641px) {
    /* Pin the collapsed rail to the viewport so it cannot slide horizontally
       when the page has any horizontal overflow. `position: fixed` removes
       it from the flex flow, so reserve the same width as padding-left on
       `.page` (see rule below) to prevent the main content from sliding
       underneath the rail. */
    html.sidebar-collapsed .sidebar {
        width: 48px !important;
        min-width: 48px !important;
        max-width: 48px !important;
        flex: 0 0 48px !important;
        position: fixed !important;
        top: 44px !important;
        left: 0 !important;
        bottom: 0 !important;
        height: calc(100vh - 44px) !important;
        z-index: 1020;
        overflow: hidden !important;
    }
    /* Reserve the rail's footprint so main content doesn't reflow under it. */
    html.sidebar-collapsed .page {
        padding-left: 48px;
    }
    /* Lock the rail: no horizontal or vertical scrollbar, no overflow. */
    html.sidebar-collapsed .sidebar .nav-scrollable {
        overflow: hidden !important;
        scrollbar-width: none !important; /* Firefox */
    }
    html.sidebar-collapsed .sidebar .nav-scrollable::-webkit-scrollbar {
        display: none !important; /* Chrome / Edge / Safari */
        width: 0 !important;
        height: 0 !important;
    }
    /* Strip Bootstrap nav-item gutters so the link can fully center inside
       the 48px rail. */
    html.sidebar-collapsed .sidebar .nav-item {
        padding-left: 0 !important;
        padding-right: 0 !important;
        margin-left: 0 !important;
        margin-right: 0 !important;
        width: 48px !important;
        max-width: 48px !important;
        display: flex;
        justify-content: center;
    }
    /* Rail nav-link: stack the icon and a small label underneath, both
       horizontally centered inside the 48px column. */
    html.sidebar-collapsed .sidebar .nav-link {
        flex-direction: column !important;
        justify-content: center !important;
        align-items: center !important;
        gap: 2px !important;
        padding: 4px 0 !important;
        height: auto !important;
        min-height: 2.6rem;
        width: 48px !important;
        max-width: 48px !important;
        text-align: center;
        line-height: 1.05;
        overflow: hidden;
    }
    /* Force the icon to a fixed-width centered box so font-awesome glyphs
       of differing intrinsic widths all sit on the same vertical axis. */
    html.sidebar-collapsed .sidebar .nav-link > i,
    html.sidebar-collapsed .sidebar .nav-link .nav-icon {
        font-size: 1rem !important;
        width: 1.25rem !important;
        text-align: center !important;
        margin: 0 auto !important;
        display: inline-block !important;
        line-height: 1 !important;
    }
    /* Hide label text completely when collapsed — icon only. */
    html.sidebar-collapsed .sidebar .nav-link > span {
        display: none !important;
    }
    /* Section headers — hide their text but keep the spacing/divider. */
    html.sidebar-collapsed .sidebar .nav-section-header small {
        display: none !important;
    }
    html.sidebar-collapsed .sidebar .nav-section-header {
        padding-top: 0.25rem !important;
    }
    /* Active link's left accent border eats horizontal space here. */
    html.sidebar-collapsed .sidebar a.active {
        border-left: none !important;
        padding-left: 0 !important;
    }
    /* Disable the hover background/translate effect on collapsed rail items
       — the rail should feel like a static icon strip, not an interactive
       button row. The link itself is still clickable. */
    html.sidebar-collapsed .sidebar .nav-link:hover,
    html.sidebar-collapsed .sidebar .nav-link:focus,
    html.sidebar-collapsed .sidebar .nav-link:active,
    html.sidebar-collapsed .sidebar .nav-item:hover .nav-link,
    html.sidebar-collapsed .sidebar a.nav-link:hover {
        background-color: transparent !important;
        color: rgba(255,255,255,0.75) !important;
        transform: none !important;
        box-shadow: none !important;
    }
    /* Preserve the active item's appearance even on hover. */
    html.sidebar-collapsed .sidebar a.active,
    html.sidebar-collapsed .sidebar a.active:hover,
    html.sidebar-collapsed .sidebar a.active:focus {
        background-color: rgba(0, 122, 204, 0.25) !important;
        color: #ffffff !important;
    }
    /* Pinned brand strip: keep icon, hide "FAIDesk" label. */
    html.sidebar-collapsed .sidebar .sidebar-brand-text {
        display: none !important;
    }
    /* Flip the topbar toggle glyph to point "out" when collapsed. */
    html.sidebar-collapsed .app-topbar .sidebar-toggle-btn i {
        transform: scaleX(-1);
    }
}