/* Praxis-Hub Ergotherapie Lambrecht – mobile-first, große Touchflächen */

:root {
  --gruen: #1f6f5c;
  --gruen-hell: #e8f2ef;
  --gruen-dunkel: #175445;
  --sand: #f7f5f1;
  --weiss: #ffffff;
  --text: #1d2321;
  --text-leicht: #6b7570;
  --rand: #dfe3e0;
  --rot: #b4453c;
  --rot-hell: #fbeceb;
  --gelb: #b58415;
  --gelb-hell: #fdf5e3;
  --blau: #2f5f8a;
  --blau-hell: #eaf1f7;
  --radius: 14px;
  --schatten: 0 1px 3px rgba(29,35,33,.07), 0 4px 14px rgba(29,35,33,.05);
}

* { box-sizing: border-box; -webkit-tap-highlight-color: transparent; }

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

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto,
               "Helvetica Neue", Arial, sans-serif;
  font-size: 17px;
  line-height: 1.5;
  color: var(--text);
  background: var(--sand);
  padding-bottom: 84px;
}

/* ---------------------------------------------------------------- Kopf */
.kopf {
  background: var(--gruen);
  color: #fff;
  padding: max(14px, env(safe-area-inset-top)) 16px 14px;
  position: sticky; top: 0; z-index: 20;
  box-shadow: 0 2px 10px rgba(0,0,0,.08);
}
.kopf-inhalt { display: flex; align-items: center; gap: 10px; max-width: 720px; margin: 0 auto; }
.kopf-titel { font-size: 19px; font-weight: 650; letter-spacing: -.2px; }
.kopf-zusatz { font-size: 13.5px; opacity: .85; margin-top: 1px; }
.zurueck {
  color: #fff; text-decoration: none; font-size: 30px; line-height: 1;
  width: 34px; height: 34px; display: flex; align-items: center;
  justify-content: center; margin-left: -6px; flex: 0 0 auto;
}

/* ---------------------------------------------------------------- Inhalt */
.inhalt { max-width: 720px; margin: 0 auto; padding: 16px 14px 24px; }

h1 { font-size: 22px; margin: 4px 0 14px; letter-spacing: -.3px; }
h2 { font-size: 17px; margin: 26px 0 10px; letter-spacing: -.2px; }
h2:first-child { margin-top: 4px; }
p { margin: 0 0 12px; }

.karte {
  background: var(--weiss);
  border-radius: var(--radius);
  padding: 16px;
  margin-bottom: 14px;
  box-shadow: var(--schatten);
}
.karte-titel {
  font-size: 13px; font-weight: 650; text-transform: uppercase;
  letter-spacing: .6px; color: var(--text-leicht); margin-bottom: 10px;
}
.karte.gruen { background: var(--gruen-hell); }
.karte.gelb  { background: var(--gelb-hell); }
.karte.rot   { background: var(--rot-hell); }
.karte.blau  { background: var(--blau-hell); }

