/* Akquise-Cockpit: schlicht, IBM Plex Sans, Akzent Aubergine und Gold. */
:root {
  --tinte: #1d1b22;
  --leise: #5f5a6b;
  --linie: #e3e0ea;
  --grund: #f6f5f8;
  --karte: #ffffff;
  --aubergine: #3E3852;
  --aubergine-hell: #ece9f3;
  --gold: #A89968;
  --gruen: #1f7a4d;
  --gelb: #a26b00;
  --rot: #b3261e;
  --radius: 10px;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; background: var(--grund); color: var(--tinte); }
body { font-family: "IBM Plex Sans", system-ui, sans-serif; font-size: 15.5px; line-height: 1.5; }
a { color: var(--aubergine); }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .6rem; }
h1 { font-size: 1.7rem; font-weight: 700; }
h2 { font-size: 1.2rem; font-weight: 600; }
h3 { font-size: 1.02rem; font-weight: 600; }
p { margin: 0 0 .7rem; }
.laden { padding: 2rem; color: var(--leise); }

/* Kopfzeile */
.kopf { background: var(--karte); border-bottom: 1px solid var(--linie); position: sticky; top: 0; z-index: 10; }
.kopf-innen { max-width: 1180px; margin: 0 auto; padding: .7rem 16px; display: flex; align-items: center; gap: 1rem; flex-wrap: wrap; }
.marke { line-height: 1.2; min-width: 0; }
.marke b { display: block; font-size: 1.02rem; }
.marke span { color: var(--leise); font-size: .85rem; }
.reiter { display: flex; gap: .2rem; overflow-x: auto; flex: 1 1 auto; scrollbar-width: none; }
.reiter a { padding: .45rem .75rem; border-radius: 6px; text-decoration: none; color: var(--tinte); font-weight: 500; white-space: nowrap; border-bottom: 2px solid transparent; }
.reiter a.aktiv { background: var(--aubergine-hell); border-bottom-color: var(--aubergine); }
.rechts { display: flex; gap: .9rem; align-items: center; font-size: .88rem; color: var(--leise); flex-wrap: wrap; }
.rechts .lauf { color: var(--aubergine); font-weight: 600; display: inline-flex; gap: .4rem; align-items: center; }
.rechts button.link { background: none; border: 0; padding: 0; text-decoration: underline; font-weight: 600; color: var(--tinte); cursor: pointer; }
.dreher { width: .85rem; height: .85rem; border: 2px solid var(--aubergine-hell); border-top-color: var(--aubergine); border-radius: 50%; animation: drehen 1s linear infinite; display: inline-block; }
@keyframes drehen { to { transform: rotate(360deg); } }

