/* PraxisQM – Praxis-Design (Design-System Kleintierpraxis Dr. Bindernagel). Schriften liegen auf dem eigenen Server. */

@font-face { font-family: "Outfit"; font-weight: 600; font-style: normal; font-display: swap; src: url("/schriften/outfit-latin-600-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 400; font-style: normal; font-display: swap; src: url("/schriften/figtree-latin-400-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 500; font-style: normal; font-display: swap; src: url("/schriften/figtree-latin-500-normal.woff2") format("woff2"); }
@font-face { font-family: "Figtree"; font-weight: 600; font-style: normal; font-display: swap; src: url("/schriften/figtree-latin-600-normal.woff2") format("woff2"); }

:root {
  --petrol: #038397;          /* Flächen, Überschriften ab 24px */
  --petrol-dunkel: #04606E;   /* Text unter 24px, Icons, Knöpfe */
  --sonnengelb: #F9B233;      /* nur Akzent, nie Text auf Weiß */
  --nebel: #F3F7F7;
  --sand: #FBF6EC;
  --weiss: #FFFFFF;
  --anthrazit: #1D1D1B;
  --gedaempft: #3D4F52;
  --linie: #D5DCDD;
  --linie-stark: #6B8285;
  --signal: #B3261E;          /* nur mit Icon und dem Wort „Achtung“ */
  --schatten-karte: 0 2px 10px rgba(4, 96, 110, .10);
  --schatten-hoch: 0 12px 32px rgba(4, 96, 110, .18);
  --schrift-anzeige: "Outfit", system-ui, sans-serif;
  --schrift-text: "Figtree", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;
}

* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; min-height: 100vh; display: flex; flex-direction: column; background: var(--nebel); color: var(--anthrazit); font: 16px/24px var(--schrift-text); }
a { color: var(--petrol-dunkel); }
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: not-allowed; }
:focus-visible { outline: 2px solid var(--petrol-dunkel); outline-offset: 3px; }
[hidden] { display: none !important; }
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Icons: Lucide-Linien, 2px, immer mit einem Wort */
.i { width: 20px; height: 20px; flex: none; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }
.i16 { width: 16px; height: 16px; }
.i24 { width: 24px; height: 24px; }
.i32 { width: 32px; height: 32px; stroke-width: 1.5; }
.i48 { width: 48px; height: 48px; stroke-width: 1.5; }

/* Kopf */
.kopf { background: var(--weiss); border-bottom: 1px solid var(--linie); }
.kopf-innen { max-width: 1120px; margin: 0 auto; padding: 10px clamp(16px, 4vw, 32px); display: flex; flex-wrap: wrap; align-items: center; gap: 8px 24px; }
.marke { display: flex; align-items: center; gap: 10px; min-height: 44px; text-decoration: none; font-family: var(--schrift-anzeige); font-weight: 600; font-size: 22px; line-height: 28px; color: var(--petrol-dunkel); }
.wortmarke span { color: var(--petrol); }
.marke-zeichen { width: 36px; height: 36px; border-radius: 12px; background: var(--petrol); color: var(--weiss); display: grid; place-items: center; }
.menue { margin-left: auto; display: flex; align-items: center; gap: 4px; }
.menue form { margin: 0; }
.menue-link { display: flex; align-items: center; gap: 6px; min-height: 44px; padding: 8px 12px; border: 0; border-radius: 12px; background: transparent; color: var(--petrol-dunkel); font-weight: 600; font-size: 15px; text-decoration: none; }
.menue-link:hover, .menue-link.aktuell { background: var(--nebel); }
.person-chip { display: flex; align-items: center; gap: 8px; margin-left: 8px; padding: 4px 4px 4px 4px; border: 1px solid var(--linie); border-radius: 999px; background: var(--weiss); }
.person-chip .kuerzel { width: 32px; height: 32px; border-radius: 999px; background: var(--petrol-dunkel); color: var(--weiss); display: grid; place-items: center; font-weight: 600; font-size: 13px; }
.person-chip .name { font-weight: 500; font-size: 14px; line-height: 20px; color: var(--petrol-dunkel); }
.person-chip button { min-height: 32px; padding: 4px 10px; border: 0; border-radius: 999px; background: var(--nebel); color: var(--petrol-dunkel); font-weight: 600; font-size: 13px; }
@media (max-width: 900px) { .person-chip .name { display: none; } }
@media (max-width: 760px) { .nur-breit { display: none; } .menue { margin-left: 0; width: 100%; justify-content: space-between; } .menue-link { padding: 8px 10px; } }

