/* ============================================================================
   LiveSalePro — Anmeldeseiten (Web-App + PWA), seit 02.11.2026
   Glas-Karte mit ruhiger 3D-Animation (User 02.11.: kein Drehen, „cool, aber nicht overloaded“): beim Absenden hebt
   sich die Karte leicht ab und kippt minimal nach hinten, ein Lichtschimmer laeuft einmal ueber das Glas, der Inhalt
   blendet in die Status-Anzeige ueber. Erfolg: Karte setzt sanft zurueck, Haken zeichnet sich. Fehler: kurzes Wackeln, X.
   Tokens kommen aus lsp.css bzw. lsp-pwa.css.
   ============================================================================ */
.lg-login-wrap { min-height: 100vh; min-height: 100dvh; display: flex; align-items: center; justify-content: center; padding: 24px 16px; }
.lg-login-szene { width: 100%; max-width: 420px; perspective: 1200px; }
.lg-login-karte { position: relative; width: 100%; transform-origin: 50% 60%; transform-style: preserve-3d; will-change: transform; transition: transform .6s cubic-bezier(.2,.8,.2,1); }
.lg-login-karte.prueft { transform: rotateX(7deg) translateZ(34px) scale(1.02); }
.lg-login-karte.ergebnis { transform: rotateX(0) translateZ(0) scale(1); }
.lg-login-karte.ergebnis.ok { animation: lgSetzen .7s cubic-bezier(.2,.9,.3,1.25); }
.lg-login-karte.ergebnis.fehler { animation: lgWackeln3d .55s ease; }
/* Lichtschimmer, laeuft einmal beim Pruefen ueber das Glas */
.lg-login-karte::after {
  content: ''; position: absolute; inset: 0; border-radius: 26px; pointer-events: none; overflow: hidden; opacity: 0;
  background: linear-gradient(105deg, rgba(255,255,255,0) 30%, rgba(255,255,255,.35) 50%, rgba(255,255,255,0) 70%);
  background-size: 250% 100%; background-position: 120% 0;
}
.lg-login-karte.prueft::after { opacity: 1; animation: lgSchimmer 1.4s ease-in-out .15s 1 both; }
@keyframes lgSchimmer { from { background-position: 120% 0; } to { background-position: -40% 0; } }
@keyframes lgSetzen { 0% { transform: rotateX(7deg) translateZ(34px) scale(1.02); } 60% { transform: rotateX(-2deg) translateZ(-6px) scale(.995); } 100% { transform: none; } }
@keyframes lgWackeln3d { 0%,100% { transform: rotateY(0); } 20% { transform: rotateY(-5deg); } 40% { transform: rotateY(5deg); } 60% { transform: rotateY(-3deg); } 80% { transform: rotateY(3deg); } }
.lg-login-karte .vorne { transition: opacity .35s ease, filter .35s ease; }
.lg-login-karte.prueft .vorne { opacity: 0; filter: blur(6px); pointer-events: none; }
.lg-login-karte.prueft .hinten, .lg-login-karte.ergebnis .hinten { opacity: 1; }
.lg-login-karte.ergebnis .vorne { opacity: 0; pointer-events: none; }
.lg-login-face {
  background: var(--glass-1-bg);
  -webkit-backdrop-filter: blur(22px) saturate(140%); backdrop-filter: blur(22px) saturate(140%);
  border: 1px solid var(--glass-1-border);
  border-radius: 26px;
  box-shadow: inset 0 1px 0 var(--glass-hi), var(--glass-shadow);
  padding: 34px 30px 28px;
  color: var(--text);
}
.lg-login-face.hinten { position: absolute; inset: 0; display: flex; align-items: center; justify-content: center; opacity: 0; transition: opacity .35s ease; pointer-events: none; }
body.lsp-foto .lg-login-face { background: linear-gradient(160deg, rgba(255,255,255,.62) 0%, rgba(255,255,255,.44) 100%); }
html[data-theme="dark"] body.lsp-foto .lg-login-face { background: linear-gradient(160deg, rgba(26,20,34,.80) 0%, rgba(26,20,34,.64) 100%); }
html[data-theme="dark"] .lg-login-face { background: linear-gradient(160deg, rgba(255,255,255,.12) 0%, rgba(255,255,255,.06) 100%); }

.lg-login-logo { display: flex; justify-content: center; align-items: center; gap: 10px; margin-bottom: 14px; }
.lg-login-logo img { height: 44px; width: auto; }
.lg-login-titel { text-align: center; font-size: 22px; font-weight: 800; letter-spacing: -.01em; color: var(--text); margin: 0 0 4px; }
.lg-login-sub { text-align: center; font-size: 13.5px; font-weight: 600; color: var(--text-2); margin: 0 0 22px; }
.lg-login-feld { margin-bottom: 12px; }
.lg-login-feld input {
  width: 100%; box-sizing: border-box; font: inherit; font-size: 16px; font-weight: 600; color: var(--text);
  background: var(--surface-2); border: 1px solid var(--glass-3-border); border-radius: 14px; padding: 13px 16px; outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.lg-login-feld input:focus { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-ring); }
/* Chrome-Autofill: der Browser malt das Feld hell, die Schrift blieb weiss (Dunkelmodus) -> Text unsichtbar (Bug 02.11.2026).
   Feste Fuellung per Innen-Schatten und feste Schriftfarbe, je Modus. */
