/* Portal-Login (Glass) – Login-Seite */
*,
*::before,
*::after { box-sizing: border-box; }

html, body { margin: 0; min-height: 100%; }

.pl-body {
    --pl-font: "SF Pro Display", "SF Pro Text", -apple-system, BlinkMacSystemFont, "Segoe UI Variable Display", "Segoe UI", "Helvetica Neue", Arial, sans-serif;
    --pl-line: rgba(255, 255, 255, .22);
    --pl-line-strong: rgba(255, 255, 255, .55);
    --pl-ease: cubic-bezier(.22, 1, .36, 1);
    min-height: 100vh;
    min-height: 100dvh;
    background: var(--pl-base);
    color: var(--pl-text);
    font-family: var(--pl-font);
    font-size: 15px;
    line-height: 1.5;
    -webkit-font-smoothing: antialiased;
    overflow-x: hidden;
}

/* ---------- Hintergrund: flüssiges Glas ---------- */
.pl-scene { position: fixed; inset: 0; z-index: 0; overflow: hidden; background: var(--pl-base); }
.pl-bgimage { position: absolute; inset: -2%; background-size: cover; background-position: center; transform: scale(1.04); }
.pl-bgimage::after { content: ""; position: absolute; inset: 0; background: var(--pl-base); opacity: var(--pl-dim); }
.pl-liquid { position: absolute; inset: -20%; filter: blur(70px) saturate(120%); transform: translate3d(var(--pl-px, 0), var(--pl-py, 0), 0); transition: transform 1.2s var(--pl-ease); }
.pl-bg-image_liquid .pl-liquid { opacity: .55; mix-blend-mode: screen; }
.pl-blob { position: absolute; border-radius: 50%; opacity: .85; will-change: transform; }
.pl-blob-1 { width: 52vmax; height: 52vmax; left: 4%; top: 2%; background: radial-gradient(circle at 35% 35%, var(--pl-blob1), transparent 66%); animation: pl-drift-a calc(26s * var(--pl-speed)) ease-in-out infinite alternate; }
.pl-blob-2 { width: 60vmax; height: 60vmax; right: -6%; top: 18%; background: radial-gradient(circle at 60% 40%, var(--pl-blob2), transparent 64%); animation: pl-drift-b calc(32s * var(--pl-speed)) ease-in-out infinite alternate; }
.pl-blob-3 { width: 38vmax; height: 38vmax; left: 34%; bottom: 0; background: radial-gradient(circle at 50% 50%, var(--pl-blob3), transparent 62%); opacity: .55; animation: pl-drift-c calc(22s * var(--pl-speed)) ease-in-out infinite alternate; }
.pl-blob-4 { width: 30vmax; height: 30vmax; right: 18%; top: -4%; background: radial-gradient(circle at 50% 50%, var(--pl-blob3), transparent 60%); opacity: .35; animation: pl-drift-b calc(38s * var(--pl-speed)) ease-in-out infinite alternate-reverse; }

@keyframes pl-drift-a { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(12vmax, 8vmax, 0) scale(1.12); } 100% { transform: translate3d(4vmax, 16vmax, 0) scale(.94); } }
@keyframes pl-drift-b { 0% { transform: translate3d(0, 0, 0) scale(1); } 50% { transform: translate3d(-14vmax, 6vmax, 0) scale(.9); } 100% { transform: translate3d(-6vmax, -8vmax, 0) scale(1.1); } }
@keyframes pl-drift-c { 0% { transform: translate3d(0, 0, 0) scale(1); } 100% { transform: translate3d(-10vmax, -12vmax, 0) scale(1.2); } }

.pl-grain {
    position: absolute; inset: 0; opacity: .07; mix-blend-mode: overlay; pointer-events: none;
    background-image: url("data:image/svg+xml;utf8,<svg xmlns='http://www.w3.org/2000/svg' width='160' height='160'><filter id='n'><feTurbulence type='fractalNoise' baseFrequency='.85' numOctaves='3' stitchTiles='stitch'/></filter><rect width='100%' height='100%' filter='url(%23n)' opacity='.9'/></svg>");
}

/* ---------- Bühne ---------- */
.pl-stage { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 22px; padding: 32px 20px 20px; }

