/* ═══════════════════════════════════════════════════════════
   CitizenX FILES — Styles
   Portiert vom CitizenX-Admin-Panel (admin.css): gleiches
   Farbsystem (Monochrom-Rot auf Fast-Schwarz), gleiche
   cx-*-Komponenten. Ergänzt Datei-Browser-Komponenten (fb-*)
   und die Rechte-Matrix (cx-matrix).
   Fonts: Syne (Headlines), Outfit (Body), Bebas Neue (Logo),
   JetBrains Mono (Pfade/Größen). Icons: Unicode, kein Icon-Font.
   ═══════════════════════════════════════════════════════════ */

/* ─── Reset / Vars ──────────────────────────────────────── */
*, *::before, *::after { margin: 0; padding: 0; box-sizing: border-box; }

:root {
  --cx-red:        #A80201;
  --cx-red-2:      #c40302;
  --cx-deep:       #5E0200;
  --cx-dark:       #4E0100;
  --cx-darker:     #420100;
  --cx-mid:        #590200;
  --cx-white:      #FFFFFF;
  --cx-black:      #0F0000;
  --cx-red-glow:   rgba(168, 2, 1, 0.4);

  --bg-0: #0F0000;
  --bg-1: #160101;
  --bg-2: #1d0303;
  --bg-3: #260606;

  --line:    rgba(168,2,1,0.18);
  --line-2:  rgba(168,2,1,0.08);
  --text-1:  rgba(255,255,255,0.92);
  --text-2:  rgba(255,255,255,0.6);
  --text-3:  rgba(255,255,255,0.35);

  --ok:    #2bb673;
  --warn:  #f0a020;
  --err:   #d23030;
  --info:  #4f8de8;

  --r-sm: 4px;
  --r-md: 8px;
  --r-lg: 14px;

  --side-w: 260px;
}

html { scroll-behavior: smooth; scrollbar-width: thin; scrollbar-color: var(--cx-red) var(--cx-black); }

body {
  font-family: 'Outfit', sans-serif;
  background: var(--bg-0);
  color: var(--text-1);
  min-height: 100vh;
  overflow-x: hidden;
}

a { color: inherit; text-decoration: none; }
button { font: inherit; cursor: pointer; }
input, select, textarea { font: inherit; color: inherit; }
input[type="checkbox"], input[type="radio"] { accent-color: var(--cx-red); }

::selection { background: rgba(168,2,1,0.45); color: var(--cx-white); }

/* WebKit-Scrollbar (Firefox nutzt scrollbar-color oben) */
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-track { background: var(--cx-black); }
::-webkit-scrollbar-thumb { background: var(--cx-deep); border-radius: 6px; border: 2px solid var(--cx-black); }
::-webkit-scrollbar-thumb:hover { background: var(--cx-red); }

/* ─── Background-Effekte (wie Hauptseite/Admin) ────────── */
.cx-noise {
  position: fixed; inset: 0; z-index: 9998; pointer-events: none; opacity: 0.025;
  background-image: url("data:image/svg+xml,%3Csvg viewBox='0 0 256 256' xmlns='http://www.w3.org/2000/svg'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='0.9' numOctaves='4' stitchTiles='stitch'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
  background-size: 256px 256px;
}
.cx-glows { position: fixed; inset: 0; pointer-events: none; z-index: 0; overflow: hidden; }
.cx-glow  { position: absolute; border-radius: 50%; opacity: 0.07; filter: blur(110px); will-change: transform, opacity; }
.cx-glow.g1 { width: 600px; height: 250px; background: var(--cx-red); top: 8%; left: -10%; }
.cx-glow.g2 { width: 500px; height: 220px; background: var(--cx-deep); top: 50%; right: -12%; }
.cx-glow.g3 { width: 700px; height: 180px; background: var(--cx-red); top: 80%; left: 15%; opacity: 0.05; }

/* ─── Sidebar ──────────────────────────────────────────── */
.cx-sidebar {
  position: fixed; left: 0; top: 0; bottom: 0; width: var(--side-w);
  background: linear-gradient(180deg, rgba(15,0,0,0.95), rgba(15,0,0,0.85));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-right: 1px solid var(--line);
  display: flex; flex-direction: column;
  z-index: 100;
}

.cx-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.6rem; letter-spacing: 0.12em;
  padding: 1.4rem 1.5rem 1.2rem;
  border-bottom: 1px solid var(--line-2);
  display: flex; align-items: baseline; gap: 0.35rem;
}
.cx-logo span { color: var(--cx-red); }
.cx-logo small {
  margin-left: auto; font-size: 0.55rem; letter-spacing: 0.3em;
  font-family: 'Syne', sans-serif; color: var(--text-3); padding-top: 6px;
}

.cx-nav { flex: 1; padding: 1rem 0.7rem; overflow-y: auto; }
.cx-nav-section {
  font-family: 'Syne', sans-serif; font-size: 0.62rem; font-weight: 700;
  letter-spacing: 0.22em; text-transform: uppercase; color: var(--text-3);
  padding: 1rem 0.8rem 0.4rem;
}
.cx-nav-link {
  display: flex; align-items: center; gap: 0.7rem;
  padding: 0.6rem 0.8rem; margin-bottom: 2px;
  font-size: 0.88rem; color: var(--text-2);
  border-radius: var(--r-sm);
  border-left: 2px solid transparent;
  transition: all 0.2s ease;
}
.cx-nav-link .ico {
  width: 20px; text-align: center; color: var(--text-3); font-size: 1rem;
  transition: color 0.2s ease;
}
.cx-nav-link:hover { background: rgba(168,2,1,0.08); color: var(--text-1); }
.cx-nav-link:hover .ico { color: var(--cx-red); }
.cx-nav-link.active {
  background: rgba(168,2,1,0.14); color: var(--cx-white);
  border-left-color: var(--cx-red);
  box-shadow: inset 0 0 24px rgba(168,2,1,0.1);
}
.cx-nav-link.active .ico { color: var(--cx-red); }

