/* ═══════════════════════════════════════════════════════════════════════════
   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));
}

/* v97.270: Writer/Calc-Buttons in Top-Toolbar.
   Icons default-neutral (erben rp-text via inherit). Beim Hover subtle
   brand-Tint zur Identifikation, ohne Office-Original-Farben aufzudrängen. */
#rp-new-writer-btn i,
#rp-new-calc-btn i {
  color: inherit;
  font-size: 0.95rem;
  transition: color .15s ease, transform .12s ease;
}
#rp-new-writer-btn:hover i {
  color: #4f7cd1;
  transform: scale(1.08);
}
#rp-new-calc-btn:hover i {
  color: #2d9d6e;
  transform: scale(1.08);
}

/* 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; }
/* 2026-05-08: Aktive Hauptansicht-Buttons (Home/Kanban/Map) sichtbar markieren */
.rp-btn-icon.active {
  background: var(--rp-primary, #1a7599);
  color: #fff;
  border-color: var(--rp-primary, #1a7599);
}
.rp-btn-icon.active:hover { background: var(--rp-primary-dark, #155f7f); }

/* ── SPLIT-LAYOUT ───────────────────────────────────────────────────────────── */
/* Sprint 6.4 — Sidebar entfernt, Vollbild-Layout. .rp-content nimmt jetzt 100% width. */
.rp-body {
  display: flex;
  flex: 1;
  min-height: 0;
  overflow: hidden;
}
.rp-body > .rp-content {
  flex: 1;
  width: 100%;
  min-width: 0;
}

/* ── 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: 24px; height: 24px;
  display: flex; align-items: center; justify-content: center;
  flex-shrink: 0;
  color: var(--rp-muted);
  font-size: 0.7rem;
  border-radius: 4px;
  transition: background .1s, transform .15s;
}
/* Sprint F P4-09: Touch-Targets >=44px auf coarse-pointer */
@media (pointer:coarse) { .rp-tree-expand { width: 44px; height: 44px; font-size:.8rem; } }
.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);
}

/* ─── 2026-05-08 Polish: Bericht-Karten visuell deutlich abgehoben ──────── */
.rp-card-report {
  border-left: 4px solid #185FA5;        /* prominente blaue Kante = "Dokument" */
  background: linear-gradient(135deg, #fafdff 0%, #f0f7fd 100%);
}
.rp-card-report:hover {
  border-color: #185FA5;
  box-shadow: 0 6px 18px rgba(24,95,165,.18);
}
/* Status-spezifische Akzent-Farbe links */
.rp-card-report.rp-card-report-success { border-left-color: #2e7d32; }   /* approved */
.rp-card-report.rp-card-report-warn    { border-left-color: #b07a10; }   /* draft / pending */
.rp-card-report.rp-card-report-danger  { border-left-color: #d32f2f; }   /* rejected */
.rp-card-report.rp-card-report-info    { border-left-color: #185FA5; }   /* submitted */

/* Bericht-Banner — kleines Ribbon oben das sofort signalisiert: das ist ein BERICHT */
.rp-card-report-banner {
  background: linear-gradient(90deg, #185FA5, #2c7bc4);
  color: #fff;
  font-size: .62rem;
  font-weight: 800;
  letter-spacing: .08em;
  padding: 4px 10px;
  display: flex;
  align-items: center;
  gap: 5px;
  text-transform: uppercase;
}
.rp-card-report-banner i { font-size: .7rem; opacity: .9; }

/* Cover-Icon im "Berichts-Look": leichte Schraffur-Background damit klar
   "Dokument" statt "Foto-Galerie" */
.rp-card-cover-icon-report {
  background: repeating-linear-gradient(
    -45deg,
    rgba(24,95,165,.04) 0,
    rgba(24,95,165,.04) 4px,
    transparent 4px,
    transparent 8px
  );
  width: 100%; height: 100%;
  display: flex; align-items: center; justify-content: center;
}
.rp-card-cover-icon-report i { font-size: 2rem; color: #185FA5; opacity: .85; }

/* List-View: Bericht-Zeilen leicht abgehoben */
.rp-list-row-report { background: linear-gradient(90deg, rgba(24,95,165,.04), transparent 40%); }
.rp-list-row-report:hover { background: rgba(24,95,165,.08); }
.rp-list-row-report .rp-list-icon { background: rgba(24,95,165,.06); }

/* ─── 2026-05-08: Folder-Info-Bar (Termin-Link + Team-Zugriff sichtbar) ──── */
.rp-fbar {
  background: linear-gradient(135deg, #f4faf8 0%, #ffffff 100%);
  border: 1px solid var(--rp-border, #e3e6ea);
  border-left: 4px solid #488078;
  border-radius: 10px;
  padding: 12px 16px;
  margin-bottom: 14px;
  box-shadow: 0 1px 3px rgba(0,0,0,.04);
}
.rp-fbar-row {
  display: flex;
  align-items: center;
  gap: 18px;
  flex-wrap: wrap;
}
.rp-fbar-folder {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  font-size: .95rem;
  font-weight: 600;
  color: var(--rp-text, #1a1a1a);
  flex-shrink: 0;
}
.rp-fbar-folder-name { max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rp-fbar-section { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.rp-fbar-label {
  font-size: .68rem;
  font-weight: 700;
  text-transform: uppercase;
  letter-spacing: .06em;
  color: var(--rp-muted, #7b8c8a);
  display: inline-flex;
  align-items: center;
  gap: 4px;
}
.rp-fbar-label.rp-fbar-empty { color: #b0b8b6; font-style: italic; font-weight: 500; text-transform: none; letter-spacing: 0; }
.rp-fbar-pills { display: flex; flex-wrap: wrap; gap: 5px; }
.rp-fbar-pill {
  display: inline-flex;
  align-items: center;
  gap: 5px;
  padding: 4px 10px;
  border-radius: 14px;
  font-size: .76rem;
  background: #fff;
  border: 1px solid var(--rp-border, #e3e6ea);
  color: var(--rp-text, #1a1a1a);
}
.rp-fbar-pill-event {
  background: rgba(26,117,153,.08);
  border-color: rgba(26,117,153,.4);
  color: #1a7599;
}
.rp-fbar-pill-event[data-primary="1"] {
  background: linear-gradient(135deg, rgba(251,191,36,.16), rgba(26,117,153,.08));
  border-color: #fbbf24;
}
.rp-fbar-pill-event strong { font-weight: 700; }
.rp-fbar-primary-tag {
  background: #fbbf24;
  color: #7c2d12;
  padding: 1px 6px;
  border-radius: 8px;
  font-size: .58rem;
  font-weight: 800;
  text-transform: uppercase;
  letter-spacing: .04em;
  margin-left: 2px;
}
.rp-fbar-pill-user {
  background: rgba(72,128,120,.08);
  border-color: rgba(72,128,120,.4);
  color: #2f5e57;
}
.rp-fbar-avatar {
  width: 18px; height: 18px;
  background: #488078; color: #fff;
  border-radius: 50%;
  display: inline-flex; align-items: center; justify-content: center;
  font-weight: 700; font-size: 9px;
}
.rp-fbar-event-hint {
  display: inline-flex; align-items: center; gap: 5px;
  background: rgba(26,117,153,.08); color: #1a7599;
  padding: 4px 10px; border-radius: 14px; font-size: .76rem;
}
.rp-fbar-actions { margin-left: auto; flex-shrink: 0; display:flex; gap:14px; }
.rp-fbar-btn {
  background: #1a7599;
  color: #fff;
  border: 0;
  padding: 7px 14px;
  border-radius: 7px;
  cursor: pointer;
  font-size: .8rem;
  font-weight: 600;
  display: inline-flex;
  align-items: center;
  gap: 6px;
  transition: background .12s;
}
.rp-fbar-btn:hover { background: #155f7f; }
@media (max-width: 700px) {
  .rp-fbar-row { gap: 10px; }
  .rp-fbar-folder-name { max-width: 160px; }
  .rp-fbar-actions { margin-left: 0; width: 100%; }
  .rp-fbar-btn { width: 100%; justify-content: center; }
}

/* 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
   2026-05-08 EOD-fix3: right:40px reserviert die obere rechte Ecke für die
   Selection-Checkbox — bei Bilder-Cards mit 5-6 Action-Buttons hat sonst
   der letzte (Löschen) unter der Checkbox gelegen. flex-wrap erlaubt
   Buttons in eine zweite Reihe falls Card schmal. */
.rp-card-actions {
  position: absolute;
  top: 6px;
  left: 6px;
  right: 40px;
  display: flex;
  flex-wrap: wrap;
  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 (Mehrfach-Auswahl für Bulk-Aktionen wie Verschieben/Löschen)
   2026-05-08 EOD Bug-Fix: Lag bisher in der gleichen Ecke wie die Hover-Action-Buttons
   (Merken/Label/Teilen) und überdeckte diese. Jetzt rechts oben — keine Kollision. */
.rp-card-checkbox {
  position: absolute;
  top: 8px;
  right: 8px;
  width: 22px; height: 22px;
  border-radius: 4px;
  border: 2px solid rgba(255,255,255,.85);
  background: rgba(0,0,0,.45);
  display: flex; align-items: center; justify-content: center;
  opacity: 0;
  transition: opacity .15s, background .15s, transform .12s;
  cursor: pointer;
  color: #fff;
  font-size: 0.78rem;
  z-index: 3;
}
.rp-card-checkbox:hover { transform: scale(1.1); background: rgba(0,0,0,.7); }
.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); }
/* 2026-05-08 EOD-fix4: Auf Report-Karten kollidiert top-right mit dem Status-
   Badge ("Entwurf"/"Eingereicht"/etc.). Status bleibt an seinem Platz, Checkbox
   wandert auf Report-Karten in die untere rechte Ecke (Stern-Indikator gibt es
   bei Reports eh nicht, also frei). */
.rp-grid-card.rp-card-report .rp-card-checkbox {
  top: auto;
  bottom: 8px;
  right: 8px;
}

/* 2026-05-08 EOD-fix5: Folder-Cards brauchen keinen Mehrfach-Auswahl-Haken.
   User-Wunsch: "die ordnerübersicht braucht keine haken da man die ja nicht
   verschieben kann". Ordner werden via Klick geöffnet, Aktionen über Hover-
   Buttons (Merken/Label/Teilen/Löschen) oder Rechtsklick-Menü. Datei- und
   Bericht-Cards behalten den Haken für Bulk-Operationen. */
.rp-grid-card[data-item-type="folder"] .rp-card-checkbox { display: none !important; }

/* 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;
}
/* v95.43: Pills mit voll deckendem Hintergrund + weißer Text/dunklere Töne für bessere Sichtbarkeit */
.rp-badge-draft    { background: #475569; color: #fff; border-color: #334155; }
.rp-badge-submitted { background: #1B7599; color: #fff; border-color: #155b78; }
.rp-badge-reviewing { background: #d97706; color: #fff; border-color: #b8620a; }
.rp-badge-approved  { background: #2e7d32; color: #fff; border-color: #1b5e20; }
.rp-badge-rejected  { background: #c84848; color: #fff; border-color: #a93636; }

/* ── 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); }
}

/* ── 2026-05-07 A3+A4: Virtuelle Sub-Folder Cards (orig/LS) ────────────────── */
.rp-card-virtual {
  cursor: pointer;
  transition: transform .12s, box-shadow .12s;
  border: 2px dashed rgba(72,128,120,.2);
}
.rp-card-virtual:hover {
  transform: translateY(-2px);
  box-shadow: 0 6px 20px rgba(0,0,0,.12);
  border-color: rgba(72,128,120,.5);
}
.rp-card-virtual .rp-card-cover {
  display: flex; align-items: center; justify-content: center;
  min-height: 140px;
}
.rp-card-virtual .rp-card-cover-icon {
  font-size: 3.2rem;
  filter: drop-shadow(0 2px 4px rgba(0,0,0,.18));
}
.rp-card-virtual .rp-card-status {
  position: absolute; top: 10px; right: 10px;
}

/* ── Subfolder-Karte (parent_id != NULL) ───────────────────────────────────
   2026-05-08 EOD User-Wunsch: "die auch als solche markiert sein sollen".
   Optisch dezenter Indent + violetter Akzent + "Unterordner"-Badge oben links. */
.rp-grid-card.rp-card-subfolder {
  border-left: 4px solid #7c3aed;     /* violet-600 */
  background: linear-gradient(90deg, rgba(124,58,237,.04) 0%, transparent 60%);
}
.rp-grid-card.rp-card-subfolder:hover {
  border-left-color: #6d28d9;
}
.rp-card-subfolder-badge {
  /* 2026-05-08 EOD: bottom-left platziert damit es weder Hover-Actions
     (top-left) noch Selection-Checkbox (top-right) überdeckt. */
  position: absolute;
  bottom: 8px; left: 8px;
  background: #7c3aed;
  color: #fff;
  font-size: .62rem;
  font-weight: 700;
  letter-spacing: .04em;
  text-transform: uppercase;
  padding: 3px 8px;
  border-radius: 6px;
  display: inline-flex;
  align-items: center;
  gap: 4px;
  z-index: 2;
  pointer-events: none;
  box-shadow: 0 1px 3px rgba(0,0,0,.18);
}
.rp-card-subfolder-badge i { font-size: .7rem; }
.rp-grid-card.rp-card-subfolder .rp-card-cover-icon i {
  color: #7c3aed;
}
.rp-list-row.rp-list-row-subfolder {
  background: linear-gradient(90deg, rgba(124,58,237,.05) 0%, transparent 80%);
  border-left: 3px solid #7c3aed;
}

/* ── Drag & Drop (Files in Folders verschieben) ─────────────────────────── */
.rp-grid-card[draggable="true"] { cursor: grab; }
.rp-grid-card[draggable="true"]:active { cursor: grabbing; }
.rp-grid-card.rp-card-dragging {
  opacity: .45;
  transform: scale(.96);
  transition: opacity .15s, transform .15s;
}
.rp-grid-card.rp-drop-active {
  outline: 3px dashed #1B7599;
  outline-offset: 2px;
  background: linear-gradient(135deg, rgba(27,117,153,.08), rgba(27,117,153,.02));
  transform: scale(1.02);
  box-shadow: 0 8px 24px rgba(27,117,153,.25);
  transition: all .14s;
}
.rp-grid-card.rp-drop-active::after {
  content: '\f0fe';  /* fa-square-plus */
  font-family: 'Font Awesome 6 Free';
  font-weight: 900;
  position: absolute;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 2.4rem;
  color: #1B7599;
  pointer-events: none;
  background: rgba(255,255,255,.7);
  z-index: 5;
}

/* Move-Modal Folder-Liste Hover */
.rp-move-target {
  transition: background .12s;
}
.rp-move-target:hover {
  background: var(--rp-bg-soft, #f1f5f9) !important;
}
.rp-move-target.rp-move-out:hover {
  background: linear-gradient(90deg,#fde68a,#fbbf24) !important;
}

/* ── FAB (Mobile) ────────────────────────────────────────────────────────────── */
/* 2026-05-07 Bugfix v2: Mobile-Nav ist ~72px hoch + safe-area-inset-bottom.
   Der FAB muss DARUEBER liegen, sonst verdeckt die Bottom-Nav ihn.
   z-index 950 — knapp unter mobile-nav (1000) ist kein Problem da
   keine vertikale Ueberlappung. */
.rp-fab {
  position: fixed;
  /* 88px = ~72 Mobile-Nav-Hoehe + 16 Abstand. !important damit kein anderer
     @media-Block diesen Wert mehr ueberschreiben kann (war das Problem). */
  bottom: calc(88px + env(safe-area-inset-bottom, 0px)) !important;
  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: 950;
  transition: transform .15s, box-shadow .15s;
}
.rp-fab:active { transform: scale(0.94); }
/* Auf Desktop (kein Mobile-Nav) reicht knapper Abstand */
@media (min-width: 769px) { .rp-fab { bottom: 20px !important; } }
@media (max-width: 768px) { .rp-fab { display: flex; } }

/* FAB-Menu (steht ueber dem FAB — 88px FAB-bottom + 60 FAB-Hoehe + 12px gap = 160) */
.rp-fab-menu {
  position: fixed;
  bottom: calc(160px + env(safe-area-inset-bottom, 0px)) !important;
  right: 20px;
  display: flex;
  flex-direction: column-reverse;
  gap: 10px;
  z-index: 951;
}
@media (min-width: 769px) { .rp-fab-menu { bottom: 88px !important; } }
.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;
}

/* ═══════════════════════════════════════════════════════════════════
   Sprint 6.4.3 — Mobile-First Patches
   ═══════════════════════════════════════════════════════════════════ */
@media (pointer: coarse) {
  /* Touch-Targets ≥ 44×44px für alle interaktiven Elemente */
  .rp-btn,
  .rp-btn-icon,
  .rp-tree-expand,
  .rp-card-action-btn,
  .rp-modal-close,
  .rpa-refresh-btn,
  .rp-view-btn {
    min-width: 44px;
    min-height: 44px;
    padding: 10px;
  }
  /* Größerer Tap-Bereich für Folder-Cards / Berichte-Cards */
  .rp-folder-card,
  .rp-report-card {
    min-height: 64px;
    padding: 14px;
  }
  /* Scroll-Performance auf Mobile: GPU-Layer */
  .rp-content,
  .rp-folder-grid,
  .rp-report-grid {
    -webkit-overflow-scrolling: touch;
    will-change: scroll-position;
  }
}

/* Mobile-First Layout (Phone < 480px) */
@media (max-width: 480px) {
  .rp-toolbar {
    padding: 8px 12px;
    flex-wrap: wrap;
  }
  .rp-toolbar-title { font-size: 0.95rem; }
  .rp-btn-label { display: none; }   /* nur Icon auf Phone */
  .rp-toolbar-search { flex: 1 1 100%; order: 99; margin-top: 6px; }
  .rp-content { padding: 8px; }
  .rp-breadcrumb { font-size: 0.78rem; padding: 6px 12px; }
  /* Modals als Bottom-Sheet auf Phone */
  .rp-modal {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    border-radius: 16px 16px 0 0;
    max-width: 100%;
    width: 100%;
    max-height: 90vh;
    margin: 0;
    transform: translateY(0);
    animation: rp-sheet-slide-up 0.22s cubic-bezier(.4,0,.2,1);
  }
  @keyframes rp-sheet-slide-up {
    from { transform: translateY(100%); }
    to   { transform: translateY(0); }
  }
}

/* ════════════════════════════════════════════════════════════════════════════
   Sprint 2026-05-06c — MOBILE-FIRST ULTRA-OVERHAUL (User-Direktive)
   "Berichte-Modul muss absolut ausgerichtet sein für mobile use am Smartphone
    und Tablet. Gesamtes UI/UX + Gestenunterstützung muss vollkommen für
    mobile ausgerichtet sein."
   ──────────────────────────────────────────────────────────────────────────── */

/* TOUCH-TARGETS überall ≥44×44px (iOS HIG, Material 48dp) */
@media (pointer:coarse) {
  .rp-btn,
  .rp-btn-icon,
  .rp-card-action-btn,
  .rp-bulk-btn,
  .rp-view-btn,
  .rp-fab,
  .rp-fab-item,
  .rp-tree-item,
  .rp-modal-close,
  .rp-card-checkbox,
  .rp-pending-item-submit { min-width:44px; min-height:44px; }
  .rp-card-action-btn { width:44px; height:44px; font-size:1rem; }
  .rp-card-checkbox { width:32px; height:32px; }  /* etwas kompakter da overlay */
}

/* MOBILE TOOLBAR — kompakt aber klar */
@media (max-width:768px) {
  .rp-toolbar {
    padding: 10px 12px;
    gap: 8px;
    background: var(--rp-surface);
    box-shadow: 0 1px 0 rgba(0,0,0,.06);
    position: sticky; top: 0; z-index: 50;
  }
  .rp-toolbar-search input {
    padding: 10px 12px 10px 34px;
    font-size: 16px;  /* iOS: verhindert Zoom-on-Focus wenn ≥16px */
    min-height: 44px;
    border-radius: 12px;
  }
  .rp-toolbar-search-icon { font-size:.9rem; left:12px; }
  .rp-content-extra-toolbar {
    padding: 8px 10px !important;
    gap: 6px;
    overflow-x: auto;  /* horizontal-scroll falls zu viele Buttons */
    -webkit-overflow-scrolling: touch;
    scrollbar-width: none;
  }
  .rp-content-extra-toolbar::-webkit-scrollbar { display: none; }
  .rp-view-toggle { display: flex; flex-shrink: 0; }
  .rp-view-btn { padding:8px 12px; font-size:.92rem; }
}

/* GRID-CARDS mobile: feste 2-Spalten + Card-Actions immer sichtbar */
@media (max-width:768px) {
  .rp-grid {
    grid-template-columns: repeat(2, 1fr) !important;
    gap: 10px !important;
    padding: 10px !important;
  }
  .rp-grid-card {
    border-radius: 14px;
  }
  /* Card-Actions auf Touch-Geräten IMMER sichtbar (statt nur on-hover) */
  .rp-card-actions {
    opacity: 1 !important;
    background: linear-gradient(180deg, rgba(0,0,0,0) 0%, rgba(0,0,0,.55) 100%);
    padding: 6px 8px;
    border-radius: 0 0 14px 14px;
  }
  .rp-card-action-btn {
    background: rgba(255,255,255,.92);
    color: #1a2926;
    box-shadow: 0 2px 6px rgba(0,0,0,.18);
  }
  .rp-card-action-btn:active {
    transform: scale(.92);
    background: var(--rp-primary, #488078);
    color: #fff;
  }
  /* Checkbox immer sichtbar wenn etwas ausgewählt ist */
  .rp-grid-card.selected .rp-card-checkbox,
  .rp-bulk-active .rp-card-checkbox { opacity: 1; }
  /* Card-Body kompakter auf Phone */
  .rp-card-body { padding: 8px 10px; }
  .rp-card-name { font-size:.84rem; line-height:1.2; }
  .rp-card-meta { font-size:.7rem; margin-top:3px; }
}

/* PHONE (sehr klein) — 1 Spalte für volle Übersicht */
@media (max-width:380px) {
  .rp-grid {
    grid-template-columns: 1fr !important;
  }
  .rp-grid-card { border-radius: 12px; }
}

/* TABLET — 3 Spalten optimal */
@media (min-width:768px) and (max-width:1024px) {
  .rp-grid {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 14px !important;
    padding: 14px !important;
  }
}

/* FAB — prominenter auf Mobile (Groesse + Schatten — bottom NUR an EINER Stelle Z.1617) */
@media (max-width:768px) {
  .rp-fab {
    width: 60px;
    height: 60px;
    /* WICHTIG: bottom NICHT hier setzen — sonst ueberschreibt es den Mobile-Nav-Lift!
       Der echte Wert kommt aus der ersten .rp-fab-Definition oben (88px + safe-area). */
    right: 18px;
    box-shadow: 0 6px 18px rgba(27,117,153,.4);
    z-index: 950;
  }
  .rp-fab i { font-size: 1.5rem; }
  .rp-fab:active { transform: scale(.92); }
}

/* BULK-BAR — sticky bottom mit Safe-Area */
@media (max-width:768px) {
  .rp-bulk-bar {
    position: fixed;
    bottom: 0; left: 0; right: 0;
    border-radius: 16px 16px 0 0;
    padding-bottom: calc(8px + env(safe-area-inset-bottom, 0px)) !important;
    box-shadow: 0 -4px 20px rgba(0,0,0,.18);
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    z-index: 90;
  }
  .rp-bulk-bar::-webkit-scrollbar { display: none; }
  .rp-bulk-btn { flex-shrink: 0; }
}

/* CARDS Tap-Animation — feel-good */
@media (pointer:coarse) {
  .rp-grid-card {
    transition: transform .12s ease, box-shadow .12s ease;
  }
  .rp-grid-card:active {
    transform: scale(.97);
    box-shadow: 0 2px 8px rgba(0,0,0,.12);
  }
}

/* SAFE-AREA-Aware Layout (iPhone-Notch + Home-Indicator) */
@supports (padding: env(safe-area-inset-top)) {
  .rp-toolbar {
    padding-top: calc(10px + env(safe-area-inset-top, 0px));
  }
  .rp-content-scroll {
    scroll-padding-bottom: env(safe-area-inset-bottom, 0px);
  }
}

/* PULL-TO-REFRESH-Indikator (von scPullToRefresh injiziert) */
.sc-ptr-indicator {
  background: var(--rp-primary, #488078) !important;
  color: #fff !important;
}

/* Empty-State auf Mobile besser zentriert */
@media (max-width:768px) {
  .rp-empty {
    padding: 40px 20px !important;
  }
  .rp-empty-icon i { font-size: 2.5rem; }
  .rp-empty-title { font-size: 1rem; margin-top: 12px; }
  .rp-empty-sub { font-size: .82rem; margin-top: 6px; }
}

/* GALLERY-Mode: 3-Spalten Mobile, full-bleed */
@media (max-width:768px) {
  .rp-gallery {
    grid-template-columns: repeat(3, 1fr) !important;
    gap: 4px !important;
    padding: 4px !important;
  }
  .rp-gallery-item {
    aspect-ratio: 1/1;
    border-radius: 6px;
  }
}

/* LIST-Mode auf Mobile: Card-artig statt Tabelle */
@media (max-width:768px) {
  .rp-list { display: block !important; }
  .rp-list thead { display: none !important; }
  .rp-list-row {
    display: flex !important;
    flex-direction: column;
    background: var(--rp-surface);
    border: 1px solid var(--rp-border);
    border-radius: 12px;
    padding: 12px 14px;
    margin-bottom: 8px;
  }
  .rp-list-row td {
    display: block !important;
    padding: 4px 0 !important;
    border: none !important;
  }
}

/* HORIZONTAL-Scroll-Indikator wenn Toolbar überläuft */
.rp-content-extra-toolbar {
  scroll-snap-type: x proximity;
}
.rp-content-extra-toolbar > * {
  scroll-snap-align: start;
}

/* Sprint 2026-05-06c — Lieferschein-Card-Markierung im Folder */
.rp-grid-card.is-delivery {
  border-color: rgba(27,117,153,.25);
}
.rp-grid-card.is-delivery .rp-card-cover {
  background: linear-gradient(135deg, rgba(27,117,153,.05), rgba(27,117,153,.02));
}
