/* ladestellen.rechner – Schrift und Größen wie cp-i.eu, Farben wie ladestellenbonus */

@font-face { font-family: "Inter"; font-weight: 400; font-display: swap; src: url("../fonts/inter-regular.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 500; font-display: swap; src: url("../fonts/inter-medium.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 600; font-display: swap; src: url("../fonts/inter-semibold.woff2") format("woff2"); }
@font-face { font-family: "Inter"; font-weight: 700; font-display: swap; src: url("../fonts/inter-bold.woff2") format("woff2"); }

:root {
  /* ladestellenbonus */
  --green: #2E8B57;
  --green-light: #3DAA6D;
  --green-dark: #1F6B40;
  --green-tint: #E8F4ED;
  --amber: #F0A500;
  --amber-tint: #FDF4DD;
  --text: #1E1E1E;
  --text-muted: #5A6472;
  --bg: #F8F9FA;
  --bg-dark: #EAECEF;
  --white: #FFFFFF;
  --red: #B3261E;
  /* cp-i.eu */
  --font-main: "Inter", system-ui, -apple-system, "Segoe UI", sans-serif;
  --cpi-grau: #494949;
  --max-width: 1140px;
}

* { box-sizing: border-box; }
body {
  margin: 0;
  font-family: var(--font-main);
  font-size: 16px;
  line-height: 1.7;
  color: var(--text);
  background: var(--bg);
}
h1, h2, h3, h4 { font-weight: 600; line-height: 1.3; margin: 0 0 1rem; }
h2 { font-size: 1.8rem; }
h3 { font-size: 1.2rem; margin-bottom: 0.5rem; }
a { color: var(--green-dark); }

.rahmen { max-width: var(--max-width); margin: 0 auto; padding: 0 16px; }

.kopf { background: var(--white); border-bottom: 4px solid var(--green); }
.kopf-innen { display: flex; align-items: center; gap: 20px; padding-top: 14px; padding-bottom: 14px; }
.logo { height: 44px; }
.marke { font-size: 1.4rem; font-weight: 600; color: var(--green-dark); letter-spacing: -0.3px; }
.unterzeile { font-size: 0.9rem; color: var(--text-muted); line-height: 1.4; }

.karte { background: var(--white); border: 1px solid var(--bg-dark); border-radius: 8px; padding: 24px; margin: 24px 0; }
.hinweis { font-size: 0.85rem; color: var(--text-muted); margin: 0.75rem 0 0; }

.felder { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 12px 20px; }
.feld { display: flex; flex-direction: column; gap: 2px; padding: 8px 10px; border-radius: 6px; border-left: 3px solid transparent; }
.feld.geaendert { background: var(--green-tint); border-left-color: var(--green); }
.feld-fehler { background: #FBEAEA; border-left-color: var(--red); }
.feld-name { font-size: 0.85rem; font-weight: 500; line-height: 1.4; }
.feld-eingabe { display: flex; align-items: center; gap: 6px; }
.feld input { width: 100%; min-width: 0; font: inherit; font-size: 1rem; padding: 6px 8px; border: 1px solid #C9CED4; border-radius: 4px; text-align: right; background: var(--white); }
.feld input:focus { outline: 2px solid var(--green-light); border-color: var(--green); }
.einheit { font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; min-width: 3.5em; }
.zurueck { border: 0; background: none; color: var(--text-muted); cursor: pointer; font-size: 1rem; padding: 0 2px; visibility: hidden; }
.feld.geaendert .zurueck { visibility: visible; }
.benchmark { font-size: 0.75rem; color: var(--green-dark); line-height: 1.3; }
.quelle { font-size: 0.75rem; color: var(--text-muted); line-height: 1.3; }

.kennzahlen { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; }
.kz { background: var(--bg); border-radius: 6px; padding: 14px; border-top: 3px solid var(--green); display: flex; flex-direction: column; }
.kz-wert { font-size: 1.35rem; font-weight: 600; color: var(--green-dark); line-height: 1.3; }
.kz-text { font-size: 0.82rem; color: var(--text-muted); line-height: 1.4; margin-top: 4px; }
.kz-achtung { border-top-color: var(--amber); background: var(--amber-tint); }
.kz-achtung .kz-wert { color: #8A5E00; }

.rollen { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 20px; }
.rolle h3 { color: var(--green-dark); }
table { width: 100%; border-collapse: collapse; font-size: 0.9rem; }
td, th { padding: 5px 8px; border-bottom: 1px solid var(--bg-dark); text-align: left; vertical-align: top; }
th { font-weight: 600; font-size: 0.8rem; color: var(--text-muted); white-space: nowrap; }
.zahl { text-align: right; white-space: nowrap; font-variant-numeric: tabular-nums; }
tr.summe td { font-weight: 600; border-top: 2px solid var(--green); }
tr.basis td { background: var(--green-tint); }
.achtung { color: #8A5E00; font-weight: 600; }
.tabelle-scroll { overflow-x: auto; }

.diagramm { width: 100%; max-height: 240px; }
.diagramm .pos { fill: var(--green); }
.diagramm .neg { fill: var(--amber); }
.diagramm .achse { stroke: var(--text-muted); stroke-width: 1; }
.diagramm .beschriftung { font-size: 13px; text-anchor: middle; fill: var(--text); }
.diagramm .klein { font-size: 11px; fill: var(--text-muted); }

details.gruppe { border-top: 1px solid var(--bg-dark); padding: 10px 0; }
details.gruppe summary { cursor: pointer; font-weight: 600; color: var(--green-dark); }
details.gruppe .felder { margin-top: 12px; }

.meldung.fehler { background: #FBEAEA; border-left: 4px solid var(--red); padding: 12px 16px; border-radius: 6px; margin-top: 24px; font-size: 0.9rem; }
.knopf { background: var(--green); color: var(--white); border: 0; border-radius: 4px; padding: 10px 18px; font: inherit; cursor: pointer; }

.kontakt input.text, input.text { text-align: left; }
.feld select { width: 100%; font: inherit; font-size: 1rem; padding: 6px 8px; border: 1px solid #C9CED4; border-radius: 4px; background: var(--white); }
.foerder-suche { display: flex; gap: 12px; align-items: flex-end; flex-wrap: wrap; }
.feld-breit { flex: 1 1 320px; padding-left: 0; }
.foerder-suche .knopf { margin-bottom: 8px; }
.knopf:disabled { background: var(--bg-dark); color: var(--text-muted); cursor: default; }
.upload-zeile { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 12px; }
.upload-zeile input[type=file] { font: inherit; font-size: 0.9rem; max-width: 100%; }
.dokument { border-top: 1px solid var(--bg-dark); padding: 12px 0; }
.knopf-klein { padding: 3px 10px; font-size: 0.8rem; }
.foerderliste { display: flex; flex-direction: column; gap: 8px; margin-top: 12px; }
.programm { display: flex; gap: 12px; align-items: flex-start; padding: 10px 12px; border: 1px solid var(--bg-dark); border-radius: 6px; cursor: pointer; font-size: 0.9rem; line-height: 1.45; }
.programm.gewaehlt { background: var(--green-tint); border-color: var(--green); }
.programm input { margin-top: 4px; width: 18px; height: 18px; flex: none; }
.programm-text { display: flex; flex-direction: column; gap: 2px; min-width: 0; overflow-wrap: anywhere; }
.marke-ebene, .sicherheit { font-size: 0.72rem; padding: 1px 6px; border-radius: 10px; background: var(--bg-dark); color: var(--text-muted); white-space: nowrap; }
.sicherheit-hoch { background: var(--green-tint); color: var(--green-dark); }
.sicherheit-niedrig { background: var(--amber-tint); color: #8A5E00; }
.zustimmung { display: flex; gap: 10px; align-items: flex-start; font-size: 0.85rem; margin: 16px 0; padding: 8px 10px; border-radius: 6px; }
.zustimmung input { margin-top: 5px; }

/* Bericht */
.bericht-kopf { display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; align-items: flex-start; }
.bericht-kopf dl { display: grid; grid-template-columns: max-content 1fr; gap: 2px 16px; margin: 0; font-size: 0.95rem; }
.bericht-kopf dt { color: var(--text-muted); }
.bericht-kopf dd { margin: 0; }
.knopfleiste { display: flex; gap: 12px; align-items: center; }
.eckdaten-kopf { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; flex-wrap: wrap; }
.knopf-hell { background: var(--white); color: var(--green-dark); border: 1px solid var(--green); }
tr.geaendert td { background: var(--green-tint); }

@page { size: A4; margin: 15mm 12mm; }
@media print {
  body { background: var(--white); font-size: 10pt; line-height: 1.45; }
  .rahmen { max-width: none; padding: 0; }
  .kopf { border-bottom-width: 3px; }
  .karte { border: 0; padding: 0; margin: 0 0 14px; break-inside: avoid; }
  .karte.lang { break-inside: auto; }
  h2 { font-size: 13pt; margin-bottom: 6px; }
  .nicht-drucken, .knopfleiste { display: none !important; }
  .kennzahlen { grid-template-columns: repeat(4, 1fr); }
  .rollen { grid-template-columns: repeat(2, 1fr); }
  .tabelle-scroll { overflow: visible; }
  table { font-size: 8.5pt; }
  td, th { padding: 2px 4px; }
  .diagramm { max-height: 150px; }
  .seitenumbruch { break-before: page; }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

.fuss { font-size: 0.8rem; color: var(--text-muted); padding: 24px 0 40px; border-top: 1px solid var(--bg-dark); }
.fuss p { margin: 0.25rem 0; }

@media (max-width: 600px) {
  h2 { font-size: 1.4rem; }
  .karte { padding: 16px; }
  .logo { height: 34px; }
  .kopf-innen { flex-wrap: wrap; gap: 8px 16px; }
}

/* Anmeldung */
.anmelden .karte { max-width: 520px; margin-left: auto; margin-right: auto; }
.anmelden .feld input { text-align: left; }
.versteckt { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
.abmelden { margin-left: auto; font-size: 0.85rem; color: var(--text-muted); text-align: right; }
.abmelden a { color: var(--green-dark); }
.fehlertext { color: var(--red); font-size: 0.85rem; }
