/* ==========================================================================
   VRD ERP - Oberflaeche.

   Grundsatz aus dem Konzept: eine Maske, eine Aufgabe. Deshalb keine
   Spielereien - grosse Schrift, ruhige Farben, klare Tabellen. Wer den
   ganzen Tag damit arbeitet, dankt es.

   Bewusst ohne Framework: eine Datei, die man in fuenf Minuten liest.
   ========================================================================== */

:root {
  --grund:       #f2f4f6;
  --flaeche:     #ffffff;
  --flaeche2:    #f7f9fa;
  --schrift:     #14181d;
  --schrift2:    #4c5865;
  --schrift3:    #6f7c8a;
  --linie:       #d3dae2;
  --akzent:      #17497f;
  --akzent-hell: #e6edf6;
  --gut:         #23624a;
  --gut-hell:    #e0eee7;
  --warn:        #9a5b06;
  --warn-hell:   #f8eeda;
  --fehler:      #97231f;
  --fehler-hell: #f8e4e3;
}

* { box-sizing: border-box; }

body {
  margin: 0;
  background: var(--grund);
  color: var(--schrift);
  font: 16px/1.5 "Segoe UI", system-ui, -apple-system, Arial, sans-serif;
}

/* ---------- Umgebungsband ---------- */
.umgebungsband {
  background: var(--warn);
  color: #fff;
  text-align: center;
  padding: 5px 12px;
  font-size: 12px;
  font-weight: 600;
  letter-spacing: .08em;
}

/* ---------- Kopf ---------- */
.kopf {
  display: flex;
  align-items: center;
  gap: 22px;
  background: var(--flaeche);
  border-bottom: 1px solid var(--linie);
  padding: 0 22px;
  min-height: 54px;
  flex-wrap: wrap;
}
.marke {
  font-weight: 700;
  font-size: 17px;
  letter-spacing: -.01em;
  color: var(--akzent);
  text-decoration: none;
}
.kopf nav { display: flex; gap: 4px; flex-wrap: wrap; flex: 1; }
.kopf nav a {
  color: var(--schrift2);
  text-decoration: none;
  padding: 7px 11px;
  border-radius: 4px;
  font-size: 15px;
}
.kopf nav a:hover { background: var(--akzent-hell); color: var(--akzent); }
.abmelden { display: flex; align-items: center; gap: 10px; }
.wer { color: var(--schrift3); font-size: 14px; }

/* ---------- Rumpf ---------- */
main { max-width: 1180px; margin: 0 auto; padding: 26px 22px 64px; }
.schmal { max-width: 430px; margin: 40px auto; }

h1 { font-size: 25px; letter-spacing: -.015em; margin: 0 0 18px; }
h2 { font-size: 18px; letter-spacing: -.01em; margin: 32px 0 12px; }

.hinweistext { color: var(--schrift2); max-width: 68ch; font-size: 15px; }
.klein { font-size: 13px; color: var(--schrift3); }
.leer {
  background: var(--flaeche);
  border: 1px dashed var(--linie);
  border-radius: 4px;
  padding: 22px;
  color: var(--schrift2);
}
.bruch { word-break: break-all; }
.einfarbig, code, .geheimnis {
  font-family: "Cascadia Mono", Consolas, "DejaVu Sans Mono", monospace;
}
.geheimnis {
  display: inline-block;
  background: var(--akzent-hell);
  border: 1px solid var(--linie);
  border-radius: 4px;
  padding: 8px 12px;
  font-size: 16px;
  letter-spacing: .1em;
  word-break: break-all;
}

/* ---------- Meldungen ---------- */
.meldung {
  border-radius: 4px;
  padding: 12px 16px;
  margin-bottom: 18px;
  border: 1px solid var(--linie);
  font-size: 15px;
}
.meldung.fehler  { background: var(--fehler-hell); border-color: var(--fehler); }
.meldung.hinweis { background: var(--gut-hell);    border-color: var(--gut); }

