/* ═══════════════════════════════════════════════════════════════════
   Jahnschule Upload Center – Stylesheet
   Zurückhaltende, neutrale Farbwelt; Farbe nur für Status und Aktion.
   Design-Tokens (hell/dunkel), Komponenten, Layout, Bewegung.
   ═══════════════════════════════════════════════════════════════════ */

/* Inter – lokal eingebunden, damit beim Aufruf der Seite keine Daten an
   Google-Server übertragen werden (DSGVO). Variable Schrift: eine Datei
   je Zeichensatz deckt alle Schriftstärken ab. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-400-latin.woff2") format("woff2");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 100 900;
  font-display: swap;
  src: url("../fonts/inter-400-latin-ext.woff2") format("woff2");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF;
}

:root {
  --font: "Inter", system-ui, -apple-system, "Segoe UI", Roboto, sans-serif;

  /* Neutrale Basis. Farbe kommt nur über --accent und die Statusfarben dazu. */
  --bg: #f7f7f8;
  --surface: #ffffff;
  --surface-2: #fafafa;
  --surface-3: #f1f1f2;
  --line: #e6e6e8;
  --line-2: #efeff1;
  --text: #111113;
  --text-2: #3f3f46;
  --text-3: #63636b;
  --muted: #8f8f98;

  /* Primäraktion: tiefes Anthrazit statt bunter Fläche. */
  --solid: #18181b;
  --solid-hover: #27272a;
  --solid-text: #ffffff;

  /* Ein einziger, entsättigter Akzent – sparsam eingesetzt. */
  --accent: #4f5bd5;
  --accent-text: #4a55c9;
  --accent-soft: #eef0fb;
  --accent-line: #d8dcf5;
  --accent-ring: rgba(79, 91, 213, .16);

  --ok: #15803d; --ok-bg: #edf7f0; --ok-line: #cfe8d8; --ok-dot: #22a559;
  --warn: #92610c; --warn-bg: #fbf4e6; --warn-line: #efe0bf;
  --err: #b3261e; --err-bg: #fbeeed; --err-line: #f0d4d2;
  --info: #1f4ed8; --info-bg: #eef2fd;

  --shadow-xs: 0 1px 2px rgba(17, 17, 19, .05);
  --shadow-sm: 0 1px 2px rgba(17, 17, 19, .04), 0 2px 8px rgba(17, 17, 19, .04);
  --shadow-md: 0 1px 2px rgba(17, 17, 19, .04), 0 8px 24px rgba(17, 17, 19, .07);
  --shadow-lg: 0 2px 4px rgba(17, 17, 19, .04), 0 18px 48px rgba(17, 17, 19, .12);

  --r-sm: 6px; --r-md: 9px; --r-lg: 12px; --r-xl: 14px;
  --ease: cubic-bezier(.22, 1, .36, 1);
}

:root[data-theme="dark"] {
  --bg: #09090b;
  --surface: #121215;
  --surface-2: #161619;
  --surface-3: #1e1e22;
  --line: #27272b;
  --line-2: #1d1d21;
  --text: #f4f4f5;
  --text-2: #d0d0d6;
  --text-3: #a0a0a9;
  --muted: #71717a;

  --solid: #fafafa;
  --solid-hover: #e4e4e7;
  --solid-text: #111113;

  --accent: #8b93f0;
  --accent-text: #a5abf5;
  --accent-soft: #1a1b33;
  --accent-line: #2e3059;
  --accent-ring: rgba(139, 147, 240, .22);

  --ok: #4ade80; --ok-bg: #0e2318; --ok-line: #1c3d2a; --ok-dot: #22c55e;
  --warn: #e3b341; --warn-bg: #241d0d; --warn-line: #3d3218;
  --err: #f27b74; --err-bg: #2a1413; --err-line: #45211f;
  --info: #93b4fd; --info-bg: #111c33;

  --shadow-xs: 0 1px 2px rgba(0, 0, 0, .5);
  --shadow-sm: 0 1px 2px rgba(0, 0, 0, .45), 0 2px 8px rgba(0, 0, 0, .35);
  --shadow-md: 0 1px 2px rgba(0, 0, 0, .45), 0 8px 24px rgba(0, 0, 0, .5);
  --shadow-lg: 0 2px 4px rgba(0, 0, 0, .5), 0 18px 48px rgba(0, 0, 0, .65);
}

/* ───────────────────────── Basis ───────────────────────── */
*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; min-height: 100vh;
  background: var(--bg); color: var(--text);
  font-family: var(--font); font-size: 14px; line-height: 1.55;
  -webkit-font-smoothing: antialiased; -moz-osx-font-smoothing: grayscale;
  font-feature-settings: "cv02", "cv03", "cv04", "cv11", "ss03";
}
h1, h2, h3 { margin: 0; font-weight: 600; letter-spacing: -.021em; line-height: 1.2; color: var(--text); }
p { margin: 0; }
a { color: var(--accent-text); text-decoration: none; }
button { font: inherit; color: inherit; }
svg { display: block; }
[hidden] { display: none !important; }
::selection { background: var(--accent-soft); color: var(--text); }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; border-radius: 5px; }
code { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: 12px; background: var(--surface-3); padding: 1px 5px; border-radius: 4px; }
.muted { color: var(--muted); font-weight: 400; }
.link { color: var(--text); font-weight: 500; cursor: pointer; border-bottom: 1px solid var(--muted); }
.link:hover { border-bottom-color: var(--text); }

/* ───────────────────────── Einblend-Choreografie ─────────────────────────
   Beim Öffnen laufen die Bereiche kurz nacheinander ein. */
@keyframes fadeUp { from { opacity: 0; transform: translateY(10px) } to { opacity: 1; transform: none } }
@keyframes fadeIn { from { opacity: 0 } to { opacity: 1 } }
@keyframes scaleIn { from { opacity: 0; transform: scale(.97) } to { opacity: 1; transform: none } }
@keyframes slideRight { from { opacity: 0; transform: translateX(-14px) } to { opacity: 1; transform: none } }
@keyframes sweep { 0% { transform: translateX(-120%) } 55%, 100% { transform: translateX(220%) } }
@keyframes lineGrow { from { transform: scaleX(0) } to { transform: scaleX(1) } }

/* "backwards" statt "opacity: 0" als Grundzustand: Läuft die Animation aus
   irgendeinem Grund nicht an, ist der Inhalt trotzdem sichtbar. */
.stagger { animation: fadeUp .6s var(--ease) backwards; }
.d1 { animation-delay: .05s } .d2 { animation-delay: .11s } .d3 { animation-delay: .17s }
.d4 { animation-delay: .23s } .d5 { animation-delay: .29s } .d6 { animation-delay: .35s }
.d7 { animation-delay: .42s } .d8 { animation-delay: .5s }

