/* ============================================================================
   GMTC QR-Generator · „Swiss Precision"
   Das Interface übernimmt die Anatomie des Schweizer Einzahlungsscheins:
   Papier-Ton als Fläche, tiefes Tannen-Teal als Druckfarbe, Perforations-
   linien mit Schere, QR-Eckmarken als Motiv, Beträge/IBAN in Mono-Schrift.
   Schriften selbst gehostet (CSP: nur 'self', keine externen Requests).
   ========================================================================== */

/* ---------- Schriften (selbst gehostet, variable) ---------- */
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/bricolage-grotesque-latin-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA,
    U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193,
    U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Bricolage Grotesque";
  font-style: normal;
  font-display: swap;
  font-weight: 200 800;
  src: url("fonts/bricolage-grotesque-latin-ext-wght-normal.woff2") format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF,
    U+1D00-1DBF, U+1E00-1EFF, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: "Spline Sans Mono";
  font-style: normal;
  font-display: swap;
  font-weight: 300 700;
  src: url("fonts/spline-sans-mono-latin-wght-normal.woff2") format("woff2-variations");
}

/* ---------- Design-Token ---------- */
:root {
  /* Druckfarben */
  --ink: #0e2c2a;            /* Tannen-Teal, fast schwarz – „Druckfarbe" */
  --ink-2: #133b38;
  --teal: #1d807d;           /* GMTC Teal (Brand) */
  --teal-deep: #166460;
  --teal-ghost: #e6f1ef;     /* Teal-Papierton für Flächen */
  --indigo: #46549e;         /* GMTC Indigo (Sekundärakzent) */
  --indigo-ghost: #eceef7;

  /* Papier & Linien */
  --paper: #f5f4ee;          /* warmes Papier */
  --card: #fffefb;
  --line: #e7e4d8;
  --line-strong: #cfcaba;

  /* Text */
  --text: #12312e;
  --muted: #56645f;
  --faint: #75817b;

  /* Zustände */
  --err: #b3362c;
  --err-bg: #fbeeec;
  --err-br: #e5b6b0;
  --warn-bg: #faf5e6;
  --warn-br: #e0d1a4;
  --warn-tx: #6a5312;
  --ok-bg: #e9f3f0;
  --ok-br: #bcd8d2;
  --ok-tx: #114b47;

  --font-sans: "Bricolage Grotesque", ui-sans-serif, system-ui, "Segoe UI", sans-serif;
  --font-mono: "Spline Sans Mono", ui-monospace, "Cascadia Mono", Consolas, monospace;

  --radius: 16px;
  --radius-s: 10px;
  --shadow-card: 0 1px 2px rgba(14, 44, 42, 0.05), 0 14px 34px -20px rgba(14, 44, 42, 0.22);
}

/* ---------- Basis ---------- */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--paper);
  color: var(--text);
  font-family: var(--font-sans);
  font-size: 16px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
