/* Gängeviertel Selfservice
   Rot, Schwarz, Weiß. Ruhig, klar, gemeinschaftlich.
   Kein Build, keine externen Schriften, keine CDNs. */

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; scroll-behavior: smooth; }

/* Tokens: hell */
:root {
  color-scheme: light;
  --font-sans: ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Helvetica Neue", "Segoe UI", ui-sans-serif, system-ui, Arial, sans-serif;
  --font-mono: ui-monospace, SFMono-Regular, Menlo, Consolas, "Liberation Mono", monospace;

  --bg: #f7f5f3;
  --bg-soft: #efece9;
  --surface: #ffffff;
  --input-bg: #ffffff;
  --text: #17120f;
  --muted: #6b625d;
  --border: #e4ded9;
  --border-strong: #c9c0ba;
  --accent: #c8000a;
  --accent-hover: #a30008;
  --accent-soft: #fbeceb;
  --accent-text: #8f0007;
  --on-accent: #ffffff;
  --link: #a30008;
  --link-hover: #c8000a;

  --success-text: #14512f;
  --success-soft: #e9f4ed;
  --success-border: #bfdcc9;
  --warning-text: #6b4600;
  --warning-soft: #fdf4e1;
  --warning-border: #e8d3a2;
  --danger-text: #8f0007;
  --danger-soft: #fdeaea;
  --danger-border: #f0c4c4;

  --focus: #17120f;
  --header-bg: rgba(247, 245, 243, 0.94);
  --row-hover: rgba(200, 0, 10, 0.035);
  /* 4.8:1 auf Weiß: Platzhaltertexte bleiben lesbar, ohne wie Werte zu wirken. */
  --placeholder: #7a706b;
  --shadow-menu: 0 18px 40px rgba(23, 18, 15, 0.14);
  --radius: 8px;
  --radius-lg: 12px;
  --radius-pill: 999px;
  --container: 1040px;
}

/* Tokens: dunkel, wenn das System es will oder der Umschalter es sagt. */
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #121011;
    --bg-soft: #1c1918;
    --surface: #191615;
    --input-bg: #151312;
    --text: #f4f0ee;
    --muted: #b1a8a4;
    --border: #332d2b;
    --border-strong: #5a5250;
    --accent: #e51919;
    --accent-hover: #ff4a3d;
    --accent-soft: #3a1719;
    --accent-text: #ffb0b0;
    --link: #ff9b9b;
    --link-hover: #ffc2c2;
    --success-text: #b7e8c8;
    --success-soft: #152a1e;
    --success-border: #2c5740;
    --warning-text: #f3d99f;
    --warning-soft: #2b2314;
    --warning-border: #55441f;
    --danger-text: #ffc3c3;
    --danger-soft: #341a1c;
    --danger-border: #5f2c30;
    --focus: #f4f0ee;
    --header-bg: rgba(18, 16, 17, 0.94);
    --row-hover: rgba(255, 90, 90, 0.05);
    --placeholder: #998f8c;
    --shadow-menu: 0 18px 40px rgba(0, 0, 0, 0.55);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #121011;
  --bg-soft: #1c1918;
  --surface: #191615;
  --input-bg: #151312;
  --text: #f4f0ee;
  --muted: #b1a8a4;
  --border: #332d2b;
  --border-strong: #5a5250;
  --accent: #e51919;
  --accent-hover: #ff4a3d;
  --accent-soft: #3a1719;
  --accent-text: #ffb0b0;
  --link: #ff9b9b;
  --link-hover: #ffc2c2;
  --success-text: #b7e8c8;
  --success-soft: #152a1e;
  --success-border: #2c5740;
  --warning-text: #f3d99f;
  --warning-soft: #2b2314;
  --warning-border: #55441f;
  --danger-text: #ffc3c3;
  --danger-soft: #341a1c;
  --danger-border: #5f2c30;
  --focus: #f4f0ee;
  --header-bg: rgba(18, 16, 17, 0.94);
  --row-hover: rgba(255, 90, 90, 0.05);
  --placeholder: #998f8c;
  --shadow-menu: 0 18px 40px rgba(0, 0, 0, 0.55);
}

/* Grundlagen */
body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  font-family: var(--font-sans);
  font-size: 1rem;
  line-height: 1.6;
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
}
h1, h2, h3, h4 { margin: 0 0 0.5em; line-height: 1.2; letter-spacing: -0.02em; font-weight: 700; text-wrap: balance; }
h1 { font-family: var(--font-display); font-size: clamp(1.7rem, 3vw, 2.1rem); font-weight: 800; letter-spacing: -0.03em; }
h2 { font-size: clamp(1.12rem, 1.6vw, 1.3rem); }
h3 { font-size: 1rem; font-weight: 650; letter-spacing: -0.01em; }
p { margin: 0 0 0.8em; }
p:last-child { margin-bottom: 0; }
a { color: var(--link); text-decoration: underline; text-decoration-thickness: 1px; text-underline-offset: 2px; }
a:hover { color: var(--link-hover); }
strong { font-weight: 650; }
code, .attr-key { font-family: var(--font-mono); font-size: 0.85em; overflow-wrap: anywhere; }
.attr-key {
  display: inline-block;
  padding: 0.05rem 0.35rem;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--muted);
}
img, svg { max-width: 100%; }
:where(a, button, input, textarea, select, summary, [tabindex]):focus-visible { outline: 2px solid var(--focus); outline-offset: 2px; border-radius: 4px; }
::selection { background: var(--accent); color: var(--on-accent); }

/* Layout */
.container { width: min(var(--container), 100% - 2rem); margin-inline: auto; }
@media (max-width: 400px) { .container { width: calc(100% - 1.5rem); } }
.page-main { flex: 1 0 auto; padding-block: clamp(1.25rem, 3vw, 2rem) 3rem; }
.stack { display: flex; flex-direction: column; gap: 1.25rem; }
.stack-lg { gap: 1.75rem; }
.skip-link {
  position: fixed; left: 1rem; top: 1rem; z-index: 200;
  transform: translateY(-250%);
  padding: 0.7rem 1rem;
  border-radius: var(--radius);
  background: var(--accent);
  color: var(--on-accent);
  font-weight: 600;
  text-decoration: none;
}
.skip-link:focus { transform: none; }
.sr-only {
  position: absolute; width: 1px; height: 1px; padding: 0; margin: -1px;
  overflow: hidden; clip: rect(0, 0, 0, 0); clip-path: inset(50%);
  white-space: nowrap; border: 0;
}
[hidden] { display: none !important; }
.muted { color: var(--muted); }
.small { font-size: 0.86rem; }
.nowrap { white-space: nowrap; }

