/* =====================================================================
   MR CODE-X · WORKSPACE
   Design: Premium-Dark × 80er/90er Neon-Retro (Synthwave, Pixel, CRT)
   ===================================================================== */

/* ---------- Schriften (lokal, keine Google-Server) ---------- */
@font-face { font-family: 'Space Grotesk'; src: url('/fonts/space-grotesk-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/fonts/space-grotesk-latin-500-normal.woff2') format('woff2'); font-weight: 500; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/fonts/space-grotesk-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }
@font-face { font-family: 'Space Grotesk'; src: url('/fonts/space-grotesk-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'Silkscreen'; src: url('/fonts/silkscreen-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'Silkscreen'; src: url('/fonts/silkscreen-latin-700-normal.woff2') format('woff2'); font-weight: 700; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono-latin-400-normal.woff2') format('woff2'); font-weight: 400; font-display: swap; }
@font-face { font-family: 'JetBrains Mono'; src: url('/fonts/jetbrains-mono-latin-600-normal.woff2') format('woff2'); font-weight: 600; font-display: swap; }

/* ---------- Design-Tokens ---------- */
:root {
  --bg: #06050a;
  --bg-2: #0b0912;
  --panel: rgba(18, 14, 30, 0.74);
  --panel-solid: #120e1e;
  --panel-2: rgba(28, 22, 46, 0.7);
  --line: rgba(255, 255, 255, 0.07);
  --line-2: rgba(255, 255, 255, 0.13);
  --text: #f2eefc;
  --muted: #a8a0c4;
  --dim: #6f688c;

  --green: #9dff3a;
  --green-dim: #6fd11a;
  --pink: #ff3ad8;
  --cyan: #2ee9ff;
  --purple: #9b5cff;
  --orange: #ff9b3d;
  --danger: #ff4d6d;
  --warn: #ffc247;

  --grad: linear-gradient(120deg, var(--cyan), var(--purple) 55%, var(--pink));
  --grad-green: linear-gradient(120deg, #c6ff5e, var(--green) 45%, #3dffa8);

  --glow-green: 0 0 0 1px rgba(157, 255, 58, .55), 0 0 22px rgba(157, 255, 58, .35);
  --glow-pink: 0 0 0 1px rgba(255, 58, 216, .5), 0 0 26px rgba(255, 58, 216, .3);
  --glow-cyan: 0 0 0 1px rgba(46, 233, 255, .5), 0 0 24px rgba(46, 233, 255, .28);

  --r-sm: 8px;
  --r: 14px;
  --r-lg: 20px;
  --chamfer: polygon(10px 0, 100% 0, 100% calc(100% - 10px), calc(100% - 10px) 100%, 0 100%, 0 10px);

  --font: 'Space Grotesk', system-ui, -apple-system, 'Segoe UI', sans-serif;
  --pixel: 'Silkscreen', 'Courier New', monospace;
  --mono: 'JetBrains Mono', ui-monospace, 'Cascadia Code', monospace;

  --sidebar: 268px;
  --ease: cubic-bezier(.2, .8, .2, 1);
  color-scheme: dark;
}

* { box-sizing: border-box; }
html, body { height: 100%; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: var(--font);
  font-size: 15px;
  line-height: 1.5;
  -webkit-font-smoothing: antialiased;
  -moz-osx-font-smoothing: grayscale;
  overflow-x: hidden;
}
img, svg { display: block; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
a { color: var(--cyan); text-decoration: none; }
a:hover { text-decoration: underline; }
::selection { background: rgba(255, 58, 216, .35); }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; border-radius: 6px; }
[hidden] { display: none !important; }

/* Scrollbars */
* { scrollbar-width: thin; scrollbar-color: #2d2545 transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2d2545; border-radius: 10px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- Hintergrund-Effekte ---------- */
.fx-bg {
  position: fixed; inset: 0; z-index: -2; pointer-events: none;
  background:
    radial-gradient(900px 600px at 88% -10%, rgba(255, 58, 216, .16), transparent 60%),
    radial-gradient(800px 600px at -10% 110%, rgba(46, 233, 255, .12), transparent 60%),
    radial-gradient(600px 400px at 50% 120%, rgba(157, 255, 58, .06), transparent 70%),
    linear-gradient(rgba(255, 255, 255, .022) 1px, transparent 1px) 0 0 / 44px 44px,
    linear-gradient(90deg, rgba(255, 255, 255, .022) 1px, transparent 1px) 0 0 / 44px 44px,
    var(--bg);
}
.fx-scan {
  position: fixed; inset: 0; z-index: 9999; pointer-events: none;
  background: repeating-linear-gradient(0deg, rgba(0, 0, 0, .16) 0 1px, transparent 1px 3px);
  mix-blend-mode: multiply; opacity: .55;
}

/* ---------- Boot-Screen ---------- */
.boot { min-height: 100vh; display: grid; place-content: center; gap: 18px; text-align: center; }
.boot-logo { font-family: var(--pixel); font-weight: 700; font-size: 34px; color: var(--green); text-shadow: 3px 3px 0 var(--pink), 0 0 24px rgba(157, 255, 58, .5); letter-spacing: 2px; }
.boot-bar { width: 220px; height: 10px; border: 1px solid var(--line-2); padding: 2px; margin: 0 auto; }
.boot-bar span { display: block; height: 100%; width: 40%; background: repeating-linear-gradient(90deg, var(--green) 0 8px, transparent 8px 11px); animation: bootbar 1.1s steps(8) infinite; }
@keyframes bootbar { from { transform: translateX(-100%); } to { transform: translateX(250%); } }

/* ---------- Typografie-Bausteine ---------- */
.kicker { font-family: var(--pixel); font-size: 11px; letter-spacing: 2px; text-transform: uppercase; color: var(--cyan); }
.kicker::before { content: '// '; color: var(--pink); }
.h1 { font-size: clamp(24px, 3vw, 34px); line-height: 1.15; font-weight: 700; letter-spacing: -.5px; margin: 4px 0 0; word-break: break-word; }
.h2 { font-size: 20px; font-weight: 700; margin: 0; }
.muted { color: var(--muted); }
.dim { color: var(--dim); }
.mono { font-family: var(--mono); font-size: 12.5px; }
.pixel { font-family: var(--pixel); }
.neon-text { color: var(--green); text-shadow: 2px 2px 0 var(--pink), 0 0 18px rgba(157, 255, 58, .45); }
.grad-text { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }

/* ---------- Buttons ---------- */
.btn {
  --bc: var(--line-2);
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px;
  border: 1px solid var(--bc); border-radius: 10px;
  background: rgba(255, 255, 255, .03); color: var(--text);
  font-weight: 600; font-size: 14.5px; white-space: nowrap;
  transition: transform .15s var(--ease), box-shadow .2s, background .2s, border-color .2s, color .2s;
  user-select: none; -webkit-tap-highlight-color: transparent;
}
.btn svg { width: 18px; height: 18px; flex: none; }
.btn:hover { background: rgba(255, 255, 255, .07); border-color: rgba(255, 255, 255, .25); }
.btn:active { transform: translateY(1px) scale(.99); }
.btn:disabled { opacity: .45; pointer-events: none; }
.btn-primary {
  border: 0; color: #071000; background: var(--grad-green);
  clip-path: var(--chamfer); border-radius: 0;
  box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18);
  text-shadow: 0 1px 0 rgba(255, 255, 255, .3);
}
.btn-primary:hover { filter: brightness(1.08) saturate(1.1); background: var(--grad-green); box-shadow: inset 0 -3px 0 rgba(0, 0, 0, .18), 0 0 30px rgba(157, 255, 58, .45); }
.btn-pink { border: 0; color: #fff; background: linear-gradient(120deg, #ff5fe1, var(--pink) 50%, #b02cff); clip-path: var(--chamfer); border-radius: 0; }
.btn-pink:hover { filter: brightness(1.1); background: linear-gradient(120deg, #ff5fe1, var(--pink) 50%, #b02cff); }
.btn-outline { --bc: rgba(46, 233, 255, .45); color: var(--cyan); background: rgba(46, 233, 255, .05); }
.btn-outline:hover { box-shadow: var(--glow-cyan); background: rgba(46, 233, 255, .1); border-color: var(--cyan); }
.btn-danger { --bc: rgba(255, 77, 109, .5); color: #ff8aa0; background: rgba(255, 77, 109, .08); }
.btn-danger:hover { background: rgba(255, 77, 109, .18); border-color: var(--danger); color: #fff; }
.btn-danger-solid { border: 0; background: var(--danger); color: #fff; clip-path: var(--chamfer); border-radius: 0; }
.btn-danger-solid:hover { background: #ff6680; }
.btn-ghost { border-color: transparent; background: transparent; color: var(--muted); }
.btn-ghost:hover { background: rgba(255, 255, 255, .06); color: var(--text); border-color: transparent; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 13.5px; border-radius: 8px; }
.btn-sm svg { width: 16px; height: 16px; }
.btn-lg { min-height: 52px; padding: 0 26px; font-size: 16px; }
.btn-block { width: 100%; }
.icon-btn {
  display: inline-grid; place-items: center; width: 38px; height: 38px; flex: none;
  border: 1px solid transparent; border-radius: 10px; background: transparent; color: var(--muted);
  transition: background .15s, color .15s, border-color .15s;
}
.icon-btn svg { width: 19px; height: 19px; }
.icon-btn:hover { background: rgba(255, 255, 255, .07); color: var(--text); }
.icon-btn.active { color: var(--green); border-color: rgba(157, 255, 58, .35); background: rgba(157, 255, 58, .08); }

.spinner { width: 18px; height: 18px; border: 2px solid rgba(255, 255, 255, .2); border-top-color: currentColor; border-radius: 50%; animation: spin .7s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Formulare ---------- */
.field { display: grid; gap: 7px; margin-bottom: 16px; }
.field > label, .label { font-size: 13px; font-weight: 600; color: var(--muted); letter-spacing: .2px; }
.hint { font-size: 12.5px; color: var(--dim); }
.input, .select, .textarea {
  width: 100%; min-height: 46px; padding: 0 14px;
  background: rgba(5, 4, 10, .6); border: 1px solid var(--line-2); border-radius: 10px;
  color: var(--text); font-size: 15px; outline: none;
  transition: border-color .15s, box-shadow .2s, background .2s;
}
.textarea { padding: 12px 14px; min-height: 100px; resize: vertical; }
.input::placeholder { color: var(--dim); }
.input:focus, .select:focus, .textarea:focus { border-color: var(--cyan); box-shadow: 0 0 0 3px rgba(46, 233, 255, .15), 0 0 20px rgba(46, 233, 255, .15); background: rgba(5, 4, 10, .85); }
.input.code { font-family: var(--mono); font-size: 22px; letter-spacing: 10px; text-align: center; }
.select { appearance: none; padding-right: 38px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' fill='none' stroke='%23a8a0c4' stroke-width='2' viewBox='0 0 24 24'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.select option { background: var(--panel-solid); }
.input-wrap { position: relative; }
.input-wrap .input { padding-right: 46px; }
.input-wrap .icon-btn { position: absolute; right: 4px; top: 50%; transform: translateY(-50%); }
.row { display: flex; gap: 12px; align-items: center; }
.row.wrap { flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.grid-2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0 14px; }
.form-error { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; margin-bottom: 16px; border-radius: 10px; background: rgba(255, 77, 109, .1); border: 1px solid rgba(255, 77, 109, .35); color: #ffb3c1; font-size: 14px; }
.form-error svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }

/* Segment-Auswahl */
.segmented { display: flex; flex-wrap: wrap; gap: 6px; padding: 4px; border: 1px solid var(--line-2); border-radius: 12px; background: rgba(5, 4, 10, .5); }
.segmented button { flex: 1; min-height: 38px; padding: 0 12px; border: 0; border-radius: 9px; background: transparent; color: var(--muted); font-weight: 600; font-size: 13.5px; transition: all .15s; }
.segmented button:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.segmented button.on { background: rgba(157, 255, 58, .14); color: var(--green); box-shadow: inset 0 0 0 1px rgba(157, 255, 58, .45); }

/* Auswahl-Karten (z. B. Berechtigungen) */
.choice-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.choice {
  position: relative; display: grid; gap: 4px; text-align: left; padding: 14px 14px 14px 46px;
  border: 1px solid var(--line-2); border-radius: 12px; background: rgba(255, 255, 255, .02); transition: all .15s;
}
.choice:hover { border-color: rgba(255, 255, 255, .25); background: rgba(255, 255, 255, .04); }
.choice .ci { position: absolute; left: 14px; top: 15px; width: 20px; height: 20px; color: var(--dim); }
.choice b { font-size: 14.5px; }
.choice span { font-size: 12.5px; color: var(--muted); line-height: 1.4; }
.choice.on { border-color: var(--green); background: rgba(157, 255, 58, .07); box-shadow: 0 0 22px rgba(157, 255, 58, .12); }
.choice.on .ci { color: var(--green); }

/* Schalter */
.switch { display: flex; align-items: center; gap: 12px; cursor: pointer; user-select: none; }
.switch input { position: absolute; opacity: 0; pointer-events: none; }
.switch .track { position: relative; width: 44px; height: 24px; flex: none; border-radius: 30px; background: #2a2340; border: 1px solid var(--line-2); transition: background .2s; }
.switch .track::after { content: ''; position: absolute; top: 3px; left: 3px; width: 16px; height: 16px; border-radius: 50%; background: #cfc8e6; transition: transform .2s var(--ease), background .2s; }
.switch input:checked + .track { background: rgba(157, 255, 58, .25); border-color: var(--green); }
.switch input:checked + .track::after { transform: translateX(20px); background: var(--green); box-shadow: 0 0 10px var(--green); }
.switch input:focus-visible + .track { outline: 2px solid var(--cyan); outline-offset: 2px; }

/* ---------- Panels & Karten ---------- */
.panel {
  position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--r-lg);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.panel-gradient::before {
  content: ''; position: absolute; inset: 0; border-radius: inherit; padding: 1px; pointer-events: none;
  background: linear-gradient(140deg, rgba(46, 233, 255, .6), rgba(155, 92, 255, .25) 40%, rgba(255, 58, 216, .55));
  -webkit-mask: linear-gradient(#000 0 0) content-box, linear-gradient(#000 0 0); -webkit-mask-composite: xor; mask-composite: exclude;
}
.pixel-corners::after {
  content: ''; position: absolute; width: 8px; height: 8px; right: -1px; top: -1px; pointer-events: none;
  background: var(--green); box-shadow: -10px 0 0 rgba(157, 255, 58, .5), 0 10px 0 rgba(157, 255, 58, .5), -20px 0 0 rgba(157, 255, 58, .2), 0 20px 0 rgba(157, 255, 58, .2);
}
.badge {
  display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px;
  border-radius: 6px; font-size: 11.5px; font-weight: 600; letter-spacing: .3px; white-space: nowrap;
  border: 1px solid var(--line-2); color: var(--muted); background: rgba(255, 255, 255, .03);
}
.badge svg { width: 13px; height: 13px; }
.badge.green { color: var(--green); border-color: rgba(157, 255, 58, .4); background: rgba(157, 255, 58, .08); }
.badge.pink { color: #ff8ae8; border-color: rgba(255, 58, 216, .4); background: rgba(255, 58, 216, .08); }
.badge.cyan { color: var(--cyan); border-color: rgba(46, 233, 255, .4); background: rgba(46, 233, 255, .07); }
.badge.warn { color: var(--warn); border-color: rgba(255, 194, 71, .4); background: rgba(255, 194, 71, .08); }
.badge.danger { color: #ff8aa0; border-color: rgba(255, 77, 109, .45); background: rgba(255, 77, 109, .08); }
.badge.pixel { font-family: var(--pixel); font-weight: 400; font-size: 10px; letter-spacing: 1px; }

/* =====================================================================
   LOGIN / AUTH-SCREENS
   ===================================================================== */
.auth {
  min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr;
}
.auth-hero { position: relative; overflow: hidden; display: flex; flex-direction: column; justify-content: center; align-items: center; padding: 48px 32px 160px; text-align: center; border-right: 1px solid var(--line); }
.auth-hero .logo-frame {
  position: relative; width: clamp(260px, 34vw, 460px); aspect-ratio: 677 / 369; border-radius: 22px; overflow: hidden; z-index: 2; background: #000;
  box-shadow: 0 0 0 2px rgba(46, 233, 255, .7), 0 0 0 6px rgba(6, 5, 10, 1), 0 0 0 8px rgba(255, 58, 216, .65), 0 0 60px rgba(255, 58, 216, .35), 0 0 120px rgba(46, 233, 255, .18);
  animation: float 6s ease-in-out infinite;
}
.auth-hero .logo-frame img { width: 100%; height: 100%; object-fit: contain; }
@keyframes float { 0%, 100% { transform: translateY(0); } 50% { transform: translateY(-8px); } }
.auth-title { position: relative; z-index: 2; margin: 34px 0 6px; font-family: var(--pixel); font-weight: 700; font-size: clamp(34px, 5vw, 62px); line-height: 1; letter-spacing: 2px; color: var(--green); text-shadow: 4px 4px 0 var(--pink), 0 0 30px rgba(157, 255, 58, .45); }
.auth-title .glitch { position: relative; display: inline-block; }
.auth-sub { position: relative; z-index: 2; font-family: var(--pixel); font-size: 13px; letter-spacing: 4px; color: var(--cyan); text-shadow: 0 0 12px rgba(46, 233, 255, .6); }
.auth-claims { position: relative; z-index: 2; display: flex; flex-wrap: wrap; justify-content: center; gap: 8px; margin-top: 26px; }

/* Synthwave-Sonne + Gitterboden */
.synth-sun {
  position: absolute; left: 50%; bottom: 90px; width: 460px; height: 460px; transform: translateX(-50%); border-radius: 50%; z-index: 0; opacity: .55;
  background: linear-gradient(180deg, #ffe45e 0%, #ff8a3d 35%, var(--pink) 70%, #7a1fd1 100%);
  -webkit-mask: linear-gradient(180deg, #000 0 48%, transparent 48% 52%, #000 52% 60%, transparent 60% 64%, #000 64% 70%, transparent 70% 75%, #000 75% 80%, transparent 80% 86%, #000 86% 89%, transparent 89%);
  mask: linear-gradient(180deg, #000 0 48%, transparent 48% 52%, #000 52% 60%, transparent 60% 64%, #000 64% 70%, transparent 70% 75%, #000 75% 80%, transparent 80% 86%, #000 86% 89%, transparent 89%);
  filter: drop-shadow(0 0 40px rgba(255, 58, 216, .5));
}
.synth-grid {
  position: absolute; left: -50%; right: -50%; bottom: -40px; height: 260px; z-index: 1;
  background:
    linear-gradient(rgba(255, 58, 216, .75) 2px, transparent 2px) 0 0 / 100% 40px,
    linear-gradient(90deg, rgba(255, 58, 216, .75) 2px, transparent 2px) 0 0 / 60px 100%;
  transform: perspective(300px) rotateX(62deg); transform-origin: top center;
  -webkit-mask: linear-gradient(transparent, #000 30%); mask: linear-gradient(transparent, #000 30%);
  animation: gridmove 2.2s linear infinite;
}
.synth-grid::before { content: ''; position: absolute; inset: -2px 0 auto; height: 3px; background: var(--cyan); box-shadow: 0 0 20px var(--cyan); }
@keyframes gridmove { from { background-position: 0 0, 0 0; } to { background-position: 0 40px, 0 0; } }

.auth-side { display: flex; align-items: center; justify-content: center; padding: 40px 28px; }
.auth-card { width: min(440px, 100%); padding: 34px 32px 30px; }
.auth-card .h2 { font-size: 26px; margin: 8px 0 6px; }
.auth-card .lead { color: var(--muted); margin: 0 0 24px; }
.auth-card .foot { margin-top: 22px; display: flex; align-items: center; gap: 8px; color: var(--dim); font-size: 12.5px; }
.auth-card .foot svg { width: 15px; height: 15px; color: var(--green); }
.qr-box { display: grid; place-items: center; padding: 14px; margin: 4px auto 14px; width: fit-content; background: #fff; border-radius: 14px; box-shadow: var(--glow-pink); }
.qr-box img { width: 200px; height: 200px; image-rendering: pixelated; }
.secret-box { font-family: var(--mono); font-size: 14px; letter-spacing: 1px; text-align: center; padding: 10px; border: 1px dashed var(--line-2); border-radius: 10px; color: var(--cyan); word-break: break-all; margin-bottom: 18px; }
.steps { display: grid; gap: 10px; margin: 0 0 18px; padding: 0; list-style: none; counter-reset: s; }
.steps li { position: relative; padding-left: 34px; color: var(--muted); font-size: 14px; counter-increment: s; }
.steps li::before { content: counter(s); position: absolute; left: 0; top: 0; width: 22px; height: 22px; display: grid; place-items: center; font-family: var(--pixel); font-size: 11px; color: #071000; background: var(--green); }

/* =====================================================================
   APP-SHELL
   ===================================================================== */
.shell { display: grid; grid-template-columns: var(--sidebar) 1fr; min-height: 100vh; }
.sidebar {
  position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px;
  padding: 18px 14px; border-right: 1px solid var(--line);
  background: linear-gradient(180deg, rgba(14, 10, 24, .92), rgba(8, 6, 14, .92));
  backdrop-filter: blur(16px); z-index: 40;
}
.brand { display: flex; align-items: center; gap: 12px; padding: 6px 8px 18px; margin-bottom: 6px; border-bottom: 1px solid var(--line); text-decoration: none !important; }
.brand img { width: 46px; height: 46px; border-radius: 12px; object-fit: cover; box-shadow: 0 0 0 1px rgba(46, 233, 255, .6), 0 0 18px rgba(255, 58, 216, .35); }
.brand-name { font-family: var(--pixel); font-weight: 700; font-size: 18px; line-height: 1; color: var(--green); text-shadow: 2px 2px 0 var(--pink); letter-spacing: 1px; }
.brand-sub { font-family: var(--pixel); font-size: 9.5px; letter-spacing: 3px; color: var(--cyan); margin-top: 6px; }
.nav-label { font-family: var(--pixel); font-size: 10px; letter-spacing: 2px; color: var(--dim); padding: 14px 10px 6px; }
.nav a {
  position: relative; display: flex; align-items: center; gap: 12px; padding: 11px 12px; border-radius: 11px;
  color: var(--muted); font-weight: 600; font-size: 14.5px; text-decoration: none !important; transition: all .15s;
}
.nav a svg { width: 19px; height: 19px; flex: none; }
.nav a:hover { color: var(--text); background: rgba(255, 255, 255, .05); }
.nav a.on { color: var(--text); background: linear-gradient(90deg, rgba(157, 255, 58, .14), rgba(157, 255, 58, .02)); box-shadow: inset 0 0 0 1px rgba(157, 255, 58, .22); }
.nav a.on svg { color: var(--green); filter: drop-shadow(0 0 6px rgba(157, 255, 58, .7)); }
.nav a.on::before { content: ''; position: absolute; left: -14px; top: 10px; bottom: 10px; width: 4px; background: var(--green); box-shadow: 0 0 12px var(--green); }
.nav a .count { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.sidebar-bottom { margin-top: auto; display: grid; gap: 10px; }
.status-chip { display: flex; align-items: center; gap: 8px; padding: 9px 12px; border: 1px dashed rgba(157, 255, 58, .3); border-radius: 10px; font-family: var(--pixel); font-size: 9.5px; letter-spacing: 1px; color: var(--green); }
.status-chip .dot { width: 8px; height: 8px; background: var(--green); box-shadow: 0 0 10px var(--green); animation: blink 1.6s steps(2) infinite; }
.status-chip.warn { color: var(--warn); border-color: rgba(255, 194, 71, .35); }
.status-chip.warn .dot { background: var(--warn); box-shadow: 0 0 10px var(--warn); }
@keyframes blink { 50% { opacity: .2; } }
.user-card { display: flex; align-items: center; gap: 11px; padding: 10px; border-radius: 12px; background: rgba(255, 255, 255, .03); border: 1px solid var(--line); }
.user-card .grow { line-height: 1.25; }
.user-card .name { font-weight: 600; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.user-card .role { font-size: 12px; color: var(--dim); }
.avatar {
  --c1: var(--cyan); --c2: var(--pink);
  width: 38px; height: 38px; flex: none; display: grid; place-items: center; border-radius: 11px;
  font-family: var(--pixel); font-weight: 700; font-size: 13px; color: #fff;
  background: linear-gradient(135deg, var(--c1), var(--c2)); box-shadow: inset 0 0 0 2px rgba(0, 0, 0, .25);
  text-shadow: 1px 1px 0 rgba(0, 0, 0, .4);
}
.avatar.lg { width: 56px; height: 56px; font-size: 18px; border-radius: 16px; }
img.avatar.logo { display: block; object-fit: cover; padding: 0; background: #000; box-shadow: 0 0 0 1px rgba(46, 233, 255, .6), 0 0 12px rgba(255, 58, 216, .3); }

.main { min-width: 0; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 30; display: flex; align-items: center; gap: 12px;
  padding: 14px 28px; min-height: 70px; border-bottom: 1px solid var(--line);
  background: rgba(6, 5, 10, .78); backdrop-filter: blur(16px) saturate(1.3); -webkit-backdrop-filter: blur(16px) saturate(1.3);
}
.topbar .menu-btn { display: none; }
.search {
  position: relative; flex: 1; max-width: 520px;
}
.search svg { position: absolute; left: 14px; top: 50%; width: 18px; height: 18px; transform: translateY(-50%); color: var(--dim); pointer-events: none; }
.search .input { padding-left: 42px; padding-right: 50px; min-height: 42px; background: rgba(255, 255, 255, .04); }
.search kbd { position: absolute; right: 10px; top: 50%; transform: translateY(-50%); }
kbd { font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 5px; border: 1px solid var(--line-2); border-bottom-width: 2px; color: var(--muted); background: rgba(255, 255, 255, .04); }
.topbar .spacer { flex: 1; }
.content { padding: 28px 28px 120px; width: 100%; max-width: 1500px; margin: 0 auto; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 18px; flex-wrap: wrap; margin-bottom: 22px; }
.page-head .actions { display: flex; gap: 10px; flex-wrap: wrap; }
.scrim { display: none; }

/* Breadcrumbs */
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 2px; margin-bottom: 6px; }
.crumbs button, .crumbs span { border: 0; background: none; padding: 4px 6px; border-radius: 6px; color: var(--muted); font-size: 13.5px; font-weight: 500; max-width: 260px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumbs button:hover { color: var(--text); background: rgba(255, 255, 255, .06); }
.crumbs button.drop-target { color: var(--green); background: rgba(157, 255, 58, .12); box-shadow: inset 0 0 0 1px var(--green); }
.crumbs .sep { color: var(--dim); padding: 0; }
.crumbs .sep svg { width: 14px; height: 14px; }
.crumbs .current { color: var(--text); }

/* Toolbar */
.toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 18px; padding: 8px; border: 1px solid var(--line); border-radius: 14px; background: rgba(255, 255, 255, .02); }
.toolbar .sep-v { width: 1px; height: 26px; background: var(--line-2); margin: 0 4px; }
.toolbar .info { font-size: 13px; color: var(--dim); padding: 0 8px; }

/* =====================================================================
   DATEIEN
   ===================================================================== */
.files-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(178px, 1fr)); gap: 16px; }
.fcard {
  position: relative; display: flex; flex-direction: column; min-width: 0; border-radius: 16px; overflow: hidden;
  border: 1px solid var(--line); background: linear-gradient(180deg, rgba(26, 20, 42, .75), rgba(14, 11, 24, .8));
  transition: transform .18s var(--ease), border-color .18s, box-shadow .25s; cursor: pointer;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none;
}
.fcard:hover { transform: translateY(-3px); border-color: rgba(46, 233, 255, .45); box-shadow: 0 14px 30px rgba(0, 0, 0, .45), 0 0 24px rgba(46, 233, 255, .14); }
.fcard.selected { border-color: var(--green); box-shadow: 0 0 0 1px var(--green), 0 0 26px rgba(157, 255, 58, .25); }
.fcard.drop-target { border-color: var(--green); box-shadow: 0 0 0 2px var(--green), 0 0 34px rgba(157, 255, 58, .4); transform: scale(1.03); }
.fcard.dragging { opacity: .4; }
.fcard .thumb { position: relative; aspect-ratio: 4 / 3; display: grid; place-items: center; overflow: hidden; background: radial-gradient(circle at 50% 40%, rgba(255, 255, 255, .05), transparent 70%); border-bottom: 1px solid var(--line); }
.fcard .thumb img.ph { width: 100%; height: 100%; object-fit: cover; opacity: 0; transition: opacity .3s, transform .4s var(--ease); }
.fcard .thumb img.ph.loaded { opacity: 1; }
.fcard:hover .thumb img.ph { transform: scale(1.05); }
.fcard .thumb .ficon { width: 58px; height: 58px; }
.fcard .thumb .ext { position: absolute; bottom: 10px; right: 10px; font-family: var(--pixel); font-size: 9.5px; letter-spacing: 1px; padding: 3px 6px; color: #0a0812; background: var(--k, var(--muted)); }
.fcard .meta { padding: 11px 12px 12px; display: grid; gap: 3px; }
.fcard .name { font-weight: 600; font-size: 14px; line-height: 1.3; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; word-break: break-word; min-height: 2.6em; }
.fcard .sub { font-family: var(--mono); font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.fcard .check, .fcard .more {
  position: absolute; top: 9px; z-index: 2; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 9px;
  background: rgba(6, 5, 10, .72); border: 1px solid var(--line-2); backdrop-filter: blur(6px); color: var(--text);
  opacity: 0; transition: opacity .15s, background .15s;
}
.fcard .check { left: 9px; }
.fcard .more { right: 9px; }
.fcard .check svg, .fcard .more svg { width: 16px; height: 16px; }
.fcard:hover .check, .fcard:hover .more, .fcard.selected .check, .has-selection .fcard .check { opacity: 1; }
.fcard.selected .check { background: var(--green); border-color: var(--green); color: #071000; }
.fcard .check svg { opacity: 0; }
.fcard.selected .check svg { opacity: 1; }
.fcard .more:hover { background: rgba(46, 233, 255, .25); }
@media (hover: none) { .fcard .more { opacity: 1; } }

.fcard.area .thumb { aspect-ratio: auto; height: 120px; background: radial-gradient(circle at 30% 20%, rgba(157, 255, 58, .14), transparent 60%), radial-gradient(circle at 80% 90%, rgba(255, 58, 216, .16), transparent 60%); }
.fcard.area .name { font-size: 16px; -webkit-line-clamp: 1; min-height: 0; }

/* Typ-Farben */
.k-folder { --k: var(--green); color: var(--green); }
.k-area { --k: var(--green); color: var(--green); }
.k-image { --k: var(--pink); color: var(--pink); }
.k-video { --k: var(--purple); color: #b48bff; }
.k-audio { --k: var(--orange); color: var(--orange); }
.k-pdf { --k: #ff4d6d; color: #ff6b85; }
.k-doc { --k: #4da3ff; color: #6fb5ff; }
.k-sheet { --k: #3dffa0; color: #3dffa0; }
.k-slides { --k: var(--warn); color: var(--warn); }
.k-archive { --k: #c9a7ff; color: #c9a7ff; }
.k-code { --k: var(--cyan); color: var(--cyan); }
.k-text { --k: #d8d3ea; color: #d8d3ea; }
.k-design { --k: #ff6ad5; color: #ff6ad5; }
.k-font { --k: #ffd166; color: #ffd166; }
.k-file { --k: var(--muted); color: var(--muted); }
.ficon { filter: drop-shadow(0 0 10px currentColor); }
.ficon-sm { width: 22px; height: 22px; flex: none; }

/* Listenansicht */
.files-list { border: 1px solid var(--line); border-radius: 16px; overflow: hidden; background: rgba(14, 11, 24, .6); }
.lrow {
  display: grid; grid-template-columns: 34px 30px minmax(0, 1fr) 110px 150px 44px; align-items: center; gap: 10px;
  padding: 0 12px; min-height: 54px; border-bottom: 1px solid var(--line); cursor: pointer; transition: background .12s;
  user-select: none; -webkit-user-select: none;
}
.lrow:last-child { border-bottom: 0; }
.lrow:hover { background: rgba(255, 255, 255, .035); }
.lrow.selected { background: rgba(157, 255, 58, .07); box-shadow: inset 3px 0 0 var(--green); }
.lrow.drop-target { background: rgba(157, 255, 58, .14); box-shadow: inset 0 0 0 1px var(--green); }
.lrow.head { min-height: 40px; cursor: default; font-family: var(--pixel); font-size: 10px; letter-spacing: 1.5px; color: var(--dim); background: rgba(255, 255, 255, .02); }
.lrow.head:hover { background: rgba(255, 255, 255, .02); }
.lrow .name { font-weight: 600; font-size: 14.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lrow .c-size, .lrow .c-date { font-family: var(--mono); font-size: 12px; color: var(--dim); white-space: nowrap; }
.lrow .cb { width: 20px; height: 20px; display: grid; place-items: center; border: 1.5px solid var(--line-2); border-radius: 6px; color: transparent; }
.lrow .cb svg { width: 14px; height: 14px; }
.lrow.selected .cb { background: var(--green); border-color: var(--green); color: #071000; }

/* Leerer Zustand */
.empty { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 60px 20px; border: 2px dashed rgba(46, 233, 255, .22); border-radius: 22px; background: rgba(46, 233, 255, .02); }
.empty .pix { width: 96px; height: 96px; image-rendering: pixelated; margin-bottom: 8px; }
.empty .t { font-family: var(--pixel); font-size: 18px; letter-spacing: 1px; color: var(--text); }
.empty p { margin: 0 0 12px; color: var(--muted); max-width: 440px; }

/* Briefkasten (nur hochladen) */
.dropbox { display: grid; justify-items: center; gap: 14px; text-align: center; padding: 56px 24px; border-radius: 24px; cursor: pointer; border: 2px dashed rgba(157, 255, 58, .35); background: radial-gradient(circle at 50% 0%, rgba(157, 255, 58, .08), transparent 70%); transition: all .2s; }
.dropbox:hover, .dropbox.hot { border-color: var(--green); box-shadow: 0 0 40px rgba(157, 255, 58, .15) inset; }
.dropbox .big-ico { width: 74px; height: 74px; color: var(--green); filter: drop-shadow(0 0 16px rgba(157, 255, 58, .6)); }
.dropbox .t { font-family: var(--pixel); font-size: 20px; letter-spacing: 1px; }
.dropbox p { margin: 0; color: var(--muted); }

/* Datei-Drop-Overlay */
.drop-overlay {
  position: fixed; inset: 0; z-index: 500; display: grid; place-items: center; pointer-events: none;
  background: rgba(6, 5, 10, .82); backdrop-filter: blur(6px); opacity: 0; transition: opacity .15s;
}
.drop-overlay.on { opacity: 1; }
.drop-overlay .box {
  display: grid; justify-items: center; gap: 16px; padding: 60px 70px; border-radius: 28px;
  border: 3px dashed var(--green); box-shadow: 0 0 60px rgba(157, 255, 58, .35), inset 0 0 60px rgba(157, 255, 58, .12);
  animation: pulse 1.2s ease-in-out infinite;
}
.drop-overlay svg { width: 80px; height: 80px; color: var(--green); filter: drop-shadow(0 0 20px var(--green)); }
.drop-overlay .t { font-family: var(--pixel); font-size: 26px; color: var(--green); text-shadow: 3px 3px 0 var(--pink); }
.drop-overlay .s { color: var(--muted); }
@keyframes pulse { 50% { transform: scale(1.02); } }

/* Auswahl-Leiste */
.selbar {
  position: fixed; left: 50%; bottom: 24px; z-index: 60; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; justify-content: center;
  padding: 8px 10px 8px 16px; border-radius: 16px; transform: translate(-50%, 140%); opacity: 0;
  background: rgba(18, 14, 30, .95); border: 1px solid rgba(157, 255, 58, .45); box-shadow: 0 20px 50px rgba(0, 0, 0, .6), 0 0 30px rgba(157, 255, 58, .18);
  backdrop-filter: blur(14px); transition: transform .28s var(--ease), opacity .2s; max-width: calc(100vw - 24px);
}
.selbar.on { transform: translate(-50%, 0); opacity: 1; }
.selbar .count { font-family: var(--pixel); font-size: 12px; color: var(--green); margin-right: 8px; white-space: nowrap; }

/* =====================================================================
   UPLOAD-PANEL
   ===================================================================== */
.uploads {
  position: fixed; right: 20px; bottom: 20px; z-index: 70; width: min(400px, calc(100vw - 24px));
  border-radius: 18px; overflow: hidden; background: rgba(16, 12, 28, .97); border: 1px solid var(--line-2);
  box-shadow: 0 24px 60px rgba(0, 0, 0, .65), 0 0 30px rgba(46, 233, 255, .12);
  transform: translateY(20px); opacity: 0; pointer-events: none; transition: all .25s var(--ease);
}
.uploads.on { transform: none; opacity: 1; pointer-events: auto; }
.uploads .uh { display: flex; align-items: center; gap: 10px; padding: 12px 12px 12px 16px; border-bottom: 1px solid var(--line); background: linear-gradient(90deg, rgba(46, 233, 255, .08), rgba(255, 58, 216, .06)); }
.uploads .uh > svg { width: 22px; height: 22px; flex: none; color: var(--green); }
.uploads .uh > svg.err { color: var(--danger); }
.uploads .uh .t { font-family: var(--pixel); font-size: 12px; letter-spacing: 1px; }
.uploads .uh .s { font-size: 12.5px; color: var(--muted); }
.uploads .ul { max-height: 320px; overflow-y: auto; }
.uploads.min .ul { display: none; }
.uitem { display: grid; grid-template-columns: 24px 1fr auto; gap: 4px 12px; align-items: center; padding: 11px 14px; border-bottom: 1px solid var(--line); }
.uitem:last-child { border-bottom: 0; }
.uitem .n { font-size: 13.5px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.uitem .st { grid-column: 2 / 4; font-family: var(--mono); font-size: 11px; color: var(--dim); }
.uitem.done .st { color: var(--green); }
.uitem.error .st { color: #ff8aa0; font-family: var(--font); font-size: 12px; }
.pbar { grid-column: 2 / 4; height: 10px; padding: 2px; border: 1px solid var(--line-2); }
.pbar span { display: block; height: 100%; width: 0; background: repeating-linear-gradient(90deg, var(--cyan) 0 7px, transparent 7px 9px); box-shadow: 0 0 10px rgba(46, 233, 255, .6); transition: width .2s; }
.uitem.done .pbar span { background: repeating-linear-gradient(90deg, var(--green) 0 7px, transparent 7px 9px); box-shadow: 0 0 10px rgba(157, 255, 58, .6); }
.uitem.error .pbar span { background: var(--danger); box-shadow: none; }

/* =====================================================================
   MODALS, MENÜS, TOASTS
   ===================================================================== */
.modal-wrap { position: fixed; inset: 0; z-index: 900; display: grid; place-items: center; padding: 18px; background: rgba(4, 3, 8, .72); backdrop-filter: blur(8px); animation: fadein .15s; }
@keyframes fadein { from { opacity: 0; } }
.modal { position: relative; width: min(var(--w, 520px), 100%); max-height: calc(100vh - 36px); display: flex; flex-direction: column; border-radius: 22px; background: linear-gradient(180deg, #181228, #0f0b1a); border: 1px solid var(--line-2); box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 40px rgba(255, 58, 216, .12); animation: pop .22s var(--ease); }
@keyframes pop { from { transform: translateY(12px) scale(.98); opacity: 0; } }
.modal-h { display: flex; align-items: flex-start; gap: 12px; padding: 22px 22px 6px; }
.modal-h .grow .h2 { font-size: 20px; }
.modal-b { padding: 14px 22px 6px; overflow-y: auto; }
.modal-f { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; padding: 16px 22px 22px; }
.modal-ico { width: 44px; height: 44px; flex: none; display: grid; place-items: center; border-radius: 12px; background: rgba(46, 233, 255, .1); color: var(--cyan); border: 1px solid rgba(46, 233, 255, .3); }
.modal-ico svg { width: 22px; height: 22px; }
.modal-ico.danger { background: rgba(255, 77, 109, .1); color: var(--danger); border-color: rgba(255, 77, 109, .35); }
.modal-ico.green { background: rgba(157, 255, 58, .1); color: var(--green); border-color: rgba(157, 255, 58, .35); }

.menu { position: fixed; z-index: 900; min-width: 220px; padding: 6px; border-radius: 14px; background: rgba(20, 15, 34, .98); border: 1px solid var(--line-2); box-shadow: 0 20px 50px rgba(0, 0, 0, .65); animation: pop .14s var(--ease); }
.menu button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 10px 12px; border: 0; border-radius: 9px; background: none; text-align: left; font-size: 14px; font-weight: 500; color: var(--text); }
.menu button svg { width: 18px; height: 18px; color: var(--muted); }
.menu button:hover { background: rgba(46, 233, 255, .1); }
.menu button:hover svg { color: var(--cyan); }
.menu button.danger { color: #ff8aa0; }
.menu button.danger svg { color: #ff8aa0; }
.menu button.danger:hover { background: rgba(255, 77, 109, .12); }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }

#toasts { position: fixed; right: 18px; top: 18px; z-index: 1000; display: grid; gap: 10px; width: min(400px, calc(100vw - 24px)); pointer-events: none; }
.toast { display: flex; align-items: center; gap: 12px; padding: 13px 16px; border-radius: 13px; background: #140f22; border: 1px solid var(--line-2); box-shadow: 0 16px 40px rgba(0, 0, 0, .6); font-size: 14.5px; pointer-events: auto; animation: toastin .3s var(--ease); }
.toast svg { width: 20px; height: 20px; flex: none; }
.toast.ok { border-color: rgba(157, 255, 58, .5); } .toast.ok svg { color: var(--green); }
.toast.err { border-color: rgba(255, 77, 109, .55); } .toast.err svg { color: var(--danger); }
.toast.info svg { color: var(--cyan); }
.toast.out { animation: toastout .25s forwards; }
@keyframes toastin { from { transform: translateX(24px); opacity: 0; } }
@keyframes toastout { to { transform: translateX(24px); opacity: 0; } }

/* Vorschau */
.viewer { position: fixed; inset: 0; z-index: 850; display: flex; flex-direction: column; background: rgba(4, 3, 8, .94); backdrop-filter: blur(10px); animation: fadein .15s; }
.viewer-h { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.viewer-h .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.viewer-h .s { font-family: var(--mono); font-size: 12px; color: var(--dim); }
.viewer-b { position: relative; flex: 1; min-height: 0; display: grid; place-items: center; padding: 18px; }
.viewer-b img, .viewer-b video { max-width: 100%; max-height: 100%; object-fit: contain; border-radius: 10px; box-shadow: 0 20px 60px rgba(0, 0, 0, .6); }
.viewer-b iframe { width: 100%; height: 100%; border: 0; border-radius: 10px; background: #fff; }
.viewer-b audio { width: min(560px, 100%); }
.viewer-b pre { width: 100%; height: 100%; margin: 0; overflow: auto; padding: 20px; border-radius: 12px; background: #0a0812; border: 1px solid var(--line); font-family: var(--mono); font-size: 13px; line-height: 1.6; color: #d9d4ee; white-space: pre; tab-size: 2; }
.viewer-nav { position: absolute; top: 50%; transform: translateY(-50%); width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--line-2); background: rgba(18, 14, 30, .8); color: var(--text); }
.viewer-nav:hover { border-color: var(--cyan); box-shadow: var(--glow-cyan); }
.viewer-nav.prev { left: 16px; } .viewer-nav.next { right: 16px; }
.viewer-nav svg { width: 22px; height: 22px; }
.nopreview { display: grid; justify-items: center; gap: 14px; text-align: center; }
.nopreview .ficon { width: 90px; height: 90px; }

/* Ordner-Auswahl (Verschieben) */
.picker { border: 1px solid var(--line-2); border-radius: 14px; overflow: hidden; }
.picker-h { display: flex; align-items: center; gap: 6px; padding: 8px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.picker-l { max-height: 300px; min-height: 160px; overflow-y: auto; }
.picker-l button { display: flex; align-items: center; gap: 11px; width: 100%; padding: 11px 14px; border: 0; border-bottom: 1px solid var(--line); background: none; text-align: left; font-weight: 500; }
.picker-l button:hover { background: rgba(46, 233, 255, .07); }
.picker-l button:disabled { opacity: .4; cursor: not-allowed; }
.picker-l button svg { width: 20px; height: 20px; color: var(--green); }
.picker-l button .chev { margin-left: auto; color: var(--dim); width: 16px; height: 16px; }
.picker-empty { padding: 30px; text-align: center; color: var(--dim); font-size: 14px; }

/* Kopierfeld */
.copy-field { display: flex; gap: 8px; align-items: stretch; }
.copy-field .input { font-family: var(--mono); font-size: 13px; }
.cred-card { position: relative; padding: 18px; border-radius: 14px; background: #0a0812; border: 1px solid rgba(157, 255, 58, .35); font-family: var(--mono); font-size: 13.5px; line-height: 1.9; white-space: pre-wrap; word-break: break-all; box-shadow: inset 0 0 30px rgba(157, 255, 58, .05); }
.cred-card b { color: var(--green); font-weight: 600; }

/* =====================================================================
   ADMIN-SEITEN
   ===================================================================== */
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(200px, 1fr)); gap: 14px; margin-bottom: 22px; }
.stat { padding: 18px 18px 16px; overflow: hidden; }
.stat .lbl { display: flex; align-items: center; gap: 8px; font-family: var(--pixel); font-size: 10px; letter-spacing: 1.5px; color: var(--muted); }
.stat .lbl svg { width: 16px; height: 16px; color: var(--cyan); }
.stat .val { font-size: 34px; font-weight: 700; margin-top: 8px; letter-spacing: -1px; }
.stat .sub { font-size: 12.5px; color: var(--dim); }
.stat.alert .val { color: var(--warn); }
.meter { height: 10px; padding: 2px; border: 1px solid var(--line-2); margin-top: 10px; }
.meter span { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--green) 0 6px, transparent 6px 8px); }
.meter.high span { background: repeating-linear-gradient(90deg, var(--warn) 0 6px, transparent 6px 8px); }

.cols-2 { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; }
.section { padding: 20px; }
.section-h { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }

.feed { display: grid; }
.feed-item { display: grid; grid-template-columns: 36px 1fr auto; gap: 12px; align-items: center; padding: 11px 4px; border-bottom: 1px solid var(--line); }
.feed-item:last-child { border-bottom: 0; }
.feed-item .fi { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; background: rgba(255, 255, 255, .04); }
.feed-item .fi svg { width: 17px; height: 17px; }
.feed-item .t { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-item .t b { font-weight: 600; }
.feed-item .p { font-family: var(--mono); font-size: 11.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.feed-item .w { font-family: var(--mono); font-size: 11.5px; color: var(--dim); white-space: nowrap; }

.table { width: 100%; border-collapse: collapse; }
.table-wrap { border: 1px solid var(--line); border-radius: 16px; overflow: auto; background: rgba(14, 11, 24, .6); }
.table th { text-align: left; font-family: var(--pixel); font-weight: 400; font-size: 10px; letter-spacing: 1.5px; color: var(--dim); padding: 13px 14px; border-bottom: 1px solid var(--line); background: rgba(255, 255, 255, .02); white-space: nowrap; }
.table td { padding: 13px 14px; border-bottom: 1px solid var(--line); vertical-align: middle; font-size: 14px; }
.table tr:last-child td { border-bottom: 0; }
.table tr.click { cursor: pointer; }
.table tr.click:hover td { background: rgba(255, 255, 255, .03); }
.table .t-actions { text-align: right; white-space: nowrap; }
.cell-user { display: flex; align-items: center; gap: 12px; min-width: 0; }
.cell-user .n { font-weight: 600; }
.cell-user .s { font-size: 12.5px; color: var(--dim); }
.cell-path { font-family: var(--mono); font-size: 12px; color: var(--muted); max-width: 340px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.filter-chips { display: flex; gap: 8px; flex-wrap: wrap; }
.chip { min-height: 34px; padding: 0 14px; border-radius: 30px; border: 1px solid var(--line-2); background: rgba(255, 255, 255, .02); color: var(--muted); font-weight: 600; font-size: 13px; transition: all .15s; }
.chip:hover { color: var(--text); border-color: rgba(255, 255, 255, .25); }
.chip.on { color: #071000; background: var(--green); border-color: var(--green); }

.grant { display: grid; grid-template-columns: 34px 1fr 190px 38px; gap: 12px; align-items: center; padding: 12px; border: 1px solid var(--line); border-radius: 12px; margin-bottom: 8px; background: rgba(255, 255, 255, .02); }
.grant > svg { width: 24px; height: 24px; color: var(--green); }
.grant .gl { font-weight: 600; }
.grant .gp { font-family: var(--mono); font-size: 11.5px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.grant .select { min-height: 38px; font-size: 13.5px; }

.danger-zone { margin-top: 18px; padding: 16px; border-radius: 14px; border: 1px solid rgba(255, 77, 109, .25); background: rgba(255, 77, 109, .04); }

.loading-block { display: grid; place-items: center; padding: 60px; color: var(--muted); }
.skeleton { border-radius: 16px; background: linear-gradient(90deg, rgba(255, 255, 255, .03), rgba(255, 255, 255, .07), rgba(255, 255, 255, .03)); background-size: 200% 100%; animation: shimmer 1.2s infinite; }
@keyframes shimmer { to { background-position: -200% 0; } }

/* Öffentliche Freigabe-Seite */
.share-page { min-height: 100vh; display: flex; flex-direction: column; }
.share-top { display: flex; align-items: center; gap: 12px; padding: 18px 26px; border-bottom: 1px solid var(--line); }
.share-main { flex: 1; width: min(980px, 100%); margin: 0 auto; padding: 36px 20px 80px; }
.share-hero { display: grid; justify-items: center; text-align: center; gap: 10px; padding: 44px 26px; }
.share-hero .ficon { width: 86px; height: 86px; margin-bottom: 6px; }
.share-hero .h1 { font-size: 26px; }
.share-preview { margin-top: 20px; border-radius: 16px; overflow: hidden; border: 1px solid var(--line); max-height: 70vh; display: grid; place-items: center; background: #0a0812; }
.share-preview img, .share-preview video { max-width: 100%; max-height: 70vh; }
.share-preview iframe { width: 100%; height: 70vh; border: 0; background: #fff; }
.share-foot { padding: 22px; text-align: center; color: var(--dim); font-size: 12.5px; }

/* =====================================================================
   RESPONSIVE
   ===================================================================== */
@media (max-width: 1100px) {
  .cols-2 { grid-template-columns: 1fr; }
}
@media (max-width: 960px) {
  #toasts { left: 50%; right: auto; transform: translateX(-50%); }
  .auth { grid-template-columns: 1fr; }
  .auth-hero { padding: 40px 20px 120px; border-right: 0; border-bottom: 1px solid var(--line); min-height: auto; }
  .synth-sun { width: 320px; height: 320px; bottom: 60px; }
  .synth-grid { height: 170px; }
  .auth-claims { display: none; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: fixed; left: 0; top: 0; bottom: 0; width: min(300px, 86vw); transform: translateX(-102%); transition: transform .28s var(--ease); }
  .sidebar.open { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, .6); }
  .scrim.on { display: block; position: fixed; inset: 0; z-index: 35; background: rgba(0, 0, 0, .55); }
  .topbar { padding: 10px 14px; gap: 8px; }
  .topbar .menu-btn { display: inline-grid; }
  .topbar .hide-m { display: none; }
  .search kbd { display: none; }
  .search { max-width: none; }
  .search + .spacer { display: none; }
  .content { padding: 20px 14px 140px; }
  .files-grid { grid-template-columns: repeat(auto-fill, minmax(146px, 1fr)); gap: 12px; }
  .lrow { grid-template-columns: 30px 26px minmax(0, 1fr) 40px; }
  .lrow .c-size, .lrow .c-date { display: none; }
  .choice-grid, .grid-2 { grid-template-columns: 1fr; }
  .grant { grid-template-columns: 28px 1fr 38px; }
  .grant .select { grid-column: 2 / 4; }
  .fab { display: grid !important; }
  .uploads { right: 12px; bottom: 90px; }
  .selbar { bottom: 90px; }
  .modal { border-radius: 18px; }
  .page-head .actions .btn span.lbl-m { display: none; }
}
.fab {
  display: none; position: fixed; right: 18px; bottom: 20px; z-index: 55; width: 62px; height: 62px; place-items: center; border: 0;
  background: var(--grad-green); color: #071000; clip-path: var(--chamfer); box-shadow: 0 10px 30px rgba(157, 255, 58, .35);
}
.fab svg { width: 28px; height: 28px; }

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .001ms !important; animation-iteration-count: 1 !important; transition-duration: .001ms !important; }
}
@media print { .fx-bg, .fx-scan, .sidebar, .topbar { display: none !important; } }

/* Icon-Größen in Zeilen/Karten */
.lrow > svg:not(.ficon-sm), .user-card > svg, .t-actions > svg, td > svg { width: 18px; height: 18px; }
.ci { width: 20px; height: 20px; }
.fi svg.ficon-sm { width: 18px; height: 18px; filter: none; }

/* =====================================================================
   PHASE 2 – Topbar-Werkzeuge, Glocke, Notizblock, Befehlspalette
   ===================================================================== */
.topbar-left { display: flex; align-items: center; gap: 12px; flex: 1; min-width: 0; }
.topbar-global { display: flex; align-items: center; gap: 4px; flex: none; }
.tg-btn { position: relative; }
.tg-badge { position: absolute; top: 3px; right: 3px; min-width: 17px; height: 17px; padding: 0 4px; border-radius: 9px; display: grid; place-items: center; font-family: var(--mono); font-size: 10px; font-weight: 600; color: #fff; background: var(--pink); box-shadow: 0 0 10px var(--pink); }
.palette-hint { display: inline-flex; align-items: center; gap: 8px; min-height: 38px; padding: 0 10px 0 12px; border: 1px solid var(--line-2); border-radius: 10px; background: rgba(255, 255, 255, .03); color: var(--muted); font-size: 13px; }
.palette-hint:hover { color: var(--text); border-color: rgba(46, 233, 255, .45); }
.palette-hint svg { width: 16px; height: 16px; }

.dropdown { position: fixed; z-index: 880; width: min(420px, calc(100vw - 20px)); max-height: min(560px, calc(100vh - 90px)); display: flex; flex-direction: column; border-radius: 16px; background: rgba(18, 14, 30, .98); border: 1px solid var(--line-2); box-shadow: 0 24px 60px rgba(0, 0, 0, .7); animation: pop .14s var(--ease); overflow: hidden; }
.dropdown-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 14px 16px; border-bottom: 1px solid var(--line); }
.dropdown-b { overflow-y: auto; }
.notif { display: grid; grid-template-columns: 34px 1fr; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.notif:last-child { border-bottom: 0; }
.notif.unread { background: rgba(255, 58, 216, .06); box-shadow: inset 3px 0 0 var(--pink); }
.notif .t { font-size: 13.5px; }
.notif .p { font-family: var(--mono); font-size: 11px; color: var(--dim); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

.drawer { position: fixed; top: 0; right: 0; bottom: 0; z-index: 870; width: min(480px, 100vw); display: flex; flex-direction: column; background: linear-gradient(180deg, #171126, #0d0a17); border-left: 1px solid var(--line-2); box-shadow: -20px 0 60px rgba(0, 0, 0, .6); animation: slidein .22s var(--ease); }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }
.drawer-h { display: flex; align-items: center; gap: 12px; padding: 16px 18px; border-bottom: 1px solid var(--line); }
.drawer-b { flex: 1; display: flex; flex-direction: column; padding: 14px 18px 18px; min-height: 0; }
.drawer textarea { flex: 1; resize: none; width: 100%; padding: 14px; border-radius: 12px; background: #0a0812; border: 1px solid var(--line-2); color: var(--text); font-family: var(--mono); font-size: 13.5px; line-height: 1.6; outline: none; }
.drawer textarea:focus { border-color: var(--cyan); }
.save-state { font-family: var(--mono); font-size: 11px; color: var(--dim); }
.save-state.ok { color: var(--green); }

.nav-quick { display: grid; gap: 2px; margin-top: 4px; overflow-y: auto; min-height: 0; }
.nav-quick a { display: flex; align-items: center; gap: 10px; padding: 8px 12px; border-radius: 9px; color: var(--muted); font-size: 13.5px; text-decoration: none !important; white-space: nowrap; overflow: hidden; }
.nav-quick a span { overflow: hidden; text-overflow: ellipsis; }
.nav-quick a svg { width: 16px; height: 16px; flex: none; color: var(--warn); }
.nav-quick a:hover { background: rgba(255, 255, 255, .05); color: var(--text); }

/* Befehlspalette */
.cx-palette { position: fixed; inset: 0; z-index: 950; display: flex; justify-content: center; align-items: flex-start; padding: 12vh 14px 14px; background: rgba(4, 3, 8, .7); backdrop-filter: blur(6px); animation: fadein .12s; }
.cx-palette .box { width: min(640px, 100%); max-height: 70vh; display: flex; flex-direction: column; border-radius: 18px; overflow: hidden; background: #130f20; border: 1px solid rgba(46, 233, 255, .4); box-shadow: 0 30px 80px rgba(0, 0, 0, .7), 0 0 40px rgba(46, 233, 255, .15); }
.cx-palette .in { display: flex; align-items: center; gap: 12px; padding: 4px 16px; border-bottom: 1px solid var(--line); }
.cx-palette .in svg { width: 20px; height: 20px; color: var(--cyan); }
.cx-palette .in input { flex: 1; min-height: 56px; border: 0; outline: 0; background: transparent; font-size: 17px; color: var(--text); }
.cx-palette .res { overflow-y: auto; padding: 6px; }
.cx-palette .grp { font-family: var(--pixel); font-size: 9.5px; letter-spacing: 2px; color: var(--dim); padding: 10px 12px 4px; }
.cx-palette .it { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px 12px; border: 0; border-radius: 10px; background: none; text-align: left; color: var(--text); font-size: 14.5px; }
.cx-palette .it svg { width: 18px; height: 18px; flex: none; color: var(--muted); }
.cx-palette .it .sub { margin-left: auto; font-family: var(--mono); font-size: 11px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 45%; }
.cx-palette .it.on { background: rgba(46, 233, 255, .12); box-shadow: inset 0 0 0 1px rgba(46, 233, 255, .35); }
.cx-palette .it.on svg { color: var(--cyan); }
.cx-palette .foot { display: flex; gap: 14px; padding: 9px 14px; border-top: 1px solid var(--line); font-size: 11.5px; color: var(--dim); }

/* =====================================================================
   PROJEKTE
   ===================================================================== */
.st { display: inline-flex; align-items: center; gap: 6px; height: 24px; padding: 0 9px; border-radius: 6px; font-size: 11.5px; font-weight: 700; letter-spacing: .3px; white-space: nowrap; border: 1px solid; }
.st::before { content: ''; width: 7px; height: 7px; background: currentColor; box-shadow: 0 0 8px currentColor; }
.st-briefing { color: #c9a7ff; border-color: rgba(201, 167, 255, .4); background: rgba(201, 167, 255, .08); }
.st-design { color: var(--pink); border-color: rgba(255, 58, 216, .4); background: rgba(255, 58, 216, .08); }
.st-development { color: var(--cyan); border-color: rgba(46, 233, 255, .4); background: rgba(46, 233, 255, .08); }
.st-feedback { color: var(--warn); border-color: rgba(255, 194, 71, .4); background: rgba(255, 194, 71, .08); }
.st-approval { color: var(--orange); border-color: rgba(255, 155, 61, .4); background: rgba(255, 155, 61, .08); }
.st-live { color: var(--green); border-color: rgba(157, 255, 58, .45); background: rgba(157, 255, 58, .08); }
.st-paused { color: var(--muted); border-color: var(--line-2); background: rgba(255, 255, 255, .03); }
.st-paused::before { box-shadow: none; }

.proj-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.pcard { position: relative; display: flex; flex-direction: column; gap: 12px; padding: 18px; border-radius: 18px; cursor: pointer; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(26, 20, 42, .8), rgba(14, 11, 24, .85)); transition: transform .18s var(--ease), border-color .18s, box-shadow .25s; }
.pcard:hover { transform: translateY(-3px); border-color: rgba(46, 233, 255, .45); box-shadow: 0 14px 30px rgba(0, 0, 0, .45), 0 0 24px rgba(46, 233, 255, .12); }
.pcard .top { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.pcard .nm { font-size: 18px; font-weight: 700; line-height: 1.25; word-break: break-word; }
.pcard .cl { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.pcard .cl svg { width: 14px; height: 14px; }
.pcard .meta { display: flex; flex-wrap: wrap; gap: 6px; }
.pcard .links { display: flex; gap: 6px; flex-wrap: wrap; margin-top: auto; }
.progress { height: 10px; padding: 2px; border: 1px solid var(--line-2); }
.progress span { display: block; height: 100%; background: repeating-linear-gradient(90deg, var(--green) 0 6px, transparent 6px 8px); box-shadow: 0 0 8px rgba(157, 255, 58, .5); }
.progress-l { display: flex; justify-content: space-between; font-family: var(--mono); font-size: 11px; color: var(--dim); margin-bottom: 5px; }
.due { font-family: var(--mono); font-size: 11.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 5px; }
.due svg { width: 13px; height: 13px; }
.due.over { color: #ff8aa0; }
.due.soon { color: var(--warn); }

.pdetail { display: grid; grid-template-columns: 1.1fr 1fr; gap: 22px; }
.tasks { display: grid; gap: 6px; margin-bottom: 10px; }
.task { display: flex; align-items: center; gap: 10px; padding: 9px 10px; border-radius: 10px; border: 1px solid var(--line); background: rgba(255, 255, 255, .02); }
.task .cb { width: 22px; height: 22px; flex: none; display: grid; place-items: center; border: 1.5px solid var(--line-2); border-radius: 6px; background: none; color: transparent; padding: 0; }
.task .cb svg { width: 14px; height: 14px; }
.task.done .cb { background: var(--green); border-color: var(--green); color: #071000; }
.task.done .tx { color: var(--dim); text-decoration: line-through; }
.task .tx { flex: 1; font-size: 14px; }
.task .icon-btn { width: 30px; height: 30px; opacity: .5; }
.task:hover .icon-btn { opacity: 1; }
.notes-area { width: 100%; min-height: 220px; padding: 12px 14px; border-radius: 12px; background: rgba(5, 4, 10, .6); border: 1px solid var(--line-2); color: var(--text); font-family: var(--mono); font-size: 13px; line-height: 1.6; resize: vertical; outline: none; }
.notes-area:focus { border-color: var(--cyan); }

/* Kunden-Projektansicht: Fortschritts-Schritte */
.steps-line { display: flex; align-items: flex-start; gap: 0; margin: 14px 0 6px; }
.steps-line .s { flex: 1; display: grid; justify-items: center; gap: 6px; text-align: center; position: relative; font-size: 11.5px; color: var(--dim); }
.steps-line .s::before { content: ''; position: absolute; top: 9px; left: -50%; right: 50%; height: 2px; background: var(--line-2); z-index: 0; }
.steps-line .s:first-child::before { display: none; }
.steps-line .s .d { position: relative; z-index: 1; width: 20px; height: 20px; border: 2px solid var(--line-2); background: var(--bg-2); }
.steps-line .s.done { color: var(--muted); }
.steps-line .s.done .d { background: var(--green); border-color: var(--green); }
.steps-line .s.done::before, .steps-line .s.cur::before { background: var(--green); }
.steps-line .s.cur { color: var(--green); font-weight: 700; }
.steps-line .s.cur .d { border-color: var(--green); box-shadow: 0 0 14px var(--green); background: #0a0812; animation: blink 1.6s steps(2) infinite; }
.msg-box { padding: 14px 16px; border-radius: 12px; border: 1px solid rgba(46, 233, 255, .3); background: rgba(46, 233, 255, .05); font-size: 14px; white-space: pre-wrap; }

/* =====================================================================
   TRESOR
   ===================================================================== */
.vault-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 14px; }
.vcard { display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 16px; border: 1px solid var(--line); background: linear-gradient(180deg, rgba(26, 20, 42, .8), rgba(14, 11, 24, .85)); transition: border-color .15s, box-shadow .2s; }
.vcard:hover { border-color: rgba(46, 233, 255, .35); }
.vcard.pinned { border-color: rgba(255, 194, 71, .4); }
.vcard .hd { display: flex; align-items: flex-start; gap: 10px; }
.vcard .ti { flex: 1; font-weight: 700; font-size: 15px; line-height: 1.3; word-break: break-word; }
.vcard pre { margin: 0; max-height: 150px; overflow: hidden; padding: 12px; border-radius: 10px; background: #0a0812; border: 1px solid var(--line); font-family: var(--mono); font-size: 12px; line-height: 1.55; color: #cfc8e6; white-space: pre-wrap; word-break: break-word; -webkit-mask: linear-gradient(#000 70%, transparent); mask: linear-gradient(#000 70%, transparent); }
.vcard .ft { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.tag { font-family: var(--mono); font-size: 11px; padding: 2px 7px; border-radius: 5px; color: var(--cyan); background: rgba(46, 233, 255, .08); border: 1px solid rgba(46, 233, 255, .2); }
.kind-prompt { color: var(--pink); border-color: rgba(255, 58, 216, .4); background: rgba(255, 58, 216, .08); }
.kind-code { color: var(--cyan); border-color: rgba(46, 233, 255, .4); background: rgba(46, 233, 255, .07); }
.kind-command { color: var(--green); border-color: rgba(157, 255, 58, .4); background: rgba(157, 255, 58, .08); }
.kind-note { color: #c9a7ff; border-color: rgba(201, 167, 255, .4); background: rgba(201, 167, 255, .08); }
.kind-link { color: var(--warn); border-color: rgba(255, 194, 71, .4); background: rgba(255, 194, 71, .08); }
.code-input { min-height: 260px; font-family: var(--mono); font-size: 13px; line-height: 1.6; }

/* =====================================================================
   EDITOR & LIVE-VORSCHAU
   ===================================================================== */
.ed-wrap { position: fixed; inset: 0; z-index: 860; display: flex; flex-direction: column; background: #07060c; animation: fadein .12s; }
.ed-h { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-bottom: 1px solid var(--line); background: #0e0b18; flex-wrap: wrap; }
.ed-h .t { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-h .dirty { width: 9px; height: 9px; border-radius: 50%; background: var(--warn); box-shadow: 0 0 8px var(--warn); }
.ed-b { flex: 1; min-height: 0; display: flex; }
.ed-pane { flex: 1; min-width: 0; display: flex; position: relative; }
.ed-gutter { flex: none; width: 54px; padding: 14px 8px 14px 0; text-align: right; overflow: hidden; background: #0b0914; border-right: 1px solid var(--line); color: #4d4668; font-family: var(--mono); font-size: 13px; line-height: 1.6; white-space: pre; user-select: none; }
.ed-text { flex: 1; min-width: 0; padding: 14px 16px; border: 0; outline: 0; resize: none; background: transparent; color: #e6e1f5; font-family: var(--mono); font-size: 13px; line-height: 1.6; white-space: pre; overflow: auto; tab-size: 2; caret-color: var(--green); }
.ed-text::selection { background: rgba(46, 233, 255, .25); }
.ed-text[readonly] { color: #a8a0c4; }
.ed-split { flex: 1; min-width: 0; border-left: 1px solid var(--line); background: #fff; }
.ed-split iframe { width: 100%; height: 100%; border: 0; display: block; }
.ed-status { display: flex; gap: 16px; padding: 6px 14px; border-top: 1px solid var(--line); background: #0e0b18; font-family: var(--mono); font-size: 11.5px; color: var(--dim); }

.pv-wrap { position: fixed; inset: 0; z-index: 860; display: flex; flex-direction: column; background: #07060c; animation: fadein .12s; }
.pv-stage { flex: 1; min-height: 0; overflow: auto; display: flex; justify-content: center; align-items: flex-start; padding: 22px; background:
  linear-gradient(rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 30px 30px,
  linear-gradient(90deg, rgba(255, 255, 255, .025) 1px, transparent 1px) 0 0 / 30px 30px; }
.pv-frame { width: 100%; height: 100%; min-height: 400px; border-radius: 12px; overflow: hidden; background: #fff; box-shadow: 0 30px 80px rgba(0, 0, 0, .6), 0 0 0 1px var(--line-2); transition: width .3s var(--ease); }
.pv-frame.tablet { width: 820px; height: min(1180px, 100%); border-radius: 26px; box-shadow: 0 0 0 10px #1a1528, 0 0 0 11px var(--line-2), 0 30px 80px rgba(0, 0, 0, .6); }
.pv-frame.phone { width: 390px; height: min(844px, 100%); border-radius: 38px; box-shadow: 0 0 0 10px #1a1528, 0 0 0 11px rgba(255, 58, 216, .4), 0 30px 80px rgba(0, 0, 0, .6); }
.pv-frame iframe { width: 100%; height: 100%; border: 0; display: block; }

/* Einstellungen */
.set-grid { display: grid; gap: 18px; grid-template-columns: 1fr 1fr; }
.howto { margin: 0; padding-left: 20px; color: var(--muted); font-size: 13.5px; line-height: 1.7; }
.howto code, .inline-code { font-family: var(--mono); font-size: 12px; padding: 1px 6px; border-radius: 5px; background: rgba(255, 255, 255, .06); color: var(--cyan); }
.cmd-box { position: relative; margin: 8px 0 14px; padding: 12px 52px 12px 14px; border-radius: 10px; background: #0a0812; border: 1px solid var(--line-2); font-family: var(--mono); font-size: 12px; line-height: 1.6; color: var(--green); white-space: pre-wrap; word-break: break-all; }
.cmd-box .icon-btn { position: absolute; top: 6px; right: 6px; }
.tok-row { display: grid; grid-template-columns: 1fr auto auto; gap: 12px; align-items: center; padding: 12px 0; border-bottom: 1px solid var(--line); }
.tok-row:last-child { border-bottom: 0; }

@media (max-width: 960px) {
  .palette-hint .lbl, .palette-hint kbd { display: none; }
  .palette-hint { padding: 0 10px; }
  .pdetail, .set-grid { grid-template-columns: 1fr; }
  .ed-split { display: none; }
  .ed-gutter { width: 40px; }
  .pv-stage { padding: 10px; }
}
.ed-h > svg { width: 20px; height: 20px; flex: none; color: var(--cyan); }
.segmented button svg { width: 18px; height: 18px; display: inline-block; vertical-align: middle; }
.stats { grid-template-columns: repeat(auto-fit, minmax(165px, 1fr)); }
/* Symbole in leeren Zuständen (Tresor, Links, Papierkorb, Projekte, Suche) */
.empty > svg.ficon { width: 76px; height: 76px; margin-bottom: 6px; }

/* =====================================================================
   PHASE 3 – Abstimmung (Review), Pakete, Angebotsseite
   ===================================================================== */
.rv-wrap { position: fixed; inset: 0; display: flex; flex-direction: column; background: #07060c; }
.rv-head { display: flex; align-items: center; gap: 10px; padding: 10px 16px; border-bottom: 1px solid var(--line); background: rgba(12, 9, 20, .92); backdrop-filter: blur(12px); flex-wrap: wrap; position: relative; z-index: 2; }
.rv-brand { display: flex; align-items: center; gap: 10px; min-width: 0; }
.rv-brand img { width: 38px; height: 38px; border-radius: 10px; object-fit: cover; box-shadow: var(--glow-pink); }
.rv-brand .kicker { margin: 0; font-size: 10px; }
.rv-title { font-weight: 700; font-size: 15.5px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 32vw; }
.rv-version { width: auto; min-width: 180px; max-width: 360px; min-height: 38px; padding-top: 6px; padding-bottom: 6px; font-size: 13.5px; }
.rv-cbtn { min-height: 38px; }
.rv-cbtn.btn-pink { box-shadow: var(--glow-pink); animation: rvglow 1.6s ease-in-out infinite; }
@keyframes rvglow { 50% { filter: brightness(1.18); } }
.rv-banner { display: flex; align-items: center; gap: 10px; padding: 10px 18px; font-size: 14px; border-bottom: 1px solid var(--line); background: rgba(46, 233, 255, .07); color: #d8f9ff; }
.rv-banner > svg { width: 18px; height: 18px; flex: none; color: var(--cyan); }
.rv-banner > span { flex: 1; }
.rv-banner.ok { background: rgba(157, 255, 58, .08); color: #e6ffd0; }
.rv-banner.ok > svg { color: var(--green); }
.rv-banner.warn { background: rgba(255, 194, 71, .08); color: #ffe9bd; }
.rv-banner.warn > svg { color: var(--warn); }
.rv-body { flex: 1; min-height: 0; display: grid; grid-template-columns: 1fr 370px; }
.rv-wrap.side-hidden .rv-body { grid-template-columns: 1fr 0; }
.rv-wrap.side-hidden .rv-side { display: none; }
.rv-stage { padding: 18px; }
.rv-side { border-left: 1px solid var(--line); background: rgba(14, 11, 24, .96); overflow-y: auto; padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.rv-side-h { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.rv-side-h .kicker { margin: 0 0 2px; font-size: 10px; }
.rv-side .segmented button { padding: 6px 12px; font-size: 12.5px; }
.rv-compose { display: grid; gap: 8px; padding: 14px; border-radius: var(--r); border: 1px solid rgba(255, 58, 216, .55); background: rgba(255, 58, 216, .06); box-shadow: 0 0 24px rgba(255, 58, 216, .14); animation: fadein .15s; }
.rv-compose .textarea { min-height: 84px; }
.rv-hint { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: var(--r); border: 1px dashed var(--line-2); color: var(--muted); font-size: 13.5px; line-height: 1.5; }
.rv-hint > svg { width: 18px; height: 18px; flex: none; margin-top: 2px; color: var(--cyan); }
.rv-hint b { color: var(--text); }
.rv-hint.pulse { border-color: rgba(255, 58, 216, .6); color: #ffd6f6; animation: rvpulse 1.8s ease-in-out infinite; }
.rv-hint.pulse > svg { color: var(--pink); }
@keyframes rvpulse { 50% { box-shadow: 0 0 22px rgba(255, 58, 216, .25); } }
.rv-list { display: grid; gap: 10px; }
.rv-item { display: grid; gap: 8px; padding: 12px; border-radius: var(--r); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .025); transition: border-color .2s, box-shadow .2s, opacity .2s; }
.rv-item.done { opacity: .62; }
.rv-item.done > .rv-text { text-decoration: line-through; text-decoration-color: rgba(255, 255, 255, .3); }
.rv-item.flash { border-color: var(--pink); box-shadow: var(--glow-pink); }
.rv-item-h { display: flex; align-items: center; gap: 10px; }
.rv-num { flex: none; width: 28px; height: 28px; border-radius: 50% 50% 50% 4px; border: 0; display: grid; place-items: center; font: 700 12px var(--font); color: #fff; background: var(--pink); box-shadow: 0 0 12px rgba(255, 58, 216, .5); cursor: pointer; }
.rv-num.admin { background: var(--cyan); color: #04131a; box-shadow: 0 0 12px rgba(46, 233, 255, .5); }
.rv-num:hover { transform: scale(1.08); }
.rv-author { display: flex; align-items: center; gap: 6px; font-size: 13.5px; }
.rv-done { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); cursor: pointer; white-space: nowrap; }
.rv-done input { accent-color: var(--green); width: 16px; height: 16px; }
.rv-el { font-size: 12px; color: var(--dim); font-style: italic; border-left: 2px solid var(--line-2); padding-left: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.rv-text { font-size: 14px; line-height: 1.5; white-space: pre-wrap; word-break: break-word; }
.rv-reply { margin-left: 14px; padding: 8px 10px; border-radius: 10px; background: rgba(255, 255, 255, .035); display: grid; gap: 4px; }
.rv-reply .rv-text { font-size: 13.5px; }
.rv-item .input { min-height: 36px; font-size: 13.5px; padding: 6px 12px; }
.rv-note { padding: 12px 14px; border-radius: var(--r); background: rgba(157, 255, 58, .06); border: 1px solid rgba(157, 255, 58, .25); font-size: 13.5px; line-height: 1.5; white-space: pre-wrap; }
.rv-note .kicker { margin: 0 0 4px; font-size: 10px; }
.rv-confirm { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: var(--r); border: 1px solid var(--line-2); background: rgba(255, 255, 255, .03); cursor: pointer; font-size: 14px; line-height: 1.5; }
.rv-confirm input { width: 20px; height: 20px; flex: none; margin-top: 1px; accent-color: var(--green); }
.rv-callout { display: flex; gap: 12px; align-items: flex-start; margin: 14px 0; padding: 14px 16px; border-radius: var(--r); border: 1px solid rgba(255, 58, 216, .45); background: rgba(255, 58, 216, .07); }
.rv-callout > svg { width: 22px; height: 22px; flex: none; color: var(--pink); margin-top: 2px; }
.rel-box { margin-top: 22px; padding-top: 18px; border-top: 1px solid var(--line); }
.rel-box .fi { display: grid; place-items: center; }
.rel-box .badge svg { width: 12px; height: 12px; }
.pcard .meta .badge svg, .pkg .badge svg { width: 12px; height: 12px; }
@media (max-width: 860px) {
  .rv-body { grid-template-columns: 1fr; grid-template-rows: 1fr auto; }
  .rv-side { border-left: 0; border-top: 1px solid var(--line); max-height: 46vh; }
  .rv-title { max-width: 46vw; }
  .rv-version { min-width: 0; flex: 1; }
  .rv-stage { padding: 8px; }
}
@media (max-width: 560px) {
  .rv-head { gap: 8px; padding: 8px 10px; }
  .rv-head > .grow, .rv-head .segmented { display: none; }
  .rv-brand { flex: 1; order: 0; }
  .rv-brand img { width: 32px; height: 32px; }
  .rv-title { max-width: 100%; font-size: 14px; }
  .rv-head > .btn, .rv-head > .badge { order: 1; }
  .rv-sidetoggle { order: 2; }
  .rv-version { order: 3; flex: 1 1 100%; max-width: none; }
  .rv-cbtn span { display: none; }
  .rv-banner { padding: 8px 12px; font-size: 13px; flex-wrap: wrap; }
  .rv-stage { padding: 0; }
  .rv-stage .pv-frame, .rv-stage .pv-frame.phone, .rv-stage .pv-frame.tablet { width: 100%; height: 100%; border-radius: 0; box-shadow: none; }
}

/* Pakete */
.pkg-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 18px; align-items: stretch; }
.pkg { position: relative; display: flex; flex-direction: column; gap: 10px; padding: 22px; border-radius: var(--r-lg); border: 1px solid var(--line-2); background: linear-gradient(180deg, rgba(28, 22, 46, .85), rgba(14, 11, 24, .9)); overflow: hidden; transition: transform .2s var(--ease), box-shadow .2s; }
.pkg::before { content: ''; position: absolute; inset: 0 0 auto; height: 3px; background: var(--grad); }
.pkg:hover { transform: translateY(-2px); box-shadow: 0 20px 50px rgba(0, 0, 0, .45); }
.pkg.tier-S::before { background: var(--grad-green); }
.pkg.tier-M::before { background: linear-gradient(90deg, var(--cyan), var(--purple)); }
.pkg.tier-L::before { background: linear-gradient(90deg, var(--purple), var(--pink)); }
.pkg.tier-XL::before { background: linear-gradient(90deg, var(--pink), var(--orange)); }
.pkg.tier-L, .pkg.tier-XL { border-color: rgba(255, 58, 216, .3); }
.pkg.muted { opacity: .55; }
.pkg-top { display: flex; align-items: center; justify-content: space-between; }
.pkg-tier { font-family: var(--pixel); font-size: 11px; letter-spacing: .08em; color: var(--cyan); }
.pkg.tier-S .pkg-tier { color: var(--green); }
.pkg.tier-L .pkg-tier, .pkg.tier-XL .pkg-tier { color: var(--pink); }
.pkg-name { font-size: 22px; font-weight: 700; }
.pkg-tag { color: var(--muted); font-size: 14px; margin-top: -4px; }
.pkg-price { font-size: 32px; font-weight: 700; letter-spacing: -.01em; display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.pkg-price span { font-size: 13px; font-weight: 400; color: var(--muted); }
.pkg-del { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); }
.pkg-del svg { width: 15px; height: 15px; color: var(--cyan); }
.pkg-feat { list-style: none; margin: 6px 0 0; padding: 0; display: grid; gap: 8px; flex: 1; align-content: start; }
.pkg-feat li { display: flex; gap: 9px; font-size: 14px; line-height: 1.45; }
.pkg-feat svg { width: 16px; height: 16px; flex: none; margin-top: 2px; color: var(--green); }
.pkg-act { display: flex; flex-wrap: wrap; gap: 8px; margin-top: 10px; padding-top: 14px; border-top: 1px solid var(--line); }
.pub-hero { text-align: center; padding: 10px 0 36px; }
.pub-logo { display: block; width: min(360px, 80%); border-radius: 16px; box-shadow: var(--glow-pink); margin: 0 auto 22px; }

/* Abnahmeprotokoll drucken */
@media print {
  body.cx-printing > *:not(.modal-wrap) { display: none !important; }
  body.cx-printing .modal-wrap { position: static; background: none; backdrop-filter: none; }
  body.cx-printing .modal { box-shadow: none; border: 0; background: #fff; color: #111; width: 100%; max-height: none; }
  body.cx-printing .modal-h button, body.cx-printing .modal-f { display: none !important; }
  body.cx-printing .modal *, body.cx-printing .modal td { color: #111 !important; }
}
