/* ==========================================================================
   MailGenius – Anmeldung und Registrierung (/anmelden/, /registrieren/) · helles Design 3.0
   Geteilter Bildschirm: links helle Markenfläche mit bewegter Vorschau, rechts das Formular.
   Am Handy: kompakte Markenfläche oben, das Formular als Blatt darüber.
   ========================================================================== */

body.mg--auth { background: var(--surface); }
.auth { display: grid; min-height: 100vh; min-height: 100dvh; }
@media (min-width: 960px) {
  .auth { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
  .auth--registrieren { grid-template-columns: minmax(0, .85fr) minmax(0, 1.15fr); }
}

/* ── Markenfläche ─────────────────────────────────────────────────────────── */
.auth-marke {
  position: relative; isolation: isolate; overflow: hidden;
  display: flex; flex-direction: column; gap: var(--abstand-6);
  padding: var(--abstand-6) clamp(32px, 4vw, 64px);
  background: linear-gradient(165deg, #e8eeff 0%, #f1f5fd 42%, #f5f7fb 70%, #fff6e3 100%);
  border-right: 1px solid var(--line);
}
.auth-marke::before { content: ""; position: absolute; inset: 0; z-index: -1; opacity: .8;
  background-image: linear-gradient(rgb(14 23 48 / .05) 1px, transparent 1px), linear-gradient(90deg, rgb(14 23 48 / .05) 1px, transparent 1px); background-size: 44px 44px;
  -webkit-mask-image: radial-gradient(ellipse 80% 60% at 40% 40%, #000, transparent 80%); mask-image: radial-gradient(ellipse 80% 60% at 40% 40%, #000, transparent 80%); }
.auth-marke::after { content: ""; position: absolute; z-index: -1; width: 520px; height: 520px; right: -180px; bottom: -160px; border-radius: 50%;
  background: radial-gradient(circle, rgb(59 130 246 / .22), transparent 65%); }
@media (min-width: 960px) { .auth-marke { position: sticky; top: 0; height: 100vh; height: 100dvh; } }
.auth-marke-kopf .marke { font-size: 1.25rem; }
.auth-marke-kopf .marke svg { width: 36px; height: 36px; }
.auth-botschaft { max-width: 31rem; margin-top: auto; }
.auth-titel { margin: 0; font-size: clamp(2rem, 1.1rem + 2.3vw, 3rem); line-height: 1.06; letter-spacing: -.045em; font-weight: 700; text-wrap: balance; }
.auth-satz { margin: var(--abstand-4) 0 0; font-size: 1.0625rem; line-height: 1.55; color: var(--text-2); }
.auth-vorteile { list-style: none; display: grid; gap: 10px; margin: var(--abstand-5) 0 0; padding: 0; }
.auth-vorteile li { display: flex; align-items: center; gap: 10px; font-weight: 550; }
.auth-vorteile .ic { flex: none; width: 24px; height: 24px; padding: 4px; border-radius: 50%; background: var(--surface); color: var(--ok); box-shadow: 0 0 0 1px var(--line); }
.auth-weg { list-style: none; display: grid; gap: var(--abstand-4); margin: var(--abstand-5) 0 0; padding: 0; }
.auth-weg li { display: flex; gap: 12px; align-items: flex-start; color: var(--text-2); font-size: .9375rem; }
.auth-weg li > span { flex: none; width: 28px; height: 28px; border-radius: 9px; display: grid; place-items: center; background: var(--knopf); color: #fff; font-size: .8125rem; font-weight: 700; }
.auth-weg b { display: block; color: var(--text); font-size: 1rem; }
.auth-fuss { margin: auto 0 0; font-size: .8125rem; color: var(--muted); }

/* Vorschau: Tageszähler und Mitteilungen */
.auth-vorschau { display: grid; gap: var(--abstand-3); width: min(100%, 25rem); }
.vorschau-heute { padding: 14px 16px; border-radius: var(--r-l); background: rgb(255 255 255 / .85); border: 1px solid var(--line); box-shadow: var(--shadow-2); }
.vh-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 8px; font-size: .8125rem; color: var(--muted); }
.vh-kopf > b { font-size: .9375rem; color: var(--text); }
.vh-kopf span b { font-size: 1rem; color: var(--text); }
.vh-balken { display: flex; gap: 3px; height: 8px; margin-top: 10px; }
.vh-balken i { flex: 1; min-width: 4px; border-radius: 4px; background: var(--c); transition: flex-grow .6s var(--ease); }
.vh-balken i:nth-child(1) { flex-grow: 18; } .vh-balken i:nth-child(2) { flex-grow: 16; } .vh-balken i:nth-child(3) { flex-grow: 14; }
.vh-balken i:nth-child(4) { flex-grow: 12; } .vh-balken i:nth-child(5) { flex-grow: 24; } .vh-balken i:nth-child(6) { flex-grow: 12; } .vh-balken i:nth-child(7) { flex-grow: 4; }
.vorschau-stapel { display: grid; gap: 10px; }
.mitteilung { display: flex; align-items: flex-start; gap: 12px; padding: 12px 14px; border-radius: 18px; background: rgb(255 255 255 / .94); border: 1px solid var(--line);
  box-shadow: 0 18px 40px -24px rgb(14 23 48 / .5); transition: transform .5s var(--ease), opacity .5s var(--ease); }
.mitteilung-zeichen { flex: none; width: 34px; height: 34px; }
.mitteilung-inhalt { flex: 1; min-width: 0; display: grid; gap: 1px; font-size: .875rem; color: var(--text-2); }
.mitteilung-oben { display: flex; justify-content: space-between; gap: 8px; font-size: .75rem; color: var(--muted); }
.mitteilung-inhalt > b { font-size: .9375rem; color: var(--text); }
.mitteilung .ordner { font-size: .75rem; padding-block: 0; vertical-align: 1px; }
.vorschau-stapel .mitteilung:nth-child(2) { transform: translateX(16px); }
.vorschau-stapel .mitteilung:nth-child(3) { transform: translateX(32px); opacity: .8; }
.vorschau-stapel .mitteilung.ist-neu { animation: mitteilung-rein .6s var(--ease) both; }
.vorschau-stapel .mitteilung.ist-weg { opacity: 0; transform: translateX(40px) scale(.96); }
@keyframes mitteilung-rein { from { opacity: 0; transform: translateY(-18px) scale(.97); } }

/* ── Formularseite ─────────────────────────────────────────────────────────── */
.auth-inhalt { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: var(--abstand-5); padding: var(--abstand-7) var(--abstand-5) var(--abstand-5); background: var(--surface); }
.auth-karte { width: 100%; max-width: 26.5rem; margin-block: auto; }
.auth-karte--breit { max-width: 35rem; }
.auth-h1 { margin: 0; font-size: clamp(1.75rem, 1.4rem + 1vw, 2.125rem); line-height: 1.12; letter-spacing: -.035em; font-weight: 680; }
.auth-unter { margin: var(--abstand-2) 0 0; color: var(--text-2); font-size: 1.0625rem; }
.auth-unter b { color: var(--text); overflow-wrap: anywhere; }
.auth-form { margin-top: var(--abstand-6); gap: 18px; }
.auth-form .btn[type="submit"] { margin-top: 4px; }
.auth-hinweis { margin-top: var(--abstand-5); }
.auth-wechsel { margin: var(--abstand-6) 0 0; padding-top: var(--abstand-5); border-top: 1px solid var(--line); color: var(--text-2); font-size: .9375rem; }
.auth-wechsel a { font-weight: 600; }
.auth-zurueck { display: inline-flex; align-items: center; gap: 6px; min-height: 40px; margin-bottom: var(--abstand-4); color: var(--text-2); font-weight: 600; font-size: .9375rem; text-decoration: none; }
.auth-zurueck:hover { color: var(--text); }
.auth-zurueck .ic { width: 18px; height: 18px; transition: transform .2s var(--ease); }
.auth-zurueck:hover .ic { transform: translateX(-3px); }
.auth-klein { margin: 0; font-size: .8125rem; color: var(--muted); }
.auth-mitte { display: flex; align-items: center; justify-content: center; gap: 6px; text-align: center; }
.auth-mitte .ic { width: 14px; height: 14px; flex: none; }
.auth-abstand { margin-top: var(--abstand-5); }
.auth-recht { display: flex; flex-wrap: wrap; justify-content: center; gap: 0 var(--abstand-4); font-size: .8125rem; }
.auth-recht a { display: inline-flex; align-items: center; min-height: 32px; color: var(--muted); text-decoration-color: var(--line-strong); }
.auth-recht a:hover { color: var(--text); }

/* Erfolg (Link gesendet, Konto angelegt) */
.auth-erfolg { display: grid; justify-items: center; gap: 10px; margin-top: var(--abstand-5); padding: var(--abstand-6) var(--abstand-5); border-radius: var(--r-xl); background: var(--bg); border: 1px solid var(--line); text-align: center; }
.auth-erfolg:focus { outline: none; }
.auth-erfolg h2 { margin: 4px 0 0; font-size: 1.25rem; letter-spacing: -.02em; }
.auth-erfolg p { margin: 0; color: var(--text-2); }
.auth-erfolg p b { color: var(--text); overflow-wrap: anywhere; }
.auth-erfolg--gross { margin-top: var(--abstand-2); padding: var(--abstand-2) 0 0; background: none; border: 0; }
.auth-erfolg--gross .auth-h1 { margin-top: var(--abstand-2); }
.auth-erfolg--gross p { font-size: 1.0625rem; max-width: 30em; }
.auth-erfolg-ic { position: relative; display: grid; place-items: center; width: 64px; height: 64px; border-radius: 20px; background: var(--brand-soft); color: var(--brand); animation: auth-plopp .55s var(--ease-spring); }
.auth-erfolg-ic > .ic { width: 30px; height: 30px; }
.auth-erfolg-haken { position: absolute; right: -6px; bottom: -6px; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; background: var(--ok); color: #fff; box-shadow: 0 0 0 3px var(--surface); animation: auth-plopp .5s var(--ease-spring) .35s both; }
.auth-erfolg-haken .ic { width: 14px; height: 14px; }
@keyframes auth-plopp { from { opacity: 0; transform: scale(.5); } }
section[data-ansicht]:focus { outline: none; }

/* Schritte 1 · 2 · 3 */
.auth-schritte { list-style: none; display: flex; gap: var(--abstand-2); margin: 0 0 var(--abstand-6); padding: 0; font-size: .8125rem; font-weight: 600; color: var(--muted); }
.auth-schritte li { flex: 1; display: flex; align-items: center; gap: 6px; padding-top: 10px; border-top: 3px solid var(--surface-3); line-height: 1.3; transition: border-color .4s, color .4s; }
.auth-schritte li > span { flex: none; display: grid; place-items: center; width: 20px; height: 20px; border-radius: 50%; background: var(--surface-2); font-size: .6875rem; }
.auth-schritte li.ist-jetzt { border-color: var(--brand); color: var(--text); }
.auth-schritte li.ist-jetzt > span { background: var(--brand); color: #fff; }
.auth-schritte li.ist-fertig { border-color: var(--ok); color: var(--text-2); }
.auth-schritte li.ist-fertig > span { background: var(--ok); color: #fff; }

/* Abo-Wahl */
.abo-wahl { display: grid; }
.abo-kopf { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 8px 12px; }
.abo-hinweis { font-size: .8125rem; color: var(--muted); }
.plan-karten { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; }
.plan-karte { position: relative; display: grid; gap: 2px; padding: 12px 14px; border: 1.5px solid var(--line-strong); border-radius: var(--r-l); background: var(--surface); cursor: pointer; transition: border-color .2s, background-color .2s, box-shadow .2s; }
.plan-karte:hover { border-color: var(--text-2); }
.plan-karte input { position: absolute; opacity: 0; pointer-events: none; }
.plan-karte::after { content: ""; position: absolute; top: 13px; right: 12px; width: 18px; height: 18px; border-radius: 50%; border: 1.5px solid var(--line-input); background: var(--surface); transition: border .2s; }
.plan-karte:has(input:checked) { border-color: var(--brand); background: var(--brand-soft); box-shadow: 0 0 0 3px rgb(36 86 214 / .12); }
.plan-karte:has(input:checked)::after { border: 5.5px solid var(--brand); }
.plan-karte:has(input:focus-visible) { outline: 2px solid var(--focus); outline-offset: 2px; }
.plan-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; padding-right: 24px; }
.plan-kopf b { font-size: .9375rem; }
.plan-tag { padding: 1px 7px; border-radius: 999px; background: var(--knopf); color: #fff; font-size: .6875rem; font-weight: 650; }
.plan-umfang { font-size: .8125rem; color: var(--muted); }
.plan-preis { margin-top: 4px; font-size: .8125rem; color: var(--muted); }
.plan-preis b { font-size: 1.0625rem; letter-spacing: -.02em; color: var(--text); font-variant-numeric: tabular-nums; }
.abo-zusammenfassung { display: flex; align-items: flex-start; gap: 8px; margin: 0; padding: 10px 12px; border-radius: var(--r-m); background: var(--mg-funke-soft); color: #574000; font-size: .875rem; font-weight: 500; }
.abo-zusammenfassung .ic { flex: none; width: 18px; height: 18px; margin-top: 1px; color: #8a6200; }
@media (max-width: 379.98px) { .plan-karten { grid-template-columns: minmax(0, 1fr); } }

.feld-raster { display: grid; gap: 18px; }
@media (min-width: 480px) { .feld-raster { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } }
.haken-liste { display: grid; gap: 14px; padding: 14px; border-radius: var(--r-l); background: var(--bg); border: 1px solid var(--line); }
.haken-liste .haken span { font-size: .875rem; }

/* ── Handy: Markenfläche oben, Formular als Blatt ─────────────────────────── */
@media (max-width: 959.98px) {
  body.mg--auth { background: #eef2fd; }
  .auth { grid-template-rows: auto 1fr; }
  .auth-marke { gap: var(--abstand-4); padding: 20px 20px 48px; border-right: 0; }
  .auth-marke::after { width: 320px; height: 320px; right: -120px; bottom: -160px; }
  .auth-botschaft { margin-top: 0; }
  .auth-titel { font-size: clamp(1.625rem, 1.2rem + 2vw, 2.25rem); }
  .auth-satz { margin-top: var(--abstand-2); font-size: .9375rem; }
  .auth-vorteile, .auth-weg, .auth-vorschau, .auth-fuss { display: none; }
  .auth-inhalt { position: relative; z-index: 1; justify-content: flex-start; margin-top: -24px; padding: 28px 20px 20px; border-radius: 24px 24px 0 0; box-shadow: 0 -12px 30px -22px rgb(14 23 48 / .3); }
  .auth-karte { margin-block: 0 auto; }
}