/* Kopfbereich */
.site-header {
  position: sticky;
  top: 0;
  z-index: 50;
  background: var(--header-bg);
  -webkit-backdrop-filter: blur(12px);
  backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--border);
}
.header-inner {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  grid-template-areas: "brand actions" "nav nav";
  align-items: center;
  gap: 0.2rem 0.75rem;
  padding-block: 0.4rem 0.1rem;
}
.brand {
  grid-area: brand;
  justify-self: start;
  display: inline-flex;
  align-items: center;
  gap: 0.55rem;
  min-width: 0;
  min-height: 2.75rem;
  padding: 0.1rem 0.2rem;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
}
.brand:hover { color: var(--text); }
.brand-logo { display: block; width: 36px; height: 36px; flex: none; object-fit: contain; }
.brand-text { display: flex; flex-direction: column; min-width: 0; line-height: 1.05; }
.brand-name {
  font-family: var(--font-display);
  font-size: 0.96rem;
  font-weight: 800;
  letter-spacing: -0.01em;
  text-transform: uppercase;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.brand-sub {
  font-size: 0.6rem;
  font-weight: 600;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--muted);
  white-space: nowrap;
}
.header-actions {
  grid-area: actions;
  display: flex;
  align-items: center;
  justify-content: flex-end;
  gap: 0.15rem;
  min-width: 0;
}
.site-nav {
  grid-area: nav;
  display: flex;
  align-items: stretch;
  gap: 0.1rem;
  min-width: 0;
  max-width: 100%;
  margin-inline: -0.35rem;
  padding: 0 0.35rem 0.25rem;
  overflow-x: auto;
  overscroll-behavior-x: contain;
  scrollbar-width: none;
}
.site-nav::-webkit-scrollbar { display: none; }
.nav-link {
  --nav-pad: 0.7rem;
  position: relative;
  display: inline-flex;
  align-items: center;
  flex: none;
  min-height: 2.75rem;
  padding: 0.4rem var(--nav-pad);
  border-radius: var(--radius);
  color: var(--muted);
  font-size: 0.9rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.nav-link:hover { color: var(--text); background: var(--bg-soft); }
.nav-link.is-active { color: var(--text); }
.nav-link.is-active::after {
  content: "";
  position: absolute;
  left: var(--nav-pad);
  right: var(--nav-pad);
  bottom: 0.25rem;
  height: 2px;
  border-radius: 2px;
  background: var(--accent);
}

/* Icon buttons */
.bell-link {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  padding: 0;
  border: 0;
  border-radius: var(--radius);
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  text-decoration: none;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.bell-link:hover { background: var(--bg-soft); color: var(--text); }

/* Farbmodus: zwei Optionen wie beim Sprachumschalter, eine ist ausgewählt. */
.theme-switch {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.theme-option {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  padding: 0;
  border: 0;
  border-radius: 5px;
  background: transparent;
  color: var(--muted);
  cursor: pointer;
  transition: background-color 0.15s ease, color 0.15s ease;
}
.theme-option:hover { background: var(--bg-soft); color: var(--text); }
.theme-option.is-active { background: var(--accent); color: var(--on-accent); }
.theme-option svg { width: 1.15rem; height: 1.15rem; }
.bell-link { position: relative; }
.bell-badge {
  position: absolute;
  top: 0.3rem;
  right: 0.2rem;
  display: inline-grid;
  place-items: center;
  min-width: 1.1rem;
  height: 1.1rem;
  padding-inline: 0.2rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.62rem;
  font-weight: 700;
  line-height: 1;
}

/* Sprachumschalter */
.lang-switch {
  display: inline-flex;
  align-items: center;
  flex: none;
  gap: 2px;
  padding: 2px;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.lang-link {
  display: inline-grid;
  place-items: center;
  min-width: 2.5rem;
  min-height: 2.5rem;
  padding: 0.1rem 0.35rem;
  border-radius: 5px;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.04em;
  text-decoration: none;
}
.lang-link:hover { background: var(--bg-soft); color: var(--text); }
.lang-link.is-active { background: var(--accent); color: var(--on-accent); }

/* Benutzermenü */
.user-menu { position: relative; flex: none; }
.user-menu > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.15rem 0.35rem;
  border-radius: var(--radius);
  cursor: pointer;
  list-style: none;
  transition: background-color 0.15s ease;
}
.user-menu > summary::-webkit-details-marker { display: none; }
.user-menu > summary:hover { background: var(--bg-soft); }
.user-name { font-size: 0.85rem; font-weight: 650; white-space: nowrap; max-width: 12rem; overflow: hidden; text-overflow: ellipsis; }
.user-chevron { display: grid; place-items: center; color: var(--muted); transition: transform 0.15s ease; }
.user-menu[open] .user-chevron { transform: rotate(180deg); }
.user-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 0.45rem);
  z-index: 80;
  width: min(17rem, calc(100vw - 1.5rem));
  padding: 0.35rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-menu);
}
.user-menu-account {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.6rem 0.6rem;
}
.user-menu-account strong { font-size: 0.92rem; overflow-wrap: anywhere; }
.user-menu-handle, .user-menu-email { font-size: 0.78rem; color: var(--muted); overflow-wrap: anywhere; }
.menu-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  min-height: 2.75rem;
  padding: 0.4rem 0.6rem;
  border-radius: var(--radius);
  color: var(--text);
  font-size: 0.9rem;
  font-weight: 550;
  text-decoration: none;
}
.menu-link:hover { background: var(--bg-soft); color: var(--text); }
.menu-link svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.menu-link-quiet { color: var(--muted); }
.menu-sep { height: 1px; margin: 0.3rem 0.25rem; background: var(--border); }
.menu-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 0.5rem;
  padding: 0.25rem 0.6rem;
  min-height: 2.6rem;
}
.menu-label { font-size: 0.82rem; font-weight: 600; color: var(--muted); }
.menu-row .theme-option { width: 2.75rem; height: 2.75rem; }
.menu-row .lang-link { min-height: 2.75rem; }

@media (max-width: 720px) {
  .user-name { display: none; }
  /* Der Streifen läuft rechts aus, damit klar ist, dass es weitergeht. Das
     passiert nur, solange er wirklich scrollen kann; JS setzt has-overflow. */
  .site-nav.has-overflow:not(.is-at-end) {
    -webkit-mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 1.3rem), transparent 100%);
    mask-image: linear-gradient(to right, #000 0, #000 calc(100% - 1.3rem), transparent 100%);
  }
  .site-nav { scroll-padding-inline: 1rem; }
}
@media (max-width: 460px) {
  .brand-logo { width: 32px; height: 32px; }
  .brand-sub { display: none; }
  .brand-name { font-size: 0.9rem; }
  .site-nav { margin-inline: -0.2rem; padding-inline: 0.2rem; }
}
/* Unter 400 px reicht die Kopfzeile nicht mehr für Schriftzug plus Sprach- und
   Farbwahl: der Abstand schrumpfte auf 2 px. Das Logo bleibt als Ziel stehen;
   die Verknüpfung trägt bereits ein aria-label, der Name geht also nicht
   verloren. */
@media (max-width: 399px) {
  .brand-text { display: none; }
}
/* Fünf Einträge bleiben bis 500 px ohne Scrollen sichtbar; darunter wird der
   Streifen kompakter, damit ab 360 px alle Beschriftungen passen. */
@media (max-width: 500px) {
  .nav-link { --nav-pad: 0.4rem; font-size: 0.82rem; }
}
@media (max-width: 430px) {
  .site-nav { gap: 0; margin-inline: 0; padding-inline: 0; }
  .nav-link { --nav-pad: 0.22rem; font-size: 0.78rem; }
}
/* Ganz schmale Geräte: auch „Einladen“ und „Übersicht“ bleiben in einer Zeile. */
@media (max-width: 340px) {
  .site-nav { gap: 0; }
  .nav-link { --nav-pad: 0.08rem; font-size: 0.71rem; letter-spacing: -0.012em; }
}

/* Fußbereich */
.site-footer {
  padding-block: 1.1rem;
  border-top: 1px solid var(--border);
  color: var(--muted);
  font-size: 0.82rem;
}
.footer-inner { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.footer-link { color: var(--muted); font-weight: 600; text-decoration: none; }
.footer-link:hover { color: var(--text); text-decoration: underline; }
.footer-dot { color: var(--border-strong); }
.footer-meta { margin: 0; font-variant-numeric: tabular-nums; }

/* Seitenkopf */
.page-head {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-end;
  justify-content: space-between;
  gap: 0.9rem 1.5rem;
  padding-bottom: 1rem;
  border-bottom: 1px solid var(--border);
}
.page-head h1 { margin: 0; }
.page-head-text { max-width: 62ch; min-width: 0; }
.page-head .lede { margin: 0.3rem 0 0; }
.page-actions { display: flex; flex-wrap: wrap; gap: 0.5rem; }
.lede { max-width: 60ch; color: var(--muted); font-size: 0.98rem; text-wrap: pretty; }

.section-head {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  justify-content: space-between;
  gap: 0.35rem 1rem;
  margin-bottom: 0.6rem;
}
.section-head h2, .section-head h3 { margin: 0; }
.text-link {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  /* WCAG 2.5.8: auch ein reiner Textlink bekommt eine 24-px-Tippfläche. */
  min-height: 1.5rem;
  color: var(--link);
  font-size: 0.85rem;
  font-weight: 600;
  text-decoration: none;
  white-space: nowrap;
}
.text-link:hover { color: var(--link-hover); text-decoration: underline; }
.text-link svg { flex: none; }
.breadcrumb { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; margin: 0; font-size: 0.84rem; color: var(--muted); }
.breadcrumb a { color: var(--muted); text-decoration: none; }
.breadcrumb a:hover { color: var(--text); text-decoration: underline; }

/* Schaltflächen */
.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: 0.4rem;
  min-height: 2.75rem;
  padding: 0.55rem 1rem;
  border: 1px solid transparent;
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  font: inherit;
  font-size: 0.92rem;
  font-weight: 600;
  line-height: 1.2;
  text-align: center;
  text-decoration: none;
  cursor: pointer;
  transition: background-color 0.15s ease, border-color 0.15s ease, color 0.15s ease;
}
.btn svg { flex: none; }
.btn:hover { color: var(--text); }
.btn-primary { border-color: var(--accent); background: var(--accent); color: var(--on-accent); }
.btn-primary:hover { border-color: var(--accent-hover); background: var(--accent-hover); color: var(--on-accent); }
.btn-secondary { border-color: var(--border-strong); background: var(--surface); color: var(--text); }
.btn-secondary:hover { background: var(--bg-soft); color: var(--text); }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: var(--bg-soft); color: var(--text); }
.btn-danger { border-color: var(--danger-border); background: transparent; color: var(--danger-text); }
.btn-danger:hover { background: var(--danger-soft); color: var(--danger-text); }
.btn-sm { min-height: 2.5rem; padding: 0.35rem 0.7rem; font-size: 0.82rem; }
.btn-block { width: 100%; }
.btn:disabled, .btn[aria-disabled="true"] { opacity: 0.5; cursor: not-allowed; }

