@charset "UTF-8";

/* =============================================================================
   Referenzdatenbank Fokus Versorgung – globales Stylesheet
   Quelle: docs/Anforderungen/referenzdatenbank_prototyp_v2_aktualisiert.html
   Das Design des Prototyps ist verbindlich; die Klassennamen bleiben unverändert.
   Neue Stile gehören nach Möglichkeit in .razor.css der jeweiligen Komponente.
   ============================================================================= */

/* Encode Sans, selbst gehostet (DSGVO: keine Verbindung zu Google Fonts).
   Variable Schrift, Gewichtsachse 100-900, Zeichensatz Latin und Latin-Extended-A (358 Zeichen).
   Enthält Umlaute, ß, deutsche Anführungszeichen, Gedankenstrich, Euro und Paragraf.
   Lizenz: SIL Open Font License, siehe fonts/OFL.txt */
@font-face {
  font-family: "Encode Sans";
  /* Die Datei enthält nur die Gewichtsachse (wght 100–900), keine wdth-Achse –
     deshalb kein font-stretch. Geprüft mit fontTools über die fvar-Tabelle. */
  /* Zweiter Eintrag als Rückfall: tech() kennen erst Chrome 108, Safari 17 und
     Firefox 110. Ältere Browser verwerfen sonst das ganze src und setzen still
     Arial. Geladen wird trotzdem nur einmal – der erste verstandene Eintrag. */
  src:
    url("fonts/encode-sans-variable-latin.woff2") format("woff2")
      tech(variations),
    url("fonts/encode-sans-variable-latin.woff2") format("woff2");
  font-weight: 100 900;
  font-style: normal;
  font-display: swap;
}

/* ---------------------------------------------------------------------------
   Übernommen aus dem UI-Prototyp (unverändert)
   --------------------------------------------------------------------------- */
:root {
  --reliability: #0b141c;
  --trust: #0f3449;
  --expertise: #265377;
  --precision: #c2c0c4;
  --transparency: #f8f7f7;
  --clarity: #a4cbe0;
  --ink: #0b141c;
  --muted: #627481;
  --line: #d9e1e5;
  --surface: #fff;
  --soft: #edf3f5;
  --good: #2c7b68;
  --good-bg: #e5f2ee;
  --warn: #8a631f;
  --warn-bg: #fff3d9;
  --bad: #9b4843;
  --bad-bg: #fae9e7;
  --shadow: 0 18px 50px rgba(11, 20, 28, 0.09);
  --radius: 10px;
}
* {
  box-sizing: border-box;
}
html,
body {
  margin: 0;
  background: var(--transparency);
  color: var(--ink);
  font-family: "Encode Sans", Arial, sans-serif;
  font-size: 14px;
}
button,
input,
select,
textarea {
  font: inherit;
}
button {
  cursor: pointer;
}
:focus-visible {
  /* Abweichung vom Prototyp: dessen heller Ring (--clarity) erreicht auf Weiß
     nur rund 1,8:1 und verfehlt WCAG 1.4.11 (mindestens 3:1). */
  outline: 3px solid var(--expertise);
  outline-offset: 2px;
}
.rail :focus-visible,
.admin-nav :focus-visible,
.toast :focus-visible,
.record-table th :focus-visible {
  /* Auf den dunklen Flächen umgekehrt: heller Ring auf dunklem Grund. */
  outline-color: var(--clarity);
}
button:disabled,
input:disabled,
select:disabled,
textarea:disabled {
  opacity: 0.5;
  cursor: not-allowed;
}
.app {
  min-height: 100vh;
  display: grid;
  grid-template-columns: 230px minmax(0, 1fr);
}
.rail {
  background: var(--reliability);
  color: #fff;
  padding: 26px 16px 18px;
  display: flex;
  flex-direction: column;
}
.brand {
  padding: 0 10px 23px;
  border-bottom: 1px solid rgba(255, 255, 255, 0.15);
}
.brand-logo {
  display: block;
  width: 190px;
  height: auto;
  max-height: 104px;
  object-fit: contain;
  object-position: left center;
  margin: 0 0 12px;
  filter: brightness(0) invert(1);
}
.brand-symbol {
  width: 40px;
  height: 40px;
  border-radius: 8px 8px 16px 8px;
  background: var(--clarity);
  color: var(--trust);
  display: grid;
  place-items: center;
  font-weight: 800;
  margin-bottom: 14px;
}
.brand-title {
  font-size: 15px;
  font-weight: 800;
}
.brand-sub {
  font-size: 10px;
  color: #aebcc3;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  margin-top: 5px;
}
.nav-title {
  font-size: 10px;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: #8da1ad;
  font-weight: 700;
  margin: 23px 10px 9px;
}
.nav {
  display: grid;
  gap: 3px;
}
.nav button,
.nav a {
  border: 0;
  background: none;
  color: #b8c7ce;
  text-align: left;
  border-radius: 7px;
  padding: 11px 12px;
  display: flex;
  gap: 10px;
  align-items: center;
  font-weight: 600;
}
.nav button:hover,
.nav a:hover {
  background: rgba(255, 255, 255, 0.08);
  color: white;
}
.nav button.on,
.nav a.on {
  background: var(--transparency);
  color: var(--trust);
  box-shadow: inset 3px 0 var(--clarity);
}
.nav-icon {
  width: 18px;
  text-align: center;
  color: var(--clarity);
  font-size: 16px;
}
/* Die Sinnbilder sind Inline-SVG (siehe NavMenu.razor): Encode Sans enthält
   die Zeichen des Prototyps nicht. flex-shrink hält sie in der schmalen
   Leiste unter 1100 px auf Größe. */
