/* Vault – dunkles, modernes Design */
@font-face {
  font-family: 'VaultMarker';
  src: url('/fonts/marker.woff2') format('woff2');
  font-display: block;
}

:root {
  --accent: #e5484d;
  --accent-soft: color-mix(in srgb, var(--accent) 14%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 45%, transparent);
  --accent-hi: color-mix(in srgb, var(--accent) 75%, white);
  --bg: #08080a;
  --panel: rgba(20, 20, 24, 0.74);
  --panel-solid: #141418;
  --card: rgba(255, 255, 255, 0.03);
  --card-hover: rgba(255, 255, 255, 0.055);
  --line: rgba(255, 255, 255, 0.07);
  --line-strong: rgba(255, 255, 255, 0.12);
  --text: #ececef;
  --muted: #8d8d97;
  --dim: #5e5e67;
  --danger: #ff5c5c;
  --ok: #3ecf8e;
  --radius: 14px;
  --shadow: 0 20px 60px rgba(0, 0, 0, 0.55), 0 2px 8px rgba(0, 0, 0, 0.4);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font: 14px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  -webkit-font-smoothing: antialiased;
  overflow-x: hidden;
}
a { color: inherit; }
button, input, select { font: inherit; color: inherit; }
::selection { background: var(--accent-line); }
svg.lucide { width: 18px; height: 18px; stroke-width: 1.9; flex: none; }
[hidden] { display: none !important; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: rgba(255,255,255,.08); border-radius: 10px; border: 3px solid transparent; background-clip: padding-box; }
::-webkit-scrollbar-thumb:hover { background-color: rgba(255,255,255,.16); }

/* ---------- Hintergrund ---------- */
.backdrop {
  position: fixed; inset: 0; z-index: -2;
  background:
    radial-gradient(1200px 700px at 75% -10%, color-mix(in srgb, var(--accent) 9%, transparent), transparent 60%),
    radial-gradient(900px 600px at -10% 110%, rgba(255,255,255,.025), transparent 60%),
    var(--bg);
}
.backdrop.has-image { background-size: cover; background-position: center; }
.backdrop.has-image::after {
  content: ''; position: absolute; inset: 0;
  background: linear-gradient(180deg, rgba(8,8,10,.55), rgba(8,8,10,.82));
}
.grain {
  position: fixed; inset: 0; z-index: -1; pointer-events: none; opacity: .035;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='160' height='160'%3E%3Cfilter id='n'%3E%3CfeTurbulence type='fractalNoise' baseFrequency='.9' numOctaves='3'/%3E%3C/filter%3E%3Crect width='100%25' height='100%25' filter='url(%23n)'/%3E%3C/svg%3E");
}

