/* =========================================================
   Happy Hippos - Admin-Bereich
   Erweitert style.css mit Dashboard-Komponenten
   ========================================================= */

/* Admin-Layout */
.admin-body {
  background: #f5f1ea;
  min-height: 100vh;

  /* Hoehen der klebenden Leisten. Suchfeld und Listenkopf richten sich daran
     aus, damit sie exakt untereinander andocken.

     Die Werte hier sind nur ein Rueckfall: Die tatsaechliche Hoehe misst
     auth-guard.js beim Laden und schreibt sie in dieselben Variablen. Ein
     fester Wert ginge nicht - die Kopfleiste ist je nach Anzahl der
     Menuepunkte unterschiedlich hoch (ein Admin sieht 17, ein Benutzer
     vielleicht 4), und sie bricht dann auf mehrere Zeilen um. */
  --h-admin-header: 72px;
  --h-listen-suche: 68px;
}

.admin-header {
  background: var(--c-brown);
  color: var(--c-cream);
  padding: 0.9rem 0;
  border-bottom: 4px solid var(--c-orange);
  position: sticky;
  top: 0;
  z-index: 100;
}
.admin-header__inner {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
}
.admin-header__brand {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  text-decoration: none;
  color: var(--c-yellow);
  font-family: var(--ff-display);
  font-size: 1.1rem;
}
.admin-header__brand img { width: 40px; height: 40px; border-radius: 50%; }
.admin-header__brand small {
  display: block;
  font-family: var(--ff-body);
  font-size: 0.7rem;
  letter-spacing: 0.15em;
  text-transform: uppercase;
  color: var(--c-cream);
  font-weight: 500;
}

.admin-nav {
  display: flex;
  gap: 0.3rem;
  list-style: none;
  margin: 0;
  padding: 0;
  flex-wrap: wrap;
}
.admin-nav a {
  display: block;
  padding: 0.5rem 0.9rem;
  border-radius: var(--r-md);
  color: var(--c-cream);
  text-decoration: none;
  font-size: 0.95rem;
  font-weight: 500;
}
.admin-nav a:hover,
.admin-nav a[aria-current="page"] {
  background: rgba(255, 255, 255, 0.12);
  color: var(--c-yellow);
}
.admin-nav__user {
  display: flex;
  align-items: center;
  gap: 0.7rem;
  font-size: 0.9rem;
  color: var(--c-cream);
}
.admin-nav__logout {
  background: var(--c-orange);
  color: #fff !important;
  border: 0;
  padding: 0.45rem 0.9rem;
  border-radius: var(--r-md);
  cursor: pointer;
  font-family: inherit;
  font-size: 0.9rem;
  font-weight: 500;
}
.admin-nav__logout:hover { background: var(--c-orange-dark); }

/* Burger-Knopf: am PC unsichtbar, am Handy der Menü-Schalter */
.admin-nav__burger {
  display: none;
  background: none;
  border: 0;
  padding: 0.4rem;
  cursor: pointer;
  color: var(--c-cream);
  order: 2;
}
.admin-nav__burger svg { width: 28px; height: 28px; display: block; }

/* Public-Site-Link Button */
.admin-public-link {
  background: transparent;
  border: 1px solid var(--c-cream);
  color: var(--c-cream) !important;
  padding: 0.45rem 0.9rem;
  border-radius: var(--r-md);
  font-size: 0.9rem;
  text-decoration: none;
}
.admin-public-link:hover { background: rgba(255, 255, 255, 0.1); }

/* Main Content */
.admin-main {
  padding: 2rem 0 4rem;
}

.admin-page-header {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  margin-bottom: 2rem;
  flex-wrap: wrap;
}
.admin-page-header h1 {
  margin: 0;
  font-size: clamp(1.6rem, 3.5vw, 2.2rem);
}
.admin-page-header__lead {
  color: var(--c-text-muted);
  margin: 0.3rem 0 0;
}