.cx-side-foot {
  border-top: 1px solid var(--line-2);
  padding: 0.9rem 1rem;
  display: flex; align-items: center; gap: 0.75rem;
}
.cx-me { display: flex; align-items: center; gap: 0.7rem; flex: 1; min-width: 0; }
.cx-me-avatar {
  width: 38px; height: 38px; border-radius: 50%;
  background: linear-gradient(135deg, var(--cx-deep), var(--cx-darker));
  display: grid; place-items: center; overflow: hidden;
  font-family: 'Syne', sans-serif; font-weight: 700; color: var(--cx-white);
  border: 1px solid var(--line);
}
.cx-me-avatar img { width: 100%; height: 100%; object-fit: cover; display: block; }
.cx-me-info { min-width: 0; }
.cx-me-name { font-size: 0.85rem; font-weight: 600; color: var(--text-1); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cx-me-role { font-size: 0.7rem; color: var(--cx-red); letter-spacing: 0.05em; text-transform: uppercase; font-weight: 600; }
.cx-logout button {
  background: transparent; border: 1px solid var(--line); color: var(--text-2);
  width: 36px; height: 36px; border-radius: var(--r-sm);
  font-size: 1.1rem; transition: all 0.2s ease;
}
.cx-logout button:hover { color: var(--cx-red); border-color: var(--cx-red); }

/* ─── Main ─────────────────────────────────────────────── */
.cx-main {
  position: relative; z-index: 5;
  margin-left: var(--side-w);
  padding: 2.5rem 3rem;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
}
body.no-shell .cx-main { margin-left: 0; padding: 2rem; }

/* Content nimmt allen Platz, Footer klebt am unteren Rand */
.cx-main-content { flex: 1; }

/* No-Shell (Login / Setup): Content vertikal zentrieren */
.cx-main.is-centered .cx-main-content {
  display: flex;
  flex-direction: column;
  align-items: center;
  justify-content: center;
}

/* ─── Page Heads ───────────────────────────────────────── */
.cx-page-head { margin-bottom: 2.2rem; padding-bottom: 1.6rem; border-bottom: 1px solid var(--line-2); }
.cx-eyebrow {
  font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--cx-red); font-weight: 600; margin-bottom: 0.6rem;
}
.cx-page-title {
  font-family: 'Syne', sans-serif; font-weight: 800;
  font-size: clamp(1.8rem, 3vw, 2.5rem); letter-spacing: -0.02em;
}
.cx-page-lead { font-size: 0.95rem; color: var(--text-2); margin-top: 0.5rem; max-width: 720px; }
.cx-page-actions { margin-top: 1rem; display: flex; gap: 0.6rem; flex-wrap: wrap; }

/* ─── Cards / Panels ───────────────────────────────────── */
.cx-card {
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--line-2);
  border-radius: var(--r-lg);
  padding: 1.4rem;
  position: relative;
  transition: border-color 0.3s ease, transform 0.3s ease;
}
.cx-card:hover { border-color: var(--line); }
.cx-card-title {
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.05em; margin-bottom: 1rem; color: var(--text-1);
  display: flex; align-items: center; gap: 0.5rem;
}
.cx-card-title::before {
  content: ''; width: 3px; height: 14px; background: var(--cx-red); border-radius: 2px;
  flex-shrink: 0;
}

/* Auth cards (Login / Setup) */
.cx-auth-card {
  width: 100%; max-width: 460px;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 2.2rem 2rem;
  box-shadow: 0 0 60px rgba(168,2,1,0.1), 0 30px 80px rgba(0,0,0,0.4);
}
.cx-auth-logo {
  font-family: 'Bebas Neue', sans-serif; font-size: 2rem; letter-spacing: 0.12em;
  text-align: center; margin-bottom: 0.3rem;
}
.cx-auth-logo span { color: var(--cx-red); }
.cx-auth-sub {
  text-align: center; font-size: 0.75rem; letter-spacing: 0.25em;
  text-transform: uppercase; color: var(--text-3); margin-bottom: 1.6rem;
}
.cx-auth-foot { margin-top: 1.4rem; text-align: center; font-size: 0.85rem; color: var(--text-2); }
.cx-auth-foot a { color: var(--cx-red); }
.cx-auth-foot a:hover { color: var(--cx-red-2); }

/* ─── Forms ────────────────────────────────────────────── */
.cx-field { margin-bottom: 1rem; }
.cx-label {
  display: block; font-size: 0.75rem; font-weight: 600; letter-spacing: 0.08em;
  text-transform: uppercase; color: var(--text-2); margin-bottom: 0.5rem;
}
.cx-input, .cx-select, .cx-textarea {
  display: block; width: 100%;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
  padding: 0.7rem 0.9rem;
  color: var(--text-1);
  font-size: 0.95rem;
  transition: border-color 0.2s ease, box-shadow 0.2s ease;
}
.cx-input:focus, .cx-select:focus, .cx-textarea:focus {
  outline: none;
  border-color: var(--cx-red);
  box-shadow: 0 0 0 3px rgba(168,2,1,0.15);
}
.cx-select option { background: var(--bg-2); color: var(--text-1); }
.cx-textarea { min-height: 100px; resize: vertical; font-family: inherit; }
.cx-help { font-size: 0.78rem; color: var(--text-3); margin-top: 0.3rem; }
.cx-error { font-size: 0.8rem; color: var(--err); margin-top: 0.3rem; }
input[type="file"].cx-input { max-width: 100%; }

