/* Anmeldeseite Geza (Schritt 24L): immer dunkel, ruhig, ohne Inhaltsangaben. Nur eigene Dateien (CSP 'self'). */
@font-face {
  font-family: "Geist";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("geist-latin-wght-normal.woff2") format("woff2-variations"), url("geist-latin-wght-normal.woff2") format("woff2");
}

:root {
  color-scheme: dark;
  --ink: #ece7dd;
  --ink-2: #a9a399;
  --edge: #6b665d;
  --edge-hover: #8a8479;
  --field: #0f1012;
  /* Gold kommt aus gold-tokens.css (dieselbe Datei wie in der App) */
  --champagne: var(--gold);
  --champagne-hi: var(--gold-hi);
  --on-champagne: var(--gold-ink);
  --glow: var(--gold-rgb);
  --alert: #f0a07a;
  --alert-edge: rgba(240, 160, 122, 0.35);
}
@media (prefers-contrast: more) {
  :root { --ink-2: #d6d0c4; --edge: #8a857a; --edge-hover: #b4ad9f; }
}

*, *::before, *::after { box-sizing: border-box; }
html { height: 100%; background: var(--night); -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100%;
  min-height: 100dvh;
  display: grid;
  place-items: center;
  color: var(--ink);
  font-family: "Geist", ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif;
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  /* Licht: weicher Schein in Champagner hinter dem Zeichen, darunter kaum sichtbare Körnung aus Linien */
  background:
    radial-gradient(38rem 26rem at 50% 30%, rgb(var(--glow) / 0.085), transparent 70%),
    radial-gradient(14rem 10rem at 50% 27%, rgb(var(--glow) / 0.06), transparent 70%),
    repeating-linear-gradient(0deg, rgb(255 255 255 / 0.012) 0 1px, transparent 1px 3px),
    var(--night);
  padding: max(24px, env(safe-area-inset-top)) max(20px, env(safe-area-inset-right)) max(24px, env(safe-area-inset-bottom)) max(20px, env(safe-area-inset-left));
}

.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); clip-path: inset(50%); white-space: nowrap; }

/* leicht über der Mitte */
.stage {
  width: 100%;
  max-width: 360px;
  margin-bottom: 8vh;
  display: flex;
  flex-direction: column;
  align-items: center;
  animation: rise 260ms cubic-bezier(0.2, 0.7, 0.2, 1) both;
}

.mark { position: relative; margin: 0 0 44px; }
.mark img { display: block; width: 80px; height: auto; filter: drop-shadow(0 10px 30px rgb(0 0 0 / 0.55)); }
/* feine Linie unter dem Zeichen */
.mark::after {
  content: "";
  position: absolute;
  left: 50%;
  bottom: -22px;
  width: 64px;
  height: 1px;
  transform: translateX(-50%);
  background: linear-gradient(90deg, transparent, rgb(var(--glow) / 0.45), transparent);
}

.form { width: 100%; display: flex; flex-direction: column; gap: 18px; }
.field { display: flex; flex-direction: column; gap: 8px; }

label { font-size: 13px; font-weight: 500; letter-spacing: 0.01em; color: var(--ink-2); }

input[type="text"], input[type="password"] {
  width: 100%;
  height: 48px;
  padding: 0 14px;
  font: inherit;
  font-size: 16px; /* kein Zoom auf iOS */
  color: var(--ink);
  background: var(--field);
  border: 1px solid var(--edge);
  border-radius: 10px;
  outline: none;
  transition: border-color 150ms ease, box-shadow 150ms ease;
  -webkit-appearance: none;
  appearance: none;
}
input:hover { border-color: var(--edge-hover); }
input:focus-visible, input:focus {
  border-color: var(--champagne);
  box-shadow: 0 0 0 3px rgb(var(--glow) / 0.22);
}
input[aria-invalid="true"] { border-color: var(--alert-edge); }
input:-webkit-autofill {
  -webkit-text-fill-color: var(--ink);
  box-shadow: 0 0 0 1000px var(--field) inset;
  caret-color: var(--ink);
}

.secret { position: relative; }
.secret input { padding-right: 52px; }
.reveal {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 44px;
  height: 44px;
  display: grid;
  place-items: center;
  padding: 0;
  color: var(--ink-2);
  background: transparent;
  border: 0;
  border-radius: 8px;
  cursor: pointer;
}
.reveal[hidden] { display: none; }
.reveal:hover { color: var(--ink); }
.reveal:focus-visible { outline: 2px solid var(--champagne); outline-offset: -4px; }
.reveal svg { width: 18px; height: 18px; fill: none; stroke: currentColor; stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
.reveal .eye-off, .reveal[aria-pressed="true"] .eye { display: none; }
.reveal[aria-pressed="true"] .eye-off { display: block; }

.submit {
  position: relative;
  height: 48px;
  margin-top: 8px;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  font: inherit;
  font-size: 15px;
  font-weight: 600;
  letter-spacing: 0.01em;
  color: var(--on-champagne);
  background: linear-gradient(180deg, var(--champagne-hi), var(--champagne));
  border: 0;
  border-radius: 10px;
  box-shadow: 0 1px 0 rgb(255 255 255 / 0.25) inset, 0 8px 24px rgb(var(--glow) / 0.12);
  cursor: pointer;
  transition: filter 150ms ease, transform 150ms ease;
}
.submit:hover { filter: brightness(1.06); }
.submit:active { transform: translateY(1px); }
.submit:focus-visible { outline: 2px solid var(--champagne); outline-offset: 3px; }
.submit[disabled] { cursor: progress; filter: saturate(0.8) brightness(0.92); }
.spinner {
  display: none;
  width: 16px;
  height: 16px;
  border: 2px solid rgb(22 19 13 / 0.3);
  border-top-color: var(--on-champagne);
  border-radius: 50%;
  animation: spin 700ms linear infinite;
}
.submit[aria-busy="true"] .spinner { display: block; }

.error-slot:empty { display: none; }
.fehler {
  margin: 2px 0 0;
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 10px 12px;
  font-size: 14px;
  color: var(--ink);
  background: rgb(240 160 122 / 0.07);
  border: 1px solid var(--alert-edge);
  border-radius: 10px;
}
.fehler::before {
  content: "";
  flex: none;
  width: 16px;
  height: 16px;
  margin-top: 2px;
  background: var(--alert);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.01'/%3E%3C/svg%3E") center / contain no-repeat;
  mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='black' stroke-width='2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9'/%3E%3Cpath d='M12 7.5v5.5M12 16.5v.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes spin { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) {
  .stage { animation: none; }
  .spinner { animation-duration: 2s; }
  input, .submit { transition: none; }
}

@media (min-height: 900px) {
  .mark { margin-bottom: 52px; }
}
