:root {
  --color-brand: #0f6cbd;
  --color-brand-light: color-mix(in srgb, var(--color-brand) 85%, var(--color-surface));
  --color-brand-lighter: color-mix(in srgb, var(--color-brand) 70%, var(--color-surface));
  --color-brand-lightest: color-mix(in srgb, var(--color-brand) 55%, var(--color-surface));
  --color-brand-hover: var(--color-brand-light);
  --color-brand-pressed: #0c3b5e;
  --color-brand-soft: #eaf4fc;
  --color-accent: #107c10;
  --color-accent-light: color-mix(in srgb, var(--color-accent) 85%, var(--color-surface));
  --color-accent-lighter: color-mix(in srgb, var(--color-accent) 70%, var(--color-surface));
  --color-accent-lightest: color-mix(in srgb, var(--color-accent) 55%, var(--color-surface));
  --color-text: #242424;
  --color-muted: #616161;
  --color-subtle: #8a8886;
  --color-border: #d1d1d1;
  --color-border-soft: #e8e8e8;
  --color-surface: #ffffff;
  --color-canvas: #f5f5f5;
  --login-background-image: none;
  --color-nav: #172f45;
  --color-nav-hover: #213f5a;
  --color-focus: #005fcc;
  --color-danger: #c50f1f;
  --color-danger-soft: #fde7e9;
  --color-success: #107c10;
  --color-success-soft: #dff6dd;
  --shadow-card: 0 1px 2px rgba(0, 0, 0, .05), 0 6px 18px rgba(0, 0, 0, .045);
  --shadow-flyout: 0 8px 28px rgba(0, 0, 0, .13);
  --radius-sm: .375rem;
  --radius-md: .625rem;
  --radius-lg: .875rem;
  --content-width: 92rem;
  color: var(--color-text);
  background: var(--color-canvas);
  font-family: "Segoe UI Variable Text", "Segoe UI Variable", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-synthesis: none;
}

