@import url('/portal/design-tokens.css?v=20261104-enterprise-final');

:root {
  --bg: var(--bi-bg);
  --surface: var(--bi-surface);
  --ink: var(--bi-text);
  --muted: var(--bi-text-secondary);
  --subtle: var(--bi-text-secondary); /* Small helper text retains AA contrast. */
  --accent: var(--bi-brand);
  --line: var(--bi-border);
  --line-strong: var(--bi-border-strong);
  --soft: var(--bi-bg-secondary);
  --warm: var(--bi-brand-soft);
  --header: var(--bi-header-height);
}
* { box-sizing: border-box; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--ink);
  font-family: var(--bi-font);
  font-size: var(--bi-text-body);
  font-weight: var(--bi-weight-regular);
  line-height: 1.6;
  font-variant-numeric: tabular-nums;
  font-feature-settings: "tnum";
  -webkit-font-smoothing: antialiased;
}
button, input, select { font: inherit; color: inherit; }
button, a { touch-action: manipulation; }
button { cursor: pointer; }
a { color: inherit; text-decoration: none; }
[hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0,0,0,0); white-space: nowrap; }
button:focus-visible, a:focus-visible, input:focus-visible, select:focus-visible { outline: 2px solid var(--accent); outline-offset: 3px; }
h1, h2, h3, p { margin: 0; }
h1 { font-size: var(--bi-text-title); line-height: 1.4; font-weight: var(--bi-weight-semibold); letter-spacing: -.4px; }
h2 { font-size: var(--bi-text-section); line-height: 1.5; font-weight: var(--bi-weight-semibold); }
h3 { font-size: var(--bi-text-subsection); line-height: 1.5; font-weight: var(--bi-weight-semibold); }
.eyebrow { color: var(--subtle); font-size: var(--bi-text-sm); font-weight: var(--bi-weight-medium); letter-spacing: .4px; margin-bottom: 8px; }
.muted { color: var(--muted); font-size: var(--bi-text-sm); font-weight: var(--bi-weight-regular); line-height: 1.65; }

