/* ==========================================================================
   RoomPilot Design-System — shell.css   (Design v2 — Neon-Indigo, 2026-05-22)
   Kopfleiste (2 Logos) + Sidebar-Layout + Kern-Komponenten.
   Setzt tokens.css voraus. CSP-strikt — kein Inline-Style, Glow ueber Klassen.
   ========================================================================== */

/* ---- Canvas -------------------------------------------------------------- */

body {
  font-family: var(--rp-font-body);
  font-size: var(--rp-fs-body);
  line-height: var(--rp-lh-base);
  color: var(--rp-ink);
  background: var(--rp-canvas);
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  text-rendering: optimizeLegibility;
}

a { color: var(--au-rot-hover); text-decoration: none; font-weight: 700; }
a:hover { color: var(--au-rot); }

h1, h2, h3, h4 {
  margin: 0 0 0.4em;
  color: var(--rp-ink);
  font-weight: 700;
  line-height: var(--rp-lh-tight);
}
h1 {
  font-family: var(--rp-font-display);
  font-weight: 400;
  font-size: var(--rp-fs-h1);
  letter-spacing: -0.015em;
}
p { margin: 0 0 1em; }

/* Seitenkopf der Unterseiten (Titel + optionaler Untertitel) */
.rp-page-head { margin-bottom: var(--rp-5); }
.rp-page-head h1 { margin: 0 0 var(--rp-1); }
.rp-page-head p {
  margin: 0;
  color: var(--rp-ink-3);
}

/* ==========================================================================
   App-Shell — Kopfleiste oben, darunter Sidebar (248px) + Hauptbereich
   ========================================================================== */

.rp-app { min-height: 100vh; }

/* ---- Kopfleiste: helle Flaeche mit den zwei Logos ---------------------- */

.rp-header {
  position: sticky;
  top: 0;
  z-index: var(--rp-z-header);
  height: var(--rp-header-h);
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rp-4);
  padding: 0 var(--rp-6);
  background: var(--rp-header);
  border-bottom: 1px solid var(--rp-header-line);
  box-shadow: 0 4px 18px rgba(0, 0, 0, 0.28);
}
/* feiner roter Trennstrich unter der Kopfleiste (AUE-CD) */
.rp-header::after {
  content: "";
  position: absolute;
  left: 0; right: 0; bottom: -2px;
  height: 2px;
  background: linear-gradient(90deg, var(--au-rot) 0%, rgba(226, 6, 19, 0.15) 55%, transparent 80%);
}
.rp-header-logo-app { display: flex; align-items: center; }
.rp-header-logo-app img { height: 46px; width: auto; }
.rp-header-logo-org { display: flex; align-items: center; }
.rp-header-logo-org img { height: 30px; width: auto; opacity: 0.92; }

/* ---- Body: Sidebar + Hauptbereich -------------------------------------- */

.rp-body {
  display: grid;
  grid-template-columns: var(--rp-sidebar-w) 1fr;
}

/* ---- Seitenleiste -------------------------------------------------------- */

.rp-sidebar {
  position: sticky;
  top: var(--rp-header-h);
  align-self: start;
  height: calc(100vh - var(--rp-header-h));
  z-index: var(--rp-z-sidebar);
  display: flex;
  flex-direction: column;
  background: linear-gradient(180deg, var(--rp-sidebar) 0%, var(--rp-sidebar-tief) 100%);
  border-right: 1px solid var(--rp-sidebar-line);
}

.rp-sidebar-label {
  padding: var(--rp-5) var(--rp-5) var(--rp-2);
  font-size: var(--rp-fs-micro);
  font-weight: 700;
  letter-spacing: 0.14em;
  text-transform: uppercase;
  color: var(--rp-ink-3);
}

.rp-nav {
  display: flex;
  flex-direction: column;
  gap: 3px;
  padding: 0 var(--rp-3);
}

