/* Stand 13.10.2026, Aufbau 1 */
/* KI-Asset-Dokumentation, Klickdummy fuer Bild&Ernte
   Zurueckhaltend gehalten: Logo-Gelb als einziger Akzent, sonst neutral.
   Keine externen Ressourcen (DSGVO), Systemschriften, Icons als Inline-SVG. */

:root {
  --gold: #d7a40d;
  --gold-soft: #fdf6e0;
  --ink: #111111;
  --muted: #000;
  --line: #e4e0d8;
  --line-strong: #cfcabf;
  --bg: #ffffff;
  --bg-soft: #f8f7f4;
  --bg-dark: #1c1b18;

  --gruen: #2e7d4f;
  --gruen-soft: #f0f7f2;
  --gelb: #b8860b;
  --rot: #b3261e;
  --rot-soft: #fdf1f0;
  --schwarz: #1a1a1a;

  --radius: 4px;
  --sidebar: 260px;
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Oxygen-Sans,
          Ubuntu, Cantarell, "Helvetica Neue", Arial, sans-serif;
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.6;
  color: var(--ink);
  background: var(--bg);
}

h1, h2, h3, h4 { line-height: 1.25; margin: 0 0 .5em; font-weight: 600; letter-spacing: -.01em; }
h1 { font-size: 1.75rem; }
h2 { font-size: 1.25rem; margin-top: 2.25rem; }
h3 { font-size: 1rem; margin-top: 1.5rem; }
p { margin: 0 0 1rem; }
a { color: var(--ink); text-decoration: underline; text-underline-offset: 2px; }
a:hover { color: var(--gold); }

.skip-link {
  position: absolute; left: -9999px; top: 0;
  background: var(--ink); color: #fff; padding: .6rem 1rem; z-index: 100;
}
.skip-link:focus { left: 0; }

:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

/* ---------- Hinweisbalken Klickdummy ---------- */