* { box-sizing: border-box; }
html { min-height: 100%; font-size: 100%; scroll-behavior: smooth; }
body { min-width: 20rem; min-height: 100vh; margin: 0; color: var(--color-text); background: var(--color-canvas); font-size: .9375rem; line-height: 1.5; }
.administration-page { --color-canvas: #fff; --color-surface: #fff; }
img { display: block; max-width: 100%; }
a { color: var(--color-brand); text-underline-offset: .16em; text-decoration-thickness: .07em; }
a:hover { color: var(--color-brand-hover); }
a:focus-visible, button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, [tabindex]:focus-visible {
  outline: 2px solid var(--color-focus); outline-offset: 2px;
}
.skip-link { position: fixed; z-index: 1000; top: -6rem; left: 1rem; padding: .65rem 1rem; border-radius: var(--radius-sm); color: #fff; background: #111; box-shadow: var(--shadow-flyout); }
.skip-link:focus { top: 1rem; }
.visually-hidden { position: absolute !important; top: 0 !important; left: 0 !important; width: 1px !important; height: 1px !important; padding: 0 !important; margin: -1px !important; overflow: hidden !important; clip: rect(0, 0, 0, 0) !important; clip-path: inset(50%) !important; white-space: nowrap !important; border: 0 !important; }

/* Application chrome */
.topbar { position: sticky; z-index: 20; top: 0; min-height: 4.5rem; border-bottom: 1px solid var(--color-border-soft); background: rgba(255, 255, 255, .96); box-shadow: 0 1px 8px rgba(0, 0, 0, .04); }
.topbar-inner { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; width: 100%; min-height: 4.5rem; padding: .625rem clamp(1rem, 2.5vw, 2rem); }
.brand { display: inline-flex; align-items: center; gap: .75rem; min-width: 0; color: var(--color-text); line-height: 1.1; text-decoration: none; }
.brand:hover { color: var(--color-text); }
.brand-logo, .brand-mark { height: 2.4rem; flex: 0 0 auto; border-radius: .625rem; }
.brand-logo { width: auto; max-width: min(10rem, 30vw); border-radius: 0; object-fit: contain; }
.brand-mark { width: 2.4rem; }
.brand-mark { display: inline-grid; place-items: center; color: #fff; background: linear-gradient(145deg, var(--color-brand), var(--color-brand-pressed)); box-shadow: 0 3px 10px rgba(15, 108, 189, .24); font-size: .75rem; font-weight: 750; letter-spacing: .06em; }
.brand-mark.large { width: 3.5rem; height: 3.5rem; margin-bottom: .7rem; border-radius: .85rem; font-size: 1rem; }
.brand-logo.large { width: auto; height: 3.5rem; max-width: min(13rem, 70vw); margin-bottom: .7rem; border-radius: 0; }
.brand-name { min-width: 0; }
.brand-name strong { display: block; font-size: 1rem; font-weight: 680; letter-spacing: -.012em; }
.brand-name small { display: block; margin-top: .22rem; color: var(--color-muted); font-size: .72rem; letter-spacing: .025em; }
.topbar-tools { display: flex; align-items: center; justify-content: flex-end; gap: .625rem; min-width: 0; }
.secure-context { display: inline-flex; align-items: center; gap: .4rem; color: var(--color-muted); font-size: .76rem; font-weight: 600; }
.secure-context > span { color: var(--color-success); font-size: .6rem; }
.environment { display: inline-flex; align-items: center; gap: .45rem; min-height: 2rem; padding: .3rem .65rem; border: 1px solid var(--color-border); border-radius: 999px; color: var(--color-muted); background: #fafafa; font-size: .75rem; font-weight: 600; white-space: nowrap; }
.status-dot { width: .48rem; height: .48rem; flex: 0 0 auto; border-radius: 50%; background: var(--color-success); box-shadow: 0 0 0 3px var(--color-success-soft); }
.account-chip { display: inline-flex; align-items: center; gap: .5rem; min-width: 0; min-height: 2.25rem; padding: .2rem .6rem .2rem .25rem; border: 1px solid transparent; border-radius: 999px; color: var(--color-text); text-decoration: none; }
.account-chip:hover { border-color: var(--color-border); color: var(--color-text); background: #fafafa; }
.account-avatar { display: inline-grid; place-items: center; width: 1.75rem; height: 1.75rem; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--color-brand); font-size: .7rem; font-weight: 700; }
.account-name { max-width: 13rem; overflow: hidden; font-size: .78rem; font-weight: 600; text-overflow: ellipsis; white-space: nowrap; }
.app-shell { display: grid; grid-template-columns: 17rem minmax(0, 1fr); min-height: calc(100vh - 7.75rem); }
.app-shell.auth-shell { display: block; min-height: 100vh; }
.primary-nav { position: sticky; top: 4.5rem; align-self: start; height: calc(100vh - 4.5rem); padding: 1.1rem .75rem 2rem; overflow-y: auto; border-right: 1px solid rgba(255, 255, 255, .08); color: #fff; background: linear-gradient(180deg, var(--color-nav), #10283c); scrollbar-color: rgba(255,255,255,.22) transparent; }
.primary-nav ul { display: grid; gap: .18rem; margin: 0; padding: 0; list-style: none; }
.primary-nav a { position: relative; display: flex; align-items: center; gap: .72rem; min-height: 2.55rem; padding: .46rem .72rem; border-radius: .42rem; color: #e8f0f5; font-size: .875rem; font-weight: 550; text-decoration: none; transition: background-color .12s ease, color .12s ease; }
.primary-nav a:hover { color: #fff; background: var(--color-nav-hover); }
.primary-nav a.active { color: #fff; background: var(--color-brand); box-shadow: inset 3px 0 var(--color-brand-light); font-weight: 650; }
.nav-icon { display: inline-grid; place-items: center; width: 1.25rem; flex: 0 0 1.25rem; color: #9cc9e9; font-size: 1.02rem; line-height: 1; }
.primary-nav a.active .nav-icon { color: #fff; }
.nav-label { margin: 1.35rem .72rem .42rem; color: #9fb2c1; font-size: .65rem; font-weight: 700; letter-spacing: .105em; text-transform: uppercase; }
.nav-label:first-child { margin-top: .25rem; }
.main-content { width: 100%; max-width: var(--content-width); margin: 0 auto; padding: clamp(2rem, 3.2vw, 3.5rem) clamp(1.25rem, 3.5vw, 4rem) 4.5rem; }
.management-content { min-width: 0; }
.auth-shell .main-content { display: flex; align-items: center; justify-content: center; max-width: 70rem; min-height: 100vh; padding-block: clamp(2rem, 5vw, 4rem); }
.site-footer { display: flex; justify-content: space-between; gap: 1rem; min-height: 3.25rem; padding: .95rem clamp(1rem, 2.5vw, 2rem); border-top: 1px solid var(--color-border-soft); color: var(--color-muted); background: var(--color-surface); font-size: .72rem; }
.site-footer:not(.auth-footer) { padding-left: calc(17rem + clamp(1rem, 2.5vw, 2rem)); }

/* Page structure and type */
.page-header { display: flex; align-items: flex-start; justify-content: space-between; gap: 2rem; margin: 0 0 1.75rem; }
.page-header > div { min-width: 0; }
.page-header h1, .auth-header h1 { max-width: 55rem; margin: .15rem 0 .5rem; font-size: clamp(2rem, 3.3vw, 2.75rem); font-weight: 690; line-height: 1.12; letter-spacing: -.035em; }
.eyebrow { margin: 0 0 .22rem; color: var(--color-brand); font-size: .7rem; font-weight: 750; letter-spacing: .11em; text-transform: uppercase; }
.lede { max-width: 53rem; margin: 0; color: var(--color-muted); font-size: clamp(1rem, 1.4vw, 1.08rem); line-height: 1.55; }
h2 { margin: 0 0 .55rem; font-size: 1.18rem; font-weight: 660; line-height: 1.3; letter-spacing: -.012em; }
h3 { margin: 0 0 .35rem; font-size: 1rem; font-weight: 660; line-height: 1.35; }
p { margin-top: 0; }
small { color: var(--color-muted); }
code { padding: .12rem .32rem; border-radius: .25rem; color: #6c3b00; background: #fff4ce; font-family: "Cascadia Mono", Consolas, monospace; font-size: .86em; overflow-wrap: anywhere; }
.secret-once { display: block; margin: .75rem 0 1rem; padding: .85rem 1rem; border: 1px solid #e6c44f; border-radius: var(--radius-sm); background: #fff8d8; font-size: .92rem; }
.section-heading { display: flex; align-items: end; justify-content: space-between; gap: 1rem; margin: 0 0 1rem; }
.section-heading h2 { margin-bottom: 0; font-size: 1.35rem; }

/* Cards and grouped content */
.card, .content-card, .auth-card, .feature-card { border: 1px solid var(--color-border-soft); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-card); }
.card, .content-card, .auth-card { padding: clamp(1.15rem, 2vw, 1.6rem); }
.card + .card, .content-card + .content-card, .auth-card + .auth-card { margin-top: 1rem; }
.card > :last-child, .content-card > :last-child, .auth-card > :last-child { margin-bottom: 0; }
.card > h2, .content-card > h2, .auth-card > h2 { margin-bottom: .85rem; }
.content-card p, .card p { color: var(--color-muted); }
.card-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 2rem; }
.feature-card { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; min-height: 7.5rem; padding: 1.25rem; color: var(--color-text); text-decoration: none; transition: border-color .14s ease, box-shadow .14s ease, transform .14s ease; }
.feature-card:hover { border-color: #8bb9db; color: var(--color-text); box-shadow: 0 8px 24px rgba(0, 0, 0, .08); transform: translateY(-1px); }
.feature-card strong, .feature-card small { display: block; }
.feature-card strong { font-size: 1rem; }
.feature-card small { margin-top: .28rem; line-height: 1.45; }
.card-icon, .empty-icon { display: grid; place-items: center; border-radius: .65rem; color: var(--color-brand); background: var(--color-brand-soft); }
.card-icon { width: 2.7rem; height: 2.7rem; font-size: 1.2rem; }
.empty-icon { width: 3.25rem; height: 3.25rem; margin: 0 auto 1rem; font-size: 1.4rem; }
.arrow { color: var(--color-brand); font-size: 1.2rem; }
.info-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; margin-top: 1rem; }
.ownership-grid, .provider-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.provider-card { display: grid; grid-template-columns: auto minmax(0, 1fr); gap: 1rem; align-items: start; }
.provider-card .badge { grid-column: 2; }
.provider-mark { display: grid; place-items: center; width: 2.8rem; height: 2.8rem; border: 1px solid #b4cee1; border-radius: .65rem; color: var(--color-brand); background: var(--color-brand-soft); font-size: .75rem; font-weight: 750; }
.empty-state { padding: clamp(2.5rem, 6vw, 4.5rem); text-align: center; }
.empty-state.compact { margin-top: 1rem; padding-block: 2rem; }
.empty-state p { max-width: 42rem; margin: 0 auto; }
.getting-started { display: flex; align-items: center; justify-content: space-between; gap: 2rem; margin-top: 1rem; }

/* Forms and controls, including legacy Razor markup */
form { min-width: 0; }
label, .form-label { color: var(--color-text); font-size: .875rem; font-weight: 620; }
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]), select, textarea, .form-control, .form-select {
  display: block; width: 100%; min-height: 2.5rem; padding: .5rem .7rem; border: 1px solid #b3b3b3; border-radius: var(--radius-sm); color: var(--color-text); background: var(--color-surface); box-shadow: 0 1px 1px rgba(0,0,0,.025); font: inherit; line-height: 1.35; transition: border-color .12s ease, box-shadow .12s ease, background-color .12s ease;
}
/* Kept explicit for the authentication UI contract as well as legacy field markup. */
.field input:not([type="checkbox"]) { border-radius: var(--radius-sm); }
textarea { min-height: 6rem; resize: vertical; }
select, .form-select { padding-right: 2rem; }
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):hover, select:hover, textarea:hover { border-color: #8a8a8a; }
input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]):focus, select:focus, textarea:focus { border-color: var(--color-brand); outline: 2px solid color-mix(in srgb, var(--color-brand) 24%, transparent); outline-offset: 0; box-shadow: 0 0 0 1px var(--color-brand); }
input:disabled, select:disabled, textarea:disabled { cursor: not-allowed; color: #707070; background: #f0f0f0; opacity: 1; }
input[type="checkbox"], input[type="radio"], .form-check-input { width: 1.1rem; height: 1.1rem; margin: 0; accent-color: var(--color-brand); }
.field, .mb-3 { display: grid; gap: .38rem; margin-bottom: 1rem; }
.field-help, .field-hint, .form-text { color: var(--color-muted); font-size: .82rem; line-height: 1.45; }
.field-error, .text-danger { color: var(--color-danger); font-size: .8rem; font-weight: 600; }
.validation-summary:not(:empty) { margin-bottom: 1rem; padding: .8rem 1rem; border: 1px solid #f1aeb5; border-left: 3px solid var(--color-danger); border-radius: var(--radius-sm); color: #8e101b; background: var(--color-danger-soft); }
.validation-summary ul { margin: 0; padding-left: 1.2rem; }
.checkbox-field, .form-check { display: grid; grid-template-columns: auto minmax(0, 1fr); align-items: start; gap: .6rem; }
.checkbox-field label, .form-check-label { margin: -.1rem 0 0; }
.content-card > form:not(.inline-form), .card > form:not(.inline-form), .auth-card > form:not(.inline-form) { display: grid; gap: .45rem; max-width: 44rem; margin: .9rem 0 0; }
.content-card > form:not(.inline-form) + form:not(.inline-form) { margin-top: 1.15rem; padding-top: 1.15rem; border-top: 1px solid var(--color-border-soft); }
.content-card > form:not(.inline-form) > button, .card > form:not(.inline-form) > button, .auth-card > form:not(.inline-form) > button { width: fit-content; margin-top: .45rem; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .2rem 1rem; }
.form-grid.compact { gap: .2rem .75rem; }
.form-grid.three-column { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.form-grid.color-fields { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.form-card, form.content-card { max-width: none; }
.field-narrow { max-width: 15rem; }
.option-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .65rem 1rem; margin: .5rem 0 1rem; }
.option-grid .field { margin: 0; padding: .85rem; border: 1px solid var(--color-border-soft); border-radius: var(--radius-sm); background: #fafafa; }
.section-divider { height: 1px; margin: 1.4rem 0; border: 0; background: var(--color-border-soft); }
.row { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 1rem; }
.col { grid-column: span 6; min-width: 0; }
.inline-form { display: inline-flex; align-items: center; flex-wrap: wrap; gap: .4rem; margin: .15rem .35rem .15rem 0; }
.inline-form label { display: inline-flex; align-items: center; gap: .4rem; }
.inline-form input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]) { width: auto; min-width: 9rem; }
.table-actions { display: flex; align-items: center; justify-content: flex-end; flex-wrap: wrap; gap: .4rem; min-width: max-content; }
.table-actions .inline-form, .table-actions form { margin: 0; }
.table-actions-stacked { align-items: flex-end; flex-direction: column; }
.table-role-field { display: grid; grid-template-columns: minmax(8.5rem, 1fr) auto; align-items: end; gap: .4rem; }
.table-role-field label { display: grid; gap: .22rem; color: var(--color-muted); font-size: .72rem; }
.table-role-field input:not([type="hidden"]):not([type="checkbox"]):not([type="radio"]) { min-height: 1.95rem; padding-block: .3rem; }
.button-stack { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; }
.button-row { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-top: 1rem; }
.button-row form { margin: 0; }
.inline-action-form { display: grid; grid-template-columns: minmax(9rem, 1fr) auto; align-items: end; gap: .75rem; margin-top: 1rem; }
.inline-action-form .field { margin: 0; }
.inline-action-form .button { margin-bottom: 1rem; }

button, .button, .btn { display: inline-flex; align-items: center; justify-content: center; min-height: 2.35rem; padding: .48rem .9rem; border: 1px solid #9b9b9b; border-radius: var(--radius-sm); color: var(--color-text); background: var(--color-surface); box-shadow: 0 1px 1px rgba(0,0,0,.04); font: inherit; font-size: .875rem; font-weight: 620; line-height: 1.2; text-align: center; text-decoration: none; vertical-align: middle; cursor: pointer; transition: background-color .12s ease, border-color .12s ease, box-shadow .12s ease; }
button:hover, .button:hover, .btn:hover { border-color: #777; color: var(--color-text); background: #f5f5f5; }
.button-primary, .button.primary, .btn-primary { border-color: var(--color-brand); color: #fff; background: var(--color-brand); }
/* Standalone selectors are part of the tested authentication design contract. */
.button-primary { color: #fff; }
.button-primary:hover, .button.primary:hover, .btn-primary:hover { border-color: var(--color-brand-hover); color: #fff; background: var(--color-brand-hover); }
.button-secondary, .btn-secondary { border-color: #8a8a8a; color: var(--color-text); background: #fff; }
.btn-danger, .btn-warning { border-color: var(--color-danger); color: var(--color-danger); background: #fff; }
.btn-danger:hover, .btn-warning:hover { border-color: var(--color-danger); color: #fff; background: var(--color-danger); }
.button-danger { border-color: #dc626d; color: var(--color-danger); background: #fff; }
.button-danger:hover { border-color: var(--color-danger); color: #fff; background: var(--color-danger); }
.button-danger-primary { border-color: var(--color-danger); color: #fff; background: var(--color-danger); }
.button-danger-primary:hover { border-color: #a30d19; color: #fff; background: #a30d19; }
.button-compact { min-height: 1.9rem; padding: .3rem .62rem; font-size: .76rem; }
.btn-sm { min-height: 1.9rem; padding: .32rem .65rem; font-size: .78rem; }
button:disabled, .button:disabled, .btn:disabled { cursor: not-allowed; opacity: .55; }

/* Notices, status and definition lists */
.notice { display: flex; align-items: flex-start; gap: .75rem; margin: 0 0 1rem; padding: .85rem 1rem; border: 1px solid #b4cee1; border-left: 3px solid var(--color-brand); border-radius: var(--radius-sm); color: #24435a; background: var(--color-brand-soft); }
.notice h2, .notice h3 { font-size: .95rem; }
.notice p { margin: 0; color: inherit; }
.notice-error { border-color: #f1aeb5; border-left-color: var(--color-danger); color: #8e101b; background: var(--color-danger-soft); }
.notice-error .notice-icon { background: var(--color-danger); }
.notice-icon { display: grid; place-items: center; width: 1.35rem; height: 1.35rem; flex: 0 0 auto; border-radius: 50%; color: #fff; background: var(--color-brand); font-size: .75rem; font-weight: 700; }
.account-scope-warning { display: flex; align-items: flex-start; gap: 1rem; margin: 0 0 1.5rem; padding: 1.15rem 1.25rem; border: 1px solid #e6c44f; border-left-width: .4rem; border-radius: var(--radius-sm); color: #5d4200; background: #fff8d8; box-shadow: 0 2px 10px rgba(93, 66, 0, .08); }
.account-scope-warning h2 { margin: .1rem 0 .35rem; color: #5d4200; font-size: clamp(1.15rem, 2vw, 1.4rem); }
.account-scope-warning p { margin: 0; color: #5d4200; font-weight: 550; }
.account-scope-warning-label { text-transform: uppercase; letter-spacing: .09em; font-size: .75rem; font-weight: 800 !important; }
.account-scope-warning-icon { color: #8a6100; font-size: 1.75rem; line-height: 1; }
.authentication-level-list { display: grid; gap: .625rem; margin: 1rem 0; }
.authentication-level-option { align-items: center; border: 1px solid var(--color-border); border-radius: var(--radius-md); cursor: pointer; display: grid; gap: .75rem; grid-template-columns: auto auto minmax(0, 1fr) auto; min-height: 3.75rem; padding: .75rem; }
.authentication-level-option:hover { border-color: var(--color-brand); }
.authentication-level-option.is-selected { background: color-mix(in srgb, var(--color-brand) 8%, var(--color-surface)); border-color: var(--color-brand); }
.authentication-level-option.is-unavailable { cursor: not-allowed; opacity: .68; }
.authentication-level-number { align-items: center; background: var(--color-surface-muted); border-radius: 999px; display: inline-flex; font-weight: 700; height: 2rem; justify-content: center; width: 2rem; }
.authentication-level-copy { display: grid; gap: .125rem; }
.authentication-level-copy small { color: var(--color-text-muted); }
@media (max-width: 42rem) {
    .authentication-level-option { grid-template-columns: auto auto minmax(0, 1fr); }
    .authentication-level-option .badge { grid-column: 2 / -1; justify-self: start; }
}
.badge { display: inline-flex; align-items: center; width: fit-content; min-height: 1.5rem; padding: .2rem .58rem; border-radius: 999px; font-size: .68rem; font-weight: 700; white-space: nowrap; }
.badge-neutral { color: #4a4a4a; background: #ededed; }
.badge-accent { color: #0b5a0b; background: var(--color-success-soft); }
.badge-success { color: #0b5a0b; background: var(--color-success-soft); }
.badge-warning { color: #7a3e00; background: #fff4ce; }
.badge-danger { color: #8e101b; background: var(--color-danger-soft); }
dl { display: grid; grid-template-columns: minmax(11rem, 1fr) minmax(0, 2fr); margin: 0; }
dt, dd { margin: 0; padding: .72rem .25rem; border-bottom: 1px solid var(--color-border-soft); }
dt { color: var(--color-muted); font-weight: 600; }
dd { color: var(--color-text); font-weight: 600; overflow-wrap: anywhere; }

/* Management-page compositions */
.settings-stack { display: grid; margin-top: .5rem; border-top: 1px solid var(--color-border-soft); }
.content-card > .settings-stack > .setting-row { display: grid; grid-template-columns: minmax(12rem, .9fr) minmax(16rem, 1.4fr) auto; align-items: center; gap: 1.25rem; max-width: none; margin: 0; padding: 1.25rem 0; border-bottom: 1px solid var(--color-border-soft); }
.content-card > .settings-stack > .setting-row-wide { align-items: start; }
.setting-row h3, .setting-row p, .setting-row .field { margin-bottom: 0; }
.setting-row > button { justify-self: end; white-space: nowrap; }
.account-identity { margin: -.35rem 0 1.25rem; color: var(--color-text) !important; font-size: 1rem; }
.security-note { margin: 1rem 0 0 !important; padding: .75rem .9rem; border-radius: var(--radius-sm); color: #4f4f4f !important; background: #f5f5f5; font-size: .82rem; }
.profile-security-grid, .profile-details-grid { margin: 1rem 0; }
.profile-security-grid .content-card, .profile-details-grid .content-card { min-width: 0; }
.profile-security-grid .content-card + .content-card, .profile-details-grid .content-card + .content-card { margin-top: 0; }
.metric-value { color: var(--color-brand); font-size: 1.55rem; font-weight: 720; line-height: 1; }
.code-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .45rem; margin: .75rem 0 0; padding: 0; list-style: none; }
.code-grid li { margin: 0; }
.code-grid code { display: block; text-align: center; }
.breakable { overflow-wrap: anywhere; word-break: break-word; }
.detail-list, .activity-list { display: grid; margin: 0; padding: 0; list-style: none; }
.detail-list li { display: flex; align-items: center; justify-content: space-between; gap: 1rem; margin: 0; padding: .8rem 0; border-top: 1px solid var(--color-border-soft); }
.detail-list li:first-child { border-top: 0; }
.detail-list li > div { min-width: 0; }
.detail-list strong, .detail-list small { display: block; overflow-wrap: anywhere; }
.detail-list small { margin-top: .18rem; }
.activity-list { grid-template-columns: minmax(10rem, auto) minmax(0, 1fr) auto; }
.activity-list li { display: grid; grid-column: 1 / -1; grid-template-columns: subgrid; align-items: center; gap: 1rem; margin: 0; padding: .8rem 0; border-top: 1px solid var(--color-border-soft); }
.activity-list time { color: var(--color-muted); font-size: .82rem; white-space: nowrap; }
.identity-cell { display: grid; gap: .12rem; min-width: 12rem; }
.identity-cell code { width: fit-content; margin-top: .18rem; }
.danger-zone { display: flex; align-items: center; justify-content: space-between; gap: 1.5rem; margin-top: 1.25rem; padding: 1rem; border: 1px solid #f1aeb5; border-radius: var(--radius-sm); background: #fff9f9; }
.danger-zone h3, .danger-zone p { margin-bottom: 0; }
.danger-zone form { flex: 0 0 auto; margin: 0; }
.management-links { margin-top: 1rem; }
.filter-card { background: linear-gradient(180deg, #fff, #fbfdff); }
.content-card > .filter-form { max-width: none; }
.enrollment-details, .recovery-codes { margin-top: 1rem; }
.enrollment-details > div, .recovery-codes > div, .secret-reveal > div { min-width: 0; }
.secret-reveal { border-color: #e6c44f; border-left-color: #9d6f00; color: #5d4200; background: #fff8d8; }
.credential-list { margin-top: .5rem; }

.metric-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.metric-card { display: grid; gap: .25rem; min-width: 0; padding: 1.15rem; border: 1px solid var(--color-border-soft); border-radius: var(--radius-md); background: var(--color-surface); box-shadow: var(--shadow-card); }
.metric-card-wide { grid-column: span 2; }
.metric-card strong { font-size: 1.05rem; overflow-wrap: anywhere; }
.metric-card small { margin-top: .2rem; }
.metric-label { color: var(--color-muted); font-size: .7rem; font-weight: 700; letter-spacing: .055em; text-transform: uppercase; }
.status-hero { display: grid; grid-template-columns: auto minmax(0, 1fr) auto; align-items: center; gap: 1rem; margin-bottom: 1rem; padding: 1.15rem 1.25rem; border: 1px solid #9fd89f; border-radius: var(--radius-md); background: #f1fbf1; box-shadow: var(--shadow-card); }
.status-hero.status-unavailable { border-color: #f1aeb5; background: #fff5f5; }
.status-indicator { width: .75rem; height: .75rem; border-radius: 50%; background: var(--color-success); box-shadow: 0 0 0 .32rem var(--color-success-soft); }
.status-unavailable .status-indicator { background: var(--color-danger); box-shadow: 0 0 0 .32rem var(--color-danger-soft); }
.status-hero h2, .status-hero p { margin: 0; }
.status-hero .eyebrow { margin-bottom: .2rem; }
.retention-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 1px solid var(--color-border-soft); border-radius: var(--radius-sm); }
.retention-grid > div { display: grid; justify-items: center; gap: .25rem; padding: 1.3rem; text-align: center; }
.retention-grid > div + div { border-left: 1px solid var(--color-border-soft); }
.retention-grid small { display: block; }
.status-list { display: grid; gap: .75rem; }
.status-row { display: grid; grid-template-columns: minmax(12rem, 1fr) auto minmax(18rem, 1.5fr); align-items: center; gap: 1rem; padding: 1rem; border: 1px solid var(--color-border-soft); border-radius: var(--radius-sm); background: #fafafa; }
.status-row strong, .status-row small { display: block; }
.inline-metrics { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); }
.inline-metrics > div { min-width: 0; padding-left: 1rem; border-left: 1px solid var(--color-border-soft); }
.inline-metrics dt, .inline-metrics dd { padding: 0; border: 0; }
.inline-metrics dt { font-size: .72rem; }
.inline-metrics dd { margin-top: .2rem; font-size: .82rem; }

/* Data tables */
.table-responsive, .table-wrap { width: 100%; max-width: 100%; overflow: auto; border-radius: var(--radius-sm); overscroll-behavior: contain; scrollbar-gutter: stable; }
.table-wrap[tabindex]:focus-visible { outline: 2px solid var(--color-focus); outline-offset: 2px; }
.table-wrap-bounded { max-height: min(32rem, 65vh); border: 1px solid var(--color-border-soft); background: var(--color-surface); }
.table-wrap-long { max-height: min(40rem, 72vh); }
.table-wrap > table { min-width: 42rem; margin-top: 0; }
.table-wrap > .table-wide { min-width: 64rem; }
.table-wrap-bounded thead { position: sticky; z-index: 2; top: 0; }
.table-wrap-bounded th { border-top: 0; box-shadow: 0 1px 0 var(--color-border); }
table, .table { width: 100%; margin: .75rem 0 0; border-spacing: 0; border-collapse: collapse; font-size: .875rem; line-height: 1.4; }
th { padding: .68rem .75rem; border-top: 1px solid var(--color-border-soft); border-bottom: 1px solid var(--color-border); color: var(--color-muted); background: #fafafa; font-size: .72rem; font-weight: 700; letter-spacing: .035em; text-align: left; text-transform: uppercase; white-space: nowrap; }
td { padding: .78rem .75rem; border-bottom: 1px solid var(--color-border-soft); vertical-align: top; overflow-wrap: anywhere; }
tbody tr:hover { background: #fafcfe; }
tbody tr:last-child td { border-bottom: 0; }
td > form { margin: 0; }
.table-action { width: 1%; text-align: right; white-space: nowrap; }
.data-table td:first-child { color: var(--color-text); }
ul { padding-left: 1.3rem; }
li + li { margin-top: .3rem; }
.check-list { display: grid; gap: 0; margin: 0; padding: 0; list-style: none; }
.check-list li { display: grid; grid-template-columns: 1.6rem 1fr; gap: .7rem; padding: 1rem 0; border-top: 1px solid var(--color-border-soft); }
.check-list li > span { display: grid; place-items: center; width: 1.35rem; height: 1.35rem; border-radius: 50%; color: #fff; background: var(--color-success); font-size: .72rem; }
.check-list strong { display: block; }
.check-list p { margin: .15rem 0 0; }

/* Authentication journeys */
.authentication-page { background-color: var(--color-canvas); background-image: var(--login-background-image); background-position: center; background-repeat: no-repeat; background-size: cover; }
.auth-overview { --color-surface: #fff; width: min(100%, 34rem); max-width: 34rem; margin: 0 auto; padding: clamp(1.75rem, 4vw, 3rem); border: 1px solid rgba(0, 0, 0, .09); border-radius: var(--radius-sm); background: #fff; box-shadow: 0 16px 42px rgba(0, 0, 0, .16); }
.auth-header { margin-bottom: 1.5rem; text-align: center; }
.auth-header .brand-mark, .auth-header .brand-logo { margin-inline: auto; }
.auth-header .lede { margin-inline: auto; }
.auth-overview > .content-card, .auth-overview > .auth-card { padding: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none; }
.auth-card { padding: clamp(1.4rem, 4vw, 2rem); }
.auth-overview form, .auth-card form { display: grid; gap: .9rem; max-width: none; }
.auth-overview form { width: 100%; }
.auth-overview form > label, .auth-card form > label { margin-bottom: -.55rem; }
.auth-overview form .field { margin-bottom: 0; }
.auth-overview form .button, .auth-card form .button { width: 100%; margin-top: .2rem; }
.logout-confirmation > form { margin-top: 1.1rem; }
.logout-impact { margin-bottom: 0; }
.logout-impact h2 { margin: 0 0 .3rem; color: inherit; }
.logout-impact p + p { margin-top: .4rem; font-size: .82rem; }
.logout-actions { display: flex; align-items: center; flex-wrap: wrap; gap: .65rem; margin-top: .25rem; }
.auth-overview form .logout-actions .button { width: auto; min-width: 8rem; margin-top: 0; }
.account-context { display: flex; flex-wrap: wrap; align-items: baseline; gap: .25rem .5rem; margin: -.25rem 0 1rem; color: var(--color-muted); font-size: .9rem; }
.account-context strong { color: var(--color-text); overflow-wrap: anywhere; }
.auth-steps { display: grid; gap: .55rem; margin: 0 0 1.25rem; padding: 0; list-style: none; counter-reset: auth-step; }
.auth-steps li { position: relative; min-height: 1.8rem; padding: .25rem 0 .25rem 2.35rem; color: var(--color-muted); font-size: .9rem; counter-increment: auth-step; }
.auth-steps li::before { content: counter(auth-step); position: absolute; inset: 0 auto auto 0; display: grid; width: 1.75rem; height: 1.75rem; place-items: center; border: 1px solid var(--color-border); border-radius: 50%; background: var(--color-surface); color: var(--color-muted); font-size: .78rem; font-weight: 700; }
.auth-steps li.is-current { color: var(--color-text); font-weight: 650; }
.auth-steps li.is-current::before { border-color: var(--color-brand); background: var(--color-brand); color: #fff; }
.auth-steps li.is-complete::before { content: "✓"; border-color: var(--color-success); background: var(--color-success); color: #fff; }
.auth-alternatives { display: flex; flex-wrap: wrap; gap: .5rem 1rem; align-items: center; margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--color-border-soft); font-size: .9rem; }
.auth-alternatives form { display: inline; width: auto; margin: 0; }
.button-link { appearance: none; margin: 0; padding: 0; border: 0; background: none; color: var(--color-brand); font: inherit; text-decoration: underline; text-underline-offset: .18em; cursor: pointer; }
.button-link:hover { color: var(--color-brand-hover); }
.button-link:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: .15rem; }
.auth-options { margin-top: 1.1rem; padding-top: 1rem; border-top: 1px solid var(--color-border-soft); }
.auth-options > summary { min-height: 2.75rem; padding: .65rem 0; color: var(--color-brand); font-weight: 650; cursor: pointer; }
.auth-options > summary:hover { color: var(--color-brand-hover); }
.auth-options > summary:focus-visible { outline: 3px solid var(--color-focus); outline-offset: 3px; border-radius: .15rem; }
.auth-option-list { display: grid; gap: 0; margin: .4rem 0 0; padding: 0; border-top: 1px solid var(--color-border-soft); list-style: none; }
.auth-option-item { min-width: 0; margin: 0; padding: .85rem 0; border-bottom: 1px solid var(--color-border-soft); }
.auth-option-form { display: block !important; width: auto !important; margin: 0 !important; }
.auth-option-action { display: inline-block; min-height: 2.75rem; padding-block: .65rem; text-align: left; }
.auth-option-description { margin: -.25rem 0 0 !important; color: var(--color-muted); font-size: .82rem; line-height: 1.45; }
.trust-note { margin-top: 1rem; padding: .9rem 1rem; border-left: 3px solid var(--color-brand); border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: var(--color-muted); background: rgba(255,255,255,.65); }
.trust-note strong { color: var(--color-text); }
.trust-note p { margin: .22rem 0 0; font-size: .84rem; }
.auth-overview-wide { max-width: 48rem; }
.totp-setup-options { display: grid; grid-template-columns: minmax(13rem, .8fr) minmax(16rem, 1.2fr); gap: 1rem; margin-top: 1rem; }
.totp-setup-option { min-width: 0; padding: 1rem; border: 1px solid var(--color-border-soft); border-radius: var(--radius-sm); background: #fafcfe; }
.totp-option-title { margin: .15rem 0 .7rem !important; color: var(--color-text) !important; font-size: 1rem; font-weight: 700; }
.totp-setup-option .eyebrow { margin: 0; }
.totp-qr-frame { display: grid; width: fit-content; margin: 0 auto .75rem; padding: .55rem; border: 1px solid var(--color-border); border-radius: .65rem; background: #fff; }
.totp-qr-frame img { display: block; width: min(13rem, 100%); height: auto; image-rendering: pixelated; }
.totp-key-row { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: stretch; margin-top: .35rem; }
.totp-key-row input { min-width: 0; margin: 0; font-family: "Cascadia Code", Consolas, monospace; letter-spacing: .04em; }
.totp-technical-details { margin-top: .8rem; font-size: .82rem; }
.totp-technical-details code { display: block; margin-top: .5rem; padding: .6rem; border-radius: .35rem; background: var(--color-surface); }
.totp-secret-warning { margin: .75rem 0 1rem; padding: .7rem .85rem; border-left: 3px solid #9d6f00; border-radius: 0 var(--radius-sm) var(--radius-sm) 0; color: #5d4200; background: #fff8d8; font-size: .82rem; }

.d-inline { display: inline !important; }
.mt-3 { margin-top: 1rem !important; }
.mb-3 { margin-bottom: 1rem !important; }

@media (max-width: 64rem) {
  .secure-context, .account-name { display: none; }
  .app-shell { grid-template-columns: minmax(0, 1fr); }
  .primary-nav { position: sticky; z-index: 10; top: 4.5rem; display: flex; align-items: center; width: 100%; min-width: 0; max-width: 100vw; height: auto; padding: .5rem .75rem; overflow-x: auto; overflow-y: hidden; border-right: 0; border-bottom: 1px solid rgba(255,255,255,.12); }
  .primary-nav ul { display: flex; width: max-content; }
  .primary-nav a { min-height: 2.4rem; white-space: nowrap; }
  .primary-nav a.active { box-shadow: inset 0 -3px var(--color-brand-light); }
  .nav-label { position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden; clip: rect(0,0,0,0); }
  .primary-nav ul + ul { margin-left: .4rem; padding-left: .4rem; border-left: 1px solid rgba(255,255,255,.16); }
  .site-footer:not(.auth-footer) { padding-left: clamp(1rem, 2.5vw, 2rem); }
  .content-card > .settings-stack > .setting-row { grid-template-columns: minmax(11rem, .8fr) minmax(15rem, 1.2fr); }
  .setting-row > button { grid-column: 2; justify-self: start; }
  .metric-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .status-row { grid-template-columns: minmax(12rem, 1fr) auto; }
  .status-row .inline-metrics { grid-column: 1 / -1; }
}

@media (max-width: 38rem) {
  .logout-actions { display: grid; }
  .auth-overview form .logout-actions .button { width: 100%; }
}

@media (max-width: 44rem) {
  .topbar-inner { min-height: 4rem; padding-block: .5rem; }
  .brand-name small, .account-chip { display: none; }
  .brand-logo, .brand-mark { height: 2.15rem; }
  .brand-logo { width: auto; max-width: min(8rem, 34vw); }
  .brand-mark { width: 2.15rem; }
  .environment { padding-inline: .5rem; }
  .app-shell { min-height: calc(100vh - 7.25rem); }
  .authentication-page { background: #fff; }
  .authentication-page .app-shell.auth-shell { min-height: 100vh; }
  .authentication-page .auth-shell .main-content { display: block; min-height: 100vh; padding: 1.75rem 1rem 3.5rem; }
  .authentication-page .auth-overview { width: 100%; max-width: none; padding: 0; border: 0; border-radius: 0; box-shadow: none; }
  .primary-nav { top: 4rem; }
  .main-content { padding: 1.75rem 1rem 3.5rem; }
  .page-header, .getting-started, .section-heading { align-items: flex-start; flex-direction: column; gap: 1rem; }
  .page-header h1, .auth-header h1 { font-size: clamp(1.8rem, 9vw, 2.35rem); }
  .card-grid, .info-grid, .ownership-grid, .provider-grid, .form-grid, .form-grid.three-column, .form-grid.color-fields, .option-grid, .metric-grid { grid-template-columns: 1fr; }
  .row { grid-template-columns: 1fr; }
  .col { grid-column: 1; }
  .getting-started .button { width: 100%; }
  .card, .content-card, .auth-card { padding: 1.1rem; }
  .profile-security-grid .content-card + .content-card, .profile-details-grid .content-card + .content-card { margin-top: 0; }
  .content-card > .settings-stack > .setting-row { grid-template-columns: 1fr; gap: .75rem; }
  .setting-row > button { grid-column: 1; justify-self: stretch; }
  .inline-action-form { grid-template-columns: 1fr; }
  .inline-action-form .button { width: 100%; margin: 0; }
  .table-actions-stacked { align-items: stretch; }
  .table-role-field { grid-template-columns: 1fr; }
  .table-role-field .button { width: 100%; }
  .button-row > .button { flex: 1 1 auto; }
  .activity-list, .activity-list li { grid-template-columns: 1fr auto; }
  .activity-list time { grid-column: 1 / -1; }
  .activity-list strong { min-width: 0; }
  .status-hero { grid-template-columns: auto 1fr; }
  .status-hero > .badge { grid-column: 2; justify-self: start; }
  .metric-card-wide { grid-column: auto; }
  .retention-grid { grid-template-columns: 1fr; }
  .retention-grid > div + div { border-top: 1px solid var(--color-border-soft); border-left: 0; }
  .status-row { grid-template-columns: 1fr auto; }
  .status-row .inline-metrics { grid-template-columns: 1fr; }
  .inline-metrics > div { padding: .55rem 0; border-top: 1px solid var(--color-border-soft); border-left: 0; }
  .danger-zone { align-items: stretch; flex-direction: column; }
  .danger-zone .button { width: 100%; }
  .code-grid { grid-template-columns: 1fr; }
  .totp-setup-options, .totp-key-row { grid-template-columns: 1fr; }
  .totp-key-row .button { width: 100%; }
  dl { grid-template-columns: 1fr; }
  dt { padding-bottom: .1rem; border-bottom: 0; }
  dd { padding-top: .1rem; }
  .site-footer { flex-direction: column; gap: .15rem; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; }
}

@media (forced-colors: active) {
  .brand-mark, .notice-icon, .check-list li > span, .account-avatar, .status-dot { border: 1px solid currentColor; }
  .primary-nav a.active { outline: 2px solid currentColor; outline-offset: -2px; }
  .badge, button, .button, .btn { border: 1px solid currentColor; }
}

@media print {
  .topbar, .primary-nav, .site-footer { display: none; }
  .app-shell { display: block; }
  .main-content { max-width: none; padding: 0; }
  .card, .content-card, .auth-card { break-inside: avoid; box-shadow: none; }
}
