html, body {
    font-family: 'Helvetica Neue', Helvetica, Arial, sans-serif;
}

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

/* Blazor unhandled-error banner — hidden until the framework shows it on a real error (#1368).
 * The new WebShell renders #blazor-error-ui, but the hide rule lived in the retired MainLayout's
 * scoped CSS, so the banner showed permanently. This GLOBAL rule restores the default behaviour:
 * blazor.web.js sets `display: block` inline only when an unhandled error actually occurs. */
#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;
    }

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

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,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5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4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) 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;
}
/* ── QR Scanner Component ──────────────────────────────────────────────── */

.qr-scanner-wrapper {
    max-width: 640px;
}

.scanner-viewport {
    background: #000;
    border-radius: .5rem;
    overflow: hidden;
}

.scanner-video {
    display: block;
}

.scanner-reticle {
    pointer-events: none;
}

.scan-result-success {
    background-color: #d1e7dd;
    color: #0a3622;
}

.scan-result-warning {
    background-color: #fff3cd;
    color: #664d03;
}

.scan-result-error {
    background-color: #f8d7da;
    color: #58151c;
}

.scanner-offline .scanner-viewport {
    opacity: .85;
}

@media (orientation: landscape) and (max-width: 900px) {
    .qr-scanner-wrapper {
        max-width: 100%;
    }

    .scanner-viewport video {
        max-height: 200px;
    }
}

/* ===== Adaptive Shell chrome (PLAT-049 / #1340) ===========================
 * Operator Zone-3 frame: Tier-1 rail column + main column (TopBar + content).
 * Component styling (rail/tabs/breadcrumb) ships in platform.css; this is only the
 * host layout grid + TopBar. --acs-* tokens (with literal fallbacks) keep it on-brand. */
.web-shell {
    display: flex;
    height: 100vh;
    overflow: hidden;
    background-color: var(--acs-color-bg, #ffffff);
}

/* The rail fills the viewport and scrolls independently of the page content. */
.web-shell > .acs-rail {
    height: 100vh;
    flex-shrink: 0;
    overflow-y: auto;
}

.web-shell__main {
    display: flex;
    flex-direction: column;
    flex: 1;
    min-width: 0;
    height: 100vh;
    overflow: hidden;
}

/* Page content scrolls beneath the fixed TopBar (Azure-Portal-style app shell).
 * PLAT-357 #4156: declaring only `overflow-y` is not enough. CSS computes an unset `overflow-x`
 * to `auto` as soon as the other axis is not `visible`, so this frame grew a horizontal scrollbar
 * along its bottom edge whenever anything inside it overflowed horizontally. That bar lives in the
 * frame's fixed bottom band and takes the pointer, so a control that lands in that band cannot be
 * clicked at all. Pinning the x axis to `hidden` makes that impossible on every page in the shell.
 * `scrollbar-gutter: stable` reserves the vertical bar's track so content does not shift sideways
 * when it appears. Wide content must scroll inside its own container (e.g. `.table-responsive`);
 * the shell's scroll container is not a horizontal scroller. */
.web-shell__main > .acs-content-frame {
    flex: 1;
    min-height: 0;
    overflow: hidden auto;
    scrollbar-gutter: stable;
}

/* PLAT-204 #2479: the resolved-plane indicator. Small, fixed, on every page including before login.
 * `pointer-events: none` is load-bearing, not tidiness: PLAT-357 #4156 was a control in the frame's
 * bottom band made unclickable by something else occupying it, and a permanent badge parked in that
 * same band would recreate exactly that defect. It is a read-only surface, so it never needs the
 * pointer. `scrollbar-gutter` on the frame keeps it clear of the vertical bar's track. */
.acs-resolved-tenant {
    position: fixed;
    bottom: 0;
    left: 0;
    z-index: 900;
    padding: 2px 8px;
    border-top-right-radius: var(--acs-radius-sm, 4px);
    font-family: var(--acs-font-mono, ui-monospace, monospace);
    font-size: 11px;
    line-height: 1.6;
    letter-spacing: .3px;
    pointer-events: none;
    color: var(--acs-color-text-muted, #64748b);
    background-color: var(--acs-color-surface, #f8fafc);
    border-top: 1px solid var(--acs-color-border, #e2e8f0);
    border-right: 1px solid var(--acs-color-border, #e2e8f0);
}

/* The platform plane is the one an operator must never mistake for a tenant, so it is marked rather
 * than left to read as just another label. */
.acs-resolved-tenant[data-plane="Platform"] {
    color: var(--acs-color-primary, #1b6ec2);
    font-weight: 600;
}

/* The rail width change animates smoothly (collapse toggle, js/shell.js). */
.acs-rail {
    transition: width .15s ease;
}

.web-topbar {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: 16px;
    height: 56px;
    flex-shrink: 0;
    padding: 0 16px;
    border-bottom: 1px solid var(--acs-color-border, #e2e8f0);
    background-color: var(--acs-color-surface, #f8fafc);
    box-shadow: var(--acs-shadow, 0 1px 2px rgba(15, 23, 42, .06));
    position: relative;
    z-index: 5;
}

.web-topbar__home {
    font-weight: 600;
    text-decoration: none;
    color: var(--acs-color-text, #1e293b);
}

.web-topbar__actions {
    display: flex;
    align-items: center;
    gap: 16px;
}

.web-topbar__link {
    text-decoration: none;
    color: var(--acs-color-text-muted, #64748b);
}