.dummy-bar {
  background: var(--bg-dark);
  color: #fff;
  font-size: .8125rem;
  padding: .5rem 1.5rem;
  display: flex;
  gap: 1rem;
  align-items: center;
  flex-wrap: wrap;
}
.dummy-bar strong { color: var(--gold); font-weight: 600; }
.dummy-bar a { color: #fff; }

/* ---------- Grundgeruest ---------- */

.shell { display: flex; min-height: 100vh; align-items: stretch; }

.sidebar {
  width: var(--sidebar);
  flex: 0 0 var(--sidebar);
  border-right: 1px solid var(--line);
  background: var(--bg-soft);
  padding: 1.75rem 1.25rem;
}
.sidebar__logo { display: block; width: 108px; margin-bottom: .25rem; }
.sidebar__logo img { width: 100%; height: auto; display: block; }
.sidebar__claim {
  font-size: .75rem; color: #000; margin: 0 0 2rem;
  letter-spacing: .04em; text-transform: uppercase;
}
.sidebar nav ul { list-style: none; margin: 0 0 2rem; padding: 0; }
.sidebar nav li { margin-bottom: .125rem; }
.sidebar nav a {
  display: block; padding: .5rem .625rem; border-radius: var(--radius);
  text-decoration: none; color: var(--ink); font-size: .9375rem;
}
.sidebar nav a:hover { background: #efece5; color: var(--ink); }
.sidebar nav a[aria-current="page"] {
  background: var(--ink); color: #fff; font-weight: 500;
}
.sidebar__label {
  font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em;
  color: #000; margin: 0 0 .5rem; padding-left: .625rem;
}
.sidebar__user {
  border-top: 1px solid var(--line); padding-top: 1rem; font-size: .8125rem;
  color: #000;
}
.sidebar__user b { display: block; color: var(--ink); font-weight: 600; }

.main { flex: 1 1 auto; min-width: 0; padding: 2.5rem 3rem 5rem; max-width: 1140px; }

.page-head { border-bottom: 1px solid var(--line); padding-bottom: 1.25rem; margin-bottom: 2rem; }
.page-head p { color: #000; margin: 0; max-width: 62ch; }

/* ---------- Notizen zu offenen Fragen ---------- */

.notiz {
  border: 1px solid var(--gold);
  background: var(--gold-soft);
  border-radius: var(--radius);
  padding: .875rem 1rem;
  margin: 1.25rem 0;
  font-size: .875rem;
}
.notiz__kopf {
  display: flex; align-items: center; gap: .5rem;
  font-weight: 600; margin-bottom: .25rem;
}
.notiz__kopf svg { flex: 0 0 auto; }
.notiz p:last-child { margin-bottom: 0; }
.notiz ul { margin: .5rem 0 0; padding-left: 1.25rem; }
.notiz li { margin-bottom: .25rem; }

/* ---------- Karten und Raster ---------- */

.karten { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1rem; margin-bottom: 2rem; }
.karte {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.25rem; background: var(--bg);
}
.karte__zahl { font-size: 1.875rem; font-weight: 600; line-height: 1.1; }
.karte__label { font-size: .8125rem; color: #000; }

/* ---------- Tabellen ---------- */

.tabelle-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: var(--radius); }
table { border-collapse: collapse; width: 100%; font-size: .875rem; }
thead th {
  text-align: left; background: var(--bg-soft); font-weight: 600;
  padding: .625rem .875rem; border-bottom: 1px solid var(--line-strong);
  white-space: nowrap;
}
tbody td { padding: .625rem .875rem; border-bottom: 1px solid var(--line); vertical-align: top; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover { background: var(--bg-soft); }

/* ---------- Etiketten ---------- */

.ampel {
  display: inline-flex; align-items: center; gap: .375rem;
  font-size: .8125rem; white-space: nowrap;
}
.ampel::before {
  content: ""; width: 9px; height: 9px; border-radius: 50%; flex: 0 0 auto;
}
.ampel--gruen::before { background: var(--gruen); }
.ampel--gelb::before { background: var(--gelb); }
.ampel--rot::before { background: var(--rot); }
.ampel--schwarz::before { background: var(--schwarz); }

.status {
  display: inline-block; font-size: .75rem; padding: .1875rem .5rem;
  border-radius: 999px; border: 1px solid var(--line-strong); background: var(--bg-soft);
  white-space: nowrap;
}
.status--frei { border-color: var(--gruen); color: var(--gruen); background: var(--gruen-soft); }
.status--gesperrt { border-color: var(--rot); color: var(--rot); background: var(--rot-soft); }
.status--pflicht { border-color: var(--gold); background: var(--gold-soft); }

/* ---------- Formular ---------- */

.gruppe {
  border: 1px solid var(--line); border-radius: var(--radius);
  margin-bottom: 1.25rem; background: var(--bg);
}
.gruppe > summary {
  padding: .875rem 1.125rem; cursor: pointer; font-weight: 600;
  display: flex; align-items: center; gap: .625rem; list-style: none;
}
.gruppe > summary::-webkit-details-marker { display: none; }
.gruppe > summary::before {
  content: "\203A"; flex: 0 0 auto; color: #000;
  font-size: 1.125rem; line-height: 1; width: .5rem;
  transition: transform .15s; transform-origin: 40% 50%;
}
.gruppe[open] > summary::before { transform: rotate(90deg); }
.gruppe[open] > summary { border-bottom: 1px solid var(--line); }
.gruppe__nr {
  font-size: .75rem; color: #000; font-weight: 400;
  border: 1px solid var(--line-strong); border-radius: 999px; padding: 0 .4375rem;
}
.gruppe__inhalt { padding: 1.25rem; }

.feld { margin-bottom: 1.125rem; }
.feld:last-child { margin-bottom: 0; }
.feld > label, .feld > .feld__label {
  display: block; font-size: .8125rem; font-weight: 600; margin-bottom: .3125rem;
}
.feld__hint { font-size: .8125rem; color: #000; margin: .3125rem 0 0; }
.feld-reihe { display: grid; grid-template-columns: repeat(2, 1fr); gap: 1.125rem; }
.feld-reihe--drei { grid-template-columns: repeat(3, 1fr); }

input[type="text"], input[type="date"], input[type="number"], input[type="password"],
input[type="email"], select, textarea {
  width: 100%; font: inherit; font-size: .9375rem; color: var(--ink);
  padding: .5rem .625rem; border: 1px solid var(--line-strong);
  border-radius: var(--radius); background: var(--bg);
}
textarea { min-height: 5.5rem; resize: vertical; }
input:disabled, select:disabled, textarea:disabled { background: var(--bg-soft); color: #000; }

.pflicht { color: var(--gold); font-weight: 700; }
.legende { display: flex; gap: 1.25rem; flex-wrap: wrap; font-size: .8125rem; color: #000; margin-bottom: 1.5rem; }
.legende b { color: var(--ink); }

.dateifeld {
  border: 1px dashed var(--line-strong); border-radius: var(--radius);
  padding: 1.25rem; text-align: center; color: #000; font-size: .875rem;
  background: var(--bg-soft);
}

/* ---------- Knoepfe ---------- */

.knopfleiste { display: flex; gap: .625rem; flex-wrap: wrap; margin-top: 1.75rem; }
.knopf {
  font: inherit; font-size: .9375rem; font-weight: 500;
  padding: .5625rem 1.125rem; border-radius: var(--radius);
  border: 1px solid var(--ink); background: var(--ink); color: #fff;
  cursor: pointer; text-decoration: none; display: inline-block;
}
.knopf:hover { background: #000; color: #fff; }
.knopf--zweit { background: var(--bg); color: var(--ink); border-color: var(--line-strong); }
.knopf--zweit:hover { background: var(--bg-soft); color: var(--ink); }
.knopf--gold { background: var(--gold); border-color: var(--gold); color: #000; }
.knopf--gold:hover { background: #c39409; border-color: #c39409; color: #000; }
.knopf[aria-disabled="true"] {
  background: var(--bg-soft); color: #000; border-color: var(--line);
  cursor: not-allowed;
}

/* ---------- Filterleiste ---------- */

.filter {
  display: grid; grid-template-columns: 2fr repeat(4, 1fr); gap: .625rem;
  margin-bottom: 1.25rem;
}
.filter select, .filter input { font-size: .875rem; }

/* ---------- Ablauf-Seite ---------- */

.ablauf { list-style: none; margin: 0 0 2rem; padding: 0; counter-reset: schritt; }
.ablauf > li {
  position: relative; padding: 0 0 2rem 3.25rem; counter-increment: schritt;
}
.ablauf > li::before {
  content: counter(schritt);
  position: absolute; left: 0; top: 0;
  width: 2.125rem; height: 2.125rem; border-radius: 50%;
  background: var(--ink); color: #fff;
  display: flex; align-items: center; justify-content: center;
  font-weight: 600; font-size: .9375rem;
}
.ablauf > li::after {
  content: ""; position: absolute; left: 1.0625rem; top: 2.375rem; bottom: .25rem;
  width: 1px; background: var(--line-strong);
}
.ablauf > li:last-child { padding-bottom: 0; }
.ablauf > li:last-child::after { display: none; }
.ablauf h3 { margin-top: 0; margin-bottom: .1875rem; }
.ablauf__rolle {
  font-size: .75rem; text-transform: uppercase; letter-spacing: .06em;
  color: #000; margin-bottom: .625rem;
}
.ablauf__sperre {
  background: var(--rot-soft); border: 1px solid #f0d5d3;
  padding: .75rem .875rem; font-size: .875rem; border-radius: var(--radius);
  margin-top: .75rem;
}
.ablauf__sperre b { display: block; margin-bottom: .25rem; color: var(--rot); }
.ablauf__sperre ul { margin: 0; padding-left: 1.125rem; }

.diagramm {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.5rem; margin-bottom: 2rem; background: var(--bg-soft); overflow-x: auto;
}
.diagramm svg { display: block; min-width: 720px; width: 100%; height: auto; }

/* ---------- Detailansicht ---------- */

.dl { display: grid; grid-template-columns: 15rem 1fr; gap: .0625rem 1.5rem; font-size: .9375rem; }
.dl dt { color: #000; font-size: .875rem; padding: .375rem 0; }
.dl dd { margin: 0; padding: .375rem 0; }

.protokoll { list-style: none; margin: 0; padding: 0; font-size: .875rem; }
.protokoll li {
  padding: .625rem 0 .625rem 1.125rem; border-bottom: 1px solid var(--line);
  position: relative;
}
.protokoll li::before {
  content: ""; position: absolute; left: 0; top: 1.0625rem;
  width: 6px; height: 6px; border-radius: 50%; background: var(--line-strong);
}
.protokoll li:last-child { border-bottom: 0; }
.protokoll time { color: #000; display: inline-block; min-width: 9.5rem; }

/* ---------- Login ---------- */

.login {
  min-height: 100vh; display: flex; align-items: center; justify-content: center;
  padding: 2rem; background: var(--bg-soft);
}
.login__box {
  width: 100%; max-width: 25rem; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius); padding: 2.5rem;
}
.login__logo { width: 118px; margin-bottom: 1.75rem; }
.login__logo img { width: 100%; height: auto; display: block; }
.login h1 { font-size: 1.25rem; }
.login p { color: #000; font-size: .9375rem; }

/* ---------- Fussbereich ---------- */

.fuss {
  margin-top: 4rem; padding-top: 1.5rem; border-top: 1px solid var(--line);
  font-size: .8125rem; color: #000;
}
.fuss nav { margin-top: .5rem; }
.fuss nav a { margin-right: 1rem; }

/* ---------- Offene Punkte ---------- */

.punkt {
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 1.125rem 1.25rem; margin-bottom: 1rem;
}
.punkt--offen { background: var(--gold-soft); border-color: var(--gold); }
.punkt--erledigt { background: var(--bg-soft); }
.punkt h3 { margin-top: 0; }
.punkt__meta {
  font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em;
  color: #000; margin-bottom: .375rem;
}
.punkt p:last-child { margin-bottom: 0; }
.punkt__frage { font-weight: 600; }

.haken { display: flex; align-items: flex-start; gap: .625rem; margin-bottom: .625rem; font-size: .9375rem; }
.haken input { margin-top: .3125rem; }

/* ---------- Antwortfelder ---------- */

.antwort { margin-top: 1rem; padding-top: .875rem; border-top: 1px solid var(--line); }
.antwort__frage {
  font-size: .6875rem; text-transform: uppercase; letter-spacing: .06em;
  color: #000; margin: 0 0 .5rem;
}
.wahl { display: flex; gap: 1.25rem; flex-wrap: wrap; margin-bottom: .75rem; }
.wahl label { display: inline-flex; align-items: center; gap: .375rem; font-size: .9375rem; cursor: pointer; }
.wahl input { margin: 0; }
.antwort textarea { min-height: 3.5rem; }
.antwort label.antwort__label {
  display: block; font-size: .8125rem; font-weight: 600; margin-bottom: .3125rem;
}

.honigtopf { position: absolute; left: -9999px; width: 1px; height: 1px; overflow: hidden; }

.absender {
  border: 1px solid var(--line-strong); border-radius: var(--radius);
  padding: 1.25rem; margin: 2rem 0 1rem; background: var(--bg-soft);
}
.absender h3 { margin-top: 0; }

/* ---------- Kleine Hilfsklassen (statt Inline-CSS, wegen CSP) ---------- */

.h2--erste { margin-top: 0; }
.brotkrumen { margin-bottom: .25rem; font-size: .8125rem; color: #000; }
.kopf-meta { margin-left: .75rem; }
.eng-oben { margin: .25rem 0 0; }
.eng-oben--mehr { margin-top: .5rem; }
.luft-oben { margin-top: 1rem; }

/* ---------- Vorschau-Gate ---------- */

.gate {
  position: fixed; inset: 0; z-index: 200;
  background: var(--bg-soft);
  display: flex; align-items: center; justify-content: center;
  padding: 2rem;
}
.is-authed .gate { display: none; }
.gate__inner {
  width: 100%; max-width: 25rem; background: var(--bg);
  border: 1px solid var(--line); border-radius: var(--radius);
  padding: 2.5rem; text-align: left;
}
.gate__logo { width: 118px; height: auto; display: block; margin-bottom: 1.75rem; }
.gate__eyebrow {
  font-size: .6875rem; text-transform: uppercase; letter-spacing: .08em;
  color: #000; margin: 0 0 .375rem;
}
.gate__title { font-size: 1.25rem; margin: 0 0 .5rem; }
.gate__lead { font-size: .9375rem; color: #000; margin: 0 0 1.5rem; }
.gate__form { display: flex; flex-direction: column; gap: .875rem; }
.gate__field-label { display: block; font-size: .8125rem; font-weight: 600; margin-bottom: .3125rem; }
.gate__error { margin: 0; font-size: .875rem; font-weight: 600; color: var(--rot); }
.gate__input--shake { animation: gate-shake .45s ease; }

@keyframes gate-shake {
  0%, 100% { transform: translateX(0); }
  20% { transform: translateX(-5px); }
  40% { transform: translateX(5px); }
  60% { transform: translateX(-3px); }
  80% { transform: translateX(3px); }
}

@media (prefers-reduced-motion: reduce) {
  .gate__input--shake { animation: none; }
  .gruppe > summary::before { transition: none; }
}

@media (max-width: 900px) {
  .shell { display: block; }
  .sidebar { width: auto; border-right: 0; border-bottom: 1px solid var(--line); padding: 1.25rem; }
  .sidebar nav ul { display: flex; flex-wrap: wrap; gap: .25rem; margin-bottom: 1rem; }
  .main { padding: 1.5rem 1.25rem 3rem; }
  .karten { grid-template-columns: 1fr; }
  .feld-reihe, .feld-reihe--drei, .filter { grid-template-columns: 1fr; }
  .dl { grid-template-columns: 1fr; }
  .dl dt { padding-bottom: 0; }
}

@media print {
  .dummy-bar, .sidebar, .knopfleiste { display: none; }
  .main { max-width: none; padding: 0; }
}

/* ======================================================================
   Prototyp 1, Stand 09.10.2026: bedienbare Oberflaeche (uebersicht.html)
   Aufbau nach dem Muster unserer internen Werkzeuge (dunkle Seitenleiste,
   Kacheln, Karten, Board, seitliches Fenster), Farben und Logo von B&E.
   Die Klassen oben bleiben unveraendert, damit ablauf.html und
   offene-punkte.html weiter gleich aussehen.
   ====================================================================== */

@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400 800;
  font-display: swap;
  src: url("assets/inter-latin.woff2") format("woff2");
}

:root {
  --app-bg: #f4f2ed;
  --app-surface: #ffffff;
  --app-surface-2: #faf8f4;
  --app-shadow: 0 1px 2px rgba(28, 27, 24, .06), 0 1px 1px rgba(28, 27, 24, .03);
  --app-radius: 8px;
  --sidebar-text: #fff;
  --sidebar-muted: #fff;
  --sidebar-line: #33312c;
  --sidebar-hover: #2a2824;
}

body.app { font-family: "Inter", var(--font); background: var(--app-bg); }
body.app h1, body.app h2, body.app h3 { letter-spacing: -.015em; }
body.app .dummy-bar strong { color: var(--gold); }

/* ---------- Seitenleiste, dunkel ---------- */

.shell--app { align-items: stretch; }
.sidebar--app {
  background: var(--bg-dark); color: var(--sidebar-text); border-right: 0;
  display: flex; flex-direction: column; gap: 0; padding: 1.5rem 1rem 1.25rem;
}
.sidebar--app .sidebar__logo { width: 104px; margin: 0 .5rem .25rem; }
.sidebar--app .sidebar__claim { color: var(--sidebar-muted); margin: 0 .5rem 1.5rem; }
.sidebar__block { margin-bottom: 1.125rem; }
.sidebar--app .sidebar__label { color: var(--sidebar-muted); padding-left: .5rem; margin-bottom: .375rem; display: block; }
.sidebar__select {
  width: 100%; font: inherit; font-size: .875rem; font-weight: 500; color: var(--sidebar-text);
  background: var(--sidebar-hover); border: 1px solid var(--sidebar-line); border-radius: var(--app-radius);
  padding: .5625rem .625rem; min-height: 42px;
}
.sidebar__select:focus-visible { outline-color: var(--gold); }
.sidebar__hinweis { font-size: .75rem; color: var(--sidebar-muted); margin: .5rem .5rem 0; line-height: 1.45; }
.sidebar__fest { margin: 0; padding: .5625rem .625rem; font-size: .875rem; font-weight: 500; border: 1px solid var(--sidebar-line); border-radius: var(--app-radius); }
.sidebar--app nav { margin-bottom: 1rem; }
.nav-liste { list-style: none; margin: 0 0 1.25rem; padding: 0; }
.nav-liste li { margin-bottom: .125rem; }
.nav-liste button, .nav-liste--links a {
  display: flex; align-items: center; justify-content: space-between; gap: .5rem; width: 100%;
  font: inherit; font-size: .9375rem; font-weight: 500; color: var(--sidebar-text); text-align: left; text-decoration: none;
  background: transparent; border: 0; border-radius: var(--app-radius); padding: .5625rem .625rem; min-height: 42px; cursor: pointer;
}
.sidebar--app nav .nav-liste--links a { color: var(--sidebar-text); font-size: .9375rem; }
.nav-liste button:hover, .sidebar--app nav .nav-liste--links a:hover { background: var(--sidebar-hover); color: var(--sidebar-text); }
.nav-liste button.aktiv { background: var(--gold); color: #000; font-weight: 600; }
.nav-zahl { font-size: .75rem; font-weight: 600; padding: .0625rem .5rem; border-radius: 999px; background: var(--sidebar-line); color: var(--sidebar-text); }
.nav-liste button.aktiv .nav-zahl { background: rgba(28, 27, 24, .18); color: #000; }
.nav-zahl--gold { background: var(--gold); color: #000; }
.sidebar__demo { margin-top: auto; padding-top: 1rem; }
.knopf--ghost { width: 100%; background: transparent; color: var(--sidebar-text); border-color: var(--sidebar-line); font-size: .875rem; }
.knopf--ghost:hover { background: var(--sidebar-hover); color: var(--sidebar-text); }
.sidebar--app .sidebar__user { border-top-color: var(--sidebar-line); color: var(--sidebar-muted); margin-top: 1rem; }
.sidebar--app .sidebar__user b { color: var(--sidebar-text); }
.sidebar--app .sidebar__user a { color: var(--sidebar-muted); }
.sidebar--app .sidebar__user a:hover { color: var(--gold); }

/* ---------- Hauptbereich ---------- */

.main--app { max-width: none; padding: 2rem 2.5rem 4rem; }
.page-head--app { display: flex; align-items: flex-end; justify-content: space-between; gap: 1rem; flex-wrap: wrap; margin-bottom: 1.5rem; padding-bottom: 1.25rem; }
.page-head--app h1 { font-size: 1.5rem; margin-bottom: .25rem; }
.page-head--app p { max-width: 70ch; font-size: .9375rem; }
.page-tools { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.block { margin-bottom: 2rem; }
.block__kopf { margin-bottom: .75rem; }
.block__kopf h2 { margin: 0 0 .125rem; font-size: 1.125rem; }
.block__kopf p { margin: 0; color: #000; font-size: .875rem; }
.leer { padding: 1.5rem; text-align: center; color: #000; font-size: .9375rem; background: var(--app-surface); border: 1px dashed var(--line-strong); border-radius: var(--app-radius); }
.offen { color: #000; font-style: italic; }
.split { display: grid; grid-template-columns: 1.1fr 1fr; gap: 1.5rem; align-items: start; margin-bottom: 1.5rem; }
.karte-info { background: var(--app-surface); border: 1px solid var(--line); border-radius: var(--app-radius); padding: 1.25rem 1.375rem; box-shadow: var(--app-shadow); font-size: .9375rem; }
.karte-info p:last-child { margin-bottom: 0; }
.schalter { display: inline-flex; align-items: center; gap: .5rem; font-size: .875rem; cursor: pointer; white-space: nowrap; }
.schalter input { margin: 0; width: 18px; height: 18px; accent-color: var(--gold); }

/* ---------- Kennzahl-Kacheln ---------- */

.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: .875rem; margin-bottom: 2rem; }
.kpi { background: var(--app-surface); border: 1px solid var(--line); border-radius: var(--app-radius); padding: 1rem 1.125rem; box-shadow: var(--app-shadow); }
.kpi__label { font-size: .75rem; font-weight: 600; text-transform: uppercase; letter-spacing: .06em; color: #000; margin-bottom: .375rem; }
.kpi__wert { font-size: 1.875rem; font-weight: 600; line-height: 1.05; }
.kpi__sub { font-size: .8125rem; color: #000; margin-top: .375rem; }
.kpi--gold { border-color: var(--gold); background: var(--gold-soft); }
.kpi--rot { border-color: #f0d5d3; background: var(--rot-soft); }

/* ---------- Tabellen im Prototyp ---------- */

body.app .tabelle-wrap { background: var(--app-surface); box-shadow: var(--app-shadow); border-radius: var(--app-radius); }
.tabelle th { font-size: .75rem; text-transform: uppercase; letter-spacing: .05em; color: #000; }
.tabelle td small { color: #000; font-size: .8125rem; }
.tabelle td.zahl, .tabelle th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
.tabelle tr.klick { cursor: pointer; }
.tabelle tr.klick:hover { background: var(--gold-soft); }
.zeichen { font-size: .75rem; color: #000; white-space: nowrap; margin-left: .25rem; }

/* ---------- Status, Marken, Ampel ---------- */

.status--entwurf { background: #efede8; border-color: #d8d4cb; }
.status--unvollstaendig { background: var(--gold-soft); border-color: var(--gold); color: #7a5b05; }
.status--pruefung { background: #e9eef7; border-color: #b9c6e0; color: #1f3a73; }
.status--rueckfrage { background: var(--rot-soft); border-color: #e4a8a3; color: var(--rot); }
.status--intern { background: var(--gruen-soft); border-color: #a9d3b8; color: var(--gruen); }
.status--kunde { background: #dcefe3; border-color: #8fc5a4; color: #1f5c38; }
.status--veroeffentlicht { background: #d3e9db; border-color: var(--gruen); color: #1f5c38; }
.status--archiviert { background: #f1f0ec; border-color: #d8d4cb; color: #000; }
.status--gesperrt { background: var(--schwarz); border-color: var(--schwarz); color: #fff; }
.marke { display: inline-block; font-size: .75rem; padding: .125rem .5rem; border-radius: 999px; background: #efede8; color: #000; white-space: nowrap; }
.marke--gf { background: var(--rot); color: #fff; font-weight: 600; }
.ampel--offen::before { background: transparent; border: 1px dashed var(--line-strong); }
.ampel--offen { color: #000; }

/* ---------- Filterzeile ---------- */

.filter--app { display: flex; gap: .5rem; flex-wrap: wrap; margin-bottom: 1rem; }
.filter--app input[type="search"] { flex: 1 1 240px; min-width: 200px; }
.filter--app select { flex: 0 1 auto; width: auto; min-width: 150px; }
.filter--app input, .filter--app select { background: var(--app-surface); border-radius: var(--app-radius); padding: .5625rem .75rem; min-height: 42px; }

/* ---------- Board ---------- */

.kanban { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(228px, 1fr); gap: .75rem; overflow-x: auto; padding-bottom: 1rem; }
.spalte { background: var(--app-surface-2); border: 1px solid var(--line); border-radius: var(--app-radius); padding: .625rem; min-height: 360px; transition: background .12s, border-color .12s; }
.spalte--ziel { background: var(--gold-soft); border-color: var(--gold); }
.spalte--gesperrt { background: #eeece8; }
.spalte__kopf { display: flex; justify-content: space-between; align-items: center; font-weight: 600; font-size: .875rem; padding: .25rem .375rem 0; }
.spalte__zahl { font-size: .75rem; font-weight: 600; background: #e4e0d8; border-radius: 999px; padding: .0625rem .5rem; }
.spalte__sub { font-size: .75rem; color: #000; padding: 0 .375rem .625rem; }
.spalte__leer { font-size: .8125rem; color: #000; text-align: center; padding: 1.5rem .5rem; border: 1px dashed var(--line-strong); border-radius: var(--app-radius); }
.kcard {
  background: var(--app-surface); border: 1px solid var(--line); border-radius: var(--app-radius);
  padding: .625rem .75rem; margin-bottom: .5rem; font-size: .8125rem; cursor: grab; box-shadow: var(--app-shadow);
}
.kcard[draggable="true"]:hover { border-color: var(--line-strong); box-shadow: 0 3px 10px rgba(28, 27, 24, .1); }
.kcard--zieht { opacity: .5; }
.kcard--rot { background: var(--rot-soft); border-color: #e4a8a3; }
.kcard--schwarz { background: #eeece8; border-color: #bdb8ae; }
.kcard__kopf { display: flex; justify-content: space-between; gap: .375rem; align-items: flex-start; margin-bottom: .25rem; font-size: .875rem; }
.kcard__meta { color: #000; font-size: .78rem; line-height: 1.4; }
.kcard__marken { display: flex; gap: .375rem; flex-wrap: wrap; align-items: center; margin-top: .5rem; }
.kcard__fuss { margin-top: .625rem; }
.kcard__fuss .knopf { width: 100%; }

/* ---------- Knoepfe, Ergaenzungen ---------- */

.knopf--klein { font-size: .8125rem; padding: .375rem .75rem; }
.knopf--gesperrt { background: var(--bg-soft); color: #000; border-color: var(--line); }
.knopf--gesperrt:hover { background: var(--bg-soft); color: var(--ink); border-color: var(--line-strong); }
.knopf--gesperrt.knopf--gold { background: var(--gold-soft); color: #000; border-color: var(--gold); }
.knopfleiste--eng { margin-top: 1rem; }
body.app .knopf { border-radius: var(--app-radius); }
body.app .knopf--gold { color: #000; }

/* ---------- Seitliches Fenster (Datensatz) ---------- */

.drawer-hintergrund { position: fixed; inset: 0; background: rgba(28, 27, 24, .45); z-index: 150; }
.drawer {
  position: fixed; top: 0; right: 0; bottom: 0; width: min(640px, 100%); background: var(--app-surface);
  z-index: 151; overflow-y: auto; padding: 1.5rem 1.75rem 2.5rem; box-shadow: -12px 0 40px rgba(28, 27, 24, .22);
}
.drawer[hidden], .drawer-hintergrund[hidden], [hidden] { display: none !important; }
.drawer__kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: .75rem; margin-bottom: 1rem; }
.drawer__kopf h2 { font-size: 1.25rem; margin: 0 0 .5rem; }
.drawer__marken { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin: 0; }
.drawer h3 { font-size: .8125rem; text-transform: uppercase; letter-spacing: .06em; color: #000; margin: 1.75rem 0 .5rem; }
.drawer .schliessen { flex: 0 0 auto; background: none; border: 1px solid var(--line-strong); border-radius: var(--app-radius); width: 40px; height: 40px; font-size: 1.25rem; cursor: pointer; color: var(--ink); }
.drawer .schliessen:hover { background: var(--bg-soft); }
.dl--drawer { grid-template-columns: 11rem 1fr; font-size: .9rem; }
.dl--drawer dt { font-size: .8125rem; }
.sperre { background: var(--rot-soft); border: 1px solid #f0d5d3; padding: .75rem .875rem; font-size: .875rem; border-radius: var(--app-radius); margin-bottom: .5rem; }
.sperre b { display: block; margin-bottom: .25rem; color: var(--rot); }
.sperre ul { margin: .375rem 0 0; padding-left: 1.125rem; }
.sperre--frei { background: var(--gruen-soft); border-color: #a9d3b8; }
.sperre--frei b { color: var(--gruen); }
.drawer-form { background: var(--app-surface-2); border: 1px solid var(--line); border-radius: var(--app-radius); padding: 1rem 1.125rem; margin-top: 1rem; }
.drawer-form h3 { margin-top: 0; }
.drawer-form .feld { margin-bottom: .875rem; }
.drawer-form .feld-reihe { gap: .875rem; }
.kommentare { list-style: none; margin: 0 0 .75rem; padding: 0; display: grid; gap: .375rem; }
.kommentare li { background: var(--app-surface-2); border: 1px solid var(--line); border-radius: var(--app-radius); padding: .5rem .75rem; font-size: .875rem; }
.kommentare li.eigen { background: var(--gold-soft); border-color: #ecd7a0; }
.kommentare li small { color: #000; font-size: .75rem; display: block; margin-bottom: .125rem; }
.kommentar-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }
.kommentar-form input { flex: 1; min-width: 200px; }
.drawer .protokoll li { padding-left: 1rem; }
.drawer .protokoll time { min-width: 8.5rem; }
body.drawer-offen { overflow: hidden; }

/* ---------- Meldungen ---------- */

.toasts { position: fixed; top: 12px; left: 50%; transform: translateX(-50%); width: min(440px, calc(100% - 32px)); display: flex; flex-direction: column; gap: .5rem; z-index: 300; pointer-events: none; }
.toast {
  pointer-events: auto; background: var(--bg-dark); color: var(--sidebar-text); border-radius: var(--app-radius);
  padding: .75rem .875rem .75rem 1rem; font-size: .875rem; box-shadow: 0 10px 30px rgba(0, 0, 0, .25);
  display: flex; gap: .625rem; align-items: flex-start; transition: opacity .4s;
}
.toast::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: var(--gold); flex-shrink: 0; margin-top: .3125rem; }
.toast.rot::before { background: #e06b63; }
.toast.gruen::before { background: #5cb87f; }
.toast.gelb::before { background: var(--gold); }
.toast small { display: block; color: var(--sidebar-muted); margin-top: .1875rem; }
.toast--weg { opacity: 0; }

/* ---------- Formular im Prototyp ---------- */

.formular .gruppe { background: var(--app-surface); box-shadow: var(--app-shadow); border-radius: var(--app-radius); }
.formular select[multiple] { min-height: 7rem; }
body.app input[type="text"], body.app input[type="date"], body.app input[type="number"], body.app input[type="search"], body.app select, body.app textarea { border-radius: var(--app-radius); }
body.app input[type="search"] { width: 100%; font: inherit; font-size: .9375rem; color: var(--ink); padding: .5rem .625rem; border: 1px solid var(--line-strong); background: var(--bg); }
.inline-form { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-top: .875rem; }
.inline-form input[type="text"] { flex: 1 1 160px; width: auto; }
.inline-form select { width: auto; }

/* ---------- Import ---------- */

.dropzone { border: 1px dashed var(--line-strong); border-radius: var(--app-radius); padding: 2.25rem 1.25rem; text-align: center; background: var(--app-surface); cursor: pointer; transition: background .15s, border-color .15s; color: #000; }
.dropzone strong { display: block; color: var(--ink); font-size: 1.0625rem; margin-bottom: .25rem; }
.dropzone--aktiv, .dropzone:hover { border-color: var(--gold); background: var(--gold-soft); }
.dropzone input { display: none; }
.beispiele { display: flex; gap: .5rem; flex-wrap: wrap; margin-top: .875rem; }
.ergebnis { border-radius: var(--app-radius); padding: .875rem 1rem; margin: 1rem 0; border: 1px solid; font-size: .9rem; }
.ergebnis--ok { background: var(--gruen-soft); border-color: #a9d3b8; }
.ergebnis--warn { background: var(--gold-soft); border-color: var(--gold); }
.ergebnis--fehler { background: var(--rot-soft); border-color: #e4a8a3; }
.ergebnis ul { margin: .5rem 0 0 1.125rem; padding: 0; font-size: .85rem; }
.ergebnis em { font-style: normal; font-weight: 600; }
.spalten-format { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .78rem; background: var(--app-surface-2); border: 1px solid var(--line); padding: .625rem .75rem; border-radius: var(--app-radius); overflow-x: auto; }

/* ---------- Tablet und schmaler ---------- */

@media (max-width: 900px) {
  .sidebar--app { border-bottom: 0; padding: 1rem; position: sticky; top: 0; z-index: 120; flex-direction: column; }
  .sidebar--app .sidebar__logo { width: 84px; margin-bottom: 0; }
  .sidebar--app .sidebar__claim { margin-bottom: .75rem; }
  .sidebar__block { margin-bottom: .625rem; }
  .sidebar--app nav { margin-bottom: 0; }
  .sidebar--app nav .nav-liste { display: flex; gap: .25rem; overflow-x: auto; margin-bottom: .5rem; padding-bottom: .25rem; }
  .nav-liste li { flex-shrink: 0; }
  .nav-liste button, .nav-liste--links a { white-space: nowrap; padding: .5rem .75rem; }
  .sidebar--app .sidebar__label { display: none; }
  .sidebar__hinweis, .sidebar__demo, .sidebar--app .sidebar__user { display: none; }
  .main--app { padding: 1.25rem 1rem 3rem; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .split { grid-template-columns: 1fr; }
  .drawer { padding: 1.25rem 1rem 2rem; }
  .dl--drawer { grid-template-columns: 1fr; }
}
@media (max-width: 720px) {
  .tabelle thead { display: none; }
  .tabelle tr { display: grid; grid-template-columns: 1fr 1fr; gap: .125rem .625rem; padding: .625rem .5rem; border-bottom: 1px solid var(--line); }
  .tabelle td { border: 0; padding: .125rem 0; }
  .tabelle td.zahl { text-align: left; }
  .tabelle td[data-label]::before { content: attr(data-label) ": "; font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; color: #000; }
  .kpis { grid-template-columns: 1fr; }
  .feld-reihe, .feld-reihe--drei { grid-template-columns: 1fr; }
  .tabelle td.zelle-bild { grid-column: 1 / -1; }
}

/* ======================================================================
   Prototyp 2, Stand 13.10.2026: Vorschaubilder
   Das Bild selbst ist 320 px gross (bildkern.js), gezeigt wird es in drei
   Groessen: Liste, Board-Karte, Datensatz. Der Rahmen ist immer quadratisch
   bzw. fest, das Motiv wird eingepasst und nicht beschnitten, damit man das
   ganze Bild erkennt.
   ====================================================================== */

.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; }
.vorschau { display: block; object-fit: contain; background: var(--app-surface-2); border: 1px solid var(--line); border-radius: var(--radius); }
.vorschau--leer { display: flex; align-items: center; justify-content: center; color: var(--line-strong); }
.tabelle .zelle-bild { width: 88px; padding-right: 0; }
.vorschau--liste { width: 72px; height: 72px; }
.vorschau--karte { width: 100%; height: 96px; margin-bottom: .5rem; }
.vorschau--formular { width: 120px; height: 120px; flex: 0 0 auto; }
.vorschau--gross { width: 100%; height: auto; max-height: 320px; }
.drawer__bild { margin-bottom: 1rem; }
.dateifeld--bild { display: flex; gap: 1rem; align-items: center; text-align: left; cursor: pointer; margin-bottom: .5rem; }
.dateifeld--bild:hover, .dateifeld--bild.dropzone--aktiv { border-color: var(--gold); background: var(--gold-soft); }
.dateifeld__info { font-size: .875rem; line-height: 1.5; }
.pruefsumme { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: .75rem; word-break: break-all; }

/* ---------- Seite "Bild kennzeichnen" ----------
   Links das Bild mit Kennzeichen, rechts die Angaben. Die Vorschau bleibt beim
   Scrollen stehen, damit man die Wirkung jeder Einstellung sieht. */
.kz { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 1.5rem; align-items: start; margin-bottom: 1.5rem; }
.kz__buehne { position: sticky; top: 1rem; }
.kz__leinwand { background: var(--app-surface-2); border: 1px solid var(--line); border-radius: var(--app-radius); padding: .75rem; box-shadow: var(--app-shadow); }
#kz-canvas { display: block; max-width: 100%; max-height: 62vh; margin: 0 auto; height: auto; cursor: grab; }
#kz-canvas.ziehen { cursor: grabbing; }
.kz__drop { padding: 4rem 1.25rem; }
.kz__drop small { display: inline-block; margin-top: .5rem; }
.kz__block { margin-top: 1rem; background: var(--app-surface); border: 1px solid var(--line); border-radius: var(--app-radius); padding: 1rem 1.125rem; box-shadow: var(--app-shadow); }
.kz__block .block__kopf h2 { font-size: 1rem; margin: 0 0 .25rem; }
.kz__marken { display: flex; gap: .375rem; flex-wrap: wrap; margin-bottom: .75rem; }
.marke--ja { background: var(--gruen-soft); color: var(--gruen); font-weight: 600; }
.kz__panel .gruppe { margin-bottom: 1rem; }
.kz__schon { display: flex; gap: .5rem; align-items: flex-start; margin-bottom: .875rem; font-weight: 500; white-space: normal; }
.kz__panel .knopf[disabled] { opacity: .45; cursor: not-allowed; }
.kz__panel input[type="range"] { width: 100%; accent-color: var(--gold); }
.kz__panel select, .kz__panel input[type="text"], .kz__panel textarea { max-width: 100%; min-width: 0; }
@media (max-width: 1100px) {
  .kz { grid-template-columns: minmax(0, 1fr); }
  .kz__buehne { position: static; }
}

/* ======================================================================
   Aufbau 1, Stand 13.10.2026: Echtbetrieb (be-doku.masdemas.de)
   ====================================================================== */
/* Abmelden als Knopf, sieht aus wie der bisherige Link */
.knopf-link { background: none; border: 0; padding: 0; font: inherit; color: var(--sidebar-muted); text-decoration: underline; cursor: pointer; }
.knopf-link:hover { color: var(--gold); }
/* Speicheranzeige in der oberen Leiste */
.speicher-stand { margin-left: auto; color: #fff; }
.speicher-stand--offen { color: var(--gold); }
/* Zurueck-Link der Anmeldemaske, den die Vorlage nicht hat (wie im AI-Writer) */
.pw-link { background: transparent; border: none; color: #000; opacity: .6; font-size: .82rem; cursor: pointer;
           font-family: inherit; text-decoration: underline; padding: .3rem; margin-top: .75rem; }
.pw-link:hover { opacity: .9; }