.lg-login-feld input:-webkit-autofill, .lg-login-feld input:-webkit-autofill:hover, .lg-login-feld input:-webkit-autofill:focus {
  -webkit-text-fill-color: #1A0F22; caret-color: #1A0F22;
  -webkit-box-shadow: 0 0 0 1000px #F4EEF6 inset; box-shadow: 0 0 0 1000px #F4EEF6 inset;
  border-color: var(--glass-3-border);
}
html[data-theme="dark"] .lg-login-feld input:-webkit-autofill, html[data-theme="dark"] .lg-login-feld input:-webkit-autofill:hover, html[data-theme="dark"] .lg-login-feld input:-webkit-autofill:focus {
  -webkit-text-fill-color: #F7F2FA; caret-color: #F7F2FA;
  -webkit-box-shadow: 0 0 0 1000px #2A2234 inset; box-shadow: 0 0 0 1000px #2A2234 inset;
}
.lg-login-zeile { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin: 2px 0 16px; font-size: 13.5px; font-weight: 700; }
.lg-login-zeile label { display: flex; align-items: center; gap: 7px; color: var(--text-2); cursor: pointer; }
.lg-login-zeile a { color: var(--accent-strong, var(--accent)); text-decoration: none; }
.lg-login-btn {
  width: 100%; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  font: inherit; font-size: 16px; font-weight: 800; color: #fff; cursor: pointer;
  background: var(--lg-prim-bg); border: 1px solid rgba(255,255,255,.35); border-radius: 999px; padding: 14px 18px;
  box-shadow: inset 0 1px 0 rgba(255,255,255,.45), var(--lg-prim-shadow);
  transition: transform .14s, filter .18s;
}
.lg-login-btn:hover { filter: brightness(1.06); transform: translateY(-1px); }
.lg-login-btn:active { transform: scale(.985); }
.lg-login-btn:disabled { opacity: .6; cursor: default; transform: none; }
.lg-login-btn.sekundaer {
  color: var(--text); background: var(--lg-btn-bg); border: 1px solid var(--lg-btn-border);
  box-shadow: inset 0 1px 0 rgba(255,255,255,.7), var(--lg-btn-shadow); margin-top: 10px;
}
html[data-theme="dark"] .lg-login-btn.sekundaer { box-shadow: inset 0 1px 0 rgba(255,255,255,.14), var(--lg-btn-shadow); }
.lg-login-fehler {
  display: none; margin: 0 0 12px; padding: 10px 12px; border-radius: 12px; font-size: 13.5px; font-weight: 700;
  background: var(--bad-bg, #FADFE4); color: var(--bad-fg, #8E2C39); border: 1px solid var(--bad-fg, #8E2C39);
}
.lg-login-fehler.an { display: block; animation: lgWackeln .4s ease; }
.lg-login-hinweis { font-size: 12.5px; font-weight: 700; color: var(--text-2); text-align: center; margin-top: 16px; }
.lg-login-hinweis a { color: var(--accent-strong, var(--accent)); text-decoration: none; }
@keyframes lgWackeln { 0%,100% { transform: translateX(0); } 20% { transform: translateX(-6px); } 40% { transform: translateX(6px); } 60% { transform: translateX(-4px); } 80% { transform: translateX(4px); } }

/* Rueckseite: Status */
.lg-login-status { text-align: center; }
.lg-login-status .kreis { width: 96px; height: 96px; margin: 0 auto 14px; border-radius: 50%; display: grid; place-items: center; position: relative; }
.lg-login-status .kreis svg { width: 96px; height: 96px; position: absolute; inset: 0; }
.lg-login-status .kreis .ring { fill: none; stroke: var(--accent-strong, var(--accent)); stroke-width: 4; stroke-linecap: round; stroke-dasharray: 60 200; animation: lgDrehen 1s linear infinite; transform-origin: 50% 50%; }
.lg-login-status .zeichen { fill: none; stroke-width: 6; stroke-linecap: round; stroke-linejoin: round; stroke-dasharray: 120; stroke-dashoffset: 120; }
.lg-login-status .text { font-size: 16px; font-weight: 800; color: var(--text); }
.lg-login-status .sub { font-size: 13px; font-weight: 600; color: var(--text-2); margin-top: 4px; min-height: 1.2em; }
.lg-login-status[data-stand="laeuft"] .ring { display: block; }
.lg-login-status[data-stand="ok"] .ring, .lg-login-status[data-stand="fehler"] .ring { display: none; }
.lg-login-status[data-stand="ok"] .kreis { background: var(--ok-bg, #DCF0E5); box-shadow: 0 0 0 8px rgba(22,163,74,.12); animation: lgPop .35s cubic-bezier(.2,.9,.3,1.3); }
.lg-login-status[data-stand="ok"] .zeichen.haken { stroke: var(--ok-fg, #14603F); animation: lgZeichnen .45s .1s ease-out forwards; }
.lg-login-status[data-stand="fehler"] .kreis { background: var(--bad-bg, #FADFE4); box-shadow: 0 0 0 8px rgba(220,38,38,.12); animation: lgPop .35s cubic-bezier(.2,.9,.3,1.3); }
.lg-login-status[data-stand="fehler"] .zeichen.kreuz { stroke: var(--bad-fg, #8E2C39); animation: lgZeichnen .4s .1s ease-out forwards; }
.lg-login-status .zeichen.haken, .lg-login-status .zeichen.kreuz { opacity: 0; }
.lg-login-status[data-stand="ok"] .zeichen.haken, .lg-login-status[data-stand="fehler"] .zeichen.kreuz { opacity: 1; }
@keyframes lgDrehen { to { transform: rotate(360deg); } }
@keyframes lgZeichnen { to { stroke-dashoffset: 0; } }
@keyframes lgPop { from { transform: scale(.6); opacity: .4; } to { transform: scale(1); opacity: 1; } }
@media (prefers-reduced-motion: reduce) {
  .lg-login-karte { transform: none !important; animation: none !important; transition: none; }
  .lg-login-karte::after { animation: none; opacity: 0; }
  .lg-login-status .kreis, .lg-login-fehler.an { animation: none; }
}
