/* NeXtMail – Anmeldung (nm-anmeldemasken, 14.11.2026). EINE Quelle für Webmail (/web/) und Verwaltung (/verwaltung/
   lädt /web/anmeldung.css). Zweigeteilt: links Markenfläche (Verlauf in Produktfarbe, Knotenmuster, Wortmarke,
   „by NeXtEnterprise“, ein Satz), rechts das Formular. Am Handy (≤ 760 px) einspaltig mit schmalem Markenkopf.
   Maße aus den Dichte-Tokens (dichte.css, --d-*), keine externen Schriften. Wird NACH dichte.css geladen.
   © 2026 by Sebastian Hirtreiter */

:root {
  --anm-verlauf: linear-gradient(155deg, #2a44b5 0%, #3550cf 42%, #1d5f96 100%);
  --anm-glanz: rgba(47, 208, 201, .22);
  --anm-x: #7ff3ec;
}
html[data-theme=dark] {
  --anm-verlauf: linear-gradient(155deg, #1d2f80 0%, #24399a 45%, #133f63 100%);
  --anm-glanz: rgba(47, 208, 201, .16);
}

/* Hintergrund der ganzen Seite: ruhig, zwei weiche Lichtflecken */
.anmeldung.anm {
  position: fixed; inset: 0; min-height: 0; overflow-x: hidden; overflow-y: auto; display: flex; flex-direction: row;
  align-items: stretch; justify-content: flex-start; padding: 24px;
  background: radial-gradient(900px 520px at 88% -10%, rgba(76, 110, 245, .14), transparent 60%),
    radial-gradient(800px 480px at 0% 110%, rgba(20, 184, 178, .12), transparent 55%), var(--bg);
}
/* margin:auto statt align-items:center – bei wenig Höhe (150 %) wird oben nichts abgeschnitten */
.anm-rahmen {
  margin: auto; width: 100%; max-width: 940px; min-height: 540px; display: grid;
  grid-template-columns: minmax(0, 5fr) minmax(0, 6fr); background: var(--panel); border: 1px solid var(--line);
  border-radius: 16px; box-shadow: 0 18px 50px rgba(20, 30, 60, .16), 0 2px 6px rgba(20, 30, 60, .06); overflow: hidden;
}
html[data-theme=dark] .anm-rahmen { box-shadow: 0 18px 50px rgba(0, 0, 0, .55); }

/* ---------------------------------------------------------------- Markenfläche */
.anm-marke {
  position: relative; isolation: isolate; color: #fff; background: var(--anm-verlauf);
  padding: 40px 40px 32px; display: flex; flex-direction: column; gap: 0; min-width: 0; overflow: hidden;
}
/* Knotenmuster (angelehnt an das X-Zeichen der Marke) + Lichtfleck – rein dekorativ */
.anm-marke::before {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .16; pointer-events: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='120' height='120' viewBox='0 0 120 120'%3E%3Cg fill='none' stroke='%23fff' stroke-width='1'%3E%3Cpath d='M10 10L60 60L110 10M10 110L60 60L110 110'/%3E%3C/g%3E%3Cg fill='%23fff'%3E%3Ccircle cx='10' cy='10' r='2.2'/%3E%3Ccircle cx='110' cy='10' r='2.2'/%3E%3Ccircle cx='10' cy='110' r='2.2'/%3E%3Ccircle cx='110' cy='110' r='2.2'/%3E%3Ccircle cx='60' cy='60' r='3.2'/%3E%3C/g%3E%3C/svg%3E");
  background-size: 120px 120px; background-position: -10px -10px;
  -webkit-mask-image: linear-gradient(160deg, transparent 15%, #000 70%); mask-image: linear-gradient(160deg, transparent 15%, #000 70%);
}
.anm-marke::after {
  content: ""; position: absolute; z-index: -1; width: 420px; height: 420px; right: -160px; bottom: -180px; border-radius: 50%;
  background: radial-gradient(circle, var(--anm-glanz), transparent 70%); pointer-events: none;
}
.anm-kopf { display: flex; align-items: center; gap: 12px; min-width: 0; }
.anm-zeichen { width: 44px; height: 44px; flex: none; border-radius: 12px; display: block;
  box-shadow: 0 4px 14px rgba(0, 0, 0, .18), inset 0 0 0 1px rgba(255, 255, 255, .25); }
.anm-name { min-width: 0; }
.anm-marke .wortmarke { color: #fff; font-size: 28px; line-height: 1.1; letter-spacing: -.3px; display: block; }
.anm-marke .wortmarke b { color: var(--anm-x); }
.anm-by { font-size: 12.5px; line-height: 1.3; margin-top: 3px; color: #fff; opacity: .92; letter-spacing: .2px; }
.anm-bereich {
  align-self: flex-start; display: inline-flex; align-items: center; gap: 7px; margin-top: 22px; padding: 5px 12px 5px 9px;
  border-radius: 999px; background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .28);
  font-size: 13px; font-weight: 600; color: #fff; white-space: nowrap;
}
.anm-bereich svg.ic { width: 16px; height: 16px; }
.anm-satz { font-size: 22px; line-height: 1.32; font-weight: 600; letter-spacing: -.2px; margin: auto 0 0; padding-top: 40px; max-width: 340px; color: #fff; }
.anm-punkte { list-style: none; margin: 22px 0 0; padding: 0; display: flex; flex-direction: column; gap: 12px; }
.anm-punkte li { display: flex; align-items: flex-start; gap: 11px; font-size: 14px; line-height: 1.4; color: #fff; }
.anm-punkte .anm-punkt-ic { width: 28px; height: 28px; flex: none; border-radius: 8px; display: inline-flex; align-items: center; justify-content: center;
  background: rgba(255, 255, 255, .14); box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); margin-top: -4px; }
.anm-punkte svg.ic { width: 16px; height: 16px; color: #fff; }
.anm-marke-luecke { flex: none; height: 12px; }
/* url-nm (Build 24): „Admin Login“ dezent unten links in der Markenfläche (nur Webmail) */
.anm-admin { align-self: flex-start; margin: 18px 0 0 -2px; padding: 0 2px; min-height: 24px; line-height: 24px; font-size: 12.5px;
  color: rgba(255, 255, 255, .8); text-decoration: none; border-radius: 4px; white-space: nowrap; }
.anm-admin:hover { color: #fff; text-decoration: underline; }
.anm-admin:focus-visible { color: #fff; text-decoration: underline; outline: 2px solid #fff; outline-offset: 2px; }
.anm-marke > .anm-punkte { margin-bottom: auto; }   /* Satz + Punkte mittig zwischen Kopf und Unterkante */

/* ---------------------------------------------------------------- Formularseite */
.anm-seite { display: flex; flex-direction: column; padding: 18px 22px 18px 48px; min-width: 0; background: var(--panel); }
.anm-werkzeug { display: flex; justify-content: flex-end; align-items: center; gap: 4px; min-height: var(--d-ik, 32px); }
.anm-werkzeug .flaggen { display: inline-flex; gap: 2px; }
.anm-werkzeug .flagge {
  box-sizing: border-box; width: var(--d-ik, 32px); height: var(--d-ik, 32px); min-width: 0; min-height: 0; padding: 0;
  display: inline-flex; align-items: center; justify-content: center; border: 1px solid transparent; border-radius: 6px;
  background: transparent; opacity: .6; cursor: pointer; box-shadow: none;
}
.anm-werkzeug .flagge:hover { opacity: 1; background: var(--hover); }
.anm-werkzeug .flagge.an { opacity: 1; background: var(--accent-soft); border-color: transparent; box-shadow: none; }
.anm-werkzeug .flagge svg { width: 20px; height: 14px; border-radius: 2px; box-shadow: 0 0 0 1px rgba(0, 0, 0, .15); display: block; }
.anm-werkzeug .ik { width: var(--d-ik, 32px); height: var(--d-ik, 32px); border-radius: 6px; }
.anm-werkzeug-strich { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }

.anm-mitte { flex: 1 1 auto; width: 100%; max-width: 360px; margin: 0 auto; padding: 20px 26px 12px 0; display: flex; flex-direction: column; justify-content: center; }
.anm-mitte > h1, .anm-mitte form > h1, .anm-mitte .mfa-h { font-size: 24px; line-height: 1.25; font-weight: 600; letter-spacing: -.2px; margin: 0 0 6px; color: var(--text); }
.anm-unter { color: var(--muted); font-size: 14px; margin: 0 0 22px; }
.anm-mitte form { display: flex; flex-direction: column; gap: 0; margin: 0; }
.anm-zeile { margin-bottom: 14px; }
.anm-label { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; color: var(--text); }
.anm-feld { position: relative; }
.anm-feld > svg.ic { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.anm .anm-feld .feld, .anm-mitte .feld {
  width: 100%; height: calc(var(--d-feld, 32px) + 6px); border-radius: 6px; border: 1px solid var(--line);
  background: var(--panel); color: var(--text); font-size: calc(var(--d-schrift, 14px) + var(--d-plus, 0px)); padding: 0 12px; margin: 0;
  transition: border-color .12s, box-shadow .12s;
}
html[data-theme=dark] .anm .anm-feld .feld, html[data-theme=dark] .anm-mitte .feld { background: var(--panel2); border-color: #3a4352; }
.anm-feld > svg.ic ~ .feld, .anm .anm-feld > svg.ic ~ .feld { padding-left: 36px; }
.anm-feld.mit-auge .feld, .anm .anm-feld.mit-auge .feld { padding-right: 42px; }
.anm-feld .feld:hover { border-color: #b9c3d3; }
html[data-theme=dark] .anm-feld .feld:hover { border-color: #4a5466; }
.anm-feld .feld:focus, .anm-mitte .feld:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.anm-feld .feld[aria-invalid="true"] { border-color: var(--gefahr); }
.anm-feld .feld[aria-invalid="true"]:focus { box-shadow: 0 0 0 3px var(--gefahr-soft); }
.anm-feld .anm-auge {
  position: absolute; right: 3px; top: 50%; transform: translateY(-50%); width: calc(var(--d-feld, 32px)); height: calc(var(--d-feld, 32px));
  display: inline-flex; align-items: center; justify-content: center; border: 0; border-radius: 5px; background: transparent; color: var(--muted); cursor: pointer; padding: 0;
}
.anm-feld .anm-auge:hover { background: var(--hover); color: var(--text); }
.anm-feld .anm-auge svg.ic { width: 18px; height: 18px; }
.anm-hinweis-klein { display: flex; align-items: center; gap: 6px; font-size: 12.5px; color: var(--warn); margin: 6px 0 0; }
.anm-hinweis-klein svg.ic { width: 14px; height: 14px; }

.anm-reihe { display: flex; align-items: center; justify-content: space-between; gap: 8px 16px; flex-wrap: wrap; margin: 2px 0 16px; min-height: 28px; }
.anm-reihe .haken { min-height: 28px; margin: 0; font-size: 13.5px; display: flex; align-items: center; gap: 8px; cursor: pointer; }
.anm-reihe .haken input { width: 16px; height: 16px; margin: 0; accent-color: var(--accent); }
.anm-link { font-size: 13.5px; color: var(--akzent-text); text-decoration: none; border-radius: 4px; }
.anm-link:hover { text-decoration: underline; }
.anm-reihe .anm-link { margin-left: auto; }

/* Fehlermeldung: freundlich, mit Symbol, nur sichtbar wenn Text da ist */
.anm .fehlertext.anm-fehler { display: flex; align-items: flex-start; gap: 9px; margin: 0 0 14px; padding: 10px 12px; min-height: 0;
  border-radius: 6px; background: var(--gefahr-soft); color: var(--text); font-size: 13.5px; line-height: 1.4; border-left: 3px solid var(--gefahr); }
.anm .fehlertext.anm-fehler:empty { display: none; }
.anm .fehlertext.anm-fehler::before {
  content: ""; flex: none; width: 16px; height: 16px; margin-top: 1px; background: var(--gefahr);
  -webkit-mask: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 7.5v5.5M12 16.5h.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='%23000' stroke-width='2.2' stroke-linecap='round'%3E%3Ccircle cx='12' cy='12' r='9.5'/%3E%3Cpath d='M12 7.5v5.5M12 16.5h.01'/%3E%3C/svg%3E") center / contain no-repeat;
}

/* Hauptknopf mit Lade-Zustand */
.anm .kn.haupt, .anm-knopf {
  width: 100%; height: calc(var(--d-feld, 32px) + 8px); border-radius: 6px; font-size: calc(var(--d-schrift, 14px) + 1px + var(--d-plus, 0px));
  font-weight: 600; margin: 0; display: inline-flex; align-items: center; justify-content: center; gap: 10px; border: 0;
  background: linear-gradient(135deg, var(--fuell1), var(--fuell2)); color: #fff; cursor: pointer;
  box-shadow: 0 1px 2px rgba(20, 30, 60, .2); transition: filter .12s, box-shadow .12s;
}
.anm .kn.haupt:hover { filter: brightness(1.07); box-shadow: 0 4px 12px rgba(59, 91, 219, .3); }
.anm .kn.haupt:disabled { opacity: 1; filter: saturate(.85); cursor: progress; }
.anm .kn.haupt:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.anm-dreh { width: 16px; height: 16px; border-radius: 50%; border: 2px solid rgba(255, 255, 255, .45); border-top-color: #fff; animation: anm-dreh .8s linear infinite; flex: none; }
@keyframes anm-dreh { to { transform: rotate(360deg); } }
@media (prefers-reduced-motion: reduce) { .anm-dreh { animation-duration: 2.4s; } }

.anm-oder { display: flex; align-items: center; gap: 12px; color: var(--muted); font-size: 12.5px; margin: 18px 0 14px; }
.anm-oder::before, .anm-oder::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.anm .kn.anm-zweit { width: 100%; height: calc(var(--d-feld, 32px) + 8px); border-radius: 6px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  border: 1px solid var(--line); background: var(--panel); color: var(--text); text-decoration: none; }
.anm .kn.anm-zweit:hover { background: var(--hover); }
.anm-sicher { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 12.5px; margin: 18px 0 0; text-align: center; }
.anm-sicher svg.ic { width: 14px; height: 14px; flex: none; }

/* Client: Hinweise unter dem Assistenten (Schutz der Anmeldung, geeignete Postfächer) */
.anm-mitte form > p.hilfe { margin: 10px 0 0; font-size: 12.5px; color: var(--muted); }
.anm-mitte form > p.hilfe + p.hilfe { margin-top: 6px; }
.anm-fuss { color: var(--muted); font-size: 12px; line-height: 1.55; padding: 8px 26px 4px 0; text-align: center; }
.anm-fuss span { white-space: nowrap; }

/* Zweiter Schritt (Code, Einrichtung, Notfallcodes) in derselben Fläche */
.anm-mitte .mfa-form, .anm-mitte .formular { display: flex; flex-direction: column; gap: 0; margin-top: 0; }
.anm-mitte .formular:not(.anm-form) > * + * { margin-top: 12px; }
.anm-mitte .mfa-text, .anm-mitte .formular > p.hilfe, .anm-mitte .mfa-form > p.hilfe { color: var(--muted); font-size: 14px; margin: 0 0 16px; }
.anm-mitte .mfa-code { font-size: 20px; letter-spacing: 4px; text-align: center; font-variant-numeric: tabular-nums; height: calc(var(--d-feld, 32px) + 12px); }
.anm-mitte .mfa-zurueck { justify-content: center; margin-top: 12px; }
.anm-mitte .kn.mfa-zurueck { width: 100%; background: transparent; border: 0; color: var(--akzent-text); height: 32px; }
.anm-mitte .mfa-form .haken, .anm-mitte .formular .schalter { margin: 2px 0 14px; }
.anm-mitte .label, .anm-mitte label.titel { display: block; font-size: 13px; font-weight: 600; margin: 0 0 6px; }

/* ---------------------------------------------------------------- mittlere Breiten */
@media (max-width: 960px) and (min-width: 761px) {
  .anm-marke { padding: 32px 28px 26px; }
  .anm-satz { font-size: 19px; }
  .anm-seite { padding-left: 32px; }
  .anm-mitte { padding-right: 10px; }
  .anm-fuss { padding-right: 10px; }
}
@media (max-height: 640px) and (min-width: 761px) {
  .anmeldung.anm { padding: 12px 24px; }
  .anm-rahmen { min-height: 0; }
  .anm-marke { padding-top: 28px; padding-bottom: 22px; }
  .anm-satz { padding-top: 24px; }
  .anm-punkte { margin-top: 16px; gap: 9px; }
  .anm-seite { padding-top: 12px; padding-bottom: 10px; }
  .anm-mitte { padding-top: 6px; padding-bottom: 4px; }
  .anm-mitte > h1, .anm-mitte form > h1 { font-size: 22px; }
  .anm-unter { margin-bottom: 14px; }
  .anm-zeile, .anm-mitte .zeile { margin-bottom: 10px; }
  .anm-reihe { margin-bottom: 12px; }
  .anm-fuss { padding-top: 4px; }
}

/* ---------------------------------------------------------------- Handy: einspaltig, schmaler Markenkopf */
@media (max-width: 760px) {
  .anmeldung.anm { padding: 0; background: var(--panel); }
  .anm-rahmen { grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 1fr; max-width: none; min-height: 100%; border: 0; border-radius: 0; box-shadow: none; margin: 0; }
  .anm-marke { padding: calc(18px + env(safe-area-inset-top)) 20px 20px; }
  .anm-marke::after { width: 260px; height: 260px; right: -90px; bottom: -150px; }
  .anm-zeichen { width: 38px; height: 38px; border-radius: 10px; }
  .anm-marke .wortmarke { font-size: 24px; }
  .anm-bereich { margin-top: 14px; font-size: 12.5px; }
  .anm-satz, .anm-punkte, .anm-marke-luecke { display: none; }
  .anm-admin { margin-top: 10px; }
  .anm-seite { padding: 8px 16px calc(14px + env(safe-area-inset-bottom)); }
  .anm-mitte { max-width: 420px; padding: 8px 0 8px; justify-content: flex-start; }
  .anm-mitte > h1, .anm-mitte form > h1, .anm-mitte .mfa-h { font-size: 22px; }
  .anm-unter { margin-bottom: 18px; }
  .anm-fuss { padding: 16px 0 0; }
  /* Tippflächen ≥ 44 px, sichtbare Größe bleibt */
  .anm .anm-feld .feld, .anm-mitte .feld { height: 44px; font-size: 16px; }
  .anm .kn.haupt, .anm .kn.anm-zweit { height: 46px; }
}

/* ---------------------------------------------------------------- anmelde-nf (15.11.): auf NeXtEnterprise getrimmt */
/* Dachmarke oben (Zeichen 2b + zweizeilig „NeXt / Enterprise“), darunter das Produkt; Werte wie nxf-anmeldung.css (NeXtFile/NeXtDMS) */
.anm-marke { padding-top: 34px; }
.anm-dach { display: flex; align-items: center; gap: 9px; align-self: flex-start; }
.anm-dach-zeichen { width: 36px; height: 36px; flex: none; display: block; border-radius: 10px; box-shadow: 0 3px 10px rgba(0, 0, 0, .16), inset 0 0 0 1px rgba(255, 255, 255, .22); }
.anm-dach-wort { display: flex; flex-direction: column; font-weight: 800; line-height: .92; letter-spacing: -.01em; white-space: nowrap; color: #fff; }
.anm-dach-wort b { font-weight: 800; font-size: 17px; }
.anm-dach-wort b + b { font-size: 13.6px; }
.anm-dach-wort i { font-style: normal; color: var(--anm-x); }
.anm-kopf.anm-produkt { margin-top: 30px; gap: 14px; }
.anm-produkt .anm-zeichen { width: 52px; height: 52px; border-radius: 14px; }
.anm-produkt .wortmarke { font-size: 30px; font-weight: 800; letter-spacing: -.02em; }
.anm-produkt .anm-by { font-size: 13px; }
.anm-produkt .anm-name::after { content: ""; display: block; width: 36px; height: 3px; margin-top: 10px; border-radius: 3px; background: #35dad2; }
.anm-fuss .anm-server { display: inline-flex; align-items: center; gap: 5px; max-width: 100%; }
.anm-fuss .anm-server svg.ic { width: 13px; height: 13px; flex: none; }
.anm-fuss .anm-server b { font-weight: 600; color: var(--text); overflow-wrap: anywhere; }
.anm-recht { margin-top: 6px; }
.anm-recht a { color: var(--muted); text-decoration: none; display: inline-block; min-height: 24px; line-height: 24px; padding: 0 2px; }
.anm-recht a:hover { color: var(--akzent-text); text-decoration: underline; }
.anm-recht .anm-punkt { padding: 0 3px; opacity: .7; }
@media (max-width: 760px) {
  .anm-dach-zeichen { width: 30px; height: 30px; border-radius: 8px; }
  .anm-dach-wort b { font-size: 15px; } .anm-dach-wort b + b { font-size: 12px; }
  .anm-kopf.anm-produkt { margin-top: 14px; gap: 12px; }
  .anm-produkt .anm-zeichen { width: 40px; height: 40px; border-radius: 11px; }
  .anm-produkt .wortmarke { font-size: 24px; }
  .anm-produkt .anm-name::after { display: none; }
}
