.auth-body { min-height: 100vh; display: flex; align-items: center; justify-content: center; background: var(--bg); }
.auth-card { width: 100%; max-width: 380px; margin: 24px; padding: 36px 32px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); box-shadow: var(--shadow); text-align: center; }
/* Logo mit heller Schrift: steht in beiden Designs auf einem dunkelblauen Band oben in der Karte */
.auth-card { overflow: hidden; }
.auth-logo { display: block; box-sizing: border-box; width: calc(100% + 64px); height: 82px; margin: -36px -32px 22px; padding: 22px 56px; background: #1d2d3e; object-fit: contain; }
.auth-card .wordmark { margin-bottom: 14px; }
.auth-card h1 { margin: 0; font-size: 20px; font-weight: 700; color: var(--sap-dark); }
.auth-card .subtitle { margin: 4px 0 24px; color: var(--text-muted); font-size: 13px; opacity: 1; }
.auth-form { text-align: left; }
.auth-form label { margin-top: 12px; }
.auth-form .btn { width: 100%; margin-top: 20px; padding: 11px 18px; }
.auth-form .btn-secondary { margin-top: 8px; }
.auth-hinweis { font-size: 13.5px; color: var(--text); margin: 0 0 6px; text-align: left; }
.auth-klein { font-size: 12px; color: var(--text-muted); margin: 12px 0 0; text-align: left; }
.auth-link { margin: 18px 0 0; font-size: 13px; }
.auth-link a { color: var(--sap-blue); }
.auth-card .err, .auth-card .ok-msg { margin-top: 14px; text-align: left; }
.ok-msg { background: var(--ok-bg); color: var(--ok-fg); border-radius: 6px; padding: 9px 12px; font-size: 13.5px; }
.mfa-wahl { display: grid; gap: 8px; margin: 6px 0 4px; }
.mfa-karte { text-align: left; background: var(--surface); color: var(--text); border: 1px solid var(--border); border-radius: 8px; padding: 10px 12px; cursor: pointer; display: grid; gap: 3px; font: inherit; }
.mfa-karte span { font-size: 12.5px; color: var(--text-muted); }
.mfa-karte.ist-gewaehlt { border-color: var(--sap-blue); box-shadow: 0 0 0 1px var(--sap-blue) inset; }
.mfa-qr { display: flex; justify-content: center; margin: 10px 0; }
.mfa-qr svg { background: #fff; padding: 6px; border-radius: 6px; }
.codes-liste { font-family: Consolas, monospace; font-size: 14px; columns: 2; margin: 8px 0 4px; padding-left: 22px; }

/* ====================================================================== Anmeldeseite, neuer Auftritt ======================================================================
   Links die Marke auf bewegtem Hintergrund mit schwebenden Glas-Karten, rechts die Anmeldung als Glas-Karte.
   Alles reines CSS (keine Bibliothek); wer «Bewegung reduzieren» eingestellt hat, sieht ein ruhiges Bild. */
.auth-neu { --a-navy: #0f1c2b; --a-blau: var(--sd-akzent, var(--sd-akzent, #0a6ed1)); --a-eis: var(--sd-akzent-hell, var(--sd-akzent-hell, #6cc4ff)); display: block; background: var(--a-navy); overflow-x: hidden; }
.auth-hintergrund { position: fixed; inset: 0; overflow: hidden; background: radial-gradient(120% 90% at 0% 0%, #17324d 0%, #0f1c2b 55%, #0a1420 100%); z-index: 0; }
.auth-licht { position: absolute; border-radius: 50%; filter: blur(70px); opacity: .55; will-change: transform; }
.auth-licht.l1 { width: 46vmax; height: 46vmax; left: -12vmax; top: -14vmax; background: var(--sd-akzent, var(--sd-akzent, #0a6ed1)); animation: a-treiben1 22s ease-in-out infinite alternate; }
.auth-licht.l2 { width: 38vmax; height: 38vmax; left: 22vmax; bottom: -18vmax; background: #23b6c9; opacity: .38; animation: a-treiben2 27s ease-in-out infinite alternate; }
.auth-licht.l3 { width: 30vmax; height: 30vmax; right: -8vmax; top: 10vmax; background: #6a5cf0; opacity: .32; animation: a-treiben3 31s ease-in-out infinite alternate; }
.auth-raster { position: absolute; inset: 0; background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 44px 44px; mask-image: radial-gradient(70% 70% at 30% 40%, #000 0%, transparent 100%); -webkit-mask-image: radial-gradient(70% 70% at 30% 40%, #000 0%, transparent 100%); }
@keyframes a-treiben1 { to { transform: translate(9vmax, 7vmax) scale(1.12); } }
@keyframes a-treiben2 { to { transform: translate(-8vmax, -9vmax) scale(1.18); } }
@keyframes a-treiben3 { to { transform: translate(-10vmax, 8vmax) scale(.9); } }

.auth-seite { position: relative; z-index: 1; min-height: 100vh; min-height: 100dvh; display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(380px, .85fr); }
.auth-bild { position: relative; display: flex; flex-direction: column; padding: clamp(28px, 4.5vw, 64px); color: #fff; min-width: 0; }
.auth-marke { height: 38px; width: auto; align-self: flex-start; animation: a-herein .7s cubic-bezier(.2,.8,.2,1) both; }
.auth-bild .wordmark { color: #fff; font-size: 22px; font-weight: 700; }
.auth-botschaft { margin: auto 0; max-width: 560px; padding: 40px 0; animation: a-herein .8s .08s cubic-bezier(.2,.8,.2,1) both; }
.auth-botschaft h2 { margin: 0 0 16px; font-size: clamp(32px, 4.2vw, 56px); line-height: 1.06; font-weight: 700; letter-spacing: -.02em; color: #fff; }
.auth-botschaft h2 em { font-style: normal; background: linear-gradient(90deg, var(--sd-akzent-hell, var(--sd-akzent-hell, #6cc4ff)), #9be7f0 55%, #b9b2ff); -webkit-background-clip: text; background-clip: text; color: transparent; }
.auth-botschaft p { margin: 0 0 26px; font-size: clamp(15px, 1.25vw, 17.5px); line-height: 1.55; color: rgba(255,255,255,.78); max-width: 480px; }
.auth-punkte { list-style: none; margin: 0; padding: 0; display: grid; gap: 12px; }
.auth-punkte li { display: flex; align-items: center; gap: 12px; font-size: 14.5px; color: rgba(255,255,255,.9); }
.auth-punkte svg { width: 24px; height: 24px; flex-shrink: 0; padding: 4px; box-sizing: border-box; border-radius: 50%; background: rgba(var(--sd-hell-rgb, 108,196,255),.18); fill: none; stroke: var(--sd-akzent-hell, var(--sd-akzent-hell, #6cc4ff)); stroke-width: 2.6; stroke-linecap: round; stroke-linejoin: round; }
.auth-fuss { margin: 0; font-size: 12px; color: rgba(255,255,255,.5); }

/* Schwebende Glas-Karten */
.auth-zier { position: absolute; right: clamp(-20px, 1vw, 30px); top: 12%; width: 330px; height: 70%; pointer-events: none; perspective: 1100px; perspective-origin: 40% 45%; }
.auth-buehne { position: absolute; inset: 0; transform-style: preserve-3d; transform: rotateX(calc(8deg + var(--by, 0deg))) rotateY(calc(-16deg + var(--bx, 0deg))); transition: transform .35s cubic-bezier(.2,.8,.2,1); }
.auth-glas { position: absolute; border: 1px solid rgba(255,255,255,.2); border-radius: 18px; background: linear-gradient(140deg, rgba(255,255,255,.16), rgba(255,255,255,.05));
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); box-shadow: 0 24px 60px rgba(0,0,0,.35), inset 0 1px 0 rgba(255,255,255,.25); padding: 16px; display: flex; gap: 12px; align-items: center; }
.auth-glas.g1 { right: 0; top: 2%; width: 220px; --z: 90px; animation: a-schweben 7s ease-in-out infinite alternate; }
.auth-glas.g2 { right: 70px; bottom: 4%; width: 200px; flex-wrap: wrap; --z: 150px; animation: a-schweben 9s -3s ease-in-out infinite alternate-reverse; }
.auth-glas.g3 { left: 0; top: 30%; width: 170px; --z: -80px; opacity: .8; animation: a-schweben 11s -5s ease-in-out infinite alternate; }
.z-haken { width: 34px; height: 34px; border-radius: 50%; flex-shrink: 0; display: grid; place-items: center; background: rgba(63,180,106,.25); }
.z-haken svg { width: 18px; height: 18px; fill: none; stroke: #7be3a2; stroke-width: 2.8; stroke-linecap: round; stroke-linejoin: round; }
.z-ring { width: 46px; height: 46px; border-radius: 50%; flex-shrink: 0; background: conic-gradient(var(--sd-akzent-hell, var(--sd-akzent-hell, #6cc4ff)) 0 78%, rgba(255,255,255,.18) 78% 100%);
  -webkit-mask: radial-gradient(circle, transparent 54%, #000 56%); mask: radial-gradient(circle, transparent 54%, #000 56%); }
.z-punkt { width: 30px; height: 30px; border-radius: 9px; flex-shrink: 0; background: linear-gradient(135deg, var(--sd-akzent-hell, var(--sd-akzent-hell, #6cc4ff)), #6a5cf0); }
.z-zeilen { display: grid; gap: 7px; flex: 1; min-width: 0; }
.z-zeilen i { display: block; height: 7px; border-radius: 4px; background: rgba(255,255,255,.38); }
.z-zeilen i:nth-child(2) { width: 70%; background: rgba(255,255,255,.22); } .z-zeilen i:nth-child(3) { width: 45%; background: rgba(255,255,255,.16); }
.z-balken { display: flex; align-items: flex-end; gap: 6px; width: 100%; height: 46px; margin-top: 4px; }
.z-balken i { flex: 1; border-radius: 4px 4px 2px 2px; background: linear-gradient(180deg, var(--sd-akzent-hell, var(--sd-akzent-hell, #6cc4ff)), rgba(var(--sd-hell-rgb, 108,196,255),.25)); transform-origin: bottom; animation: a-wachsen 1.1s cubic-bezier(.2,.8,.2,1) both; }
.z-balken i:nth-child(1) { height: 38%; animation-delay: .35s; } .z-balken i:nth-child(2) { height: 62%; animation-delay: .43s; } .z-balken i:nth-child(3) { height: 48%; animation-delay: .51s; }
.z-balken i:nth-child(4) { height: 84%; animation-delay: .59s; } .z-balken i:nth-child(5) { height: 100%; animation-delay: .67s; }
@keyframes a-schweben { from { transform: translate3d(0, -10px, var(--z, 0px)) rotateX(4deg) rotateY(-5deg); } to { transform: translate3d(0, 12px, calc(var(--z, 0px) + 30px)) rotateX(-3deg) rotateY(6deg); } }
@keyframes a-wachsen { from { transform: scaleY(0); } }
@keyframes a-herein { from { opacity: 0; transform: translateY(18px); } }

/* Würfel aus Glas: sechs Flächen im Raum, dreht sich langsam um zwei Achsen */
.auth-wuerfel { position: absolute; left: 34%; top: 40%; width: 112px; height: 112px; transform-style: preserve-3d; transform: translateZ(40px); }
.w-koerper { position: absolute; inset: 0; transform-style: preserve-3d; animation: a-drehen 18s linear infinite; }
.w-seite { position: absolute; inset: 0; border-radius: 16px; border: 1px solid rgba(255,255,255,.3); display: grid; place-items: center;
  background: linear-gradient(140deg, rgba(var(--sd-hell-rgb, 108,196,255),.34), rgba(106,92,240,.16)); box-shadow: inset 0 0 26px rgba(var(--sd-hell-rgb, 108,196,255),.28), inset 0 1px 0 rgba(255,255,255,.35); }
.w-seite img { width: 56%; height: 56%; object-fit: contain; filter: drop-shadow(0 4px 10px rgba(0,0,0,.35)); }
.w-seite.s1 { transform: translateZ(56px); } .w-seite.s2 { transform: rotateY(90deg) translateZ(56px); } .w-seite.s3 { transform: rotateY(180deg) translateZ(56px); }
.w-seite.s4 { transform: rotateY(-90deg) translateZ(56px); } .w-seite.s5 { transform: rotateX(90deg) translateZ(56px); } .w-seite.s6 { transform: rotateX(-90deg) translateZ(56px); }
.w-schatten { position: absolute; left: -10%; right: -10%; bottom: -70px; height: 26px; border-radius: 50%; background: rgba(0,0,0,.45); filter: blur(14px); transform: rotateX(80deg); animation: a-schatten 9s ease-in-out infinite alternate; }
@keyframes a-drehen { from { transform: rotateX(-18deg) rotateY(0deg); } 50% { transform: rotateX(14deg) rotateY(180deg); } to { transform: rotateX(-18deg) rotateY(360deg); } }
@keyframes a-schatten { from { opacity: .55; transform: rotateX(80deg) scale(.9); } to { opacity: .85; transform: rotateX(80deg) scale(1.1); } }

/* Rechts: die Anmeldung als Glas-Karte – sie kippt im Raum zur Maus hin, ein Glanz läuft mit */
.auth-haupt { display: flex; align-items: center; justify-content: center; padding: clamp(18px, 3vw, 48px); min-width: 0; perspective: 1300px; }
.auth-kipp { width: 100%; max-width: 420px; transform-style: preserve-3d; transform: rotateX(var(--kx, 0deg)) rotateY(var(--ky, 0deg)); transition: transform .28s cubic-bezier(.2,.8,.2,1);
  animation: a-karte3d .95s .08s cubic-bezier(.2,.8,.2,1) both; }
@keyframes a-karte3d { from { opacity: 0; transform: translate3d(0, 46px, -260px) rotateX(-24deg) rotateY(14deg); } }
.auth-glanz { position: absolute; inset: 0; z-index: 1; pointer-events: none; border-radius: inherit; opacity: .9;
  background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, -20%), rgba(255,255,255,.22), transparent 60%); mix-blend-mode: soft-light; }
[data-theme="dark"] .auth-glanz { background: radial-gradient(420px circle at var(--gx, 50%) var(--gy, -20%), rgba(var(--sd-hell-rgb, 108,196,255),.20), transparent 60%); mix-blend-mode: screen; }
.auth-neu .auth-card > *:not(.auth-glanz):not(.auth-erfolg) { position: relative; z-index: 2; }
/* Erfolg in 3D: die Karte dreht sich einmal um die eigene Achse und fliegt dann auf den Betrachter zu */
.auth-kipp.ist-fertig { animation: a-flug 1.2s cubic-bezier(.3,.1,.2,1) forwards; }
@keyframes a-flug { 0% { transform: none; opacity: 1; } 45% { transform: rotateY(360deg) scale(1.02); opacity: 1; } 62% { transform: rotateY(360deg) scale(1.02); opacity: 1; }
  100% { transform: rotateY(360deg) translate3d(0, -10px, 520px) scale(1.25); opacity: 0; } }
.auth-neu .auth-card { position: relative; max-width: none; width: auto; margin: 0; padding: 38px 36px 30px; text-align: left; border-radius: 22px; border: 1px solid rgba(255,255,255,.55);
  background: rgba(255,255,255,.9); -webkit-backdrop-filter: blur(22px) saturate(1.3); backdrop-filter: blur(22px) saturate(1.3);
  box-shadow: 0 30px 80px rgba(3,12,24,.45), 0 2px 0 rgba(255,255,255,.6) inset; overflow: hidden; }
[data-theme="dark"] .auth-neu .auth-card { background: rgba(24,32,42,.82); border-color: rgba(255,255,255,.12); box-shadow: 0 30px 80px rgba(0,0,0,.6), 0 1px 0 rgba(255,255,255,.08) inset; }
@keyframes a-karte { from { opacity: 0; transform: translateY(26px) scale(.975); } }
.auth-neu .auth-card h1 { font-size: 25px; letter-spacing: -.01em; }
.auth-neu .auth-card .subtitle { margin: 6px 0 22px; font-size: 14px; }
.auth-neu .auth-form label { font-size: 12.5px; font-weight: 600; margin-top: 14px; }
.auth-neu .auth-form input { height: 46px; padding: 0 14px; border-radius: 11px; font-size: 15px; background: var(--surface); transition: border-color .18s, box-shadow .18s, transform .18s; }
.auth-neu .auth-form input:hover { border-color: #9db7d1; }
.auth-neu .auth-form input:focus { outline: none; border-color: var(--sap-blue); box-shadow: 0 0 0 4px rgba(var(--sd-akzent-rgb, 10,110,209),.18); }
.auth-neu .auth-form .btn { height: 46px; margin-top: 22px; padding: 0 18px; border-radius: 11px; font-size: 15px; font-weight: 600; transition: transform .16s, box-shadow .2s, filter .2s; }
.auth-neu .auth-form .btn:not(.btn-secondary) { border: none; color: #fff; background: linear-gradient(135deg, var(--sd-akzent, var(--sd-akzent, #0a6ed1)), var(--sd-akzent, var(--sd-akzent, #1890e8)) 55%, #23b6c9); background-size: 160% 100%; box-shadow: 0 10px 24px rgba(var(--sd-akzent-rgb, 10,110,209),.35); }
.auth-neu .auth-form .btn:not(.btn-secondary):hover { transform: translateY(-1px); box-shadow: 0 14px 30px rgba(var(--sd-akzent-rgb, 10,110,209),.45); background-position: 100% 0; }
.auth-neu .auth-form .btn:active { transform: translateY(0) scale(.985); }
.auth-neu .auth-form .btn:disabled { filter: saturate(.5); opacity: .75; transform: none; }
.auth-neu .auth-form .btn-secondary { margin-top: 10px; height: 42px; }
.auth-neu .btn-ms { display: flex; align-items: center; justify-content: center; gap: 10px; height: 46px; border-radius: 11px; font-weight: 600; transition: transform .16s, box-shadow .2s, border-color .2s; }
.auth-neu .btn-ms:hover { transform: translateY(-1px); box-shadow: 0 8px 20px rgba(3,12,24,.14); }
.auth-neu .auth-link { text-align: center; }
.auth-neu .mfa-karte { border-radius: 12px; transition: border-color .18s, box-shadow .18s, transform .18s; }
.auth-neu .mfa-karte:hover { transform: translateY(-1px); }
.auth-neu .auth-card .err { border-radius: 10px; animation: a-ruetteln .38s; }
@keyframes a-ruetteln { 20% { transform: translateX(-6px); } 45% { transform: translateX(5px); } 70% { transform: translateX(-3px); } 100% { transform: none; } }

/* Erfolg: Haken zeichnet sich, die Karte gibt den Blick frei */
.auth-erfolg { position: absolute; inset: 0; z-index: 2; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; text-align: center;
  background: inherit; -webkit-backdrop-filter: blur(22px); backdrop-filter: blur(22px); animation: a-einblenden .25s both; }
.auth-erfolg[hidden] { display: none; }
.auth-erfolg svg { width: 76px; height: 76px; margin-bottom: 8px; fill: none; stroke: var(--ok); stroke-width: 3.2; stroke-linecap: round; stroke-linejoin: round; }
.auth-erfolg circle { stroke-dasharray: 145; stroke-dashoffset: 145; animation: a-zeichnen .5s .05s ease-out forwards; }
.auth-erfolg path { stroke-dasharray: 36; stroke-dashoffset: 36; animation: a-zeichnen .3s .42s ease-out forwards; }
.auth-erfolg b { font-size: 18px; color: var(--sap-dark); }
.auth-erfolg span { font-size: 13px; color: var(--text-muted); }
@keyframes a-zeichnen { to { stroke-dashoffset: 0; } }
@keyframes a-einblenden { from { opacity: 0; } }
body.ist-fertig .auth-bild { transition: opacity .6s .3s, transform .6s .3s; opacity: 0; transform: translateX(-24px); }

/* Schmale Fenster und Handy: die Marke wird zum Kopf, die Karte füllt die Breite */
@media (max-width: 980px) {
  .auth-seite { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; }
  .auth-bild { padding: 26px 22px 6px; }
  .auth-botschaft { margin: 22px 0 0; padding: 0; }
  .auth-botschaft h2 { font-size: clamp(28px, 7.4vw, 40px); margin-bottom: 10px; }
  .auth-botschaft p { margin-bottom: 0; font-size: 14.5px; }
  .auth-punkte, .auth-zier, .auth-fuss { display: none; }
  .auth-haupt { align-items: flex-start; padding: 22px 16px 28px; }
  .auth-kipp { max-width: 520px; }
  .auth-neu .auth-card { padding: 28px 22px 24px; border-radius: 20px; }
  .auth-neu .auth-form input { font-size: 16px; }
}
@media (max-height: 640px) and (min-width: 981px) { .auth-zier { display: none; } .auth-botschaft { padding: 16px 0; } }

@media (prefers-reduced-motion: reduce) {
  .auth-licht, .auth-glas, .z-balken i, .auth-marke, .auth-botschaft, .auth-kipp, .w-koerper, .w-schatten, .auth-card .err, .auth-erfolg, .auth-erfolg circle, .auth-erfolg path { animation: none !important; }
  .auth-glas { transform: translateZ(var(--z, 0px)); } .w-koerper { transform: rotateX(-18deg) rotateY(32deg); } .auth-buehne, .auth-kipp { transition: none; }
  .auth-erfolg circle, .auth-erfolg path { stroke-dashoffset: 0; }
  .auth-neu .auth-form .btn, .auth-neu .btn-ms, .auth-neu .mfa-karte, .auth-neu .auth-form input { transition: none; }
}
@media (forced-colors: active) { .auth-hintergrund, .auth-zier { display: none; } .auth-neu .auth-card { border: 1px solid CanvasText; } }

/* Mittlere Breiten: die 3D-Bühne kleiner und ganz rechts, damit sie den Text nicht überdeckt */
@media (min-width: 981px) and (max-width: 1520px) {
  .auth-zier { transform: scale(.66); transform-origin: right center; right: -6px; }
  .auth-botschaft { max-width: 430px; }
  .auth-botschaft h2 { font-size: clamp(30px, 3.3vw, 46px); }
}
@media (min-width: 981px) and (max-width: 1180px) { .auth-zier { display: none; } }