.rp-nav-item {
  position: relative;
  display: flex;
  align-items: center;
  gap: var(--rp-3);
  padding: 11px var(--rp-3);
  border-radius: var(--rp-r-sm);
  color: var(--rp-ink-2);
  font-size: 0.94rem;
  font-weight: 700;
  border-left: 3px solid transparent;
  transition: background var(--rp-t) var(--rp-ease),
              color var(--rp-t) var(--rp-ease),
              box-shadow var(--rp-t) var(--rp-ease);
}
.rp-nav-item svg {
  width: 20px;
  height: 20px;
  flex-shrink: 0;
  stroke-width: 1.9;
}
.rp-nav-item:hover {
  /* V-08: Rot-Tint statt kaum sichtbarem Weiss-Tint + subtile linke Linie */
  background: rgba(226, 6, 19, 0.08);
  color: var(--rp-ink);
  box-shadow: inset 3px 0 0 rgba(226, 6, 19, 0.3);
}
.rp-nav-item--active {
  background: linear-gradient(90deg, rgba(226, 6, 19, 0.22), rgba(226, 6, 19, 0.06));
  border-left-color: var(--au-rot);
  color: #fff;
  box-shadow: var(--rp-glow-red);
}
.rp-nav-item--active svg { color: var(--au-rot-hover); }

.rp-nav-spacer { flex: 1; }
.rp-nav-foot {
  padding: var(--rp-3);
  border-top: 1px solid var(--rp-sidebar-line);
}
.rp-nav-item--logout {
  color: var(--rp-ink-3);
  cursor: pointer;
}
.rp-nav-item--logout:hover {
  background: rgba(240, 99, 92, 0.12);
  color: var(--rp-danger);
}

/* ---- Hauptbereich -------------------------------------------------------- */

.rp-main {
  min-width: 0;
  background:
    radial-gradient(820px 360px at 88% -6%, rgba(139, 92, 246, 0.10), transparent 70%),
    radial-gradient(720px 320px at 12% 0%, rgba(226, 6, 19, 0.08), transparent 72%),
    linear-gradient(180deg, var(--rp-canvas) 0%, var(--rp-canvas-tint) 100%);
}
.rp-content {
  max-width: var(--rp-content-max);
  margin: 0 auto;
  padding: var(--rp-7) var(--rp-6);
}

/* ==========================================================================
   Hero-Karte — dunkle Premium-Flaeche mit rotem + violettem Glow
   ========================================================================== */

.hero {
  position: relative;
  overflow: hidden;
  padding: var(--rp-7);
  margin-bottom: var(--rp-5);
  background: var(--rp-card);
  border: 1px solid var(--rp-line);
  border-radius: var(--rp-r-lg);
  box-shadow: var(--rp-shadow-card);
  animation: rp-fade-in var(--rp-t-slow) var(--rp-ease);
}
.hero::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    radial-gradient(560px 260px at 100% -20%, rgba(226, 6, 19, 0.28), transparent 70%),
    radial-gradient(420px 220px at 0% 120%, rgba(139, 92, 246, 0.22), transparent 70%);
  pointer-events: none;
}
.hero::after {
  content: "";
  position: absolute;
  left: 0; top: 0; bottom: 0;
  width: 4px;
  background: linear-gradient(180deg, var(--au-rot), var(--au-rot-tief));
}
.hero h2 {
  position: relative;
  margin: 0 0 var(--rp-2);
  font-family: var(--rp-font-display);
  font-weight: 300;
  font-size: var(--rp-fs-hero);
  line-height: 1.15;
  letter-spacing: -0.02em;
  color: var(--rp-ink);
}
.hero p {
  position: relative;
  margin: 0;
  max-width: 52ch;
  font-size: 1.02rem;
  color: var(--rp-ink-2);
}

/* ==========================================================================
   Quick-Karten — Kennzahlen, gleich gross, ruhig ausgerichtet, Hover-Glow
   ========================================================================== */

