/* ---------------------------------------------------------------------------
   Backoffice design tokens.

   One dark identity, deliberately: this is a console someone keeps open all
   day, and App.razor commits the document to data-bs-theme="dark". Neutrals
   are biased blue rather than left as flat grey, so the brass accent sits on
   a ground that was chosen rather than inherited.

   Brass is the interface accent - active nav, focus, primary action, links.
   It is kept clear of the semantic scale (up / down) so "this is clickable"
   never reads as "this is healthy".
   --------------------------------------------------------------------------- */

:root {
    --ink: #0e1116;
    --rail: #090b0f;
    --panel: #161a21;
    --panel-raised: #1c212a;
    --line: #232a34;
    --line-soft: #1a1f27;

    --text: #dfe4ec;
    --text-dim: #aab3c2;
    --muted: #8b95a6;
    --faint: #626d7e;

    --brass: #c8983f;
    --brass-bright: #e0b256;
    --brass-dim: #8a6a2c;
    --brass-wash: rgba(200, 152, 63, 0.12);

    --up: #4fa877;
    --up-wash: rgba(79, 168, 119, 0.14);
    --down: #d9645e;
    --down-wash: rgba(217, 100, 94, 0.14);

    --radius: 6px;
    --radius-sm: 4px;

    /* Humanist sans for chrome and content - Segoe UI Variable carries Hebrew
       properly, which matters more here than any display face would. */
    --font-ui: "Segoe UI Variable Text", "Segoe UI", ui-sans-serif, system-ui,
               -apple-system, "Helvetica Neue", Arial, "Noto Sans Hebrew", sans-serif;
    /* Every machine-written value wears the mono face: ids, timestamps, IPs,
       user agents, money. The sans/mono pairing is the typographic idea. */
    --font-mono: "Cascadia Mono", "Cascadia Code", ui-monospace, Consolas,
                 "SF Mono", "Liberation Mono", monospace;

    /* Not a design choice - the stack the Telegram web client sets on a message,
       copied verbatim so the validation preview measures the same as the thing it
       is imitating. Used by the post bubble and nothing else. Roboto carries no
       Hebrew, in Telegram either: the Hebrew falls through to the system face in
       both, which is exactly the fidelity wanted. */
    --font-telegram: Roboto, -apple-system, "apple color emoji", BlinkMacSystemFont,
                     "Segoe UI", Oxygen-Sans, Ubuntu, Cantarell, "Helvetica Neue",
                     sans-serif;

    color-scheme: dark;
}

/* Self-hosted because the preview has to look the same on a box that has never
   installed Roboto - which is every box here. One variable file per subset covers
   the regular and the 500 Telegram renders bold at. */
