/* Kundenbereich – ergänzt ../css/style.css der Website (Design-Token dort). */
.kb-main { padding: 32px 0 64px; min-height: 60vh; }
.kb-main section { padding: 0; }
.kb-main .kb-karte { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg); box-shadow: var(--shadow); padding: 32px; }
.kb-schmal { max-width: 520px; margin: 0 auto; }
.kb-karte h1, .kb-chat h1 { font-family: var(--head); font-size: 2rem; line-height: 1.2; color: var(--green-deep); margin-bottom: 8px; }
.kb-leise { color: var(--muted); font-size: .95rem; }
.kb-form { display: grid; gap: 16px; margin: 24px 0; }
.kb-form label { display: grid; gap: 6px; font-weight: 600; }
.kb-form input, .kb-schreiben textarea {
  font: inherit; color: var(--ink); background: #fff; border: 1.5px solid var(--border);
  border-radius: 12px; padding: 12px 14px; width: 100%;
}
.kb-form input:focus, .kb-schreiben textarea:focus { outline: none; border-color: var(--green); box-shadow: 0 0 0 3px var(--mint); }
.kb-form .btn, .kb-schreiben .btn { border: 0; cursor: pointer; font: inherit; font-weight: 800; }
.kb-meldung { border-radius: 12px; padding: 12px 16px; margin: 16px 0; }
.kb-fehler { background: #fdecea; color: #8a1c13; border: 1px solid #f5c2bd; }
.kb-ok { background: var(--mint); color: var(--green-deep); border: 1px solid #cfe3c6; }
.kb-unsichtbar { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

.kb-chat { max-width: 820px; margin: 0 auto; }
.kb-chat-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.kb-reiter { display: flex; gap: 8px; margin: 16px 0; flex-wrap: wrap; }
.kb-reiter a {
  flex: 1 1 0; min-width: 0; text-align: center; padding: 12px 10px; border-radius: 999px; text-decoration: none;
  background: var(--surface); border: 1.5px solid var(--border); color: var(--ink); font-weight: 700; white-space: nowrap;
  overflow: hidden; text-overflow: ellipsis;
}
.kb-reiter a.aktiv { background: var(--green); border-color: var(--green); color: #fff; }
.kb-zahl { display: inline-block; min-width: 1.5em; margin-left: 6px; padding: 0 .45em; border-radius: 999px; background: var(--amber); color: var(--green-deep); font-size: .85rem; line-height: 1.5em; }
.kb-zahl[hidden] { display: none; }

.kb-verlauf {
  background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 20px; height: min(56vh, 560px); overflow-y: auto; display: flex; flex-direction: column; gap: 12px;
}
.kb-leer { color: var(--muted); text-align: center; margin: auto; }
.kb-nachricht { max-width: 78%; padding: 10px 14px; border-radius: 16px; overflow-wrap: anywhere; }
.kb-fremd { align-self: flex-start; background: var(--mint); border-bottom-left-radius: 4px; }
.kb-eigen { align-self: flex-end; background: var(--lime-soft); border-bottom-right-radius: 4px; }
.kb-wer { font-size: .8rem; color: var(--muted); font-weight: 700; margin-bottom: 2px; }
.kb-text { white-space: normal; }
.kb-anhang { display: inline-block; margin-top: 6px; color: var(--green-dark); font-weight: 700; }
.kb-haken { font-size: .75rem; color: var(--muted); text-align: right; margin-top: 2px; }
.kb-haken.kb-gelesen { color: var(--green); font-weight: 800; }

.kb-schreiben { margin-top: 16px; display: grid; gap: 10px; }
.kb-schreiben textarea { resize: vertical; min-height: 90px; }
.kb-schreiben-leiste { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.kb-schreiben-leiste .btn { margin-left: auto; }
.kb-datei { cursor: pointer; color: var(--green-dark); font-weight: 700; }
.kb-datei input { position: absolute; width: 1px; height: 1px; opacity: 0; }
.kb-datei:focus-within { outline: 2px solid var(--green); outline-offset: 2px; border-radius: 6px; }
.kb-dateiname { color: var(--muted); font-size: .9rem; overflow-wrap: anywhere; }
.kb-hinweis { font-size: .85rem; color: var(--muted); }

@media (max-width: 600px) {
  .kb-main { padding: 24px 0 40px; }
  .kb-main .kb-karte { padding: 22px 18px; }
  .kb-reiter { gap: 6px; }
  .kb-reiter a { padding: 8px 6px; font-size: .85rem; white-space: normal; line-height: 1.2; display: flex; align-items: center; justify-content: center; }
  .kb-verlauf { height: 60vh; padding: 14px; }
  .kb-nachricht { max-width: 90%; }
  .kb-schreiben-leiste .btn { width: 100%; margin-left: 0; }
}

/* Bereiche im Kundenbereich (Nachrichten / Portionen), 28.11.2026 */
.kb-bereiche { display: flex; gap: 8px; align-items: center; margin: 0 0 16px; flex-wrap: wrap; }
.kb-bereiche a { padding: 8px 16px; border-radius: 999px; text-decoration: none; font-weight: 700; color: var(--ink); background: var(--surface); border: 1.5px solid var(--border); }
.kb-bereiche a.aktiv { background: var(--green); border-color: var(--green); color: #fff; }
.kb-bereiche a.kb-bereich-rechts { margin-left: auto; border: 0; background: none; color: var(--muted); font-weight: 600; padding: 8px 4px; }

/* Portionen */
.kb-portionen { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
.kb-portionen > * { min-width: 0; }
.kb-woche th small { font-weight: 600; }
.kb-portionen h1 { font-family: var(--head); font-size: 2rem; color: var(--green-deep); margin: 0; }
.kb-portionen h2 { font-family: var(--head); font-size: 1.35rem; color: var(--green-deep); margin: 0 0 8px; }
.kb-portionen .kb-karte { padding: 24px; }
.kb-portionen .kb-meldung { margin: 0; }
.kb-woche-kopf { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 12px; }
.kb-woche-kopf h2 { margin: 0; }
.kb-pfeil { display: inline-flex; width: 36px; height: 36px; align-items: center; justify-content: center; border-radius: 50%; border: 1.5px solid var(--border); text-decoration: none; color: var(--ink); font-size: 1.4rem; line-height: 1; }
.kb-pfeil.kb-aus { opacity: .35; pointer-events: none; }
.kb-heute { font-size: .9rem; font-weight: 700; color: var(--green-dark); }
.kb-knopf-klein { margin-left: auto; padding: 8px 16px; font-size: .9rem; }
.kb-tabelle-rahmen { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.kb-tabelle { width: 100%; border-collapse: collapse; font-size: .95rem; }
.kb-tabelle th, .kb-tabelle td { padding: 8px 10px; border-bottom: 1px solid var(--border); text-align: left; vertical-align: top; }
.kb-tabelle th { font-size: .85rem; color: var(--muted); font-weight: 700; white-space: nowrap; }
.kb-tabelle .kb-zahl-sp { text-align: center; white-space: nowrap; }
.kb-tabelle input[type=number] { width: 5.2rem; padding: 6px 8px; text-align: center; border-radius: 8px; }
.kb-tabelle select { font: inherit; padding: 6px 8px; border-radius: 8px; border: 1.5px solid var(--border); max-width: 100%; }
.kb-heute-sp { color: var(--green-dark) !important; }
.kb-aendern { font-size: .8rem; font-weight: 700; color: var(--green-dark); }
.kb-ist { display: block; font-size: .85rem; color: var(--green); font-weight: 700; }
.kb-legende .kb-ist { display: inline; }
.kb-ist.kb-abw { color: #c46a00; }
.kb-wunsch { display: block; font-size: .8rem; color: #8a5a00; background: #fff4d6; border-radius: 6px; padding: 0 4px; margin-top: 2px; }
.kb-legende .kb-wunsch { display: inline; }
.kb-zu { color: var(--muted); background: #f4f4f1; font-style: italic; }
.kb-leer-sp { color: var(--muted); }
.kb-legende { font-size: .85rem; color: var(--muted); margin-top: 10px; }
.kb-monat-start td { border-top: 2px solid var(--border); }
.kb-summe td { font-weight: 800; }
.kb-status { display: inline-block; padding: 2px 10px; border-radius: 999px; font-size: .85rem; font-weight: 700; white-space: nowrap; }
.kb-status-offen { background: #fff4d6; color: #8a5a00; }
.kb-status-uebernommen { background: var(--mint); color: var(--green-deep); }
.kb-status-abgelehnt { background: #fdecea; color: #8a1c13; }
.kb-status-zurueckgezogen { background: #eee; color: #666; }
.kb-link-knopf { border: 0; background: none; color: var(--green-dark); font: inherit; font-weight: 700; cursor: pointer; padding: 0; text-decoration: underline; }
.kb-hinweis-gelb { background: #fff4d6; color: #6b4600; border: 1px solid #f3dc9c; }
.kb-portion-form { margin: 12px 0 0; }
.kb-portion-form .btn { justify-self: start; padding-left: 28px; padding-right: 28px; }
.kb-portion-form .kb-tabelle td { vertical-align: middle; }
.kb-portion-form select { width: 100%; max-width: 16rem; }
.kb-portion-form label input[type=text] { max-width: 40rem; }
@media (max-width: 600px) {
  .kb-portionen .kb-karte { padding: 18px 14px; }
  .kb-tabelle th, .kb-tabelle td { padding: 6px 5px; }
  .kb-tabelle input[type=number] { width: 3.6rem; padding: 6px 2px; }
  .kb-knopf-klein { margin-left: 0; }
  .kb-bereiche a { padding: 6px 12px; font-size: .9rem; }
  .kb-bereiche a.kb-bereich-rechts { font-size: .8rem; }
  .kb-woche th small { display: block; }
  .kb-portionen h1 { font-size: 1.6rem; }
  .kb-portion-form select { max-width: 9rem; font-size: .85rem; }
  .kb-woche-kopf { gap: 8px; }
  .kb-woche-kopf h2 { font-size: 1.05rem; }
  .kb-pfeil { width: 32px; height: 32px; }
}