/* Dashboard Kacheln */
.dashboard-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(220px, 1fr));
  gap: 1.4rem;
}
.dashboard-card {
  background: var(--c-white);
  border-radius: var(--r-lg);
  padding: 1.6rem;
  text-decoration: none;
  color: var(--c-text);
  box-shadow: 0 4px 14px var(--c-shadow);
  border: 1px solid rgba(91, 46, 26, 0.06);
  transition: transform 0.18s ease, box-shadow 0.18s ease;
  display: flex;
  flex-direction: column;
  gap: 0.4rem;
}
.dashboard-card:hover {
  transform: translateY(-3px);
  box-shadow: 0 10px 28px var(--c-shadow-strong);
  color: var(--c-text);
}
.dashboard-card__icon {
  font-size: 2.2rem;
  margin-bottom: 0.4rem;
}
.dashboard-card__title {
  font-family: var(--ff-display);
  font-size: 1.2rem;
  font-weight: 600;
  color: var(--c-brown);
}
.dashboard-card__count {
  font-family: var(--ff-display);
  font-size: 2rem;
  color: var(--c-orange-dark);
  font-weight: 600;
  line-height: 1;
}
.dashboard-card__hint {
  font-size: 0.85rem;
  color: var(--c-text-muted);
}

/* Login Box / Setup Box */
.auth-container {
  min-height: calc(100vh - 80px);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 2rem 1rem;
}
.auth-box {
  background: var(--c-white);
  border-radius: var(--r-xl);
  padding: clamp(1.8rem, 4vw, 3rem);
  width: 100%;
  max-width: 460px;
  box-shadow: 0 20px 50px var(--c-shadow-strong);
  border: 1px solid rgba(91, 46, 26, 0.06);
}
.auth-box__logo {
  text-align: center;
  margin-bottom: 1.5rem;
}
.auth-box__logo img {
  width: 80px;
  height: 80px;
  border-radius: 50%;
  margin: 0 auto;
}
.auth-box h1 {
  text-align: center;
  margin-bottom: 0.4rem;
  font-size: 1.7rem;
}
.auth-box__lead {
  text-align: center;
  color: var(--c-text-muted);
  margin-bottom: 2rem;
}

/* Forms */
.form-group {
  margin-bottom: 1.2rem;
}
.form-group label {
  display: block;
  font-weight: 600;
  color: var(--c-brown);
  margin-bottom: 0.4rem;
  font-size: 0.95rem;
}
.form-group input[type="text"],
.form-group input[type="email"],
.form-group input[type="password"],
.form-group input[type="number"],
.form-group input[type="date"],
.form-group input[type="time"],
.form-group input[type="url"],
.form-group input[type="tel"],
.form-group input[type="search"],
.form-group select,
.form-group textarea {
  width: 100%;
  padding: 0.75rem 0.95rem;
  border: 2px solid #e5dccb;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 1rem;
  background: var(--c-white);
  color: var(--c-text);
  transition: border-color 0.15s ease;
}
.form-group input:focus,
.form-group select:focus,
.form-group textarea:focus {
  outline: none;
  border-color: var(--c-orange);
}
.form-group textarea {
  min-height: 120px;
  resize: vertical;
  font-family: inherit;
}
.form-group__hint {
  font-size: 0.85rem;
  color: var(--c-text-muted);
  margin-top: 0.3rem;
}
.form-group__error {
  color: #c0392b;
  font-size: 0.9rem;
  margin-top: 0.3rem;
}

.form-row {
  display: grid;
  grid-template-columns: 1fr 1fr;
  gap: 1rem;
}
@media (max-width: 600px) {
  .form-row { grid-template-columns: 1fr; }
}

