/* Verwaltung: Hauptnavigation, KI-Chatblase, Dashboard, Personen, Shop (ergänzt studio.css, vor glas.css laden) */

.hauptnav { flex: 1 1 auto; min-width: 0; }
.hauptnav__liste { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.2rem; }
.hauptnav__punkt { display: inline-block; padding: 0.35rem 0.8rem; border-radius: 999px; color: var(--text); text-decoration: none; font-weight: 550; font-size: 0.9375rem; }
.hauptnav__punkt:hover { background: var(--flaeche-3); }
.hauptnav__punkt[aria-current='page'] { background: var(--signal); color: var(--signal-text); }
@media (min-width: 60.01rem) and (max-width: 90rem) { .hauptnav__liste { gap: 0; } .hauptnav__punkt { padding: 0.35rem 0.55rem; font-size: 0.9rem; } } /* mittlere Breiten: Menü und Ansicht-Auswahl in einer Zeile */
@media (max-width: 60rem) { .hauptnav { order: 5; flex-basis: 100%; overflow-x: auto; } .hauptnav__liste { flex-wrap: nowrap; } }

.ki-blase { position: fixed; right: 1.25rem; bottom: 1.25rem; z-index: 60; width: 3.5rem; height: 3.5rem; border-radius: 50%; border: 1px solid var(--hell); background: var(--signal); color: #ffffff; display: grid; place-items: center; cursor: pointer; box-shadow: 0 10px 30px #000814, inset 0 1px 0 #3d7be0; transition: transform var(--zeit) var(--kurve); }
.ki-blase:hover { transform: translateY(-2px) scale(1.04); }
.ki-blase[aria-expanded='true'] { background: var(--grund); color: var(--hell); }
@media (prefers-reduced-motion: reduce) { .ki-blase { transition: none; } }
.ki-fenster { position: fixed; right: 1.25rem; bottom: 5.5rem; z-index: 60; width: min(26rem, calc(100vw - 2rem)); height: min(36rem, calc(100dvh - 8rem)); display: grid; grid-template-rows: auto auto 1fr auto; border: 1px solid var(--linie-stark); border-radius: 18px; background: var(--flaeche); box-shadow: var(--schatten); overflow: hidden; }
.ki-fenster[hidden] { display: none; }
.ki-fenster__kopf { display: flex; justify-content: space-between; align-items: center; padding: 0.6rem 0.8rem; border-bottom: 1px solid var(--linie); }
.ki-fenster__kopf h2 { font-size: 1rem; }
.ki-fenster__kopf div { display: flex; gap: 0.3rem; }
.ki-fenster__hinweis { margin: 0; padding: 0.4rem 0.8rem; font-size: 0.8125rem; color: var(--leise); border-bottom: 1px solid var(--linie); }
.ki-fenster__verlauf { list-style: none; margin: 0; padding: 0.7rem; overflow-y: auto; display: flex; flex-direction: column; gap: 0.5rem; }
.ki-nachricht { max-width: 88%; padding: 0.5rem 0.7rem; border-radius: 14px; white-space: pre-wrap; overflow-wrap: break-word; font-size: 0.9375rem; line-height: 1.45; }
.ki-nachricht--ich { align-self: flex-end; background: var(--signal); color: var(--signal-text); border-bottom-right-radius: 4px; }
.ki-nachricht--ki { align-self: flex-start; background: var(--flaeche-3); border-bottom-left-radius: 4px; }
.ki-nachricht.ist-denkt { color: var(--leise); }
.ki-fenster__eingabe { display: grid; grid-template-columns: 1fr auto; gap: 0.4rem; padding: 0.6rem; border-top: 1px solid var(--linie); align-items: end; }
.ki-fenster__eingabe textarea { font: inherit; resize: none; }

/* Seitenrahmen der Verwaltungsseiten */
.seite { width: min(100% - 2rem, 84rem); margin: 1.25rem auto 5rem; display: grid; gap: 1rem; }
.seite__kopf { display: flex; flex-wrap: wrap; justify-content: space-between; align-items: center; gap: 0.5rem 1rem; }
.seite__kopf > p { margin: 0; }
.seite__kopf > h1 + p:not(:last-child) { margin-right: auto; } /* Zähler direkt neben der Überschrift, Knöpfe rechts */
.seite__kopf h1 { font-size: 1.75rem; letter-spacing: -0.02em; }
.karte { border: 1px solid var(--linie); border-radius: 16px; padding: 1rem; background: var(--flaeche); min-width: 0; }
.karte h2 { font-size: 1.05rem; margin-bottom: 0.6rem; }
.raster { display: grid; gap: 1rem; grid-template-columns: repeat(auto-fit, minmax(18rem, 1fr)); }
.kennzahlen { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; grid-template-columns: repeat(auto-fit, minmax(9rem, 1fr)); }
.kennzahl { border: 1px solid var(--linie); border-radius: 14px; padding: 0.7rem 0.9rem; background: var(--flaeche-2); }
.kennzahl strong { display: block; font-size: 1.75rem; letter-spacing: -0.02em; font-variant-numeric: tabular-nums; }
.kennzahl span { color: var(--leise); font-size: 0.875rem; }
.naechste { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.6rem; }
.naechste a { display: grid; gap: 0.35rem; padding: 0.7rem 0.8rem; border: 1px solid var(--linie); border-radius: 12px; color: var(--text); text-decoration: none; background: var(--flaeche-2); }
.naechste a:hover { border-color: var(--hell); }
.naechste__titel { font-weight: 650; }
.naechste__vergleich { font-size: 0.875rem; }
.balken { height: 0.5rem; border-radius: 999px; background: var(--flaeche-3); overflow: hidden; }
.balken > span { display: block; height: 100%; background: var(--hell); border-radius: 999px; }
.einfach-liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; font-size: 0.9375rem; }
.einfach-liste li { display: flex; justify-content: space-between; gap: 0.6rem; border-bottom: 1px solid var(--linie); padding: 0.3rem 0; }
.einfach-liste small { color: var(--leise); white-space: nowrap; }
.warnzeile { margin: 0; padding: 0.6rem 0.9rem; border-radius: 12px; border: 1px solid var(--linie); border-left: 4px solid var(--hell); background: var(--flaeche-2); font-weight: 550; }

