/*
 * Design tokens. Every page reads these through Bootstrap's own variables, so the light and dark
 * themes (data-bs-theme on <html>, set by theme.js) restyle the whole app without page changes.
 */
:root,
[data-bs-theme=light] {
    --em-bg: #f5f6fa;
    --em-surface: #ffffff;
    --em-surface-2: #f8f9fc;
    --em-border: #e2e5ed;
    --em-control-border: #8a93a6;
    --em-text: #1a1e29;
    --em-muted: #566074;
    --em-accent: #2453c2;
    --em-accent-hover: #1b3f99;
    --em-accent-rgb: 36, 83, 194;
    --em-primary: #2453c2;
    --em-primary-hover: #1b3f99;
    --em-go: #1d7a41;
    --em-go-hover: #16622f;
    --em-danger: #c22a2a;
    --em-danger-hover: #a11f1f;
    --em-ok-bg: #e4f3e8;
    --em-ok-fg: #1b6331;
    --em-warn-bg: #fff3d3;
    --em-warn-fg: #714400;
    --em-warn-border: #ecc970;
    --em-bad-bg: #fbe8e8;
    --em-bad-fg: #9c1c1c;
    --em-bad-border: #efb9b9;
    --em-info-bg: #e7edfb;
    --em-info-fg: #1f3f99;
    --em-info-border: #bccbf3;
    --em-neutral-bg: #edeff4;
    --em-neutral-fg: #454e61;
    --em-scrim: rgba(14, 17, 32, 0.45);
    --em-shadow: 0 20px 50px rgba(0, 0, 0, 0.25);
    --em-focus: 0 0 0 0.2rem rgba(36, 83, 194, 0.35);

    --bs-body-bg: var(--em-bg);
    --bs-body-color: var(--em-text);
    --bs-secondary-color: var(--em-muted);
    --bs-border-color: var(--em-border);
    --bs-emphasis-color: var(--em-text);
    --bs-link-color: var(--em-accent);
    --bs-link-color-rgb: var(--em-accent-rgb);
    --bs-link-hover-color: var(--em-accent-hover);
    --bs-link-hover-color-rgb: 27, 63, 153;
    --bs-primary: var(--em-primary);
    --bs-primary-rgb: var(--em-accent-rgb);
    --bs-code-color: var(--em-text);
}

[data-bs-theme=dark] {
    color-scheme: dark;
    --em-bg: #0e1120;
    --em-surface: #161a2b;
    --em-surface-2: #1b2034;
    --em-border: #2a3046;
    --em-control-border: #6b7590;
    --em-text: #e6e8f0;
    --em-muted: #a0a8ba;
    --em-accent: #86a6ff;
    --em-accent-hover: #b0c4ff;
    --em-accent-rgb: 134, 166, 255;
    --em-primary: #3c64d8;
    --em-primary-hover: #4d74e6;
    --em-go: #217a44;
    --em-go-hover: #2a8c50;
    --em-danger: #b83232;
    --em-danger-hover: #cc3c3c;
    --em-ok-bg: #12321f;
    --em-ok-fg: #86dba1;
    --em-warn-bg: #382a0a;
    --em-warn-fg: #f3c96e;
    --em-warn-border: #6b5216;
    --em-bad-bg: #3c1717;
    --em-bad-fg: #ff9f9f;
    --em-bad-border: #6e2b2b;
    --em-info-bg: #1b2648;
    --em-info-fg: #adc0ff;
    --em-info-border: #2f3f73;
    --em-neutral-bg: #242a3c;
    --em-neutral-fg: #bcc2d0;
    --em-scrim: rgba(0, 0, 0, 0.6);
    --em-focus: 0 0 0 0.2rem rgba(134, 166, 255, 0.4);

    --bs-body-bg: var(--em-bg);
    --bs-body-color: var(--em-text);
    --bs-secondary-color: var(--em-muted);
    --bs-border-color: var(--em-border);
    --bs-emphasis-color: var(--em-text);
    --bs-link-color: var(--em-accent);
    --bs-link-color-rgb: var(--em-accent-rgb);
    --bs-link-hover-color: var(--em-accent-hover);
    --bs-link-hover-color-rgb: 176, 196, 255;
    --bs-primary: var(--em-primary);
    --bs-primary-rgb: var(--em-accent-rgb);
    --bs-code-color: var(--em-text);
}