.nav-icon svg {
  display: block;
  width: 16px;
  height: 16px;
  margin: 0 auto;
  flex-shrink: 0;
}
.main {
  min-width: 0;
}
.topbar {
  height: 70px;
  background: #fff;
  border-bottom: 1px solid var(--line);
  display: flex;
  align-items: center;
  justify-content: space-between;
  padding: 0 34px;
  position: sticky;
  top: 0;
  z-index: 5;
}
.crumb {
  font-size: 12px;
  color: var(--muted);
}
.crumb b {
  color: var(--ink);
}
.topbar-right {
  display: flex;
  align-items: center;
  gap: 12px;
}
.last-sync {
  color: var(--muted);
  font-size: 11px;
}
/* Angemeldeter Benutzer, verweist auf die Kontoverwaltung. Bewusst nicht
   .last-sync: Die Klasse gehört zum Synchronisierungsstand und wird unter
   720 px ausgeblendet – wer angemeldet ist, muss aber sichtbar bleiben. */
.topbar-user {
  color: var(--trust);
  font-size: 12px;
  font-weight: 700;
  text-decoration: none;
  max-width: 220px;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.topbar-user:hover {
  text-decoration: underline;
}
.role {
  border: 1px solid var(--line);
  border-radius: 6px;
  height: 35px;
  padding: 0 9px;
  color: var(--trust);
  font-weight: 700;
  background: #fff;
}
.content {
  padding: 34px;
  max-width: 1450px;
  margin: auto;
}
.kicker {
  color: var(--expertise);
  font-size: 10px;
  letter-spacing: 0.17em;
  text-transform: uppercase;
  font-weight: 800;
  margin-bottom: 9px;
}
h1 {
  font-size: 38px;
  line-height: 1;
  letter-spacing: -0.055em;
  margin: 0;
  color: var(--reliability);
  font-weight: 800;
}
h2 {
  font-size: 23px;
  letter-spacing: -0.04em;
  margin: 0;
}
h3 {
  font-size: 15px;
  margin: 0;
}
.lede {
  color: var(--muted);
  line-height: 1.55;
  max-width: 740px;
  margin: 11px 0 0;
}
.page-header {
  display: flex;
  justify-content: space-between;
  gap: 20px;
  align-items: flex-start;
  margin-bottom: 27px;
}
.actions {
  display: flex;
  gap: 8px;
  flex-wrap: wrap;
}
.btn {
  border: 1px solid transparent;
  border-radius: 6px;
  min-height: 37px;
  padding: 0 13px;
  display: inline-flex;
  gap: 8px;
  align-items: center;
  justify-content: center;
  font-weight: 700;
  transition: 0.15s ease;
}
.btn:hover {
  transform: translateY(-1px);
}
.primary {
  background: var(--trust);
  color: white;
  box-shadow: 0 6px 12px rgba(15, 52, 73, 0.16);
}
.primary:hover {
  background: var(--expertise);
}
.secondary {
  background: #fff;
  border-color: var(--line);
  color: var(--trust);
}
.secondary:hover {
  border-color: #9cb7c3;
}
.accent {
  background: var(--clarity);
  color: var(--trust);
}
.danger {
  background: var(--bad-bg);
  border-color: #efc4c1;
  color: var(--bad);
}
.small {
  min-height: 30px;
  padding: 0 9px;
  font-size: 11px;
}
.metric-row {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 12px;
  margin-bottom: 20px;
}
.metric {
  background: #fff;
  border: 1px solid var(--line);
  border-top: 3px solid var(--trust);
  padding: 16px 17px 14px;
  min-height: 106px;
}
.metric:nth-child(2) {
  border-top-color: var(--expertise);
}
.metric:nth-child(3) {
  border-top-color: var(--clarity);
}
.metric:nth-child(4) {
  border-top-color: var(--precision);
}
.metric-label {
  color: var(--muted);
  font-size: 10px;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: 0.13em;
}
.metric-number {
  font-size: 30px;
  font-weight: 800;
  letter-spacing: -0.06em;
  margin-top: 8px;
}
.metric-note {
  font-size: 11px;
  color: var(--muted);
  margin-top: 2px;
}
/* Hinweisblöcke auf Verwaltungsseiten (FV-41). Bewusst eigene Klassen und
   nicht .alert/.alert-warning aus dem Bootstrap-Übergangsblock weiter unten:
   Der fällt mit FV-32 weg, und eine neue Seite soll nicht daran hängen. Die
   Farben sind die Statusfarben des Prototyps. */
.hinweis {
  border: 1px solid var(--line);
  border-left: 3px solid var(--precision);
  background: #fff;
  padding: 13px 15px;
  line-height: 1.55;
  margin-bottom: 16px;
}

.hinweis.warnung {
  border-left-color: var(--warn);
  background: var(--warn-bg);
  color: var(--warn);
}

.hinweis.stoerung {
  border-left-color: var(--bad);
  background: var(--bad-bg);
  color: var(--bad);
}

.hinweis code {
  color: inherit;
  word-break: break-word;
}

.list-card {
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: var(--shadow);
}
.list-toolbar {
  padding: 14px;
  display: flex;
  gap: 8px;
  align-items: center;
  flex-wrap: wrap;
  border-bottom: 1px solid var(--line);
  background: #fbfcfc;
}
.search-wrap {
  flex: 1 1 290px;
  position: relative;
}
.search-wrap:before {
  /* Abweichung vom Prototyp: dessen Glyphe U+2315 ist weder in Encode Sans noch
     im Subset enthalten und fiele je nach System auf ein leeres Kästchen zurück.
     Gleiches Bild als SVG, damit es überall gleich aussieht. */
  content: "";
  width: 16px;
  height: 16px;
  background: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 16 16' fill='none' stroke='%23627481' stroke-width='1.6'%3E%3Ccircle cx='7' cy='7' r='4.5'/%3E%3Cpath d='M10.4 10.4 14 14' stroke-linecap='round'/%3E%3C/svg%3E")
    no-repeat center;
  position: absolute;
  left: 11px;
  top: 11px;
}
.search {
  width: 100%;
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 0 12px 0 32px;
  color: var(--ink);
}
.toolbar-select {
  height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: white;
  color: var(--trust);
  padding: 0 10px;
  font-weight: 600;
}
.filter-chip {
  min-height: 38px;
  border: 1px solid var(--line);
  border-radius: 6px;
  background: #fff;
  color: var(--muted);
  padding: 0 10px;
  font-size: 11px;
  font-weight: 700;
}
.filter-chip b {
  color: var(--trust);
  margin-left: 4px;
}
.filter-chip.active {
  border-color: #8fb7ca;
  background: #f0f7fa;
  color: var(--trust);
}
.toolbar-foot {
  display: flex;
  justify-content: space-between;
  align-items: center;
  width: 100%;
  padding-top: 3px;
  color: var(--muted);
  font-size: 11px;
}
.clear {
  border: 0;
  background: none;
  color: var(--expertise);
  font-weight: 700;
  padding: 0;
}
.record-table {
  width: 100%;
  border-collapse: collapse;
}
.record-table th {
  text-align: left;
  padding: 11px 14px;
  background: var(--trust);
  color: #fff;
  font-size: 10px;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  font-weight: 700;
}
.record-table td {
  padding: 14px;
  border-bottom: 1px solid #edf1f2;
  vertical-align: middle;
}
.record-table tbody tr {
  transition: background 0.12s;
}
.record-table tbody tr:hover {
  background: #f4f9fa;
}
.record-table tbody tr.selected {
  background: #edf6f7;
  box-shadow: inset 4px 0 var(--clarity);
}
.record-table tbody tr.archived {
  /* Statt opacity (senkt den Kontrast unkontrolliert) ein fester Tonwert.
     Hover und Auswahl brauchen eigene Regeln: gleiche Spezifität, aber diese
     Regel steht später im Stylesheet und gewänne sonst. */
  color: #5f6f78;
  background: #fbfbfc;
}
.record-table tbody tr.archived:hover {
  background: #f2f6f7;
}
.record-table tbody tr.archived.selected {
  background: #e8f1f2;
}
.record-number {
  font:
    700 11px ui-monospace,
    monospace;
  color: var(--expertise);
}
.record-name {
  font-weight: 750;
  margin-top: 4px;
}
.record-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 3px;
}
.tag {
  display: inline-flex;
  align-items: center;
  border-radius: 999px;
  min-height: 23px;
  padding: 0 8px;
  background: var(--soft);
  color: var(--trust);
  font-size: 10px;
  font-weight: 750;
  white-space: nowrap;
}
.tag.good {
  background: var(--good-bg);
  color: var(--good);
}
.tag.warn {
  background: var(--warn-bg);
  color: var(--warn);
}
.tag.bad {
  background: var(--bad-bg);
  color: var(--bad);
}
.tag.arch {
  background: #e7ebed;
  color: #687985;
}
.row-actions {
  display: flex;
  gap: 6px;
  justify-content: flex-end;
}
.dbl-hint {
  padding: 11px 14px;
  background: #f8fbfb;
  border-top: 1px solid var(--line);
  color: var(--muted);
  font-size: 11px;
}
.modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: 30;
  background: rgba(11, 20, 28, 0.65);
  display: grid;
  place-items: center;
  padding: 22px;
}
.modal {
  background: #fff;
  width: min(1180px, 100%);
  max-height: calc(100vh - 44px);
  overflow: auto;
  box-shadow: 0 24px 90px rgba(0, 0, 0, 0.3);
}
.modal-head {
  position: sticky;
  top: 0;
  z-index: 2;
  background: #fff;
  border-bottom: 1px solid var(--line);
  padding: 20px 25px 17px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
}
.modal-title {
  display: flex;
  gap: 14px;
  align-items: flex-start;
}
.modal-mark {
  width: 33px;
  height: 33px;
  display: grid;
  place-items: center;
  background: var(--trust);
  color: white;
  font-weight: 800;
  border-radius: 5px;
}
.modal-head h2 {
  font-size: 24px;
}
.modal-sub {
  font-size: 11px;
  color: var(--muted);
  margin-top: 4px;
}
.modal-close {
  border: 0;
  background: none;
  font-size: 25px;
  color: var(--muted);
  width: 34px;
  height: 34px;
  border-radius: 5px;
}
.modal-close:hover {
  background: var(--soft);
  color: var(--ink);
}
.modal-body {
  padding: 23px 25px;
}
.editor-layout {
  display: grid;
  grid-template-columns: minmax(0, 1.45fr) minmax(260px, 0.55fr);
  gap: 18px;
}
.editor-main,
.editor-aside {
  min-width: 0;
}
.form-section {
  border: 1px solid var(--line);
  margin-bottom: 14px;
  background: #fff;
}
.form-section-head {
  padding: 12px 14px;
  border-bottom: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  background: #fbfcfc;
}
.form-section-head strong {
  font-size: 12px;
  color: var(--trust);
  text-transform: uppercase;
  letter-spacing: 0.08em;
}
.form-section-body {
  padding: 14px;
}
.form-grid > .field:has(input[data-e="number"]) {
  order: -1;
}
.legacy-performance {
  display: none !important;
}
.form-grid {
  display: grid;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  gap: 12px;
}
.form-grid.three {
  grid-template-columns: repeat(3, minmax(0, 1fr));
}
.form-grid.four {
  grid-template-columns: repeat(4, minmax(0, 1fr));
}
.full {
  grid-column: 1/-1;
}
.field-with-check {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 8px;
  align-items: end;
}
.field-with-check .check {
  margin: 0;
  min-height: 36px;
  white-space: nowrap;
}
.field-with-check .check input {
  margin: 0;
}
.subsection-title {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--expertise);
  font-weight: 800;
  margin: 4px 0 10px;
}
.engineer-list {
  display: grid;
  gap: 7px;
}
.engineer-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  border: 1px solid var(--line);
  padding: 9px 10px;
  background: #fbfcfc;
}
.engineer-item small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}
.engineer-item .check {
  margin: 0;
}
.field label,
.mini-label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  margin-bottom: 5px;
}
.input,
.select,
.textarea {
  width: 100%;
  border: 1px solid #cbd8dd;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  min-height: 36px;
  padding: 8px 9px;
}
.textarea {
  min-height: 84px;
  line-height: 1.45;
  resize: vertical;
}
.locked {
  background: #f0f3f4;
  /* Abweichung vom Prototyp: dessen #74848b erreicht rund 3,5:1 und verfehlt
     WCAG 1.4.3. Gesperrte Felder zeigen BC-Werte, die lesbar sein müssen. */
  color: #56666e;
}
.check {
  display: flex;
  gap: 7px;
  align-items: center;
  color: var(--muted);
  font-size: 11px;
  font-weight: 600;
  margin-top: 6px;
}
.check input {
  accent-color: var(--expertise);
}
.aside-panel {
  border-left: 3px solid var(--clarity);
  background: #f3f8f9;
  padding: 14px;
  margin-bottom: 14px;
}
.aside-title {
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.12em;
  color: var(--expertise);
  font-weight: 800;
  margin-bottom: 10px;
}
.aside-row {
  display: flex;
  justify-content: space-between;
  gap: 12px;
  border-bottom: 1px solid #dbe7ea;
  padding: 9px 0;
  font-size: 11px;
}
.aside-row:last-child {
  border-bottom: 0;
}
.aside-row span {
  color: var(--muted);
}
.aside-row strong {
  text-align: right;
  color: var(--trust);
}
.mini-row {
  display: grid;
  gap: 7px;
  align-items: end;
  margin-bottom: 8px;
}
.location {
  grid-template-columns: 1.1fr 0.45fr 0.7fr 1fr auto;
}
.line {
  grid-template-columns: 0.8fr 0.9fr 0.65fr 0.75fr 0.8fr 0.6fr 0.5fr auto;
}
.mini-input,
.mini-select {
  min-width: 0;
  width: 100%;
  min-height: 33px;
  border: 1px solid var(--line);
  border-radius: 4px;
  background: #fff;
  padding: 6px;
  font-size: 11px;
  color: var(--ink);
}
.mini-check {
  height: 33px;
  border: 1px solid var(--line);
  display: grid;
  place-items: center;
  border-radius: 4px;
  background: #fafcfc;
}
.mini-check input {
  accent-color: var(--expertise);
}
.x {
  width: 32px;
  height: 33px;
  border: 1px solid var(--line);
  background: #fff;
  border-radius: 4px;
  color: var(--muted);
  font-weight: 800;
}
.x:hover {
  background: var(--bad-bg);
  color: var(--bad);
  border-color: #efc4c1;
}
.modal-foot {
  position: sticky;
  bottom: 0;
  padding: 13px 25px;
  background: #fbfcfc;
  border-top: 1px solid var(--line);
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}
.modal-foot-note {
  font-size: 11px;
  color: var(--muted);
}
.modal-foot-actions {
  display: flex;
  gap: 8px;
}
.filter-pop {
  position: fixed;
  z-index: 15;
  top: 125px;
  left: 50%;
  transform: translateX(-50%);
  width: min(720px, calc(100vw - 30px));
  background: #fff;
  border: 1px solid var(--line);
  box-shadow: 0 20px 60px rgba(11, 20, 28, 0.18);
  padding: 16px;
}
.filter-pop-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  margin-bottom: 13px;
}
.filter-pop-grid {
  display: grid;
  grid-template-columns: 1.2fr 0.8fr 0.75fr 0.75fr;
  gap: 8px;
}
.filter-pop-foot {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-top: 12px;
}
.select-field {
  width: 100%;
  height: 36px;
  border: 1px solid var(--line);
  border-radius: 5px;
  padding: 0 8px;
  color: var(--trust);
  background: #fff;
}
.empty {
  padding: 35px;
  text-align: center;
  color: var(--muted);
}
.toast {
  position: fixed;
  right: 20px;
  bottom: 20px;
  z-index: 50;
  background: var(--reliability);
  color: #fff;
  border-left: 4px solid var(--clarity);
  padding: 12px 14px;
  box-shadow: var(--shadow);
  font-size: 12px;
  font-weight: 700;
  max-width: 400px;
}
.toast.bad {
  border-left-color: #d2766f;
}
.admin-page {
  display: grid;
  gap: 17px;
}
.admin-grid {
  display: grid;
  grid-template-columns: 220px minmax(0, 1fr);
  gap: 16px;
}
.admin-nav {
  background: var(--trust);
  padding: 10px;
  height: max-content;
}
.admin-nav button,
.admin-nav a {
  /* display: block steht nicht im Prototyp, weil der hier <button> benutzt und
     die als inline-block ohnehin eine Breite annehmen. Unsere Reiter sind
     Verweise (eigene Adresse je Katalog), und ein <a> ist inline: width: 100%
     bliebe wirkungslos, die Reiter flössen wie Text nebeneinander statt
     untereinander. In der Seitenleiste fällt das nicht auf, dort setzt
     .nav a schon display: flex. */
  display: block;
  width: 100%;
  text-align: left;
  background: none;
  border: 0;
  color: #c3d2d9;
  padding: 10px;
  border-radius: 5px;
  font-weight: 650;
}
.admin-nav button.active,
.admin-nav button:hover,
.admin-nav a.active,
.admin-nav a:hover {
  background: rgba(255, 255, 255, 0.12);
  color: #fff;
}
.cards {
  display: grid;
  grid-template-columns: repeat(3, minmax(0, 1fr));
  gap: 12px;
}
.card {
  background: #fff;
  border: 1px solid var(--line);
  padding: 15px;
}
.file-mark {
  height: 76px;
  display: grid;
  place-items: center;
  background: #e7f0f4;
  color: var(--expertise);
  font:
    800 21px ui-monospace,
    monospace;
  margin-bottom: 12px;
}
.card h3 {
  font-size: 13px;
}
.card p {
  font-size: 11px;
  color: var(--muted);
  line-height: 1.5;
}
.card-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  margin-top: 12px;
}
.catalog-items {
  display: grid;
  gap: 7px;
  margin-top: 13px;
}
.catalog-item {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 12px;
  border: 1px solid var(--line);
  padding: 9px 10px;
  background: #fbfcfc;
}
.catalog-item span {
  font-size: 12px;
  font-weight: 700;
}
.catalog-item small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}
.catalog-item.inactive {
  color: #5f6f78;
  background: #f4f6f7;
}
.word-preview {
  background: #eff2ef;
  padding: 24px;
}
.word-sheet {
  background: white;
  max-width: 620px;
  margin: auto;
  padding: 40px 44px;
  box-shadow: 0 5px 24px rgba(11, 20, 28, 0.14);
  font-family: Georgia, serif;
  color: #1c303b;
}
.word-kicker {
  font:
    700 10px ui-monospace,
    monospace;
  color: var(--expertise);
  letter-spacing: 0.13em;
  text-transform: uppercase;
}
.word-sheet h1 {
  font:
    700 29px Georgia,
    serif;
  letter-spacing: -0.035em;
  margin: 16px 0 7px;
  color: var(--trust);
}
.word-sub {
  color: #71848e;
  margin-bottom: 22px;
}
.word-table {
  width: 100%;
  border-collapse: collapse;
  font:
    12px Arial,
    sans-serif;
}
.word-table td {
  padding: 8px 3px;
  border-bottom: 1px solid #dce5e7;
}
.word-table td:first-child {
  color: #72828a;
  width: 38%;
}
.word-warn {
  margin-top: 16px;
  background: var(--warn-bg);
  border: 1px solid #eed895;
  color: var(--warn);
  font:
    12px Arial,
    sans-serif;
  padding: 10px;
}
.hidden {
  display: none !important;
}
@media (max-width: 1100px) {
  .app {
    grid-template-columns: 1fr;
  }
  .rail {
    position: static;
    padding: 14px;
  }
  .brand {
    display: flex;
    gap: 11px;
    align-items: center;
    padding: 2px 3px 12px;
  }
  .brand-symbol {
    margin: 0;
    width: 32px;
    height: 32px;
  }
  .brand-logo {
    width: 175px;
    max-height: 82px;
    margin: 0;
  }
  .nav-title {
    display: none;
  }
  .nav {
    display: flex;
    overflow-x: auto;
    padding-top: 10px;
  }
  .nav button,
  .nav a {
    white-space: nowrap;
  }
  .content {
    padding: 24px 18px;
  }
  .editor-layout {
    grid-template-columns: 1fr;
  }
  .metric-row {
    grid-template-columns: repeat(2, 1fr);
  }
  .admin-grid {
    grid-template-columns: 1fr;
  }
  .admin-nav {
    display: flex;
    overflow-x: auto;
    gap: 4px;
  }
  .admin-nav button,
  .admin-nav a {
    white-space: nowrap;
    width: auto;
  }
  .cards {
    grid-template-columns: repeat(2, 1fr);
  }
}
@media (max-width: 720px) {
  .topbar {
    height: auto;
    min-height: 61px;
    padding: 12px 15px;
    gap: 10px;
  }
  .last-sync {
    display: none;
  }
  .topbar-user {
    max-width: 120px;
  }
  .topbar-right {
    gap: 7px;
  }
  .page-header {
    display: block;
  }
  .page-header .actions {
    margin-top: 17px;
  }
  .content {
    padding: 20px 12px;
  }
  h1 {
    font-size: 32px;
  }
  .metric-row {
    grid-template-columns: 1fr 1fr;
    gap: 8px;
  }
  .metric {
    padding: 12px;
    min-height: 95px;
  }
  .metric-number {
    font-size: 25px;
  }
  .record-table {
    /* Abweichung vom Prototyp: dort steht hier display:block auf dem <table>.
       Das nimmt der Tabelle ihre Rolle für Screenreader. Gescrollt wird
       stattdessen im Container .table-scroll (siehe unten). */
    white-space: nowrap;
  }
  .record-table td {
    padding: 12px;
  }
  .record-table th {
    padding: 10px 12px;
  }
  .form-grid,
  .form-grid.three,
  .form-grid.four {
    grid-template-columns: 1fr;
  }
  .full {
    grid-column: auto;
  }
  .location,
  .line {
    grid-template-columns: repeat(2, minmax(0, 1fr));
  }
  .location .x,
  .line .x {
    grid-column: 2;
  }
  .modal {
    max-height: 100vh;
  }
  .modal-backdrop {
    padding: 0;
  }
  .modal-head,
  .modal-body,
  .modal-foot {
    padding-left: 16px;
    padding-right: 16px;
  }
  .filter-pop-grid {
    grid-template-columns: 1fr 1fr;
  }
  .cards {
    grid-template-columns: 1fr;
  }
  .modal-foot {
    display: block;
  }
  .modal-foot-actions {
    justify-content: flex-end;
    margin-top: 9px;
  }
}