/* Markierungen */
.badge {
  display: inline-flex;
  align-items: center;
  gap: 0.3rem;
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.72rem;
  font-weight: 650;
  line-height: 1.5;
  white-space: nowrap;
}
.badge-success, .badge-ok { border-color: var(--success-border); background: var(--success-soft); color: var(--success-text); }
.badge-warning, .badge-pending { border-color: var(--warning-border); background: var(--warning-soft); color: var(--warning-text); }
.badge-danger { border-color: var(--danger-border); background: var(--danger-soft); color: var(--danger-text); }
.badge-neutral, .badge-muted { border-color: var(--border); background: var(--bg-soft); color: var(--muted); }
.badge-admin { border-color: var(--accent); background: var(--accent-soft); color: var(--accent-text); }
.badge svg { width: 0.85rem; height: 0.85rem; }
.chips { display: flex; flex-wrap: wrap; gap: 0.3rem; margin-top: 0.4rem; }
.detail-block { margin-bottom: 0.9rem; }
.detail-block h3 { margin: 0 0 0.2rem; color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.07em; text-transform: uppercase; }
.chip {
  padding: 0.1rem 0.5rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-pill);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.76rem;
  font-weight: 550;
  overflow-wrap: anywhere;
}

/* Avatare */
.avatar {
  display: inline-grid;
  place-items: center;
  width: 2.5rem;
  height: 2.5rem;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.95rem;
  font-weight: 700;
}
.avatar-sm { width: 2rem; height: 2rem; font-size: 0.78rem; }
.avatar-lg { width: 3.5rem; height: 3.5rem; font-size: 1.3rem; }
.profile-head { display: flex; align-items: flex-start; gap: 1rem; min-width: 0; }
.profile-body { min-width: 0; }
.profile-body h2 { margin: 0; overflow-wrap: anywhere; }

/* Formulare */
.field { display: flex; flex-direction: column; gap: 0.3rem; margin-bottom: 0.9rem; }
.field > label { font-size: 0.82rem; font-weight: 600; color: var(--text); }
.form-note { margin: 0.25rem 0 0; font-size: 0.82rem; color: var(--muted); }
.field input[type="text"], .field input[type="email"], .field input[type="search"],
.field input[type="number"], .field input[type="url"], .field input[type="password"],
.field input[type="date"], .field select, .field textarea, .search-field input {
  width: 100%;
  min-height: 2.75rem;
  padding: 0.5rem 0.7rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--input-bg);
  color: var(--text);
  font: inherit;
  font-size: 1rem;
  line-height: 1.4;
  transition: border-color 0.15s ease;
}
.field textarea { min-height: 5rem; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .search-field input:focus { border-color: var(--text); }
.field input:disabled, .field select:disabled, .field textarea:disabled {
  border-color: var(--border);
  background: var(--bg-soft);
  color: var(--muted);
  cursor: not-allowed;
}
.field input::placeholder, .field textarea::placeholder, .search-field input::placeholder { color: var(--placeholder); opacity: 1; }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0 1rem; }
.form-grid .field-full { grid-column: 1 / -1; }
@media (max-width: 640px) {
  .form-grid { grid-template-columns: 1fr; }
  .form-grid .field-full { grid-column: auto; }
}
.form-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; margin-top: 0.5rem; }
.checkbox-field {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  min-height: 2.75rem;
  font-size: 0.95rem;
  cursor: pointer;
}
.checkbox-field input[type="checkbox"] {
  width: 1.15rem;
  height: 1.15rem;
  flex: none;
  margin: 0.3rem 0 0;
  accent-color: var(--accent);
}
.checkbox-field span { min-width: 0; }
.check-stack { display: flex; flex-direction: column; gap: 0.1rem; }
.check-stack .checkbox-field input[type="checkbox"] { margin-top: 0.4rem; }
.settings-form { max-width: 44rem; }
.settings-form .form-actions { margin-top: 0.9rem; }
.email-events { margin-top: 0.4rem; }
.inline-form { display: inline; margin: 0; }
.search-form { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.search-form .btn { flex: none; }
.search-field { position: relative; flex: 1 1 16rem; display: flex; align-items: center; min-width: 0; }
.search-icon { position: absolute; left: 0.75rem; display: grid; place-items: center; color: var(--muted); pointer-events: none; }
.search-icon svg { width: 18px; height: 18px; }
.search-field input { padding-left: 2.35rem; }
.search-select { flex: 0 1 12rem; min-height: 2.75rem; padding: 0.5rem 0.7rem; border: 1px solid var(--border-strong); border-radius: var(--radius); background: var(--input-bg); color: var(--text); font: inherit; font-size: 1rem; }
.search-select:focus { border-color: var(--text); }
@media (max-width: 560px) { .search-form .btn { width: 100%; } }
/* Mit JavaScript genügt die Eingabetaste; der Knopf wäre auf schmalen
   Bildschirmen nur eine zweite, volle Zeile. Ohne JavaScript bleibt er. */
@media (max-width: 560px) {
  .has-js .search-form > button[type="submit"] { display: none; }
}

/* Ausklappbereiche */
summary { cursor: pointer; }
summary.btn { list-style: none; }
summary.btn::-webkit-details-marker { display: none; }
.action-disclosure { flex: none; }
.action-disclosure > summary { list-style: none; }
.action-disclosure > summary::-webkit-details-marker { display: none; }
.action-disclosure > summary::after {
  content: "";
  width: 0.45rem;
  height: 0.45rem;
  flex: none;
  margin-top: -0.2rem;
  border-inline-end: 1.5px solid currentColor;
  border-block-end: 1.5px solid currentColor;
  transform: rotate(45deg);
  transition: transform 0.15s ease, margin-top 0.15s ease;
}
.action-disclosure[open] > summary::after {
  margin-top: 0.15rem;
  transform: rotate(225deg);
}
.action-disclosure[open] { width: min(26rem, 100%); }
.disclosure-form {
  width: min(30rem, 100%);
  margin-top: 0.6rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
}
.disclosure-form .field { margin-bottom: 0.6rem; }
details.disclosure > summary, details.row-edit > summary {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  min-height: 2.75rem;
  color: var(--link);
  font-size: 0.85rem;
  font-weight: 600;
  list-style: none;
}
details.disclosure > summary::-webkit-details-marker,
details.row-edit > summary::-webkit-details-marker { display: none; }
details.disclosure > summary::before, details.row-edit > summary::before {
  content: "+";
  display: inline-block;
  width: 0.9rem;
  color: var(--muted);
  font-weight: 700;
  text-align: center;
}
details.disclosure[open] > summary::before, details.row-edit[open] > summary::before { content: "−"; }
details.disclosure > summary:hover, details.row-edit > summary:hover { text-decoration: underline; }
.disclosure-compact > summary { min-height: 2.5rem; font-size: 0.8rem; }
.panel-disclosure {
  padding: 0 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.panel-disclosure > summary {
  display: flex;
  align-items: center;
  gap: 0.4rem;
  min-height: 3.25rem;
  color: var(--text);
  font-size: 0.95rem;
  font-weight: 650;
  list-style: none;
}
.panel-disclosure > summary::-webkit-details-marker { display: none; }
.panel-disclosure > summary::before { content: "+"; width: 1rem; color: var(--muted); font-weight: 700; }
.panel-disclosure[open] > summary::before { content: "−"; }
.panel-disclosure[open] { padding-bottom: 1.1rem; }
.panel-disclosure > summary + .form-note { margin-top: -0.25rem; margin-bottom: 0.9rem; }
.row-edit form { margin-top: 0.25rem; }
.edit-form { width: min(32rem, 100%); }
/* Ein offenes Bearbeitungsformular braucht die Zeilenbreite: sonst bleibt es in
   der schmalen Aktionsspalte (~224 px) stecken. Die Zeile wird zur Spalte, der
   Knopf bleibt rechtsbündig über seinem Formular. */
.row:has(.row-edit[open]) { flex-direction: column; align-items: stretch; }
.row:has(.row-edit[open]) > .row-actions { width: 100%; }
.row:has(.row-edit[open]) .row-main { flex-basis: auto; }
.row-edit[open] { flex-basis: 100%; text-align: right; }
.row-edit[open] .edit-form {
  width: min(32rem, 100%);
  margin-inline-start: auto;
  text-align: start;
}
@media (max-width: 560px) { .edit-form, .disclosure-form { width: 100%; } }

/* Rückmeldungen */
.flash-stack { display: flex; flex-direction: column; gap: 0.5rem; margin-top: 1rem; }
/* Fehlermeldungen bleiben beim Korrigieren sichtbar: Der Block klebt unter
   dem Kopfbereich, während das Formular darunter im Blick bleibt. app.js
   schreibt dessen Höhe nach --header-offset. */
.has-js .flash-stack:has(.flash-error) {
  position: sticky;
  top: var(--header-offset, 0px);
  z-index: 40;
  margin-top: 0;
  padding-top: 1rem;
}
/* Deckender Hintergrund in den Abständen, damit nichts durchscheint. */
.has-js .flash-stack:has(.flash-error)::before {
  content: "";
  position: absolute;
  inset: 0;
  z-index: -1;
  background: var(--bg);
}
.flash {
  display: flex;
  align-items: flex-start;
  gap: 0.6rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-left: 3px solid var(--border-strong);
  border-radius: var(--radius);
  background: var(--surface);
  font-size: 0.92rem;
}
.flash p { margin: 0; overflow-wrap: anywhere; }
.flash svg { flex: none; margin-top: 0.1rem; }
.flash-notice { border-color: var(--success-border); border-left-color: var(--success-text); background: var(--success-soft); color: var(--success-text); }
.flash-error { border-color: var(--danger-border); border-left-color: var(--danger-text); background: var(--danger-soft); color: var(--danger-text); }
.notice {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.65rem;
  padding: 0.75rem 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
}
.notice > div { min-width: 0; flex: 1 1 16rem; }
.notice h2, .notice h3 { margin: 0 0 0.15rem; font-size: 0.98rem; }
.notice p { margin: 0; font-size: 0.9rem; }
.notice-icon { display: grid; place-items: center; width: 1.5rem; height: 1.5rem; flex: none; color: var(--muted); }
.notice-icon svg { width: 18px; height: 18px; }
.notice-warning { border-color: var(--warning-border); background: var(--warning-soft); color: var(--warning-text); }
.notice-warning .notice-icon, .notice-warning p, .notice-warning h2, .notice-warning h3 { color: var(--warning-text); }

/* Leere Zustände */
.empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 0.35rem;
  padding: 2rem 1.25rem;
  border: 1px dashed var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  text-align: center;
  color: var(--muted);
}
.empty > svg { width: 28px; height: 28px; color: var(--accent); }
.empty h3 { margin: 0.2rem 0 0; color: var(--text); font-size: 1rem; }
.empty p { max-width: 42ch; margin: 0; font-size: 0.9rem; }
.empty .btn { margin-top: 0.6rem; }
.empty-note { margin: 0; color: var(--muted); font-size: 0.9rem; }

/* Listen */
.rows { margin: 0; padding: 0; list-style: none; }
.row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.6rem 1rem;
  padding: 0.85rem 0;
  border-bottom: 1px solid var(--border);
}
.row:last-child { border-bottom: 0; padding-bottom: 0; }
.row-main { display: flex; flex-direction: column; gap: 0.15rem; flex: 1 1 15rem; min-width: 0; }
.row-main strong { font-size: 0.97rem; font-weight: 650; overflow-wrap: anywhere; }
.row-main > .badge { align-self: flex-start; }
.row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; min-width: 0; }
.row-sub { font-size: 0.83rem; color: var(--muted); overflow-wrap: anywhere; }
/* Long request reasons stay scannable in the group request list. */
.request-reason {
  display: -webkit-box;
  -webkit-box-orient: vertical;
  -webkit-line-clamp: 2;
  overflow: hidden;
}
.row-aside { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; flex: none; }
/* Die Aktionsgruppe klebt am rechten Rand, auch wenn sie in eine eigene
   Zeile umbricht (z. B. wenn ein Ausklappformular aufgeht). */