/* ---------- Formulare ---------- */
label {
  display: block;
  font-size: 13px;
  font-weight: 600;
  color: var(--schrift2);
  margin: 14px 0 5px;
}
input[type=text], input[type=password], input[type=search], input[type=email],
select {
  width: 100%;
  padding: 9px 11px;
  border: 1px solid var(--linie);
  border-radius: 4px;
  background: var(--flaeche);
  color: var(--schrift);
  font: inherit;
}
input:focus, select:focus, button:focus-visible, a:focus-visible {
  outline: 2px solid var(--akzent);
  outline-offset: 1px;
}
button {
  padding: 9px 16px;
  border: 1px solid var(--linie);
  border-radius: 4px;
  background: var(--flaeche);
  color: var(--schrift);
  font: inherit;
  cursor: pointer;
}
button:hover { background: var(--flaeche2); }
button.haupt {
  background: var(--akzent);
  border-color: var(--akzent);
  color: #fff;
  width: 100%;
  margin-top: 20px;
  font-weight: 600;
}
button.haupt:hover { filter: brightness(1.12); }

.suchzeile { display: flex; gap: 8px; align-items: center; margin-bottom: 12px; }
.suchzeile input { max-width: 380px; }
.zuruecksetzen { font-size: 14px; color: var(--schrift3); }

/* ---------- Kacheln ---------- */
.kacheln {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(160px, 1fr));
  gap: 12px;
  margin-bottom: 26px;
}
.kachel {
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-top: 3px solid var(--akzent);
  border-radius: 4px;
  padding: 16px 18px;
}
.kachel-zahl {
  display: block;
  font-size: 27px;
  font-weight: 700;
  letter-spacing: -.02em;
  font-variant-numeric: tabular-nums;
}
.kachel-text { font-size: 13px; color: var(--schrift3); }

/* ---------- Tabellen ---------- */
.tabellenrahmen {
  overflow-x: auto;
  background: var(--flaeche);
  border: 1px solid var(--linie);
  border-radius: 4px;
}
table { border-collapse: collapse; width: 100%; font-size: 14.5px; }
th {
  text-align: left;
  padding: 10px 14px;
  background: var(--flaeche2);
  border-bottom: 1px solid var(--linie);
  font-size: 12px;
  letter-spacing: .07em;
  text-transform: uppercase;
  color: var(--schrift3);
  white-space: nowrap;
}
td {
  padding: 9px 14px;
  border-bottom: 1px solid #eef1f4;
  vertical-align: top;
}
tr:last-child td { border-bottom: none; }
tr:hover td { background: var(--flaeche2); }
tr.hervor td { background: var(--akzent-hell); }
.zahl { text-align: right; font-variant-numeric: tabular-nums; }

/* ---------- Zustandsmarken ---------- */
.marke-gut, .marke-warn {
  display: inline-block;
  padding: 2px 8px;
  border-radius: 10px;
  font-size: 12px;
  font-weight: 600;
}
.marke-gut  { background: var(--gut-hell);  color: var(--gut); }
.marke-warn { background: var(--warn-hell); color: var(--warn); }

/* ---------- Fuss ---------- */
footer {
  max-width: 1180px;
  margin: 0 auto;
  padding: 18px 22px 34px;
  border-top: 1px solid var(--linie);
  display: flex;
  gap: 20px;
  flex-wrap: wrap;
  font-size: 12px;
  color: var(--schrift3);
}

details summary { cursor: pointer; color: var(--schrift2); font-size: 14px; }

/* ---------- QR-Code ---------- */
.qr {
  display: flex;
  justify-content: center;
  background: #fff;          /* QR braucht weissen Grund, unabhaengig vom Rest */
  border: 1px solid var(--linie);
  border-radius: 4px;
  padding: 16px;
  margin: 18px 0;
}
.qr img { display: block; image-rendering: pixelated; }
