/*
 * Stilblatt der Seiten des Anmeldeservers. Maße, Farben und Klassen stammen aus den Tafeln
 * Main.dc.html (Anmelden), PasswortSetzen.dc.html und MobilAnmelden.dc.html; die Token --wt-*
 * sind die aus WoTraMa.App/src/styles/tokens.scss (nur die hier gebrauchten).
 * Kein Inline-Stil in den Seiten: die Content-Security-Policy erlaubt nur dieses Stilblatt.
 */
:root {
  --wt-surface: #ffffff;
  --wt-surface-sunken: #fafbfa;
  --wt-selected: #f4f9f7;
  --wt-line: #f0f3f2;
  --wt-line-mid: #e4e9e7;
  --wt-rule: #c9d2cf;
  --wt-field-line: #d5dcda;
  --wt-ink: #141a18;
  --wt-ink-soft: #5c6663;
  --wt-ink-dim: #98a19e;
  --wt-accent: #00775b;
  --wt-accent-ink: #00553f;
  --wt-error: #a13636;
  --wt-warn: #9c5a00;
  --wt-font: 'Segoe UI', system-ui, -apple-system, sans-serif;
  --wt-font-mono: 'Cascadia Mono', Consolas, ui-monospace, monospace;
  --wt-shadow: 0 8px 20px -8px rgb(20 26 24 / 30%);
  --wt-text: 12.5px;
  --wt-text-small: 11.5px;
  --wt-label: 9.5px;
  --wt-value: 14px;
  --wt-gutter: 22px;
  --wt-radius: 8px;
}

body {
  margin: 0;
  font-family: var(--wt-font);
  font-size: var(--wt-text);
  color: var(--wt-ink);
  background: var(--wt-surface-sunken);
}

button,
input {
  font: inherit;
}

.wt-page {
  box-sizing: border-box;
  min-height: 680px;
  display: grid;
  place-items: center;
  padding: 40px var(--wt-gutter);
  background: var(--wt-surface-sunken);
}

.wt-dialog {
  width: 660px;
  max-width: 100%;
  background: var(--wt-surface);
  border: 1px solid var(--wt-rule);
  border-radius: var(--wt-radius);
  overflow: hidden;
  box-shadow: var(--wt-shadow);
}

.split {
  display: grid;
  grid-template-columns: 244px 1fr;
}

.brand {
  display: flex;
  flex-direction: column;
  justify-content: space-between;
  gap: 34px;
  padding: 28px 26px;
  background: var(--wt-surface-sunken);
  border-right: 1px solid var(--wt-rule);
}

/* Auf der Tafel ein Inline-Stil am Bild. */
.brand img {
  display: block;
  width: 132px;
  height: auto;
}

/* Das Zeichen ohne Schriftzug zeigt nur der Kopf am Handy (unter 640 px). */
.brand .logo-sign {
  display: none;
}

.brand .wt-label {
  margin: 0;
}

.version {
  margin-top: 10px;
  font-size: var(--wt-text-small);
  color: var(--wt-ink-soft);
}

.kennung {
  margin-top: 2px;
  font-size: 10px;
  line-height: 1.3;
  letter-spacing: 0.02em;
  color: var(--wt-ink-dim);
}

.body {
  display: flex;
  flex-direction: column;
  justify-content: center;
  padding: 28px 30px 30px;
}

.title {
  margin-bottom: 22px;
}

.title strong {
  display: block;
  font-size: var(--wt-value);
  font-weight: 600;
  letter-spacing: 0.01em;
}

.title span {
  display: block;
  margin-top: 3px;
  color: var(--wt-ink-soft);
}

.actions {
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 20px;
  padding: 14px 26px;
  background: var(--wt-surface-sunken);
  border-top: 1px solid var(--wt-rule);
}

.actions.error {
  justify-content: space-between;
  background: color-mix(in oklab, var(--wt-error) 7%, var(--wt-surface));
  border-top-color: var(--wt-error);
  color: var(--wt-error);
}