:root {
    --bs-body-font-family: 'IBM Plex Sans', system-ui, -apple-system, 'Segoe UI', sans-serif;
    --bs-font-monospace: 'IBM Plex Mono', ui-monospace, SFMono-Regular, Menlo, Consolas, monospace;
    --bs-body-font-size: 0.9375rem;
    --bs-border-radius: 0.5rem;
    --bs-border-radius-sm: 0.375rem;
    --bs-border-radius-lg: 0.75rem;
}

a {
    text-decoration: none;
}

a:hover {
    text-decoration: underline;
}

h1, .h1 {
    font-size: 1.75rem;
    font-weight: 600;
    letter-spacing: -0.01em;
}

h2, .h2 { font-size: 1.375rem; font-weight: 600; }
h3, .h3 { font-size: 1.125rem; font-weight: 600; }
h4, .h4 { font-size: 1.0625rem; font-weight: 600; }
h5, .h5 { font-size: 1rem; font-weight: 600; }

h1:focus {
    outline: none;
}

code {
    font-size: 0.8125rem;
}

/* Buttons: Bootstrap's variants, re-pointed at the tokens. */
.btn {
    --bs-btn-font-weight: 500;
    --bs-btn-border-radius: 0.5rem;
    --bs-btn-focus-box-shadow: var(--em-focus);
}

.btn-primary {
    --bs-btn-bg: var(--em-primary);
    --bs-btn-border-color: var(--em-primary);
    --bs-btn-hover-bg: var(--em-primary-hover);
    --bs-btn-hover-border-color: var(--em-primary-hover);
    --bs-btn-active-bg: var(--em-primary-hover);
    --bs-btn-active-border-color: var(--em-primary-hover);
    --bs-btn-disabled-bg: var(--em-primary);
    --bs-btn-disabled-border-color: var(--em-primary);
}

.btn-success {
    --bs-btn-bg: var(--em-go);
    --bs-btn-border-color: var(--em-go);
    --bs-btn-hover-bg: var(--em-go-hover);
    --bs-btn-hover-border-color: var(--em-go-hover);
    --bs-btn-active-bg: var(--em-go-hover);
    --bs-btn-active-border-color: var(--em-go-hover);
    --bs-btn-disabled-bg: var(--em-go);
    --bs-btn-disabled-border-color: var(--em-go);
}

.btn-danger {
    --bs-btn-bg: var(--em-danger);
    --bs-btn-border-color: var(--em-danger);
    --bs-btn-hover-bg: var(--em-danger-hover);
    --bs-btn-hover-border-color: var(--em-danger-hover);
    --bs-btn-active-bg: var(--em-danger-hover);
    --bs-btn-active-border-color: var(--em-danger-hover);
    --bs-btn-disabled-bg: var(--em-danger);
    --bs-btn-disabled-border-color: var(--em-danger);
}

.btn-secondary,
.btn-outline-secondary {
    --bs-btn-color: var(--em-text);
    --bs-btn-bg: var(--em-surface);
    --bs-btn-border-color: var(--em-border);
    --bs-btn-hover-color: var(--em-text);
    --bs-btn-hover-bg: var(--em-surface-2);
    --bs-btn-hover-border-color: var(--em-border);
    --bs-btn-active-color: var(--em-text);
    --bs-btn-active-bg: var(--em-neutral-bg);
    --bs-btn-active-border-color: var(--em-border);
    --bs-btn-disabled-color: var(--em-muted);
    --bs-btn-disabled-bg: var(--em-surface);
    --bs-btn-disabled-border-color: var(--em-border);
}