/* ---------------------------------------------------------------------------
   Anpassung am Prototyp-CSS
   Der Prototyp färbt sein farbiges Logo per filter:brightness(0) invert(1)
   weiss ein. Wir liefern die helle Logovariante als eigene Datei aus, deshalb
   entfällt der Filter - er würde das weiße Logo schwarz färben.
   --------------------------------------------------------------------------- */
.brand-logo {
  filter: none;
}

/* ---------------------------------------------------------------------------
   Ergaenzungen: Klassen, die der Prototyp im Markup verwendet, aber nicht
   definiert (muted, section-note, table-caption, required-star, small-btn,
   required-grid, required-option, bc-option, user-table). Stile aus den
   vorhandenen Tokens abgeleitet.
   --------------------------------------------------------------------------- */
.muted {
  color: var(--muted);
}
.section-note {
  font-size: 11px;
  color: var(--muted);
}
.table-caption {
  font-size: 11px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  color: var(--expertise);
  font-weight: 800;
}
.required-star {
  color: var(--bad);
  font-weight: 700;
}
.small-btn {
  border: 1px solid var(--line);
  border-radius: 6px;
  min-height: 30px;
  padding: 0 9px;
  background: #fff;
  color: var(--trust);
  font-size: 11px;
  font-weight: 700;
}
.small-btn:hover {
  border-color: #9cb7c3;
}
.required-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(235px, 1fr));
  gap: 8px;
  padding: 14px;
}
.required-option {
  display: flex;
  gap: 9px;
  align-items: flex-start;
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px;
  background: #fbfcfc;
  cursor: pointer;
}
.required-option.selected {
  border-color: #8fb7ca;
  background: #f0f7fa;
}
.required-option input {
  margin: 2px 0 0;
  accent-color: var(--expertise);
}
.required-option strong {
  font-size: 12px;
  color: var(--trust);
}
.required-option small {
  display: block;
  color: var(--muted);
  font-size: 10px;
  margin-top: 2px;
}
.bc-option:hover {
  border-color: #9cb7c3;
  background: #fbfcfc;
}
.user-table td {
  vertical-align: middle;
}

