:root {
  --blau: #1a3e6e;
  --blau-hell: #2d5fa8;
  --grau: #f4f6f9;
  --linie: #d5dbe4;
  --warn: #b23b3b;
}
* { box-sizing: border-box; }
body {
  margin: 0; font-family: "Segoe UI", system-ui, sans-serif;
  color: #222; background: var(--grau);
}
header { background: var(--blau); color: #fff; }
.kopf-innen {
  max-width: 1100px; margin: 0 auto; padding: 14px 20px;
  display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap;
}
.marke { font-size: 1.25rem; font-weight: 700; }
.marke-sub { font-weight: 400; opacity: .8; font-size: 1rem; margin-left: 6px; }
nav a {
  color: #fff; text-decoration: none; margin-left: 18px; padding: 6px 10px;
  border-radius: 6px;
}
nav a.aktiv, nav a:hover { background: var(--blau-hell); }
main { max-width: 1100px; margin: 0 auto; padding: 24px 20px 60px; }
h1 { font-size: 1.4rem; color: var(--blau); }
h2 { font-size: 1.05rem; color: var(--blau); margin-top: 0; }
.hinweis-text { color: #555; }
.karte {
  background: #fff; border: 1px solid var(--linie); border-radius: 10px;
  padding: 18px; margin: 14px 0;
}
.meldung {
  background: #e8f1e8; border: 1px solid #b9d4b9; border-radius: 8px;
  padding: 10px 14px; margin: 10px 0;
}
.meldung.fehler { background: #fbeeee; border-color: #e4bcbc; color: var(--warn); }
.upload-feld {
  display: block; border: 2px dashed var(--linie); border-radius: 10px;
  padding: 34px 20px; text-align: center; cursor: pointer; color: #555;
  margin-bottom: 14px; transition: border-color .15s, background .15s;
}
.upload-feld.drag, .upload-feld:hover { border-color: var(--blau-hell); background: #f0f5fc; }
.upload-feld input { display: none; }
.knopf {
  background: var(--blau); color: #fff; border: 0; border-radius: 8px;
  padding: 10px 22px; font-size: 1rem; cursor: pointer;
}
.knopf:hover { background: var(--blau-hell); }
.klein-knopf { padding: 5px 12px; font-size: .85rem; }
.klein { color: #666; font-size: .9rem; }
.pdf-leiste { display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }
.ma-karte summary {
  cursor: pointer; display: flex; gap: 14px; align-items: baseline; flex-wrap: wrap;
}
.ma-karte .summen { color: #555; font-size: .9rem; }
.warn-punkt {
  color: var(--warn); font-size: .85rem; font-weight: 700;
  background: #fbeeee; border: 1px solid #e4bcbc; border-radius: 20px; padding: 2px 10px;
}
.ok-punkt {
  color: #2e6b2e; font-size: .85rem;
  background: #e8f1e8; border: 1px solid #b9d4b9; border-radius: 20px; padding: 2px 10px;
}
.meldung.pruef-hinweis { background: #fff6e5; border-color: #e8c98a; color: #7a5a1e; }

/* Auffällige Tage (über 10 h / unter 3 h) */
tr.auffaellig td { background: #fff6e5; }
td.korrigiert { font-style: italic; color: var(--blau); font-weight: 600; }
.marke-warn { color: #8a5a10; font-weight: 600; }
.marke-notiz { color: #222; }
.marke-korr {
  color: var(--blau); background: #eef2f7; border-radius: 4px;
  padding: 0 5px; font-size: .75rem;
}
.marke-urheber { color: #777; font-size: .72rem; font-style: italic; }

/* Korrekturformular */
.korrektur-form { margin-top: 18px; border-top: 2px solid var(--linie); padding-top: 12px; }
.korrektur-kopf { display: flex; justify-content: space-between; align-items: center; flex-wrap: wrap; }
.korrektur-kopf h3 { font-size: 1rem; color: var(--blau); margin: 0 0 8px; }
.alle-schalter { font-size: .85rem; color: #555; }
table.korrektur { font-size: .85rem; margin-bottom: 12px; }
table.korrektur input { padding: 5px 7px; border: 1px solid var(--linie); border-radius: 5px; }
table.korrektur input.notiz-feld { width: 100%; }
table.korrektur .tag-spalte { white-space: nowrap; }
.mini-warn { color: #8a5a10; font-size: .75rem; }
.mini-korr { color: #666; font-size: .72rem; }
tr.nur-alle { display: none; }
.zeige-alle tr.nur-alle { display: table-row; }
table { border-collapse: collapse; width: 100%; background: #fff; }
table.zeiten, table.stamm { margin-top: 12px; font-size: .85rem; }
th, td { border: 1px solid var(--linie); padding: 3px 8px; text-align: left; }
th { background: #eef2f7; color: var(--blau); }
tr.wochenende td { background: #f7f9fc; color: #777; }
tr.summe td { font-weight: 700; background: #eef2f7; }
td.kommentar { color: #777; font-size: .8rem; }
tr.inaktiv td { color: #999; background: #fafafa; }
td.aktionen { white-space: nowrap; }
td.aktionen form { display: inline; }
.link-knopf {
  background: none; border: none; color: var(--warn); cursor: pointer;
  padding: 0; font-size: inherit; text-decoration: underline;
}
.einstellungen { display: flex; gap: 16px; flex-wrap: wrap; align-items: flex-end; }
.einstellungen label { display: flex; flex-direction: column; font-size: .85rem; color: #555; gap: 4px; }
.einstellungen input { padding: 6px 8px; border: 1px solid var(--linie); border-radius: 6px; }
table.stamm input { padding: 4px 6px; border: 1px solid var(--linie); border-radius: 5px; width: 100%; }
footer {
  text-align: center; color: #888; font-size: .8rem; padding: 18px;
  border-top: 1px solid var(--linie); background: #fff;
}

/* --- Anmeldung --- */
.login-seite { display: flex; align-items: center; justify-content: center; min-height: 100vh; }
.login-box { width: 100%; max-width: 380px; padding: 20px; }
.login-marke {
  font-size: 1.5rem; font-weight: 700; color: var(--blau);
  text-align: center; margin-bottom: 18px;
}
.login-marke span { font-weight: 400; opacity: .75; font-size: 1.05rem; }
.login-fuss { text-align: center; margin-top: 14px; }
.feld { display: flex; flex-direction: column; gap: 5px; margin-bottom: 14px; font-size: .9rem; color: #555; }
.feld input {
  padding: 9px 10px; border: 1px solid var(--linie); border-radius: 7px;
  font-size: 1rem;
}
.feld input:focus { outline: 2px solid var(--blau-hell); border-color: var(--blau-hell); }
.knopf.breit { width: 100%; }
.karte.schmal { max-width: 400px; }

/* --- Benutzer im Kopf --- */
.benutzer-block { display: inline-flex; align-items: center; gap: 8px; margin-left: 18px; }
.benutzer-name {
  color: #fff; text-decoration: none; opacity: .9; font-size: .9rem;
  padding: 6px 10px; border-radius: 6px;
}
.benutzer-name:hover { background: var(--blau-hell); }
.rollen-marke {
  background: #fff3; border-radius: 4px; padding: 1px 6px;
  font-size: .7rem; text-transform: uppercase; letter-spacing: .04em;
}
.logout-form { display: inline; }
.logout-knopf {
  background: none; border: 1px solid #fff5; color: #fff; cursor: pointer;
  border-radius: 6px; padding: 5px 10px; font-size: .85rem;
}
.logout-knopf:hover { background: var(--blau-hell); }

/* --- Benutzerverwaltung / Protokoll --- */
.passwort-box { background: #fff6e5; border-color: #e8c98a; }
.passwort-wert {
  font-family: ui-monospace, monospace; font-size: 1.15rem; background: #fff;
  border: 1px solid var(--linie); border-radius: 5px; padding: 3px 10px;
  user-select: all;
}
.link-knopf.blau { color: var(--blau-hell); }
table.stamm select { padding: 4px 6px; border: 1px solid var(--linie); border-radius: 5px; }
.einstellungen select { padding: 6px 8px; border: 1px solid var(--linie); border-radius: 6px; }
.filter-leiste { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; padding: 12px 18px; }
.filter-chip {
  font-size: .8rem; text-decoration: none; color: var(--blau);
  background: #eef2f7; border-radius: 20px; padding: 3px 12px;
}
.filter-chip.aktiv, .filter-chip:hover { background: var(--blau); color: #fff; }
table.protokoll td.details { color: #555; font-size: .8rem; }
td.nowrap { white-space: nowrap; }
tr.warn-zeile td { background: #fbeeee; }