/* Seite „Passwort setzen“: links „Angemeldet als …“, rechts der Knopf. */
.actions.between {
  justify-content: space-between;
}

/* Die Meldung in der Fußzeile; die Tafel der Seite „Passwort setzen“ zeigt dort „Angemeldet als …“. */
.stoerung {
  display: flex;
  align-items: baseline;
  gap: 10px;
  min-width: 0;
  text-wrap: pretty;
}

.stoerung .wt-label {
  margin: 0;
  color: inherit;
}

.wer {
  font-size: var(--wt-text-small);
  color: var(--wt-ink-soft);
}

.wt-label {
  display: block;
  margin: 0 0 5px;
  font-size: var(--wt-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--wt-ink-dim);
}

.wt-form {
  display: grid;
  gap: 20px;
}

.field input {
  box-sizing: border-box;
  width: 100%;
  padding: 3px 0 6px;
  border: 0;
  border-bottom: 1px solid var(--wt-field-line);
  background: none;
  font-size: var(--wt-value);
  color: var(--wt-ink);
  outline: none;
}

.field input:focus {
  border-bottom-color: var(--wt-accent);
}

.wt-btn {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 8px;
  height: 40px;
  padding: 0 42px;
  border: 0;
  border-radius: var(--wt-radius);
  background: var(--wt-accent);
  color: var(--wt-surface);
  font-size: var(--wt-text);
  font-weight: 600;
  letter-spacing: 0.06em;
  text-decoration: none;
  cursor: pointer;
  white-space: nowrap;
}

.wt-btn:hover {
  background: var(--wt-accent-ink);
}

/* Auf den Tafeln nicht gezeichnet: ein sichtbarer Fokus für die Bedienung mit der Tastatur. */
.wt-btn:focus-visible {
  outline: 2px solid var(--wt-accent-ink);
  outline-offset: 2px;
}

/* Die Regeln der Passwortwahl (Tafel „Passwort setzen“). */
.regeln {
  list-style: none;
  margin: 22px 0 0;
  padding: 0;
  display: grid;
  gap: 7px;
  font-size: var(--wt-text-small);
  color: var(--wt-ink-soft);
}

.regeln li {
  display: flex;
  align-items: center;
  gap: 9px;
}

.regeln .punkt {
  flex: none;
  box-sizing: border-box;
  width: 11px;
  height: 11px;
  border: 1px solid var(--wt-rule);
  border-radius: 50%;
}

.regeln li.ok {
  color: var(--wt-accent-ink);
}

.regeln li.ok .punkt {
  border-color: var(--wt-accent);
  background: var(--wt-accent);
  box-shadow: inset 0 0 0 2px var(--wt-surface);
}

/* Nicht auf der Tafel: die Regel, die der Server nach dem Absenden bemängelt hat. */
.regeln li.fehler {
  color: var(--wt-error);
}

.regeln li.fehler .punkt {
  border-color: var(--wt-error);
}

/* Unter der Liste, ohne Punkt: „Sehr verbreitete Passwörter lehnt der Server ab.“ */
.rules-note {
  margin: 7px 0 0;
  font-size: var(--wt-text-small);
  color: var(--wt-ink-soft);
}

/*
 * Unter 640 px nach der Tafel MobilAnmelden.dc.html: die Karte nimmt die volle Breite, oben ein
 * Kopf mit dem Zeichen und daneben untereinander Bezeichnung, Version und Kennung; Felder und
 * Knöpfe 52 px, Radius 12. Knopf und Meldung stehen direkt unter dem Formular, nicht als Fußleiste
 * am unteren Rand: die Seite ist so hoch wie ihr Inhalt, und bei offener Bildschirmtastatur bleibt
 * der Knopf sichtbar.
 */