/* ---------------------------------------------------------------------------
   Blazor-eigene Stile (Formularvalidierung, Fehleranzeige, Wiederverbindung)
   --------------------------------------------------------------------------- */
/* Validierung bewusst über box-shadow statt outline: outline ist eine einzige
   Eigenschaft, sonst überschreibt der Validierungszustand den Fokusring und der
   Tastaturfokus wäre in ausgefüllten Formularen unsichtbar (WCAG 2.4.7). */
.valid.modified:not([type="checkbox"]) {
  box-shadow: inset 0 0 0 1px var(--good);
}
.invalid {
  box-shadow: inset 0 0 0 1px var(--bad);
  border-color: var(--bad);
}
.validation-message {
  display: block;
  color: var(--bad);
  font-size: 11px;
  font-weight: 600;
  margin-top: 4px;
}
.blazor-error-boundary {
  background: var(--bad-bg);
  border-left: 4px solid var(--bad);
  color: var(--bad);
  padding: 14px 16px;
  font-weight: 700;
}
.blazor-error-boundary::after {
  content: "Es ist ein Fehler aufgetreten.";
}
#blazor-error-ui {
  position: fixed;
  left: 0;
  bottom: 0;
  width: 100%;
  z-index: 1000;
  display: none;
  box-sizing: border-box;
  color-scheme: light only;
  background: var(--warn-bg);
  border-top: 1px solid #eed895;
  color: var(--warn);
  padding: 12px 46px 12px 16px;
  font-size: 12px;
  font-weight: 700;
  box-shadow: 0 -2px 10px rgba(11, 20, 28, 0.12);
}
#blazor-error-ui .reload {
  color: var(--trust);
  margin-left: 8px;
}
#blazor-error-ui .dismiss {
  position: absolute;
  right: 14px;
  top: 9px;
  cursor: pointer;
}

