:root {
  --bg: #f6f7fb;
  --surface: #ffffff;
  --text: #172033;
  --muted: #5c6578;
  --border: #d8ddea;
  --accent: #1d4ed8;
  --accent-dark: #123a9c;
  --danger: #9f1239;
  --warning: #92400e;
  --success: #166534;
  --shadow: 0 12px 30px rgba(19, 33, 68, .12);
  --action-button-min-height: 2.75rem;
  --action-button-padding-block: .4rem;
  --action-button-padding-inline: .65rem;
}

.license-management-panel { display: grid; gap: 2rem; min-width: 0; padding-top: 1rem; }
.management-card.license-company-context {
  padding: 1rem 1.25rem;
  border-color: #b9d4e8;
  border-inline-start: .4rem solid var(--twin-blue, #1e70b6);
  border-radius: .75rem;
  background: #e9f3fb;
  box-shadow: none;
}
.license-company-context .section-heading { align-items: end; }
.license-company-context label { width: min(32rem, 100%); }
.license-company-view,
.license-plan-management > section { min-width: 0; }
.management-card.license-company-view { background: var(--surface, #fff); }
#licenseOverviewView { border-block-start: .2rem solid var(--twin-blue, #1e70b6); }
.license-company-view > h3,
.license-focused-view > h3 { margin-top: 0; }
.license-focused-view { border-inline-start: .4rem solid var(--twin-blue, #1e70b6); }
.license-focused-view > form { display: grid; gap: .75rem; }
.license-view-back { display: inline-flex; align-items: center; justify-self: start; gap: .45rem; width: auto; margin-bottom: .35rem; }
.license-view-back > span[aria-hidden] { font-size: 1.5rem; line-height: .75; }
.license-overview-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: .6rem; margin-top: 1.25rem; padding-top: 1rem; border-top: 1px solid var(--border); }
.license-assignment-actions,
.license-activation-actions,
.license-plan-form-actions { display: flex; justify-content: flex-end; }
.license-assignment-actions .guided-action-button,
.license-activation-actions .guided-action-button,
.license-plan-form-actions .guided-action-button { min-width: 0; min-height: 2.75rem; padding: .4rem .65rem; font-size: .9rem; }
.license-management-panel button:not(.management-icon-button) { min-height: 2.75rem; padding: .4rem .65rem; font-size: .9rem; line-height: 1.25; }
.license-summary-list { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; margin: 1rem 0 0; }
.license-summary-list div { display: grid; align-content: start; gap: .2rem; min-width: 0; padding: .8rem; border: 1px solid var(--border); border-radius: .6rem; background: #f8fafc; }
.license-summary-list dt { font-weight: 700; }
.license-summary-list dd { margin: 0; overflow-wrap: anywhere; }
.status-badge.license-current-status { display: inline-flex; align-items: center; gap: .4rem; width: fit-content; max-width: 100%; padding: .25rem .6rem; border: 1px solid currentColor; border-radius: .45rem; font-size: .85rem; line-height: 1.25; white-space: nowrap; }
.license-current-status::before { content: ''; flex: 0 0 auto; inline-size: .55rem; block-size: .55rem; border-radius: 50%; background: currentColor; }
.license-current-status.status-pending_activation,
.license-current-status.status-scheduled { background: #fff7d6; color: #705500; }
.license-current-status.status-grace { background: #fff0d9; color: #7a4300; }
.license-current-status.status-expired,
.license-current-status.status-suspended,
.license-current-status.status-revoked { background: #fff0f0; color: #8a1c1c; }
.license-current-status.status-missing { background: #eef2f7; color: #475569; }
.license-activation-redeem,
.license-token-management { display: grid; gap: .8rem; padding: 1rem; border: 1px solid var(--border); border-radius: .75rem; background: #f8fafc; }
.license-activation-redeem h4 { margin: 0; }
.license-token-management h4 { margin: 0; }
.license-token-summary ul { display: grid; gap: .6rem; margin: 0; padding: 0; list-style: none; }
.license-token-summary li { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: .6rem; padding: .75rem; border: 1px solid var(--border); border-radius: .6rem; background: #f8fafc; }
.license-token-summary code { overflow-wrap: anywhere; }
.license-plan-management { align-content: start; }
.license-plan-management form { display: grid; gap: .8rem; }
.license-plan-form-grid { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(16rem, .85fr); gap: 1rem; align-items: stretch; }
.license-plan-details,
.license-entitlements { display: grid; gap: .65rem; align-content: start; min-width: 0; margin: 0; padding: 1rem; border: 1px solid var(--border); border-radius: .75rem; background: var(--surface); }
.license-plan-details legend,
.license-entitlements legend { padding-inline: .35rem; font-weight: 800; }
.license-plan-details .field-help,
.license-entitlements .field-help { margin-block: 0; }
.license-plan-short-fields { display: grid; grid-template-columns: minmax(0, .65fr) minmax(0, 1fr); gap: 1rem; }
.license-plan-short-fields > label,
.license-plan-short-fields input { width: 100%; min-width: 0; max-width: 100%; }
.license-plan-short-fields .field-label-line { flex-wrap: wrap; }
.identity-editor label.license-checkbox-option { display: flex; align-items: center; gap: .65rem; }
.license-checkbox-option input { inline-size: 1.2rem; block-size: 1.2rem; margin: 0; flex: 0 0 auto; }
.license-plan-details input[readonly],
.license-entitlements input[readonly] { background: #eef2f7; color: #475569; }
.license-plan-list { display: grid; gap: .8rem; margin: 1rem 0; padding: 0; list-style: none; }
.license-plan-list article { padding: 1rem; border: 1px solid var(--border); border-radius: .6rem; }
.license-plan-list h4 { margin: 0; }
.license-plan-entitlements { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .7rem; margin: .7rem 0 0; }
.license-plan-entitlements div { min-width: 0; }
.license-plan-entitlements dt { font-weight: 700; }
.license-plan-entitlements dd { margin: .2rem 0 0; overflow-wrap: anywhere; }
.activation-code-display { padding: 1rem; border: 2px solid var(--color-border, #626262); border-radius: .5rem; overflow-wrap: anywhere; font-size: 1.1rem; letter-spacing: .04em; }
@media (max-width: 56rem) { .license-plan-form-grid { grid-template-columns: 1fr; } .license-summary-list { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 42rem) {
  .license-company-context .section-heading,
  .license-token-management .section-heading,
  #licensePlanOverviewView > .section-heading { align-items: stretch; flex-direction: column; }
  .license-company-context .management-icon-button { align-self: flex-end; }
  .license-summary-list,
  .license-plan-short-fields,
  .license-plan-entitlements { grid-template-columns: 1fr; }
  .license-overview-actions { align-items: stretch; flex-direction: column; }
  .license-overview-actions button,
  .license-assignment-actions button,
  .license-activation-actions button,
  .license-plan-form-actions button,
  #generateActivationCode,
  #openLicensePlanCreate { width: 100%; }
  .license-token-summary li { align-items: stretch; flex-direction: column; }
  .license-token-summary li button { width: 100%; }
  .status-badge.license-current-status { white-space: normal; }
}
@media (forced-colors: active) {
  .management-card.license-company-context,
  #licenseOverviewView { border-color: CanvasText; }
  .license-focused-view { border-inline-start-color: Highlight; }
  .license-summary-list div,
  .license-token-summary li { border-color: CanvasText; }
}
* { box-sizing: border-box; }
body { margin: 0; font-family: Verdana, Arial, sans-serif; color: var(--text); background: var(--bg); line-height: 1.5; }
body.modal-dialog-open { overflow: hidden; }
body:has(dialog[open]) { overflow: hidden; }
.skip-link { position: absolute; left: 1rem; top: -4rem; background: var(--text); color: #fff; padding: .75rem 1rem; z-index: 20; }
.skip-link:focus { top: 1rem; }
.eyebrow { text-transform: uppercase; letter-spacing: .12em; font-size: .8rem; opacity: .85; margin: 0; }
h1, h2, p { margin-top: 0; }
h1 { margin-bottom: 0; font-size: clamp(1.8rem, 4vw, 3rem); }
main { padding: clamp(1rem, 4vw, 3rem); display: grid; gap: 1.25rem; }
button, .file-button, select, input, textarea { font: inherit; }
button, .file-button { min-height: var(--action-button-min-height); border: 2px solid transparent; border-radius: .65rem; padding: var(--action-button-padding-block) var(--action-button-padding-inline); background: var(--accent); color: #fff; cursor: pointer; font-weight: 800; line-height: 1.25; }
button:hover, .file-button:hover { background: var(--accent-dark); }
button:disabled,
button[aria-disabled="true"] {
  cursor: not-allowed;
  opacity: .62;
}
button:disabled:hover,
button[aria-disabled="true"]:hover {
  background: var(--accent);
}
button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .file-button:focus-visible, summary:focus-visible, .comment-scroll:focus-visible { outline: 4px solid #facc15; outline-offset: 3px; box-shadow: 0 0 0 2px #10213f; }
#bitiReportUpload, #bikBitvPdfUpload, #bikBitvCsvUpload, #assetsUpload { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.intro { display: grid; grid-template-columns: minmax(0, 2fr) minmax(16rem, 1fr); gap: 1rem; align-items: stretch; }
.meta-card, .panel, .card { background: var(--surface); border: 1px solid var(--border); border-radius: 1rem; box-shadow: var(--shadow); }
.intro > div, .meta-card { padding: 1.25rem; }
.meta-card { display: grid; gap: .5rem; }
.meta-card span { color: var(--muted); }
.cards { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 1rem; }
.card { padding: 1.25rem; display: grid; gap: .25rem; }
.metric { font-size: 2rem; font-weight: 800; }
.charts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.panel { padding: 1.25rem; }
.bar-chart { display: grid; gap: .75rem; }
.bar-row { display: grid; grid-template-columns: 8rem 1fr 3rem; gap: .75rem; align-items: center; }
.bar-track { background: #e9edf7; border-radius: 999px; overflow: hidden; block-size: 1rem; }
.bar-fill { background: var(--accent); block-size: 100%; min-inline-size: .25rem; }
.filters { display: grid; grid-template-columns: minmax(18rem, 2fr) minmax(10rem, 1fr) minmax(12rem, 1fr) minmax(14rem, 1fr) minmax(12rem, 1fr) auto; gap: 1rem; align-items: end; }
.filter-actions { display: flex; align-items: end; }
.filter-actions button { min-height: 2.75rem; white-space: nowrap; }
label { display: grid; gap: .35rem; font-weight: 700; }
input, select, textarea { border: 1px solid var(--border); border-radius: .55rem; padding: .7rem; background: #fff; color: var(--text); font-weight: 400; }
.section-heading { display: flex; align-items: start; justify-content: space-between; gap: 1rem; }
.issues-page-actions {
  display: flex;
  flex: 0 0 auto;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .75rem;
}
.issues-page-actions .guided-action-button {
  flex: 0 0 11.75rem;
  min-width: 0;
  width: 11.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  gap: .65rem;
  padding: .35rem 1rem;
  font-size: .875rem;
  white-space: nowrap;
}
.issues-page-actions .dashboard-action-button-icon {
  width: 1.2rem;
  height: 1.2rem;
  flex-basis: 1.2rem;
}
.issues-export-icon {
  flex: 0 0 auto;
  width: 1.75rem;
  height: 1.75rem;
  overflow: visible;
}
.issues-export-pdf-document {
  fill: #145ea8;
  stroke: #0d477f;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.issues-export-pdf-fold {
  fill: none;
  stroke: #fff;
  stroke-width: 1.4;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.issues-export-pdf-band {
  fill: #d92d20;
  stroke: none;
}
.issues-export-pdf-label {
  fill: #fff;
  stroke: none;
  font-family: Arial, sans-serif;
  font-size: 5.25px;
  font-weight: 900;
  letter-spacing: .15px;
}
@media (max-width: 560px) {
  .issues-page-heading .section-heading {
    align-items: stretch;
    flex-direction: column;
  }
  .issues-page-actions {
    flex-direction: column;
    width: 100%;
  }
  .issues-page-actions .guided-action-button {
    flex-basis: auto;
    width: 100%;
  }
}
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; min-width: 980px; }
th, td { border-bottom: 1px solid var(--border); padding: .85rem; text-align: left; vertical-align: top; }
th { background: #eef2ff; }
.badge { display: inline-block; border-radius: 999px; padding: .2rem .55rem; font-weight: 800; font-size: .85rem; }
.badge.kritisch, .badge.hoch { background: #ffe4e6; color: var(--danger); }
.badge.mittel { background: #fef3c7; color: var(--warning); }
.badge.niedrig { background: #dcfce7; color: var(--success); }
.status { color: var(--muted); font-weight: 800; }
.actions { display: grid; gap: .5rem; }
.actions button { width: 100%; }
.comment-box { display: grid; gap: .5rem; min-width: 16rem; }
.comment-list { display: grid; gap: .5rem; margin: .5rem 0 0; padding-left: 0; list-style: none; }
.comment-item { display: grid; gap: .2rem; border-inline-start: 4px solid var(--border); padding: .45rem .6rem; background: #f8fafc; border-radius: .5rem; }
.comment-role { font-weight: 900; font-size: .85rem; }
.comment-item.role-tester { border-inline-start-color: var(--accent); background: #eff6ff; }
.comment-item.role-customer { border-inline-start-color: var(--success); background: #f0fdf4; }
.comment-item.role-other { border-inline-start-color: var(--muted); }
dialog { border: 0; border-radius: 1rem; max-width: 760px; width: calc(100% - 2rem); box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(16, 33, 63, .55); }
.dialog-form { display: grid; gap: 1rem; }
#issueDialog {
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow: hidden;
}
#issueDialog .dialog-form {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
}
#issueDialog .issue-dialog-header {
  position: relative;
  z-index: 1;
  align-items: center;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
#issueDialog .issue-dialog-header h2 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
#issueDialog .issue-dialog-scroll-body {
  display: grid;
  gap: 1rem;
  min-width: 0;
  min-height: 0;
  padding: 1.25rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
#issueDialog .issue-dialog-actions {
  position: relative;
  z-index: 1;
  justify-content: flex-end;
  padding: 1.25rem;
  border-top: 1px solid var(--border);
  background: #fff;
}
@media (max-width: 560px) {
  #issueDialog {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
  }
  #issueDialog .dialog-form {
    max-height: calc(100dvh - 1rem);
  }
  #issueDialog .issue-dialog-header,
  #issueDialog .issue-dialog-scroll-body,
  #issueDialog .issue-dialog-actions {
    padding: 1rem;
  }
}
.detail-grid { display: grid; grid-template-columns: 10rem 1fr; gap: .5rem 1rem; }
.sr-only { position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px; overflow: hidden; clip: rect(0, 0, 0, 0); white-space: nowrap; border: 0; }
@media (max-width: 1200px) { .cards { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 900px) { .intro, .charts, .filters { grid-template-columns: 1fr; } .cards { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 560px) { .cards { grid-template-columns: 1fr; } button, .file-button { width: 100%; text-align: center; } }
.info-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem 1rem; margin: 0; }
.info-grid div { border: 1px solid var(--border); border-radius: .75rem; padding: .85rem; background: #f8fafc; }
.info-grid dt { font-weight: 900; color: var(--text); }
.info-grid dd { margin: .15rem 0 0; color: var(--muted); }
.pages-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.screenshot-status { display: grid; gap: .35rem; margin: 0 0 1rem; padding: .85rem 1rem; border: 2px solid #b45309; border-radius: .75rem; background: #fffbeb; color: #78350f; font-weight: 700; }
.screenshot-status p { margin: 0; }
.screenshot-status ul { margin: .25rem 0 0; padding-left: 1.25rem; }
.page-card { border: 1px solid var(--border); border-radius: 1rem; overflow: hidden; background: #fff; display: grid; align-content: start; }
.page-card figure { margin: 0; display: grid; place-items: center; padding: 0 1rem 1rem; }
.page-card img { width: 100%; aspect-ratio: 16 / 10; object-fit: cover; background: #eef2ff; border: 1px solid var(--border); border-radius: .65rem; }
.page-card img.pdf-extracted-screenshot { width: 100%; max-width: 100%; height: auto; max-height: 22rem; aspect-ratio: auto; object-fit: contain; }
.page-card-content, .page-card-body { padding: 1rem; display: grid; gap: .35rem; }
.page-card-content h3, .page-card-body h3 { margin: 0; font-size: 1rem; }
.page-card-content p, .page-card-body p { margin: 0; color: var(--muted); }
.page-card-content .page-url { color: var(--muted); }
.page-screenshot-actions { display: grid; gap: .5rem; padding: 0 1rem 1rem; }
.page-screenshot-actions .file-button { justify-self: start; margin: 0; }
.page-screenshot-actions .field-help, .page-screenshot-upload-status { margin: 0; }
.page-screenshot-input:focus-visible + .file-button { outline: 4px solid #facc15; outline-offset: 3px; box-shadow: 0 0 0 2px #10213f; }
.page-screenshot-input:disabled + .file-button { cursor: wait; opacity: .7; }
.page-screenshot-upload-status[hidden] { display: none; }
.page-url { overflow-wrap: anywhere; }
.page-url a { font-weight: 700; }
@media (max-width: 1100px) { .charts, .pages-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .charts, .info-grid, .pages-grid { grid-template-columns: 1fr; } }

.project-title { font-size: clamp(2rem, 4vw, 3.5rem); line-height: 1.05; letter-spacing: -.03em; }
.file-button.secondary { background: #475569; }
.file-button.secondary:hover { background: #334155; }
#assetsUpload { position: absolute; inline-size: 1px; block-size: 1px; opacity: 0; }
.view-tabs { display: flex; gap: .75rem; flex-wrap: wrap; }
.tab-button { background: #fff; color: var(--accent); border: 2px solid var(--accent); }
.tab-button:hover, .tab-button.active { background: var(--accent); color: #fff; }
.tab-action-button { background: #14532d; border-color: #bbf7d0; color: #fff; }
.tab-action-button:hover { background: #166534; }
.view-panel { display: grid; gap: 1.25rem; }
[hidden] { display: none !important; }
.asset-path { font-family: inherit; font-size: .85rem; color: #475569; word-break: break-all; }
.missing-note { display: none; color: var(--danger); font-weight: 700; }
.page-card.missing-asset .missing-note { display: block; }
.page-card.missing-asset img { object-fit: contain; }

.wide-panel { grid-column: 1 / -1; }
.chart-note { color: var(--muted); margin-bottom: .75rem; }
.page-result-grid { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: .75rem; }
.page-result-card { border: 1px solid var(--border); border-radius: .85rem; padding: .85rem; background: #f8fafc; display: grid; gap: .65rem; }
.page-result-card h3 { margin: 0; font-size: 1rem; }
.result-mini-bars { display: grid; gap: .45rem; }
.result-mini-row { display: grid; grid-template-columns: 7.5rem 1fr 2.5rem; gap: .5rem; align-items: center; font-size: .92rem; }
.result-mini-track { background: #e9edf7; border-radius: 999px; overflow: hidden; height: .7rem; }
.result-mini-fill { height: 100%; min-width: .2rem; background: var(--accent); }
.result-mini-fill.pass { background: var(--success); }
.result-mini-fill.fail { background: var(--danger); }
.result-mini-fill.na { background: #64748b; }
.result-mini-fill.unrated { background: #f59e0b; }
@media (max-width: 1100px) { .page-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) { .page-result-grid { grid-template-columns: 1fr; } }

/* Bewertungsfarben in allen Balkendiagrammen */
.bar-fill.priority-p1, .bar-fill.offen, .bar-fill.kunde_behoben { background: var(--danger); }
.bar-fill.priority-p2, .bar-fill.priority-p3, .bar-fill.in_arbeit, .bar-fill.nicht_bewertet { background: #f59e0b; }
.bar-fill.priority-p4, .bar-fill.tester_bestaetigt, .bar-fill.bestanden, .bar-fill.pass { background: var(--success); }
.bar-fill.priority-unset { background: #64748b; }
.bar-fill.nicht_anwendbar, .bar-fill.na { background: #64748b; }
.bar-fill.fail { background: var(--danger); }
.bar-fill { display: block; inline-size: 0; transition: inline-size .2s ease; }
.result-mini-fill { display: block; inline-size: 0; }

.problem-text { margin-bottom: .5rem; display: grid; gap: .65rem; }
.problem-text p { margin: 0; }
.problem-screenshots { display: grid; gap: .75rem; margin: .75rem 0; }
.problem-screenshot { margin: 0; border: 1px solid var(--border); border-radius: .75rem; overflow: hidden; background: #fff; max-width: 34rem; }
.problem-screenshot img { display: block; width: 100%; max-height: 18rem; object-fit: contain; background: #f8fafc; }
.problem-screenshot figcaption { padding: .5rem .75rem; color: var(--muted); font-size: .9rem; border-top: 1px solid var(--border); }
.comment-screenshot-hint { color: var(--muted); font-size: .85rem; font-style: italic; }

.login-view { min-height: 100vh; display: grid; place-items: center; padding: clamp(1rem, 4vw, 3rem); background: linear-gradient(135deg, #f6f7fb, #e8eefc); }
.login-card { width: min(100%, 34rem); background: var(--surface); border: 1px solid var(--border); border-radius: 1.25rem; box-shadow: var(--shadow); padding: clamp(1.25rem, 4vw, 2.25rem); display: grid; gap: 1rem; }
.login-logo { width: 100%; }
.login-brand { width: 100%; }
.portal-branding { display: grid; grid-template-columns: minmax(0, 1fr) 1px auto; align-items: center; gap: clamp(.6rem, 2vw, 1rem); }
.portal-branding img { display: block; max-width: 100%; height: auto; object-fit: contain; }
.portal-branding__separator { width: 1px; height: clamp(3.5rem, 11vw, 5.5rem); background: #6b7280; }
.portal-branding__attribution { color: #374151; font-size: clamp(.75rem, 1.8vw, .95rem); line-height: 1.25; white-space: nowrap; }
.portal-branding__attribution strong { color: #111827; font-weight: 800; }
#portalHomeLink {
  border-radius: .5rem;
  color: inherit;
  text-decoration: none;
}
#portalHomeLink:focus-visible {
  outline: 4px solid #facc15;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #10213f;
}
.login-form { display: grid; gap: 1rem; }
.login-password-field { display: grid; gap: .4rem; }
.login-password-control { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: .5rem; align-items: stretch; }
.login-password-control input { min-width: 0; }
.login-password-control .password-toggle-button {
  align-self: center;
  block-size: 2.75rem;
}
.demo-credentials { background: #f8fafc; border: 1px solid var(--border); border-radius: .75rem; padding: .75rem; color: var(--muted); }
.form-error { color: var(--danger); font-weight: 800; min-height: 1.4rem; margin: 0; }
.user-chip { align-self: center; background: rgba(255,255,255,.16); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: .65rem .9rem; font-weight: 800; color: #fff; }
.secondary-action { background: #475569; }
.secondary-action:hover { background: #334155; }
.secondary-action:disabled:hover,
.secondary-action[aria-disabled="true"]:hover { background: #475569; }
.security-grid { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .75rem; }
.security-grid div { border: 1px solid var(--border); border-radius: .85rem; padding: .85rem; background: #f8fafc; }
.security-grid p { margin: .35rem 0 0; color: var(--muted); }
.role-hidden { display: none !important; }
@media (max-width: 900px) { .security-grid { grid-template-columns: 1fr; } }
.user-management-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: .75rem; }
.user-management-grid div { display: grid; gap: .25rem; border: 1px solid var(--border); border-radius: .85rem; padding: .85rem; background: #f8fafc; }
.user-management-grid span { color: var(--muted); }
.comment-author-static { display: inline-block; font-weight: 800; color: var(--muted); background: #f8fafc; border: 1px solid var(--border); border-radius: .5rem; padding: .45rem .6rem; }
@media (max-width: 760px) { .user-management-grid { grid-template-columns: 1fr; } }

.db-config-grid, .api-config-grid { display: grid; grid-template-columns: minmax(18rem, 1fr) minmax(18rem, 1fr); gap: 1rem; align-items: start; }
.dialog-actions { display: flex; gap: .75rem; flex-wrap: wrap; }
.form-note { color: var(--muted); background: #f8fafc; border: 1px solid var(--border); border-radius: .75rem; padding: .75rem; }
.form-status { min-height: 1.5rem; color: var(--muted); font-weight: 700; white-space: pre-line; }
.form-status.status-warning { color: #78350f; background: #fffbeb; border: 1px solid #f59e0b; border-radius: .65rem; padding: .65rem .75rem; }
.form-status.status-success { color: #14532d; background: #f0fdf4; border: 1px solid #86efac; border-radius: .65rem; padding: .65rem .75rem; }
.form-status.has-dismiss-action,
.form-error.has-dismiss-action {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  box-sizing: border-box;
  width: 100%;
  max-width: 100%;
  min-width: 0;
  min-height: 3.25rem;
  margin: 0;
  padding: .35rem .75rem;
  border: 2px solid #60a5fa;
  border-radius: .75rem;
  background: #eff6ff;
  color: #1e3a8a;
  justify-self: start;
}
.form-status.has-dismiss-action.status-warning {
  border-color: #f59e0b;
  background: #fffbeb;
  color: #78350f;
}
.form-status.has-dismiss-action.status-success {
  border-color: #4ade80;
  background: #f0fdf4;
  color: #14532d;
}
.form-error.has-dismiss-action {
  border-color: #fb7185;
  background: #fff1f2;
  color: #881337;
}
.form-status.has-dismiss-action[hidden],
.form-error.has-dismiss-action[hidden] { display: none; }
.status-message-icon {
  display: inline-grid;
  place-items: center;
  inline-size: 1.5rem;
  block-size: 1.5rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-weight: 900;
  line-height: 1;
}
.status-message-icon-error {
  inline-size: 1.75rem;
  block-size: 1.75rem;
  border: 0;
  border-radius: 0;
}
.status-message-icon-error svg {
  inline-size: 100%;
  block-size: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.status-message-body,
.status-message-text {
  min-width: 0;
  max-width: 100%;
  overflow-wrap: anywhere;
  white-space: pre-line;
}
.status-message-body { align-self: center; }
.icon-close-button.status-dismiss-button {
  position: relative;
  justify-self: end;
  inline-size: 2.75rem !important;
  block-size: 2.75rem !important;
  border: 0 !important;
  background: transparent !important;
}
.icon-close-button.status-dismiss-button::before {
  position: absolute;
  inset: .3125rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: #fff;
  content: '';
}
.icon-close-button.status-dismiss-button:hover { background: transparent !important; }
.icon-close-button.status-dismiss-button:hover::before { background: #f1f5f9; }
.status-dismiss-button .close-icon {
  inline-size: 1rem;
  block-size: 1rem;
  z-index: 1;
}
.status-dismiss-button .close-icon::before,
.status-dismiss-button .close-icon::after {
  inline-size: 1rem;
  block-size: .1875rem;
}
.dialog-status-region {
  display: grid;
  gap: .5rem;
  justify-items: stretch;
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
.dialog-status-region[hidden] { display: none; }
.app-status {
  margin: 1rem 0;
  padding: .75rem 1rem;
  border: 1px solid var(--border);
  border-radius: .75rem;
  background: #f8fafc;
}
.app-status[hidden] { display: none; }
.toast-region {
  position: fixed;
  z-index: 1100;
  inset-block-start: max(1rem, env(safe-area-inset-top));
  inset-inline-end: max(1rem, env(safe-area-inset-right));
  width: min(28rem, calc(100vw - 2rem));
  pointer-events: none;
}
.toast-region[data-toast-context="dialog"] {
  position: absolute;
  z-index: 2;
  inset-block-start: 1rem;
  inset-inline-end: 1rem;
  width: min(28rem, calc(100% - 2rem));
}
#toastStatus.has-dismiss-action {
  pointer-events: auto;
  box-shadow: 0 .75rem 2rem rgba(7, 29, 66, .22);
  animation: toast-enter .18s ease-out;
}
@keyframes toast-enter {
  from { opacity: 0; transform: translateY(-.5rem); }
  to { opacity: 1; transform: translateY(0); }
}
@media (max-width: 560px) {
  .toast-region {
    inset-inline: max(.75rem, env(safe-area-inset-left)) max(.75rem, env(safe-area-inset-right));
    width: auto;
  }
}
@media (prefers-reduced-motion: reduce) {
  #toastStatus.has-dismiss-action { animation: none; }
}
@media (max-width: 760px) { .db-config-grid, .api-config-grid { grid-template-columns: 1fr; } }
@media (forced-colors: active) {
  .form-status.has-dismiss-action,
  .form-error.has-dismiss-action,
  .status-message-icon,
  .status-message-icon-error svg,
  .icon-close-button.status-dismiss-button::before {
    border-color: CanvasText !important;
    forced-color-adjust: auto;
  }
  .icon-close-button.status-dismiss-button::before { background: Canvas !important; }
}


/* Strukturierte Aktionsgruppen und WCAG-konforme Fokus-/Kontrastzustände */
.action-group { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; padding: .55rem; border: 1px solid rgba(255,255,255,.45); border-radius: .85rem; background: rgba(255,255,255,.10); }
.action-group-title { color: #fff; font-size: .82rem; font-weight: 900; letter-spacing: .06em; text-transform: uppercase; }
.logout-action { margin-inline-start: auto; order: 99; border-color: rgba(255,255,255,.45); }
.config-actions { background: rgba(15, 23, 42, .28); }
.import-actions { background: rgba(29, 78, 216, .20); }
.export-actions { background: rgba(22, 101, 52, .22); }
.secondary-action, .file-button.secondary { background: #334155; color: #fff; border-color: #64748b; }
.secondary-action:hover, .file-button.secondary:hover { background: #1f2937; }
input, select, textarea { border: 2px solid #9ca3af; }
th { color: #10213f; }
.management-grid, .management-flow { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 1rem; }
.management-card, .management-list { border: 1px solid var(--border); border-radius: .9rem; padding: 1rem; background: #f8fafc; display: grid; gap: .8rem; }
.management-card h3, .management-list h3 { margin: 0; }
#procedureCatalogDialog {
  width: min(76rem, calc(100vw - 2rem));
  max-width: 76rem;
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow: hidden;
}
.procedure-catalog-dialog {
  width: 100%;
  max-height: calc(100dvh - 2rem);
  min-width: 0;
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  overflow: hidden;
}
.procedure-catalog-dialog-header,
.procedure-catalog-dialog-footer { padding: 1rem 1.25rem; background: #fff; }
.procedure-catalog-dialog-header { border-bottom: 1px solid var(--border); }
.procedure-catalog-dialog-footer { justify-content: flex-end; border-top: 1px solid var(--border); }
.procedure-catalog-dialog-body {
  display: grid;
  gap: 1rem;
  min-width: 0;
  min-height: 0;
  padding: 1.25rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
}
.procedure-catalog-selection,
.procedure-catalog-clone-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.procedure-catalog-clone-grid { align-items: start; }
.procedure-catalog-clone-grid > label {
  align-self: start;
  align-content: flex-start;
}
.procedure-catalog-dialog-body > *,
.procedure-catalog-dialog .management-grid > *,
.procedure-catalog-dialog label { min-width: 0; }
.procedure-catalog-dialog input:not([type="checkbox"]),
.procedure-catalog-dialog select,
.procedure-catalog-dialog textarea { width: 100%; max-width: 100%; }
.procedure-catalog-version-code-field {
  display: grid;
  grid-column: 1 / -1;
  gap: .35rem;
  min-width: 0;
}
.procedure-catalog-manual-code {
  display: inline-flex;
  align-items: center;
  justify-self: start;
  gap: .55rem;
  min-height: 2.75rem;
  cursor: pointer;
}
.procedure-catalog-manual-code input { flex: 0 0 auto; width: 1.15rem; height: 1.15rem; }
.procedure-catalog-version-code-field input[readonly] { background: #eef2f6; color: var(--muted); }
.procedure-catalog-clone-action {
  justify-self: end;
  width: auto;
  max-width: 100%;
  min-height: 2.75rem;
  padding: .5rem .9rem;
  font-size: .9rem;
}
.procedure-catalog-create-form,
.procedure-catalog-draft-panel { display: grid; gap: 1rem; }
#procedureCatalogSourceVersionHelp,
#procedureCatalogDraftDisplayVersionHelp,
#procedureCatalogCreateFileHelp { font-weight: 400; }
.procedure-catalog-family-actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
.procedure-catalog-family-actions .field-help { margin: 0; }
#procedureCatalogDialog button:not(.icon-close-button),
#procedureCatalogUnsavedDialog button,
#procedureCatalogPublishConfirmDialog button,
#procedureCatalogDeleteConfirmDialog button {
  min-height: 2.75rem;
  padding: .45rem .75rem;
  font-size: .875rem;
  line-height: 1.25;
}
#procedureCatalogUnsavedDialog .dialog-actions,
#procedureCatalogPublishConfirmDialog .dialog-actions,
#procedureCatalogDeleteConfirmDialog .dialog-actions {
  align-items: center;
  justify-content: flex-end;
}
#procedureCatalogDialog .management-tab {
  min-height: 2.75rem !important;
  padding: .45rem .75rem !important;
  border-color: #b8c5d6;
  background: #eef3f8;
  color: var(--twin-blue-dark);
}
#procedureCatalogDialog .management-tab:hover,
#procedureCatalogDialog .management-tab:focus-visible {
  border-color: #b8c5d6;
  background: #dceaf5;
  color: var(--twin-blue);
}
#procedureCatalogDialog .management-tab.active,
#procedureCatalogDialog .management-tab[aria-selected="true"] {
  border-color: var(--twin-blue);
  background: var(--twin-blue);
  color: #fff;
}
#procedureCatalogDialog .management-tab.active:hover,
#procedureCatalogDialog .management-tab[aria-selected="true"]:hover,
#procedureCatalogDialog .management-tab.active:focus-visible,
#procedureCatalogDialog .management-tab[aria-selected="true"]:focus-visible {
  border-color: var(--twin-blue-hover);
  background: var(--twin-blue-hover);
  color: #fff;
}
.procedure-catalog-import-modes { display: grid; justify-items: stretch; gap: .25rem; margin: 0; padding: 1rem; border: 1px solid var(--border); border-radius: .75rem; }
.procedure-catalog-import-modes legend { padding-inline: .35rem; font-weight: 800; }
.procedure-catalog-import-modes label {
  display: grid;
  grid-template-columns: 1.125rem minmax(0, 1fr);
  align-items: center;
  gap: .65rem;
  min-height: 2.75rem;
  cursor: pointer;
}
.procedure-catalog-import-modes label > span { min-width: 0; overflow-wrap: anywhere; }
.procedure-catalog-dialog .procedure-catalog-import-modes input[type="radio"] {
  appearance: auto;
  inline-size: 1.125rem;
  block-size: 1.125rem;
  width: 1.125rem;
  height: 1.125rem;
  min-inline-size: 1.125rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  accent-color: var(--primary);
  justify-self: start;
}
.procedure-catalog-create-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); align-items: start; }
#procedureCatalogEditor { display: grid; gap: 1.25rem; }
.procedure-conformance-editor-content { gap: .75rem; }
.procedure-conformance-language { display: grid; gap: .75rem; margin: 1rem 0; }
.procedure-conformance-language label { display: grid; gap: .35rem; }
.procedure-conformance-editor textarea { width: 100%; resize: vertical; }
#procedureCatalogDialog input,
#procedureCatalogDialog select,
#procedureCatalogDialog textarea { font-weight: 400; }
#procedureCatalogEditor[hidden] { display: none; }
.procedure-structure-disclosure { overflow: hidden; border: 1px solid var(--border); border-radius: .75rem; background: #f8fafc; }
.procedure-structure-header { display: grid; grid-template-columns: minmax(0, 1fr) auto; align-items: stretch; min-height: 3.25rem; background: #eef2f6; }
.procedure-structure-title { display: flex; align-items: stretch; min-width: 0; margin: 0; }
.procedure-structure-toggle { display: flex; align-items: center; justify-content: flex-start; gap: .45rem; width: 100%; height: 100%; min-width: 0; min-height: 3.25rem; padding: .45rem .75rem; border: 0; border-radius: 0; background: transparent; color: var(--text); line-height: 1.25; text-align: start; }
.procedure-structure-toggle:hover { background: #e2e8f0; }
.procedure-structure-chevron { flex: 0 0 auto; font-size: .8rem; line-height: 1; transform-origin: center; transition: transform .15s ease; }
.procedure-structure-chevron::before { content: '▶'; }
.procedure-structure-toggle[aria-expanded="true"] .procedure-structure-chevron { transform: rotate(90deg); }
.procedure-structure-toggle > span:last-child { min-width: 0; overflow-wrap: anywhere; }
.procedure-structure-add-action { align-self: center; justify-self: end; width: auto; margin-inline-end: .4rem; white-space: nowrap; }
.procedure-structure-disclosure-content { display: grid; gap: .65rem; padding: .75rem; border-top: 1px solid var(--border); background: #f8fafc; }
.procedure-structure-disclosure-content[hidden],
.procedure-structure-add-action[hidden],
.procedure-group-editor-row:not([open]) > .procedure-group-editor-fields,
.procedure-step-editor:not([open]) > .procedure-step-editor-content { display: none; }
.procedure-group-editor-list,
.procedure-step-editor-list { display: grid; gap: .5rem; padding: 0; }
.procedure-group-editor-list > .procedure-group-editor-row,
.procedure-step-editor-list > .procedure-step-editor { display: block; padding: 0; border: 1px solid var(--border); border-radius: .65rem; background: #fff; }
.procedure-group-editor-row > summary,
.procedure-step-editor > summary { box-sizing: border-box; min-height: 2.75rem; padding: .5rem .75rem; border-radius: .65rem; cursor: pointer; line-height: 1.5rem; }
.procedure-group-editor-row > summary strong:empty { display: none; }
.procedure-group-editor-row > summary strong:not(:empty) { margin-inline-end: .35rem; }
.procedure-group-editor-row[open] > summary,
.procedure-step-editor[open] > summary { border-bottom: 1px solid var(--border); border-radius: .65rem .65rem 0 0; }
.procedure-group-editor-fields { display: grid; grid-template-columns: minmax(8rem, .45fr) minmax(14rem, 1fr) auto; gap: .75rem; align-items: end; padding: .75rem; }
.procedure-localized-editor { display: grid; gap: .65rem; min-width: 0; }
.procedure-language-tabs { display: flex; flex-wrap: wrap; gap: .35rem; border-bottom: 1px solid var(--border); }
#procedureCatalogDialog .procedure-language-tabs button {
  min-height: 2.5rem;
  margin-bottom: -1px;
  padding: .4rem .8rem;
  border: 1px solid var(--border);
  border-radius: .45rem .45rem 0 0;
  background: #f8fafc;
  color: var(--text);
}
#procedureCatalogDialog .procedure-language-tabs button:hover { border-color: var(--primary); background: #eef5ff; color: var(--primary); }
#procedureCatalogDialog .procedure-language-tabs button[aria-selected="true"] { border-color: var(--primary); border-bottom-color: #fff; background: #fff; color: var(--primary); font-weight: 800; }
.procedure-language-panel { display: grid; gap: .75rem; }
.procedure-language-panel[hidden],
.procedure-localized-editor [role="tabpanel"][hidden] { display: none; }
.procedure-group-editor-action,
.procedure-step-editor-actions { display: flex; align-items: center; justify-content: flex-end; gap: .4rem; align-self: end; min-height: 3rem; }
.procedure-step-editor-content { display: grid; gap: .75rem; padding: .75rem; }
.procedure-editor-pending-label { display: inline-flex; margin-inline-start: .6rem; border: 1px solid #92400e; border-radius: 999px; padding: .05rem .4rem; color: #78350f; background: #fffbeb; font-size: .78rem; font-weight: 700; vertical-align: middle; }
.management-icon-button.confirm { border-color: #166534; color: #166534; }
.management-icon-button.confirm:hover { background: #166534; color: #fff; }
.procedure-catalog-editor-actions { margin-top: .25rem; padding-top: 1.25rem; border-top: 1px solid var(--border); }
.procedure-group-tree, .procedure-group-children { list-style: none; margin: 0; padding: 0; }
.procedure-group-children { display: grid; gap: .5rem; margin-block-start: .5rem; margin-inline-start: 1rem; }
.customer-project-tree { display: grid; gap: .75rem; }
.customer-project-item { border: 1px solid var(--border); border-radius: .75rem; padding: .75rem; background: #fff; }
.customer-project-item strong { display: block; }
.customer-project-item ul { margin: .5rem 0 0; padding-left: 1.25rem; }
.project-context { display: inline-block; margin-top: .35rem; color: var(--muted); }
@media (max-width: 1100px) { .management-grid, .management-flow { grid-template-columns: 1fr; } .logout-action { margin-inline-start: 0; } }
@media (max-width: 620px) {
  #procedureCatalogDialog { width: calc(100% - 1rem); max-height: calc(100dvh - 1rem); }
  .procedure-catalog-dialog { max-height: calc(100dvh - 1rem); }
  .procedure-catalog-dialog-header,
  .procedure-catalog-dialog-body,
  .procedure-catalog-dialog-footer { padding: 1rem; }
  .procedure-catalog-selection,
  .procedure-catalog-clone-grid,
  .procedure-catalog-create-grid,
  .procedure-group-editor-fields { grid-template-columns: minmax(0, 1fr); }
  .procedure-group-editor-action { justify-items: end; }
}
@media (forced-colors: active) { button, .file-button, input, select, textarea { border: 2px solid ButtonText; } button:focus-visible, input:focus-visible, select:focus-visible, textarea:focus-visible, .file-button:focus-visible { outline: 4px solid Highlight; box-shadow: none; } }
@media (prefers-reduced-motion: reduce) { .procedure-structure-disclosure > summary::before { transition: none; } }

.context-badge { display: inline-flex; align-items: center; max-width: 18rem; min-height: 2.4rem; padding: .35rem .65rem; border: 2px solid rgba(255,255,255,.75); border-radius: .65rem; color: #fff; background: rgba(15,23,42,.55); font-size: .86rem; font-weight: 800; }
.context-badge.context-ok { background: #14532d; border-color: #bbf7d0; }
.context-badge.context-missing { background: #7f1d1d; border-color: #fecaca; }
.management-flow { margin-block: 1rem; }
.management-card { position: relative; }
.management-card-primary { border-color: #1d4ed8; box-shadow: inset 0 0 0 2px #bfdbfe; }
.step-pill { display: inline-grid; place-items: center; width: 2rem; height: 2rem; border-radius: 999px; background: var(--twin-blue); color: #fff; font-weight: 900; margin-bottom: .35rem; }
.field-help { margin: .25rem 0 .75rem; color: #334155; font-size: .95rem; }
.selected-context { margin-top: .75rem; padding: .75rem; border: 2px solid #cbd5e1; border-radius: .75rem; background: #f8fafc; font-weight: 800; color: #10213f; }

/* Dialog Kunden/Projekte: keine horizontal abgeschnittenen Inhalte */
#customerProjectDialog {
  width: min(96vw, 72rem);
  max-width: 72rem;
  max-height: 90vh;
  overflow: auto;
}
#customerProjectDialog .dialog-form {
  min-width: 0;
  width: 100%;
}
#customerProjectDialog .management-flow {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 20rem), 1fr));
  gap: 1rem;
  align-items: stretch;
}
#customerProjectDialog .management-card,
#customerProjectDialog .management-list,
#customerProjectDialog label,
#customerProjectDialog input,
#customerProjectDialog select,
#customerProjectDialog button,
#customerProjectDialog .file-button {
  min-width: 0;
  max-width: 100%;
}
#customerProjectDialog input,
#customerProjectDialog select,
#customerProjectDialog button,
#customerProjectDialog .file-button {
  width: 100%;
}
#customerProjectDialog .field-help,
#customerProjectDialog .selected-context,
#customerProjectDialog .form-note {
  overflow-wrap: anywhere;
}
.upload-card {
  border-color: #166534;
  box-shadow: inset 0 0 0 2px #bbf7d0;
}
.upload-actions-dialog {
  display: grid;
  gap: .65rem;
}
.import-actions .context-badge {
  max-width: min(28rem, 100%);
}
@media (max-width: 900px) {
  #customerProjectDialog {
    width: calc(100vw - 1rem);
  }
  #customerProjectDialog .section-heading {
    align-items: flex-start;
  }
}

/* Responsive customer/project process dialog */
#customerProjectDialog {
  width: min(96vw, 88rem);
  max-width: 88rem;
  max-height: min(92dvh, 56rem);
  overflow: hidden;
  padding: 0;
}
#customerProjectDialog .dialog-form {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  padding: 0;
  max-height: min(92dvh, 56rem);
  overflow: hidden;
  box-sizing: border-box;
}
#customerProjectDialog .customer-project-dialog-header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: 1rem;
  position: relative;
  z-index: 1;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
#customerProjectDialog .customer-project-dialog-header h2 {
  margin: 0;
  line-height: 1.15;
  overflow-wrap: anywhere;
}
#customerProjectDialog .customer-project-dialog-body {
  display: grid;
  gap: 1rem;
  min-width: 0;
  min-height: 0;
  padding: 1.25rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
#customerProjectDialog #closeCustomerProjectConfig {
  width: 2.75rem;
  min-width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border-radius: .75rem;
  display: inline-grid;
  place-items: center;
  justify-self: end;
  font-size: 1.35rem;
  line-height: 1;
}
#customerProjectDialog .form-note {
  margin: 0;
}
#customerProjectDialog .management-flow {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
  align-items: stretch;
}
#customerProjectDialog .management-card {
  min-width: 0;
  min-height: auto;
  padding: 1rem;
  display: grid;
  grid-template-rows: auto;
  gap: .75rem;
  align-content: start;
}
#customerProjectDialog .management-card h3 {
  min-height: 3.1rem;
  margin: 0;
  line-height: 1.2;
}
#customerProjectDialog .field-help {
  min-height: 0;
  margin: 0;
  line-height: 1.45;
}
#customerProjectDialog label {
  display: grid;
  gap: .4rem;
  align-content: start;
  margin: 0;
}
#customerProjectDialog input,
#customerProjectDialog select,
#customerProjectDialog button,
#customerProjectDialog .file-button {
  width: 100%;
  box-sizing: border-box;
}
#customerProjectDialog input,
#customerProjectDialog select {
  min-height: 3rem;
  padding: .7rem .8rem;
}
#customerProjectDialog button,
#customerProjectDialog .file-button { min-height: var(--action-button-min-height); }
#customerProjectDialog .file-button {
  display: flex;
  align-items: center;
}
#customerProjectDialog .upload-actions-dialog {
  display: grid;
  gap: .65rem;
  align-self: start;
}
#customerProjectDialog .selected-context {
  display: flex;
  align-items: center;
  margin: 0;
  min-height: 4.2rem;
  overflow-wrap: anywhere;
}
#customerProjectDialog .management-list {
  margin-top: .25rem;
}
#customerProjectDialog .dialog-actions {
  justify-content: flex-start;
}
#customerProjectDialog .dialog-actions button {
  width: auto;
  min-width: 10rem;
}
#customerProjectDialog .customer-project-dialog-footer {
  position: relative;
  z-index: 1;
  justify-content: flex-end;
  margin: 0;
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
  background: #fff;
}
@media (max-width: 1280px) {
  #customerProjectDialog .management-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}
@media (max-width: 720px) {
  #customerProjectDialog {
    width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
  }
  #customerProjectDialog .dialog-form {
    max-height: calc(100dvh - 1rem);
  }
  #customerProjectDialog .customer-project-dialog-header,
  #customerProjectDialog .customer-project-dialog-body {
    padding: 1rem;
  }
  #customerProjectDialog .customer-project-dialog-footer {
    padding: .75rem 1rem 1rem;
  }
  #customerProjectDialog .management-flow {
    grid-template-columns: 1fr;
  }
  #customerProjectDialog .management-card {
    grid-template-rows: auto;
  }
  #customerProjectDialog .management-card h3,
  #customerProjectDialog .field-help {
    min-height: 0;
  }
}

/* Personen- und Firmenverwaltung */
#identityManagementDialog {
  width: min(96vw, 90rem);
  max-width: 90rem;
  max-height: 92dvh;
  overflow: hidden;
  padding: 0;
}
#identityManagementDialog .identity-management-dialog {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  width: 100%;
  min-width: 0;
  max-height: 92dvh;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}
#identityManagementDialog .identity-management-header,
#identityManagementDialog .identity-management-footer {
  position: relative;
  z-index: 1;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  background: #fff;
}
#identityManagementDialog .identity-management-header {
  align-items: center;
  border-bottom: 1px solid var(--border);
}
#identityManagementDialog .identity-management-header h2 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
#identityManagementDialog .identity-management-scroll-body {
  display: grid;
  gap: 1rem;
  min-width: 0;
  min-height: 0;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
#identityManagementDialog .identity-management-footer {
  justify-content: flex-end;
  border-top: 1px solid var(--border);
}
#identityManagementDialog .identity-management-footer > button {
  width: auto;
  margin-inline-start: auto;
}
.identity-filter-form {
  display: grid;
  grid-template-columns: minmax(14rem, 2fr) repeat(2, minmax(10rem, 1fr)) auto;
  gap: .75rem;
  align-items: end;
}
#userSearchForm > button[type="submit"] {
  align-self: end;
  height: 3rem;
  min-height: 3rem;
}
.identity-filter-form label,
.identity-editor label,
.membership-form label,
.role-editor-form > label {
  display: grid;
  gap: .4rem;
  min-width: 0;
}
.identity-layout {
  display: grid;
  grid-template-columns: minmax(17rem, 1fr) minmax(24rem, 2fr);
  gap: 1rem;
  align-items: start;
}
.project-management-panel {
  min-width: 0;
}
.project-management-overview {
  gap: 0;
  padding: 0;
  overflow: visible;
  background: var(--surface);
}
.project-management-heading {
  align-items: center;
  padding: 1rem;
}
.project-management-heading h3,
.project-management-result-count {
  margin: 0;
}
.project-management-result-count {
  margin-top: .2rem;
  color: var(--muted);
}
.project-management-create-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
}
.project-management-create-button svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}
.project-management-filters {
  grid-template-columns: minmax(14rem, 1fr) minmax(11rem, .7fr) minmax(12rem, .7fr) 3rem;
}
.project-management-filters > .management-icon-button {
  align-self: center;
  justify-self: end;
}
.project-management-overview > #projectListStatus:not(:empty) {
  margin: 1rem 1rem 0;
}
.project-management-overview > #identityProjectList {
  padding: 1rem;
}
.project-management-footer {
  padding: 1rem;
  border-top: 1px solid var(--border);
}
.project-management-footer .a11y-combobox--page-size .a11y-combobox__listbox {
  inset: auto 0 calc(100% + .4rem);
}
.project-management-editor-panel > #projectEditorForm {
  width: 100%;
}
.identity-editor,
.identity-results,
.identity-card,
.identity-card-heading,
.identity-user-details {
  min-width: 0;
}
.identity-editor-actions,
.identity-card-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
#organizationEditorForm .identity-editor-actions {
  justify-content: flex-end;
}
#organizationEditorForm .identity-editor-actions > button {
  width: auto;
}
#userEditorForm .identity-editor-actions {
  justify-content: flex-end;
}
#userEditorForm .identity-editor-actions > button {
  width: auto;
}
.identity-results {
  align-content: start;
}
#identityUserList,
#identityOrganizationList,
#identityProjectList {
  display: grid;
  gap: .75rem;
}
.identity-card {
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: .9rem;
  background: #fff;
}
.identity-card-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: flex-start;
}
.identity-card h4,
.identity-card p,
.identity-user-details h4 {
  margin: 0 0 .35rem;
  overflow-wrap: anywhere;
}
.identity-card-actions {
  justify-content: flex-end;
}
.identity-account-status {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: .5rem;
}
.identity-account-note {
  line-height: 1.4;
}
.identity-person-actions {
  align-items: center;
  flex-wrap: nowrap;
  justify-content: space-between;
  gap: 1.5rem;
}
.identity-details-toggle {
  flex: 0 0 2.75rem;
  border-color: var(--twin-blue, #1e70b6);
  background: #e9f3fb;
  color: var(--twin-blue, #1e70b6);
}
.identity-details-toggle[aria-expanded="true"] {
  background: #dceaf5;
  color: var(--twin-blue-dark, #102f55);
}
.identity-person-action-cluster,
.identity-danger-actions {
  display: inline-flex;
  align-items: center;
  flex-wrap: nowrap;
  gap: .5rem;
}
.identity-danger-actions {
  margin-inline-start: .25rem;
  padding-inline-start: .75rem;
  border-inline-start: 1px solid var(--border);
}
.status-badge {
  display: inline-block;
  padding: .2rem .55rem;
  border-radius: 999px;
  background: #e2e8f0;
  color: #1e293b;
  font-weight: 800;
}
.status-badge.status-active { background: #dcfce7; color: #166534; }
.status-badge.status-disabled { background: #fee2e2; color: #991b1b; }
.status-badge.status-invited,
.status-badge.status-legacy_profile_pending { background: #fef3c7; color: #854d0e; }
.identity-user-details {
  margin-top: .9rem;
  padding-top: .9rem;
  border-top: 1px solid var(--border);
}
.identity-detail-section + .identity-detail-section {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 1px solid var(--border);
}
.identity-detail-list {
  display: grid;
  gap: .6rem;
  margin: .75rem 0 1rem;
  padding: 0;
  list-style: none;
}
.identity-detail-item {
  padding: .75rem;
  border: 1px solid #cbd5e1;
  border-radius: .6rem;
  background: #f8fafc;
  overflow-wrap: anywhere;
}
.identity-detail-row {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: .75rem;
}
.identity-detail-row .field-help { display: block; }
.identity-assignment-summary {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(10rem, 1fr));
  gap: .65rem 1rem;
  margin: 0 0 .65rem;
}
.identity-assignment-summary div { min-width: 0; }
.identity-assignment-summary dt {
  color: var(--muted);
  font-size: .875rem;
  font-weight: 700;
}
.identity-assignment-summary dd {
  margin: .15rem 0 0;
  font-weight: 700;
}
.identity-protection-note {
  margin-bottom: 1.25rem;
  padding: .75rem;
  border: 2px solid #1d4ed8;
  border-radius: .6rem;
  background: #eff6ff;
}
.identity-protection-note p { margin: .35rem 0 0; }
.identity-data-review {
  padding: 1rem;
  border: 2px solid #a16207;
  border-radius: .6rem;
  background: #fffbeb;
}
.identity-data-review.identity-detail-section {
  border-top: 2px solid #a16207;
}
.identity-data-warning {
  border-color: #ca8a04;
  background: #fff;
}
.identity-data-warning > p { margin: 0 0 .75rem; }
.identity-data-warning .status-badge {
  margin-inline-start: .35rem;
  font-size: .8rem;
}
.identity-technical-details {
  margin: .5rem 0 .75rem;
}
.identity-technical-details summary {
  width: fit-content;
  cursor: pointer;
  font-weight: 700;
}
.identity-technical-details code {
  overflow-wrap: anywhere;
  word-break: break-all;
}
.membership-form {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  align-items: end;
  margin-bottom: 1rem;
}
.organization-admin-form {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  margin-top: .75rem;
  padding-top: .75rem;
  border-top: 1px solid #cbd5e1;
}
.organization-admin-option {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-width: 0;
  min-height: 2.75rem;
  cursor: pointer;
}
.organization-admin-option input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.25rem;
  height: 1.25rem;
  margin: 0;
}
.organization-admin-form button[type="submit"] {
  flex: 0 0 auto;
  width: auto;
}
.membership-removal-blocked {
  display: grid;
  justify-items: end;
  gap: .25rem;
  text-align: right;
}
.membership-removal-blocked .field-help {
  max-width: 22rem;
  margin: 0;
}
@media (max-width: 900px) {
  .identity-detail-row { align-items: stretch; flex-direction: column; }
  .identity-detail-row > button { align-self: flex-start; }
  .membership-removal-blocked {
    justify-items: start;
    text-align: left;
  }
  .organization-admin-form {
    align-items: stretch;
    flex-direction: column;
  }
  .organization-admin-form button[type="submit"] {
    width: 100%;
  }
}
.field-error {
  color: #991b1b;
  font-weight: 700;
}
.identity-error-summary {
  border: 2px solid #b91c1c;
  border-radius: .6rem;
  padding: .75rem;
}
.identity-error-summary p { margin-top: 0; font-weight: 800; }
.identity-error-summary a { color: #7f1d1d; }
.password-requirements {
  padding: .75rem;
  border: 1px solid #cbd5e1;
  border-radius: .6rem;
  background: #f8fafc;
}
.password-requirements p { margin: 0 0 .5rem; font-weight: 800; }
.password-requirements ul { display: grid; gap: .35rem; margin: 0; padding: 0; list-style: none; }
.password-requirements li {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr) auto;
  gap: .4rem;
  align-items: start;
  color: #7f1d1d;
}
.password-requirements li.met { color: #166534; }
.password-requirement-icon { font-weight: 900; text-align: center; }
.password-requirement-state { font-weight: 800; }
.inline-state:not(:empty) {
  padding: .65rem;
  border-radius: .5rem;
  background: #f1f5f9;
}
.management-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
}
.project-editor-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
  align-items: start;
}
.project-editor-grid input,
.project-editor-grid select,
.project-editor-grid textarea {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
}
.project-editor-grid input:not([type="hidden"]),
.project-editor-grid select {
  height: 3rem;
  min-height: 3rem;
  block-size: 3rem;
}
.identity-management-select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  height: 3rem;
  min-height: 3rem;
  block-size: 3rem;
  box-sizing: border-box;
  appearance: none;
  -webkit-appearance: none;
  padding-inline-end: 3.35rem;
  background-image:
    linear-gradient(#b8c0ca, #b8c0ca),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 7.5 5 5 5-5' fill='none' stroke='%2310213f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position:
    calc(100% - 2.75rem) center,
    calc(100% - 1rem) center;
  background-repeat: no-repeat;
  background-size:
    1px calc(100% - .9rem),
    1.1rem 1.1rem;
}
@media (forced-colors: active) {
  .identity-management-select {
    appearance: auto;
    -webkit-appearance: auto;
    padding-inline-end: .7rem;
    background-image: none;
  }
}
#projectProcedureVersionHelp { font-weight: 400; }
.project-editor-grid textarea { min-height: 5.5rem; }
.project-mode-fields {
  min-inline-size: 0;
  margin: 0;
  padding: .65rem;
  border: 1px solid var(--border);
  border-radius: .7rem;
}
.project-mode-fields legend { padding-inline: .25rem; font-weight: 800; }
.project-mode-options {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .5rem;
}
#identityManagementDialog .identity-editor label.project-mode-option {
  display: flex;
  align-items: flex-start;
  gap: .6rem;
  min-width: 0;
  min-height: 3.5rem;
  padding: .55rem .65rem;
  border: 1px solid #b8c0ca;
  border-radius: .5rem;
  background: #fff;
  cursor: pointer;
}
.project-mode-option:has(input:checked) {
  border-color: var(--primary);
  background: #eff6ff;
}
.project-mode-option:has(input:focus-visible) {
  outline: 3px solid #facc15;
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #10213f;
}
.project-mode-option input[type="radio"] {
  appearance: auto;
  inline-size: 1.125rem;
  block-size: 1.125rem;
  min-height: 0;
  margin: .15rem 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  accent-color: var(--primary);
  flex: 0 0 1.125rem;
}
.project-mode-option span { display: grid; gap: .2rem; }
.project-mode-option strong { font-size: .95rem; line-height: 1.3; }
.project-mode-option small { color: var(--muted); font-size: .82rem; line-height: 1.35; }
.project-mode-fields:disabled .project-mode-option { cursor: default; opacity: .8; }
#projectModeHelp { margin: .75rem 0; }
@media (max-width: 44rem) {
  .project-mode-options { grid-template-columns: 1fr; }
}
.project-screenshot-dropzone,
.screenshot-input-zone {
  padding: .75rem;
  border: 2px dashed #64748b;
  border-radius: .6rem;
  background: #f8fafc;
}
.project-screenshot-dropzone.is-dragging,
.screenshot-input-zone.is-dragging {
  border-color: var(--focus);
  outline: 3px solid color-mix(in srgb, var(--focus) 35%, transparent);
}
.project-screenshot-dropzone:focus-visible,
.screenshot-input-zone:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.project-screenshot-dropzone p,
.screenshot-input-zone p { margin: .5rem 0 0; overflow-wrap: anywhere; }
.project-screenshot-dropzone [data-project-page-screenshot]:focus-visible + .file-button,
.project-screenshot-dropzone #pageEditorScreenshot:focus-visible + .file-button,
.screenshot-input-zone input[type="file"]:focus-visible + .file-button {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}
.responsive-management-table { overflow-x: auto; }
.responsive-management-table table { width: 100%; }
.responsive-management-table th,
.responsive-management-table td { padding: .4rem .55rem; }
.responsive-management-table tbody tr { line-height: 1.25; }
.responsive-management-table .table-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
}
.revision-metadata-conflicts {
  display: grid;
  gap: .75rem;
  margin-block: 1rem;
  padding: 1rem;
  border: 2px solid #a16207;
  border-radius: .75rem;
  background: #fffbeb;
}
.revision-metadata-conflicts h4,
.revision-metadata-conflicts p { margin: 0; }
.revision-metadata-conflicts fieldset {
  display: grid;
  gap: .45rem;
  min-width: 0;
}
.revision-metadata-conflicts label {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  align-items: start;
  gap: .65rem;
  min-width: 0;
  padding-block: .2rem;
  cursor: pointer;
}
.revision-metadata-conflicts input[type="radio"] {
  inline-size: 1.25rem;
  block-size: 1.25rem;
  min-inline-size: 1.25rem;
  margin: .15rem 0 0;
  padding: 0;
  justify-self: start;
}
.revision-metadata-conflicts label > span {
  min-width: 0;
  overflow-wrap: anywhere;
}
.revision-metadata-review {
  display: grid;
  gap: .85rem;
  margin-block: 1rem;
  padding: 1rem;
  border: 2px solid #1d4ed8;
  border-radius: .75rem;
  background: #eff6ff;
}
.revision-metadata-review > h4,
.revision-metadata-review > p,
.revision-source-conflicts h5,
.revision-source-conflicts p { margin: 0; }
.revision-metadata-unavailable {
  border-color: #b91c1c;
  background: #fef2f2;
}
.revision-metadata-form {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.revision-metadata-field {
  display: grid;
  align-content: start;
  gap: .35rem;
  min-width: 0;
}
.revision-metadata-field-wide,
.revision-metadata-error-summary { grid-column: 1 / -1; }
.revision-metadata-field > label { font-weight: 800; }
.revision-metadata-field input,
.revision-metadata-field select {
  width: 100%;
  min-width: 0;
  min-height: 2.75rem;
}
.revision-metadata-field input:disabled,
.revision-metadata-field select:disabled {
  color: #334155;
  background: #e2e8f0;
  opacity: 1;
}
.revision-metadata-field .field-help {
  margin: 0;
  overflow-wrap: anywhere;
}
.revision-procedure-locked,
.revision-source-conflicts {
  padding: .75rem;
  border-inline-start: .35rem solid #a16207;
  background: #fffbeb;
}
.revision-source-conflicts {
  display: grid;
  gap: .45rem;
}
.revision-source-conflicts ul { margin: 0; padding-inline-start: 1.5rem; }
.revision-catalog-error {
  display: grid;
  gap: .55rem;
  justify-items: start;
  padding: .75rem;
  border: 2px solid #b91c1c;
  border-radius: .5rem;
  background: #fef2f2;
}
.revision-catalog-error p { margin: 0; }
.revision-catalog-error button { width: auto; }
@media (max-width: 900px) {
  .identity-filter-form,
  .identity-layout { grid-template-columns: 1fr; }
  .project-editor-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .identity-filter-form button { width: 100%; }
  .project-management-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 3rem; }
  .project-management-filters .project-portfolio-search { grid-column: 1 / -1; }
}
@media (max-width: 620px) {
  #identityManagementDialog { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); }
  #identityManagementDialog .identity-management-dialog { max-height: calc(100dvh - 1rem); }
  .revision-metadata-form { grid-template-columns: 1fr; }
  .revision-metadata-field-wide,
  .revision-metadata-error-summary { grid-column: auto; }
  .identity-card-heading { display: grid; }
  .identity-card-actions { justify-content: stretch; }
  .identity-card-actions button { width: 100%; }
  .identity-card-actions .management-icon-button { width: 2.75rem; }
  .identity-person-actions { width: 100%; flex-wrap: wrap; justify-content: space-between; gap: 1rem; }
  .identity-person-action-cluster { flex-wrap: wrap; margin-inline-start: auto; }
  .password-requirements li { grid-template-columns: 1.25rem minmax(0, 1fr); }
  .password-requirement-state { grid-column: 2; }
  .management-form-grid { grid-template-columns: 1fr; }
  .project-editor-grid { grid-template-columns: 1fr; }
  .project-management-heading { align-items: stretch; flex-direction: column; }
  .project-management-heading .project-management-create-button { width: 100%; }
  .project-management-filters { grid-template-columns: minmax(0, 1fr) 3rem; }
  .project-management-filters .project-portfolio-filter-combobox { grid-column: 1 / -1; }
  .responsive-management-table table,
  .responsive-management-table tbody,
  .responsive-management-table tr,
  .responsive-management-table tbody th,
  .responsive-management-table td { display: block; }
  .responsive-management-table thead { position: absolute; inline-size: 1px; block-size: 1px; overflow: hidden; clip: rect(0 0 0 0); }
  .responsive-management-table tr {
    padding: .75rem;
    border: 1px solid var(--border);
    border-radius: .6rem;
    background: #fff;
  }
  .responsive-management-table tbody th,
  .responsive-management-table td {
    padding: .3rem 0;
    border: 0;
    text-align: start;
  }
  .responsive-management-table tbody th[data-label]::before,
  .responsive-management-table td::before {
    content: attr(data-label) ": ";
    font-weight: 800;
  }
  .responsive-management-table td:last-child::before { display: block; margin-bottom: .35rem; }
  .responsive-management-table .table-actions button { width: 100%; }
}

/* Projektzugriffsverwaltung */
#projectAccessDialog {
  width: min(96vw, 92rem);
  max-width: 92rem;
  max-height: 92dvh;
  overflow: hidden;
  padding: 0;
}
.project-access-dialog {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  width: 100%;
  min-width: 0;
  max-height: 92dvh;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}
.project-access-dialog-header,
.project-access-dialog-footer {
  position: relative;
  z-index: 1;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  background: #fff;
}
.project-access-dialog-header {
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.project-access-dialog-header h2 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
.project-access-dialog-body {
  display: grid;
  gap: 1rem;
  min-width: 0;
  min-height: 0;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.project-access-dialog-footer {
  justify-content: flex-end;
  margin: 0;
  border-top: 1px solid var(--border);
}
.project-access-dialog-footer > button {
  width: auto;
  margin-inline-start: auto;
}
.project-access-filters {
  display: grid;
  grid-template-columns: minmax(13rem, 1.4fr) repeat(3, minmax(10rem, 1fr));
  gap: .75rem;
  align-items: end;
}
.project-access-filters label,
.project-access-editor label {
  display: grid;
  gap: .4rem;
  min-width: 0;
}
.project-access-filters input,
.project-access-filters select,
.project-access-editor select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
}
.project-access-filter-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .5rem;
  grid-column: 1 / -1;
}
.project-access-text-action {
  height: 2.75rem;
  min-height: 2.75rem;
  padding: .35rem .75rem;
  box-sizing: border-box;
  font-size: .875rem;
  line-height: 1.25;
}
.project-access-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: 1rem;
  align-items: start;
}
.project-access-results,
.project-access-editor { min-width: 0; }
.project-access-editor {
  display: grid;
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: .75rem;
}
.project-access-editor > h3,
.project-access-editor > .form-error,
.project-access-editor > .field-help,
.project-access-editor > .dialog-actions {
  grid-column: 1 / -1;
}
.project-access-table-wrap {
  border: 1px solid var(--border);
  border-radius: .7rem;
}
.project-access-table {
  width: 100%;
  max-width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
}
.project-access-table th,
.project-access-table td {
  padding: .7rem;
  text-align: left;
  vertical-align: top;
  border-bottom: 1px solid var(--border);
  overflow-wrap: anywhere;
}
.project-access-table th:nth-child(1) { width: 30%; }
.project-access-table th:nth-child(2),
.project-access-table th:nth-child(3) { width: 20%; }
.project-access-table th:nth-child(4) { width: 14%; }
.project-access-table th:nth-child(5) { width: 16%; }
.project-access-table tbody tr:last-child th,
.project-access-table tbody tr:last-child td { border-bottom: 0; }
.project-access-table th:last-child,
.project-access-table td:last-child {
  text-align: right;
}
.project-access-table .table-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .4rem;
}
.project-access-card-list { display: none; }
.project-access-card {
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: .9rem;
  background: #fff;
}
.project-access-card h4 { margin: 0 0 .65rem; }
.project-access-card dl { margin: 0; }
.project-access-card dl div {
  display: grid;
  grid-template-columns: minmax(8rem, 1fr) 2fr;
  gap: .5rem;
  padding-block: .25rem;
}
.project-access-card dt { font-weight: 800; }
.project-access-card dd { margin: 0; overflow-wrap: anywhere; }
.project-access-card .table-actions { display: flex; flex-wrap: wrap; gap: .5rem; margin-top: .75rem; }
.project-access-table-footer {
  min-width: 0;
  padding-top: 1rem;
  flex-wrap: wrap;
}
.project-access-table-footer .issue-pagination {
  max-width: 100%;
}
.project-access-table-footer .issue-pagination > div {
  flex-wrap: wrap;
}
.compact-confirm-dialog { max-width: 34rem; }

.issue-delete-dialog-actions {
  justify-content: flex-end;
}

@media (max-width: 520px) {
  .issue-delete-dialog-actions {
    flex-direction: column;
  }

  .issue-delete-dialog-actions > button {
    width: 100%;
  }
}

@media (max-width: 1350px) {
  .project-access-filters { grid-template-columns: repeat(2, minmax(12rem, 1fr)); }
  .project-access-editor { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 700px) {
  #projectAccessDialog { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); }
  .project-access-dialog { max-height: calc(100dvh - 1rem); }
  .project-access-filters { grid-template-columns: 1fr; }
  .project-access-editor { grid-template-columns: minmax(0, 1fr); }
  .project-access-table-wrap { display: none; }
  .project-access-card-list { display: grid; gap: .75rem; }
  .project-access-card dl div { grid-template-columns: 1fr; gap: .1rem; }
  .project-access-filter-actions button,
  .project-access-card .table-actions button { width: 100%; }
  .project-access-card .table-actions .management-icon-button { width: 2.75rem !important; }
}

/* Rollen- und Rechteverwaltung */
#rolePermissionDialog {
  width: min(96vw, 78rem);
  max-width: 78rem;
  max-height: 92dvh;
  overflow: hidden;
  padding: 0;
}
.role-permission-dialog {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  width: 100%;
  min-width: 0;
  max-height: 92dvh;
  padding: 0;
  box-sizing: border-box;
  overflow: hidden;
}
.role-permission-header,
.role-permission-actions {
  position: relative;
  z-index: 1;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  background: #fff;
}
.role-permission-header {
  align-items: center;
  border-bottom: 1px solid var(--border);
}
.role-permission-header h2 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}
.role-permission-scroll-body {
  display: grid;
  gap: 1rem;
  min-width: 0;
  min-height: 0;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
.role-permission-actions {
  justify-content: flex-end;
  margin: 0;
  border-top: 1px solid var(--border);
}
.role-permission-actions > button {
  width: auto;
  margin-inline-start: auto;
}
.role-security-note {
  margin: 0;
  padding: 1rem;
  border-inline-start: .35rem solid #1d4ed8;
  border-radius: .5rem;
  background: #eff6ff;
}
.role-security-note h3 { margin-top: 0; }
.role-security-note ul { margin-bottom: 0; }
.system-role-summary {
  display: flex;
  align-items: start;
  justify-content: space-between;
  gap: 1rem;
  margin-block: 1rem;
  padding: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: .65rem;
  background: #f8fafc;
}
.system-role-summary h3,
.system-role-summary p { margin-block: .25rem; }
.legacy-role-review {
  margin-block: 1rem;
  padding: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: .65rem;
}
.legacy-role-review summary {
  cursor: pointer;
  font-weight: 800;
}
.legacy-role-review summary:focus-visible {
  outline: 3px solid #f59e0b;
  outline-offset: 3px;
}
.legacy-role-list {
  display: grid;
  gap: .75rem;
  margin: 1rem 0 0;
  padding: 0;
  list-style: none;
}
.legacy-role-list > li {
  padding: .9rem;
  border: 1px solid #cbd5e1;
  border-radius: .55rem;
  background: #fff;
}
.legacy-role-list > li > div {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  flex-wrap: wrap;
}
.legacy-role-list dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
  margin: .75rem 0 0;
}
.legacy-role-list dt { font-weight: 800; }
.legacy-role-list dd { margin: .2rem 0 0; overflow-wrap: anywhere; }
.role-permission-toolbar {
  display: flex;
  gap: .75rem;
  align-items: end;
  flex-wrap: wrap;
}
.role-permission-toolbar label {
  display: grid;
  gap: .4rem;
  flex: 1 1 20rem;
}
.role-editor-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  margin-block: .75rem;
}
.role-editor-form {
  display: grid;
  gap: .75rem;
  margin-block: 1rem;
}
.role-editor-form[hidden] { display: none; }
.role-editor-form fieldset {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem 1rem;
  border: 1px solid #94a3b8;
  border-radius: .55rem;
  padding: .75rem;
}
.role-editor-form fieldset label,
.role-editor-form #managedRoleActiveLabel {
  display: flex;
  align-items: center;
  gap: .4rem;
}
.selected-role-summary {
  display: grid;
  grid-template-columns: minmax(0, 2fr) minmax(15rem, 1fr);
  gap: 1rem;
  margin: 1rem 0;
  padding: 1rem;
  border: 1px solid #cbd5e1;
  border-radius: .65rem;
}
.selected-role-summary h3 { margin-top: 0; }
.role-meta-list { margin: 0; }
.role-meta-list div { margin-bottom: .65rem; }
.role-meta-list dt { font-weight: 800; }
.role-meta-list dd { margin: .2rem 0 0; }
.role-permission-table {
  width: 100%;
  table-layout: fixed;
  border-collapse: collapse;
  margin-block: 1rem;
}
.role-permission-table caption {
  text-align: start;
  font-weight: 800;
  padding-block: .5rem;
}
.role-permission-table th,
.role-permission-table td {
  padding: .8rem;
  border: 1px solid #cbd5e1;
  text-align: start;
  vertical-align: top;
  overflow-wrap: anywhere;
}
.role-permission-table thead th:first-child { width: 72%; }
.role-permission-table tbody th[scope="row"] > span:first-child {
  display: block;
  font-weight: 800;
}
.role-permission-table code {
  display: inline-block;
  margin-block: .2rem;
  font-size: .82em;
}
.permission-description {
  display: block;
  font-weight: 400;
}
.permission-group-row th {
  background: #e2e8f0;
  color: #172554;
  font-size: 1.05rem;
}
.role-permission-table td {
  text-align: center;
}
.role-permission-table input[type="checkbox"] {
  width: 1.35rem;
  height: 1.35rem;
}
.permission-state-label,
.protected-indicator {
  display: block;
  margin-top: .35rem;
  font-weight: 700;
}
.protected-indicator { color: #7c2d12; }
.role-permission-review {
  margin-block: 1rem;
  padding: 1rem;
  border: 2px solid #1d4ed8;
  border-radius: .65rem;
  background: #f8fafc;
}
.role-permission-review:focus { outline: 3px solid #f59e0b; outline-offset: 3px; }

@media (max-width: 720px) {
  #rolePermissionDialog { width: calc(100vw - 1rem); max-height: calc(100dvh - 1rem); }
  .role-permission-dialog { max-height: calc(100dvh - 1rem); }
  .selected-role-summary { grid-template-columns: 1fr; }
  .role-permission-toolbar > * { width: 100%; }
  .system-role-summary { display: grid; }
  .legacy-role-list dl { grid-template-columns: 1fr; }
  .role-editor-actions button,
  .role-editor-form .dialog-actions button { width: 100%; }
  .role-permission-table,
  .role-permission-table tbody,
  .role-permission-table tr,
  .role-permission-table th,
  .role-permission-table td { display: block; width: 100%; box-sizing: border-box; }
  .role-permission-table thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }
  .role-permission-table tbody { margin-bottom: 1rem; }
  .role-permission-table tbody tr:not(.permission-group-row) {
    margin-bottom: .75rem;
    border: 1px solid #94a3b8;
    border-radius: .55rem;
    overflow: hidden;
  }
  .role-permission-table tbody tr:not(.permission-group-row) > * { border: 0; }
  .role-permission-table tbody tr:not(.permission-group-row) > td {
    display: flex;
    align-items: center;
    gap: .65rem;
    text-align: start;
    background: #f8fafc;
  }
  .permission-state-label { margin-top: 0; }
  .role-permission-actions button { width: 100%; }
}

/* Responsive Reflow: 320 px sowie 1280 px bei 200 % Zoom (effektiv 640 CSS-px). */
html {
  min-width: 0;
}

body,
#appShell,
main,
.view-panel,
.panel,
.card,
.page-toolbar,
.app-header,
.app-header > *,
.header-actions,
.header-userbar {
  min-width: 0;
  max-width: 100%;
}

img,
video,
canvas,
svg {
  max-width: 100%;
  height: auto;
}

h1,
h2,
h3,
h4,
p,
li,
dd,
dt,
label,
button,
.file-button,
.status-pill,
.user-chip {
  overflow-wrap: anywhere;
}


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

/* Löschfunktionen für Kunden/Projekte */
.customer-project-head {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}
.project-delete-list {
  display: grid;
  gap: .65rem;
  padding-left: 0 !important;
  list-style: none;
}
.project-delete-list li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .75rem;
  border-top: 1px solid var(--border);
  padding-top: .65rem;
}
.danger-action {
  background: #991b1b;
  color: #fff;
  border-color: #fecaca;
}
.danger-action:hover {
  background: #7f1d1d;
}
.small-action {
  width: auto !important;
  min-height: 2.4rem !important;
  padding: .45rem .7rem !important;
  font-size: .9rem;
  white-space: nowrap;
}
@media (max-width: 720px) {
  .customer-project-head,
  .project-delete-list li {
    grid-template-columns: 1fr;
    display: grid;
  }
  .small-action {
    width: 100% !important;
    white-space: normal;
  }
}

/* API frontend additions */
.empty-state {
  border: 2px dashed #64748b;
  background: #f8fafc;
}
.customer-list-card {
  display: grid;
  gap: .75rem;
  border: 1px solid #cbd5e1;
  border-radius: .75rem;
  padding: 1rem;
  margin-block: .75rem;
  background: #fff;
}
.customer-list-card > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
}
.customer-list-card ul {
  margin: 0;
  padding-left: 1.25rem;
}
.customer-list-card li {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: center;
  padding-block: .35rem;
  border-top: 1px solid #e2e8f0;
}
.danger-action {
  background: #991b1b;
  color: #fff;
  border: 2px solid #7f1d1d;
  border-radius: .5rem;
  padding: .5rem .75rem;
  font-weight: 700;
}
.small {
  padding: .35rem .55rem;
  font-size: .875rem;
}
.comment-compose {
  display: grid;
  grid-template-columns: minmax(7rem, auto) minmax(12rem, 1fr) auto;
  gap: .5rem;
  align-items: start;
  margin-top: .5rem;
}
.comment-compose textarea {
  min-width: 14rem;
}
.comment {
  border-left: 4px solid #475569;
  padding: .4rem .55rem;
  margin-block: .35rem;
  background: #f8fafc;
}
.comment-meta {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem .5rem;
  align-items: baseline;
  font-size: .85rem;
}
.comment-meta strong {
  color: var(--text);
}
.comment-meta span,
.comment-meta time {
  color: var(--muted);
  font-weight: 700;
}
.tester-comment { border-left-color: #1d4ed8; }
.customer-comment { border-left-color: #15803d; }
.problem-text p {
  margin-block: 0 0.75rem;
}
.problem-text p:last-child { margin-bottom: 0; }
.page-result-card dl {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .5rem;
}
.page-result-card dt { font-weight: 700; }
.page-result-card dd { margin: 0; font-size: 1.25rem; }
.pie {
  width: 12rem;
  aspect-ratio: 1;
  border-radius: 999px;
  display: grid;
  place-items: center;
  border: 2px solid #0f172a;
}
.pie span {
  background: #fff;
  border-radius: 999px;
  padding: 1rem;
  font-weight: 800;
}
.missing-shot {
  min-height: 10rem;
  display: grid;
  place-items: center;
  border: 2px dashed #64748b;
  background: #f1f5f9;
  color: #334155;
  font-weight: 700;
}
@media (max-width: 760px) {
  .comment-compose { grid-template-columns: 1fr; }
  .comment-compose textarea { min-width: 0; width: 100%; }
  .customer-list-card > div, .customer-list-card li { align-items: stretch; flex-direction: column; }
}

.api-config-form { max-width: min(100%, 52rem); }
#dbConfigDialog .dialog-actions { justify-content: flex-end; }
#aiConfigDialog {
  width: min(calc(100% - 2rem), 58rem);
  max-width: 58rem;
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow: hidden;
}
#aiConfigDialog .ai-config-form {
  grid-template-rows: auto minmax(0, 1fr) auto;
  gap: 0;
  width: 100%;
  max-width: none;
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
}
#aiConfigDialog .ai-config-dialog-header {
  position: relative;
  z-index: 1;
  align-items: center;
  margin: 0;
  padding: 1.25rem;
  border-bottom: 1px solid var(--border);
  background: #fff;
}
#aiConfigDialog .ai-config-dialog-header h2 { min-width: 0; margin: 0; overflow-wrap: anywhere; }
#aiConfigDialog .ai-config-scroll-body {
  display: grid;
  gap: 1rem;
  min-width: 0;
  min-height: 0;
  padding: 1.25rem;
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}
#aiConfigDialog .ai-config-dialog-actions {
  position: relative;
  z-index: 1;
  margin: 0;
  padding: 1rem 1.25rem 1.25rem;
  border-top: 1px solid var(--border);
  background: #fff;
}
@media (max-width: 560px) {
  #aiConfigDialog {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
  }
  #aiConfigDialog .ai-config-form { max-height: calc(100dvh - 1rem); }
  #aiConfigDialog .ai-config-dialog-header,
  #aiConfigDialog .ai-config-scroll-body { padding: 1rem; }
  #aiConfigDialog .ai-config-dialog-actions { padding: .75rem 1rem 1rem; }
}
.ai-config-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.ai-config-grid label { align-content: start; }
.ai-config-control { display: grid; gap: .35rem; align-content: start; min-width: 0; }
.ai-config-label-line {
  display: flex;
  align-items: baseline;
  flex-wrap: wrap;
  gap: .25rem .5rem;
  min-height: 1.5em;
  line-height: 1.35;
}
#aiProvider,
#aiOrganizationId {
  width: 100%;
  height: 3.75rem;
  min-height: 3.75rem;
}
.ai-config-field { display: grid; grid-column: 1 / -1; gap: .35rem; align-content: start; }
.ai-config-field label { font-weight: 700; }
.ai-config-grid .field-help { margin: 0; font-weight: 400; }
.ai-model-discovery-actions { justify-items: start; }
.ai-model-assignments {
  display: grid;
  grid-column: 1 / -1;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 1rem;
  min-width: 0;
  margin: 0;
  border: 1px solid var(--border);
  border-radius: .75rem;
  padding: 1rem;
}
.ai-model-assignments legend { padding: 0 .35rem; font-weight: 800; }
.ai-model-assignment { display: grid; gap: .35rem; align-content: start; min-width: 0; }
.ai-model-label { font-weight: 700; }
.ai-model-assignment .a11y-combobox { min-width: 0; }
.ai-model-list-toggle {
  justify-self: start;
  min-height: 2.75rem;
  padding: .45rem .75rem;
  font-size: .9rem;
}
.ai-model-assignment .field-error:not([hidden]) { display: block; }
.ai-test-application-list { display: grid; gap: .35rem; margin: .75rem 0 0; padding-left: 1.25rem; }
@media (max-width: 760px) {
  .ai-model-assignments { grid-template-columns: 1fr; }
}
.ai-insecure-http-option {
  display: grid;
  grid-column: 1 / -1;
  gap: .35rem;
  border: 1px solid #f59e0b;
  border-radius: .75rem;
  padding: .75rem;
  background: #fffbeb;
  color: #78350f;
}
.ai-insecure-http-option label {
  display: flex;
  gap: .65rem;
  align-items: flex-start;
}
.ai-insecure-http-option input[type="checkbox"] {
  flex: 0 0 auto;
  inline-size: 1.25rem;
  block-size: 1.25rem;
  min-height: 1.25rem;
  margin: .15rem 0 0;
  padding: 0;
}
.ai-insecure-http-option label > span {
  min-width: 0;
  line-height: 1.35;
}
.ai-insecure-http-option .field-help { color: #78350f; }
.optional-label { color: var(--muted); font-size: .85rem; font-weight: 600; }
#aiConfiguredKeyHint { overflow-wrap: anywhere; }
.connection-status-card { border: 1px solid var(--border); border-radius: .9rem; padding: 1rem; background: #f8fafc; }
.connection-status-card strong { display: block; margin-bottom: .65rem; }
.connection-status-list { display: grid; gap: .5rem; margin: 0; }
.connection-status-list div { display: grid; grid-template-columns: 8rem 1fr; gap: .75rem; align-items: start; }
.connection-status-list dt { font-weight: 800; color: var(--muted); }
.connection-status-list dd { margin: 0; font-weight: 700; overflow-wrap: anywhere; }
#aiConfigOverview .connection-status-list div {
  grid-template-columns: minmax(15rem, max-content) minmax(0, 1fr);
}
#aiConfigOverview .connection-status-list dt {
  white-space: nowrap;
}
@media (max-width: 520px) {
  .connection-status-list div,
  .ai-config-grid { grid-template-columns: 1fr; gap: .15rem; }
  #aiConfigOverview .connection-status-list div { grid-template-columns: 1fr; }
  #aiConfigOverview .connection-status-list dt { white-space: normal; }
  .ai-config-field,
  .ai-insecure-http-option { grid-column: auto; }
  .ai-model-assignments { grid-template-columns: 1fr; grid-column: auto; }
}


/* Verwaltung und Systemeinstellungen bleiben als native Disclosure im Kopfmenü. */
.header-menu-panel-heading {
  display: none;
}
.header-menu-panel .config-actions {
  display: grid !important;
  width: 100% !important;
  min-width: 0 !important;
  padding: .85rem 0 0 !important;
  border: 0 !important;
  border-top: 1px solid var(--border) !important;
  border-radius: 0 !important;
  background: transparent !important;
}
.header-menu-panel .config-actions[hidden],
.header-settings-panel[hidden] {
  display: none !important;
}
.header-settings-button,
.header-settings-actions button,
.header-menu-logout button {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 2.75rem !important;
  height: auto !important;
  margin: 0 !important;
  padding: .6rem .75rem !important;
  white-space: normal !important;
  overflow-wrap: anywhere !important;
  text-align: start !important;
}
.header-settings-button {
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: .75rem !important;
  font-weight: 800 !important;
}
.header-settings-button::after {
  content: "+";
  flex: 0 0 auto;
  font-size: 1.35rem;
  line-height: 1;
}
.header-settings-button[aria-expanded="true"]::after {
  content: "−";
}
.header-settings-panel {
  display: grid;
  gap: 1rem;
  width: 100%;
  min-width: 0;
  padding: .85rem .15rem .15rem;
  box-sizing: border-box;
}
.header-settings-group {
  display: grid;
  gap: .45rem;
  min-width: 0;
}
.header-settings-group + .header-settings-group {
  padding-top: .85rem;
  border-top: 1px solid var(--border);
}
.header-settings-group h2 {
  margin: 0;
  color: var(--twin-blue-dark);
  font-size: .9rem;
  line-height: 1.35;
}
.header-settings-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .4rem;
  min-width: 0;
}
.header-menu-logout {
  width: 100%;
  min-width: 0;
  padding-top: .85rem;
  border-top: 2px solid var(--border);
}
.header-menu-logout .logout-action {
  text-align: center !important;
}
.header-menu-panel {
  max-height: min(42rem, calc(100dvh - 6rem)) !important;
  overflow-x: hidden !important;
  overflow-y: auto !important;
  overscroll-behavior: contain;
}

@media (max-width: 520px) {
  .header-menu-panel-heading {
    display: flex;
    align-items: center;
    justify-content: space-between;
    gap: .75rem;
  }
  .header-menu-close {
    flex: 0 0 2.75rem !important;
    margin-inline-start: auto !important;
  }
}

/* Einheitliche, schriftunabhängig zentrierte X-Schaltflächen. */
.icon-close-button {
  position: relative;
  display: inline-grid !important;
  place-items: center !important;
  flex: 0 0 2.75rem !important;
  inline-size: 2.75rem !important;
  block-size: 2.75rem !important;
  width: 2.75rem !important;
  height: 2.75rem !important;
  min-width: 2.75rem !important;
  min-height: 2.75rem !important;
  max-width: 2.75rem !important;
  max-height: 2.75rem !important;
  aspect-ratio: 1 / 1 !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 0 !important;
  border-radius: 50% !important;
  background: transparent !important;
  color: #475569 !important;
  line-height: 1 !important;
}
.icon-close-button::before {
  position: absolute;
  inset: .3125rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  background: #fff;
  content: '';
}
.icon-close-button:hover {
  background: transparent !important;
  color: #334155 !important;
}
.icon-close-button:hover::before { background: #f1f5f9; }
.close-icon {
  position: relative;
  display: block;
  inline-size: 1rem;
  block-size: 1rem;
  pointer-events: none;
  z-index: 1;
}
.close-icon::before,
.close-icon::after {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-start: 50%;
  inline-size: 1rem;
  block-size: .1875rem;
  border-radius: 999px;
  background: currentColor;
  content: '';
  transform-origin: center;
}
.close-icon::before { transform: translate(-50%, -50%) rotate(45deg); }
.close-icon::after { transform: translate(-50%, -50%) rotate(-45deg); }
@media (forced-colors: active) {
  .icon-close-button {
    border-color: ButtonText !important;
    background: ButtonFace !important;
    color: ButtonText !important;
  }
}
.issue-screenshots {
  display: grid;
  gap: 0.75rem;
  margin-top: 0.75rem;
}
.issue-screenshots figure {
  margin: 0;
  padding: 0.75rem;
  border: 1px solid #d7dce8;
  border-radius: 0.75rem;
  background: #f8fafc;
}
.issue-screenshots img {
  display: block;
  max-width: 100%;
  max-height: 24rem;
  object-fit: contain;
  border: 1px solid #cbd5e1;
  border-radius: 0.5rem;
  background: #fff;
}
.issue-screenshots figcaption {
  margin-top: 0.5rem;
  color: #475569;
  font-size: 0.9rem;
}
.issue-screenshots .screenshot-delete-action {
  width: auto;
  margin-top: 0.75rem;
}

.issue-screenshots--thumbnails {
  grid-template-columns: repeat(auto-fill, minmax(9rem, 10rem));
  gap: .5rem;
}

.issue-screenshots--thumbnails .issue-screenshot-thumbnail {
  padding: .3rem;
}

.issue-screenshot-thumbnail-actions {
  display: flex;
  justify-content: flex-end;
  padding-top: .3rem;
}

.issue-screenshots .issue-screenshot-thumbnail-delete {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: .35rem;
}

.issue-screenshot-thumbnail-delete svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.issue-screenshot-preview-trigger {
  display: grid;
  gap: .3rem;
  width: 100%;
  min-height: 0;
  padding: .25rem;
  border: 2px solid var(--twin-blue);
  border-radius: .5rem;
  background: var(--surface);
  color: var(--twin-blue-dark);
  text-align: center;
}

.issue-screenshot-preview-trigger:hover {
  background: #e9f3fb;
  color: var(--twin-blue-dark);
}

.issue-screenshots--thumbnails .issue-screenshot-preview-trigger img {
  width: 100%;
  height: 6rem;
  max-height: 6rem;
  object-fit: contain;
  background: #fff;
}

.issue-screenshot-preview-trigger span {
  font-size: .8rem;
  line-height: 1.25;
}

.issue-screenshot-preview-dialog {
  width: min(90rem, calc(100% - 2rem));
  max-width: 90rem;
  max-height: calc(100dvh - 2rem);
}

.issue-screenshot-preview-content {
  min-width: 0;
}

.issue-screenshot-preview-figure {
  display: grid;
  place-items: center;
  gap: .5rem;
  min-width: 0;
  margin: 0;
}

.issue-screenshot-preview-figure img {
  display: block;
  max-width: 100%;
  max-height: calc(100dvh - 14rem);
  object-fit: contain;
}

.issue-screenshot-preview-figure figcaption {
  color: var(--muted);
  font-weight: 700;
}

.issue-screenshot-preview-actions {
  justify-content: center;
}

@media (max-width: 600px) {
  .issue-screenshot-preview-dialog {
    width: calc(100% - 1rem);
    max-height: calc(100dvh - 1rem);
  }

  .issue-screenshot-preview-figure img {
    max-height: calc(100dvh - 18rem);
  }

  .issue-screenshot-preview-actions > * {
    width: 100%;
  }
}

.issue-form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}

.issue-content-conflict {
  margin-block-start: 1rem;
  padding: 1rem;
  border: 2px solid var(--danger, #b42318);
  border-radius: var(--radius, .5rem);
  background: var(--surface, #fff);
}

.issue-content-conflict:focus {
  outline: 3px solid var(--focus, #005fcc);
  outline-offset: 3px;
}

.issue-content-conflict > ul {
  display: grid;
  gap: 1rem;
  padding-inline-start: 1.25rem;
}

.issue-conflict-comparison {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .75rem;
  margin-block: .5rem 0;
}

.issue-conflict-comparison > div {
  min-width: 0;
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: .35rem;
}

.issue-conflict-comparison dd {
  margin: .35rem 0 0;
  white-space: pre-wrap;
  overflow-wrap: anywhere;
}

.workspace-issue-conflict-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}

.workspace-issue-conflict-actions[hidden] {
  display: none;
}

@media (max-width: 620px) {
  .issue-conflict-comparison { grid-template-columns: 1fr; }
}
.issue-form-grid label {
  min-width: 0;
}
.issue-form-grid select,
.issue-form-grid input,
.issue-form-grid textarea {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}
#issueDialog #issueTitleText,
#issueDialog #issueProblemText,
#issueDialog #issueTesterSolutionText,
#issueDialog #issueCodeFormattingHelp {
  font-weight: 400;
}
.issue-description-field,
.issue-screenshot-field,
.existing-screenshots,
.issue-status-lifecycle-help,
.issue-form-grid > #issueTesterSolutionHelp,
.issue-form-grid .form-status,
.issue-form-grid .form-error,
.issue-form-grid .dialog-actions {
  grid-column: 1 / -1;
}
.issue-dialog-text-action {
  height: 2.75rem;
  min-height: 2.75rem;
  padding: .35rem .75rem;
  box-sizing: border-box;
  font-size: .875rem;
  line-height: 1.25;
}
.issue-description-field textarea {
  min-height: 12rem;
  resize: vertical;
}
.issue-form-grid select:disabled,
.issue-form-grid textarea[readonly] {
  border-color: #cbd0d6;
  background-color: #f1f3f5;
  color: #475569;
  cursor: not-allowed;
  opacity: 1;
}
.issue-readonly-note {
  grid-column: 1 / -1;
  margin: 0;
}
.existing-screenshots {
  display: grid;
  gap: 0.75rem;
  padding: 0.85rem;
  border: 1px solid var(--border);
  border-radius: 0.75rem;
  background: #f8fafc;
}
.existing-screenshots h3 {
  margin: 0;
  font-size: 1rem;
}
.issue-screenshot-field { display: grid; gap: .45rem; }
.issue-screenshot-field .field-label { font-weight: 600; }
@media (max-width: 760px) {
  .issue-form-grid {
    grid-template-columns: 1fr;
  }
}

/* Fix: stabile Problemtabelle und auswertbare Seitenbalken */
.table-wrap {
  overflow-x: auto;
  max-width: 100%;
}
.table-wrap table {
  min-width: 1450px;
  table-layout: fixed;
}
.table-wrap th:nth-child(1), .table-wrap td.col-page { width: 5.5rem; }
.table-wrap th:nth-child(2), .table-wrap td.col-step { width: 14rem; }
.table-wrap th:nth-child(3), .table-wrap td.col-problem { width: 48%; }
.table-wrap th:nth-child(4), .table-wrap td.col-priority { width: 10rem; }
.table-wrap th:nth-child(5), .table-wrap td.col-status { width: 9rem; }
.table-wrap th:nth-child(6), .table-wrap td.col-comments { width: 24rem; }
.table-wrap th:nth-child(7), .table-wrap td.col-actions { width: 11rem; }
.issue-row td {
  vertical-align: top;
}
.col-problem,
.col-comments,
.col-step {
  overflow-wrap: anywhere;
  word-break: normal;
}
.col-priority select,
.col-comments select,
.col-comments textarea {
  width: 100%;
  max-width: 100%;
}
.col-status .status-badge {
  display: inline-block;
  border-radius: 999px;
  padding: .25rem .55rem;
  background: #eef2ff;
  color: #1e3a8a;
  font-weight: 800;
}
.row-actions {
  display: grid;
  gap: .5rem;
}
.row-actions button,
.col-comments button {
  width: 100%;
}
.col-comments .comment-compose {
  grid-template-columns: 7rem minmax(0, 1fr) 5rem;
}
.col-comments .comment-compose textarea {
  min-width: 0;
}
.problem-text {
  max-width: 100%;
  line-height: 1.55;
}
.issue-problem-title {
  margin: 0 0 .65rem;
  color: var(--twin-blue-dark);
  font-size: 1.05rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}
.problem-text p + p {
  margin-top: .75rem;
}
.page-result-card .result-mini-bars {
  margin-top: .4rem;
}
.page-result-card .result-mini-row {
  grid-template-columns: 8.5rem minmax(0, 1fr) 3rem;
}
.page-result-card .result-mini-fill {
  display: block;
  height: 100%;
}
@media (max-width: 900px) {
  .table-wrap table { min-width: 1200px; }
  .col-comments .comment-compose { grid-template-columns: 1fr; }
}


/* Kompakte Verteilung der vollständigen Matrix-Bewertungsskala. */
.assessment-rating-bars {
  display: grid;
  gap: .45rem;
  margin-block-start: .75rem;
}
.assessment-rating-row {
  display: grid;
  grid-template-columns: 8.75rem minmax(4rem, 1fr) 4.25rem;
  gap: .6rem;
  align-items: center;
  min-height: 1.25rem;
  font-size: .82rem;
}
.assessment-rating-label {
  line-height: 1.25;
}
.assessment-rating-track {
  height: .5rem;
  border-radius: 999px;
  overflow: hidden;
  background: #e5e7eb;
}
.assessment-rating-fill {
  display: block;
  height: 100%;
  min-width: 0;
  border-radius: inherit;
}
.assessment-rating-fill.rating-e { background: #08752d; }
.assessment-rating-fill.rating-ee { background: #55a568; }
.assessment-rating-fill.rating-te { background: #c58a00; }
.assessment-rating-fill.rating-ene { background: #c85700; }
.assessment-rating-fill.rating-ne { background: #b00000; }
.assessment-rating-fill.rating-na { background: #526173; }
.assessment-rating-fill.rating-not-assessed { background: #94a3b8; }
.assessment-rating-value {
  display: grid;
  grid-template-columns: 1.75rem 2rem;
  gap: .25rem;
  align-items: center;
  justify-content: end;
  text-align: end;
  white-space: nowrap;
}
.assessment-rating-value small {
  color: var(--muted);
  font-size: inherit;
}
.assessment-rating-total {
  display: flex;
  justify-content: space-between;
  margin-block-start: .2rem;
  padding-block-start: .45rem;
  border-block-start: 1px solid var(--border);
  font-size: .85rem;
}
@media (max-width: 560px) {
  .assessment-rating-row {
    grid-template-columns: minmax(7.5rem, 1fr) 4.25rem;
  }
  .assessment-rating-track {
    grid-column: 1 / -1;
    grid-row: 2;
  }
  .assessment-rating-value {
    grid-column: 2;
    grid-row: 1;
  }
}
.page-results-heading {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: 1rem;
}
.page-results-heading h2 { margin-block-end: 0; }
.page-results-count {
  color: var(--muted);
  font-size: .9rem;
  font-weight: 700;
  white-space: nowrap;
}
.page-result-grid {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .75rem;
}
.page-result-card {
  border: 1px solid var(--border);
  border-radius: .85rem;
  padding: .85rem;
  background: #f8fafc;
  display: grid;
  align-content: start;
  gap: .75rem;
}
.page-result-title { min-width: 0; }
.page-result-card h3 { margin: 0; font-size: 1rem; }
.page-result-title p {
  margin: .2rem 0 0;
  color: var(--muted);
  overflow-wrap: anywhere;
}
.page-progress {
  display: grid;
  gap: .3rem;
}
.page-progress-copy {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .75rem;
  font-size: .9rem;
}
.page-progress progress {
  width: 100%;
  height: .65rem;
  accent-color: var(--success);
}
.page-progress-value {
  color: var(--muted);
  font-size: .78rem;
}
.page-rating-bars {
  display: grid;
  gap: .32rem;
  padding-block-start: .7rem;
  border-block-start: 1px solid var(--border);
}
.page-rating-row {
  display: grid;
  grid-template-columns: minmax(7.6rem, 1fr) minmax(2.5rem, .8fr) 1.8rem;
  gap: .45rem;
  align-items: center;
  font-size: .78rem;
}
.page-rating-row > span:first-child { overflow-wrap: anywhere; }
.page-rating-row > strong { text-align: end; }
.page-rating-track {
  display: block;
  height: .45rem;
  overflow: hidden;
  border-radius: 999px;
  background: #e9edf7;
}
.page-rating-track .assessment-rating-fill {
  display: block;
  height: 100%;
}
.page-results-actions {
  display: flex;
  justify-content: flex-end;
  margin-block-start: .85rem;
}
.table-wrap table { min-width: 1280px; table-layout: auto; }
.table-wrap th:nth-child(3), .table-wrap td.col-problem { width: auto; }
.col-actions .row-actions { min-width: 9rem; }
@media (max-width: 1100px) { .page-result-grid { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 760px) {
  .page-result-grid { grid-template-columns: 1fr; }
  .page-results-heading {
    align-items: flex-start;
    flex-direction: column;
    gap: .25rem;
  }
}

/* v9: lokale Darstellung fuer Prioritaets-, Statusverteilung und Problemtabelle */
.bar-fill.priority-p1,
.bar-fill.status-offen,
.bar-fill.status-kunde_behoben { background: #9f1239; }
.bar-fill.priority-p2 { background: #c85700; }
.bar-fill.priority-p3,
.bar-fill.status-in_arbeit,
.bar-fill.status-nicht_bewertet { background: #f59e0b; }
.bar-fill.priority-p4,
.bar-fill.status-tester_bestaetigt { background: #166534; }
.bar-fill.priority-unset { background: #64748b; }
.bar-fill.status-nachtest_erforderlich { background: #f59e0b; }

.table-wrap table {
  min-width: 1180px !important;
  table-layout: fixed !important;
}
.table-wrap th,
.table-wrap td {
  padding: .65rem .75rem !important;
  font-size: .95rem;
}
.table-wrap th:nth-child(1), .table-wrap td.col-page { width: 5.5rem !important; }
.table-wrap th:nth-child(2), .table-wrap td.col-step { width: 13rem !important; }
.table-wrap th:nth-child(3), .table-wrap td.col-problem { width: auto !important; }
.table-wrap th:nth-child(4), .table-wrap td.col-priority { width: 11rem !important; }
.table-wrap th:nth-child(5), .table-wrap td.col-status { width: 12rem !important; }
.table-wrap th:nth-child(6), .table-wrap td.col-comments { width: 21rem !important; }
.table-wrap th:nth-child(7), .table-wrap td.col-actions { width: 10rem !important; }
.col-priority select,
.col-status select,
.col-comments select,
.col-comments textarea {
  min-height: 2.6rem;
  padding: .55rem .65rem;
  border: 1px solid #9ca3af;
}
.col-comments .comment-list {
  margin: 0 0 .5rem 0;
  gap: .4rem;
}
.col-comments .comment-scroll {
  max-height: 17rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  padding: .2rem .35rem .2rem 0;
  scrollbar-gutter: stable;
}
.col-comments .comment-scroll.has-comments {
  min-height: 13rem;
}
.col-comments .comment-compose {
  display: grid !important;
  grid-template-columns: 7rem minmax(0, 1fr) !important;
  gap: .45rem !important;
  align-items: start;
}
.col-comments .comment-compose textarea {
  grid-column: 1 / -1;
  min-height: 4.2rem;
  resize: vertical;
}
.col-comments .comment-compose button {
  grid-column: 1 / -1;
  width: 100%;
  min-height: 2.6rem;
  padding: .55rem .7rem;
}
.col-comments > .secondary-action.small {
  width: auto;
  min-height: 2.2rem;
  padding: .35rem .65rem;
  margin-bottom: .5rem;
}
.row-actions {
  gap: .45rem !important;
}
.row-actions button {
  min-height: 2.6rem;
  padding: .55rem .65rem;
  line-height: 1.2;
}
.problem-text p {
  margin: 0 0 .65rem 0;
}
.problem-text p:last-child {
  margin-bottom: 0;
}
.comment.tester-comment,
.comment.customer-comment {
  border-left: 4px solid #1d4ed8;
  background: #eff6ff;
  border-radius: .45rem;
  padding: .45rem .55rem;
  min-height: 4rem;
}
.comment.customer-comment {
  border-left-color: #166534;
  background: #f0fdf4;
}
.comment.other-comment {
  border-left-color: #64748b;
  background: #f8fafc;
}
@media (max-width: 900px) {
  .col-comments .comment-compose { grid-template-columns: 1fr !important; }
}

/* v14: kompakte lokale Problemtabelle */
.table-wrap table {
  min-width: 1320px !important;
  table-layout: fixed !important;
}
.table-wrap th:nth-child(4), .table-wrap td.col-priority { width: 10rem !important; }
.table-wrap th:nth-child(5), .table-wrap td.col-status { width: 14rem !important; }
.table-wrap th:nth-child(6), .table-wrap td.col-comments { width: 20rem !important; }
.table-wrap th:nth-child(7), .table-wrap td.col-actions { width: 10.5rem !important; }
.col-status select,
.col-priority select {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  font-size: .95rem;
  line-height: 1.2;
  white-space: nowrap;
  text-overflow: ellipsis;
}
.col-comments .comment-compose {
  display: grid !important;
  grid-template-columns: 1fr !important;
  gap: .45rem !important;
  margin-top: .5rem;
}
.col-comments .comment-compose select,
.col-comments [data-comment-role] {
  display: none !important;
}
.col-comments .comment-compose textarea {
  width: 100%;
  min-height: 4rem;
  box-sizing: border-box;
}
.col-comments .comment-compose button {
  width: 100%;
}
.col-actions .row-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: .45rem;
  align-items: start;
}
.col-actions .row-actions .secondary-action[data-action="load-comments"] {
  order: 0;
}
.comment-display-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
}
.comment-new-indicator {
  border-radius: 999px;
  background: #facc15;
  color: #10213f;
  border: 1px solid #fff;
  padding: .05rem .35rem;
  font-size: .75rem;
  line-height: 1.2;
  flex: 0 0 auto;
}
.comment-error {
  margin: 0;
  color: var(--danger);
  font-weight: 800;
}
.comment-actions {
  display: flex;
  gap: .35rem;
  justify-content: flex-end;
  margin-top: .45rem;
}
.comment-icon-button,
.management-icon-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 2.35rem !important;
  min-width: 2.35rem;
  min-height: 2.35rem;
  padding: .35rem !important;
  border: 2px solid var(--twin-blue, #1e70b6);
  border-radius: .45rem;
  background: #fff;
  color: var(--twin-blue, #1e70b6);
}
.management-icon-button {
  width: 2.75rem !important;
  min-width: 2.75rem;
  min-height: 2.75rem;
}
.comment-icon-button svg,
.management-icon-button svg {
  width: 1.1rem;
  height: 1.1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.comment-icon-button:hover,
.management-icon-button:hover {
  border-color: var(--twin-blue-hover, #175b95);
  background: var(--twin-blue-hover, #175b95);
  color: #fff;
}
.management-icon-button.icon-action-search {
  border-color: var(--twin-blue, #1e3a8a);
  background: var(--twin-blue, #1e3a8a);
  color: #fff;
}
.management-icon-button.icon-action-search:not(:disabled):hover {
  border-color: var(--twin-blue-dark, #10345b);
  background: var(--twin-blue-dark, #10345b);
}
.management-icon-button.icon-action-add {
  border-color: var(--twin-blue, #1e3a8a);
  background: var(--twin-blue, #1e3a8a);
  color: #fff;
}
.management-icon-button.icon-action-add:not(:disabled):hover {
  border-color: var(--twin-blue-dark, #10345b);
  background: var(--twin-blue-dark, #10345b);
}
.management-icon-button.icon-action-reset {
  border-color: var(--twin-blue, #1e3a8a);
  background: var(--surface, #fff);
  color: var(--twin-blue, #1e3a8a);
}
.management-icon-button.icon-action-open {
  border-color: var(--twin-blue, #1e3a8a);
  background: var(--surface, #fff);
  color: var(--twin-blue, #1e3a8a);
}
.management-icon-button.icon-action-reset:not(:disabled):hover {
  background: #e9f3fb;
  color: var(--twin-blue-dark, #10345b);
}
.management-icon-button.icon-action-open:not(:disabled):hover {
  background: #e9f3fb;
  color: var(--twin-blue-dark, #10345b);
}
.comment-icon-button.danger,
.management-icon-button.danger {
  border-color: #991b1b;
  color: #991b1b;
}
.comment-icon-button.danger:hover,
.management-icon-button.danger:hover {
  background: #991b1b;
  color: #fff;
}
.comment-icon-button.save {
  border-color: #166534;
  color: #166534;
}
.comment-icon-button.save:hover {
  background: #166534;
  color: #fff;
}
.comment-icon-button.cancel {
  border-color: #475569;
  color: #475569;
}
.comment-icon-button.cancel:hover {
  background: #475569;
  color: #fff;
}
.comment-icon-button:disabled,
.management-icon-button:disabled {
  opacity: .6;
  cursor: wait;
}
.editing-comment {
  outline: 2px solid #facc15;
  outline-offset: 2px;
}
.comment-edit-form {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .45rem;
  align-items: start;
  margin-top: .45rem;
}
.comment-edit-form textarea {
  grid-row: 1 / span 2;
  min-height: 5rem;
  resize: vertical;
}
.comment-action-status {
  margin: .35rem 0 0;
}
.col-actions .row-actions button {
  width: 100%;
  min-height: 2.4rem;
  padding: .55rem .65rem;
  font-size: .92rem;
}


.system-status { display: inline-flex; align-items: center; gap: .45rem; flex-wrap: wrap; }
.status-pill { display: inline-flex; align-items: center; gap: .35rem; border: 1px solid rgba(255,255,255,.45); border-radius: 999px; padding: .35rem .55rem; font-size: .82rem; font-weight: 800; background: rgba(255,255,255,.12); color: #fff; white-space: nowrap; }
.status-dot { inline-size: .7rem; block-size: .7rem; border-radius: 50%; display: inline-block; border: 2px solid rgba(255,255,255,.7); background: #94a3b8; }
.status-online .status-dot { background: #22c55e; }
.status-offline .status-dot { background: #ef4444; }
.status-unknown .status-dot { background: #f59e0b; }
.status-online { border-color: rgba(34,197,94,.8); }
.status-offline { border-color: rgba(239,68,68,.85); }
.status-unknown { border-color: rgba(245,158,11,.85); }
@media (max-width: 900px) { .system-status { width: 100%; justify-content: flex-start; } }

.customer-card-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; }
.customer-card-actions .small { min-height: 2.4rem; }



/* v31: disclosure based filter area */
.filter-panel {
  position: relative;
  border: 2px solid var(--success, #2e7d32);
  border-radius: 2rem;
  padding: 1.35rem 1.6rem 1.5rem;
  margin-block: 1rem 1.25rem;
}
.filter-panel > summary.filter-summary {
  display: inline-flex;
  align-items: center;
  gap: .75rem;
  list-style: none;
  cursor: pointer;
  font-size: clamp(1.9rem, 3vw, 3rem);
  font-weight: 800;
  color: var(--text, #101828);
  line-height: 1.1;
  outline-offset: .35rem;
}
.filter-panel > summary.filter-summary::-webkit-details-marker { display: none; }
.filter-panel > summary.filter-summary::before {
  content: "▾";
  font-size: 1.1rem;
  line-height: 1;
  transform: rotate(0deg);
  transition: transform .15s ease;
}
.filter-panel:not([open]) > summary.filter-summary::before { transform: rotate(-90deg); }
.filter-panel > summary.filter-summary:focus-visible {
  outline: 4px solid var(--focus, #ffd600);
  border-radius: .5rem;
}
.filter-active-count {
  display: inline-flex;
  align-items: center;
  min-height: 1.75rem;
  padding: .2rem .55rem;
  border: 1px solid var(--twin-blue, #1e70b6);
  border-radius: .5rem;
  background: #eef7fd;
  color: var(--twin-blue-dark, #10345b);
  font-size: .875rem;
  font-weight: 800;
  line-height: 1.2;
}
.filter-toggle-hint {
  font-size: .95rem;
  font-weight: 700;
  color: var(--muted, #667085);
}
.filter-content {
  position: relative;
  padding-top: 1.25rem;
}
.filter-reset {
  position: absolute;
  top: calc(-1 * var(--action-button-min-height) - .15rem);
  right: 0;
  min-width: 14rem;
  min-height: var(--action-button-min-height);
  padding-inline: 1.25rem;
  background: #0f6680;
  color: #fff;
  border-color: #0b3140;
}
.filter-reset:hover { background: #0c5369; }
.filters {
  display: grid;
  grid-template-columns: minmax(16rem, .95fr) minmax(14rem, 1fr) minmax(14rem, 1fr) minmax(14rem, 1fr);
  gap: 1.25rem 2rem;
  align-items: end;
}
.filters label {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  min-width: 0;
  font-weight: 800;
}
.filters input,
.filters select {
  width: 100%;
  min-width: 0;
  height: 3rem;
  box-sizing: border-box;
}
.filter-search { grid-column: 1; grid-row: 1; }
.filter-priority { grid-column: 2; grid-row: 1; }
.filter-status { grid-column: 3; grid-row: 1; }
.filter-comments { grid-column: 4; grid-row: 1; }
.filter-step { grid-column: 2; grid-row: 2; }
.filter-page { grid-column: 3; grid-row: 2; }
.filter-actions { display: none; }
.comment-notice {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: .85rem;
  flex-wrap: wrap;
  margin: 0 0 1.25rem;
  padding: 1rem 1.25rem;
  border: 2px solid #b45309;
  border-radius: .75rem;
  background: #fffbeb;
  color: #10213f;
  text-align: center;
}
.comment-notice[hidden] { display: none; }
.comment-notice strong {
  font-size: 1.05rem;
}
.comment-notice span {
  font-weight: 700;
}
.comment-notice .secondary-action {
  min-height: 2.5rem;
  background: #0f6680;
  color: #fff;
  border-color: #0b3140;
}
.comment-notice.comment-notice-error {
  border-color: var(--danger);
  background: #fef2f2;
}

@media (max-width: 1100px) {
  .filter-panel { border-radius: 1.5rem; padding: 1.25rem; }
  .filter-reset {
    width: 100%;
    margin-bottom: 1rem;
  }
  .filters {
    grid-template-columns: repeat(2, minmax(14rem, 1fr));
    gap: 1rem;
  }
  .filter-search,
  .filter-priority,
  .filter-status,
  .filter-comments,
  .filter-step,
  .filter-page {
    grid-column: auto;
    grid-row: auto;
  }
}
@media (max-width: 680px) {
  .filters { grid-template-columns: 1fr; }
  .filter-panel > summary.filter-summary { font-size: 2rem; }
  .filter-toggle-hint { display: none; }
}


/* v32: remove MVP/helper intro texts and align filter heading with regular h2 */
.intro.intro-compact {
  display: flex;
  justify-content: flex-end;
  align-items: stretch;
}
.intro.intro-compact .meta-card {
  width: min(34rem, 100%);
}
#projectHint {
  display: none !important;
}
.filter-panel > summary.filter-summary {
  font-size: clamp(1.35rem, 1.8vw, 1.75rem);
  font-weight: 900;
}
.filter-panel {
  border-radius: 1.5rem;
}
@media (max-width: 900px) {
  .intro.intro-compact { justify-content: stretch; }
  .intro.intro-compact .meta-card { width: 100%; }
}

/* v33: compact top toolbar with tabs and adaptive project card */
.page-toolbar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-block: .25rem .75rem;
}
.page-toolbar .view-tabs {
  flex: 1 1 auto;
  align-items: center;
}
.project-summary-card {
  width: fit-content;
  min-width: 0;
  max-width: min(42rem, 55vw);
  padding: .85rem 1rem;
  justify-self: end;
  display: inline-flex;
  align-items: center;
}
.project-summary-card .project-title {
  font-size: clamp(1.55rem, 2.4vw, 2.6rem);
  font-weight: 800;
  line-height: 1.05;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.filter-panel > summary.filter-summary {
  font-size: clamp(1.25rem, 1.6vw, 1.5rem) !important;
  font-weight: 800 !important;
  line-height: 1.2;
}
@media (max-width: 900px) {
  .page-toolbar {
    align-items: stretch;
    flex-direction: column-reverse;
  }
  .project-summary-card {
    width: 100%;
    max-width: none;
  }
  .project-summary-card .project-title {
    white-space: normal;
  }
}


/* v35: cleaner filter disclosure heading and reset button spacing */
.filter-panel > summary.filter-summary {
  font-size: clamp(1.25rem, 1.6vw, 1.5rem) !important;
  font-weight: 700 !important;
}
.filter-toggle-hint {
  display: none !important;
}
.filter-reset {
  top: calc(-1 * var(--action-button-min-height) + .15rem);
  right: .35rem;
}
@media (max-width: 1100px) {
  .filter-reset {
    margin-top: .25rem;
    margin-bottom: 1rem;
  }
}


/* Startup error message used when required component or script files cannot be loaded. */
.startup-error { min-height: 100vh; place-items: center; }
.startup-error .panel { max-width: 44rem; }

/* Gemeinsames Markdown: Inline-Code bleibt lesbar und wird nicht als HTML interpretiert. */
.problem-text code,
.markdown-content code,
.comment-body code,
.ai-explanation code {
  font-family: inherit;
  font-size: .95em;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: .35rem;
  padding: .08rem .3rem;
}

.matrix-summary-issue-copy code {
  font-family: inherit;
  font-size: .95em;
  background: #f1f5f9;
  border: 1px solid var(--border);
  border-radius: .35rem;
  padding: .08rem .3rem;
}

.problem-text pre,
.markdown-content pre,
.comment-body pre {
  margin: .4rem 0 .75rem;
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
  background: #0f172a;
  color: #f8fafc;
  border-radius: .65rem;
  padding: .85rem 1rem;
}

.problem-text pre code,
.markdown-content pre code,
.comment-body pre code,
.ai-explanation pre code {
  display: block;
  padding: 0;
  background: transparent;
  border: 0;
  color: inherit;
}

.problem-text h3,
.problem-text h4,
.problem-text h5,
.problem-text h6,
.markdown-content h3,
.markdown-content h4,
.markdown-content h5,
.markdown-content h6,
.comment-body h3,
.comment-body h4,
.comment-body h5,
.comment-body h6 {
  margin: .35rem 0 .2rem;
  line-height: 1.25;
}

.problem-text ul,
.problem-text ol,
.markdown-content ul,
.markdown-content ol,
.comment-body ul,
.comment-body ol {
  margin: .25rem 0 .75rem 1.25rem;
  padding: 0;
}

.problem-text li,
.markdown-content li,
.comment-body li {
  margin: .2rem 0;
}

.problem-text blockquote,
.markdown-content blockquote,
.comment-body blockquote {
  margin: .4rem 0 .75rem;
  padding: .1rem 0 .1rem .85rem;
  border-left: 3px solid var(--border);
  color: var(--muted);
}

.problem-text hr,
.markdown-content hr,
.comment-body hr {
  border: 0;
  border-top: 1px solid var(--border);
  margin: .75rem 0;
}

.problem-text table,
.markdown-content table,
.comment-body table {
  width: 100%;
  min-width: 0;
  margin: .4rem 0 .75rem;
  table-layout: auto;
}

.problem-text img,
.markdown-content img,
.comment-body img {
  max-width: 100%;
  height: auto;
  border-radius: .4rem;
}

.comment-body {
  margin-top: .2rem;
}

.comment-body p,
.markdown-content p {
  margin: 0 0 .65rem;
}

.comment-body p:last-child,
.markdown-content p:last-child {
  margin-bottom: 0;
}


/* Rollenbasierte Sichtbarkeit: Verwaltungsfunktionen bleiben für Kunden vollständig unsichtbar und nicht bedienbar. */
.role-hidden,
.tester-only[hidden],
.admin-only[hidden],
#headerCustomerLabel[hidden] {
  display: none !important;
}

/* Projektrollen erhalten vom Backend keinen auswählbaren Firmenkontext. */
.context-actions.project-only-context-mode #headerCustomerLabel {
  display: none !important;
}

/* v50: Registerleiste im Dialog Kunden und Projekte */
.management-tabs {
  display: flex;
  flex-wrap: wrap;
  gap: .5rem;
  border-bottom: 2px solid var(--border);
  padding-bottom: .65rem;
}
.management-tab {
  width: auto !important;
  min-height: 2.75rem !important;
  padding: .65rem 1rem !important;
  border-radius: .75rem .75rem 0 0;
  background: #f8fafc;
  color: #10213f;
  border: 2px solid #cbd5e1;
  border-bottom-color: transparent;
}
.management-tab.active,
.management-tab[aria-selected="true"] {
  background: #1d4ed8;
  color: #fff;
  border-color: #1d4ed8;
}

.management-tab:hover,
.management-tab:focus-visible {
  background: #1e40af;
  color: #fff;
  border-color: #1e40af;
}
.management-tab.active:hover,
.management-tab[aria-selected="true"]:hover,
.management-tab.active:focus-visible,
.management-tab[aria-selected="true"]:focus-visible {
  background: #1e3a8a;
  color: #fff;
  border-color: #1e3a8a;
}
#identityManagementDialog button {
  height: 2.75rem;
  min-height: 2.75rem;
  box-sizing: border-box;
}
#identityManagementDialog button:not(.icon-close-button):not(.management-icon-button) {
  padding: .35rem 1rem;
  font-size: .875rem;
  line-height: 1.25;
}
#identityManagementDialog .management-tab {
  padding: .35rem 1rem !important;
  border-color: #b8c5d6;
  background: #eef3f8;
  color: var(--twin-blue-dark);
}
#identityManagementDialog .management-tab:hover,
#identityManagementDialog .management-tab:focus-visible {
  border-color: #b8c5d6;
  background: #dceaf5;
  color: var(--twin-blue);
}
#identityManagementDialog .management-tab.active,
#identityManagementDialog .management-tab[aria-selected="true"] {
  border-color: var(--twin-blue);
  background: var(--twin-blue);
  color: #fff;
}
#identityManagementDialog .management-tab.active:hover,
#identityManagementDialog .management-tab[aria-selected="true"]:hover,
#identityManagementDialog .management-tab.active:focus-visible,
#identityManagementDialog .management-tab[aria-selected="true"]:focus-visible {
  border-color: var(--twin-blue-hover);
  background: var(--twin-blue-hover);
  color: #fff;
}
.management-tab-panel {
  display: grid;
  gap: 1rem;
}
.management-tab-panel[hidden] {
  display: none !important;
}
#customerProjectDialog .management-list {
  margin-top: 0;
}
@media (max-width: 720px) {
  .management-tabs {
    display: grid;
  }
  .management-tab {
    width: 100% !important;
    border-radius: .75rem;
    border-bottom-color: #cbd5e1;
  }
}

@media (forced-colors: active) {
  #identityManagementDialog .management-tab[aria-selected="true"] {
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
    forced-color-adjust: none;
  }
  #procedureCatalogDialog .management-tab[aria-selected="true"] {
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
    forced-color-adjust: none;
  }
}

#customerProjectDialog .upload-options {
  gap: 1rem;
}
#customerProjectDialog .upload-option {
  display: grid;
  gap: .65rem;
  padding: .9rem;
  border: 2px solid #cbd5e1;
  border-radius: .9rem;
  background: #fff;
}
#customerProjectDialog .upload-option h4 {
  margin: 0;
  color: #10213f;
  font-size: 1.05rem;
}
#customerProjectDialog .upload-option .field-help {
  margin: 0;
}
#customerProjectDialog #uploadBikBitvPair {
  margin-top: .25rem;
}

/* Kunden/Projekte-Dialog: Formularaktionen bleiben direkt bei den Feldern.
   Keine künstliche vertikale Streckung zwischen Eingaben und Schaltflächen. */
#customerProjectDialog .management-card > button,
#customerProjectDialog .management-card > .file-button,
#customerProjectDialog .management-card .upload-option > button,
#customerProjectDialog .management-card .upload-option > .file-button {
  align-self: start;
  margin-top: 0;
}
#customerProjectDialog .management-flow {
  align-items: start;
}

/* Tester-Dialog: Controls bleiben immer innerhalb ihrer Karten und umbrechen responsiv. */
#testerDialog {
  width: min(96vw, 86rem);
  max-width: 86rem;
  max-height: 90vh;
  overflow: auto;
  padding: 0;
}
#testerDialog .dialog-form {
  width: 100%;
  min-width: 0;
  padding: clamp(1rem, 2.5vw, 1.5rem);
  box-sizing: border-box;
}
#testerDialog .section-heading,
#testerDialog .form-note,
#testerDialog .tester-management-flow,
#testerDialog .management-card,
#testerDialog .management-list,
#testerDialog label,
#testerDialog input,
#testerDialog select,
#testerDialog button {
  min-width: 0;
  max-width: 100%;
  box-sizing: border-box;
}
#testerDialog .tester-management-flow {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: clamp(.75rem, 2vw, 1.25rem);
  align-items: start;
}
#testerDialog .management-card,
#testerDialog .management-list {
  width: 100%;
  overflow: hidden;
  padding: clamp(.85rem, 2vw, 1.15rem);
  align-content: start;
}
#testerDialog .management-card h3,
#testerDialog .management-list h3 {
  margin: 0;
  line-height: 1.2;
  overflow-wrap: anywhere;
}
#testerDialog label {
  display: grid;
  gap: .4rem;
  margin: 0;
}
#testerDialog input,
#testerDialog select,
#testerDialog .management-card > button {
  width: 100%;
  min-width: 0;
}
#testerDialog input,
#testerDialog select {
  min-height: 3rem;
  padding: .7rem .8rem;
}
#testerDialog .management-card > button {
  min-height: var(--action-button-min-height);
  white-space: normal;
  overflow-wrap: anywhere;
}
#testerDialog .tester-list-card > div {
  min-width: 0;
  align-items: flex-start;
}
#testerDialog .tester-identity {
  display: grid;
  gap: .15rem;
  min-width: 0;
}
#testerDialog .tester-identity strong,
#testerDialog .tester-identity span {
  display: block;
}
#testerDialog .tester-identity span {
  color: var(--muted);
  font-weight: 700;
}
#testerDialog .tester-list-card li {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
}
#testerDialog .tester-list-card li button {
  width: auto;
  min-height: 2.25rem;
  padding: .45rem .65rem;
  font-size: .9rem;
  white-space: normal;
}
#testerDialog .tester-list-card strong,
#testerDialog .tester-list-card span,
#testerDialog .tester-list-card li {
  min-width: 0;
  overflow-wrap: anywhere;
}
#testerDialog .dialog-actions button {
  width: auto;
  min-width: min(100%, 10rem);
}
@media (max-width: 1180px) {
  #testerDialog .tester-management-flow {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  #testerDialog .management-list {
    grid-column: 1 / -1;
  }
}
@media (max-width: 720px) {
  #testerDialog {
    width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
  }
  #testerDialog .dialog-form {
    padding: 1rem;
  }
  #testerDialog .tester-management-flow {
    grid-template-columns: 1fr;
  }
  #testerDialog .management-list {
    grid-column: auto;
  }
  #testerDialog .tester-list-card > div,
  #testerDialog .tester-list-card li {
    grid-template-columns: 1fr;
  }
  #testerDialog .tester-list-card li button {
    width: 100%;
  }
}

/* Abschließende Reflow-Regeln stehen bewusst am Dateiende, damit ältere
   Varianten bei schmalen Viewports keine festen Breiten zurückbringen. */
.issue-filter-region {
  position: relative;
}

.filter-panel[open] {
  display: block;
}

.filter-panel[open] > summary.filter-summary {
  min-width: 0;
}

.filter-panel[open] > .filter-reset {
  position: absolute;
  top: 1.125rem;
  right: 1.25rem;
  width: auto;
  max-width: calc(100% - 2.5rem);
  margin: 0;
}

.filter-panel[open] + .filter-reset-collapsed {
  display: none;
}

.filter-reset-collapsed {
  position: absolute;
  top: 2.125rem;
  right: 1.25rem;
  width: auto;
  max-width: calc(100% - 2.5rem);
  margin: 0;
}

.filter-content {
  display: block;
  width: 100%;
  min-width: 0;
  padding-top: .75rem;
}

.filter-reset {
  justify-self: end;
  min-width: 0;
  min-height: var(--action-button-min-height);
  padding: var(--action-button-padding-block) var(--action-button-padding-inline);
  margin: 0;
  font-size: .92rem;
  line-height: 1.2;
}

.filters {
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 16rem), 1fr)) !important;
  gap: 1rem !important;
  width: 100%;
  min-width: 0;
}

.filter-search,
.filter-priority,
.filter-status,
.filter-comments,
.filter-step,
.filter-page {
  grid-column: auto;
  grid-row: auto;
  min-width: 0;
}

.filters input,
.filters select {
  width: 100%;
  min-width: 0;
  max-width: 100%;
}

@media (max-width: 900px) {
  .page-toolbar {
    display: grid !important;
    grid-template-columns: 1fr !important;
    align-items: stretch;
  }

  .project-summary-card {
    grid-row: 1;
    width: 100%;
    max-width: none;
  }

  .page-toolbar .view-tabs {
    grid-row: 2;
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }

  .page-toolbar .view-tabs > * {
    width: 100%;
    white-space: normal;
  }

  dialog,
  #customerProjectDialog,
  #testerDialog {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
  }
}

@media (max-width: 1100px) {
  .filter-panel[open] > .filter-content {
    padding-top: 1.25rem;
  }
}

@media (max-width: 760px) {
  .filter-panel.has-active-filters:not([open]) {
    padding-bottom: 4.75rem;
  }

  .filter-reset-collapsed {
    top: 5rem;
    right: auto;
    left: 1.25rem;
    max-width: calc(100% - 2.5rem);
  }

  .filter-panel[open] > .filter-reset {
    top: 4rem;
    right: auto;
    left: 1.25rem;
  }

  .filter-panel[open] > .filter-content {
    padding-top: 4.75rem;
  }
}

@media (max-width: 640px) {
  .page-toolbar .view-tabs,
  .cards,
  .filters {
    grid-template-columns: 1fr !important;
  }

  .filter-reset {
    width: fit-content;
    max-width: 100%;
    justify-self: start;
  }
}

/* Die sieben Spalten benötigen erheblich mehr Platz als eine typische
   Laptop- oder Zoom-Ansicht bietet. Deshalb beginnt der Kartenmodus früh. */
@media (max-width: 1800px) {

  .table-wrap { overflow: visible !important; }

  .table-wrap table,
  .table-wrap tbody,
  .table-wrap tr,
  .table-wrap td {
    display: block;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
  }

  .table-wrap table {
    min-width: 0 !important;
    table-layout: auto !important;
  }

  .table-wrap thead {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .table-wrap .issue-row {
    display: grid;
    grid-template-columns: repeat(2, minmax(0, 1fr));
    margin-bottom: 1rem;
    border: 2px solid var(--border);
    border-radius: .8rem;
    background: var(--surface);
    overflow: visible;
  }

  .table-wrap .issue-row td {
    display: grid;
    grid-template-columns: 1fr;
    gap: .4rem;
    width: 100% !important;
    min-width: 0 !important;
    max-width: 100% !important;
    padding: .8rem !important;
    border-bottom: 1px solid var(--border);
    overflow: visible;
  }

  .table-wrap .issue-row td:last-child { border-bottom: 0; }

  .table-wrap .issue-row .col-problem,
  .table-wrap .issue-row .col-comments,
  .table-wrap .issue-row .col-actions {
    grid-column: 1 / -1;
  }

  .table-wrap .issue-row td::before {
    content: attr(data-label);
    color: var(--muted);
    font-size: .8rem;
    font-weight: 900;
    letter-spacing: .04em;
    text-transform: uppercase;
  }

  .table-wrap .empty-table {
    display: block;
    width: 100% !important;
  }

  .col-comments .comment-scroll {
    min-height: 0 !important;
    max-height: none;
    overflow: visible;
  }

  .col-comments .comment-compose,
  .comment-edit-form {
    grid-template-columns: 1fr !important;
  }

  .col-comments button,
  .col-comments textarea,
  .col-priority select,
  .col-status select {
    width: 100% !important;
    max-width: none !important;
  }

  .col-comments .comment-actions .comment-icon-button {
    flex: 0 0 2.35rem;
    width: 2.35rem !important;
    min-width: 2.35rem !important;
    max-width: 2.35rem !important;
  }
}

@media (max-width: 900px) {
  .table-wrap .issue-row {
    grid-template-columns: minmax(0, 1fr);
  }

  .table-wrap .issue-row .col-problem,
  .table-wrap .issue-row .col-comments,
  .table-wrap .issue-row .col-actions {
    grid-column: auto;
  }
}

/* Problem-Erklärer: responsiver Dialog ohne horizontales Überlaufen. */
#issueExplanationDialog {
  width: min(52rem, calc(100vw - 2rem));
  max-width: min(52rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow: hidden;
}
.ai-explanation-dialog {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  padding: clamp(.75rem, 2.5vw, 1.25rem);
  overflow: hidden;
}
.ai-explanation-dialog .section-heading { min-width: 0; }
.ai-explanation-dialog .section-heading h2 {
  min-width: 0;
  overflow-wrap: anywhere;
  font-size: clamp(1.35rem, 4vw, 2rem);
}
.ai-explanation-dialog .section-heading > button {
  flex: 0 0 auto;
  width: auto;
}
.ai-explanation-dialog .form-note { overflow-wrap: anywhere; }
.ai-explanation-dialog-content {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  overflow: auto;
  overflow-wrap: anywhere;
  overscroll-behavior: contain;
  border-radius: .8rem;
}
.ai-explanation-dialog-content:focus-visible {
  outline: 4px solid #facc15;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #10213f;
}
.ai-explain-action {
  background: #4338ca;
  border-color: #a5b4fc;
  color: #fff;
}
.ai-explain-action:hover { background: #3730a3; }
.ai-explain-action:disabled:hover,
.ai-explain-action[aria-disabled="true"]:hover { background: #4338ca; }
.ai-explanation {
  display: grid;
  min-width: 0;
  max-width: 100%;
  gap: .85rem;
  margin: 0;
  padding: 1rem;
  border: 2px solid #6366f1;
  border-radius: .8rem;
  background: #eef2ff;
  color: var(--text);
  overflow-wrap: anywhere;
}
.ai-explanation pre { max-width: 100%; overflow: auto; }
.ai-explanation:focus-visible {
  outline: 4px solid #facc15;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #10213f;
}
.ai-explanation-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .5rem 1rem;
}
.ai-explanation h3,
.ai-explanation h4,
.ai-explanation p,
.ai-explanation ul { margin: 0; }
.ai-explanation h3 { font-size: 1.1rem; }
.ai-explanation h4 { margin-bottom: .35rem; font-size: 1rem; }
.ai-explanation ul { padding-left: 1.25rem; }
.ai-label {
  display: inline-block;
  border: 1px solid #818cf8;
  border-radius: 999px;
  padding: .2rem .55rem;
  background: #fff;
  color: #312e81;
  font-size: .8rem;
  font-weight: 900;
}
.ai-disclaimer {
  padding-top: .75rem;
  border-top: 1px solid #a5b4fc;
  color: #3730a3;
  font-size: .9rem;
  font-weight: 700;
}
.ai-explanation-loading,
.ai-explanation-empty,
.ai-explanation-error { gap: .25rem; }
.ai-explanation-empty {
  border-color: #b45309;
  background: #fffbeb;
  color: #78350f;
}
.ai-explanation-error {
  border-color: #be123c;
  background: #fff1f2;
  color: #881337;
}
.ai-explanation-error-hint { font-weight: 700; }
@media (max-width: 560px) {
  #issueExplanationDialog {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
    border-radius: .75rem;
  }
  .ai-explanation-dialog {
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
  }
  .ai-explanation-dialog .section-heading { align-items: flex-start; }
}

/* Interaktiver Lösungsassistent: geführter Phase-1-Ablauf. */
#solutionAssistantDialog {
  width: min(64rem, calc(100vw - 2rem));
  max-width: min(64rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow: hidden;
}
.solution-assistant-dialog {
  display: grid;
  grid-template-rows: auto auto minmax(0, 1fr) auto;
  width: 100%;
  min-width: 0;
  max-width: 100%;
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  padding: clamp(.75rem, 2.5vw, 1.25rem);
  overflow: hidden;
}
.solution-assistant-dialog .section-heading,
.solution-assistant-dialog .section-heading h2 { min-width: 0; }
.solution-assistant-dialog .section-heading h2 {
  overflow-wrap: anywhere;
  font-size: clamp(1.35rem, 4vw, 2rem);
}
.solution-assistant-dialog .section-heading > button {
  flex: 0 0 auto;
  width: auto;
}
#solutionAssistantDialog button:not(.icon-close-button) {
  min-height: 2.75rem;
  padding: .45rem .75rem;
  font-size: .875rem;
  line-height: 1.25;
}
#solutionAssistantRestartDialog button {
  min-height: 2.75rem;
  padding: .45rem .75rem;
  font-size: .875rem;
  line-height: 1.25;
}
#solutionAssistantRestartDialog .dialog-actions {
  align-items: center;
  justify-content: flex-end;
}
.solution-assistant-dialog-content {
  min-width: 0;
  min-height: 0;
  max-width: 100%;
  overflow: auto;
  overflow-wrap: anywhere;
  overscroll-behavior: contain;
  border-radius: .8rem;
}
.solution-assistant-dialog-content:focus-visible {
  outline: 4px solid #facc15;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #10213f;
}
.solution-assistant-form {
  display: grid;
  gap: 1rem;
  padding: 1rem;
  border: 2px solid #0f766e;
  border-radius: .8rem;
  background: #f0fdfa;
}
.solution-assistant-form fieldset {
  min-width: 0;
  margin: 0;
  padding: 0;
  border: 0;
}
.solution-assistant-form legend {
  margin-bottom: .35rem;
  color: #134e4a;
  font-size: 1.1rem;
  font-weight: 900;
}
.solution-context-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .85rem;
  margin-top: 1rem;
}
.solution-context-grid label {
  display: grid;
  gap: .35rem;
  min-width: 0;
  font-weight: 800;
}
.solution-context-grid select { width: 100%; min-width: 0; }
.solution-assistant-notice,
.solution-assistant-state,
.solution-limitations,
.solution-metrics-empty {
  display: grid;
  gap: .35rem;
  padding: .9rem 1rem;
  border: 1px solid #5eead4;
  border-radius: .7rem;
  background: #fff;
  color: #134e4a;
}
.solution-assistant-state {
  border-width: 2px;
  background: #f0fdfa;
}
.solution-assistant-state button { justify-self: start; margin-top: .5rem; }
.solution-assistant-error {
  border-color: #be123c;
  background: #fff1f2;
  color: #881337;
}
.solution-assistant-empty {
  border-color: #b45309;
  background: #fffbeb;
  color: #78350f;
}
.solution-assistant-action {
  border-color: #5eead4;
  background: #0f766e;
  color: #fff;
}
.solution-assistant-action:hover { background: #115e59; }
.solution-assistant-action:disabled:hover { background: #0f766e; }
.solution-result {
  display: grid;
  gap: 1rem;
  min-width: 0;
  padding: 1rem;
  border: 2px solid #0f766e;
  border-radius: .8rem;
  background: #f0fdfa;
}
.solution-result-heading {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem 1rem;
}
.solution-result-heading h3,
.solution-result-heading p,
.solution-section h3,
.solution-section h4,
.solution-section p,
.solution-feedback h3,
.solution-feedback p { margin: 0; }
.solution-result-heading h3 { font-size: 1.35rem; }
.solution-effort {
  border: 1px solid #0f766e;
  border-radius: 999px;
  padding: .3rem .65rem;
  background: #fff;
  color: #134e4a;
  font-size: .88rem;
  font-weight: 900;
}
.solution-section {
  display: grid;
  gap: .55rem;
  min-width: 0;
  padding: 1rem;
  border-radius: .7rem;
  background: #fff;
}
.solution-goal { border-left: .35rem solid #0f766e; }
.solution-summary { border-left: .35rem solid #0f766e; }
.solution-summary-part {
  display: grid;
  gap: .3rem;
}
.solution-summary-part + .solution-summary-part {
  padding-top: .65rem;
  border-top: 1px solid #d5e9e7;
}
.solution-summary-part p { margin: 0; }
.solution-checklist {
  counter-reset: solution-checklist-item;
  display: grid;
  gap: .6rem;
  margin: 0;
  padding-left: 0;
  list-style: none;
}
.solution-checklist li {
  counter-increment: solution-checklist-item;
  display: grid;
  grid-template-columns: minmax(2ch, auto) minmax(0, 1fr);
  align-items: start;
  gap: .65rem;
  min-width: 0;
}
.solution-checklist li::before {
  content: counter(solution-checklist-item) ".";
  padding-top: .25rem;
  line-height: 1.2;
  text-align: right;
}
.solution-checklist label {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  align-items: start;
  gap: .65rem;
  min-width: 0;
  cursor: pointer;
  font-weight: 400;
}
.solution-result :not(pre) > code {
  padding: .08rem .3rem;
  border: 1px solid var(--border);
  border-radius: .35rem;
  background: #f1f5f9;
  font-size: .95em;
  font-weight: 400;
}
.solution-checklist input {
  width: 1.2rem;
  min-width: 1.2rem;
  max-width: 1.2rem;
  height: 1.2rem;
  min-height: 1.2rem;
  max-height: 1.2rem;
  margin: .25rem 0 0;
  padding: 0;
}
.solution-checklist input:checked + span { text-decoration: line-through; text-decoration-thickness: 2px; }
.solution-code-example { min-width: 0; }
.solution-code-example + .solution-code-example { margin-top: .75rem; }
.solution-code-example pre {
  max-width: 100%;
  margin: .4rem 0 0;
  padding: 1rem;
  overflow: auto;
  border-radius: .55rem;
  background: #10213f;
  color: #fff;
  white-space: pre;
}
.solution-code-example pre:focus-visible {
  outline: 4px solid #facc15;
  outline-offset: 2px;
}
.solution-details {
  padding: .8rem 1rem;
  border: 1px solid #5eead4;
  border-radius: .7rem;
  background: #fff;
}
.solution-details summary { cursor: pointer; font-weight: 900; }
.solution-details ul { margin-bottom: 0; }
.solution-details-content {
  display: grid;
  gap: .85rem;
  padding-top: .8rem;
}
.solution-detail-group {
  display: grid;
  gap: .45rem;
  min-width: 0;
}
.solution-detail-group h4,
.solution-detail-group h5,
.solution-detail-group p,
.solution-detail-group ul { margin: 0; }
.solution-detail-group ul { padding-left: 1.25rem; }
.solution-limitations {
  border-color: #b45309;
  background: #fffbeb;
  color: #78350f;
}
.solution-progress-status {
  margin: 0;
  color: #166534;
  font-weight: 800;
}
.solution-progress-status:empty { display: none; }
.solution-progress-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem;
  border: 2px solid #be123c;
  border-radius: .55rem;
  background: #fff1f2;
  color: #881337;
}
.solution-follow-ups {
  display: block;
}
.solution-follow-ups[open] {
  display: grid;
  gap: .75rem;
  padding-top: 1rem;
  border-top: 1px solid #5eead4;
}
.solution-follow-ups h3,
.solution-follow-ups p { margin: 0; }
.solution-follow-up-history {
  display: grid;
  gap: .75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}
.solution-follow-up-history article {
  display: grid;
  gap: .65rem;
  padding: 1rem;
  border: 1px solid #5eead4;
  border-radius: .7rem;
  background: #fff;
}
.solution-follow-up-history article:focus-visible {
  outline: 4px solid #facc15;
  outline-offset: 3px;
}
.solution-follow-up-question,
.solution-follow-up-answer { display: grid; gap: .35rem; }
.solution-follow-up-question { padding-left: .75rem; border-left: .3rem solid #0f766e; }
.solution-follow-up-date { color: var(--muted); font-size: .88rem; }
.solution-follow-up-empty { color: var(--muted); font-style: italic; }
.solution-follow-up-form { display: grid; gap: .45rem; }
.solution-follow-up-form label { font-weight: 900; }
.solution-follow-up-form textarea { width: 100%; min-width: 0; resize: vertical; }
.solution-follow-up-form button { justify-self: start; }
.solution-follow-ups .solution-feedback-error {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}
.solution-feedback {
  display: grid;
  gap: .6rem;
  padding-top: 1rem;
  border-top: 1px solid #5eead4;
}
.solution-feedback-reason {
  display: grid;
  gap: .45rem;
  padding: .8rem;
  border: 1px solid #5eead4;
  border-radius: .7rem;
  background: #fff;
}
.solution-feedback-reason label { display: grid; gap: .35rem; font-weight: 900; }
.solution-feedback-reason button { justify-self: end; }
.solution-feedback-status { color: #166534; font-weight: 800; }
.solution-feedback-error {
  margin: 0;
  padding: .75rem;
  border: 2px solid #be123c;
  border-radius: .55rem;
  background: #fff1f2;
  color: #881337;
  font-weight: 800;
}
.solution-feedback-error:focus-visible,
.solution-feedback-status:focus-visible {
  outline: 4px solid #facc15;
  outline-offset: 3px;
}

#solution-metrics-title:focus-visible {
  outline: 4px solid #facc15;
  outline-offset: 3px;
}
.solution-source {
  display: grid;
  gap: .35rem;
  padding: .85rem 1rem;
  border: 2px solid #64748b;
  border-radius: .7rem;
  background: #f8fafc;
  color: #334155;
}
.solution-source-metadata {
  display: flex;
  flex-wrap: wrap;
  gap: .25rem 1rem;
}
.solution-source-metadata > span { white-space: nowrap; }
.solution-source-knowledge-base { border-color: #15803d; background: #f0fdf4; color: #14532d; }
.solution-source-hybrid { border-color: #0369a1; background: #f0f9ff; color: #0c4a6e; }
.solution-source-external-ai { border-color: #b45309; background: #fffbeb; color: #78350f; }
.solution-source-unknown { border-color: #64748b; background: #f8fafc; color: #334155; }
.solution-metrics-panel { display: grid; gap: 1rem; }
.solution-metrics-panel .section-heading > div { min-width: 0; }
.solution-metrics-status:not(:empty) {
  padding: .75rem 1rem;
  border-radius: .65rem;
  background: #eef2ff;
  font-weight: 800;
}
.solution-metrics-status[role="alert"] { background: #fff1f2; color: #881337; }
.solution-metric-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(11rem, 1fr));
  gap: 1rem;
}
.solution-metric-cards article {
  display: grid;
  align-content: start;
  gap: .3rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid #a5b4fc;
  border-radius: .8rem;
  background: #fff;
}
.solution-metric-cards strong { color: #312e81; font-size: clamp(1.6rem, 4vw, 2.4rem); }
.solution-metric-cards span { font-weight: 900; }
.solution-metric-cards small { color: var(--muted); }
.ai-usage-panel { display: grid; gap: 1rem; width: min(100%, 100rem); margin-inline: auto; }
.ai-usage-panel .solution-metric-cards strong { overflow-wrap: anywhere; font-size: clamp(1.25rem, 1.8vw, 1.65rem); }
#ai-usage-title:focus-visible { outline: 4px solid #facc15; outline-offset: 3px; }
.ai-usage-filters {
  display: grid;
  grid-template-columns: repeat(5, minmax(9rem, 1fr));
  gap: .75rem;
  align-items: end;
}
.ai-usage-filters label { display: grid; gap: .35rem; min-width: 0; font-weight: 800; }
.ai-usage-filters input, .ai-usage-filters select { width: 100%; min-width: 0; min-height: 2.75rem; }
.ai-usage-filter-actions { display: flex; flex-wrap: wrap; gap: .5rem; grid-column: 1 / -1; }
.ai-usage-table { margin-top: 1rem; overflow-x: auto; }
.ai-usage-table table { width: 100%; min-width: 52rem; border-collapse: collapse; }
.ai-usage-table th, .ai-usage-table td { padding: .65rem .75rem; text-align: start; border-bottom: 1px solid var(--border); }
.ai-usage-table th:not(:first-child), .ai-usage-table td:not(:first-child) { text-align: end; }
.ai-usage-warning { padding: .75rem 1rem; border-left: .35rem solid #b45309; background: #fffbeb; color: #78350f; }
@media (max-width: 1100px) { .ai-usage-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); } }
@media (max-width: 600px) { .ai-usage-filters { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .ai-usage-table table { min-width: 0; }
  .ai-usage-table tbody th { display: block; padding: .3rem 0; border: 0; text-align: start; font-size: 1.05rem; }
  .ai-usage-table td:not(:first-child) { text-align: start; }
}
.knowledge-base-panel {
  display: grid;
  width: min(100%, 100rem);
  margin-inline: auto;
  gap: 1rem;
}
.knowledge-base-panel .section-heading > div { min-width: 0; }
#knowledge-base-title:focus-visible {
  outline: 4px solid #facc15;
  outline-offset: 3px;
}
.knowledge-base-filters {
  display: grid;
  grid-template-columns: minmax(12rem, 1.35fr) repeat(2, minmax(10rem, 1fr)) auto;
  gap: .65rem;
  align-items: end;
}
.knowledge-base-filters label {
  display: grid;
  gap: .35rem;
  min-width: 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.knowledge-base-filters input,
.knowledge-base-filters select {
  width: 100%;
  min-width: 0;
  height: 2.75rem;
  min-height: 2.75rem;
  box-sizing: border-box;
}
.knowledge-base-filter-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
}
.knowledge-base-filter-status {
  grid-column: 1 / -1;
  margin: 0;
  font-weight: 400;
}
.knowledge-base-filter-status:empty { display: none; }
.knowledge-base-status:not(:empty) {
  padding: .75rem 1rem;
  border-radius: .65rem;
  background: #eef2ff;
  font-weight: 800;
}
.knowledge-base-status[role="alert"] { background: #fff1f2; color: #881337; }
.knowledge-entry-list { display: grid; gap: 1rem; }
.knowledge-entry-card {
  display: grid;
  gap: .9rem;
  min-width: 0;
  padding: 1rem;
  border: 1px solid #a5b4fc;
  border-radius: .85rem;
  background: #fff;
}
.knowledge-entry-card header { display: flex; flex-wrap: wrap; justify-content: space-between; gap: .75rem 1rem; }
.knowledge-entry-card h3,
.knowledge-entry-card h4,
.knowledge-entry-card p { margin: 0; }
.knowledge-entry-card section { display: grid; gap: .35rem; }
.knowledge-entry-card .knowledge-entry-section {
  gap: .65rem;
  padding: .9rem 1rem;
  border: 1px solid var(--border);
  border-radius: .65rem;
  background: #f8fafc;
}
.knowledge-entry-card .knowledge-entry-solution { background: #fff; }
.knowledge-entry-card .markdown-content p { margin-block: 0 .65rem; }
.knowledge-entry-card .markdown-content p:last-child { margin-block-end: 0; }
.knowledge-entry-problem > :is(p, ul, ol, blockquote),
.knowledge-solution-content > :is(p, ul, ol, blockquote),
.knowledge-solution-introduction,
.knowledge-entry-details > :is(p, ul, ol, blockquote),
.knowledge-entry-card > p {
  max-inline-size: 75ch;
}
.knowledge-solution-content {
  display: grid;
  gap: .85rem;
}
.knowledge-solution-introduction {
  padding-block-end: .25rem;
}
.knowledge-entry-card .knowledge-solution-example {
  max-inline-size: 90ch;
  gap: .55rem;
  padding: .85rem 1rem;
  border: 1px solid currentColor;
  border-inline-start-width: .35rem;
  border-radius: .55rem;
}
.knowledge-entry-section pre,
.knowledge-entry-details pre {
  inline-size: max-content;
  min-inline-size: min(100%, 28rem);
  max-inline-size: 100%;
  overflow-x: auto;
}
.knowledge-solution-example h5 {
  margin: 0;
  color: inherit;
  font-size: 1rem;
  line-height: 1.35;
}
.knowledge-solution-example-incorrect {
  background: #fff1f2;
  color: #881337;
}
.knowledge-solution-example-correct {
  background: #f0fdf4;
  color: #14532d;
}
.knowledge-solution-example pre { color: #f8fafc; }
.knowledge-entry-card details { padding: .65rem .8rem; border: 1px solid var(--border); border-radius: .6rem; }
.knowledge-entry-card summary { cursor: pointer; font-weight: 900; }
.knowledge-entry-card footer { color: var(--muted); font-size: .88rem; }
.knowledge-tags { display: flex; flex-wrap: wrap; gap: .4rem; }
.knowledge-tags span,
.knowledge-status {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-height: 2rem;
  border-radius: 999px;
  padding: .25rem .6rem;
  font-size: .85rem;
  font-weight: 900;
  line-height: 1.2;
  text-align: center;
}
.knowledge-tags span { border: 1px solid #6366f1; background: #eef2ff; color: #312e81; }
.knowledge-status-approved { background: #dcfce7; color: #166534; }
.knowledge-status-draft { background: #fef3c7; color: #92400e; }
.knowledge-status-retired { background: #e2e8f0; color: #475569; }
.knowledge-base-empty {
  display: grid;
  gap: .35rem;
  padding: 1rem;
  border: 1px solid #a5b4fc;
  border-radius: .8rem;
  background: #f8fafc;
}
.knowledge-base-loading {
  min-height: 10rem;
  border-radius: .8rem;
  background: linear-gradient(90deg, #eef2ff 25%, #fff 50%, #eef2ff 75%);
  background-size: 200% 100%;
  animation: solution-metrics-loading 1.5s linear infinite;
}
.solution-metrics-loading {
  width: 100%;
  min-height: 8rem;
  border-radius: .8rem;
  background: linear-gradient(90deg, #eef2ff 25%, #fff 50%, #eef2ff 75%);
  background-size: 200% 100%;
  animation: solution-metrics-loading 1.5s linear infinite;
}
.knowledge-admin-panel {
  display: grid;
  gap: 1rem;
  min-width: 0;
}
.knowledge-admin-panel .section-heading > div,
.knowledge-admin-layout > section,
.knowledge-editor,
.knowledge-admin-card,
.knowledge-admin-card header > div { min-width: 0; }
#knowledge-admin-title:focus-visible,
#knowledge-editor-title:focus-visible,
#knowledge-publish-title:focus-visible,
#knowledge-import-title:focus-visible,
#knowledgeImportConflicts:focus-visible,
#knowledgeAdminStatus:focus-visible,
#knowledgeEditorStatus:focus-visible,
#knowledgePublishStatus:focus-visible,
#knowledgeImportStatus:focus-visible {
  outline: 4px solid #facc15;
  outline-offset: 3px;
}
.knowledge-admin-layout {
  display: grid;
  grid-template-columns: minmax(18rem, .8fr) minmax(0, 1.4fr);
  gap: 1.25rem;
  align-items: start;
}
.knowledge-admin-layout > section {
  display: grid;
  gap: .85rem;
  padding: 1rem;
  border: 1px solid #a5b4fc;
  border-radius: .85rem;
  background: #f8fafc;
}
.knowledge-admin-list-panel {
  container-name: knowledge-admin-list-panel;
  container-type: inline-size;
}
.knowledge-admin-layout h3,
.knowledge-admin-layout h4,
.knowledge-admin-layout p { margin-block: 0; }
.knowledge-admin-filters {
  display: grid;
  grid-template-columns: minmax(0, .75fr) minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: end;
}
.knowledge-admin-filters label {
  display: grid;
  gap: .35rem;
  min-width: 0;
  font-weight: 800;
  overflow-wrap: anywhere;
}
.knowledge-admin-filters input,
.knowledge-admin-filters select,
.knowledge-admin-filters button {
  width: 100%;
  min-width: 0;
  height: 2.75rem;
  min-height: 2.75rem;
  box-sizing: border-box;
}
.knowledge-admin-filters button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}
.knowledge-admin-status-field,
.knowledge-base-select-field { position: relative; }
.knowledge-admin-status-field select {
  appearance: none;
  padding: .5rem 2.5rem .5rem .8rem;
  border-color: #cfd5dd;
  border-radius: .625rem;
  background-color: var(--surface);
  color: var(--text);
  box-shadow: none;
  font-size: .95rem;
  font-weight: 400;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.knowledge-base-select-field select {
  appearance: none;
  padding: .5rem 2.5rem .5rem .8rem;
  border-color: #cfd5dd;
  border-radius: .625rem;
  background-color: var(--surface);
  color: var(--text);
  box-shadow: none;
  font-size: .95rem;
  font-weight: 400;
  line-height: 1.4;
  cursor: pointer;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}
.knowledge-admin-status-field::after {
  content: '';
  position: absolute;
  right: 1rem;
  bottom: 1.05rem;
  width: .55rem;
  height: .55rem;
  border-inline-end: 2px solid var(--twin-blue-dark);
  border-block-end: 2px solid var(--twin-blue-dark);
  pointer-events: none;
  transform: translateY(-25%) rotate(45deg);
}
.knowledge-base-select-field::after {
  content: '';
  position: absolute;
  right: 1rem;
  bottom: 1.05rem;
  width: .55rem;
  height: .55rem;
  border-inline-end: 2px solid var(--twin-blue-dark);
  border-block-end: 2px solid var(--twin-blue-dark);
  pointer-events: none;
  transform: translateY(-25%) rotate(45deg);
}
.knowledge-admin-status-field select:hover,
.knowledge-base-select-field select:hover {
  border-color: var(--twin-blue);
  background-color: #eef7fd;
}
.knowledge-admin-status-field select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-color: var(--twin-blue);
  box-shadow: 0 0 0 2px var(--twin-blue-dark);
}
.knowledge-base-select-field select:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-color: var(--twin-blue);
  box-shadow: 0 0 0 2px var(--twin-blue-dark);
}
.knowledge-admin-filter-actions {
  grid-column: auto;
  display: flex;
  width: auto;
  align-items: center;
  justify-content: flex-end;
  gap: .5rem;
}
.knowledge-admin-toolbar {
  align-items: stretch;
  justify-content: flex-end;
}

.knowledge-toolbar-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  min-height: var(--action-button-min-height);
  padding: var(--action-button-padding-block) var(--action-button-padding-inline);
  font-size: .9rem;
  line-height: 1.25;
}
.knowledge-toolbar-button svg {
  flex: 0 0 1.2rem;
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.knowledge-admin-scroll {
  max-height: clamp(44rem, 82vh, 60rem);
  max-height: clamp(44rem, 82dvh, 60rem);
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
  padding: .2rem .45rem .2rem .2rem;
  border-radius: .6rem;
}
.knowledge-admin-scroll:focus-visible {
  outline: 4px solid #facc15;
  outline-offset: 3px;
}
@media (min-width: 1001px) {
  .knowledge-admin-layout { align-items: stretch; }
  .knowledge-admin-list-panel {
    contain: size;
    grid-template-rows: auto auto minmax(0, 1fr) auto;
  }
  .knowledge-admin-scroll {
    align-self: stretch;
    min-height: 0;
    max-height: none;
  }
}
.knowledge-admin-list,
.knowledge-editor form,
.knowledge-editor-rows { display: grid; gap: 1rem; }
.knowledge-admin-card {
  display: grid;
  gap: .8rem;
  padding: 1rem;
  border: 1px solid #c7d2fe;
  border-radius: .75rem;
  background: #fff;
}
.knowledge-admin-card header {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(12rem, 24rem);
  align-items: start;
  gap: .75rem;
}
.knowledge-admin-card header > div { display: grid; gap: .25rem; }
.knowledge-admin-card code { overflow-wrap: anywhere; }
.knowledge-entry-state {
  display: flex;
  flex-direction: column;
  align-items: flex-end;
  justify-self: end;
  gap: .35rem;
  width: 100%;
  max-width: min(100%, 24rem);
  color: var(--muted);
  font-size: .85rem;
  font-weight: 800;
  text-align: end;
}
.knowledge-entry-state .knowledge-status { white-space: normal; }
.knowledge-version-status {
  width: fit-content;
  padding: .2rem .55rem;
  border-radius: .45rem;
  font-size: .82rem;
  font-weight: 900;
}
.knowledge-version-current { background: #dcfce7; color: #166534; }
.knowledge-version-draft { background: #fef3c7; color: #92400e; }
.knowledge-version-previous { background: #e0f2fe; color: #075985; }
.knowledge-version-archived { background: #e2e8f0; color: #334155; }
.required-label {
  display: inline-block;
  width: fit-content;
  margin-inline-start: .35rem;
  padding: .1rem .4rem;
  border: 1px solid #9f1239;
  border-radius: .35rem;
  background: #fff1f2;
  color: #881337;
  font-size: .72rem;
  font-weight: 900;
  line-height: 1.3;
  vertical-align: middle;
}

label:has(> .required-label),
label:has(> .optional-label) {
  display: flex;
  flex-flow: row wrap;
  align-items: center;
  justify-content: flex-start;
  gap: .35rem;
}

label:has(> .required-label) > .required-label,
label:has(> .optional-label) > .optional-label {
  margin-inline-start: 0;
}

label:has(> .required-label) > input,
label:has(> .required-label) > select,
label:has(> .required-label) > textarea,
label:has(> .required-label) > .field-error,
label:has(> .required-label) > .field-help,
label:has(> .optional-label) > input,
label:has(> .optional-label) > select,
label:has(> .optional-label) > textarea,
label:has(> .optional-label) > .field-error,
label:has(> .optional-label) > .field-help {
  flex: 1 0 100%;
}

.field-label-line {
  display: flex;
  align-items: center;
  gap: .35rem;
}

.knowledge-entry-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .45rem;
}
.knowledge-admin-action {
  width: auto;
  min-height: 2.2rem;
  padding: .35rem .6rem;
  font-size: .82rem;
  line-height: 1.2;
}
.knowledge-version-list {
  display: grid;
  gap: .75rem;
  margin: 0;
  padding-inline-start: 1.5rem;
}
.knowledge-version-list li {
  padding-block-start: .75rem;
  border-block-start: 1px solid var(--border);
}
.knowledge-versions {
  padding-block: .15rem;
  border-block: 1px solid var(--border);
}
.knowledge-versions summary {
  padding-block: .55rem;
  cursor: pointer;
  font-weight: 900;
}
.knowledge-versions[open] > summary { margin-block-end: .35rem; }
.knowledge-version-row {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: end;
  gap: 1rem;
}
.knowledge-version-details { display: grid; gap: .25rem; min-width: 0; }
.knowledge-version-row .knowledge-entry-actions { justify-content: flex-end; }
.knowledge-version-primary-action {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  width: auto;
  min-height: 2.75rem;
  padding: .45rem .75rem;
  font-size: .9rem;
  line-height: 1.2;
}
.knowledge-version-primary-action svg {
  flex: 0 0 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.knowledge-version-preview {
  margin-block-start: .75rem;
  padding: .125rem .5rem;
  border: 1px solid var(--border);
  border-radius: .6rem;
  background: var(--surface);
}
.knowledge-version-preview > summary {
  display: flex;
  align-items: center;
  gap: .4rem;
  box-sizing: border-box;
  min-height: 2rem;
  padding-block: .1rem;
  cursor: pointer;
  font-size: .95rem;
  font-weight: 900;
  line-height: 1.2;
  list-style: none;
}
.knowledge-version-preview > summary::-webkit-details-marker {
  display: none;
}
.knowledge-version-preview > summary::before {
  content: '';
  flex: 0 0 auto;
  width: 0;
  height: 0;
  border-block: .32rem solid transparent;
  border-inline-start: .5rem solid currentColor;
  transition: transform .15s ease;
}
.knowledge-version-preview[open] > summary::before {
  transform: rotate(90deg);
}
.knowledge-version-preview[open] > summary { margin-block-end: .5rem; }
.knowledge-version-preview[open] > .knowledge-version-preview-content { padding: .25rem; }
.knowledge-version-preview-content { display: grid; gap: 1rem; }
.knowledge-version-preview-content section { display: grid; gap: .5rem; }
.knowledge-version-preview-content h5,
.knowledge-version-preview-content p { margin-block: 0; }
.knowledge-admin-card > p code,
.knowledge-version-preview-content :not(pre) > code,
.knowledge-publish-preview :not(pre) > code {
  padding: .08rem .3rem;
  border: 1px solid #b8c7d9;
  border-radius: .25rem;
  background: #edf3f8;
  color: #17324d;
  font-size: .92em;
  overflow-wrap: anywhere;
}
.knowledge-version-preview-content pre,
.knowledge-publish-preview pre {
  max-width: 100%;
  margin-block: .5rem 0;
  padding: .9rem 1rem;
  border: 1px solid #334155;
  border-inline-start: .35rem solid var(--twin-blue);
  border-radius: .45rem;
  background: #111827;
  color: #f8fafc;
  overflow-x: auto;
  line-height: 1.5;
  white-space: pre;
}
.knowledge-version-preview-content pre code,
.knowledge-publish-preview pre code {
  display: block;
  min-width: max-content;
  color: inherit;
  font: inherit;
}
.knowledge-version-preview-content pre:focus-visible,
.knowledge-publish-preview pre:focus-visible {
  outline: 4px solid #facc15;
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #10213f;
}

@media (prefers-reduced-motion: reduce) {
  .knowledge-version-preview > summary::before { transition: none; }
}
.knowledge-entry-management {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  padding: .75rem;
  border: 1px solid var(--border);
  border-radius: .6rem;
  background: #f8fafc;
}
.knowledge-entry-management-label {
  color: var(--muted);
  font-size: .85rem;
  font-weight: 800;
}
.knowledge-card-actions { justify-content: flex-end; }
.knowledge-current-version {
  width: fit-content;
  padding: .15rem .5rem;
  border-radius: 999px;
  background: #dcfce7;
  color: #166534;
  font-size: .8rem;
  font-weight: 900;
}
.knowledge-status-published { background: #dcfce7; color: #166534; }
.knowledge-status-archived { background: #e2e8f0; color: #334155; }
.knowledge-editor fieldset {
  min-width: 0;
  margin: 0;
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: .7rem;
}
.knowledge-editor legend { padding-inline: .35rem; font-weight: 900; }
.knowledge-editor input,
.knowledge-editor select,
.knowledge-editor textarea,
#knowledgePublishDialog textarea { width: 100%; min-width: 0; }
.knowledge-choice-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: .65rem 1rem;
}
.knowledge-choice-grid label {
  display: flex;
  align-items: center;
  gap: .55rem;
}
.knowledge-editor-disclosure {
  padding: 1rem;
  border: 1px solid var(--border);
  border-radius: .7rem;
  background: #fff;
}
.knowledge-editor-disclosure > summary {
  cursor: pointer;
  font-weight: 900;
}
.knowledge-editor-disclosure[open] > summary { margin-block-end: 1rem; }
.knowledge-editor-disclosure > .field-help { margin-block: 0 1rem; }
.knowledge-technology-groups {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 1rem;
}
.knowledge-technology-groups fieldset { background: #f8fafc; }
.knowledge-technology-groups fieldset:last-child { grid-column: 1 / -1; }
.knowledge-technology-groups fieldset > label { margin-block-start: 1rem; }
.knowledge-editor-row {
  display: grid;
  grid-template-columns: minmax(8rem, .8fr) minmax(7rem, .6fr) minmax(10rem, 1fr) auto;
  gap: .65rem;
  align-items: end;
  min-width: 0;
}
.knowledge-source-row { grid-template-columns: minmax(10rem, .8fr) minmax(14rem, 1.2fr) auto; }
.knowledge-editor-row > button:not(.management-icon-button) {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 13.5rem;
  min-width: 13.5rem;
  min-height: var(--action-button-min-height);
  justify-self: end;
}
.knowledge-editor-row > .management-icon-button {
  min-height: var(--action-button-min-height);
  justify-self: end;
}
.knowledge-editor-row > label > input,
.knowledge-editor-row > label > select {
  height: 3rem;
  min-height: 3rem;
}
.knowledge-row-toolbar {
  display: flex;
  justify-content: flex-end;
  margin-block-start: .85rem;
  padding-block-start: .85rem;
  border-block-start: 1px solid var(--border);
}
.knowledge-row-toolbar button:not(.management-icon-button) {
  width: 13.5rem;
  min-height: var(--action-button-min-height);
}
#knowledgePublishDialog {
  width: min(60rem, calc(100vw - 2rem));
  max-width: min(60rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  background: #fff;
}
#knowledgeImportDialog {
  width: min(42rem, calc(100vw - 2rem));
  max-width: min(42rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
}
#knowledgeImportDialog .dialog-form { display: grid; gap: 1rem; }
#knowledgeImportDialog .knowledge-import-actions { justify-content: flex-end; }
#knowledgeImportConflicts {
  padding: 1rem;
  border: 2px solid #b45309;
  border-radius: .7rem;
  background: #fffbeb;
}
#knowledgeImportConflicts ul { margin-block-end: 0; }
#knowledgeImportConflicts li { overflow-wrap: anywhere; }
#knowledgePublishDialog .dialog-card {
  display: grid;
  gap: 1rem;
  margin: 0;
  border: 0;
  border-radius: 0;
  background: #fff;
  box-shadow: none;
}
.knowledge-publish-preview {
  display: grid;
  gap: .75rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
}
.knowledge-publish-preview h3,
.knowledge-publish-preview h4,
.knowledge-publish-preview h5,
.knowledge-publish-preview p { margin-block: 0; }
.knowledge-publish-preview section,
.knowledge-publish-template > div { display: grid; gap: .5rem; }
#knowledgePublishPreviewContent {
  display: grid;
  min-width: 0;
}
.knowledge-publish-overview {
  display: grid;
  gap: .65rem;
  margin: 0;
}
.knowledge-publish-overview > div {
  display: grid;
  grid-template-columns: minmax(8rem, .35fr) minmax(0, 1fr);
  gap: .75rem;
}
.knowledge-publish-overview dt { font-weight: 900; }
.knowledge-publish-overview dd { margin: 0; overflow-wrap: anywhere; }
.knowledge-publish-preview pre {
  max-width: 100%;
  overflow-x: auto;
  white-space: pre;
}
.knowledge-publish-solution,
.knowledge-publish-sources,
.knowledge-publish-template,
.knowledge-publish-template-empty {
  margin-block: 1.25rem 0;
  padding-block-start: 1rem;
  border-block-start: 2px solid var(--border);
}
.knowledge-publish-solution > h4,
.knowledge-publish-sources > h4 {
  line-height: 1.35;
}
.knowledge-publish-sources ul {
  margin-block: 0;
  padding-inline-start: 1.5rem;
}
.knowledge-publish-template summary { cursor: pointer; font-weight: 900; }
.knowledge-publish-template[open] summary { margin-block-end: .75rem; }
.knowledge-publish-preview-error {
  display: grid;
  gap: .35rem;
  padding: .85rem;
  border: 2px solid #b91c1c;
  border-radius: .65rem;
  background: #fef2f2;
  color: #7f1d1d;
}

.report-revision-overview {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  min-height: 4.5rem;
  margin-block-start: .25rem;
  padding: .65rem .75rem;
}

.report-revision-overview::before {
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .55rem;
  background-color: #e9f3fb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e70b6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 4h8l3 3v13H8z'/%3E%3Cpath d='M16 4v4h4M11 12h5M11 16h5'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 1.35rem;
  content: "";
}

.report-revision-overview-copy {
  min-width: 0;
}

.report-revision-overview h2,
.report-revision-overview p {
  margin: 0;
}

.report-revision-overview h2 {
  color: var(--twin-blue-dark);
  font-size: 1rem;
  line-height: 1.35;
}

.report-revision-overview p {
  color: var(--muted);
  font-size: .85rem;
}

.page-results-actions > button,
.report-revision-overview > button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  inline-size: 14rem;
  max-inline-size: 100%;
  block-size: 2.75rem;
  padding: .5rem .8rem;
  font-size: .85rem;
  line-height: 1.2;
  text-align: center;
  white-space: nowrap;
}

.report-revision-content,
.revision-history-list { display: grid; gap: .75rem; }
.revision-history-item,
.revision-diff-item {
  border: 1px solid var(--border, #cbd5e1);
  border-radius: .75rem;
  padding: .85rem;
  background: var(--surface, #fff);
}
.revision-history-item p { margin: .25rem 0 0; }
#reportRevisionDialog {
  width: min(72rem, calc(100vw - 2rem));
  max-width: min(72rem, calc(100vw - 2rem));
  max-height: calc(100vh - 2rem);
  box-sizing: border-box;
  overflow-x: hidden;
  overflow-y: auto;
}
.report-revision-dialog {
  width: 100%;
  max-width: 100%;
  min-width: 0;
  box-sizing: border-box;
  overflow: visible;
}
.report-revision-content,
.report-revision-content section,
.revision-summary,
.revision-diff-groups,
.revision-diff-group,
.revision-diff-item { min-width: 0; max-width: 100%; box-sizing: border-box; }
.report-revision-content { overflow-wrap: anywhere; }
.revision-summary { display: grid; grid-template-columns: repeat(auto-fit, minmax(8rem, 1fr)); gap: .75rem; margin: 1rem 0; }
.revision-summary div { border: 1px solid var(--border, #cbd5e1); border-radius: .6rem; padding: .65rem; }
.revision-summary dt { font-weight: 700; }
.revision-summary dd { margin: .2rem 0 0; font-size: 1.35rem; font-weight: 800; }
.revision-coverage {
  display: grid;
  gap: .75rem;
  margin-block: 1rem;
}
.revision-coverage > * { margin-block: 0; }
.revision-coverage fieldset {
  display: grid;
  gap: .65rem;
  min-width: 0;
  margin: 0;
  padding: .85rem;
}
.revision-coverage legend {
  padding-inline: .25rem;
  font-weight: 800;
}
.revision-coverage label {
  display: grid;
  grid-template-columns: 1.125rem minmax(0, 1fr);
  align-items: start;
  gap: .65rem;
  cursor: pointer;
}
.revision-coverage input[type="radio"] {
  appearance: auto;
  inline-size: 1.125rem;
  block-size: 1.125rem;
  min-inline-size: 1.125rem;
  min-height: 0;
  margin: .15rem 0 0;
  padding: 0;
  border: 0;
  border-radius: 50%;
  background: transparent;
  accent-color: var(--primary);
  justify-self: start;
}
.revision-coverage label > span { min-width: 0; }
.revision-history-item { display: grid; grid-template-columns: minmax(0, 1fr); gap: 1rem; align-items: start; }
.revision-actions { display: flex; flex-wrap: wrap; gap: .75rem; justify-content: flex-start; width: 100%; margin-block-start: .25rem; }
.revision-actions button { flex: 0 0 15rem; min-height: var(--action-button-min-height); }
.revision-explanation {
  max-width: 72ch;
  padding: .85rem 1rem;
  border-inline-start: .35rem solid var(--accent, #1d4ed8);
  background: #f1f5f9;
}
.revision-explanation h4,
.revision-explanation p { margin: 0; }
.revision-explanation p + p { margin-block-start: .55rem; }
.revision-overlap-note { max-width: 72ch; }
.revision-diff-groups { display: grid; gap: .75rem; margin-block: 1rem; }
.revision-diff-group { border: 1px solid var(--border, #cbd5e1); border-radius: .75rem; background: var(--surface, #fff); }
.revision-diff-group > summary,
.revision-diff-item > summary {
  display: list-item;
  padding: .8rem 1rem;
  cursor: pointer;
  font-weight: 800;
}
.revision-diff-summary-content {
  display: inline-flex;
  justify-content: space-between;
  align-items: baseline;
  gap: 1rem;
  width: calc(100% - 1.75rem);
  margin-inline-start: .25rem;
  vertical-align: middle;
}
.revision-diff-count {
  flex: 0 0 auto;
  padding: .15rem .55rem;
  border-radius: 999px;
  background: #e2e8f0;
  font-size: .9em;
  font-weight: 700;
}
.revision-diff-item > summary > .revision-item-page { float: right; margin-left: 1rem; }
.revision-diff-group > p { max-width: 72ch; margin: 0; padding: 0 1rem .8rem; }
.revision-diff-list { display: grid; gap: .65rem; margin: 0; padding: 0 1rem 1rem; list-style: none; }
.revision-diff-item { padding: 0; overflow: clip; }
.revision-diff-item > summary { font-weight: 700; }
.revision-item-page { flex: 0 0 auto; font-weight: 500; }
.revision-item-details { padding: 0 1rem 1rem; }
.revision-item-details h5 { margin: .25rem 0; }
.revision-item-details p { margin: .25rem 0 0; }
.revision-conflict-fieldset { margin-block-start: .75rem; }
.revision-conflict-fieldset label { display: block; margin-block: .35rem; }
.revision-error-summary { border-inline-start: .35rem solid #b91c1c; padding: .75rem; }

@media (max-width: 800px) {
  .revision-summary { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .revision-history-item { grid-template-columns: 1fr; display: grid; }
  .revision-actions { justify-content: flex-start; }
  .revision-actions button { flex-basis: 100%; width: 100%; }
  .revision-diff-summary-content { align-items: flex-start; flex-direction: column; gap: .35rem; width: calc(100% - 1.5rem); }
  .revision-diff-item > summary > .revision-item-page { display: block; float: none; margin: .25rem 0 0; }
  .revision-item-page { flex-basis: auto; }
}

@media (prefers-reduced-motion: reduce) {
  .report-revision-dialog * { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; }
}
@keyframes solution-metrics-loading { to { background-position: -200% 0; } }
@media (prefers-reduced-motion: reduce) {
  .solution-metrics-loading,
  .knowledge-base-loading { animation: none; }
}
@container knowledge-admin-list-panel (max-width: 52rem) {
  .knowledge-admin-card header { grid-template-columns: minmax(0, 1fr); }
  .knowledge-entry-state {
    align-items: flex-end;
    justify-self: end;
    text-align: end;
  }
  .knowledge-version-row { grid-template-columns: minmax(0, 1fr); }
  .knowledge-version-row .knowledge-entry-actions { justify-content: flex-end; }
  .knowledge-entry-management { flex-wrap: wrap; }
}
@media (min-width: 1001px) and (max-width: 1800px) {
  .knowledge-admin-card header,
  .knowledge-version-row { grid-template-columns: minmax(0, 1fr); }
  .knowledge-entry-state,
  .knowledge-version-row .knowledge-entry-actions { justify-self: end; }
  .knowledge-entry-management { flex-wrap: wrap; }
}
@media (max-width: 1000px) {
  .knowledge-base-filters { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .knowledge-admin-layout { grid-template-columns: 1fr; }
}
@media (max-width: 640px) {
  #solutionAssistantDialog {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
    border-radius: .75rem;
  }
  .solution-assistant-dialog {
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
  }
  .solution-assistant-dialog .section-heading { align-items: flex-start; }
  .solution-context-grid { grid-template-columns: 1fr; }
  .solution-result,
  .solution-section,
  .solution-assistant-form { padding: .8rem; }
  .knowledge-base-filters { grid-template-columns: 1fr; }
  .knowledge-admin-filters { grid-template-columns: 1fr; }
  .knowledge-admin-search-field,
  .knowledge-admin-status-field,
  .knowledge-admin-filter-actions { grid-column: 1; }
  .knowledge-admin-scroll {
    max-height: none;
    overflow-y: visible;
    padding: 0;
    scrollbar-gutter: auto;
  }
  .knowledge-admin-panel .section-heading { display: grid; }
  .knowledge-admin-card header { grid-template-columns: minmax(0, 1fr); }
  .knowledge-entry-state {
    align-items: flex-end;
    justify-self: end;
    text-align: end;
  }
  .knowledge-version-row { grid-template-columns: 1fr; }
  .knowledge-version-row .knowledge-entry-actions,
  .knowledge-card-actions { justify-content: flex-end; }
  .knowledge-entry-management { align-items: flex-start; }
  .knowledge-choice-grid,
  .knowledge-technology-groups,
  .knowledge-editor-row,
  .knowledge-source-row { grid-template-columns: 1fr; }
  .knowledge-editor-row button:not(.management-icon-button),
  .knowledge-row-toolbar button:not(.management-icon-button),
  .knowledge-admin-panel .dialog-actions > button { width: 100%; }
  .knowledge-editor-row > button:not(.management-icon-button),
  .knowledge-row-toolbar button:not(.management-icon-button) { min-width: 0; }
  .knowledge-row-toolbar { justify-content: flex-end; }
  #knowledgePublishDialog {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
  }
  #knowledgeImportDialog {
    width: calc(100vw - 1rem);
    max-width: calc(100vw - 1rem);
    max-height: calc(100dvh - 1rem);
  }
  .knowledge-publish-overview > div { grid-template-columns: 1fr; gap: .2rem; }
}

/* Kompaktes Nutzer- und Systemmenü im Header */
.header-userbar {
  position: relative;
  width: auto;
  min-width: 0;
  justify-self: end;
  overflow: visible;
  z-index: 30;
}
.header-menu-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .45rem;
  width: auto;
  min-width: 6.5rem;
  min-height: 2.75rem;
  padding: .55rem .8rem;
  white-space: nowrap;
}
.header-menu-panel[hidden] {
  display: none !important;
}
.header-menu-panel {
  position: absolute !important;
  top: calc(100% + .5rem) !important;
  right: 0 !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) !important;
  align-items: stretch !important;
  gap: .85rem !important;
  width: min(22rem, calc(100vw - 2rem)) !important;
  min-width: 0 !important;
  padding: .9rem !important;
  box-sizing: border-box !important;
  border: 2px solid var(--twin-blue) !important;
  border-radius: .9rem !important;
  background: #eef7fd !important;
  color: var(--twin-blue-dark) !important;
  box-shadow: 0 .8rem 2rem rgba(16,47,85,.22) !important;
  z-index: 40 !important;
}
.header-menu-panel > .header-menu-panel-heading,
.header-menu-panel > .user-status-block,
.header-menu-panel > .language-control,
.header-menu-panel > .config-actions,
.header-menu-panel > .header-menu-actions,
.header-menu-panel > .header-menu-logout {
  grid-area: auto !important;
  grid-column: 1 / -1 !important;
  width: 100% !important;
  min-width: 0 !important;
  max-width: 100% !important;
  box-sizing: border-box !important;
}
.header-menu-panel > .config-actions {
  grid-template-columns: minmax(0, 1fr) !important;
  grid-template-areas: none !important;
}
.header-menu-panel .user-status-block {
  position: static !important;
  display: grid !important;
  grid-template-columns: 1fr !important;
  grid-template-areas: "user" "status" !important;
  grid-area: auto !important;
  gap: .65rem !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 0 !important;
  height: auto !important;
  margin: 0 !important;
  padding: 0 !important;
  order: 0 !important;
  align-self: stretch !important;
  justify-self: stretch !important;
  align-items: stretch !important;
  justify-items: stretch !important;
}
.header-menu-panel .system-status-row {
  grid-area: status !important;
  display: grid !important;
  grid-template-columns: minmax(0, 1fr) auto !important;
  gap: .5rem !important;
  width: 100% !important;
  min-width: 0 !important;
  align-items: stretch !important;
}
.header-menu-panel .system-status {
  display: flex !important;
  grid-template-columns: none !important;
  gap: .4rem !important;
  width: 100% !important;
  inline-size: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  max-inline-size: none !important;
  margin: 0 !important;
  padding: 0 !important;
  align-items: stretch !important;
  align-self: stretch !important;
  justify-items: stretch !important;
  justify-self: stretch !important;
}
.header-menu-panel .status-pill {
  display: flex !important;
  flex: 1 1 100% !important;
  width: 100% !important;
  inline-size: 100% !important;
  min-width: 0 !important;
  max-width: none !important;
  max-inline-size: none !important;
  min-height: 2.75rem !important;
  padding: .5rem .75rem !important;
  box-sizing: border-box !important;
  justify-content: center !important;
  gap: .65rem !important;
  font-family: inherit !important;
  font-size: .78rem !important;
  white-space: nowrap !important;
  border-radius: .55rem !important;
  background: var(--surface) !important;
  color: var(--twin-blue-dark) !important;
}
.header-menu-panel .status-label {
  min-width: 0 !important;
  overflow-wrap: anywhere !important;
  white-space: normal !important;
  text-align: center !important;
}
.header-menu-panel .user-chip {
  grid-area: user !important;
  display: flex !important;
  align-items: center !important;
  justify-content: space-between !important;
  gap: .5rem !important;
  width: 100% !important;
  max-width: none !important;
  min-height: 2.5rem !important;
  height: auto !important;
  padding: .7rem .75rem !important;
  border-color: #b8cfe3 !important;
  border-radius: .55rem !important;
  background: var(--surface) !important;
  color: var(--twin-blue-dark) !important;
  box-sizing: border-box !important;
  text-align: left !important;
  overflow-wrap: anywhere !important;
}
.current-user-identity {
  display: grid;
  flex: 1 1 auto;
  gap: .2rem;
  min-width: 0;
}
.current-user-primary {
  display: flex;
  align-items: baseline;
  justify-content: space-between;
  gap: .65rem;
  min-width: 0;
}
#currentUserLabel,
.current-user-email {
  min-width: 0;
  overflow-wrap: anywhere;
}
.current-user-role {
  flex: 0 0 auto;
  max-width: 48%;
  padding: .12rem .4rem;
  border: 1px solid currentColor;
  border-radius: .45rem;
  background: #eef7fd;
  font-size: .78rem;
  font-weight: 700;
  line-height: 1.25;
  text-align: center;
}
.current-user-email {
  color: #475569;
  font-size: .82rem;
  font-weight: 500;
}
.application-info-button {
  display: inline-grid !important;
  place-items: center !important;
  flex: 0 0 2.75rem !important;
  inline-size: 2.75rem !important;
  block-size: 2.75rem !important;
  min-width: 2.75rem !important;
  min-height: 2.75rem !important;
  max-width: 2.75rem !important;
  max-height: 2.75rem !important;
  margin: 0 !important;
  padding: 0 !important;
  border: 1px solid var(--twin-blue) !important;
  border-radius: .55rem !important;
  background: var(--surface) !important;
  color: var(--twin-blue) !important;
  font-size: .85rem !important;
  font-weight: 800 !important;
  line-height: 1 !important;
}
.application-info-button:hover {
  background: #e1f1fb !important;
  color: var(--twin-blue-dark) !important;
}
.application-info-button:focus-visible {
  outline: 3px solid #facc15 !important;
  outline-offset: 3px !important;
}
#applicationInfoDialog {
  width: min(34rem, calc(100% - 2rem));
  max-width: 34rem;
}
.application-info-dialog {
  width: 100%;
  max-width: none;
}
#applicationInfoDialog .dialog-actions {
  justify-content: flex-end;
}
.application-info-list {
  display: grid;
  gap: .7rem;
  margin: 0;
}
.application-info-list div {
  display: grid;
  grid-template-columns: minmax(7rem, .72fr) minmax(0, 1.28fr);
  gap: .75rem;
  align-items: start;
  min-width: 0;
}
.application-info-list dt {
  font-weight: 800;
  color: #334155;
}
.application-info-list dd {
  margin: 0;
  min-width: 0;
  overflow-wrap: anywhere;
}
@media (max-width: 520px) {
  .application-info-list div {
    grid-template-columns: 1fr;
    gap: .2rem;
  }
}
.language-control {
  display: grid;
  grid-template-columns: 1fr;
  gap: .35rem;
  width: 100%;
}
.language-control label {
  font-weight: 700;
}
.language-control select {
  width: 100%;
  min-height: 2.75rem;
}
.header-menu-actions {
  display: grid;
  grid-template-columns: 1fr;
  gap: .55rem;
  order: 1;
  width: 100%;
  min-width: 0;
  padding-top: .85rem;
  border-top: 1px solid var(--border);
}
.header-menu-actions button,
.header-menu-actions .logout-action,
#headerMenuPanel #exportJson {
  width: 100% !important;
  min-width: 0 !important;
  min-height: 2.75rem !important;
  height: auto !important;
  margin: 0 !important;
  white-space: normal !important;
}
.header-menu-actions button[aria-current="page"],
.header-menu-actions button[aria-current="page"]:hover {
  border-color: var(--twin-blue);
  background: var(--twin-blue);
  color: #fff;
}
/* Das überlagernde Smartphone-Menü bleibt innerhalb der Safe Area scrollbar. */
.header-menu-panel .config-actions { order: 0; }
.header-menu-logout { order: 2; }
@media (max-width: 520px) {
  body.header-menu-open { overflow: hidden; }
  .header-menu-panel {
    position: fixed !important;
    top: max(.5rem, env(safe-area-inset-top)) !important;
    right: max(.5rem, env(safe-area-inset-right)) !important;
    bottom: auto !important;
    left: max(.5rem, env(safe-area-inset-left)) !important;
    width: auto !important;
    height: auto !important;
    max-width: none !important;
    max-height: calc(100dvh - 1rem - env(safe-area-inset-top) - env(safe-area-inset-bottom)) !important;
    align-content: start !important;
    grid-auto-rows: max-content !important;
    overflow-x: hidden !important;
    overflow-y: auto !important;
    padding: .75rem !important;
  }
}

/* Persistenter Anwendungskopf */
.app-header {
  display: grid;
  grid-template-columns: minmax(48rem, 1.15fr) minmax(25rem, 1fr) auto;
  grid-template-areas: "brand actions user";
  align-items: center;
  gap: clamp(1.5rem, 3vw, 4rem);
  min-height: 9rem;
  padding: 1.15rem clamp(1.25rem, 2.4vw, 3rem);
  border-bottom: 3px solid #aeb6c1;
  background: #fff;
  color: var(--text);
}

.brand-block {
  grid-area: brand;
  display: grid;
  grid-template-columns: minmax(25rem, 30rem);
  align-items: center;
  gap: clamp(1.25rem, 2vw, 2.5rem);
  width: 100%;
  min-width: 0;
}

.company-logo {
  width: 100%;
  max-width: 30rem;
}

.company-logo img {
  display: block;
  width: 100%;
  height: auto;
  object-fit: contain;
}

.brand-block h1 {
  margin: 0;
  color: var(--text);
  font-size: clamp(1.45rem, 1.8vw, 2.15rem);
  line-height: 1.15;
  letter-spacing: 0;
  white-space: nowrap;
}

.header-actions {
  grid-area: actions;
  justify-self: stretch;
  width: 100%;
}

.app-header .header-actions > .action-group {
  width: 100%;
  min-height: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.context-actions {
  display: grid;
  grid-template-columns: repeat(2, minmax(12rem, 1fr));
  gap: .75rem;
  min-width: 0;
}

.context-actions .compact-label {
  display: grid;
  gap: .3rem;
  min-width: 0;
  color: var(--accent-dark);
  font-size: 1rem;
  font-weight: 800;
  line-height: 1.2;
}

.context-actions .compact-label select {
  width: 100%;
  height: 3.65rem;
  min-height: 3.65rem;
  margin: 0;
  padding: .7rem 2.75rem .7rem 1rem;
  border: 2px solid var(--accent);
  border-radius: .75rem;
  background-color: #fff;
  color: var(--text);
  font-size: 1rem;
  font-weight: 400;
}

.header-userbar {
  grid-area: user;
  align-self: center;
  padding-block-start: 1.5rem;
}

.header-menu-button {
  min-width: 8.5rem;
  min-height: 3.65rem;
  padding: .7rem 1rem;
  border: 2px solid var(--accent);
  border-radius: .75rem;
  background: #fff;
  color: var(--text);
  font-size: 1rem;
}

.header-menu-button:hover {
  background: #eff6ff;
  color: var(--accent-dark);
}

.header-menu-button:focus-visible,
.context-actions select:focus-visible {
  outline: 3px solid var(--accent-dark);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px #fff;
}

.header-menu-icon {
  width: 1.75rem;
  height: 1.75rem;
  fill: none;
  stroke: var(--accent);
  stroke-width: 2.75;
  stroke-linecap: square;
}

@media (max-width: 1400px) {
  .app-header {
    grid-template-columns: minmax(0, 1fr) auto;
    grid-template-areas:
      "brand user"
      "actions actions";
    gap: 1rem 2rem;
  }

  .header-userbar {
    padding-block-start: 0;
  }
}

@media (max-width: 760px) {
  .report-revision-overview {
    grid-template-columns: 2.5rem minmax(0, 1fr);
  }

  .report-revision-overview > button {
    grid-column: 2;
    justify-self: start;
    white-space: normal;
  }

  .app-header {
    min-height: 0;
    padding: 1rem;
  }

  .brand-block {
    grid-template-columns: minmax(8rem, 16rem);
  }

  .brand-block h1 {
    font-size: clamp(1.05rem, 4vw, 1.45rem);
    white-space: normal;
  }

  .context-actions {
    grid-template-columns: 1fr;
  }
}

@media (max-width: 520px) {
  .app-header {
    grid-template-columns: minmax(0, 1fr);
    grid-template-areas:
      "brand"
      "actions"
      "user";
  }

  .header-userbar,
  .header-menu-button {
    width: 100%;
    justify-self: stretch;
  }
}

/* TWIN CUBES CI: portal-wide visual system */
:root {
  --twin-blue: #1e70b6;
  --twin-blue-dark: #102f55;
  --twin-blue-hover: #175b95;
  --twin-green: #9ec419;
  --twin-gray: #78777b;
  --twin-black: #000000;
  --bg: #f4f6f8;
  --surface: #ffffff;
  --text: #17233a;
  --muted: #595d67;
  --border: #d5dbe3;
  --accent: var(--twin-blue);
  --accent-dark: var(--twin-blue-dark);
  --danger: #b42318;
  --warning: #9a6700;
  --success: #537000;
  --shadow: 0 .35rem 1.25rem rgba(16, 47, 85, .08);
  --focus: #f6c945;
  --card-radius: .75rem;
}

body {
  background: var(--bg);
  color: var(--text);
}

main {
  gap: 1.5rem;
  padding: 1.75rem clamp(1rem, 3vw, 3rem) 3rem;
}

h1,
h2,
h3,
h4,
legend {
  color: var(--twin-blue-dark);
  font-weight: 800;
}

h2 {
  margin-bottom: 1rem;
  line-height: 1.35;
}

.app-header {
  grid-template-columns: minmax(30rem, 1.15fr) minmax(25rem, .85fr) auto;
  gap: clamp(1.25rem, 2.5vw, 3rem);
  min-height: 5.25rem;
  padding: .55rem clamp(1.25rem, 2.4vw, 3rem);
  border-bottom: 3px solid #aeb6c1;
  box-shadow: 0 .2rem .75rem rgba(16, 47, 85, .05);
}

.brand-block {
  grid-template-columns: minmax(25rem, 30rem);
}

.company-logo {
  max-width: 30rem;
}

.context-actions {
  gap: 1rem;
}

.context-actions.project-only-context-mode #headerProjectLabel {
  grid-column: 2;
}

.a11y-combobox {
  position: relative;
  min-width: 0;
}

.a11y-combobox__control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto auto;
  gap: .75rem;
  align-items: center;
  width: 100%;
  min-height: 3.75rem;
  padding: .55rem .9rem;
  border: 1px solid var(--border);
  border-radius: .625rem;
  background: var(--surface);
  color: var(--twin-blue-dark);
  box-shadow: 0 .15rem .45rem rgba(16, 47, 85, .05);
  cursor: pointer;
  user-select: none;
  transition: border-color .15s ease, background-color .15s ease, box-shadow .15s ease;
}

.a11y-combobox--icon .a11y-combobox__control {
  grid-template-columns: 2rem minmax(0, 1fr) auto auto;
}

.a11y-combobox__control:hover,
.a11y-combobox.is-open .a11y-combobox__control {
  border-color: var(--twin-blue);
  background: #eef7fd;
}

.a11y-combobox__control:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  border-color: var(--twin-blue);
  box-shadow: 0 0 0 2px var(--twin-blue-dark);
}

.a11y-combobox__content {
  display: grid;
  gap: .1rem;
  min-width: 0;
}

.a11y-combobox__label {
  color: var(--twin-blue-dark);
  font-size: .875rem;
  font-weight: 750;
  line-height: 1.15;
}

.a11y-combobox__value {
  overflow: hidden;
  color: var(--text);
  font-size: 1rem;
  font-weight: 400;
  line-height: 1.4;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.a11y-combobox__icon {
  display: none;
  width: 1.65rem;
  height: 1.65rem;
  fill: none;
  stroke: var(--twin-blue-dark);
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.a11y-combobox--icon .a11y-combobox__icon {
  display: block;
}

.a11y-combobox__dot,
.a11y-combobox__option-dot {
  display: none;
  flex: 0 0 auto;
  width: .75rem;
  height: .75rem;
  border: 1px solid rgba(16, 47, 85, .28);
  border-radius: 50%;
}

.a11y-combobox--dot .a11y-combobox__dot:not([hidden]) {
  display: block;
  background: var(--combobox-selected-color);
}

.a11y-combobox--dot .a11y-combobox__option-dot {
  display: block;
  background: var(--combobox-option-color);
}

.a11y-combobox__chevron {
  width: .55rem;
  height: .55rem;
  border-inline-end: 2px solid var(--twin-blue-dark);
  border-block-end: 2px solid var(--twin-blue-dark);
  pointer-events: none;
  transform: translateY(-25%) rotate(45deg);
  transition: transform .15s ease;
}

.a11y-combobox.is-open .a11y-combobox__chevron {
  transform: translateY(25%) rotate(225deg);
}

.a11y-combobox__listbox {
  position: absolute;
  z-index: 1200;
  inset: calc(100% + .4rem) 0 auto;
  max-height: min(20rem, 45vh);
  overflow-y: auto;
  scrollbar-gutter: stable;
  padding: .35rem;
  border: 1px solid var(--twin-blue);
  border-radius: .65rem;
  background: var(--surface);
  box-shadow: 0 .9rem 2rem rgba(16, 47, 85, .2);
}

.a11y-combobox__option {
  display: flex;
  gap: .75rem;
  align-items: center;
  min-height: 2.75rem;
  padding: .6rem .75rem;
  border-radius: .45rem;
  color: var(--text);
  cursor: pointer;
}

.a11y-combobox__option-label {
  flex: 1 1 auto;
  min-width: 0;
}

.a11y-combobox__option-check {
  flex: 0 0 auto;
  margin-inline-start: auto;
  width: .45rem;
  height: .8rem;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
  opacity: 0;
  transform: rotate(45deg);
}

.a11y-combobox__option[data-selected] .a11y-combobox__option-check {
  opacity: 1;
}

.a11y-combobox__option[aria-selected="true"] {
  background: var(--twin-blue);
  color: #fff;
}

.a11y-combobox__option[aria-disabled="true"] {
  color: var(--muted);
  cursor: not-allowed;
  opacity: .65;
}

.a11y-combobox.is-disabled .a11y-combobox__control {
  border-color: #cbd0d6;
  background: #f1f3f5;
  color: var(--muted);
  cursor: not-allowed;
  opacity: .72;
}

.context-actions .a11y-combobox {
  width: 100%;
}

.header-userbar {
  padding-block-start: 0;
}

.header-menu-button {
  min-width: 7rem;
  min-height: 3rem;
  padding: .55rem 1rem;
  border: 1px solid var(--border);
  border-radius: .625rem;
  background: var(--surface);
  color: var(--twin-blue-dark);
  box-shadow: 0 .15rem .45rem rgba(16, 47, 85, .05);
}

.header-menu-button:hover {
  border-color: var(--twin-blue);
  background: #eef7fd;
}

.header-menu-icon {
  stroke: var(--twin-blue);
}

.page-toolbar {
  margin-block: 0;
  padding-block: .25rem;
}

.view-tabs {
  align-items: stretch;
  flex-wrap: wrap;
  gap: .25rem 1.25rem;
  overflow: visible;
  padding: .4rem .4rem .35rem;
  border-bottom: 1px solid var(--border);
}

.tab-button,
.tab-action-button {
  position: relative;
  flex: 0 0 auto;
  min-height: 2.75rem;
  padding: .65rem .85rem;
  border: 0;
  border-bottom: .25rem solid transparent;
  border-radius: .35rem .35rem 0 0;
  background: transparent;
  color: var(--twin-blue-dark);
  box-shadow: none;
  line-height: 1.35;
  white-space: nowrap;
}

.tab-button:hover,
.tab-action-button:hover {
  border-bottom-color: #94c1e5;
  background: #eef7fd;
  color: var(--twin-blue);
}

.tab-button.active,
.tab-button[aria-current="page"] {
  border-bottom-color: var(--twin-blue);
  background: transparent;
  color: var(--twin-blue);
  font-weight: 800;
}

.tab-button.active:hover,
.tab-button[aria-current="page"]:hover {
  background: #eef7fd;
}

.tab-action-button {
  margin-inline-start: 0;
}

.meta-card,
.panel,
.card,
.login-card,
.management-card,
.connection-status-card,
.customer-list-card {
  border: 1px solid #e1e5ea;
  border-radius: var(--card-radius);
  background: var(--surface);
  box-shadow: var(--shadow);
}

.panel,
.card,
.meta-card,
.management-card {
  padding: 1.5rem;
}

.project-summary-card {
  gap: .65rem;
  min-height: 3.75rem;
  padding: .8rem 1.25rem;
}

.project-summary-card::before {
  display: inline-grid;
  place-items: center;
  flex: 0 0 2.25rem;
  width: 2.25rem;
  height: 2.25rem;
  border-radius: .55rem;
  background: #e9f3fb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e70b6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M3 6.5h6l2 2h10v10H3z'/%3E%3Cpath d='M3 8.5v-3h6l2 3'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 1.4rem;
  content: "";
}

.project-summary-card .project-title {
  color: var(--twin-blue-dark);
  font-size: clamp(1.25rem, 1.8vw, 1.75rem);
  line-height: 1.25;
}

.info-grid {
  grid-template-columns: repeat(4, minmax(0, 1fr));
  gap: 0;
}

.info-grid div {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr);
  grid-template-rows: auto auto;
  column-gap: 1rem;
  align-items: center;
  min-height: 4.5rem;
  padding: .25rem 1.25rem;
  border: 0;
  border-inline-start: 1px solid var(--border);
  border-radius: 0;
  background: transparent;
  box-shadow: none;
}

.info-grid div:first-child {
  padding-inline-start: 0;
  border-inline-start: 0;
}

.info-grid div::before {
  grid-column: 1;
  grid-row: 1 / 3;
  width: 3rem;
  height: 3rem;
  border-radius: .65rem;
  background-color: #e9f3fb;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 1.75rem;
  content: "";
}

.info-grid div:nth-child(1)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e70b6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='4' y='5.5' width='16' height='14' rx='2'/%3E%3Cpath d='M8 3.5v4M16 3.5v4M4 9.5h16M8 13h.01M12 13h.01M16 13h.01M8 16.5h.01M12 16.5h.01M16 16.5h.01'/%3E%3C/svg%3E");
}

.info-grid div:nth-child(2)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e70b6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='7.5' r='3.5'/%3E%3Cpath d='M5.5 20v-2.5a6.5 6.5 0 0 1 13 0V20'/%3E%3C/svg%3E");
}

.info-grid div:nth-child(3)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e70b6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Crect x='3.5' y='4.5' width='17' height='12' rx='1.5'/%3E%3Cpath d='M9 20h6M12 16.5V20'/%3E%3C/svg%3E");
}

.info-grid div:nth-child(4)::before {
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e70b6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M8 5h-2v16h12V5h-2M9 3h6v4H9zM9 11h6M9 15h6M9 19h4'/%3E%3C/svg%3E");
}

.info-grid dt {
  grid-column: 2;
  color: var(--twin-blue-dark);
  font-size: inherit;
  line-height: 1.35;
}

.info-grid dd {
  grid-column: 2;
  margin-top: .1rem;
  line-height: 1.35;
  overflow-wrap: anywhere;
}

.project-type-card {
  display: grid;
  grid-template-columns: 3rem minmax(0, 1fr) auto;
  gap: 1rem;
  align-items: center;
  min-height: 6.25rem;
  padding: .75rem 1.5rem;
  overflow: hidden;
}

.project-type-icon {
  width: 3rem;
  height: 3rem;
  border-radius: .65rem;
  background-color: #f1f5f9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23475569' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8'/%3E%3Cpath d='M12 8v4M12 16h.01'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 1.75rem;
}

.project-type-copy {
  min-width: 0;
}

.project-type-card h2,
.project-type-card p {
  margin: 0;
}

.project-type-eyebrow {
  color: var(--muted);
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .04em;
  text-transform: uppercase;
}

.project-type-card h2 {
  margin-block-start: .1rem;
  color: var(--twin-blue-dark);
  font-size: 1.15rem;
  line-height: 1.3;
}

.project-type-card h2 + p {
  margin-block-start: .2rem;
  color: var(--text);
  font-size: .9rem;
}

.project-type-badge {
  border: 1px solid #94a3b8;
  border-radius: .35rem;
  padding: .3rem .55rem;
  color: #475569;
  background: #f8fafc;
  font-size: .78rem;
  font-weight: 800;
  letter-spacing: .03em;
  line-height: 1.2;
  white-space: nowrap;
}

.project-type-card[data-project-type="import"] .project-type-icon {
  background-color: #e9f3fb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e70b6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6z'/%3E%3Cpath d='M14 3v5h5M12 11v7M9 15l3 3 3-3'/%3E%3C/svg%3E");
}

.project-type-card[data-project-type="import"] .project-type-badge {
  border-color: #1e70b6;
  color: #155c98;
  background: #eef7fd;
}

.project-type-card[data-project-type="portal"] .project-type-icon {
  background-color: #eef9f1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2324784a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 19 6v5c0 4.7-2.8 8.1-7 10-4.2-1.9-7-5.3-7-10V6z'/%3E%3Cpath d='m9 12 2 2 4-4'/%3E%3C/svg%3E");
}

.project-type-card[data-project-type="portal"] .project-type-badge {
  border-color: #24784a;
  color: #1d633d;
  background: #f0f9f3;
}

@media (max-width: 1100px) {
  .info-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
    row-gap: 1rem;
  }

  .info-grid div:nth-child(odd) {
    padding-inline-start: 0;
    border-inline-start: 0;
  }
}

@media (max-width: 760px) {
  .project-type-card {
    grid-template-columns: 3rem minmax(0, 1fr);
    gap: .75rem;
  }

  .project-type-icon {
    background-size: 1.75rem;
  }

  .project-type-badge {
    grid-column: 2;
    justify-self: start;
  }

  .info-grid {
    grid-template-columns: 1fr;
    row-gap: 0;
  }

  .info-grid div,
  .info-grid div:nth-child(odd) {
    padding: 1rem 0;
    border-inline-start: 0;
    border-block-start: 1px solid var(--border);
  }

  .info-grid div:first-child {
    padding-block-start: .25rem;
    border-block-start: 0;
  }
}

.dashboard-next-step {
  display: grid;
  grid-template-columns: 3rem minmax(15rem, 1fr) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.5rem;
  border-color: #b9d7ef;
  background: #f2f8fd;
}

.dashboard-next-step-icon {
  width: 3rem;
  height: 3rem;
  border-radius: .65rem;
  background-color: #e9f3fb;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%231e70b6' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='7.5'/%3E%3Cpath d='m14.8 9.2-1.7 3.9-3.9 1.7 1.7-3.9z'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: 1.75rem;
}

.dashboard-next-step-copy {
  min-width: 0;
}

.dashboard-next-step-copy h2,
.dashboard-next-step-copy p {
  margin: 0;
}

.dashboard-next-step-copy h2 {
  font-size: 1.2rem;
}

.dashboard-next-step-copy p {
  margin-block-start: .2rem;
  color: var(--muted);
  font-size: .9rem;
}

.dashboard-next-step-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: flex-end;
  gap: .75rem;
}

.guided-action-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
  min-width: 11.75rem;
  min-height: 2.75rem;
  padding: .55rem .9rem;
  white-space: nowrap;
}

.dashboard-primary-action {
  border-color: #168542;
  background: #168542;
  color: #fff;
}

.dashboard-primary-action:hover {
  border-color: #116b35;
  background: #116b35;
}

.dashboard-action-button-icon {
  width: 1.4rem;
  height: 1.4rem;
  flex: 0 0 1.4rem;
  background: currentColor;
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m10 8 6 4-6 4z' fill='black'/%3E%3C/svg%3E");
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.guided-matrix-action .dashboard-action-button-icon,
[data-dashboard-action="matrix"] .dashboard-action-button-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Crect x='3' y='3' width='18' height='18' rx='1.5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M3 9h18M3 15h18M9 3v18M15 3v18' fill='none' stroke='black' stroke-width='2'/%3E%3C/svg%3E");
}

[data-dashboard-action="issues"] .dashboard-action-button-icon {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 22 21H2z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M12 9v5M12 17.5h.01' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

.action-icon-complete {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='m8 12 2.5 2.5L16.5 9' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.action-icon-reopen {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M20 7v5h-5M19 12a7 7 0 1 0-2 5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.action-icon-back {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m11 6-6 6 6 6M5 12h14' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.action-icon-next {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='m13 6 6 6-6 6M19 12H5' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.action-icon-next-open {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='8' cy='12' r='5' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M8 9.5v5M15 12h6m-3-3 3 3-3 3' fill='none' stroke='black' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.action-icon-save {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M5 3h11l3 3v15H5zM8 3v6h8V3M8 21v-7h8v7' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3C/svg%3E");
}

.action-icon-add {
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Ccircle cx='12' cy='12' r='9' fill='none' stroke='black' stroke-width='2'/%3E%3Cpath d='M12 8v8M8 12h8' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
}

@media (max-width: 1200px) {
  .dashboard-next-step {
    grid-template-columns: 3rem minmax(0, 1fr);
  }

  .dashboard-next-step-actions {
    grid-column: 2;
    justify-content: flex-start;
  }
}

@media (max-width: 760px) {
  .dashboard-next-step {
    grid-template-columns: 3rem minmax(0, 1fr);
    padding: 1rem;
  }

  .dashboard-next-step-actions {
    grid-column: 1 / -1;
  }

  .dashboard-next-step-actions .guided-action-button {
    flex: 1 1 11.75rem;
  }
}

.cards {
  grid-auto-rows: 1fr;
}

.card {
  position: relative;
  min-height: 7.25rem;
  align-content: center;
  padding-inline-start: 5.5rem;
}

.card::before {
  position: absolute;
  inset-inline-start: 1.5rem;
  top: 50%;
  display: grid;
  place-items: center;
  width: 3rem;
  height: 3rem;
  border-radius: .65rem;
  background-color: #e9f3fb;
  background-position: center;
  background-repeat: no-repeat;
  background-size: 1.75rem;
  content: "";
  transform: translateY(-50%);
}

.metric-card-progress::before {
  border-radius: 50%;
  background-color: transparent;
  background-image:
    radial-gradient(circle, #fff 0 51%, transparent 54% 68%, #fff 71%),
    conic-gradient(#168542 var(--metric-progress, 0%), #cde8d6 0);
  background-size: 3rem;
}

.metric-card-not-assessed::before {
  background-color: #f1f5f9;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%235f6673' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 3h8l4 4v14H6z'/%3E%3Cpath d='M14 3v5h5M9 12h6M9 16h6'/%3E%3C/svg%3E");
}

.metric-card-issues::before {
  background-color: #fdf0ef;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23c43b32' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M12 3 21 20H3z'/%3E%3Cpath d='M12 9v5M12 17h.01'/%3E%3C/svg%3E");
}

.metric-card-open::before {
  background-color: #fff7e8;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23d97800' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='M12 7v5l3.5 2'/%3E%3C/svg%3E");
}

.metric-card-done::before {
  background-color: #eef9f1;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%2324784a' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Ccircle cx='12' cy='12' r='8.5'/%3E%3Cpath d='m8 12 2.5 2.5L16 9'/%3E%3C/svg%3E");
}

.metric {
  color: var(--twin-blue-dark);
  font-size: 2rem;
  line-height: 1;
}

.card > .metric-label {
  color: var(--twin-blue-dark);
  font-size: .95rem;
  font-weight: 800;
}

.metric-progress-card .metric {
  font-size: 2rem;
}

.metric-progress-detail {
  color: var(--muted);
  font-size: .82rem;
  line-height: 1.35;
}

button,
.file-button {
  min-height: 2.75rem;
  border: 2px solid var(--twin-blue);
  border-radius: .55rem;
  background: var(--twin-blue);
  color: #fff;
}

button:hover,
.file-button:hover {
  border-color: var(--twin-blue-hover);
  background: var(--twin-blue-hover);
}

.secondary-action,
.file-button.secondary {
  border-color: var(--twin-blue);
  background: var(--surface);
  color: var(--twin-blue);
}

.secondary-action:hover,
.file-button.secondary:hover {
  border-color: var(--twin-blue);
  background: #e9f3fb;
  color: var(--twin-blue-dark);
}

.danger-action,
.secondary-action.danger {
  border-color: var(--danger);
  background: var(--surface);
  color: var(--danger);
}

.danger-action:hover,
.secondary-action.danger:hover {
  border-color: #8f1c14;
  background: #fff1f0;
  color: #8f1c14;
}

.success-action {
  border-color: var(--twin-green);
  background: var(--twin-green);
  color: #172000;
}

.success-action:hover {
  border-color: #86a815;
  background: #add329;
  color: #172000;
}

input,
select,
textarea {
  min-height: 2.875rem;
  border: 1px solid #b8c0ca;
  border-radius: .5rem;
  background: var(--surface);
}

textarea {
  min-height: 6rem;
}

label {
  color: var(--twin-blue-dark);
}

input:hover,
select:hover,
textarea:hover {
  border-color: var(--twin-gray);
}

button:focus-visible,
input:focus-visible,
select:focus-visible,
textarea:focus-visible,
.file-button:focus-visible,
summary:focus-visible,
.comment-scroll:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--twin-blue-dark);
}

.table-wrap {
  border: 1px solid var(--border);
  border-radius: .65rem;
  background: var(--surface);
}

table {
  background: var(--surface);
}

th,
td {
  border-bottom-color: #e2e6eb;
}

th {
  background: #f1f3f5;
  color: var(--twin-blue-dark);
}

tbody tr:hover {
  background: #f8fbfd;
}

.col-actions,
th:last-child {
  text-align: end;
}

.row-actions {
  margin-inline-start: auto;
}

.filter-panel {
  border-radius: var(--card-radius);
}

.filter-reset {
  border-color: var(--twin-blue);
  background: var(--surface);
  color: var(--twin-blue);
}

.filter-reset:hover {
  background: #e9f3fb;
  color: var(--twin-blue-dark);
}

dialog,
.dialog-card {
  border: 1px solid #d9dee5;
  border-radius: var(--card-radius);
  background: var(--surface);
  box-shadow: 0 1.25rem 3rem rgba(16, 47, 85, .22);
}

dialog::backdrop {
  background: rgba(16, 47, 85, .52);
}

.header-menu-panel {
  border-color: var(--twin-blue) !important;
  background: #eef7fd !important;
  color: var(--twin-blue-dark) !important;
}

.login-view {
  background: linear-gradient(145deg, #f7f9fb 0%, #e9f3fb 100%);
}

.login-card {
  border-top: .4rem solid var(--twin-blue);
}

.form-status.status-success,
.status-badge.status-active {
  border-color: var(--twin-green);
  background: #f5f9e8;
  color: #405600;
}

@media (max-width: 1400px) {
  .app-header {
    grid-template-columns: minmax(0, 1fr) auto;
  }

  .header-userbar {
    padding-block-start: 0;
  }
}

@media (max-width: 900px) {
  main {
    padding-inline: 1rem;
  }

  .page-toolbar .view-tabs {
    display: flex;
    grid-row: 2;
    flex-wrap: wrap;
    gap: .25rem .5rem;
    overflow: visible;
    width: 100%;
  }

  .page-toolbar .view-tabs > * {
    flex: 0 0 auto;
    width: auto;
    white-space: nowrap;
  }

  .page-toolbar .tab-action-button {
    margin-inline-start: 0;
  }
}

@media (max-width: 760px) {
  .app-header {
    min-height: 0;
  }

  .brand-block {
    grid-template-columns: minmax(0, 1fr);
    gap: .5rem;
  }

  .company-logo {
    max-width: min(23rem, 100%);
  }

  .context-actions.project-only-context-mode #headerProjectLabel {
    grid-column: 1;
  }

  .panel,
  .card,
  .meta-card,
  .management-card {
    padding: 1.25rem;
  }

  .card {
    padding-inline-start: 5rem;
  }
}

@media (max-width: 520px) {
  .page-toolbar .view-tabs {
    flex-direction: column;
    align-items: stretch;
    gap: .5rem;
    padding: .5rem;
    border-bottom: 0;
  }

  .page-toolbar .view-tabs > * {
    width: 100%;
    min-height: 3rem;
    padding: .65rem 1rem;
    border: 2px solid var(--twin-blue);
    border-radius: .65rem;
    background: var(--surface);
    color: var(--twin-blue);
    text-align: center;
    white-space: normal;
  }

  .page-toolbar .tab-button:hover {
    border-color: var(--twin-blue);
    background: #e9f3fb;
    color: var(--twin-blue-dark);
  }

  .page-toolbar .tab-button.active,
  .page-toolbar .tab-button[aria-current="page"] {
    border-color: var(--twin-blue);
    background: var(--twin-blue);
    color: #fff;
  }

  .page-toolbar .tab-button.active:hover,
  .page-toolbar .tab-button[aria-current="page"]:hover {
    border-color: var(--twin-blue-hover);
    background: var(--twin-blue-hover);
    color: #fff;
  }

  .page-toolbar .tab-action-button {
    margin-block-start: .25rem;
    border-color: var(--twin-green);
    background: var(--surface);
    color: #425b00;
  }

  .page-toolbar .tab-action-button:hover {
    border-color: var(--twin-green);
    background: var(--twin-green);
    color: #172000;
  }
}

@media (forced-colors: active) {
  .card::before,
  .project-summary-card::before,
  .report-revision-overview::before,
  .project-type-icon,
  .dashboard-next-step-icon,
  .info-grid div::before {
    border: 2px solid CanvasText;
    forced-color-adjust: auto;
  }

  .a11y-combobox__control,
  .a11y-combobox__listbox {
    border-color: CanvasText;
  }

  .a11y-combobox__control:focus-visible {
    outline-color: Highlight;
    box-shadow: none;
  }

  .a11y-combobox__icon {
    stroke: CanvasText;
  }

  .a11y-combobox__option[aria-selected="true"] {
    color: HighlightText;
  }
}

/* v29: Filter- und Problemtabelle nach TWIN-CUBES-Design */
.filter-field {
  display: flex;
  flex-direction: column;
  gap: .45rem;
  min-width: 0;
}

.filter-label {
  color: var(--twin-blue-dark);
  font-weight: 800;
}

.filter-search-control {
  position: relative;
  display: block;
}

.filter-search-control input {
  padding-inline-end: 3rem;
}

.filter-search-control svg {
  position: absolute;
  top: 50%;
  right: 1rem;
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: var(--twin-blue-dark);
  stroke-width: 2;
  stroke-linecap: round;
  pointer-events: none;
  transform: translateY(-50%);
}

.filter-reset,
.row-actions button {
  display: inline-flex;
  gap: .55rem;
  align-items: center;
  justify-content: center;
}

.filter-reset svg,
.row-actions button svg,
.external-check-step-link svg {
  flex: 0 0 auto;
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.a11y-combobox--compact .a11y-combobox__control {
  min-height: 3rem;
  padding: .55rem .8rem;
  border-color: #cfd5dd;
  box-shadow: none;
}

.a11y-combobox--compact .a11y-combobox__value {
  overflow: visible;
  font-size: .95rem;
  font-weight: 400;
  text-overflow: clip;
  white-space: normal;
}

.filters .a11y-combobox {
  width: 100%;
}

.issue-table-combobox .a11y-combobox__control {
  grid-template-columns: auto minmax(0, 1fr) auto;
  min-width: 0;
  max-width: 100%;
  min-height: 3rem;
}

.issue-table-combobox .a11y-combobox__value {
  overflow: hidden;
  min-width: 0;
  font-size: .875rem;
  overflow-wrap: normal;
  text-overflow: ellipsis;
  white-space: nowrap;
}

.issue-table-combobox .a11y-combobox__listbox {
  min-width: max(100%, 13rem);
}

.external-check-step-link {
  display: inline-flex;
  gap: .4rem;
  align-items: baseline;
}

.external-check-step-link svg {
  width: .95rem;
  height: .95rem;
  transform: translateY(.12rem);
}

.row-actions button {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  min-height: 2.5rem;
  padding: .45rem .65rem;
  white-space: normal;
  word-break: normal;
  overflow-wrap: anywhere;
}

.row-actions button span:not(.comment-new-indicator):not(.sr-only) {
  min-width: 0;
  overflow-wrap: anywhere;
  white-space: normal;
}

.col-actions .row-actions {
  width: 100%;
  min-width: 0;
  max-width: 100%;
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .55rem !important;
  margin-inline-start: 0;
}

.issue-compact-actions {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: flex-end;
  gap: .4rem;
  min-width: 0;
}

.row-actions .issue-compact-actions button {
  width: 2.75rem;
  min-width: 2.75rem;
  max-width: none;
  min-height: 2.75rem;
  padding: .35rem;
  overflow-wrap: normal;
}

.issue-compact-actions .comment-display-action {
  gap: .25rem;
}

.issue-compact-actions .comment-display-action.is-empty,
.issue-compact-actions .comment-display-action.is-empty:hover {
  border-color: #78777b;
  background: #f1f3f5;
  color: #5c5f64;
  opacity: 1;
}

.issue-compact-actions .comment-display-action:has(.comment-new-indicator) {
  width: auto;
}

.issue-compact-actions .comment-display-action > span:not(.comment-new-indicator):not(.sr-only),
.issue-compact-actions .issue-icon-action > span:not(.sr-only) {
  display: none;
}

.issue-compact-actions .comment-display-action[aria-expanded="true"],
.issue-compact-actions .comment-display-action[aria-expanded="true"]:hover {
  border-color: var(--twin-blue);
  background: var(--twin-blue);
  color: #fff;
}

.issue-compact-actions .comment-new-indicator {
  border: 0;
  background: var(--twin-blue-dark);
  color: #fff;
  padding: .15rem .45rem;
  line-height: 1.1;
}

.col-comments .comment-list:empty {
  display: none;
}

.col-comments .comment-list:empty + .comment-compose {
  margin-top: 0;
}

.col-comments .comment-compose .comment-submit-action {
  justify-self: end;
  width: auto !important;
  min-width: 0;
  min-height: 2.75rem;
  padding: .45rem .8rem;
  font-size: .9rem;
  white-space: nowrap;
}

@media (min-width: 1801px) {
  .table-wrap {
    overflow-x: visible;
  }

  .table-wrap table {
    width: 100%;
    min-width: 0 !important;
  }

  .table-wrap th:nth-child(2),
  .table-wrap td.col-step {
    width: 12rem !important;
  }

  .table-wrap th:nth-child(4),
  .table-wrap td.col-priority {
    width: 14.5rem !important;
  }

  .table-wrap th:nth-child(5),
  .table-wrap td.col-status {
    width: 18rem !important;
  }

  .table-wrap th:nth-child(6),
  .table-wrap td.col-comments {
    width: 18rem !important;
  }

  .table-wrap th:nth-child(7),
  .table-wrap td.col-actions {
    width: 18rem !important;
  }
}

.issues-table-footer {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding-top: 1.25rem;
}

.issue-page-size {
  display: flex;
  align-items: center;
  gap: .6rem;
  color: var(--text);
}

.a11y-combobox--page-size {
  width: 5rem;
}

#issuesView .a11y-combobox--page-size {
  width: 6.5rem;
}

#issuesView .a11y-combobox--page-size .a11y-combobox__control {
  grid-template-columns: minmax(3ch, 1fr) .75rem;
  gap: .5rem;
  padding-inline: .75rem;
}

.a11y-combobox--page-size .a11y-combobox__value {
  white-space: nowrap;
}

#issuesView .a11y-combobox--page-size .a11y-combobox__value {
  min-width: 3ch;
  text-align: center;
}

#issuesView .a11y-combobox--page-size .a11y-combobox__chevron {
  justify-self: end;
}

.a11y-combobox--page-size .a11y-combobox__listbox {
  min-width: 6.5rem;
}

.issue-pagination[hidden] {
  display: none;
}

.issue-pagination > div {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .45rem;
}

.issue-pagination button {
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: .4rem .65rem;
  border: 1px solid #cfd5dd;
  background: var(--surface);
  color: var(--twin-blue-dark);
  font-weight: 800;
}

.issue-pagination button:hover {
  border-color: var(--twin-blue);
  background: #e9f3fb;
  color: var(--twin-blue-dark);
}

.issue-pagination button.is-current {
  border-color: var(--twin-blue);
  background: var(--twin-blue);
  color: #fff;
}

.issue-pagination button:disabled {
  color: #8993a1;
  cursor: not-allowed;
  opacity: .65;
}

.issue-pagination-ellipsis {
  min-width: 1.5rem;
  text-align: center;
}

@media (max-width: 760px) {
  .issues-table-footer {
    align-items: stretch;
    flex-direction: column;
  }

  .issue-page-size,
  .issue-pagination > div {
    justify-content: center;
  }

  .issue-pagination > div {
    flex-wrap: wrap;
  }
}

@media (forced-colors: active) {
  .a11y-combobox__dot,
  .a11y-combobox__option-dot {
    border-color: CanvasText;
    forced-color-adjust: none;
  }

  .issue-pagination button.is-current {
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
  }
}
/* Portalprüfung und kombinierte Prüfergebnisse */
.result-tabs,
.section-actions,
.page-result-actions,
.workspace-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .75rem;
  align-items: center;
}

.result-tabs button[aria-selected="true"] {
  background: var(--color-primary, #243b80);
  color: #fff;
}

.test-workspace {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) minmax(22rem, 2fr) minmax(16rem, 1fr);
  gap: 1rem;
  align-items: start;
}

.workspace-steps,
.workspace-assessment,
.workspace-issues,
.matrix-summary,
.portal-progress {
  border: 1px solid var(--color-border, #c9cfdb);
  border-radius: .5rem;
  padding: 1rem;
  min-width: 0;
}

.workspace-steps label,
.workspace-mobile-selectors label,
.workspace-assessment fieldset > label {
  display: grid;
  gap: .35rem;
  margin-block: .65rem;
}

.workspace-search-control {
  position: relative;
  display: block;
}

.workspace-search-control input {
  width: 100%;
  padding-inline-start: 2.5rem;
}

.workspace-search-icon {
  position: absolute;
  z-index: 1;
  inset-inline-start: .75rem;
  top: 50%;
  width: 1.15rem;
  height: 1.15rem;
  color: var(--audit-navy, #17365f);
  pointer-events: none;
  transform: translateY(-50%);
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
}

.workspace-state-filter {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: stretch;
  width: 100%;
  max-width: 100%;
  margin-block: .65rem;
}

.workspace-state-combobox {
  min-width: 0;
  width: 100%;
}

.workspace-state-combobox .a11y-combobox__control {
  grid-template-columns: 1.15rem minmax(0, 1fr) auto;
  gap: .5rem;
  width: 100%;
  min-width: 10.5rem;
  min-height: 2.75rem;
  padding: .35rem .65rem;
  border-radius: .35rem;
  box-shadow: none;
}

.workspace-state-filter.has-selection .workspace-state-combobox .a11y-combobox__control {
  border-start-end-radius: 0;
  border-end-end-radius: 0;
}

.workspace-state-filter-icon {
  width: 1rem;
  height: 1rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.75;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace-state-filter-clear {
  display: grid;
  place-items: center;
  width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  margin-inline-start: -1px;
  border: 1px solid var(--border);
  border-radius: 0 .35rem .35rem 0;
  background: var(--surface);
  color: var(--twin-blue-dark);
  box-shadow: none;
  font-size: 1.25rem;
  line-height: 1;
}

.workspace-state-filter-clear:hover {
  border-color: var(--twin-blue);
  background: #eef7fd;
  color: var(--twin-blue-dark);
}

.workspace-state-filter-clear[hidden] {
  display: none;
}

.workspace-step-list {
  display: grid;
  gap: .2rem;
  max-height: 40rem;
  overflow: auto;
  padding: .5rem;
  scroll-padding: .5rem;
  scrollbar-gutter: stable;
}

.workspace-step-position {
  margin: .2rem 0 .55rem;
  padding-bottom: .55rem;
  border-bottom: 1px solid var(--audit-line, #d8dee8);
  color: #526173;
  font-size: .82rem;
  font-weight: 700;
}

.workspace-step-group {
  border-bottom: 1px solid var(--audit-line, #d8dee8);
}

.workspace-step-group > summary {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  min-height: 2.75rem;
  padding: .55rem .35rem;
  color: var(--audit-navy, #071d42);
  cursor: pointer;
  font-size: .85rem;
  font-weight: 800;
  list-style: none;
}

.workspace-step-group > summary::-webkit-details-marker {
  display: none;
}

.workspace-step-group > summary:hover {
  background: #f0f4f9;
  color: var(--audit-blue, #0057d9);
}

.workspace-step-group[open] > summary .matrix-group-chevron {
  transform: rotate(45deg);
}

.workspace-step-group-items {
  display: grid;
  gap: .1rem;
  padding: 0 0 .4rem;
}

.workspace-step-list button {
  display: grid;
  grid-template-columns: 1.3rem minmax(0, 1fr);
  gap: .1rem .45rem;
  align-items: center;
  min-height: 44px;
  padding: .45rem .35rem;
  text-align: left;
}

.workspace-step-status-icon {
  display: grid;
  place-items: center;
  width: 1.15rem;
  height: 1.15rem;
  border-radius: 50%;
  color: #fff;
  font-size: .75rem;
  font-weight: 900;
  line-height: 1;
}

.workspace-step-status-icon.status-completed {
  background: #147d3f;
}

.workspace-step-status-icon.status-in_progress {
  background: var(--audit-yellow);
  color: #332b00;
}

.workspace-step-status-icon.status-not_tested {
  background: #526173;
}

.workspace-step-label {
  min-width: 0;
}

.workspace-preview img {
  display: block;
  max-width: 100%;
  max-height: 28rem;
  object-fit: contain;
}

.workspace-assessment fieldset > label {
  grid-template-columns: 1.5rem 1fr;
  align-items: center;
  min-height: 44px;
  padding: .25rem .5rem;
  border: 1px solid var(--color-border, #c9cfdb);
  border-radius: .35rem;
}

.workspace-mobile-selectors,
.matrix-linear {
  display: none;
}

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

.matrix-table-wrap table {
  border-collapse: separate;
  border-spacing: 0;
  width: 100%;
}

.matrix-table-wrap th,
.matrix-table-wrap td {
  border: 1px solid var(--color-border, #c9cfdb);
  padding: .35rem;
  vertical-align: top;
}

.matrix-cell {
  display: grid;
  gap: .15rem;
  width: 100%;
  min-height: 64px;
  text-align: left;
  color: #111827;
}

.matrix-cell.state-fulfilled { background: #d7f3df; }
.matrix-cell.state-not_fulfilled { background: #ffe0e0; }
.matrix-cell.state-not_applicable,
.matrix-cell.state-not_in_scope { background: #e8ebf0; }
.matrix-cell.state-not_assessed { background: #fff2c2; }
.matrix-cell.state-no_report_statement { background: #e7e5ff; }

.origin-badge,
.status-badge {
  display: inline-block;
  padding: .15rem .5rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  font-size: .85em;
  font-weight: 700;
}

.origin-report_import { color: #3f2f78; }
.origin-portal_test { color: #075985; }
.origin-manual { color: #5f370e; }

.page-assessment-summary {
  display: grid;
  gap: .35rem;
}

.page-assessment-summary > div {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
}

.portal-progress progress {
  width: min(100%, 32rem);
}

@media (max-width: 900px) {
  .test-workspace {
    display: block;
  }

  .workspace-steps {
    display: none;
  }

  .workspace-mobile-selectors {
    display: grid;
    gap: .75rem;
  }

  .workspace-assessment,
  .workspace-issues {
    margin-block: 1rem;
  }

  .matrix-table-wrap {
    display: none;
  }

  .matrix-linear {
    display: grid;
    gap: .75rem;
  }

  .matrix-linear details,
  .matrix-linear-row {
    border: 1px solid var(--color-border, #c9cfdb);
    border-radius: .35rem;
    padding: .65rem;
  }

  .matrix-linear-row {
    display: grid;
    gap: .5rem;
    margin-block: .5rem;
  }
}

@media (max-width: 520px) {
  .result-tabs,
  .section-actions,
  .page-result-actions,
  .workspace-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .result-tabs button,
  .section-actions button,
  .page-result-actions button,
  .workspace-actions button {
    min-height: 44px;
    width: 100%;
  }
}

@media (prefers-reduced-motion: reduce) {
  .matrix-cell,
  .matrix-group-chevron,
  .workspace-step-list button {
    scroll-behavior: auto;
    transition: none;
  }
}

/* Referenzlayout für Seitenauswahl, Testprüfarbeitsplatz und Prüfmatrix */
.mobile-view-select {
  display: none;
}

.audit-page-selection,
.audit-workspace-view,
.audit-matrix-view,
.audit-report-view {
  --audit-blue: #0057d9;
  --audit-navy: #071d42;
  --audit-green: #08752d;
  --audit-red: #d20a0a;
  --audit-orange: #e86900;
  --audit-yellow: #f4c430;
  --audit-line: #c8d5e7;
  --audit-soft: #f7faff;
}

.results-overview {
  margin: 0;
  padding: 0;
  border: 0;
  background: transparent;
}

.results-navigation-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: .7rem 1.25rem;
  border: 1px solid #e1e5ea;
  border-radius: var(--card-radius);
  background: var(--surface);
}

.results-navigation-heading h2 {
  margin: 0;
  color: var(--twin-blue-dark);
}

.result-tabs {
  align-items: stretch;
  flex-wrap: wrap;
  gap: .35rem;
  padding: .35rem .5rem;
  border: 0;
  background: transparent;
}

.result-tabs button {
  position: relative;
  flex: 0 0 auto;
  min-height: 2.75rem;
  padding: .65rem 1rem .75rem;
  border: 1px solid #b8c5d6;
  border-radius: .55rem .55rem 0 0;
  background: #eef3f8;
  color: var(--twin-blue-dark);
  box-shadow: none;
  font: inherit;
  font-weight: 800;
  line-height: 1.35;
  white-space: nowrap;
}

.result-tabs button:hover {
  background: #dceaf5;
  color: var(--twin-blue);
}

.result-tabs button[aria-selected="true"] {
  border-color: var(--twin-blue);
  background: var(--twin-blue);
  color: #fff;
  font-weight: 800;
}

.result-tabs button[aria-selected="true"]:hover {
  background: var(--twin-blue-hover);
  color: #fff;
}

@media (forced-colors: active) {
  .result-tabs button[aria-selected="true"] {
    border-color: Highlight;
    background: Highlight;
    color: HighlightText;
    forced-color-adjust: none;
  }
}

.audit-report-view {
  display: grid;
  grid-template-columns: minmax(31rem, 34.5rem) minmax(0, 1fr);
  align-items: start;
  gap: 1rem;
}

.audit-report-controls,
.audit-report-preview {
  margin: 0;
}

.audit-report-preview .section-heading p {
  margin: .25rem 0 0;
  color: var(--muted);
}

.audit-report-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 24rem) auto;
  align-items: end;
  gap: .75rem;
  padding-block: 1rem;
}

.audit-report-toolbar-actions,
.audit-conclusion-choice-actions,
.audit-conclusion-actions {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem;
}

.audit-report-toolbar-actions {
  justify-content: end;
}

.audit-report-version-field {
  display: grid;
  gap: .35rem;
  min-width: 0;
}

.audit-report-version-field label {
  color: var(--twin-blue-dark);
  font-weight: 800;
}

.audit-report-version-field select {
  appearance: none;
  -webkit-appearance: none;
  width: 100%;
  min-height: 2.75rem;
  padding-inline-end: 3.35rem;
  background-image:
    linear-gradient(#b8c0ca, #b8c0ca),
    url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 20 20'%3E%3Cpath d='m5 7.5 5 5 5-5' fill='none' stroke='%2310213f' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position:
    calc(100% - 2.75rem) center,
    calc(100% - 1rem) center;
  background-repeat: no-repeat;
  background-size:
    1px calc(100% - .9rem),
    1.1rem 1.1rem;
}

@media (forced-colors: active) {
  .audit-report-version-field select {
    appearance: auto;
    -webkit-appearance: auto;
    padding-inline-end: .7rem;
    background-image: none;
  }
}

#createAuditReport,
#writeAuditConclusionManually,
#prepareAuditConclusion {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  min-width: 7.75rem;
}

#createAuditReport[aria-busy="true"]::before,
#prepareAuditConclusion[aria-busy="true"]::before {
  width: 1rem;
  height: 1rem;
  border: 2px solid currentColor;
  border-inline-end-color: transparent;
  border-radius: 50%;
  content: "";
}

#createAuditReport[aria-busy="true"]::before {
  animation: audit-report-busy 2.4s linear infinite;
}

#prepareAuditConclusion[aria-busy="true"]::before {
  animation: audit-report-busy .8s linear infinite;
}

.audit-conclusion-section {
  display: grid;
  gap: .8rem;
  margin-top: .5rem;
  padding: 1rem;
  border: 1px solid var(--audit-line);
  border-radius: .55rem;
  background: #f9fbfd;
}

.audit-conclusion-section[hidden] { display: none; }

.audit-conclusion-heading h3,
.audit-conclusion-heading p,
.audit-conclusion-section h4 {
  margin: 0;
}

#auditConclusionState {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  align-items: start;
  gap: .75rem;
  margin: 1rem 0 0;
  padding: .8rem .9rem;
  border: 1px solid #60a5fa;
  border-radius: .7rem;
  background: #eff6ff;
  color: #1e3a8a;
  font-weight: 700;
}

#auditConclusionState[hidden] {
  display: none;
}

.audit-conclusion-notice-icon {
  display: inline-grid;
  place-items: center;
  inline-size: 1.5rem;
  block-size: 1.5rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-weight: 900;
  line-height: 1;
}

.audit-conclusion-choice-actions {
  align-items: center;
}

.audit-conclusion-choice-actions,
.audit-conclusion-actions {
  justify-content: end;
}

.audit-report-generation {
  display: grid;
  gap: .5rem;
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--audit-line);
}

.audit-report-generation h3 {
  margin: 0;
}

.audit-report-archive {
  margin-top: 1.25rem;
  padding-top: 1.25rem;
  border-top: 2px solid var(--audit-line);
}

.audit-report-archive > summary {
  min-height: 2.75rem;
  color: var(--text);
  cursor: pointer;
  line-height: 1.35;
}

.audit-report-archive > summary h3 {
  display: inline;
  margin: 0;
  font-size: 1.25rem;
}

.audit-report-archive > summary::marker {
  color: var(--twin-blue-dark);
}

.audit-report-archive-content {
  display: grid;
  gap: .8rem;
  padding-top: .8rem;
}

.audit-report-archive-heading,
.audit-report-archive-item,
.audit-report-archive-actions {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
}

.audit-report-archive-heading {
  align-items: center;
  justify-content: space-between;
}

.audit-report-archive-heading p,
.audit-report-archive-item p {
  margin: 0;
}

.audit-report-archive-heading .field-help {
  min-width: 0;
}

.audit-report-archive-list {
  display: grid;
  gap: .75rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.audit-report-archive-item {
  flex-wrap: wrap;
  justify-content: space-between;
  padding: .9rem;
  border: 1px solid var(--audit-line);
  border-radius: .55rem;
  background: #f9fbfd;
}

.audit-report-archive-details {
  display: grid;
  flex: 1 1 17rem;
  gap: .25rem;
  min-width: 0;
}

.audit-report-archive-details strong,
.audit-report-archive-details span {
  overflow-wrap: anywhere;
}

.audit-report-archive-details span {
  color: var(--muted);
  font-size: .92rem;
}

.audit-report-archive-actions {
  flex: 0 1 auto;
  flex-wrap: wrap;
}

.audit-report-archive-actions .management-icon-button {
  flex: 0 0 2.75rem;
}

.audit-report-archive-pagination > div {
  flex-wrap: wrap;
}

.audit-report-archive-pagination button {
  width: auto;
  flex: 0 0 auto;
}

.audit-report-archive > summary:focus-visible,
.audit-report-archive-item:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
}

#auditConclusionEditor {
  display: grid;
  gap: .8rem;
}

#auditConclusionEditor[hidden] { display: none; }

.audit-conclusion-privacy-dialog {
  width: min(42rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
}

.audit-conclusion-privacy-dialog .dialog-form {
  gap: 1rem;
}

.audit-conclusion-privacy-dialog h2,
.audit-conclusion-privacy-dialog h3,
.audit-conclusion-privacy-dialog p {
  margin: 0;
}

.audit-conclusion-privacy-dialog section {
  display: grid;
  gap: .4rem;
}

.audit-conclusion-privacy-dialog ul {
  margin: 0;
  padding-inline-start: 1.35rem;
}

.audit-conclusion-privacy-dialog .dialog-actions {
  justify-content: flex-end;
}

#auditConclusionText {
  width: 100%;
  resize: vertical;
}

#auditConclusionText[readonly] {
  border-color: #cbd0d6;
  background-color: #f1f3f5;
  color: #475569;
  cursor: text;
  opacity: 1;
}

@keyframes audit-report-busy {
  to { transform: rotate(360deg); }
}

.audit-report-preview .section-heading {
  align-items: start;
}

.audit-report-preview-actions {
  display: flex;
  flex-wrap: wrap;
  justify-content: end;
  gap: .5rem;
}

.audit-report-preview-actions .guided-action-button {
  min-width: auto;
  min-inline-size: 2.75rem;
  padding-inline: .75rem;
}

.audit-report-action-icon {
  flex: 0 0 auto;
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.audit-report-link {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border: 2px solid var(--twin-blue);
  border-radius: .55rem;
  background: var(--surface);
  color: var(--twin-blue);
  font-weight: 800;
  text-decoration: none;
}

.audit-report-link:hover {
  background: #e9f3fb;
  color: var(--twin-blue-dark);
}

#auditReportAvailability:empty {
  display: none;
}

.audit-report-placeholder {
  display: grid;
  place-items: center;
  min-height: clamp(42rem, 72vh, 56rem);
  margin-block-start: 1rem;
  padding: 2rem;
  border: 2px dashed #a9bad2;
  border-radius: .45rem;
  background: #f7faff;
  color: var(--muted);
  text-align: center;
}

.audit-report-placeholder p {
  max-width: 28rem;
  margin: 0;
}

.audit-report-loading {
  display: grid;
  justify-items: center;
  max-width: 28rem;
}

.audit-report-loading[hidden] {
  display: none;
}

.audit-report-loading-spinner {
  width: 3rem;
  height: 3rem;
  margin-block-end: 1rem;
  border: .3rem solid #d8e3f0;
  border-block-start-color: var(--twin-blue);
  border-radius: 50%;
  animation: audit-report-busy 2.4s linear infinite;
}

.audit-report-loading-title {
  color: var(--twin-blue-dark);
  font-weight: 800;
}

.audit-report-placeholder .audit-report-loading-help {
  margin-block-start: .5rem;
  color: var(--muted);
}

.audit-report-preview iframe {
  display: block;
  width: 100%;
  min-height: clamp(42rem, 72vh, 56rem);
  margin-block-start: 1rem;
  border: 1px solid var(--border);
  border-radius: .45rem;
  background: #eef3f8;
}

@media (max-width: 1100px) {
  .audit-report-view {
    grid-template-columns: minmax(0, 1fr);
  }

  .audit-report-placeholder {
    min-height: 36rem;
  }

  .audit-report-preview iframe {
    min-height: 36rem;
  }
}

@media (prefers-reduced-motion: reduce) {
  #createAuditReport[aria-busy="true"]::before,
  #prepareAuditConclusion[aria-busy="true"]::before,
  .audit-report-loading-spinner {
    animation: none;
  }
}

.audit-primary-action {
  border-color: #003f9e;
  background: linear-gradient(#0967e5, #0051c9);
  color: #fff;
  box-shadow: 0 0 0 2px #fff, 0 0 0 4px #ffbf00;
}

.audit-primary-action:hover {
  background: #003f9e;
}

.audit-button-with-icon {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .55rem;
}

.audit-button-with-icon > [aria-hidden="true"] {
  font-size: 1.15em;
  line-height: 1;
}

.page-selection-heading {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: start;
}

.imported-report-page-selection .page-selection-heading {
  align-items: center;
  margin-bottom: 1.75rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}

.matrix-heading h2 {
  margin-bottom: .2rem;
}

.page-selection-count {
  margin: 0;
  color: var(--audit-navy);
}

.audit-info-callout {
  display: grid;
  grid-template-columns: 2rem minmax(0, 1fr);
  gap: .8rem;
  align-items: start;
  margin-block: 1rem;
  padding: .85rem 1rem;
  border: 1px solid #8db5f2;
  border-radius: .35rem;
  background: #f8fbff;
  color: var(--audit-navy);
}

.audit-info-callout p {
  margin: 0;
}

.audit-callout-icon {
  display: grid;
  place-items: center;
  inline-size: 1.65rem;
  block-size: 1.65rem;
  border-radius: 50%;
  background: var(--audit-blue);
  color: #fff;
  font-weight: 900;
}

.audit-page-selection .pages-grid {
  gap: 1rem;
}

.imported-report-page-selection .pages-grid {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}

@media (max-width: 1100px) {
  .imported-report-page-selection .pages-grid {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
}

@media (max-width: 760px) {
  .imported-report-page-selection .pages-grid {
    grid-template-columns: 1fr;
  }
}

.audit-page-card {
  position: relative;
  grid-template-rows: auto minmax(0, 1fr) auto auto;
  align-content: stretch;
  gap: .65rem;
  padding: .75rem;
  border-color: var(--audit-line);
  border-radius: .45rem;
  box-shadow: none;
  overflow: visible;
}

.imported-report-page-card {
  grid-template-rows: minmax(0, 1fr) auto;
}

.audit-page-card.is-selected {
  border-color: var(--audit-blue);
  background: #f8fbff;
}

.audit-page-card.is-excluded {
  background: #f8fafc;
}

.page-scope-control {
  display: flex;
  align-items: center;
  gap: .65rem;
  min-height: 2.75rem;
  margin: -.2rem 0 0;
  color: var(--audit-navy);
  font-weight: 700;
  cursor: pointer;
}

.page-scope-control input {
  appearance: auto;
  inline-size: 1.25rem;
  block-size: 1.25rem;
  min-height: 0;
  margin: 0;
  padding: 0;
  accent-color: var(--audit-blue);
  flex: 0 0 1.25rem;
}

.page-scope-control:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.page-selection-locked .page-scope-control {
  cursor: default;
}

.audit-page-card figure {
  align-self: start;
  width: 100%;
  height: clamp(12rem, 22vw, 18rem);
  padding: 0;
  overflow: hidden;
  border: 1px solid var(--audit-line);
  border-radius: .35rem;
  background: #eef2ff;
}

.audit-page-card img,
.audit-page-card img.pdf-extracted-screenshot,
.audit-page-card .missing-shot {
  width: 100%;
  height: 100%;
  min-height: 0;
  max-height: none;
  aspect-ratio: auto;
  border: 0;
  border-radius: 0;
}

.audit-page-card img,
.audit-page-card img.pdf-extracted-screenshot {
  object-fit: contain;
}

.audit-page-card .page-card-content {
  padding: .1rem 0;
}

.audit-page-card .page-card-content h3 {
  color: var(--audit-navy);
  font-size: 1.05rem;
}

.audit-page-card .page-url {
  font-size: .8rem;
}

.page-card-progress {
  display: grid;
  gap: .3rem;
  margin-top: .45rem;
}

.page-card-progress progress {
  width: 72%;
  height: .45rem;
  accent-color: var(--audit-green);
}

.page-card-progress > div {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  font-size: .78rem;
}

.page-card-progress strong {
  color: var(--audit-red);
  font-weight: 500;
}

.audit-page-card .page-management-actions,
.audit-page-card .page-result-actions {
  display: grid;
  padding: 0;
}

.audit-page-card .page-management-actions {
  display: flex;
  justify-content: flex-end;
  gap: .5rem;
}

.audit-page-card .page-card-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: .75rem;
}

.audit-page-card .page-card-copy {
  min-width: 0;
}

.audit-page-card .page-management-actions .issue-compact-actions {
  flex-wrap: nowrap;
}

.audit-page-card .page-screenshot-actions {
  display: flex;
  flex: 0 0 auto;
  justify-content: flex-end;
  padding: 0;
}

.audit-page-card .page-result-actions button,
.audit-page-card .page-screenshot-actions .file-button {
  min-height: 2.75rem;
  padding: .35rem .65rem;
  border: 1px solid #76a4eb;
  border-radius: .3rem;
  background: #fff;
  color: var(--audit-blue);
  box-shadow: none;
  font-size: .85rem;
  font-weight: 700;
}

.audit-page-card .page-result-actions button {
  width: 100%;
}

.audit-page-card .page-screenshot-actions .file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: .5rem;
  width: auto;
  margin: 0;
}

.audit-page-card .page-screenshot-details {
  display: grid;
  gap: .4rem;
}

.audit-page-card .page-screenshot-details .field-help,
.audit-page-card .page-screenshot-upload-status {
  margin: 0;
}

.audit-page-card .page-screenshot-actions .file-button svg {
  width: 1.1rem;
  height: 1.1rem;
  flex: 0 0 auto;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

@media (max-width: 760px) {
  .audit-page-card figure {
    height: clamp(11rem, 52vw, 16rem);
  }
}

@media (max-width: 520px) {
  .audit-page-card .page-card-heading {
    flex-wrap: wrap;
  }

  .audit-page-card .page-management-actions {
    width: 100%;
  }

  .audit-page-card .page-screenshot-actions,
  .audit-page-card .page-screenshot-actions .file-button {
    width: 100%;
  }
}

#pageEditorDialog {
  width: min(40rem, calc(100% - 2rem));
  max-width: 40rem;
}

.page-editor-form {
  width: 100%;
  min-width: 0;
}

.page-editor-form .field-label {
  margin: 0;
  font-weight: 800;
}

.page-selection-completion {
  display: flex;
  justify-content: space-between;
  gap: 1rem;
  align-items: center;
  margin-top: 1rem;
  padding: 1rem;
  border: 1px solid #7da9ee;
  border-radius: .4rem;
  background: #fbfdff;
}

.page-selection-completion-copy,
.workspace-progress-primary {
  display: flex;
  gap: .85rem;
  align-items: center;
}

.page-selection-completion-copy p,
.workspace-progress-primary p {
  margin: 0;
}

.audit-complete-icon {
  display: grid;
  place-items: center;
  inline-size: 2.25rem;
  block-size: 2.25rem;
  border: 2px solid var(--audit-green);
  border-radius: 50%;
  color: var(--audit-green);
  font-size: 1.3rem;
  font-weight: 900;
}

.audit-workspace-view,
.audit-matrix-view {
  display: grid;
  gap: .9rem;
}

.workspace-progress-strip {
  display: grid;
  grid-template-columns: minmax(15rem, 1.5fr) repeat(3, minmax(8rem, .7fr)) auto;
  gap: 1rem;
  align-items: center;
  padding: 1rem 1.25rem;
  border-bottom: 1px solid var(--audit-line);
  background: #fff;
}

.workspace-run-actions {
  display: grid;
  grid-template-columns: minmax(8.5rem, auto);
  justify-content: end;
}

.workspace-run-actions .guided-action-button {
  min-width: 0;
  min-height: 2.75rem;
  padding: .4rem .65rem;
  gap: .4rem;
  font-size: .9rem;
}

.workspace-run-actions .dashboard-action-button-icon {
  width: 1.15rem;
  height: 1.15rem;
  flex-basis: 1.15rem;
}

.audit-workspace-view #workspaceEmpty {
  padding: 0;
  border: 0;
  background: transparent;
}

.workspace-progress-primary > div {
  min-width: 12rem;
}

.workspace-progress-primary progress {
  width: 100%;
  height: .5rem;
  accent-color: var(--audit-green);
}

.workspace-progress-primary strong {
  font-size: 1.2rem;
}

.workspace-progress-primary p span {
  color: var(--audit-green);
}

.workspace-progress-metric {
  display: flex;
  gap: .7rem;
  align-items: center;
  padding: .55rem .8rem;
  border: 1px solid var(--audit-line);
  border-radius: .35rem;
}

.workspace-progress-metric > span {
  display: grid;
  place-items: center;
  inline-size: 1.55rem;
  block-size: 1.55rem;
  border: 2px solid #64748b;
  border-radius: 50%;
  font-weight: 900;
}

.workspace-progress-metric p {
  display: grid;
  margin: 0;
}

.workspace-progress-metric strong {
  font-size: 1.25rem;
}

.audit-workspace-view .test-workspace {
  grid-template-columns: minmax(14rem, .92fr) minmax(26rem, 1.75fr) minmax(18rem, 1fr);
  gap: .85rem;
  padding: 0 1rem 1rem;
}

.audit-workspace-view .workspace-steps,
.audit-workspace-view .workspace-assessment,
.audit-workspace-view .workspace-issues {
  border-color: var(--audit-line);
  border-radius: .4rem;
  background: #fff;
}

.workspace-panel-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .5rem;
  min-height: 2.75rem;
  margin-bottom: .55rem;
}

.workspace-panel-title {
  min-width: 0;
  margin: 0;
}

.workspace-panel-heading-actions {
  display: flex;
  flex: 0 0 auto;
  gap: .35rem;
}

.workspace-panel-icon-action {
  display: inline-grid;
  place-items: center;
  flex: 0 0 auto;
  width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 1px solid #76a4eb;
  border-radius: .3rem;
  background: #fff;
  color: var(--audit-blue);
  box-shadow: none;
}

.workspace-panel-icon-action:hover {
  border-color: var(--audit-blue);
  background: #edf4ff;
  color: var(--audit-blue);
}

.workspace-panel-icon-action:disabled {
  border-color: var(--audit-line);
  background: #f0f4f9;
  color: #7c8796;
}

.workspace-panel-action-icon {
  width: 1.2rem;
  height: 1.2rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
  transition: transform .16s ease;
}

@media (prefers-reduced-motion: reduce) {
  .workspace-panel-action-icon {
    transition: none;
  }
}

.workspace-panel-icon-action.shows-expand-action .workspace-groups-icon,
.workspace-steps.is-collapsed #toggleWorkspaceStepsPanel .workspace-panel-chevron,
.workspace-issues.is-collapsed #toggleWorkspaceIssuesPanel .workspace-panel-chevron {
  transform: rotate(180deg);
}

.workspace-issue-actions {
  display: flex;
  justify-content: flex-end;
  margin-bottom: .75rem;
}

.workspace-new-issue-button,
.workspace-save-issue-button {
  width: auto;
  min-height: 2.75rem;
  padding: .45rem .75rem;
  font-size: .875rem;
}

@media (min-width: 1001px) {
  .audit-workspace-view .test-workspace > .workspace-steps,
  .audit-workspace-view .test-workspace > .workspace-assessment,
  .audit-workspace-view .test-workspace > .workspace-issues {
    grid-row: 1;
  }

  .audit-workspace-view .test-workspace > .workspace-steps {
    grid-column: 1;
  }

  .audit-workspace-view .test-workspace > .workspace-assessment {
    grid-column: 2;
  }

  .audit-workspace-view .test-workspace > .workspace-issues {
    grid-column: 3;
  }

  .audit-workspace-view .test-workspace.workspace-steps-collapsed > .workspace-steps {
    z-index: 1;
    width: 3.75rem;
    justify-self: start;
  }

  .audit-workspace-view .test-workspace.workspace-issues-collapsed > .workspace-issues {
    z-index: 1;
    width: 3.75rem;
    justify-self: end;
  }

  .audit-workspace-view .test-workspace.workspace-steps-collapsed > .workspace-assessment {
    grid-column: 1 / 3;
    margin-inline-start: 4.6rem;
  }

  .audit-workspace-view .test-workspace.workspace-issues-collapsed > .workspace-assessment {
    grid-column: 2 / 4;
    margin-inline-end: 4.6rem;
  }

  .audit-workspace-view .test-workspace.workspace-steps-collapsed.workspace-issues-collapsed > .workspace-assessment {
    grid-column: 1 / 4;
    margin-inline: 4.6rem;
  }
}

@media (min-width: 901px) {
  .workspace-steps.is-collapsed .workspace-panel-content,
  .workspace-issues.is-collapsed .workspace-panel-content {
    display: none;
  }

  .workspace-steps.is-collapsed .workspace-panel-title,
  .workspace-issues.is-collapsed .workspace-panel-title {
    position: absolute;
    width: 1px;
    height: 1px;
    padding: 0;
    margin: -1px;
    overflow: hidden;
    clip: rect(0, 0, 0, 0);
    white-space: nowrap;
    border: 0;
  }

  .workspace-steps.is-collapsed .workspace-panel-heading,
  .workspace-issues.is-collapsed .workspace-panel-heading {
    justify-content: center;
    margin: 0;
  }

  .workspace-steps.is-collapsed #toggleWorkspaceGroups {
    display: none;
  }
}

.workspace-step-list button {
  border: 1px solid transparent;
  border-radius: .25rem;
  background: transparent;
  color: var(--audit-navy);
  box-shadow: none;
  font-weight: 500;
}

.workspace-step-list button:hover:not(.active) {
  border-color: #7ba8ed;
  background: #edf4ff;
  color: var(--audit-blue);
}

.workspace-step-list button.active {
  border-color: #9bbbea;
  border-radius: .4rem;
  background: #f2f7ff;
  color: var(--audit-blue);
  box-shadow: inset .22rem 0 0 var(--audit-blue), 0 .125rem .35rem rgba(7, 29, 66, .1);
  outline: 0;
  font-weight: 700;
}

.workspace-step-list button.active:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: inset .22rem 0 0 var(--audit-blue), 0 0 0 2px var(--twin-blue-dark);
}

.workspace-entry-heading {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .75rem;
  align-items: center;
  margin-block: 1em;
}

.workspace-entry-heading h3 {
  min-width: 0;
  margin: 0;
}

.workspace-entry-heading-actions,
.workspace-bulk-rating-actions {
  display: flex;
  align-items: center;
}

.workspace-entry-heading-actions {
  min-width: 0;
  gap: .35rem;
  justify-self: end;
}

.workspace-bulk-rating-actions {
  gap: .25rem;
}

.workspace-heading-action-button {
  display: grid;
  place-items: center;
  flex: 0 0 2.75rem;
  width: 2.75rem;
  height: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 2px solid currentColor;
  border-radius: .55rem;
  color: #fff;
  box-shadow: none;
}

.workspace-heading-action-button svg {
  width: 1.55rem;
  height: 1.55rem;
  fill: none;
  stroke: currentColor;
  stroke-linecap: round;
  stroke-linejoin: round;
  stroke-width: 1.9;
}

.workspace-bulk-rating-fulfilled {
  border-color: #08752d;
  background: #08752d;
}

.workspace-bulk-rating-fulfilled:hover {
  border-color: #065f26;
  background: #065f26;
}

.workspace-bulk-rating-not-applicable {
  border-color: #526173;
  background: #526173;
}

.workspace-bulk-rating-not-applicable:hover {
  border-color: #39475a;
  background: #39475a;
}

.workspace-heading-action-button:focus-visible {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--twin-blue-dark);
}

.workspace-bulk-rating-fulfilled:disabled:hover {
  border-color: #08752d;
  background: #08752d;
}

.workspace-bulk-rating-not-applicable:disabled:hover {
  border-color: #526173;
  background: #526173;
}

.workspace-step-help {
  position: relative;
}

.workspace-bulk-rating-dialog {
  width: min(32rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.workspace-bulk-rating-dialog .dialog-form {
  display: grid;
  gap: .85rem;
}

.workspace-bulk-rating-dialog h2,
.workspace-bulk-rating-dialog p {
  margin: 0;
}

.workspace-bulk-rating-dialog .form-status {
  margin-block: .25rem 0;
}

.workspace-bulk-rating-dialog .dialog-actions {
  align-items: center;
  justify-content: flex-end;
}

.workspace-bulk-rating-dialog .dialog-actions button {
  width: auto;
  min-height: 2.75rem;
  padding: .45rem .75rem;
  font-size: .875rem;
  line-height: 1.2;
}

.workspace-transition-dialog {
  width: min(32rem, calc(100% - 2rem));
  max-height: calc(100vh - 2rem);
  max-height: calc(100dvh - 2rem);
  overflow-y: auto;
  overscroll-behavior: contain;
}

.workspace-transition-dialog .dialog-form {
  display: grid;
  gap: .85rem;
}

.workspace-transition-dialog h2,
.workspace-transition-dialog p {
  margin: 0;
}

.workspace-transition-dialog .dialog-actions {
  align-items: center;
  justify-content: flex-end;
}

.workspace-transition-dialog .dialog-actions button,
#auditReopenDialog .dialog-actions button {
  width: auto;
  min-height: 2.75rem;
  padding: .45rem .75rem;
  font-size: .875rem;
  line-height: 1.2;
}

.workspace-step-help-button {
  border-color: var(--twin-blue);
  background: var(--twin-blue);
  color: #fff;
  font-size: .875rem;
  line-height: 1;
}

.workspace-step-help-button > span {
  display: grid;
  place-items: center;
  width: 100%;
  height: 100%;
  font-weight: 800;
}

.workspace-step-help-button:hover,
.workspace-step-help-button[aria-expanded="true"] {
  border-color: var(--twin-blue-hover);
  background: var(--twin-blue-hover);
  color: #fff;
}

.workspace-step-help-tooltip {
  position: absolute;
  z-index: 8;
  inset-block-start: calc(100% + .4rem);
  inset-inline-end: 0;
  width: min(36rem, calc(100vw - 2rem));
  max-height: min(30rem, calc(100vh - 8rem));
  padding: 1rem;
  overflow-y: auto;
  overscroll-behavior: contain;
  border: 1px solid var(--audit-line);
  border-radius: .4rem;
  background: #fff;
  box-shadow: 0 .5rem 1.25rem rgba(7, 29, 66, .16);
}

.workspace-step-help-tooltip h4 {
  margin: 0 0 .65rem;
  color: var(--twin-blue-dark);
  font-size: 1rem;
}

.workspace-step-help-tooltip .markdown-content > :first-child {
  margin-block-start: 0;
}

.workspace-step-help-tooltip .markdown-content > :last-child {
  margin-block-end: 0;
}

.workspace-step-help-tooltip .markdown-content p {
  line-height: 1.55;
}

.workspace-step-help-tooltip[hidden] {
  display: none;
}

.workspace-validation-summary {
  display: grid;
  gap: .35rem;
  margin-block: 0 .75rem;
  padding: .65rem .75rem;
  border: 2px solid #b91c1c;
  border-radius: .5rem;
  background: #fff7f7;
  color: #7f1d1d;
  scroll-margin-block: 1rem;
}

.workspace-validation-summary:focus {
  outline: 3px solid var(--focus);
  outline-offset: 3px;
  box-shadow: 0 0 0 2px var(--twin-blue-dark);
}

.workspace-validation-summary[hidden] {
  display: none;
}

.workspace-validation-summary p,
.workspace-validation-summary ul {
  margin: 0;
}

.workspace-validation-summary p {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  gap: .5rem;
  align-items: center;
  font-weight: 800;
}

.workspace-validation-summary p::before,
.workspace-assessment .field-error:not([hidden])::before {
  width: 1.25rem;
  height: 1.25rem;
  background: currentColor;
  content: '';
  mask-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24'%3E%3Cpath d='M12 3 2.5 21h19L12 3Z' fill='none' stroke='black' stroke-width='2' stroke-linejoin='round'/%3E%3Cpath d='M12 9v5m0 3h.01' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'/%3E%3C/svg%3E");
  mask-position: center;
  mask-repeat: no-repeat;
  mask-size: contain;
}

.workspace-assessment .field-error:not([hidden]) {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: .4rem;
  align-items: start;
}

.workspace-validation-summary ul {
  display: grid;
  gap: .15rem;
  padding-inline-start: 1.25rem;
}

.workspace-validation-summary .error-summary-link {
  min-height: 2.75rem;
  padding: .2rem;
  border: 0;
  background: transparent;
  color: #7f1d1d;
  font: inherit;
  font-weight: 700;
  text-align: start;
  text-decoration: underline;
}

.workspace-validation-summary .error-summary-link:hover {
  background: transparent;
  color: #991b1b;
  text-decoration-thickness: .15em;
}

.audit-requirement {
  grid-template-columns: 1fr;
  margin-block: .5rem 1rem;
  padding: .75rem;
}

.workspace-page-context {
  display: grid;
  gap: 1rem;
  margin-block: .5rem .75rem;
}

.workspace-page-tabs {
  display: flex;
  flex-wrap: wrap;
  align-items: end;
  border-bottom: 1px solid var(--audit-line);
}

.workspace-mobile-page-select {
  display: none;
}

.workspace-page-tab {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  min-height: 2.75rem;
  margin: 0 .2rem -1px 0;
  padding: .5rem .7rem;
  border: 1px solid var(--audit-line);
  border-radius: .4rem .4rem 0 0;
  background: #f0f4f9;
  color: var(--text);
  font: inherit;
  font-weight: 800;
}

.workspace-page-tab:hover {
  border-color: var(--twin-blue);
  background: #e7f1ff;
}

.workspace-page-tab[aria-selected="true"] {
  border-color: var(--twin-blue);
  background: var(--twin-blue);
  color: #fff;
}

.workspace-page-tab:focus-visible {
  position: relative;
  z-index: 1;
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.workspace-page-tab-status {
  display: grid;
  place-items: center;
  width: 1.5rem;
  height: 1.5rem;
  color: #526173;
}

.workspace-page-tab-status svg {
  width: 100%;
  height: 100%;
  fill: none;
  stroke: currentColor;
  stroke-width: 2;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace-page-tab.status-assessed .workspace-page-tab-status {
  color: var(--audit-green);
}

.workspace-page-tab.status-in_progress .workspace-page-tab-status {
  color: #8a6900;
}

.workspace-page-tab[aria-selected="true"] .workspace-page-tab-status {
  color: #fff;
}

.workspace-page-navigation {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(8rem, auto) minmax(0, 1fr);
  gap: 1rem;
  align-items: center;
}

.workspace-page-navigation-button {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  width: fit-content;
  max-width: 100%;
  min-height: 2.75rem;
  padding: .45rem .7rem;
  font-weight: 800;
}

.workspace-page-navigation-button > span:not([aria-hidden]) {
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}

#previousWorkspacePage {
  justify-self: start;
}

#nextWorkspacePage {
  justify-self: end;
}

.workspace-current-page-name {
  margin: 0;
  font-weight: 800;
  text-align: center;
}

.workspace-assessment-content {
  display: grid;
  grid-template-columns: minmax(0, 1fr) minmax(11rem, 14rem);
  grid-auto-rows: max-content;
  gap: 1rem;
  align-items: start;
  align-content: start;
}

.workspace-assessment-primary {
  display: grid;
  grid-column: 1;
  grid-row: 1;
  gap: .75rem;
  align-content: start;
  min-width: 0;
}

.workspace-preview {
  align-self: start;
  margin: .75rem 0 0;
  border: 1px solid var(--audit-line);
  border-radius: .35rem;
  overflow: hidden;
}

.workspace-preview img {
  width: 100%;
  height: auto;
  max-height: 20rem;
  object-position: top center;
}

.workspace-assessment #workspaceRating {
  display: grid;
  grid-column: 2;
  grid-row: 1;
  align-self: start;
  grid-template-columns: 1fr;
  grid-auto-rows: minmax(2.75rem, auto);
  gap: .25rem;
  margin: .75rem 0 0;
  padding: 0;
  border: 0;
}

.workspace-assessment #workspaceRating[aria-invalid="true"] {
  padding: .4rem;
  border: 2px solid #b91c1c;
  border-radius: .4rem;
  background: #fff7f7;
}

.workspace-assessment #workspaceRating legend {
  margin-bottom: 0;
  font-weight: 800;
}

.workspace-rating-error {
  margin: 0 0 .15rem;
}

.workspace-assessment fieldset > label.workspace-rating-option {
  display: grid;
  grid-template-columns: 1.5rem minmax(0, 1fr);
  align-items: center;
  justify-items: start;
  gap: .5rem;
  min-height: 2.75rem;
  margin: 0;
  padding: .2rem .5rem;
  border-color: var(--audit-line);
  text-align: left;
}

.workspace-rating-option input {
  margin: 0;
}

.workspace-rating-option span {
  font-weight: 500;
}

.workspace-rating-option:has(input:checked) {
  border-color: var(--audit-blue);
  background: #edf4ff;
  box-shadow: inset 0 0 0 1px var(--audit-blue);
}

.workspace-rating-option.rating-te:has(input:checked),
.workspace-rating-option.rating-ene:has(input:checked),
.workspace-rating-option.rating-ne:has(input:checked) {
  border-color: var(--audit-red);
  background: #fff1f1;
  color: var(--audit-red);
  box-shadow: inset 0 0 0 1px var(--audit-red);
}

.workspace-inline-issue-form {
  display: grid;
  gap: .85rem;
  margin-top: 1.75rem;
  padding: 1rem;
  border: 2px solid #76a4eb;
  border-radius: .4rem;
  background: #f8fbff;
}

.workspace-issue-editor-fields {
  display: grid;
  gap: .85rem;
}

.workspace-inline-issue-action {
  display: flex;
  justify-content: flex-end;
  margin: 0;
}

.workspace-inline-issue-action:has(.workspace-new-issue-button[hidden]) {
  display: none;
}

.workspace-inline-issue-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
}

.workspace-inline-issue-heading h4 {
  margin: 0;
}

.workspace-issue-editor-fields > label {
  gap: .35rem;
  font-weight: 700;
}

.workspace-issue-editor-fields > label:not(:has(> .required-label)) {
  display: grid;
}

.workspace-issue-editor-fields textarea {
  resize: vertical;
}

.workspace-issue-page-assignment {
  display: grid;
  gap: .45rem;
  min-width: 0;
  margin: 0;
  padding: .5rem 0 0;
  border: 0;
  border-top: 1px solid var(--audit-line);
}

.workspace-issue-page-assignment legend {
  padding: 0 .5rem 0 0;
  font-size: .9rem;
  font-weight: 800;
  line-height: 1.25;
}

.workspace-page-mode-options {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 10.5rem), 1fr));
  gap: .35rem;
}

.workspace-assessment .workspace-page-mode-options > label {
  display: grid;
  grid-template-columns: 1.25rem minmax(0, 1fr);
  gap: .5rem;
  align-items: center;
  min-height: 2.75rem;
  margin: 0;
  padding: .15rem .45rem;
  border: 1px solid var(--audit-line);
  border-radius: .35rem;
  background: #fff;
  cursor: pointer;
  font-size: .875rem;
  line-height: 1.2;
}

.workspace-assessment .workspace-page-mode-options > label:has(input:checked) {
  border-color: var(--audit-blue);
  background: #eef5ff;
  box-shadow: inset 0 0 0 1px var(--audit-blue);
}

.workspace-page-mode-options input {
  margin: 0;
}

.workspace-page-mode-options span {
  font-weight: 700;
}

.workspace-selected-pages {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .25rem .5rem;
  align-items: center;
}

.workspace-selected-pages > .field-label {
  grid-column: 1;
  grid-row: 1;
  font-size: .875rem;
}

.workspace-page-chips {
  display: flex;
  grid-column: 1 / -1;
  grid-row: 2;
  flex-wrap: wrap;
  gap: .35rem .6rem;
}

.workspace-page-chip {
  position: relative;
  display: inline-flex;
  align-items: center;
  min-height: 2rem;
  padding-inline-end: 1.65rem;
  border: 1px solid var(--audit-blue);
  border-radius: 999px;
  background: #eef5ff;
  color: var(--audit-blue);
  font-size: .875rem;
  font-weight: 700;
  line-height: 1.2;
}

.workspace-page-chip > span {
  padding: .25rem .25rem .25rem .65rem;
}

.workspace-page-chip button {
  position: absolute;
  inset-block-start: 50%;
  inset-inline-end: -.4rem;
  display: grid;
  place-items: center;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: 0;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: inherit;
  transform: translateY(-50%);
}

.workspace-page-chip button > span {
  display: grid;
  place-items: center;
  width: 1.4rem;
  height: 1.4rem;
  border-radius: 50%;
  font-size: 1.05rem;
  line-height: 1;
}

.workspace-page-chip button:hover,
.workspace-page-chip button:focus-visible {
  background: transparent;
}

.workspace-page-chip button:focus-visible {
  outline: 0;
  box-shadow: none;
}

.workspace-page-chip button:focus-visible > span {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 1px var(--twin-blue-dark);
}

.workspace-page-chip button:hover > span {
  background: #d9e9ff;
}

.workspace-add-page-button {
  display: inline-flex;
  grid-column: 2;
  grid-row: 1;
  gap: .4rem;
  align-items: center;
  justify-content: center;
  justify-self: end;
  min-height: 2.75rem;
  padding: .3rem .6rem;
  font-size: .875rem;
  line-height: 1.2;
}

.workspace-add-page-button .dashboard-action-button-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-basis: 1.1rem;
}

.workspace-issue-page-assignment[aria-invalid="true"] {
  border-color: var(--audit-red);
  box-shadow: inset 0 0 0 1px var(--audit-red);
}

.workspace-issue-page-assignment.is-disabled {
  opacity: .72;
}

.workspace-page-selection-modal {
  width: min(32rem, calc(100vw - 2rem));
  max-width: 32rem;
  padding: .85rem;
}

.workspace-page-selection-dialog {
  width: 100%;
  gap: .65rem;
}

.workspace-page-selection-dialog .section-heading {
  align-items: center;
}

.workspace-page-selection-dialog h2 {
  margin: 0;
  font-size: clamp(1.25rem, 4vw, 1.6rem);
  line-height: 1.2;
}

.workspace-page-selection-dialog > .field-help {
  margin: 0;
  font-size: .875rem;
}

.workspace-page-selection-list {
  display: grid;
  max-height: min(50vh, 20rem);
  overflow-y: auto;
  border: 1px solid var(--border);
  border-radius: .35rem;
}

.workspace-page-selection-list label {
  display: grid;
  grid-template-columns: 1.2rem minmax(0, 1fr);
  gap: .5rem;
  align-items: center;
  min-height: 2.75rem;
  margin: 0;
  padding: .2rem .55rem;
  border-bottom: 1px solid var(--border);
  cursor: pointer;
  font-size: .9rem;
  line-height: 1.25;
}

.workspace-page-selection-list label:last-child {
  border-bottom: 0;
}

.workspace-page-selection-list label:has(input:checked) {
  background: #eef5ff;
}

.workspace-page-selection-list label:hover {
  background: #f5f8fc;
}

.workspace-page-selection-list label:has(input:checked):hover {
  background: #e4efff;
}

.workspace-page-selection-list input[type="checkbox"],
.knowledge-choice-grid input[type="checkbox"] {
  display: grid;
  place-content: center;
  flex: 0 0 1.2rem;
  align-self: center;
  justify-self: start;
  width: 1.2rem;
  min-width: 1.2rem;
  max-width: 1.2rem;
  height: 1.2rem;
  min-height: 1.2rem;
  max-height: 1.2rem;
  aspect-ratio: 1 / 1;
  margin: 0;
  padding: 0;
  appearance: none;
  border: 2px solid #64748b;
  border-radius: .25rem;
  background: #fff;
  cursor: pointer;
}

.workspace-page-selection-list input[type="checkbox"]:checked,
.knowledge-choice-grid input[type="checkbox"]:checked {
  border-color: var(--twin-blue);
  background-color: var(--twin-blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m2.5 8.5 3.2 3.2 7.8-8' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: .8rem .8rem;
}

@media (forced-colors: active) {
  .workspace-page-selection-list input[type="checkbox"],
  .knowledge-choice-grid input[type="checkbox"] {
    appearance: auto;
    forced-color-adjust: auto;
  }
}

.workspace-page-selection-actions {
  gap: .5rem;
}

.workspace-page-selection-actions button {
  min-height: 2.75rem;
  padding: .35rem .65rem;
  font-size: .875rem;
}

#workspacePageAssignmentStatus {
  margin: 0;
  font-size: .8rem;
  line-height: 1.25;
}

@media (max-width: 560px) {
  .workspace-selected-pages {
    grid-template-columns: 1fr;
  }

  .workspace-selected-pages > .field-label,
  .workspace-add-page-button,
  .workspace-page-chips {
    grid-column: 1;
  }

  .workspace-add-page-button {
    grid-row: 2;
    justify-self: stretch;
  }

  .workspace-page-chips {
    grid-row: 3;
  }
}

@media (forced-colors: active) {
  .workspace-page-selection-list input[type="checkbox"] {
    appearance: auto;
    forced-color-adjust: auto;
  }
}

.workspace-issue-screenshot-field,
.workspace-issue-combobox-field {
  display: grid;
  gap: .35rem;
}

.workspace-issue-metadata {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(min(100%, 14rem), 1fr));
  gap: .85rem;
}

.workspace-issue-form-actions {
  display: flex;
  justify-content: flex-end;
  gap: .75rem;
}

.workspace-issue-form-actions > button {
  min-height: 2.75rem;
  padding: .35rem clamp(.4rem, 1.5vw, .6rem);
  font-size: .875rem;
  line-height: normal;
}

.workspace-save-issue-button .dashboard-action-button-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-basis: 1.1rem;
}

.workspace-issue-metadata .a11y-combobox__control {
  grid-template-columns: auto minmax(0, 1fr) auto;
  gap: .5rem;
  min-height: 2.75rem;
  padding: .3rem .65rem;
  border-radius: .4rem;
  box-shadow: none;
}

.workspace-issue-metadata .a11y-combobox__value {
  font-size: .9375rem;
  text-align: start;
}

.workspace-issue-screenshot-list {
  margin-block: .35rem 0;
  padding-inline-start: 1.25rem;
}

.workspace-issue-editor-fields.is-disabled {
  opacity: .72;
}

@media (max-width: 520px) {
  .workspace-issue-metadata {
    grid-template-columns: 1fr;
  }

  .workspace-issue-form-actions {
    display: grid;
    grid-template-columns: 1fr;
  }

  .workspace-issue-form-actions > button {
    width: 100%;
  }
}

.workspace-actions {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto minmax(0, 1fr);
  gap: .75rem;
  align-items: start;
  margin-top: 2rem;
}

.workspace-save-control {
  display: grid;
  gap: .3rem;
  min-width: 0;
  width: 100%;
  justify-items: center;
}

.workspace-change-status {
  min-height: 1.2em;
  color: #526173;
  font-size: .8rem;
  text-align: center;
}

.workspace-actions > button {
  align-self: start;
}

.workspace-actions #previousWorkspaceEntry {
  justify-self: start;
}

.workspace-actions #nextWorkspaceEntry {
  justify-self: end;
}

.workspace-actions .guided-action-button {
  min-width: 0;
  width: fit-content;
  max-width: 100%;
  min-height: 2.75rem;
  padding: .35rem clamp(.4rem, 1.5vw, .6rem);
  font-size: .875rem;
  white-space: normal;
}

.workspace-actions .dashboard-action-button-icon {
  width: 1.1rem;
  height: 1.1rem;
  flex-basis: 1.1rem;
}

.workspace-secondary-navigation {
  display: none;
}

.workspace-issue-list > ul {
  display: grid;
  gap: .65rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

.workspace-issue-card {
  display: grid;
  gap: .55rem;
  border: 1px solid #efa2a2;
  border-radius: .4rem;
  background: #fffafa;
  color: var(--audit-navy);
}

.workspace-issue-card:has(.workspace-issue-select:hover) {
  border-color: var(--audit-blue);
  background: #f5f9ff;
}

.workspace-issue-card.is-selected {
  border: 2px solid var(--audit-blue);
  background: #edf4ff;
}

.workspace-issue-card.is-recently-added {
  border: 2px solid #18794e;
  background: #effbf5;
  box-shadow: 0 0 0 2px rgba(24, 121, 78, .12);
}

.workspace-issue-select {
  display: grid;
  gap: .55rem;
  width: 100%;
  min-height: 2.75rem;
  padding: .75rem .75rem 0;
  border: 0;
  background: transparent;
  color: inherit;
  font: inherit;
  text-align: start;
  box-shadow: none;
}

.workspace-issue-select:hover {
  border-color: transparent;
  background: transparent;
  color: inherit;
}

.workspace-issue-card-footer {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  align-items: center;
  gap: .55rem;
  padding: 0 .75rem .75rem;
}

.workspace-issue-card-footer .workspace-issue-facts {
  min-width: 0;
}

.workspace-issue-delete {
  display: inline-grid;
  place-items: center;
  justify-self: end;
  width: 2.75rem;
  min-width: 2.75rem;
  min-height: 2.75rem;
  padding: .35rem;
}

.workspace-issue-delete svg {
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.workspace-issue-select strong,
.workspace-issue-pages {
  overflow-wrap: anywhere;
}

.workspace-issue-pages {
  color: var(--muted);
  font-size: .85rem;
}

.workspace-issue-facts {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: .5rem;
  font-size: .8rem;
}

.workspace-issue-facts > span:first-child {
  color: var(--muted);
}

.priority-badge {
  display: inline-block;
  padding: .15rem .5rem;
  border: 1px solid currentColor;
  border-radius: 999px;
  color: #526173;
  font-size: .85em;
  font-weight: 700;
}

.workspace-current-issue-screenshots .issue-screenshots {
  margin-block: .25rem .5rem;
}

.issue-page-selection {
  grid-column: 1 / -1;
  min-width: 0;
  margin: 0;
  padding: .5rem;
  border: 1px solid var(--border);
  border-radius: .5rem;
}

.issue-page-checkboxes {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(13rem, 1fr));
  gap: .35rem .75rem;
  margin-top: .35rem;
}

.issue-page-checkboxes label {
  display: flex;
  align-items: center;
  gap: .45rem;
  min-height: 2.25rem;
  margin: 0;
  padding: .1rem .5rem;
  border: 1px solid var(--border);
  border-radius: .45rem;
  background: var(--surface);
  overflow-wrap: anywhere;
}

.issue-form-grid .issue-page-checkboxes input[type="checkbox"] {
  flex: 0 0 auto;
  width: 1.125rem;
  min-width: 1.125rem;
  max-width: 1.125rem;
  height: 1.125rem;
  min-height: 1.125rem;
  padding: 0;
  margin: 0;
}

.issue-page-checkboxes label:has(input:checked) {
  border-color: var(--twin-blue);
  background: #edf4ff;
}

.issue-page-checkboxes label:has(input:focus-visible) {
  outline: 3px solid var(--focus);
  outline-offset: 2px;
}

.issue-screenshot-file-list {
  display: grid;
  gap: .35rem;
  margin: .5rem 0 0;
  padding-inline-start: 1.25rem;
}

.issue-page-number-list {
  display: grid;
  gap: .2rem;
  margin: 0;
  padding: 0;
  list-style: none;
}

@media (max-width: 600px) {
  .issue-page-checkboxes {
    grid-template-columns: 1fr;
  }

}

.audit-matrix-view {
  padding: 1.5rem;
  background: #fff;
}

.matrix-heading p {
  margin: 0;
}

.matrix-progress-strip {
  display: grid;
  grid-template-columns: minmax(18rem, 24rem) minmax(0, 1fr);
  gap: .85rem;
  align-items: center;
  padding-block: 1rem;
}

.matrix-assessment-progress {
  width: 100%;
}

.matrix-assessment-progress > div {
  flex: 1;
}

.matrix-assessment-progress p {
  white-space: nowrap;
}

.matrix-kpis {
  display: grid;
  grid-template-columns: repeat(4, minmax(9rem, 1fr));
  gap: .85rem;
  width: 100%;
  max-width: 72rem;
  justify-self: end;
}

.matrix-kpi {
  --matrix-kpi-color: var(--audit-blue);
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .8rem;
  align-items: center;
  padding: 1rem;
  border: 1px solid var(--audit-line);
  border-radius: .4rem;
}

.matrix-kpi-icon {
  display: grid;
  place-items: center;
  inline-size: 2rem;
  block-size: 2rem;
  border: 2px solid currentColor;
  border-radius: 50%;
  font-size: 1.2rem;
  font-weight: 900;
  color: var(--matrix-kpi-color);
}

.matrix-kpi-icon svg {
  inline-size: 1.25rem;
  block-size: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.25;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.matrix-kpi p {
  display: grid;
  margin: 0;
  color: var(--audit-navy);
}

.matrix-kpi strong {
  font-size: 1.4rem;
  color: var(--matrix-kpi-color);
}

.matrix-kpi-progress {
  grid-column: 1 / -1;
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .65rem;
  align-items: center;
}

.matrix-kpi progress {
  appearance: none;
  width: 100%;
  height: .55rem;
  overflow: hidden;
  border: 0;
  border-radius: 999px;
  background: #edf0f4;
  color: var(--matrix-kpi-color);
}

.matrix-kpi progress::-webkit-progress-bar {
  border-radius: 999px;
  background: #edf0f4;
}

.matrix-kpi progress::-webkit-progress-value {
  border-radius: 999px;
  background: var(--matrix-kpi-color);
}

.matrix-kpi progress::-moz-progress-bar {
  border-radius: 999px;
  background: var(--matrix-kpi-color);
}

.matrix-kpi-percentage {
  min-width: 3.25rem;
  color: var(--audit-navy);
  font-variant-numeric: tabular-nums;
  text-align: end;
}

.matrix-kpi.state-fulfilled { --matrix-kpi-color: var(--audit-green); }
.matrix-kpi.state-not_fulfilled { --matrix-kpi-color: var(--audit-red); }
.matrix-kpi.state-not_assessed { --matrix-kpi-color: var(--audit-orange); }
.matrix-kpi.state-not_applicable { --matrix-kpi-color: #526173; }
.matrix-kpi.state-no_report_statement { --matrix-kpi-color: #6650a4; }

.workspace-progress-metric.matrix-kpi {
  box-sizing: border-box;
  grid-template-columns: auto minmax(0, 1fr);
  gap: .7rem;
  min-height: 3.5rem;
  padding: .55rem .8rem;
  border-radius: .35rem;
}

.workspace-progress-metric.matrix-kpi .matrix-kpi-icon {
  inline-size: 1.55rem;
  block-size: 1.55rem;
  border-color: var(--matrix-kpi-color);
  color: var(--matrix-kpi-color);
}

.workspace-progress-metric.matrix-kpi .matrix-kpi-icon svg {
  inline-size: 1rem;
  block-size: 1rem;
}

.workspace-progress-metric.matrix-kpi p {
  min-width: 0;
}

.workspace-progress-metric.matrix-kpi p span {
  font-size: .82rem;
  line-height: 1.2;
  overflow-wrap: anywhere;
}

.workspace-progress-metric.matrix-kpi strong {
  font-size: 1.25rem;
  line-height: 1.1;
}

.matrix-legend-toolbar {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: .85rem 1.25rem;
  align-items: center;
  padding: .85rem 1rem;
  border: 1px solid var(--audit-line);
  border-radius: .4rem;
  background: var(--audit-soft);
}

.matrix-legend-list {
  display: flex;
  flex-wrap: wrap;
  gap: .65rem 1rem;
  align-items: center;
  margin: 0;
  padding: 0;
  list-style: none;
}

.matrix-legend-list li {
  display: inline-flex;
  gap: .45rem;
  align-items: center;
  color: var(--audit-navy);
  font-size: .9rem;
}

.matrix-legend-token {
  display: inline-grid;
  place-items: center;
  min-width: 2.35rem;
  min-height: 2rem;
  padding: .2rem .4rem;
  border: 1px solid currentColor;
  border-radius: .3rem;
  font-weight: 850;
  line-height: 1;
}

.matrix-legend-token.rating-e { border-color: #08752d; background: #08752d; color: #fff; }
.matrix-legend-token.rating-ee { border-color: #23863e; background: #eef9f1; color: #16642d; }
.matrix-legend-token.rating-te { border-color: #c85700; background: #fff4e8; color: #833800; }
.matrix-legend-token.rating-ene { border-color: #c13a21; background: #fff0ec; color: #8d2715; }
.matrix-legend-token.rating-ne { border-color: #b00000; background: #b00000; color: #fff; }
.matrix-legend-token.rating-na { border-color: #526173; background: #526173; color: #fff; }
.matrix-legend-token.state-not_assessed { border-color: #b35400; background: #fff7eb; color: #8a4100; }
.matrix-legend-token.state-no_report_statement { border-color: #6650a4; background: #f4f1ff; color: #55408f; }

.matrix-legend-toolbar > button {
  white-space: nowrap;
}

.matrix-toolbar-action {
  min-block-size: 2.75rem;
  padding: .35rem .65rem;
  font-size: .85rem;
  line-height: 1.25;
}

.matrix-height-matched-action {
  min-block-size: 3.25rem;
  padding-block: .65rem;
  line-height: 1.25;
}

.matrix-layout {
  display: grid;
  grid-template-columns: minmax(0, 1fr);
  gap: .85rem;
  align-items: stretch;
}

.matrix-layout:has(.matrix-summary:not([hidden])) {
  grid-template-columns: minmax(0, 1fr) minmax(17rem, 20rem);
}

.matrix-table-wrap {
  overflow: auto;
  overscroll-behavior-inline: contain;
  border: 1px solid var(--audit-line);
  border-radius: .4rem;
}

.matrix-table-wrap:focus-visible {
  outline: 3px solid var(--focus-color, #ffbf00);
  outline-offset: 3px;
}

.matrix-table-wrap table {
  width: max-content;
  min-width: max(100%, 48rem);
  table-layout: fixed;
}

.matrix-step-column {
  width: 24rem;
}

.matrix-page-column {
  width: 11rem;
}

.matrix-table-wrap th,
.matrix-table-wrap td {
  border: 0;
  border-inline-end: 1px solid #dbe3ef;
  border-block-end: 1px solid #dbe3ef;
  padding: .65rem;
  vertical-align: middle;
}

.matrix-table-wrap th {
  background: #f7f9fc;
}

.matrix-table-wrap th.matrix-page-heading {
  vertical-align: top;
  text-align: left;
}

.matrix-page-heading-content {
  display: grid;
  gap: .35rem;
  align-content: start;
}

.matrix-page-number {
  color: #526173;
  font-size: .75rem;
  font-weight: 750;
  letter-spacing: .04em;
  line-height: 1.2;
  text-transform: uppercase;
}

.matrix-page-title {
  color: var(--audit-navy);
  font-weight: 800;
  line-height: 1.35;
  overflow-wrap: normal;
  word-break: normal;
  hyphens: auto;
}

.matrix-table-wrap .matrix-step-group-heading th {
  padding: 0;
  border-inline-end: 0;
  background: #f0f4f9;
}

.matrix-step-group-toggle {
  display: flex;
  gap: .75rem;
  align-items: center;
  width: 100%;
  min-height: 3rem;
  padding: .7rem 1rem;
  border: 0;
  border-radius: 0;
  background: transparent;
  color: var(--audit-navy);
  box-shadow: none;
  font-weight: 800;
  text-align: left;
}

.matrix-step-group-toggle:hover {
  background: #e6edf6;
  color: var(--audit-blue);
}

.matrix-group-chevron {
  width: .65rem;
  height: .65rem;
  border-inline-end: 2px solid currentColor;
  border-block-end: 2px solid currentColor;
  transform: rotate(-45deg);
  transition: transform .15s ease;
}

.matrix-step-group-toggle[aria-expanded="true"] .matrix-group-chevron {
  transform: rotate(45deg);
}

.matrix-step-group-row > th {
  padding-inline-start: calc(1rem + .65rem + .75rem);
}

.matrix-table-wrap tbody th[scope="row"] {
  overflow-wrap: anywhere;
  word-break: normal;
  hyphens: auto;
}

.matrix-step-group-row[hidden] {
  display: none;
}

.matrix-cell {
  grid-template-rows: 2.75rem minmax(1.5rem, auto);
  align-content: center;
  align-items: center;
  justify-items: center;
  min-height: 5.25rem;
  padding: .35rem;
  border: 2px solid transparent;
  background: transparent !important;
  box-shadow: none;
}

button.matrix-cell:hover,
button.matrix-cell.active {
  border-color: var(--audit-blue);
  outline: 2px solid #ffbf00;
  outline-offset: 1px;
}

.matrix-cell-static {
  cursor: default;
}

.matrix-state-token {
  min-width: 2.65rem;
  padding: .2rem .45rem;
  border: 1px solid currentColor;
  border-radius: .25rem;
  font-weight: 800;
  text-align: center;
}

.matrix-cell.state-fulfilled .matrix-state-token { color: var(--audit-green); background: #f1fbf4; }
.matrix-cell.state-not_fulfilled .matrix-state-token { color: var(--audit-red); background: #fff1f1; }
.matrix-cell.state-not_assessed .matrix-state-token { color: #39475a; background: #fff; }
.matrix-cell.state-not_applicable .matrix-state-token,
.matrix-cell.state-not_in_scope .matrix-state-token { color: #526173; background: #eef1f5; }
.matrix-cell.state-no_report_statement .matrix-state-token { color: #55408f; background: #f4f1ff; }

.matrix-cell small {
  grid-row: 2;
  color: var(--audit-navy);
  font-weight: 500;
  line-height: 1.25;
  text-align: center;
  white-space: nowrap;
}

.matrix-summary {
  display: grid;
  align-content: start;
  gap: .8rem;
  padding: 1rem;
  border-color: var(--audit-line);
  background: #fff;
}

.matrix-summary[hidden] {
  display: none;
}

.matrix-summary-heading {
  display: flex;
  justify-content: space-between;
  gap: .75rem;
  align-items: start;
}

.matrix-summary-heading h3 {
  margin: 0;
}

.matrix-summary-heading p {
  margin: .25rem 0 0;
  color: var(--muted);
}

.matrix-summary-state {
  display: flex;
  gap: .55rem;
  align-items: center;
  font-size: 1.1rem;
  margin: 0;
}

.matrix-summary-state.rating-e,
.matrix-summary-state.state-fulfilled {
  color: #08752d;
}

.matrix-summary-state.rating-ee {
  color: #16642d;
}

.matrix-summary-state.rating-te {
  color: #833800;
}

.matrix-summary-state.rating-ene {
  color: #8d2715;
}

.matrix-summary-state.rating-ne,
.matrix-summary-state.state-not_fulfilled {
  color: #b00000;
}

.matrix-summary-state.rating-na {
  color: #526173;
}

.matrix-summary-issues {
  display: grid;
  gap: .6rem;
}

.matrix-load-state {
  display: grid;
  justify-items: start;
  gap: .75rem;
  padding: 1rem;
}

.matrix-load-state p {
  margin: 0;
}

.matrix-summary-issue {
  display: grid;
  grid-template-columns: auto minmax(0, 1fr) auto;
  align-items: start;
  gap: .55rem;
  width: 100%;
  padding: .75rem;
  border: 1px solid var(--audit-line);
  border-radius: .35rem;
  color: var(--audit-navy);
  background: #fff;
  text-align: left;
}

.matrix-summary-issue:hover {
  border-color: var(--audit-blue);
  background: #f7f9fc;
}

.matrix-summary-issue-symbol {
  display: grid;
  place-items: center;
  inline-size: 1.25rem;
  block-size: 1.25rem;
  border-radius: 50%;
  background: var(--audit-red);
  color: #fff;
}

.matrix-summary-issue-symbol svg {
  display: block;
  width: .9rem;
  height: .9rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 2.75;
  stroke-linecap: round;
}

.matrix-summary-issue-copy {
  display: grid;
  gap: .25rem;
  min-width: 0;
  overflow-wrap: anywhere;
}

.matrix-summary-issue-copy small {
  color: var(--muted);
}

.matrix-summary-chevron {
  align-self: center;
  color: var(--audit-blue);
  font-size: 1.3rem;
  font-weight: 800;
}

.matrix-summary-actions {
  display: grid;
  gap: .6rem;
  margin-top: auto;
}

.matrix-summary-show-issues {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: .75rem;
  width: 100%;
}

.issue-row:focus {
  outline: 3px solid var(--focus-color, #ffbf00);
  outline-offset: -3px;
}

.matrix-linear-group {
  padding: 0 !important;
  overflow: hidden;
}

.matrix-linear-group > summary {
  min-height: 2.75rem;
  padding: .75rem;
  background: #f0f4f9;
  color: var(--audit-navy);
  font-weight: 800;
}

.matrix-linear-group-steps {
  display: grid;
  gap: .75rem;
  padding: .75rem;
}

.matrix-linear-group-steps .matrix-linear-step {
  margin: 0;
}

@media (max-width: 1100px) {
  .matrix-progress-strip {
    grid-template-columns: 1fr;
  }

  .matrix-assessment-progress {
    max-width: 24rem;
  }

  .matrix-kpis {
    grid-template-columns: repeat(2, minmax(8rem, 1fr));
  }
}

@media (max-width: 1000px) {
  .workspace-progress-strip {
    grid-template-columns: 1fr repeat(3, minmax(8rem, auto));
  }

  .workspace-run-actions {
    grid-column: 1 / -1;
    justify-content: end;
  }

  .audit-workspace-view .test-workspace {
    grid-template-columns: minmax(13rem, .8fr) minmax(25rem, 1.7fr);
  }

  .audit-workspace-view .test-workspace.workspace-steps-collapsed {
    grid-template-columns: 3.75rem minmax(25rem, 1fr);
  }

  .audit-workspace-view .workspace-issues {
    grid-column: 1 / -1;
  }
}

@media (max-width: 900px) {
  .results-overview {
    margin-inline: 0;
    padding-inline: 0;
  }

  .page-selection-heading,
  .page-selection-completion {
    align-items: stretch;
  }

  .workspace-progress-strip {
    grid-template-columns: 1fr 1fr;
  }

  .workspace-progress-primary,
  .workspace-run-actions {
    grid-column: 1 / -1;
  }

  .audit-workspace-view .test-workspace {
    display: block;
    padding-inline: .75rem;
  }

  .workspace-panel-icon-action {
    display: none;
  }

  .workspace-page-tabs {
    display: none;
  }

  .workspace-mobile-page-select {
    display: grid;
    gap: .35rem;
  }

  .workspace-page-navigation {
    grid-template-columns: 1fr 1fr;
  }

  .workspace-current-page-name {
    grid-column: 1 / -1;
    grid-row: 1;
  }

  #previousWorkspacePage,
  #nextWorkspacePage {
    grid-row: 2;
  }

  .workspace-assessment-content {
    grid-template-columns: 1fr;
  }

  .workspace-assessment-primary {
    grid-column: 1;
    grid-row: auto;
  }

  .workspace-preview img {
    max-height: 25rem;
  }

  .workspace-assessment #workspaceRating {
    grid-column: 1;
    grid-row: auto;
    grid-template-columns: 1fr;
  }

  .workspace-assessment fieldset > label.workspace-rating-option {
    grid-template-columns: 1.5rem 1fr;
    justify-items: start;
    min-height: 3rem;
    text-align: left;
  }

  .workspace-rating-option span {
    display: block;
  }

  .matrix-layout {
    grid-template-columns: 1fr;
  }

  .matrix-summary {
    order: -1;
  }
}

@media (max-width: 760px) {
  body:has(#resultsView:not([hidden])) .page-toolbar .view-tabs,
  .result-tabs {
    display: none;
  }

  body:has(#resultsView:not([hidden])) .page-toolbar {
    display: block;
    padding: .65rem .75rem;
    background: #fff;
  }

  .mobile-view-select {
    display: block;
    width: 100%;
  }

  .results-navigation-heading {
    align-items: stretch;
    flex-direction: column;
    padding: .7rem 1rem;
  }

  .mobile-view-select select {
    width: 100%;
    min-height: 2.75rem;
    border-color: #a9bad2;
    border-radius: .35rem;
  }

  .results-overview {
    padding-block: .65rem;
  }

  .audit-report-toolbar {
    grid-template-columns: minmax(0, 1fr);
    align-items: stretch;
  }

  .audit-report-version-field,
  .audit-report-toolbar-actions,
  .audit-report-toolbar-actions > button {
    width: 100%;
    flex-basis: auto;
  }

  .audit-conclusion-choice-actions {
    width: 100%;
  }

  .audit-conclusion-choice-actions > #writeAuditConclusionManually {
    min-width: 0;
    flex: 1 1 auto;
  }

  .audit-conclusion-choice-actions > .screenshot-alt-text-ai-action {
    width: 3rem;
    flex: 0 0 3rem;
  }

  .audit-report-preview .section-heading,
  .audit-report-preview-actions {
    align-items: stretch;
    flex-direction: column;
  }

  .audit-report-archive-actions,
  .audit-report-archive-actions > button {
    width: 100%;
  }

  .audit-report-placeholder,
  .audit-report-preview iframe {
    min-height: 30rem;
  }
}

@media (max-width: 560px) {
  .workspace-entry-heading {
    grid-template-columns: minmax(0, 1fr);
    gap: .65rem;
    align-items: start;
  }

  .workspace-entry-heading-actions {
    width: 100%;
    justify-self: stretch;
  }

  .workspace-bulk-rating-actions {
    margin-inline-end: auto;
  }

  .workspace-heading-action-button {
    width: 2.75rem;
    min-width: 2.75rem;
  }

  .workspace-bulk-rating-dialog {
    width: calc(100% - 1rem);
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
    margin: auto;
  }

  .workspace-bulk-rating-dialog .dialog-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .workspace-bulk-rating-dialog .dialog-actions button {
    width: auto;
    max-width: 100%;
  }

  .workspace-transition-dialog {
    width: calc(100% - 1rem);
    max-height: calc(100vh - 1rem);
    max-height: calc(100dvh - 1rem);
    margin: auto;
  }

  .workspace-transition-dialog .dialog-actions {
    display: flex;
    flex-direction: column;
    align-items: flex-end;
  }

  .workspace-transition-dialog .dialog-actions button {
    width: auto;
    max-width: 100%;
  }

  .page-selection-heading,
  .page-selection-completion {
    display: grid;
    grid-template-columns: 1fr;
  }

  .page-selection-primary-actions {
    display: grid;
    grid-template-columns: 1fr 1fr;
  }

  .imported-report-page-selection .page-selection-heading {
    gap: 1rem;
    margin-bottom: 1.5rem;
    padding-bottom: 1.25rem;
  }

  .imported-report-page-selection .page-selection-primary-actions {
    grid-template-columns: 1fr;
    width: 100%;
  }

  .imported-report-page-selection .page-selection-primary-actions button {
    width: 100%;
  }

  .matrix-progress-strip {
    grid-template-columns: 1fr;
  }

  .matrix-assessment-progress {
    grid-column: auto;
  }

  .matrix-assessment-progress p {
    white-space: normal;
  }

  .page-selection-completion .section-actions,
  .workspace-run-actions {
    display: grid;
  }

  .page-selection-completion .section-actions {
    grid-template-columns: 1fr;
  }

  .workspace-run-actions {
    grid-template-columns: minmax(0, 1fr);
    width: 100%;
    justify-content: stretch;
  }

  .workspace-run-actions .guided-action-button {
    width: 100%;
  }

  .workspace-progress-strip {
    grid-template-columns: 1fr 1fr;
    padding: .75rem;
  }

  .workspace-progress-metric {
    min-width: 0;
  }

  .audit-workspace-view .workspace-issues {
    margin-bottom: 5rem;
  }

  .audit-workspace-view .workspace-steps,
  .audit-workspace-view .workspace-preview {
    display: none;
  }

  .workspace-actions {
    position: sticky;
    z-index: 5;
    bottom: 0;
    display: grid;
    grid-template-columns: repeat(3, minmax(0, 1fr));
    align-items: start;
    gap: .4rem;
    padding: .65rem;
    background: #fff;
    box-shadow: 0 -.35rem 1rem rgba(7, 29, 66, .12);
  }

  .workspace-save-control {
    min-width: 0;
    width: 100%;
  }

  .workspace-actions .guided-action-button {
    min-width: 0;
    width: 100%;
    padding-inline: .45rem;
    white-space: normal;
  }

  .workspace-actions .dashboard-action-button-icon {
    width: 1rem;
    height: 1rem;
    flex-basis: 1rem;
  }

  .workspace-change-status {
    font-size: .72rem;
  }

  .audit-matrix-view {
    padding-inline: .75rem;
  }

  .audit-matrix-view .matrix-kpis {
    display: none;
  }

  .matrix-legend-toolbar {
    grid-template-columns: 1fr;
  }

  .matrix-legend-toolbar > button {
    width: 100%;
  }
}

@media (forced-colors: active) {
  .audit-primary-action,
  .page-scope-marker,
  .audit-callout-icon,
  .workspace-issue-symbol,
  .matrix-summary-issue-symbol {
    border: 2px solid ButtonText;
    background: ButtonFace;
    color: ButtonText;
  }

  .matrix-state-token,
  button.matrix-cell.active {
    border-color: Highlight;
  }
}
.screenshot-alt-text-dialog {
  width: min(58rem, calc(100vw - 2rem));
  max-height: calc(100dvh - 2rem);
  padding: 0;
  overflow: hidden;
}

.screenshot-alt-text-form {
  grid-template-rows: auto minmax(0, 1fr);
  gap: 0;
  max-height: calc(100dvh - 2rem);
  overflow: hidden;
}

.screenshot-alt-text-header {
  position: relative;
  z-index: 1;
  align-items: center;
  padding: 1.25rem calc(1.25rem + 4px);
  border-bottom: 1px solid var(--border);
  background: #fff;
}

.screenshot-alt-text-header h2 {
  min-width: 0;
  margin: 0;
  overflow-wrap: anywhere;
}

.screenshot-alt-text-scroll-body {
  display: grid;
  gap: 1rem;
  min-width: 0;
  min-height: 0;
  padding: 1.25rem calc(1.25rem + 7px);
  overflow-x: hidden;
  overflow-y: auto;
  overscroll-behavior: contain;
  scrollbar-gutter: stable;
}

.privacy-consent {
  display: grid;
  grid-template-columns: auto 1fr;
  gap: .65rem;
  align-items: start;
  padding: .85rem;
  border: 1px solid var(--border-color, #b8c3cc);
  border-radius: .5rem;
  background: var(--surface-muted, #f4f7f9);
}

.privacy-consent:has(input:focus-visible) {
  outline: 3px solid var(--focus, #facc15);
  outline-offset: 2px;
  box-shadow: 0 0 0 2px #10213f;
}

.privacy-consent input[type="checkbox"] {
  display: grid;
  place-content: center;
  width: 1.2rem;
  min-width: 1.2rem;
  max-width: 1.2rem;
  height: 1.2rem;
  min-height: 1.2rem;
  max-height: 1.2rem;
  margin: .15rem 0 0;
  padding: 0;
  appearance: none;
  border: 2px solid #64748b;
  border-radius: .25rem;
  background: #fff;
  cursor: pointer;
}

.privacy-consent input[type="checkbox"]:checked {
  border-color: var(--twin-blue);
  background-color: var(--twin-blue);
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16'%3E%3Cpath d='m2.5 8.5 3.2 3.2 7.8-8' fill='none' stroke='white' stroke-width='2.2' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E");
  background-position: center;
  background-repeat: no-repeat;
  background-size: .8rem .8rem;
}

.privacy-preview {
  display: grid;
  gap: .5rem;
}

#screenshotPrivacyCanvas {
  display: block;
  max-width: 100%;
  height: auto;
  border: 2px solid var(--text-color, #1b2530);
  border-radius: .35rem;
  background: #fff;
}

#screenshotPrivacyCanvas[data-redaction-enabled="true"] {
  cursor: crosshair;
  touch-action: none;
}

.privacy-mask-grid {
  display: grid;
  grid-template-columns: repeat(4, minmax(7rem, 1fr));
  gap: .75rem;
  margin-block: .75rem;
}

.privacy-mask-grid label {
  display: grid;
  gap: .25rem;
}

.privacy-mask-grid input {
  border: 2px solid #64748b;
  background: #fff;
}

.privacy-mask-actions,
.screenshot-alt-text-actions {
  display: flex;
  justify-content: flex-end;
}

.privacy-mask-actions button,
.screenshot-alt-text-actions button {
  width: auto;
  max-width: 100%;
}

.privacy-mask-list {
  display: grid;
  gap: .5rem;
  margin: .75rem 0 0;
  padding-left: 1.25rem;
}

.privacy-mask-list:empty {
  display: none;
}

.privacy-mask-list li {
  display: flex;
  gap: .75rem;
  justify-content: space-between;
  align-items: center;
}

.privacy-mask-remove {
  flex: 0 0 auto;
}

#screenshotAltTextSuggestion {
  border: 2px solid #64748b;
  background: #fff;
}

@media (forced-colors: active) {
  .privacy-consent input[type="checkbox"] {
    appearance: auto;
    forced-color-adjust: auto;
  }
}

.issue-screenshot-file-list li,
.workspace-issue-screenshot-list li {
  display: grid;
  gap: .5rem;
}

.screenshot-alt-text-field {
  display: grid;
  gap: .25rem;
  min-width: 0;
}

.screenshot-alt-text-control {
  display: grid;
  grid-template-columns: minmax(0, 1fr) 3rem;
  gap: .5rem;
  align-items: start;
}

.screenshot-alt-text-control textarea {
  width: 100%;
}

.screenshot-alt-text-field > .field-help {
  margin: 0;
}

.screenshot-alt-text-ai-action {
  display: inline-grid;
  place-items: center;
  width: 3rem;
  min-width: 3rem;
  height: 3rem;
  min-height: 3rem;
  margin: 0;
  padding: .6rem;
}

.screenshot-alt-text-ai-action svg {
  width: 1.55rem;
  height: 1.55rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.issue-screenshot-dropzone > .file-button,
.project-screenshot-dropzone > .file-button {
  display: inline-flex;
  align-items: center;
  justify-content: center;
}

@media (max-width: 44rem) {
  .screenshot-alt-text-dialog,
  .screenshot-alt-text-form { max-height: calc(100dvh - 1rem); }
  .screenshot-alt-text-header { padding: 1rem calc(1rem + 4px); }
  .screenshot-alt-text-scroll-body { padding: 1rem calc(1rem + 7px); }
  .privacy-mask-grid { grid-template-columns: repeat(2, minmax(7rem, 1fr)); }
  .privacy-mask-list li { align-items: stretch; flex-direction: column; }
  .screenshot-alt-text-actions { align-items: flex-end; flex-direction: column; }
}

@media (forced-colors: active) {
  #screenshotPrivacyCanvas, .privacy-consent, .privacy-mask-grid input { border-color: CanvasText; }
}

.project-portfolio-view {
  display: grid;
  gap: 1.25rem;
}

.project-portfolio-heading {
  display: flex;
  align-items: flex-start;
  justify-content: space-between;
  gap: 1rem;
}

.project-portfolio-heading h2 { margin-block: .2rem; }

.project-portfolio-summary {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 1rem;
}

.project-portfolio-summary-card {
  min-width: 0;
  padding: 1rem;
  border: 1px solid var(--border-color, #d8e0e8);
  border-radius: .75rem;
  background: var(--surface, #fff);
  box-shadow: 0 .25rem 1rem rgb(15 42 64 / .06);
}

.project-portfolio-summary-card dt {
  color: var(--text-muted, #526579);
  font-size: .875rem;
}

.project-portfolio-summary-card dd {
  margin: .35rem 0 0;
  color: var(--text-color, #102a43);
  font-size: 1.75rem;
  font-weight: 700;
}

.project-portfolio-list { padding: 0; overflow: visible; }
.project-portfolio-filters {
  display: grid;
  grid-template-columns: minmax(14rem, 1fr) minmax(10rem, auto) minmax(10rem, auto) auto;
  gap: .75rem;
  align-items: center;
  padding: 1rem;
  border-bottom: 1px solid var(--border-color, #d8e0e8);
}
.project-portfolio-search {
  position: relative;
  min-width: 0;
}
.project-portfolio-search input {
  width: 100%;
  height: 3rem;
  min-height: 3rem;
  padding-inline: 2.7rem 3rem;
  font-weight: 400;
}
.project-portfolio-search input::placeholder {
  font-weight: 400;
  opacity: 1;
}
.project-portfolio-search input::-webkit-search-cancel-button { appearance: none; }
.project-portfolio-search-icon,
.project-portfolio-search-clear {
  position: absolute;
  z-index: 1;
  inset-block: 0;
  display: grid;
  width: 3rem;
  place-items: center;
  color: var(--text-muted, #526579);
}
.project-portfolio-search-icon {
  inset-inline-start: 0;
  pointer-events: none;
}
.project-portfolio-search-clear {
  inset-inline-end: 0;
  height: 3rem;
  min-height: 3rem;
  margin: 0;
  padding: .75rem;
  border: 0;
  border-radius: 0 .625rem .625rem 0;
  background: transparent;
}
.project-portfolio-search-clear:hover { background: #e8f2f8; color: var(--twin-blue-dark); }
.project-portfolio-search-icon svg,
.project-portfolio-search-clear svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.project-portfolio-filter-combobox { width: 100%; }
.project-portfolio-filter-combobox .a11y-combobox__control {
  position: relative;
  grid-template-columns: minmax(0, 1fr) 2.5rem;
  gap: 0;
  height: 3rem;
  min-height: 3rem;
  padding-block: 0;
  padding-inline: .9rem 0;
}
.project-portfolio-filter-combobox .a11y-combobox__control::before {
  position: absolute;
  content: '';
  inset-block: .55rem;
  inset-inline-end: 2.5rem;
  border-inline-start: 1px solid var(--border-color, #d8e0e8);
}
.project-portfolio-filter-combobox .a11y-combobox__value {
  padding-inline-end: .75rem;
  white-space: nowrap;
}
.project-portfolio-filter-combobox .a11y-combobox__chevron { justify-self: center; }
.project-portfolio-filter-reset {
  display: inline-grid;
  align-self: center;
  justify-self: end;
  width: 3rem;
  min-width: 3rem;
  height: 3rem;
  min-height: 3rem;
  margin: 0;
  padding: .7rem;
  place-items: center;
}
.project-portfolio-filter-reset svg {
  width: 1.25rem;
  height: 1.25rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}

.project-portfolio-project {
  display: flex;
  align-items: flex-start;
  gap: .75rem;
  min-width: 13rem;
}
.project-application-icon {
  display: inline-grid;
  flex: 0 0 2.5rem;
  width: 2.5rem;
  height: 2.5rem;
  place-items: center;
  border-radius: .55rem;
  background: #eaf4fb;
  color: #087ab8;
}
.project-application-icon svg {
  width: 1.4rem;
  height: 1.4rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.7;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.project-portfolio-project-copy { min-width: 0; }
.project-portfolio-project-copy strong,
.project-portfolio-project-copy span { display: block; }
.project-portfolio-project-copy span {
  margin-top: .15rem;
  color: var(--text-muted, #526579);
  font-size: .875rem;
}

.portfolio-status {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  padding: .35rem .6rem;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}
.portfolio-status-not_started { color: #445d72; background: #edf2f6; }
.portfolio-status-overdue { color: #9b2c2c; background: #fff0f0; }
.portfolio-status-in_progress { color: #075f94; background: #e7f3fb; }
.portfolio-status-completed { color: #0d6a55; background: #e3f6f1; }
.portfolio-badge-icon {
  flex: 0 0 1.15rem;
  width: 1.15rem;
  height: 1.15rem;
  fill: none;
  stroke: currentColor;
  stroke-width: 1.8;
  stroke-linecap: round;
  stroke-linejoin: round;
}
.portfolio-progress {
  display: inline-flex;
  align-items: center;
  gap: .4rem;
  min-height: 2rem;
  padding: .35rem .65rem;
  border: 1px solid transparent;
  border-radius: 999px;
  font-weight: 700;
  white-space: nowrap;
}
.portfolio-progress-active { color: #075f94; background: #e7f3fb; }
.portfolio-progress-complete { color: #0d6a55; background: #e3f6f1; }
.project-portfolio-progress-cell { text-align: center; }
.portfolio-progress-unavailable {
  display: inline-block;
  color: var(--text-muted, #526579);
  font-weight: 700;
}
.project-portfolio-secondary { display: block; margin-top: .2rem; color: var(--text-muted, #526579); font-size: .82rem; }
.project-portfolio-actions-cell {
  width: 4.25rem;
  text-align: right;
}
.project-portfolio-row-actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: .4rem;
}
.project-portfolio-open-action { flex: 0 0 2.75rem; }

.project-portfolio-empty {
  display: grid;
  min-height: 10rem;
  margin: 0;
  padding: 2rem;
  place-items: center;
  color: var(--text-color, #102a43);
  font-size: 1.05rem;
  font-weight: 700;
  text-align: center;
}

.project-portfolio-footer {
  padding: 1rem;
  border-top: 1px solid var(--border-color, #d8e0e8);
}
.project-portfolio-footer .a11y-combobox--page-size .a11y-combobox__listbox {
  inset: auto 0 calc(100% + .4rem);
}
.project-portfolio-pagination { padding: 0; }

@media (max-width: 70rem) {
  .project-portfolio-summary { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .project-portfolio-filters { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) 3rem; }
  .project-portfolio-search { grid-column: 1 / -1; }
}

@media (max-width: 44rem) {
  .project-portfolio-heading { align-items: stretch; flex-direction: column; }
  .project-portfolio-summary { grid-template-columns: 1fr 1fr; }
  .project-portfolio-filters { grid-template-columns: minmax(0, 1fr) 3rem; }
  .project-portfolio-filter-status { grid-column: 1 / -1; }
}

@media (forced-colors: active) {
  .project-application-icon,
  .portfolio-status,
  .portfolio-progress,
  .project-portfolio-summary-card { border: 1px solid CanvasText; }
}

/* Schlanke Unterregister innerhalb der Projektverwaltung. */
.result-tabs.project-management-tabs {
  display: flex;
  align-items: stretch;
  justify-content: flex-start;
  flex-flow: row nowrap;
  gap: 1rem;
  padding: 0 .25rem;
  overflow-x: auto;
  border-bottom: 1px solid var(--border);
}

.result-tabs.project-management-tabs button {
  width: auto;
  min-height: 3rem;
  padding: .7rem 1rem .65rem;
  border: 0;
  border-bottom: .25rem solid transparent;
  border-radius: 0;
  background: transparent;
  color: #4b5563;
  font-weight: 700;
}

.result-tabs.project-management-tabs button:hover {
  border-bottom-color: #94c1e5;
  background: #eef7fd;
  color: var(--twin-blue);
}

.result-tabs.project-management-tabs button[aria-selected="true"] {
  border-bottom-color: var(--twin-blue);
  background: transparent;
  color: var(--twin-blue);
  font-weight: 800;
}

.result-tabs.project-management-tabs button[aria-selected="true"]:hover {
  background: #eef7fd;
  color: var(--twin-blue);
}

@media (max-width: 760px) {
  .result-tabs.project-management-tabs {
    display: flex;
  }
}

@media (forced-colors: active) {
  .result-tabs.project-management-tabs button[aria-selected="true"] {
    border-bottom-color: Highlight;
    background: Canvas;
    color: Highlight;
    forced-color-adjust: none;
  }
}

/* Begrenzte, klar abgegrenzte Personendetails ohne verschachtelte Scrollbereiche. */
.identity-user-details {
  margin-top: 1rem;
  padding: 1rem;
  border: 2px solid #75a9d3;
  border-inline-start: .45rem solid var(--twin-blue);
  border-radius: .75rem;
  background: #eaf4fb;
}

.identity-user-detail-heading {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
}

.identity-user-detail-heading h4 {
  margin: 0;
  color: var(--twin-blue-dark);
}

.result-tabs.identity-user-detail-tabs {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: .35rem;
  margin-top: 1rem;
  padding: 0;
  border-bottom: 1px solid #9fc1dc;
}

.result-tabs.identity-user-detail-tabs.has-two-tabs {
  grid-template-columns: repeat(2, minmax(0, 1fr));
}

.result-tabs.identity-user-detail-tabs button {
  width: 100%;
  min-width: 0;
  white-space: normal;
}

.identity-user-detail-panel {
  padding: 1rem;
  border: 1px solid #b6cadb;
  border-top: 0;
  border-radius: 0 0 .65rem .65rem;
  background: #fff;
}

.identity-user-detail-panel[hidden] {
  display: none !important;
}

.identity-user-detail-panel > h4 {
  margin-bottom: .75rem;
  color: var(--twin-blue-dark);
}

.identity-user-detail-panel .identity-detail-list {
  margin-top: 0;
}

.identity-detail-empty {
  padding: 1rem;
  border: 1px dashed #9aa9ba;
  border-radius: .6rem;
  background: #f8fafc;
  color: var(--muted);
}

.identity-user-detail-pagination {
  padding-top: .25rem;
  border-top: 1px solid #d7dee7;
}

.identity-user-detail-error {
  display: grid;
  gap: .75rem;
  justify-items: start;
}

.identity-user-detail-error .inline-state {
  margin: 0;
}

.identity-data-review-note {
  padding: .65rem .75rem;
  border-inline-start: .3rem solid #a16207;
  background: #fffbeb;
}

@media (max-width: 620px) {
  .identity-user-details {
    padding: .75rem;
  }

  .result-tabs.identity-user-detail-tabs {
    grid-template-columns: minmax(0, 1fr);
    border-bottom: 0;
  }

  .result-tabs.identity-user-detail-tabs.has-two-tabs {
    grid-template-columns: minmax(0, 1fr);
  }

  .result-tabs.identity-user-detail-tabs button {
    border-radius: .55rem;
  }

  .identity-user-detail-panel {
    margin-top: .5rem;
    border-top: 1px solid #b6cadb;
    border-radius: .65rem;
  }
}

@media (forced-colors: active) {
  .identity-user-details,
  .identity-user-detail-panel,
  .identity-detail-empty {
    border-color: CanvasText;
  }
}
