/* Design «Zukunft» - Anmeldeseiten (Login, Passwort vergessen, Passwort setzen)
   ---------------------------------------------------------------------------
   Nur für die Anmeldekarten. Alles hängt an body.zl, der Rest der Anwendung
   bleibt unberührt. Farben und Verlauf wie modernhosting.ch / Power Panel:
   Nachtblau, Violett, Cyan, Mint. Schriften lokal (SIL OFL, ../fonts/OFL-*.txt).

   Bewegung nur mit body.zl-motion (setzt zukunft-login.js, wenn erlaubt). Ohne
   JavaScript, bei «Bewegung reduzieren» und nach «Pause» steht alles still.
   Keine externen Ressourcen, kein Inline-Style: passt zur CSP der Anwendung. */

@font-face {
  font-family: 'Inter';
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url('../fonts/inter-latin.woff2') format('woff2');
}
@font-face {
  font-family: 'Rajdhani';
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url('../fonts/rajdhani-700-latin.woff2') format('woff2');
}
@property --zl-edge { syntax: '<angle>'; initial-value: 220deg; inherits: true; }

body.zl {
  --zl-bg: #070a13;
  --zl-violet: #a492ff;
  --zl-indigo: #6550db;
  --zl-cyan: #69e1f5;
  --zl-mint: #9af5d4;
  --zl-grad: linear-gradient(105deg, var(--zl-violet), var(--zl-cyan) 65%, var(--zl-mint));
  --zl-text: #eef3ff;
  --zl-lead: #c3cde0;
  --zl-muted: #a6b2ca;
  --zl-line: rgba(255, 255, 255, .12);
  --zl-field: rgba(4, 7, 14, .6);
  --zl-field-border: #6b7a99;
  --zl-focus: #69e1f5;
  --zl-title: 'Rajdhani', 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;
  --zl-font: 'Inter', system-ui, -apple-system, 'Segoe UI', Arial, sans-serif;

  color-scheme: dark;
  margin: 0;
  min-height: 100vh;
  min-height: 100dvh;
  background: var(--zl-bg);
  color: var(--zl-text);
  font-family: var(--zl-font);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
body.zl *, body.zl *::before, body.zl *::after { box-sizing: border-box; }

/* ---------- Himmel ---------- */
.zl-sky {
  position: fixed;
  inset: 0;
  z-index: 0;
  overflow: hidden;
  pointer-events: none;
  background:
    radial-gradient(ellipse 58% 78% at 84% 6%, rgba(52, 44, 130, .55), transparent 62%),
    radial-gradient(ellipse 46% 60% at 4% 100%, rgba(71, 206, 235, .10), transparent 66%),
    var(--zl-bg);
}
.zl-net { position: absolute; inset: 0; width: 100%; height: 100%; display: block; }
.zl-planet {
  --zl-pd: min(150vw, 2200px);
  position: absolute;
  left: 50%;
  bottom: calc(var(--zl-pd) * -.86);
  width: var(--zl-pd);
  height: var(--zl-pd);
  margin-left: calc(var(--zl-pd) / -2);
  border-radius: 50%;
  border-top: 1px solid rgba(154, 245, 212, .5);
  background: radial-gradient(circle at 50% 0, rgba(105, 225, 245, .18), rgba(26, 36, 72, .85) 4%, #04070e 12%);
  box-shadow: 0 -8px 60px -10px rgba(105, 225, 245, .22);
}
.zl-scanlines {
  position: absolute;
  inset: 0;
  opacity: .32;
  background: repeating-linear-gradient(0deg, transparent 0 3px, rgba(7, 10, 19, .55) 3px 4px);
}

/* ---------- Seite und Karte ---------- */
.zl-page {
  position: relative;
  z-index: 1;
  min-height: 100vh;
  min-height: 100dvh;
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 40px 20px 28px;
}
.zl-card {
  position: relative;
  isolation: isolate;
  width: 100%;
  max-width: 440px;
  padding: 34px 32px 28px;
  border-radius: 20px;
  background: linear-gradient(180deg, rgba(18, 27, 45, .9), rgba(10, 15, 27, .93));
  box-shadow: 0 30px 90px rgba(0, 0, 0, .5), 0 0 80px -30px rgba(113, 82, 218, .45), inset 0 1px 0 rgba(255, 255, 255, .06);
}
@supports ((-webkit-backdrop-filter: blur(16px)) or (backdrop-filter: blur(16px))) {
  .zl-card {
    background: linear-gradient(180deg, rgba(18, 27, 45, .8), rgba(10, 15, 27, .86));
    -webkit-backdrop-filter: blur(16px) saturate(1.2);
    backdrop-filter: blur(16px) saturate(1.2);
  }
}
/* Irisierender Rand; der helle Abschnitt folgt dem Zeiger (--zl-edge aus dem Skript). */
.zl-card::before {
  content: '';
  position: absolute;
  inset: -1px;
  z-index: -1;
  padding: 1px;
  border-radius: inherit;
  background: conic-gradient(from var(--zl-edge), rgba(255, 255, 255, .1), var(--zl-violet) 8%, var(--zl-cyan) 16%, var(--zl-mint) 21%, rgba(255, 255, 255, .1) 34%, rgba(255, 255, 255, .06) 70%, rgba(164, 146, 255, .35) 88%, rgba(255, 255, 255, .1));
  -webkit-mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  -webkit-mask-composite: xor;
  mask: linear-gradient(#fff 0 0) content-box, linear-gradient(#fff 0 0);
  mask-composite: exclude;
  pointer-events: none;
}
.zl-card::after {
  content: '';
  position: absolute;
  top: -1px;
  left: 28px;
  right: 28px;
  height: 1px;
  background: linear-gradient(90deg, transparent, rgba(105, 225, 245, .75), transparent);
  pointer-events: none;
}
/* Andock-Rahmen: vier Eckwinkel wie bei einer Zielerfassung. */
.zl-fx {
  position: absolute;
  inset: -12px;
  z-index: -2;
  pointer-events: none;
  --zl-corner: rgba(105, 225, 245, .7);
  opacity: .8;
  background:
    linear-gradient(var(--zl-corner), var(--zl-corner)) left top / 20px 1px no-repeat,
    linear-gradient(var(--zl-corner), var(--zl-corner)) left top / 1px 20px no-repeat,
    linear-gradient(var(--zl-corner), var(--zl-corner)) right top / 20px 1px no-repeat,
    linear-gradient(var(--zl-corner), var(--zl-corner)) right top / 1px 20px no-repeat,
    linear-gradient(var(--zl-corner), var(--zl-corner)) left bottom / 20px 1px no-repeat,
    linear-gradient(var(--zl-corner), var(--zl-corner)) left bottom / 1px 20px no-repeat,
    linear-gradient(var(--zl-corner), var(--zl-corner)) right bottom / 20px 1px no-repeat,
    linear-gradient(var(--zl-corner), var(--zl-corner)) right bottom / 1px 20px no-repeat;
}
.zl-scan {
  position: absolute;
  top: 12px;
  left: 24px;
  right: 24px;
  height: 2px;
  border-radius: 2px;
  background: linear-gradient(90deg, transparent, var(--zl-cyan), var(--zl-mint), transparent);
  box-shadow: 0 0 18px var(--zl-cyan);
  opacity: 0;
  pointer-events: none;
}

/* ---------- Rakete (klein, dekorativ) ---------- */
.zl-rocket {
  position: absolute;
  top: -40px;
  right: -6px;
  width: 54px;
  height: 100px;
  pointer-events: none;
  filter: drop-shadow(0 0 16px rgba(105, 225, 245, .3));
}
.zl-rocket svg { display: block; width: 100%; height: 100%; overflow: visible; }
.zl-stop-hull-dark { stop-color: #526584; }
.zl-stop-hull-light { stop-color: #eff8ff; }
.zl-stop-hull-mid { stop-color: #b6c8dc; }
.zl-stop-violet { stop-color: var(--zl-violet); }
.zl-stop-indigo { stop-color: var(--zl-indigo); }
.zl-stop-white { stop-color: #ffffff; }
.zl-stop-cyan { stop-color: var(--zl-cyan); }
.zl-stop-fade { stop-color: var(--zl-violet); stop-opacity: 0; }
.zl-stop-window { stop-color: #102d4d; }
.zl-r-seam, .zl-r-mark { fill: none; stroke: #526584; stroke-width: 2; }
.zl-r-frame { fill: #526584; stroke: #eff8ff; stroke-width: 3; }
.zl-r-glint { fill: none; stroke: #fff; stroke-width: 3; stroke-linecap: round; opacity: .65; }
.zl-r-center { fill: var(--zl-indigo); }
.zl-r-nozzle { fill: #526584; }
.zl-flame { transform-origin: 300px 350px; opacity: .8; }

/* ---------- Inhalt der Karte ---------- */
.zl-brand {
  display: flex;
  flex-direction: column;
  align-items: flex-start;
  gap: 6px;
  margin: 0 0 20px;
  padding-right: 44px;
}
.zl-brand-row { display: flex; align-items: flex-end; gap: 8px; }
.zl-brand img { display: block; height: 32px; width: auto; max-width: 100%; }
.zl-brand-suffix {
  font: 700 13px/1 var(--zl-font);
  letter-spacing: .08em;
  color: var(--zl-cyan);
  padding: 0 0 5px 8px;
  border-left: 1px solid var(--zl-line);
}
.zl-brand-name {
  font: 700 1.5rem/1 var(--zl-title);
  letter-spacing: .01em;
  color: var(--zl-text);
  text-decoration: none;
}
.zl-brand-name span { color: var(--zl-cyan); }
.zl-claim {
  margin: 0;
  font-size: 12.5px;
  font-weight: 600;
  letter-spacing: .02em;
  color: var(--zl-muted);
}
.zl-title {
  margin: 0 0 6px;
  font: 700 clamp(2rem, 8vw, 2.6rem)/1.05 var(--zl-title);
  letter-spacing: -.005em;
  color: var(--zl-text);
  background: var(--zl-grad);
  -webkit-background-clip: text;
  background-clip: text;
  -webkit-text-fill-color: transparent;
  color: transparent;
  width: fit-content;
  max-width: 100%;
}
.zl-sub { margin: 0 0 22px; color: var(--zl-lead); font-size: .97rem; }
.zl-sub strong { color: var(--zl-text); }

.zl-field { margin: 0 0 16px; }
.zl-field label { display: block; margin: 0 0 6px; font-size: .88rem; font-weight: 600; color: var(--zl-lead); }
.zl-field input {
  display: block;
  width: 100%;
  min-height: 48px;
  padding: 10px 14px;
  border-radius: 12px;
  border: 1px solid var(--zl-field-border);
  background: var(--zl-field);
  color: var(--zl-text);
  font: 400 16px/1.4 var(--zl-font);
  transition: border-color .15s, box-shadow .15s;
}
.zl-field input:hover { border-color: #8391ad; }
.zl-field input:focus { outline: 0; }

.zl-btn {
  display: flex;
  align-items: center;
  justify-content: center;
  width: 100%;
  min-height: 50px;
  padding: 12px 20px;
  border: 0;
  border-radius: 12px;
  background: var(--zl-grad);
  color: #04070e;
  font: 700 1rem/1.2 var(--zl-font);
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  box-shadow: 0 10px 30px rgba(105, 225, 245, .16);
  transition: box-shadow .2s, transform .2s;
}
.zl-btn:hover { box-shadow: 0 12px 38px rgba(105, 225, 245, .34); }
.zl-btn--ghost {
  background: rgba(105, 225, 245, .06);
  color: var(--zl-text);
  border: 1px solid rgba(105, 225, 245, .45);
  box-shadow: none;
}
.zl-btn--ghost:hover { background: rgba(105, 225, 245, .12); box-shadow: 0 0 24px rgba(105, 225, 245, .18); }

.zl-alert {
  margin: 0 0 18px;
  padding: 11px 14px;
  border-radius: 12px;
  border: 1px solid var(--zl-line);
  background: rgba(255, 255, 255, .05);
  color: var(--zl-text);
  font-size: .92rem;
}
.zl-alert--error { border-color: rgba(255, 138, 128, .55); background: rgba(255, 90, 80, .12); color: #ffd6d1; }
.zl-alert--ok { border-color: rgba(154, 245, 212, .5); background: rgba(154, 245, 212, .09); color: #d5fbec; }
.zl-alert a { color: inherit; }

.zl-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 16px 0;
  font-size: .85rem;
  color: var(--zl-muted);
  text-align: center;
}
.zl-divider::before, .zl-divider::after { content: ''; flex: 1; height: 1px; background: var(--zl-line); }

.zl-links { margin: 16px 0 0; font-size: .9rem; text-align: right; }
.zl-page a { color: var(--zl-cyan); text-decoration-thickness: 1px; text-underline-offset: 3px; }
.zl-page a:hover { color: var(--zl-mint); }
.zl-page a.zl-btn { text-decoration: none; }
.zl-page a.zl-btn:hover { color: #04070e; }
.zl-page a.zl-btn--ghost, .zl-page a.zl-btn--ghost:hover { color: var(--zl-text); }

.zl-foot {
  margin: 22px 0 0;
  max-width: 440px;
  font-size: .85rem;
  color: var(--zl-muted);
  text-align: center;
}
.zl-foot a { color: var(--zl-lead); }
.zl-pause {
  margin-top: 14px;
  padding: 8px 14px;
  min-height: 36px;
  border-radius: 999px;
  border: 1px solid var(--zl-line);
  background: rgba(13, 19, 34, .6);
  color: var(--zl-muted);
  font: 600 .8rem/1.2 var(--zl-font);
  cursor: pointer;
}
.zl-pause:hover { color: var(--zl-text); border-color: rgba(105, 225, 245, .5); }
.zl-pause[hidden] { display: none; }

/* Karte leuchtet leicht auf, solange ein Feld den Fokus hat */
.zl-card { transition: box-shadow .25s; }
.zl-card:focus-within {
  box-shadow: 0 30px 90px rgba(0, 0, 0, .5), 0 0 90px -22px rgba(105, 225, 245, .42), inset 0 1px 0 rgba(255, 255, 255, .06);
}

/* Testmodus-Hinweis (nur ready4future: Admin agiert als Firma/Mitarbeiter) */
.zl-imp { position: relative; z-index: 3; max-width: 640px; margin: 0 auto; padding: 12px 14px 0; }
.zl-imp .impersonation-bar {
  display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 14px;
  padding: 10px 14px; border-radius: 12px; background: #b45309; color: #fff; font-size: .9rem;
}
.zl-imp .impersonation-bar form { margin: 0; }
.zl-imp .impersonation-bar button {
  min-height: 36px; padding: 6px 14px; border: 0; border-radius: 8px;
  background: #fff; color: #7c2d05; font: 700 .85rem/1.2 var(--zl-font); cursor: pointer;
}

/* Sichtbarer Fokus: Cyan-Ring */
body.zl :is(a, button, input, select, textarea):focus-visible,
body.zl .zl-field input:focus {
  outline: 2px solid var(--zl-focus);
  outline-offset: 2px;
  box-shadow: 0 0 0 5px rgba(105, 225, 245, .2);
}
body.zl .zl-field input:focus { border-color: var(--zl-focus); outline-offset: 0; }

.zl-skip {
  position: absolute;
  left: 12px;
  top: -60px;
  z-index: 5;
  padding: 10px 14px;
  border-radius: 10px;
  background: #0d1322;
  color: var(--zl-text);
}
.zl-skip:focus { top: 12px; }

/* ---------- Kleine Bildschirme (320 bis 390 px) ---------- */
@media (max-width: 480px) {
  .zl-page { padding: 44px 14px 22px; }
  .zl-card { padding: 28px 20px 24px; border-radius: 18px; }
  .zl-fx { inset: -8px; }
  .zl-rocket { top: -34px; right: -2px; width: 44px; height: 82px; }
  .zl-brand img { height: 28px; }
}
@media (max-width: 360px) {
  .zl-fx { display: none; }
  .zl-brand-suffix { font-size: 12px; }
}

/* ---------- Bewegung ---------- */
@keyframes zl-hover { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-6px); } }
@keyframes zl-flame { from { transform: scaleY(.88); opacity: .55; } to { transform: scaleY(1.08); opacity: .9; } }
@keyframes zl-glow { from { opacity: .82; } to { opacity: 1; } }
@keyframes zl-materialize {
  from { opacity: 0; transform: translateY(14px); clip-path: inset(0 0 100% 0 round 20px); }
  35% { opacity: 1; }
  to { opacity: 1; transform: none; clip-path: inset(-160px -160px -160px -160px round 20px); }
}
@keyframes zl-scan {
  0% { top: 12px; opacity: 0; }
  12% { opacity: 1; }
  88% { opacity: 1; }
  100% { top: calc(100% - 14px); opacity: 0; }
}
@keyframes zl-launch {
  0% { transform: translateY(0) scale(1); opacity: 1; }
  25% { transform: translateY(8px) scale(1); }
  100% { transform: translateY(-115vh) scale(1.15); opacity: 0; }
}

/* Auftritt der Karte: einmal beim Laden, nur wenn Bewegung erlaubt ist (JS setzt zl-enter). */
body.zl-enter .zl-card { animation: zl-materialize .95s cubic-bezier(.2, .7, .2, 1) .1s backwards; }
body.zl-enter .zl-scan { animation: zl-scan .95s cubic-bezier(.4, 0, .2, 1) .1s backwards; }
body.zl-motion .zl-rocket-float { animation: zl-hover 5s ease-in-out infinite; }
body.zl-motion .zl-flame { animation: zl-flame 1.1s ease-in-out infinite alternate; }
body.zl-motion .zl-planet { animation: zl-glow 6s ease-in-out infinite alternate; }
body.zl-motion .zl-btn { will-change: transform; }
body.zl-motion .zl-btn:hover { transform: translateY(-1px); }
body.zl-motion.zl-launch .zl-rocket { animation: zl-launch 1.15s cubic-bezier(.5, 0, .9, .4) forwards; }
body.zl-motion.zl-launch .zl-rocket-float { animation: none; }
body.zl-motion.zl-launch .zl-flame { animation-duration: .14s; }

@media (prefers-reduced-motion: reduce) {
  body.zl *, body.zl *::before, body.zl *::after { animation: none !important; transition: none !important; }
}

/* Windows-Kontrastmodus: Rahmen bleiben sichtbar */
@media (forced-colors: active) {
  .zl-card { border: 1px solid CanvasText; }
  .zl-title { -webkit-text-fill-color: currentColor; color: CanvasText; background: none; }
  .zl-btn { border: 1px solid ButtonText; }
}