/* ---------------------------------------------------------------------------
   Ergänzungen zum Prototyp-CSS
   --------------------------------------------------------------------------- */

/* Nur helles Design (CLAUDE.md). Ohne diese Angabe rendern Browser im
   Dunkelmodus Systemelemente wie Auswahllisten, Kalender und Bildlaufleisten
   dunkel – auf hellem Grund unleserlich. */
:root {
  color-scheme: light;
}

/* Der Prototyp definiert keinen Basisstil für Verweise; ohne ihn greift das
   Browser-Blau. */
a {
  color: var(--expertise);
  text-decoration: none;
}

/* Unterstreichung nur im Fließtext: Farbe allein unterscheidet einen Verweis
   nicht ausreichend vom Text (--expertise gegen --ink rund 2,3:1, WCAG 1.4.1).
   Schaltflächen und Menüpunkte sind durch ihre Fläche erkennbar.
   Verweise im Knopfstil (<a class="btn …">) sind direkt ausgenommen: Eine
   Gegenregel a.btn verlöre je nach Reihenfolge und gegen ".card p a" auch
   über die Spezifität. */
.lede a:not(.btn),
p a:not(.btn),
.card p a:not(.btn),
.aside-panel a:not(.btn),
.modal-body a:not(.btn) {
  text-decoration: underline;
}