/* ---------------------------------------------------------------- Knöpfe */
.knopf {
  display: flex; align-items: center; justify-content: center; gap: 8px;
  width: 100%; min-height: 56px; padding: 14px 18px;
  border: none; border-radius: var(--radius);
  background: var(--gruen); color: #fff;
  font-size: 17.5px; font-weight: 600; font-family: inherit;
  text-decoration: none; cursor: pointer; margin-bottom: 10px;
  transition: transform .07s ease, filter .15s ease;
}
.knopf:active { transform: scale(.985); filter: brightness(.94); }
.knopf.weiss { background: var(--weiss); color: var(--text); box-shadow: var(--schatten); }
.knopf.rand  { background: transparent; color: var(--gruen); border: 1.5px solid var(--gruen); }
.knopf.rot   { background: var(--rot); }
.knopf.grau  { background: #6b7570; }
.knopf.klein { min-height: 44px; font-size: 15.5px; padding: 10px 14px; }
.knopf.gross { min-height: 68px; font-size: 19px; }

.knopf-reihe { display: flex; gap: 10px; }
.knopf-reihe .knopf { margin-bottom: 0; }

.knopf-symbol { font-size: 21px; line-height: 1; }

/* Große Auswahlkacheln */
.kacheln { display: grid; grid-template-columns: 1fr 1fr; gap: 11px; }
.kachel {
  background: var(--weiss); border-radius: var(--radius); padding: 18px 12px;
  text-align: center; text-decoration: none; color: var(--text);
  box-shadow: var(--schatten); min-height: 104px;
  display: flex; flex-direction: column; align-items: center;
  justify-content: center; gap: 7px; font-weight: 600; font-size: 16px;
}
.kachel:active { transform: scale(.98); }
.kachel-symbol { font-size: 28px; line-height: 1; }
.kachel small { font-weight: 400; font-size: 12.5px; color: var(--text-leicht); }

/* ---------------------------------------------------------------- Formular */
label { display: block; font-size: 14.5px; font-weight: 600; margin: 14px 0 6px; }
label .hinweis { font-weight: 400; color: var(--text-leicht); }

input[type=text], input[type=time], input[type=date], input[type=email],
input[type=number], select, textarea {
  width: 100%; padding: 14px; font-size: 18px; font-family: inherit;
  border: 1.5px solid var(--rand); border-radius: 12px; background: #fff;
  color: var(--text); -webkit-appearance: none; appearance: none;
}
input:focus, select:focus, textarea:focus {
  outline: none; border-color: var(--gruen);
  box-shadow: 0 0 0 3px rgba(31,111,92,.13);
}
textarea { min-height: 92px; resize: vertical; }
select {
  background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='12' height='8'><path d='M1 1l5 5 5-5' stroke='%236b7570' stroke-width='1.8' fill='none' stroke-linecap='round'/></svg>");
  background-repeat: no-repeat; background-position: right 14px center;
  padding-right: 38px;
}

.feld-reihe { display: flex; gap: 10px; }
.feld-reihe > div { flex: 1; }

/* Kürzel-Auswahl als große Chips */
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.chip {
  border: 1.5px solid var(--rand); background: #fff; border-radius: 999px;
  padding: 11px 16px; font-size: 15.5px; font-weight: 600; cursor: pointer;
  font-family: inherit; color: var(--text);
}
.chip.aktiv { background: var(--gruen); color: #fff; border-color: var(--gruen); }

/* ---------------------------------------------------------------- Listen */
.liste { list-style: none; margin: 0; padding: 0; }
.liste li {
  padding: 13px 0; border-bottom: 1px solid var(--rand);
  display: flex; justify-content: space-between; align-items: center; gap: 12px;
}
.liste li:last-child { border-bottom: none; }
.liste-haupt { font-weight: 600; }
.liste-zusatz { font-size: 13.5px; color: var(--text-leicht); }

/* ---------------------------------------------------------------- Tabelle */
.tabelle-huelle { overflow-x: auto; -webkit-overflow-scrolling: touch;
  margin: 0 -16px; padding: 0 16px; }
table { width: 100%; border-collapse: collapse; font-size: 15px; }
th, td { padding: 9px 7px; text-align: left; border-bottom: 1px solid var(--rand); }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .5px;
     color: var(--text-leicht); font-weight: 650; }
td.zahl, th.zahl { text-align: right; font-variant-numeric: tabular-nums; }
tr.wochenende td { background: #fafaf8; color: var(--text-leicht); }
tr.feiertag td { background: var(--gelb-hell); }
tr.heute td { background: var(--gruen-hell); font-weight: 600; }
tfoot td { font-weight: 700; border-top: 2px solid var(--text); border-bottom: none; }

/* ---------------------------------------------------------------- Etiketten */
.etikett {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 650; white-space: nowrap;
}
.etikett.offen      { background: var(--gelb-hell); color: var(--gelb); }
.etikett.genehmigt  { background: var(--gruen-hell); color: var(--gruen); }
.etikett.abgelehnt  { background: var(--rot-hell); color: var(--rot); }
.etikett.info       { background: var(--blau-hell); color: var(--blau); }

.kuerzel-marke {
  display: inline-flex; align-items: center; justify-content: center;
  min-width: 26px; height: 24px; padding: 0 6px; border-radius: 7px;
  font-size: 12.5px; font-weight: 700; background: var(--gruen-hell);
  color: var(--gruen);
}
.kuerzel-marke.K  { background: var(--rot-hell); color: var(--rot); }
.kuerzel-marke.U  { background: var(--blau-hell); color: var(--blau); }
.kuerzel-marke.UU { background: #eee; color: #555; }
.kuerzel-marke.F  { background: var(--gelb-hell); color: var(--gelb); }

/* ---------------------------------------------------------------- Hinweise */
.hinweis-box {
  border-radius: 12px; padding: 13px 15px; margin-bottom: 14px;
  font-size: 15px; border-left: 4px solid;
}
.hinweis-box.warnung { background: var(--gelb-hell); border-color: var(--gelb); }
.hinweis-box.fehler  { background: var(--rot-hell); border-color: var(--rot); }
.hinweis-box.gut     { background: var(--gruen-hell); border-color: var(--gruen); }
.hinweis-box.info    { background: var(--blau-hell); border-color: var(--blau); }

/* ---------------------------------------------------------------- Kennzahlen */
.kennzahlen { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.kennzahl {
  background: var(--weiss); border-radius: var(--radius); padding: 14px 10px;
  text-align: center; box-shadow: var(--schatten);
}
.kennzahl-wert { font-size: 25px; font-weight: 700; letter-spacing: -.5px;
  font-variant-numeric: tabular-nums; }
.kennzahl-text { font-size: 12px; color: var(--text-leicht); margin-top: 2px; }

/* ---------------------------------------------------------------- Navi unten */
.navi {
  position: fixed; bottom: 0; left: 0; right: 0; background: var(--weiss);
  border-top: 1px solid var(--rand); display: flex; z-index: 30;
  padding-bottom: env(safe-area-inset-bottom);
  box-shadow: 0 -2px 12px rgba(0,0,0,.04);
}
.navi-punkt {
  flex: 1; padding: 9px 4px 8px; text-align: center; text-decoration: none;
  color: var(--text-leicht); font-size: 11.5px; font-weight: 600;
  display: flex; flex-direction: column; align-items: center; gap: 3px;
}
.navi-symbol { font-size: 20px; line-height: 1; }
.navi-punkt:active { color: var(--gruen); }

/* ---------------------------------------------------------------- Genehmigen */
.antrag-karte {
  background: var(--weiss); border-radius: var(--radius); padding: 16px;
  margin-bottom: 13px; box-shadow: var(--schatten);
  border-left: 5px solid var(--gelb);
}
.antrag-kopf { display: flex; justify-content: space-between;
  align-items: flex-start; gap: 10px; margin-bottom: 4px; }
.antrag-name { font-size: 18px; font-weight: 650; }
.antrag-zeit { font-size: 15.5px; margin-bottom: 3px; }
.antrag-notiz { font-size: 14px; color: var(--text-leicht); margin-bottom: 12px; }
.antrag-knoepfe { display: flex; gap: 10px; }
.antrag-knoepfe .knopf { margin-bottom: 0; min-height: 54px; }

/* ---------------------------------------------------------------- Diverses */
.leer { text-align: center; color: var(--text-leicht); padding: 26px 10px;
  font-size: 15.5px; }
.leer-symbol { font-size: 34px; display: block; margin-bottom: 8px; opacity: .5; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace;
  font-size: 13.5px; word-break: break-all; }
.trenn { height: 1px; background: var(--rand); margin: 18px 0; border: none; }
.mitte { text-align: center; }
.klein { font-size: 13.5px; color: var(--text-leicht); }
.gross-zahl { font-size: 30px; font-weight: 700; letter-spacing: -.6px; }

.monatswahl { display: flex; align-items: center; justify-content: space-between;
  gap: 10px; margin-bottom: 14px; }
.monatswahl a {
  width: 46px; height: 46px; border-radius: 12px; background: var(--weiss);
  box-shadow: var(--schatten); display: flex; align-items: center;
  justify-content: center; text-decoration: none; color: var(--text);
  font-size: 22px; flex: 0 0 auto;
}
.monatswahl-titel { font-weight: 650; font-size: 17px; text-align: center; flex: 1; }

@media (min-width: 640px) {
  .kacheln { grid-template-columns: repeat(3, 1fr); }
  body { font-size: 16.5px; }
}

/* ---------------------------------------------------------------- Patientenchat */
.chat { display: flex; flex-direction: column; gap: 10px; }

.chat-zeile {
  max-width: 88%; padding: 10px 13px; border-radius: 14px;
  font-size: 15.5px; line-height: 1.45;
}
/* Eingang = Patient: links, sandfarben */
.chat-ein {
  align-self: flex-start; background: var(--sand);
  border: 1px solid var(--rand); border-bottom-left-radius: 5px;
}
/* Ausgang = Praxis: rechts, in Praxisfarbe */
.chat-aus {
  align-self: flex-end; background: var(--gruen-hell);
  border: 1px solid #cfe3dd; border-bottom-right-radius: 5px;
}
.chat-text { white-space: pre-wrap; word-break: break-word; }
.chat-zeit { margin-top: 5px; font-size: 11.5px; color: var(--text-leicht); }

/* Antippbare Karte: die ganze Fläche ist der Knopf */
a.listen-eintrag { display: block; text-decoration: none; color: var(--text); }
a.listen-eintrag:active { transform: scale(.995); }
.listen-kopf { display: flex; align-items: center;
  justify-content: space-between; gap: 10px; }
.listen-titel { font-weight: 650; }

.marke {
  display: inline-block; padding: 3px 9px; border-radius: 999px;
  font-size: 12.5px; font-weight: 650; white-space: nowrap;
}
.marke.rot   { background: var(--rot-hell); color: var(--rot); }
.marke.gruen { background: var(--gruen-hell); color: var(--gruen); }

.grau { color: var(--text-leicht); }

.feld-titel {
  display: block; font-size: 13px; font-weight: 650;
  text-transform: uppercase; letter-spacing: .6px;
  color: var(--text-leicht); margin-bottom: 8px;
}

.knopf:disabled { opacity: .45; cursor: not-allowed; }