/* Buttons im Admin (zusätzlich zu .btn) */
.btn--full { width: 100%; justify-content: center; }
.btn--danger {
  background: #c0392b;
  box-shadow: 0 8px 20px rgba(192, 57, 43, 0.3);
}
.btn--danger:hover { background: #a32a1d; }
.btn--small {
  padding: 0.45rem 0.85rem;
  font-size: 0.9rem;
}
.btn--ghost {
  background: transparent;
  color: var(--c-brown) !important;
  border: 2px solid #e5dccb;
  box-shadow: none;
}
.btn--ghost:hover { background: var(--c-cream); }

/* Alerts / Notices */
.alert {
  padding: 1rem 1.2rem;
  border-radius: var(--r-md);
  margin-bottom: 1.2rem;
  font-size: 0.95rem;
}
.alert--success {
  background: #d4f4dd;
  color: #155724;
  border-left: 4px solid #28a745;
}
.alert--error {
  background: #f8d7da;
  color: #721c24;
  border-left: 4px solid #c0392b;
}
.alert--info {
  background: #d1ecf1;
  color: #0c5460;
  border-left: 4px solid #17a2b8;
}
.alert--warning {
  background: #fff3cd;
  color: #856404;
  border-left: 4px solid #ffc107;
}

/* Tabellen / Listen */
.admin-list {
  background: var(--c-white);
  border-radius: var(--r-lg);
  box-shadow: 0 4px 14px var(--c-shadow);
  /* KEIN overflow: hidden!
     Ein overflow != visible an einem Vorfahren macht "position: sticky" bei
     allen Nachfahren wirkungslos - der Spaltenkopf unten wuerde dann einfach
     nicht kleben. Die runden Ecken sichern stattdessen die erste und letzte
     Zeile selbst (siehe :first-child / :last-child weiter unten). */
}
.admin-list__head,
.admin-list__row {
  display: grid;
  align-items: center;
  gap: 1rem;
  padding: 0.9rem 1.2rem;
  border-bottom: 1px solid #f0e8d9;
}
.admin-list__head {
  background: var(--c-cream);
  font-weight: 600;
  color: var(--c-brown);
  font-size: 0.9rem;
  text-transform: uppercase;
  letter-spacing: 0.05em;

  /* Bleibt beim Scrollen unter der Kopfleiste stehen, damit man in langen
     Listen weiterhin sieht, welche Spalte was ist. Der Hintergrund ist
     deckend - die Zeilen laufen unsichtbar darunter durch. */
  position: sticky;
  top: calc(var(--h-admin-header) + var(--h-listen-suche));
  z-index: 20;   /* unter der Kopfleiste (100) und unter Modals */

  /* Obere Ecken runden, weil .admin-list das nicht mehr abschneidet. */
  border-radius: var(--r-lg) var(--r-lg) 0 0;
}
/* Die runden Ecken, die frueher das overflow: hidden des Rahmens erzeugt hat.
   Jetzt uebernimmt sie die jeweils erste und letzte Zeile selbst.
   :not(.admin-list__head) verhindert, dass eine allein stehende Kopfzeile
   (leere Liste) auch unten gerundet wird - dort greift die Regel darunter. */
.admin-list > :last-child:not(.admin-list__head) {
  border-radius: 0 0 var(--r-lg) var(--r-lg);
}
/* Kopfzeile ohne jeden Eintrag darunter: rundum abgerundet. */
.admin-list__head:last-child { border-radius: var(--r-lg); }
.admin-list__row:last-child { border-bottom: 0; }
.admin-list__row:hover { background: #fcf8ee; }
.admin-list__row--empty {
  text-align: center;
  color: var(--c-text-muted);
  padding: 3rem 1.2rem;
  font-style: italic;
}

.admin-list__actions {
  display: flex;
  gap: 0.5rem;
  justify-content: flex-end;
}
/* Knöpfe untereinander (Benutzerverwaltung: 3 Knöpfe passen nicht nebeneinander) */
.admin-list__actions--stapel {
  flex-direction: column;
  align-items: stretch;
  gap: 0.35rem;
}

/* Termine im Admin */
.admin-list--termine .admin-list__head,
.admin-list--termine .admin-list__row {
  grid-template-columns: 100px 1fr 130px 140px;
}

/* Tänzer im Admin */
.admin-list--taenzer .admin-list__head,
.admin-list--taenzer .admin-list__row {
  grid-template-columns: 70px 1fr 160px 130px 140px;
}

/* Rollen im Admin */
.admin-list--funktionen .admin-list__head,
.admin-list--funktionen .admin-list__row {
  grid-template-columns: 1fr 200px 90px 130px 200px;
}

/* Benutzer im Admin */
.admin-list--benutzer .admin-list__head,
.admin-list--benutzer .admin-list__row {
  grid-template-columns: 1fr 130px 1fr 190px;
}

/* --- Handy: Listenzeilen werden zu Karten (siehe auch Block ganz unten) ---
   Gilt für alle drei Listen gemeinsam, da sie dieselbe Struktur nutzen.
   Die Spaltenüberschrift entfällt; stattdessen steht die Beschriftung
   per data-label direkt vor dem Wert. */
@media (max-width: 700px) {
  .admin-list {
    background: transparent;
    box-shadow: none;
    border-radius: 0;
    overflow: visible;
  }
  /* Der Spaltenkopf entfaellt am Handy ganz (die Beschriftung steht per
     data-label vor jedem Wert). Damit ist auch das Kleben hier gegenstandslos. */
  .admin-list__head { display: none; position: static; }

  .admin-list__row,
  .admin-list--termine .admin-list__row,
  .admin-list--taenzer .admin-list__row,
  .admin-list--funktionen .admin-list__row,
  .admin-list--benutzer .admin-list__row {
    grid-template-columns: 1fr;
    gap: 0.45rem;
    background: var(--c-white);
    border: 1px solid rgba(91, 46, 26, 0.06);
    border-radius: var(--r-lg);
    box-shadow: 0 4px 14px var(--c-shadow);
    margin-bottom: 1rem;
    padding: 1.1rem 1.2rem;
  }
  .admin-list__row:last-child { border-bottom: 1px solid rgba(91, 46, 26, 0.06); }
  .admin-list__row:hover { background: var(--c-white); }

  /* Beschriftung vor den Wert stellen */
  .admin-list__row > [data-label]::before {
    content: attr(data-label) ": ";
    font-weight: 600;
    color: var(--c-brown);
  }

  /* Tänzer-Foto: neben den Namen statt darüber */
  .admin-list--taenzer .admin-list__row { grid-template-columns: 50px 1fr; }
  .admin-list--taenzer .admin-list__row > *:not(.admin-list__foto) { grid-column: 2; }
  .admin-list__foto { grid-row: 1; grid-column: 1; }

  /* Aktionen: volle Breite, gut mit dem Finger treffbar */
  .admin-list__actions,
  .admin-list__actions--stapel {
    flex-direction: column;
    align-items: stretch;
    gap: 0.5rem;
    margin-top: 0.6rem;
  }
  .admin-list--taenzer .admin-list__actions { grid-column: 1 / -1; }
  .admin-list__actions .btn {
    width: 100%;
    min-height: 44px;
    justify-content: center;
  }

  .admin-list__row--empty {
    grid-template-columns: 1fr;
    padding: 2.5rem 1.2rem;
  }

}

/* Suchfeld über den Listen */
.listen-suche {
  display: flex;
  align-items: center;
  gap: 0.8rem;

  /* Klebt zusammen mit dem Spaltenkopf, damit man auch weit unten in einer
     langen Liste suchen kann, ohne erst nach oben zu scrollen.

     Zwei Dinge sind hier wichtig:
     - Deckender Hintergrund (die Seitenfarbe), sonst scrollen die Zeilen
       sichtbar hinter dem Feld durch.
     - Innenabstand statt margin-bottom: Ein aeusserer Abstand waere
       durchsichtig, und zwischen Suchfeld und Spaltenkopf entstuende beim
       Kleben ein Spalt, durch den die Liste zu sehen waere. */
  position: sticky;
  top: var(--h-admin-header);
  z-index: 21;                 /* eine Stufe ueber dem Spaltenkopf */
  background: #f5f1ea;         /* = .admin-body */
  padding: 0.7rem 0;
  margin-bottom: 0;
}

/* Ist die Kopfleiste so hoch, dass ein klebendes Suchfeld den halben
   Bildschirm belegen wuerde (Admin mit vielen Menuepunkten), setzt
   auth-guard.js diese Klasse: Dann scrollt wieder alles normal mit,
   statt die Liste zusammenzuquetschen.

   WICHTIG: Das Padding bleibt dabei unveraendert. Frueher wurde es hier auf 0
   gesetzt - dadurch war das Suchfeld je nach Zustand 67px oder 45px hoch.
   Da auth-guard.js diese Hoehe misst, um daraus den Zustand zu bestimmen,
   war das eine Rueckkopplung: Die Messung veraenderte, was sie mass, und der
   Spaltenkopf dockte 22px zu hoch an - mitten in die erste Zeile hinein.
   Die Hoehe muss unabhaengig davon sein, ob gerade geklebt wird. */
.leisten-zu-hoch .listen-suche,
.leisten-zu-hoch .admin-list__head {
  position: static;
}
.listen-suche__feld {
  flex: 1 1 auto;
  max-width: 420px;
  padding: 0.65rem 0.95rem;
  border: 2px solid #e5dccb;
  border-radius: var(--r-md);
  font-family: inherit;
  font-size: 1rem;
  background: var(--c-white);
  color: var(--c-text);
}
.listen-suche__feld:focus { outline: none; border-color: var(--c-orange); }
.listen-suche__treffer {
  font-size: 0.9rem;
  color: var(--c-text-muted);
  white-space: nowrap;
}

/* Suchfeld am Handy: volle Breite, gut mit dem Finger treffbar */
@media (max-width: 700px) {
  /* Nicht klebend: Auf dem kleinen Bildschirm wuerde das Feld zusammen mit
     der Kopfleiste zu viel von der Liste verdecken. Der Spaltenkopf entfaellt
     hier ohnehin (siehe .admin-list__head weiter unten). */
  .listen-suche {
    flex-wrap: wrap;
    position: static;
    padding: 0;
    margin-bottom: 1rem;
  }
  .listen-suche__feld { max-width: none; min-height: 44px; }
}

/* Galerie-Grid im Admin */
.admin-galerie-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
  gap: 1rem;
}
.admin-galerie-item {
  background: var(--c-white);
  border-radius: var(--r-md);
  overflow: hidden;
  box-shadow: 0 4px 12px var(--c-shadow);
  position: relative;
}
.admin-galerie-item img {
  width: 100%;
  aspect-ratio: 4 / 3;
  object-fit: cover;
}
.admin-galerie-item__body {
  padding: 0.7rem 0.9rem;
}
.admin-galerie-item__title {
  font-weight: 600;
  font-size: 0.95rem;
  color: var(--c-brown);
  margin-bottom: 0.2rem;
}
.admin-galerie-item__actions {
  display: flex;
  gap: 0.4rem;
  margin-top: 0.5rem;
}

/* Upload Drop-Zone */
.upload-zone {
  border: 2px dashed var(--c-orange);
  background: var(--c-cream-light);
  border-radius: var(--r-lg);
  padding: 2rem 1.5rem;
  text-align: center;
  cursor: pointer;
  transition: background 0.15s ease, border-color 0.15s ease;
  margin-bottom: 1.5rem;
}
.upload-zone:hover,
.upload-zone.is-dragover {
  background: var(--c-cream);
  border-color: var(--c-orange-dark);
}
.upload-zone__icon {
  font-size: 2.5rem;
  margin-bottom: 0.4rem;
}
.upload-zone__hint {
  color: var(--c-text-muted);
  font-size: 0.9rem;
}
.upload-zone input[type="file"] { display: none; }

.upload-progress {
  margin-top: 0.8rem;
  background: var(--c-white);
  border-radius: 999px;
  height: 8px;
  overflow: hidden;
  display: none;
}
.upload-progress.is-active { display: block; }
.upload-progress__bar {
  height: 100%;
  background: var(--c-orange);
  width: 0%;
  transition: width 0.2s ease;
}

/* Modal */
.modal {
  position: fixed;
  inset: 0;
  background: rgba(42, 24, 16, 0.6);
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 1000;
  padding: 1rem;
}
.modal.is-open { display: flex; }
.modal__box {
  background: var(--c-white);
  border-radius: var(--r-xl);
  padding: 2rem;
  width: 100%;
  max-width: 540px;
  max-height: 90vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,0.3);
  position: relative;   /* Bezugspunkt fuer das Schliessen-Kreuz */
}
.modal__box h2 {
  margin-top: 0;
  margin-bottom: 1.2rem;
  padding-right: 2.8rem;   /* Platz, damit lange Titel nicht unters Kreuz laufen */
}