@media (max-width: 640px) {
  body {
    background: var(--wt-surface);
  }

  .wt-page {
    display: block;
    min-height: 0;
    padding: 0;
    background: var(--wt-surface);
  }

  .wt-dialog {
    width: 100%;
    border: 0;
    border-radius: 0;
    box-shadow: none;
  }

  .split {
    grid-template-columns: 1fr;
  }

  /* Der Kopf: links das Zeichen über alle drei Zeilen, rechts Bezeichnung, Version, Kennung. */
  .brand {
    display: grid;
    grid-template-columns: auto minmax(0, 1fr);
    grid-template-areas:
      'sign label'
      'sign version'
      'sign kennung';
    align-items: center;
    gap: 0 14px;
    padding: 18px 24px;
    border-right: 0;
    border-bottom: 1px solid var(--wt-rule);
  }

  /* Die Hülle von Logo, Version und Kennung tritt zurück; ihre Teile sitzen direkt im Raster. */
  .brand-info {
    display: contents;
  }

  .brand .logo-full {
    display: none;
  }

  .brand .logo-sign {
    display: block;
    grid-area: sign;
    width: 36px;
  }

  .brand .wt-label {
    grid-area: label;
    font-size: 11px;
    color: var(--wt-ink-soft);
    white-space: nowrap;
  }

  .version {
    grid-area: version;
    margin-top: 2px;
  }

  .kennung {
    grid-area: kennung;
  }

  /*
   * Unten 24 px: der Abstand vom letzten Feld (oder der Liste der Passwortregeln) zum Knopf wie
   * auf der Tafel (Feld 8 px, Rasterabstand 8 px, Knopf 8 px); .actions hat oben keinen Abstand.
   */
  .body {
    justify-content: flex-start;
    padding: 28px 24px 24px;
  }

  .title strong {
    font-size: 22px;
  }

  .title span {
    font-size: 16px;
  }

  .field .wt-label {
    margin-bottom: 8px;
    font-size: 14px;
    font-weight: 400;
    letter-spacing: 0;
    text-transform: none;
    color: var(--wt-ink-soft);
  }

  .field input {
    height: 52px;
    padding: 0 14px;
    border: 1px solid var(--wt-line-mid);
    border-radius: 12px;
    background: var(--wt-surface);
    font-size: 17px;
  }

  .field input:focus {
    border-color: var(--wt-accent);
  }

  /*
   * Ohne eigene Fläche und ohne Linie, auch im Fehlerfall; untereinander: erst die Meldung oder
   * „Angemeldet als …“, darunter der Knopf in voller Breite.
   */
  .actions,
  .actions.error,
  .actions.between {
    flex-direction: column;
    align-items: stretch;
    justify-content: flex-start;
    gap: 8px;
    padding: 0 24px 24px;
    background: none;
    border-top: 0;
  }

  /* Die Meldung als rote Zeile über dem Knopf, ohne die Marke in Großbuchstaben. */
  .stoerung {
    font-size: 14px;
  }

  .stoerung .wt-label {
    display: none;
  }

  .actions .wt-btn {
    width: 100%;
    height: 52px;
    border-radius: 12px;
    font-size: 16px;
    letter-spacing: 0;
  }

  .regeln,
  .rules-note {
    font-size: 14px;
  }
}

/* Seite „Fehler“: die Vorgangsnummer zum Vorlesen am Telefon. */
.vorgang {
  display: block;
  font-family: var(--wt-font-mono);
  font-size: var(--wt-value);
  word-break: break-all;
}

/*
 * Seite „Mein Konto“ (Tafel MeinKonto.dc.html). Die Klassen der Tafel behalten ihre Namen; der
 * Knopf der Tafel heißt hier .btn-secondary, weil .wt-btn dieses Stilblatts der große Hauptknopf ist.
 */
.account-page .seite {
  min-height: 100vh;
  background: var(--wt-surface);
}

.kopf {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 6px 16px;
  padding: 11px var(--wt-gutter);
  border-bottom: 1px solid var(--wt-line-mid);
}

.mark {
  font-size: 12px;
  font-weight: 700;
  letter-spacing: 0.13em;
  text-transform: uppercase;
  color: var(--wt-accent);
}