.quick-grid {
  display: grid;
  grid-template-columns: repeat(3, 1fr);
  gap: var(--rp-4);
  margin-bottom: var(--rp-5);
}
.quick-card {
  display: flex;
  flex-direction: column;
  justify-content: center;
  min-height: 132px;
  color: inherit;
  text-decoration: none;
  position: relative;
  overflow: hidden;
  padding: var(--rp-5);
  background: var(--rp-card);
  border: 1px solid var(--rp-line);
  border-top: 3px solid transparent;
  border-radius: var(--rp-r-md);
  box-shadow: var(--rp-shadow-card);
  cursor: pointer;
  transition: transform var(--rp-t) var(--rp-ease),
              box-shadow var(--rp-t) var(--rp-ease),
              border-color var(--rp-t) var(--rp-ease);
}
.quick-card::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 100% 0%, rgba(226, 6, 19, 0.16), transparent 58%);
  opacity: 0;
  transition: opacity var(--rp-t) var(--rp-ease);
  pointer-events: none;
}
.quick-card:hover {
  transform: translateY(-3px);
  box-shadow: var(--rp-shadow-card-hover), var(--rp-glow-red);
  border-top-color: var(--au-rot);
}
.quick-card:hover::after { opacity: 1; }
.quick-card:focus-visible {
  outline: none;
  border-top-color: var(--au-rot);
  box-shadow: var(--rp-shadow-card-hover), var(--rp-focus-ring);
}
.quick-card:focus-visible::after { opacity: 1; }
.quick-card .num {
  position: relative;
  font-family: var(--rp-font-display);
  font-size: 3rem;
  font-weight: 700;
  line-height: 1;
  letter-spacing: -0.03em;
  color: var(--au-rot-hover);
}
/* Fix-Phase D: Leerwert dezent grau statt Alarm-Rot. Wird von dashboard.js
   gesetzt, wenn kein Standortbezug vorhanden ist. */
.quick-card .num.num--empty {
  color: var(--rp-ink-3);
  font-size: 1.5rem;
  font-weight: 600;
  letter-spacing: 0;
}
.quick-card .label {
  position: relative;
  display: block;
  margin-top: var(--rp-3);
  font-size: var(--rp-fs-micro);
  font-weight: 700;
  letter-spacing: 0.12em;
  text-transform: uppercase;
  color: var(--rp-ink-3);
}

/* ==========================================================================
   Buttons
   ========================================================================== */

.btn, button.btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  gap: var(--rp-2);
  min-height: 44px;
  padding: 12px 22px;
  font-family: var(--rp-font-body);
  font-size: 0.9rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  border: 1.5px solid transparent;
  border-radius: var(--rp-r-sm);
  cursor: pointer;
  text-decoration: none;
  transition: transform var(--rp-t) var(--rp-ease),
              box-shadow var(--rp-t) var(--rp-ease),
              background var(--rp-t) var(--rp-ease),
              color var(--rp-t) var(--rp-ease),
              border-color var(--rp-t) var(--rp-ease);
}
.btn:focus-visible { outline: none; box-shadow: var(--rp-focus-ring); }

.btn-primary {
  background: var(--au-rot);
  color: #fff;
  border-color: var(--au-rot);
  box-shadow: 0 6px 16px rgba(226, 6, 19, 0.28);
}
.btn-primary:hover {
  /* Flaeche bleibt --au-rot (weisser Text = WCAG-AA); Hover-Wirkung
     ueber Anhebung + Glow, nicht ueber helleres Rot. */
  background: var(--au-rot);
  border-color: var(--au-rot-hover);
  transform: translateY(-2px);
  box-shadow: var(--rp-glow-red-strong);
}
.btn-primary:active { transform: translateY(0); }

.btn-secondary {
  background: var(--rp-card-raised);
  color: var(--rp-ink);
  border-color: var(--rp-line-strong);
}
.btn-secondary:hover {
  border-color: var(--au-rot);
  color: var(--rp-ink);
  transform: translateY(-2px);
  box-shadow: var(--rp-glow-red);
}

.btn-ghost {
  min-height: 38px;
  padding: 8px 14px;
  font-size: var(--rp-fs-small);
  background: transparent;
  color: var(--rp-ink-3);
  border-color: transparent;
}
.btn-ghost:hover {
  background: rgba(240, 99, 92, 0.12);
  color: var(--rp-danger);
}

button[disabled], .btn[disabled] {
  opacity: 0.5;
  cursor: not-allowed;
  transform: none !important;
}

.action-row {
  display: flex;
  flex-wrap: wrap;
  align-items: center;
  gap: var(--rp-3);
  margin-bottom: var(--rp-6);
}

/* ==========================================================================
   Formulare
   ========================================================================== */

input, select, textarea {
  width: 100%;
  min-height: 44px;
  padding: 11px 13px;
  background: var(--rp-card-raised);
  color: var(--rp-ink);
  border: 1.5px solid var(--rp-line-strong);
  border-radius: var(--rp-r-sm);
  font-size: 0.94rem;
  color-scheme: dark;
  transition: border-color var(--rp-t) var(--rp-ease),
              box-shadow var(--rp-t) var(--rp-ease);
}
input::placeholder, textarea::placeholder { color: var(--rp-ink-3); }
input:hover, select:hover, textarea:hover { border-color: rgba(226, 6, 19, 0.5); }
input:focus, select:focus, textarea:focus {
  outline: none;
  border-color: var(--au-rot);
  box-shadow: var(--rp-focus-ring);
}