/* Schliessen-Kreuz - wird von assets/js/admin/modal.js eingehaengt.
   Gestaltet wie das Kreuz der Lightbox auf der oeffentlichen Seite
   (siehe .lightbox__close in style.css), damit es sich vertraut anfuehlt.

   sticky statt absolute: Die Box selbst scrollt (max-height + overflow-y),
   ein absolut gesetztes Kreuz wuerde beim Scrollen nach oben wegwandern.
   Im langen Mitglieder-Formular bleibt es so immer erreichbar.
   float: right nimmt es aus dem Textfluss - sonst schoebe es die
   Ueberschrift nach unten. */
.modal__close {
  position: sticky;
  top: -0.6rem;              /* haengt am oberen Rand, Padding ausgeglichen */
  float: right;
  margin: -0.6rem -0.6rem 0 0;
  z-index: 2;
  width: 44px;               /* Touch-Groesse wie ueberall im Projekt */
  height: 44px;
  flex: 0 0 auto;
  border: 0;
  border-radius: 50%;
  background: var(--c-cream);
  color: var(--c-brown);
  font-size: 1.6rem;
  line-height: 1;
  cursor: pointer;
  transition: background 0.15s, color 0.15s;
}
.modal__close:hover {
  background: var(--c-orange);
  color: var(--c-white);
}
.modal__close:focus-visible {
  outline: 3px solid var(--c-orange);
  outline-offset: 2px;
}

