/* /pvs-anbindung/evident/ – Fenster im Stil von EVIDENT: Windows-MDI mit mittelblauen Titelleisten, hellblauen Flächen,
   Symbolleisten mit Symbol plus Text, Patientenfenster mit Karteikarte. Farben nach marketing/pvs-referenzen. Präfix pe- */
.sx-pvs_evident, .pe-fs, .pe-rw { --ev: #1f3f7a; --ev2: #6b9edc; --pe-ink: #10182b; --pe-line: #9db4d8; --pe-gruen: #17964f; }

/* kleines Logo-Paar über dem Seitennamen */
.pe-logos { display: flex; align-items: center; justify-content: center; gap: 14px; margin: 0 0 26px; }
.pe-logos img { display: block; height: 30px; width: auto; }
.pe-logos img + i + img { height: 28px; }
.pe-logos i { position: relative; width: 12px; height: 12px; }
.pe-logos i::before, .pe-logos i::after { content: ""; position: absolute; left: 50%; top: 50%; width: 12px; height: 1.5px; margin: -.75px 0 0 -6px; border-radius: 2px; background: #a9adb8; transform: rotate(45deg); }
.pe-logos i::after { transform: rotate(-45deg); }

/* ---------- Hauptfenster und Unterfenster ---------- */
.pe-win, .pe-sub { text-align: left; color: var(--pe-ink); font: 400 11.5px/1.3 "Segoe UI", Tahoma, "Helvetica Neue", Arial, sans-serif; }
.pe-win { --q: 22px; --s: 0; --rows: 16; width: 100%; border-radius: 6px 6px 2px 2px; background: #f0fbff; box-shadow: 0 0 0 1px #4d7fc2, 0 34px 70px -34px rgba(13,27,62,.5), 0 8px 18px -12px rgba(13,27,62,.25); overflow: hidden; }
.pe-sub { --q: 22px; --s: 0; --rows: 16; position: relative; min-width: 0; background: #e1f0fd; box-shadow: 0 0 0 1px #4d7fc2, 0 10px 22px -12px rgba(13,27,62,.45); }
.pe-fall-in > .pe-sub { width: 100%; border-radius: 5px 5px 0 0; overflow: hidden; box-shadow: 0 0 0 1px #4d7fc2, 0 34px 70px -34px rgba(13,27,62,.5), 0 8px 18px -12px rgba(13,27,62,.25); }
.pe-bar { display: flex; align-items: center; gap: 6px; height: 23px; padding: 0 0 0 6px; background: linear-gradient(180deg, #6b9edc, #679fe0); font-size: 12px; color: #fff; white-space: nowrap; text-shadow: 0 1px 0 rgba(20,50,110,.35); }
.pe-win > .pe-bar { height: 27px; }
.pe-bar > span:first-of-type { min-width: 0; overflow: hidden; text-overflow: ellipsis; }
.pe-bar em { font-style: normal; }
.pe-ico { position: relative; flex: 0 0 auto; width: 14px; height: 14px; border-radius: 2px; background: #fff; box-shadow: inset 0 0 0 1px #2b406f; }
.pe-ico::after { content: ""; position: absolute; inset: 3px; background: linear-gradient(135deg, #e0483f 50%, #2b62b8 50%); }
.pe-ctl { display: flex; gap: 1px; margin-left: auto; padding-right: 5px; }
.pe-ctl i { position: relative; width: 22px; height: 15px; border-radius: 0 0 3px 3px; background: rgba(255,255,255,.28); box-shadow: inset 0 0 0 1px rgba(255,255,255,.55); }
.pe-ctl i::before { content: ""; position: absolute; left: 7px; bottom: 4px; width: 8px; height: 2px; background: #fff; }
.pe-ctl i:nth-child(2)::before { bottom: 3px; height: 7px; background: none; border: 1.5px solid #fff; box-sizing: border-box; }
.pe-ctl i:nth-child(3) { width: 30px; background: #d6594c; }
.pe-ctl i:nth-child(3)::before, .pe-ctl i:nth-child(3)::after { content: ""; position: absolute; left: 10px; top: 7px; bottom: auto; width: 10px; height: 1.5px; background: #fff; transform: rotate(45deg); }
.pe-ctl i:nth-child(3)::after { transform: rotate(-45deg); }
.pe-sub .pe-ctl i { width: 17px; height: 13px; } .pe-sub .pe-ctl i::before { left: 5px; width: 7px; }
.pe-sub .pe-ctl i:nth-child(3) { width: 22px; } .pe-sub .pe-ctl i:nth-child(3)::before, .pe-sub .pe-ctl i:nth-child(3)::after { left: 6px; top: 6px; }
.pe-menu { display: flex; align-items: center; gap: 13px; height: 21px; padding: 0 8px; background: #eef1e8; border-bottom: 1px solid #d5dccb; white-space: nowrap; overflow: hidden; }
.pe-tool { display: flex; align-items: center; height: 34px; padding: 0 3px; background: #e0f0ff; border-bottom: 1px solid var(--pe-line); white-space: nowrap; overflow: hidden; }
.pe-tool.klein { height: 28px; }
.pe-tb { display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 8px; border-right: 1px solid #a9c2e2; }
.pe-tb:last-of-type { border-right: 0; }
.pe-tb b { font-weight: 400; }
.pe-tb u { width: 0; height: 0; margin-left: 1px; border: 3.5px solid transparent; border-top: 4px solid #2b406f; border-bottom: 0; }
.pe-tb .k-grau { height: 6px; background: #b3c8e4; }
/* Symbole: klein, bunt, jedes anders */
.pe-sy { position: relative; flex: 0 0 auto; width: 18px; height: 18px; border-radius: 3px; background: #4b8fd6; box-shadow: inset 0 0 0 1px rgba(16,24,43,.35); }
.pe-tool.klein .pe-sy { width: 15px; height: 15px; }
.pe-sy.chip { height: 13px; background: linear-gradient(#f2c84b, #f2c84b) 3px 4px / 5px 5px no-repeat, linear-gradient(#2b62b8, #2b62b8) 0 0 / 100% 3px no-repeat, #fff; }
.pe-sy.tis { background: #fff; box-shadow: inset 0 0 0 1px #c22b22; }
.pe-sy.tis::before { content: "T"; position: absolute; inset: 0; display: grid; place-items: center; font: 800 14px/1 Arial, sans-serif; color: #d32d24; }
.pe-tool.klein .pe-sy.tis::before { font-size: 12px; }
.pe-sy.op { background: linear-gradient(#fff, #fff) 50% 50% / 10px 3px no-repeat, linear-gradient(#fff, #fff) 50% 50% / 3px 10px no-repeat, #e58a1c; }
.pe-sy.kb { background: linear-gradient(#fff, #fff) 4px 4px / 8px 2px no-repeat, #2c9a56; border-radius: 1px 4px 4px 1px; }
.pe-sy.mm { background: conic-gradient(#e0483f 25%, #f2c84b 0 50%, #2c9a56 0 75%, #4b8fd6 0); }
.pe-sy.rc { border-radius: 50%; background: radial-gradient(#fff 0 3px, #4b8fd6 3.5px); }
.pe-sy.gk { background: #7a4fb5; } .pe-sy.dia { background: linear-gradient(0deg, #2c9a56 40%, transparent 0) 3px 0 / 4px 100% no-repeat, linear-gradient(0deg, #e0483f 70%, transparent 0) 10px 0 / 4px 100% no-repeat, #fff; }
.pe-sy.br, .pe-sy.rez, .pe-sy.au { background: #fff; }
.pe-sy.br { height: 12px; background: linear-gradient(160deg, transparent 49%, #6c7c99 50%, transparent 53%) , linear-gradient(200deg, transparent 49%, #6c7c99 50%, transparent 53%), #fff; }
.pe-sy.rez { background: linear-gradient(#f3a6b7, #f3a6b7) 0 0 / 100% 5px no-repeat, #fff; }
.pe-sy.au { background: linear-gradient(#f2c84b, #f2c84b) 0 0 / 100% 5px no-repeat, #fffbe0; }
.pe-sy.dr { background: linear-gradient(#fff, #fff) 4px 2px / calc(100% - 8px) 5px no-repeat, #7b879c; }
.pe-sy.kal { background: linear-gradient(#d6594c, #d6594c) 0 0 / 100% 4px no-repeat, #fff; }
.pe-mini { display: flex; gap: 3px; margin-left: auto; padding: 0 6px; }
.pe-mini i { width: 11px; height: 11px; border-radius: 2px; background: #e0483f; box-shadow: inset 0 0 0 1px rgba(16,24,43,.3); }
.pe-mini i:nth-child(2) { background: #f2c84b; border-radius: 50%; } .pe-mini i:nth-child(3) { background: #2c9a56; } .pe-mini i:nth-child(4) { background: #4b8fd6; border-radius: 50%; }
.pe-desk { position: relative; display: flex; align-items: flex-start; padding: 8px; background: #f0fbff; }
.pe-status { display: flex; align-items: center; justify-content: space-between; height: 20px; padding: 0 8px; background: #e4e6ea; border-top: 1px solid #b3bac6; font-size: 11px; color: #2a3348; }
.pe-status .k-grau { height: 6px; background: #bcc3cf; }
.pe-status time { font-variant-numeric: tabular-nums; }
.pe-foot { display: flex; align-items: center; gap: 5px; padding: 5px 6px; }
.pe-fa, .pe-fz { position: relative; flex: 0 0 auto; width: 26px; height: 21px; border-radius: 3px; background: linear-gradient(180deg, #f6faff, #cfdff3); box-shadow: inset 0 0 0 1px #2b406f; }
.pe-fa::before { content: ""; position: absolute; left: 4px; top: 5px; width: 10px; height: 10px; border-radius: 2px; background: #e58a1c; }
.pe-fa::after { content: ""; position: absolute; right: 3px; top: 9px; border: 3px solid transparent; border-top: 4px solid #2b406f; border-bottom: 0; }
.pe-fz { width: 21px; }
.pe-fz::before { content: ""; position: absolute; inset: 5px; border-radius: 50%; border: 3px dotted #5c6b88; }
.pe-btn { padding: 3px 14px; border-radius: 3px; background: linear-gradient(180deg, #f6faff, #cfdff3); box-shadow: inset 0 0 0 1px #2b406f; color: #10182b; }
.pe-fz + .pe-btn { margin-left: auto; }
/* Reiter: aktiv weiß, inaktiv hellblau */
.pe-reiter { display: flex; align-items: flex-end; gap: 1px; padding: 4px 4px 0; }
.pe-reiter em, .pe-ur em { display: flex; align-items: center; gap: 4px; height: 21px; padding: 0 9px; border: 1px solid #7f95c4; border-bottom: 0; border-radius: 3px 3px 0 0; background: #bfcbf2; font-style: normal; white-space: nowrap; }
.pe-reiter em.on, .pe-ur em.on { height: 23px; background: #fff; font-weight: 600; }
.pe-bu, .pe-ss, .pe-warn { flex: 0 0 auto; width: 11px; height: 11px; }
.pe-bu { margin-left: 3px; border-radius: 1px 3px 3px 1px; background: #c8372e; box-shadow: inset 2px 0 0 #8f1d1d; }
.pe-ss { background: linear-gradient(45deg, transparent 42%, #6c7c99 43% 57%, transparent 58%); }
.pe-warn { position: relative; width: 14px; height: 13px; background: #d92d20; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.pe-warn::after { content: "!"; position: absolute; left: 0; right: 0; bottom: 0; text-align: center; font: 800 9px/10px Arial, sans-serif; color: #fff; }
.k-flow .pe-warn[data-at] { transform: scale(.3); transition: opacity .25s linear, transform .5s cubic-bezier(.3,1.8,.5,1); }
.k-flow .pe-warn[data-at].on { transform: none; }

/* grüner Haken an allem, was Praxishub eingetragen hat */
.pe-ok { position: absolute; right: 6px; top: 50%; margin-top: -9px; display: grid; place-items: center; width: 18px; height: 18px; border-radius: 50%; background: var(--pe-gruen); }
.pe-ok svg { width: 12px; height: 12px; fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; stroke-linejoin: round; }
.k-flow .pe-ok { transform: scale(0); transition: transform .4s cubic-bezier(.3,1.6,.5,1) .3s; }
.k-flow .on > .pe-ok, .k-flow .on > output ~ .pe-ok { transform: none; }

/* ---------- Fenster „Patient auswählen“ ---------- */
.pe-liste { flex: 0 0 236px; margin-top: 16px; z-index: 1; }
.pe-such { margin: 0 4px; padding: 5px 5px 0; background: #e1f0fd; border: 1px solid #7f95c4; }
.pe-such p { display: flex; align-items: center; gap: 5px; margin: 0 0 4px; }
.pe-such .k-grau { height: 6px; background: #b3c8e4; margin-right: 6px; }
.pe-rb, .pe-cb { flex: 0 0 auto; width: 11px; height: 11px; background: #fff; box-shadow: inset 0 0 0 1px #5c6b88; }
.pe-rb { border-radius: 50%; } .pe-rb.on { background: radial-gradient(#10182b 0 2.5px, #fff 3px); }
.pe-such ul { margin: 0 -5px; padding: 0; list-style: none; background: #fff; border-top: 1px solid #7f95c4; }
.pe-such li { display: flex; align-items: center; gap: 5px; height: 19px; padding: 0 6px; white-space: nowrap; }
.pe-such li .k-grau { height: 6px; background: #cdd5e1; }
.pe-such li.on { background: #3778a7; color: #fff; }
.pe-st { flex: 0 0 auto; width: 9px; height: 9px; background: #f2c84b; clip-path: polygon(50% 0, 63% 35%, 100% 38%, 71% 61%, 81% 100%, 50% 78%, 19% 100%, 29% 61%, 0 38%, 37% 35%); }
.pe-st.s1 { background: #4b8fd6; clip-path: none; border-radius: 50%; } .pe-st.s2 { background: #2c9a56; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.pe-wd { flex: 0 0 auto; width: 11px; height: 10px; margin-left: auto; background: #f2a516; clip-path: polygon(50% 0, 100% 100%, 0 100%); }
.pe-such li.on .pe-wd { background: #ffd23d; }

/* ---------- TIS: schlichtes weißes Raster ---------- */
.pe-wtis { flex: 1 1 0; margin-left: -26px; z-index: 2; }
.pe-bar .kurz { display: none; }
.pe-tis { margin: 4px 4px 0; border: 1px solid #7f95c4; background: #fff; }
.pe-grid { display: flex; min-width: 0; }
.pe-gut { flex: 0 0 44px; }
.pe-col { flex: 1 1 0; min-width: 0; border-left: 1px solid #a9b6cc; }
.pe-col-h { display: flex; align-items: center; justify-content: center; height: 21px; background: #ebeeed; border-bottom: 1px solid #a9b6cc; white-space: nowrap; }
.pe-col-b { position: relative; height: calc(var(--rows) * var(--q)); overflow: hidden;
  background:
    repeating-linear-gradient(180deg, #b9c1ce 0 1px, transparent 1px calc(var(--q) * 4)),
    repeating-linear-gradient(180deg, #e6eaf0 0 1px, transparent 1px var(--q)); }
.pe-gut .pe-col-b { background: #f5f5ff; }
.pe-gut time { position: absolute; right: 6px; top: calc((var(--m) - var(--s)) / 15 * var(--q) + 3px); font-size: 10.5px; line-height: 1; color: #6c7c99; font-variant-numeric: tabular-nums; }
.pe-gut time.h { font-size: 11.5px; font-weight: 600; color: var(--pe-ink); }

.pe-t, .pe-slot { position: absolute; left: 1px; right: 2px; top: calc((var(--m) - var(--s)) / 15 * var(--q) + 1px); height: calc(var(--d) / 15 * var(--q) - 1px); }
.pe-t { --bg: #fff3c2; --rand: #dcae12; display: flex; align-items: flex-start; gap: 6px; padding: 3px 6px 0 6px; background: var(--bg); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--rand) 75%, transparent); overflow: hidden; white-space: nowrap; }
.pe-t.b { --bg: #d6e6fa; --rand: #3e86cb; }
.pe-t.c { --bg: #d3f0ee; --rand: #2aa39b; }
.pe-t.d { --bg: #fadbe5; --rand: #cc6485; }
.pe-t time { font-size: 11px; line-height: 14px; color: color-mix(in srgb, var(--rand) 50%, #10182b); font-variant-numeric: tabular-nums; }
.pe-t .k-grau { margin-top: 4px; height: 6px; background: color-mix(in srgb, var(--rand) 40%, transparent); }

/* der eine Termin, um den es geht */
.pe-slot { display: grid; }
.pe-slot > * { grid-area: 1 / 1; position: relative; left: auto; right: auto; top: auto; height: auto; min-width: 0; }
.pe-f { flex-direction: column; gap: 3px; padding: 6px 8px 0 8px; }
.pe-f b { font-size: 13.5px; line-height: 17px; font-weight: 600; color: #14223f; max-width: 100%; overflow: hidden; text-overflow: ellipsis; }
.pe-f .k-grau { margin-top: 4px; }
.pe-f.rot { --bg: #fde4e4; --rand: #d43c3c; }
.pe-f.rot b { color: #a12323; }
.pe-f.rot s { text-decoration-thickness: 1.5px; }
.pe-f.neu { --bg: #d9f3e3; --rand: var(--pe-gruen); box-shadow: inset 0 0 0 2px var(--rand); }
.pe-f.neu b { color: #0c4f2c; }
.pe-f .pe-ok { top: auto; bottom: 8px; margin-top: 0; width: 20px; height: 20px; }
.pe-frei { border: 1.5px dashed #8491a8; background: repeating-linear-gradient(135deg, #fff 0 7px, #eef1f6 7px 14px); }
.k-flow .pe-slot > [data-at] { transition: opacity .35s var(--ease), transform .45s var(--ease); }
.k-flow .pe-f.rot[data-at] { transition: opacity .25s linear; }
.k-flow .pe-f.neu[data-at] { transform: scale(.88); }
.k-flow .pe-f.neu[data-at].on { transform: none; animation: peNeu 1.5s ease-out .15s 1 both; }
@keyframes peNeu { 0% { box-shadow: inset 0 0 0 2px var(--rand), 0 0 0 0 rgba(23,150,79,.55); } 100% { box-shadow: inset 0 0 0 2px var(--rand), 0 0 0 16px rgba(23,150,79,0); } }

/* ---------- Kopf ---------- */
.sx-stage.sx-pvs_evident { background: linear-gradient(180deg, #eef3f9, #e3eaf3); border-color: #d6dde8; }
.pe-hero { position: relative; max-width: 900px; margin: 0 auto; padding-bottom: 48px; }
.pe-whero .pe-sub { --q: 27px; --s: 60; --rows: 12; }
.pe-float { position: absolute; z-index: 3; right: -84px; top: 170px; display: grid; width: 296px; }
.pe-fl { grid-area: 1 / 1; align-self: start; display: flex; align-items: flex-start; gap: 11px; padding: 13px 15px 14px 13px; border-radius: 16px; background: #fff; box-shadow: 0 0 0 1px rgba(13,27,62,.08), 0 26px 46px -20px rgba(13,27,62,.5); text-align: left; font-family: var(--sans); color: var(--ink); }
.k-flow .pe-fl[data-at] { transform: translateY(14px) scale(.96); transition: opacity .35s var(--ease), transform .5s var(--ease); pointer-events: none; }
.k-flow .pe-fl[data-at].on { transform: none; }
.pe-fi { position: relative; display: grid; place-items: center; flex: 0 0 auto; width: 38px; height: 38px; border-radius: 50%; }
.pe-fi svg { width: 20px; height: 20px; fill: none; stroke: currentColor; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.pe-fi.wa { background: #25d366; color: #fff; }
.pe-fi.wa svg { width: 21px; height: 21px; fill: currentColor; stroke: none; }
.pe-fi.tel { background: var(--accent); color: #fff; }
.pe-fi.tel svg { width: 18px; height: 18px; stroke-width: 2; }
.pe-fi.bogen { background: var(--accent-soft); color: var(--accent-deep); }
.pe-fi.aus { background: #fdecd9; color: #a85a08; }
.pe-ring { position: absolute; inset: -3px; border-radius: 50%; border: 2px solid var(--accent); }
.k-flow .pe-ring[data-at].on { animation: peRing 1.15s ease-out infinite; }
@keyframes peRing { from { transform: scale(.9); opacity: .9; } to { transform: scale(1.6); opacity: 0; } }
.pe-fl-t { display: flex; flex-direction: column; gap: 2px; min-width: 0; font-size: 14px; line-height: 1.36; color: var(--ink-2); }
.pe-fl-t b { font-size: 15px; font-weight: 600; color: var(--ink); }
.pe-fl-t .k-swap { justify-items: start; align-items: start; }
.pe-fl-t .k-badge { margin-top: 3px; padding: 3px 10px; font-size: 12.5px; background: #dff3e7; color: #0f7a3f; }

@media (max-width: 1180px) { .pe-float { right: -18px; } }

/* ---------- Patientenfenster ---------- */
.pe-pb { display: grid; grid-template-columns: 228px minmax(0, 1fr); gap: 4px; align-items: stretch; margin: 0 4px; padding: 4px; background: #fff; border: 1px solid #7f95c4; }
.pe-li { display: flex; flex-direction: column; min-width: 0; }
.pe-urs { display: grid; gap: 0; }
.pe-ur { display: flex; gap: 1px; }
.pe-ur em { flex: 1 1 0; height: 20px; padding: 0 6px; border-radius: 2px 2px 0 0; }
.pe-ur em.on { height: 20px; }
.pe-ur em i { flex: 0 0 auto; width: 9px; height: 9px; border-radius: 2px; background: #4b8fd6; box-shadow: inset 0 0 0 1px rgba(16,24,43,.3); }
.pe-ur:nth-child(1) em:nth-child(2) i { background: #f2c84b; } .pe-ur:nth-child(2) em:nth-child(1) i { background: #fff; }
.pe-ur:nth-child(2) em:nth-child(2) i { background: #d32d24; } .pe-ur:nth-child(3) em:nth-child(1) i { background: #2c9a56; }
.pe-ur:nth-child(3) em:nth-child(2) i { background: #e58a1c; } .pe-ur:nth-child(3) em:nth-child(3) i { background: #7a4fb5; }
.pe-lc { flex: 1 1 auto; padding: 5px; background: #f5f5ff; border: 1px solid #7f95c4; }
.pe-wahl { display: flex; align-items: center; justify-content: space-between; height: 20px; padding: 0 5px; margin-bottom: 5px; background: #fff; box-shadow: inset 0 0 0 1px #7f95c4; }
.pe-wahl .k-grau { height: 6px; background: #cdd5e1; }
.pe-wahl u { border: 3.5px solid transparent; border-top: 4px solid #2b406f; border-bottom: 0; }
.pe-baum, .pe-baum ul { margin: 0; padding: 0; list-style: none; }
.pe-ord { position: relative; display: flex; align-items: center; height: 20px; padding: 0 4px 0 36px; font-weight: 600; }
.pe-ord::before { content: ""; position: absolute; left: 4px; top: 7px; border: 3.5px solid transparent; border-left: 5px solid #5c6b88; border-right: 0; }
.pe-ord.auf::before { top: 8px; left: 2px; border: 3.5px solid transparent; border-top: 5px solid #5c6b88; border-bottom: 0; }
.pe-ord::after { content: ""; position: absolute; left: 15px; top: 5px; width: 15px; height: 10px; border-radius: 1px; background: #f0c64c; box-shadow: inset 0 0 0 1px #b88d12, 0 -3px 0 -1px #b88d12; }
.pe-baum .k-grau { height: 6px; background: #cdd5e1; }
.pe-unter { padding-left: 20px; }
.pe-unter li { position: relative; display: flex; flex-wrap: wrap; align-items: center; gap: 2px 6px; min-height: 20px; padding: 2px 4px; }
.pe-unter li.neu { margin: 1px 0; padding: 4px 26px 4px 6px; background: #d9f3e3; box-shadow: inset 0 0 0 1.5px var(--pe-gruen); color: #0c4f2c; font-size: 12.5px; font-weight: 600; }
.pe-unter li.neu time { font-weight: 400; font-variant-numeric: tabular-nums; }
.pe-unter .k-badge { padding: 1px 7px; font-size: 11px; border-radius: 3px; }
.pe-unter .k-badge.warn { background: #fdedd8; color: #9a5b0b; }
.pe-unter .k-badge.ok { background: #17964f; color: #fff; }
.k-flow li.neu[data-at], .k-flow .pe-kz.neu[data-at], .k-flow .pe-hin[data-at], .k-flow .pe-bz[data-at], .k-flow .pe-neu-f[data-at] { transition: opacity .3s linear; }
.k-flow li.neu[data-at].on, .k-flow .pe-hin[data-at].on, .k-flow .pe-bz[data-at].on, .k-flow .pe-kz.neu[data-at].on .pe-kl { animation: peGruen 1.4s ease-out .1s 1 both; }
@keyframes peGruen { 0% { box-shadow: inset 0 0 0 1.5px var(--pe-gruen), 0 0 0 0 rgba(23,150,79,.5); } 100% { box-shadow: inset 0 0 0 1.5px var(--pe-gruen), 0 0 0 13px rgba(23,150,79,0); } }

/* Notizen: CAVE und die Angaben aus der Anamnese */
.pe-cave { position: relative; display: flex; align-items: flex-start; gap: 7px; padding: 6px 28px 6px 6px; background: #fde6e6; box-shadow: inset 0 0 0 1.5px #d43c3c; font-size: 13px; line-height: 1.3; font-weight: 600; color: #8f1d1d; }
.pe-cave > b { flex: 0 0 auto; padding: 1px 6px; background: #d43c3c; color: #fff; font-size: 11px; font-weight: 700; letter-spacing: .06em; }
.k-flow .pe-cave[data-at] { transform: translateY(-5px); }
.k-flow .pe-cave[data-at].on { transform: none; animation: peCave 1.4s ease-out .1s 1 both; }
@keyframes peCave { 0% { box-shadow: inset 0 0 0 1.5px #d43c3c, 0 0 0 0 rgba(212,60,60,.5); } 100% { box-shadow: inset 0 0 0 1.5px #d43c3c, 0 0 0 14px rgba(212,60,60,0); } }
.pe-hin { position: relative; margin-top: 6px; padding: 5px 28px 6px 6px; background: #d9f3e3; box-shadow: inset 0 0 0 1.5px var(--pe-gruen); }
.pe-hin p { margin: 0; padding: 1px 0; font-size: 12.5px; line-height: 1.3; color: #0c4f2c; }
.pe-hin p i { display: block; font-style: normal; font-size: 11px; color: #33405a; }
.pe-hin p span { font-weight: 600; }

/* Karteikarte: Tabelle x | Datum | Leistungen | Art | Abg. | Beh. */
.pe-kk { position: relative; display: flex; flex-direction: column; min-width: 0; border: 1px solid #7f95c4; background: #fff; --okr: 96px; }
.pe-kt { display: flex; align-items: center; gap: 4px; height: 24px; padding: 0 5px; background: #e1f0fd; border-bottom: 1px solid #a9b6cc; white-space: nowrap; overflow: hidden; }
.pe-kt b { padding: 0 5px; font-weight: 400; }
.pe-ks { flex: 0 0 auto; width: 14px; height: 14px; border-radius: 2px; background: #f0c64c; box-shadow: inset 0 0 0 1px rgba(16,24,43,.3); }
.pe-ks.k2 { background: #fff; border-radius: 4px 4px 6px 6px; } .pe-ks.k3 { background: linear-gradient(#a9b6cc 1px, transparent 0) 0 0 / 100% 4px, #fff; } .pe-ks.k4 { background: #2c9a56; }
.pe-ks.k5 { background: #4b8fd6; } .pe-ks.k6 { background: #7b879c; clip-path: polygon(0 0, 100% 0, 60% 50%, 60% 100%, 40% 100%, 40% 50%); } .pe-ks.k7 { background: #e58a1c; } .pe-ks.k8 { background: radial-gradient(#8fc3f0 0 3px, #2b62b8 3.5px); border-radius: 50%; }
.pe-kzs { flex: 1 1 auto; display: flex; flex-direction: column; background: linear-gradient(90deg, transparent calc(100% - 34px), #f8c5cc 0); }
.pe-kz { position: relative; display: grid; grid-template-columns: 9px 76px minmax(0, 1fr) 26px 30px 34px; align-items: stretch; border-bottom: 1px solid #eceff4; }
.pe-kz > * { min-width: 0; }
.pe-kz time { padding: 4px 0 0 4px; font-variant-numeric: tabular-nums; }
.pe-kx { font-style: normal; }
.pe-kzs .pe-kz:nth-child(1) .pe-kx, .pe-kzs .pe-kz:nth-child(2) .pe-kx { background: #2f6b3a; }
.pe-kl { display: flex; flex-wrap: wrap; align-items: center; gap: 3px 7px; min-height: 22px; padding: 3px 5px; }
.pe-kl .k-grau { height: 6px; background: #cdd5e1; }
.pe-ka, .pe-kg, .pe-kb { display: grid; place-items: center; align-content: start; padding-top: 4px; }
.pe-kb { background: #f8c5cc; color: #c0182a; font-weight: 600; font-size: 10.5px; }
.pe-kh { background: #ebeeed; border-bottom: 1px solid #a9b6cc; }
.pe-kh > * { display: flex; align-items: center; justify-content: flex-start; height: 19px; padding: 0 0 0 4px; border-right: 1px solid #c9cfda; color: #10182b; font-weight: 400; font-size: 11.5px; }
.pe-kh .pe-kx { padding: 0; justify-content: center; font-size: 9px; }
.pe-kh .pe-kb { background: #ebeeed; border-right: 0; }
.pe-lk { font-weight: 700; color: #1a2f8a; }
.pe-lf { font-style: normal; font-weight: 600; color: #1f8a3d; }
.pe-zw { flex: 0 0 auto; font-weight: 700; color: #10182b; }
.pe-zt { font-size: 12.5px; }
.pe-bild { flex: 0 0 100%; display: block; padding: 1px 0 3px; }
.pe-frt { font-size: 12.5px; }
.pe-frt i { font-style: normal; color: #33405a; font-size: 11.5px; }
.pe-roe { display: block; width: 74px; height: 38px; border-radius: 1px; background: radial-gradient(60% 90% at 50% 110%, transparent 55%, #c9d0d8 57% 68%, transparent 70%), radial-gradient(80% 60% at 50% 40%, #59636f, #161b22 75%); }
.pe-kz.neu .pe-kl { padding-right: 28px; background: #d9f3e3; box-shadow: inset 0 0 0 1.5px var(--pe-gruen); color: #0c4f2c; }
.pe-kz.neu .pe-zt, .pe-kz.neu .pe-frt { font-weight: 600; }
.pe-kz.neu .pe-frt i { font-weight: 400; }
.pe-kz.neu > .pe-ok { right: calc(var(--okr) - 6px); top: 13px; margin-top: -9px; }
.pe-kz.cave .pe-kl { background: #fde6e6; box-shadow: inset 0 0 0 1.5px #d43c3c; }
.k-flow .pe-kz.cave[data-at].on .pe-kl { animation-name: peCave; }
.pe-cv { font-size: 13.5px; font-style: italic; font-weight: 700; color: #c0182a; }
.pe-cv b { font-weight: 800; letter-spacing: .04em; }

/* Vorschaubilder */
.pe-blatt { display: block; width: 15em; padding: 1.5em 1.4em 2em; background: #fff; box-shadow: 0 .5em 1.2em -.4em rgba(13,27,62,.55), 0 0 0 1px rgba(13,27,62,.25); font-size: 5.6px; line-height: 1.2; color: #1b2233; text-align: left; }
.pe-blatt b { display: block; font-size: 1.1em; font-weight: 700; }
.pe-blatt em { display: block; margin-bottom: 1.2em; font-style: normal; font-size: .8em; color: #5d667a; text-align: right; }
.pe-blatt u { display: block; height: .9em; margin: .8em 0 .2em; background: #dfe4ec; }
.pe-blatt i { display: block; width: var(--w); height: .5em; margin-top: .8em; border-radius: 9px; background: #cfd5df; }
.pe-blatt.plan i { background: linear-gradient(90deg, #9aa5b8 0 28%, transparent 28% 34%, #cfd5df 34%); }
.pe-blatt.bogen i { background: linear-gradient(90deg, #17964f 0 .5em, transparent .5em 1.1em, #cfd5df 1.1em); border-radius: 0; }
.pe-blatt.bogen u { width: 45%; height: 1.2em; margin: 1.4em 0 0 auto; background: none; border-bottom: 1px solid #33405a; }
.pe-sum { display: flex; align-items: center; justify-content: space-between; gap: .6em; margin: 1.4em 0 0; padding-top: .7em; border-top: 1px solid #aab2c0; font-size: .92em; font-weight: 600; }
.pe-sum .k-grau { height: .6em; background: #9aa5b8; }
.pe-anh { display: flex; align-items: center; gap: 10px; margin-top: 4px; }
.pe-anh .pe-blatt { flex: 0 0 auto; font-size: 4.2px; border-radius: 3px; box-shadow: 0 0 0 1px rgba(13,27,62,.2); }

/* Zahnschema als schwebendes Fenster */
.pe-wakte .pe-kzs { padding-bottom: 150px; }
.pe-zs { position: absolute; right: 44px; bottom: 8px; z-index: 2; width: 232px; background: #fff; }
.pe-zs-t { display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 5px; background: #e1f0fd; border-bottom: 1px solid #a9b6cc; }
.pe-lupe { width: 11px; height: 11px; border-radius: 50%; box-shadow: inset 0 0 0 2px #5c6b88; }
.pe-zs-t .pe-cb { margin-left: auto; }
.pe-zs-k { padding: 8px 8px 9px; background: linear-gradient(#f4c6cc, #f4c6cc) 0 16px / 100% 13px no-repeat, linear-gradient(#f4c6cc, #f4c6cc) 0 calc(100% - 16px) / 100% 13px no-repeat, #fff; }
.pe-zr { display: flex; justify-content: space-between; align-items: flex-end; }
.pe-zr i { position: relative; width: 18px; height: 24px; border: 1.5px solid #2a3348; border-radius: 45% 45% 30% 30% / 35% 35% 60% 60%; background: #fff; }
.pe-zr.u i { border-radius: 30% 30% 45% 45% / 60% 60% 35% 35%; }
.pe-zr i b { position: absolute; left: 0; right: 0; top: 3px; text-align: center; font: 700 10px/1 Arial, sans-serif; color: #d32d24; }
.pe-zn { display: flex; justify-content: space-between; margin: 3px 0; padding: 0 5px; background: linear-gradient(#2a3348, #2a3348) 0 50% / 100% 1px no-repeat; font-size: 10.5px; }
.pe-zn span { padding: 0 2px; background: #fff; }

/* ---------- Reiter Stammdaten ---------- */
.pe-stamm { margin: 0 4px; padding: 6px 6px 8px; background: #fff; border: 1px solid #7f95c4; }
.pe-reiter.unter { padding: 0 4px; border-bottom: 1px solid #7f95c4; }
.pe-reiter.unter em.on { margin-bottom: -1px; }
.pe-form { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 22px; padding: 12px 10px 8px; background: #e1f0fd; border: 1px solid #7f95c4; border-top: 0; }
.pe-form label { position: relative; display: grid; grid-template-columns: 94px minmax(0, 1fr); align-items: center; gap: 8px; }
.pe-form output { display: flex; align-items: center; height: 23px; padding: 0 6px; background: #fff; box-shadow: inset 0 0 0 1px #7f95c4; font-size: 12.5px; white-space: nowrap; overflow: hidden; }
.pe-form .k-grau { height: 6px; background: #cdd5e1; }
.pe-mob { display: inline-grid; font-variant-numeric: tabular-nums; }
.pe-mob > * { grid-area: 1 / 1; }
.pe-mob s { color: #7b8496; }
.pe-mob b { font-weight: 700; color: #0c4f2c; }
.pe-form .pe-neu-f[data-at] { opacity: 1; }
.pe-neu-f.on output, .pe-neu-f:not([data-at]) output { background: #d9f3e3; box-shadow: inset 0 0 0 1.5px var(--pe-gruen); }
.pe-neu-f output { transition: background .3s, box-shadow .3s; padding-right: 30px; font-size: 13px; }
.k-flow .pe-neu-f.on output { animation: peGruen 1.4s ease-out .1s 1 both; }
.pe-neu-f .pe-ok { right: 3px; }

/* ---------- Arztbrief ---------- */
.pe-brief { margin: 4px 4px 0; padding: 14px 14px 0; background: #8d9bb3; border: 1px solid #7f95c4; }
.pe-seite { max-width: 540px; margin: 0 auto; padding: 26px 30px 30px; background: #fff; box-shadow: 0 10px 26px -12px rgba(13,27,62,.6); font: 400 13px/1.4 Arial, "Helvetica Neue", sans-serif; color: #1b2233; }
.pe-seite p { margin: 0; }
.pe-seite .k-grau { display: block; width: fit-content; height: 7px; margin-top: 8px; background: #cfd5df; }
.pe-bk { display: flex; flex-direction: column; align-items: flex-end; padding-bottom: 10px; border-bottom: 2px solid var(--ev); }
.pe-bk b { font-size: 15px; color: var(--ev); }
.pe-ba { margin-top: 16px !important; }
.pe-bd { text-align: right; font-size: 12px; color: #33405a; }
.pe-bb { margin-top: 12px !important; font-size: 13.5px; }
.pe-bt { margin-top: 10px !important; }
.pe-bz { position: relative; display: grid; grid-template-columns: 78px minmax(0, 1fr); gap: 8px; margin-top: 12px !important; padding: 8px 34px 8px 9px; background: #d9f3e3; box-shadow: inset 0 0 0 1.5px var(--pe-gruen); font-size: 13.5px; }
.pe-bz + .pe-bz { margin-top: 6px !important; }
.pe-bz i { font-style: normal; font-weight: 700; }
.pe-bz.cave i { color: #b32424; letter-spacing: .04em; }
.pe-bz span { min-width: 0; }

/* ---------- Umschalter mit fünf Fällen ---------- */
.pe-fs { margin-top: 36px; }
.pe-fs-wahl { display: flex; width: fit-content; max-width: 100%; margin: 0 auto 28px; padding: 4px; border-radius: 999px; background: #ecebe5; }
.pe-fs-wahl button { padding: 9px 18px; border: 0; border-radius: 999px; background: none; font: 600 15px/1.2 var(--sans); color: var(--ink-2); cursor: pointer; white-space: nowrap; transition: background .25s, color .25s; }
.pe-fs-wahl button.on { background: #fff; color: var(--ink); box-shadow: 0 1px 3px rgba(20,22,27,.16); }
.pe-fs-sel { display: none; width: 100%; max-width: 420px; margin: 0 auto 18px; padding: 13px 40px 13px 16px; border: 1px solid var(--hair); border-radius: 12px; background: #fff url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 12 8'%3E%3Cpath d='M1 1.500l5 5 5-5' fill='none' stroke='%2350545E' stroke-width='1.800' stroke-linecap='round' stroke-linejoin='round'/%3E%3C/svg%3E") no-repeat right 16px center / 12px; font: 600 16px/1.2 var(--sans); color: var(--ink); appearance: none; -webkit-appearance: none; }
.pe-fs-g { display: grid; max-width: 1040px; margin: 0 auto; padding: 40px 40px 48px; border-radius: 28px; border: 1px solid #d6dde8; background: linear-gradient(180deg, #eef3f9, #e3eaf3); overflow: hidden; }
.pe-fall { grid-area: 1 / 1; min-width: 0; display: grid; align-items: center; visibility: hidden; opacity: 0; transition: opacity .3s linear, visibility 0s .3s; }
.pe-fall.on { visibility: visible; opacity: 1; transition: opacity .35s linear; }
.pe-fall-in { position: relative; display: grid; grid-template-columns: minmax(0, 1fr); justify-items: center; max-width: 720px; margin: 0 auto; }
.pe-ev { position: relative; z-index: 2; grid-area: auto; justify-self: end; width: 340px; max-width: 100%; margin: 0 56px 12px 0; }

@media (max-width: 900px) {
  .pe-fs-wahl { display: none; }
  .pe-fs-sel { display: block; }
}
@media (max-width: 760px) {
  .pe-win, .pe-sub { font-size: 12px; }
  .pe-whero .pe-sub { --q: 25px; --rows: 12; }
  .pe-c3, .pe-bar em, .pe-liste, .pe-zs, .pe-bar .lang, .pe-menu span:nth-child(n+5), .pe-win > .pe-tool .pe-tb:nth-child(n+3),
  .pe-wk .pe-tool .pe-tb:nth-child(n+4), .pe-mini, .pe-ka, .pe-kg, .pe-ks.k6, .pe-ks.k7, .pe-ks.k8, .pe-reiter.unter em:nth-child(n+2) + em { display: none; }
  .pe-bar .kurz { display: inline; }
  .pe-desk { padding: 4px; }
  .pe-wtis { margin-left: 0; }
  .pe-gut { flex-basis: 40px; }
  .pe-hero { padding-bottom: 20px; }
  .pe-float { left: 10px; right: 10px; top: auto; bottom: 92px; width: auto; }
  .pe-fl { padding: 11px 13px 12px 11px; border-radius: 15px; box-shadow: 0 0 0 1px rgba(13,27,62,.1), 0 18px 34px -14px rgba(13,27,62,.6); }
  .pe-float .pe-fl { align-self: end; }
  .pe-fi { width: 34px; height: 34px; }
  .pe-fl-t { font-size: 13.5px; }

  .pe-fs { margin-top: 24px; }
  .pe-fs-g { padding: 18px 12px 24px; border-radius: 22px; }
  .pe-fall { align-items: start; }
  .pe-ev { width: auto; margin: 0 0 10px; justify-self: stretch; }
  .pe-pb { grid-template-columns: minmax(0, 1fr); }
  .pe-wakte .pe-kzs { padding-bottom: 0; }
  .pe-kk { --okr: 40px; }
  .pe-kz { grid-template-columns: 9px 78px minmax(0, 1fr) 34px; }
  .pe-f b { font-size: 12.5px; }
  .pe-cv { font-size: 13px; }
  .pe-form { grid-template-columns: minmax(0, 1fr); gap: 5px; padding: 10px 8px 6px; }
  .pe-form label { grid-template-columns: 98px minmax(0, 1fr); }
  .pe-brief { padding: 10px 8px 0; }
  .pe-seite { padding: 16px 14px 20px; }
  .pe-ba { margin-top: 10px !important; }
  .pe-bz { grid-template-columns: minmax(0, 1fr); gap: 1px; font-size: 13px; }
}

/* ---------- Karteikarte mit den zwei Listen ---------- */
.pe-rw { display: grid; grid-template-columns: minmax(0, 1fr) 300px; align-items: center; gap: 44px; max-width: 1100px; margin: 44px auto 0; }
.pe-rw-g { padding: 30px; border-radius: 28px; border: 1px solid #d6dde8; background: linear-gradient(180deg, #eef3f9, #e3eaf3); }
.pe-rw-l { display: grid; gap: 26px; }
.pe-rw-l h3 { display: flex; align-items: center; gap: 9px; margin: 0 0 10px; font-size: 18px; font-weight: 600; letter-spacing: -.01em; color: var(--ink); }
.pe-rw-l h3::before { content: ""; width: 10px; height: 10px; border-radius: 50%; background: #3778a7; }
.pe-rw-l .schreib h3::before { background: var(--pe-gruen); }
.pe-rw-l ul { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hair); }
.pe-rw-l li { padding: 7px 0; border-bottom: 1px solid var(--hair); font-size: 15.5px; line-height: 1.35; color: var(--ink); }
@media (max-width: 980px) {
  .pe-rw { grid-template-columns: minmax(0, 1fr); gap: 28px; max-width: 640px; margin-top: 28px; }
  .pe-rw-g { padding: 16px 12px; border-radius: 22px; }
}

/* ---------- Einrichtung ---------- */
.pe-ein { display: grid; grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); gap: 56px; align-items: start; }
.pe-ein h2 { margin: 0; font-size: clamp(30px, 3.6vw, 46px); text-wrap: balance; }
.pe-ein ol { margin: 0; padding: 0; list-style: none; border-top: 1px solid var(--hair); }
.pe-ein li { display: flex; align-items: center; gap: 18px; padding: 20px 0; border-bottom: 1px solid var(--hair); }
.pe-ein li i { display: grid; place-items: center; flex: 0 0 auto; width: 46px; height: 46px; border-radius: 13px; background: #e1f0fd; color: #1f3f7a; }
.pe-ein li svg { width: 24px; height: 24px; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
.pe-ein li p { margin: 0; font-size: 18px; line-height: 1.45; color: var(--ink); }
@media (max-width: 900px) {
  .pe-ein { grid-template-columns: 1fr; gap: 24px; }
  .pe-ein li { gap: 14px; padding: 16px 0; }
  .pe-ein li i { width: 42px; height: 42px; }
  .pe-ein li p { font-size: 17px; }
}

@media (prefers-reduced-motion: reduce) {
  .pe-fall, .k-flow [data-at].on, .k-flow .pe-f.neu[data-at].on, .k-flow .pe-ring[data-at].on, .k-flow .pe-neu-f.on output, .k-flow .pe-kz.neu[data-at].on .pe-kl, .k-flow .pe-warn[data-at] { transition: none !important; animation: none !important; }
}
