/* Bühne */
.auth{
  min-height: calc(100vh - var(--hdr-h, 0px));
  display:grid;
  place-items:center;
  padding: clamp(20px, 6vw, 60px);
  background: radial-gradient(1200px 600px at 10% -10%, #eef2ff 0%, #f3f4f6 45%, #ffffff 100%);
}

/* Wrapper / Brand */
.auth__wrap{
  width: 100%;
  max-width: 640px; /* etwas breiter als vorher, aber kompakt */
  margin: 0 auto;
  box-sizing: border-box;
}
.auth__brand{
  display:flex; justify-content:center; align-items:center; gap:12px; margin:0 0 12px;
}
.auth__brand img{height:auto; max-height:60px}

/* Titel / Lead */
.auth__title{
  margin:.15em 0 .4em;
  font: 800 clamp(26px, 2vw + 18px, 36px)/1.15 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Arial,sans-serif;
  color: var(--charcoal);
  text-align:center;
  letter-spacing:.2px;
}
.auth__lead{
  text-align:center; color: var(--slate);
  font-size: clamp(16px, .4vw + 15px, 18px);
  max-width: 64ch; margin: 0 auto 18px;
}

/* Karte */
.auth-card{
  width: 100%;
  margin: clamp(16px, 2vw, 28px) auto;
  box-sizing: border-box;

  background:#fff;
  border:1px solid var(--line);
  border-radius: calc(var(--radius) + 2px);
  box-shadow: var(--shadow);
  padding: clamp(20px, 3vw, 28px);
}
.auth-card h2{
  margin:0 0 10px;
  font: 700 clamp(16px, .6vw + 14px, 20px)/1.2 system-ui,-apple-system,Segoe UI,Roboto,Ubuntu,Arial,sans-serif;
  color: var(--charcoal);
}

/* Formular – EINSPALTIG */
.auth-form{
  display:grid;
  gap: 14px;
  margin-top: 10px;
}
/* === TOS-Checkbox: links vor dem Text + kleiner rechter Abstand === */
:root{
  --tos-gap: 6px;      /* Grundabstand zwischen Checkbox und Text */
  --tos-nudge-y: 1px;  /* minimale vertikale Korrektur nach unten */
  --tos-scale: 1.22;   /* Checkbox-Größe */
}

.auth-field .auth-checkbox{
  display: inline-flex;
  justify-content: flex-start;   /* linksbündig */
  align-items: center;           /* vertikal mittig */
  flex-direction: row;           /* Checkbox vor Text (Standard-Reihenfolge) */
  flex-wrap: nowrap;             /* eine Zeile behalten */
  gap: var(--tos-gap);
  text-align: left;
}

.auth-field .auth-checkbox span{
  display: inline-flex;
  align-items: center;
  gap: 6px;                      /* AGB · & · Datenschutz etwas Abstand */
  white-space: nowrap;           /* keine Zeilenumbrüche */
  line-height: 1.45;
}

/* Checkbox größer, mit kleinem rechten Abstand und optisch mittig */
.auth-field .auth-checkbox input[type="checkbox"]{
  transform: scale(var(--tos-scale)) translateY(var(--tos-nudge-y));
  margin: 0 6px 0 0;            /* extra rechter Abstand zum Text */
  accent-color: var(--amber);
  border-radius: 6px;
  cursor: pointer;
}

/* Fokus sichtbar */
.auth-field .auth-checkbox input[type="checkbox"]:focus-visible{
  outline: 0;
  box-shadow: 0 0 0 4px rgba(245,158,11,.28);
  border-radius: 6px;
}

/* sehr schmale Geräte: etwas kompakter */
@media (max-width: 360px){
  :root{ --tos-gap: 4px; --tos-scale: 1.18; }
  .auth-field .auth-checkbox span{ gap: 4px; }
  .auth-field .auth-checkbox input[type="checkbox"]{ margin-right: 4px; }
}


/* Label */
.auth-label{
  font-weight: 700;
  font-size: clamp(14px,.2vw+14px,16px);
  color: var(--slate);
  letter-spacing:.1px;
}

/* Inputs einheitlich */
.auth-input,
.auth-select,
.auth-textarea{
  width:100%;
  border:1px solid #d1d5db;
  border-radius: 12px;
  padding: 14px 14px;
  font-size: clamp(16px,.2vw+16px,18px);
  background:#fff;
  color: var(--charcoal);
  transition: border-color .15s ease, box-shadow .15s ease;
}
.auth-textarea{ min-height: 120px; resize: vertical; }
.auth-input::placeholder,
.auth-textarea::placeholder{ color:#9aa3b2 }

/* Fokus – dezent, klar */
.auth-input:focus,
.auth-select:focus,
.auth-textarea:focus{
  outline: 0;
  border-color:#93c5fd;
  box-shadow: 0 0 0 4px rgba(59,130,246,.18);
}

/* States via Klassen */
.is-valid   { border-color:#22c55e !important; box-shadow: 0 0 0 3px rgba(34,197,94,.18) !important; }
.is-invalid { border-color:#ef4444 !important; box-shadow: 0 0 0 3px rgba(239,68,68,.18) !important; }
.auth-hint  { font-size: 13px; color:#64748b; }
.auth-error { font-size: 13px; color:#b91c1c; }

/* Checkbox / AGB */
/* AGB/Terms – mittig, Checkbox rechts dahinter & größer */
.auth-terms{
  display:flex;
  align-items:center;           /* vertikal mittig */
  justify-content:center;       /* alles zentriert */
  gap: 12px;
  text-align:center;
  font-size: clamp(14px,.2vw+14px,16px);
  line-height: 1.55;
  flex-wrap: wrap;              /* bricht sauber auf Mobil */
}

/* Checkbox ans Ende (hinter die Links) schieben – ohne HTML zu ändern */

.auth a{ color:#0b7a2a; text-decoration:none; }
.auth a:hover{ text-decoration:underline; }

/* Aktionen */
.auth-actions{ display:grid; gap:12px; margin-top: 6px; }
.btn-auth{
  display:inline-flex; justify-content:center; align-items:center;
  border-radius:12px; padding:14px 18px;
  font-weight:600; letter-spacing:.2px;
  border:1px solid var(--line); background: var(--cloud); color: var(--charcoal);
  cursor:pointer; font-size: clamp(16px,.2vw+16px,18px);
  transition: background-color .15s ease, box-shadow .15s ease, transform .06s ease;
}
.btn-auth:hover{ background:#e9edf2; transform: translateY(-1px); }
.btn-auth:active{ transform: translateY(0); }
.btn-auth--primary{
  background: var(--amber); color:#111827; border:1px solid #00000012;
  box-shadow:0 10px 22px rgba(245,158,11,.18), inset 0 -1px 0 rgba(0,0,0,.06);
}
.btn-auth--primary:hover{ background: var(--amber-700); color:#fff; }

/* Divider / Alerts */
.auth-divider{
  height:1px; background: linear-gradient(90deg, transparent, var(--line), transparent);
  margin: 18px 0;
}
.auth-alert{
  border:1px solid #fca5a5; background:#fff5f5; color:#7f1d1d;
  padding:12px 14px; border-radius:12px; margin:12px 0;
  font-size: clamp(14px,.2vw+14px,16px);
}

/* Erfolg */
.auth-success{
  width: min(680px, 100%);
  margin: 10px auto 16px;
  padding: 12px 14px;
  border: 1px solid #cfeada;
  border-radius: 12px;
  background: #e8f5ec;
  color: #0b7a2a;
  font-size: 15px;
  font-weight: 600;
  line-height: 1.45;
}
.auth-success:focus {
  outline: none;
  box-shadow: 0 0 0 3px rgba(34,197,94,.25);
}

/* Honeypot */
.hp-wrap{ position:absolute; left:-9999px; top:auto; width:1px; height:1px; overflow:hidden; }

/* Kleine Screens – etwas kompakter */
@media (max-width: 420px){
  .auth-card{ padding: 18px; }
  .btn-auth{ padding: 13px 16px; }
}

/* Reduced Motion */
@media (prefers-reduced-motion: reduce){
  .btn-auth, .auth-input, .auth-select, .auth-textarea{ transition: none; }
}

/* Dark Mode */
@media (prefers-color-scheme: dark){
  .auth{
    background: radial-gradient(1200px 600px at 10% -10%, #13203a 0%, #0b1220 55%, #0b1220 100%);
    color:#e7edf7;
  }
  .auth__title{ color:#e7edf7 }
  .auth__lead{ color:#aab6cf }

  .auth-card{
    background: linear-gradient(180deg,#0f1628 0%, #121a2f 100%);
    border-color:#1b243a;
  }
  .auth-label{ color:#dbe6ff }
  .auth-input, .auth-select, .auth-textarea{
    background:#0a1224; color:#eaf1ff; border-color:#25304a;
  }
  .auth-input::placeholder, .auth-textarea::placeholder{ color:#8ea2c6 }
  .btn-auth{ background:#1a2440; color:#fff; border-color:#2a3552 }
  .btn-auth:hover{ background:#223058 }
  .auth-alert{
    background:linear-gradient(180deg,#2b1515 0%, #231112 100%);
    color:#fecaca; border-color:#5a2c2c;
  }
}