/* ---------- Gemalter Schriftzug ---------- */
.wordmark { width: min(720px, 86vw); height: auto; overflow: visible; display: block; }
.wordmark text {
  font-family: 'VaultMarker', 'Brush Script MT', cursive;
  font-size: 210px;
  letter-spacing: 6px;
}
.wordmark .wm-shadow { fill: rgba(0,0,0,.55); filter: url(#wm-blur); }
.wordmark .wm-fill { fill: var(--accent); opacity: 0; }
.wordmark .wm-stroke {
  fill: none; stroke: var(--accent-hi); stroke-width: 2.4; stroke-linejoin: round; stroke-linecap: round;
  stroke-dasharray: 1400; stroke-dashoffset: 1400;
}
.wordmark .wm-swoosh {
  fill: none; stroke: var(--accent); stroke-width: 10; stroke-linecap: round;
  stroke-dasharray: 900; stroke-dashoffset: 900; opacity: .9;
}
.wordmark .wm-group { filter: url(#wm-rough); }
.wordmark.go .wm-stroke { animation: wm-draw 2.2s cubic-bezier(.6,.1,.3,1) forwards; }
.wordmark.go .wm-fill { animation: wm-fill .9s ease 1.5s forwards; }
.wordmark.go .wm-swoosh { animation: wm-draw 1s cubic-bezier(.7,0,.3,1) 1.9s forwards; }
.wordmark.static .wm-stroke, .wordmark.static .wm-swoosh { stroke-dashoffset: 0; }
.wordmark.static .wm-fill { opacity: 1; }
@keyframes wm-draw { to { stroke-dashoffset: 0; } }
@keyframes wm-fill { to { opacity: 1; } }
.wordmark-glow { filter: drop-shadow(0 0 40px color-mix(in srgb, var(--accent) 28%, transparent)); }

.logo-text {
  font-family: 'VaultMarker', cursive;
  color: var(--accent);
  letter-spacing: 3px;
  font-size: 30px; line-height: 1;
  text-shadow: 0 0 24px color-mix(in srgb, var(--accent) 35%, transparent);
  user-select: none;
}
.logo-img { max-height: 38px; max-width: 170px; object-fit: contain; display: block; }

/* ---------- Bedienelemente ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 38px; padding: 0 16px; border-radius: 10px;
  border: 1px solid var(--line-strong); background: rgba(255,255,255,.04);
  cursor: pointer; white-space: nowrap; font-weight: 500;
  transition: background .15s, border-color .15s, transform .1s, color .15s, opacity .15s;
}
.btn:hover { background: rgba(255,255,255,.08); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; }
.btn.primary { background: var(--accent); border-color: transparent; color: #fff; box-shadow: 0 6px 24px -8px var(--accent); }
.btn.primary:hover { background: color-mix(in srgb, var(--accent) 88%, white); }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.ghost:hover { color: var(--text); background: rgba(255,255,255,.06); }
.btn.danger { color: var(--danger); }
.btn.danger:hover { background: rgba(255,92,92,.1); border-color: rgba(255,92,92,.3); }
.btn.icon { width: 38px; padding: 0; }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.sm.icon { width: 32px; padding: 0; }
.btn.block { width: 100%; }
.btn.lg { height: 46px; font-size: 15px; border-radius: 12px; }

.field { display: flex; flex-direction: column; gap: 6px; margin-bottom: 14px; }
.field > span { font-size: 12px; color: var(--muted); font-weight: 500; }
.input {
  height: 40px; width: 100%; padding: 0 12px; border-radius: 10px;
  background: rgba(0,0,0,.35); border: 1px solid var(--line-strong); outline: none;
  transition: border-color .15s, box-shadow .15s;
}
.input:focus { border-color: var(--accent-line); box-shadow: 0 0 0 3px var(--accent-soft); }
.input.lg { height: 48px; font-size: 16px; border-radius: 12px; }
.input-icon { position: relative; }
.input-icon > svg { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.input-icon > .input { padding-left: 38px; }

.check { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; border: 1px solid var(--line); cursor: pointer; margin-bottom: 8px; transition: background .15s, border-color .15s; }
.check:hover { background: rgba(255,255,255,.03); }
.check input { accent-color: var(--accent); width: 16px; height: 16px; margin: 0; }
.check b { font-weight: 500; display: block; }
.check small { color: var(--muted); display: block; font-size: 12px; }
.check:has(input:checked) { border-color: var(--accent-line); background: var(--accent-soft); }

.badge { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 99px; font-size: 11.5px; font-weight: 500; background: rgba(255,255,255,.06); color: var(--muted); white-space: nowrap; }
.badge.accent { background: var(--accent-soft); color: var(--accent-hi); }
.badge.ok { background: rgba(62,207,142,.12); color: var(--ok); }
.badge svg.lucide { width: 12px; height: 12px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; }
.card h3 { margin: 0 0 4px; font-size: 15px; font-weight: 600; display: flex; align-items: center; gap: 8px; }
.card h3 svg { color: var(--accent); }
.card p.hint { margin: 0 0 16px; color: var(--muted); font-size: 13px; }
.muted { color: var(--muted); }
.error-text { color: var(--danger); font-size: 13px; min-height: 20px; margin: 4px 0 0; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; right: 20px; bottom: 20px; z-index: 1000; display: flex; flex-direction: column; gap: 8px; align-items: flex-end; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 10px; padding: 11px 14px; border-radius: 12px;
  background: rgba(28,28,33,.96); border: 1px solid var(--line-strong); box-shadow: var(--shadow);
  animation: toast-in .25s ease; max-width: 380px;
}
.toast.err svg { color: var(--danger); } .toast.ok svg { color: var(--ok); }
.toast.out { animation: toast-out .2s ease forwards; }
@keyframes toast-in { from { opacity: 0; transform: translateY(8px) scale(.98); } }
@keyframes toast-out { to { opacity: 0; transform: translateY(8px); } }

/* ---------- Dialoge ---------- */
.modal-bg {
  position: fixed; inset: 0; z-index: 500; background: rgba(0,0,0,.6); backdrop-filter: blur(6px);
  display: grid; place-items: center; padding: 20px; animation: fade .15s ease;
}
.modal {
  width: min(440px, 100%); background: var(--panel-solid); border: 1px solid var(--line-strong);
  border-radius: 18px; box-shadow: var(--shadow); padding: 22px; animation: pop .2s cubic-bezier(.2,.9,.3,1.2);
  max-height: calc(100vh - 40px); overflow: auto;
}
.modal h2 { margin: 0 0 6px; font-size: 17px; font-weight: 600; }
.modal p { margin: 0 0 16px; color: var(--muted); }
.modal .actions { display: flex; gap: 8px; justify-content: flex-end; margin-top: 18px; }
@keyframes fade { from { opacity: 0; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(6px); } }

/* =====================================================================
   Startseite (Code / Anmeldung)
   ===================================================================== */
.front { min-height: 100%; display: grid; place-items: center; padding: 32px 18px; }
.front-inner { width: min(420px, 100%); display: flex; flex-direction: column; align-items: center; }
.front .wordmark { width: min(400px, 82vw); margin-bottom: 10px; }
.front-logo { max-height: 90px; max-width: 280px; object-fit: contain; margin-bottom: 24px; }
.front-card {
  width: 100%; background: var(--panel); border: 1px solid var(--line); border-radius: 22px; padding: 26px;
  backdrop-filter: blur(20px); box-shadow: var(--shadow);
}
.front-card h1 { font-size: 18px; margin: 0 0 4px; font-weight: 600; }
.front-card .sub { color: var(--muted); margin: 0 0 18px; font-size: 13.5px; }
.code-input { text-align: center; font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; letter-spacing: 6px; font-size: 22px !important; text-transform: uppercase; }
.code-input::placeholder { letter-spacing: 6px; color: var(--dim); }
.divider { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 12px; margin: 18px 0; text-transform: uppercase; letter-spacing: 1px; }
.divider::before, .divider::after { content: ''; flex: 1; height: 1px; background: var(--line); }
.pane { animation: pane-in .3s ease; }
@keyframes pane-in { from { opacity: 0; transform: translateY(6px); } }
.front-foot { margin-top: 18px; color: var(--dim); font-size: 12px; }
.shake { animation: shake .4s; }
@keyframes shake { 20%, 60% { transform: translateX(-6px); } 40%, 80% { transform: translateX(6px); } }

/* =====================================================================
   App-Oberfläche
   ===================================================================== */
.sidebar {
  position: fixed; left: 16px; top: 16px; bottom: 16px; width: 264px; z-index: 50;
  display: flex; flex-direction: column;
  background: var(--panel); border: 1px solid var(--line); border-radius: 22px;
  backdrop-filter: blur(22px) saturate(140%); box-shadow: var(--shadow);
  transition: transform .3s cubic-bezier(.2,.8,.2,1);
}
.sb-head { display: flex; align-items: center; justify-content: space-between; padding: 22px 20px 14px; }
.sb-head .logo { cursor: pointer; background: none; border: 0; padding: 0; }
.sb-nav { flex: 1; overflow-y: auto; padding: 4px 12px 12px; }
.sb-cat {
  font-size: 11px; font-weight: 700; letter-spacing: 1.4px; text-transform: uppercase;
  color: var(--accent); padding: 18px 10px 8px; display: flex; align-items: center; justify-content: space-between;
}
.sb-cat:first-child { padding-top: 6px; }
.sb-cat .btn { height: 22px; width: 22px; border-radius: 6px; color: var(--accent); }
.sb-cat .btn svg { width: 15px; height: 15px; }
.tab {
  position: relative; width: 100%; display: flex; align-items: center; gap: 11px;
  height: 38px; padding: 0 10px; margin: 1px 0; border-radius: 10px;
  background: none; border: 0; cursor: pointer; text-align: left;
  color: var(--muted); font-weight: 500;
  transition: background .15s, color .15s;
}
.tab span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tab small { color: var(--dim); font-size: 11.5px; font-weight: 500; }
.tab:hover { color: #c5c5cc; background: rgba(255,255,255,.04); }
.tab.active { color: var(--text); background: var(--accent-soft); }
.tab.active::before { content: ''; position: absolute; left: -12px; top: 9px; bottom: 9px; width: 3px; border-radius: 0 3px 3px 0; background: var(--accent); }
.tab.active svg { color: var(--accent); }
.tab .share-dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent); box-shadow: 0 0 8px var(--accent); flex: none; }
.tab.add { color: var(--dim); }
.tab.add:hover { color: var(--muted); }
.sb-foot { border-top: 1px solid var(--line); padding: 12px; display: flex; align-items: center; gap: 10px; }
.avatar { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent-hi); font-weight: 700; flex: none; text-transform: uppercase; }
.sb-user { flex: 1; min-width: 0; }
.sb-user b { display: block; font-weight: 600; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sb-user small { color: var(--muted); font-size: 11.5px; }

.main { margin-left: 296px; min-height: 100vh; padding: 28px 32px 60px 16px; position: relative; }
.home { min-height: calc(100vh - 88px); display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 26px; }
.home-stats { display: flex; gap: 10px; flex-wrap: wrap; justify-content: center; opacity: 0; animation: fade-up .8s ease 2.4s forwards; }
.home-stat { padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.02); text-align: center; min-width: 110px; }
.home-stat b { display: block; font-size: 17px; font-weight: 600; }
.home-stat small { color: var(--muted); font-size: 11.5px; }
.storage { width: min(460px, 86vw); opacity: 0; animation: fade-up .8s ease 2.6s forwards; }
.storage-bar { height: 6px; border-radius: 6px; background: rgba(255,255,255,.06); overflow: hidden; }
.storage-bar i { display: block; height: 100%; background: var(--accent); border-radius: 6px; }
.storage-label { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); margin-top: 6px; }
@keyframes fade-up { from { opacity: 0; transform: translateY(8px); } to { opacity: 1; transform: none; } }

.page { animation: pane-in .25s ease; max-width: 1400px; }
.page-head { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.page-head h1 { margin: 0; font-size: 24px; font-weight: 650; letter-spacing: -.3px; display: flex; align-items: center; gap: 10px; }
.page-head h1 svg { width: 24px; height: 24px; color: var(--accent); }
.page-head .meta { color: var(--muted); font-size: 13px; margin-top: 4px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.mobile-top { display: none; }

/* ---------- Freigabe-Leiste ---------- */
.sharebar {
  display: flex; align-items: center; gap: 14px; flex-wrap: wrap;
  padding: 12px 14px 12px 16px; margin-bottom: 20px; border-radius: 14px;
  background: linear-gradient(90deg, var(--accent-soft), rgba(255,255,255,.02));
  border: 1px solid var(--accent-line);
}
.sharebar .label { display: flex; align-items: center; gap: 8px; color: var(--accent-hi); font-weight: 600; font-size: 13px; }
.share-code {
  font-family: ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; font-size: 19px; letter-spacing: 4px; font-weight: 600;
  padding: 4px 12px; border-radius: 9px; background: rgba(0,0,0,.35); border: 1px solid var(--line);
  filter: blur(7px); transition: filter .25s ease; cursor: pointer; user-select: all;
}
.share-code:hover, .share-code.revealed { filter: none; }
.sharebar .grow { flex: 1; }
.sharebar small { color: var(--muted); font-size: 12px; }

/* ---------- Dateien ---------- */
.dropzone {
  border: 2px dashed var(--line-strong); border-radius: 18px; padding: 56px 20px; text-align: center; color: var(--muted);
  cursor: pointer; transition: border-color .2s, background .2s;
}
.dropzone:hover { border-color: var(--accent-line); background: var(--accent-soft); }
.dropzone svg { width: 40px; height: 40px; color: var(--accent); margin-bottom: 10px; stroke-width: 1.5; }
.dropzone b { display: block; color: var(--text); font-size: 15px; margin-bottom: 4px; }
.drag-overlay {
  position: fixed; inset: 0; z-index: 400; display: grid; place-items: center; pointer-events: none;
  background: color-mix(in srgb, var(--bg) 70%, transparent); backdrop-filter: blur(4px);
  opacity: 0; transition: opacity .15s;
}
.drag-overlay.on { opacity: 1; }
.drag-overlay > div {
  border: 2px dashed var(--accent); border-radius: 24px; padding: 50px 70px; text-align: center; background: var(--accent-soft);
  font-size: 18px; font-weight: 600;
}
.drag-overlay svg { width: 48px; height: 48px; color: var(--accent); display: block; margin: 0 auto 12px; }

.grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 14px; }
.fcard {
  position: relative; border-radius: 14px; overflow: hidden; background: var(--card); border: 1px solid var(--line);
  cursor: pointer; transition: transform .15s, border-color .15s, background .15s;
}
.fcard:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--card-hover); }
.fthumb { aspect-ratio: 4 / 3; background: rgba(0,0,0,.35); display: grid; place-items: center; position: relative; overflow: hidden; }
.fthumb img, .fthumb video { width: 100%; height: 100%; object-fit: cover; display: block; }
.fthumb > svg { width: 42px; height: 42px; color: var(--dim); stroke-width: 1.4; }
.fthumb .play {
  position: absolute; width: 46px; height: 46px; border-radius: 50%; display: grid; place-items: center;
  background: rgba(0,0,0,.55); backdrop-filter: blur(4px); border: 1px solid rgba(255,255,255,.2);
}
.fthumb .play svg { width: 20px; height: 20px; color: #fff; fill: #fff; margin-left: 3px; }
.fthumb .ext { position: absolute; left: 8px; bottom: 8px; }
.finfo { padding: 10px 12px; }
.finfo b { display: block; font-weight: 500; font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.finfo small { color: var(--muted); font-size: 11.5px; }
.factions { position: absolute; top: 8px; right: 8px; display: flex; gap: 4px; opacity: 0; transform: translateY(-4px); transition: opacity .15s, transform .15s; }
.fcard:hover .factions, .fcard:focus-within .factions { opacity: 1; transform: none; }
.factions .btn { background: rgba(10,10,12,.75); backdrop-filter: blur(6px); border-color: rgba(255,255,255,.12); }
@media (hover: none) { .factions { opacity: 1; transform: none; } }

.empty { text-align: center; padding: 70px 20px; color: var(--muted); }
.empty svg { width: 44px; height: 44px; color: var(--dim); margin-bottom: 10px; stroke-width: 1.4; }
.empty b { display: block; color: var(--text); font-size: 16px; margin-bottom: 4px; }

/* ---------- Upload-Liste ---------- */
.uploads {
  position: fixed; right: 20px; bottom: 20px; width: 340px; z-index: 300;
  background: var(--panel-solid); border: 1px solid var(--line-strong); border-radius: 16px; box-shadow: var(--shadow); overflow: hidden;
  animation: pop .2s ease;
}
.uploads-head { display: flex; align-items: center; gap: 10px; padding: 12px 14px; border-bottom: 1px solid var(--line); font-weight: 600; }
.uploads-head span { flex: 1; }
.uploads-list { max-height: 260px; overflow: auto; padding: 6px 0; }
.up { padding: 8px 14px; }
.up-row { display: flex; justify-content: space-between; gap: 8px; font-size: 12.5px; }
.up-row b { font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-row small { color: var(--muted); flex: none; }
.up-bar { height: 4px; border-radius: 4px; background: rgba(255,255,255,.07); margin-top: 6px; overflow: hidden; }
.up-bar i { display: block; height: 100%; width: 0; background: var(--accent); transition: width .2s; }
.up.done .up-bar i { background: var(--ok); }
.up.fail .up-bar i { background: var(--danger); width: 100% !important; }
#toasts.lifted { bottom: 120px; }

/* ---------- Vorschau (Lightbox) ---------- */
.lightbox { position: fixed; inset: 0; z-index: 600; background: rgba(4,4,6,.94); backdrop-filter: blur(10px); display: flex; flex-direction: column; animation: fade .15s; }
.lb-top { display: flex; align-items: center; gap: 12px; padding: 14px 18px; }
.lb-top .name { flex: 1; min-width: 0; }
.lb-top .name b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 600; }
.lb-top .name small { color: var(--muted); }
.lb-stage { flex: 1; min-height: 0; display: grid; place-items: center; padding: 0 70px 24px; position: relative; }
.lb-stage img, .lb-stage video { max-width: 100%; max-height: 100%; border-radius: 10px; box-shadow: var(--shadow); }
.lb-stage iframe { width: min(1100px, 100%); height: 100%; border: 0; border-radius: 10px; background: #fff; }
.lb-stage pre {
  width: min(1100px, 100%); max-height: 100%; overflow: auto; margin: 0; padding: 18px; border-radius: 12px;
  background: rgba(255,255,255,.03); border: 1px solid var(--line); font: 12.5px/1.6 ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; white-space: pre-wrap; word-break: break-word;
}
.lb-stage audio { width: min(520px, 100%); }
.lb-none { text-align: center; color: var(--muted); }
.lb-none svg { width: 64px; height: 64px; color: var(--dim); stroke-width: 1.2; margin-bottom: 12px; }
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 46px; height: 46px; border-radius: 50%; }
.lb-nav.prev { left: 14px; } .lb-nav.next { right: 14px; }

/* ---------- Tabellen / Listen ---------- */
.list { border: 1px solid var(--line); border-radius: var(--radius); overflow: hidden; background: var(--card); }
.row { display: flex; align-items: center; gap: 14px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.row:last-child { border-bottom: 0; }
.row .grow { flex: 1; min-width: 0; }
.row .grow b { font-weight: 600; }
.row .grow small { display: block; color: var(--muted); font-size: 12px; }
.row .tags { display: flex; gap: 6px; flex-wrap: wrap; }

.audit-row { display: grid; grid-template-columns: 150px 170px 1fr; gap: 14px; padding: 11px 16px; border-bottom: 1px solid var(--line); align-items: start; font-size: 13px; }
.audit-row:last-child { border-bottom: 0; }
.audit-row .time { color: var(--muted); font-variant-numeric: tabular-nums; font-size: 12.5px; }
.audit-row .who { display: flex; align-items: center; gap: 8px; min-width: 0; font-weight: 500; }
.audit-row .who span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-row .who svg { width: 15px; height: 15px; color: var(--dim); }
.audit-row .who.guest svg { color: var(--accent); }
.audit-row .what b { font-weight: 500; }
.audit-row .what small { display: block; color: var(--muted); font-size: 12px; word-break: break-word; }
.audit-row .what .ip { color: var(--dim); font-size: 11.5px; }
.toolbar { display: flex; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.toolbar .input-icon { flex: 1; min-width: 200px; max-width: 420px; }

/* ---------- Anpassen ---------- */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 16px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 14px; }
.swatch { width: 30px; height: 30px; border-radius: 9px; border: 2px solid transparent; cursor: pointer; transition: transform .15s; }
.swatch:hover { transform: scale(1.1); }
.swatch.on { border-color: #fff; }
.color-row { display: flex; gap: 10px; align-items: center; }
.color-row input[type=color] { width: 44px; height: 40px; padding: 0; border: 1px solid var(--line-strong); border-radius: 10px; background: none; cursor: pointer; }
.color-row input[type=color]::-webkit-color-swatch-wrapper { padding: 4px; }
.color-row input[type=color]::-webkit-color-swatch { border: 0; border-radius: 6px; }
.preview-box {
  height: 150px; border-radius: 12px; border: 1px solid var(--line); margin-bottom: 14px; display: grid; place-items: center;
  background: rgba(0,0,0,.35) center / cover no-repeat; color: var(--dim); overflow: hidden;
}
.preview-box.logo { background-size: contain; background-origin: content-box; padding: 20px; }
.btn-row { display: flex; gap: 8px; flex-wrap: wrap; }
.notice { display: flex; gap: 10px; padding: 12px 14px; border-radius: 12px; background: rgba(255,180,60,.08); border: 1px solid rgba(255,180,60,.25); color: #f3c47a; font-size: 13px; margin-bottom: 14px; }
.notice svg { flex: none; margin-top: 1px; }

/* ---------- Gastansicht ---------- */
.topbar {
  position: sticky; top: 14px; z-index: 50; margin: 14px 16px 0; display: flex; align-items: center; gap: 16px;
  padding: 12px 16px; border-radius: 18px; background: var(--panel); border: 1px solid var(--line);
  backdrop-filter: blur(20px); box-shadow: var(--shadow);
}
.topbar .title { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; font-weight: 600; }
.topbar .title span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.topbar .title svg { color: var(--accent); }
.guest-main { padding: 26px 16px 60px; max-width: 1400px; margin: 0 auto; }

/* ---------- Mobil ---------- */
.sb-scrim { display: none; }
@media (max-width: 900px) {
  .sidebar { transform: translateX(calc(-100% - 24px)); left: 10px; top: 10px; bottom: 10px; }
  body.nav-open .sidebar { transform: none; }
  body.nav-open .sb-scrim { display: block; position: fixed; inset: 0; z-index: 40; background: rgba(0,0,0,.5); }
  .main { margin-left: 0; padding: 0 14px 60px; }
  .mobile-top {
    display: flex; align-items: center; gap: 12px; position: sticky; top: 0; z-index: 30;
    padding: 12px 0; margin-bottom: 8px; background: linear-gradient(var(--bg) 70%, transparent);
  }
  .mobile-top .logo-text { font-size: 24px; }
  .home { min-height: calc(100vh - 140px); }
  .page-head h1 { font-size: 20px; }
  .grid { grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 10px; }
  .audit-row { grid-template-columns: 1fr; gap: 4px; }
  .lb-stage { padding: 0 10px 16px; }
  .lb-nav { display: none; }
  .uploads { left: 12px; right: 12px; width: auto; bottom: 12px; }
  .cards { grid-template-columns: 1fr; }
}

/* =====================================================================
   1.1.0: Aufbewahrung, Unterordner, Pterodactyl
   ===================================================================== */
.modal.wide { width: min(540px, 100%); }
.seg { display: grid; grid-auto-flow: column; grid-auto-columns: 1fr; gap: 6px; padding: 4px; border-radius: 12px; background: rgba(0,0,0,.35); border: 1px solid var(--line); }
.seg-btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px; height: 38px; padding: 0 10px;
  border: 1px solid transparent; border-radius: 9px; background: none; cursor: pointer; color: var(--muted); font-weight: 500;
  transition: background .15s, color .15s, border-color .15s;
}
.seg-btn:hover { color: var(--text); background: rgba(255,255,255,.04); }
.seg-btn.on { color: #fff; background: var(--accent-soft); border-color: var(--accent-line); }
.seg-btn.on svg { color: var(--accent); }
.seg-btn svg.lucide { width: 16px; height: 16px; }
.seg-hint { color: var(--muted); font-size: 12px; line-height: 1.45; }
.pt-box { margin-top: 4px; padding: 14px 14px 4px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255,255,255,.015); }
.pt-box .field:last-child { margin-bottom: 10px; }
select.input { appearance: none; padding-right: 34px; cursor: pointer;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238d8d97' stroke-width='2'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
select.input option { background: var(--panel-solid); }
.notice.info { background: var(--accent-soft); border-color: var(--accent-line); color: var(--text); margin-bottom: 0; }
.notice.info svg { color: var(--accent); }
code { font: 12px ui-monospace, SFMono-Regular, Menlo, Consolas, monospace; padding: 1px 5px; border-radius: 5px; background: rgba(255,255,255,.07); }

.ret-mini { font-size: 10.5px; font-weight: 600; color: var(--accent-hi); background: var(--accent-soft); border-radius: 5px; padding: 0 5px; line-height: 17px; flex: none; }

.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; color: var(--muted); font-size: 13px; margin-bottom: 8px; }
.crumbs a { text-decoration: none; color: var(--muted); padding: 2px 6px; border-radius: 6px; }
.crumbs a:hover { color: var(--text); background: rgba(255,255,255,.05); }
.crumbs svg.lucide { width: 14px; height: 14px; color: var(--dim); }
.crumbs span { color: var(--text); padding: 2px 6px; }
.section-title { font-size: 11px; font-weight: 700; letter-spacing: 1.2px; text-transform: uppercase; color: var(--dim); margin: 22px 0 10px; }
.section-title:first-child { margin-top: 0; }

.dgrid { grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); }
.dcard {
  display: flex; align-items: center; gap: 12px; padding: 14px 16px; border-radius: 14px; cursor: pointer; text-decoration: none;
  background: var(--card); border: 1px solid var(--line); transition: transform .15s, border-color .15s, background .15s;
}
.dcard:hover { transform: translateY(-2px); border-color: var(--line-strong); background: var(--card-hover); }
.dcard > svg { width: 26px; height: 26px; color: var(--accent); stroke-width: 1.6; }
.dcard .grow { min-width: 0; flex: 1; }
.dcard b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.dcard small { color: var(--muted); font-size: 12px; }
.dropzone.small { padding: 30px 20px; }

.ptbar {
  display: flex; align-items: center; gap: 14px; padding: 14px 16px; margin-bottom: 20px; border-radius: 14px;
  background: rgba(255,255,255,.025); border: 1px solid var(--line);
}
.ptbar.err { border-color: rgba(255,92,92,.35); background: rgba(255,92,92,.05); }
.ptbar .pt-ico { width: 40px; height: 40px; border-radius: 11px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); flex: none; }
.ptbar .grow { flex: 1; min-width: 0; }
.ptbar .grow b { font-weight: 600; }
.ptbar small { display: flex; align-items: center; gap: 6px; color: var(--muted); font-size: 12.5px; margin-top: 2px; flex-wrap: wrap; }
.ptbar .err-line { color: var(--danger); align-items: flex-start; }
.ptbar .err-line svg { width: 14px; height: 14px; margin-top: 2px; }
.spin { width: 12px; height: 12px; border-radius: 50%; border: 2px solid var(--accent-line); border-top-color: var(--accent); animation: spin .8s linear infinite; display: inline-block; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
.row .avatar svg.lucide { width: 17px; height: 17px; }

@media (max-width: 420px) { .seg-btn { padding: 0 4px; font-size: 13px; } .seg-btn svg.lucide { display: none; } }
@media (max-width: 900px) {
  .ptbar { flex-wrap: wrap; }
  .dgrid { grid-template-columns: 1fr; }
}