label {
  display: block;
  margin-bottom: 6px;
  font-size: var(--rp-fs-micro);
  font-weight: 700;
  letter-spacing: 0.09em;
  text-transform: uppercase;
  color: var(--rp-ink-3);
}
.form-group { margin-bottom: var(--rp-4); }

/* ==========================================================================
   Generische Karte + Sektions-Titel
   ========================================================================== */

.card {
  padding: var(--rp-5);
  background: var(--rp-card);
  border: 1px solid var(--rp-line);
  border-radius: var(--rp-r-md);
  box-shadow: var(--rp-shadow-card);
}

.my-bookings { margin-top: var(--rp-7); }
.rp-section-title {
  display: flex;
  align-items: baseline;
  gap: var(--rp-3);
  margin-bottom: var(--rp-4);
}
.my-bookings h2, .rp-section-title h2 {
  margin: 0;
  font-family: var(--rp-font-display);
  font-weight: 400;
  font-size: var(--rp-fs-h1);
  letter-spacing: -0.015em;
  color: var(--rp-ink);
}

/* ==========================================================================
   Buchungs-Eintraege (von dashboard.js gerendert)
   ========================================================================== */

.booking-item {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: var(--rp-4);
  padding: 15px 18px;
  margin-bottom: var(--rp-2);
  background: var(--rp-card);
  border: 1px solid var(--rp-line);
  border-left: 3px solid var(--au-rot);
  border-radius: var(--rp-r-sm);
  box-shadow: var(--rp-shadow-card);
  transition: transform var(--rp-t) var(--rp-ease),
              box-shadow var(--rp-t) var(--rp-ease);
}
.booking-item:hover {
  /* V-09: etwas staerkere Verschiebung + roter linker Rand zum Glow */
  transform: translateX(4px);
  box-shadow: var(--rp-shadow-card-hover), var(--rp-glow-red);
  border-left-color: var(--au-rot-hover);
}
.booking-item .when {
  font-weight: 700;
  color: var(--rp-ink);
}
.booking-item .what {
  margin-top: 3px;
  font-size: var(--rp-fs-small);
  color: var(--rp-ink-3);
}

/* ==========================================================================
   Status-Pills
   ========================================================================== */

.pill {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 4px 11px;
  border-radius: var(--rp-r-pill);
  font-size: var(--rp-fs-micro);
  font-weight: 700;
  letter-spacing: 0.06em;
  text-transform: uppercase;
}
.pill::before {
  content: "";
  width: 6px; height: 6px;
  border-radius: 50%;
  background: currentColor;
  /* V-01: leuchtender Status-Punkt (wie Engpass-Badge) */
  box-shadow: 0 0 7px currentColor;
}
.pill--ok     { background: var(--rp-ok-bg);     color: var(--rp-ok); }
.pill--warn   { background: var(--rp-warn-bg);   color: var(--rp-warn); }
.pill--danger { background: var(--rp-danger-bg); color: var(--rp-danger); }
.pill--info   { background: var(--rp-info-bg);   color: var(--rp-info); }

/* ==========================================================================
   Empty-State
   ========================================================================== */

.empty-state {
  padding: var(--rp-7) var(--rp-5);
  text-align: center;
  background: var(--rp-card);
  border: 1px dashed var(--rp-line-strong);
  border-radius: var(--rp-r-md);
  color: var(--rp-ink-2);
}
.empty-state .empty-icon {
  width: 56px;
  height: 56px;
  max-width: 56px;
  max-height: 56px;
  margin: 0 auto var(--rp-4);
  color: var(--rp-ink-3);
  opacity: 0.6;
}
.empty-state .empty-title {
  margin-bottom: 6px;
  font-size: 1.05rem;
  font-weight: 700;
  color: var(--rp-ink);
}
.empty-state .empty-sub {
  max-width: 42ch;
  margin: 0 auto;
  font-size: var(--rp-fs-small);
  color: var(--rp-ink-3);
}

/* ==========================================================================
   Toast (von api.js erzeugt)
   ========================================================================== */

