html, body {
    /* Same stack CgxTheme writes into --mud-typography-*-family, so the shell and the fonts
       Blazor paints before MudBlazor attaches are already the product's own. */
    font-family: 'Plus Jakarta Sans', system-ui, -apple-system, 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;
}

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

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

.invalid {
    outline: 1px solid red;
}

.validation-message {
    color: red;
}

#blazor-error-ui {
    color-scheme: light only;
    background: lightyellow;
    bottom: 0;
    box-shadow: 0 -1px 2px rgba(0, 0, 0, 0.2);
    box-sizing: border-box;
    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+PHBhdGggZD0iTTI2My41MDY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kzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #b32121;
    padding: 1rem 1rem 1rem 3.7rem;
    color: white;
}

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

/* =============================================================================
   Boot screen (the markup lives in index.html, inside #app)

   Blazor WebAssembly replaces #app's contents when the runtime is ready, so this is
   pure HTML/CSS with two framework hooks that must survive:

     • .loading-progress  — the boot script sets --blazor-load-percentage on this
       element, and its LAST <circle> is drawn as the arc. The dasharray formula below
       is the template's own (3.141 × percentage × 0.8, which is the circumference of
       r="40%" in that viewBox), so the circles keep their original geometry attributes
       and only the paint changes. Restyle the formula and progress silently freezes at
       zero while looking perfectly intentional.
     • .loading-progress-text — its ::after prints --blazor-load-percentage-text, which
       is "Loading" until the first byte and a real percentage after it.

   Everything else here is the product's own face: the brand ramp, the "C" mark, the
   wordmark. The rail under the wordmark is deliberately indeterminate — an unknown
   amount of work shown as movement rather than as a number nobody measured.
============================================================================= */
.cgx-boot {
    position: fixed;
    inset: 0;
    z-index: 2000;
    display: flex;
    flex-direction: column;
    align-items: center;
    justify-content: center;
    gap: 0;
    padding: 24px;
    text-align: center;
    color: #f1f0fa;
    background:
        radial-gradient(120% 100% at 50% -10%, #241f4d 0%, transparent 60%),
        linear-gradient(180deg, #12131d 0%, #0d0e16 100%);
    animation: cgx-boot-in 420ms cubic-bezier(.2, .7, .3, 1) both;
}

@keyframes cgx-boot-in {
    from { opacity: 0; }
    to { opacity: 1; }
}

/* One soft brand light behind the mark, plus a mesh that fades out fast — the same
   lit-surface language the console hero uses, so the first frame already looks like
   the app the buyer is about to see. */
.cgx-boot__glow {
    position: absolute;
    inset: 0;
    pointer-events: none;
    background:
        radial-gradient(46% 34% at 50% 34%, rgba(106, 92, 255, .30), transparent 70%),
        radial-gradient(30% 24% at 62% 30%, rgba(196, 92, 255, .16), transparent 72%);
}

.cgx-boot__glow::after {
    content: "";
    position: absolute;
    inset: 0;
    opacity: .5;
    background-image:
        linear-gradient(rgba(255, 255, 255, .05) 1px, transparent 1px),
        linear-gradient(90deg, rgba(255, 255, 255, .05) 1px, transparent 1px);
    background-size: 28px 28px;
    -webkit-mask-image: radial-gradient(60% 46% at 50% 38%, #000, transparent 72%);
    mask-image: radial-gradient(60% 46% at 50% 38%, #000, transparent 72%);
}

.cgx-boot__mark,
.cgx-boot__wordmark,
.cgx-boot__rail,
.loading-progress-text,
.cgx-boot__hint {
    position: relative;
}

.cgx-boot__mark {
    display: grid;
    place-items: center;
    width: 132px;
    height: 132px;
    margin-bottom: 22px;
}

/* The framework's arc, sized to the mark. It is absolutely placed so the glyph sits in
   the middle of it rather than under it. */
.loading-progress {
    position: absolute;
    inset: 0;
    display: block;
    width: 100%;
    height: 100%;
}

    .loading-progress circle {
        fill: none;
        stroke: rgba(255, 255, 255, .10);
        stroke-width: .5rem;
        transform-origin: 50% 50%;
        transform: rotate(-90deg);
    }

        /* The progress arc: brand ramp colour, rounded end, and a glow so a moving arc
           reads as energy rather than as a grey meter. The dasharray is the template's
           formula, untouched. */
        .loading-progress circle:last-child {
            stroke: #8b7bff;
            stroke-linecap: round;
            filter: drop-shadow(0 0 6px rgba(139, 123, 255, .75));
            stroke-dasharray: calc(3.141 * var(--blazor-load-percentage, 0%) * 0.8), 500%;
            transition: stroke-dasharray 120ms ease-out;
        }

/* The mark itself: the same circle the console, the portal shell and the sign-in page
   carry, so the boot screen is not a different product's logo. */
.cgx-boot__glyph {
    display: grid;
    place-items: center;
    width: 76px;
    height: 76px;
    border-radius: 24px;
    overflow: hidden;
    background: linear-gradient(120deg, #6a5cff, #9b5cff 55%, #c45cff);
    color: #fff;
    font-size: 2rem;
    font-weight: 800;
    line-height: 1;
    box-shadow: 0 18px 40px -16px rgba(106, 92, 255, .85), inset 0 1px 0 rgba(255, 255, 255, .35);
}

/* The operator's uploaded mark, when the control plane has one (see cgx-branding.js → bootMark). It fills
   the circle the letter occupied, keeping the radius and the glow, so the boot screen, the tab icon and the
   console's own brand circle are the same image. Cover rather than contain: buyers export squares, and a
   mark letterboxed inside a circle reads smaller than the platform's own. */
.cgx-boot__glyph img {
    width: 100%;
    height: 100%;
    object-fit: cover;
    display: block;
}

/* A halo that turns while the runtime loads — movement that means "working", drawn as a
   conic sweep rather than a spinner so it does not compete with the progress arc. */
.cgx-boot__halo {
    position: absolute;
    width: 104px;
    height: 104px;
    border-radius: 50%;
    background: conic-gradient(from 0deg, transparent 0deg, rgba(139, 123, 255, .55) 90deg, transparent 200deg);
    -webkit-mask-image: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
    mask-image: radial-gradient(farthest-side, transparent calc(100% - 3px), #000 calc(100% - 3px));
    animation: cgx-boot-spin 2.4s linear infinite;
}

@keyframes cgx-boot-spin {
    to { transform: rotate(360deg); }
}

.cgx-boot__wordmark {
    display: flex;
    flex-direction: column;
    gap: 3px;
    margin-bottom: 18px;
}

.cgx-boot__name {
    font-size: 1.2rem;
    font-weight: 800;
    letter-spacing: -.02em;
}

.cgx-boot__role {
    font-size: .68rem;
    font-weight: 700;
    letter-spacing: .16em;
    text-transform: uppercase;
    color: rgba(241, 240, 250, .55);
}

/* Indeterminate accent rail: a light travelling across a quiet track. */
.cgx-boot__rail {
    width: min(240px, 60vw);
    height: 3px;
    border-radius: 999px;
    background: rgba(255, 255, 255, .10);
    overflow: hidden;
    margin-bottom: 16px;
}

    .cgx-boot__rail i {
        display: block;
        width: 40%;
        height: 100%;
        border-radius: 999px;
        background: linear-gradient(90deg, transparent, #8b7bff 45%, #c45cff 60%, transparent);
        animation: cgx-boot-slide 1.35s ease-in-out infinite;
    }

@keyframes cgx-boot-slide {
    from { transform: translateX(-110%); }
    to { transform: translateX(260%); }
}

/* The framework's own percentage, now a line of the design instead of a floating label. */
.loading-progress-text {
    font-size: .82rem;
    font-weight: 700;
    letter-spacing: .04em;
    font-variant-numeric: tabular-nums;
    color: rgba(241, 240, 250, .78);
    min-height: 1.2em;
}

    .loading-progress-text:after {
        content: var(--blazor-load-percentage-text, "Loading");
    }

.cgx-boot__hint {
    margin: 8px 0 0;
    max-width: 38ch;
    font-size: .76rem;
    line-height: 1.5;
    color: rgba(241, 240, 250, .42);
}

/* A boot screen that spins at someone who asked their system not to is a defect, not a
   flourish. The arc and the percentage still work — they are information, not motion. */
@media (prefers-reduced-motion: reduce) {
    .cgx-boot { animation: none; }
    .cgx-boot__halo { animation: none; opacity: .35; }
    .cgx-boot__rail i { animation: none; width: 100%; opacity: .35; }
    .loading-progress circle:last-child { transition: none; }
}

code {
    color: #c02d76;
}

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