/* ───────────────────────── Buttons & Eingaben ───────────────────────── */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 8px 13px; border-radius: var(--r-md); border: 1px solid transparent;
  font-weight: 500; font-size: 13px; line-height: 1.2; cursor: pointer;
  background: transparent; color: var(--text-2); position: relative;
  transition: background .15s var(--ease), color .15s, border-color .15s, box-shadow .15s, transform .12s var(--ease);
  white-space: nowrap;
}
.btn svg { width: 15px; height: 15px; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btn-sm { padding: 6px 10px; font-size: 12.5px; }
.btn-lg { padding: 12px 18px; font-size: 14px; border-radius: var(--r-lg); }
.btn-block { width: 100%; }
.btn-ghost:hover:not(:disabled) { background: var(--surface-3); color: var(--text); }
.btn-primary {
  background: var(--solid); color: var(--solid-text); overflow: hidden;
  box-shadow: var(--shadow-sm);
}
.btn-primary:hover:not(:disabled) { background: var(--solid-hover); }
.btn-primary:active:not(:disabled) { transform: translateY(1px); }
/* Feiner Lichtstreif, der einmal über die Schaltfläche läuft. */
.btn-primary::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 45%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.22), transparent);
  animation: sweep 5.5s var(--ease) 1.2s infinite;
}
:root[data-theme="dark"] .btn-primary::after { background: linear-gradient(100deg, transparent, rgba(0,0,0,.12), transparent); }
.btn-secondary { background: var(--surface); border-color: var(--line); color: var(--text); box-shadow: var(--shadow-xs); }
.btn-secondary:hover:not(:disabled) { border-color: var(--muted); }
.btn.is-loading .btn-label { visibility: hidden; }
.btn.is-loading .spinner { display: block; position: absolute; }
.btn.is-loading::after { display: none; }
.spinner {
  display: none; width: 16px; height: 16px; border-radius: 50%;
  border: 2px solid color-mix(in srgb, var(--solid-text) 30%, transparent); border-top-color: var(--solid-text);
  animation: spin .65s linear infinite;
}
@keyframes spin { to { transform: rotate(360deg) } }

.icon-btn {
  width: 34px; height: 34px; border-radius: var(--r-md); border: 1px solid var(--line); background: var(--surface);
  display: inline-grid; place-items: center; cursor: pointer; color: var(--text-3); box-shadow: var(--shadow-xs);
  transition: background .15s, border-color .15s, color .15s;
}
.icon-btn:hover { border-color: var(--muted); color: var(--text); }
.icon-btn svg { width: 16px; height: 16px; }
.icon-btn-sm { width: 30px; height: 30px; }
.icon-btn-sm svg { width: 14px; height: 14px; }
.icon-btn.spinning svg { animation: spin .8s linear infinite; }
.theme-toggle .icon-moon { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-sun { display: none; }
:root[data-theme="dark"] .theme-toggle .icon-moon { display: block; }

.input {
  width: 100%; min-height: 40px; padding: 9px 13px; font: inherit; font-size: 14px;
  color: var(--text); background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  caret-color: var(--accent); box-shadow: var(--shadow-xs);
  transition: border-color .15s, box-shadow .15s;
}
.input::placeholder { color: var(--muted); }
.input:hover { border-color: color-mix(in srgb, var(--muted) 60%, transparent); }
.input:focus { outline: none; border-color: var(--accent); box-shadow: 0 0 0 3.5px var(--accent-ring); }
.input-sm { min-height: 34px; padding: 7px 11px; font-size: 13px; }
.input-wrap { position: relative; display: block; }
.input-wrap .input-icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); width: 16px; height: 16px; color: var(--muted); pointer-events: none; }
.input-wrap .input { padding-left: 37px; }
.input-action {
  position: absolute; right: 5px; top: 50%; transform: translateY(-50%); width: 30px; height: 30px;
  border: none; background: transparent; border-radius: var(--r-sm); color: var(--muted); cursor: pointer; display: grid; place-items: center;
}
.input-action:hover { background: var(--surface-3); color: var(--text-2); }
.input-action svg { width: 16px; height: 16px; }
.input-action .icon-eye-off { display: none; }
.input-action.is-on .icon-eye { display: none; }
.input-action.is-on .icon-eye-off { display: block; }
.input-wrap:has(.input-action) .input { padding-right: 42px; }
.input.shake { animation: shake .35s; border-color: var(--err); box-shadow: 0 0 0 3.5px rgba(179, 38, 30, .14); }
@keyframes shake { 20%,60% { transform: translateX(-5px) } 40%,80% { transform: translateX(5px) } }

.field { display: flex; flex-direction: column; gap: 6px; }
/* Datum und Notiz stehen nebeneinander, auf schmalen Geräten untereinander. */
.field-row { display: grid; grid-template-columns: minmax(0, 250px) minmax(0, 1fr); gap: 14px; }
@media (max-width: 720px) { .field-row { grid-template-columns: 1fr; } }
/* Das Datumsfeld bringt eigene Innenabstände mit; hier an die übrigen Felder angeglichen. */
.input-date { min-height: 42px; }
.input-date::-webkit-datetime-edit { padding: 0; }
.input-date::-webkit-calendar-picker-indicator { cursor: pointer; opacity: .55; }
.input-date::-webkit-calendar-picker-indicator:hover { opacity: 1; }
:root[data-theme="dark"] .input-date::-webkit-calendar-picker-indicator { filter: invert(1); }
.input-date:invalid { border-color: var(--danger); }
.field-label { font-size: 12.5px; font-weight: 500; color: var(--text-2); }
.field-help { font-size: 12px; color: var(--muted); }
.form-error {
  display: flex; align-items: flex-start; gap: 8px; font-size: 12.5px; color: var(--err);
  background: var(--err-bg); border: 1px solid var(--err-line); padding: 9px 11px; border-radius: var(--r-md); line-height: 1.45;
  animation: fadeUp .3s var(--ease);
}
.form-error svg { width: 15px; height: 15px; flex: none; margin-top: 1px; }

.select {
  font: inherit; font-size: 12.5px; font-weight: 500; color: var(--text); background: var(--surface);
  border: 1px solid var(--line); border-radius: var(--r-sm); padding: 6px 28px 6px 9px; appearance: none;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='16' height='16' viewBox='0 0 24 24' fill='none' stroke='%238f8f98' stroke-width='2' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='m6 9 6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 7px center; cursor: pointer;
}

