/* AKBN Mitarbeiterportal – Gestaltung
   Farben aus Briefpapier und Logo: Rot #B50202, Grau #656565.
   Ziel: gut lesbar, große Bedienflächen, barrierearm (WCAG 2.1 AA). */

:root {
  --rot: #b50202;
  --rot-dunkel: #8f0101;
  --rot-hell: #fbeaea;
  --grau: #656565;
  --text: #1d1d1f;
  --text-leise: #575757;
  --linie: #d9d6d2;
  --flaeche: #ffffff;
  --hintergrund: #f6f4f1;
  --gut: #1f6f3a;
  --gut-hell: #e6f3ea;
  --warnung: #8a5300;
  --warnung-hell: #fdf1dc;
  --info-hell: #eaf0f7;
  --fokus: #0b57d0;
  --radius: 10px;
  --schatten: 0 1px 2px rgb(0 0 0 / 6%);
  color-scheme: light;
}

@media (prefers-color-scheme: dark) {
  :root {
    --rot: #ff6b6b;
    --rot-dunkel: #ff8a8a;
    --rot-hell: #3a1a1a;
    --grau: #a8a8a8;
    --text: #f2f2f2;
    --text-leise: #c4c4c4;
    --linie: #3d3a37;
    --flaeche: #1f1d1b;
    --hintergrund: #151413;
    --gut: #7fd69a;
    --gut-hell: #18301f;
    --warnung: #f2c069;
    --warnung-hell: #33280f;
    --info-hell: #1a2533;
    --fokus: #8ab4f8;
    color-scheme: dark;
  }
}

*, *::before, *::after { box-sizing: border-box; }

html { font-size: 106.25%; } /* 17px Grundschrift */

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  line-height: 1.55;
  color: var(--text);
  background: var(--hintergrund);
  -webkit-text-size-adjust: 100%;
}

a { color: var(--rot); text-underline-offset: 2px; }
a:hover { color: var(--rot-dunkel); }

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

.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;
}

.springen { position: absolute; left: -999px; top: 0; background: var(--flaeche); padding: .5rem 1rem; z-index: 10; }
.springen:focus { left: 1rem; }

/* ---------------------------------------------------------------- Kopf */
.kopf {
  background: var(--flaeche);
  border-bottom: 1px solid var(--linie);
}
.kopf-innen {
  max-width: 64rem; margin: 0 auto; padding: .6rem 1rem;
  display: flex; align-items: center; gap: 1rem; justify-content: space-between;
}
.marke { display: flex; align-items: center; gap: .75rem; text-decoration: none; color: var(--text); }
.marke img { height: 44px; width: auto; }
.marke span { font-weight: 600; font-size: 1.05rem; line-height: 1.2; }
.kopf-aktionen { display: flex; align-items: center; gap: .5rem; flex-wrap: wrap; justify-content: flex-end; }
.kopf-name { color: var(--text-leise); font-size: .9rem; }
.testsystem-band {
  background: repeating-linear-gradient(45deg, #ffd54f, #ffd54f 12px, #ffe082 12px, #ffe082 24px);
  color: #3d2e00; text-align: center; font-weight: 700; padding: .3rem; font-size: .9rem;
}

/* ---------------------------------------------------------------- Inhalt */
main { max-width: 64rem; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
.schmal { max-width: 30rem; margin: 2rem auto; padding: 0 1rem 3rem; }

h1 { font-size: 1.6rem; line-height: 1.25; margin: .25rem 0 1rem; }
h2 { font-size: 1.25rem; margin: 2rem 0 .75rem; }
h3 { font-size: 1.05rem; margin: 1.25rem 0 .5rem; }
p { margin: 0 0 1rem; }
.leise { color: var(--text-leise); }
.klein { font-size: .9rem; }

.brotkrumen { font-size: .9rem; margin-bottom: .5rem; }
.brotkrumen a { color: var(--text-leise); }

.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 1.25rem;
  box-shadow: var(--schatten);
  margin-bottom: 1rem;
}
.karte > :last-child { margin-bottom: 0; }

.raster { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fill, minmax(15rem, 1fr)); }

/* Kacheln der Startseite */
.kachel {
  display: flex; gap: .9rem; align-items: flex-start;
  background: var(--flaeche); border: 1px solid var(--linie); border-radius: var(--radius);
  padding: 1rem; text-decoration: none; color: var(--text); min-height: 5.5rem;
  box-shadow: var(--schatten); position: relative;
}
.kachel:hover { border-color: var(--rot); color: var(--text); }
.kachel .symbol { flex: none; width: 2.6rem; height: 2.6rem; border-radius: 50%; background: var(--rot-hell);
  color: var(--rot); display: grid; place-items: center; }