.personen-tabelle { width: 100%; border-collapse: collapse; font-size: 0.9375rem; }
.personen-tabelle th, .personen-tabelle td { padding: 0.45rem 0.6rem; text-align: left; border-bottom: 1px solid var(--linie); }
.personen-tabelle th { font-size: 0.8125rem; color: var(--leise); }
.personen-tabelle tbody tr { cursor: pointer; }
.personen-tabelle tbody tr:hover { background: var(--flaeche-2); }
.konto-plakette { font-size: 0.75rem; font-weight: 650; padding: 0.1rem 0.5rem; border-radius: 999px; background: var(--flaeche-3); white-space: nowrap; }
.konto-plakette--aktiv { background: var(--signal); color: var(--signal-text); }
.geplant { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.5rem; }
.geplant li { padding: 0.6rem 0.8rem; border: 1px solid var(--linie); border-radius: 12px; background: var(--flaeche-2); }
.link-knopf { all: unset; cursor: pointer; font-weight: 600; color: var(--text); }
.link-knopf:hover { color: var(--hell); text-decoration: underline; }
.link-knopf:focus-visible { outline: 2px solid var(--hell); outline-offset: 2px; border-radius: 4px; }
.personen-tabelle td { overflow-wrap: anywhere; }
@media (max-width: 44rem) {
  .personen-tabelle th:nth-child(2), .personen-tabelle td:nth-child(2), .personen-tabelle th:nth-child(3), .personen-tabelle td:nth-child(3) { display: none; }
}
.gespraeche { margin-top: 1rem; display: grid; gap: 0.6rem; }
.gespraeche__liste { list-style: none; margin: 0; padding: 0; display: grid; gap: 0.35rem; }
.gespraeche__liste li { display: flex; justify-content: space-between; gap: 0.6rem; flex-wrap: wrap; border-bottom: 1px solid var(--linie); padding: 0.3rem 0; }
.gespraeche__liste small { color: var(--leise); }
.gespraech__kopf { display: flex; flex-wrap: wrap; gap: 0.5rem; align-items: center; justify-content: space-between; }
.gespraech__verlauf { list-style: none; margin: 0; padding: 0.4rem 0; display: flex; flex-direction: column; gap: 0.5rem; max-height: 22rem; overflow-y: auto; }
.gespraech__nachricht { max-width: 85%; padding: 0.5rem 0.7rem; border-radius: 14px; background: var(--flaeche-3); }
.gespraech__nachricht p { margin: 0.2rem 0 0; white-space: pre-wrap; overflow-wrap: break-word; }
.gespraech__nachricht small { color: var(--leise); font-size: 0.75rem; }
.gespraech__nachricht--team { align-self: flex-end; background: var(--signal); color: var(--signal-text); }
.gespraech__nachricht--team small { color: #d9e8ff; }
.gespraech__eingabe, .gespraech__neu { display: grid; gap: 0.4rem; }
.gespraech__eingabe button, .gespraech__neu button { justify-self: start; }
.gespraech__eingabe textarea, .gespraech__neu textarea { width: 100%; font: inherit; }
.gespraech__neu h4 { margin: 0.4rem 0 0; font-size: 0.95rem; }
.person__daten { display: grid; grid-template-columns: max-content 1fr; gap: 0.25rem 1rem; margin: 0.5rem 0; }
.person__daten dt { color: var(--leise); }
.person__daten dd { margin: 0; overflow-wrap: break-word; }
.ki-nachricht__link { display: block; margin-top: 0.4rem; font-weight: 650; }

/* Dashboard: „Zu tun“ oben und gut sichtbar (Vorgabe 28.11.) */
.zu-tun { border-color: var(--hell); background: linear-gradient(135deg, color-mix(in oklab, var(--signal) 28%, var(--flaeche)), var(--flaeche)); }
.zu-tun h2 { font-size: 1.35rem; }
.zu-tun__liste { list-style: none; margin: 0.5rem 0 0; padding: 0; display: grid; gap: 0.5rem; grid-template-columns: repeat(auto-fill, minmax(min(100%, 22rem), 1fr)); }
.zu-tun__liste li a { display: flex; align-items: center; min-height: 48px; padding: 0.6rem 0.9rem; border-radius: 12px; border: 1px solid var(--linie-stark); background: var(--grund); color: var(--text); text-decoration: none; font-weight: 600; transition: border-color var(--zeit), transform var(--zeit) var(--kurve); }
.zu-tun__liste li a:hover { border-color: var(--hell); transform: translateY(-2px); }
.zu-tun__liste li.ist-dringend a { border-color: #ff6b6b; box-shadow: inset 4px 0 0 #ff6b6b; }
.zu-tun__liste li:only-child:not(:has(a)) { color: var(--leise); }

/* Kunden: Punkte und Medaillen (04.12.) */
.pd-cup { margin: 0.4rem 0 0.8rem; }
.pd-cup h3 { margin-bottom: 0.3rem; }
.pd-cup > p { margin: 0 0 0.6rem; }
.pd-medaillen { list-style: none; margin: 0; padding: 0; display: flex; flex-wrap: wrap; gap: 0.4rem; }
.pd-medaille { display: grid; justify-items: center; gap: 0.1rem; width: 5.6rem; padding: 0.4rem 0.3rem; border-radius: 8px; text-align: center; font-size: 0.78rem; line-height: 1.2; color: var(--leise); }
.pd-medaille.ist-erreicht { color: var(--text); background: color-mix(in srgb, var(--hell) 10%, transparent); }
.pd-medaille small { color: var(--leise); font-variant-numeric: tabular-nums; }
.pd-cup__verlauf { margin-top: 0.6rem; }
.pd-cup__verlauf summary { cursor: pointer; }
.auswertung > summary { cursor: pointer; list-style: none; display: flex; align-items: center; gap: 0.5rem; }
.auswertung > summary::-webkit-details-marker { display: none; }
.auswertung > summary::before { content: '▸'; transition: transform 0.15s ease; }
.auswertung[open] > summary::before { transform: rotate(90deg); }
.auswertung > summary h2 { margin: 0; font-size: 1.15rem; }
.auswertung__leiste { display: flex; flex-wrap: wrap; align-items: end; gap: 0.6rem 1rem; margin: 0.6rem 0; }
.auswertung__leiste .feld { min-width: 12rem; }
.auswertung__leiste p { margin: 0 0 0.5rem; }
.auswertung__rahmen { max-height: 32rem; overflow: auto; }
.auswertung__tabelle td:not(:first-child), .auswertung__tabelle th:not(:first-child) { text-align: right; font-variant-numeric: tabular-nums; }
.aw-sort { all: unset; cursor: pointer; font-weight: 600; white-space: nowrap; }
.aw-sort:focus-visible { outline: 2px solid var(--fokus); outline-offset: 2px; border-radius: 3px; }
.auswertung__tabelle thead th { position: sticky; top: 0; background: var(--grund); }