/* Inhalt */
.inhalt { flex: 1 0 auto; width: 100%; max-width: 1120px; margin: 0 auto; padding: 32px clamp(16px, 4vw, 32px) 48px; }
.spalte { max-width: 880px; margin: 0 auto; display: flex; flex-direction: column; gap: 32px; }
.spalte.eng { max-width: 760px; gap: 24px; }
.spalte.schmal { max-width: 560px; gap: 24px; }
.stapel { display: flex; flex-direction: column; gap: 24px; }
.kopfzeilen { display: flex; flex-direction: column; gap: 8px; }
.dachzeile { display: inline-flex; align-items: center; gap: 8px; font-family: var(--schrift-anzeige); font-weight: 600; font-size: 13px; line-height: 16px; letter-spacing: .2em; text-transform: uppercase; color: var(--petrol-dunkel); }
.dachzeile::before { content: ""; width: 24px; height: 5px; border-radius: 6px; background: var(--sonnengelb); }
h1 { margin: 0; font-family: var(--schrift-anzeige); font-weight: 600; font-size: 30px; line-height: 36px; color: var(--petrol); text-wrap: balance; }
h1.gross { font-size: clamp(30px, 4.4vw, 40px); line-height: 1.15; }
h2 { margin: 0; font-family: var(--schrift-anzeige); font-weight: 600; font-size: 22px; line-height: 28px; color: var(--petrol-dunkel); }
h3 { margin: 0; font-family: var(--schrift-anzeige); font-weight: 600; font-size: 20px; line-height: 26px; color: var(--petrol-dunkel); }
p { margin: 0; }
.einleitung { max-width: 62ch; font-size: 18px; line-height: 28px; color: var(--gedaempft); }
.leise { color: var(--gedaempft); }
.klein { font-size: 14px; line-height: 20px; }
.winzig { font-size: 13px; line-height: 18px; }

.karte { display: flex; flex-direction: column; gap: 12px; padding: 24px; background: var(--weiss); border-radius: 20px; box-shadow: var(--schatten-karte); }
.karte.mitte { align-items: center; text-align: center; padding: 40px 24px; gap: 20px; }
.karte-flach { display: flex; flex-direction: column; gap: 8px; padding: 12px 20px; border: 1px solid var(--linie); border-radius: 20px; }

