/* Verwaltung (Benutzerverwaltung) — nur Ergänzungen; Grundstil kommt aus style.css. */

/* Kopfzeile: Link zurück zur Anwendung */

.kopf-navigation { display: flex; align-items: center; }

.kopf-link {
  color: #ffffff;
  font-size: 0.9rem;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.55);
  border-radius: 4px;
  padding: 0.4rem 0.9rem;
}

.kopf-link:hover {
  background: var(--navy-dunkel);
  border-color: #ffffff;
}

/* Benutzertabelle */

.spalte-aktionen { text-align: right; }

td.zellen-aktionen {
  text-align: right;
  white-space: nowrap;
}

td.zellen-aktionen button { margin-left: 0.35rem; }

.zeile-deaktiviert td:not(.zellen-aktionen) {
  color: var(--text-neben);
}

/* Badges für Rolle, Status und 2FA (Basisklasse .badge aus style.css) */

.badge-rolle-admin { background: var(--navy); }
.badge-rolle-nutzer { background: #5a6673; }
.badge-status-aktiv { background: var(--ok); }
.badge-status-deaktiviert { background: #c0392b; }
.badge-2fa-eingerichtet { background: var(--ok); }
.badge-2fa-ausstehend { background: #d97a1f; }

/* Formular „Neuen Benutzer anlegen" */

.anlegen-formular {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(200px, 1fr));
  gap: 0.9rem 1rem;
  align-items: end;
}

.anlegen-formular .feld label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  margin-bottom: 0.35rem;
  color: var(--text);
}

.anlegen-formular input[type="text"] {
  font: inherit;
  padding: 0.4rem 0.6rem;
  border: 1px solid #c3ccd6;
  border-radius: 4px;
  background: #ffffff;
  color: var(--text);
  width: 100%;
}

.anlegen-formular select { width: 100%; }

.feld-passwort .passwort-zeile {
  display: flex;
  gap: 0.5rem;
}

.feld-passwort input { flex: 1; min-width: 0; }

.feld-absenden { align-self: end; }

/* Hinweis nach dem Anlegen */

.anlegen-hinweis {
  margin-top: 1rem;
  padding: 0.7rem 1rem;
  background: #eaf1f9;
  border-left: 3px solid var(--akzent);
  border-radius: 4px;
  font-size: 0.9rem;
}

.anlegen-hinweis p { margin: 0.2rem 0; }

.anlegen-hinweis .zugangsdaten {
  font-family: ui-monospace, Consolas, monospace;
  font-size: 0.88rem;
  background: #ffffff;
  border: 1px solid var(--rahmen);
  border-radius: 4px;
  padding: 0.15rem 0.45rem;
}

/* Bereich „Projekte und Zugriff" */

.rechte-liste {
  display: flex;
  flex-direction: column;
  gap: 1rem;
  margin-top: 0.8rem;
}

.projekt-karte {
  border: 1px solid var(--rahmen);
  border-radius: 5px;
  background: #ffffff;
  padding: 0.8rem 1rem 1rem;
}

.projekt-kopf {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  flex-wrap: wrap;
  margin-bottom: 0.6rem;
}

.projekt-kopf h3 {
  margin: 0;
  font-size: 1rem;
  color: var(--navy);
}

.badge-projekt-status { background: #5a6673; }

.rechte-tabelle td { vertical-align: middle; }

.rechte-tabelle .person-login,
.rechte-tabelle .person-hinweis {
  display: block;
  font-size: 0.82rem;
  color: var(--text-neben);
}

.rechte-tabelle .person-hinweis { color: #c0392b; }

.rechte-tabelle select { font: inherit; }

.rechte-formular {
  display: flex;
  align-items: end;
  flex-wrap: wrap;
  gap: 0.6rem 1rem;
  margin-top: 0.8rem;
  padding-top: 0.8rem;
  border-top: 1px solid var(--rahmen);
}

.rechte-formular .feld label {
  display: block;
  font-weight: 600;
  font-size: 0.88rem;
  color: var(--text);
}

.rechte-formular .feld select {
  display: block;
  margin-top: 0.3rem;
  font: inherit;
  min-width: 12rem;
}

@media (max-width: 900px) {
  .anlegen-formular { grid-template-columns: 1fr; }
  td.zellen-aktionen { white-space: normal; }
  .rechte-formular { flex-direction: column; align-items: stretch; }
  .rechte-formular .feld select { width: 100%; min-width: 0; }
}

/* Mistral-Schluessel */
.mistral-status { font-weight: 600; margin: 0.6rem 0; }
.mistral-status.status-ok { color: #1e7e46; }
.mistral-status.status-fehlt { color: #b45309; }
.mistral-form {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.6rem;
  margin-bottom: 0.6rem;
}
.mistral-form label { font-weight: 600; }
.mistral-form input { flex: 1 1 22rem; min-width: 14rem; }

/* Zuordnung eines Projekts zu einem Vertrag */
.projekt-vertrag {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  margin: 0.5rem 0 0.8rem;
  font-size: 0.9rem;
}
.projekt-vertrag label { font-weight: 600; }
.projekt-vertrag select { flex: 0 1 22rem; }

/* Briefkopf der Berichte */
.briefkopf-form {
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
  margin-bottom: 0.8rem;
  max-width: 40rem;
}
.briefkopf-form label { font-weight: 600; margin-top: 0.4rem; }
.briefkopf-form textarea {
  font: inherit;
  padding: 0.4rem 0.5rem;
  border: 1px solid var(--rahmen-hell);
  border-radius: 4px;
  resize: vertical;
}
.briefkopf-knoepfe { display: flex; gap: 0.6rem; margin-top: 0.6rem; }

.briefkopf-vorschau {
  border: 1px solid var(--rahmen-hell);
  border-radius: 4px;
  padding: 0.8rem 1rem;
  max-width: 40rem;
  background: #ffffff;
}
.briefkopf-vorschau h3 { margin: 0 0 0.6rem; font-size: 0.9rem; }
.briefkopf-vorschau img { max-height: 5rem; max-width: 100%; display: block; margin-bottom: 0.5rem; }
.briefkopf-vorschau p { margin: 0; font-size: 0.85rem; line-height: 1.4; }

/* Stand der Sicherung */
.sicherung-status { font-weight: 600; margin: 0.6rem 0; }
.sicherung-status.status-ok { color: #1e7e46; }
.sicherung-status.status-fehlt { color: #b45309; }
.sicherung-status.status-fehler { color: #c0392b; }

/* Fachwissen des Büros (18.08.2026) */
.badge-fw-vorgeschlagen { background: #b45309; }
.badge-fw-bestaetigt { background: var(--ok); }
.badge-fw-abgelehnt { background: #5a6673; }
.fachwissen-form {
  display: grid;
  gap: 0.35rem;
  max-width: 48rem;
  margin: 0.6rem 0 1rem;
}
.fachwissen-form label { font-weight: 600; margin-top: 0.4rem; }
.fachwissen-form input, .fachwissen-form textarea { width: 100%; }
.fachwissen-tabelle { width: 100%; }
.fachwissen-tabelle td { vertical-align: top; white-space: pre-line; }
.fachwissen-tabelle .fachwissen-feld { width: 100%; min-width: 9rem; font: inherit; }
.fachwissen-tabelle textarea.fachwissen-feld { min-width: 16rem; resize: vertical; }
.fachwissen-tabelle tr[data-status="vorgeschlagen"] { background: #fff8e6; }
.fachwissen-tabelle tr[data-status="abgelehnt"] { color: #6b7480; }
.fachwissen-tabelle .aktionen { white-space: nowrap; }
.fachwissen-tabelle .aktionen button { display: block; margin: 0 0 0.25rem; }