/* A single 64px navigation row preserves the workspace's usable height. */
.shell-bar { height: var(--header); display: flex; align-items: center; gap: 20px; padding: 0 28px; background: var(--bg); border-bottom: 1px solid var(--line); position: sticky; top: 0; z-index: 30; }
.brand { display: flex; align-items: center; gap: 10px; font-size: var(--bi-text-card); font-weight: var(--bi-weight-semibold); white-space: nowrap; }
.brand-mark { display: grid; place-items: center; width: 32px; height: 32px; border-radius: var(--bi-radius-control); background: var(--ink); color: var(--surface); font-size: var(--bi-text-subsection); font-weight: var(--bi-weight-semibold); line-height: 1; }
.bar-divider { width: 1px; height: 24px; background: var(--line); flex-shrink: 0; }
.shell-navigation, .bar-account { display: flex; align-items: center; gap: 8px; min-width: 0; }
.shell-navigation { flex: 1; }
.bar-account { gap: 10px; font-size: var(--bi-text-table); }
.bar-account #user-name { max-width: 112px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.role-badge { background: var(--soft); border: 1px solid var(--line); font-size: var(--bi-text-xs); font-weight: var(--bi-weight-medium); padding: 3px 8px; border-radius: var(--bi-radius-badge); color: var(--muted); white-space: nowrap; }
.quiet-button, .icon-button { display: inline-flex; align-items: center; justify-content: center; min-height: 38px; border: 0; background: transparent; border-radius: var(--bi-radius-control); color: var(--muted); font-size: var(--bi-text-table); font-weight: var(--bi-weight-medium); padding: 8px 12px; white-space: nowrap; }
.shell-navigation .quiet-button { font-size: var(--bi-text-body); font-weight: var(--bi-weight-medium); }
.quiet-button:hover, .icon-button:hover { background: var(--soft); color: var(--ink); }
.quiet-button.active { color: var(--ink); background: var(--warm); box-shadow: inset 0 -2px var(--accent); }
.icon-button { width: 36px; padding: 4px; font-size: var(--bi-text-section); flex-shrink: 0; }
.module-switch { min-width: 0; }
.module-switch select { max-width: 300px; width: 100%; border: 1px solid transparent; background: transparent; font-size: var(--bi-text-body); font-weight: var(--bi-weight-medium); padding: 8px 25px 8px 12px; cursor: pointer; color: var(--ink); min-height: 38px; }
.module-switch select:hover { background: var(--soft); }
.button { display: inline-flex; align-items: center; justify-content: center; gap: 7px; padding: 9px 15px; min-height: 40px; border: 1px solid var(--line-strong); border-radius: var(--bi-radius-control); background: var(--surface); font-size: var(--bi-text-table); font-weight: var(--bi-weight-medium); line-height: 1.45; white-space: nowrap; }
.button:hover:not(:disabled) { border-color: var(--bi-brand-border); background: var(--warm); color: var(--ink); }
.button.primary { background: var(--bi-brand-deep); border-color: var(--bi-brand-deep); color: var(--surface); }
.button.primary:hover:not(:disabled) { background: var(--bi-brand-deep); border-color: var(--ink); color: var(--surface); box-shadow: 0 0 0 1px var(--ink); }
.button:disabled, .icon-button:disabled { background: var(--soft); border-color: var(--line); color: var(--subtle); cursor: default; }
.text-button { color: var(--bi-brand-deep); padding: 2px 0; border: 0; background: none; font-size: var(--bi-text-table); font-weight: var(--bi-weight-medium); }
.text-button:hover { color: var(--bi-brand-deep); text-decoration: underline; text-underline-offset: 3px; }
.notice { margin: 16px 28px; padding: 13px 16px; border: 1px solid var(--line); background: var(--bi-warning-soft); border-radius: var(--bi-radius-control); font-size: var(--bi-text-sm); color: var(--ink); border-left: 3px solid var(--bi-warning); }
.notice.success { background: var(--bi-success-soft); color: var(--ink); border-left-color: var(--bi-success); }