.btn-outline-primary {
    --bs-btn-color: var(--em-accent);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: var(--em-info-border);
    --bs-btn-hover-color: var(--em-accent);
    --bs-btn-hover-bg: var(--em-info-bg);
    --bs-btn-hover-border-color: var(--em-info-border);
    --bs-btn-active-color: var(--em-accent);
    --bs-btn-active-bg: var(--em-info-bg);
    --bs-btn-active-border-color: var(--em-accent);
    --bs-btn-disabled-color: var(--em-accent);
    --bs-btn-disabled-border-color: var(--em-info-border);
}

.btn-outline-danger {
    --bs-btn-color: var(--em-bad-fg);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: var(--em-bad-border);
    --bs-btn-hover-color: var(--em-bad-fg);
    --bs-btn-hover-bg: var(--em-bad-bg);
    --bs-btn-hover-border-color: var(--em-bad-border);
    --bs-btn-active-color: var(--em-bad-fg);
    --bs-btn-active-bg: var(--em-bad-bg);
    --bs-btn-active-border-color: var(--em-bad-fg);
    --bs-btn-disabled-color: var(--em-bad-fg);
    --bs-btn-disabled-border-color: var(--em-bad-border);
}

.btn-link {
    --bs-btn-color: var(--em-accent);
    --bs-btn-hover-color: var(--em-accent-hover);
}

/* A quiet action next to a stronger one: accent text, a tint on hover. */
.btn-ghost {
    --bs-btn-color: var(--em-accent);
    --bs-btn-bg: transparent;
    --bs-btn-border-color: transparent;
    --bs-btn-hover-color: var(--em-accent);
    --bs-btn-hover-bg: var(--em-info-bg);
    --bs-btn-hover-border-color: transparent;
    --bs-btn-active-color: var(--em-accent);
    --bs-btn-active-bg: var(--em-info-bg);
    --bs-btn-active-border-color: transparent;
}

.btn {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    gap: 0.5rem;
}

.btn:focus-visible, .form-control:focus, .form-select:focus, .form-check-input:focus {
    box-shadow: var(--em-focus);
}

/* Checkboxes and radios need a border people can see (3:1 against the surface). */
.form-check-input {
    border-color: var(--em-control-border);
}

.form-check-input:checked {
    background-color: var(--em-primary);
    border-color: var(--em-primary);
}

/* Surfaces: Bootstrap cards and the app's own .surface share one look. */
.card {
    --bs-card-bg: var(--em-surface);
    --bs-card-border-color: var(--em-border);
    --bs-card-border-radius: 0.75rem;
    --bs-card-inner-border-radius: calc(0.75rem - 1px);
    --bs-card-spacer-y: 1.25rem;
    --bs-card-spacer-x: 1.25rem;
}

.card.border-warning {
    border-color: var(--em-warn-border) !important;
}

.surface {
    background: var(--em-surface);
    border: 1px solid var(--em-border);
    border-radius: 0.75rem;
}

.surface-title {
    margin: 0;
    padding: 1rem 1rem 0.875rem;
    font-size: 1rem;
    font-weight: 600;
}

/* A card's heading row when it carries more than a title: a note beside it, an action on the right. */
.surface-head {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 1rem 1rem 0.875rem;
}

.surface-head-title {
    display: flex;
    flex-wrap: wrap;
    align-items: baseline;
    gap: 0.25rem 0.75rem;
}

.surface-head-title h2 {
    margin: 0;
    font-size: 1.125rem;
}

/* A line of text inside a card where a table would be (loading, nothing yet). */
.surface-note {
    margin: 0;
    padding: 0 1rem 1rem;
}

.surface > .surface-note:first-child {
    padding-top: 1rem;
}

/* The header every page opens with: title, a line of description, actions on the right. */
.page-header {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: flex-end;
    gap: 1rem;
    margin-bottom: 1.5rem;
}

.page-header h1,
.page-header h2 {
    margin: 0 0 0.375rem;
    line-height: 1.2;
}

