/*
 * RaumZeit Plakat-Stil: Design-Tokens und Komponenten.
 * Vorlage: design/kalender/project/*.dc.html, Doku: design/COMPONENTS.md
 *
 * Koexistenz mit Tailwind/daisyUI (bis alle Seiten umgebaut sind):
 * - Wird nach output.css, daisyUI und dem Legacy-<style> in base.html geladen.
 * - Stylt nur Klassen, keine nackten Elemente (h1, a, input, button).
 * - Shell-Klassen tragen das Präfix rz-, damit sie nicht mit daisyUI
 *   (navbar, menu, footer, alert, avatar, dropdown) kollidieren.
 * - button.* statt .* wo die Legacy-Regel button:not([class*="btn"])
 *   sonst Padding und min-height erzwingt.
 */

/* ------------------------------------------------------------------ */
/* Schrift: Inter lokal (keine Übertragung an Google), Lizenz OFL     */
/* (static/fonts/Inter-OFL.txt). Relative URL, damit die Manifest-     */
/* Storage sie beim collectstatic auf den gehashten Namen umschreibt. */
/* ------------------------------------------------------------------ */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/Inter-Variable.8e433c0592f7.woff2") format("woff2");
}

/* ------------------------------------------------------------------ */
/* Tokens                                                             */
/* ------------------------------------------------------------------ */
:root {
  /* Rot */
  --rz-title: #e74c3c;        /* Seitentitel, roter Strich */
  --rz-red-text: #c0392b;     /* kleine Rottexte, Fehler, Fokus, aktiv */
  --rz-primary: #dc2626;      /* Primärbutton, Logo */
  --rz-primary-hover: #b91c1c;
  --rz-danger: #a93226;       /* destruktive Sekundäraktion */
  --rz-danger-line: #e6b3a8;

  /* Text und dunkle Flächen */
  --rz-ink: #2c3e50;          /* Fließtext dunkel, Tabellenkopf */
  --rz-ink-2: #34495e;        /* Lesetext */
  --rz-muted: #5d6d7e;        /* Sekundärtext */

  /* Linien */
  --rz-line: #dee2e6;
  --rz-line-soft: #e3e7ea;
  --rz-line-faint: #eef0f2;
  --rz-line-header: #e5e8eb;
  --rz-line-ctrl: #cfd6dc;    /* Buttons, Chips */
  --rz-line-input: #aab4bd;   /* Eingabefelder (3:1 gegen Weiß) */

  /* Flächen */
  --rz-bg: #ffffff;
  --rz-surface: #f4f6f7;      /* Hinweisbox, deaktiviert, außerhalb des Monats */
  --rz-surface-2: #eef1f4;    /* Chip-Grund */
  --rz-weekend: #fef5f1;
  --rz-holiday: #fbe9e4;
  --rz-cal-border: #e6cfc6;   /* Legendenkästchen Wochenende/Feiertag */

  /* Raumfarben (nach Helligkeit unterscheidbar) */
  --rz-room-dorftreff: #b03a2e;
  --rz-room-aula: #3b8fd4;

  /* Schalter */
  --rz-switch-off: #8795a1;
  --rz-switch-on: #2c3e50;

  /* Typo */
  /* Inter kommt per @font-face (oben) aus static/fonts/ */
  --rz-font: Inter, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Maße */
  --rz-radius: 8px;
  --rz-radius-lg: 10px;
  --rz-ctrl-h: 40px;          /* Desktop; mobil 44px, siehe unten */
  --rz-input-h: 44px;         /* Desktop; mobil 48px */
  --rz-touch: 44px;
  --rz-gutter: 32px;          /* mobil 16px */
  --rz-max: 1280px;
}