.toast {
  position: fixed;
  bottom: 24px;
  left: 50%;
  transform: translateX(-50%);
  z-index: var(--rp-z-toast);
  max-width: 90vw;
  padding: 14px 22px;
  background: var(--rp-card-raised);
  color: var(--rp-ink);
  border: 1px solid var(--rp-line-strong);
  border-left: 4px solid var(--au-rot);
  border-radius: var(--rp-r-sm);
  /* V-04: Grund-Toast mit dezentem rotem Glow */
  box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), var(--rp-glow-red);
  font-size: 0.9rem;
  font-weight: 700;
  animation: rp-toast-in 280ms var(--rp-ease);
}
/* V-04: farbiger Glow je Toast-Typ */
.toast.success  { border-left-color: var(--rp-ok);     box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 20px rgba(95, 201, 127, 0.28); }
.toast.warning  { border-left-color: var(--rp-warn);   box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 20px rgba(232, 176, 75, 0.28); }
.toast.conflict { border-left-color: var(--rp-warn);   box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 20px rgba(232, 176, 75, 0.28); }
.toast.error    { border-left-color: var(--rp-danger); box-shadow: 0 18px 44px rgba(0, 0, 0, 0.6), 0 0 20px rgba(240, 99, 92, 0.28); }

/* ==========================================================================
   Init-Login-Modal (von api.js erzeugt)
   ========================================================================== */

.init-login-modal-open { overflow: hidden; }
.init-login-modal-backdrop {
  position: fixed;
  inset: 0;
  z-index: var(--rp-z-modal);
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 20px;
  background: rgba(6, 6, 16, 0.78);
  -webkit-backdrop-filter: blur(8px);
  backdrop-filter: blur(8px);
  animation: rp-fade-in 240ms var(--rp-ease);
}
.init-login-modal {
  width: 100%;
  max-width: 460px;
  padding: var(--rp-6);
  background: var(--rp-card);
  color: var(--rp-ink-2);
  border: 1px solid var(--rp-line);
  border-top: 4px solid var(--au-rot);
  border-radius: var(--rp-r-lg);
  box-shadow: 0 30px 70px rgba(0, 0, 0, 0.7), var(--rp-glow-red);
  animation: rp-fade-up 340ms var(--rp-ease);
}
.init-login-modal h2 {
  margin: 0 0 var(--rp-2);
  font-family: var(--rp-font-display);
  font-weight: 400;
  font-size: var(--rp-fs-h1);
  color: var(--rp-ink);
}
.init-login-modal .subtitle {
  margin-bottom: var(--rp-5);
  font-size: var(--rp-fs-small);
  color: var(--rp-ink-2);
}
.init-login-modal .form-actions {
  display: flex;
  gap: var(--rp-3);
  margin-top: var(--rp-5);
}
.init-login-modal .form-actions .btn { flex: 1; }
.init-login-modal .form-error {
  margin-top: var(--rp-4);
  padding: 11px 13px;
  background: var(--rp-danger-bg);
  border-left: 3px solid var(--rp-danger);
  border-radius: var(--rp-r-xs);
  font-size: var(--rp-fs-small);
  color: var(--rp-danger);
}

/* ==========================================================================
   Utility-Klassen
   ========================================================================== */

.u-hidden { display: none; }
.u-tagesliste-export {
  display: inline-flex;
  align-items: center;
  gap: var(--rp-2);
}
.u-tagesliste-select {
  width: auto;
  min-width: 230px;
}

/* ==========================================================================
   Animationen
   ========================================================================== */

@keyframes rp-fade-up {
  from { opacity: 0; transform: translateY(16px); }
  to   { opacity: 1; transform: translateY(0); }
}
@keyframes rp-fade-in {
  from { opacity: 0; }
  to   { opacity: 1; }
}
@keyframes rp-toast-in {
  from { transform: translate(-50%, 28px); opacity: 0; }
  to   { transform: translate(-50%, 0); opacity: 1; }
}
/* V-02: dezenter Lade-Puls fuer Platzhalter-Zustaende (Skeleton) */
@keyframes rp-pulse {
  0%, 100% { opacity: 0.45; }
  50%      { opacity: 1; }
}
.num--empty, .u-loading-cell, .engpass-loading {
  animation: rp-pulse 1.4s var(--rp-ease) infinite;
}

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

/* ==========================================================================
   Schmale Fenster — Sidebar kollabiert auf Icon-Breite (PC-only-Doktrin)
   ========================================================================== */