.pl-preview-badge { position: fixed; top: 14px; left: 50%; transform: translateX(-50%); z-index: 5; padding: 6px 14px; border-radius: 999px; font-size: 12px; font-weight: 600; background: rgba(255, 255, 255, .14); border: 1px solid rgba(255, 255, 255, .25); backdrop-filter: blur(10px); -webkit-backdrop-filter: blur(10px); }

/* ---------- Glaskarte ---------- */
.pl-card {
    --mx: 50%; --my: 30%;
    position: relative;
    width: min(1040px, 100%);
    min-height: 560px;
    display: grid;
    grid-template-columns: 1fr 1fr;
    border-radius: var(--pl-radius);
    background:
        linear-gradient(135deg, rgba(255, 255, 255, calc(var(--pl-glass) + .06)), rgba(255, 255, 255, calc(var(--pl-glass) * .4)));
    -webkit-backdrop-filter: blur(var(--pl-blur)) saturate(150%);
    backdrop-filter: blur(var(--pl-blur)) saturate(150%);
    border: 1px solid rgba(255, 255, 255, .16);
    box-shadow:
        0 40px 100px -20px rgba(0, 0, 0, .55),
        0 12px 30px -10px rgba(0, 0, 0, .4),
        inset 0 1px 0 rgba(255, 255, 255, .22),
        inset 0 -1px 0 rgba(255, 255, 255, .05);
    overflow: hidden;
    isolation: isolate;
    animation: pl-card-in 1.1s var(--pl-ease) both;
}
@keyframes pl-card-in {
    0% { opacity: 0; transform: translateY(26px) scale(.965); filter: blur(10px); }
    100% { opacity: 1; transform: none; filter: none; }
}
/* Lichtreflex, der dem Mauszeiger folgt */
.pl-shine {
    position: absolute; inset: 0; z-index: 0; pointer-events: none;
    background:
        radial-gradient(520px circle at var(--mx) var(--my), rgba(255, 255, 255, .16), transparent 45%),
        linear-gradient(115deg, rgba(255, 255, 255, .10) 0%, transparent 32%, transparent 68%, rgba(255, 255, 255, .05) 100%);
    transition: opacity .6s ease;
}
.pl-no-shine .pl-shine { background: linear-gradient(115deg, rgba(255, 255, 255, .10) 0%, transparent 35%); }

.pl-pane { position: relative; z-index: 1; padding: 64px 60px; display: flex; flex-direction: column; justify-content: center; min-width: 0; }

/* Rechte Hälfte: eigene, etwas hellere Glasscheibe mit schräger Kante */
.pl-pane-form::before {
    content: ""; position: absolute; inset: 0 0 0 -34px; z-index: -1;
    background: linear-gradient(160deg, rgba(255, 255, 255, .07), rgba(255, 255, 255, .02));
    clip-path: polygon(34px 0, 100% 0, 100% 100%, 0 100%);
}
.pl-seam {
    position: absolute; z-index: 2; top: -4%; bottom: -4%; left: calc(50% - 17px); width: 1px;
    transform: rotate(3.4deg); transform-origin: center;
    background: linear-gradient(180deg, transparent, rgba(255, 255, 255, .55) 30%, rgba(255, 255, 255, .25) 70%, transparent);
    box-shadow: 0 0 18px rgba(255, 255, 255, .25);
    pointer-events: none;
}

