/* Zugangs-Shell V2 · nach Neu/14 und Referenz nordprax-login-redesign-v2.html
 * Baut auf np-ui.css (Tokens) auf. Maße wörtlich aus der Vorgabe:
 * Kopf 72 px, Rahmen max. 1180 px, Spalten 1.15fr/.85fr, Formspalte min. 410 px,
 * Radius 8 px, Eingaben/Primäraktion 44 px.
 */

* { box-sizing: border-box; }
html { min-width: 320px; background: var(--np-page); }
body.np-auth {
  min-height: 100dvh; margin: 0;
  background: var(--np-page); color: var(--np-text);
  font: 14px/20px Inter, "Segoe UI", Arial, sans-serif;
  transition: background-color .18s, color .18s;
}
button, input { font: inherit; }
button { cursor: pointer; }

.np-sprung {
  position: fixed; z-index: 20; left: 16px; top: -60px;
  padding: 10px 14px; border-radius: 7px;
  background: var(--np-primary); color: var(--np-primary-ink);
  transition: top .14s;
}
.np-sprung:focus { top: 12px; }

/* ---- Kopf: 72 px, Navy, EINE Marke -------------------------------------- */
.np2-kopf {
  height: 72px; padding: 0 clamp(18px, 3vw, 38px);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
  border-bottom: 1px solid #45616e;
  background: var(--np-navy); color: #f2f7f8;
  box-shadow: 0 3px 13px rgba(0, 0, 0, .18);
}
.np2-marke { display: flex; align-items: center; gap: 10px; color: inherit; text-decoration: none; font-weight: 700; }
.np2-zeichen { width: 38px; height: 38px; flex: 0 0 auto; }
.np2-zeichen img { display: block; width: 100%; height: 100%; }
.np2-marktext { display: grid; gap: 1px; line-height: 1; }
.np2-marktext b { font-size: 16px; letter-spacing: -.02em; }
.np2-marktext span { font-size: 11px; color: #c7d6dc; font-weight: 600; letter-spacing: .04em; }
.np2-kopf-rechts { display: flex; gap: 8px; }
/* 44 px statt 40 px (01.09.2026): Das ist die Zielgroesse fuer Touch, und der
 * Hilfe-Knopf ist unter 600 px nur noch ein "?" - ohne Mindestmass waere er
 * das kleinste Ziel der Seite. Die Textgroesse bleibt unveraendert; nur die
 * Trefferflaeche waechst. */
.np2-kopfknopf {
  min-height: 44px; min-width: 44px;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  padding: 0 12px; border: 1px solid #5d747e; border-radius: 7px;
  background: #142a35; color: #e5ecef; text-decoration: none;
  transition: background .15s, border-color .15s, transform .12s;
}
/* Die Breite ist fuer die LAENGSTE Beschriftung reserviert. np-auth.js ersetzt
 * "Darstellung wechseln" nach dem Laden durch "Hellmodus" bzw. "Dunkelmodus" -
 * ohne Reservierung schrumpfte der Knopf beim Skriptlauf und zoege den
 * Hilfe-Knopf mit sich. Genau der Ladesprung, den die Vorgabe verbietet. */
.np2-thema { min-width: 11.25rem; }
.np2-themakurz { display: none; }
.np2-kopfknopf:hover { background: #1a3947; border-color: #8ca3ad; }
.np2-kopfknopf:active { transform: translateY(1px); }
.np2-kopfknopf:focus-visible { outline: 0; box-shadow: var(--np-focus); }

/* ---- Portalrahmen --------------------------------------------------------- */
.np2-seite {
  min-height: calc(100dvh - 72px);
  display: grid; grid-template-rows: 1fr auto;
  padding: clamp(24px, 5vh, 56px) clamp(18px, 4vw, 56px) 22px;
}
.np2-rahmen {
  width: min(1180px, 100%);
  min-height: min(680px, calc(100dvh - 148px));
  margin: auto;
  display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(410px, .85fr);
  overflow: hidden;
  border: 1px solid var(--np-border-strong);
  border-radius: 8px;
  background: var(--np-surface);
  box-shadow: var(--np-shadow-strong);
  animation: np2-rahmen-ein .28s cubic-bezier(.2,.8,.2,1) both;
}

/* ---- Kontextspalte: Navy mit feinem Raster ------------------------------- */
.np2-kontext {
  min-width: 0; padding: clamp(34px, 5vw, 70px);
  display: flex; flex-direction: column; justify-content: space-between; gap: 42px;
  position: relative; isolation: isolate;
  background: linear-gradient(145deg, rgba(79,192,182,.09), transparent 42%), var(--np-navy);
  color: #edf5f6;
}
.np2-kontext::after {
  content: ""; position: absolute; inset: 0; z-index: -1; opacity: .2;
  background-image:
    linear-gradient(rgba(255,255,255,.09) 1px, transparent 1px),
    linear-gradient(90deg, rgba(255,255,255,.09) 1px, transparent 1px);
  background-size: 48px 48px;
  mask-image: linear-gradient(to bottom right, #000, transparent 76%);
}
.np2-eyebrow { margin: 0 0 14px; color: #8edcd5; font-size: 11px; font-weight: 800; letter-spacing: .12em; text-transform: uppercase; }
.np2-kontext h1 { max-width: 650px; margin: 0; font-size: clamp(36px, 4.1vw, 58px); line-height: 1.05; letter-spacing: -.035em; }
.np2-intro { max-width: 570px; margin: 22px 0 0; color: #c4d4da; font-size: 16px; line-height: 26px; }
.np2-liste { max-width: 600px; display: grid; border-top: 1px solid rgba(255,255,255,.18); }
.np2-zeile {
  display: grid; grid-template-columns: 40px 1fr auto; align-items: center; gap: 14px;
  min-height: 68px; border-bottom: 1px solid rgba(255,255,255,.14);
  animation: np2-zeile-ein .26s cubic-bezier(.2,.8,.2,1) both;
}
.np2-zeile:nth-child(2) { animation-delay: .045s; }
.np2-zeile:nth-child(3) { animation-delay: .09s; }
.np2-index {
  width: 32px; height: 32px; display: grid; place-items: center;
  border: 1px solid rgba(142,220,213,.55); border-radius: 7px;
  color: #9ee5de; font-size: 11px; font-weight: 800;
}
.np2-zeile b, .np2-zeile small { display: block; }
.np2-zeile b { font-size: 14px; }
.np2-zeile small { margin-top: 2px; color: #aebfc6; font-size: 12px; }
.np2-pfeil { color: #8edcd5; font-size: 18px; }
.np2-zusage {
  display: flex; align-items: center; gap: 12px;
  padding-top: 20px; border-top: 1px solid rgba(255,255,255,.18); color: #c8d8dd;
}
.np2-zusagezeichen {
  width: 36px; height: 36px; display: grid; place-items: center; flex: 0 0 auto;
  border: 1px solid rgba(142,220,213,.6); border-radius: 50%;
  background: rgba(79,192,182,.1); color: #9ee5de; font-weight: 800;
}
.np2-zusagetext { min-width: 0; }
.np2-zusage b { display: block; color: #edf5f6; font-size: 13px; }
.np2-zusagemerkmale { display: block; margin-top: 2px; font-size: 11px; }

/* ---- Formularspalte -------------------------------------------------------- */
.np2-formbereich {
  min-width: 0; padding: clamp(34px, 4.4vw, 64px);
  display: flex; flex-direction: column; justify-content: center;
  background: var(--np-surface);
}
/* .np2-dienst und .np2-punkt sind ENTFERNT (01.09.2026) - die gruene
 * Statusmarke "Anmeldedienst verfuegbar" war fest im Template verdrahtet und
 * hatte keine Datenquelle. Nicht wieder aufnehmen ohne echte serverseitige
 * Ermittlung; siehe Kopfkommentar in web/templates/_auth.html. */

/* Vorhandene Karte (Fachlogik unangetastet) im V2-Kleid */
.np-auth-karte { animation: np2-view-ein .21s cubic-bezier(.2,.8,.2,1) both; }
/* h2, nicht h1: Die Seitenueberschrift ist .np2-kontext h1 (#np2-titel, Ziel
 * von aria-labelledby). Groesse, Abstaende und Farbe sind unveraendert - es
 * wechselt nur die Ebene, nicht die Typografie. */
.np-auth-karte h2 { margin: 0; font-size: 30px; line-height: 36px; letter-spacing: -.025em; color: var(--np-text); }
.np-auth-hinweis { margin: 8px 0 28px; color: var(--np-text-muted); line-height: 22px; }
.np-feld { display: grid; gap: 7px; margin-bottom: 16px; }
.np-feld > label { color: var(--np-text); font-size: 12px; font-weight: 700; }
.np-pflicht { color: var(--np-danger); }
.np-feld input, .np-auth-kennwort {
  width: 100%; min-height: 44px;
  border: 1px solid var(--np-border); border-radius: 7px;
  background: var(--np-surface-raised); color: var(--np-text);
  transition: border-color .15s, box-shadow .15s;
}
.np-feld input { padding: 0 12px; outline: 0; }
.np-feld input:hover, .np-auth-kennwort:hover { border-color: var(--np-border-strong); }
.np-feld input:focus-visible, .np-auth-kennwort:focus-within { border-color: var(--np-primary); box-shadow: var(--np-focus); }
.np-feld input::placeholder { color: var(--np-text-muted); opacity: .78; }
.np-auth-kennwort { display: grid; grid-template-columns: minmax(0,1fr) auto; overflow: hidden; }
.np-auth-kennwort input { min-width: 0; border: 0; border-radius: 0; background: transparent; box-shadow: none !important; }
.np-auth-zeigen {
  min-width: 82px; min-height: 44px;
  border: 0; border-left: 1px solid var(--np-border);
  background: transparent; color: var(--np-primary); font-size: 12px; font-weight: 700;
}
.np-auth-zeile {
  margin: 2px 0 22px; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  font-size: 12px;
}
.np-auth-zeile a {
  color: var(--np-primary); font-weight: 700; text-decoration: underline;
  text-decoration-color: transparent; text-underline-offset: 3px;
}
.np-auth-zeile a:hover { text-decoration-color: currentColor; }
.np-auth-senden, .np-btn-primaer {
  width: 100%; min-height: 44px;
  display: flex; align-items: center; justify-content: center; gap: 9px;
  border: 1px solid var(--np-primary); border-radius: 7px;
  background: var(--np-primary); color: var(--np-primary-ink); font-weight: 750;
  box-shadow: 0 6px 16px color-mix(in srgb, var(--np-primary) 23%, transparent);
  transition: filter .15s, box-shadow .15s, transform .12s;
}
.np-auth-senden:hover { filter: brightness(1.06); }
.np-auth-senden:active { transform: translateY(1px); }
.np-auth-senden:focus-visible { outline: 0; box-shadow: var(--np-focus); }
/* Registrierung NACH der Hauptaktion und in Fliesstext: ein Satz mit Link,
 * kein zweiter Aktionslink gleichen Gewichts neben "Kennwort vergessen?". */
.np-auth-nachrang {
  margin: 16px 0 0; color: var(--np-text-muted); text-align: center;
  font-size: 12px; line-height: 20px;
}
.np-auth-nachrang a { color: var(--np-primary); font-weight: 700; text-underline-offset: 3px; }

/* Mindestziele fuer die Textlinks des Zugangsbereichs: 28 px auf dem Desktop
 * (ueber dem Minimum von 24 px), 44 px sobald mit dem Finger bedient wird.
 * Umgesetzt ueber die Trefferflaeche, nicht ueber die Schriftgroesse - die
 * bleibt, wie sie war. */
.np-auth-zeile a, .np-auth-nachrang a, .np2-fuss a {
  display: inline-flex; align-items: center; min-height: 28px;
}

.np-auth-fuss {
  margin: 22px 0 0; padding-top: 19px; border-top: 1px solid var(--np-border);
  color: var(--np-text-muted); text-align: center; font-size: 12px;
}

/* Fehler und Hinweise: links markiert, mit Handlungssatz */
.np-fehler, .np-hinweis {
  margin: 0 0 18px; padding: 11px 12px;
  border: 1px solid var(--np-danger); border-left: 3px solid var(--np-danger);
  border-radius: 7px; background: var(--np-danger-bg); color: var(--np-danger); font-size: 12px;
}
.np-fehler-titel { display: block; font-weight: 700; }
.np-fehler-tun { display: block; margin-top: 2px; }
.np-hinweis {
  border-color: var(--np-ok); border-left-color: var(--np-ok);
  background: var(--np-ok-bg); color: var(--np-ok);
}

/* ---- Fuß -------------------------------------------------------------------- */
.np2-fuss {
  width: min(1180px, 100%); margin: 18px auto 0;
  display: flex; align-items: center; justify-content: space-between; gap: 18px;
  color: var(--np-text-muted); font-size: 11px;
}
.np2-fuss a { color: inherit; text-underline-offset: 3px; }
.np2-fusslinks { display: flex; gap: 16px; }

/* ---- Bewegung ---------------------------------------------------------------- */
@keyframes np2-rahmen-ein { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }
@keyframes np2-zeile-ein { from { opacity: 0; transform: translateX(-7px); } to { opacity: 1; transform: none; } }
@keyframes np2-view-ein { from { opacity: 0; transform: translateY(5px); } to { opacity: 1; transform: none; } }

/* ---- Responsive ---------------------------------------------------------------- */
@media (max-width: 900px) {
  .np2-seite { padding: 20px 18px; }
  .np2-rahmen { grid-template-columns: 1fr; min-height: 0; }
  .np2-kontext { padding: 28px; gap: 25px; }
  .np2-kontext h1 { font-size: 32px; }
  .np2-intro { margin-top: 12px; font-size: 14px; line-height: 22px; }
  .np2-liste { grid-template-columns: repeat(3, 1fr); max-width: none; border: 0; gap: 8px; }
  .np2-zeile { min-height: 82px; padding: 11px; display: block; border: 1px solid rgba(255,255,255,.17); border-radius: 7px; }
  .np2-index { margin-bottom: 8px; }
  .np2-zeile small, .np2-pfeil { display: none; }
  .np2-formbereich { padding: 34px 28px 38px; }
  /* Die Zusage bleibt SICHTBAR, nur kompakter. Vorher stand sie hier im
   * display:none - der Hinweis auf den geschuetzten Firmenzugang fehlte damit
   * genau auf den Geraeten, auf denen er am meisten traegt. Sie sitzt am Ende
   * der Kontextspalte, also VOR dem Formular, und verdraengt es nicht. */
  .np2-zusage { gap: 10px; padding-top: 14px; }
  .np2-zusagezeichen { width: 28px; height: 28px; font-size: 12px; }
  .np2-zusage b { font-size: 12px; }
}
@media (max-width: 600px) {
  .np2-kopf { height: 64px; padding: 0 14px; gap: 12px; }
  /* Unter 600 px traegt das Logo die Marke allein; den Namen fuehren das
   * aria-label von .np2-marke und der Seitentitel. Nur so bleibt neben dem
   * BESCHRIFTETEN Theme-Schalter Platz, ohne dass der Kopf umbricht:
   * 38 + 12 + 120 + 8 + 44 passt in 320 px. */
  .np2-marktext, .np2-hilfetext, .np2-themalang { display: none; }
  .np2-themakurz { display: inline; }
  .np2-thema { min-width: 7.5rem; }
  /* Fingerbedienung: dieselben Links, groessere Flaeche. */
  .np-auth-zeile a, .np-auth-nachrang a, .np2-fuss a { min-height: 44px; }
  .np2-seite { min-height: calc(100dvh - 64px); padding: 12px; }
  .np2-rahmen { border-radius: 7px; }
  .np2-kontext { padding: 22px 20px; }
  .np2-kontext h1 { font-size: 25px; line-height: 31px; }
  .np2-intro, .np2-liste { display: none; }
  .np2-formbereich { padding: 26px 20px 30px; }
  .np-auth-karte h2 { font-size: 26px; line-height: 32px; }
  /* Knapper, aber vorhanden. */
  .np2-zusage { padding-top: 12px; }
  .np2-zusagezeichen { width: 24px; height: 24px; font-size: 11px; }
  .np2-zusagemerkmale { font-size: 10.5px; }
  .np-auth-zeile { align-items: flex-start; flex-direction: column; gap: 11px; }
  .np2-fuss { align-items: flex-start; flex-direction: column; gap: 6px; margin-top: 12px; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: .01ms !important;
  }
}
