/* ═══════════════════════════════════════════════════
   Migrationstool – Grundstile
   Farben und Typografie aus dem GBS-Design-System
   ═══════════════════════════════════════════════════ */

:root {
  /* Marke */
  --clr-primary:    #9A001A;
  --clr-primary-h:  #B80020;
  --clr-secondary:  #54595F;

  /* Flächen */
  --clr-bg:         #F4F5F7;
  --clr-surface:    #FFFFFF;
  --clr-border:     #E3E5EA;
  --clr-border-mid: #C4C8CE;

  /* Text */
  --clr-heading:    #1a1d27;
  --clr-text:       #54595F;
  --clr-muted:      #9AA0A8;

  /* Zustände */
  --clr-success:    #3C8A48;
  --clr-success-bg: #E8F5EA;
  --clr-danger:     #C0392B;
  --clr-danger-bg:  #FCEAEA;
  --clr-warn:       #8A6200;
  --clr-warn-bg:    #FFF8E6;
  --clr-warn-brd:   #F0D48A;

  /* Typografie */
  --font-primary:   'Roboto', system-ui, -apple-system, sans-serif;
  --font-heading:   'Roboto Slab', Georgia, serif;

  --radius:         14px;
  --radius-sm:      9px;
  --shadow:         0 8px 32px rgba(15, 17, 23, .08);
}

* { box-sizing: border-box; }

/* Das hidden-Attribut muss jede display-Regel schlagen.
   Der Browser setzt dafür nur `display: none` auf Elementebene – jede
   Klassen- oder ID-Regel mit `display` gewinnt und das Element bleibt
   sichtbar. Genau das ließ den Ladehinweis der Tabelle dauerhaft
   stehen. */
[hidden] { display: none !important; }

body {
  margin: 0;
  background: var(--clr-bg);
  color: var(--clr-heading);
  font-family: var(--font-primary);
  font-size: 14px;
  -webkit-font-smoothing: antialiased;
}

h1, h2, h3 {
  font-family: var(--font-heading);
  font-weight: 700;
  color: var(--clr-heading);
  margin: 0;
  text-wrap: balance;
}

a { color: var(--clr-primary); }
a:hover { color: var(--clr-primary-h); }

/* ── Formularelemente ─────────────────────────────── */

.field { margin-bottom: 16px; }

.field label {
  display: block;
  font-size: 12px;
  font-weight: 600;
  color: var(--clr-text);
  letter-spacing: .2px;
  margin-bottom: 7px;
  text-transform: uppercase;
}

.input-wrap {
  display: flex;
  align-items: center;
  gap: 10px;
  height: 46px;
  padding: 0 14px;
  background: var(--clr-surface);
  border: 1px solid var(--clr-border);
  border-radius: var(--radius-sm);
  transition: border-color .12s;
}

.input-wrap:focus-within {
  border-color: var(--clr-primary);
  border-width: 2px;
  padding: 0 13px;
}

.input-wrap svg { flex-shrink: 0; color: var(--clr-muted); }
.input-wrap:focus-within svg { color: var(--clr-primary); }

.input-wrap input {
  flex-grow: 1;
  border: none;
  outline: none;
  background: none;
  font-family: inherit;
  font-size: 14px;
  color: var(--clr-heading);
  min-width: 0;
}

.input-wrap input::placeholder { color: var(--clr-muted); }

.toggle-pw {
  background: none;
  border: none;
  padding: 4px;
  cursor: pointer;
  color: var(--clr-muted);
  display: flex;
  border-radius: 4px;
}
.toggle-pw:hover { color: var(--clr-text); }
.toggle-pw:focus-visible { outline: 2px solid var(--clr-primary); outline-offset: 1px; }

/* ── Schaltflächen ────────────────────────────────── */

.btn {
  display: flex;
  align-items: center;
  justify-content: center;
  gap: 10px;
  width: 100%;
  height: 50px;
  border: none;
  border-radius: 10px;
  background: var(--clr-primary);
  color: #FFFFFF;
  font-family: inherit;
  font-size: 15px;
  font-weight: 600;
  cursor: pointer;
  transition: background .12s;
}

.btn:hover:not(:disabled) { background: var(--clr-primary-h); }
.btn:focus-visible { outline: 2px solid var(--clr-heading); outline-offset: 2px; }
.btn:disabled { opacity: .55; cursor: not-allowed; }

/* ── Meldungen ────────────────────────────────────── */

.msg {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 13px 15px;
  border-radius: var(--radius-sm);
  font-size: 13px;
  line-height: 1.55;
  margin-bottom: 18px;
}

.msg svg { flex-shrink: 0; margin-top: 1px; }

.msg-error   { background: var(--clr-danger-bg);  color: var(--clr-danger); }
.msg-success { background: var(--clr-success-bg); color: var(--clr-success); }
.msg-info    { background: var(--clr-bg);         color: var(--clr-text); }
.msg-warn    { background: var(--clr-warn-bg);    color: var(--clr-warn); border: 1px solid var(--clr-warn-brd); }

.msg ul { margin: 6px 0 0; padding-left: 18px; }
.msg li { margin-bottom: 3px; }

/* ── Passwortstärke ───────────────────────────────── */

.pw-meter { margin-top: 10px; }

.pw-bar {
  height: 4px;
  background: var(--clr-border);
  border-radius: 2px;
  overflow: hidden;
}

.pw-bar span {
  display: block;
  height: 100%;
  width: 0;
  background: var(--clr-danger);
  transition: width .2s, background .2s;
}

.pw-bar.ok   span { background: var(--clr-success); }
.pw-bar.mid  span { background: var(--clr-warn); }

.pw-hint {
  font-size: 12px;
  color: var(--clr-muted);
  margin-top: 7px;
  line-height: 1.5;
}

/* ── Zugänglichkeit ───────────────────────────────── */

.visually-hidden {
  position: absolute;
  width: 1px; height: 1px;
  padding: 0; margin: -1px;
  overflow: hidden;
  clip: rect(0 0 0 0);
  white-space: nowrap;
}

@media (prefers-reduced-motion: reduce) {
  * { transition: none !important; animation: none !important; }
}
