/* ============================================================
   fairdirekt24 — Anmeldung
   Eigenes Stylesheet: die Login-Seite lädt kein App-CSS und kein
   App-JS. So kann eine noch nicht angemeldete Sitzung nichts aus
   der Anwendung nachladen.
   ============================================================ */
:root {
  --bg: #070b18;
  --card: rgba(20, 27, 52, .85);
  --card2: #1b2444;
  --border: rgba(126, 148, 255, .13);
  --border-strong: rgba(126, 148, 255, .28);
  --text: #eef1fb;
  --muted: #939dc3;
  --accent: #6e8bff;
  --violet: #a86bff;
  --ok: #34e3b0;
  --warn: #ffc069;
  --err: #ff7b7b;
  --radius: 16px;
}
* { box-sizing: border-box; margin: 0; }
html, body { height: 100%; }
body {
  font-family: "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  background: var(--bg); color: var(--text);
  font-size: 14.5px; line-height: 1.5; -webkit-font-smoothing: antialiased;
}
svg { fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }
.muted { color: var(--muted); }

.bg-glow {
  position: fixed; inset: 0; z-index: -1; pointer-events: none;
  background:
    radial-gradient(900px 460px at 12% -8%, rgba(110, 139, 255, .16), transparent 60%),
    radial-gradient(800px 420px at 95% 4%, rgba(168, 107, 255, .12), transparent 60%),
    radial-gradient(700px 500px at 55% 115%, rgba(52, 227, 176, .06), transparent 60%);
}

/* ---------------- Layout ---------------- */
.auth-wrap { display: grid; grid-template-columns: 1.05fr .95fr; min-height: 100dvh; }

.auth-brand {
  display: flex; flex-direction: column; justify-content: space-between;
  padding: 42px 48px; border-right: 1px solid var(--border);
  background: linear-gradient(170deg, rgba(15, 21, 44, .75), rgba(9, 13, 28, .35));
}
.ab-top { display: flex; gap: 12px; align-items: center; }
.brand-mark {
  /* Traeger fuer die Bildmarke - kein Hintergrund, keine Kachel.
     Siehe brand/logo-styleguide.html Abschnitt 08. */
  width: 44px; height: 44px; display: grid; place-items: center;
}
.brand-name { font-weight: 700; font-size: 16px; letter-spacing: .2px; }
.brand-sub { font-size: 11.5px; color: var(--muted); letter-spacing: .4px; }