/* Home: quiet grouped entries, with consistent card titles and readable copy. */
.overview { max-width: 1440px; margin: auto; padding: 36px 40px 24px; }
.welcome { display: flex; justify-content: space-between; align-items: center; gap: 32px; padding-bottom: 30px; }
.welcome p:last-child { font-size: var(--bi-text-body); color: var(--muted); margin-top: 10px; }
.welcome-count { border-left: 1px solid var(--line); padding-left: 32px; display: flex; align-items: baseline; gap: 10px; color: var(--muted); font-size: var(--bi-text-sm); white-space: nowrap; }
.welcome-count strong { font-size: var(--bi-number-primary); font-weight: var(--bi-weight-bold); line-height: 1.2; color: var(--ink); }
.home-line-desk { display: flex; align-items: center; gap: var(--bi-space-3); margin-bottom: var(--bi-space-6); padding: var(--bi-space-3) var(--bi-space-4); border: 1px solid var(--bi-brand-border); border-radius: var(--bi-radius-card); background: var(--surface); color: var(--ink); text-decoration: none; }
.home-line-desk:hover { background: var(--warm); }
.home-line-desk .card-symbol { flex-shrink: 0; }
.home-line-desk-copy { flex: 1; min-width: 0; }
.home-line-desk h2 { font-size: var(--bi-text-card); }
.home-line-desk p { color: var(--muted); font-size: var(--bi-text-sm); }
.home-line-desk-action { flex-shrink: 0; color: var(--bi-brand-deep); font-size: var(--bi-text-table); font-weight: var(--bi-weight-semibold); }
.catalog-tools { display: flex; align-items: center; justify-content: space-between; gap: 24px; margin-bottom: 28px; padding-bottom: 20px; border-bottom: 1px solid var(--line); }
.segmented { display: flex; padding: 4px; border-radius: 9px; background: var(--soft); gap: 3px; }
.segmented button { min-height: 36px; border: 0; background: transparent; padding: 7px 17px; border-radius: 6px; color: var(--muted); font-size: var(--bi-text-table); font-weight: var(--bi-weight-medium); }
.segmented button.active { background: var(--surface); color: var(--bi-brand-deep); box-shadow: 0 1px 4px #2625220A; }
.catalog-search input { background: var(--surface); border: 1px solid var(--line-strong); border-radius: var(--bi-radius-control); padding: 10px 13px; width: 320px; font-size: var(--bi-text-table); }
.catalog-group { margin-bottom: 30px; }
.catalog-heading { display: flex; align-items: baseline; gap: 12px; margin-bottom: 16px; }
.catalog-heading span { color: var(--subtle); font-size: var(--bi-text-sm); }
.grid-cards { display: grid; grid-template-columns: repeat(3,minmax(0,1fr)); gap: 20px; }
.board-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--bi-radius-card); padding: 22px 24px; display: flex; flex-direction: column; min-height: 216px; transition: border-color .15s, box-shadow .15s; }
.board-card:hover { border-color: var(--bi-brand-border); box-shadow: 0 5px 18px #26252206; }
.card-heading { display: flex; align-items: center; justify-content: space-between; gap: 16px; }
.card-symbol { display: grid; place-items: center; width: 36px; height: 36px; background: var(--warm); color: var(--ink); border: 1px solid var(--bi-brand-border); border-radius: var(--bi-radius-control); font-size: var(--bi-text-card); font-weight: var(--bi-weight-semibold); }
.card-state { font-size: var(--bi-text-xs); font-weight: var(--bi-weight-medium); color: var(--ink); background: var(--bi-success-soft); padding: 3px 8px; border-radius: var(--bi-radius-badge); }
.board-card.locked { background: var(--soft); }
.board-card.locked .card-symbol { background: var(--bg); border-color: var(--line); color: var(--subtle); }
.board-card.locked .card-state { color: var(--ink); background: var(--bi-info-soft); }
.card-title { font-size: var(--bi-text-card); font-weight: var(--bi-weight-semibold); margin: 16px 0 8px; line-height: 1.6; }
.card-desc { color: var(--muted); font-size: var(--bi-text-body); line-height: 1.7; margin-bottom: 18px; flex: 1; }
.card-link { display: flex; justify-content: space-between; align-items: center; font-size: var(--bi-text-table); font-weight: var(--bi-weight-medium); color: var(--bi-brand-deep); padding-top: 14px; border-top: 1px solid var(--line); }
.card-link:hover { color: var(--bi-brand-deep); text-decoration: underline; text-underline-offset: 3px; }
.locked .card-link { color: var(--subtle); cursor: default; font-weight: var(--bi-weight-regular); }
.management-card { display: flex; justify-content: space-between; align-items: center; gap: 28px; padding: 26px 28px; border: 1px solid var(--line); border-radius: var(--bi-radius-card); background: var(--soft); }
.management-card p { font-size: var(--bi-text-body); color: var(--muted); margin-top: 8px; }
.portal-footer { display: flex; justify-content: space-between; gap: 24px; color: var(--subtle); font-size: var(--bi-text-sm); padding-top: 28px; }
#module-workspace { width: 100%; height: calc(100dvh - var(--header)); min-height: 320px; }
#portal-frames { position: relative; width: 100%; height: 100%; }
#portal-frames iframe { position: absolute; inset: 0; width: 100%; height: 100%; border: 0; }

/* Management: table and editor both remain legible on 1366px workstations. */
.accounts-page { width: 100%; max-width: 1840px; margin: auto; padding: 32px 32px 40px; }
.page-heading { display: flex; justify-content: space-between; align-items: center; gap: 24px; margin-bottom: 26px; }
.page-heading p:last-child { font-size: var(--bi-text-body); color: var(--muted); margin-top: 10px; }
.account-tools { display: grid; grid-template-columns: minmax(240px,1.5fr) repeat(2,minmax(160px,1fr)) minmax(220px,1.2fr); align-items: end; gap: 16px; padding: 20px; border: 1px solid var(--line); background: var(--surface); border-radius: var(--bi-radius-card); margin-bottom: 24px; }
.account-tools label { display: flex; flex-direction: column; gap: 7px; min-width: 0; }
.account-tools label>span { font-size: var(--bi-text-sm); font-weight: var(--bi-weight-medium); color: var(--muted); }
input[type=search], select { min-height: 40px; border: 1px solid var(--line-strong); background: var(--surface); border-radius: var(--bi-radius-control); padding: 9px 11px; font-size: var(--bi-text-table); font-weight: var(--bi-weight-regular); min-width: 0; width: 100%; }
input::placeholder { color: var(--subtle); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); flex-shrink: 0; cursor: pointer; }
input[type=checkbox]:disabled { cursor: default; }
.accounts-layout { display: grid; grid-template-columns: minmax(0,1fr) 420px; align-items: start; gap: 24px; }
.account-list-panel, .account-detail { border: 1px solid var(--line); border-radius: var(--bi-radius-card); background: var(--surface); min-width: 0; }
.list-heading { display: flex; align-items: center; justify-content: space-between; padding: 20px; gap: 16px; }
.list-heading h2 { display: flex; align-items: center; gap: 9px; }
.list-heading h2 span { font-size: var(--bi-text-xs); font-weight: var(--bi-weight-medium); background: var(--soft); color: var(--muted); padding: 3px 8px; border-radius: var(--bi-radius-badge); }
.account-table-scroll { overflow: auto; overscroll-behavior-x: contain; scrollbar-width: thin; }
table { width: 100%; border-collapse: collapse; text-align: left; font-size: var(--bi-text-table); font-weight: var(--bi-weight-regular); }
.account-table { min-width: 780px; table-layout: fixed; }
.account-table th:nth-child(1) { width: 22%; }
.account-table th:nth-child(2) { width: 19%; }
.account-table th:nth-child(3) { width: 28%; }
.account-table th:nth-child(4) { width: 19%; }
.account-table th:nth-child(5) { width: 12%; min-width: 76px; }
th { padding: 14px 16px; background: var(--soft); color: var(--muted); font-size: var(--bi-text-table); font-weight: var(--bi-weight-semibold); line-height: 1.5; white-space: nowrap; border-top: 1px solid var(--line); border-bottom: 1px solid var(--line); }
td { padding: 16px; border-bottom: 1px solid var(--line); vertical-align: top; font-size: var(--bi-text-table); font-weight: var(--bi-weight-regular); line-height: 1.65; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: var(--bg); }
tbody tr.selected td { background: var(--warm); }
td b { font-weight: var(--bi-weight-medium); overflow-wrap: anywhere; }
.account-subtext { font-size: var(--bi-text-sm); font-weight: var(--bi-weight-regular); color: var(--subtle); margin-top: 4px; overflow-wrap: anywhere; line-height: 1.6; }
.status { display: inline-flex; font-size: var(--bi-text-xs); font-weight: var(--bi-weight-medium); border-radius: var(--bi-radius-badge); padding: 3px 8px; background: var(--bi-warning-soft); color: var(--ink); line-height: 1.5; }
.status.active { background: var(--bi-success-soft); color: var(--ink); }
.module-count { font-size: var(--bi-text-table); font-weight: var(--bi-weight-medium); margin-bottom: 6px; color: var(--ink); }
.account-module-tags { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.account-module-tags span { display: inline-block; max-width: 100%; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: var(--bi-text-table); font-weight: var(--bi-weight-regular); background: var(--soft); padding: 3px 7px; border: 1px solid var(--line); border-radius: var(--bi-radius-badge); color: var(--muted); line-height: 1.5; }
.account-module-tags .module-more { font-size: var(--bi-text-xs); font-weight: var(--bi-weight-medium); }
.date-cell { color: var(--muted); white-space: nowrap; font-size: var(--bi-text-table); }
.date-cell>div { color: var(--subtle); font-size: var(--bi-text-sm); }
.account-table .button { min-height: 36px; padding: 7px 10px; }
.pagination { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding: 18px 20px; border-top: 1px solid var(--line); color: var(--muted); font-size: var(--bi-text-sm); }
.pagination>div { display: flex; gap: 8px; }
.pagination .button { padding: 8px 12px; min-height: 38px; }
.account-detail { position: sticky; top: 88px; max-height: calc(100dvh - 112px); overflow: auto; padding: 24px; scrollbar-width: thin; }
.detail-empty { padding: 72px 16px; text-align: center; }
.empty-icon { display: block; color: var(--accent); font-size: var(--bi-number-primary); font-weight: var(--bi-weight-regular); margin-bottom: 16px; }
.detail-empty p { font-size: var(--bi-text-body); color: var(--muted); line-height: 1.8; margin-top: 12px; }
.detail-heading { display: flex; align-items: start; justify-content: space-between; gap: 16px; }
.detail-heading .eyebrow { margin-bottom: 5px; }
#edit-identity { margin: 10px 0 16px; overflow-wrap: anywhere; }
.identity-scope { padding: 12px 14px; background: var(--soft); font-size: var(--bi-text-sm); color: var(--muted); border-radius: var(--bi-radius-control); line-height: 1.8; }
fieldset { border: 0; border-top: 1px solid var(--line); padding: 18px 0 0; margin: 28px 0 0; min-width: 0; }
legend { font-size: var(--bi-text-card); font-weight: var(--bi-weight-semibold); padding: 0 10px 0 0; }
legend span { font-size: var(--bi-text-sm); font-weight: var(--bi-weight-regular); color: var(--subtle); margin-left: 5px; }
.permission-option { display: flex; align-items: flex-start; gap: 10px; margin-bottom: 16px; cursor: pointer; }
.permission-option input { margin: 3px 0 0; }
.permission-option b { font-size: var(--bi-text-body); font-weight: var(--bi-weight-medium); display: block; }
.permission-option small { display: block; font-size: var(--bi-text-sm); color: var(--muted); line-height: 1.65; margin-top: 3px; }
.permission-option:has(input:disabled) { cursor: default; }
.permission-option:has(input:disabled) b { color: var(--muted); }
.field-label { display: block; font-size: var(--bi-text-sm); font-weight: var(--bi-weight-medium); color: var(--muted); margin-bottom: 7px; }
#edit-material { width: 100%; }
.module-actions { display: flex; gap: 18px; flex-wrap: wrap; margin-bottom: 15px; }
.module-checks { display: grid; gap: 8px; }
.module-checks label { display: flex; align-items: flex-start; gap: 10px; padding: 9px 10px; border: 1px solid transparent; border-radius: var(--bi-radius-control); font-size: var(--bi-text-body); font-weight: var(--bi-weight-regular); cursor: pointer; }
.module-checks label:has(input:checked) { background: var(--bg); border-color: var(--line); }
.module-checks label:hover { background: var(--soft); }
.module-checks input { margin: 3px 0 0; }
.module-checks label:has(input:disabled) { color: var(--muted); cursor: default; }
.module-checks small { display: block; color: var(--subtle); font-size: var(--bi-text-sm); line-height: 1.6; margin-top: 2px; }
.permission-search { display: block; margin-bottom: 10px; }
.permission-search input { box-sizing: border-box; width: 100%; }
#edit-permission-empty { margin: 10px 0; font-size: var(--bi-text-sm); }
#annual-permission-status { margin: 2px 6px 2px 32px; font-size: var(--bi-text-sm); }
.permission-group { border: 1px solid var(--line); border-radius: var(--bi-radius-control); }
.permission-group summary { display: flex; align-items: center; gap: 9px; padding: 9px 10px; border-radius: inherit; list-style: none; cursor: pointer; font-weight: var(--bi-weight-medium); }
.permission-group summary::-webkit-details-marker { display: none; }
.permission-group summary::before { content: ""; flex: none; width: 7px; height: 7px; border: solid var(--muted); border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); margin-inline: 1px 3px; }
.permission-group[open] summary::before { transform: rotate(45deg); }
.permission-group summary:hover { background: var(--soft); }
.permission-group summary:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.permission-summary { margin-inline-start: auto; text-align: end; color: var(--muted); font-size: var(--bi-text-sm); font-weight: var(--bi-weight-regular); }
.permission-panel { padding: 0 10px 9px 24px; }
.permission-panel .module-checks { gap: 0; }
.permission-panel label { padding: 5px 6px; border-color: transparent; }
.permission-panel label:has(input:checked) { background: transparent; border-color: transparent; }
.permission-panel label:hover { background: var(--soft); }
.permission-scope { border-top: 1px solid var(--line); margin-top: 5px; padding-top: 5px; }
.permission-scope .permission-option { margin-bottom: 0; }
#private-bi-permission-status, #line-desk-permission-status { margin: 2px 6px 2px 32px; font-size: var(--bi-text-sm); }
.account-module-tags .private-bi-grant { color: var(--bi-brand-deep); background: var(--bi-brand-soft); }
.inline-error { font-size: var(--bi-text-sm); color: var(--bi-error); line-height: 1.7; margin-top: 12px; }
.edit-footer { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 16px 0 0; margin-top: 20px; border-top: 1px solid var(--line); background: var(--surface); }
.edit-footer .muted { font-size: var(--bi-text-sm); }
.empty-row { padding: 44px 20px; color: var(--subtle); text-align: center; font-size: var(--bi-text-table); }
.empty-results { text-align: center; padding: 56px 20px; color: var(--muted); font-size: var(--bi-text-body); }