.current {
  padding-left: 16px;
  border-left: 1px solid var(--wt-line-mid);
  font-weight: 600;
}

.spacer {
  flex: 1;
}

.user {
  font-size: var(--wt-text-small);
  color: var(--wt-ink-soft);
}

.linkknopf {
  padding: 0;
  border: 0;
  background: none;
  font-size: var(--wt-text-small);
  color: var(--wt-accent-ink);
  text-decoration: underline;
  text-decoration-color: var(--wt-field-line);
  text-underline-offset: 3px;
  cursor: pointer;
}

.inhalt {
  box-sizing: border-box;
  max-width: 780px;
  margin: 0 auto;
  padding: 30px var(--wt-gutter) 40px;
}

.inhalt h1 {
  margin: 0;
  font-size: 20px;
  font-weight: 600;
}

.unter {
  margin: 4px 0 0;
  color: var(--wt-ink-soft);
}

.abschnitt {
  margin-top: 30px;
}

.legende {
  margin: 0 0 14px;
  padding-bottom: 7px;
  border-bottom: 1px solid var(--wt-rule);
  font-size: var(--wt-label);
  font-weight: 600;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: var(--wt-ink-dim);
}

.reihe {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 8px 16px;
  padding: 11px 0;
  border-bottom: 1px solid var(--wt-line);
}

.reihe .was {
  flex: 1 1 240px;
  min-width: 0;
}

.reihe .name {
  display: block;
  font-size: var(--wt-value);
}

.reihe .stand {
  display: block;
  margin-top: 2px;
  font-size: var(--wt-text-small);
  color: var(--wt-ink-soft);
}

.btn-secondary {
  box-sizing: border-box;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  height: 30px;
  padding: 0 14px;
  border: 1px solid var(--wt-rule);
  border-radius: var(--wt-radius);
  background: var(--wt-surface);
  color: var(--wt-ink);
  font-size: var(--wt-text);
  cursor: pointer;
  white-space: nowrap;
}

.btn-secondary:hover {
  background: var(--wt-selected);
  border-color: var(--wt-accent);
}

.btn-secondary.warn {
  border-color: var(--wt-error);
  color: var(--wt-error);
}

/* Auf der Tafel nicht gezeichnet: ein sichtbarer Fokus für die Bedienung mit der Tastatur. */
.btn-secondary:focus-visible,
.linkknopf:focus-visible {
  outline: 2px solid var(--wt-accent-ink);
  outline-offset: 2px;
}

.rollbox {
  overflow-x: auto;
}

.rollbox table {
  width: 100%;
  border-collapse: collapse;
  font-size: var(--wt-text);
}

.rollbox th {
  padding: 9px 14px 7px 0;
  border-bottom: 1px solid var(--wt-line-mid);
  font-size: var(--wt-label);
  font-weight: 600;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  text-align: left;
  color: var(--wt-ink-dim);
  white-space: nowrap;
}

.rollbox td {
  padding: 8px 14px 8px 0;
  border-bottom: 1px solid var(--wt-line);
  white-space: nowrap;
}

.rollbox td.zeit {
  font-family: var(--wt-font-mono);
  font-size: var(--wt-text-small);
}

/* Nicht auf der Tafel: Meldung und Bestätigung zum Ändern des Passworts. */
.notice {
  margin-bottom: 16px;
  padding: 10px 14px;
  border: 1px solid var(--wt-accent);
  border-radius: var(--wt-radius);
  background: var(--wt-selected);
  color: var(--wt-accent-ink);
  text-wrap: pretty;
}

.notice.error {
  border-color: var(--wt-error);
  background: color-mix(in oklab, var(--wt-error) 7%, var(--wt-surface));
  color: var(--wt-error);
}

.account-form {
  gap: 20px;
}

.account-form .regeln {
  margin-top: 0;
}

/* Das Stilblatt der Dialogseiten färbt die Seite; „Mein Konto“ ist weiß wie auf der Tafel. */
body.account-page {
  background: var(--wt-surface);
}