@font-face {
    font-family: Roboto;
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 100%;
    font-display: swap;
    src: url("fonts/roboto-latin.woff2") format("woff2");
    unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
                   U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122,
                   U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

@font-face {
    font-family: Roboto;
    font-style: normal;
    font-weight: 100 900;
    font-stretch: 100%;
    font-display: swap;
    src: url("fonts/roboto-latin-ext.woff2") format("woff2");
    unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
                   U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF,
                   U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

/* --- Base ---------------------------------------------------------------- */

html, body {
    font-family: var(--font-ui);
    background-color: var(--ink);
    color: var(--text);
    font-size: 15px;
    line-height: 1.6;
    -webkit-font-smoothing: antialiased;
}

body {
    margin: 0;
}

::selection {
    background: var(--brass-wash);
    color: var(--brass-bright);
}

a {
    color: var(--brass-bright);
    text-decoration: none;
    text-underline-offset: 2px;
}

a:hover {
    color: var(--brass-bright);
    text-decoration: underline;
}

/* One visible focus treatment for everything that takes keyboard focus. */
a:focus-visible,
button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible {
    outline: 2px solid var(--brass);
    outline-offset: 2px;
    border-radius: var(--radius-sm);
}

/* Blazor moves focus to the page heading on navigation. That is right for a
   screen reader and wrong for a mouse, so the heading takes focus silently. */
h1:focus,
h1:focus-visible {
    outline: none;
}

@media (prefers-reduced-motion: reduce) {
    *, *::before, *::after {
        animation-duration: 0.01ms !important;
        animation-iteration-count: 1 !important;
        transition-duration: 0.01ms !important;
        scroll-behavior: auto !important;
    }
}

/* --- Type scale ---------------------------------------------------------- */

h1, h2, h3, h4, h5, h6 {
    text-wrap: balance;
    color: var(--text);
    letter-spacing: -0.01em;
    margin: 0;
}

h1 { font-size: 1.9rem;  font-weight: 620; }
h2 { font-size: 1.45rem; font-weight: 620; }
h3 { font-size: 1.15rem; font-weight: 620; }
h4 { font-size: 1rem;    font-weight: 620; }

h1:focus { outline: none; }

/* Uppercase tracked micro-label: the utility role in the type system. Used
   for section eyebrows, table heads, and field labels. */
.eyebrow {
    font-size: 0.6875rem;
    font-weight: 620;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--faint);
}

.mono {
    font-family: var(--font-mono);
    font-size: 0.85em;
    font-variant-numeric: tabular-nums;
}

.num {
    font-variant-numeric: tabular-nums;
}

.white-space-pre-wrap,
.prewrap {
    white-space: pre-wrap;
}

.overflow-auto {
    overflow: auto;
}

/* --- Page furniture ------------------------------------------------------ */

/* The band every page opens with: eyebrow, title, and the page's own actions
   pushed to the right. */
.page-head {
    display: flex;
    flex-wrap: wrap;
    align-items: flex-end;
    justify-content: space-between;
    gap: 1.25rem 2rem;
    padding-bottom: 1.4rem;
    border-bottom: 1px solid var(--line);
    margin-bottom: 2rem;
}

.page-head__titles {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    min-width: 0;
}

.page-head__actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

/* A flat panel divided by hairlines - not a floating rounded card. */
.panel {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.panel__head {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 1rem;
    padding: 1rem 1.35rem;
    border-bottom: 1px solid var(--line);
    background: var(--panel-raised);
}

.panel__body {
    padding: 1.5rem 1.35rem;
}

/* Wide content scrolls inside its own container so the page body never does. */
.scroll-x {
    overflow-x: auto;
    max-width: 100%;
}

.stack {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.row-controls {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
}

.empty {
    padding: 3.25rem 1.35rem;
    text-align: center;
    color: var(--muted);
}

/* --- Metrics ------------------------------------------------------------- */

.metric {
    display: flex;
    flex-direction: column;
    gap: 0.15rem;
    min-width: 0;
}

.metric__value {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
    font-size: 1.25rem;
    font-weight: 600;
    color: var(--text);
    line-height: 1.2;
}

.metric__label {
    font-size: 0.6875rem;
    font-weight: 620;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--faint);
}

/* Metrics need more air between them than buttons do, or the uppercase
   labels run together into one word. */
.metric + .metric {
    margin-left: 1.75rem;
}

/* A queue that is 47 of 2312 done should look like it, not just say it. */
.meter {
    height: 4px;
    border-radius: 2px;
    background: var(--line);
    overflow: hidden;
}

.meter__fill {
    display: block;
    height: 100%;
    background: var(--brass);
    border-radius: inherit;
}

/* --- Status -------------------------------------------------------------- */

/* State is carried by form as well as text: a dot plus a word, so health
   reads at a glance without relying on colour alone. */
.status {
    display: inline-flex;
    align-items: center;
    gap: 0.45rem;
    font-size: 0.8125rem;
    color: var(--text-dim);
    white-space: nowrap;
}

.status__dot {
    width: 7px;
    height: 7px;
    border-radius: 50%;
    flex: none;
    background: var(--faint);
    box-shadow: 0 0 0 3px rgba(255, 255, 255, 0.04);
}

.status--up .status__dot { background: var(--up); box-shadow: 0 0 0 3px var(--up-wash); }
.status--down .status__dot { background: var(--down); box-shadow: 0 0 0 3px var(--down-wash); }

.status--up .status__state { color: var(--up); }
.status--down .status__state { color: var(--down); }

.status__state {
    font-weight: 600;
}

/* Some of this app's buttons wait on a model or a scraper, which is seconds at
   best and a minute at worst. Those waits take the button's own place and name
   themselves, because a page that merely stops responding reads as broken. */
.working {
    display: inline-flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.8125rem;
    color: var(--brass-bright);
    white-space: nowrap;
}

.working__spinner {
    width: 12px;
    height: 12px;
    flex: none;
    border-radius: 50%;
    border: 2px solid var(--brass-dim);
    border-top-color: var(--brass-bright);
    animation: working-spin 0.7s linear infinite;
}

/* The seconds beside the caption. Tabular figures because the number is redrawn
   every second and proportional digits make the whole line shuffle sideways as
   it counts. Dimmer than the caption: it is the thing you glance at, not read. */
.working__elapsed {
    font-variant-numeric: tabular-nums;
    color: var(--brass-dim);
}

@keyframes working-spin {
    to { transform: rotate(360deg); }
}

/* Still turning, because the point of it is to prove the page is alive - just
   slowly enough not to be the thing you cannot look away from. */
@media (prefers-reduced-motion: reduce) {
    .working__spinner {
        animation-duration: 2.4s;
    }
}

/* Bootstrap badges, retuned to the palette. */
.badge {
    font-weight: 620;
    letter-spacing: 0.03em;
    border-radius: var(--radius-sm);
    padding: 0.28em 0.55em;
}

.text-bg-success { background-color: var(--up-wash) !important; color: var(--up) !important; }
.text-bg-danger  { background-color: var(--down-wash) !important; color: var(--down) !important; }

/* --- Tables -------------------------------------------------------------- */

/* Pages here write bare <table>, so the system styles the elements directly
   rather than a .table class. */
table {
    width: 100%;
    border-collapse: separate;
    border-spacing: 0;
    font-size: 0.875rem;
}

thead th {
    position: sticky;
    top: 0;
    z-index: 2;
    background: var(--panel-raised);
    font-size: 0.6875rem;
    font-weight: 620;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--faint);
    text-align: left;
    white-space: nowrap;
    padding: 0.85rem 1.1rem;
    border-bottom: 1px solid var(--line);
}

tbody td,
tbody th {
    padding: 0.9rem 1.1rem;
    border-bottom: 1px solid var(--line-soft);
    vertical-align: middle;
    font-weight: 400;
    text-align: left;
}

tbody tr:last-child td,
tbody tr:last-child th {
    border-bottom: none;
}

tbody tr:hover td,
tbody tr:hover th {
    background: rgba(255, 255, 255, 0.022);
}

/* Machine values line up and read as machine values. */
td.mono, th.mono,
td .mono {
    font-family: var(--font-mono);
    font-variant-numeric: tabular-nums;
}

/* Hebrew inside an otherwise Latin table: isolate the run so an embedded
   brand name ("Barkan", "Xerox") cannot drag the rest of the line around,
   and align the column consistently right. */
.heb {
    direction: rtl;
    unicode-bidi: isolate;
    text-align: right;
    white-space: normal;
}

/* --- Forms --------------------------------------------------------------- */

.form-control,
.form-select,
select,
textarea,
input[type="text"],
input[type="number"],
input[type="email"],
input[type="password"],
input[type="search"] {
    background-color: var(--ink);
    border: 1px solid var(--line);
    color: var(--text);
    border-radius: var(--radius-sm);
    font-family: inherit;
    font-size: 0.875rem;
    padding: 0.5rem 0.7rem;
}

.form-control:focus,
.form-select:focus,
select:focus,
textarea:focus,
input:focus {
    background-color: var(--ink);
    border-color: var(--brass-dim);
    color: var(--text);
    box-shadow: none;
    outline: 2px solid var(--brass);
    outline-offset: -1px;
}

.form-control::placeholder {
    color: var(--faint);
}

.form-control:disabled,
textarea:disabled,
select:disabled {
    background-color: var(--line-soft);
    color: var(--muted);
    cursor: not-allowed;
}

.form-label,
label {
    font-size: 0.8125rem;
    color: var(--text-dim);
}

.btn:focus, .btn:active:focus,
.btn-link.nav-link:focus,
.form-control:focus, .form-check-input:focus {
    box-shadow: none;
}

.form-check-input {
    width: 1.05em;
    height: 1.05em;
    margin-top: 0;
    background-color: var(--ink);
    border-color: var(--muted);
}

.form-check-input:checked {
    background-color: var(--brass);
    border-color: var(--brass);
}

.darker-border-checkbox.form-check-input {
    border-color: var(--muted);
}

/* Bootstrap's floating labels need the taller box and the padding they were
   designed around; the compact padding above would drop the label on top of
   the value. The Identity pages are the only place these are used. */
.form-floating > .form-control,
.form-floating > .form-control-plaintext,
.form-floating > .form-select {
    height: calc(3.25rem + 2px);
    min-height: calc(3.25rem + 2px);
    padding: 1.2rem 0.75rem 0.4rem;
    line-height: 1.25;
}

.form-floating > label {
    padding: 0.85rem 0.75rem;
    color: var(--faint);
    font-size: 0.8125rem;
}

/* Bootstrap paints a strip behind the floated label in the body colour, to
   punch through the input's border. Our inputs are a different colour, so it
   showed up as a grey chip. The label sits inside the padding here and has
   nothing to punch through, so the strip goes entirely - removing it via
   display, which Bootstrap's higher-specificity rule does not set. */
.form-floating > label::after {
    display: none;
}

/* The scaffolded placeholder duplicates the label; it only earns its place
   once the label has floated up out of the way. */
.form-floating > .form-control-plaintext::placeholder,
.form-floating > .form-control::placeholder {
    color: transparent;
}

.form-floating > .form-control-plaintext:focus::placeholder,
.form-floating > .form-control:focus::placeholder {
    color: var(--faint);
    text-align: start;
}

/* --- Buttons ------------------------------------------------------------- */

.btn {
    font-family: inherit;
    font-size: 0.8125rem;
    font-weight: 560;
    border-radius: var(--radius-sm);
    padding: 0.5rem 1.05rem;
    border: 1px solid transparent;
    transition: background-color 0.12s ease, border-color 0.12s ease, color 0.12s ease;
}

.btn-sm {
    font-size: 0.78125rem;
    padding: 0.38rem 0.8rem;
}

.btn-primary {
    color: #14100a;
    background-color: var(--brass);
    border-color: var(--brass);
}

.btn-primary:hover,
.btn-primary:focus {
    color: #14100a;
    background-color: var(--brass-bright);
    border-color: var(--brass-bright);
}

.btn-primary:disabled,
.btn-primary.disabled {
    color: var(--muted);
    background-color: var(--line);
    border-color: var(--line);
    opacity: 1;
}

/* The quiet sibling of the primary action - same shape, no fill. */
.btn-secondary,
.btn-outline-secondary {
    color: var(--text-dim);
    background-color: transparent;
    border-color: var(--line);
}

.btn-secondary:hover,
.btn-outline-secondary:hover {
    color: var(--text);
    background-color: var(--panel-raised);
    border-color: var(--muted);
}

.btn-outline-success {
    color: var(--up);
    border-color: rgba(79, 168, 119, 0.45);
    background-color: transparent;
}

.btn-outline-success:hover {
    color: #0d1712;
    background-color: var(--up);
    border-color: var(--up);
}

.btn-outline-danger {
    color: var(--down);
    border-color: rgba(217, 100, 94, 0.45);
    background-color: transparent;
}

.btn-outline-danger:hover {
    color: #1a0f0e;
    background-color: var(--down);
    border-color: var(--down);
}

.btn-outline-warning {
    color: var(--brass-bright);
    border-color: rgba(200, 152, 63, 0.45);
    background-color: transparent;
}

.btn-outline-warning:hover {
    color: #14100a;
    background-color: var(--brass);
    border-color: var(--brass);
}

/* --- Validation messages ------------------------------------------------- */

.valid.modified:not([type=checkbox]) {
    outline: 1px solid var(--up);
}

.invalid {
    outline: 1px solid var(--down);
}

.validation-message {
    color: var(--down);
    font-size: 0.8125rem;
}

.alert {
    border-radius: var(--radius);
    border: 1px solid var(--line);
    background: var(--panel);
    color: var(--text);
    font-size: 0.875rem;
}

.alert-success {
    border-color: rgba(79, 168, 119, 0.4);
    background: var(--up-wash);
    color: var(--up);
}

.alert-danger {
    border-color: rgba(217, 100, 94, 0.4);
    background: var(--down-wash);
    color: var(--down);
}

/* --- Account area -------------------------------------------------------- */

/* Sign-in and registration: one narrow card, left-aligned with everything
   else rather than floated into the middle of an otherwise left-hung app. */
.auth__card {
    max-width: 28rem;
}

.auth__body {
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

.auth__note {
    margin: 0;
    color: var(--muted);
    font-size: 0.8125rem;
    line-height: 1.6;
}

.auth__form {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

.auth .remember {
    display: flex;
    align-items: center;
    gap: 0.5rem;
    font-size: 0.875rem;
    color: var(--text-dim);
    cursor: pointer;
}

.auth__submit {
    align-self: stretch;
    padding: 0.55rem 1rem;
    font-size: 0.875rem;
}

.auth__links {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    padding-top: 0.25rem;
    border-top: 1px solid var(--line);
    font-size: 0.8125rem;
}

.external__providers {
    display: flex;
    flex-wrap: wrap;
    gap: 0.5rem;
}

/* Account settings: the section list beside the section itself. */
.manage {
    display: grid;
    grid-template-columns: 16rem minmax(0, 1fr);
    gap: 1.75rem;
    align-items: start;
    max-width: 60rem;
}

@media (max-width: 800px) {
    .manage {
        grid-template-columns: minmax(0, 1fr);
    }
}

.settings-nav {
    display: flex;
    flex-direction: column;
    gap: 2px;
    padding: 0.6rem;
}

.settings-nav__link {
    display: block;
    padding: 0.6rem 0.8rem;
    border-radius: var(--radius-sm);
    color: var(--text-dim);
    font-size: 0.8125rem;
    text-decoration: none;
    transition: background-color 0.12s ease, color 0.12s ease;
}

.settings-nav__link:hover {
    background: rgba(255, 255, 255, 0.04);
    color: var(--text);
    text-decoration: none;
}

.settings-nav__link.active {
    background: var(--brass-wash);
    color: var(--brass-bright);
    box-shadow: inset 2px 0 0 var(--brass);
}

/* --- Settings sections --------------------------------------------------- */

/* Each account section is one card: what it is, a line on what it does, then
   the controls. The layout no longer wraps the page, so a page that has more
   than one concern (two-factor) can show more than one card. */
.manage__body {
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.setting {
    background: var(--panel);
    border: 1px solid var(--line);
    border-radius: var(--radius);
    overflow: hidden;
}

.setting__head {
    padding: 1.25rem 1.5rem;
    border-bottom: 1px solid var(--line);
    background: var(--panel-raised);
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    justify-content: space-between;
    gap: 0.75rem 1.5rem;
}

.setting__title {
    font-size: 1.05rem;
    font-weight: 620;
    margin: 0;
}

.setting__desc {
    margin: 0.35rem 0 0;
    max-width: 62ch;
    color: var(--muted);
    font-size: 0.85rem;
    line-height: 1.6;
}

.setting__body {
    padding: 1.75rem 1.5rem;
    display: flex;
    flex-direction: column;
    gap: 1.5rem;
}

/* Destructive sections wear the warning on the card itself rather than in a
   banner above it, so the colour belongs to the thing it describes. */
.setting--danger {
    border-color: rgba(217, 100, 94, 0.45);
}

.setting--danger .setting__head {
    background: var(--down-wash);
}

.setting--danger .setting__title {
    color: var(--down);
}

/* --- Read-only facts ----------------------------------------------------- */

/* A username you cannot change is a fact, not an input. It used to be rendered
   as a greyed-out text box, which invites a click that does nothing. */
.kv {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    gap: 0.85rem 1.5rem;
    margin: 0;
    align-items: baseline;
}

.kv dt {
    font-size: 0.6875rem;
    font-weight: 620;
    letter-spacing: 0.09em;
    text-transform: uppercase;
    color: var(--faint);
    white-space: nowrap;
}

.kv dd {
    margin: 0;
    min-width: 0;
    color: var(--text);
    font-size: 0.9rem;
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.75rem;
    overflow-wrap: anywhere;
}

/* --- Fields -------------------------------------------------------------- */

.field {
    display: flex;
    flex-direction: column;
    gap: 0.4rem;
    max-width: 26rem;
}

.field > .form-control {
    width: 100%;
}

.field__hint {
    color: var(--muted);
    font-size: 0.8125rem;
    line-height: 1.5;
}

.form-stack {
    display: flex;
    flex-direction: column;
    gap: 1.25rem;
}

/* Actions sit below a divider so the form has an obvious foot, and buttons
   size to their label instead of stretching the full width of the card. */
.form-actions {
    display: flex;
    flex-wrap: wrap;
    align-items: center;
    gap: 0.65rem;
    padding-top: 1.25rem;
    border-top: 1px solid var(--line-soft);
}

/* Nothing above them to divide from: a section whose whole body is its buttons
   would otherwise get a rule hanging over nothing. */
.setting__body > .form-actions:first-child {
    padding-top: 0;
    border-top: none;
}

.form-actions form {
    margin: 0;
}

.manage__body .btn.w-100 {
    width: auto !important;
}

.manage__body .btn-lg {
    font-size: 0.875rem;
    padding: 0.55rem 1.1rem;
}

/* --- Numbered setup steps ------------------------------------------------ */

/* The authenticator flow genuinely is a sequence - do this, then this, then
   this - so the numbers carry information rather than decorate. */
.steps {
    list-style: none;
    counter-reset: step;
    margin: 0;
    padding: 0;
    display: flex;
    flex-direction: column;
    gap: 1.75rem;
}

.steps > li {
    counter-increment: step;
    display: grid;
    grid-template-columns: 1.75rem minmax(0, 1fr);
    gap: 0 1rem;
    align-items: start;
}

.steps > li::before {
    content: counter(step);
    display: grid;
    place-items: center;
    width: 1.75rem;
    height: 1.75rem;
    border-radius: 50%;
    border: 1px solid var(--brass-dim);
    color: var(--brass-bright);
    background: var(--brass-wash);
    font-family: var(--font-mono);
    font-size: 0.8125rem;
    line-height: 1;
}

.steps__body {
    display: flex;
    flex-direction: column;
    gap: 0.85rem;
    padding-top: 0.2rem;
    min-width: 0;
}

.steps p {
    margin: 0;
    max-width: 68ch;
    line-height: 1.65;
    font-size: 0.9rem;
    color: var(--text-dim);
}

/* A secret you have to copy by hand: mono, selectable, and roomy enough to
   read a character at a time. */
.secret {
    display: inline-block;
    padding: 0.6rem 0.85rem;
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.95rem;
    letter-spacing: 0.06em;
    color: var(--brass-bright);
    user-select: all;
    overflow-wrap: anywhere;
}

/* --- Recovery codes ------------------------------------------------------ */

.codes {
    display: grid;
    grid-template-columns: repeat(auto-fill, minmax(9rem, 1fr));
    gap: 0.6rem;
    margin: 0;
    padding: 0;
    list-style: none;
}

.codes li {
    padding: 0.6rem 0.75rem;
    background: var(--ink);
    border: 1px solid var(--line);
    border-radius: var(--radius-sm);
    font-family: var(--font-mono);
    font-size: 0.875rem;
    text-align: center;
    color: var(--text);
    user-select: all;
}

.manage__body h3 {
    margin-bottom: 0.75rem;
}

.manage__body hr {
    border-color: var(--line);
    opacity: 1;
}

/* --- Error surfaces ------------------------------------------------------ */

.blazor-error-boundary {
    background: url(data:image/svg+xml;base64,PHN2ZyB3aWR0aD0iNTYiIGhlaWdodD0iNDkiIHhtbG5zPSJodHRwOi8vd3d3LnczLm9yZy8yMDAwL3N2ZyIgeG1sbnM6eGxpbms9Imh0dHA6Ly93d3cudzMub3JnLzE5OTkveGxpbmsiIG92ZXJmbG93PSJoaWRkZW4iPjxkZWZzPjxjbGlwUGF0aCBpZD0iY2xpcDAiPjxyZWN0IHg9IjIzNSIgeT0iNTEiIHdpZHRoPSI1NiIgaGVpZ2h0PSI0OSIvPjwvY2xpcFBhdGg+PC9kZWZzPjxnIGNsaXAtcGF0aD0idXJsKCNjbGlwMCkiIHRyYW5zZm9ybT0idHJhbnNsYXRlKC0yMzUgLTUxKSI+PHBhdGggZD0iTTI2My41MDYgNTFDMjY0LjcxNyA1MSAyNjUuODEzIDUxLjQ4MzcgMjY2LjYwNiA1Mi4yNjU4TDI2Ny4wNTIgNTIuNzk4NyAyNjcuNTM5IDUzLjYyODMgMjkwLjE4NSA5Mi4xODMxIDI5MC41NDUgOTIuNzk1IDI5MC42NTYgOTIuOTk2QzI5MC44NzcgOTMuNTEzIDI5MSA5NC4wODE1IDI5MSA5NC42NzgyIDI5MSA5Ny4wNjUxIDI4OS4wMzggOTkgMjg2LjYxNyA5OUwyNDAuMzgzIDk5QzIzNy45NjMgOTkgMjM2IDk3LjA2NTEgMjM2IDk0LjY3ODIgMjM2IDk0LjM3OTkgMjM2LjAzMSA5NC4wODg2IDIzNi4wODkgOTMuODA3MkwyMzYuMzM4IDkzLjAxNjIgMjM2Ljg1OCA5Mi4xMzE0IDI1OS40NzMgNTMuNjI5NCAyNTkuOTYxIDUyLjc5ODUgMjYwLjQwNyA1Mi4yNjU4QzI2MS4yIDUxLjQ4MzcgMjYyLjI5NiA1MSAyNjMuNTA2IDUxWk0yNjMuNTg2IDY2LjAxODNDMjYwLjczNyA2Ni4wMTgzIDI1OS4zMTMgNjcuMTI0NSAyNTkuMzEzIDY5LjMzNyAyNTkuMzEzIDY5LjYxMDIgMjU5LjMzMiA2OS44NjA4IDI1OS4zNzEgNzAuMDg4N0wyNjEuNzk1IDg0LjAxNjEgMjY1LjM4IDg0LjAxNjEgMjY3LjgyMSA2OS43NDc1QzI2Ny44NiA2OS43MzA5IDI2Ny44NzkgNjkuNTg3NyAyNjcuODc5IDY5LjMxNzkgMjY3Ljg3OSA2Ny4xMTgyIDI2Ni40NDggNjYuMDE4MyAyNjMuNTg2IDY2LjAxODNaTTI2My41NzYgODYuMDU0N0MyNjEuMDQ5IDg2LjA1NDcgMjU5Ljc4NiA4Ny4zMDA1IDI1OS43ODYgODkuNzkyMSAyNTkuNzg2IDkyLjI4MzcgMjYxLjA0OSA5My41Mjk1IDI2My41NzYgOTMuNTI5NSAyNjYuMTE2IDkzLjUyOTUgMjY3LjM4NyA5Mi4yODM3IDI2Ny4zODcgODkuNzkyMSAyNjcuMzg3IDg3LjMwMDUgMjY2LjExNiA4Ni4wNTQ3IDI2My41NzYgODYuMDU0N1oiIGZpbGw9IiNGRkU1MDAiIGZpbGwtcnVsZT0iZXZlbm9kZCIvPjwvZz48L3N2Zz4=) no-repeat 1rem/1.8rem, #4a1f1f;
    padding: 1rem 1rem 1rem 3.7rem;
    border: 1px solid rgba(217, 100, 94, 0.4);
    border-radius: var(--radius);
    color: var(--text);
}

.blazor-error-boundary::after {
    content: "An error has occurred."
}