.kachel .symbol svg { width: 1.4rem; height: 1.4rem; }
.kachel strong { display: block; font-size: 1.05rem; }
.kachel span.beschreibung { color: var(--text-leise); font-size: .9rem; line-height: 1.4; display: block; }
.zahl {
  position: absolute; top: .6rem; right: .6rem; min-width: 1.6rem; height: 1.6rem; padding: 0 .4rem;
  border-radius: 1rem; background: var(--rot); color: #fff; font-weight: 700; font-size: .85rem;
  display: grid; place-items: center;
}

/* Zu erledigen */
.erledigen { list-style: none; padding: 0; margin: 0; }
.erledigen li { border-top: 1px solid var(--linie); }
.erledigen li:first-child { border-top: 0; }
.erledigen a { display: flex; gap: .75rem; align-items: center; padding: .8rem .25rem; text-decoration: none; color: var(--text); }
.erledigen a:hover { color: var(--rot); }
.erledigen .punkt { flex: none; width: .7rem; height: .7rem; border-radius: 50%; background: var(--grau); }
.erledigen .wichtig .punkt { background: var(--rot); }
.erledigen .pfeil { margin-left: auto; color: var(--text-leise); }

/* ---------------------------------------------------------------- Formulare */
.feld { margin-bottom: 1.1rem; }
.feld > label, .feld > .label { display: block; font-weight: 600; margin-bottom: .3rem; }
.feld .hilfe { color: var(--text-leise); font-size: .9rem; margin-top: .25rem; }
.feld .fehler { color: var(--rot); font-weight: 600; font-size: .95rem; margin-top: .25rem; }
input[type=text], input[type=email], input[type=password], input[type=date], input[type=search],
input[type=number], input[type=file], select, textarea {
  width: 100%; font: inherit; color: var(--text); background: var(--flaeche);
  border: 1.5px solid #8c8883; border-radius: 8px; padding: .65rem .75rem; min-height: 2.9rem;
}
input[aria-invalid=true], select[aria-invalid=true] { border-color: var(--rot); }
.code-eingabe { font-size: 1.6rem; letter-spacing: .25em; text-align: center; font-variant-numeric: tabular-nums; }
.ankreuzen { display: flex; gap: .6rem; align-items: flex-start; }
.ankreuzen input { width: 1.35rem; height: 1.35rem; margin-top: .2rem; flex: none; }
.ankreuzen label { font-weight: 400; margin: 0; }
.auswahlliste { list-style: none; padding: 0; margin: 0; display: grid; gap: .4rem; }
.auswahlliste label { display: flex; gap: .6rem; align-items: center; font-weight: 400; }
.auswahlliste input { width: 1.25rem; height: 1.25rem; }
.formular-fehler { background: var(--rot-hell); border-left: 4px solid var(--rot); padding: .75rem 1rem; border-radius: 6px; margin-bottom: 1rem; }
fieldset { border: 0; padding: 0; margin: 0 0 1.1rem; min-width: 0; }
legend { font-weight: 600; margin-bottom: .3rem; padding: 0; }
fieldset[disabled] { opacity: .7; }