/* ---------- Markenbereich ---------- */
/* Logo steht im normalen Ablauf: Je größer das Logo, desto weiter rutschen die Texte nach unten (1.4.0) */
.pl-pane-brand { justify-content: flex-start; }
.pl-brand { position: static; margin: -20px 0 32px; flex: 0 0 auto; }
.pl-pane-brand > .pl-headline { margin-top: auto; }
.pl-pane-brand > :last-child { margin-bottom: auto; }
.pl-logo { display: block; height: var(--pl-logo-h); width: auto; max-width: 100%; object-fit: contain; }
.pl-wordmark { font-weight: 700; font-size: 17px; letter-spacing: -.01em; opacity: .9; }
.pl-headline {
    margin: 0 0 22px;
    font-size: clamp(40px, 4.6vw, 60px);
    line-height: .96;
    font-weight: 800;
    letter-spacing: -.035em;
    background: linear-gradient(180deg, #fff 0%, var(--pl-text) 45%, color-mix(in srgb, var(--pl-text) 62%, transparent) 100%);
    -webkit-background-clip: text; background-clip: text; color: transparent;
}
.pl-headline span { display: block; }
.pl-intro { margin: 0; max-width: 34ch; color: var(--pl-muted); font-size: 15.5px; line-height: 1.6; }
.pl-help { margin: 26px 0 0; max-width: 36ch; color: var(--pl-muted); font-size: 13px; opacity: .8; }

/* ---------- Formular ---------- */
.pl-views { position: relative; display: grid; }
.pl-view { grid-area: 1 / 1; display: flex; flex-direction: column; gap: 22px; transition: transform .7s var(--pl-ease), opacity .45s ease, visibility 0s linear .7s; }
.pl-view-lost { transform: translateX(60px); opacity: 0; visibility: hidden; pointer-events: none; }
.pl-card[data-view="lost"] .pl-view-login { transform: translateX(-60px); opacity: 0; visibility: hidden; pointer-events: none; }
.pl-card[data-view="lost"] .pl-view-lost { transform: none; opacity: 1; visibility: visible; pointer-events: auto; transition: transform .7s var(--pl-ease), opacity .55s ease .08s, visibility 0s; }
.pl-card[data-view="login"] .pl-view-login { transition: transform .7s var(--pl-ease), opacity .55s ease .08s, visibility 0s; }

.pl-title { margin: 0 0 4px; font-size: 30px; font-weight: 750; letter-spacing: -.02em; }
.pl-sub { margin: -10px 0 0; color: var(--pl-muted); font-size: 14px; line-height: 1.55; max-width: 40ch; }

.pl-field { display: block; position: relative; }
.pl-label { display: block; font-size: 12.5px; color: var(--pl-muted); margin-bottom: 4px; transition: color .25s ease; }
.pl-input-wrap { position: relative; display: flex; align-items: center; gap: 12px; border-bottom: 1px solid var(--pl-line); padding: 6px 0 10px; }
.pl-input-wrap::after { content: ""; position: absolute; left: 0; right: 0; bottom: -1px; height: 2px; background: var(--pl-text); transform: scaleX(0); transform-origin: left; transition: transform .55s var(--pl-ease); border-radius: 2px; box-shadow: 0 0 12px rgba(255, 255, 255, .45); }
.pl-field:focus-within .pl-input-wrap::after { transform: scaleX(1); }
.pl-field:focus-within .pl-label { color: var(--pl-text); }
.pl-ico { width: 19px; height: 19px; flex: 0 0 19px; fill: none; stroke: var(--pl-muted); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; transition: stroke .25s ease; }
.pl-field:focus-within .pl-ico { stroke: var(--pl-text); }
.pl-input-wrap input { flex: 1 1 auto; min-width: 0; border: 0; outline: 0; background: transparent; color: var(--pl-text); font: inherit; font-size: 16px; padding: 4px 0; }
.pl-input-wrap input:-webkit-autofill { -webkit-text-fill-color: var(--pl-text); transition: background-color 9999s ease 0s; caret-color: var(--pl-text); }
.pl-eye { border: 0; background: transparent; padding: 4px; cursor: pointer; border-radius: 8px; display: grid; place-items: center; }
.pl-eye svg { width: 19px; height: 19px; fill: none; stroke: var(--pl-muted); stroke-width: 1.6; }
.pl-eye[aria-pressed="true"] svg { stroke: var(--pl-text); }
.pl-eye:focus-visible { outline: 2px solid var(--pl-text); outline-offset: 2px; }
.pl-hp { position: absolute !important; left: -9999px !important; width: 1px; height: 1px; opacity: 0; }

.pl-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; flex-wrap: wrap; margin-top: -4px; }
.pl-check { position: relative; display: inline-flex; align-items: center; gap: 9px; font-size: 13.5px; color: var(--pl-muted); cursor: pointer; user-select: none; }
.pl-check input { position: absolute; opacity: 0; width: 1px; height: 1px; }
.pl-check span { width: 18px; height: 18px; border-radius: 6px; border: 1px solid var(--pl-line-strong); display: grid; place-items: center; transition: background .2s ease, border-color .2s ease; }
.pl-check span::after { content: ""; width: 9px; height: 5px; border-left: 2px solid var(--pl-btn-text); border-bottom: 2px solid var(--pl-btn-text); transform: rotate(-45deg) translate(1px, -1px) scale(0); transition: transform .25s var(--pl-ease); }
.pl-check input:checked + span { background: var(--pl-btn); border-color: var(--pl-btn); }
.pl-check input:checked + span::after { transform: rotate(-45deg) translate(1px, -1px) scale(1); }
.pl-check input:focus-visible + span { outline: 2px solid var(--pl-text); outline-offset: 2px; }
.pl-link { border: 0; background: none; padding: 0; color: var(--pl-text); font: inherit; font-size: 13.5px; cursor: pointer; text-decoration: underline; text-decoration-color: rgba(255, 255, 255, .35); text-underline-offset: 4px; transition: text-decoration-color .2s ease; }
.pl-link:hover { text-decoration-color: currentColor; }
.pl-link:focus-visible { outline: 2px solid var(--pl-text); outline-offset: 3px; border-radius: 4px; }
.pl-back { align-self: center; margin-top: -4px; }