main { flex: 1 1 auto; }
img, svg { max-width: 100%; }
a { color: var(--teal-deep); }
::selection { background: var(--teal); color: #fff; }

/* Sichtbarkeit: [hidden] gewinnt immer (auch gegen display:flex etc.) */
[hidden] { display: none !important; }

/* Tastatur-Fokus deutlich sichtbar (WCAG) */
:focus-visible {
  outline: 2.5px solid var(--teal);
  outline-offset: 2px;
  border-radius: 4px;
}

/* ---------- Bewegung ---------- */
@keyframes rise {
  from { opacity: 0; transform: translateY(14px); }
  to   { opacity: 1; transform: none; }
}
@keyframes spin { to { transform: rotate(360deg); } }

/* ============================================================================
   Kopf: Tinte auf Papier
   ========================================================================== */
.site-header {
  position: relative;
  overflow: hidden;
  background: linear-gradient(135deg, var(--ink) 0%, var(--ink-2) 78%);
  color: #eef6f4;
}
/* Brand-Band: schmale Teal→Indigo-Linie als „Druckkante" */
.site-header::before {
  content: "";
  position: absolute;
  inset: 0 0 auto 0;
  height: 3px;
  background: linear-gradient(90deg, var(--teal) 0%, var(--teal) 55%, var(--indigo) 100%);
}
.header-inner {
  max-width: 760px;
  margin: 0 auto;
  padding: 22px 20px 0;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 14px;
}
.logo { height: 30px; }
.header-tag {
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.16em;
  text-transform: uppercase;
  color: #9fd4cd;
  border: 1px solid rgba(159, 212, 205, 0.4);
  border-radius: 999px;
  padding: 5px 12px;
  white-space: nowrap;
}
.header-hero {
  position: relative;
  z-index: 1;
  max-width: 760px;
  margin: 0 auto;
  padding: 34px 20px 46px;
}
.hero-eyebrow {
  margin: 0 0 12px;
  font-family: var(--font-mono);
  font-size: 0.7rem;
  font-weight: 500;
  letter-spacing: 0.2em;
  text-transform: uppercase;
  color: #8fd0c9;
  animation: rise 0.55s ease both;
}
.header-hero h1 {
  margin: 0;
  font-size: clamp(2.05rem, 4.8vw, 3.15rem);
  font-weight: 750;
  letter-spacing: -0.018em;
  line-height: 1.04;
  color: #fff;
  animation: rise 0.55s ease 0.07s both;
}
.hero-sub, .header-hero p:not(.hero-eyebrow) {
  margin: 14px 0 0;
  max-width: 46ch;
  font-size: 1rem;
  color: #b7d1cd;
  animation: rise 0.55s ease 0.14s both;
}
/* QR-Motiv als Wasserzeichen rechts */
.hero-art {
  position: absolute;
  right: -26px;
  bottom: -34px;
  width: clamp(180px, 26vw, 290px);
  height: auto;
  pointer-events: none;
}
.hero-art .qm { fill: rgba(143, 208, 201, 0.13); }
.hero-art .qx { fill: rgba(29, 128, 125, 0.5); }
.hero-art .qc { fill: var(--ink); }

/* ============================================================================
   Inhalt
   ========================================================================== */
.container {
  max-width: 760px;
  margin: 0 auto;
  padding: 30px 20px 56px;
}

/* ---------- Schrittanzeige: Perforations-Schiene ---------- */
.stepper {
  list-style: none;
  margin: 0 0 26px;
  padding: 0;
  display: flex;
  align-items: center;
  animation: rise 0.5s ease 0.1s both;
}
.step { display: flex; align-items: center; gap: 10px; }
.step + .step { flex: 1 1 auto; }
.step + .step::before {
  content: "";
  flex: 1 1 auto;
  border-top: 2px dashed var(--line-strong);
  margin: 0 14px;
  transition: border-color 0.25s;
}
.step.is-done + .step::before,
.step.is-active + .step.is-active::before { border-top-style: solid; border-color: var(--teal); }
.step-dot {
  width: 31px;
  height: 31px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 50%;
  border: 2px solid var(--line-strong);
  background: var(--card);
  color: var(--muted);
  font-weight: 650;
  font-size: 0.86rem;
  position: relative;
  transition: all 0.25s;
}
.step-name {
  font-size: 0.86rem;
  font-weight: 600;
  color: var(--faint);
  transition: color 0.25s;
}
.step.is-active .step-dot {
  border-color: var(--teal);
  background: var(--teal);
  color: #fff;
  box-shadow: 0 0 0 5px var(--teal-ghost);
}
.step.is-active .step-name { color: var(--ink); }
.step.is-done .step-dot {
  border-color: var(--teal-deep);
  background: var(--teal-deep);
  color: transparent;
}
.step.is-done .step-dot::after {
  content: "✓";
  position: absolute;
  inset: 0;
  display: grid;
  place-items: center;
  color: #fff;
  font-size: 0.85rem;
}
.step.is-done .step-name { color: var(--teal-deep); }

/* ---------- Karten ---------- */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  padding: 26px;
  box-shadow: var(--shadow-card);
  animation: rise 0.55s ease both;
}
.card + .card, .container > * + * { margin-top: 18px; }
.card-head {
  display: flex;
  align-items: center;
  gap: 12px;
  margin-bottom: 18px;
}
.head-icon {
  width: 36px;
  height: 36px;
  flex: 0 0 auto;
  display: grid;
  place-items: center;
  border-radius: 11px;
  background: var(--teal-ghost);
  color: var(--teal-deep);
}
.card-head h2 {
  margin: 0;
  font-size: 1.22rem;
  font-weight: 680;
  letter-spacing: -0.01em;
}