/* Knöpfe */
.knopf { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 10px 20px; border: 2px solid var(--petrol-dunkel); border-radius: 12px; background: var(--petrol-dunkel); color: var(--weiss); font-weight: 600; font-size: 16px; line-height: 20px; text-decoration: none; }
.knopf:hover:not(:disabled) { box-shadow: var(--schatten-hoch); }
.knopf.zweit { background: var(--weiss); color: var(--petrol-dunkel); }
.knopf.zweit:hover:not(:disabled) { background: var(--nebel); box-shadow: none; }
.knopf.leise { border-color: transparent; background: transparent; color: var(--petrol-dunkel); }
.knopf.leise:hover:not(:disabled) { background: var(--nebel); box-shadow: none; }
.knopf.klein { min-height: 44px; padding: 8px 14px; font-size: 14px; }
.knopf.gross { min-height: 48px; padding: 12px 24px; }
.knopf.breit { width: 100%; }
.knopf:disabled { background: var(--nebel); border-color: var(--linie); color: var(--gedaempft); }
.knopfreihe { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.knopfreihe.mitte { justify-content: center; }
.knopfreihe.verteilt { justify-content: space-between; }
form.inline { display: inline; margin: 0; }

/* Formulare */
.feld { display: flex; flex-direction: column; gap: 8px; max-width: 420px; }
.feld label, .feld .beschriftung { font-weight: 600; color: var(--petrol-dunkel); }
.feld label span { font-weight: 400; color: var(--gedaempft); }
input[type=text], input[type=search], input[type=password], input[type=tel], input[type=date], select, textarea {
  width: 100%; min-height: 44px; padding: 10px 14px; border: 1px solid var(--linie-stark); border-radius: 12px; background: var(--weiss); font-size: 16px; -webkit-appearance: none; appearance: none; min-width: 0;
}
textarea { line-height: 24px; resize: vertical; }
.fehler { display: flex; gap: 8px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--sand); color: var(--anthrazit); text-align: left; }
.fehler .i { color: var(--signal); margin-top: 2px; }
.hinweis { display: flex; align-items: center; gap: 12px; padding: 8px 8px 8px 16px; border-radius: 12px; background: var(--weiss); box-shadow: var(--schatten-karte); color: var(--petrol-dunkel); }
.hinweis p { flex: 1 1 auto; min-width: 0; color: var(--anthrazit); padding: 10px 0; }

/* Listen */
.liste { display: flex; flex-direction: column; padding: 8px; background: var(--weiss); border-radius: 20px; box-shadow: var(--schatten-karte); }
.zeile { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 16px; padding: 14px 16px; border-radius: 12px; color: inherit; text-decoration: none; }
a.zeile:hover { background: var(--nebel); }
.zeile-text { flex: 1 1 220px; min-width: 0; }
.zeile-titel { font-weight: 600; }
.zeile-titel span { font-weight: 400; color: var(--gedaempft); }
.rund { width: 44px; height: 44px; flex: none; border-radius: 999px; background: var(--nebel); color: var(--petrol-dunkel); display: grid; place-items: center; }
.chip { display: inline-flex; align-items: center; gap: 6px; padding: 4px 10px; border-radius: 999px; background: var(--nebel); font-size: 13px; line-height: 18px; font-weight: 600; color: var(--petrol-dunkel); white-space: nowrap; }
.chip.sand { background: var(--sand); }

/* Wer dokumentiert? / PIN */
.personen { display: grid; grid-template-columns: repeat(auto-fill, minmax(220px, 1fr)); gap: 16px; }
.personkachel { display: flex; align-items: center; gap: 14px; min-height: 72px; padding: 14px 16px; background: var(--weiss); border: 1px solid var(--linie); border-radius: 20px; box-shadow: var(--schatten-karte); color: var(--anthrazit); font-weight: 600; text-decoration: none; }
.personkachel:hover { box-shadow: var(--schatten-hoch); border-color: var(--petrol-dunkel); }
.personkachel .kuerzel { width: 44px; height: 44px; flex: none; border-radius: 999px; background: var(--petrol-dunkel); color: var(--weiss); display: grid; place-items: center; font-size: 15px; }
.pin-eingabe { max-width: 220px; font-family: var(--schrift-anzeige); font-size: 28px !important; letter-spacing: .4em; text-align: center; }

/* Text */
.text { font-size: 17px; line-height: 28px; white-space: pre-wrap; overflow-wrap: anywhere; }

.fuss { padding: 0 clamp(16px, 4vw, 32px) 24px; text-align: center; font-size: 13px; line-height: 18px; color: var(--gedaempft); }