/* The review dialog uses the same body scale as account management. */
dialog { width: calc(100% - 40px); max-width: 640px; max-height: 85dvh; overflow: auto; background: var(--bg); border: 1px solid var(--line-strong); border-radius: var(--bi-radius-dialog); padding: 28px; color: var(--ink); box-shadow: var(--bi-shadow-dialog); }
dialog::backdrop { background: #26252266; backdrop-filter: blur(2px); }
.dialog-heading { display: flex; justify-content: space-between; align-items: start; gap: 20px; margin-bottom: 16px; }
.dialog-heading .eyebrow { margin-bottom: 5px; }
.review-changes { padding: 0; list-style: none; margin: 22px 0; border-top: 1px solid var(--line); }
.review-changes li { padding: 14px 0; border-bottom: 1px solid var(--line); font-size: var(--bi-text-body); }
.review-changes li strong { display: block; font-weight: var(--bi-weight-medium); margin-bottom: 5px; }
.review-changes li span { color: var(--muted); font-size: var(--bi-text-sm); }
.review-note { font-size: var(--bi-text-sm); color: var(--muted); line-height: 1.8; background: var(--soft); border-radius: var(--bi-radius-control); padding: 12px 15px; }
.dialog-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 24px; }

@media(min-width:1680px) {
  .accounts-page { padding: 36px 40px 44px; }
  .accounts-layout { grid-template-columns: minmax(0,1fr) 440px; }
  .account-detail { padding: 26px; }
  .account-table th:nth-child(1) { width: 22%; }
  .account-table th:nth-child(2) { width: 18%; }
  .account-table th:nth-child(3) { width: 32%; }
  .account-table th:nth-child(4) { width: 18%; }
  .account-table th:nth-child(5) { width: 10%; }
}
@media(max-width:1279px) {
  .shell-bar { gap: 14px; padding: 0 20px; }
  .bar-account .role-badge { display: none; }
  .module-switch select { max-width: 265px; }
  .overview { padding: 30px 28px 24px; }
  .accounts-page { padding: 28px 24px 36px; }
  .accounts-layout { grid-template-columns: minmax(0,1fr); }
  .account-detail { position: static; max-height: none; }
  .account-detail:has(form:not([hidden])) { grid-row: 1; }
  #edit-role-form { display: grid; grid-template-columns: 1fr 1fr; gap: 0 26px; }
  .detail-heading, #edit-identity, .identity-scope, .edit-footer, #edit-error { grid-column: 1 / -1; }
  #edit-role-form fieldset:last-of-type { grid-column: 2; grid-row: 4 / span 2; }
  .account-tools { grid-template-columns: minmax(210px,1.5fr) repeat(3,minmax(135px,1fr)); }
}
@media(max-width:960px) {
  .brand>span:last-child { display: none; }
  .grid-cards { grid-template-columns: repeat(2,minmax(0,1fr)); gap: 16px; }
  .account-tools { grid-template-columns: 1fr 1fr; }
  .welcome-count { padding-left: 24px; }
  .welcome { gap: 24px; }
}
@media(max-width:760px) {
  .shell-bar { gap: 8px; padding: 0 12px; }
  .bar-divider, .bar-account #user-name, .shell-navigation #portal-home { display: none; }
  .brand-mark { width: 30px; height: 30px; }
  .bar-account { gap: 0; }
  .shell-navigation { gap: 2px; }
  .quiet-button { padding: 8px; }
  .shell-navigation .quiet-button { padding: 8px; }
  .module-switch { flex: 1; }
  .module-switch select { max-width: 100%; padding-left: 6px; padding-right: 15px; }
  .overview { padding: 26px 20px 24px; }
  .welcome { padding-bottom: 24px; }
  .welcome-count { display: none; }
  .catalog-tools { gap: 14px; align-items: stretch; flex-direction: column; margin-bottom: 24px; }
  .segmented { width: max-content; }
  .catalog-search input { width: 100%; }
  .grid-cards { grid-template-columns: 1fr; gap: 14px; }
  .board-card { padding: 20px; min-height: 0; }
  .catalog-group { margin-bottom: 28px; }
  .management-card { padding: 22px; display: block; }
  .management-card .button { margin-top: 18px; }
  .portal-footer { display: block; }
  .portal-footer span { display: block; margin: 5px 0; }
  .accounts-page { padding: 26px 16px 32px; }
  .page-heading { align-items: flex-start; gap: 14px; flex-wrap: wrap; }
  .account-tools { padding: 16px; gap: 12px; }
  .account-tools .account-search { grid-column: 1 / -1; }
  .accounts-layout { gap: 18px; }
  .account-detail { padding: 20px; }
  #edit-role-form { display: block; }
  .account-table { min-width: 780px; }
  .list-heading { padding: 18px 16px; flex-wrap: wrap; }
  .pagination { padding: 16px; gap: 12px; flex-wrap: wrap; }
  .detail-empty { padding: 38px 12px; }
  dialog { padding: 24px 20px; }
  .notice { margin: 12px 16px; }
}
@media(prefers-reduced-motion:reduce) { * { transition: none !important; } }

/* Status hue remains visible without using low-contrast colored small text. */
.card-state, .status { align-items: center; gap: 6px; }
.card-state { display: inline-flex; }
.card-state::before, .status::before { content: ""; display: inline-block; width: 6px; height: 6px; flex-shrink: 0; border-radius: 50%; background: var(--bi-success); }
.status::before { background: var(--bi-warning); }
.status.active::before { background: var(--bi-success); }
.board-card.locked .card-state::before { background: var(--bi-info); }
.permission-option>span, .module-checks label>span { min-width: 0; overflow-wrap: anywhere; }
.card-title, .card-desc, .identity-scope, .review-changes li { overflow-wrap: anywhere; }
