[hidden] { display: none !important; }
:root {
  --bg: #0b0d17; --panel: rgba(22, 25, 41, .72); --panel-solid: #161929; --line: rgba(255, 255, 255, .08);
  --text: #eef0fa; --dim: #9aa0bd; --accent: #7c5cff; --accent2: #22d3ee; --danger: #ff5c7a; --ok: #34d399;
  --radius: 20px; --shadow: 0 20px 60px rgba(0, 0, 0, .45);
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  background: var(--bg); color: var(--text); min-height: 100vh; display: flex; flex-direction: column;
  font: 15px/1.5 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; -webkit-font-smoothing: antialiased;
}
a { color: inherit; text-decoration: none; }
code { font: 13px ui-monospace, SFMono-Regular, Menlo, monospace; background: rgba(124, 92, 255, .14); color: #c9bcff; padding: 2px 7px; border-radius: 6px; }
h1 { font-size: clamp(28px, 4vw, 44px); line-height: 1.1; letter-spacing: -.02em; margin: 4px 0 8px; }
h2 { font-size: 19px; margin: 0 0 14px; letter-spacing: -.01em; }
.dim { color: var(--dim); }
.small { font-size: 13px; }
.big { font-size: 56px; line-height: 1; margin-bottom: 12px; }

/* Hintergrund: weiche, langsam wandernde Farbflächen */
.bg { position: fixed; inset: 0; z-index: -1; overflow: hidden; }
.bg i { position: absolute; width: 60vmax; height: 60vmax; border-radius: 50%; filter: blur(90px); opacity: .32; animation: drift 28s ease-in-out infinite alternate; }
.bg i:nth-child(1) { background: var(--accent); top: -25vmax; left: -15vmax; }
.bg i:nth-child(2) { background: var(--accent2); bottom: -30vmax; right: -20vmax; animation-duration: 34s; }
.bg i:nth-child(3) { background: #ec4899; top: 30%; left: 45%; width: 35vmax; height: 35vmax; opacity: .14; animation-duration: 40s; }
@keyframes drift { to { transform: translate(6vmax, 4vmax) scale(1.1); } }
@media (prefers-reduced-motion: reduce) { .bg i { animation: none; } }

/* Kopfleiste */
.bar { position: sticky; top: 0; z-index: 10; display: flex; align-items: center; justify-content: space-between; gap: 16px;
  padding: 14px clamp(16px, 4vw, 48px); backdrop-filter: blur(18px); background: rgba(11, 13, 23, .6); border-bottom: 1px solid var(--line); }
.brand { font-weight: 700; font-size: 18px; display: flex; align-items: center; gap: 10px; }
.brand .dim { font-weight: 500; }
.mark { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; background: linear-gradient(135deg, var(--accent), var(--accent2)); color: #fff; }
.bar nav { display: flex; align-items: center; gap: 10px; }
.bar nav > a { padding: 8px 14px; border-radius: 999px; color: var(--dim); }
.bar nav > a:hover, .bar nav > a.on { color: var(--text); background: rgba(255, 255, 255, .06); }
.who { display: flex; align-items: center; gap: 8px; color: var(--dim); }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: rgba(124, 92, 255, .25); color: #d9d0ff; font-weight: 700; font-size: 13px; }

main { flex: 1; width: 100%; max-width: 1200px; margin: 0 auto; padding: clamp(20px, 4vw, 48px) clamp(16px, 4vw, 48px); }
body.center main { display: grid; place-items: center; }

/* Flächen */
.panel { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: clamp(18px, 3vw, 28px); box-shadow: var(--shadow); backdrop-filter: blur(20px); margin-bottom: 22px; }
.panel.narrow { width: 100%; max-width: 440px; }
.panel-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin-bottom: 12px; }
.panel-head h2 { margin: 0; }
.hero { text-align: center; padding: 40px 32px; }
.hero .stack { text-align: left; margin-top: 22px; }
.logo-xl { width: 76px; height: 76px; margin: 0 auto 18px; border-radius: 22px; display: grid; place-items: center; font-size: 36px; color: #fff;
  background: linear-gradient(135deg, var(--accent), var(--accent2)); box-shadow: 0 16px 50px rgba(124, 92, 255, .5); }
.status { text-align: center; padding: 48px 32px; }

.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 24px; flex-wrap: wrap; margin-bottom: 26px; }
.eyebrow { margin: 0; text-transform: uppercase; letter-spacing: .14em; font-size: 12px; color: var(--accent2); font-weight: 600; }
.eyebrow a:hover { text-decoration: underline; }
.lead { margin: 0; max-width: 60ch; }
.stats { display: flex; gap: 10px; }
.stats > div { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 12px 18px; min-width: 110px; }
.stats > div > b { display: block; font-size: 20px; }
.stats > div > span { color: var(--dim); font-size: 12px; }

/* Belegt-Balken */
.stats .usage { min-width: 240px; }
.meter-label { display: flex; align-items: baseline; gap: 6px; margin-bottom: 8px; }
.meter-label b { font-size: 20px; }
.meter-label span { color: var(--dim); font-size: 12px; }
.meter-track { height: 8px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.meter-fill { height: 100%; width: 0; border-radius: 99px; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .8s cubic-bezier(.2, .8, .2, 1); }
.meter.warn .meter-fill { background: linear-gradient(90deg, #f59e0b, #facc15); }
.meter.full .meter-fill { background: linear-gradient(90deg, #f43f5e, var(--danger)); }
.card .meter { margin-bottom: 14px; }
.card .meter-label b { font-size: 15px; }

/* Formulare und Knöpfe */
.stack { display: flex; flex-direction: column; gap: 14px; }
label { display: flex; flex-direction: column; gap: 6px; font-size: 13px; color: var(--dim); font-weight: 500; }
label.check { flex-direction: row; align-items: center; gap: 10px; color: var(--text); font-size: 14px; }
input, select, textarea { font: inherit; color: var(--text); background: rgba(255, 255, 255, .04); border: 1px solid var(--line); border-radius: 12px; padding: 12px 14px; outline: none; transition: border-color .15s, box-shadow .15s; }
input:focus, select:focus, textarea:focus { border-color: var(--accent); box-shadow: 0 0 0 4px rgba(124, 92, 255, .2); }
select option { background: var(--panel-solid); }
input[type=checkbox] { width: 18px; height: 18px; accent-color: var(--accent); }
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; font: inherit; font-weight: 600; cursor: pointer; white-space: nowrap;
  padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: rgba(255, 255, 255, .05); color: var(--text); transition: transform .12s, background .15s, box-shadow .15s; }
.btn:hover { background: rgba(255, 255, 255, .1); }
.btn:active { transform: scale(.97); }
.btn.primary { border: 0; background: linear-gradient(135deg, var(--accent), #5b8cff); box-shadow: 0 8px 26px rgba(124, 92, 255, .4); }
.btn.primary:hover { box-shadow: 0 10px 34px rgba(124, 92, 255, .6); }
.btn.danger { color: var(--danger); border-color: rgba(255, 92, 122, .35); }
.btn.lg { padding: 14px 22px; font-size: 16px; }
.btn.ghost, button.ghost { background: none; border: 0; color: var(--dim); cursor: pointer; font: inherit; padding: 8px 10px; }
.btn.ghost:hover, button.ghost:hover { color: var(--text); }
.row-btns { display: flex; gap: 10px; justify-content: flex-end; flex-wrap: wrap; }
.icon-btn { display: inline-grid; place-items: center; width: 34px; height: 34px; border-radius: 10px; border: 0; background: none; color: var(--dim); cursor: pointer; font-size: 15px; }
.icon-btn:hover { background: rgba(255, 255, 255, .08); color: var(--text); }
.icon-btn.danger:hover { color: var(--danger); background: rgba(255, 92, 122, .12); }
.alert { background: rgba(255, 92, 122, .12); border: 1px solid rgba(255, 92, 122, .35); color: #ffc2cd; padding: 10px 14px; border-radius: 12px; margin-top: 16px; }
.pill { display: inline-block; font-size: 11px; font-weight: 600; padding: 3px 9px; border-radius: 999px; background: rgba(255, 92, 122, .15); color: #ffb0bf; vertical-align: middle; }
.toast { position: fixed; z-index: 50; left: 50%; bottom: 28px; transform: translateX(-50%); max-width: calc(100vw - 32px); background: var(--panel-solid); border: 1px solid var(--line);
  border-left: 4px solid var(--ok); padding: 14px 20px; border-radius: 14px; box-shadow: var(--shadow); animation: toast 5s forwards; }
@keyframes toast { 0%, 85% { transform: translate(-50%, 0); } 100% { transform: translate(-50%, 160%); visibility: hidden; } }

/* Dateiliste */
.toolbar { display: flex; justify-content: space-between; align-items: center; gap: 14px; flex-wrap: wrap; padding-bottom: 16px; border-bottom: 1px solid var(--line); }
.crumbs { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; font-weight: 600; }
.crumbs a { padding: 6px 10px; border-radius: 10px; }
.crumbs a:hover { background: rgba(255, 255, 255, .06); }
.crumbs span { color: var(--dim); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.filter { padding: 9px 14px; width: 180px; }
.list { list-style: none; margin: 0; padding: 0; }
.row { display: grid; grid-template-columns: 1fr 110px 150px 120px; align-items: center; gap: 12px; padding: 6px 8px; border-bottom: 1px solid var(--line); border-radius: 12px; transition: background .12s; }
.row:hover { background: rgba(255, 255, 255, .04); }
.row:last-child { border-bottom: 0; }
.row .name { display: flex; align-items: center; gap: 14px; min-width: 0; padding: 8px 0; font-weight: 500; }
.row .name span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.row .meta { color: var(--dim); font-size: 13px; }
.row .ops { display: flex; justify-content: flex-end; gap: 2px; }
.row .ops form { margin: 0; }
.row.up { grid-template-columns: 1fr; }
.ico { flex: none; display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; font-size: 19px; background: rgba(255, 255, 255, .06); }
.k-dir { background: rgba(250, 204, 21, .14); } .k-pdf { background: rgba(255, 92, 122, .16); } .k-doc { background: rgba(91, 140, 255, .18); }
.k-xls { background: rgba(52, 211, 153, .16); } .k-ppt { background: rgba(251, 146, 60, .16); } .k-img { background: rgba(236, 72, 153, .16); }
.k-zip { background: rgba(167, 139, 250, .18); } .k-vid, .k-aud { background: rgba(34, 211, 238, .16); }
.empty { text-align: center; padding: 60px 20px; color: var(--dim); }

/* Uploads */
.uploads { display: grid; gap: 8px; padding: 14px 0; border-bottom: 1px solid var(--line); }
.up-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 12px; font-size: 13px; }
.up-item .bar-track { grid-column: 1 / -1; height: 6px; border-radius: 99px; background: rgba(255, 255, 255, .08); overflow: hidden; }
.up-item .bar-fill { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), var(--accent2)); transition: width .2s; }
.up-item.done .bar-fill { background: var(--ok); }
.up-item.err .bar-fill { background: var(--danger); width: 100%; }
.up-item.err .state { color: var(--danger); }
.dropzone { position: fixed; inset: 0; z-index: 40; display: grid; place-items: center; text-align: center; font-size: 22px; font-weight: 700;
  background: rgba(11, 13, 23, .78); backdrop-filter: blur(8px); border: 3px dashed var(--accent); border-radius: 24px; margin: 14px; pointer-events: none; }

/* Verwaltung */
.cards { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 18px; }
.card { position: relative; background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 22px; transition: transform .18s, border-color .18s, box-shadow .18s; }
.card:hover { transform: translateY(-3px); border-color: rgba(124, 92, 255, .5); box-shadow: 0 18px 50px rgba(124, 92, 255, .2); }
.card.off { opacity: .6; }
.card h2 { margin: 10px 0 4px; }
.card p { margin: 0 0 16px; min-height: 1.5em; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.card .tag { font: 12px ui-monospace, Menlo, monospace; color: var(--accent2); }
.card .pill { position: absolute; top: 18px; right: 18px; }
.nums { display: flex; gap: 16px; font-size: 13px; color: var(--dim); }
.nums b { color: var(--text); }
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14px; }
.table th { text-align: left; font-size: 12px; text-transform: uppercase; letter-spacing: .08em; color: var(--dim); font-weight: 600; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.table td { padding: 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.table tr.off td { opacity: .55; }
.table .ops { text-align: right; }
.secret { font: 13px ui-monospace, Menlo, monospace; color: var(--text); background: rgba(255, 255, 255, .05); border: 1px dashed var(--line); border-radius: 8px; padding: 4px 10px; cursor: pointer; }
.split { display: grid; grid-template-columns: 1fr 1fr; gap: 22px; }
.split .panel { margin: 0; }
.log { list-style: none; margin: 0; padding: 0; max-height: 420px; overflow: auto; font-size: 14px; }
.log li { padding: 8px 0; border-bottom: 1px solid var(--line); }
.danger-zone { margin-top: 22px; border-top: 1px solid var(--line); padding-top: 14px; }
.danger-zone summary { cursor: pointer; color: var(--danger); font-weight: 600; margin-bottom: 12px; }

dialog { color: var(--text); width: min(460px, calc(100vw - 32px)); background: var(--panel-solid); padding: 26px; }
dialog::backdrop { background: rgba(5, 6, 12, .7); backdrop-filter: blur(6px); }

.foot { display: flex; flex-wrap: wrap; gap: 8px; justify-content: center; padding: 22px 16px; font-size: 13px; color: var(--dim); }
.foot a:hover { color: var(--text); }

@media (max-width: 760px) {
  .row { grid-template-columns: 1fr auto; }
  .row .meta { display: none; }
  .split { grid-template-columns: 1fr; }
  .stats { flex-wrap: wrap; width: 100%; }
  .stats > div { min-width: 0; padding: 10px 12px; flex: 1; }
  .stats .usage { flex-basis: 100%; }
  .who-name, .brand .dim { display: none; }
  .filter { width: 100%; }
  .actions { width: 100%; }
}