.row-actions { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.4rem; flex: none; margin-inline-start: auto; }
/* Ein offenes Formular bleibt unter seinem Knopf am rechten Rand, statt auf
   die ganze Zeile zu wachsen und dadurch nach links zu springen. */
.row-actions > .action-disclosure[open] { margin-inline-start: auto; display: flex; flex-direction: column; align-items: flex-end; }
.row-actions > .action-disclosure[open] > summary { align-self: flex-end; }
.row-note { margin: 0; color: var(--muted); font-size: 0.86rem; }
/* Gruppennamen sind überall verlinkt, ohne wie ein Link auszusehen. */
.group-link { color: inherit; text-decoration: none; }
.group-link:hover, .group-link:focus-visible { text-decoration: underline; }
@media (max-width: 560px) {
  .row-aside, .row-actions { width: 100%; }
  /* Status und Aktionen stehen untereinander, damit „Kein Ablaufdatum“ und
     „Gruppe verlassen“ nicht wie ein zusammenhängender Satz wirken. */
  .row-aside { flex-direction: column; align-items: flex-start; gap: 0.35rem; }
  .row-actions .btn { flex: 1 1 auto; }
  /* Auf schmalen Bildschirmen nutzt das Formular die volle Breite. Der Knopf
     darüber wächst mit, damit Auslöser und Formular eine Einheit bilden. */
  .row-actions > .action-disclosure[open] { align-items: stretch; }
  .row-actions > .action-disclosure[open] > summary { align-self: stretch; }
  .group-row .group-action > .action-disclosure[open] > summary { width: 100%; }
}

/* Gruppenverwaltung: Formulare hinter „Als Gruppen-Admin“, „Entfernen“,
   „Hinzufügen“ und „Verlängern“ schweben unter der Knopfreihe, statt die Zeile
   aufzuziehen. Der Knopf bleibt dabei an seinem Platz. */
@media (min-width: 561px) {
  /* Die Aktionsspalte ist der Bezug: das Formular sitzt rechtsbündig unter der
     Knopfreihe und kann dadurch an keiner Fensterbreite aus dem Bild laufen. */
  .page-group-members .row-actions { position: relative; }
  /* Ein offenes Popover reicht in den nächsten Abschnitt hinein. Der Abschnitt
     mit dem offenen Formular muss deshalb vor den folgenden liegen; die
     Einblend-Animation der Abschnitte erzeugt sonst eigene Ebenen. */
  .page-group-members .stack > section:has(.action-disclosure[open]) {
    position: relative;
    z-index: 20;
  }
  /* Offen bleibt der Auslöser so breit wie geschlossen: nur das Formular
     entsteht zusätzlich, als schwebende Ebene. */
  .page-group-members .row-actions > .action-disclosure[open] {
    display: inline-block;
    width: auto;
    margin-inline-start: 0;
  }
  .page-group-members .row-actions > .action-disclosure[open] > summary { align-self: auto; }
  .page-group-members .row-actions > .action-disclosure[open] > .disclosure-form {
    position: absolute;
    top: calc(100% + 0.5rem);
    inset-inline-end: 0;
    inset-inline-start: auto;
    width: min(30rem, calc(100vw - 2rem));
    margin-top: 0;
    z-index: 30;
    border-color: var(--border-strong);
    box-shadow: var(--shadow-menu);
  }
}
/* Ab dieser Breite ist neben jedem einzelnen Knopf genug Platz, um das
   Formular genau darunter auszurichten. Darunter bleibt es an der
   Aktionsspalte, damit auch der linke Knopf sein Formular nicht links aus dem
   Bild schiebt. */
@media (min-width: 700px) {
  .page-group-members .row-actions > .action-disclosure { position: relative; }
}
@media (max-width: 560px) {
  /* Auf schmalen Bildschirmen stehen die Aktionen untereinander. Jeder Auslöser
     ist schon geschlossen so breit wie sein Formular, damit beim Öffnen weder
     seitlich noch nach oben etwas springt. */
  .page-group-members .row-actions { flex-direction: column; align-items: stretch; gap: 0.4rem; }
  .page-group-members .row-actions > .action-disclosure,
  .page-group-members .row-actions > .action-disclosure[open] { width: 100%; flex: none; margin-inline-start: 0; }
  .page-group-members .row-actions > .action-disclosure > summary,
  .page-group-members .row-actions > .action-disclosure[open] > summary {
    width: 100%;
    align-self: stretch;
    justify-content: center;
  }
  .page-group-members .row-actions > .action-disclosure[open] > .disclosure-form {
    position: static;
    width: 100%;
    margin-top: 0.45rem;
    border-color: var(--border);
    box-shadow: none;
  }
  .page-group-members .row-actions > .badge { align-self: flex-start; }
}