.page-header p {
    margin: 0;
    color: var(--em-muted);
    max-width: 72ch;
}

/* The title and description give way to the actions, which stay on the right while they fit. */
.page-header > div:first-child:not(:only-child) {
    flex: 1 1 24rem;
    min-width: 0;
}

.page-header-title {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.page-header-title h1,
.page-header-title h2 {
    margin-bottom: 0;
}

.page-header-title + p {
    margin-top: 0.375rem;
}

/* A status: one word in a soft colour with a dot. StatusPill renders these everywhere. */
.status-pill {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: 1.375rem;
    padding: 0 0.5625rem;
    border-radius: 999px;
    font-size: 0.75rem;
    font-weight: 500;
    line-height: 1;
    white-space: nowrap;
    vertical-align: middle;
}

.status-pill::before {
    content: "";
    width: 0.375rem;
    height: 0.375rem;
    border-radius: 50%;
    background: currentColor;
}

/* A plan-only job's status: "planned", then what became of the plan (JobStatus). */
.job-status {
    display: inline-flex;
    white-space: nowrap;
    align-items: center;
    gap: 0.375rem;
}

.job-status a:has(.status-pill) {
    text-decoration: none;
}

.status-ok { background: var(--em-ok-bg); color: var(--em-ok-fg); }
.status-warn { background: var(--em-warn-bg); color: var(--em-warn-fg); }
.status-bad { background: var(--em-bad-bg); color: var(--em-bad-fg); }
.status-info { background: var(--em-info-bg); color: var(--em-info-fg); }
.status-neutral { background: var(--em-neutral-bg); color: var(--em-neutral-fg); }

/* An identifier (task, branch, project) in monospace on a grey tag. */
.chip {
    display: inline-flex;
    align-items: center;
    height: 1.375rem;
    padding: 0 0.5rem;
    border-radius: 0.375rem;
    background: var(--em-neutral-bg);
    color: var(--em-neutral-fg);
    font-family: var(--bs-font-monospace);
    font-size: 0.75rem;
    white-space: nowrap;
}

.chip-lg {
    height: 1.625rem;
    font-size: 0.8125rem;
}

.chip-list {
    display: inline-flex;
    flex-wrap: wrap;
    gap: 0.375rem;
}

/* Actions that destroy or forget something, each a row: what it does on the left, its button on the right. */
.danger-zone {
    border-color: var(--em-bad-border);
}

.danger-row {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem 1.5rem;
    padding: 0.875rem 1rem;
    border-top: 1px solid var(--em-border);
}

.danger-row > div {
    flex: 1 1 20rem;
}

/* Two or three choices of what a list shows ("Mine", "All"), one of them pressed. */
.segmented {
    display: inline-flex;
    padding: 0.1875rem;
    gap: 0.1875rem;
    border-radius: 0.625rem;
    background: var(--em-neutral-bg);
}

.segmented button {
    display: inline-flex;
    align-items: center;
    gap: 0.375rem;
    height: 2rem;
    padding: 0 0.75rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--em-muted);
    font-size: 0.875rem;
    font-weight: 500;
}

.segmented button.active {
    background: var(--em-surface);
    color: var(--bs-body-color);
    box-shadow: 0 1px 2px rgb(0 0 0 / 0.08);
}

.segmented-count {
    font-size: 0.75rem;
    color: var(--em-muted);
}

/* A short uppercase marker such as "current" or "base". */
.tag {
    display: inline-flex;
    align-items: center;
    height: 1.25rem;
    padding: 0 0.4375rem;
    border-radius: 0.375rem;
    background: var(--em-info-bg);
    color: var(--em-info-fg);
    font-size: 0.6875rem;
    font-weight: 600;
    letter-spacing: 0.03em;
    text-transform: uppercase;
    vertical-align: middle;
    white-space: nowrap; /* A fixed-height marker: a wrapped one spills onto its neighbours. */
}

.mono {
    font-family: var(--bs-font-monospace);
    font-size: 0.8125rem;
}

