/* KapuzenDrop · KapuzenCloud · Freigaben – gemeinsames Aussehen (hell/dunkel wie das Gerät, Akzent je Seite). */
:root {
  --bg: #090b10; --bg2: #0d1016; --side: #0c0f14; --panel: #12151c; --panel2: #181c25; --panel3: #222734; --hover: #1a1f29;
  --line: #1d212b; --line2: #2a303c; --text: #f2f4f7; --muted: #9aa2b1; --faint: #5d6575; --input: #0f1218;
  --acc: #38bdf8; --acc2: #818cf8; --acc-ink: #04131d; --ok: #34d399; --warn: #fbbf24; --bad: #f87171;
  --soft: rgba(255, 255, 255, .045); --sh: 0 18px 50px rgba(0, 0, 0, .5); --sh2: 0 6px 20px rgba(0, 0, 0, .35);
  --r: 14px; color-scheme: dark;
  --sat: env(safe-area-inset-top, 0px); --sab: env(safe-area-inset-bottom, 0px);
}
@media (prefers-color-scheme: light) {
  :root { --bg: #f4f6fa; --bg2: #eef1f6; --side: #ffffff; --panel: #ffffff; --panel2: #f3f5f9; --panel3: #e7eaf0; --hover: #eef1f6;
    --line: #e3e6ec; --line2: #d2d7e0; --text: #10131a; --muted: #586072; --faint: #98a0ae; --input: #ffffff;
    --soft: rgba(15, 18, 25, .04); --sh: 0 18px 50px rgba(20, 24, 33, .16); --sh2: 0 6px 20px rgba(20, 24, 33, .1); color-scheme: light; }
}
body.cloud { --acc: #8b5cf6; --acc2: #c084fc; --acc-ink: #ffffff; }
body.share { --acc: #8b5cf6; --acc2: #38bdf8; --acc-ink: #ffffff; }
* { box-sizing: border-box; }
html, body { margin: 0; min-height: 100%; }
body {
  font: 14.5px/1.5 "Segoe UI Variable Text", "Segoe UI", Inter, system-ui, -apple-system, sans-serif; color: var(--text);
  background: var(--bg); -webkit-font-smoothing: antialiased;
}
a { color: var(--acc); text-decoration: none; }
a:hover { text-decoration: underline; }
button { font: inherit; color: inherit; }
h1, h2, h3 { margin: 0; letter-spacing: -.015em; }
h1 { font-size: 30px; font-weight: 760; letter-spacing: -.03em; line-height: 1.15; }
h2 { font-size: 19px; font-weight: 720; }
h3 { font-size: 15px; font-weight: 680; }
.muted { color: var(--muted); } .faint { color: var(--faint); } .small { font-size: 12.5px; }
.mono { font-family: "Cascadia Code", Consolas, ui-monospace, monospace; font-size: 12.5px; }
.row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.grow { flex: 1; min-width: 0; }
.stack > * + * { margin-top: 12px; }
.hide { display: none !important; }
.ell { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ic { width: 18px; height: 18px; flex: none; }

/* ---------- Bedienelemente ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; border: 1px solid var(--line2);
  background: var(--panel2); color: var(--text); padding: 8px 14px; border-radius: 10px; font-weight: 620; cursor: pointer;
  text-decoration: none !important; transition: background .15s, border-color .15s, transform .06s, box-shadow .15s; white-space: nowrap;
}
.btn:hover { background: var(--hover); }
.btn:active { transform: translateY(1px); }
.btn:disabled { opacity: .5; cursor: default; transform: none; }
.btn .ic { width: 16px; height: 16px; }
.btn.primary { background: var(--acc); color: var(--acc-ink); border-color: transparent; font-weight: 720;
  box-shadow: 0 6px 18px color-mix(in srgb, var(--acc) 28%, transparent); }
.btn.primary:hover { background: color-mix(in srgb, var(--acc) 86%, #fff); }
.btn.ghost { background: transparent; border-color: transparent; }
.btn.ghost:hover { background: var(--soft); }
.btn.danger { background: rgba(248, 113, 113, .12); border-color: rgba(248, 113, 113, .4); color: var(--bad); }
.btn.sm { padding: 5px 10px; font-size: 13px; border-radius: 8px; }
.btn.lg { padding: 12px 20px; font-size: 15.5px; border-radius: 12px; }
.btn.icon { padding: 7px; }
.btn.icon.sm { padding: 5px; }
input, textarea, select {
  width: 100%; background: var(--input); border: 1px solid var(--line2); color: var(--text); border-radius: 10px;
  padding: 9px 12px; font: inherit; outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--acc); box-shadow: 0 0 0 3px color-mix(in srgb, var(--acc) 22%, transparent); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--acc); }
label.f { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; font-weight: 620; }
.seg { display: inline-flex; background: var(--panel2); border: 1px solid var(--line); border-radius: 10px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 5px 11px; border-radius: 7px; cursor: pointer; color: var(--muted); font-weight: 620; font-size: 13px; }
.seg button.on { background: var(--panel3); color: var(--text); box-shadow: var(--sh2); }
.pill { display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px; font-size: 12px; font-weight: 650;
  background: var(--soft); color: var(--muted); white-space: nowrap; }
.pill.ok { background: color-mix(in srgb, var(--ok) 15%, transparent); color: var(--ok); }
.pill.warn { background: color-mix(in srgb, var(--warn) 15%, transparent); color: var(--warn); }
.pill.bad { background: color-mix(in srgb, var(--bad) 15%, transparent); color: var(--bad); }
.pill.acc { background: color-mix(in srgb, var(--acc) 15%, transparent); color: var(--acc); }
.dot { width: 8px; height: 8px; border-radius: 50%; background: var(--faint); flex: none; }
.dot.ok { background: var(--ok); box-shadow: 0 0 0 4px color-mix(in srgb, var(--ok) 18%, transparent); }
.dot.warn { background: var(--warn); }
.dot.pulse { animation: pulse 1.6s ease-in-out infinite; }
@keyframes pulse { 50% { opacity: .35; } }
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 18px 20px; }
.note { padding: 10px 14px; border-radius: 10px; background: var(--soft); border: 1px solid var(--line); font-size: 13.5px; }
.note.bad { background: color-mix(in srgb, var(--bad) 10%, transparent); border-color: color-mix(in srgb, var(--bad) 35%, transparent); }
.note.warn { background: color-mix(in srgb, var(--warn) 10%, transparent); border-color: color-mix(in srgb, var(--warn) 35%, transparent); }
.note.ok { background: color-mix(in srgb, var(--ok) 10%, transparent); border-color: color-mix(in srgb, var(--ok) 35%, transparent); }
.bar { height: 6px; background: var(--panel3); border-radius: 99px; overflow: hidden; }
.bar > i { display: block; height: 100%; width: 0; background: linear-gradient(90deg, var(--acc), var(--acc2)); border-radius: 99px;
  transition: width .25s ease; }
.bar.ok > i { background: var(--ok); }
.bar.bad > i { background: var(--bad); }
.spin { width: 16px; height: 16px; border: 2px solid color-mix(in srgb, var(--acc) 25%, transparent); border-top-color: var(--acc);
  border-radius: 50%; animation: spin .8s linear infinite; flex: none; }
@keyframes spin { to { transform: rotate(360deg); } }
kbd { font: 11px/1 "Cascadia Code", Consolas, monospace; padding: 3px 5px; border-radius: 5px; background: var(--panel3); border: 1px solid var(--line2); }

/* ---------- Toast, Dialog, Menü ---------- */
.toasts { position: fixed; left: 50%; bottom: calc(22px + var(--sab)); transform: translateX(-50%); z-index: 200; display: flex;
  flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: #1f2430; color: #f2f4f7; padding: 10px 16px; border-radius: 12px; box-shadow: var(--sh); font-weight: 600;
  font-size: 13.5px; animation: tin .2s ease; display: flex; gap: 10px; align-items: center; pointer-events: auto; max-width: 92vw; }
.toast.bad { background: #3b1d1f; color: #fecaca; }
@media (prefers-color-scheme: light) { .toast { background: #10131a; } }
@keyframes tin { from { opacity: 0; transform: translateY(8px); } }
.modal-bg { position: fixed; inset: 0; background: rgba(4, 6, 10, .62); backdrop-filter: blur(3px); z-index: 150; display: grid;
  place-items: center; padding: 18px; animation: fin .15s ease; }
@keyframes fin { from { opacity: 0; } }
.modal { background: var(--panel); border: 1px solid var(--line2); border-radius: 18px; box-shadow: var(--sh); width: min(480px, 100%);
  max-height: calc(100vh - 36px); overflow: auto; padding: 20px 22px; animation: min .18s ease; }
.modal.wide { width: min(720px, 100%); }
@keyframes min { from { transform: translateY(10px) scale(.98); opacity: 0; } }
.modal h2 { margin-bottom: 4px; }
.modal .foot { display: flex; gap: 10px; justify-content: flex-end; margin-top: 18px; flex-wrap: wrap; }
.menu { position: fixed; z-index: 180; background: var(--panel); border: 1px solid var(--line2); border-radius: 12px; box-shadow: var(--sh);
  padding: 5px; min-width: 210px; animation: fin .1s ease; }
.menu button { display: flex; width: 100%; align-items: center; gap: 10px; border: 0; background: transparent; padding: 7px 10px;
  border-radius: 8px; cursor: pointer; text-align: left; font-size: 13.5px; }
.menu button:hover, .menu button:focus-visible { background: var(--hover); outline: none; }
.menu button.danger { color: var(--bad); }
.menu button .k { margin-left: auto; color: var(--faint); font-size: 12px; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: 5px 4px; }

/* ---------- Anmelden ---------- */
.center { min-height: 100vh; min-height: 100dvh; display: grid; place-items: center; padding: 20px; }
.auth { width: min(400px, 100%); }
.brand { display: flex; align-items: center; gap: 11px; font-weight: 780; font-size: 17px; letter-spacing: -.01em; color: var(--text); }
.brand:hover { text-decoration: none; }
.brand .logo { width: 34px; height: 34px; border-radius: 10px; display: grid; place-items: center; flex: none; color: #fff;
  background: linear-gradient(135deg, var(--acc), var(--acc2)); box-shadow: 0 6px 18px color-mix(in srgb, var(--acc) 35%, transparent); }
.brand .logo .ic { width: 19px; height: 19px; }
.brand b { color: var(--acc); font-weight: 780; }

/* ---------- Ablage-Zone ---------- */
.dz { position: relative; border-radius: 20px; padding: 34px 24px; text-align: center; cursor: pointer; transition: transform .15s, background .2s;
  background: color-mix(in srgb, var(--acc) 5%, var(--panel)); border: 1.5px dashed color-mix(in srgb, var(--acc) 45%, var(--line2)); }
.dz:hover { background: color-mix(in srgb, var(--acc) 9%, var(--panel)); }
.dz.over { transform: scale(1.01); background: color-mix(in srgb, var(--acc) 14%, var(--panel)); border-style: solid; }
.dz .big { width: 64px; height: 64px; border-radius: 20px; display: grid; place-items: center; margin: 0 auto 14px; color: #fff;
  background: linear-gradient(135deg, var(--acc), var(--acc2)); box-shadow: 0 12px 30px color-mix(in srgb, var(--acc) 35%, transparent); }
.dz .big .ic { width: 30px; height: 30px; }
.dropcover { position: fixed; inset: 0; z-index: 140; display: grid; place-items: center; pointer-events: none;
  background: color-mix(in srgb, var(--acc) 14%, rgba(4, 6, 10, .6)); backdrop-filter: blur(2px); animation: fin .12s ease; }
.dropcover > div { border: 2px dashed var(--acc); border-radius: 24px; padding: 40px 60px; font-size: 20px; font-weight: 720; color: #fff;
  background: rgba(0, 0, 0, .25); text-align: center; }

/* ---------- Dateiliste ---------- */
.fi { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--panel3);
  color: var(--muted); overflow: hidden; }
.fi .ic { width: 19px; height: 19px; }
.fi img { width: 100%; height: 100%; object-fit: cover; display: block; }
.fi.dir { background: color-mix(in srgb, var(--acc) 16%, transparent); color: var(--acc); }
.fi.image { color: #f472b6; background: rgba(244, 114, 182, .13); }
.fi.video { color: #fb7185; background: rgba(251, 113, 133, .13); }
.fi.audio { color: #fbbf24; background: rgba(251, 191, 36, .13); }
.fi.doc { color: #60a5fa; background: rgba(96, 165, 250, .13); }
.fi.archive { color: #a78bfa; background: rgba(167, 139, 250, .13); }
.fi.code { color: #34d399; background: rgba(52, 211, 153, .13); }
.empty { text-align: center; padding: 50px 20px; color: var(--muted); }
.empty .ic { width: 42px; height: 42px; color: var(--faint); margin-bottom: 10px; }