/* In den Popovern stehen Dauer und Einheit nebeneinander, das genaue Datum
   darunter über die volle Breite: sonst wird das Datumsfeld zu schmal. */
.page-group-members .row-actions .duration-row {
  grid-template-columns: repeat(2, minmax(0, 1fr));
  align-items: end;
}
.page-group-members .row-actions .duration-row .field:last-child { grid-column: 1 / -1; }

/* Gruppenliste */
.group-list { margin: 0; padding: 0; list-style: none; }
.group-row {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.75rem 1.5rem;
  padding: 1.15rem 0;
  position: relative;
  border-bottom: 1px solid var(--border);
  scroll-margin-top: 8.5rem;
}
.group-row:last-child { border-bottom: 0; padding-bottom: 0; }
.group-main { min-width: 0; }
/* Die ganze Karte öffnet die Gruppe; flex sizing wandert an den Link. */
.group-open { display: block; flex: 1 1 18rem; color: inherit; text-decoration: none; }
.group-open:hover .group-title h2,
.group-open:focus-visible .group-title h2 { text-decoration: underline; }
.group-open:focus-visible { outline-offset: 4px; border-radius: var(--radius); }
.group-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
.group-title h2 { margin: 0; font-size: 1.05rem; overflow-wrap: anywhere; }
.group-desc { max-width: 64ch; margin: 0.3rem 0 0; color: var(--muted); font-size: 0.92rem; overflow-wrap: anywhere; }
/* Mitglieds- und Verwaltungsstatus stehen als eigene Zeile unter der Beschreibung. */
.group-status { display: flex; align-items: center; gap: 0.4rem; margin: 0.35rem 0 0; color: var(--muted); font-size: 0.86rem; }
.group-status::before { content: ""; flex: none; width: 0.45rem; height: 0.45rem; border-radius: var(--radius-pill); background: var(--border-strong); }
.group-status.is-member::before { background: var(--success-text); }
.group-status.is-pending::before { background: var(--warning-text); }
.group-status.is-admin::before { background: var(--accent); }
.group-action { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; flex: none; }
.group-action .disclosure-form { width: 100%; }
/* Request access opens as a popover under the trigger instead of resizing the
   action row: the button must not move when the form appears. */