@media (max-width: 980px) {
  /* DESIGN-1: Sidebar bleibt schmal, aber die Labels bleiben sichtbar —
     unter dem Icon gestapelt statt komplett ausgeblendet. */
  :root { --rp-sidebar-w: 88px; }
  .rp-sidebar-label { display: none; }
  .rp-nav { padding: 0 6px; }
  .rp-nav-item {
    flex-direction: column;
    justify-content: center;
    gap: 4px;
    padding: 9px 2px;
    text-align: center;
    border-left: none;
    border-top: 3px solid transparent;
  }
  .rp-nav-item--active { border-top-color: var(--au-rot); }
  .rp-nav-label {
    display: block;
    font-size: 0.66rem;
    font-weight: 700;
    line-height: 1.15;
    letter-spacing: 0.01em;
  }
  .rp-nav-foot { padding: var(--rp-2); }
  .rp-content { padding: var(--rp-6) var(--rp-5); }
  .quick-grid { grid-template-columns: 1fr; }
  .rp-header-logo-org img { height: 22px; }
}

@media (max-width: 560px) {
  .hero { padding: var(--rp-6) var(--rp-5); }
  .hero h2 { font-size: 2rem; }
  .rp-content { padding: var(--rp-5) var(--rp-4); }
  .rp-header { padding: 0 var(--rp-4); }
}

/* ==========================================================================
   V-11 — Nutzer-Chip in der Seitenleiste (von api.js eingefuegt)
   ========================================================================== */

.rp-user-chip {
  display: flex;
  align-items: center;
  gap: var(--rp-2);
  margin: 0 var(--rp-3) var(--rp-2);
  padding: var(--rp-2) var(--rp-3);
  background: rgba(226, 6, 19, 0.08);
  border: 1px solid rgba(226, 6, 19, 0.2);
  border-radius: var(--rp-r-sm);
}
.rp-user-avatar {
  width: 28px; height: 28px;
  flex-shrink: 0;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--au-rot);
  color: #fff;
  font-size: 0.78rem;
  font-weight: 700;
  box-shadow: var(--rp-glow-red);
}
.rp-user-meta { min-width: 0; line-height: 1.2; }
.rp-user-name {
  font-size: var(--rp-fs-small);
  font-weight: 700;
  color: var(--rp-ink);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.rp-user-role {
  font-size: var(--rp-fs-micro);
  color: var(--rp-ink-3);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}

/* ==========================================================================
   V-12 — Hoch-Scrollen-Knopf (von api.js eingefuegt)
   ========================================================================== */

.scroll-top-btn {
  position: fixed;
  bottom: var(--rp-6);
  right: var(--rp-5);
  z-index: var(--rp-z-toast);
  width: 44px; height: 44px;
  display: flex; align-items: center; justify-content: center;
  border-radius: 50%;
  background: var(--au-rot);
  color: #fff;
  border: none;
  cursor: pointer;
  font-size: 1.3rem;
  line-height: 1;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), var(--rp-glow-red);
  opacity: 0;
  pointer-events: none;
  transition: opacity var(--rp-t) var(--rp-ease),
              transform var(--rp-t) var(--rp-ease);
}
.scroll-top-btn.visible { opacity: 1; pointer-events: auto; }
.scroll-top-btn:hover { transform: translateY(-3px); }
.scroll-top-btn:focus-visible {
  outline: none;
  box-shadow: 0 4px 14px rgba(0, 0, 0, 0.5), var(--rp-focus-ring);
}

/* Schmale Sidebar (PC-only-Doktrin): Chip auf reinen Avatar reduzieren */
@media (max-width: 980px) {
  .rp-user-chip { justify-content: center; padding: var(--rp-2); margin: 0 6px var(--rp-2); }
  .rp-user-meta { display: none; }
}

/* ==========================================================================
   Handy <600px — Tabellen mit vielen Spalten quer scrollbar statt zerquetscht.
   Greift global fuer alle .data-Tabellen (Admin, Raeume, Bedarfe, Team,
   Engpass-Uebersicht). Nur die Tabelle wird zum Block; thead/tbody/tr/td
   behalten ihr Tabellen-Layout, darum bleiben die Spalten ausgerichtet.
   ========================================================================== */
@media (max-width: 600px) {
  table.data {
    display: block;
    width: 100%;
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    white-space: nowrap;
  }
}
