/* =====================================================================
   Kundenportal kunden.qlege.de - im Qlege-Styleguide (Nachtblau + Cyan,
   Libre Franklin für Überschriften, Inter für Text). Ruhig, ohne Schatten
   und ohne farbige Randstreifen; fürs Handy zuerst.
   ===================================================================== */
@font-face { font-family: "Inter"; src: url("/schrift/Inter-Regular.woff2") format("woff2"); font-weight: 400; font-display: swap; }
@font-face { font-family: "Inter"; src: url("/schrift/Inter-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("/schrift/LibreFranklin-SemiBold.woff2") format("woff2"); font-weight: 600; font-display: swap; }
@font-face { font-family: "Libre Franklin"; src: url("/schrift/LibreFranklin-Bold.woff2") format("woff2"); font-weight: 700; font-display: swap; }

:root {
  --ink: #0e1b3d;
  --accent: #2ee6d6;
  --accent-text: #0b6b65;
  --cyan-soft: #d9fbf7;
  --muted: #4a5470;
  --soft: #6b7590;
  --line: #dce2ec;
  --row: #e9edf3;
  --surface: #f2f5fa;
  --canvas: #f4f6fa;
  --error: #b42318;
  --warn: #7a5200;
  --warn-soft: #fff3d1;
  --danger-soft: #fdeceb;
  --ok: #17803a;
  --ring: 0 0 0 3px rgba(46, 230, 214, 0.35);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font-family: Inter, "Helvetica Neue", Arial, sans-serif;
  font-size: 16px;
  line-height: 1.5;
  color: var(--ink);
  background: var(--canvas);
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
h1, h2, h3 { font-family: "Libre Franklin", "Helvetica Neue", Arial, sans-serif; letter-spacing: -0.01em; line-height: 1.25; }
h1 { font-size: 1.6rem; margin: 0 0 1rem; }
h2 { font-size: 1.15rem; margin: 0 0 0.75rem; }
h3 { font-size: 1rem; margin: 0 0 0.5rem; }
a { color: var(--ink); }
.hidden { display: none !important; }
.leise { color: var(--soft); font-size: 0.9rem; }

/* Kopf */
.kopf {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  padding: 0.9rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
}
.kopf-marke { display: flex; align-items: center; gap: 0.75rem; text-decoration: none; color: var(--ink); }
.kopf-marke img { height: 28px; width: auto; }
.kopf-marke span { font-weight: 600; font-size: 0.95rem; color: var(--muted); padding-left: 0.75rem; border-left: 1px solid var(--line); }
.kopf-rechts { display: flex; align-items: center; gap: 0.75rem; font-size: 0.875rem; color: var(--muted); flex-wrap: wrap; justify-content: flex-end; }
.kopf-rechts select { width: auto; padding: 0.35rem 0.6rem; font-size: 0.875rem; }

/* Reiter */
.reiter {
  display: flex;
  gap: 0.25rem;
  padding: 0.5rem 1.25rem;
  background: #fff;
  border-bottom: 1px solid var(--line);
  overflow-x: auto;
}
.reiter a {
  padding: 0.5rem 0.85rem;
  border-radius: 999px;
  text-decoration: none;
  font-weight: 600;
  font-size: 0.9rem;
  color: var(--muted);
  white-space: nowrap;
}
.reiter a:hover { background: var(--surface); }
.reiter a.aktiv { background: var(--ink); color: #fff; }

.inhalt { flex: 1; width: 100%; max-width: 920px; margin: 0 auto; padding: 1.5rem 1.25rem 2.5rem; }
.karte {
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1.25rem 1.4rem;
  margin-bottom: 1rem;
}
.karte-schmal { max-width: 460px; margin: 2.5rem auto 1rem; }

/* Kennzahlen auf der Übersicht */
.zahlen { display: grid; grid-template-columns: repeat(auto-fit, minmax(12rem, 1fr)); gap: 0.75rem; margin-bottom: 1rem; }
.zahl {
  display: block;
  background: #fff;
  border: 1px solid var(--line);
  border-radius: 14px;
  padding: 1rem 1.1rem;
  text-decoration: none;
  color: var(--ink);
}
.zahl:hover { border-color: var(--ink); }
.zahl strong { display: block; font-family: "Libre Franklin", sans-serif; font-size: 1.5rem; }
.zahl span { font-size: 0.875rem; color: var(--muted); }
.zahl.wichtig { background: var(--cyan-soft); border-color: transparent; }

/* Listen */
.zeile {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.75rem 1rem;
  padding: 0.8rem 0;
  border-bottom: 1px solid var(--row);
  flex-wrap: wrap;
}
.zeile:last-child { border-bottom: none; }
.zeile-haupt { flex: 1; min-width: 12rem; }
.zeile-titel { font-weight: 600; }
.zeile-meta { font-size: 0.85rem; color: var(--muted); margin-top: 0.1rem; }
.zeile-rechts { display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap; }

.marke {
  display: inline-block;
  font-size: 0.75rem;
  font-weight: 600;
  padding: 0.12rem 0.55rem;
  border-radius: 999px;
  background: var(--surface);
  color: var(--muted);
  white-space: nowrap;
}
.marke-ok { background: var(--cyan-soft); color: var(--accent-text); }
.marke-warn { background: var(--warn-soft); color: var(--warn); }
.marke-rot { background: var(--danger-soft); color: var(--error); }

/* Formulare */
label { display: block; font-size: 0.875rem; font-weight: 600; margin-bottom: 0.9rem; }
input[type="text"], input[type="email"], input[type="date"], select, textarea {
  display: block;
  width: 100%;
  margin-top: 0.35rem;
  padding: 0.65rem 0.8rem;
  font: inherit;
  font-size: 1rem;
  font-weight: 400;
  color: var(--ink);
  background: #fff;
  border: 1px solid #cbd3e1;
  border-radius: 10px;
}
textarea { min-height: 7rem; resize: vertical; }
input:focus, select:focus, textarea:focus, button:focus-visible, a:focus-visible { outline: none; box-shadow: var(--ring); border-color: var(--ink); }
.haken { display: flex; gap: 0.65rem; align-items: flex-start; font-weight: 400; font-size: 0.9rem; line-height: 1.45; }
.haken input { margin-top: 0.2rem; width: 1.1rem; height: 1.1rem; flex-shrink: 0; accent-color: var(--ink); }
.knopf {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 44px;
  padding: 0.6rem 1.15rem;
  font: inherit;
  font-weight: 600;
  font-size: 0.95rem;
  border-radius: 10px;
  border: 1px solid var(--ink);
  background: var(--ink);
  color: #fff;
  cursor: pointer;
  text-decoration: none;
}
.knopf:hover { background: #1a2c5c; }
.knopf:disabled { opacity: 0.55; cursor: default; }
.knopf-zweit { background: #fff; color: var(--ink); border-color: #cbd3e1; }
.knopf-zweit:hover { background: var(--surface); }
.knopf-akzent { background: var(--accent); border-color: var(--accent); color: var(--ink); }
.knopf-akzent:hover { background: #22d3c4; }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 0.6rem; align-items: center; margin-top: 0.5rem; }
.knopf-link { background: none; border: none; padding: 0.4rem 0.2rem; font: inherit; font-weight: 600; font-size: 0.9rem; color: var(--ink); cursor: pointer; text-decoration: underline; }

.hinweis { font-size: 0.85rem; color: var(--muted); margin: 0.6rem 0 0; }
.fehler { background: var(--danger-soft); color: var(--error); border-radius: 10px; padding: 0.7rem 0.9rem; font-size: 0.9rem; margin-bottom: 1rem; }
.erfolg { background: var(--cyan-soft); color: var(--ink); border-radius: 10px; padding: 0.9rem 1rem; margin-bottom: 1rem; }
.kasten { background: var(--surface); border-radius: 12px; padding: 0.9rem 1rem; margin-bottom: 1rem; font-size: 0.9rem; }
.kasten ul { margin: 0.4rem 0 0; padding-left: 1.1rem; }
.kasten h3 { margin-bottom: 0.3rem; }
.dokumente { display: flex; flex-wrap: wrap; gap: 0.4rem 1rem; margin: 0.3rem 0 0.9rem; font-size: 0.9rem; }
.dokumente a { font-weight: 600; }
.abgesetzt { margin-top: 1.4rem; padding-top: 1rem; border-top: 1px solid var(--row); }

/* Support-Verlauf */
.verlauf { display: flex; flex-direction: column; gap: 0.6rem; margin-bottom: 1rem; }
.nachricht { max-width: 88%; padding: 0.65rem 0.85rem; border-radius: 12px; font-size: 0.92rem; white-space: pre-wrap; }
.nachricht-kunde { align-self: flex-end; background: var(--cyan-soft); }
.nachricht-qlege { align-self: flex-start; background: var(--surface); }
.nachricht-kopf { font-size: 0.75rem; color: var(--soft); margin-bottom: 0.15rem; white-space: normal; }

/* Fußzeile */
.fuss {
  padding: 1.25rem;
  text-align: center;
  font-size: 0.8rem;
  color: var(--muted);
  border-top: 1px solid var(--line);
  background: #fff;
}
.fuss-links { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.35rem 1.1rem; margin: 0.5rem 0; }
.fuss-links a { color: var(--ink); font-weight: 600; }
.fuss-links a.wichtig { text-decoration: underline; }

@media (max-width: 600px) {
  .kopf { padding: 0.75rem 1rem; }
  .kopf-marke span { display: none; }
  .inhalt { padding: 1rem 1rem 2rem; }
  .karte { padding: 1.1rem 1.1rem; }
  .karte-schmal { margin-top: 1.25rem; }
  .knopfreihe .knopf { flex: 1 1 auto; }
  .nachricht { max-width: 100%; }
}

/* Nach dem Kündigen: die Seite als Nachweis drucken bzw. als PDF speichern */
@media print {
  .kopf-rechts, .reiter, .fuss, .knopfreihe { display: none !important; }
  body { background: #fff; }
  .karte { border: none; padding: 0; }
}