.text-muted {
    color: var(--em-muted) !important;
}

/* Key and value pairs inside a card. */
.facts {
    display: grid;
    grid-template-columns: minmax(5.75rem, max-content) 1fr;
    gap: 0.625rem 0.75rem;
    margin: 0;
    font-size: 0.875rem;
}

.facts dt {
    font-weight: 400;
    color: var(--em-muted);
}

.facts dd {
    margin: 0;
    min-width: 0;
    overflow-wrap: anywhere;
}

/* A callout inside a card or above it. */
.callout {
    display: flex;
    gap: 0.625rem;
    align-items: flex-start;
    border-radius: 0.5rem;
    padding: 0.625rem 0.75rem;
    font-size: 0.875rem;
}

.callout > svg {
    flex: none;
    margin-top: 0.125rem;
}

.callout a {
    color: inherit;
    font-weight: 600;
    text-decoration: underline;
}

.callout-warn { background: var(--em-warn-bg); color: var(--em-warn-fg); }
.callout-info { background: var(--em-info-bg); color: var(--em-info-fg); border: 1px solid var(--em-info-border); }
.callout-bad { background: var(--em-bad-bg); color: var(--em-bad-fg); }

/* A large status icon in a circle, as on the current-deployment cards. */
.status-icon {
    width: 3rem;
    height: 3rem;
    flex: none;
    border-radius: 50%;
    display: grid;
    place-items: center;
}

.status-icon-ok { background: var(--em-ok-bg); color: var(--em-ok-fg); }
.status-icon-warn { background: var(--em-warn-bg); color: var(--em-warn-fg); }
.status-icon-bad { background: var(--em-bad-bg); color: var(--em-bad-fg); }
.status-icon-info { background: var(--em-info-bg); color: var(--em-info-fg); }

/* The summary card at the top of an environment page: icon, details, actions. */
.summary-card {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 1.25rem;
    padding: 1.25rem 1.5rem;
    margin-bottom: 1.5rem;
}

.summary-card-body {
    flex: 1 1 22rem;
    min-width: 0;
    display: flex;
    flex-direction: column;
    gap: 0.625rem;
}

.summary-card-heading {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.625rem;
}

.summary-card-heading h2 {
    margin: 0;
    font-size: 1.125rem;
}