/* ---------- Dropzone: Beleg-Ecke mit QR-Passermarken ---------- */
.dropzone {
  position: relative;
  border: 1.5px dashed var(--line-strong);
  border-radius: 14px;
  background: linear-gradient(180deg, #fcfbf6, #f8f7f0);
  padding: 38px 24px;
  text-align: center;
  cursor: pointer;
  transition: border-color 0.2s, background 0.2s, transform 0.15s;
}
/* Passermarken (QR-Finder-Ecken) */
.dropzone::before, .dropzone::after {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  border: 0 solid var(--teal);
  opacity: 0.55;
  transition: opacity 0.2s;
  pointer-events: none;
}
.dropzone::before { top: 10px; left: 10px; border-top-width: 3px; border-left-width: 3px; }
.dropzone::after { bottom: 10px; right: 10px; border-bottom-width: 3px; border-right-width: 3px; }
.dropzone:hover, .dropzone.dragover {
  border-color: var(--teal);
  background: linear-gradient(180deg, #f3faf8, #ecf5f2);
}
.dropzone:hover::before, .dropzone:hover::after,
.dropzone.dragover::before, .dropzone.dragover::after { opacity: 1; }
.dropzone.dragover { transform: scale(1.008); }
.dz-badge {
  width: 56px;
  height: 56px;
  margin: 0 auto 14px;
  display: grid;
  place-items: center;
  border-radius: 50%;
  background: var(--teal-ghost);
  color: var(--teal-deep);
  transition: transform 0.2s, background 0.2s, color 0.2s;
}
.dropzone:hover .dz-badge, .dropzone.dragover .dz-badge {
  transform: translateY(-3px);
  background: var(--teal);
  color: #fff;
}
.dz-title { margin: 0; font-size: 1.06rem; font-weight: 650; }
.dz-sub { margin: 5px 0 14px; color: var(--muted); font-size: 0.92rem; }
.dz-sub .link { color: var(--teal-deep); font-weight: 650; text-decoration: underline; text-underline-offset: 2px; }
.dz-pill {
  display: inline-block;
  font-family: var(--font-mono);
  font-size: 0.72rem;
  letter-spacing: 0.06em;
  color: var(--muted);
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: 999px;
  padding: 5px 12px;
}
.file-info {
  margin-top: 14px;
  padding: 11px 15px;
  display: flex;
  align-items: baseline;
  gap: 6px;
  flex-wrap: wrap;
  background: var(--paper);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  font-size: 0.92rem;
  animation: rise 0.35s ease both;
}
.file-info .doc { font-weight: 650; overflow-wrap: anywhere; }
.file-info span:not(.doc) { color: var(--muted); font-family: var(--font-mono); font-size: 0.8rem; }

/* ---------- Loader ---------- */
.loader {
  display: flex;
  align-items: center;
  gap: 11px;
  padding: 15px 18px;
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius-s);
  color: var(--muted);
  font-size: 0.94rem;
  box-shadow: var(--shadow-card);
  animation: rise 0.3s ease both;
}
.spinner {
  width: 19px;
  height: 19px;
  flex: 0 0 auto;
  border-radius: 50%;
  border: 2.5px solid var(--teal-ghost);
  border-top-color: var(--teal);
  animation: spin 0.85s linear infinite;
}

/* ---------- Meldungen ---------- */
.alert {
  padding: 13px 16px;
  border-radius: var(--radius-s);
  border: 1px solid;
  border-left-width: 4px;
  font-size: 0.93rem;
  animation: rise 0.35s ease both;
}
.alert-error { background: var(--err-bg); border-color: var(--err-br); border-left-color: var(--err); color: #7c2318; }
.alert-warn { background: var(--warn-bg); border-color: var(--warn-br); border-left-color: #b98f1f; color: var(--warn-tx); }
.alert-warn ul { margin: 7px 0 0; padding-left: 20px; }
.alert-warn li + li { margin-top: 3px; }
.alert-success {
  background: var(--ok-bg);
  border-color: var(--ok-br);
  border-left-color: var(--teal-deep);
  color: var(--ok-tx);
  display: flex;
  align-items: center;
  gap: 6px;
  flex-wrap: wrap;
}
.success-cta { margin-left: 6px; padding: 8px 16px; font-size: 0.88rem; }

/* ---------- Empfänger: „Zahlbar an"-Beleg mit Perforation ---------- */
.field-label {
  display: block;
  margin: 4px 0 7px;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.cust-select {
  width: 100%;
  padding: 11px 13px;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 600;
  color: var(--text);
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-s);
  cursor: pointer;
  transition: border-color 0.2s;
}
.cust-select:hover { border-color: var(--teal); }
.paycard {
  position: relative;
  overflow: hidden;
  margin-top: 12px;
  padding: 15px 18px 17px;
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 12px;
}
.paycard-top {
  position: relative;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding-bottom: 12px;
  margin-bottom: 13px;
  border-bottom: 1.5px dashed var(--line-strong);
}
/* Schere auf der Perforationslinie – wie am echten Zahlteil */
.paycard-top::after {
  content: "✂";
  position: absolute;
  left: 8px;
  bottom: -0.72em;
  padding: 0 5px;
  background: var(--card);
  color: var(--faint);
  font-size: 0.82rem;
  line-height: 1;
}
.paycard-label {
  font-size: 0.68rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--muted);
}
.cc-badge {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-size: 0.72rem;
  font-weight: 650;
  color: var(--teal-deep);
  background: var(--teal-ghost);
  border-radius: 999px;
  padding: 4px 11px;
  white-space: nowrap;
}
.cc-badge::before {
  content: "";
  width: 6px;
  height: 6px;
  border-radius: 50%;
  background: var(--teal);
}
.cc-badge.manual { color: var(--indigo); background: var(--indigo-ghost); }
.cc-badge.manual::before { background: var(--indigo); }
.paycard-name {
  font-size: 1.24rem;
  font-weight: 720;
  letter-spacing: -0.01em;
  color: var(--ink);
}
.paycard-addr { margin-top: 2px; color: var(--muted); font-size: 0.9rem; }
.paycard-iban {
  margin-top: 13px;
  display: flex;
  flex-direction: column;
  gap: 2px;
}
.paycard-iban span {
  font-size: 0.66rem;
  font-weight: 650;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--faint);
}
.paycard-iban strong {
  font-family: var(--font-mono);
  font-weight: 550;
  font-size: 1rem;
  letter-spacing: 0.035em;
  color: var(--ink);
  overflow-wrap: anywhere;
}
.paycard-glyph {
  position: absolute;
  right: -14px;
  bottom: -20px;
  width: 118px;
  height: 118px;
  color: var(--teal);
  opacity: 0.08;
  pointer-events: none;
}

/* ---------- Prüf-Formular ---------- */
.review-grid {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 14px;
  margin-top: 18px;
}
.panel {
  margin: 0;
  padding: 17px 17px 14px;
  background: #fcfbf6;
  border: 1px solid var(--line);
  border-radius: 12px;
  min-width: 0;
}
.panel legend {
  display: flex;
  align-items: center;
  gap: 7px;
  padding: 0 8px;
  font-size: 0.74rem;
  font-weight: 700;
  letter-spacing: 0.1em;
  text-transform: uppercase;
  color: var(--teal-deep);
}
.leg-ico { display: inline-grid; place-items: center; }
.panel label {
  display: block;
  margin-bottom: 11px;
  font-size: 0.8rem;
  font-weight: 600;
  color: var(--muted);
}
.panel input {
  display: block;
  width: 100%;
  margin-top: 5px;
  padding: 10px 12px;
  font-family: inherit;
  font-size: 0.95rem;
  color: var(--text);
  background: var(--card);
  border: 1px solid var(--line-strong);
  border-radius: 9px;
  transition: border-color 0.18s, box-shadow 0.18s;
}
.panel input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-ghost);
}
.panel input[readonly] {
  background: var(--paper);
  color: var(--muted);
  border-style: dashed;
}
.panel input:disabled, .cust-select:disabled { opacity: 0.55; cursor: not-allowed; }
/* Zahlen in präziser Mono-Schrift – wie auf dem Beleg */
#pAmount, #pReference, #pCurrency, #dZip, .mono {
  font-family: var(--font-mono);
  font-weight: 500;
  letter-spacing: 0.02em;
}
#pAmount { text-align: right; font-size: 1.02rem; }
.amount-wrap { position: relative; }
.row { display: flex; gap: 10px; }
.row .grow { flex: 1 1 auto; min-width: 0; }
.row .shrink { flex: 0 0 92px; }
.row .shrink-2 { flex: 0 0 108px; }
.row .shrink-narrow { flex: 0 0 72px; }
.hint { margin: 3px 0 0; font-size: 0.8rem; color: var(--muted); }
.hint strong { font-family: var(--font-mono); font-weight: 600; color: var(--ink); }