/* ───────────────────────── Marke ───────────────────────── */
.brand { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 9px; flex: none; position: relative; overflow: hidden;
  display: grid; place-items: center; color: var(--solid-text); font-weight: 600; font-size: 14px; letter-spacing: -.02em;
  background: var(--solid); box-shadow: var(--shadow-sm);
}
.brand-mark::after {
  content: ""; position: absolute; top: 0; bottom: 0; width: 60%;
  background: linear-gradient(100deg, transparent, rgba(255,255,255,.3), transparent);
  animation: sweep 6s var(--ease) .8s infinite;
}
:root[data-theme="dark"] .brand-mark::after { background: linear-gradient(100deg, transparent, rgba(0,0,0,.18), transparent); }
.brand-text { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; }
.brand-name { font-weight: 600; font-size: 13.5px; letter-spacing: -.012em; white-space: nowrap; }
.brand-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.brand-light .brand-name { color: #fff; }
.brand-light .brand-sub { color: rgba(255,255,255,.55); }
.brand-light .brand-mark { background: rgba(255,255,255,.1); color: #fff; box-shadow: inset 0 0 0 1px rgba(255,255,255,.18); }
.brand-light .brand-mark::after { background: linear-gradient(100deg, transparent, rgba(255,255,255,.35), transparent); }

/* Kopfzeile: einzeiliges Produkt-Logo statt gestapelter Namen.
   Vorn das Produkt, dahinter durch einen Strich getrennt die Schule. */
.brand-bar { gap: 11px; min-width: 0; }
.brand-mark-lg { width: 32px; height: 32px; border-radius: 9px; }
.brand-mark-lg svg { width: 16px; height: 16px; }
.brand-lockup { display: flex; align-items: center; gap: 11px; min-width: 0; }
.brand-product { font-size: 14.5px; font-weight: 600; letter-spacing: -.02em; white-space: nowrap; color: var(--text); }
.brand-div { width: 1px; height: 16px; background: var(--line); flex: none; }
.brand-org { font-size: 13px; color: var(--text-3); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ───────────────────────── Statusanzeigen ───────────────────────── */
.pill {
  display: inline-flex; align-items: center; gap: 7px; padding: 6px 11px; border-radius: 999px;
  font-weight: 500; font-size: 12.5px; white-space: nowrap; border: 1px solid var(--line); background: var(--surface);
  color: var(--text-2); transition: background .2s, border-color .2s, color .2s;
}
.pill .dot { width: 6px; height: 6px; border-radius: 50%; background: var(--muted); }
.pill-ok .dot { background: var(--ok-dot); box-shadow: 0 0 0 3px color-mix(in srgb, var(--ok-dot) 22%, transparent); }
.pill-busy { border-color: var(--accent-line); background: var(--accent-soft); color: var(--accent-text); }
.pill-busy .dot { background: var(--accent); animation: pulse 1.3s ease-in-out infinite; }
.pill-err { border-color: var(--err-line); background: var(--err-bg); color: var(--err); }
.pill-err .dot { background: var(--err); }
@keyframes pulse { 0%,100% { opacity: .35; transform: scale(.8) } 50% { opacity: 1; transform: scale(1.15) } }

.tag {
  display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; font-weight: 500;
  padding: 4px 9px; border-radius: 999px; white-space: nowrap; border: 1px solid transparent;
}
.tag svg { width: 12px; height: 12px; }
.tag-done { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.tag-pending { background: var(--warn-bg); border-color: var(--warn-line); color: var(--warn); }
.tag-uploading { background: var(--accent-soft); border-color: var(--accent-line); color: var(--accent-text); }
.tag-error { background: var(--err-bg); border-color: var(--err-line); color: var(--err); }

/* Dateitypen: einheitlich neutral, Unterscheidung über die Buchstaben. */
.ftype {
  display: inline-grid; place-items: center; font-size: 10px; font-weight: 600; letter-spacing: .05em;
  padding: 4px 7px; border-radius: var(--r-sm); text-transform: uppercase;
  background: var(--surface-3); color: var(--text-3); border: 1px solid var(--line);
}
.file-icon {
  width: 38px; height: 38px; border-radius: var(--r-md); display: grid; place-items: center; flex: none;
  font-size: 9.5px; font-weight: 600; letter-spacing: .05em; text-transform: uppercase;
  position: relative; overflow: hidden;
  background: var(--surface-3); color: var(--text-3); border: 1px solid var(--line);
}
.file-icon img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
/* Nur eine schmale Farbkante markiert den Typ. */
.file-icon::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 2.5px; background: var(--muted); }
.file-icon.ftype-pdf::before { background: #c4544b; }
.file-icon.ftype-doc::before { background: #4a72b8; }
.file-icon.ftype-xls::before { background: #3f8f5f; }
.file-icon.ftype-ppt::before { background: #c07a3e; }
.file-icon.ftype-img::before { background: #7b6bc4; }
.file-icon.ftype-svg::before { background: #3f8f8a; }
.file-icon.ftype-zip::before { background: #b09040; }
.file-icon img ~ ::before { display: none; }

/* ───────────────────────── Meldungen ───────────────────────── */
.toasts { position: fixed; top: 16px; right: 16px; z-index: 100; display: flex; flex-direction: column; gap: 9px; width: min(370px, calc(100vw - 32px)); pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; gap: 11px; align-items: flex-start;
  background: var(--surface); color: var(--text); border: 1px solid var(--line); border-radius: var(--r-lg);
  padding: 11px 13px; box-shadow: var(--shadow-lg); animation: toastin .35s var(--ease);
}
.toast.is-leaving { animation: toastout .22s var(--ease) forwards; }
.toast-icon { width: 27px; height: 27px; border-radius: 7px; display: grid; place-items: center; flex: none; border: 1px solid transparent; }
.toast-icon svg { width: 15px; height: 15px; }
.toast-success .toast-icon { background: var(--ok-bg); border-color: var(--ok-line); color: var(--ok); }
.toast-error .toast-icon { background: var(--err-bg); border-color: var(--err-line); color: var(--err); }
.toast-info .toast-icon { background: var(--info-bg); color: var(--info); }
.toast-body { flex: 1; min-width: 0; font-size: 12.5px; line-height: 1.45; color: var(--text-3); }
.toast-body strong { display: block; color: var(--text); font-size: 13px; font-weight: 600; margin-bottom: 1px; }
.toast-close { border: none; background: transparent; color: var(--muted); cursor: pointer; padding: 4px; border-radius: var(--r-sm); margin: -3px -5px 0 0; }
.toast-close:hover { background: var(--surface-3); color: var(--text-2); }
.toast-close svg { width: 13px; height: 13px; }
@keyframes toastin { from { opacity: 0; transform: translateX(16px) scale(.98) } to { opacity: 1; transform: none } }
@keyframes toastout { to { opacity: 0; transform: translateX(16px) } }

/* ═══════════════════════ Anmeldung ═══════════════════════ */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1.08fr) minmax(0, 1fr); }
.auth-brand {
  position: relative; overflow: hidden; display: flex; align-items: center; padding: 56px;
  background: #0a0a0c; color: #fff;
}
/* Ruhiger Lichtkegel statt bunter Farbkreise. */
.auth-brand::before {
  content: ""; position: absolute; inset: -20%;
  background:
    radial-gradient(52% 44% at 22% 18%, rgba(110, 120, 220, .22), transparent 70%),
    radial-gradient(48% 46% at 78% 88%, rgba(150, 155, 190, .13), transparent 70%);
  animation: drift 22s ease-in-out infinite alternate;
}
@keyframes drift { from { transform: translate3d(0,0,0) scale(1) } to { transform: translate3d(2.5%, -2%, 0) scale(1.06) } }
/* Feines Raster, das nach außen ausblendet. */
.auth-brand::after {
  content: ""; position: absolute; inset: 0; pointer-events: none;
  background-image: linear-gradient(rgba(255,255,255,.045) 1px, transparent 1px), linear-gradient(90deg, rgba(255,255,255,.045) 1px, transparent 1px);
  background-size: 56px 56px;
  mask-image: radial-gradient(ellipse 80% 70% at 35% 45%, #000 10%, transparent 78%);
  -webkit-mask-image: radial-gradient(ellipse 80% 70% at 35% 45%, #000 10%, transparent 78%);
}
.auth-brand-inner { position: relative; z-index: 1; max-width: 500px; display: flex; flex-direction: column; gap: 26px; }
.auth-eyebrow {
  display: inline-flex; align-items: center; gap: 8px; align-self: flex-start;
  font-size: 11.5px; font-weight: 500; letter-spacing: .04em; text-transform: uppercase;
  color: rgba(255,255,255,.62); border: 1px solid rgba(255,255,255,.14); background: rgba(255,255,255,.05);
  padding: 5px 11px; border-radius: 999px; backdrop-filter: blur(8px);
}
.auth-eyebrow .dot { width: 5px; height: 5px; border-radius: 50%; background: #4ade80; box-shadow: 0 0 0 3px rgba(74,222,128,.2); }
.auth-headline {
  font-size: clamp(30px, 3vw, 42px); font-weight: 600; letter-spacing: -.033em; line-height: 1.1; color: #fff;
}
.auth-headline em { font-style: normal; color: rgba(255,255,255,.52); }
.auth-lead { font-size: 15px; line-height: 1.6; color: rgba(255,255,255,.58); max-width: 430px; }
.auth-rule { height: 1px; background: rgba(255,255,255,.12); transform-origin: left; animation: lineGrow .8s var(--ease) .5s both; }
.auth-features { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 15px; }
.auth-features li { display: flex; gap: 13px; align-items: flex-start; }
.auth-features strong { display: block; font-size: 13.5px; font-weight: 500; color: rgba(255,255,255,.92); }
.auth-features small { display: block; font-size: 12.5px; color: rgba(255,255,255,.48); margin-top: 2px; line-height: 1.5; }
.feature-icon {
  width: 34px; height: 34px; border-radius: 9px; flex: none; display: grid; place-items: center;
  background: rgba(255,255,255,.055); border: 1px solid rgba(255,255,255,.1); color: rgba(255,255,255,.75);
}
.feature-icon svg { width: 16px; height: 16px; }

.auth-panel { display: flex; flex-direction: column; padding: 24px 36px; background: var(--bg); }
.auth-panel-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; }
.brand-compact { visibility: hidden; }
.auth-card {
  margin: auto; width: min(408px, 100%); background: var(--surface); border: 1px solid var(--line);
  border-radius: var(--r-xl); padding: 32px; box-shadow: var(--shadow-md); display: flex; flex-direction: column; gap: 16px;
  animation: scaleIn .55s var(--ease) both;
}
.auth-card-head h2 { font-size: 21px; margin-bottom: 5px; }
.auth-card-head p { color: var(--text-3); font-size: 13.5px; line-height: 1.55; }
.auth-card .btn-primary { margin-top: 2px; }
.auth-hint { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); justify-content: center; }
.auth-hint svg { width: 13px; height: 13px; }
.auth-panel-foot { text-align: center; font-size: 11.5px; color: var(--muted); }
/* „Bereitgestellt von Sawora. Solutions“ mittig unter dem © (seit 08.10.2026, vorher links unten im dunklen Bereich) */
.auth-panel-credit { margin-top: 4px; }

/* ═══════════════════════ App-Rahmen ═══════════════════════ */
.app { min-height: 100vh; display: flex; flex-direction: column; }
.topbar {
  position: sticky; top: 0; z-index: 20; display: flex; align-items: center; gap: 16px; padding: 10px 20px;
  background: color-mix(in srgb, var(--surface) 82%, transparent); backdrop-filter: blur(16px) saturate(1.6);
  border-bottom: 1px solid var(--line);
  animation: fadeIn .5s var(--ease) both;
}
.search {
  flex: 1; max-width: 420px; display: flex; align-items: center; gap: 9px; min-height: 34px; padding: 0 11px;
  background: var(--surface-2); border: 1px solid var(--line); border-radius: var(--r-md); color: var(--muted);
  transition: border-color .15s, box-shadow .15s, background .15s;
}
.search:focus-within { border-color: var(--accent); box-shadow: 0 0 0 3.5px var(--accent-ring); background: var(--surface); }
.search svg { width: 15px; height: 15px; flex: none; }
.search input { flex: 1; min-width: 0; border: none; background: transparent; font: inherit; font-size: 13.5px; color: var(--text); outline: none; }
.search input::placeholder { color: var(--muted); }
.search input::-webkit-search-cancel-button { -webkit-appearance: none; }
.search kbd { font: inherit; font-size: 10.5px; font-weight: 500; color: var(--muted); background: var(--surface); border: 1px solid var(--line); border-radius: 4px; padding: 1px 5px; }
.topbar-right { margin-left: auto; display: flex; align-items: center; gap: 8px; }

.banner {
  display: flex; align-items: center; gap: 9px; padding: 9px 20px; font-size: 12.5px; font-weight: 500;
  background: var(--warn-bg); color: var(--warn); border-bottom: 1px solid var(--warn-line);
}
.banner svg { width: 15px; height: 15px; flex: none; }

.shell { flex: 1; display: grid; grid-template-columns: 252px minmax(0, 1fr); max-width: 1380px; width: 100%; margin: 0 auto; }

/* ───────────────────────── Seitenleiste ───────────────────────── */
.sidebar {
  padding: 22px 16px 22px 20px; display: flex; flex-direction: column; gap: 20px;
  border-right: 1px solid var(--line); position: sticky; top: 55px; align-self: start; max-height: calc(100vh - 55px); overflow: auto;
}
.sidebar-section { display: flex; flex-direction: column; gap: 4px; }
.sidebar-label { font-size: 10.5px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); padding: 0 10px; margin-bottom: 7px; }
.folder-nav { display: flex; flex-direction: column; gap: 2px; }
.folder-btn {
  display: flex; align-items: center; gap: 10px; width: 100%; padding: 7px 10px; border-radius: var(--r-md);
  border: 1px solid transparent; font: inherit; font-size: 13px; font-weight: 500; cursor: pointer; text-align: left;
  background: transparent; color: var(--text-2); transition: background .14s, color .14s;
  animation: slideRight .45s var(--ease) both;
}
.folder-btn:nth-child(1) { animation-delay: .06s } .folder-btn:nth-child(2) { animation-delay: .1s }
.folder-btn:nth-child(3) { animation-delay: .14s } .folder-btn:nth-child(4) { animation-delay: .18s }
.folder-btn:nth-child(n+5) { animation-delay: .22s }
.folder-btn:hover { background: var(--surface-3); color: var(--text); }
.folder-btn.active { background: var(--surface); color: var(--text); border-color: var(--line); box-shadow: var(--shadow-xs); font-weight: 600; }
.folder-btn .folder-ic { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; flex: none; background: var(--surface-3); color: var(--muted); transition: background .14s, color .14s; }
.folder-btn .folder-ic svg { width: 14px; height: 14px; }
.folder-btn.active .folder-ic { background: var(--solid); color: var(--solid-text); }
.folder-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-count { font-size: 11px; font-weight: 500; color: var(--muted); font-variant-numeric: tabular-nums; }
.folder-btn.active .folder-count { color: var(--text-2); }
.new-folder-box { display: flex; flex-direction: column; gap: 5px; padding: 4px 0; }
.new-folder-btn {
  display: flex; align-items: center; gap: 10px; padding: 7px 10px; border-radius: var(--r-md); margin-top: 3px;
  border: 1px solid transparent; background: transparent; color: var(--muted); font: inherit; font-size: 13px; font-weight: 500; cursor: pointer;
  transition: background .14s, color .14s;
}
.new-folder-btn:hover { background: var(--surface-3); color: var(--text); }
.new-folder-icon { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; border: 1px dashed var(--line); }
.new-folder-icon svg { width: 13px; height: 13px; }

.sidebar-card { border: 1px solid var(--line); border-radius: var(--r-lg); padding: 13px; background: var(--surface); }
.sidebar-card-title { font-size: 11.5px; font-weight: 600; color: var(--text-2); margin-bottom: 9px; }
.steps { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 7px; font-size: 12.5px; color: var(--text-3); }
.steps li { display: flex; align-items: center; gap: 9px; }
.steps span { width: 18px; height: 18px; border-radius: 50%; background: var(--surface-3); color: var(--text-3); font-size: 10.5px; font-weight: 600; display: grid; place-items: center; flex: none; }
.sidebar-foot { margin-top: auto; display: flex; gap: 8px; align-items: flex-start; font-size: 12px; color: var(--muted); line-height: 1.5; padding: 0 2px; }
.sidebar-foot svg { width: 15px; height: 15px; flex: none; color: var(--ok-dot); margin-top: 1px; }

/* ───────────────────────── Hauptbereich ───────────────────────── */
.main { padding: 26px 26px 56px; display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.page-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 22px; flex-wrap: wrap; }
.eyebrow { font-size: 11px; font-weight: 600; letter-spacing: .09em; text-transform: uppercase; color: var(--muted); margin-bottom: 5px; }
.page-title { font-size: 26px; font-weight: 600; letter-spacing: -.028em; overflow-wrap: anywhere; }
.page-text { margin-top: 6px; color: var(--text-3); max-width: 62ch; font-size: 13.5px; }
.stats { display: flex; gap: 8px; }
.stat { min-width: 92px; padding: 9px 13px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-xs); display: flex; flex-direction: column; gap: 1px; }
.stat-value { font-size: 18px; font-weight: 600; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 10.5px; font-weight: 500; color: var(--muted); text-transform: uppercase; letter-spacing: .07em; }

/* ─────────── Startseite ─────────── */
#view-start, #view-folder { display: flex; flex-direction: column; gap: 18px; }
.start-hero { padding: 6px 0 2px; }
.start-hero .page-title { font-size: 28px; }
.start-hero .page-text { margin-top: 8px; font-size: 14.5px; }

.start-steps { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.step-card {
  display: flex; gap: 12px; align-items: flex-start; padding: 15px 16px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-xs);
}
.step-num {
  width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--solid); color: var(--solid-text); font-size: 11.5px; font-weight: 600;
}
.step-text strong { display: block; font-size: 13.5px; font-weight: 600; margin-bottom: 3px; }
.step-text p { font-size: 12.5px; color: var(--text-3); line-height: 1.5; }

.folder-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 1px; background: var(--line-2); }
.folder-card {
  display: flex; align-items: center; gap: 12px; padding: 15px 18px; text-align: left;
  background: var(--surface); border: none; cursor: pointer; font: inherit;
  transition: background .14s;
}
.folder-card:hover { background: var(--surface-2); }
.folder-card-ic {
  width: 36px; height: 36px; border-radius: var(--r-md); flex: none; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-3); border: 1px solid var(--line);
  transition: background .16s var(--ease), color .16s;
}
.folder-card-ic svg { width: 17px; height: 17px; }
.folder-card:hover .folder-card-ic { background: var(--solid); color: var(--solid-text); border-color: var(--solid); }
.folder-card-text { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.folder-card-text strong { font-size: 13.5px; font-weight: 600; color: var(--text); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.folder-card-text small { font-size: 12px; color: var(--muted); }
.folder-card-go { color: var(--muted); opacity: 0; transform: translateX(-4px); transition: opacity .16s, transform .16s var(--ease); }
.folder-card-go svg { width: 15px; height: 15px; }
.folder-card:hover .folder-card-go { opacity: 1; transform: none; }

/* Zeilen der Liste "Zuletzt hochgeladen" sind anklickbar. */
.recent-row {
  width: 100%; text-align: left; background: transparent; border: none; border-bottom: 1px solid var(--line-2);
  font: inherit; cursor: pointer; grid-template-columns: 38px minmax(0, 1fr) 96px 122px;
}
.recent-row:last-child { border-bottom: none; }

/* Rücksprung zur Übersicht */
.crumb {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 8px 3px 4px; margin-bottom: 7px; margin-left: -4px;
  border: none; background: transparent; border-radius: var(--r-sm); cursor: pointer;
  font-size: 12px; font-weight: 500; letter-spacing: .02em; color: var(--muted);
  transition: background .14s, color .14s;
}
.crumb:hover { background: var(--surface-3); color: var(--text); }
.crumb svg { width: 14px; height: 14px; }

/* ─────────── Zugänge verwalten ─────────── */
#view-users { display: flex; flex-direction: column; gap: 18px; }
.user-form { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr) auto; gap: 12px; align-items: end; padding: 16px 18px; }
.user-form .btn { min-height: 40px; }
.user-row { grid-template-columns: 34px minmax(0, 1fr) 130px auto; }
.user-badge {
  width: 34px; height: 34px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--surface-3); color: var(--text-2); border: 1px solid var(--line);
  font-size: 12.5px; font-weight: 600;
}
.user-actions { display: flex; gap: 6px; align-items: center; justify-content: flex-end; }
.user-actions .mini-btn { opacity: 0; transition: opacity .15s; }
.user-row:hover .mini-btn, .user-actions .row-btn, .user-actions .mini-btn:focus-visible { opacity: 1; }
@media (hover: none) { .user-actions .mini-btn { opacity: 1; } }
.tag-admin { background: var(--surface-3); border-color: var(--line); color: var(--text-2); }

/* Einmalige Anzeige eines neu erzeugten Codes */
.code-reveal {
  border: 1px solid var(--accent-line); background: var(--accent-soft); border-radius: var(--r-xl);
  padding: 15px 17px; display: flex; flex-direction: column; gap: 11px;
}
.code-reveal-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.code-reveal-title { font-size: 12.5px; font-weight: 500; color: var(--accent-text); }
.code-reveal-title strong { font-weight: 600; }
.code-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.code-row code {
  flex: 1; min-width: 200px; background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-md);
  padding: 10px 13px; font-size: 14px; font-weight: 500; color: var(--text); letter-spacing: .01em;
  user-select: all; word-break: break-all;
}
.code-reveal-note { font-size: 12px; color: var(--accent-text); opacity: .85; line-height: 1.5; }

/* Ablagefläche */
.dropzone {
  position: relative; cursor: pointer; display: flex; flex-direction: column; align-items: center; justify-content: center;
  gap: 7px; min-height: 232px; padding: 32px 24px; border-radius: var(--r-xl); text-align: center;
  background: var(--surface); border: 1px dashed color-mix(in srgb, var(--muted) 45%, transparent); box-shadow: var(--shadow-xs);
  transition: border-color .2s, box-shadow .2s, background .2s;
  overflow: hidden;
}
.dropzone::before {
  content: ""; position: absolute; inset: 0; opacity: 0; transition: opacity .25s;
  background: radial-gradient(60% 60% at 50% 40%, var(--accent-soft), transparent 75%);
}
.dropzone:hover { border-color: var(--muted); box-shadow: var(--shadow-sm); }
.dropzone:hover::before { opacity: .55; }
.dropzone.dragging { border-color: var(--accent); border-style: solid; box-shadow: 0 0 0 3.5px var(--accent-ring); }
.dropzone.dragging::before { opacity: 1; }
.dropzone > * { position: relative; }
.drop-art { position: relative; width: 74px; height: 74px; display: grid; place-items: center; margin-bottom: 4px; }
.drop-ring { position: absolute; inset: 6px; border-radius: 50%; border: 1px dashed color-mix(in srgb, var(--muted) 50%, transparent); animation: spinslow 16s linear infinite; }
.drop-ring::after { content: ""; position: absolute; inset: -7px; border-radius: 50%; border: 1px solid color-mix(in srgb, var(--muted) 18%, transparent); }
@keyframes spinslow { to { transform: rotate(360deg) } }
.drop-icon {
  width: 46px; height: 46px; border-radius: var(--r-lg); background: var(--solid); color: var(--solid-text);
  display: grid; place-items: center; box-shadow: var(--shadow-sm); transition: transform .25s var(--ease);
}
.drop-icon svg { width: 22px; height: 22px; }
.dropzone:hover .drop-icon { transform: translateY(-2px); }
.dropzone.dragging .drop-icon { animation: bob .9s ease-in-out infinite; }
@keyframes bob { 0%,100% { transform: translateY(0) } 50% { transform: translateY(-5px) } }
.drop-title { font-size: 16px; font-weight: 600; letter-spacing: -.015em; }
.drop-sub { font-size: 13.5px; color: var(--text-3); }
.drop-meta { font-size: 12px; color: var(--muted); margin-top: 3px; }
.drop-types { display: flex; gap: 5px; flex-wrap: wrap; justify-content: center; margin-top: 9px; }

/* Panels */
.panel { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl); box-shadow: var(--shadow-xs); overflow: hidden; }
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 13px; padding: 14px 18px; border-bottom: 1px solid var(--line-2); flex-wrap: wrap; }
.panel-title { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.panel-title h2 { font-size: 14.5px; font-weight: 600; }
.panel-sub { font-size: 12.5px; color: var(--muted); }
.panel-tools { display: flex; align-items: center; gap: 9px; }
.sort { display: flex; align-items: center; gap: 7px; font-size: 12px; font-weight: 500; color: var(--muted); }

/* Übertragungen */
.panel-transfers { animation: fadeUp .4s var(--ease); }
.progress-total { height: 2px; background: var(--surface-3); }
.progress-total > div { height: 100%; width: 0; background: var(--accent); transition: width .3s var(--ease); }
.transfer-list { display: flex; flex-direction: column; }
.transfer {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) auto; gap: 13px; align-items: center;
  padding: 12px 18px; border-bottom: 1px solid var(--line-2); animation: fadeUp .35s var(--ease);
}
.transfer:last-child { border-bottom: none; }
.transfer-main { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.transfer-name { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.transfer-meta { font-size: 12px; color: var(--muted); display: flex; gap: 7px; align-items: center; flex-wrap: wrap; }
.transfer-meta .sep { opacity: .45; }
.transfer-bar { height: 3px; border-radius: 2px; background: var(--surface-3); overflow: hidden; margin-top: 3px; }
.transfer-bar > div { height: 100%; width: 0; background: var(--accent); border-radius: 2px; transition: width .25s var(--ease); position: relative; }
.transfer-bar > div::after { content: ""; position: absolute; inset: 0; background: linear-gradient(90deg, transparent, rgba(255,255,255,.5), transparent); animation: shimmer 1.3s linear infinite; }
@keyframes shimmer { from { transform: translateX(-100%) } to { transform: translateX(100%) } }
.transfer-error-text { font-size: 12px; color: var(--err); }
.transfer-right { display: flex; align-items: center; gap: 7px; }
.pct { font-size: 12px; font-weight: 600; color: var(--text-2); font-variant-numeric: tabular-nums; min-width: 34px; text-align: right; }
.check { width: 25px; height: 25px; border-radius: 50%; background: var(--ok-bg); border: 1px solid var(--ok-line); color: var(--ok); display: grid; place-items: center; animation: pop .35s var(--ease); }
.check svg { width: 13px; height: 13px; }
@keyframes pop { 0% { transform: scale(.5); opacity: 0 } 65% { transform: scale(1.1) } 100% { transform: scale(1); opacity: 1 } }
.mini-btn { border: 1px solid var(--line); background: var(--surface); color: var(--text-3); border-radius: var(--r-sm); padding: 4px 8px; font-size: 11.5px; font-weight: 500; cursor: pointer; display: inline-flex; align-items: center; gap: 5px; }
.mini-btn:hover { color: var(--text); border-color: var(--muted); }
.mini-btn svg { width: 12px; height: 12px; }
.mini-btn.danger:hover { color: var(--err); border-color: var(--err-line); }

/* Dateitabelle */
.file-table { display: flex; flex-direction: column; }
.file-head { display: grid; grid-template-columns: 38px minmax(0, 1fr) 96px 142px 122px 34px; gap: 13px; padding: 8px 18px; font-size: 10.5px; font-weight: 600; letter-spacing: .07em; text-transform: uppercase; color: var(--muted); border-bottom: 1px solid var(--line-2); background: var(--surface-2); }
.file-row {
  display: grid; grid-template-columns: 38px minmax(0, 1fr) 96px 142px 122px 34px; gap: 13px; align-items: center;
  padding: 10px 18px; border-bottom: 1px solid var(--line-2); transition: background .12s;
  animation: fadeIn .4s var(--ease) both;
}
.file-row:nth-child(2) { animation-delay: .02s } .file-row:nth-child(3) { animation-delay: .05s }
.file-row:nth-child(4) { animation-delay: .08s } .file-row:nth-child(5) { animation-delay: .11s }
.file-row:nth-child(n+6) { animation-delay: .14s }
.file-row:hover { background: var(--surface-2); }
.file-row:last-child { border-bottom: none; }
.file-main { min-width: 0; display: flex; flex-direction: column; gap: 1px; }
.file-name { font-size: 13.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-name mark { background: color-mix(in srgb, var(--accent) 22%, transparent); color: inherit; border-radius: 2px; padding: 0 1px; }
.file-sub { font-size: 11.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-size, .file-date { font-size: 12.5px; color: var(--text-3); font-variant-numeric: tabular-nums; white-space: nowrap; }
.file-empty { padding: 44px 24px; text-align: center; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 9px; animation: fadeUp .4s var(--ease); }
.file-empty .empty-art { width: 52px; height: 52px; border-radius: var(--r-lg); background: var(--surface-3); border: 1px solid var(--line); display: grid; place-items: center; color: var(--muted); }
.file-empty .empty-art svg { width: 24px; height: 24px; }
.file-empty strong { color: var(--text-2); font-size: 13.5px; font-weight: 600; }
.file-empty span { font-size: 12.5px; }

.file-actions { display: flex; justify-content: flex-end; }
.row-btn {
  min-width: 30px; height: 30px; border-radius: var(--r-sm); border: 1px solid transparent; background: transparent;
  color: var(--muted); cursor: pointer; display: inline-grid; place-items: center; padding: 0;
  font-size: 11.5px; font-weight: 500; transition: background .15s, color .15s, opacity .15s, border-color .15s;
  opacity: 0;
}
.file-row:hover .row-btn, .row-btn.confirm, .row-btn.is-busy, .row-btn:focus-visible { opacity: 1; }
.row-btn:hover { background: var(--err-bg); border-color: var(--err-line); color: var(--err); }
.row-btn svg { width: 14px; height: 14px; }
.row-btn.confirm { padding: 0 10px; background: var(--err); border-color: var(--err); color: #fff; white-space: nowrap; animation: pop .22s var(--ease); }
.row-btn.confirm:hover { background: #8f1e17; border-color: #8f1e17; color: #fff; }
.row-btn.is-busy { cursor: default; }
.row-spinner { width: 14px; height: 14px; border-radius: 50%; border: 2px solid color-mix(in srgb, var(--muted) 35%, transparent); border-top-color: var(--muted); animation: spin .65s linear infinite; }
@media (hover: none) { .row-btn { opacity: 1; } }

.footer { padding: 14px 20px; font-size: 12px; color: var(--muted); display: flex; gap: 16px; flex-wrap: wrap; border-top: 1px solid var(--line); background: var(--surface); }
.footer-version { margin-left: auto !important; margin-right: 56px; }  /* links: überstimmt den Inline-Abstand; rechts: Platz für die Chat-Sprechblase (48 px, fest rechts unten) */
/* „Bereitgestellt von Sawora. Solutions“ mittig (wie bei allen Kunden-Websites, 08.10.2026):
   ab 1440 px mittlere Spalte von 1fr auto 1fr (Hinweis links, Version rechts), darunter eigene
   zentrierte Zeile unter Hinweis und Version, bis 780 px alles zentriert untereinander. */
@media (min-width: 1440px) {
  .footer { display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; }
  .footer > .footer-version { justify-self: end; margin-left: 0 !important; }
}
@media (max-width: 1439px) {
  .footer > .footer-credit { order: 3; width: 100%; text-align: center; }
}
@media (max-width: 780px) {
  .footer { flex-direction: column; align-items: center; text-align: center; gap: 6px; }
  .footer > .footer-credit { order: 0; }
  .footer > .footer-version { margin-left: 0 !important; margin-right: 0; }
}

/* „Sawora. Solutions“ im Verlauf wie bei Elektro Wildschütz (blue-500 → indigo-600) */
.sawora-verlauf {
  font-weight: 600; background-image: linear-gradient(to right, #3b82f6, #4f46e5);
  -webkit-background-clip: text; background-clip: text; color: transparent;
}
a.sawora-verlauf { text-decoration: none; transition: opacity .15s cubic-bezier(.4,0,.2,1); }
a.sawora-verlauf:hover, a.sawora-verlauf:focus-visible { color: transparent; opacity: .8; }

/* ───────────────────────── Angemeldete Person ───────────────────────── */
.user-chip {
  display: inline-flex; align-items: center; gap: 8px; padding: 4px 11px 4px 4px; border-radius: 999px;
  border: 1px solid var(--line); background: var(--surface-2); max-width: 190px;
}
.user-avatar {
  width: 24px; height: 24px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--solid); color: var(--solid-text); font-size: 10.5px; font-weight: 600;
}
.user-name { font-size: 12.5px; font-weight: 500; color: var(--text-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ───────────────────────── Kontakt-Blase ───────────────────────── */
.help { position: fixed; right: 20px; bottom: 20px; z-index: 60; display: flex; flex-direction: column; align-items: flex-end; gap: 10px; }
.help-btn {
  width: 48px; height: 48px; border-radius: 50%; border: 1px solid var(--line); cursor: pointer;
  background: var(--solid); color: var(--solid-text); display: grid; place-items: center;
  box-shadow: var(--shadow-md); position: relative;
  transition: transform .18s var(--ease), box-shadow .18s;
}
.help-btn:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.help-btn svg { width: 21px; height: 21px; grid-area: 1 / 1; transition: opacity .18s, transform .22s var(--ease); }
.help-btn .help-icon-close { opacity: 0; transform: rotate(-90deg) scale(.7); }
.help-btn.is-open .help-icon-chat { opacity: 0; transform: rotate(90deg) scale(.7); }
.help-btn.is-open .help-icon-close { opacity: 1; transform: none; }
/* Dezenter Puls, damit die Blase beim ersten Blick auffällt. */
.help-btn::after {
  content: ""; position: absolute; inset: -3px; border-radius: 50%;
  border: 1.5px solid var(--solid); opacity: 0; animation: ping 3.6s var(--ease) 2s infinite;
}
.help-btn.is-open::after { display: none; }
@keyframes ping { 0% { transform: scale(.92); opacity: .5 } 55%, 100% { transform: scale(1.3); opacity: 0 } }

.help-card {
  width: min(310px, calc(100vw - 40px));
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-xl);
  box-shadow: var(--shadow-lg); padding: 16px; display: flex; flex-direction: column; gap: 12px;
  animation: helpin .28s var(--ease);
}
@keyframes helpin { from { opacity: 0; transform: translateY(10px) scale(.97) } to { opacity: 1; transform: none } }
.help-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.help-title { font-size: 11px; font-weight: 600; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.help-close { border: none; background: transparent; color: var(--muted); cursor: pointer; padding: 4px; border-radius: var(--r-sm); margin: -4px -4px -4px 0; }
.help-close:hover { background: var(--surface-3); color: var(--text); }
.help-close svg { width: 14px; height: 14px; }
.help-person { display: flex; align-items: center; gap: 11px; }
.help-avatar {
  width: 38px; height: 38px; border-radius: 50%; flex: none; display: grid; place-items: center;
  background: var(--solid); color: var(--solid-text); font-size: 13px; font-weight: 600; letter-spacing: -.01em;
}
.help-person-text { display: flex; flex-direction: column; line-height: 1.3; min-width: 0; }
.help-person-text strong { font-size: 14px; font-weight: 600; color: var(--text); }
.help-person-text small { font-size: 12px; color: var(--muted); }
.help-text { font-size: 12.5px; line-height: 1.55; color: var(--text-3); }
.help-card .btn-primary { margin-top: 1px; }
.help-mail { font-size: 12px; color: var(--text-3); text-align: center; word-break: break-all; }
.help-mail:hover { color: var(--text); }
.help-note {
  display: flex; gap: 7px; align-items: flex-start; font-size: 11.5px; color: var(--muted); line-height: 1.5;
  border-top: 1px solid var(--line-2); padding-top: 10px;
}
.help-note svg { width: 13px; height: 13px; flex: none; margin-top: 1.5px; }

/* ───────────────────────── Responsive ───────────────────────── */
@media (max-width: 1100px) {
  .shell { grid-template-columns: 228px minmax(0, 1fr); }
  .brand-div, .brand-org { display: none; }
  .search { min-width: 150px; }
  .search kbd { display: none; }
  .file-head, .file-row { grid-template-columns: 38px minmax(0, 1fr) 86px 112px 34px; }
  .recent-row { grid-template-columns: 38px minmax(0, 1fr) 86px 112px; }
  .file-head .col-date, .file-row .file-date { display: none; }
  .start-steps { grid-template-columns: 1fr; }
}
@media (max-width: 900px) {
  .auth { grid-template-columns: 1fr; }
  .auth-brand { display: none; }
  .brand-compact { visibility: visible; }
  .auth-panel { padding: 18px; }
  .auth-card { padding: 26px 22px; }
}
@media (max-width: 820px) {
  .topbar { padding: 9px 14px; gap: 9px; flex-wrap: wrap; }
  .search { order: 3; max-width: none; flex-basis: 100%; }
  .topbar-right { margin-left: auto; }
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; max-height: none; border-right: none; border-bottom: 1px solid var(--line); padding: 14px; gap: 14px; }
  .sidebar-card, .sidebar-foot { display: none; }
  .folder-nav { flex-direction: row; flex-wrap: wrap; gap: 5px; }
  .folder-btn { width: auto; padding: 6px 10px 6px 6px; background: var(--surface); border-color: var(--line); }
  .folder-btn .folder-ic { width: 22px; height: 22px; }
  .new-folder-btn { width: auto; padding: 6px 11px 6px 6px; margin-top: 5px; border: 1px solid var(--line); }
  .main { padding: 18px 14px 44px; gap: 14px; }
  .page-title { font-size: 22px; }
  .stats { width: 100%; }
  .stat { flex: 1; min-width: 0; padding: 8px 11px; }
  .stat-value { font-size: 16px; }
  .dropzone { min-height: 190px; padding: 24px 16px; }
  .drop-types { display: none; }
  .start-steps { grid-template-columns: 1fr; gap: 8px; }
  .start-hero .page-title { font-size: 22px; }
  .folder-grid { grid-template-columns: 1fr; }
  .recent-row { grid-template-columns: 38px minmax(0, 1fr) auto; }
  .user-form { grid-template-columns: 1fr; gap: 10px; padding: 14px; }
  .user-row { grid-template-columns: 34px minmax(0, 1fr) auto; row-gap: 6px; }
  .user-row .tag { grid-column: 2; grid-row: 2; justify-self: start; }
  .user-actions { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .code-row code { min-width: 0; font-size: 13px; }
  .panel-head, .transfer, .file-row, .file-head { padding-left: 14px; padding-right: 14px; }
  .file-head { display: none; }
  .file-row { grid-template-columns: 38px minmax(0, 1fr) auto; row-gap: 6px; }
  .file-size { display: none; }
  .file-row .tag { grid-column: 2; grid-row: 2; justify-self: start; }
  .file-actions { grid-column: 3; grid-row: 1 / span 2; align-self: center; }
  .footer { padding: 13px 14px; }
  .pill .pill-text { display: none; }
  .pill { padding: 8px; }
  .user-chip .user-name { display: none; }
  .user-chip { padding: 4px; }
  .help { right: 14px; bottom: 14px; }
  .help-btn { width: 44px; height: 44px; }
  .footer span:first-child { max-width: 100%; }
}
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { animation-duration: .01ms !important; animation-iteration-count: 1 !important; transition-duration: .01ms !important; }
}