.summary-card-actions {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Dialogs drawn by Blazor (no Bootstrap JS): a scrim and a centred panel. */
.dialog-scrim {
    position: fixed;
    inset: 0;
    z-index: 1050;
    background: var(--em-scrim);
    display: flex;
    align-items: center;
    justify-content: center;
    padding: 1rem;
}

.dialog {
    width: 100%;
    max-width: 28rem;
    background: var(--em-surface);
    border: 1px solid var(--em-border);
    border-radius: 0.875rem;
    padding: 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1rem;
    box-shadow: var(--em-shadow);
}

.dialog-wide {
    max-width: 36rem;
}

/* A fieldset's legend set as a form label, not Bootstrap's heading-sized one. */
legend.form-label {
    float: none;
    font-size: inherit;
    margin-bottom: 0.5rem;
}

.dialog:focus {
    outline: none; /* focused only so the keyboard starts inside it */
}

.dialog-head {
    display: flex;
    gap: 0.875rem;
    align-items: flex-start;
}

.dialog-head h2 {
    margin: 0 0 0.375rem;
    font-size: 1.125rem;
}

.dialog-head p {
    margin: 0;
    color: var(--em-muted);
    font-size: 0.875rem;
}

.dialog-head .status-icon {
    width: 2.5rem;
    height: 2.5rem;
}

.dialog-actions {
    display: flex;
    justify-content: flex-end;
    flex-wrap: wrap;
    gap: 0.5rem;
}

.icon-button {
    width: 2.75rem;
    height: 2.75rem;
    flex: none;
    display: inline-grid;
    place-items: center;
    border: 0;
    border-radius: 0.625rem;
    background: transparent;
    color: var(--em-muted);
    cursor: pointer;
}

.icon-button:hover {
    background: var(--em-neutral-bg);
    color: var(--em-text);
}

.icon-button:focus-visible {
    outline: none;
    box-shadow: var(--em-focus);
}

/* The theme switch shows one icon at a time: the moon offers dark, the sun offers light. */
.theme-icon-sun,
[data-bs-theme=dark] .theme-icon-moon {
    display: none;
}

[data-bs-theme=dark] .theme-icon-sun {
    display: block;
}

.spin {
    animation: em-spin 1s linear infinite;
}

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

@media (prefers-reduced-motion: reduce) {
    .spin { animation: 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+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."
    }

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

/* Tables: white rows, quiet uppercase headings. Inside a .surface the card draws the border. */
.table {
    --bs-table-bg: var(--em-surface);
    --bs-table-color: var(--em-text);
    --bs-table-border-color: var(--em-border);
    --bs-table-hover-bg: var(--em-surface-2);
    --bs-table-hover-color: var(--em-text);
    --bs-table-striped-bg: var(--em-surface-2);
    font-size: 0.875rem;
    border: 1px solid var(--em-border);
}

.table > :not(caption) > * > * {
    padding: 0.75rem 1rem;
}

.table-sm > :not(caption) > * > * {
    padding: 0.5rem 0.75rem;
}

.table > thead th {
    font-size: 0.75rem;
    font-weight: 600;
    letter-spacing: 0.04em;
    text-transform: uppercase;
    color: var(--em-muted);
    background: var(--em-surface-2);
    white-space: nowrap;
}

.table > tbody > tr:hover > * {
    --bs-table-bg-state: var(--em-surface-2);
}

.table-wrap {
    overflow-x: auto;
}

.surface .table {
    border-width: 0; /* not "border: 0", which resets the colour the cells inherit */
    margin: 0;
}

.surface > .table-wrap {
    border-top: 1px solid var(--em-border);
}

.surface > .table-wrap > .table > tbody > tr:last-child > * {
    border-bottom-width: 0;
}

.table-footer {
    display: flex;
    flex-wrap: wrap;
    justify-content: space-between;
    align-items: center;
    gap: 0.75rem;
    padding: 0.625rem 1rem;
    border-top: 1px solid var(--em-border);
    font-size: 0.8125rem;
    color: var(--em-muted);
}

/* Page numbers under a table. */
.pager {
    display: flex;
    gap: 0.25rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.pager-link {
    display: inline-flex;
    align-items: center;
    justify-content: center;
    min-width: 2.25rem;
    height: 2.25rem;
    padding: 0 0.625rem;
    border: 0;
    border-radius: 0.5rem;
    background: transparent;
    color: var(--em-text);
    font: inherit;
    font-size: 0.875rem;
    cursor: pointer;
}

.pager-link:hover:not(:disabled) {
    background: var(--em-neutral-bg);
}

.pager-link[aria-current=page] {
    background: var(--em-info-bg);
    color: var(--em-info-fg);
    font-weight: 600;
}

.pager-link:disabled {
    color: var(--em-muted);
    opacity: 0.6;
    cursor: default;
}

/* Bootstrap components that should sit on the same surfaces as the cards. */
.alert {
    --bs-alert-border-radius: 0.625rem;
}

.nav-tabs {
    --bs-nav-tabs-link-active-bg: var(--em-surface);
    --bs-nav-tabs-link-active-border-color: var(--em-border) var(--em-border) var(--em-surface);
    --bs-nav-tabs-border-color: var(--em-border);
}

.form-control, .form-select {
    --bs-body-bg: var(--em-surface);
}

.modal {
    --bs-modal-bg: var(--em-surface);
    --bs-modal-border-color: var(--em-border);
    --bs-modal-border-radius: 0.875rem;
}

.list-group {
    --bs-list-group-bg: var(--em-surface);
    --bs-list-group-border-color: var(--em-border);
}