/* ---------- Haftungshinweis ---------- */
.disclaimer {
  display: flex;
  align-items: flex-start;
  gap: 9px;
  margin: 20px 0 0;
  padding: 12px 15px;
  background: #fbf8ec;
  border: 1px solid #eadfbc;
  border-radius: var(--radius-s);
  color: #6e5c26;
  font-size: 0.82rem;
  line-height: 1.5;
}
.disclaimer svg { flex: 0 0 auto; margin-top: 1px; color: #b98f1f; }

/* ---------- Aktionen & Buttons ---------- */
.actions {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
  flex-wrap: wrap;
  margin-top: 22px;
}
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 9px;
  border: none;
  border-radius: 11px;
  padding: 13px 22px;
  font-family: inherit;
  font-size: 0.96rem;
  font-weight: 680;
  letter-spacing: 0.005em;
  cursor: pointer;
  transition: transform 0.12s, box-shadow 0.18s, filter 0.18s, background 0.18s, border-color 0.18s;
}
.btn:active { transform: translateY(1px); }
.btn-primary {
  background: linear-gradient(135deg, var(--teal) 0%, var(--teal-deep) 100%);
  color: #fff;
  box-shadow: 0 10px 24px -10px rgba(22, 100, 96, 0.55);
}
.btn-primary:hover:not(:disabled) {
  transform: translateY(-1px);
  filter: brightness(1.05);
  box-shadow: 0 14px 30px -12px rgba(22, 100, 96, 0.65);
}
.btn-primary:disabled { opacity: 0.45; cursor: not-allowed; box-shadow: none; }
.btn-ghost {
  background: transparent;
  border: 1.5px solid var(--line-strong);
  color: var(--text);
}
.btn-ghost:hover:not(:disabled) { border-color: var(--ink); }