/* Prüfen */
.spalte.breit { max-width: 1120px; margin: 0 auto; display: flex; flex-direction: column; gap: 24px; }
.eng-stapel { gap: 8px; }
.abschnitt { gap: 12px; padding: 20px 24px; }
.karte.sand { background: var(--sand); box-shadow: none; }
.abschnitt-kopf { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; }
.abschnitt-kopf .knopf { margin: -10px -12px 0 0; flex: none; }
.abschnitt-titel { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.gruppe { font-size: 12px; line-height: 16px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase; color: var(--gedaempft); }
.petrol { color: var(--petrol-dunkel); }
.trenner { border-top: 1px solid var(--linie); padding-top: 16px; }
.mitte-text { text-align: center; }
.link { background: none; border: 0; padding: 0; color: var(--petrol-dunkel); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; }
.aufklapper { display: flex; align-items: center; justify-content: space-between; gap: 12px; min-height: 44px; padding: 0; border: 0; background: none; color: var(--petrol-dunkel); font-weight: 600; text-align: left; width: 100%; }
.klein-text { font-size: 15px; line-height: 24px; }

/* Archiv und Verwaltung */
.archiv-filter { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.suchfeld { position: relative; flex: 1 1 260px; min-width: 0; }
.suchfeld .i { position: absolute; left: 14px; top: 12px; color: var(--gedaempft); }
.suchfeld input { padding-left: 44px; }
.schalter { display: inline-flex; align-items: center; gap: 8px; min-height: 44px; font-weight: 600; color: var(--petrol-dunkel); cursor: pointer; }
.schalter input { width: 20px; height: 20px; margin: 0; accent-color: var(--petrol-dunkel); }
.tabelle-rahmen { overflow-x: auto; }
.tabelle { width: 100%; border-collapse: collapse; font-size: 15px; }
.tabelle th { text-align: left; font-size: 13px; font-weight: 600; color: var(--gedaempft); padding: 8px 10px; border-bottom: 1px solid var(--linie); }
.tabelle td { padding: 10px; border-bottom: 1px solid var(--linie); vertical-align: middle; }
.tabelle .aktionen { display: flex; gap: 16px; justify-content: flex-end; flex-wrap: wrap; }
.tabelle form { margin: 0; }
.formular-zeile { display: flex; flex-wrap: wrap; gap: 12px; align-items: flex-end; }
.formular-zeile .feld { flex: 1 1 200px; max-width: none; }
.formular-zeile .schmal-feld { flex: 0 1 100px; }
.code-anzeige { font-family: var(--schrift-anzeige); font-weight: 600; font-size: 36px; line-height: 44px; letter-spacing: .12em; color: var(--petrol-dunkel); }


/* ===== PraxisQM ===== */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
a.chip { text-decoration: none; }
.petrol { color: var(--petrol-dunkel); }
.spalte.breit { max-width: 1120px; }
.eng-stapel { gap: 12px; }
.abschnitt-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.karte.sand { background: var(--sand); box-shadow: none; }
.trenner { border-top: 1px solid var(--linie); padding-top: 16px; }
.link { background: none; border: 0; padding: 0; color: var(--petrol-dunkel); font-weight: 600; text-decoration: underline; text-underline-offset: 3px; cursor: pointer; font-size: inherit; min-height: 44px; }
.link.klein { font-size: 14px; }
select { min-height: 44px; padding: 10px 14px; }
.feld.breit-feld { max-width: none; }

/* Fälligkeit: überfällig nur mit Wort und Rand, nie nur Farbe */
.rund.ueberfaellig { background: var(--sand); color: var(--signal); box-shadow: inset 0 0 0 2px var(--signal); }
.rund.heute { background: var(--sand); color: var(--petrol-dunkel); box-shadow: inset 0 0 0 2px var(--sonnengelb); }
.ueberfaellig-text { color: var(--signal); font-weight: 600; }
.heute-text { color: var(--petrol-dunkel); font-weight: 600; }
.chip.ueberfaellig { background: var(--sand); color: var(--signal); box-shadow: inset 0 0 0 1px var(--signal); }
.chip.heute, .chip.bald { background: var(--sand); box-shadow: inset 0 0 0 1px var(--sonnengelb); }
.aufgabe-zeile .zeile-text { text-decoration: none; color: inherit; }
.aufgabe-zeile .knopfreihe { gap: 8px; }
.aufgabe-zeile form { margin: 0; }

/* Fortschritt */
progress.balken { -webkit-appearance: none; appearance: none; display: block; width: 100%; height: 8px; border: 0; border-radius: 999px; background: var(--nebel); overflow: hidden; }
progress.balken::-webkit-progress-bar { background: var(--nebel); border-radius: 999px; }
progress.balken::-webkit-progress-value { background: var(--sonnengelb); border-radius: 999px; transition: width .25s ease-out; }
progress.balken::-moz-progress-bar { background: var(--sonnengelb); border-radius: 999px; }

/* Kacheln (Checklisten) */
.kacheln { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 220px), 1fr)); gap: 16px; }
.kachel { display: flex; flex-direction: column; gap: 6px; min-height: 132px; padding: 18px 18px 16px; background: var(--weiss); border: 1px solid var(--linie); border-radius: 20px; box-shadow: var(--schatten-karte); color: var(--anthrazit); text-decoration: none; }
.kachel:hover { box-shadow: var(--schatten-hoch); border-color: var(--petrol-dunkel); }
.kachel-kopf { display: flex; justify-content: space-between; align-items: center; color: var(--petrol-dunkel); }
.kachel-titel { font-family: var(--schrift-anzeige); font-weight: 600; font-size: 18px; line-height: 24px; color: var(--petrol-dunkel); }
.kachel .balken { margin-top: auto; }
.kachel.offen { border-color: var(--sonnengelb); }
.kachel.fertig .kachel-kopf svg:last-child { color: var(--petrol); }
@media (max-width: 600px) {
  .kacheln { grid-template-columns: 1fr 1fr; gap: 12px; }
  .kachel { min-height: 0; padding: 14px; }
  .kachel-titel { font-size: 16px; line-height: 22px; }
}