.btn:hover,
.nav a:hover,
.admin-nav a:hover,
.nav-pills .nav-link:hover {
  text-decoration: none;
}

/* Scrollbarer Rahmen für breite Tabellen. Das Markup umschließt die Tabelle
   damit: <div class="table-scroll" tabindex="0" role="region" aria-label="…">,
   sonst ist der Bereich per Tastatur nicht scrollbar (WCAG 2.1.1). */
.table-scroll {
  overflow-x: auto;
}

@media (prefers-reduced-motion: reduce) {
  *,
  *::before,
  *::after {
    transition: none !important;
    animation: none !important;
  }

  .btn:hover {
    transform: none;
  }
}

/* Aktionsspalte der Benutzertabelle: zwei Knöpfe, auf schmalen Schirmen
   untereinander. Sitzt bewusst auf einem <div> in der Zelle und nicht auf dem
   <td> – display:flex nähme ihm table-cell, und vertical-align griffe nicht
   mehr. */
.user-actions {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  justify-content: flex-end;
}

/* ---------------------------------------------------------------------------
   Anmeldung und die Seiten drumherum (FV-32)
   Eigenes Layout ohne Navigationsgerüst: zentrierte Karte auf ruhigem Grund.
   --------------------------------------------------------------------------- */
.anmeldung {
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  gap: 14px;
  padding: 32px 16px;
  /* Ruhiger Verlauf statt Fläche: nimmt die dunkle Seitenleiste der Anwendung
     auf, ohne die Karte zu erdrücken. */
  background:
    radial-gradient(
      1100px 520px at 50% -10%,
      color-mix(in srgb, var(--clarity) 25%, var(--transparency)) 0%,
      transparent 70%
    ),
    var(--transparency);
}