/* ---------- Gesperrtes Formular (nach Erfolg) ---------- */
.card.locked .review-grid,
.card.locked .actions,
.card.locked .paycard,
.card.locked .cust-select,
.card.locked .field-label,
.card.locked .disclaimer {
  opacity: 0.45;
  filter: saturate(0.35);
  pointer-events: none;
}

/* ============================================================================
   Fuss: Tinte, gespiegelt zum Kopf
   ========================================================================== */
.site-footer {
  margin-top: 34px;
  background: var(--ink);
  color: #c7dbd7;
  border-top: 3px solid var(--teal);
}
.site-footer > img, .site-footer > div, .site-footer > a { position: relative; }
.site-footer {
  display: flex;
  align-items: flex-start;
  gap: 18px;
  padding: 26px max(20px, calc((100% - 760px) / 2)) 34px;
  font-size: 0.86rem;
}
.footer-logo { height: 28px; opacity: 0.9; flex: 0 0 auto; margin-top: 2px; }
.footer-text { flex: 1 1 auto; }
.site-footer strong { color: #fff; font-weight: 680; }
.site-footer a { color: #9fd4cd; }
.privacy {
  margin: 9px 0 0;
  font-size: 0.76rem;
  color: #92a8a3;
  line-height: 1.55;
  max-width: 58em;
}
.logout {
  flex: 0 0 auto;
  align-self: center;
  font-size: 0.82rem;
  font-weight: 650;
  color: #fff;
  text-decoration: none;
  border: 1px solid rgba(255, 255, 255, 0.35);
  border-radius: 999px;
  padding: 7px 15px;
  transition: background 0.18s, border-color 0.18s;
}
.logout:hover { background: rgba(255, 255, 255, 0.09); border-color: rgba(255, 255, 255, 0.6); }

/* ============================================================================
   Login
   ========================================================================== */
.login-header .header-inner { padding-bottom: 20px; }
.login-wrap {
  flex: 1 1 auto;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 44px 20px;
}
.login-card {
  width: min(420px, 100%);
  padding: 28px;
}
.login-intro { margin: -4px 0 16px; color: var(--muted); font-size: 0.93rem; }
.login-form label {
  display: block;
  font-size: 0.8rem;
  font-weight: 650;
  letter-spacing: 0.05em;
  text-transform: uppercase;
  color: var(--muted);
}
.login-form input {
  display: block;
  width: 100%;
  margin-top: 7px;
  padding: 12px 13px;
  font-family: var(--font-mono);
  font-size: 1rem;
  letter-spacing: 0.06em;
  color: var(--text);
  background: var(--card);
  border: 1.5px solid var(--line-strong);
  border-radius: var(--radius-s);
  transition: border-color 0.18s, box-shadow 0.18s;
}
.login-form input:focus {
  outline: none;
  border-color: var(--teal);
  box-shadow: 0 0 0 3px var(--teal-ghost);
}
.login-btn { width: 100%; margin-top: 16px; }
.login-card .alert { margin-bottom: 14px; }
/* Login-Fuss ohne Logout-Link zentriert lassen */
.site-footer > div:not(.footer-text) { flex: 1 1 auto; }

/* ============================================================================
   Responsive
   ========================================================================== */
@media (max-width: 700px) {
  .review-grid { grid-template-columns: 1fr; }
  .hero-art { width: 170px; right: -40px; bottom: -48px; }
  .header-hero { padding: 26px 20px 40px; }
  .card { padding: 20px; }
  .actions { flex-direction: column-reverse; }
  .actions .btn { width: 100%; }
  .site-footer { flex-wrap: wrap; }
  .logout { align-self: flex-start; }
}
@media (max-width: 480px) {
  .step-name { display: none; }
  .step + .step::before { margin: 0 8px; }
  .hero-art { display: none; }
  .row { flex-wrap: wrap; }
  .row .shrink, .row .shrink-2, .row .shrink-narrow { flex: 1 1 40%; }
}

/* ---------- Reduzierte Bewegung respektieren ---------- */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
}

/* ============================================================================
   Benutzerverwaltung: Kopfzeilen-Navigation, Formulare, Verwaltungstabellen
   ========================================================================== */
.header-right { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: flex-end; }
.user-nav { display: flex; align-items: center; gap: 2px; flex-wrap: wrap; }
.user-email {
  font-family: var(--font-mono); font-size: 0.72rem; color: #9fd4cd;
  padding: 5px 10px; border: 1px solid rgba(159, 212, 205, 0.3); border-radius: 999px;
  max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-right: 4px;
}
.nav-link {
  color: #fff; text-decoration: none; font-size: 0.8rem; font-weight: 650;
  padding: 5px 10px; border-radius: 999px; transition: background 0.18s;
}
.nav-link:hover { background: rgba(255, 255, 255, 0.1); }

/* Formulare auf Login-/Einrichtungs-/Passwortseite */
.login-form label + label { margin-top: 12px; }
.login-form input { font-family: inherit; letter-spacing: normal; }
.login-form input[type="password"] { font-family: var(--font-mono); letter-spacing: 0.06em; }
.form-hint { margin: 10px 0 0; font-size: 0.78rem; color: var(--muted); line-height: 1.5; }
.form-hint a { color: var(--teal-deep); }
.login-intro code { font-family: var(--font-mono); font-size: 0.85em; background: var(--paper); padding: 1px 5px; border-radius: 5px; }

/* Verwaltung */
.container-wide { max-width: 1000px; }
.table-wrap { overflow-x: auto; margin-top: 6px; }
.table { width: 100%; border-collapse: collapse; font-size: 0.88rem; }
.table th {
  text-align: left; font-size: 0.66rem; letter-spacing: 0.12em; text-transform: uppercase;
  color: var(--muted); font-weight: 700; padding: 8px 10px;
  border-bottom: 1.5px dashed var(--line-strong); white-space: nowrap;
}
.table td { padding: 10px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table .mono { font-family: var(--font-mono); font-size: 0.8rem; }
.badge {
  display: inline-block; font-size: 0.66rem; font-weight: 700; letter-spacing: 0.06em;
  text-transform: uppercase; padding: 3px 9px; border-radius: 999px;
  background: var(--teal-ghost); color: var(--teal-deep); white-space: nowrap; vertical-align: middle;
}
.badge-admin { background: var(--indigo-ghost); color: var(--indigo); }
.badge-off { background: #eeece4; color: var(--muted); }
.badge-warn { background: var(--warn-bg); color: var(--warn-tx); }
.badge-err { background: var(--err-bg); color: #7c2318; }
.card-head h2 .badge { margin-left: 8px; font-size: 0.6rem; }
.row-actions { display: flex; gap: 6px; flex-wrap: wrap; }
.btn-sm { padding: 6px 11px; font-size: 0.78rem; border-radius: 8px; }
.btn-danger { background: transparent; border: 1.5px solid var(--err-br); color: var(--err); }
.btn-danger:hover:not(:disabled) { border-color: var(--err); background: var(--err-bg); }
.inline-form {
  display: flex; gap: 12px; flex-wrap: wrap; align-items: flex-end;
  margin-top: 18px; padding-top: 16px; border-top: 1.5px dashed var(--line-strong);
}
.inline-form label { display: flex; flex-direction: column; gap: 5px; font-size: 0.78rem; font-weight: 650; color: var(--muted); }
.inline-form input, .inline-form select {
  padding: 9px 11px; border: 1px solid var(--line-strong); border-radius: 9px;
  font-family: inherit; font-size: 0.92rem; background: var(--card); color: var(--text); min-width: 230px;
}
.inline-form input:focus, .inline-form select:focus { outline: none; border-color: var(--teal); box-shadow: 0 0 0 3px var(--teal-ghost); }
.secret-box {
  margin-top: 14px; padding: 14px 16px; background: var(--ok-bg); border: 1px solid var(--ok-br);
  border-left: 4px solid var(--teal-deep); border-radius: var(--radius-s); color: var(--ok-tx);
}
.secret-box code {
  display: inline-block; font-family: var(--font-mono); font-size: 1.05rem; letter-spacing: 0.08em;
  background: var(--card); border: 1px dashed var(--line-strong); padding: 6px 10px; border-radius: 8px;
  margin: 8px 8px 4px 0; user-select: all;
}
.muted { color: var(--muted); font-size: 0.84rem; margin: 0 0 6px; }
.muted a { color: var(--teal-deep); }
.kv { font-family: var(--font-mono); font-size: 0.74rem; color: var(--muted); }
.cards-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; margin-top: 18px; }
.cards-2 .card { margin-top: 0; }
@media (max-width: 760px) {
  .cards-2 { grid-template-columns: 1fr; }
  .inline-form label { width: 100%; }
  .inline-form input, .inline-form select { min-width: 0; width: 100%; }
  .inline-form .btn { width: 100%; }
  .user-email { max-width: 160px; }
}