.modal__footer {
  display: flex;
  gap: 0.7rem;
  justify-content: flex-end;
  margin-top: 1.5rem;
  clear: both;   /* unter das gefloatete Kreuz */
}

/* Loading-State */
.loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 3rem 1rem;
  color: var(--c-text-muted);
  gap: 0.7rem;
}
.loading::before {
  content: '';
  width: 22px;
  height: 22px;
  border: 3px solid var(--c-cream);
  border-top-color: var(--c-orange);
  border-radius: 50%;
  animation: spin 0.8s linear infinite;
}
@keyframes spin {
  to { transform: rotate(360deg); }
}

/* Badges */
.badge {
  display: inline-block;
  padding: 0.2rem 0.7rem;
  border-radius: 999px;
  font-size: 0.78rem;
  font-weight: 600;
  text-transform: uppercase;
  letter-spacing: 0.05em;
}
.badge--orange { background: var(--c-orange); color: #fff; }
.badge--brown { background: var(--c-brown); color: var(--c-cream); }
.badge--green { background: #28a745; color: #fff; }
.badge--red { background: #c0392b; color: #fff; }
.badge--gray { background: #6c757d; color: #fff; }

/* Status-Indikator (oben rechts in der Nav) */
.status-pill {
  font-size: 0.8rem;
  padding: 0.2rem 0.6rem;
  background: rgba(255, 255, 255, 0.15);
  border-radius: 999px;
}

/* Einladung, den Admin-Bereich aufs Handy zu legen (siehe app-hinweis.js).
   Sitzt im Info-Bereich des Dashboards und soll dort freundlich, aber nicht
   wie eine Warnung wirken - deshalb der ruhige Sandton statt eines Rahmens. */
.app-hinweis {
  background: var(--c-cream);
  border-radius: var(--r-md);
  padding: 1.2rem 1.4rem;
  grid-column: 1 / -1;   /* über die ganze Breite des Info-Rasters */
}
.app-hinweis__titel {
  font-family: var(--ff-display);
  color: var(--c-brown);
  font-size: 1.1rem;
  margin-bottom: 0.4rem;
}
.app-hinweis__text {
  margin: 0 0 0.9rem;
  font-size: 0.95rem;
}
.app-hinweis__knoepfe {
  display: flex;
  gap: 0.6rem;
  flex-wrap: wrap;
}
/* Schritte der iPhone-Anleitung - etwas abgesetzt, damit die Aufzählung
   nicht mit dem Fließtext darüber verschwimmt. */
.app-hinweis__schritte {
  background: var(--c-white);
  border-radius: var(--r-md);
  padding: 0.9rem 1.1rem;
  margin-bottom: 0.9rem;
  font-size: 0.95rem;
}

/* Inline-Hilfe */
.help-box {
  background: #fff8e7;
  border-left: 4px solid var(--c-yellow);
  padding: 1rem 1.2rem;
  border-radius: var(--r-md);
  margin-bottom: 1.5rem;
  font-size: 0.95rem;
}
.help-box strong { color: var(--c-brown); }

/* Responsive */
@media (max-width: 900px) {
  /* Ab hier passen die bis zu 11 Menüpunkte nicht mehr in eine Zeile.
     Statt umzubrechen (und den halben Bildschirm zu belegen) klappt das
     Menü über den Burger-Knopf auf - wie auf der öffentlichen Seite. */
  .admin-header { position: static; }   /* nicht mehr klebend: spart Platz beim Scrollen */

  /* Klebt die Kopfleiste nicht, darf auch nichts unter ihr andocken - sonst
     bliebe ueber dem Suchfeld ein leerer Streifen stehen. Den passenden Wert
     setzt messeLeisten() in auth-guard.js: Es prueft, ob die Leiste wirklich
     klebt, und traegt sonst 0 ein. Hier steht der Rueckfall fuer den Fall,
     dass das Skript (noch) nicht gelaufen ist. */
  .admin-body { --h-admin-header: 0px; }

  /* Als installierte App gibt es keine Browser-Adressleiste, die schon Platz
     wegnimmt. Dort darf die Kopfleiste kleben bleiben - das Menü ist dann
     immer erreichbar, ohne nach oben zu scrollen. */
  @media (display-mode: standalone) {
    .admin-header { position: sticky; top: 0; }
  }
  .admin-header__inner {
    /* wrap (nicht nowrap), damit die aufgeklappte Nav in eine eigene Zeile
       rutscht. Die drei Elemente davor passen zusammen in die erste Zeile. */
    flex-wrap: wrap;
    gap: 0.6rem;
  }
  .admin-header__brand { order: 1; flex: 1 1 auto; min-width: 0; }
  .admin-header__brand span { min-width: 0; }
  .admin-nav__burger { display: inline-flex; }
  .admin-nav__user { order: 3; flex: 0 0 auto; gap: 0.5rem; }

  .admin-nav {
    display: none;
    order: 4;
    flex-basis: 100%;
    flex-direction: column;
    gap: 0.15rem;
    margin-top: 0.6rem;
    padding-top: 0.6rem;
    border-top: 1px solid rgba(255, 255, 255, 0.15);
  }
  .admin-nav.is-open { display: flex; }
  .admin-nav a {
    display: flex;
    align-items: center;
    min-height: 44px;          /* gut mit dem Finger treffbar */
    font-size: 1rem;
  }
}

@media (max-width: 700px) {
  /* Platz sparen: Beschriftung weg, Pfeil-Symbol bleibt */
  .admin-public-link__text { display: none; }
  .admin-public-link { padding: 0.45rem 0.6rem; }
  .status-pill {
    max-width: 8rem;
    overflow: hidden;
    text-overflow: ellipsis;
    white-space: nowrap;
  }
  .admin-header__brand small { display: none; }
  .admin-main { padding: 1.4rem 0 3rem; }
  .admin-page-header { margin-bottom: 1.4rem; }
  /* Knöpfe am Handy gut treffbar (Empfehlung: 44px) */
  .btn--small { min-height: 44px; }
  .modal__box { padding: 1.3rem; }
  .modal__footer { flex-direction: column-reverse; }
  .modal__footer .btn { width: 100%; justify-content: center; min-height: 44px; }
}

@media (max-width: 420px) {
  /* Auf sehr schmalen Geräten ist der Name entbehrlich - man weiß, wer man ist. */
  .status-pill { display: none; }
}