/* Buttons */
.cx-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 0.5rem;
  padding: 0.65rem 1.4rem;
  background: var(--cx-red); color: var(--cx-white);
  border: none; border-radius: var(--r-sm);
  font-weight: 600; letter-spacing: 0.04em; font-size: 0.9rem;
  box-shadow: 0 0 24px rgba(168,2,1,0.3);
  transition: all 0.25s ease;
}
.cx-btn:hover { background: var(--cx-red-2); box-shadow: 0 0 36px rgba(168,2,1,0.5); transform: translateY(-1px); }
.cx-btn[disabled], .cx-btn.is-disabled { opacity: 0.5; cursor: not-allowed; }
.cx-btn.is-block { display: flex; width: 100%; }
.cx-btn-ghost {
  background: transparent; color: var(--text-2);
  border: 1px solid var(--line); box-shadow: none;
}
.cx-btn-ghost:hover { color: var(--cx-white); border-color: var(--cx-red); background: rgba(168,2,1,0.08); }
.cx-btn-danger { background: var(--err); box-shadow: 0 0 24px rgba(210,48,48,0.25); }
.cx-btn-danger:hover { background: #b22323; }
.cx-btn-sm { padding: 0.35rem 0.75rem; font-size: 0.8rem; }

.cx-divider {
  display: flex; align-items: center; gap: 0.8rem;
  font-size: 0.7rem; letter-spacing: 0.25em; text-transform: uppercase;
  color: var(--text-3); margin: 1.4rem 0;
}
.cx-divider::before, .cx-divider::after {
  content: ''; flex: 1; height: 1px; background: var(--line-2);
}

/* ─── Flash messages ───────────────────────────────────── */
.cx-flashes { margin-bottom: 1.4rem; display: flex; flex-direction: column; gap: 0.6rem; }
.cx-flash {
  padding: 0.85rem 1rem; border-radius: var(--r-sm);
  border: 1px solid var(--line-2); background: var(--bg-1);
  font-size: 0.9rem; border-left-width: 3px;
}
.cx-flash-success { border-left-color: var(--ok);   color: #b6f0d2; background: rgba(43,182,115,0.08); }
.cx-flash-error   { border-left-color: var(--err);  color: #f5b8b8; background: rgba(210,48,48,0.08); }
.cx-flash-warn    { border-left-color: var(--warn); color: #ffd9a0; background: rgba(240,160,32,0.08); }
.cx-flash-info    { border-left-color: var(--info); color: #cfe1f7; background: rgba(79,141,232,0.08); }

/* ─── Tables ───────────────────────────────────────────── */
.cx-table-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cx-table {
  width: 100%; border-collapse: collapse;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--line-2); border-radius: var(--r-md);
  overflow: hidden; font-size: 0.9rem;
}
.cx-table th {
  text-align: left; padding: 0.8rem 1rem;
  background: rgba(168,2,1,0.08);
  color: var(--text-2); font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase; font-size: 0.72rem;
  border-bottom: 1px solid var(--line-2);
}
.cx-table td {
  padding: 0.85rem 1rem; border-bottom: 1px solid var(--line-2);
  color: var(--text-1);
}
.cx-table tr:last-child td { border-bottom: none; }
.cx-table tr:hover td { background: rgba(168,2,1,0.04); }

/* ─── Badges & Pills ───────────────────────────────────── */
.cx-badge {
  display: inline-flex; align-items: center; gap: 0.3rem;
  padding: 0.2rem 0.55rem; border-radius: 99px;
  font-size: 0.7rem; font-weight: 600; letter-spacing: 0.06em;
  text-transform: uppercase;
  background: rgba(168,2,1,0.12); color: var(--cx-red);
  border: 1px solid var(--line);
}
.cx-badge.b-ok    { background: rgba(43,182,115,0.12);  color: #5ed59a; border-color: rgba(43,182,115,0.25); }
.cx-badge.b-warn  { background: rgba(240,160,32,0.12); color: #f4c073; border-color: rgba(240,160,32,0.25); }
.cx-badge.b-err   { background: rgba(210,48,48,0.12);  color: #f08383; border-color: rgba(210,48,48,0.25); }
.cx-badge.b-mute  { background: rgba(255,255,255,0.05); color: var(--text-2); border-color: var(--line-2); }

/* ─── Grid ─────────────────────────────────────────────── */
.cx-grid { display: grid; gap: 1rem; }
.cx-grid.cols-2 { grid-template-columns: repeat(2, 1fr); }
.cx-grid.cols-3 { grid-template-columns: repeat(3, 1fr); }
.cx-grid.cols-4 { grid-template-columns: repeat(4, 1fr); }

/* ─── Stats ────────────────────────────────────────────── */
.cx-stat { padding: 1.2rem 1.3rem; }
.cx-stat .label { font-size: 0.7rem; letter-spacing: 0.2em; text-transform: uppercase; color: var(--text-3); }
.cx-stat .value { font-family: 'Syne', sans-serif; font-size: 2rem; font-weight: 800; margin-top: 0.4rem; }
.cx-stat .delta { font-size: 0.78rem; color: var(--text-2); margin-top: 0.2rem; }

/* ─── Avatar ───────────────────────────────────────────── */
.cx-avatar {
  width: 32px; height: 32px; border-radius: 50%; overflow: hidden;
  background: linear-gradient(135deg, var(--cx-deep), var(--cx-darker));
  display: inline-grid; place-items: center; font-size: 0.8rem; font-weight: 700;
  color: var(--cx-white); border: 1px solid var(--line);
}
.cx-avatar > img { width: 100%; height: 100%; object-fit: cover; display: block; }

/* ─── Modal (generisch, [hidden]-gesteuert) ────────────── */
.cx-modal {
  position: fixed; inset: 0; z-index: 300;
  display: flex; align-items: center; justify-content: center;
  padding: 1.5rem;
}
.cx-modal[hidden] { display: none; }
.cx-modal-backdrop {
  position: absolute; inset: 0;
  background: rgba(0,0,0,0.65);
  backdrop-filter: blur(3px);
  -webkit-backdrop-filter: blur(3px);
  animation: cxFadeIn 0.18s ease-out;
}
.cx-modal-card {
  position: relative; z-index: 1;
  width: 100%; max-width: 520px;
  max-height: min(90vh, 720px);
  display: flex; flex-direction: column;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  box-shadow: 0 0 60px rgba(168,2,1,0.12), 0 30px 80px rgba(0,0,0,0.5);
  overflow: hidden;
  animation: cxModalPop 0.22s cubic-bezier(0.16, 1, 0.3, 1);
}
.cx-modal-card.is-wide { max-width: 760px; }
@keyframes cxModalPop {
  from { opacity: 0; transform: translateY(10px) scale(0.98); }
  to   { opacity: 1; transform: translateY(0) scale(1); }
}
.cx-modal-head {
  display: flex; align-items: center; gap: 0.5rem;
  padding: 1.1rem 1.4rem;
  border-bottom: 1px solid var(--line-2);
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 0.95rem;
  letter-spacing: 0.05em; color: var(--text-1);
  flex-shrink: 0;
}
.cx-modal-head::before {
  content: ''; width: 3px; height: 14px; background: var(--cx-red); border-radius: 2px;
  flex-shrink: 0;
}
.cx-modal-close {
  margin-left: auto;
  width: 32px; height: 32px;
  display: inline-grid; place-items: center;
  background: transparent; border: 1px solid var(--line);
  border-radius: var(--r-sm); color: var(--text-2);
  font-size: 1rem; line-height: 1;
  transition: all 0.2s ease;
}
.cx-modal-close:hover { color: var(--cx-red); border-color: var(--cx-red); background: rgba(168,2,1,0.08); }
.cx-modal-body { padding: 1.3rem 1.4rem; overflow-y: auto; }
.cx-modal-foot {
  display: flex; justify-content: flex-end; gap: 0.6rem; flex-wrap: wrap;
  padding: 1rem 1.4rem;
  border-top: 1px solid var(--line-2);
  background: rgba(0,0,0,0.15);
  flex-shrink: 0;
}

/* ═══════════════════════════════════════════════════════════
   DATEI-BROWSER (fb-*)
   ═══════════════════════════════════════════════════════════ */

/* ─── Toolbar: Breadcrumbs links, Aktionen rechts ──────── */
.fb-toolbar {
  display: flex; align-items: center; gap: 0.8rem; flex-wrap: wrap;
  padding: 0.7rem 1rem;
  margin-bottom: 1rem;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
}
.fb-toolbar-actions {
  margin-left: auto;
  display: flex; align-items: center; gap: 0.5rem; flex-wrap: wrap;
}

/* ─── Breadcrumbs ──────────────────────────────────────── */
.fb-crumbs {
  display: flex; align-items: center; gap: 0.15rem; flex-wrap: wrap;
  min-width: 0; flex: 1;
  font-size: 0.9rem;
}
.fb-crumbs a {
  color: var(--text-2);
  padding: 0.25rem 0.45rem;
  border-radius: var(--r-sm);
  max-width: 220px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  transition: color 0.15s ease, background 0.15s ease;
}
.fb-crumbs a:hover { color: var(--cx-white); background: rgba(168,2,1,0.1); }
.fb-crumbs .sep { color: var(--text-3); font-size: 0.8rem; user-select: none; }
.fb-crumbs .current {
  color: var(--text-1); font-weight: 600;
  padding: 0.25rem 0.45rem;
  max-width: 260px;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fb-crumbs .root-ico { color: var(--cx-red); font-size: 0.95rem; }

/* ─── Datei-Liste (Zeilen) ─────────────────────────────── */
.fb-list {
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  overflow: hidden;
}
.fb-head, .fb-row {
  display: grid;
  grid-template-columns: 34px minmax(0, 1fr) 110px 170px auto;
  gap: 0.8rem; align-items: center;
  padding: 0.6rem 1rem;
}
.fb-head {
  background: rgba(168,2,1,0.08);
  border-bottom: 1px solid var(--line-2);
  color: var(--text-2); font-weight: 600;
  letter-spacing: 0.06em; text-transform: uppercase; font-size: 0.72rem;
}
.fb-row {
  border-bottom: 1px solid var(--line-2);
  transition: background 0.15s ease;
}
.fb-row:last-child { border-bottom: none; }
.fb-row:hover { background: rgba(168,2,1,0.04); }
.fb-row:focus-within { background: rgba(168,2,1,0.06); }

.fb-ico {
  font-size: 1.15rem; text-align: center; line-height: 1;
  filter: grayscale(0.25);
}
.fb-row.is-dir .fb-ico { filter: none; }
.fb-name {
  min-width: 0;
  font-size: 0.92rem; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
}
.fb-name a {
  display: inline-block; max-width: 100%;
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  vertical-align: bottom;
  transition: color 0.15s ease;
}
.fb-name a:hover { color: var(--cx-red-2); }
.fb-row.is-dir .fb-name { font-weight: 600; }
.fb-size, .fb-date {
  font-size: 0.8rem; color: var(--text-2);
  font-variant-numeric: tabular-nums;
  white-space: nowrap;
}
.fb-size { text-align: right; font-family: 'JetBrains Mono', monospace; font-size: 0.76rem; }
.fb-date { color: var(--text-3); }
.fb-actions {
  display: flex; align-items: center; justify-content: flex-end; gap: 0.3rem;
}
/* Icon-Buttons in der Zeile (⬇ ✎ 🗑 …) */
.fb-act {
  width: 30px; height: 30px;
  display: inline-grid; place-items: center;
  background: transparent;
  border: 1px solid transparent;
  border-radius: var(--r-sm);
  color: var(--text-3);
  font-size: 0.9rem; line-height: 1;
  transition: all 0.15s ease;
}
.fb-row:hover .fb-act { color: var(--text-2); }
.fb-act:hover { color: var(--cx-white); border-color: var(--line); background: rgba(168,2,1,0.12); }
.fb-act.is-danger:hover { color: #f08383; border-color: rgba(210,48,48,0.4); background: rgba(210,48,48,0.1); }

/* ─── Leerer Ordner ────────────────────────────────────── */
.fb-empty {
  padding: 3rem 1.5rem;
  text-align: center;
  color: var(--text-3);
  font-size: 0.9rem;
}
.fb-empty .big {
  display: block;
  font-size: 2.2rem; margin-bottom: 0.6rem;
  opacity: 0.5; filter: grayscale(0.4);
}

/* ─── Dropzone (Upload) ────────────────────────────────── */
.fb-drop {
  margin-top: 1rem;
  padding: 1.6rem 1.2rem;
  border: 2px dashed rgba(168,2,1,0.35);
  border-radius: var(--r-md);
  background: rgba(168,2,1,0.03);
  text-align: center;
  color: var(--text-2); font-size: 0.9rem;
  cursor: pointer;
  transition: border-color 0.2s ease, background 0.2s ease, box-shadow 0.2s ease;
}
.fb-drop .hint { display: block; margin-top: 0.3rem; font-size: 0.76rem; color: var(--text-3); }
.fb-drop .drop-ico { display: block; font-size: 1.6rem; margin-bottom: 0.5rem; opacity: 0.7; }
.fb-drop:hover,
.fb-drop.is-dragover {
  border-color: var(--cx-red);
  background: rgba(168,2,1,0.08);
  box-shadow: 0 0 36px rgba(168,2,1,0.2), inset 0 0 40px rgba(168,2,1,0.06);
  color: var(--text-1);
}
.fb-drop.is-dragover { animation: cxDropPulse 1.2s ease-in-out infinite; }
@keyframes cxDropPulse {
  0%, 100% { box-shadow: 0 0 24px rgba(168,2,1,0.2), inset 0 0 40px rgba(168,2,1,0.06); }
  50%      { box-shadow: 0 0 48px rgba(168,2,1,0.4), inset 0 0 60px rgba(168,2,1,0.1); }
}

/* Briefkasten-Variante: Share ohne Listing-Recht (Blind-Upload).
   Groß, zentriert, ohne Dateiliste drumherum. */
.fb-drop.is-dropbox {
  margin-top: 0;
  padding: 4.5rem 2rem;
  border-radius: var(--r-lg);
  font-size: 1rem;
}
.fb-drop.is-dropbox .drop-ico { font-size: 3rem; margin-bottom: 0.9rem; opacity: 0.85; }
.fb-drop.is-dropbox .drop-title {
  display: block;
  font-family: 'Syne', sans-serif; font-weight: 700; font-size: 1.15rem;
  color: var(--text-1); margin-bottom: 0.3rem;
}
.fb-drop.is-dropbox .hint { font-size: 0.82rem; margin-top: 0.5rem; }

/* ─── Upload-Queue ─────────────────────────────────────── */
.fb-uploads {
  margin-top: 1rem;
  display: flex; flex-direction: column; gap: 0.5rem;
}
.fb-uploads[hidden] { display: none; }
.fb-upload {
  display: grid;
  grid-template-columns: minmax(0, 1fr) auto;
  gap: 0.2rem 0.8rem; align-items: center;
  padding: 0.7rem 0.9rem;
  background: var(--bg-2);
  border: 1px solid var(--line-2);
  border-radius: var(--r-sm);
}
.fb-upload-name {
  font-size: 0.85rem; color: var(--text-1);
  white-space: nowrap; overflow: hidden; text-overflow: ellipsis;
  min-width: 0;
}
.fb-upload-pct {
  font-family: 'JetBrains Mono', monospace;
  font-size: 0.76rem; color: var(--text-2);
  font-variant-numeric: tabular-nums;
  text-align: right; white-space: nowrap;
}
.fb-upload-status { grid-column: 1 / -1; font-size: 0.74rem; color: var(--text-3); }
.fb-upload.is-done   { border-color: rgba(43,182,115,0.3); }
.fb-upload.is-done .fb-upload-status   { color: #5ed59a; }
.fb-upload.is-error  { border-color: rgba(210,48,48,0.4); }
.fb-upload.is-error .fb-upload-status  { color: #f08383; }
.fb-upload.is-error .fb-prog > .fill,
.fb-upload.is-error .fb-prog-fill { background: var(--err); box-shadow: none; }

/* Progressbar: roter Füllbalken mit Glow */
.fb-prog {
  grid-column: 1 / -1;
  height: 7px;
  background: rgba(255,255,255,0.06);
  border-radius: 99px;
  overflow: hidden;
}
.fb-prog > .fill,
.fb-prog-fill {
  display: block;
  height: 100%; width: 0%;
  background: linear-gradient(90deg, var(--cx-deep), var(--cx-red), var(--cx-red-2));
  border-radius: inherit;
  box-shadow: 0 0 12px var(--cx-red-glow);
  transition: width 0.25s ease;
}
.fb-upload.is-done .fb-prog > .fill,
.fb-upload.is-done .fb-prog-fill { background: var(--ok); box-shadow: 0 0 10px rgba(43,182,115,0.35); }

/* ─── Rechte-Matrix (Admin: Shares ↔ Benutzer) ─────────── */
.cx-matrix-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.cx-matrix {
  width: 100%; border-collapse: collapse;
  font-size: 0.82rem;
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
  border: 1px solid var(--line-2);
  border-radius: var(--r-md);
  overflow: hidden;
}
.cx-matrix th, .cx-matrix td {
  padding: 0.45rem 0.5rem;
  text-align: center;
  border-bottom: 1px solid var(--line-2);
  white-space: nowrap;
}
.cx-matrix thead th {
  background: rgba(168,2,1,0.08);
  color: var(--text-2); font-weight: 600;
  letter-spacing: 0.05em; text-transform: uppercase; font-size: 0.66rem;
}
/* Erste Spalte (Benutzer-/Share-Name) links ausgerichtet */
.cx-matrix th:first-child,
.cx-matrix td:first-child {
  text-align: left;
  padding-left: 0.9rem;
  color: var(--text-1);
  max-width: 220px; overflow: hidden; text-overflow: ellipsis;
}
.cx-matrix tbody tr:last-child td { border-bottom: none; }
.cx-matrix tbody tr:hover td { background: rgba(168,2,1,0.04); }
.cx-matrix input[type="checkbox"] {
  width: 17px; height: 17px;
  accent-color: var(--cx-red);
  cursor: pointer;
  vertical-align: middle;
}
.cx-matrix input[type="number"], .cx-matrix .cx-input {
  display: inline-block; width: 84px;
  padding: 0.3rem 0.45rem; font-size: 0.8rem;
  text-align: right;
}
/* Sticky-Header (optional per Klasse aktivieren; braucht max-height am Wrap) */
.cx-matrix-wrap.is-sticky { max-height: 65vh; overflow-y: auto; }
.cx-matrix-wrap.is-sticky .cx-matrix thead th {
  position: sticky; top: 0; z-index: 2;
  background: var(--bg-1);
  box-shadow: 0 1px 0 var(--line-2);
}

/* ─── Legal Footer ─────────────────────────────────────── */
.cx-legal-foot {
  margin-top: 2rem; padding-top: 1.2rem;
  border-top: 1px solid var(--line-2);
  font-size: 0.78rem; color: var(--text-3);
  display: flex; gap: 0.5rem; flex-wrap: wrap; justify-content: center;
}
.cx-legal-foot a { color: var(--text-2); transition: color 0.2s ease; }
.cx-legal-foot a:hover { color: var(--cx-red); }
.cx-legal-foot .sep { opacity: 0.5; }

/* ─── Misc utilities ───────────────────────────────────── */
.cx-mt-1 { margin-top: 0.5rem; }
.cx-mt-2 { margin-top: 1rem; }
.cx-mt-3 { margin-top: 1.5rem; }
.cx-mt-4 { margin-top: 2rem; }
.cx-flex { display: flex; gap: 0.5rem; align-items: center; }
.cx-flex.between { justify-content: space-between; }
.cx-text-mute { color: var(--text-2); }
.cx-mono { font-family: 'JetBrains Mono', monospace; }

/* ─── Mobile-Topbar + Hamburger (nur <900px sichtbar) ──── */
.cx-mobile-topbar {
  display: none;
  position: sticky; top: 0;
  z-index: 200;
  align-items: center;
  gap: 0.75rem;
  padding: 0.7rem 0.9rem;
  padding-top: calc(0.7rem + env(safe-area-inset-top, 0px));
  padding-left: calc(0.9rem + env(safe-area-inset-left, 0px));
  padding-right: calc(0.9rem + env(safe-area-inset-right, 0px));
  background: linear-gradient(180deg, rgba(15,0,0,0.96), rgba(15,0,0,0.92));
  backdrop-filter: blur(12px);
  -webkit-backdrop-filter: blur(12px);
  border-bottom: 1px solid var(--line);
}
.cx-mobile-burger {
  width: 42px; height: 42px;
  display: inline-flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 5px;
  background: rgba(168,2,1,0.08);
  border: 1px solid var(--line);
  border-radius: var(--r-sm);
  color: var(--text-1);
  cursor: pointer;
  transition: all 0.2s ease;
  flex-shrink: 0;
}
.cx-mobile-burger span {
  display: block; width: 20px; height: 2px;
  background: currentColor; border-radius: 2px;
  transition: transform 0.25s ease, opacity 0.25s ease;
}
.cx-mobile-burger:hover { background: rgba(168,2,1,0.18); border-color: var(--cx-red); }
body.is-side-open .cx-mobile-burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
body.is-side-open .cx-mobile-burger span:nth-child(2) { opacity: 0; }
body.is-side-open .cx-mobile-burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }
.cx-mobile-logo {
  font-family: 'Bebas Neue', sans-serif;
  font-size: 1.25rem; letter-spacing: 0.12em;
  color: var(--text-1);
  display: inline-flex; align-items: baseline; gap: 0.3rem;
}
.cx-mobile-logo span { color: var(--cx-red); }
.cx-mobile-logo small {
  font-size: 0.5rem; letter-spacing: 0.3em;
  font-family: 'Syne', sans-serif; color: var(--text-3);
}
.cx-mobile-spacer { flex: 1; }

/* Backdrop für Off-Canvas-Sidebar (Mobile).
   WICHTIG: z-index UNTER der Sidebar (z100), sonst dunkelt der
   Backdrop das offene Menü ab (Lesson-learned aus dem Admin). */
.cx-side-backdrop {
  display: none;
  position: fixed; inset: 0;
  z-index: 90;
  background: rgba(0,0,0,0.6);
  backdrop-filter: blur(2px);
  -webkit-backdrop-filter: blur(2px);
  animation: cxFadeIn 0.2s ease-out;
}
@keyframes cxFadeIn { from { opacity: 0; } to { opacity: 1; } }

/* Body-Scroll-Lock wenn Sidebar offen */
body.is-side-open { overflow: hidden; }

/* ─── Responsive Breakpoints ────────────────────────────── */

/* Tablet / kleinere Desktops */
@media (max-width: 1100px) {
  .cx-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }
  .cx-main { padding: 2rem 2rem; }
}

/* Tablet hochkant / großes Phone: Sidebar wird Off-Canvas */
@media (max-width: 900px) {
  :root { --side-w: 280px; }

  /* Topbar + Backdrop einblenden */
  .cx-mobile-topbar { display: flex; }
  body.is-side-open .cx-side-backdrop { display: block; }

  /* Sidebar slidet von links ein — auf Mobile blickdicht + ohne Blur */
  .cx-sidebar {
    transform: translateX(-100%);
    transition: transform 0.28s cubic-bezier(0.16, 1, 0.3, 1);
    width: var(--side-w);
    max-width: 86vw;
    box-shadow: 8px 0 32px rgba(0,0,0,0.6);
    background: linear-gradient(180deg, #1a0202, #0d0000);
    backdrop-filter: none;
    -webkit-backdrop-filter: none;
    padding-top: env(safe-area-inset-top, 0px);
  }
  body.is-side-open .cx-sidebar { transform: translateX(0); }
  .cx-side-foot { padding-bottom: calc(0.9rem + env(safe-area-inset-bottom, 0px)); }

  /* Touch-Targets */
  .cx-mobile-burger { width: 44px; height: 44px; }
  .cx-logout button { width: 44px; height: 44px; }
  .cx-nav-link { padding: 0.8rem 0.9rem; }

  /* Main rückt nach links und reduziert Padding */
  .cx-main { margin-left: 0; padding: 1.4rem 1.1rem 2rem; }

  /* Page-Head kompakter */
  .cx-page-head { margin-bottom: 1.6rem; padding-bottom: 1.2rem; }
  .cx-page-title { font-size: clamp(1.5rem, 5vw, 2.1rem); }
  .cx-page-actions { gap: 0.5rem; }

  /* Grids zusammenklappen */
  .cx-grid.cols-3, .cx-grid.cols-2 { grid-template-columns: 1fr; }
  .cx-grid { gap: 0.8rem; }
}

/* Phone-quer / kleines Tablet */
@media (max-width: 768px) {
  .cx-main { padding: 1.2rem 0.95rem 1.8rem; }
  .cx-card { padding: 1.1rem; border-radius: var(--r-md); }
  .cx-card-title { font-size: 0.9rem; margin-bottom: 0.8rem; }

  /* Stats-Cards */
  .cx-grid.cols-4 { grid-template-columns: repeat(2, 1fr); }

  /* iOS-Zoom-Stopp: alle Formularfelder >=16px
     (0.95rem ≈ 15px löst iOS-Safari-Auto-Zoom beim Fokus aus) */
  .cx-input, .cx-select, .cx-textarea { font-size: 16px; }

  /* Tabellen scrollen horizontal */
  .cx-table-wrap, .cx-matrix-wrap {
    overflow-x: auto;
    -webkit-overflow-scrolling: touch;
    margin: 0 -0.5rem;
    padding: 0 0.5rem;
  }
  .cx-card:has(table) { overflow-x: auto; -webkit-overflow-scrolling: touch; }
  .cx-table { min-width: 540px; }
  .cx-matrix { min-width: 560px; }

  /* Buttons besser klickbar */
  .cx-btn { min-height: 40px; padding: 0.55rem 0.95rem; }
  .cx-btn-ghost { min-height: 38px; }
  .cx-btn-sm { min-height: 38px; min-width: 40px; padding: 0.45rem 0.7rem; }

  /* Datei-Browser: Datum ausblenden, Icon-Buttons als Tap-Targets */
  .fb-head, .fb-row { grid-template-columns: 30px minmax(0, 1fr) 90px auto; gap: 0.6rem; }
  .fb-date { display: none; }
  .fb-act { width: 38px; height: 38px; font-size: 1rem; }
  .fb-row .fb-act { color: var(--text-2); } /* kein Hover auf Touch → immer sichtbar */

  /* Dropzone kompakter */
  .fb-drop { padding: 1.3rem 1rem; }
  .fb-drop.is-dropbox { padding: 3rem 1.4rem; }

  /* Matrix-Checkboxen als Tap-Targets */
  .cx-matrix input[type="checkbox"] { width: 20px; height: 20px; }
  .cx-matrix th, .cx-matrix td { padding: 0.5rem 0.45rem; }

  /* Modal näher an den Rand */
  .cx-modal { padding: 1rem; }
  .cx-modal-body { padding: 1.1rem 1.2rem; }
  .cx-modal-head, .cx-modal-foot { padding-left: 1.2rem; padding-right: 1.2rem; }
}

/* Echtes Phone-Format */
@media (max-width: 600px) {
  .cx-main { padding: 1rem 0.8rem 1.6rem; }
  body.no-shell .cx-main { padding: 1.2rem 0.9rem; }
  .cx-flashes { margin-bottom: 0.9rem; }
  .cx-grid.cols-2, .cx-grid.cols-3, .cx-grid.cols-4 { grid-template-columns: 1fr; }
  .cx-grid { gap: 0.7rem; }
  .cx-card { padding: 1rem; }
  .cx-page-title { font-size: clamp(1.4rem, 6vw, 1.9rem); letter-spacing: -0.015em; }
  .cx-page-head { margin-bottom: 1.2rem; padding-bottom: 1rem; }
  .cx-page-actions { flex-direction: column; align-items: stretch; }
  .cx-page-actions > * { width: 100%; }
  .cx-page-actions .cx-btn { justify-content: center; }
  .cx-flex.between { flex-wrap: wrap; }

  /* Auth-Card full-width */
  .cx-auth-card { padding: 1.5rem 1.2rem; max-width: 100%; }

  /* Sidebar etwas schmaler */
  :root { --side-w: 260px; }
  .cx-sidebar { max-width: 88vw; }

  /* Footer kompakter + tappbare Links */
  .cx-legal-foot { font-size: 0.78rem; gap: 0.2rem 0.6rem; flex-wrap: wrap; justify-content: center; text-align: center; }
  .cx-legal-foot a { padding: 0.3rem 0.2rem; display: inline-block; }
  .cx-auth-foot a { display: inline-block; padding: 0.2rem 0; }
  .cx-help { font-size: 0.82rem; color: var(--text-2); }
  .cx-mobile-logo small { display: none; }

  /* Modal: fast Vollbild */
  .cx-modal { padding: 0.7rem; align-items: flex-end; }
  .cx-modal-card { max-width: 100%; max-height: 92vh; border-radius: var(--r-md); }
  .cx-modal-foot { flex-direction: column-reverse; }
  .cx-modal-foot .cx-btn, .cx-modal-foot .cx-btn-ghost { width: 100%; justify-content: center; }

  /* Datei-Browser: Größe ausblenden, Toolbar stapeln */
  .fb-head, .fb-row { grid-template-columns: 28px minmax(0, 1fr) auto; }
  .fb-size { display: none; }
  .fb-toolbar { flex-direction: column; align-items: stretch; gap: 0.5rem; }
  .fb-toolbar-actions { margin-left: 0; }
  .fb-toolbar-actions .cx-btn, .fb-toolbar-actions .cx-btn-ghost { flex: 1; justify-content: center; }
  .fb-crumbs a, .fb-crumbs .current { max-width: 140px; }

  /* Upload-Queue kompakter */
  .fb-upload { padding: 0.6rem 0.7rem; }

  /* Lange Pfade/Slugs (<code>) umbrechen statt sprengen */
  .cx-card code, .cx-mono { word-break: break-all; overflow-wrap: anywhere; }
}

/* Sehr schmale Geräte (iPhone SE etc.) */
@media (max-width: 380px) {
  .cx-main { padding: 0.9rem 0.7rem 1.4rem; }
  body.no-shell .cx-main { padding: 0.9rem 0.7rem; }
  .cx-card { padding: 0.9rem; }
  .cx-mobile-logo { font-size: 1.1rem; }
  .cx-mobile-logo small { display: none; }
  .cx-page-title { font-size: 1.3rem; }
  .fb-act { width: 34px; height: 34px; }
  .fb-drop.is-dropbox { padding: 2.4rem 1rem; }
}

/* Touch-Feedback statt Hover auf Geräten ohne Maus */
@media (hover: none) {
  .fb-row:active { background: rgba(168,2,1,0.1); }
  .fb-act { color: var(--text-2); }
}

/* Reduced Motion: Animationen abschalten */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: 0.01ms !important;
    animation-iteration-count: 1 !important;
    transition-duration: 0.01ms !important;
  }
  html { scroll-behavior: auto; }
}

/* ════════════════════════════════════════════════════════════
   Kompatibilitäts-Layer
   ────────────────────────────────────────────────────────────
   Views + app.js wurden parallel zu cx.css gebaut und nutzen an
   ein paar Stellen leicht andere Klassennamen/Strukturen. Dieser
   Block stylt exakt das, was zur Laufzeit gerendert wird (statt
   die JS-Logik anzufassen). Rein additiv.
   ════════════════════════════════════════════════════════════ */

/* Panel + Listen-Wrapper = Bezugsrahmen fürs Drag-Overlay */
.fb-panel { position: relative; }
.fb-listwrap { position: relative; }

/* Toolbar-Button-Gruppe rechts (View: .fb-tools) */
.fb-tools { display: flex; gap: 0.5rem; flex-wrap: wrap; margin-left: auto; }

/* Breadcrumbs — app.js baut <button> statt <a> */
.fb-crumb {
  background: none; border: none; padding: 0.15rem 0.45rem; border-radius: var(--r-sm);
  color: var(--text-2); font-size: 0.85rem; font-family: inherit; cursor: pointer;
  transition: color 0.15s ease, background 0.15s ease;
}
.fb-crumb:hover { color: var(--cx-white); background: rgba(168,2,1,0.1); }
.fb-crumb.is-current { color: var(--cx-white); font-weight: 600; cursor: default; }
.fb-crumb-sep { color: var(--text-3); font-size: 0.8rem; user-select: none; }

/* Kopfzeile der Liste (app.js: .fb-row.fb-row-head) */
.fb-row.fb-row-head {
  background: rgba(168,2,1,0.06); text-transform: uppercase;
  letter-spacing: 0.06em; font-size: 0.68rem; color: var(--text-2); font-weight: 600;
}
.fb-row.fb-row-head:hover { background: rgba(168,2,1,0.06); }

/* Danger-Aktion (app.js: .fb-act-danger) */
.fb-act-danger:hover { color: #f08383; border-color: rgba(210,48,48,0.4); background: rgba(210,48,48,0.1); }

/* Blind-Briefkasten: Kinder (View: .fb-drop-ico/-text/-sub) + is-over */
.fb-drop.is-dropbox .fb-drop-ico { display: block; font-size: 3rem; margin-bottom: 0.9rem; opacity: 0.85; }
.fb-drop.is-dropbox .fb-drop-text { font-weight: 600; font-size: 1.05rem; color: var(--text-1); }
.fb-drop.is-dropbox .fb-drop-sub { display: block; margin-top: 0.5rem; font-size: 0.82rem; color: var(--text-3); }
.fb-drop.is-over {
  border-color: var(--cx-red); background: rgba(168,2,1,0.06);
  animation: cxDropPulse 1.2s ease-in-out infinite;
}

/* Drag-Overlay überm Listing (View: .fb-dropzone) */
.fb-dropzone {
  position: absolute; inset: 0; z-index: 5; border-radius: var(--r-md);
  display: flex; align-items: center; justify-content: center;
  background: rgba(15,0,0,0.82); backdrop-filter: blur(2px);
  border: 2px dashed var(--cx-red); box-shadow: inset 0 0 40px rgba(168,2,1,0.25);
}
.fb-dropzone[hidden] { display: none; }
.fb-dropzone-inner { text-align: center; color: var(--text-1); pointer-events: none; }
.fb-dropzone-ico { font-size: 2.4rem; margin-bottom: 0.5rem; }
.fb-dropzone-text { font-weight: 600; letter-spacing: 0.02em; }

/* Upload-Item (app.js: .fb-up …) — eigene, vollständige Struktur */
.fb-up {
  padding: 0.7rem 0.85rem; border: 1px solid var(--line-2);
  border-radius: var(--r-md); background: var(--bg-2); margin-bottom: 0.6rem;
}
.fb-up:last-child { margin-bottom: 0; }
.fb-up-head { display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.5rem; }
.fb-up-name {
  flex: 1 1 auto; min-width: 0; font-weight: 600; font-size: 0.86rem; color: var(--text-1);
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
.fb-up-size { flex: none; font-family: 'JetBrains Mono', monospace; font-size: 0.72rem; color: var(--text-3); }
.fb-up-state { flex: none; font-size: 0.74rem; color: var(--text-2); }
.fb-up-abort {
  flex: none; width: 26px; height: 26px; border-radius: var(--r-sm); line-height: 1;
  background: transparent; border: 1px solid var(--line-2); color: var(--text-3); cursor: pointer;
}
.fb-up-abort:hover { color: #f08383; border-color: rgba(210,48,48,0.4); background: rgba(210,48,48,0.1); }
.fb-up-abort[hidden] { display: none; }
.fb-up-pct {
  margin-top: 0.35rem; text-align: right; font-size: 0.72rem;
  color: var(--text-3); font-family: 'JetBrains Mono', monospace;
}
/* Fortschritts-Füller (app.js: .fb-prog-bar) — spiegelt .fb-prog-fill */
.fb-prog-bar {
  display: block; height: 100%; width: 0%; border-radius: inherit;
  background: linear-gradient(90deg, var(--cx-deep), var(--cx-red), var(--cx-red-2));
  box-shadow: 0 0 12px var(--cx-red-glow); transition: width 0.25s ease;
}
.fb-up.is-done  .fb-prog-bar { background: var(--ok);  box-shadow: 0 0 10px rgba(43,182,115,0.35); }
.fb-up.is-error .fb-prog-bar { background: var(--err); box-shadow: none; }
.fb-up.is-done  .fb-up-state { color: #5ed59a; }
.fb-up.is-error .fb-up-state { color: #f08383; }

/* Modal-Varianten der Browse-View (.cx-modal-dialog / .cx-modal-actions) */
.cx-modal-dialog { width: min(520px, 92vw); }
.cx-modal-actions {
  display: flex; justify-content: flex-end; gap: 0.6rem; flex-wrap: wrap;
  margin-top: 1.3rem; padding-top: 1rem; border-top: 1px solid var(--line-2);
}
.cx-danger-zone { border-color: rgba(210,48,48,0.35) !important; }
.fb-delete-question { font-size: 0.95rem; color: var(--text-1); margin-bottom: 0.5rem; }

/* Ordner-/Datei-Name als <button> (app.js): Browser-Standardoptik zurücksetzen,
   sonst erscheint ein weißer Balken in der Namensspalte. */
button.fb-name {
  background: none; border: 0; margin: 0; padding: 0; width: 100%;
  font: inherit; color: var(--text-1); text-align: left; cursor: pointer;
  overflow: hidden; text-overflow: ellipsis; white-space: nowrap;
}
button.fb-name:hover { color: var(--cx-red-2); }

/* ── Datei-Editor (Monaco) — Vollbild-Overlay ───────────────── */
.fb-editor {
  position: fixed; inset: 0; z-index: 1200;
  display: flex; flex-direction: column; background: var(--bg-0);
}
.fb-editor[hidden] { display: none; }
.fb-editor-bar {
  display: flex; align-items: center; gap: 0.7rem; flex: none;
  padding: 0.6rem 1rem; border-bottom: 1px solid var(--line);
  background: linear-gradient(180deg, var(--bg-1), var(--bg-2));
}
.fb-editor-ico { font-size: 1.05rem; }
.fb-editor-name {
  font-family: 'JetBrains Mono', monospace; font-size: 0.9rem; font-weight: 600;
  color: var(--text-1); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 42vw;
}
.fb-editor-status { font-size: 0.78rem; color: var(--text-3); white-space: nowrap; }
.fb-editor-status.is-ok    { color: var(--ok); }
.fb-editor-status.is-warn  { color: var(--warn); }
.fb-editor-status.is-error { color: var(--err); }
.fb-editor-spacer { flex: 1 1 auto; }
.fb-editor-body { position: relative; flex: 1 1 auto; min-height: 0; }
.fb-monaco { position: absolute; inset: 0; }
.fb-editor-loading {
  position: absolute; inset: 0; z-index: 1; background: var(--bg-0);
  display: flex; align-items: center; justify-content: center;
  color: var(--text-2); font-size: 0.9rem;
}
.fb-editor-loading[hidden] { display: none; }
body.fb-editor-open { overflow: hidden; }
@media (max-width: 600px) {
  .fb-editor-bar { gap: 0.4rem; padding: 0.5rem 0.6rem; }
  .fb-editor-name { max-width: 38vw; }
}