/* Checkliste abarbeiten */
.stand-karte { position: sticky; top: 0; z-index: 2; display: flex; flex-direction: column; gap: 10px; padding: 14px 20px; background: var(--weiss); border-radius: 20px; box-shadow: var(--schatten-karte); }
.stand-zeile { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: baseline; gap: 4px 16px; }
.stand-zahl { font-family: var(--schrift-anzeige); font-weight: 600; font-size: 24px; line-height: 30px; color: var(--petrol-dunkel); font-variant-numeric: tabular-nums; }
.gruppe-karte { display: flex; flex-direction: column; gap: 8px; padding: 16px; background: var(--weiss); border-radius: 20px; box-shadow: var(--schatten-karte); }
.gruppe-kopf { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 4px 4px 0; }
.gruppe-kopf h2 { font-size: 19px; line-height: 24px; }
.punkte { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.punkt form { margin: 0; }
.punkt-knopf { display: grid; grid-template-columns: 28px 1fr; grid-template-areas: "kasten text" ". wer"; column-gap: 12px; align-items: start; width: 100%; min-height: 52px; padding: 12px; border: 0; border-radius: 12px; background: transparent; text-align: left; color: var(--anthrazit); }
button.punkt-knopf:hover { background: var(--nebel); }
.punkt-knopf .kasten, .punkt-knopf .kasten-haken { grid-area: kasten; color: var(--petrol-dunkel); }
.punkt-knopf .kasten-haken { display: none; }
.punkt.erledigt .punkt-knopf .kasten { display: none; }
.punkt.erledigt .punkt-knopf .kasten-haken { display: block; }
.punkt.erledigt .punkt-knopf { background: var(--nebel); }
.punkt.erledigt .punkt-text { color: var(--gedaempft); }
.punkt-text { grid-area: text; font-size: 17px; line-height: 26px; white-space: pre-line; overflow-wrap: anywhere; }
.punkt-wer { grid-area: wer; font-size: 13px; line-height: 18px; font-weight: 600; color: var(--petrol-dunkel); }
.punkt-wer:empty { display: none; }
.punkt.info { display: flex; align-items: flex-start; gap: 12px; padding: 10px 12px; color: var(--gedaempft); font-size: 15px; line-height: 22px; }
.punkt.info .punkt-text { font-size: 15px; line-height: 22px; flex: 1 1 auto; }
.punkt.info .i { margin-top: 1px; }
.punkt.laedt { opacity: .6; }

/* Dokument lesen */
.dokument h2 { margin-top: 8px; }
.abschnitt-text { display: flex; flex-direction: column; gap: 12px; }
.abschnitt-text.unter { padding-left: 0; }
.abschnitt-text .nr { display: inline-block; min-width: 2.2em; color: var(--petrol); }
.absatz { font-size: 17px; line-height: 28px; white-space: pre-line; }
.merkbox { display: flex; gap: 12px; align-items: flex-start; padding: 16px 18px; border-radius: 16px; background: var(--sand); border-left: 5px solid var(--sonnengelb); }
.merkbox p { white-space: pre-line; }
.merkbox .i { color: var(--petrol-dunkel); margin-top: 2px; }
.aufzaehlung { margin: 0; padding: 0 0 0 4px; list-style: none; display: flex; flex-direction: column; gap: 8px; }
.aufzaehlung li { position: relative; padding-left: 22px; font-size: 17px; line-height: 26px; white-space: pre-line; }
.aufzaehlung li::before { content: ""; position: absolute; left: 4px; top: 11px; width: 6px; height: 6px; border-radius: 999px; background: var(--petrol); }
.aufzaehlung li.info { display: flex; gap: 8px; padding-left: 0; color: var(--gedaempft); font-size: 15px; line-height: 22px; }
.aufzaehlung li.info::before { display: none; }
.aufzaehlung li.info .i { margin-top: 3px; }
.inhalt-tabelle td, .inhalt-tabelle th { white-space: pre-line; vertical-align: top; }
.inhalt-tabelle { background: var(--weiss); border-radius: 12px; }
.formular-vorschau { display: flex; flex-direction: column; gap: 8px; padding: 12px 14px; border: 1px dashed var(--linie-stark); border-radius: 16px; }
.formular-titel { display: flex; align-items: center; gap: 8px; font-weight: 600; color: var(--petrol-dunkel); font-size: 15px; }
.formular-vorschau td { min-width: 60px; height: 36px; }
.meta summary { list-style: none; cursor: pointer; }
.meta summary::-webkit-details-marker { display: none; }
.meta[open] summary .i { transform: rotate(90deg); }
.meta-liste { margin: 0 0 8px; display: flex; flex-direction: column; gap: 8px; }
.meta-liste div { display: grid; grid-template-columns: minmax(120px, 200px) 1fr; gap: 12px; }
.meta-liste dt { font-weight: 600; color: var(--petrol-dunkel); font-size: 15px; }
.meta-liste dd { margin: 0; font-size: 15px; white-space: pre-line; }
@media (max-width: 600px) { .meta-liste div { grid-template-columns: 1fr; gap: 0; } }
.treffer { display: inline-block; margin-top: 4px; color: var(--gedaempft); }

@media print {
  .kopf, .fuss, .knopf, .knopfreihe, .archiv-filter { display: none !important; }
  body { background: var(--weiss); }
  .inhalt { padding: 0; }
  .karte, .gruppe-karte, .liste, .stand-karte { box-shadow: none; border: 1px solid var(--linie); }
  .stand-karte { position: static; }
}
select { padding-right: 40px; background: var(--weiss) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='20' height='20' viewBox='0 0 24 24' fill='none' stroke='%2304606E' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E") no-repeat right 12px center; cursor: pointer; }