.group-action > .action-disclosure[open] { width: auto; }
.group-row > .group-action > .action-disclosure[open] > .disclosure-form {
  position: absolute;
  top: calc(100% + 0.5rem);
  inset-inline-end: 0;
  width: min(26rem, calc(100vw - 2rem));
  margin-top: 0;
  z-index: 20;
  box-shadow: 0 12px 32px rgb(0 0 0 / 0.18);
}
.favorite-form { display: inline-flex; margin: 0; flex: none; }
.favorite-toggle { min-width: 2.5rem; padding-inline: 0.5rem; line-height: 1; }
.favorite-toggle svg { width: 1.125rem; height: 1.125rem; }
.favorite-toggle.is-active { color: var(--accent-text); }
.favorite-toggle.is-active svg path:first-child { fill: currentColor; }
/* Zugang auf der Gruppenseite: Beschriftung, Wert und der Weg ins Profil. */
.access-block { display: flex; flex-direction: column; gap: 0.15rem; }
.access-heading {
  margin: 0;
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
}
.access-status { display: flex; flex-direction: column; align-items: flex-start; gap: 0.15rem; }
.access-value { margin: 0; font-size: 1.02rem; font-weight: 650; letter-spacing: -0.01em; }
.access-status-pending .access-value { color: var(--warning-text); }
.access-link { font-size: 0.88rem; white-space: normal; }
.group-manage { flex: none; }
.group-cat {
  padding: 0.05rem 0.4rem;
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.7rem;
  font-weight: 700;
  letter-spacing: 0.07em;
  text-transform: uppercase;
  overflow-wrap: anywhere;
}
.group-row.is-member:not(.is-focus),
.group-row.is-managed:not(.is-focus) {
  padding-inline-start: 0.9rem;
  box-shadow: inset 3px 0 0 var(--success-text);
}
.group-row.is-managed:not(.is-focus) { box-shadow: inset 3px 0 0 var(--accent); }
.group-row.is-focus {
  padding: 1.15rem 1rem;
  border-radius: var(--radius);
  background: var(--accent-soft);
  box-shadow: inset 3px 0 0 var(--accent);
}
.group-row.is-focus:last-child { padding-bottom: 1.15rem; }
.group-row.is-focus .group-cat { background: var(--surface); }
.invite-copy { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; min-width: 0; }
.invite-copy .btn { flex: none; }
.invite-url {
  display: block;
  width: 100%;
  min-height: 2.5rem;
  padding: 0.4rem 0.6rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.78rem;
  line-height: 1.4;
}
@media (max-width: 560px) {
  /* Kompaktere Karten: mehr Gruppen pro Bildschirm, Status bleibt sichtbar. */
  .group-row { gap: 0.5rem; padding-block: 0.7rem; }
  .group-row.is-focus { padding: 0.8rem 0.9rem; }
  .group-row.is-focus:last-child { padding-bottom: 0.8rem; }
  /* Der Pin sitzt oben rechts in der Karte, statt eine eigene Zeile zu belegen. */
  .group-row .favorite-form { position: absolute; top: 0.55rem; inset-inline-end: 0; }
  .group-row .group-open { padding-inline-end: 2.75rem; }
  .group-row .group-title { gap: 0.35rem 0.4rem; }
  .group-row .group-desc {
    display: -webkit-box;
    -webkit-box-orient: vertical;
    -webkit-line-clamp: 2;
    overflow: hidden;
    margin-top: 0.2rem;
  }
  .group-row .group-status { flex-wrap: wrap; margin-top: 0.2rem; font-size: 0.8rem; }
  .group-row .group-action { width: 100%; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
  .group-row .group-action > .btn,
  .group-row .group-action > form,
  .group-row .group-action > .inline-form,
  .group-row .group-action > .action-disclosure { flex: 0 1 auto; }
  .group-row .group-action .btn { width: auto; }
  .group-row > .group-action > .action-disclosure[open] { width: 100%; }
  .group-row > .group-action > .action-disclosure[open] > .disclosure-form {
    position: static;
    width: 100%;
    box-shadow: none;
    margin-top: 0.6rem;
  }
  .group-row .group-action .favorite-toggle { width: 2.5rem; }
  .group-row .group-action .group-manage { flex: 0 1 auto; }
  .badge-admin { white-space: normal; }
}

/* Apps */
.app-categories { display: flex; flex-direction: column; gap: 1.75rem; }
.app-category-label {
  margin: 0 0 0.55rem;
  color: var(--muted);
  font-size: 0.75rem;
  font-weight: 700;
  letter-spacing: 0.08em;
  text-transform: uppercase;
}
.app-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 17rem), 1fr)); gap: 0.6rem; }
.app-card {
  display: flex;
  flex-direction: column;
  gap: 0.45rem;
  padding: 0.9rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.app-card:hover { border-color: var(--border-strong); background: var(--bg-soft); color: var(--text); }
.app-card-head { display: flex; align-items: center; gap: 0.6rem; min-width: 0; }
.app-icon {
  display: inline-grid;
  place-items: center;
  width: 2.25rem;
  height: 2.25rem;
  flex: none;
  border-radius: var(--radius);
  background: var(--accent-soft);
  color: var(--accent-text);
  font-size: 1.1rem;
  line-height: 1;
  overflow: hidden;
}
.app-icon svg { width: 18px; height: 18px; }
.app-card-title { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.app-name { font-size: 0.95rem; font-weight: 650; overflow-wrap: anywhere; }
.app-desc { font-size: 0.86rem; color: var(--muted); overflow-wrap: anywhere; }
.app-open { display: grid; place-items: center; flex: none; margin-left: auto; color: var(--muted); }
.app-card:hover .app-open { color: var(--accent-text); }
.app-mini-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(min(100%, 13rem), 1fr)); gap: 0.5rem; }
.app-mini {
  display: flex;
  align-items: center;
  gap: 0.55rem;
  padding: 0.55rem 0.65rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--surface);
  color: var(--text);
  text-decoration: none;
  transition: border-color 0.15s ease, background-color 0.15s ease;
}
.app-mini:hover { border-color: var(--border-strong); background: var(--bg-soft); color: var(--text); }
.app-mini .app-icon { width: 2rem; height: 2rem; }
.app-mini .app-icon svg { width: 16px; height: 16px; }
.app-mini-meta { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.app-mini-name { font-size: 0.88rem; font-weight: 600; overflow-wrap: anywhere; }
.app-mini-cat { font-size: 0.74rem; color: var(--muted); }
.app-mini-external { display: grid; place-items: center; flex: none; margin-left: auto; color: var(--muted); }

/* Dashboard */
.queue-card {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.9rem 1rem;
  padding: 1rem 1.1rem;
  border: 1px solid var(--accent);
  border-radius: var(--radius-lg);
  background: var(--accent-soft);
}
.queue-count {
  display: grid;
  place-items: center;
  width: 2.75rem;
  height: 2.75rem;
  flex: none;
  border-radius: 50%;
  background: var(--accent);
  color: var(--on-accent);
  font-size: 1.15rem;
  font-weight: 800;
  font-variant-numeric: tabular-nums;
}
.queue-copy { flex: 1 1 16rem; min-width: 0; }
.queue-copy h2 { margin: 0; font-size: 1.05rem; color: var(--accent-text); }
.queue-copy p { margin: 0.1rem 0 0; color: var(--text); font-size: 0.9rem; }
@media (max-width: 560px) {
  .queue-card > .btn { width: 100%; }
  .queue-count { display: none; }
}

/* Anträge */
.decision-list { display: flex; flex-direction: column; gap: 0.75rem; }
.decision {
  padding: 1.05rem 1.1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.decision-head { display: flex; flex-wrap: wrap; align-items: flex-start; justify-content: space-between; gap: 0.5rem 1rem; }
.decision-who { flex: 1 1 14rem; min-width: 0; }
.decision-who h3 { margin: 0; font-size: 1rem; overflow-wrap: anywhere; }
.decision-head .row-sub { margin: 0.1rem 0 0; }
.decision-reason {
  margin: 0.75rem 0;
  padding: 0.6rem 0.85rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-soft);
  font-size: 0.92rem;
  overflow-wrap: anywhere;
}
.decision-actions { margin-top: 0.5rem; }
.duration-row { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 0 1rem; align-items: start; }
.duration-row .field { margin-bottom: 0.5rem; }
@media (max-width: 700px) {
  .duration-row { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .duration-row .field:last-child { grid-column: 1 / -1; }
}
.expiry-block { display: flex; flex-direction: column; gap: 0.4rem; margin-bottom: 0.5rem; }
/* Admin access never expires: the fields stay in place but read as inactive. */
.expiry-block.is-inactive .duration-row,
.expiry-block.is-inactive .expiry-quick,
.expiry-block.is-inactive > .checkbox-field,
.expiry-block.is-inactive .expiry-summary { opacity: 0.5; }
.expiry-block.is-inactive .field label { color: var(--muted); }
/* The duration hint and the permanent-access note share one slot, so switching
   between them does not change the height of the form. */
.expiry-notes { display: grid; }
.expiry-notes > * { grid-area: 1 / 1; }
.expiry-notes > .note-inactive { visibility: hidden; }
.admin-expiry-note { font-weight: 600; color: var(--text); }
.expiry-quick { display: flex; flex-wrap: wrap; align-items: center; gap: 0.3rem; }
.expiry-quick .btn { min-height: 2.1rem; padding: 0.2rem 0.55rem; font-size: 0.78rem; }
.expiry-block .checkbox-field { min-height: 0; }
.expiry-block .checkbox-field input[type="checkbox"] { margin-top: 0.1rem; }
.expiry-summary { font-size: 0.84rem; font-weight: 600; }
.expiry-summary[data-expiry-state="until"] { color: var(--text); }
.expiry-summary[data-expiry-state="none"] { color: var(--muted); }
.expiry-summary[data-expiry-state="choose"] { color: var(--warning-text); }
.approve-form .form-note { margin-bottom: 0.4rem; }
.decision-buttons { display: flex; flex-wrap: wrap; align-items: flex-start; gap: 0.5rem; margin-top: 0.6rem; }
.deny-disclosure[open] { flex-basis: 100%; }
.meta-list { display: grid; gap: 0.35rem; margin: 0.5rem 0 0; }
.meta-list > div { display: flex; flex-wrap: wrap; gap: 0.25rem 0.75rem; font-size: 0.88rem; }
.meta-list dt { min-width: 8.5rem; color: var(--muted); }
.meta-list dd { margin: 0; overflow-wrap: anywhere; }

/* Personen */
/* Das Person-hinzufügen-Formular bleibt eine schmale Spalte. */
.member-add .disclosure-form { width: min(26rem, 100%); }

/* Mitteilungen */
.notif-list { display: flex; flex-direction: column; }
.notif {
  display: flex;
  flex-wrap: wrap;
  align-items: flex-start;
  gap: 0.5rem 1rem;
  padding: 0.95rem 0;
  border-bottom: 1px solid var(--border);
}
.notif:first-child { padding-top: 0; }
.notif:last-child { border-bottom: 0; padding-bottom: 0; }
.notif-main { flex: 1 1 18rem; min-width: 0; }
.notif-main h2 { margin: 0; font-size: 0.98rem; line-height: 1.35; overflow-wrap: anywhere; }
.notif-main h2 a { color: var(--text); text-decoration: none; }
.notif-main h2 a:hover { text-decoration: underline; }
.notif.is-unread h2::before {
  content: "";
  display: inline-block;
  width: 0.5rem;
  height: 0.5rem;
  margin-right: 0.45rem;
  border-radius: 50%;
  background: var(--accent);
  vertical-align: 0.1em;
}
.notif .row-sub { margin: 0.1rem 0 0; }
.notif-text { margin: 0.3rem 0 0; color: var(--muted); font-size: 0.9rem; overflow-wrap: anywhere; }
.notif-side { flex: none; }

/* Verwaltung */
.admin-section { scroll-margin-top: 9rem; }
#email { scroll-margin-top: 9rem; }
#members { scroll-margin-top: 9rem; }
.admin-section .search-form { margin-bottom: 0.75rem; }
.admin-row-title { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem; }
.admin-row-title a { color: var(--text); text-decoration: none; }
.admin-row-title a:hover { text-decoration: underline; }
.admin-rows .row-main { gap: 0.2rem; }
.delete-form .btn { color: var(--danger-text); }
.delete-form .btn:hover { background: var(--danger-soft); color: var(--danger-text); }
.danger-zone { border-color: var(--danger-border); }
.danger-zone > summary { color: var(--danger-text); }
.danger-zone > summary + .form-note { margin-top: 0; margin-bottom: 0.6rem; color: var(--danger-text); }

/* Filterleiste (Audit-Log) */
.audit-filters {
  padding: 0.85rem 1rem 0.95rem;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.filter-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 0 0.75rem; }
.filter-grid .field { margin-bottom: 0.65rem; }
.filter-grid .field > label { font-size: 0.75rem; letter-spacing: 0.02em; color: var(--muted); }
.filter-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.4rem 0.9rem; }
.filter-export {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: 0.4rem 0.6rem;
  margin-left: auto;
}
.filter-export .small { line-height: 1.4; }
@media (max-width: 640px) {
  .audit-filters { padding: 0.8rem 0.85rem 0.9rem; }
  .filter-export { margin-left: 0; flex-basis: 100%; }
}
/* Unter 480 px sind zwei Spalten zu eng: der Platzhalter des Akteurs würde
   abgeschnitten. */
@media (max-width: 480px) {
  .filter-grid { grid-template-columns: 1fr; }
}

/* Tabellen */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
  -webkit-overflow-scrolling: touch;
}
.data-table { width: 100%; min-width: 640px; border-collapse: collapse; font-size: 0.9rem; }
.data-table th {
  padding: 0.55rem 0.75rem;
  border-bottom: 1px solid var(--border);
  background: var(--bg-soft);
  color: var(--muted);
  font-size: 0.73rem;
  font-weight: 650;
  letter-spacing: 0.02em;
  text-align: left;
  white-space: nowrap;
}
.data-table td { padding: 0.65rem 0.75rem; border-bottom: 1px solid var(--border); vertical-align: top; overflow-wrap: anywhere; }
.data-table tbody tr:last-child td { border-bottom: 0; }
.data-table tbody tr:hover { background: var(--row-hover); }
.audit-table { min-width: 620px; }
.data-table .attr-key { white-space: nowrap; }
.cell-sub { display: block; font-size: 0.8rem; color: var(--muted); overflow-wrap: anywhere; }
.cell-block { display: block; min-width: 0; overflow-wrap: anywhere; }
.cell-break { overflow-wrap: anywhere; }
@media (max-width: 860px) {
  .table-wrap--cards { overflow: visible; border: 0; border-radius: 0; background: transparent; }
  .data-table.responsive { display: block; min-width: 0; }
  .data-table.responsive thead {
    position: absolute; width: 1px; height: 1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap;
  }
  .data-table.responsive tbody, .data-table.responsive tr, .data-table.responsive td { display: block; width: 100%; }
  .data-table.responsive tbody tr {
    margin-bottom: 0.75rem;
    border: 1px solid var(--border);
    border-radius: var(--radius);
    background: var(--surface);
    overflow: hidden;
  }
  .data-table.responsive tbody tr:last-child { margin-bottom: 0; }
  .data-table.responsive td {
    display: grid;
    grid-template-columns: minmax(6rem, 34%) minmax(0, 1fr);
    gap: 0.6rem;
    align-items: start;
    padding: 0.5rem 0.8rem;
    border-bottom: 1px solid var(--border);
  }
  .data-table.responsive td:last-child { border-bottom: 0; }
  .data-table.responsive td::before {
    content: attr(data-label);
    padding-top: 0.1rem;
    color: var(--muted);
    font-size: 0.73rem;
    font-weight: 600;
  }
  .data-table.responsive td:not([data-label])::before, .data-table.responsive td[data-label=""]::before { display: none; }
  .data-table.responsive td:not([data-label]), .data-table.responsive td[data-label=""] { grid-template-columns: 1fr; }
  .data-table.responsive .attr-key { white-space: normal; overflow-wrap: anywhere; }
  .data-table.responsive td > .badge, .data-table.responsive td > .attr-key { justify-self: start; }
}