/* ------------------------------------------------------------------ */
/* Basis (nur über Klassen)                                           */
/* ------------------------------------------------------------------ */
.rz-body {
  font-family: var(--rz-font);
  color: var(--rz-ink);
  -webkit-font-smoothing: antialiased;
}
.rz-body ::selection { background: var(--rz-red-text); color: #ffffff; }

.tnum { font-variant-numeric: tabular-nums; }

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

.rz-skip {
  position: absolute; left: 16px; top: -100px; z-index: 100;
  padding: 10px 14px; border-radius: var(--rz-radius);
  background: var(--rz-ink); color: #ffffff; font-weight: 600; text-decoration: none;
}
.rz-skip:focus { top: 8px; color: #ffffff; }

/* Einheitlicher Fokusring für alle neuen Komponenten.
   Setzt die Legacy-Regel button:focus{outline:none;box-shadow} zurück. */
.rz-body :is(.btn2, .btnp, .ibtn, .chip, .lnk, .tlnk, .mlink,
  .rz-logo, .rz-nav a, .rz-avatar, .rz-burger, .rz-menu-list a, .rz-footer a,
  .rz-skip, .rz-msg-close):focus-visible,
.rz-body button:is(.btn2, .btnp, .ibtn, .chip, .rz-avatar, .rz-burger, .rz-msg-close):focus-visible {
  outline: 2px solid var(--rz-red-text);
  outline-offset: 2px;
  box-shadow: none;
}
.rz-body button:is(.btn2, .btnp, .ibtn, .chip, .rz-avatar, .rz-burger, .rz-msg-close):focus:not(:focus-visible) {
  box-shadow: none;
}

/* ------------------------------------------------------------------ */
/* Seitentitel                                                        */
/* ------------------------------------------------------------------ */
.rz-page { max-width: var(--rz-max); margin: 0 auto; padding: 22px var(--rz-gutter) 0; box-sizing: border-box; }

.rz-pagehead {
  display: flex; align-items: flex-end; justify-content: space-between; gap: 16px;
  flex-wrap: wrap; padding-bottom: 12px; border-bottom: 2px solid var(--rz-title);
}
.rz-pagehead-text { display: flex; align-items: baseline; gap: 16px; flex-wrap: wrap; min-width: 0; }
.rz-pagehead-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rz-title {
  margin: 0; font-family: var(--rz-font); font-size: 40px; line-height: 1; font-weight: 900;
  color: var(--rz-title); text-transform: uppercase; letter-spacing: 0.5px; overflow-wrap: anywhere;
}
.rz-subtitle { font-size: 15px; color: var(--rz-muted); }

.h2 { margin: 0; font-size: 18px; font-weight: 700; color: var(--rz-ink); }
.p { margin: 0; font-size: 15px; line-height: 1.6; color: var(--rz-ink-2); }

/* Monats-/Abschnittsbalken in Listen (z. B. "MAI 2026") */
.rz-month {
  margin: 0; padding: 18px 16px 6px; font-size: 15px; font-weight: 900; color: var(--rz-red-text);
  text-transform: uppercase; letter-spacing: 0.5px; border-bottom: 2px solid var(--rz-title);
}

/* ------------------------------------------------------------------ */
/* Buttons                                                            */
/* ------------------------------------------------------------------ */
.btn2, .btnp, .ibtn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  box-sizing: border-box; height: var(--rz-ctrl-h); min-height: 0;
  border: 1px solid var(--rz-line-ctrl); border-radius: var(--rz-radius);
  background: #ffffff; color: var(--rz-ink);
  font: 500 14px/1 var(--rz-font); text-decoration: none; cursor: pointer;
  white-space: nowrap; transition: background-color .15s, border-color .15s;
}
.btn2, .btnp { padding: 0 14px; }
.btn2:hover { background: var(--rz-surface); border-color: var(--rz-line-input); color: var(--rz-ink); }

.btnp { background: var(--rz-primary); border-color: var(--rz-primary); color: #ffffff; font-weight: 600; padding: 0 18px; }
.btnp:hover { background: var(--rz-primary-hover); border-color: var(--rz-primary-hover); color: #ffffff; }

.ibtn { width: var(--rz-ctrl-h); padding: 0; }
.ibtn:hover { background: var(--rz-surface); }
.ibtn.pri { background: var(--rz-primary); border-color: var(--rz-primary); color: #ffffff; }

/* Varianten */
.btn2.danger { color: var(--rz-danger); border-color: var(--rz-danger-line); }
.btn2.danger:hover { background: #fdf2f0; }
.btn2.wide, .btnp.wide { width: 100%; }
.btn2.tall, .btnp.tall { height: 44px; padding: 0 20px; }
:is(.btn2, .btnp, .ibtn):is([disabled], [aria-disabled="true"]) {
  color: var(--rz-muted); background: var(--rz-surface); border-color: var(--rz-line-soft); cursor: not-allowed;
}

/* Textlinks */
.lnk { color: var(--rz-red-text); font-weight: 600; text-decoration: underline; text-underline-offset: 2px; }
.lnk:hover { color: var(--rz-ink); }
.tlnk { display: inline-flex; align-items: center; min-height: var(--rz-touch); }

/* ------------------------------------------------------------------ */
/* Chips (Filter, Unternavigation)                                    */
/* ------------------------------------------------------------------ */
/* button.chip: gleiche Spezifität wie die Legacy-Regel button:not([class*="btn"])
   (Padding, min-height 42px) und später geladen, daher gilt die Chip-Höhe. */
.chip, button.chip {
  display: inline-flex; align-items: center; gap: 8px; box-sizing: border-box;
  height: 36px; min-height: 0; padding: 0 14px;
  border: 1px solid var(--rz-line-ctrl); border-radius: 18px;
  background: #ffffff; color: var(--rz-ink);
  font: 500 13px/1 var(--rz-font); white-space: nowrap; text-decoration: none; cursor: pointer;
}
.chip[aria-pressed="true"], .chip.sel { border-color: var(--rz-ink); background: var(--rz-surface-2); }
.chip[aria-current], .chip.on { border-color: var(--rz-ink); background: var(--rz-ink); color: #ffffff; font-weight: 700; }
.chip .cnt { font-weight: 700; font-variant-numeric: tabular-nums; }
.chip .chip-meta { color: var(--rz-muted); font-weight: 400; }
.chip[aria-current] .chip-meta, .chip.on .chip-meta { color: inherit; }

/* Farbpunkte für Räume */
.dot { width: 9px; height: 9px; border-radius: 50%; flex: none; display: inline-block; background: var(--rz-muted); }
.dot-dt { background: var(--rz-room-dorftreff); }
.dot-aula { background: var(--rz-room-aula); }

/* Kleine Kennzeichnung (Ausstattung o. Ä.) */
.tag {
  display: inline-flex; align-items: center; height: 26px; padding: 0 10px; box-sizing: border-box;
  border: 1px solid var(--rz-line); border-radius: 13px; background: #ffffff; font-size: 12px; color: var(--rz-ink-2);
}

/* ------------------------------------------------------------------ */
/* Status-Chips für Buchungen (verbindliches Buchungs-Set, alle Seiten) */
/* Text immer ausgeschrieben; Kontrast Text/Grund jeweils >= 4.5:1:   */
/* ok 5.35, pend 7.62, rej 6.62, can 4.68. Unterscheidung zusätzlich  */
/* über die Helligkeit (Luminanz 0.15 / 0.53 / 1.0 / 0.88) und den     */
/* Rahmen (nur Abgelehnt ist rot umrandet).                           */
/* ------------------------------------------------------------------ */
.st {
  display: inline-flex; align-items: center; height: 24px; padding: 0 10px; box-sizing: border-box;
  border: 1px solid transparent; border-radius: 12px;
  font: 600 12px/1 var(--rz-font); white-space: nowrap;
}
.st-ok { background: #1e7a46; color: #ffffff; }
.st-pend { background: #f0b849; color: #3d2a00; }
.st-rej { background: #ffffff; color: #a93226; border-color: #a93226; }
.st-can { background: #eef1f4; color: #5d6d7e; border-color: #cfd6dc; }

/* ------------------------------------------------------------------ */
/* Formular                                                           */
/* ------------------------------------------------------------------ */
.fld { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.lbl { display: block; font-size: 14px; font-weight: 600; color: var(--rz-ink); }
.lbl .opt { font-weight: 400; color: var(--rz-muted); }
.help { margin: 0; font-size: 13px; line-height: 1.45; color: var(--rz-muted); }
.req, .errt { margin: 0; font-size: 13px; line-height: 1.45; font-weight: 600; color: var(--rz-red-text); }
.errt { display: flex; align-items: center; gap: 6px; }

.inp {
  display: block; width: 100%; box-sizing: border-box; height: var(--rz-input-h); padding: 0 12px;
  border: 1px solid var(--rz-line-input); border-radius: var(--rz-radius);
  background: #ffffff; color: var(--rz-ink); font: 400 15px/1.4 var(--rz-font);
}
.inp::placeholder { color: var(--rz-muted); opacity: 1; }
textarea.inp { height: auto; min-height: 96px; padding: 10px 12px; line-height: 1.55; resize: vertical; }
select.inp { padding-right: 32px; }
.inp:focus-visible { outline: 2px solid var(--rz-red-text); outline-offset: 2px; border-color: var(--rz-ink); }
.inp:disabled { background: var(--rz-surface); color: var(--rz-muted); cursor: not-allowed; }
.inp.err, .inp[aria-invalid="true"] { border-color: var(--rz-red-text); box-shadow: 0 0 0 1px var(--rz-red-text); }

/* Checkbox/Radio mit Label (Klickfläche >= 44px) */
.cb { display: flex; align-items: flex-start; gap: 10px; min-height: var(--rz-touch); font-size: 14px; line-height: 1.5; color: var(--rz-ink); cursor: pointer; }
.cb input { width: 20px; height: 20px; margin: 1px 0 0; accent-color: var(--rz-ink); flex: none; }

/* Fieldset-Gruppe */
.fs { margin: 0; padding: 0 0 18px; border: 0; border-bottom: 1px solid var(--rz-line-faint); }
.lg { padding: 0; margin-bottom: 10px; font-size: 15px; font-weight: 700; color: var(--rz-ink); }

/* "oder"-Trenner */
.or { display: flex; align-items: center; gap: 12px; font-size: 13px; color: var(--rz-muted); }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--rz-line); }

/* ------------------------------------------------------------------ */
/* Schalter: <input type="checkbox" role="switch" class="sw">        */
/* ------------------------------------------------------------------ */
.sw {
  appearance: none; -webkit-appearance: none; position: relative; flex: none; margin: 0;
  width: 48px; height: 28px; border-radius: 14px; background: var(--rz-switch-off); cursor: pointer;
  transition: background-color .15s;
}
.sw::before {
  content: ""; position: absolute; top: 3px; left: 3px; width: 22px; height: 22px;
  border-radius: 50%; background: #ffffff; transition: transform .15s;
}
.sw:checked { background: var(--rz-switch-on); }
.sw:checked::before { transform: translateX(20px); }
.sw:focus-visible { outline: 2px solid var(--rz-red-text); outline-offset: 2px; }
.sw:disabled { opacity: .5; cursor: not-allowed; }
.swrow { display: flex; align-items: center; gap: 16px; min-height: 72px; padding: 12px 16px; border-bottom: 1px solid var(--rz-line); box-sizing: border-box; }
.swrow label { flex: 1; min-width: 0; min-height: var(--rz-touch); cursor: pointer; display: flex; flex-direction: column; justify-content: center; gap: 3px; }
.swt { font-size: 15px; font-weight: 600; color: var(--rz-ink); }
.swd { font-size: 13px; line-height: 1.45; color: var(--rz-muted); }

/* ------------------------------------------------------------------ */
/* Tabellen und Listen                                                */
/* ------------------------------------------------------------------ */
.th { background: var(--rz-ink); color: #ffffff; font-size: 12px; font-weight: 600; padding: 9px 12px; text-align: left; }
.rz-table { width: 100%; border-collapse: collapse; font-size: 14px; }
.rz-table td { padding: 11px 12px; border-bottom: 1px solid var(--rz-line); vertical-align: middle; }
.rz-table tr.we td { background: var(--rz-weekend); }
.rz-table tr.hol td { background: var(--rz-holiday); }

/* Key-Value-Liste: <dl class="kv"><dt>…</dt><dd>…</dd></dl>
   Breite der Schlüsselspalte über --kv-w anpassbar. */
.kv { display: grid; grid-template-columns: var(--kv-w, 150px) minmax(0, 1fr); gap: 10px 14px; margin: 0; font-size: 14px; line-height: 1.45; }
.kv dt { color: var(--rz-muted); }
.kv dd { margin: 0; color: var(--rz-ink); font-weight: 500; overflow-wrap: anywhere; }
/* Zeilenvariante mit Trennlinien (Raumdetail, Buchungsdetail) */
.kv.rows { gap: 0; }
.kv.rows dt, .kv.rows dd { padding: 10px 12px; border-bottom: 1px solid var(--rz-line-faint); }

/* Navigationszeile mit Pfeil (Konto-Links, mobiles Menü) */
.mlink {
  display: flex; align-items: center; justify-content: space-between; gap: 12px;
  min-height: 48px; padding: 0 4px; border-bottom: 1px solid var(--rz-line-soft);
  color: var(--rz-ink); text-decoration: none; font-size: 15px; font-weight: 500;
}
.mlink:hover { color: var(--rz-red-text); }

/* ------------------------------------------------------------------ */
/* Zeitleiste: <ol class="tl"><li class="tl-item"> …                 */
/* ------------------------------------------------------------------ */
.tl { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; }
.tl-item { display: grid; grid-template-columns: 30px minmax(0, 1fr); gap: 12px; }
.tl-mark { display: flex; flex-direction: column; align-items: center; }
.tl-dot {
  width: 28px; height: 28px; border-radius: 50%; box-sizing: border-box; flex: none;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
  border: 1px solid var(--rz-line-ctrl); color: var(--rz-muted); background: #ffffff;
}
.tl-dot.done { background: var(--rz-ink); border-color: var(--rz-ink); color: #ffffff; }
.tl-dot.now { border: 2px solid var(--rz-red-text); color: var(--rz-red-text); }
.tl-line { flex: 1; width: 1px; min-height: 16px; margin: 4px auto 0; background: var(--rz-line-ctrl); }
.tl-item:last-child .tl-line { display: none; }
.tl-body { padding-bottom: 18px; font-size: 14px; line-height: 1.5; color: var(--rz-ink-2); }
.tl-body strong { color: var(--rz-ink); }

/* Schrittfolge (Registrierung, Anleitung) */
.step { display: flex; gap: 14px; align-items: flex-start; font-size: 14px; line-height: 1.5; color: var(--rz-ink-2); }
.stepn {
  width: 28px; height: 28px; flex: none; box-sizing: border-box; border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 700;
  background: var(--rz-ink); color: #ffffff;
}
.stepn.cur { background: var(--rz-red-text); }
.stepn.next { background: #ffffff; color: var(--rz-ink); border: 2px solid var(--rz-line-input); }

/* ------------------------------------------------------------------ */
/* Hinweisbox und Meldungen                                           */
/* ------------------------------------------------------------------ */
.box { background: var(--rz-surface); border: 1px solid var(--rz-line); border-radius: var(--rz-radius); padding: 18px 20px; color: var(--rz-ink-2); }
.box.warn { background: #fdf6e3; border-color: #e8d29a; }
.box.err { background: #fdf2f0; border-color: var(--rz-danger-line); }

/* Django-Messages */
.rz-msgs { max-width: var(--rz-max); margin: 0 auto; padding: 16px var(--rz-gutter) 0; box-sizing: border-box; display: flex; flex-direction: column; gap: 8px; }
.rz-msg {
  display: flex; align-items: flex-start; gap: 12px; padding: 12px 8px 12px 16px;
  border: 1px solid var(--rz-line); border-radius: var(--rz-radius);
  background: var(--rz-surface); color: var(--rz-ink); font-family: var(--rz-font); font-size: 14px; line-height: 1.5;
}
.rz-msg-icon { flex: none; margin-top: 2px; }
.rz-msg-text { flex: 1; min-width: 0; padding-top: 1px; overflow-wrap: anywhere; }
.rz-msg-success { border-color: #b9d8c6; background: #f1f8f4; }
.rz-msg-success .rz-msg-icon { color: #1e7a46; }
.rz-msg-warning { border-color: #e8d29a; background: #fdf6e3; }
.rz-msg-warning .rz-msg-icon { color: #8a5a00; }
.rz-msg-error { border-color: var(--rz-danger-line); background: #fdf2f0; }
.rz-msg-error .rz-msg-icon { color: var(--rz-red-text); }
.rz-msg-info .rz-msg-icon, .rz-msg-debug .rz-msg-icon { color: var(--rz-ink); }
button.rz-msg-close {
  flex: none; display: inline-flex; align-items: center; justify-content: center;
  width: 32px; height: 32px; min-height: 0; padding: 0; margin: -4px 0;
  border: 0; border-radius: 6px; background: transparent; color: var(--rz-muted); cursor: pointer;
}
button.rz-msg-close[hidden] { display: none; }
button.rz-msg-close:hover { background: var(--rz-surface); color: var(--rz-ink); }

/* ------------------------------------------------------------------ */
/* Shell: Kopfzeile                                                   */
/* ------------------------------------------------------------------ */
.rz-header {
  position: sticky; top: 0; z-index: 50;
  background: #ffffff; border-bottom: 1px solid var(--rz-line-header);
  font-family: var(--rz-font); color: var(--rz-ink);
}
.rz-header-inner {
  max-width: var(--rz-max); margin: 0 auto; box-sizing: border-box;
  height: 60px; padding: 0 var(--rz-gutter);
  display: flex; align-items: center; justify-content: space-between; gap: 24px;
}
.rz-logo { display: flex; align-items: center; gap: 10px; min-height: var(--rz-touch); color: var(--rz-ink); text-decoration: none; flex: none; }
.rz-logo:hover { color: var(--rz-ink); }
.rz-logo-mark {
  width: 34px; height: 34px; border-radius: 50%; background: var(--rz-primary);
  display: inline-flex; align-items: center; justify-content: center; flex: none;
}
.rz-logo-text { font-size: 19px; font-weight: 700; letter-spacing: 0; }

.rz-nav { display: flex; gap: 28px; font-size: 15px; font-weight: 500; }
.rz-nav a {
  display: inline-flex; align-items: center; min-height: var(--rz-touch);
  color: var(--rz-ink); text-decoration: none; white-space: nowrap;
}
.rz-nav a span { padding-bottom: 3px; border-bottom: 2px solid transparent; }
.rz-nav a:hover { color: var(--rz-red-text); }
.rz-nav a[aria-current="page"] { color: var(--rz-red-text); }
.rz-nav a[aria-current="page"] span { border-bottom-color: var(--rz-red-text); }

.rz-actions { display: flex; align-items: center; gap: 10px; flex: none; }
.rz-auth-desktop { display: flex; gap: 10px; }

/* Aufklapp-Menüs über <details> (Avatar-Menü, Burger) */
.rz-menu { position: relative; }
.rz-menu > summary { list-style: none; }
.rz-menu > summary::-webkit-details-marker { display: none; }
.rz-menu-panel {
  position: absolute; right: 0; top: calc(100% + 8px); z-index: 60;
  min-width: 232px; box-sizing: border-box; padding: 6px 0;
  background: #ffffff; border: 1px solid var(--rz-line); border-radius: var(--rz-radius);
  box-shadow: 0 8px 24px rgba(44, 62, 80, .12);
}
.rz-menu-head { padding: 10px 16px; border-bottom: 1px solid var(--rz-line-faint); }
.rz-menu-name { display: block; font-size: 14px; font-weight: 700; color: var(--rz-ink); overflow-wrap: anywhere; }
.rz-menu-mail { display: block; font-size: 13px; color: var(--rz-muted); overflow-wrap: anywhere; }
.rz-menu-list { list-style: none; margin: 0; padding: 0; }
.rz-menu-list a {
  display: flex; align-items: center; min-height: var(--rz-touch); padding: 0 16px;
  color: var(--rz-ink); text-decoration: none; font-size: 15px; font-weight: 500;
}
.rz-menu-list a:hover { background: var(--rz-surface); color: var(--rz-ink); }
.rz-menu-list a[aria-current="page"] { color: var(--rz-red-text); font-weight: 700; }
.rz-menu-list .rz-sep { height: 1px; margin: 6px 0; background: var(--rz-line-faint); }
.rz-menu-list form { margin: 0; }
/* Logout ist ein POST-Button; button.… schlägt die Legacy-Button-Regel */
.rz-menu-list button.rz-logout {
  display: flex; align-items: center; width: 100%; min-height: var(--rz-touch); padding: 0 16px;
  border: 0; border-radius: 0; background: transparent; cursor: pointer; text-align: left;
  color: var(--rz-danger); font: 500 15px/1.4 var(--rz-font);
}
.rz-menu-list button.rz-logout:hover { background: var(--rz-surface); }
.rz-body .rz-menu-list button.rz-logout:focus-visible { outline: 2px solid var(--rz-red-text); outline-offset: -2px; box-shadow: none; }

/* Avatar */
.rz-avatar {
  display: inline-flex; align-items: center; justify-content: center;
  width: var(--rz-touch); height: var(--rz-touch); min-height: 0; padding: 0;
  border: 0; border-radius: 50%; background: transparent; cursor: pointer; text-decoration: none;
}
.rz-avatar-c {
  display: inline-flex; align-items: center; justify-content: center; overflow: hidden;
  width: 36px; height: 36px; border-radius: 50%; background: var(--rz-ink); color: #ffffff;
  font: 700 13px/1 var(--rz-font); letter-spacing: 0.5px; text-transform: uppercase;
}
.rz-avatar-c img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rz-avatar.is-current .rz-avatar-c { box-shadow: 0 0 0 2px #ffffff, 0 0 0 4px var(--rz-red-text); }

/* Burger: nur mobil sichtbar */
.rz-burger {
  display: none; align-items: center; justify-content: center;
  width: var(--rz-touch); height: var(--rz-touch); min-height: 0; padding: 0;
  border: 0; border-radius: var(--rz-radius); background: transparent; color: var(--rz-ink); cursor: pointer;
}
.rz-burger .rz-icon-close { display: none; }
.rz-menu[open] > .rz-burger .rz-icon-open { display: none; }
.rz-menu[open] > .rz-burger .rz-icon-close { display: block; }
.rz-mobile-nav { display: none; }

/* ------------------------------------------------------------------ */
/* Shell: Fußzeile                                                    */
/* ------------------------------------------------------------------ */
.rz-footer { margin-top: 64px; font-family: var(--rz-font); background: #ffffff; }
.rz-footer-inner {
  max-width: var(--rz-max); margin: 0 auto; box-sizing: border-box;
  padding: 16px var(--rz-gutter) 20px; border-top: 1px solid var(--rz-line-header);
  display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap;
  font-size: 13px; color: var(--rz-muted);
}
.rz-footer nav { display: flex; flex-wrap: wrap; gap: 4px 20px; }
.rz-footer a { color: var(--rz-muted); text-decoration: none; display: inline-flex; align-items: center; min-height: 32px; }
.rz-footer a:hover { color: var(--rz-red-text); text-decoration: underline; text-underline-offset: 2px; }

/* ------------------------------------------------------------------ */
/* Mobil (<= 768px): Burger, Touch-Ziele >= 44px, 16px-Inputs        */
/* ------------------------------------------------------------------ */
@media (max-width: 768px) {
  :root {
    --rz-ctrl-h: 44px;
    --rz-input-h: 48px;
    --rz-gutter: 16px;
    --rz-radius: 10px;
  }
  .inp { font-size: 16px; }              /* verhindert Zoom in iOS Safari */
  .chip, button.chip { height: 44px; border-radius: 22px; font-size: 14px; }
  .btn2, .btnp { font-size: 15px; }
  .cb input { width: 22px; height: 22px; }
  button.rz-msg-close { width: var(--rz-touch); height: var(--rz-touch); margin: -10px -4px -10px 0; }

  .rz-title { font-size: 28px; letter-spacing: 0; }
  .rz-pagehead { min-height: 68px; align-items: center; padding: 12px 0 10px; }
  .kv:not(.rows) { --kv-w: 104px; }

  .rz-header-inner { height: 56px; padding: 0 8px 0 16px; gap: 8px; }
  .rz-logo { gap: 8px; }
  .rz-logo-mark { width: 30px; height: 30px; }
  .rz-logo-mark svg { width: 16px; height: 16px; }
  .rz-logo-text { font-size: 17px; }
  .rz-nav, .rz-auth-desktop { display: none; }
  .rz-avatar-c { width: 32px; height: 32px; font-size: 12px; }
  .rz-actions { gap: 0; }

  .rz-burger { display: inline-flex; }
  .rz-mobile-nav { display: block; }
  .rz-mobile-nav .rz-menu-panel {
    position: fixed; left: 0; right: 0; top: 56px; min-width: 0;
    max-height: calc(100vh - 56px);   /* Fallback ohne dvh-Unterstützung */
    max-height: calc(100dvh - 56px);  /* berücksichtigt ein-/ausfahrende Browserleisten */
    overflow-y: auto;
    border: 0; border-bottom: 1px solid var(--rz-line); border-radius: 0; padding: 4px 16px 16px;
    box-shadow: 0 12px 24px rgba(44, 62, 80, .12);
  }
  .rz-mobile-nav .mlink[aria-current="page"] { color: var(--rz-red-text); font-weight: 700; }
  .rz-mobile-auth { display: flex; flex-direction: column; gap: 8px; padding-top: 16px; }

  .rz-footer-inner { flex-direction: column; align-items: stretch; gap: 4px; }
  .rz-footer nav { flex-direction: column; gap: 0; order: -1; }
  .rz-footer nav a { min-height: var(--rz-touch); border-bottom: 1px solid var(--rz-line-faint); font-size: 15px; color: var(--rz-ink); }
  .rz-footer-copy { padding-top: 12px; }
}

@media (prefers-reduced-motion: reduce) {
  .sw, .sw::before, .btn2, .btnp, .ibtn { transition: none; }
}

@media print {
  .rz-header, .rz-footer, .rz-msgs, .rz-skip { display: none; }
}
