/* ═══════════════════════════════════════════════════════════════════════════
   reports/reports.css — Berichte-Modul Stylesheet
   Welle 6 — Modul: reports

   Nutzt cal-* CSS-Variablen für konsistentes Styling mit dem übrigen System.
   Scope: .rp-root — kein globaler Namespace-Leak.
   ═══════════════════════════════════════════════════════════════════════════ */

/* ── ROOT & VARIABLEN ──────────────────────────────────────────────────────
   Sprint C: Tokens werden zentral in modules/_tokens.css verwaltet.
   Hier deklarieren wir nur die Reports-spezifischen Geometrie/Sizing-Tokens
   und Layout-Defaults. Farb-Tokens (--rp-surface, --rp-primary, etc.)
   kommen aus _tokens.css und folgen dem Theme automatisch.
   ────────────────────────────────────────────────────────────────────────── */
:root {
  --rp-sidebar-w: 252px;
  --rp-radius: 8px;
  --rp-radius-lg: 12px;
  /* Legacy-Aliase für ältere Selektoren — schauen auf das neue Token-System */
  --rp-ok:    var(--success, #16a34a);
  --rp-warn:  var(--warning, #f59e0b);
}

/* ── SCOPE ───────────────────────────────────────────────────────────────── */
.rp-root {
  display: flex;
  flex-direction: column;
  height: 100%;
  min-height: 0;
  background: var(--rp-surface);
  color: var(--rp-text);
  font-size: 0.875rem;
  overflow: hidden;
}

/* ── TOOLBAR ────────────────────────────────────────────────────────────────── */
.rp-toolbar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 10px 14px;
  border-bottom: 1px solid var(--rp-border);
  background: var(--rp-surface);
  flex-shrink: 0;
  flex-wrap: wrap;
}
.rp-toolbar-title {
  font-size: 1rem;
  font-weight: 600;
  color: var(--rp-primary);
  display: flex;
  align-items: center;
  gap: 7px;
  flex-shrink: 0;
}
.rp-toolbar-title i { font-size: 0.95rem; }
.rp-toolbar-spacer { flex: 1; }
.rp-toolbar-search {
  position: relative;
  flex: 1;
  min-width: 160px;
  max-width: 320px;
}
.rp-toolbar-search input {
  width: 100%;
  padding: 6px 10px 6px 32px;
  border: 1px solid var(--rp-border);
  border-radius: 20px;
  background: var(--rp-surface-2);
  color: var(--rp-text);
  font-size: 0.82rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.rp-toolbar-search input:focus {
  border-color: var(--rp-primary);
  box-shadow: 0 0 0 3px rgba(27,117,153,.10);
  background: var(--rp-surface);
}
.rp-toolbar-search-icon {
  position: absolute;
  left: 10px;
  top: 50%;
  transform: translateY(-50%);
  color: var(--rp-muted);
  font-size: 0.75rem;
  pointer-events: none;
}
/* Sprint C: Buttons folgen dem Shell-System (.btn) — gleiches Look-and-feel
   wie Dashboard/Timetrack/Logbook. Hover/Active-States über brightness/scale,
   nicht hardcoded Hex-Werte → funktioniert in allen Themes (dark/pink/gray). */
.rp-btn {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  padding: 6px 12px;
  border: 1px solid var(--rp-border);
  border-radius: 6px;
  background: var(--rp-surface);
  color: var(--rp-text);
  font-size: 0.82rem;
  font-weight: 600;
  font-family: inherit;
  cursor: pointer;
  transition: background .14s ease, border-color .14s ease, color .14s ease, transform .08s ease, box-shadow .14s ease;
  white-space: nowrap;
  flex-shrink: 0;
}
.rp-btn:hover {
  background: var(--rp-surface-2);
  border-color: var(--rp-primary);
  color: var(--rp-primary);
}
.rp-btn:active { transform: scale(0.97); }
.rp-btn-primary {
  background: var(--rp-primary);
  border-color: var(--rp-primary);
  color: #fff;
  box-shadow: 0 1px 2px rgba(0,0,0,.06);
}
.rp-btn-primary:hover {
  background: var(--rp-primary);
  border-color: var(--rp-primary);
  color: #fff;
  filter: brightness(1.08);
  box-shadow: 0 3px 10px rgba(27,117,153,.22);
}
.rp-btn-icon {
  padding: 6px 8px;
  min-width: 32px;
  justify-content: center;
}
.rp-btn-danger {
  color: var(--rp-danger);
  border-color: var(--rp-border);
}
.rp-btn-danger:hover {
  border-color: var(--rp-danger);
  background: var(--error-bg, rgba(239,68,68,.10));
  color: var(--rp-danger);
}
.rp-btn-success {
  color: var(--rp-success, var(--success, #16a34a));
  border-color: var(--rp-border);
}
.rp-btn-success:hover {
  border-color: var(--rp-success, var(--success, #16a34a));
  background: var(--success-bg, rgba(22,163,74,.10));
}

/* Beta-Buttons: noch nicht voll implementiert. Klare Kennzeichnung
   via Badge + reduzierte Opazität, damit Nutzer wissen dass die Funktion
   in Entwicklung ist. */
.rp-btn-beta { position: relative; opacity: .72; }
.rp-btn-beta:hover { opacity: 1; }
.rp-beta-badge {
  position: absolute; top: -4px; right: -4px;
  font-size: .6rem; font-weight: 700; line-height: 1;
  padding: 2px 4px; border-radius: 4px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; pointer-events: none;
  letter-spacing: .02em;
  box-shadow: 0 1px 2px rgba(0,0,0,.15);
}

/* ── SKELETON-LOADERS ───────────────────────────────────────────────────────
   Statt Spinner: shimmer-Placeholder, die das echte Layout vorzeichnen.
   Wirkt schneller, vermeidet Layout-Shift beim Tausch echter Daten. */
@keyframes rp-skel-shimmer {
  0%   { background-position: -200% 0; }
  100% { background-position:  200% 0; }
}
.rp-skel {
  background: linear-gradient(90deg,
    var(--rp-surface-2, #f0f3f2) 25%,
    rgba(0,0,0,.04) 50%,
    var(--rp-surface-2, #f0f3f2) 75%);
  background-size: 200% 100%;
  animation: rp-skel-shimmer 1.4s linear infinite;
  border-radius: 6px;
  display: block;
}
@media (prefers-reduced-motion: reduce) {
  .rp-skel { animation: none; }
}

/* Shell — initial mount */
.rp-skel-shell {
  display: flex; flex-direction: column; height: 100%;
  background: var(--rp-bg, #f4f6f8);
}
.rp-skel-topbar {
  display: flex; align-items: center; gap: 10px;
  padding: 10px 14px; border-bottom: 1px solid var(--rp-border, #e0e8e5);
}
.rp-skel-logo { width: 140px; height: 22px; }
.rp-skel-search { flex: 1; max-width: 480px; height: 32px; }
.rp-skel-btn { width: 110px; height: 32px; }
.rp-skel-body { flex: 1; display: flex; min-height: 0; }
.rp-skel-sidebar {
  width: 240px; padding: 12px; display: flex; flex-direction: column; gap: 6px;
  border-right: 1px solid var(--rp-border, #e0e8e5);
}
.rp-skel-sb-item { height: 28px; width: 100%; }
.rp-skel-sb-item:nth-child(1) { width: 80%; }
.rp-skel-sb-item:nth-child(3) { width: 60%; }
.rp-skel-sb-item:nth-child(5) { width: 70%; }
.rp-skel-main { flex: 1; padding: 14px; overflow: hidden; }

/* Grid — Card-Skeletons */
.rp-skel-grid {
  display: grid; gap: 12px;
  grid-template-columns: repeat(auto-fill, minmax(180px, 1fr));
}
.rp-skel-card {
  background: var(--rp-surface, #fff); border-radius: 10px;
  overflow: hidden; box-shadow: 0 1px 3px rgba(0,0,0,.05);
}
.rp-skel-cover { width: 100%; aspect-ratio: 4/3; border-radius: 0; }
.rp-skel-card-body { padding: 10px; display: flex; flex-direction: column; gap: 6px; }
.rp-skel-line { height: 12px; }
.rp-skel-line.short { width: 60%; }

/* List */
.rp-skel-list { display: flex; flex-direction: column; gap: 6px; }
.rp-skel-row {
  display: grid; grid-template-columns: 32px 1fr 100px 80px;
  align-items: center; gap: 12px; padding: 10px 14px;
  background: var(--rp-surface, #fff); border-radius: 8px;
  border: 1px solid var(--rp-border, #edf1f3);
}
.rp-skel-icon { width: 28px; height: 28px; border-radius: 6px; }
.rp-skel-title { height: 14px; }
.rp-skel-meta { height: 10px; }
.rp-skel-meta.short { width: 60%; }

/* Home — Stats + Grid */
.rp-skel-home { display: flex; flex-direction: column; gap: 16px; }
.rp-skel-stats {
  display: grid; gap: 10px;
  grid-template-columns: repeat(4, 1fr);
}
@media (max-width: 700px) { .rp-skel-stats { grid-template-columns: repeat(2, 1fr); } }
.rp-skel-stat { height: 78px; border-radius: 10px; }
.rp-beta-badge-inline {
  display: inline-block; margin-left: 4px;
  font-size: .58rem; font-weight: 700; line-height: 1;
  padding: 2px 4px; border-radius: 3px;
  background: linear-gradient(135deg, #f59e0b, #d97706);
  color: #fff; vertical-align: middle;
}
.rp-tree-item.is-beta { opacity: .85; }
.rp-tree-item.is-beta:hover { opacity: 1; }

/* View-Toggle */
.rp-view-toggle {
  display: inline-flex;
  border: 1px solid var(--rp-border);
  border-radius: 6px;
  overflow: hidden;
  flex-shrink: 0;
}
.rp-view-btn {
  width: 30px; height: 30px;
  border: none;
  background: var(--rp-surface);
  color: var(--rp-muted);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.78rem;
  transition: background .12s, color .12s;
}
.rp-view-btn + .rp-view-btn { border-left: 1px solid var(--rp-border); }
.rp-view-btn:hover { color: var(--rp-primary); }
.rp-view-btn.active { background: var(--rp-primary); color: #fff; }

/* ── SPLIT-LAYOUT ───────────────────────────────────────────────────────────── */
.rp-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}

/* ── SIDEBAR ────────────────────────────────────────────────────────────────── */
.rp-sidebar {
  width: var(--rp-sidebar-w);
  min-width: 180px;
  max-width: 340px;
  border-right: 1px solid var(--rp-border);
  display: flex;
  flex-direction: column;
  background: var(--rp-surface-2);
  overflow: hidden;
  flex-shrink: 0;
  transition: width .2s;
}
.rp-sidebar.collapsed { width: 0; min-width: 0; border-right: none; }
.rp-sidebar-hdr {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--rp-border);
  flex-shrink: 0;
}
.rp-sidebar-hdr-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rp-muted);
  text-transform: uppercase;
  letter-spacing: 0.04em;
  flex: 1;
}
.rp-sidebar-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 6px 0 40px;
}
/* Sidebar-Sektionen */
.rp-sb-section {
  margin-bottom: 4px;
}
.rp-sb-section-hdr {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 4px 12px;
  font-size: 0.70rem;
  font-weight: 600;
  color: var(--rp-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  cursor: pointer;
  user-select: none;
}
.rp-sb-section-hdr:hover { color: var(--rp-text); }
.rp-sb-section-chev { margin-left: auto; font-size: 0.62rem; transition: transform .15s; }
.rp-sb-section-chev.open { transform: rotate(180deg); }
/* Tree-Item */
.rp-tree-item {
  display: flex;
  align-items: center;
  gap: 5px;
  padding: 5px 8px 5px 0;
  cursor: pointer;
  border-radius: 5px;
  margin: 0 4px;
  transition: background .1s;
  position: relative;
  min-height: 30px;
}
.rp-tree-item:hover { background: rgba(27,117,153,.07); }
.rp-tree-item.active {
  background: rgba(27,117,153,.12);
  color: var(--rp-primary);
  font-weight: 500;
}
.rp-tree-item.active .rp-tree-icon { color: var(--rp-primary); }
.rp-tree-indent { flex-shrink: 0; }
.rp-tree-expand {
  width: 18px; height: 18px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--rp-muted);
  font-size: 0.65rem;
  border-radius: 3px;
  transition: background .1s, transform .15s;
}
.rp-tree-expand:hover { background: rgba(0,0,0,.07); }
.rp-tree-expand.open { transform: rotate(90deg); }
.rp-tree-icon { color: var(--rp-muted); font-size: 0.85rem; flex-shrink: 0; }
.rp-tree-label {
  flex: 1;
  font-size: 0.82rem;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rp-tree-count {
  font-size: 0.68rem;
  color: var(--rp-muted);
  background: var(--rp-border);
  border-radius: 10px;
  padding: 1px 6px;
  flex-shrink: 0;
}
.rp-tree-status-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  flex-shrink: 0;
}
/* Smart-Folder Eintrag */
.rp-smart-folder { opacity: 0.85; }
.rp-smart-folder .rp-tree-icon { color: var(--rp-primary); }

/* Sidebar Resize Handle */
.rp-resize-handle {
  position: absolute;
  right: -3px;
  top: 0; bottom: 0;
  width: 6px;
  cursor: col-resize;
  z-index: 10;
}
.rp-sidebar-wrapper {
  position: relative;
  display: flex;
  flex-direction: row;
}

/* ── CONTENT-BEREICH ─────────────────────────────────────────────────────────── */
.rp-content {
  flex: 1;
  display: flex;
  flex-direction: column;
  min-width: 0;
  overflow: hidden;
}

/* Breadcrumb */
.rp-breadcrumb {
  display: flex;
  align-items: center;
  flex-wrap: wrap;
  gap: 4px;
  padding: 8px 14px;
  border-bottom: 1px solid var(--rp-border);
  background: var(--rp-surface);
  flex-shrink: 0;
  min-height: 38px;
}
.rp-crumb {
  display: inline-flex;
  align-items: center;
  gap: 4px;
  font-size: 0.82rem;
  color: var(--rp-primary);
  cursor: pointer;
  padding: 3px 6px;
  border-radius: 4px;
  transition: background .1s;
}
.rp-crumb:hover { background: var(--rp-primary-light); }
.rp-crumb.current { color: var(--rp-text); font-weight: 500; cursor: default; }
.rp-crumb.current:hover { background: transparent; }
.rp-crumb-sep { color: var(--rp-muted); font-size: 0.75rem; }

/* Content-Scroll */
.rp-content-scroll {
  flex: 1;
  overflow-y: auto;
  overflow-x: hidden;
  padding: 14px;
  position: relative;
}

/* ── HOME-VIEW ──────────────────────────────────────────────────────────────── */
.rp-home-section { margin-bottom: 22px; }
.rp-home-section-title {
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rp-muted);
  text-transform: uppercase;
  letter-spacing: 0.05em;
  margin-bottom: 10px;
  display: flex;
  align-items: center;
  gap: 6px;
}
.rp-home-section-title i { color: var(--rp-primary); }
/* Pending-Reports: Berichte die noch abgegeben werden müssen */
.rp-pending-list { display: flex; flex-direction: column; gap: 6px; }
.rp-pending-item {
  display: flex;
  align-items: center;
  gap: 10px;
  padding: 9px 12px;
  background: var(--rp-surface-2);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius);
  cursor: pointer;
  transition: border-color .12s, background .12s;
}
.rp-pending-item:hover { border-color: var(--rp-primary); background: var(--rp-primary-light); }
.rp-pending-item-icon {
  width: 36px; height: 36px;
  border-radius: 8px;
  background: rgba(27,117,153,.1);
  color: var(--rp-primary);
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  flex-shrink: 0;
}
.rp-pending-item-body { flex: 1; min-width: 0; }
.rp-pending-item-title {
  font-size: 0.85rem;
  font-weight: 500;
  white-space: nowrap;
  overflow: hidden;
  text-overflow: ellipsis;
}
.rp-pending-item-meta { font-size: 0.75rem; color: var(--rp-muted); margin-top: 1px; }
.rp-pending-item-submit {
  flex-shrink: 0;
  padding: 4px 10px;
  border: 1px solid var(--rp-primary);
  border-radius: 20px;
  color: var(--rp-primary);
  font-size: 0.75rem;
  font-weight: 600;
  background: transparent;
  cursor: pointer;
  transition: background .12s, color .12s;
  font-family: inherit;
}
.rp-pending-item-submit:hover { background: var(--rp-primary); color: #fff; }

/* Stats-Ring (Wochen-Zusammenfassung) */
.rp-stats-row {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 8px;
  margin-bottom: 18px;
}
.rp-stat-tile {
  background: var(--rp-surface-2);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius);
  padding: 12px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
}
.rp-stat-tile-icon {
  width: 34px; height: 34px;
  border-radius: 8px;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.95rem;
  flex-shrink: 0;
}
.rp-stat-tile-val { font-size: 1.4rem; font-weight: 600; line-height: 1.1; }
.rp-stat-tile-label { font-size: 0.72rem; color: var(--rp-muted); margin-top: 1px; }

/* ── FOLDER/REPORT CARDS (Grid) ──────────────────────────────────────────────── */
.rp-grid {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(170px, 1fr));
  gap: 10px;
}
.rp-grid-card {
  background: var(--rp-surface-2);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-lg);
  overflow: hidden;
  cursor: pointer;
  transition: border-color .12s, transform .08s, box-shadow .12s;
  position: relative;
}
.rp-grid-card:hover {
  border-color: var(--rp-primary);
  transform: translateY(-2px);
  box-shadow: 0 4px 14px rgba(27,117,153,.12);
}
.rp-grid-card.selected {
  border-color: var(--rp-primary);
  box-shadow: 0 0 0 2px rgba(27,117,153,.25);
}
/* Farb-Label-Streifen oben */
.rp-card-label-bar {
  height: 4px;
  width: 100%;
  flex-shrink: 0;
}
/* Cover-Foto */
.rp-card-cover {
  height: 100px;
  background: var(--rp-surface);
  border-bottom: 1px solid var(--rp-border);
  display: flex;
  align-items: center;
  justify-content: center;
  overflow: hidden;
  position: relative;
}
.rp-card-cover img {
  width: 100%; height: 100%;
  object-fit: cover;
}
.rp-card-cover-icon {
  font-size: 2rem;
  color: var(--rp-muted);
  opacity: 0.5;
}
/* Status-Badge oben rechts in Cover */
.rp-card-status {
  position: absolute;
  top: 6px;
  right: 6px;
}
/* Karten-Body */
.rp-card-body { padding: 8px 10px 10px; }
.rp-card-name {
  font-size: 0.82rem;
  font-weight: 600;
  color: var(--rp-text);
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
  margin-bottom: 3px;
}
.rp-card-meta {
  font-size: 0.70rem;
  color: var(--rp-muted);
  display: flex;
  align-items: center;
  gap: 5px;
}
/* Hover-Actions */
.rp-card-actions {
  position: absolute;
  top: 6px;
  left: 6px;
  display: flex;
  gap: 3px;
  opacity: 0;
  transition: opacity .15s;
}
.rp-grid-card:hover .rp-card-actions { opacity: 1; }
.rp-card-action-btn {
  width: 26px; height: 26px;
  border-radius: 5px;
  border: 1px solid rgba(255,255,255,.3);
  background: rgba(0,0,0,.45);
  color: #fff;
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.70rem;
  transition: background .1s;
}
.rp-card-action-btn:hover { background: rgba(0,0,0,.7); }
/* Checkbox bei Selection */
.rp-card-checkbox {
  position: absolute;
  top: 8px;
  left: 8px;
  width: 18px; height: 18px;
  border-radius: 4px;
  border: 2px solid rgba(255,255,255,.8);
  background: rgba(0,0,0,.3);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .15s;
  cursor: pointer;
  color: #fff;
  font-size: 0.7rem;
}
.rp-grid-card:hover .rp-card-checkbox,
.rp-grid-card.selected .rp-card-checkbox { opacity: 1; }
.rp-grid-card.selected .rp-card-checkbox { background: var(--rp-primary); border-color: var(--rp-primary); }

/* Stern */
.rp-card-star {
  position: absolute;
  bottom: 8px;
  right: 8px;
  font-size: 0.8rem;
  color: #f59e0b;
  opacity: 0.9;
}

/* ── LISTEN-ANSICHT ──────────────────────────────────────────────────────────── */
.rp-list { width: 100%; }
.rp-list-row {
  display: grid;
  grid-template-columns: 24px 2fr 1fr 1fr 90px 80px;
  align-items: center;
  gap: 8px;
  padding: 7px 4px;
  border-radius: 5px;
  cursor: pointer;
  border-bottom: 1px solid var(--rp-border);
  transition: background .1s;
}
.rp-list-row:hover { background: var(--rp-primary-light); }
.rp-list-row.selected { background: rgba(27,117,153,.1); }
.rp-list-row.header { cursor: default; font-size: 0.72rem; color: var(--rp-muted); font-weight: 600; text-transform: uppercase; letter-spacing: .04em; padding: 5px 4px; }
.rp-list-row.header:hover { background: transparent; }
.rp-list-icon { color: var(--rp-muted); font-size: 0.9rem; text-align: center; }
.rp-list-name { font-size: 0.83rem; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; display: flex; align-items: center; gap: 6px; }
.rp-list-meta { font-size: 0.75rem; color: var(--rp-muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-list-date { font-size: 0.75rem; color: var(--rp-muted); }
.rp-list-actions { display: flex; gap: 4px; opacity: 0; transition: opacity .1s; }
.rp-list-row:hover .rp-list-actions { opacity: 1; }

/* ── GALERIE-ANSICHT ─────────────────────────────────────────────────────────── */
.rp-gallery {
  display: grid;
  grid-template-columns: repeat(auto-fill, minmax(140px, 1fr));
  gap: 6px;
}
.rp-gallery-item {
  aspect-ratio: 1;
  border-radius: var(--rp-radius);
  overflow: hidden;
  cursor: pointer;
  position: relative;
  background: var(--rp-surface-2);
  border: 1px solid var(--rp-border);
  transition: transform .1s;
}
.rp-gallery-item:hover { transform: scale(1.02); border-color: var(--rp-primary); }
.rp-gallery-item:focus-visible {
  outline: 3px solid var(--rp-primary, #488078);
  outline-offset: 2px;
  transform: scale(1.02);
  z-index: 1;
}
.rp-gallery-item img { width: 100%; height: 100%; object-fit: cover; display: block; }
.rp-gallery-item-overlay {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 6px 8px;
  background: linear-gradient(transparent, rgba(0,0,0,.6));
  color: #fff;
  font-size: 0.68rem;
  opacity: 0;
  transition: opacity .15s;
}
.rp-gallery-item:hover .rp-gallery-item-overlay { opacity: 1; }

/* ── STATUS-BADGES ───────────────────────────────────────────────────────────── */
.rp-badge {
  display: inline-flex;
  align-items: center;
  gap: 3px;
  padding: 2px 8px;
  border-radius: 20px;
  font-size: 0.70rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
  border: 1px solid;
}
.rp-badge-draft    { background: rgba(120,120,120,.10); color: #5a5a5a; border-color: rgba(120,120,120,.25); }
.rp-badge-submitted { background: rgba(27,117,153,.12); color: var(--rp-primary); border-color: rgba(27,117,153,.30); }
.rp-badge-reviewing { background: rgba(224,160,64,.12); color: #b07a10; border-color: rgba(224,160,64,.30); }
.rp-badge-approved  { background: rgba(76,175,80,.12);  color: #2e7d32; border-color: rgba(76,175,80,.25); }
.rp-badge-rejected  { background: rgba(200,72,72,.10);  color: var(--rp-danger); border-color: rgba(200,72,72,.25); }

/* ── FARB-LABELS ─────────────────────────────────────────────────────────────── */
.rp-label-dot {
  width: 9px; height: 9px;
  border-radius: 50%;
  flex-shrink: 0;
  border: 1px solid rgba(0,0,0,.12);
}
.rp-label-none    { background: var(--rp-border); }
.rp-label-red     { background: #e24b4a; }
.rp-label-orange  { background: #f59e0b; }
.rp-label-green   { background: #4caf50; }
.rp-label-blue    { background: #2196f3; }
.rp-label-purple  { background: #7c3aed; }
.rp-label-teal    { background: #0d9488; }
.rp-label-gray    { background: #9ca3af; }
.rp-label-pink    { background: #db2777; }

/* ── BULK-ACTION-BAR ─────────────────────────────────────────────────────────── */
.rp-bulk-bar {
  position: sticky;
  bottom: 0;
  left: 0; right: 0;
  background: var(--rp-primary);
  color: #fff;
  padding: 10px 14px;
  display: flex;
  align-items: center;
  gap: 10px;
  border-radius: var(--rp-radius-lg) var(--rp-radius-lg) 0 0;
  box-shadow: 0 -4px 20px rgba(27,117,153,.3);
  transition: transform .2s;
  z-index: 20;
  flex-wrap: wrap;
}
.rp-bulk-bar.hidden { transform: translateY(100%); }
.rp-bulk-count { font-weight: 600; font-size: 0.88rem; flex-shrink: 0; }
.rp-bulk-spacer { flex: 1; }
.rp-bulk-btn {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 5px 12px;
  border: 1px solid rgba(255,255,255,.35);
  border-radius: 20px;
  background: rgba(255,255,255,.12);
  color: #fff;
  font-size: 0.78rem;
  cursor: pointer;
  font-family: inherit;
  transition: background .1s;
  white-space: nowrap;
}
.rp-bulk-btn:hover { background: rgba(255,255,255,.25); }
.rp-bulk-btn-danger { background: rgba(220,38,38,.32); border-color: rgba(255,180,180,.5); }
.rp-bulk-btn-danger:hover { background: rgba(220,38,38,.55); }
.rp-bulk-deselect { background: transparent; border-color: rgba(255,255,255,.2); }

/* Move-Picker */
.rp-move-list {
  display: flex; flex-direction: column; gap: 2px;
  max-height: 360px; overflow-y: auto;
  border: 1px solid var(--rp-border, #e0e8e5);
  border-radius: 8px; padding: 4px; background: var(--rp-surface, #fff);
}
.rp-move-item {
  display: flex; align-items: center; gap: 10px;
  padding: 9px 12px;
  border: none; background: transparent;
  border-radius: 6px;
  cursor: pointer; font-family: inherit; font-size: .86rem;
  text-align: left; color: var(--rp-text, #1a2926);
  transition: background .1s;
  width: 100%;
}
.rp-move-item:hover { background: rgba(72,128,120,.08); }
.rp-move-item i { width: 16px; text-align: center; flex-shrink: 0; }

/* ── UPLOAD DROPZONE ─────────────────────────────────────────────────────────── */
.rp-dropzone-active::after {
  content: '';
  position: absolute;
  inset: 0;
  border: 3px dashed var(--rp-primary);
  border-radius: var(--rp-radius-lg);
  background: rgba(27,117,153,.06);
  pointer-events: none;
  z-index: 50;
  animation: rp-drop-pulse 1s ease-in-out infinite;
}
@keyframes rp-drop-pulse {
  0%,100% { opacity: 1; }
  50%      { opacity: .6; }
}
/* Upload-Manager Sidebar */
.rp-upload-mgr {
  position: fixed;
  bottom: 16px;
  right: 16px;
  width: 300px;
  max-height: 360px;
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius-lg);
  box-shadow: 0 8px 30px rgba(0,0,0,.14);
  z-index: 1000;
  overflow: hidden;
  display: flex;
  flex-direction: column;
}
.rp-upload-mgr-hdr {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 9px 12px;
  border-bottom: 1px solid var(--rp-border);
  font-size: 0.82rem;
  font-weight: 600;
  background: var(--rp-surface-2);
  flex-shrink: 0;
}
.rp-upload-mgr-body { flex: 1; overflow-y: auto; padding: 6px; }
.rp-upload-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 6px 8px;
  border-radius: 6px;
  margin-bottom: 4px;
  background: var(--rp-surface-2);
}
.rp-upload-item-icon { font-size: 1.1rem; color: var(--rp-muted); flex-shrink: 0; }
.rp-upload-item-body { flex: 1; min-width: 0; }
.rp-upload-item-name { font-size: 0.78rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.rp-upload-progress {
  height: 3px;
  background: var(--rp-border);
  border-radius: 2px;
  overflow: hidden;
  margin-top: 4px;
}
.rp-upload-progress-fill {
  height: 100%;
  background: var(--rp-primary);
  border-radius: 2px;
  transition: width .3s;
}
.rp-upload-item-status { font-size: 0.72rem; color: var(--rp-muted); flex-shrink: 0; }
.rp-upload-item.done .rp-upload-item-status { color: var(--rp-ok); }
.rp-upload-item.error .rp-upload-item-status { color: var(--rp-danger); }

/* ── MODALS ──────────────────────────────────────────────────────────────────── */
/* ── MODALS & OVERLAYS (Premium 2026) ─────────────────────────────────────── */
.rp-overlay {
  position: fixed; inset: 0; z-index: 2000;
  background: rgba(10,12,14,.65); backdrop-filter: blur(4px) saturate(1.2);
  display: flex; align-items: center; justify-content: center;
  padding: 20px; animation: rp-fade-in .18s ease;
}
@keyframes rp-fade-in { from{opacity:0} to{opacity:1} }

.rp-modal {
  background: var(--rp-surface);
  border-radius: 14px;
  box-shadow: 0 32px 80px rgba(0,0,0,.35), 0 0 0 1px rgba(255,255,255,.08);
  width: 100%; max-width: 480px; max-height: 90vh;
  overflow: hidden; display: flex; flex-direction: column;
  animation: rp-modal-in .2s cubic-bezier(.34,1.4,.64,1);
}
.rp-modal-lg { max-width: 680px; }
@keyframes rp-modal-in { from{opacity:0;transform:scale(.93) translateY(8px)} to{opacity:1;transform:scale(1) translateY(0)} }

/* ── MOBILE: rpDialog rendert als Bottom-Sheet ───────────────────────────────
   Auf Phones (≤640px) wird die Modal-Karte zu einem Sheet, das von unten
   reinrutscht. Inhaltsstruktur bleibt 100% gleich — kein JS-Refactor nötig.
   Body bleibt scrollbar. Sichtbare „Grip-Bar" oben am Sheet als Affordance. */
@media (max-width: 640px) {
  .rp-overlay {
    align-items: flex-end;
    padding: 0;
    animation: rp-overlay-fade-in .22s ease;
  }
  @keyframes rp-overlay-fade-in { from{opacity:0} to{opacity:1} }
  .rp-modal,
  .rp-modal-lg {
    max-width: 100%;
    width: 100%;
    max-height: 92vh;
    border-radius: 18px 18px 0 0;
    padding-bottom: env(safe-area-inset-bottom, 0px);
    animation: rp-sheet-up .26s cubic-bezier(.34,1.4,.64,1);
  }
  .rp-modal::before {
    content: '';
    position: absolute;
    top: 6px; left: 50%;
    transform: translateX(-50%);
    width: 40px; height: 4px;
    border-radius: 999px;
    background: var(--rp-border);
    pointer-events: none;
  }
  .rp-modal-hdr { padding-top: 18px; }
  @keyframes rp-sheet-up { from{transform:translateY(100%)} to{transform:translateY(0)} }
}

.rp-modal-hdr {
  display: flex; align-items: center; gap: 10px;
  padding: 16px 18px 14px;
  border-bottom: 1px solid var(--rp-border);
  flex-shrink: 0;
}
.rp-modal-icon {
  width: 36px; height: 36px; border-radius: 10px;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem; flex-shrink: 0;
}
.rp-modal-title { font-size: 1rem; font-weight: 700; flex: 1; color: var(--rp-text); }
.rp-modal-close {
  width: 30px; height: 30px; border: none; background: transparent;
  color: var(--rp-muted); cursor: pointer; border-radius: 7px;
  display: flex; align-items: center; justify-content: center;
  font-size: .88rem; transition: background .1s, color .1s;
}
.rp-modal-close:hover { background: rgba(200,72,72,.1); color: #c84848; }
/* Screen-Reader-Only: Element ist sichtbar für Assistive Tech aber visuell versteckt.
   Standard-Pattern, kompatibel mit allen ATs. Nicht display:none weil das auch von ATs ignoriert würde. */
.rp-sr-only {
  position: absolute !important;
  width: 1px !important; height: 1px !important;
  padding: 0 !important; margin: -1px !important;
  overflow: hidden !important;
  clip: rect(0,0,0,0) !important;
  white-space: nowrap !important;
  border: 0 !important;
}

/* Modal-Icon-Varianten — funktionieren mit oder ohne geladenes Dialog-Modul.
   Light-Tint-Background + dunklerer Text für Light-Mode.
   Im Dark-Mode (über CSS-Vars) automatisch konsistent. */
.rp-modal-icon-info    { background: rgba(72,128,120,.15);  color: var(--rp-primary, #488078); }
.rp-modal-icon-warn    { background: rgba(217,119,6,.15);   color: #d97706; }
.rp-modal-icon-danger  { background: rgba(220,38,38,.15);   color: #dc2626; }
.rp-modal-icon-success { background: rgba(22,163,74,.15);   color: #16a34a; }
.rp-modal-icon-violet  { background: rgba(124,58,237,.15);  color: #7c3aed; }

/* Suche-Highlight: <mark> um Treffer in Card-Namen, List-Rows. Tönung passt zu Light+Dark.
   Nicht den Browser-Default verwenden weil der gelb-grell ist. */
.rp-mark {
  background: rgba(245,158,11,.32);
  color: inherit;
  padding: 0 2px;
  border-radius: 3px;
  font-weight: 600;
}

/* Offline-Banner — bleibt sticky am unteren Rand bis Verbindung wieder da. */
.rp-offline-banner {
  position: fixed;
  bottom: 16px;
  left: 50%;
  transform: translateX(-50%);
  background: #d97706;
  color: #fff;
  padding: 8px 16px;
  border-radius: 999px;
  font-size: .82rem;
  font-weight: 600;
  display: flex;
  align-items: center;
  gap: 8px;
  z-index: 4000;
  box-shadow: 0 4px 16px rgba(217,119,6,.3);
  animation: rp-offline-in .25s ease;
}
@keyframes rp-offline-in { from { opacity:0; transform: translate(-50%, 8px); } to { opacity:1; transform: translate(-50%, 0); } }
@media (prefers-reduced-motion: reduce) { .rp-offline-banner { animation: none; } }

/* ── PRINT-CSS ─────────────────────────────────────────────────────────────
   Beim Drucken (z.B. QR-Code-Modal, Berichts-Übersicht) verstecken wir
   alle UI-Chrome (Toolbar, Sidebar, Bulk-Bar, FAB, Modals, Buttons).
   Nur der eigentliche Inhalt wird gedruckt. Schwarze Schrift auf Weiß. */
@media print {
  /* Hintergrund + Farbe normalisieren — sparen Druckertinte */
  body, .rp-root, .rp-content, .rp-body {
    background: #fff !important; color: #000 !important;
  }

  /* Komplette Chrome ausblenden */
  .rp-toolbar,
  .rp-sidebar,
  .rp-resize-handle,
  .rp-content-extra-toolbar,
  .rp-bulk-bar,
  .rp-fab,
  .rp-fab-menu,
  .rp-upload-mgr,
  .rp-overlay,
  .rp-quicklook-overlay,
  .rp-ctx-menu,
  .rp-shortcuts-overlay,
  .rp-undo-toast-stack,
  .rp-card-actions,
  .rp-card-checkbox,
  .rp-modal-close,
  .rp-modal-actions,
  .rp-live-ticker,
  .rpa-header,
  .rpa-card-actions {
    display: none !important;
  }

  /* Modal-Inhalte beim Drucken vollformatig — kein Backdrop, keine Animation */
  .rp-overlay { position: static !important; background: transparent !important; padding: 0 !important; }
  .rp-modal {
    box-shadow: none !important; border: 1px solid #ccc !important;
    max-width: 100% !important; max-height: none !important;
    page-break-inside: avoid;
  }

  /* Cards beim Drucken: keine Schatten/Hover, klare Borders */
  .rp-grid-card, .rpa-card, .rp-list-row {
    box-shadow: none !important;
    border: 1px solid #d0d0d0 !important;
    page-break-inside: avoid;
    break-inside: avoid;
  }
  .rp-card-cover img { max-height: 200px; object-fit: contain !important; }

  /* Skeletons im Druck nie sichtbar (laufende Animation würde Tinte verschwenden) */
  .rp-skel, .rp-skel-card, .rp-skel-row { display: none !important; }

  /* Links: URL hinter Linktext anzeigen (nur wenn nicht-trivial) */
  a[href]:not(.rp-no-print-url):after {
    content: " (" attr(href) ")";
    font-size: 80%;
    color: #555;
  }

  /* Editor / User-Maske: Top-Bar + Footer beim Druck weg, nur Dokument */
  .rpe2-top, .rpe2-fmt-bar, .rpe2-mob-bar,
  .rpum-hdr, .rpum-foot {
    display: none !important;
  }
  .rpe2-doc, .rpum-body {
    box-shadow: none !important;
    background: #fff !important;
  }

  /* Page-Breaks: jede Foto-Reihe auf einer Seite halten */
  .rpe2-row, .rpum-row { page-break-inside: avoid; break-inside: avoid; }
}
.rp-modal-body { flex: 1; overflow-y: auto; padding: 18px; }
.rp-modal-actions {
  display: flex; gap: 8px; padding: 14px 18px;
  border-top: 1px solid var(--rp-border);
  justify-content: flex-end; flex-shrink: 0;
  background: var(--rp-surface-2);
}

/* Form-Felder */
.rp-field { margin-bottom: 14px; }
.rp-label {
  display: block;
  font-size: 0.78rem;
  font-weight: 600;
  color: var(--rp-muted);
  margin-bottom: 4px;
}
.rp-input {
  width: 100%;
  padding: 8px 10px;
  border: 1px solid var(--rp-border);
  border-radius: 6px;
  background: var(--rp-surface);
  color: var(--rp-text);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.rp-input:focus {
  border-color: var(--rp-primary);
  box-shadow: 0 0 0 3px rgba(27,117,153,.10);
}
.rp-textarea { min-height: 80px; resize: vertical; }
.rp-select {
  width: 100%;
  padding: 7px 10px;
  border: 1px solid var(--rp-border);
  border-radius: 6px;
  background: var(--rp-surface);
  color: var(--rp-text);
  font-size: 0.88rem;
  font-family: inherit;
  outline: none;
}
.rp-select:focus { border-color: var(--rp-primary); box-shadow: 0 0 0 3px rgba(27,117,153,.10); }

/* ── SUBMIT-FLOW ─────────────────────────────────────────────────────────────── */
/* Checklist im Submit-Modal */
.rp-checklist { display: flex; flex-direction: column; gap: 8px; margin: 4px 0 12px; }
.rp-check-item {
  display: flex;
  align-items: flex-start;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 6px;
  border: 1px solid var(--rp-border);
  background: var(--rp-surface-2);
}
.rp-check-item.ok { border-color: rgba(76,175,80,.3); background: rgba(76,175,80,.06); }
.rp-check-item.warn { border-color: rgba(224,160,64,.35); background: rgba(224,160,64,.07); }
.rp-check-item.fail { border-color: rgba(200,72,72,.3); background: rgba(200,72,72,.06); }
.rp-check-icon { font-size: 1rem; flex-shrink: 0; margin-top: 1px; }
.rp-check-item.ok .rp-check-icon { color: var(--rp-ok); }
.rp-check-item.warn .rp-check-icon { color: var(--rp-warn); }
.rp-check-item.fail .rp-check-icon { color: var(--rp-danger); }
.rp-check-body { flex: 1; }
.rp-check-title { font-size: 0.85rem; font-weight: 500; }
.rp-check-sub { font-size: 0.75rem; color: var(--rp-muted); margin-top: 1px; }

/* Submit-Bestätigungs-Animation */
.rp-submit-success {
  text-align: center;
  padding: 30px 20px;
}
.rp-submit-checkmark {
  width: 64px; height: 64px;
  border-radius: 50%;
  background: rgba(76,175,80,.12);
  border: 2px solid rgba(76,175,80,.3);
  display: flex; align-items: center; justify-content: center;
  margin: 0 auto 14px;
  font-size: 1.8rem;
  color: var(--rp-ok);
  animation: rp-pop-in .4s cubic-bezier(.34,1.56,.64,1);
}
@keyframes rp-pop-in { from { transform: scale(0); opacity: 0; } to { transform: scale(1); opacity: 1; } }
.rp-submit-receipt {
  background: var(--rp-surface-2);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius);
  padding: 10px 14px;
  text-align: left;
  margin: 12px 0;
  font-size: 0.82rem;
}
.rp-submit-receipt-row { display: flex; justify-content: space-between; gap: 12px; padding: 3px 0; }
.rp-submit-receipt-key { color: var(--rp-muted); }
.rp-submit-receipt-val { font-weight: 500; font-family: ui-monospace, monospace; font-size: 0.78rem; }

/* Recall-Countdown */
.rp-recall-bar {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 8px 12px;
  background: rgba(224,160,64,.1);
  border: 1px solid rgba(224,160,64,.3);
  border-radius: 6px;
  margin-top: 8px;
}
.rp-recall-timer {
  font-family: ui-monospace, monospace;
  font-size: 0.88rem;
  font-weight: 600;
  color: #b07a10;
  min-width: 42px;
}
.rp-recall-btn {
  margin-left: auto;
  padding: 3px 10px;
  border: 1px solid rgba(224,160,64,.5);
  border-radius: 20px;
  background: transparent;
  color: #b07a10;
  font-size: 0.75rem;
  font-weight: 600;
  cursor: pointer;
  font-family: inherit;
  transition: background .1s;
}
.rp-recall-btn:hover { background: rgba(224,160,64,.15); }
.rp-recall-btn:disabled { opacity: .4; cursor: default; }

/* ── STATUS-TRACKING für Techniker ──────────────────────────────────────────── */
.rp-status-track {
  display: flex;
  flex-direction: column;
  gap: 0;
  margin: 8px 0;
}
.rp-status-track-step {
  display: flex;
  align-items: flex-start;
  gap: 12px;
  padding: 8px 0;
  position: relative;
}
.rp-status-track-step::before {
  content: '';
  position: absolute;
  left: 14px;
  top: 32px;
  bottom: -8px;
  width: 2px;
  background: var(--rp-border);
}
.rp-status-track-step:last-child::before { display: none; }
.rp-track-dot {
  width: 28px; height: 28px;
  border-radius: 50%;
  display: flex; align-items: center; justify-content: center;
  font-size: 0.8rem;
  flex-shrink: 0;
  border: 2px solid var(--rp-border);
  background: var(--rp-surface);
  color: var(--rp-muted);
  z-index: 1;
}
.rp-track-dot.done { background: var(--rp-ok); border-color: var(--rp-ok); color: #fff; }
.rp-track-dot.active { background: var(--rp-primary); border-color: var(--rp-primary); color: #fff; animation: rp-dot-pulse 1.4s ease-in-out infinite; }
.rp-track-dot.rejected { background: var(--rp-danger); border-color: var(--rp-danger); color: #fff; }
@keyframes rp-dot-pulse {
  0%,100% { box-shadow: 0 0 0 0 rgba(27,117,153,.4); }
  50% { box-shadow: 0 0 0 6px rgba(27,117,153,.0); }
}
.rp-track-body { flex: 1; padding-top: 4px; }
.rp-track-title { font-size: 0.85rem; font-weight: 500; }
.rp-track-meta { font-size: 0.75rem; color: var(--rp-muted); margin-top: 1px; }

/* ── LABEL-PICKER ────────────────────────────────────────────────────────────── */
.rp-label-picker {
  display: flex;
  gap: 6px;
  flex-wrap: wrap;
  padding: 4px 0;
}
.rp-label-swatch {
  width: 24px; height: 24px;
  border-radius: 50%;
  border: 2px solid transparent;
  cursor: pointer;
  transition: transform .1s, border-color .1s;
  flex-shrink: 0;
}
.rp-label-swatch:hover { transform: scale(1.15); }
.rp-label-swatch.selected { border-color: var(--rp-text); }
/* Großer Label-Swatch für Bulk-Picker */
.rp-label-swatch-big {
  display: flex; align-items: center; gap: 8px;
  padding: 8px 14px; border-radius: 8px; cursor: pointer;
  border: 2px solid transparent; transition: all .12s;
  font-size: .83rem; font-weight: 500; color: #fff;
  text-shadow: 0 1px 2px rgba(0,0,0,.25);
}
.rp-label-swatch-big:hover { transform: translateY(-1px); box-shadow: 0 3px 10px rgba(0,0,0,.18); border-color: rgba(255,255,255,.4); }

/* ── CONTEXT MENU ────────────────────────────────────────────────────────────── */
.rp-ctx-menu {
  position: fixed;
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  border-radius: var(--rp-radius);
  box-shadow: 0 8px 30px rgba(0,0,0,.14);
  z-index: 3000;
  min-width: 180px;
  padding: 4px;
  animation: rp-fade-in .1s ease;
}
.rp-ctx-item {
  display: flex;
  align-items: center;
  gap: 8px;
  padding: 7px 10px;
  border-radius: 5px;
  cursor: pointer;
  font-size: 0.82rem;
  color: var(--rp-text);
  transition: background .08s;
}
.rp-ctx-item:hover { background: var(--rp-primary-light); color: var(--rp-primary); }
.rp-ctx-item i { width: 14px; text-align: center; color: var(--rp-muted); flex-shrink: 0; }
.rp-ctx-item:hover i { color: var(--rp-primary); }
.rp-ctx-item.danger:hover { background: rgba(200,72,72,.08); color: var(--rp-danger); }
.rp-ctx-item.danger:hover i { color: var(--rp-danger); }
.rp-ctx-sep { height: 1px; background: var(--rp-border); margin: 3px 8px; }

/* ── KEYBOARD SHORTCUT OVERLAY ───────────────────────────────────────────────── */
.rp-shortcuts-overlay {
  position: fixed;
  inset: 0;
  background: rgba(0,0,0,.55);
  z-index: 4000;
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 16px;
}
.rp-shortcuts-modal {
  background: var(--rp-surface);
  border-radius: var(--rp-radius-lg);
  padding: 20px 24px;
  max-width: 560px;
  width: 100%;
  max-height: 80vh;
  overflow-y: auto;
  box-shadow: 0 20px 60px rgba(0,0,0,.25);
}
.rp-shortcuts-title { font-size: 1rem; font-weight: 600; margin-bottom: 14px; display: flex; align-items: center; gap: 8px; }
.rp-shortcuts-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 4px 16px; }
.rp-shortcut-row { display: flex; align-items: center; gap: 8px; padding: 4px 0; font-size: 0.82rem; }
.rp-shortcut-key { display: flex; gap: 3px; flex-shrink: 0; }
kbd {
  display: inline-block;
  padding: 2px 6px;
  background: var(--rp-surface-2);
  border: 1px solid var(--rp-border);
  border-bottom-width: 2px;
  border-radius: 4px;
  font-size: 0.72rem;
  font-family: ui-monospace, monospace;
  color: var(--rp-text);
  min-width: 22px;
  text-align: center;
}
.rp-shortcut-desc { color: var(--rp-muted); }

/* ── QUICK-LOOK / LIGHTBOX (Pinch+Zoom+Swipe+Keyboard) ───────────────────── */
body.rp-ql-open { overflow: hidden; }
.rp-quicklook-overlay {
  position: fixed; inset: 0;
  background: rgba(0,0,0,.92);
  z-index: 3500;
  display: flex; align-items: center; justify-content: center;
  animation: rp-fade-in .15s ease;
  user-select: none;
  -webkit-user-select: none;
}
.rp-ql-stage {
  position: absolute; inset: 0;
  display: flex; align-items: center; justify-content: center;
  cursor: zoom-in;
  overflow: hidden;
  touch-action: none; /* Pinch+Pan im JS */
}
.rp-quicklook-overlay.zoomed .rp-ql-stage { cursor: grab; }
.rp-quicklook-overlay.zoomed .rp-ql-stage:active { cursor: grabbing; }
.rp-ql-img {
  max-width: 96vw;
  max-height: 92vh;
  display: block;
  transform-origin: center center;
  will-change: transform;
  -webkit-user-drag: none;
  user-drag: none;
  transition: transform .22s cubic-bezier(.2,.8,.2,1);
}
.rp-ql-close {
  position: absolute;
  top: 14px; right: 14px;
  width: 44px; height: 44px;
  border-radius: 50%;
  background: rgba(0,0,0,.55);
  border: none; color: #fff; cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  font-size: 1rem;
  z-index: 2;
  transition: background .1s, transform .1s;
}
.rp-ql-close:hover { background: rgba(255,255,255,.18); transform: scale(1.06); }
.rp-ql-nav {
  position: absolute;
  top: 50%; transform: translateY(-50%);
  width: 48px; height: 48px;
  border-radius: 50%;
  background: rgba(0,0,0,.55); border: none; color: #fff;
  cursor: pointer; z-index: 2;
  display: flex; align-items: center; justify-content: center;
  font-size: 1.05rem;
  transition: background .12s, transform .12s, opacity .15s;
  opacity: .6;
}
.rp-ql-nav:hover { background: rgba(255,255,255,.18); opacity: 1; }
.rp-ql-prev { left: 14px; }
.rp-ql-next { right: 14px; }
.rp-quicklook-overlay.zoomed .rp-ql-nav { opacity: .15; pointer-events: none; }
.rp-ql-info {
  position: absolute;
  bottom: 0; left: 0; right: 0;
  padding: 14px 22px;
  background: linear-gradient(transparent, rgba(0,0,0,.78));
  color: #fff; font-size: .85rem;
  display: flex; gap: 14px; align-items: center;
  pointer-events: none;
}
.rp-ql-info-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-ql-info-counter { font-variant-numeric: tabular-nums; opacity: .82; flex-shrink: 0; }
.rp-ql-tools {
  position: absolute;
  bottom: 60px; left: 50%; transform: translateX(-50%);
  display: flex; gap: 6px;
  background: rgba(0,0,0,.5);
  border-radius: 999px; padding: 6px;
  z-index: 2;
  backdrop-filter: blur(8px);
}
.rp-ql-tool {
  width: 36px; height: 36px;
  border-radius: 50%;
  background: transparent; border: none; color: #fff;
  cursor: pointer; display: flex; align-items: center; justify-content: center;
  font-size: .9rem;
  transition: background .12s;
}
.rp-ql-tool:hover { background: rgba(255,255,255,.18); }
@media (pointer: coarse) {
  .rp-ql-tool { width: 44px; height: 44px; }
  .rp-ql-nav, .rp-ql-close { width: 48px; height: 48px; }
}
@media (max-width: 600px) {
  .rp-ql-tools { bottom: 80px; }
}
@media (prefers-reduced-motion: reduce) {
  .rp-ql-img { transition: none !important; }
}

/* ── LEER/LOADING STATES (Sprint C: angeglichen an Dashboard-Pattern) ───── */
.rp-empty {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
  padding: 48px 20px;
  text-align: center;
  color: var(--rp-muted);
}
.rp-empty-icon { font-size: 36px; opacity: .3; margin-bottom: 12px; }
.rp-empty-title { font-size: 14px; font-weight: 600; margin-bottom: 4px; color: var(--rp-text); }
.rp-empty-sub { font-size: 12.5px; max-width: 320px; line-height: 1.45; }
.rp-loading {
  display: flex;
  align-items: center;
  justify-content: center;
  padding: 40px 20px;
  color: var(--rp-muted);
  gap: 8px;
  font-size: 13px;
}
.rp-loading i { color: var(--rp-primary); font-size: 14px; }

/* ── NOTIFICATION DOT ────────────────────────────────────────────────────────── */
.rp-notif-dot {
  position: absolute;
  top: -2px; right: -2px;
  width: 8px; height: 8px;
  border-radius: 50%;
  background: var(--rp-danger);
  border: 2px solid var(--rp-surface);
}

/* ── LIVE-AKTIVITÄTS-TICKER ──────────────────────────────────────────────────── */
.rp-live-ticker {
  display: flex;
  align-items: center;
  gap: 6px;
  padding: 4px 10px;
  background: rgba(27,117,153,.07);
  border-bottom: 1px solid rgba(27,117,153,.15);
  font-size: 0.75rem;
  color: var(--rp-primary);
  min-height: 28px;
  flex-shrink: 0;
  overflow: hidden;
  text-overflow: ellipsis;
  white-space: nowrap;
}
.rp-live-dot {
  width: 7px; height: 7px;
  border-radius: 50%;
  background: var(--rp-primary);
  animation: rp-live-blink 1.4s ease-in-out infinite;
  flex-shrink: 0;
}
@keyframes rp-live-blink { 0%,100%{opacity:1;} 50%{opacity:.3;} }

/* ── RESPONSIVE TOOLBAR ─────────────────────────────────────────────────────── */
/* Auf schmalen Bildschirmen werden Buttons mit Text-Label kompakter dargestellt:
   <900px: Label wird ausgeblendet, nur Icon bleibt sichtbar (Tooltip aktiv).
   Reduziert die Toolbar-Last und verhindert flex-wrap-Chaos auf Tablets. */
@media (max-width: 900px) {
  .rp-toolbar .rp-btn-label,
  .rp-content-extra-toolbar .rp-btn-label { display: none; }
  .rp-toolbar .rp-btn,
  .rp-content-extra-toolbar .rp-btn {
    min-width: 40px;
    padding: 8px 10px;
  }
  .rp-toolbar .rp-btn i,
  .rp-content-extra-toolbar .rp-btn i { margin: 0; }
}

/* Touch-Target-Mindestgrößen (Apple 44pt / Material 48dp).
   Verhindert Fehlklicks auf kleinen Schaltflächen. */
@media (pointer: coarse) {
  .rp-btn-icon,
  .rp-modal-close,
  .rp-card-action-btn,
  .rpa-refresh-btn { min-width: 44px; min-height: 44px; }
}

/* ── MOBILE ──────────────────────────────────────────────────────────────────── */
@media (max-width: 768px) {
  .rp-sidebar {
    position: fixed;
    top: 0; left: 0; bottom: 0;
    z-index: 500;
    box-shadow: 4px 0 20px rgba(0,0,0,.15);
    transform: translateX(0);
    transition: transform .22s;
    width: 280px !important;
  }
  .rp-sidebar.collapsed {
    transform: translateX(-100%);
    width: 280px !important;
    min-width: 280px !important;
  }
  .rp-sidebar-backdrop {
    position: fixed;
    inset: 0;
    background: rgba(0,0,0,.4);
    z-index: 499;
    display: none;
  }
  .rp-sidebar-backdrop.visible { display: block; }
  .rp-grid { grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); }
  .rp-list-row { grid-template-columns: 24px 1fr 70px 60px; }
  .rp-list-row > :nth-child(3),
  .rp-list-row > :nth-child(5) { display: none; }
  .rp-gallery { grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); }
  .rp-upload-mgr { width: calc(100vw - 32px); }
  .rp-shortcuts-grid { grid-template-columns: 1fr; }
}

@media (max-width: 480px) {
  .rp-grid { grid-template-columns: repeat(2, 1fr); }
  .rp-gallery { grid-template-columns: repeat(3, 1fr); }
  .rp-stats-row { grid-template-columns: repeat(2, 1fr); }
}

/* ── FAB (Mobile) ────────────────────────────────────────────────────────────── */
.rp-fab {
  position: fixed;
  bottom: 20px;
  right: 20px;
  width: 56px; height: 56px;
  border-radius: 50%;
  background: var(--rp-primary);
  color: #fff;
  border: none;
  box-shadow: 0 4px 20px rgba(27,117,153,.4);
  font-size: 1.3rem;
  cursor: pointer;
  display: none;
  align-items: center;
  justify-content: center;
  z-index: 400;
  transition: transform .15s, box-shadow .15s;
}
.rp-fab:active { transform: scale(0.94); }
@media (max-width: 768px) { .rp-fab { display: flex; } }

/* FAB-Menu */
.rp-fab-menu {
  position: fixed;
  bottom: 88px;
  right: 20px;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  z-index: 401;
}
.rp-fab-item {
  display: flex;
  align-items: center;
  gap: 10px;
  justify-content: flex-end;
}
.rp-fab-item-btn {
  width: 44px; height: 44px;
  border-radius: 50%;
  background: var(--rp-surface);
  border: 1px solid var(--rp-border);
  color: var(--rp-primary);
  font-size: 1rem;
  box-shadow: 0 2px 10px rgba(0,0,0,.12);
  cursor: pointer;
  display: flex; align-items: center; justify-content: center;
  transition: background .1s;
}
.rp-fab-item-btn:hover { background: var(--rp-primary-light); }
.rp-fab-item-label {
  background: rgba(0,0,0,.7);
  color: #fff;
  font-size: 0.78rem;
  padding: 4px 10px;
  border-radius: 20px;
  white-space: nowrap;
}

/* ── SCROLLBAR ───────────────────────────────────────────────────────────────── */
.rp-sidebar-scroll::-webkit-scrollbar,
.rp-content-scroll::-webkit-scrollbar { width: 5px; }
.rp-sidebar-scroll::-webkit-scrollbar-thumb,
.rp-content-scroll::-webkit-scrollbar-thumb {
  background: var(--rp-border);
  border-radius: 3px;
}
