/* FF Gerätewartung – Stylesheet */

:root {
  --rot: #c8102e;
  --rot-dunkel: #980c22;
  --anthrazit: #232a31;
  --anthrazit-hell: #38424d;
  --text: #1d2329;
  --text-schwach: #6b7681;
  --linie: #dde3e9;
  --flaeche: #ffffff;
  --grund: #f2f5f8;
  --gruen: #157347;
  --gelb: #b57200;
  --blau: #14548c;
  --radius: 10px;
  --schatten: 0 1px 2px rgba(16, 24, 32, .06), 0 4px 14px rgba(16, 24, 32, .05);
}

* { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font-family: system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--text);
  background: var(--grund);
}

a { color: var(--blau); }
a:hover { color: var(--rot); }

/* ------------------------------------------------------------------ Kopf */

.kopf {
  background: var(--anthrazit);
  color: #fff;
  border-bottom: 4px solid var(--rot);
}

.kopf-inner {
  max-width: 1240px;
  margin: 0 auto;
  padding: 10px 18px;
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 10px 22px;
}

.marke {
  display: flex;
  align-items: center;
  gap: 12px;
  color: #fff;
  text-decoration: none;
  margin-right: auto;
}

.marke strong { display: block; font-size: 17px; line-height: 1.2; }
.marke small { display: block; font-size: 12px; color: #a9b4bf; }

.logo { height: 42px; width: auto; background: #fff; border-radius: 6px; padding: 3px; }

.logo-platzhalter {
  width: 40px; height: 40px;
  display: grid; place-items: center;
  background: var(--rot);
  border-radius: 8px;
  font-weight: 700;
  letter-spacing: .5px;
}

.hauptnav { display: flex; flex-wrap: wrap; gap: 4px; }

.hauptnav a {
  color: #d7dee5;
  text-decoration: none;
  padding: 8px 12px;
  border-radius: 8px;
  font-size: 15px;
  white-space: nowrap;
}

.hauptnav a:hover { background: var(--anthrazit-hell); color: #fff; }
.hauptnav a.aktiv { background: var(--rot); color: #fff; }

.zaehler {
  display: inline-block;
  min-width: 20px;
  padding: 0 6px;
  margin-left: 4px;
  border-radius: 10px;
  background: var(--rot);
  color: #fff;
  font-size: 12px;
  font-weight: 700;
  text-align: center;
}
.hauptnav a.aktiv .zaehler { background: #fff; color: var(--rot); }
.zaehler-grau { background: #55616d; }

.benutzer { display: flex; align-items: center; gap: 10px; font-size: 14px; color: #c4ced8; }
.benutzer .abmelden { color: #c4ced8; text-decoration: none; border: 1px solid #4b5763; padding: 5px 10px; border-radius: 7px; }
.benutzer .abmelden:hover { background: var(--rot); border-color: var(--rot); color: #fff; }

/* --------------------------------------------------------------- Struktur */

.inhalt { max-width: 1240px; margin: 0 auto; padding: 22px 18px 60px; }

.oeffentlich .inhalt { max-width: 780px; }

.fuss {
  max-width: 1240px;
  margin: 0 auto;
  padding: 14px 18px 30px;
  display: flex;
  justify-content: space-between;
  color: var(--text-schwach);
  font-size: 13px;
}

.titelzeile {
  display: flex;
  flex-wrap: wrap;
  gap: 12px;
  align-items: flex-start;
  justify-content: space-between;
  margin: 0 0 18px;
}

h1 { font-size: 24px; margin: 0; }
h2 { font-size: 18px; margin: 0 0 12px; }
h3 { font-size: 15px; margin: 0 0 8px; text-transform: uppercase; letter-spacing: .04em; color: var(--text-schwach); }

.untertitel { margin: 4px 0 0; color: var(--text-schwach); font-size: 14px; }

.karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  box-shadow: var(--schatten);
  padding: 18px;
  margin-bottom: 18px;
}

.karte > h2:first-child { margin-top: 0; }

.raster { display: grid; gap: 16px; }
.raster-2 { grid-template-columns: 1fr; align-items: start; }
@media (min-width: 940px) { .raster-2 { grid-template-columns: 1fr 1fr; } }
.raster-3 { grid-template-columns: repeat(auto-fit, minmax(240px, 1fr)); }
.raster-4 { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); }

/* ------------------------------------------------------------ Kennzahlen */

.kennzahl {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-left: 5px solid var(--blau);
  border-radius: var(--radius);
  padding: 14px 16px;
  box-shadow: var(--schatten);
  text-decoration: none;
  color: inherit;
  display: block;
}
.kennzahl:hover { border-color: var(--rot); color: inherit; }
.kennzahl .wert { font-size: 30px; font-weight: 700; line-height: 1.1; }
.kennzahl .titel { font-size: 13px; color: var(--text-schwach); text-transform: uppercase; letter-spacing: .04em; }
.kennzahl-rot { border-left-color: var(--rot); }
.kennzahl-gelb { border-left-color: var(--gelb); }
.kennzahl-gruen { border-left-color: var(--gruen); }

/* --------------------------------------------------------------- Tabellen */

.tabelle-wrap { overflow-x: auto; }

table.liste {
  width: 100%;
  border-collapse: collapse;
  font-size: 15px;
}

table.liste th {
  text-align: left;
  font-size: 12px;
  text-transform: uppercase;
  letter-spacing: .04em;
  color: var(--text-schwach);
  border-bottom: 2px solid var(--linie);
  padding: 8px 10px;
  white-space: nowrap;
}

table.liste td { padding: 9px 10px; border-bottom: 1px solid var(--linie); vertical-align: top; }
table.liste tr:hover td { background: #f7fafc; }
table.liste td.nowrap, table.liste th.nowrap { white-space: nowrap; }
table.liste .rechts { text-align: right; }
table.liste tr.ueberfaellig td { background: #fdf1f3; }
table.liste tr.ueberfaellig:hover td { background: #fbe6ea; }

.leer { padding: 26px; text-align: center; color: var(--text-schwach); }

/* --------------------------------------------------------------- Elemente */

.badge {
  display: inline-block;
  padding: 2px 9px;
  border-radius: 99px;
  font-size: 12px;
  font-weight: 600;
  white-space: nowrap;
  border: 1px solid transparent;
}
.badge-grau  { background: #eef1f4; color: #4d5964; border-color: #dde3e9; }
.badge-rot   { background: #fdeaee; color: var(--rot); border-color: #f6c6d0; }
.badge-gruen { background: #e7f5ee; color: var(--gruen); border-color: #bfe4d1; }
.badge-gelb  { background: #fdf3e0; color: var(--gelb); border-color: #f3ddb2; }
.badge-blau  { background: #e8f1f9; color: var(--blau); border-color: #c3daed; }

.hinweis {
  padding: 12px 14px;
  border-radius: var(--radius);
  margin-bottom: 18px;
  border: 1px solid;
  font-size: 15px;
}
.hinweis-ok    { background: #e7f5ee; border-color: #bfe4d1; color: #10603c; }
.hinweis-fehler{ background: #fdeaee; border-color: #f6c6d0; color: #8f0a20; }
.hinweis-warn  { background: #fdf3e0; border-color: #f3ddb2; color: #7a4d00; }
.hinweis-info  { background: #e8f1f9; border-color: #c3daed; color: #10416e; }

/* --------------------------------------------------------------- Formulare */

label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }

input[type=text], input[type=password], input[type=email], input[type=number],
input[type=date], input[type=month], input[type=search], input[type=tel], select, textarea {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid #c4ccd4;
  border-radius: 8px;
  font: inherit;
  font-size: 15px;
  background: #fff;
  color: var(--text);
}

input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--blau);
  box-shadow: 0 0 0 3px rgba(20, 84, 140, .15);
}

textarea { min-height: 110px; resize: vertical; }

.feld { margin-bottom: 14px; }
.feld .hilfe { font-size: 13px; color: var(--text-schwach); margin-top: 4px; font-weight: 400; }
.feld-reihe { display: grid; gap: 14px; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); }

input[type=file] {
  width: 100%;
  padding: 10px;
  border: 1px dashed #b7c0c9;
  border-radius: 8px;
  background: #fbfcfd;
  font-size: 15px;
}

.pflicht { color: var(--rot); }

.knopf {
  display: inline-block;
  padding: 9px 16px;
  border-radius: 8px;
  border: 1px solid var(--rot);
  background: var(--rot);
  color: #fff;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}
.knopf:hover { background: var(--rot-dunkel); border-color: var(--rot-dunkel); color: #fff; }
.knopf-gross { padding: 13px 22px; font-size: 17px; width: 100%; text-align: center; }
.knopf-zweit { background: #fff; color: var(--anthrazit); border-color: #c4ccd4; }
.knopf-zweit:hover { background: #eef1f4; color: var(--anthrazit); border-color: #aeb8c2; }
.knopf-klein { padding: 5px 10px; font-size: 13px; }
.knopf-gruen { background: var(--gruen); border-color: var(--gruen); }
.knopf-gruen:hover { background: #10603c; border-color: #10603c; }

.aktionen { display: flex; flex-wrap: wrap; gap: 8px; }

.filter { display: flex; flex-wrap: wrap; gap: 10px; align-items: flex-end; margin-bottom: 16px; }
.filter .feld { margin-bottom: 0; min-width: 160px; }

.honigtopf { position: absolute; left: -9999px; }

/* --------------------------------------------------------------- Checkliste */

.pruefpunkt {
  border: 1px solid var(--linie);
  border-radius: var(--radius);
  padding: 12px 14px;
  margin-bottom: 10px;
  background: #fff;
}
.pruefpunkt .frage { font-weight: 600; margin-bottom: 8px; }
.pruefpunkt .hinweistext { font-size: 13px; color: var(--text-schwach); margin: -6px 0 8px; }

.wahl { display: flex; flex-wrap: wrap; gap: 8px; }

.wahl input[type=radio] { position: absolute; opacity: 0; width: 0; height: 0; }

.wahl label {
  margin: 0;
  padding: 8px 16px;
  border: 1px solid #c4ccd4;
  border-radius: 8px;
  cursor: pointer;
  font-size: 14px;
  font-weight: 600;
  background: #fff;
  user-select: none;
  min-width: 92px;
  text-align: center;
}
.wahl input[type=radio]:focus-visible + label { box-shadow: 0 0 0 3px rgba(20, 84, 140, .25); }
.wahl input[value=ok]:checked + label     { background: var(--gruen); border-color: var(--gruen); color: #fff; }
.wahl input[value=mangel]:checked + label { background: var(--rot); border-color: var(--rot); color: #fff; }
.wahl input[value=na]:checked + label     { background: #55616d; border-color: #55616d; color: #fff; }

.pp-bemerkung { margin-top: 10px; display: none; }
.pp-bemerkung.sichtbar { display: block; }

/* ----------------------------------------------------------------- Details */

.dl { display: grid; grid-template-columns: minmax(140px, auto) 1fr; gap: 6px 16px; font-size: 15px; margin: 0; }
.dl dt { color: var(--text-schwach); font-size: 14px; }
.dl dd { margin: 0; }

.fotos { display: flex; flex-wrap: wrap; gap: 10px; }
.fotos a { display: block; border: 1px solid var(--linie); border-radius: 8px; overflow: hidden; line-height: 0; }
.fotos img { width: 150px; height: 112px; object-fit: cover; display: block; }

.verlauf { list-style: none; margin: 0; padding: 0; }
.verlauf li { padding: 10px 0 10px 16px; border-left: 2px solid var(--linie); position: relative; }
.verlauf li::before {
  content: ""; position: absolute; left: -6px; top: 15px;
  width: 10px; height: 10px; border-radius: 50%; background: var(--blau);
}
.verlauf .meta { font-size: 13px; color: var(--text-schwach); }
.verlauf .txt { white-space: pre-wrap; }

.trenner { border: 0; border-top: 1px solid var(--linie); margin: 18px 0; }

.tabs { display: flex; flex-wrap: wrap; gap: 6px; margin-bottom: 18px; }
.tabs a {
  padding: 8px 14px; border: 1px solid var(--linie); border-radius: 8px;
  background: #fff; text-decoration: none; color: var(--text); font-size: 14px; font-weight: 600;
}
.tabs a.aktiv { background: var(--anthrazit); border-color: var(--anthrazit); color: #fff; }

/* -------------------------------------------- Einfache Meldeplattform */

body.einfach { background: var(--grund); }

.einfach-inhalt { max-width: 560px; margin: 0 auto; padding: 28px 16px 60px; }

.einfach-kopf {
  display: flex;
  align-items: center;
  gap: 16px;
  margin-bottom: 20px;
}
.einfach-kopf h1 { font-size: 27px; margin: 0; line-height: 1.15; }
.einfach-kopf p { margin: 2px 0 0; color: var(--text-schwach); font-size: 15px; }
.einfach-logo { width: 64px; height: auto; flex: none; }

.einfach-karte {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 14px;
  box-shadow: var(--schatten);
  padding: 22px;
}

.einfach-karte .einleitung { margin: 0 0 20px; color: var(--text-schwach); }
.einfach-karte .gross { font-size: 20px; font-weight: 600; margin: 0 0 8px; }
.einfach-karte .feld { margin-bottom: 18px; }
.einfach-karte label { font-size: 15px; margin-bottom: 6px; }
.einfach-karte input, .einfach-karte select, .einfach-karte textarea { font-size: 16px; padding: 12px; }
.einfach-karte textarea { min-height: 90px; }
.einfach-karte .knopf-gross { margin-top: 6px; }

.freiwillig { font-weight: 400; color: var(--text-schwach); }

.schalter {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 12px 14px;
  border: 1px solid var(--linie);
  border-radius: 10px;
  background: #fbfcfd;
  margin-bottom: 18px;
  font-weight: 400;
  cursor: pointer;
}
.schalter input { width: 20px; height: 20px; flex: none; accent-color: var(--rot); }
.schalter span { font-size: 15px; }

.pruefung {
  background: #f7fafc;
  border: 1px solid var(--linie);
  border-radius: 10px;
  padding: 14px;
}

.einfach-fuss { text-align: center; margin: 22px 0 0; font-size: 13px; color: var(--text-schwach); }
.einfach-fuss a { color: var(--text-schwach); }

/* ------------------------------------------------------------------ Login */

.login-box { max-width: 400px; margin: 8vh auto; }

/* ------------------------------------------------------------------- Mobil */

@media (max-width: 720px) {
  .kopf-inner { padding: 10px 14px; }
  .marke small { display: none; }
  .hauptnav { order: 3; width: 100%; overflow-x: auto; }
  .benutzer { font-size: 13px; }
  .inhalt { padding: 16px 14px 50px; }
  h1 { font-size: 20px; }
  .dl { grid-template-columns: 1fr; gap: 2px 0; }
  .dl dd { margin-bottom: 8px; }
  .wahl label { flex: 1; min-width: 0; }
}

/* ------------------------------------------------------------------- Druck */

@media print {
  .kopf, .fuss, .aktionen, .filter, .tabs { display: none !important; }
  body { background: #fff; }
  .karte { box-shadow: none; border-color: #999; break-inside: avoid; }
  a { color: #000; text-decoration: none; }
}
