/* Werkstattsoftware – Grundstil passend zur UI-Skizze */
:root {
  --grund: #F3F4F1; --karte: #FFFFFF; --linie: #DADDD6; --linie-hell: #ECEEE9;
  --text: #1A1D1B; --text-leise: #5B615D; --nav: #1A1D1B; --nav-aktiv: #2C312E; --nav-text: #C9CDC5;
  --blau: #1F5F8B; --blau-dunkel: #164867; --blau-hell: #EAF1F6;
  --orange: #8A3F06; --orange-hell: #FBE7D3; --gruen: #1F5129; --gruen-hell: #DDEEDF; --rot: #8E2A20; --rot-hell: #F6D9D6;
  --akzent: #F2A35E;
}
* { box-sizing: border-box; }
body { margin: 0; background: var(--grund); color: var(--text); font: 15px/1.45 "IBM Plex Sans", system-ui, sans-serif; }
a { color: var(--blau); } a:hover { color: var(--blau-dunkel); }
.mono { font-family: "IBM Plex Mono", ui-monospace, monospace; }
.leise { color: var(--text-leise); }
.rahmen { display: flex; flex-wrap: wrap; min-height: 100vh; }
nav.haupt { flex: 1 1 220px; max-width: 250px; min-width: 200px; background: var(--nav); padding: 24px 16px; display: flex; flex-direction: column; gap: 4px; }
nav.haupt .logo { color: #fff; font-weight: 700; font-size: 18px; padding: 4px 12px 24px; }
nav.haupt .logo span { color: var(--akzent); }
nav.haupt a { display: block; padding: 11px 12px; border-radius: 8px; color: var(--nav-text); text-decoration: none; }
nav.haupt a[aria-current="page"], nav.haupt a:hover { background: var(--nav-aktiv); color: #fff; }
nav.haupt .unten { margin-top: auto; }
main { flex: 999 1 560px; min-width: 0; padding: 28px 32px 40px; display: flex; flex-direction: column; gap: 20px; }
.kopf { display: flex; flex-wrap: wrap; gap: 16px; align-items: center; justify-content: space-between; }
h1 { margin: 2px 0 0; font-size: 26px; } h2 { margin: 0 0 12px; font-size: 17px; }
.karte { background: var(--karte); border: 1px solid var(--linie); border-radius: 10px; padding: 18px 20px; }
.kacheln { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 16px; }
.kachel .wert { font-size: 28px; font-weight: 700; }
.zweispaltig { display: flex; flex-wrap: wrap; gap: 20px; align-items: flex-start; }
.zweispaltig > .haupt { flex: 999 1 560px; min-width: 0; }
.zweispaltig > .seite { flex: 1 1 300px; min-width: 260px; display: flex; flex-direction: column; gap: 20px; }
.tabelle-box { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .4px; color: var(--text-leise); padding: 8px; border-bottom: 1px solid var(--linie); }
td { padding: 11px 8px; border-bottom: 1px solid var(--linie-hell); vertical-align: top; }
td.zahl, th.zahl { text-align: right; font-family: "IBM Plex Mono", monospace; white-space: nowrap; }
.kennzeichen { display: inline-block; border: 2px solid var(--text); border-radius: 4px; padding: 1px 8px; font-family: "IBM Plex Mono", monospace; font-weight: 600; background: #fff; white-space: nowrap; }
.chip { display: inline-block; padding: 3px 10px; border-radius: 999px; font-size: 13px; font-weight: 600; white-space: nowrap; background: var(--linie-hell); }
.chip.in_arbeit, .chip.angelegt, .chip.kv { background: #D6E4EE; color: var(--blau-dunkel); }
.chip.wartet_freigabe, .chip.wartet_teile, .chip.versicherung { background: var(--orange-hell); color: var(--orange); }
.chip.fertig, .chip.abgerechnet, .chip.abgeschlossen { background: var(--gruen-hell); color: var(--gruen); }
.knopf { display: inline-flex; align-items: center; justify-content: center; min-height: 44px; padding: 0 18px; border-radius: 8px; border: 1px solid #C9CDC5; background: #fff; color: var(--text); font: inherit; font-weight: 600; text-decoration: none; cursor: pointer; }
.knopf.primaer { background: var(--blau); border-color: var(--blau); color: #fff; }
.knopf[disabled] { background: var(--grund); color: #6E746F; cursor: not-allowed; }
input[type=search], input[type=text], input[type=password], select { height: 44px; border: 1px solid #C9CDC5; border-radius: 8px; padding: 0 12px; font: inherit; background: #fff; }
.hinweis { border-radius: 8px; padding: 12px 14px; }
.hinweis.warnung { background: var(--orange-hell); color: var(--orange); }
.hinweis.fehler { background: var(--rot-hell); color: var(--rot); }
.hinweis.ok { background: var(--gruen-hell); color: var(--gruen); }
.meldungen { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; }
.meldungen .success { background: var(--gruen-hell); color: var(--gruen); }
.meldungen .warning { background: var(--orange-hell); color: var(--orange); }
.meldungen .error { background: var(--rot-hell); color: var(--rot); }
.meldungen li { border-radius: 8px; padding: 12px 14px; }
dl.daten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; margin: 0; }
dl.daten dt { font-size: 12px; color: var(--text-leise); } dl.daten dd { margin: 2px 0 0; font-weight: 500; }
.summen { margin-left: auto; width: 300px; display: flex; flex-direction: column; gap: 6px; padding-top: 12px; }
.summen div { display: flex; justify-content: space-between; } .summen .brutto { font-weight: 700; border-top: 1px solid var(--linie); padding-top: 6px; }
.filter { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.anmelden { max-width: 380px; margin: 12vh auto; }
.anmelden form { display: flex; flex-direction: column; gap: 12px; }

/* Ergänzungen Phase 1a (keine Inline-Stile wegen Content-Security-Policy) */
.zeile { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.zeile.weit { gap: 20px; }
.spalte { display: flex; flex-direction: column; gap: 20px; }
.voll { width: 100%; }
.oben-abstand { margin-top: 12px; }
.suchfeld { flex: 1 1 320px; }
.kennzeichen.gross { font-size: 22px; }
.knopf.klein { min-height: 34px; padding: 0 10px; font-size: 13px; }
.knopf.gefahr { border-color: var(--rot); color: var(--rot); }
.knopf.voll { width: 100%; margin-top: 8px; }
.chip.storniert { background: var(--rot-hell); color: var(--rot); }
.wert.orange { color: var(--orange); }
.datum-spalte { width: 140px; }
.breit2 { grid-column: span 2; }
form.formular { display: flex; flex-direction: column; gap: 14px; }
.felder { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 12px 16px; }
.felder label, .feld-einzeln label { display: block; font-size: 12px; color: var(--text-leise); margin-bottom: 4px; }
.felder input:not([type=checkbox]):not([type=radio]), .felder select, .felder textarea, .feld-einzeln textarea,
.feld-einzeln input:not([type=checkbox]):not([type=radio]), .feld-einzeln select { width: 100%; }
input[type=number], input[type=email], input[type=date], input[type=datetime-local], input[type=file], textarea {
  min-height: 44px; border: 1px solid #C9CDC5; border-radius: 8px; padding: 8px 12px; font: inherit; background: #fff; }
.feld-einzeln ul, .felder ul { list-style: none; padding: 0; margin: 0; display: flex; flex-wrap: wrap; gap: 6px 16px; }
.errorlist { color: var(--rot); font-size: 13px; list-style: none; padding: 0; margin: 4px 0 0; }
.inline-form { display: inline; }
td.aktion { white-space: nowrap; text-align: right; }
td input.klein { width: 90px; height: 34px; }
.kalender { display: grid; grid-template-columns: repeat(auto-fit, minmax(220px, 1fr)); gap: 16px; }
.termin { border-left: 4px solid var(--blau); background: var(--blau-hell); border-radius: 6px; padding: 8px 10px; margin-bottom: 8px; }
.termin a { text-decoration: none; color: var(--text); }
.pflicht li.ok { color: var(--gruen); } .pflicht li.fehlt { color: var(--orange); }
.fotos { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 10px; }
.fotos img { width: 100%; height: 110px; object-fit: cover; border-radius: 6px; border: 1px solid var(--linie); }
details.aufklapp summary { cursor: pointer; font-weight: 600; padding: 6px 0; }
.schalter { max-width: 900px; margin: 0 auto; padding: 16px; display: flex; flex-direction: column; gap: 16px; }
.schalter .dokument { background: #fff; border: 1px solid var(--linie); border-radius: 10px; padding: 18px 22px; }
.schalter canvas { width: 100%; height: 220px; background: #fff; border: 2px dashed #9aa19c; border-radius: 10px; touch-action: none; }
.schalter .gross-text { font-size: 22px; text-align: center; padding: 18vh 0; color: var(--text-leise); }

.felder label.ankreuz { display: flex; align-items: center; gap: 10px; min-height: 44px; margin: 18px 0 0; font-size: 15px;
  color: var(--text); cursor: pointer; }
.felder label.ankreuz input { width: 20px; height: 20px; flex: none; }
.kv-hinweis { margin-bottom: 16px; } .kv-hinweis form { margin-top: 8px; } .kv-hinweis input[type=text] { flex: 1; min-width: 240px; }