/* Pagination */
.pagination { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.75rem; margin-top: 1rem; }
.pagination-page { color: var(--muted); font-size: 0.88rem; }

/* Hilfe */
.guide-list { display: flex; flex-direction: column; border-top: 1px solid var(--border); }
.guide-row {
  display: flex;
  align-items: center;
  gap: 1rem;
  padding: 1rem 0;
  border-bottom: 1px solid var(--border);
  color: var(--text);
  text-decoration: none;
}
.guide-row:hover { color: var(--text); }
.guide-row:hover .guide-row-main strong { text-decoration: underline; }
.guide-row-main { display: flex; flex-direction: column; gap: 0.15rem; flex: 1 1 auto; min-width: 0; }
.guide-row-main strong { font-size: 1rem; overflow-wrap: anywhere; }
.guide-row-arrow { display: grid; place-items: center; flex: none; color: var(--muted); }
.guide-row:hover .guide-row-arrow { color: var(--accent-text); }
.help-layout { display: grid; grid-template-columns: minmax(0, 15rem) minmax(0, 1fr); align-items: start; gap: 1.5rem; }
.help-sidebar { position: sticky; top: 8.5rem; min-width: 0; }
.help-sidebar h2 { margin: 0 0 0.5rem; color: var(--muted); font-size: 0.75rem; font-weight: 700; letter-spacing: 0.08em; text-transform: uppercase; }
.guide-nav { display: flex; flex-direction: column; gap: 0.1rem; }
.guide-link {
  display: flex;
  flex-direction: column;
  gap: 0.1rem;
  padding: 0.55rem 0.65rem;
  border-radius: var(--radius);
  color: var(--text);
  text-decoration: none;
  transition: background-color 0.15s ease;
}
.guide-link:hover { background: var(--bg-soft); color: var(--text); }
.guide-link.is-active { background: var(--accent-soft); color: var(--accent-text); }
.guide-link-title { font-size: 0.9rem; font-weight: 600; line-height: 1.3; overflow-wrap: anywhere; }
.guide-link-desc { font-size: 0.78rem; color: var(--muted); line-height: 1.4; overflow-wrap: anywhere; }
.guide-link.is-active .guide-link-desc { color: var(--accent-text); }
.help-content { min-width: 0; }
.help-back { margin-bottom: 0.75rem; }
.panel { padding: clamp(1rem, 2.5vw, 1.4rem); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); }
@media (max-width: 880px) {
  .help-layout { grid-template-columns: 1fr; gap: 1rem; }
  .help-sidebar { position: static; }
  .help-sidebar h2 {
    position: absolute; width: 1px; height: 1px; margin: -1px; overflow: hidden;
    clip: rect(0, 0, 0, 0); clip-path: inset(50%); white-space: nowrap;
  }
  .guide-nav { flex-direction: row; flex-wrap: wrap; gap: 0.4rem; padding-bottom: 0.25rem; }
  .guide-link { flex: 0 1 auto; padding: 0.5rem 0.7rem; border: 1px solid var(--border); }
  .guide-link-desc { display: none; }
}

/* Markdown in den Anleitungen */
.prose { color: var(--text); overflow-wrap: anywhere; }
.prose > :first-child { margin-top: 0; }
.prose > :last-child { margin-bottom: 0; }
.prose h1, .prose h2, .prose h3, .prose h4 { line-height: 1.2; }
.prose h1 { margin: 0 0 0.6em; font-size: clamp(1.5rem, 3vw, 2rem); }
.prose h2 { margin: 1.8em 0 0.5em; padding-bottom: 0.3rem; border-bottom: 1px solid var(--border); font-size: clamp(1.2rem, 2.2vw, 1.4rem); }
.prose h3 { margin: 1.4em 0 0.45em; font-size: 1.05rem; }
.prose h4 { margin: 1.2em 0 0.35em; font-size: 1rem; }
.prose p { max-width: 74ch; margin: 0 0 1em; line-height: 1.7; }
.prose ul, .prose ol { margin: 0 0 1em; padding-left: 1.3em; }
.prose li { max-width: 74ch; margin: 0.25em 0; line-height: 1.65; }
.prose li > ul, .prose li > ol { margin-bottom: 0; }
.prose li::marker { color: var(--accent); font-weight: 700; }
.prose a { color: var(--link); }
.prose strong { font-weight: 650; }
.prose code {
  padding: 0.1em 0.35em;
  border: 1px solid var(--border);
  border-radius: 4px;
  background: var(--bg-soft);
  color: var(--muted);
  font-family: var(--font-mono);
  font-size: 0.86em;
  overflow-wrap: anywhere;
}
.prose pre {
  margin: 0 0 1.2em;
  padding: 0.9rem 1rem;
  border: 1px solid var(--border);
  border-radius: var(--radius);
  background: var(--bg-soft);
  overflow-x: auto;
  -webkit-overflow-scrolling: touch;
}
.prose pre code { padding: 0; border: 0; background: transparent; color: var(--text); font-size: 0.85rem; white-space: pre; }
.prose blockquote {
  margin: 1.2em 0;
  padding: 0.7rem 1rem;
  border-left: 3px solid var(--accent);
  border-radius: 0 var(--radius) var(--radius) 0;
  background: var(--bg-soft);
  color: var(--muted);
}
.prose blockquote p:last-child { margin-bottom: 0; }
.prose hr { margin: 2rem 0; border: 0; border-top: 1px solid var(--border); }
.prose table { width: 100%; max-width: 100%; margin: 1em 0 1.3em; border-collapse: collapse; font-size: 0.9rem; }
.prose th, .prose td { padding: 0.5rem 0.65rem; border: 1px solid var(--border); text-align: left; vertical-align: top; overflow-wrap: anywhere; }
.prose th { background: var(--bg-soft); font-size: 0.78rem; font-weight: 650; white-space: nowrap; }
.prose tbody tr:nth-child(even) { background: var(--row-hover); }
.prose img { max-width: 100%; height: auto; border-radius: var(--radius); }
.prose input[type="checkbox"] { width: 1rem; height: 1rem; margin-right: 0.35rem; vertical-align: -0.12em; accent-color: var(--accent); }
@media (max-width: 560px) {
  .prose table { display: block; overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .prose th, .prose td { padding: 0.45rem 0.5rem; }
}

/* Anmeldung */
.auth-main { display: flex; align-items: center; justify-content: center; }
.auth-card {
  width: 100%;
  max-width: 25rem;
  margin-inline: auto;
  padding: clamp(1.4rem, 4vw, 2rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.auth-card-mark { display: block; width: 52px; height: 52px; margin: 0 auto 1rem; object-fit: contain; }
.auth-card h1 { margin: 0 0 0.35rem; font-size: clamp(1.5rem, 4vw, 1.9rem); text-align: center; }
.auth-card .lede { margin: 0 0 1.25rem; text-align: center; font-size: 0.95rem; }
.auth-card .btn-block { margin-top: 0.25rem; }
.auth-card .form-note { margin-top: 0.7rem; text-align: center; }
.auth-card .notice { margin-top: 0.5rem; text-align: left; }

/* Abmelden */
.logout-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 0.75rem; align-items: stretch; }
.logout-choice {
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  padding: clamp(1rem, 3vw, 1.4rem);
  border: 1px solid var(--border);
  border-radius: var(--radius-lg);
  background: var(--surface);
}
.logout-choice.is-primary { border-color: var(--accent); background: var(--accent-soft); }
.logout-choice h2 { margin: 0; font-size: 1.05rem; }
.logout-choice > p { margin: 0; color: var(--muted); font-size: 0.92rem; }
.logout-choice.is-primary > p { color: var(--text); }
.logout-flag {
  order: -1;
  align-self: flex-start;
  padding: 0.05rem 0.5rem;
  border-radius: var(--radius-pill);
  background: var(--accent);
  color: var(--on-accent);
  font-size: 0.68rem;
  font-weight: 650;
}
.logout-form-card { margin: 0; margin-top: auto; padding-top: 0.8rem; border-top: 1px solid var(--border); }
.logout-cancel { display: flex; }
.logout-cancel .text-link { color: var(--muted); }
@media (max-width: 700px) { .logout-grid { grid-template-columns: 1fr; } }

/* Fehlerseite */
.error-card { max-width: 32rem; margin: clamp(1rem, 5vw, 3rem) auto; padding: clamp(1.5rem, 5vw, 2.4rem); border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); text-align: center; }
.error-code { margin: 0; font-family: var(--font-display); font-size: clamp(2.4rem, 8vw, 3.5rem); font-weight: 800; line-height: 1; letter-spacing: -0.04em; color: var(--accent); }
.error-card h1 { margin: 0.3rem 0 0.5rem; font-size: clamp(1.3rem, 3vw, 1.7rem); }
.error-card .lede { margin-inline: auto; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 0.5rem; margin-top: 1.2rem; }

/* Kleine Geräte: großzügige Tippflächen */
@media (max-width: 560px) {
  .btn-sm { min-height: 2.75rem; }
  .lang-link { min-width: 2.75rem; min-height: 2.75rem; }
  .disclosure-compact > summary { min-height: 2.75rem; }
  .guide-link { min-height: 2.75rem; }
}

/* Bewegung */
@keyframes rise {
  from { opacity: 0; transform: translateY(5px); }
  to { opacity: 1; transform: none; }
}
@media (prefers-reduced-motion: no-preference) {
  .page-main .stack > * { animation: rise 0.28s ease-out both; }
  .page-main .stack > *:nth-child(2) { animation-delay: 0.03s; }
  .page-main .stack > *:nth-child(3) { animation-delay: 0.06s; }
  .page-main .stack > *:nth-child(4) { animation-delay: 0.09s; }
  /* Das Popover blendet beim Aufklappen kurz ein; der Knopf darüber bleibt
     unbewegt, weil nur die schwebende Ebene animiert wird. */
}
@media (min-width: 561px) and (prefers-reduced-motion: no-preference) {
  .page-group-members .row-actions > .action-disclosure[open] > .disclosure-form {
    animation: rise 0.16s ease-out both;
  }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: 0.01ms !important; animation-iteration-count: 1 !important; transition-duration: 0.01ms !important; scroll-behavior: auto !important; }
}

