/* uShare – gemeinsames Layout aller Designvorlagen.
   Farben kommen ausschliesslich aus theme.css der jeweiligen Vorlage. */

:root {
  --bg: #08080a;
  --bar: #18181b;
  --surface: #121215;
  --surface-2: #1a1a1f;
  --surface-3: #232329;
  --border: rgba(255, 255, 255, 0.09);
  --border-strong: rgba(255, 255, 255, 0.18);
  --text: #f4f4f5;
  --muted: #a1a1aa;
  --subtle: #8b8b94;

  --success: #4ade80;
  --success-bg: rgba(34, 197, 94, 0.12);
  --warn: #fcd34d;
  --warn-bg: rgba(245, 158, 11, 0.12);
  --danger: #fca5a5;
  --danger-bg: rgba(239, 68, 68, 0.12);

  --radius: 14px;
  --radius-lg: 20px;
  --font: "Segoe UI Variable Text", "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --font-display: "Segoe UI Variable Display", "Segoe UI", -apple-system, BlinkMacSystemFont, "Inter", Roboto, "Helvetica Neue", Arial, sans-serif;
  --mono: "Cascadia Code", "SF Mono", Consolas, "Liberation Mono", monospace;
}

*, *::before, *::after { box-sizing: border-box; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  min-height: 100vh;
  display: flex;
  flex-direction: column;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.55 var(--font);
  -webkit-font-smoothing: antialiased;
}

main { flex: 1; }
img, svg { display: block; max-width: 100%; }
a { color: inherit; text-decoration: none; }
p { margin: 0; }
h1, h2, h3, h4 { margin: 0; font-family: var(--font-display); letter-spacing: -0.015em; line-height: 1.15; }
button, input, select, textarea { font: inherit; color: inherit; }

:focus-visible { outline: 2px solid var(--accent-text); outline-offset: 3px; border-radius: 6px; }

.container { width: 100%; max-width: 1140px; margin-inline: auto; padding-inline: 24px; }

.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }

/* Icons */
.i {
  width: 1.15em; height: 1.15em; flex: none;
  fill: none; stroke: currentColor; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round;
}

/* ---------- Kopfzeile ---------- */
.site-header {
  position: sticky; top: 0; z-index: 20;
  background: color-mix(in srgb, var(--bar) 92%, transparent);
  backdrop-filter: blur(10px);
  border-bottom: 1px solid var(--border);
}
.site-header .container { display: flex; align-items: center; gap: 32px; height: 68px; }

.logo { display: inline-flex; align-items: center; gap: 10px; font: 700 19px/1 var(--font-display); letter-spacing: -0.02em; }
.logo-mark {
  display: grid; place-items: center;
  width: 32px; height: 32px; border-radius: 9px;
  background: linear-gradient(135deg, var(--accent-2), var(--accent-fill));
  box-shadow: 0 0 0 1px rgba(255,255,255,.12) inset, 0 6px 18px -6px var(--glow);
  color: #fff;
}
.logo-mark .i { width: 18px; height: 18px; stroke-width: 2.4; }
.logo b { color: var(--accent-text); font-weight: 700; }