/* Inhalt */
main.inhalt { max-width: 1180px; margin: 0 auto; padding: 1.4rem 16px 2rem; }
.unterzeile { color: var(--leise); margin-top: -.3rem; }
.raster { display: grid; grid-template-columns: minmax(0, 1fr) 340px; gap: 1.2rem; align-items: start; }
@media (max-width: 900px) { .raster { grid-template-columns: minmax(0, 1fr); } }
.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: var(--radius); padding: 1.1rem 1.15rem; margin-bottom: 1rem; }
.karte > h2:first-child, .karte > h3:first-child { margin-top: 0; }
.nummer { display: inline-flex; width: 1.9rem; height: 1.9rem; border-radius: 50%; background: var(--aubergine); color: #fff; align-items: center; justify-content: center; font-weight: 700; margin-right: .6rem; flex: none; }
.karte-titel { display: flex; align-items: center; margin-bottom: .7rem; }
.karte-titel h2 { margin: 0; }
.leer { color: var(--leise); }
.zeile-titel { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }

/* Knöpfe */
.knopf { display: inline-block; background: var(--aubergine); color: #fff; border: 0; border-radius: 8px; padding: .6rem 1.05rem; font-weight: 600; cursor: pointer; text-decoration: none; }
.knopf:hover { filter: brightness(1.12); }
.knopf.zweit { background: #fff; color: var(--tinte); border: 1px solid #cfcad9; }
.knopf.klein { padding: .35rem .7rem; font-size: .9rem; }
.knopf:disabled { opacity: .5; cursor: not-allowed; }
.knopfreihe { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; }

/* Formulare */
label.feld { display: block; margin-bottom: .8rem; font-weight: 600; font-size: .92rem; }
label.feld small { font-weight: 400; color: var(--leise); }
label.feld input, label.feld select, label.feld textarea { display: block; width: 100%; margin-top: .25rem; padding: .55rem .65rem; border: 1px solid #cfcad9; border-radius: 7px; background: #fff; font-weight: 400; }
label.feld textarea { min-height: 6rem; resize: vertical; }
.zwei { display: grid; grid-template-columns: 1fr 1fr; gap: .8rem; }
@media (max-width: 520px) { .zwei { grid-template-columns: 1fr; } }
.umschalter { display: inline-flex; border: 1px solid #cfcad9; border-radius: 8px; overflow: hidden; margin-top: .25rem; flex-wrap: wrap; }
.umschalter button { background: #fff; border: 0; padding: .5rem .9rem; cursor: pointer; font-weight: 500; }
.umschalter button.an { background: var(--aubergine-hell); font-weight: 700; box-shadow: inset 0 -2px 0 var(--aubergine); }
.hilfe { color: var(--leise); font-size: .85rem; font-weight: 400; margin-top: .25rem; }
.meldung { padding: .6rem .8rem; border-radius: 8px; background: #fff7e6; border: 1px solid #f0d9a8; margin-bottom: .8rem; }
.meldung.fehler { background: #fdecea; border-color: #f3c3bf; }
.meldung.gut { background: #e9f5ee; border-color: #bfe0cd; }

/* Listen von Betrieben */
.betrieb { display: flex; gap: .9rem; align-items: center; padding: .75rem 0; border-top: 1px solid var(--linie); }
.betrieb:first-child { border-top: 0; }
.score { font-size: 1.8rem; font-weight: 700; min-width: 2.6rem; text-align: right; line-height: 1; }
.score.grau { color: #b3adbf; }
.betrieb .mitte { flex: 1; min-width: 0; }
.betrieb .name { font-weight: 600; color: var(--tinte); text-decoration: none; }
.betrieb .name:hover { text-decoration: underline; }
.betrieb .info { color: var(--leise); font-size: .88rem; overflow-wrap: anywhere; }
.schilder { display: flex; gap: .35rem; flex-wrap: wrap; margin-top: .3rem; }
.schild { display: inline-flex; align-items: center; gap: .3rem; font-size: .78rem; font-weight: 600; background: #f0eef4; border-radius: 5px; padding: .12rem .45rem; white-space: nowrap; }
.schild .punkt { width: .5rem; height: .5rem; border-radius: 50%; background: #aaa; }
.schild.passt .punkt, .schild.erfuellt .punkt, .schild.belegt .punkt { background: var(--gruen); }
.schild.pruefen .punkt, .schild.offen .punkt, .schild.bitte_pruefen .punkt { background: var(--gelb); }
.schild.passt_nicht .punkt, .schild.nicht_erfuellt .punkt { background: var(--rot); }
.schild.nicht_gefunden .punkt { background: #b3adbf; }
.schild.signal { background: #f6f0de; }

/* Rückmeldungen */
.rm { display: flex; gap: .8rem; align-items: flex-start; padding: .7rem 0; border-top: 1px solid var(--linie); }
.rm:first-child { border-top: 0; }
.rm .mitte { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.rm .mitte .schild { margin-bottom: .25rem; white-space: normal; max-width: 100%; }
.rm .zeit { color: var(--leise); font-size: .88rem; }

/* Trichter */
.trichter-zeile { margin-bottom: .75rem; }
.trichter-zeile .oben { display: flex; justify-content: space-between; }
.trichter-zeile .zahl { font-weight: 700; font-size: 1.15rem; }
.balken { height: 6px; background: #eeebf3; border-radius: 3px; overflow: hidden; margin-top: .25rem; }
.balken span { display: block; height: 100%; background: var(--aubergine); }
.protokoll { background: #fbefee; border: 1px solid #f2d3d0; border-radius: 8px; padding: .8rem .9rem; max-height: 18rem; overflow: auto; font-size: .86rem; }
.protokoll ol { margin: 0; padding-left: 1.3rem; }
.protokoll li { margin-bottom: .25rem; }
.protokoll.live { background: #f3f0f8; border-color: #ddd6ea; }

/* Betriebsakte */
.akte-kopf { display: flex; justify-content: space-between; gap: 1rem; align-items: flex-start; flex-wrap: wrap; }
.akte-kopf .meta { color: var(--leise); font-size: .92rem; overflow-wrap: anywhere; }
.akte-kopf .gross { font-size: 2.6rem; font-weight: 700; line-height: 1; }
.akte-kopf .rechts-oben { display: flex; gap: .8rem; align-items: center; }
.stufe-form { display: grid; grid-template-columns: 1fr 1fr auto; gap: .8rem; align-items: end; }
@media (max-width: 640px) { .stufe-form { grid-template-columns: 1fr; } }
.stufe-form label.feld { margin: 0; }
.unterreiter { display: flex; border: 1px solid #cfcad9; border-radius: 8px; overflow-x: auto; width: max-content; max-width: 100%; margin: 1rem 0; background: #fff; }
.unterreiter a { padding: .5rem .9rem; text-decoration: none; color: var(--tinte); font-weight: 500; border-right: 1px solid #e5e1ec; white-space: nowrap; }
.unterreiter a:last-child { border-right: 0; }
.unterreiter a.aktiv { background: var(--aubergine-hell); box-shadow: inset 0 -2px 0 var(--aubergine); font-weight: 700; }
.fakten { width: 100%; border-collapse: collapse; }
.fakten th { text-align: left; vertical-align: top; width: 11rem; padding: .7rem .8rem .7rem 0; font-weight: 600; }
.fakten td { padding: .7rem 0; vertical-align: top; overflow-wrap: anywhere; }
.fakten tr { border-top: 1px solid var(--linie); }
.fakten .wert { font-weight: 600; }
.zitat { color: var(--leise); font-size: .88rem; margin-top: .2rem; }
.quelle { font-size: .85rem; }
@media (max-width: 560px) { .fakten th { display: block; width: auto; padding-bottom: 0; } .fakten td { display: block; padding-top: .2rem; } }
.liste { margin: 0; padding-left: 1.2rem; }
.liste li { margin-bottom: .45rem; overflow-wrap: anywhere; }
.pruefung .punkt-zeile { display: flex; gap: .7rem; padding: .6rem 0; border-top: 1px solid var(--linie); align-items: flex-start; }
.pruefung .punkt-zeile:first-of-type { border-top: 0; }
.pruefung .text b { display: block; }
.pruefung .text span { color: var(--leise); font-size: .86rem; }
.score-tabelle { width: 100%; border-collapse: collapse; font-size: .9rem; }
.score-tabelle td { padding: .45rem .3rem .45rem 0; border-top: 1px solid var(--linie); vertical-align: top; }
.score-tabelle td.p { font-weight: 700; text-align: right; padding-right: .6rem; white-space: nowrap; }
.vergleich { width: 100%; border-collapse: collapse; font-size: .9rem; }
.vergleich th, .vergleich td { text-align: left; padding: .45rem .4rem; border-top: 1px solid var(--linie); vertical-align: top; }
.pruef-hinweise { font-size: .88rem; }
.pruef-hinweise .fehler { color: var(--rot); }
.url-kasten { font-family: ui-monospace, Consolas, monospace; font-size: .85rem; background: #f3f1f6; padding: .5rem .6rem; border-radius: 6px; overflow-wrap: anywhere; margin: .4rem 0; }
details summary { cursor: pointer; font-weight: 600; }

/* Fußzeile */
.fuss { max-width: 1180px; margin: 0 auto; padding: 1rem 16px 2rem; color: var(--leise); font-size: .8rem; }
.fuss a { color: var(--leise); }

/* Anmeldung */
.anmeldung { max-width: 30rem; margin: 10vh auto 0; padding: 0 16px; }
.anmeldung .karte { padding: 1.6rem; }
.anmeldung .klein-oben { text-transform: uppercase; letter-spacing: .12em; font-size: .78rem; color: var(--leise); font-weight: 600; }

/* Hinweis unten */
.toast { position: fixed; left: 50%; bottom: 1rem; transform: translateX(-50%); background: var(--tinte); color: #fff; padding: .7rem 1rem; border-radius: 8px; max-width: calc(100% - 32px); z-index: 50; box-shadow: 0 4px 18px rgba(0,0,0,.25); }
.toast.fehler { background: var(--rot); }

@media (max-width: 600px) {
  body { font-size: 15px; }
  h1 { font-size: 1.45rem; }
  .kopf-innen { gap: .5rem; }
  .reiter { order: 3; flex-basis: 100%; }
  .rechts { margin-left: auto; }
  .score { font-size: 1.45rem; min-width: 2.1rem; }
  .betrieb { flex-wrap: wrap; }
  .betrieb > .knopf { margin-left: 3rem; }
}

/* Startklar-Liste und Hinweis zur Sicherung auf „Heute“ */
.hinweis-zeile { display: flex; gap: .8rem; align-items: center; flex-wrap: wrap; justify-content: space-between; }
.hinweis-zeile span { flex: 1 1 16rem; }
button.link { background: none; border: 0; padding: 0; text-decoration: underline; font-weight: 600; color: var(--aubergine); cursor: pointer; font-size: .9rem; }
.startklar h3 { font-size: .9rem; color: var(--leise); font-weight: 600; margin: .9rem 0 .3rem; }
.startklar ul { list-style: none; margin: 0; padding: 0; }
.startklar li { display: flex; gap: .6rem; align-items: flex-start; padding: .35rem 0; overflow-wrap: anywhere; }
.startklar li > div { flex: 1; min-width: 0; }
.startklar details { margin-top: .9rem; border-top: 1px solid var(--linie); padding-top: .6rem; }
.startklar details li { color: var(--leise); }
.haken { flex: none; width: 1.25rem; height: 1.25rem; margin-top: .12rem; border: 2px solid var(--aubergine); border-radius: 4px; background: #fff; cursor: pointer; padding: 0; position: relative; }
.haken:hover { background: var(--aubergine-hell); }
.haken.an { background: var(--aubergine); }
.haken.an::after { content: ""; position: absolute; left: .32rem; top: .08rem; width: .3rem; height: .62rem; border: solid #fff; border-width: 0 2px 2px 0; transform: rotate(45deg); }