.ab-mid h1 {
  font-size: clamp(28px, 3.4vw, 44px); line-height: 1.12; font-weight: 800;
  letter-spacing: -.5px; margin-bottom: 26px;
  background: linear-gradient(120deg, #fff 20%, var(--accent) 70%, var(--violet));
  -webkit-background-clip: text; background-clip: text; -webkit-text-fill-color: transparent;
}
.ab-list { list-style: none; padding: 0; display: grid; gap: 13px; max-width: 430px; }
.ab-list li { display: flex; gap: 11px; align-items: flex-start; color: var(--muted); font-size: 13.6px; }
.ab-list .dot {
  width: 7px; height: 7px; border-radius: 99px; margin-top: 7px; flex-shrink: 0;
  background: var(--ok); box-shadow: 0 0 0 3px rgba(52, 227, 176, .14);
}
.ab-foot .lock { display: flex; gap: 9px; align-items: center; font-size: 11.8px; color: var(--muted); }
.ab-foot svg { width: 15px; height: 15px; flex-shrink: 0; }

.auth-panel { display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 40px 30px; gap: 18px; }
.auth-card {
  width: 100%; max-width: 400px; background: var(--card); border: 1px solid var(--border);
  border-radius: 20px; padding: 30px 30px 26px; backdrop-filter: blur(16px);
  box-shadow: 0 20px 60px rgba(2, 5, 18, .5);
}
.auth-legal { font-size: 11.5px; color: var(--muted); text-align: center; }
.loading { color: var(--muted); padding: 20px 0; display: flex; align-items: center; gap: 12px; }

/* ---------------- Formular ---------------- */
.auth-card h2 { font-size: 21px; font-weight: 750; letter-spacing: -.2px; }
.auth-card .sub { color: var(--muted); font-size: 13px; margin-top: 5px; margin-bottom: 22px; }

.field { display: block; margin-bottom: 14px; }
.field > span { display: block; font-size: 11.5px; color: var(--muted); margin-bottom: 6px; letter-spacing: .3px; font-weight: 500; }
.field input {
  width: 100%; padding: 11px 13px; border-radius: 11px; font: inherit; color: var(--text);
  background: rgba(8, 12, 26, .7); border: 1px solid var(--border);
  transition: border-color .15s, box-shadow .15s;
}
.field input:focus {
  outline: none; border-color: var(--border-strong);
  box-shadow: 0 0 0 3px rgba(110, 139, 255, .14);
}
.field input::placeholder { color: rgba(147, 157, 195, .55); }
.field input[aria-invalid="true"] { border-color: rgba(255, 123, 123, .5); }

.pw-wrap { position: relative; }
.pw-toggle {
  position: absolute; right: 6px; top: 50%; transform: translateY(-50%);
  background: none; border: 0; color: var(--muted); cursor: pointer; padding: 7px; border-radius: 8px;
}
.pw-toggle:hover { color: var(--text); background: rgba(126, 148, 255, .1); }
.pw-toggle svg { width: 17px; height: 17px; }

.code-input {
  letter-spacing: .5em; text-align: center; font-size: 22px; font-weight: 700;
  font-variant-numeric: tabular-nums; padding: 13px 13px 13px 20px !important;
}

.btn {
  width: 100%; padding: 12px 16px; border: 0; border-radius: 11px; cursor: pointer;
  font: inherit; font-weight: 650; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--violet));
  box-shadow: 0 8px 22px rgba(110, 139, 255, .28);
  transition: transform .12s, box-shadow .12s, opacity .12s;
}
.btn:hover:not(:disabled) { transform: translateY(-1px); box-shadow: 0 12px 26px rgba(110, 139, 255, .36); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-ghost {
  background: rgba(126, 148, 255, .09); border: 1px solid var(--border); box-shadow: none; color: var(--text);
}
.btn-ghost:hover:not(:disabled) { background: rgba(126, 148, 255, .16); box-shadow: none; }
.btn-row { display: flex; gap: 9px; margin-top: 16px; }
.btn-row .btn { margin-top: 0; }
.mt { margin-top: 16px; }

.alert {
  display: flex; gap: 9px; align-items: flex-start; padding: 10px 12px; border-radius: 11px;
  font-size: 13px; margin-bottom: 16px; border: 1px solid;
}
.alert svg { width: 16px; height: 16px; flex-shrink: 0; margin-top: 1px; }
.alert-err { background: rgba(255, 123, 123, .1); border-color: rgba(255, 123, 123, .32); color: #ffb3b3; }
.alert-ok { background: rgba(52, 227, 176, .1); border-color: rgba(52, 227, 176, .3); color: #8ff0d3; }
.alert-info { background: rgba(110, 139, 255, .1); border-color: rgba(110, 139, 255, .3); color: #c3cfff; }
.alert-warn { background: rgba(255, 192, 105, .1); border-color: rgba(255, 192, 105, .32); color: #ffd9a3; }

.linkline { text-align: center; font-size: 12.5px; color: var(--muted); margin-top: 15px; }

/* ---------------- Passwortstärke ---------------- */
.meter { height: 4px; border-radius: 99px; background: rgba(126, 148, 255, .14); overflow: hidden; margin-top: 8px; }
.meter > i { display: block; height: 100%; width: 0; border-radius: 99px; transition: width .25s, background .25s; }
.meter-hint { font-size: 11.5px; color: var(--muted); margin-top: 6px; }

/* ---------------- 2FA-Einrichtung ---------------- */
.mfa-steps { counter-reset: s; display: grid; gap: 14px; margin-bottom: 18px; }
.mfa-step { display: flex; gap: 11px; font-size: 13.2px; color: var(--muted); }
.mfa-step b { color: var(--text); font-weight: 600; }
.mfa-step .n {
  width: 21px; height: 21px; border-radius: 99px; flex-shrink: 0; display: grid; place-items: center;
  background: rgba(110, 139, 255, .18); color: var(--accent); font-size: 11px; font-weight: 700;
}
.secret-box {
  background: rgba(8, 12, 26, .75); border: 1px dashed var(--border-strong); border-radius: 11px;
  padding: 12px; text-align: center; margin: 10px 0 4px;
}
.secret-box code {
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace;
  font-size: 14.5px; letter-spacing: 1.5px; color: var(--text); word-break: break-all;
}
.copy-btn {
  background: none; border: 0; color: var(--accent); cursor: pointer; font: inherit; font-size: 11.5px;
  margin-top: 7px; padding: 3px 8px; border-radius: 7px;
}
.copy-btn:hover { background: rgba(110, 139, 255, .12); }

.rec-grid {
  display: grid; grid-template-columns: 1fr 1fr; gap: 7px; margin: 14px 0;
  font-family: ui-monospace, "SF Mono", Menlo, Consolas, monospace; font-size: 13px;
}
.rec-grid span {
  background: rgba(8, 12, 26, .7); border: 1px solid var(--border); border-radius: 8px;
  padding: 7px 9px; text-align: center; letter-spacing: .5px;
}

/* ---------------- Demo-Zugänge ---------------- */
.demo-box { margin-top: 20px; padding-top: 18px; border-top: 1px solid var(--border); }
.demo-head { font-size: 11px; letter-spacing: .5px; color: var(--muted); text-transform: uppercase; margin-bottom: 10px; font-weight: 600; }
.demo-row {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 8px 10px; margin-bottom: 6px;
  background: rgba(126, 148, 255, .055); border: 1px solid var(--border); border-radius: 10px;
  cursor: pointer; font: inherit; color: var(--text); text-align: left;
  transition: background .13s, border-color .13s;
}
.demo-row:hover { background: rgba(126, 148, 255, .13); border-color: var(--border-strong); }
.demo-badge {
  width: 26px; height: 26px; border-radius: 8px; display: grid; place-items: center; flex-shrink: 0;
  font-size: 10px; font-weight: 700; letter-spacing: .3px; color: #fff;
}
.demo-badge.ow { background: linear-gradient(135deg, #6e8bff, #a86bff); }
.demo-badge.la { background: linear-gradient(135deg, #34e3b0, #1f9c86); }
.demo-badge.bu { background: linear-gradient(135deg, #ffc069, #e08a2e); }
.demo-role { font-size: 12.8px; font-weight: 600; }
.demo-mail { font-size: 11px; color: var(--muted); }
.demo-note { font-size: 11px; color: var(--muted); margin-top: 9px; line-height: 1.45; }

/* ---------------- Toasts ---------------- */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); display: grid; gap: 8px; z-index: 99; }
.toast {
  padding: 10px 15px; border-radius: 11px; font-size: 13px; border: 1px solid var(--border-strong);
  background: var(--card2); box-shadow: 0 10px 30px rgba(2, 5, 18, .5);
  animation: up .2s ease-out;
}
.toast.err { border-color: rgba(255, 123, 123, .4); }
@keyframes up { from { opacity: 0; transform: translateY(8px); } }

/* ---------------- Mobil ---------------- */
@media (max-width: 900px) {
  .auth-wrap { grid-template-columns: 1fr; }
  .auth-brand { border-right: 0; border-bottom: 1px solid var(--border); padding: 24px 22px; gap: 22px; }
  .ab-mid h1 { font-size: 26px; margin-bottom: 16px; }
  .ab-list { display: none; }
  .ab-foot { display: none; }
  .auth-panel { padding: 26px 18px 40px; }
  .auth-card { padding: 24px 20px 22px; }
}
@media (prefers-reduced-motion: reduce) {
  * { animation: none !important; transition: none !important; }
}


/* ---- ORNLA Ladeindikator -------------------------------------------------
   Das Markenzeichen, rotiert. Die verlaufende Strichstaerke erzeugt beim
   Drehen die Bewegungsunschaerfe - deshalb braucht es keine zweite Grafik.
   Regeln: brand/logo-styleguide.html Abschnitt 07. Nie im Header mitdrehen. */
.ornla-spin { animation: ornla-spin .9s linear infinite; }
@keyframes ornla-spin { to { transform: rotate(360deg); } }
/* Funktional, nicht dekorativ: nicht abschalten, nur verlangsamen. */
@media (prefers-reduced-motion: reduce) { .ornla-spin { animation-duration: 2.4s; } }