.nav-links { display: flex; gap: 6px; margin-left: auto; }
.nav-links a { padding: 8px 12px; border-radius: 8px; color: #d4d4d8; font-size: 15px; }
.nav-links a:hover, .nav-links a[aria-current="page"] { color: #fff; background: rgba(255,255,255,.06); }

.header-actions { display: flex; align-items: center; gap: 10px; }
.nav-links + .header-actions { margin-left: 8px; }

.icon-btn {
  display: grid; place-items: center; width: 38px; height: 38px;
  border: 0; border-radius: 10px; background: transparent; color: #d4d4d8; cursor: pointer;
}
.icon-btn:hover { background: rgba(255,255,255,.07); color: #fff; }

.user-chip { display: inline-flex; align-items: center; gap: 10px; padding: 4px 12px 4px 4px; border: 1px solid var(--border); border-radius: 999px; font-size: 14px; color: #d4d4d8; }
.avatar { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-text); font-weight: 600; font-size: 13px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 42px; padding: 0 18px;
  border: 1px solid transparent; border-radius: 999px;
  font-weight: 600; font-size: 15px; white-space: nowrap; cursor: pointer;
  transition: background .15s, border-color .15s, transform .15s;
}
.btn:active { transform: translateY(1px); }
.btn-lg { min-height: 56px; padding: 0 32px; font-size: 18px; font-weight: 500; }
.btn-sm { min-height: 34px; padding: 0 12px; font-size: 14px; }
.btn-block { width: 100%; }
.btn-light { background: #fff; color: #09090b; }
.btn-light:hover { background: #e4e4e7; }
.btn-outline { background: rgba(0,0,0,.25); color: #fff; border-color: rgba(255,255,255,.35); }
.btn-outline:hover { border-color: #fff; background: rgba(255,255,255,.06); }
.btn-accent { background: var(--accent-fill); color: var(--on-accent); }
.btn-accent:hover { filter: brightness(1.08); }
.btn-ghost { background: transparent; color: #d4d4d8; border-color: var(--border); }
.btn-ghost:hover { background: rgba(255,255,255,.06); color: #fff; }
/* Gewählte Schaltfläche in einer Auswahlreihe (z. B. Gültigkeit des Freigabe-Links) */
.btn-ghost[aria-pressed="true"] { background: var(--accent-soft); border-color: var(--accent-text); color: #fff; }
.btn-danger { background: transparent; color: var(--danger); border-color: rgba(239,68,68,.35); }
.btn-danger:hover { background: var(--danger-bg); }

/* ---------- Hero ---------- */
.hero {
  position: relative; overflow: hidden;
  padding: 104px 0 96px;
  background:
    radial-gradient(ellipse 58% 48% at 50% 30%, var(--glow) 0%, color-mix(in srgb, var(--glow) 35%, transparent) 45%, transparent 72%),
    var(--bg);
  text-align: center;
}
.hero::after { /* weicher Übergang in den Seitenhintergrund */
  content: ""; position: absolute; inset: auto 0 0; height: 180px;
  background: linear-gradient(transparent, var(--bg)); pointer-events: none;
}
.hero > .container { position: relative; z-index: 1; }

.eyebrow {
  display: inline-flex; align-items: center; gap: 8px;
  padding: 6px 14px; border-radius: 999px;
  background: rgba(0,0,0,.28); border: 1px solid rgba(255,255,255,.16);
  font-size: 13px; color: #e4e4e7;
}
.eyebrow .dot { width: 7px; height: 7px; border-radius: 50%; background: var(--accent-text); box-shadow: 0 0 10px var(--accent-text); }

.display { margin: 24px auto 0; max-width: 20ch; text-wrap: balance; font-size: clamp(2.5rem, 6.4vw, 4.9rem); font-weight: 600; line-height: 1.04; letter-spacing: -0.03em; }
.lead { margin: 22px auto 0; max-width: 56ch; font-size: clamp(1.05rem, 1.8vw, 1.3rem); color: #e4e4e7; }

.hero-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 28px 32px; margin-top: 64px; }
.hero-actions .stack { display: flex; flex-direction: column; align-items: center; gap: 10px; }
.hero-actions small { font-size: 14px; color: var(--muted); }

/* ---------- Vorschau-Fenster (Startseite) ---------- */
.preview { position: relative; max-width: 880px; margin: 64px auto 0; text-align: left; }
.window {
  border-radius: 16px; overflow: hidden;
  background: #111114; border: 1px solid rgba(255,255,255,.12);
  box-shadow: 0 0 0 8px color-mix(in srgb, var(--accent-fill) 22%, transparent), 0 40px 90px -30px rgba(0,0,0,.9);
}
.window-bar { display: flex; align-items: center; gap: 12px; height: 40px; padding: 0 14px; background: #19191d; border-bottom: 1px solid var(--border); font-size: 13px; color: #d4d4d8; }
.window-bar .logo-mark { width: 20px; height: 20px; border-radius: 6px; }
.window-bar .logo-mark .i { width: 12px; height: 12px; }
.window-bar .spacer { flex: 1; }
.window-body { display: grid; grid-template-columns: 46px 1fr 270px; min-height: 290px; }
.window-side { display: flex; flex-direction: column; align-items: center; gap: 16px; padding-top: 14px; border-right: 1px solid var(--border); color: var(--subtle); }
.window-side .on { color: #fff; background: rgba(255,255,255,.08); border-radius: 7px; padding: 5px; box-sizing: content-box; }
.window-files { padding: 10px 0; font-size: 13px; }
.window-files .head { display: flex; justify-content: space-between; padding: 4px 16px 10px; color: var(--subtle); font-size: 12px; }
.frow { display: grid; grid-template-columns: 22px 1fr 70px 18px; align-items: center; gap: 10px; padding: 6px 16px; color: #d4d4d8; }
.frow:nth-child(odd) { background: rgba(255,255,255,.02); }
.frow .size { color: var(--subtle); text-align: right; font-family: var(--mono); font-size: 12px; }
.frow .ok { color: var(--success); }
.frow .run { color: var(--accent-text); }
.window-panel { border-left: 1px solid var(--border); padding: 14px; display: flex; flex-direction: column; gap: 12px; background: #141418; }
.window-panel h4 { font-size: 13px; font-weight: 600; }
.mini-qr { display: flex; gap: 12px; align-items: center; padding: 10px; border-radius: 10px; background: var(--surface-2); border: 1px solid var(--border); font-size: 12px; color: var(--muted); }
.mini-qr img { width: 64px; height: 64px; border-radius: 6px; }
.mini-qr strong { display: block; color: #fff; font-size: 13px; }

.phone {
  position: absolute; left: -110px; bottom: -56px; width: 170px;
  padding: 10px; border-radius: 30px; background: #0c0c0f;
  border: 1px solid rgba(255,255,255,.18);
  box-shadow: 0 30px 60px -20px rgba(0,0,0,.9), 0 0 40px -10px var(--glow);
}
.phone-screen { border-radius: 22px; background: #141418; padding: 18px 12px 14px; font-size: 11px; }
.phone-notch { width: 56px; height: 5px; margin: -8px auto 12px; border-radius: 9px; background: #2a2a31; }
.phone-screen h5 { margin: 0 0 2px; font-size: 13px; }
.phone-screen .muted { font-size: 10.5px; }
.phone-screen .progress { margin: 10px 0 6px; }
.phone-screen .q { display: flex; align-items: center; gap: 6px; padding: 5px 0; border-top: 1px solid var(--border); color: #d4d4d8; }
.phone-screen .q .i { width: 12px; height: 12px; }

/* ---------- Abschnitte ---------- */
.section { padding: 96px 0; }
.section-alt { background: linear-gradient(#0d0d10, #0a0a0c); border-block: 1px solid var(--border); }
.section-head { max-width: 640px; margin: 0 auto 56px; text-align: center; }
.section-head .kicker { color: var(--accent-text); font-weight: 600; font-size: 14px; letter-spacing: .06em; text-transform: uppercase; }
.section-head h2 { margin-top: 12px; font-size: clamp(1.9rem, 3.6vw, 2.8rem); font-weight: 600; }
.section-head p { margin-top: 14px; color: var(--muted); font-size: 17px; }

.steps { display: grid; grid-template-columns: repeat(4, 1fr); gap: 16px; counter-reset: step; }
.step { position: relative; padding: 26px 22px; border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.step .num { display: grid; place-items: center; width: 42px; height: 42px; border-radius: 12px; background: var(--accent-soft); color: var(--accent-text); }
.step h3 { margin-top: 20px; font-size: 18px; font-weight: 600; }
.step p { margin-top: 8px; color: var(--muted); font-size: 14.5px; }
.step .label { position: absolute; top: 26px; right: 22px; font: 600 13px var(--mono); color: var(--subtle); }

.features { display: grid; grid-template-columns: repeat(3, 1fr); gap: 1px; border-radius: var(--radius-lg); overflow: hidden; background: var(--border); border: 1px solid var(--border); }
.feature { padding: 30px 28px; background: var(--bg); }
.feature .i { width: 26px; height: 26px; color: var(--accent-text); stroke-width: 1.8; }
.feature h3 { margin-top: 18px; font-size: 17px; font-weight: 600; }
.feature p { margin-top: 8px; color: var(--muted); font-size: 14.5px; }

.cta-band {
  position: relative; overflow: hidden;
  padding: 64px 32px; border-radius: 28px; text-align: center;
  background: radial-gradient(ellipse 70% 120% at 50% 0%, var(--glow), transparent 70%), var(--surface);
  border: 1px solid var(--border-strong);
}
.cta-band h2 { font-size: clamp(1.8rem, 3.4vw, 2.6rem); font-weight: 600; }
.cta-band p { margin-top: 12px; color: #e4e4e7; font-size: 17px; }
.cta-band .btn { margin-top: 32px; }

/* ---------- Fusszeile ---------- */
.site-footer { border-top: 1px solid var(--border); padding: 28px 0; color: var(--subtle); font-size: 14px; }
.site-footer .container { display: flex; flex-wrap: wrap; align-items: center; gap: 12px 28px; }
.site-footer nav { display: flex; flex-wrap: wrap; gap: 8px 22px; margin-left: auto; }
.site-footer a:hover { color: #fff; }

/* ---------- Anmelde-Seiten ---------- */
.glow-page {
  background:
    radial-gradient(ellipse 55% 45% at 50% 0%, var(--glow) 0%, color-mix(in srgb, var(--glow) 30%, transparent) 45%, transparent 75%),
    var(--bg);
}
.auth-wrap { display: grid; place-items: center; padding: 72px 16px 96px; }
.auth-card {
  width: 100%; max-width: 440px; padding: 40px 36px;
  border-radius: 24px; background: rgba(18,18,21,.86);
  border: 1px solid var(--border-strong);
  box-shadow: 0 30px 80px -30px rgba(0,0,0,.9);
  backdrop-filter: blur(12px);
}
.auth-card .badge-icon { display: grid; place-items: center; width: 52px; height: 52px; border-radius: 16px; background: var(--accent-soft); color: var(--accent-text); }
.auth-card .badge-icon .i { width: 24px; height: 24px; }
.auth-card h1 { margin-top: 22px; font-size: 28px; font-weight: 600; }
.auth-card .sub { margin-top: 8px; color: var(--muted); }
.auth-card form { margin-top: 28px; display: grid; gap: 18px; }
.auth-card .foot { margin-top: 24px; padding-top: 20px; border-top: 1px solid var(--border); display: flex; flex-wrap: wrap; justify-content: space-between; gap: 8px; font-size: 14px; color: var(--muted); }
.link { color: var(--accent-text); font-weight: 500; }
.link:hover { text-decoration: underline; text-underline-offset: 3px; }

.steps-mini { display: flex; gap: 8px; margin-bottom: 26px; }
.steps-mini span { height: 4px; flex: 1; border-radius: 4px; background: var(--surface-3); }
.steps-mini span.on { background: var(--accent-text); }

/* ---------- Formulare ---------- */
.field { display: grid; gap: 8px; }
.field > label, .field-label { font-size: 14px; font-weight: 600; color: #e4e4e7; }
.field .opt { font-weight: 400; color: var(--subtle); }
.input-wrap { position: relative; }
.input-wrap .i { position: absolute; left: 14px; top: 50%; transform: translateY(-50%); color: var(--subtle); }
.input {
  width: 100%; min-height: 48px; padding: 0 14px;
  border-radius: 12px; border: 1px solid var(--border-strong);
  background: #0c0c0f; color: #fff; font-size: 16px;
}
textarea.input { min-height: 96px; padding: 12px 14px; resize: vertical; }
.input-wrap .input { padding-left: 44px; }
.input::placeholder { color: #71717a; }
.input:focus { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 4px var(--accent-soft); }
.hint { font-size: 13px; color: var(--subtle); }

.otp { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; }
.otp input {
  width: 100%; aspect-ratio: 1 / 1.15; min-width: 0;
  border-radius: 12px; border: 1px solid var(--border-strong); background: #0c0c0f;
  text-align: center; font: 600 24px var(--mono); color: #fff;
}
.otp input.filled { border-color: color-mix(in srgb, var(--accent-text) 60%, transparent); }
.otp input:focus { outline: none; border-color: var(--accent-text); box-shadow: 0 0 0 4px var(--accent-soft); }

.choice-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; }
.choice { position: relative; }
.choice input { position: absolute; opacity: 0; }
.choice span { display: grid; gap: 2px; padding: 14px; border-radius: 12px; border: 1px solid var(--border-strong); background: #0c0c0f; cursor: pointer; }
.choice span b { font-weight: 600; }
.choice span small { color: var(--subtle); font-size: 12.5px; }
.choice input:checked + span { border-color: var(--accent-text); background: var(--accent-soft); box-shadow: 0 0 0 1px var(--accent-text) inset; }
.choice input:focus-visible + span { outline: 2px solid var(--accent-text); outline-offset: 2px; }

.check { display: flex; gap: 12px; align-items: flex-start; padding: 14px; border-radius: 12px; border: 1px solid var(--border); background: var(--surface-2); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 2px 0 0; accent-color: var(--accent-fill); }
.check b { display: block; font-weight: 600; font-size: 14.5px; }
.check small { color: var(--muted); font-size: 13px; }

/* ---------- Hinweise ---------- */
.alert { display: flex; gap: 12px; padding: 14px 16px; border-radius: 12px; font-size: 14px; border: 1px solid; }
.alert .i { margin-top: 1px; }
.alert b { display: block; margin-bottom: 2px; }
.alert-info { background: var(--accent-soft); border-color: color-mix(in srgb, var(--accent-text) 30%, transparent); color: #ececf1; }
.alert-info .i { color: var(--accent-text); }
.alert-warn { background: var(--warn-bg); border-color: rgba(245,158,11,.3); color: #fef3c7; }
.alert-warn .i { color: var(--warn); }
.alert-danger { background: var(--danger-bg); border-color: rgba(239,68,68,.3); color: #fee2e2; }
.alert-danger .i { color: var(--danger); }
.alert-success { background: var(--success-bg); border-color: rgba(34,197,94,.3); color: #dcfce7; }
.alert-success .i { color: var(--success); }

/* ---------- Anwendung ---------- */
.app-main { padding: 40px 0 80px; }
.app-main.glow-top {
  background: radial-gradient(ellipse 60% 340px at 50% -80px, color-mix(in srgb, var(--glow) 70%, transparent), transparent 80%), var(--bg);
}
.breadcrumb { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--subtle); }
.breadcrumb a:hover { color: #fff; }
.breadcrumb .i { width: 14px; height: 14px; }
.page-head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 20px; margin-bottom: 28px; }
.page-head h1 { font-size: clamp(1.8rem, 3vw, 2.4rem); font-weight: 600; }
.page-head p { margin-top: 6px; color: var(--muted); }
.page-head .actions { display: flex; flex-wrap: wrap; gap: 10px; }
.breadcrumb + .page-head { margin-top: 14px; }

.stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 14px; margin-bottom: 28px; }
.stat { padding: 20px; border-radius: var(--radius); background: var(--surface); border: 1px solid var(--border); }
.stat span { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13.5px; }
.stat strong { display: block; margin-top: 10px; font: 600 28px/1 var(--font-display); letter-spacing: -0.02em; }
.stat small { display: block; margin-top: 6px; color: var(--subtle); font-size: 13px; }

.card { border-radius: var(--radius-lg); background: var(--surface); border: 1px solid var(--border); }
.card-pad { padding: 26px; }
.card-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--border); }
.card-head h2 { font-size: 17px; font-weight: 600; }
.card-head .tools { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }

.search { position: relative; }
.search .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--subtle); width: 16px; height: 16px; }
.search input { min-height: 36px; width: 220px; padding: 0 12px 0 34px; border-radius: 10px; border: 1px solid var(--border); background: #0c0c0f; font-size: 14px; }
.search input:focus { outline: none; border-color: var(--accent-text); }

.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
th { padding: 12px 22px; text-align: left; font-weight: 500; font-size: 13px; color: var(--subtle); border-bottom: 1px solid var(--border); white-space: nowrap; }
td { padding: 14px 22px; border-bottom: 1px solid var(--border); white-space: nowrap; color: #e4e4e7; }
tbody tr:last-child td { border-bottom: 0; }
tbody tr:hover td { background: rgba(255,255,255,.025); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.cell-name { display: flex; align-items: center; gap: 12px; font-weight: 500; color: #fff; }
.cell-name small { display: block; font-weight: 400; color: var(--subtle); font-size: 13px; }
.folder-ico { display: grid; place-items: center; width: 38px; height: 38px; border-radius: 10px; background: var(--accent-soft); color: var(--accent-text); flex: none; }
.file-ico { display: grid; place-items: center; width: 32px; height: 32px; border-radius: 8px; background: var(--surface-3); color: #d4d4d8; flex: none; }
.file-ico .i { width: 16px; height: 16px; }

.badge { display: inline-flex; align-items: center; gap: 6px; padding: 3px 10px; border-radius: 999px; font-size: 12.5px; font-weight: 600; white-space: nowrap; }
.badge::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.badge-success { color: var(--success); background: var(--success-bg); }
.badge-warn { color: var(--warn); background: var(--warn-bg); }
.badge-danger { color: var(--danger); background: var(--danger-bg); }
.badge-neutral { color: #d4d4d8; background: rgba(255,255,255,.07); }
.badge-accent { color: var(--accent-text); background: var(--accent-soft); }
.badge-live::before { box-shadow: 0 0 0 3px color-mix(in srgb, currentColor 30%, transparent); }

.progress { height: 8px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.progress > span { display: block; height: 100%; border-radius: inherit; background: linear-gradient(90deg, var(--accent-2), var(--accent-text)); }
.progress-sm { height: 5px; }
.progress-meta { display: flex; justify-content: space-between; gap: 12px; margin-top: 8px; font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }

/* Ordner-Detail */
.detail-grid { display: grid; grid-template-columns: 360px 1fr; gap: 20px; align-items: start; }
.qr-card { padding: 26px; text-align: center; background: linear-gradient(180deg, color-mix(in srgb, var(--glow) 45%, var(--surface)) 0%, var(--surface) 55%); }
.qr-frame { width: 100%; max-width: 232px; margin: 0 auto; padding: 14px; border-radius: 18px; background: #fff; box-shadow: 0 20px 50px -20px var(--glow); }
.qr-frame img { width: 100%; aspect-ratio: 1; }
.qr-card h2 { margin-top: 22px; font-size: 19px; font-weight: 600; }
.qr-card .sub { margin-top: 6px; color: var(--muted); font-size: 14px; }
.kv { display: grid; gap: 10px; margin-top: 22px; text-align: left; }
.kv div { display: flex; justify-content: space-between; gap: 12px; font-size: 14px; }
.kv dt { color: var(--muted); }
.kv dd { margin: 0; font-weight: 500; text-align: right; }
.copy-field { display: flex; margin-top: 20px; border-radius: 12px; border: 1px solid var(--border-strong); background: #0c0c0f; overflow: hidden; }
.copy-field code { flex: 1; min-width: 0; padding: 11px 12px; font: 13px var(--mono); color: #d4d4d8; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; text-align: left; }
.copy-field button { border: 0; border-left: 1px solid var(--border-strong); padding: 0 14px; background: var(--surface-2); color: #fff; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; font-size: 13px; font-weight: 600; }
.copy-field button:hover { background: var(--surface-3); }
.btn-row { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }
.stack-gap { display: grid; grid-template-columns: minmax(0, 1fr); gap: 20px; }
/* Grid-Kinder dürfen schmaler als ihr Inhalt werden (lange Links, Tabellen) */
.detail-grid > *, .form-grid > * { min-width: 0; }

.live { padding: 22px; }
.live-top { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; }
.live-top .who { display: flex; align-items: center; gap: 12px; }
.live-top .who .folder-ico { width: 42px; height: 42px; }
.live-top h3 { font-size: 16px; font-weight: 600; }
.live-top p { font-size: 13.5px; color: var(--muted); }
.live .progress { margin-top: 18px; height: 10px; }
.live-stats { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-top: 18px; }
.live-stats div { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); }
.live-stats small { display: block; color: var(--subtle); font-size: 12.5px; }
.live-stats b { font: 600 17px var(--font-display); font-variant-numeric: tabular-nums; }

.form-grid { display: grid; grid-template-columns: 1fr 340px; gap: 20px; align-items: start; }
.form-card { padding: 30px; display: grid; gap: 24px; }
.form-actions { display: flex; flex-wrap: wrap; justify-content: flex-end; gap: 10px; padding-top: 22px; border-top: 1px solid var(--border); }
.side-card { padding: 24px; }
.side-card h3 { font-size: 16px; font-weight: 600; }
/* Nebenkarten mit eigener Überschriftsebene (z. B. „Zum Herunterladen freigeben") */
.side-card h2 { font-size: 17px; font-weight: 600; }
.timeline { list-style: none; margin: 18px 0 0; padding: 0; display: grid; gap: 18px; }
.timeline li { display: grid; grid-template-columns: 30px 1fr; gap: 12px; font-size: 14px; color: var(--muted); }
.timeline li b { display: block; color: #fff; font-weight: 600; margin-bottom: 2px; }
.timeline .n { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--accent-soft); color: var(--accent-text); font: 600 13px var(--mono); }

/* ---------- Download-Freigabe ---------- */
/* Seitenkopf der Freigabe-Seite: grosses Ordnersymbol neben Name und Kennzahlen.
   .page-head allein reicht nicht, weil dort Symbol und Text nebeneinander fehlen. */
.share-head { display: flex; align-items: center; gap: 16px; }
.share-head .folder-ico { width: 54px; height: 54px; border-radius: 15px; }
.share-head .folder-ico .i { width: 24px; height: 24px; }

/* ---------- Mobile Upload ---------- */
.mobile-page { background: radial-gradient(ellipse 90% 320px at 50% -60px, var(--glow), transparent 80%), var(--bg); }
.mobile-shell { width: 100%; max-width: 460px; margin: 0 auto; padding: 0 16px 40px; }
.m-header { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 0; }
.m-header .logo { font-size: 17px; }
.m-header .logo-mark { width: 28px; height: 28px; }
.m-folder { padding: 18px; border-radius: 18px; background: rgba(18,18,21,.8); border: 1px solid var(--border-strong); display: flex; align-items: center; gap: 14px; }
.m-folder .folder-ico { width: 46px; height: 46px; border-radius: 13px; }
.m-folder h1 { font-size: 18px; font-weight: 600; }
.m-folder p { color: var(--muted); font-size: 13px; }
.m-section { margin-top: 16px; }
.pick {
  display: grid; justify-items: center; gap: 10px; width: 100%;
  padding: 26px 18px; border-radius: 20px; text-align: center;
  border: 1.5px dashed color-mix(in srgb, var(--accent-text) 55%, transparent);
  background: var(--accent-soft); color: #fff; cursor: pointer;
}
.pick .ring { display: grid; place-items: center; width: 56px; height: 56px; border-radius: 50%; background: var(--accent-fill); color: var(--on-accent); }
.pick .ring .i { width: 26px; height: 26px; }
.pick b { font-size: 18px; font-weight: 600; }
.pick small { color: #d4d4d8; font-size: 13px; }
.or { display: flex; align-items: center; gap: 12px; margin: 14px 0; color: var(--subtle); font-size: 13px; }
.or::before, .or::after { content: ""; flex: 1; height: 1px; background: var(--border); }

.m-card { padding: 18px; border-radius: 18px; background: var(--surface); border: 1px solid var(--border); }
.m-card + .m-card { margin-top: 12px; }
.m-row { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.big-pct { font: 600 40px/1 var(--font-display); letter-spacing: -0.03em; font-variant-numeric: tabular-nums; }
.big-pct small { font-size: 18px; color: var(--muted); font-weight: 500; }
.m-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; margin-top: 14px; }
.m-grid div { padding: 10px; border-radius: 12px; background: var(--surface-2); }
.m-grid small { display: block; font-size: 11.5px; color: var(--subtle); }
.m-grid b { font-size: 15px; font-variant-numeric: tabular-nums; }
.current { display: flex; gap: 12px; align-items: center; margin-top: 14px; padding: 12px; border-radius: 12px; background: var(--surface-2); }
.current .meta { flex: 1; min-width: 0; }
.current .meta b { display: block; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.current .meta small { color: var(--subtle); font-size: 12.5px; }
.current .progress { margin-top: 6px; }
.m-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 14px; }

.segmented { display: flex; gap: 4px; padding: 4px; border-radius: 12px; background: var(--surface-2); overflow-x: auto; }
.segmented a { flex: 1; padding: 8px 10px; border-radius: 9px; text-align: center; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.segmented a[aria-current="true"] { background: var(--surface-3); color: #fff; }
.segmented .cnt { margin-left: 4px; color: var(--subtle); font-weight: 500; }
.segmented .cnt-danger { color: var(--danger); }

.queue { list-style: none; margin: 12px 0 0; padding: 0; }
.queue li { display: flex; align-items: center; gap: 12px; padding: 11px 2px; border-top: 1px solid var(--border); font-size: 14px; }
.queue .meta { flex: 1; min-width: 0; }
.queue .meta b { display: block; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.queue .meta small { color: var(--subtle); font-size: 12.5px; }
.queue .st { flex: none; display: grid; place-items: center; width: 26px; height: 26px; border-radius: 50%; }
.queue .st .i { width: 14px; height: 14px; stroke-width: 2.6; }
.st-ok { color: var(--success); background: var(--success-bg); }
.st-run { color: var(--accent-text); background: var(--accent-soft); }
.st-wait { color: var(--subtle); background: rgba(255,255,255,.06); }
.st-err { color: var(--danger); background: var(--danger-bg); }
.queue .retry { flex: none; padding: 6px 10px; border-radius: 8px; border: 1px solid rgba(239,68,68,.35); background: transparent; color: var(--danger); font-size: 12.5px; font-weight: 600; cursor: pointer; }
.more { display: block; margin-top: 8px; padding: 10px; text-align: center; font-size: 13px; color: var(--muted); border-top: 1px solid var(--border); }

.m-note { display: flex; gap: 10px; margin-top: 14px; font-size: 13px; color: var(--muted); }
.m-note .i { color: var(--accent-text); margin-top: 2px; }

.done-hero { text-align: center; padding: 34px 10px 10px; }
.done-hero .ok-ring { display: grid; place-items: center; width: 86px; height: 86px; margin: 0 auto; border-radius: 50%; background: var(--success-bg); color: var(--success); box-shadow: 0 0 0 10px rgba(34,197,94,.06); }
.done-hero .ok-ring .i { width: 42px; height: 42px; stroke-width: 2.4; }
.done-hero h1 { margin-top: 22px; font-size: 28px; font-weight: 600; }
.done-hero p { margin-top: 8px; color: var(--muted); }

/* ---------- Fehlerseite ---------- */
.error-wrap { display: grid; place-items: center; text-align: center; padding: 96px 16px 120px; }
.error-code { font: 700 clamp(5rem, 16vw, 9rem)/1 var(--font-display); letter-spacing: -0.05em; background: linear-gradient(180deg, #fff, color-mix(in srgb, var(--accent-text) 50%, transparent)); -webkit-background-clip: text; background-clip: text; color: transparent; }
.error-wrap h1 { margin-top: 18px; font-size: clamp(1.7rem, 3.4vw, 2.4rem); font-weight: 600; }
.error-wrap .lead { font-size: 17px; color: var(--muted); }
.reasons { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; max-width: 760px; margin: 40px auto 0; text-align: left; }
.reasons div { padding: 18px; border-radius: var(--radius); background: rgba(18,18,21,.8); border: 1px solid var(--border); }
.reasons .i { color: var(--accent-text); }
.reasons b { display: block; margin-top: 12px; font-weight: 600; }
.reasons small { display: block; margin-top: 4px; color: var(--muted); font-size: 13.5px; }
.error-actions { display: flex; flex-wrap: wrap; justify-content: center; gap: 12px; margin-top: 36px; }
.tech { margin-top: 28px; font: 12.5px var(--mono); color: var(--subtle); }

/* ---------- Rechtliches ---------- */
.legal { display: grid; grid-template-columns: 220px 1fr; gap: 48px; align-items: start; }
.legal-nav { position: sticky; top: 96px; display: grid; gap: 2px; font-size: 14px; }
.legal-nav a { padding: 8px 12px; border-radius: 8px; color: var(--muted); border-left: 2px solid transparent; }
.legal-nav a:hover { color: #fff; background: rgba(255,255,255,.04); }
.legal-nav a.on { color: #fff; border-left-color: var(--accent-text); background: rgba(255,255,255,.04); border-radius: 0 8px 8px 0; }
.prose { max-width: 720px; color: #d4d4d8; }
.prose h2 { margin: 48px 0 14px; font-size: 26px; font-weight: 600; color: #fff; scroll-margin-top: 96px; }
.prose h2:first-child { margin-top: 0; }
.prose h3 { margin: 28px 0 8px; font-size: 17px; font-weight: 600; color: #fff; }
.prose p, .prose ul { margin: 0 0 12px; }
.prose ul { padding-left: 20px; }
.prose li { margin-bottom: 6px; }
.prose dl { display: grid; grid-template-columns: 180px 1fr; gap: 8px 16px; margin: 0 0 12px; }
.prose dt { color: var(--subtle); }
.prose dd { margin: 0; }
.placeholder { padding: 1px 6px; border-radius: 5px; background: var(--warn-bg); color: var(--warn); font-size: .92em; }

/* ---------- Vorlagen-Navigation (nicht Teil des Designs) ---------- */
.tpl-nav { position: fixed; right: 16px; bottom: calc(16px + env(safe-area-inset-bottom, 0px)); z-index: 50; font-size: 13px; }
.tpl-nav summary { list-style: none; display: inline-flex; align-items: center; gap: 8px; padding: 9px 14px; border-radius: 999px; background: #fff; color: #09090b; font-weight: 600; cursor: pointer; box-shadow: 0 10px 30px -10px rgba(0,0,0,.8); }
.tpl-nav summary::-webkit-details-marker { display: none; }
.tpl-nav div { position: absolute; right: 0; bottom: calc(100% + 8px); display: grid; min-width: 220px; padding: 6px; border-radius: 14px; background: #fff; color: #18181b; box-shadow: 0 20px 50px -10px rgba(0,0,0,.8); }
.tpl-nav div a { padding: 7px 10px; border-radius: 8px; }
.tpl-nav div a:hover { background: #f4f4f5; }
.tpl-nav div a[aria-current="page"] { background: #18181b; color: #fff; }
.tpl-nav hr { width: 100%; border: 0; border-top: 1px solid #e4e4e7; margin: 4px 0; }
.tpl-nav details { display: flex; flex-direction: column-reverse; }

.muted { color: var(--muted); }
.mt-16 { margin-top: 16px; }
.mt-24 { margin-top: 24px; }
/* .hide-sm blendet nebensächliche Elemente auf schmalen Bildschirmen aus
   (Regel weiter unten im 760-px-Block). */

/* ---------- Responsive ---------- */
@media (max-width: 980px) {
  .steps { grid-template-columns: repeat(2, 1fr); }
  .features { grid-template-columns: repeat(2, 1fr); }
  .detail-grid, .form-grid { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, 1fr); }
  .phone { display: none; }
  .window-body { grid-template-columns: 46px 1fr 230px; }
}
@media (max-width: 760px) {
  .container { padding-inline: 16px; }
  .nav-links { display: none; }
  .header-actions { margin-left: auto; }
  .user-chip .name { display: none; }
  .user-chip { padding: 3px; }
  .hero { padding: 72px 0 64px; }
  .hero-actions { margin-top: 40px; }
  .window-body { grid-template-columns: 1fr; }
  .window-side, .window-panel { display: none; }
  .phone { display: none; }
  .section { padding: 64px 0; }
  .steps, .features, .reasons { grid-template-columns: 1fr; }
  .live-stats { grid-template-columns: repeat(2, 1fr); }
  .choice-grid { grid-template-columns: 1fr; }
  .legal { grid-template-columns: 1fr; gap: 24px; }
  .legal-nav { position: static; grid-auto-flow: column; overflow-x: auto; }
  .prose dl { grid-template-columns: 1fr; }
  .auth-card { padding: 30px 22px; }
  .search input { width: 100%; }
  .site-footer nav { margin-left: 0; }
  .hide-sm { display: none; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .otp { gap: 6px; }
}