/* ---------------------------------------------------------------- Knöpfe */
.knopf, button {
  display: inline-flex; align-items: center; justify-content: center; gap: .4rem;
  font: inherit; font-weight: 600; cursor: pointer; text-decoration: none;
  border-radius: 8px; padding: .6rem 1.1rem; min-height: 2.9rem;
  border: 1.5px solid var(--rot); background: var(--rot); color: #fff;
}
.knopf:hover, button:hover { background: var(--rot-dunkel); border-color: var(--rot-dunkel); color: #fff; }
.knopf.zweitrangig, button.zweitrangig { background: transparent; color: var(--rot); }
.knopf.zweitrangig:hover, button.zweitrangig:hover { background: var(--rot-hell); color: var(--rot-dunkel); }
.knopf.leise, button.leise { background: transparent; color: var(--text); border-color: var(--linie); }
.knopf.leise:hover, button.leise:hover { background: var(--hintergrund); color: var(--text); }
.knopf.klein, button.klein { min-height: 2.2rem; padding: .3rem .7rem; font-size: .9rem; }
.knopf.breit, button.breit { width: 100%; }
.knopfreihe { display: flex; gap: .6rem; flex-wrap: wrap; align-items: center; margin-top: 1rem; }
form.inline { display: inline; }

/* ---------------------------------------------------------------- Meldungen */
.meldungen { list-style: none; padding: 0; margin: 0 0 1rem; }
.meldung { padding: .8rem 1rem; border-radius: 8px; margin-bottom: .5rem; border-left: 4px solid var(--grau); background: var(--info-hell); }
.meldung.success { border-color: var(--gut); background: var(--gut-hell); }
.meldung.warning { border-color: var(--warnung); background: var(--warnung-hell); }
.meldung.error { border-color: var(--rot); background: var(--rot-hell); }

.hinweis { background: var(--info-hell); border-radius: 8px; padding: .8rem 1rem; margin-bottom: 1rem; }
.hinweis.warnung { background: var(--warnung-hell); }

.etikett { display: inline-block; font-size: .8rem; font-weight: 600; padding: .1rem .5rem; border-radius: 1rem; background: var(--hintergrund); border: 1px solid var(--linie); white-space: nowrap; }
.etikett.gut { background: var(--gut-hell); border-color: transparent; color: var(--gut); }
.etikett.warnung { background: var(--warnung-hell); border-color: transparent; color: var(--warnung); }
.etikett.rot { background: var(--rot-hell); border-color: transparent; color: var(--rot); }

/* ---------------------------------------------------------------- Tabellen & Listen */
.tabelle-huelle { overflow-x: auto; position: relative; } /* hält auch .sr-only-Zellen in der Hülle */
table { width: 100%; border-collapse: collapse; background: var(--flaeche); }
th, td { text-align: left; padding: .6rem .6rem; border-bottom: 1px solid var(--linie); vertical-align: top; }
th { font-size: .9rem; color: var(--text-leise); font-weight: 600; }
tr.fehler td { background: var(--rot-hell); }

dl.daten { display: grid; grid-template-columns: minmax(8rem, 12rem) 1fr; gap: .4rem 1rem; margin: 0; }
dl.daten dt { color: var(--text-leise); }
dl.daten dd { margin: 0; }

.filter { display: flex; gap: .6rem; flex-wrap: wrap; align-items: flex-end; margin-bottom: 1rem; }
.filter .feld { margin: 0; flex: 1 1 10rem; }
.seiten { display: flex; gap: 1rem; justify-content: center; margin-top: 1rem; }

.kopfzeile { display: flex; justify-content: space-between; align-items: flex-start; gap: 1rem; flex-wrap: wrap; }
.kopfzeile h1 { margin-bottom: .5rem; }

/* Einrichtung */
.schritte { display: flex; gap: .5rem; list-style: none; padding: 0; margin: 0 0 1.25rem; font-size: .9rem; }
.schritte li { flex: 1; text-align: center; padding: .35rem; border-radius: 6px; background: var(--hintergrund); color: var(--text-leise); }
.schritte li.aktiv { background: var(--rot); color: #fff; font-weight: 600; }
.qr { background: #fff; padding: .75rem; border-radius: 8px; width: min(16rem, 100%); margin: 0 auto 1rem; }
.qr svg { width: 100%; height: auto; display: block; }
.geheimnis { font-family: ui-monospace, Consolas, monospace; font-size: 1rem; word-break: break-all; background: var(--hintergrund); padding: .5rem .75rem; border-radius: 6px; }
.codes { columns: 2; font-family: ui-monospace, Consolas, monospace; font-size: 1.15rem; list-style: none; padding: 0; }
.codes li { padding: .2rem 0; }

footer.fuss { text-align: center; color: var(--text-leise); font-size: .85rem; padding: 2rem 1rem; }

svg.icon { width: 1.2em; height: 1.2em; vertical-align: -.2em; }

@media (max-width: 40rem) {
  .marke span { display: none; }
  h1 { font-size: 1.4rem; }
  dl.daten { grid-template-columns: 1fr; }
  dl.daten dt { margin-top: .5rem; }
  .verbergen-schmal { display: none; }
}

@media print {
  .kopf, footer, .knopfreihe, .nicht-drucken { display: none !important; }
  body { background: #fff; }
  .karte { border: 0; box-shadow: none; }
}

/* Hilfsklassen (statt Inline-Styles – die Sicherheitsrichtlinie erlaubt keine) */
.abstand-oben { margin-top: 1rem; }
.ohne-abstand { margin-top: 0; }
.begrenzt { max-width: 32rem; }
.rechts { text-align: right; }

/* ---------------------------------------------------------------- Büro-Cockpit */
.reiter { display: flex; gap: .25rem; overflow-x: auto; border-bottom: 2px solid var(--linie); margin: 0 0 1.25rem; padding-bottom: 0; }
.reiter a { padding: .6rem .9rem; text-decoration: none; color: var(--text-leise); white-space: nowrap; border-bottom: 3px solid transparent; margin-bottom: -2px; font-weight: 600; }
.reiter a:hover { color: var(--rot); }
.reiter a[aria-current="page"] { color: var(--rot); border-bottom-color: var(--rot); }

.eintrag { background: var(--flaeche); border: 1px solid var(--linie); border-left: 4px solid var(--linie); border-radius: var(--radius); padding: .9rem 1rem; margin-bottom: .75rem; }
.eintrag.neu { border-left-color: var(--rot); }
.eintrag.angeheftet { border-left-color: var(--warnung); background: var(--warnung-hell); }
.eintrag-kopf { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; margin-bottom: .35rem; }
.eintrag-bezug { margin: 0 0 .35rem; font-weight: 600; }
.eintrag-text { overflow-wrap: anywhere; }
.eintrag-fuss { display: flex; justify-content: space-between; gap: .5rem; flex-wrap: wrap; margin-top: .5rem; }
.eintrag-aktionen { display: flex; gap: .25rem; flex-wrap: wrap; }
.neu-eintrag summary { cursor: pointer; }

.liste-schlicht { list-style: none; padding: 0; margin: 0; }
.liste-schlicht > li { padding: .45rem 0; border-top: 1px solid var(--linie); }
.liste-schlicht > li:first-child { border-top: 0; }

.aufgabe { display: flex; gap: .75rem; align-items: flex-start; }
.aufgabe-text { flex: 1; }
.aufgabe.erledigt .aufgabe-text strong { text-decoration: line-through; color: var(--text-leise); }
.aufgabe.ueberfaellig .aufgabe-text strong { color: var(--rot); }
button.haken { min-height: 0; width: 1.8rem; height: 1.8rem; padding: 0; border-radius: 6px; background: var(--flaeche); border: 2px solid #8c8883; color: var(--gut); font-size: 1.1rem; flex: none; }
button.haken:hover { background: var(--gut-hell); border-color: var(--gut); color: var(--gut); }

.luecke { display: flex; gap: 1rem; justify-content: space-between; flex-wrap: wrap; padding: .6rem 0; border-top: 1px solid var(--linie); }
.luecke:first-child { border-top: 0; }
.luecke.status-besetzt { opacity: .6; }
.luecke-status { display: flex; gap: .4rem; flex-wrap: wrap; align-items: center; }
.luecke-status select, .luecke-status input { width: auto; min-height: 2.2rem; padding: .3rem .5rem; }
.fehlertext { color: var(--rot); font-weight: 600; }
.haken-anzeige { flex: none; width: 1.8rem; height: 1.8rem; border-radius: 6px; border: 2px dashed var(--linie); color: var(--gut); display: grid; place-items: center; font-size: 1.1rem; }
.aufgabe.erledigt .haken-anzeige { border-style: solid; border-color: var(--gut); }

/* ---------------------------------------------------------------- Bewerbungen */
[hidden] { display: none !important; }
.raster.zwei { grid-template-columns: repeat(auto-fit, minmax(20rem, 1fr)); align-items: start; }
.board { display: flex; gap: .8rem; overflow-x: auto; padding-bottom: .8rem; align-items: flex-start; }
.board-spalte { flex: 0 0 15rem; background: var(--hintergrund); border: 1px solid var(--linie); border-radius: var(--radius); padding: .6rem; }
.board-spalte.ende { opacity: .85; }
.board-spalte h2 { font-size: 1rem; margin: 0 0 .5rem; }
.bewerbung-karte { display: flex; flex-direction: column; gap: .15rem; background: var(--flaeche); border: 1px solid var(--linie); border-radius: 8px; padding: .55rem .65rem; margin-bottom: .5rem; text-decoration: none; color: var(--text); }
.bewerbung-karte:hover { border-color: var(--rot); color: var(--text); }
.bewerbung-karte .rot { color: var(--rot); font-weight: 600; }
.angaben { display: grid; grid-template-columns: minmax(8rem, 1fr) 2fr; gap: .3rem .8rem; margin: 0 0 1rem; }
.angaben dt { color: var(--text-leise); font-size: .9rem; }
.angaben dd { margin: 0; overflow-wrap: anywhere; }
.zeitraster { width: auto; }
.zeitraster th, .zeitraster td { padding: .25rem .45rem; text-align: center; }
.zeitraster th[scope="row"] { text-align: left; }
.zeitraster input { width: 1.3rem; height: 1.3rem; }
.gruppe { border-top: 1px solid var(--linie); padding-top: 1rem; }
.gruppe > legend { font-weight: 700; font-size: 1.15rem; padding-top: 1rem; }
.honigtopf { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
@media (max-width: 40rem) { .angaben { grid-template-columns: 1fr; } .angaben dd { margin-bottom: .4rem; } }