.anmelde-karte {
  width: 100%;
  max-width: 400px;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
  padding: 30px 28px 26px;
}

.anmelde-logo {
  display: block;
  height: auto;
  max-width: 220px;
  margin-bottom: 22px;
}

.anmelde-karte h1 {
  font-size: 20px;
  margin: 0;
}

.anmelde-hinweis {
  color: var(--muted);
  font-size: 12px;
  margin: 5px 0 20px;
}

.anmelde-karte .field {
  margin-bottom: 14px;
}

.anmelde-merken {
  margin: 4px 0 20px;
}

.anmelde-knopf {
  width: 100%;
  justify-content: center;
  min-height: 40px;
}

.anmelde-karte p:last-child {
  margin-bottom: 0;
}

.anmelde-fuss {
  color: var(--muted);
  font-size: 11px;
  margin: 0;
}

@media (max-width: 480px) {
  .anmelde-karte {
    padding: 24px 18px 20px;
  }
}

/* ---------------------------------------------------------------------------
   Zuordnung der restlichen Identity-Klassen auf das Prototyp-Design
   Die Seiten unter Account/Manage (Passwort ändern, E-Mail, Zwei-Faktor)
   stammen aus der Projektvorlage und tragen noch Bootstrap-Klassennamen.
   Bootstrap selbst ist entfernt; diese Regeln bilden die verwendeten Namen auf
   die Tokens des Prototyps ab, damit die Seiten zum Rest passen. Ihr Markup
   wird mit FV-33 (Passwort-Zurücksetzung) und FV-35 (Benutzerverwaltung)
   umgeschrieben, die diese Seiten ohnehin anfassen – bis dahin wäre ein
   Umbau doppelte Arbeit.
   --------------------------------------------------------------------------- */