/* Meldungen */
.pl-notice, .pl-error, .pl-success { font-size: 13.5px; line-height: 1.45; padding: 10px 14px; border-radius: 12px; border: 1px solid; }
.pl-notice { background: rgba(255, 255, 255, .08); border-color: rgba(255, 255, 255, .18); color: var(--pl-text); }
.pl-error { background: color-mix(in srgb, var(--pl-err, #ff7878) 12%, transparent); border-color: color-mix(in srgb, var(--pl-err, #ff7878) 35%, transparent); color: color-mix(in srgb, var(--pl-err, #ff7878) 30%, #fff); }
.pl-success { background: color-mix(in srgb, var(--pl-ok, #6ee7a0) 12%, transparent); border-color: color-mix(in srgb, var(--pl-ok, #6ee7a0) 35%, transparent); color: #d6ffe7; }
[hidden] { display: none !important; }

/* Button mit Glanz */
.pl-btn {
    position: relative; overflow: hidden;
    height: 54px; border-radius: 999px; border: 1px solid rgba(255, 255, 255, .6);
    background: var(--pl-btn); color: var(--pl-btn-text);
    font: inherit; font-size: 16px; font-weight: 650; letter-spacing: .01em;
    cursor: pointer; margin-top: 6px;
    box-shadow: 0 14px 34px -14px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .7);
    transition: transform .25s var(--pl-ease), box-shadow .3s ease, filter .3s ease;
}
.pl-btn::before {
    content: ""; position: absolute; top: 0; bottom: 0; width: 45%; left: -60%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .7), transparent);
    transform: skewX(-18deg); transition: left .8s var(--pl-ease);
}
.pl-btn:hover::before { left: 120%; }
.pl-btn:hover { transform: translateY(-1px); box-shadow: 0 20px 40px -14px rgba(0, 0, 0, .75), inset 0 1px 0 rgba(255, 255, 255, .7); }
.pl-btn:active { transform: translateY(1px) scale(.99); }
.pl-btn:focus-visible { outline: 2px solid var(--pl-text); outline-offset: 4px; }
.pl-btn .pl-spinner { position: absolute; left: 50%; top: 50%; width: 20px; height: 20px; margin: -10px 0 0 -10px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; opacity: 0; }
.pl-btn.is-busy .pl-btn-label { opacity: 0; }
.pl-btn.is-busy .pl-spinner { opacity: 1; animation: pl-spin .7s linear infinite; }
.pl-btn.is-done .pl-btn-label { opacity: 1; }
@keyframes pl-spin { to { transform: rotate(360deg); } }

/* Rückmeldung: falsche Daten / Erfolg */
.pl-card.is-shake { animation: pl-shake .5s var(--pl-ease); }
@keyframes pl-shake { 0%, 100% { transform: none; } 20% { transform: translateX(-10px); } 40% { transform: translateX(8px); } 60% { transform: translateX(-5px); } 80% { transform: translateX(3px); } }
.pl-card.is-leaving { transition: transform .7s var(--pl-ease), opacity .6s ease, filter .6s ease; transform: scale(.97); opacity: 0; filter: blur(6px); }

/* Fußzeile */
.pl-footer { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px 18px; font-size: 12.5px; color: var(--pl-muted); opacity: .85; }
.pl-footer a { color: inherit; text-decoration: none; }
.pl-footer a:hover, .pl-footer a:focus-visible { color: var(--pl-text); text-decoration: underline; text-underline-offset: 3px; }

/* ---------- Kleine Bildschirme ---------- */
@media (max-width: 860px) {
    .pl-stage { padding: 16px 16px 18px; justify-content: flex-start; }
    .pl-card { grid-template-columns: 1fr; min-height: 0; margin-top: 4vh; }
    .pl-pane { padding: 30px 26px; }
    .pl-pane-brand { padding-bottom: 6px; }
    .pl-brand { position: static; margin: 0 0 26px; }
    .pl-pane-brand > .pl-headline, .pl-pane-brand > :last-child { margin-top: 0; margin-bottom: 0; }
    .pl-pane-brand > .pl-headline { margin-bottom: 12px; }
    .pl-logo { height: min(var(--pl-logo-h), 130px); }
    .pl-headline { font-size: 38px; margin-bottom: 12px; }
    .pl-help { display: none; }
    .pl-seam { display: none; }
    .pl-pane-form { padding-top: 22px; }
    .pl-pane-form::before { inset: 0; clip-path: none; background: linear-gradient(180deg, rgba(255, 255, 255, .05), rgba(255, 255, 255, .02)); border-top: 1px solid rgba(255, 255, 255, .12); }
    .pl-title { font-size: 25px; }
}

/* ---------- Bewegung reduzieren ---------- */
.pl-no-motion .pl-blob, .pl-no-motion .pl-card { animation: none !important; }
.pl-no-motion .pl-liquid { transition: none; }
@media (prefers-reduced-motion: reduce) {
    .pl-blob, .pl-card { animation: none !important; }
    .pl-liquid, .pl-view, .pl-btn, .pl-btn::before { transition: none !important; }
}

/* =====================================================================
   1.6.0 Demo: Knopf über dem Anmelden + Code-Fenster
   ===================================================================== */
.pl-demo-open {
    position: relative; overflow: hidden; align-self: flex-start; display: inline-flex; align-items: center; gap: 9px;
    margin: 0 0 -6px; padding: 8px 12px 8px 13px; border-radius: 999px; cursor: pointer;
    font: inherit; font-size: 13.5px; font-weight: 650; letter-spacing: .01em; color: var(--pl-text);
    background: linear-gradient(135deg, rgba(255, 255, 255, .14), rgba(255, 255, 255, .05));
    border: 1px solid rgba(255, 255, 255, .24);
    box-shadow: 0 10px 24px -14px rgba(0, 0, 0, .7), inset 0 1px 0 rgba(255, 255, 255, .22);
    -webkit-backdrop-filter: blur(12px); backdrop-filter: blur(12px);
    transition: transform .3s var(--pl-ease), border-color .3s ease, background .3s ease;
}
.pl-demo-open::before {
    content: ""; position: absolute; top: 0; bottom: 0; width: 40%; left: -60%;
    background: linear-gradient(100deg, transparent, rgba(255, 255, 255, .35), transparent);
    transform: skewX(-18deg); transition: left .9s var(--pl-ease);
}
.pl-demo-open:hover::before, .pl-demo-open:focus-visible::before { left: 130%; }
.pl-demo-open:hover { transform: translateY(-1px); border-color: rgba(255, 255, 255, .42); }
.pl-demo-open:focus-visible { outline: 2px solid var(--pl-text); outline-offset: 3px; }
.pl-demo-open svg { width: 15px; height: 15px; fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; opacity: .75; transition: transform .35s var(--pl-ease); }
.pl-demo-open:hover svg { transform: translateX(3px); }
.pl-demo-dot { position: relative; width: 8px; height: 8px; border-radius: 50%; background: var(--pl-ok, #6ee7a0); box-shadow: 0 0 10px var(--pl-ok, #6ee7a0); flex: 0 0 8px; }
.pl-demo-dot::after { content: ""; position: absolute; inset: -4px; border-radius: 50%; border: 1px solid var(--pl-ok, #6ee7a0); opacity: 0; animation: pl-demo-ping 2.4s var(--pl-ease) infinite; }
@keyframes pl-demo-ping { 0% { transform: scale(.5); opacity: .9; } 80%, 100% { transform: scale(1.8); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { .pl-demo-dot::after { animation: none !important; } }
.pl-no-motion .pl-demo-dot::after { animation: none; }
