/*
 * CLIENTRA — Entwurfs-Oberflächen (Präfix `cl-`). CLIENTRA ist in Entwicklung; jede Ansicht
 * trägt sichtbar das Kennzeichen „Entwurf“ (`.ui-entwurf`).
 * Bezugsfarben wie im Prototyp (~/Herd/clientra): c1 Blau, c2 Petrol, c3 Violett, c4 Orange, c5 Pink.
 */
.ui.p-clientra, .cl-app { --ui-p: #138273; position: relative; }
/* Etwas größer als der Grundbaustein: die Ansichten stehen auch in 600 px Breite und sollen lesbar bleiben. */
.ui.p-clientra { font-size: clamp(6px, 1.3cqi, 15px); grid-template-columns: 13.5em minmax(0, 1fr); min-height: 0; }
.p-clientra .ui-handy { height: 100%; }
.p-clientra .cl-app { font-size: 1.12em; }
.cl-c1 { --c: #2563EB; } .cl-c2 { --c: #0D9488; } .cl-c3 { --c: #7C3AED; } .cl-c4 { --c: #C2410C; } .cl-c5 { --c: #DB2777; }

/* Kennzeichen „Entwurf“ (auch in ui-antares.css, gleichlautend) */
.ui-entwurf { position: absolute; top: 1.1em; right: 1.2em; z-index: 5; display: inline-flex; align-items: center; gap: .45em; padding: .35em .8em; border-radius: 99px; background: #FBF4E4; border: 1px solid #E5C98F; color: #7A5410; font: 700 .72em/1 var(--sans); letter-spacing: .08em; text-transform: uppercase; }
.ui-entwurf::before { content: ''; width: .55em; height: .55em; border-radius: 50%; background: #B7791F; }
.ui.p-clientra .ui-kopf { padding-right: 7em; }

/* ── Woche ──────────────────────────────────────────────────────────────── */
.cl-team { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: .6em; }
.cl-kopf { display: flex; align-items: center; gap: .6em; padding: .55em .7em; border: 1px solid var(--ui-linie); border-radius: .65em; background: #fff; box-shadow: inset .22em 0 0 var(--c); min-width: 0; }
.cl-kopf .ui-avatar { background: var(--c); }
.cl-kopf .wer { min-width: 0; flex: 1; }
.cl-kopf .wer b { display: block; font-size: .9em; color: var(--ui-tinte); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cl-kopf .wer small { display: block; font-size: .74em; color: var(--ui-leise); margin: .1em 0 .3em; font-variant-numeric: tabular-nums; }
.cl-kopf .ui-balken > i { background: var(--c); }
.cl-kopf.krank { box-shadow: inset .22em 0 0 #CBD2D9; background: #FAFAFB; }
.cl-kopf.krank .ui-avatar { background: #CBD2D9; }
.cl-w36 { --w: 36%; } .cl-w50 { --w: 50%; } .cl-w62 { --w: 62%; } .cl-w78 { --w: 78%; } .cl-w88 { --w: 88%; } .cl-w93 { --w: 93%; } .cl-w100 { --w: 100%; } .cl-w40 { --w: 40%; } .cl-w33 { --w: 33%; } .cl-w47 { --w: 47%; } .cl-w55 { --w: 55%; } .cl-w20 { --w: 20%; }

.cl-woche { display: grid; grid-template-columns: 10.5em repeat(5, minmax(0, 1fr)); gap: .55em; align-items: start; }
.cl-spalte { background: var(--ui-grund); border: 1px solid var(--ui-linie); border-radius: .7em; padding: .5em; min-height: 19em; display: flex; flex-direction: column; gap: .35em; }
.cl-spalte.offen { background: #fff; border-style: dashed; }
.cl-tag { display: flex; justify-content: space-between; align-items: baseline; padding: .15em .25em .35em; font: 700 .82em/1 var(--sans); color: var(--ui-tinte); }
.cl-tag small { font-weight: 500; color: var(--ui-leise); font-size: .9em; }
.cl-karte { position: relative; padding: .45em .55em .45em .7em; border-radius: .45em; background: #fff; border: 1px solid var(--ui-linie); box-shadow: inset .2em 0 0 var(--c, #94A3B8); font-size: .84em; line-height: 1.25; }
.cl-karte b { display: block; color: var(--ui-tinte); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; padding-right: 1.1em; }
.cl-karte span { color: var(--ui-leise); font-variant-numeric: tabular-nums; font-size: .92em; }
.cl-karte .cl-pin { position: absolute; top: .4em; right: .4em; width: 1em; height: 1em; color: var(--c); }
.cl-karte .cl-pin svg { width: 100%; height: 100%; stroke-width: 2.2; }
.cl-karte.aufgabe { box-shadow: inset .2em 0 0 #CBD2D9; background: #FBFBFC; }
.cl-karte.vorschlag { border-style: dashed; border-color: var(--c); background: color-mix(in srgb, var(--c) 6%, #fff); }
.cl-weg { display: flex; align-items: center; gap: .35em; padding: 0 .4em; font-size: .68em; color: var(--ui-leise); font-variant-numeric: tabular-nums; }
.cl-weg::before { content: ''; flex: 0 0 .8em; border-top: 1px dashed #B8C0C8; }
.cl-abgesagt { margin-top: auto; padding: .6em; border: 1px dashed #E5B4B4; border-radius: .5em; font-size: .72em; color: #B91C1C; text-align: center; background: #FFF7F7; }
.cl-zaehler { font: 700 .72em/1 var(--sans); padding: .2em .5em; border-radius: 99px; background: var(--ui-p); color: #fff; }
.cl-vorschlag-leiste { display: flex; align-items: center; gap: .8em; padding: .65em .9em; border-radius: .65em; background: #ECF8F5; border: 1px solid #BFE3DA; color: #0F5148; font-size: .9em; }
.cl-vorschlag-leiste b { color: #0F5148; }
.cl-vorschlag-leiste .r { margin-left: auto; display: flex; gap: .4em; }

/* Bewegung: die offenen Besuche gleiten in die Tage, der Vorschlag erscheint */
.spielt .cl-raus { animation: cl-raus .5s ease-in both; }
.spielt .cl-raus.f1 { animation-delay: .7s; } .spielt .cl-raus.f2 { animation-delay: 1.1s; } .spielt .cl-raus.f3 { animation-delay: 1.5s; }
.spielt .cl-rein { animation: cl-rein .7s cubic-bezier(.22,.7,.2,1) both; }
.spielt .cl-rein.f1 { animation-delay: 1s; } .spielt .cl-rein.f2 { animation-delay: 1.4s; } .spielt .cl-rein.f3 { animation-delay: 1.8s; }
.spielt .cl-vorschlag-leiste { animation: cl-auf .6s ease-out 2.4s both; }
.spielt .cl-offen-zahl { animation: cl-zahl 1.2s steps(3, end) .7s both; }
@property --cl-offen { syntax: '<integer>'; inherits: true; initial-value: 0; }
.cl-offen-zahl { --cl-offen: 0; }
.cl-offen-zahl::after { counter-reset: n var(--cl-offen); content: counter(n) ' offen'; }
@keyframes cl-zahl { from { --cl-offen: 3; } to { --cl-offen: 0; } }
@keyframes cl-raus { to { opacity: 0; transform: translateX(1.5em) scale(.96); height: 0; padding-block: 0; margin: 0; border-width: 0; } }
@keyframes cl-rein { from { opacity: 0; transform: translateX(-3em) scale(.96); } to { opacity: 1; transform: none; } }
@keyframes cl-auf { from { opacity: 0; transform: translateY(.6em); } to { opacity: 1; transform: none; } }
.cl-raus { overflow: hidden; }
.ui.p-clientra:not(.spielt) .cl-raus, .bs:not(.spielt) .cl-raus { display: none; }
.bs:not(.spielt) .cl-offen-zahl::after { content: '0 offen'; }

/* ── Touren ─────────────────────────────────────────────────────────────── */
.cl-tour { display: grid; grid-template-columns: minmax(0, .9fr) minmax(0, 1.1fr); gap: 1em; }
.cl-stopps { list-style: none; margin: 0; padding: 0; border: 1px solid var(--ui-linie); border-radius: .75em; overflow: hidden; }
.cl-stopp { display: grid; grid-template-columns: 2.1em minmax(0, 1fr) auto; gap: .7em; align-items: center; padding: .7em .9em; border-bottom: 1px solid #F0F1F3; }
.cl-stopp:last-child { border-bottom: 0; }
.cl-nr { width: 2.1em; height: 2.1em; border-radius: 50%; display: grid; place-items: center; background: var(--ui-p); color: #fff; font: 700 .85em/1 var(--sans); }
.cl-stopp.pause .cl-nr { background: #E5E7EB; color: var(--ui-leise); }
.cl-stopp b { display: block; font-size: .95em; color: var(--ui-tinte); }
.cl-stopp small { display: block; font-size: .78em; color: var(--ui-leise); margin-top: .1em; }
.cl-stopp .zeit { font: 650 .95em/1 var(--sans); color: var(--ui-tinte); font-variant-numeric: tabular-nums; text-align: right; }
.cl-stopp .zeit small { font-weight: 500; }
.cl-stopp.warn { background: #FFFBF0; }
.cl-fahrt { padding: .3em .9em .3em 3.8em; font-size: .74em; color: var(--ui-leise); background: #FAFBFC; border-bottom: 1px solid #F0F1F3; display: flex; gap: .4em; align-items: center; }
.cl-fahrt svg { width: 1.2em; height: 1.2em; }
.cl-karte-flaeche { position: relative; border-radius: .75em; overflow: hidden; border: 1px solid var(--ui-linie); background: #F3F1EC; min-height: 24em; }
.cl-karte-flaeche svg.cl-land { position: absolute; inset: 0; width: 100%; height: 100%; }
.cl-land .strasse { fill: none; stroke: #fff; stroke-width: 9; stroke-linecap: round; }
.cl-land .strasse.klein { stroke-width: 4.5; }
.cl-land .gruen { fill: #DDE8D5; }
.cl-land .wasser { fill: #D4E4EE; }
.cl-land .route { fill: none; stroke: #138273; stroke-width: 4.5; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 1400; stroke-dashoffset: 0; }
.cl-land .halt { fill: #138273; stroke: #fff; stroke-width: 3; }
.cl-land .halt-text { fill: #fff; font: 700 13px/1 var(--sans); text-anchor: middle; dominant-baseline: central; }
.cl-land .start { fill: #17212B; stroke: #fff; stroke-width: 3; }
.spielt .cl-land .route { animation: cl-route 2.6s ease-in-out .4s both; }
@keyframes cl-route { from { stroke-dashoffset: 1400; } to { stroke-dashoffset: 0; } }
.cl-karte-info { position: absolute; left: 1em; bottom: 1em; right: 1em; display: flex; gap: .6em; flex-wrap: wrap; }
.cl-karte-info span { padding: .45em .75em; border-radius: .5em; background: rgba(255,255,255,.94); box-shadow: 0 .1em .4em rgba(0,0,0,.08); font-size: .8em; color: var(--ui-tinte); }
.cl-karte-info b { font-variant-numeric: tabular-nums; }

/* ── Bewilligung ───────────────────────────────────────────────────────── */
.cl-person { display: flex; align-items: center; gap: .8em; }
.cl-person .ui-avatar { width: 3em; height: 3em; font-size: .95em; }
.cl-bew { border: 1px solid var(--ui-linie); border-radius: .75em; padding: 1em 1.1em; background: #fff; display: grid; gap: .65em; }
.cl-bew-kopf { display: flex; align-items: baseline; gap: .7em; }
.cl-bew-kopf b { font-size: 1.02em; color: var(--ui-tinte); }
.cl-bew-kopf small { color: var(--ui-leise); font-size: .82em; }
.cl-bew-kopf .ui-pille { margin-left: auto; }
.cl-zeitbalken { position: relative; margin-top: 1.1em; height: 1.4em; border-radius: .4em; background: #EEF0F3; overflow: visible; }
.cl-zeitbalken > i { position: absolute; left: 0; top: 0; bottom: 0; width: var(--w); border-radius: .4em; background: var(--ui-p); }
.cl-zeitbalken > i.allg { background: #5EAFA4; }
.cl-zeitbalken > i.ueber { background: #D97706; }
.cl-zeitbalken .heute { position: absolute; top: -.35em; bottom: -.35em; left: var(--w); width: 0; border-left: .14em solid var(--ui-tinte); }
.cl-zeitbalken .heute::after { content: 'heute'; position: absolute; top: -1.3em; left: 50%; transform: translateX(-50%); font: 700 .66em/1 var(--sans); color: var(--ui-tinte); white-space: nowrap; }
.cl-bew-zahlen { display: flex; gap: 1.6em; font-size: .82em; color: var(--ui-leise); }
.cl-bew-zahlen b { color: var(--ui-tinte); font-variant-numeric: tabular-nums; }
.spielt .cl-zeitbalken > i { animation: cl-wachsen 1.4s cubic-bezier(.22,.7,.2,1) .3s both; }
@keyframes cl-wachsen { from { width: 0; } }

/* ── App ────────────────────────────────────────────────────────────────── */
.cl-app { height: 100%; display: flex; flex-direction: column; background: #F6F7F9; font-family: var(--sans); color: #4A5561; }
.cl-status { display: flex; justify-content: space-between; padding: 1.1em 1.6em .4em; font: 650 .82em/1 var(--sans); color: #17212B; }
.cl-app-kopf { padding: .9em 1.2em 1em; background: #138273; color: #fff; }
.cl-app-kopf small { display: block; font: 700 .62em/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; opacity: .8; }
.cl-app-kopf b { display: block; font: 650 1.2em/1.2 var(--sans); margin-top: .3em; }
.cl-app-kopf .uhr { font: 300 1.9em/1 var(--sans); font-variant-numeric: tabular-nums; margin-top: .3em; letter-spacing: -.02em; }
.cl-app-inhalt { padding: .9em 1em; display: flex; flex-direction: column; gap: .7em; flex: 1; }
.cl-app-titel { font: 700 .66em/1 var(--sans); letter-spacing: .12em; text-transform: uppercase; color: #8A939D; }
.cl-ziele { display: grid; gap: .4em; }
.cl-ziel { display: flex; align-items: center; gap: .55em; padding: .55em .65em; border-radius: .6em; background: #fff; border: 1px solid #E7E9EC; font-size: .8em; color: #17212B; line-height: 1.25; }
.cl-ziel i { width: 1.6em; height: 1.6em; border-radius: .4em; flex: none; display: grid; place-items: center; background: color-mix(in srgb, var(--c) 14%, #fff); color: var(--c); }
.cl-ziel i svg { width: 1.1em; height: 1.1em; }
.cl-ziel.an { border-color: #138273; box-shadow: 0 0 0 .12em rgba(19,130,115,.2); }
.cl-ziel .haken { margin-left: auto; width: 1.3em; height: 1.3em; border-radius: 50%; background: #138273; color: #fff; display: grid; place-items: center; flex: none; }
.cl-ziel .haken svg { width: .85em; height: .85em; stroke-width: 3; }
.cl-eintrag { padding: .6em .7em; border-radius: .6em; background: #fff; border: 1px solid #E7E9EC; font-size: .78em; line-height: 1.4; color: #17212B; }
.cl-bausteine { display: flex; flex-wrap: wrap; gap: .3em; }
.cl-bausteine span { padding: .3em .55em; border-radius: 99px; background: #E9F5F3; color: #0F5148; font: 600 .66em/1.2 var(--sans); }
.cl-netz { display: flex; align-items: center; gap: .45em; padding: .45em .65em; border-radius: .5em; background: #FEF7E8; border: 1px solid #F6DFAE; color: #7A4B0B; font: 600 .68em/1.2 var(--sans); }
.cl-netz svg { width: 1.2em; height: 1.2em; flex: none; }
.cl-app-knopf { margin-top: auto; padding: .85em; border-radius: .7em; background: #138273; color: #fff; text-align: center; font: 650 .88em/1 var(--sans); }
.cl-reiter { display: flex; justify-content: space-around; padding: .6em 0 1.2em; background: #fff; border-top: 1px solid #E7E9EC; font-size: .6em; color: #8A939D; }
.cl-reiter span.an { color: #138273; font-weight: 700; }
.cl-bestaetigen { flex: 1; display: flex; flex-direction: column; align-items: center; justify-content: center; text-align: center; padding: 1.2em; gap: .8em; }
.cl-bestaetigen .ring { width: 5.4em; height: 5.4em; border-radius: 50%; background: #E7F6EC; display: grid; place-items: center; color: #16A34A; }
.cl-bestaetigen .ring svg { width: 2.6em; height: 2.6em; stroke-width: 2.4; }
.cl-bestaetigen b { font: 650 1.15em/1.25 var(--sans); color: #17212B; }
.cl-bestaetigen p { margin: 0; font-size: .8em; line-height: 1.45; }
.cl-bestaetigen .zeile { width: 100%; display: flex; justify-content: space-between; padding: .55em .2em; border-bottom: 1px solid #E7E9EC; font-size: .76em; }
.cl-bestaetigen .zeile b { font-size: 1em; }
.spielt .cl-bestaetigen .ring { animation: cl-ring .8s cubic-bezier(.3,1.6,.5,1) .5s both; }
@keyframes cl-ring { from { transform: scale(.3); opacity: 0; } to { transform: none; opacity: 1; } }
.spielt .cl-ziel.an { animation: cl-wahl .5s ease-out .9s both; }
@keyframes cl-wahl { from { border-color: #E7E9EC; box-shadow: none; } }
.cl-zwei-telefone { display: flex; justify-content: center; gap: 6%; align-items: flex-end; }
.rundgang-bild .cl-zwei-telefone .telefon-rahmen, .rundgang-mobil-bild .cl-zwei-telefone .telefon-rahmen { width: min(42%, 270px); margin: 0; }
.cl-zwei-telefone .telefon-rahmen:last-child { transform: translateY(-6%); }
/* Auf der Programmseite steht das Telefon links vor dem Bildschirm, weil rechts angeschnitten wird. */
@media (min-width: 1081px) { .buehne-bild .telefon-rahmen.p-clientra { right: auto; left: -7%; bottom: -12%; width: 25%; } }

/* ── Nachweis ───────────────────────────────────────────────────────────── */
.cl-papierflaeche { background: #EEF0F3; border-radius: .75em; padding: 1.4em; display: grid; place-items: center; }
.cl-blatt { width: 100%; max-width: 54em; background: #fff; border-radius: .3em; box-shadow: 0 .3em 1.2em rgba(15,26,36,.12); padding: 1.6em 1.8em; font-size: .9em; }
.cl-blatt-kopf { display: flex; justify-content: space-between; gap: 1em; padding-bottom: .9em; border-bottom: .14em solid var(--ui-tinte); margin-bottom: .8em; }
.cl-blatt-kopf b { display: block; font: 700 1.25em/1.2 var(--sans); color: var(--ui-tinte); }
.cl-blatt-kopf small { color: var(--ui-leise); font-size: .85em; }
.cl-blatt dl { display: grid; grid-template-columns: auto 1fr auto 1fr; gap: .3em 1em; margin: 0 0 .9em; font-size: .85em; }
.cl-blatt dt { color: var(--ui-leise); }
.cl-blatt dd { margin: 0; color: var(--ui-tinte); font-weight: 600; }
.cl-blatt .ui-tabelle td, .cl-blatt .ui-tabelle th { padding: .45em .6em; }
.cl-blatt .ui-tabelle td.ok { color: #16A34A; font-weight: 700; }
.cl-summe { display: flex; justify-content: flex-end; gap: 2em; padding-top: .8em; font-size: .9em; }
.cl-summe b { color: var(--ui-tinte); font-variant-numeric: tabular-nums; }
.cl-unterschrift { display: flex; justify-content: space-between; gap: 2em; margin-top: 1.4em; font-size: .78em; color: var(--ui-leise); }
.cl-unterschrift span { flex: 1; border-top: 1px solid #CBD2D9; padding-top: .35em; }

/* Nur das Bildzeichen eines Ziels (Ziele und Hilfeplan, Team und Geräte) */
.cl-ziel.cl-ziel-nur { padding: 0; border: 0; background: none; font-size: 1em; }
.cl-ziel.cl-ziel-nur i { width: 2.1em; height: 2.1em; border-radius: .55em; }
.cl-ziel.cl-ziel-nur i svg { width: 1.2em; height: 1.2em; }
.cl-stapel { display: grid; gap: 1em; align-content: start; }

/* ── Fahrzeit und Navigation: Tour auf der Karte, davor das Telefon ─────── */
.cl-route-schau { position: relative; padding-bottom: 4%; }
.cl-route-telefon { position: absolute; right: -2%; bottom: 0; width: 21%; z-index: 2; }
@media (max-width: 700px) { .cl-route-telefon { display: none; } .cl-route-schau { padding-bottom: 0; } }
.cl-rk { display: grid; grid-template-columns: 15em minmax(0, 1fr); gap: .9em; min-height: 29em; }
.cl-rk-liste { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: .35em; }
.cl-rk-liste li { display: flex; align-items: center; gap: .6em; padding: .55em .65em; border: 1px solid var(--ui-linie); border-radius: .6em; background: #fff; font-size: .95em; }
.cl-rk-liste i { display: grid; place-items: center; flex: none; width: 1.7em; height: 1.7em; border-radius: 50%; background: var(--ui-p); color: #fff; font: 800 .9em/1 var(--sans); }
.cl-rk-liste b { display: block; color: var(--ui-tinte); }
.cl-rk-liste small { display: block; color: var(--ui-leise); font-variant-numeric: tabular-nums; margin-top: .1em; }
.cl-rk-liste li.fahrt { justify-content: center; padding: .15em .4em; border: 0; background: none; color: #0F6B5F; font-weight: 700; font-size: .84em; }
.cl-rk-liste li.fahrt.verkehr { color: #92400E; }
.cl-rk-liste li.fahrt svg { width: 1.3em; height: 1.3em; }
.cl-rk-karte { display: block; width: 100%; height: 100%; min-height: 29em; border-radius: .8em; box-shadow: 0 0 0 1px var(--ui-linie); font-family: var(--sans); }
.cl-nav-karte { display: block; width: 100%; height: 42%; font-family: var(--sans); }
.cl-nav { padding: 1em 1em 1.2em; }
.cl-nav small { display: block; font-size: .8em; font-weight: 700; letter-spacing: .06em; text-transform: uppercase; color: var(--ui-leise); }
.cl-nav b { display: block; margin-top: .2em; font-size: 1.25em; color: var(--ui-tinte); }
.cl-nav span { display: block; margin-top: .15em; font-size: .85em; color: var(--ui-leise); }
.cl-nav-zeit { margin: .7em 0 .8em; font-size: .95em; color: var(--ui-leise); }
.cl-nav-zeit strong { font-size: 1.5em; color: var(--ui-p); margin-right: .2em; }
.cl-nav .cl-app-knopf { position: static; margin: 0; }

/* Statusleiste wie auf dem iPhone: Uhrzeit links, Empfang, WLAN und Akku rechts, auf Höhe der Dynamic Island. */
.cl-status { align-items: center; padding: 1.25em 2.1em .55em; }
.cl-status-zeichen { display: inline-flex; align-items: center; gap: .3em; }
.cl-status-zeichen svg { display: block; height: .82em; width: auto; fill: currentColor; }