.form-control {
  width: 100%;
  border: 1px solid #cbd8dd;
  border-radius: 5px;
  background: #fff;
  color: var(--ink);
  min-height: 36px;
  padding: 8px 9px;
}

.form-floating {
  position: relative;
  margin-bottom: 12px;
}

.form-floating > label {
  display: block;
  color: var(--muted);
  font-size: 10px;
  text-transform: uppercase;
  letter-spacing: 0.1em;
  font-weight: 800;
  margin-bottom: 5px;
  order: -1;
}

.form-floating {
  display: flex;
  flex-direction: column;
}

.btn-primary {
  background: var(--trust);
  color: #fff;
  border: 1px solid transparent;
  border-radius: 6px;
  min-height: 37px;
  padding: 0 13px;
  font-weight: 700;
}

.btn-primary:hover {
  background: var(--expertise);
}

.btn-lg {
  min-height: 42px;
  padding: 0 18px;
}

.w-100 {
  width: 100%;
}

.row {
  display: flex;
  flex-wrap: wrap;
  gap: 18px;
}

/* Genau die Klassen, die im Identity-Markup wirklich vorkommen
   (col-xl-6 fünfmal, col-md-4 fünfmal, der Rest je einmal). */
.col-md-4 {
  flex: 1 1 260px;
  min-width: 0;
}

.col-md-6,
.col-lg-6,
.col-xl-6 {
  flex: 1 1 320px;
  min-width: 0;
}

.col-md-12 {
  flex: 1 1 100%;
  min-width: 0;
}

.col-lg-3 {
  flex: 0 0 220px;
  min-width: 0;
}

.col-lg-9 {
  flex: 1 1 320px;
  min-width: 0;
}

.alert {
  border: 1px solid var(--line);
  border-radius: 6px;
  padding: 10px 12px;
  margin-bottom: 12px;
  font-size: 12px;
}

.alert-danger {
  background: var(--bad-bg);
  border-color: #efc4c1;
  color: var(--bad);
}

.alert-warning {
  background: var(--warn-bg);
  border-color: #eed895;
  color: var(--warn);
}

.alert-info {
  background: var(--soft);
  color: var(--trust);
}

.form-check {
  display: flex;
  gap: 7px;
  align-items: center;
}

.form-check-input,
.darker-border-checkbox {
  accent-color: var(--expertise);
}

.nav-pills {
  list-style: none;
  padding: 0;
  margin: 0 0 16px;
  display: flex;
  gap: 4px;
  flex-wrap: wrap;
}

.nav-pills.flex-column {
  flex-direction: column;
}

.nav-pills .nav-link {
  display: block;
  padding: 8px 12px;
  border-radius: 6px;
  color: var(--trust);
  font-weight: 600;
}

.nav-pills .nav-link:hover {
  background: var(--soft);
  text-decoration: none;
}

/* NavLink vergibt für die aktuelle Seite die Klasse "active". */
.nav-pills .nav-link.active {
  background: var(--soft);
  color: var(--trust);
  box-shadow: inset 3px 0 var(--clarity);
}

/* ---------------------------------------------------------------------------
   Bewusst mitgenommener, aber ungenutzter Prototyp-Code
   - .role: Rollen-Dropdown der Kopfleiste (CLAUDE.md: „Nicht bauen")
   - .legacy-performance: ausgeblendetes Demo-Gerüst des Prototyps
   - .form-grid > .field:has(input[data-e="number"]): stützt sich auf das
     data-e-Attribut der Prototyp-SPA, das es in Blazor nicht gibt
   Diese Regeln laufen wirkungslos mit; sie sind kein Hinweis darauf, dass das
   Markup nachgebaut werden soll.

   Ebenfalls bewusst übernommen: html,body{font-size:14px} und die durchgehende
   px-Skala des Prototyps. Eine im Browser eingestellte größere Standardschrift
   wirkt dadurch nicht; das Design des Prototyps ist verbindlich (CLAUDE.md).
   --------------------------------------------------------------------------- */

/* ---------------------------------------------------------------------------
   Hilfsklassen (global)
   --------------------------------------------------------------------------- */
/* Nur für Screenreader sichtbar, z. B. "(Pflichtfeld)" neben dem Stern.
   clip für ältere, clip-path für aktuelle Browser – beide zusammen sind der
   robuste Satz. */
.visually-hidden {
  position: absolute;
  width: 1px;
  height: 1px;
  padding: 0;
  margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  clip-path: inset(50%);
  white-space: nowrap;
  border: 0;
}

/* Der Synchronisierungsstand verweist für Administratoren auf /synchronisierung
   (FV-41). Ein <a> in der Kopfleiste bekäme sonst die globale Unterstreichung –
   gezeigt wird sie erst beim Überfahren, damit die Leiste ruhig bleibt. */
.sync-verweis {
  text-decoration: none;
}
.sync-verweis:hover,
.sync-verweis:focus-visible {
  color: var(--ink);
  text-decoration: underline;
}