/* Windows-Kontrastmodus */
@media (forced-colors: active) {
  .btn, .badge, .empty, .table-wrap, .field input, .field textarea, .field select,
  .user-menu-panel, .lang-switch, .queue-card, .decision { forced-color-adjust: auto; }
  :where(a, button, input, textarea, select, summary, [tabindex]):focus-visible { outline: 2px solid CanvasText; outline-offset: 2px; }
}

/* Druck */
@media print {
  body { background: #ffffff; color: #000000; }
  .site-header, .site-footer, .skip-link, .page-actions, .btn, .flash-stack, .help-sidebar, .breadcrumb { display: none !important; }
  .panel, .decision, .table-wrap, .auth-card, .error-card { border-color: #cccccc; }
  .help-layout { display: block; }
}

/* Admin overview */
.stat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(min(100%, 9rem), 1fr)); gap: 0.75rem; }
/* Ab hier vier feste Spalten: mit sieben Kacheln bliebe bei sechs Spalten eine
   einzelne Kachel allein in der letzten Zeile. */
@media (min-width: 880px) {
  .stat-grid { grid-template-columns: repeat(4, minmax(0, 1fr)); }
}
.stat-card { display: flex; flex-direction: column; gap: 0.15rem; padding: 0.9rem 1rem; border: 1px solid var(--border); border-radius: var(--radius-lg); background: var(--surface); color: var(--text); }
a.stat-card:hover { border-color: var(--border-strong); }
.stat-card.is-alert { border-color: var(--danger-border); background: var(--danger-soft); }
.stat-value { font-size: 1.65rem; font-weight: 800; line-height: 1.1; }
.stat-label { color: var(--muted); font-size: 0.75rem; font-weight: 600; letter-spacing: 0.06em; text-transform: uppercase; }

/* Sammelauswahl in der Mitgliederliste */
.bulk-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 0.5rem; margin: 0.4rem 0 0.1rem; }
.bulk-select-all { min-height: 0; margin: 0; font-size: 0.88rem; color: var(--muted); }
.bulk-select-all input[type="checkbox"] { margin-top: 0; }
/* Das Kästchen belegt in jeder Zeile denselben Platz, auch bei der eigenen
   Person (ohne Auswahl), damit die Namen bündig bleiben. */
.row-select { flex: none; display: flex; align-items: center; justify-content: center; width: 1.3rem; padding-top: 0.1rem; }
.row-select input[type="checkbox"] { width: 1.15rem; height: 1.15rem; margin: 0; accent-color: var(--accent); cursor: pointer; }

/* Aktionsleiste: schwebt am unteren Rand, damit die Auswahl beim Durchsehen
   der Liste erreichbar bleibt, ohne die Zeilen zu verschieben. app.js setzt
   dafür has-bulk-bar am body und schafft unten Platz zum Weiterscrollen. */
.bulk-bar {
  position: fixed;
  left: 50%;
  bottom: 0.75rem;
  transform: translateX(-50%);
  width: min(var(--container), 100% - 2rem);
  z-index: 5;
  padding: 0.7rem 0.9rem;
  border: 1px solid var(--border-strong);
  border-radius: var(--radius-lg);
  background: var(--surface);
  box-shadow: var(--shadow-menu);
}
.bulk-bar[hidden] { display: none; }
body.has-bulk-bar .page-main { padding-bottom: 11rem; }
.bulk-form { display: grid; gap: 0.45rem; }
.bulk-top { display: flex; flex-wrap: wrap; align-items: end; gap: 0.5rem 1.25rem; }
.bulk-count { margin: 0; margin-inline-end: auto; font-weight: 650; align-self: center; }
.bulk-fields { display: flex; flex-wrap: wrap; align-items: end; gap: 0.5rem 0.75rem; }
.bulk-fields .field { margin: 0; }
.bulk-fields .field label { font-size: 0.78rem; }
.bulk-fields input[type="number"] { width: 5.5rem; }
.bulk-no-expiry { min-height: 0; align-items: center; }
.bulk-no-expiry input[type="checkbox"] { margin-top: 0; }
.bulk-bar .expiry-summary { font-size: 0.82rem; }
.bulk-bar .form-note { margin: 0; }
.bulk-actions { display: flex; flex-wrap: wrap; align-items: center; gap: 0.5rem; }
@media (max-width: 560px) {
  .bulk-bar { bottom: 0.4rem; width: calc(100% - 1.25rem); }
  body.has-bulk-bar .page-main { padding-bottom: 17rem; }
  .bulk-fields { flex: 1 1 100%; }
  .bulk-actions { width: 100%; }
  .bulk-actions .btn { flex: 1 1 auto; }
  .bulk-bar .bulk-hint { display: none; }
}
@media print {
  .bulk-bar, .bulk-head, .row-select { display: none !important; }
}

/* Die Mitgliederliste wird nicht eingeblendet: die Einblend-Animation setzt
   eine Transform auf den Abschnitt und macht ihn damit zum Bezugsrahmen für
   die schwebende Sammelaktionsleiste. Ohne Animation bleibt die Leiste am
   Fensterrand, auch auf schmalen Geräten. */
.page-group-members .stack > #members { animation: none; }
