/* =====================================================
   AVERRO CONTENT-HUB - WEB 10
   Layout: eine App-Spalte (max. 600px) wie auf dem Handy,
   Tab-Leiste unten, auf grossen Bildschirmen mittig.
   Bewusst nur dunkel: so sieht die App aus.
   ===================================================== */
@font-face {
  font-family: 'Michroma';
  src: url('Michroma.woff2') format('woff2');
  font-display: swap;
}

:root {
  --bg: #000000;
  --surface: #0d0d0d;
  --raised: #1a1a1a;
  --input: #141414;
  --hover: #222222;
  --line: #2a2a2a;
  --line-soft: #1f1f1f;
  --text: #ffffff;
  --text-2: #e5e5e5;
  --muted: #9ca3af;
  --dim: #6b7280;
  --primary: #ff6b00;
  --accent: #ff8c00;
  --on-primary: #000000;
  --ok: #10b981;
  --warn: #f59e0b;
  --bad: #ef4444;
  --info: #3b82f6;
  --critical: #b91c1c;

  --f-brand: 'Michroma', 'Eurostile', 'Arial Black', system-ui, sans-serif;
  --f-body: -apple-system, BlinkMacSystemFont, 'SF Pro Text', 'Segoe UI', Roboto, 'Helvetica Neue', Arial, sans-serif;

  --gutter-l: max(16px, env(safe-area-inset-left, 0px));
  --gutter-r: max(16px, env(safe-area-inset-right, 0px));
  --nav-h: 64px;
  --col: 600px;
  --r-sm: 6px;
  --r: 12px;
  --r-lg: 16px;
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; background: var(--bg); }
body {
  margin: 0;
  min-height: 100%;
  background: var(--bg);
  color: var(--text);
  font: 15px/1.45 var(--f-body);
  -webkit-font-smoothing: antialiased;
  -webkit-tap-highlight-color: transparent;
  overflow-x: hidden;
}
body.locked { overflow: hidden; }
body::before {
  content: "";
  position: fixed;
  inset: 0 0 auto;
  height: env(safe-area-inset-top, 0px);
  z-index: 30;
  background: var(--surface);
}
button, input, textarea { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--accent); }
img { max-width: 100%; }
[hidden] { display: none !important; }
:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
h1, h2, h3, p { margin: 0; }
h1, h2 { text-wrap: balance; }

.i { width: 1.2em; height: 1.2em; flex: none; display: inline-block; vertical-align: middle; }
.i.dim { color: var(--dim); }
.i.ok { color: var(--ok); }
.i.bad { color: var(--bad); }
.i.acc { color: var(--accent); }

/* ---------- Spalte ---------- */
.shell {
  max-width: var(--col);
  margin: 0 auto;
  min-height: 100vh;
  padding-bottom: calc(var(--nav-h) + 24px + env(safe-area-inset-bottom, 0px));
}
.pad {
  padding-block: 16px 8px;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  display: flex;
  flex-direction: column;
  gap: 14px;
}

@media (min-width: 760px) {
  html, body {
    background:
      radial-gradient(900px 420px at 50% -120px, rgba(255, 107, 0, 0.10), transparent 70%),
      var(--bg);
    background-attachment: fixed;
  }
  .shell { border-left: 1px solid var(--line-soft); border-right: 1px solid var(--line-soft); background: var(--bg); }
}

/* ---------- Kopfzeilen ---------- */
.topbar {
  position: sticky;
  top: env(safe-area-inset-top, 0px);
  z-index: 20;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  min-height: 60px;
  padding-block: 10px;
  padding-left: var(--gutter-l);
  padding-right: var(--gutter-r);
  background: rgba(13, 13, 13, 0.92);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line);
}
.title-bar h1 { font-size: 18px; font-weight: 700; letter-spacing: 0.2px; }
.tb-text { min-width: 0; }
.tb-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.who { display: flex; align-items: center; gap: 8px; min-width: 0; }
.avatar {
  width: 32px; height: 32px; border-radius: 50%;
  background: var(--accent); color: #fff;
  display: grid; place-items: center;
  font-weight: 700; font-size: 14px; flex: none;
}
.who-name { font-weight: 600; font-size: 16px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

.icon-btn {
  width: 38px; height: 38px; border-radius: 9px;
  display: grid; place-items: center; flex: none;
  color: var(--text); background: var(--raised);
  transition: background 0.15s;
}
.icon-btn:hover { background: var(--hover); }
.icon-btn .i { width: 20px; height: 20px; }
.icon-btn.accent { background: rgba(255, 140, 0, 0.13); color: var(--accent); }

.langs { display: flex; gap: 2px; flex: none; }
.lang {
  padding: 5px 7px; border-radius: 5px;
  font-size: 11px; font-weight: 700; letter-spacing: 0.4px;
  color: var(--muted);
}
.lang.on { background: var(--info); color: #fff; }
.lang:not(.on):hover { color: var(--text); }

/* ---------- Knoepfe ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  min-height: 46px; padding: 0 18px; border-radius: var(--r);
  font-size: 14px; font-weight: 700; letter-spacing: 0.2px;
  transition: filter 0.15s, background 0.15s, opacity 0.15s;
  text-decoration: none; user-select: none;
}
.btn .i { width: 18px; height: 18px; }
.btn.block { width: 100%; }
.btn.primary { background: var(--primary); color: var(--on-primary); }
.btn.primary:hover { filter: brightness(1.08); }
.btn.ghost { background: var(--raised); color: var(--text); border: 1px solid var(--line); }
.btn.ghost:hover { background: var(--hover); }
.btn.danger { background: rgba(239, 68, 68, 0.12); color: var(--bad); border: 1px solid rgba(239, 68, 68, 0.35); }
.btn:disabled, .btn.disabled { opacity: 0.45; pointer-events: none; }
.link-btn { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); font-size: 13px; font-weight: 600; }
.link-btn.bad { color: var(--bad); }
.link-btn .i { width: 15px; height: 15px; }

.chip {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 13px; border-radius: var(--r-sm);
  background: var(--surface); border: 1px solid var(--line-soft);
  font-size: 13px; font-weight: 500; color: var(--text);
}
.chip .i { width: 15px; height: 15px; }
.chip.on { background: var(--primary); border-color: var(--primary); color: var(--on-primary); font-weight: 700; }

.input {
  width: 100%; min-height: 50px; padding: 13px 15px;
  background: var(--raised); border: 1px solid var(--line); border-radius: 9px;
  font-size: 16px; color: var(--text); outline: none;
}
.input:focus { border-color: var(--accent); }
.input.area { min-height: 110px; resize: vertical; line-height: 1.45; }
.label { font-size: 13px; font-weight: 600; color: var(--muted); }
.field-hint { font-size: 12px; color: var(--dim); margin-top: -4px; }
.form-error { color: var(--bad); font-size: 13px; }

.spin {
  width: 18px; height: 18px; border-radius: 50%;
  border: 2px solid rgba(255, 255, 255, 0.25); border-top-color: currentColor;
  display: inline-block; animation: spin 0.8s linear infinite;
}
.spin.big { width: 34px; height: 34px; border-width: 3px; color: var(--primary); border-color: rgba(255, 107, 0, 0.2); border-top-color: var(--primary); }
@keyframes spin { to { transform: rotate(360deg); } }

/* ---------- Login ---------- */
.login {
  max-width: 420px; margin: 0 auto; min-height: 100vh;
  display: flex; flex-direction: column; justify-content: center; align-items: stretch;
  padding-block: 40px;
  padding-left: max(24px, env(safe-area-inset-left, 0px));
  padding-right: max(24px, env(safe-area-inset-right, 0px));
  text-align: center;
}
.login-logo {
  width: 96px; height: 96px; margin: 0 auto 16px; border-radius: 50%;
  border: 3px solid var(--accent); background: var(--bg); overflow: hidden;
  display: grid; place-items: center;
  box-shadow: 0 0 26px rgba(255, 107, 0, 0.55);
}
.login-logo img { width: 84px; height: 84px; }
.brand { font-family: var(--f-brand); font-weight: 400; font-size: 28px; letter-spacing: 4px; }
.brand-sub { font-family: var(--f-brand); font-size: 11px; letter-spacing: 3px; color: var(--accent); margin: 8px 0 32px; }
.login-box {
  background: var(--surface); border-radius: var(--r-lg); padding: 24px;
  display: flex; flex-direction: column; gap: 14px; text-align: left; margin-bottom: 22px;
  border: 1px solid var(--line-soft);
}
.login-title { font-size: 18px; font-weight: 600; }
.input.code { text-align: center; letter-spacing: 3px; text-transform: uppercase; font-weight: 600; }
.input.code::placeholder { letter-spacing: 0.5px; text-transform: none; font-weight: 400; }
.secure { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--muted); font-size: 12px; margin-bottom: 18px; }
.secure .i { color: var(--ok); width: 15px; height: 15px; }
.login-langs { justify-content: center; gap: 6px; }
.login-langs .lang { padding: 8px 12px; font-size: 12px; background: var(--surface); }
.login-langs .lang.on { background: var(--info); }

/* ---------- Content / Aufgaben ---------- */
.hint {
  background: var(--surface); border: 1px solid rgba(255, 107, 0, 0.25);
  border-radius: var(--r); padding: 16px;
  display: flex; flex-direction: column; gap: 6px;
}
.hint h2 { font-size: 14px; font-weight: 600; color: var(--accent); margin-bottom: 2px; }
.hint p { font-size: 13px; color: var(--text); }
.hint .hint-item { font-size: 12.5px; color: var(--muted); }
.report-btn { font-weight: 800; letter-spacing: 0.3px; }

.stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.stat {
  display: flex; flex-direction: column; align-items: center;
  padding: 14px 6px; border-radius: 9px;
  background: var(--surface); border: 2px solid transparent;
}
.stat-num { font-size: 28px; font-weight: 700; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat-label { font-size: 10px; font-weight: 700; letter-spacing: 0.6px; color: var(--muted); margin-top: 4px; }
.stat.on { border-color: var(--text); }
.stat.open { background: rgba(245, 158, 11, 0.09); }
.stat.open .stat-num, .stat.open .stat-label { color: var(--warn); }
.stat.open.on { border-color: var(--warn); }
.stat.done { background: rgba(16, 185, 129, 0.09); }
.stat.done .stat-num, .stat.done .stat-label { color: var(--ok); }
.stat.done.on { border-color: var(--ok); }

.date-filters { display: flex; gap: 8px; }

.pf-scroll {
  overflow-x: auto; scrollbar-width: none;
  margin-left: calc(-1 * var(--gutter-l)); margin-right: calc(-1 * var(--gutter-r));
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.pf-scroll::-webkit-scrollbar { display: none; }
.pf-row { display: flex; gap: 8px; padding: 2px 0 4px; width: max-content; }
.pf {
  width: 44px; height: 44px; border-radius: 50%;
  display: grid; place-items: center;
  background: var(--surface); color: var(--muted);
  border: 1px solid var(--line-soft);
  transition: background 0.15s, color 0.15s;
}
.pf .i { width: 20px; height: 20px; }
.pf:hover { color: var(--text); }
.pf.on { background: var(--pc); border-color: var(--pc); color: #fff; }

.tasks { display: flex; flex-direction: column; gap: 12px; }
.task {
  background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--stripe, var(--line));
  border-radius: var(--r); padding: 16px;
  display: flex; flex-direction: column; gap: 12px;
  min-width: 0;
}
.task-head { display: flex; align-items: flex-start; gap: 12px; }
.task-ico {
  width: 36px; height: 36px; border-radius: 8px; flex: none;
  display: grid; place-items: center; color: #fff;
  background: var(--pc);
  box-shadow: inset 0 0 0 1px rgba(255, 255, 255, 0.08);
}
.task-ico .i { width: 18px; height: 18px; }
.task-ico.sm { width: 30px; height: 30px; border-radius: 7px; }
.task-ico.sm .i { width: 15px; height: 15px; }
.task-info { flex: 1; min-width: 0; }
.task-title { font-size: 15px; font-weight: 700; line-height: 1.35; overflow-wrap: anywhere; }
.qty { color: var(--primary); font-weight: 800; font-variant-numeric: tabular-nums; }
.task-meta { display: flex; flex-wrap: wrap; align-items: center; gap: 8px; margin-top: 5px; }
.task-date { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; color: var(--muted); }
.task-date .i { width: 13px; height: 13px; }
.tc {
  display: inline-flex; align-items: center; gap: 3px;
  background: var(--critical); color: #fff;
  padding: 2px 7px; border-radius: 5px;
  font-size: 10px; font-weight: 800; letter-spacing: 0.3px; text-transform: uppercase;
}
.tc .i { width: 11px; height: 11px; }
.tc.sm { padding: 2px 4px; vertical-align: 1px; }
.badge {
  flex: none; padding: 4px 8px; border-radius: 4px;
  font-size: 9.5px; font-weight: 800; letter-spacing: 0.4px;
}
.badge.open { background: rgba(245, 158, 11, 0.13); color: var(--warn); }
.badge.done { background: rgba(16, 185, 129, 0.13); color: var(--ok); }
.task-details { font-size: 13px; color: var(--muted); line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; }
.task-details a { color: var(--accent); }

.refs { border-top: 1px solid var(--line); padding-top: 12px; display: flex; flex-direction: column; gap: 10px; }
.refs-title { font-size: 12px; font-weight: 600; }
.audio {
  display: flex; align-items: center; gap: 8px; padding: 12px;
  background: rgba(255, 140, 0, 0.12); border-radius: 8px;
  color: var(--accent); font-size: 13px; font-weight: 500; text-decoration: none;
}
.audio span { flex: 1; }
.media-row { display: flex; flex-wrap: wrap; gap: 10px; }
.thumb {
  position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden;
  background: var(--raised); flex: none;
  display: grid; place-items: center; color: var(--muted);
}
.thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.thumb-ov {
  position: absolute; right: 4px; bottom: 4px; padding: 4px; border-radius: 4px;
  background: rgba(0, 0, 0, 0.6); color: #fff; display: grid; place-items: center;
}
.thumb-ov .i { width: 14px; height: 14px; }
.thumb.vid .vid-ico { width: 26px; height: 26px; }
.thumb .play {
  position: absolute; inset: 0; display: grid; place-items: center;
  background: rgba(0, 0, 0, 0.38); color: #fff;
}
.thumb .play .i { width: 32px; height: 32px; }
.vid-label {
  position: absolute; left: 4px; right: 4px; bottom: 4px;
  font-size: 9.5px; color: #fff; background: rgba(0, 0, 0, 0.6);
  border-radius: 4px; padding: 2px; text-align: center;
}
.thumb:hover img { filter: brightness(1.1); }
.ext-links { display: flex; flex-direction: column; gap: 8px; }
.ext {
  display: flex; align-items: center; gap: 8px;
  padding: 10px 12px; border-radius: 8px;
  background: var(--raised); border: 1px solid var(--c);
  color: var(--c); font-size: 13px; font-weight: 600; text-decoration: none;
}
.ext span { flex: 1; }
.ext .i:last-child { width: 15px; height: 15px; }

.task-foot { display: flex; align-items: center; gap: 12px; border-top: 1px solid var(--line); padding-top: 12px; }
.drive-btn {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 7px 11px; border-radius: 6px;
  background: rgba(16, 185, 129, 0.13); color: var(--ok);
  font-size: 12px; font-weight: 600; text-decoration: none;
}
.drive-btn .i { width: 15px; height: 15px; }
.toggle-btn {
  flex: 1; min-height: 40px; border-radius: 7px;
  background: var(--raised); font-size: 12px; font-weight: 700; letter-spacing: 0.4px;
  transition: background 0.15s;
}
.toggle-btn:hover { background: var(--hover); }
.toggle-btn.go { background: rgba(16, 185, 129, 0.16); color: var(--ok); }
.toggle-btn.go:hover { background: rgba(16, 185, 129, 0.26); }

.all-done { display: flex; flex-direction: column; align-items: center; text-align: center; padding: 48px 20px; }
.done-ring {
  width: 104px; height: 104px; border-radius: 50%;
  background: rgba(16, 185, 129, 0.1); border: 1px solid rgba(16, 185, 129, 0.25);
  display: grid; place-items: center; color: var(--ok); margin-bottom: 22px;
}
.done-ring .i { width: 46px; height: 46px; }
.all-done h2 { font-size: 20px; font-weight: 700; margin-bottom: 16px; }
.done-row { display: flex; align-items: center; gap: 9px; color: var(--muted); font-size: 15px; margin-bottom: 16px; }
.done-row .i { color: var(--ok); }
.done-hint { color: var(--dim); font-size: 13px; max-width: 32ch; }

.empty, .state {
  display: flex; flex-direction: column; align-items: center; gap: 12px;
  padding: 56px 16px; color: var(--muted); text-align: center;
}
.empty > .i, .state > .i { width: 48px; height: 48px; color: var(--dim); }
.state > .i.bad { color: var(--bad); }
.empty.small { padding: 28px 16px; }
.empty.small > .i { width: 38px; height: 38px; }

/* ---------- Leaderboard ---------- */
.info-line {
  display: flex; align-items: center; gap: 9px;
  padding: 12px 14px; border-radius: var(--r);
  background: rgba(59, 130, 246, 0.1); color: var(--text-2); font-size: 13px;
}
.info-line .i { color: var(--info); }
.lb { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.lb-card {
  display: flex; gap: 12px; padding: 14px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
}
.lb-card.top { border-color: rgba(255, 107, 0, 0.45); background: linear-gradient(180deg, rgba(255, 107, 0, 0.07), transparent 60%), var(--surface); }
.lb-card.mine { box-shadow: 0 0 0 2px var(--info) inset; }
.lb-rank { width: 40px; flex: none; display: flex; flex-direction: column; align-items: center; gap: 2px; color: var(--muted); }
.lb-rank .i { width: 22px; height: 22px; }
.lb-rank span { font-size: 15px; font-weight: 700; font-variant-numeric: tabular-nums; }
.lb-card.top .lb-rank .i { width: 28px; height: 28px; }
.lb-card.top .lb-rank span { font-size: 18px; color: var(--text); }
.r1 .lb-rank .i { color: #ffd700; }
.r2 .lb-rank .i { color: #c0c0c0; }
.r3 .lb-rank .i { color: #cd7f32; }
.lb-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.lb-name-row { display: flex; align-items: flex-start; justify-content: space-between; gap: 8px; }
.lb-name-row h3 { font-size: 16px; font-weight: 700; overflow-wrap: anywhere; }
.lb-card.top h3 { font-size: 17px; }
.lb-points { text-align: right; flex: none; line-height: 1.1; }
.lb-points b { display: block; font-size: 20px; color: var(--primary); font-variant-numeric: tabular-nums; }
.lb-points span { font-size: 10px; color: var(--muted); }
.lb-sec { font-size: 10px; font-weight: 700; letter-spacing: 0.6px; text-transform: uppercase; color: var(--dim); margin-top: 4px; }
.lb-stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 6px; }
.lb-stats.five { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.lb-stat { background: var(--raised); border-radius: 7px; padding: 6px 4px; text-align: center; min-width: 0; }
.lb-stat-top { display: flex; align-items: center; justify-content: center; gap: 3px; }
.lb-stat-top .i { width: 12px; height: 12px; color: var(--c); }
.lb-stat-top b { font-size: 13px; font-variant-numeric: tabular-nums; }
.lb-stat-label { display: block; font-size: 9.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------- Kalender ---------- */
.cal-nav { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.cal-nav h2 { font-size: 17px; font-weight: 700; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 4px; }
.cal-wd { text-align: center; font-size: 11px; font-weight: 700; color: var(--dim); padding: 4px 0; text-transform: uppercase; }
.cal-cell {
  aspect-ratio: 1 / 1; max-width: 100%; border-radius: 9px;
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 3px;
  background: var(--surface); border: 1px solid transparent;
  font-variant-numeric: tabular-nums;
}
.cal-cell.blank { background: transparent; }
.cal-cell:not(.blank):hover { background: var(--raised); }
.cal-num { font-size: 14px; font-weight: 600; }
.cal-dots { display: flex; gap: 3px; height: 6px; }
.cal-dots i { width: 6px; height: 6px; border-radius: 50%; display: block; }
.cal-cell.has .cal-num { color: var(--text); }
.cal-cell:not(.has) .cal-num { color: var(--muted); }
.cal-cell.cal-done .cal-dots i { opacity: 0.45; }
.cal-cell.today { border-color: var(--accent); }
.cal-cell.today .cal-num { color: var(--accent); }
.cal-cell.sel { background: var(--primary); border-color: var(--primary); }
.cal-cell.sel .cal-num { color: var(--on-primary); font-weight: 800; }
.cal-cell.sel .cal-dots i { box-shadow: 0 0 0 1.5px var(--on-primary); }
.day-head { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; margin-top: 6px; }
.day-head h2 { font-size: 17px; font-weight: 700; }
.day-count { font-size: 12px; color: var(--muted); }
.day-list { display: flex; flex-direction: column; gap: 8px; }
.day-task {
  display: flex; align-items: center; gap: 10px; text-align: left;
  padding: 11px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line);
  border-left: 4px solid var(--stripe, var(--line));
}
.day-task:hover { background: var(--raised); }
.day-task-title { flex: 1; min-width: 0; font-size: 14px; font-weight: 600; overflow-wrap: anywhere; }

/* ---------- Mehr ---------- */
.profile {
  display: flex; align-items: center; gap: 14px;
  padding: 16px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line);
}
.profile-logo { width: 64px; height: 64px; border-radius: 50%; border: 2px solid var(--accent); flex: none; }
.profile-text { min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.profile-text h2 { font-size: 19px; font-weight: 700; overflow-wrap: anywhere; }
.code-line { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--muted); flex-wrap: wrap; }
.code-line .i { color: var(--primary); width: 15px; height: 15px; }
.code-line b { color: var(--text); letter-spacing: 1.5px; }
.section-title { font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--dim); margin: 6px 0 -6px 4px; }
.group { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }
.row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; flex-wrap: wrap; }
.row + .row { border-top: 1px solid var(--line); }
.row-ico { width: 34px; height: 34px; border-radius: 9px; display: grid; place-items: center; color: var(--c); background: color-mix(in srgb, var(--c) 16%, transparent); flex: none; }
.row-label { flex: 1; font-weight: 600; min-width: 8ch; }
.row-value { color: var(--muted); font-size: 13px; font-variant-numeric: tabular-nums; }
.row-langs .lang { padding: 6px 9px; }
.logout-btn { margin-top: 8px; }
.foot { text-align: center; color: var(--dim); font-size: 12px; padding: 18px 0 4px; display: flex; flex-direction: column; gap: 4px; }
.foot-brand { font-family: var(--f-brand); letter-spacing: 2.5px; font-size: 10px; color: var(--muted); }

/* ---------- Drive / Upload ---------- */
.drive { position: relative; }
.drive.dragging::after {
  content: ""; position: absolute; inset: 8px;
  border: 2px dashed var(--accent); border-radius: var(--r-lg);
  background: rgba(255, 107, 0, 0.06); pointer-events: none;
}
.drive-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.crumbs { display: flex; align-items: center; flex-wrap: wrap; gap: 4px; font-size: 13px; }
.crumb { color: var(--accent); font-weight: 600; padding: 4px 2px; }
.crumb.on { color: var(--text); }
.crumbs .i { width: 14px; height: 14px; }
.files { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 8px; transition: opacity 0.2s; }
.files.busy { opacity: 0.5; pointer-events: none; }
.file {
  display: flex; align-items: center; gap: 6px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r);
  padding: 8px 8px 8px 10px;
}
.file-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 12px; text-align: left; padding: 2px 0; }
.file-thumb {
  position: relative; width: 52px; height: 52px; border-radius: 8px; overflow: hidden; flex: none;
  background: var(--raised); display: grid; place-items: center;
}
.file-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.file-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.3); color: #fff; }
.file-thumb.ico .i { width: 26px; height: 26px; }
.file-thumb.folder { background: rgba(255, 107, 0, 0.13); color: var(--primary); }
.file-thumb.image { background: rgba(255, 140, 0, 0.13); color: var(--accent); }
.file-thumb.video { background: rgba(59, 130, 246, 0.14); color: var(--info); }
.file-thumb.doc { color: var(--muted); }
.file-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.file-name { font-size: 14px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.file-sub { font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }
.file .icon-btn { background: transparent; color: var(--muted); }
.file .icon-btn:hover { background: var(--raised); color: var(--text); }
.drop-hint { display: flex; align-items: center; justify-content: center; gap: 7px; color: var(--dim); font-size: 12.5px; }
.drop-hint.desk { display: none; padding: 6px 0; }
@media (pointer: fine) { .drop-hint.desk { display: flex; } }
@media (pointer: coarse) { .empty .drop-hint { display: none; } }

.up-panel {
  background: var(--surface); border: 1px solid rgba(255, 107, 0, 0.3);
  border-radius: var(--r); padding: 14px; display: flex; flex-direction: column; gap: 10px;
}
.up-head { display: flex; align-items: center; gap: 9px; }
.up-title { flex: 1; font-weight: 700; font-size: 14px; }
.up-pct { color: var(--accent); font-variant-numeric: tabular-nums; }
.bar { height: 6px; border-radius: 3px; background: var(--raised); overflow: hidden; }
.bar span { display: block; height: 100%; background: linear-gradient(90deg, var(--primary), var(--accent)); border-radius: 3px; transition: width 0.25s; }
.bar.thin { height: 3px; margin-top: 5px; }
.keep-open { display: flex; align-items: center; gap: 7px; font-size: 12px; color: var(--muted); }
.keep-open .i { color: var(--info); width: 16px; height: 16px; }
.up-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; max-height: 300px; overflow-y: auto; }
.up-item { display: flex; align-items: center; gap: 10px; padding: 8px 0; border-top: 1px solid var(--line-soft); }
.up-ico { color: var(--muted); display: grid; }
.up-info { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.up-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-sub { font-size: 11.5px; color: var(--dim); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-sub em { color: var(--bad); font-style: normal; }
.up-state { font-size: 12px; color: var(--dim); font-variant-numeric: tabular-nums; flex: none; }
.up-state.acc { color: var(--accent); font-weight: 700; }
.up-item.done .up-name { color: var(--muted); }

.up-pill {
  position: fixed; z-index: 25;
  left: 50%; transform: translateX(-50%);
  bottom: calc(var(--nav-h) + 12px + env(safe-area-inset-bottom, 0px));
  width: min(calc(100% - 32px), 420px);
  display: flex; align-items: center; gap: 9px;
  padding: 11px 14px; border-radius: 999px; overflow: hidden;
  background: #151515; border: 1px solid rgba(255, 107, 0, 0.45);
  color: var(--text); text-decoration: none; font-size: 13px; font-weight: 600;
  box-shadow: 0 10px 30px rgba(0, 0, 0, 0.55);
}
.up-pill .i { color: var(--accent); }
.up-pill.ok { border-color: rgba(16, 185, 129, 0.5); }
.up-pill.ok .i { color: var(--ok); }
.up-pill.bad { border-color: rgba(239, 68, 68, 0.5); }
.up-pill.bad .i { color: var(--bad); }
.up-pill-text { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.up-pill b { color: var(--accent); font-variant-numeric: tabular-nums; }
.up-pill-bar { position: absolute; left: 0; bottom: 0; height: 2px; background: var(--primary); transition: width 0.25s; }
.up-pill.ok .up-pill-bar { background: var(--ok); }
.up-pill.bad .up-pill-bar { background: var(--bad); }

/* ---------- Tab-Leiste ---------- */
.nav {
  position: fixed; left: 0; right: 0; bottom: 0; z-index: 24;
  background: rgba(13, 13, 13, 0.96);
  -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-top: 1px solid var(--line);
  padding-bottom: env(safe-area-inset-bottom, 0px);
  padding-left: env(safe-area-inset-left, 0px);
  padding-right: env(safe-area-inset-right, 0px);
}
.nav-inner {
  max-width: var(--col); margin: 0 auto; height: var(--nav-h);
  display: grid; grid-template-columns: repeat(5, 1fr); align-items: center;
}
.nav-item {
  display: flex; flex-direction: column; align-items: center; gap: 3px;
  color: var(--dim); text-decoration: none; font-size: 10.5px; font-weight: 600;
  padding: 6px 0;
}
.nav-item .i { width: 23px; height: 23px; }
.nav-item.on { color: var(--primary); }
.nav-item:hover { color: var(--text); }
.nav-item.on:hover { color: var(--primary); }
.nav-plus {
  justify-self: center; width: 56px; height: 56px; border-radius: 50%;
  margin-top: -22px;
  display: grid; place-items: center;
  background: var(--primary); color: var(--on-primary);
  box-shadow: 0 6px 22px rgba(255, 107, 0, 0.45), 0 0 0 5px var(--bg);
  transition: transform 0.15s;
}
.nav-plus .i { width: 30px; height: 30px; }
.nav-plus:hover { transform: translateY(-1px); }
.nav-plus.on { background: var(--accent); }

/* ---------- Sheets ---------- */
.sheet-wrap { position: fixed; inset: 0; z-index: 40; display: flex; align-items: flex-end; justify-content: center; }
.sheet-backdrop { position: absolute; inset: 0; background: rgba(0, 0, 0, 0.72); opacity: 0; transition: opacity 0.2s; }
.sheet {
  position: relative; width: 100%; max-width: var(--col); max-height: 88vh;
  display: flex; flex-direction: column;
  background: var(--surface); border: 1px solid var(--line); border-bottom: 0;
  border-radius: 20px 20px 0 0;
  padding-bottom: env(safe-area-inset-bottom, 0px);
  transform: translateY(24px); opacity: 0; transition: transform 0.22s ease-out, opacity 0.2s;
}
.sheet-wrap.in .sheet-backdrop { opacity: 1; }
.sheet-wrap.in .sheet { transform: none; opacity: 1; }
.sheet-grip { width: 38px; height: 4px; border-radius: 2px; background: var(--line); margin: 8px auto 0; }
.sheet-head {
  display: flex; align-items: center; justify-content: space-between; gap: 10px;
  padding: 8px var(--gutter-r) 8px var(--gutter-l);
}
.sheet-head h2 { font-size: 17px; font-weight: 700; min-width: 0; overflow-wrap: anywhere; }
.sheet-body { overflow-y: auto; padding: 4px var(--gutter-r) 20px var(--gutter-l); }
.sheet-form { display: flex; flex-direction: column; gap: 12px; }
.sheet-intro { color: var(--muted); font-size: 14px; }
.chips { display: flex; flex-wrap: wrap; gap: 8px; }
.sheet-btns { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: 6px; }
.confirm-text { color: var(--text-2); font-size: 15px; margin-bottom: 8px; overflow-wrap: anywhere; }
.menu { display: flex; flex-direction: column; gap: 4px; }
.menu-item {
  display: flex; align-items: center; gap: 12px; text-align: left;
  padding: 14px 12px; border-radius: 10px; font-weight: 600; font-size: 15px;
}
.menu-item:hover { background: var(--raised); }
.menu-item.bad { color: var(--bad); }
.menu-item .i { width: 20px; height: 20px; color: var(--accent); }
.menu-item.bad .i { color: var(--bad); }
.folder-pick { padding-left: calc(12px + var(--depth, 0) * 16px); }
.pick-text { display: flex; flex-direction: column; min-width: 0; }
.pick-text small { color: var(--dim); font-size: 11.5px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sheet-loading, .sheet-empty { display: flex; align-items: center; justify-content: center; gap: 10px; padding: 26px 0; color: var(--muted); text-align: center; white-space: pre-line; }
.sheet-task .task { border-color: var(--line); }

/* ---------- Vollbild ---------- */
.lightbox {
  position: fixed; inset: 0; z-index: 50;
  background: rgba(0, 0, 0, 0.96);
  display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 14px;
  padding-block: calc(64px + env(safe-area-inset-top, 0px)) calc(20px + env(safe-area-inset-bottom, 0px));
  padding-left: var(--gutter-l); padding-right: var(--gutter-r);
}
.lb-close { position: absolute; top: calc(14px + env(safe-area-inset-top, 0px)); right: calc(14px + env(safe-area-inset-right, 0px)); background: rgba(255, 255, 255, 0.1); }
.lb-stage { position: relative; flex: 1; min-height: 0; width: 100%; display: grid; place-items: center; }
.lb-stage .spin { position: absolute; }
.lb-media { position: relative; max-width: 100%; max-height: 100%; border-radius: 10px; object-fit: contain; background: #000; }
video.lb-media { width: 100%; max-height: 70vh; }
.lb-fail { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.lb-name { color: var(--muted); font-size: 12.5px; text-align: center; max-width: 100%; overflow-wrap: anywhere; }
.lb-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; width: 100%; max-width: 440px; }
.lb-actions .btn { padding: 0 12px; font-size: 13.5px; white-space: nowrap; }

/* ---------- Hinweis-Toast ---------- */
.toast {
  position: fixed; z-index: 60; left: 50%;
  top: calc(12px + env(safe-area-inset-top, 0px));
  transform: translate(-50%, -16px); opacity: 0; pointer-events: none;
  width: max-content; max-width: min(calc(100% - 32px), 440px);
  padding: 12px 16px; border-radius: 12px;
  background: #1c1c1c; border: 1px solid var(--line); color: var(--text);
  font-size: 14px; font-weight: 500; text-align: center;
  box-shadow: 0 12px 30px rgba(0, 0, 0, 0.6);
  transition: opacity 0.2s, transform 0.2s;
}
.toast.show { opacity: 1; transform: translate(-50%, 0); }
.toast.ok { border-color: rgba(16, 185, 129, 0.55); }
.toast.bad { border-color: rgba(239, 68, 68, 0.55); }

@media (max-width: 480px) {
  .lb-stats.five .lb-stat-top .i { display: none; }
  .lb-stats.five .lb-stat-top b { font-size: 12.5px; }
}
@media (max-width: 380px) {
  .langs .lang { padding: 5px 5px; }
  .who-name { font-size: 15px; }
  .lb-stats .lb-stat-top .i { display: none; }
}

@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after { transition: none !important; animation-duration: 0.01ms !important; }
  .spin { animation: spin 1.6s linear infinite !important; }
}

/* Mit Maus: Plattform-Filter umbrechen statt seitlich scrollen */
@media (pointer: fine) {
  .pf-row { flex-wrap: wrap; width: auto; }
}

/* =====================================================
   MANAGER-BEREICH (Computer zuerst)
   Seitenleiste links, Inhalt rechts. Unter 980px klappt
   die Seitenleiste ein und kommt ueber das Menue.
   ===================================================== */
body.mgr { background: var(--bg); }
body.mgr .nav, body.mgr .shell { display: none; }
.m-shell { display: grid; grid-template-columns: 264px minmax(0, 1fr); min-height: 100vh; }
.m-side {
  position: sticky; top: 0; height: 100vh; overflow-y: auto;
  display: flex; flex-direction: column; gap: 14px;
  padding: calc(18px + env(safe-area-inset-top, 0px)) 14px calc(14px + env(safe-area-inset-bottom, 0px)) max(14px, env(safe-area-inset-left, 0px));
  background: var(--surface); border-right: 1px solid var(--line);
  scrollbar-width: thin;
}
.m-brand { display: flex; align-items: center; gap: 10px; padding: 0 4px; }
.m-brand img { width: 40px; height: 40px; border-radius: 50%; border: 2px solid var(--accent); }
.m-brand b { display: block; font-family: var(--f-brand); font-weight: 400; letter-spacing: 3px; font-size: 15px; }
.m-brand small { display: block; font-family: var(--f-brand); letter-spacing: 2px; font-size: 8.5px; color: var(--accent); margin-top: 2px; }
.m-new { min-height: 42px; }
.m-nav { display: flex; flex-direction: column; gap: 2px; }
.m-nav-item, .m-model {
  display: flex; align-items: center; gap: 10px; min-height: 38px; padding: 0 10px; border-radius: 9px;
  color: var(--text-2); text-decoration: none; font-size: 14px; font-weight: 500;
}
.m-nav-item .i { width: 19px; height: 19px; color: var(--muted); }
.m-nav-item span, .m-model-name { flex: 1; min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-nav-item:hover, .m-model:hover { background: var(--raised); }
.m-nav-item.on, .m-model.on { background: rgba(255, 107, 0, 0.13); color: var(--text); }
.m-nav-item.on .i { color: var(--primary); }
.m-count { min-width: 22px; padding: 1px 7px; border-radius: 999px; background: var(--raised); color: var(--muted); font-size: 11.5px; text-align: center; font-variant-numeric: tabular-nums; }
.m-nav-item.on .m-count, .m-model.on .m-count { background: var(--primary); color: var(--on-primary); }
.m-sec { display: flex; align-items: center; justify-content: space-between; padding: 6px 4px 0 10px; font-size: 11px; font-weight: 700; letter-spacing: 0.8px; text-transform: uppercase; color: var(--dim); }
.m-models { display: flex; flex-direction: column; gap: 2px; flex: 1; }
.m-user { display: flex; align-items: center; gap: 10px; padding: 12px 4px 0; border-top: 1px solid var(--line); }
.m-user-text { flex: 1; min-width: 0; line-height: 1.2; }
.m-user-text b { display: block; font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-user-text small { color: var(--dim); font-size: 11.5px; }
.icon-btn.sm { width: 32px; height: 32px; border-radius: 8px; }
.icon-btn.sm .i { width: 17px; height: 17px; }
.icon-btn.danger { color: var(--bad); }
.icon-btn.danger:hover { background: rgba(239, 68, 68, 0.14); }
.m-sec .icon-btn { background: transparent; color: var(--muted); }
.m-sec .icon-btn:hover { background: var(--raised); color: var(--text); }
.m-user .icon-btn { background: transparent; color: var(--muted); }
.m-dot {
  width: 26px; height: 26px; border-radius: 50%; flex: none;
  display: inline-grid; place-items: center;
  background: color-mix(in srgb, var(--mc) 22%, transparent); color: var(--mc);
  border: 1px solid color-mix(in srgb, var(--mc) 55%, transparent);
  font-size: 12px; font-weight: 800;
}
.m-dot.xs { width: 18px; height: 18px; font-size: 9.5px; }
.m-dot.lg { width: 56px; height: 56px; font-size: 22px; border-width: 2px; }
.m-muted { color: var(--dim); }
.m-muted.small, .small { font-size: 12.5px; }
.bad { color: var(--bad); }
.mono { font-family: ui-monospace, 'SF Mono', Menlo, Consolas, monospace; letter-spacing: 1px; }

.m-main { min-width: 0; }
.m-head {
  position: sticky; top: env(safe-area-inset-top, 0px); z-index: 20;
  display: flex; align-items: center; gap: 14px; min-height: 72px;
  padding-block: 12px; padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px));
  background: rgba(0, 0, 0, 0.86); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px);
  border-bottom: 1px solid var(--line-soft);
}
.m-head-text { flex: 1; min-width: 0; }
.m-head h1 { font-size: 22px; font-weight: 700; letter-spacing: 0.1px; }
.m-head p { color: var(--muted); font-size: 13px; margin-top: 2px; }
.m-head-actions { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: flex-end; }
.m-burger { display: none; }
.m-pad {
  max-width: 1180px;
  padding-block: 20px 60px;
  padding-left: max(28px, env(safe-area-inset-left, 0px)); padding-right: max(28px, env(safe-area-inset-right, 0px));
  display: flex; flex-direction: column; gap: 16px;
}
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.input.sm { min-height: 38px; padding: 8px 12px; font-size: 14px; border-radius: 8px; }
select.input { appearance: none; -webkit-appearance: none; padding-right: 34px; cursor: pointer;
  background-image: linear-gradient(45deg, transparent 50%, var(--muted) 50%), linear-gradient(135deg, var(--muted) 50%, transparent 50%);
  background-position: calc(100% - 17px) 55%, calc(100% - 12px) 55%; background-size: 5px 5px; background-repeat: no-repeat; }

/* Filter */
.m-filters { display: flex; flex-wrap: wrap; gap: 10px; align-items: center; }
.m-filter-row { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; flex: 1; min-width: 0; }
.m-filter-row select { width: auto; min-width: 150px; }
.m-search { position: relative; flex: 1; min-width: 180px; display: flex; }
.m-search .i { position: absolute; left: 11px; top: 50%; transform: translateY(-50%); color: var(--dim); width: 16px; height: 16px; }
.m-search .input { padding-left: 34px; }
.seg { display: inline-flex; background: var(--surface); border: 1px solid var(--line); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { padding: 6px 12px; border-radius: 6px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.seg button:hover { color: var(--text); }
.seg button.on { background: var(--raised); color: var(--text); box-shadow: inset 0 0 0 1px var(--line); }

/* Aufgaben-Zeilen */
.m-groups { display: flex; flex-direction: column; gap: 22px; }
.m-group { display: flex; flex-direction: column; gap: 6px; }
.m-group-head { display: flex; align-items: center; gap: 8px; font-size: 13px; font-weight: 700; color: var(--muted); padding: 0 2px 4px; text-transform: none; }
.m-group-head span { color: var(--dim); font-weight: 600; font-variant-numeric: tabular-nums; }
.m-group.overdue .m-group-head { color: var(--bad); }
.m-group-head .i { width: 16px; height: 16px; }
.m-row {
  display: flex; align-items: center; gap: 12px;
  padding: 10px 10px 10px 12px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line-soft);
  border-left: 4px solid var(--stripe, var(--line));
  transition: background 0.12s;
}
.m-row:hover { background: #121212; }
.m-row.done { opacity: 0.55; }
.m-row.done .m-row-title { text-decoration: line-through; text-decoration-color: var(--dim); }
.m-check {
  width: 24px; height: 24px; border-radius: 7px; flex: none;
  border: 2px solid var(--line); display: grid; place-items: center; color: transparent;
}
.m-check .i { width: 15px; height: 15px; }
.m-check:hover { border-color: var(--ok); color: var(--ok); }
.m-check.on { background: var(--ok); border-color: var(--ok); color: #000; }
.m-row-main { flex: 1; min-width: 0; text-align: left; display: flex; flex-direction: column; gap: 3px; padding: 2px 0; }
.m-row-title { font-size: 14.5px; font-weight: 650; line-height: 1.35; overflow-wrap: anywhere; }
.m-row-meta { display: flex; align-items: center; gap: 12px; font-size: 12px; color: var(--muted); min-width: 0; overflow: hidden; white-space: nowrap; }
.m-row-meta > span { display: inline-flex; align-items: center; gap: 4px; flex: none; }
.m-row-meta .i { width: 13px; height: 13px; }
.m-meta-model { color: var(--text-2); font-weight: 600; }
.m-meta-details { flex: 1 1 auto !important; min-width: 0; overflow: hidden; text-overflow: ellipsis; color: var(--dim); display: block !important; }
.m-row-actions { display: flex; gap: 2px; opacity: 0.35; transition: opacity 0.15s; }
.m-row:hover .m-row-actions, .m-row:focus-within .m-row-actions { opacity: 1; }
.m-row-actions .icon-btn { background: transparent; color: var(--muted); }
.m-row-actions .icon-btn:hover { background: var(--raised); color: var(--text); }
.m-row-actions .icon-btn.danger:hover { color: var(--bad); }
@media (pointer: coarse) { .m-row-actions { opacity: 1; } }

/* Model-Seite */
.m-model-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; padding: 18px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); }
.m-model-info { flex: 1; min-width: 220px; display: flex; flex-direction: column; gap: 8px; }
.m-kv { display: flex; align-items: center; flex-wrap: wrap; gap: 8px; color: var(--muted); font-size: 13.5px; }
.m-kv .i { color: var(--accent); width: 16px; height: 16px; }
.m-kv b { color: var(--text); }
.m-kv a { display: inline-flex; align-items: center; gap: 4px; text-decoration: none; }
.m-kv a .i { width: 13px; height: 13px; }
.m-model-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.m-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); overflow-x: auto; scrollbar-width: none; }
.m-tabs a { display: inline-flex; align-items: center; gap: 7px; padding: 10px 14px; color: var(--muted); text-decoration: none; font-size: 14px; font-weight: 600; border-bottom: 2px solid transparent; margin-bottom: -1px; white-space: nowrap; }
.m-tabs a .i { width: 17px; height: 17px; }
.m-tabs a:hover { color: var(--text); }
.m-tabs a.on { color: var(--text); border-bottom-color: var(--primary); }
.m-tabs a.on .i { color: var(--primary); }

/* Kalender */
.cal-nav-inline { display: flex; align-items: center; gap: 6px; }
.mcal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.mcal-wd { font-size: 11.5px; font-weight: 700; color: var(--dim); text-transform: uppercase; letter-spacing: 0.6px; padding: 0 6px 2px; }
.mcal-day {
  min-height: 128px; min-width: 0; padding: 6px; border-radius: 10px;
  background: var(--surface); border: 1px solid var(--line-soft);
  display: flex; flex-direction: column; gap: 4px; transition: border-color 0.12s, background 0.12s;
}
.mcal-day.out { opacity: 0.45; }
.mcal-day.today { border-color: var(--accent); }
.mcal-day.drop { border-color: var(--primary); background: rgba(255, 107, 0, 0.08); }
.mcal-top { display: flex; align-items: center; justify-content: space-between; }
.mcal-num { font-size: 13px; font-weight: 700; color: var(--muted); padding: 2px 4px; font-variant-numeric: tabular-nums; }
.mcal-day.today .mcal-num { color: var(--accent); }
.mcal-add { width: 24px; height: 24px; border-radius: 6px; display: grid; place-items: center; color: var(--dim); opacity: 0; transition: opacity 0.12s; }
.mcal-add .i { width: 16px; height: 16px; }
.mcal-day:hover .mcal-add { opacity: 1; }
.mcal-add:hover { background: var(--raised); color: var(--text); }
@media (pointer: coarse) { .mcal-add { opacity: 1; } }
.mcal-items { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.mcal-chip {
  display: flex; align-items: center; gap: 5px; min-width: 0; text-align: left;
  padding: 3px 6px; border-radius: 6px; font-size: 11.5px; line-height: 1.3;
  background: var(--raised); border-left: 3px solid var(--stripe);
  cursor: pointer;
}
.mcal-chip[draggable="true"] { cursor: grab; }
.mcal-chip b { flex: none; font-size: 10px; color: var(--muted); }
.mcal-chip span { min-width: 0; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.mcal-chip.done { opacity: 0.5; text-decoration: line-through; }
.mcal-chip:hover { background: var(--hover); }
.mcal-chip.dragging { opacity: 0.35; }
.mcal-more { font-size: 11px; color: var(--accent); text-align: left; padding: 1px 6px; font-weight: 600; }
.m-day-list { display: flex; flex-direction: column; gap: 6px; }

/* Detail */
.m-detail { display: flex; flex-direction: column; gap: 12px; }
.m-detail-model { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 13px; }

/* Editor */
.sheet.wide .sheet-body { padding-bottom: 0; }
.m-editor { display: flex; flex-direction: column; gap: 16px; position: relative; }
.m-editor.dragging { outline: 2px dashed var(--accent); outline-offset: 6px; border-radius: 10px; }
.ed-block { display: flex; flex-direction: column; gap: 8px; min-width: 0; }
.ed-block .label small { font-weight: 500; color: var(--dim); }
.ed-grid { display: flex; gap: 12px; flex-wrap: wrap; }
.ed-block.grow { flex: 1 1 260px; }
.qty-field { width: 130px; }
.chip.m-chip { gap: 7px; }
.chip.m-chip.on { background: rgba(255, 107, 0, 0.16); border-color: var(--primary); color: var(--text); font-weight: 600; }
.chip.static { cursor: default; }
.chip.pf-chip .i { color: var(--pc); }
.chip.pf-chip.on { background: var(--pc); border-color: var(--pc); color: #fff; }
.chip.pf-chip.on .i { color: #fff; }
.ed-cal { background: var(--surface); border: 1px solid var(--line); border-radius: 12px; padding: 12px; max-width: 420px; }
.ed-cal-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.ed-cal-grid { display: grid; grid-template-columns: repeat(7, 1fr); gap: 3px; }
.ed-wd { text-align: center; font-size: 10.5px; font-weight: 700; color: var(--dim); padding: 2px 0 4px; }
.ed-day { height: 36px; border-radius: 8px; font-size: 13.5px; font-weight: 600; font-variant-numeric: tabular-nums; color: var(--text-2); user-select: none; }
.ed-day:hover { background: var(--raised); }
.ed-day.past { color: var(--dim); }
.ed-day.today { box-shadow: inset 0 0 0 1px var(--accent); }
.ed-day.on { background: var(--primary); color: var(--on-primary); font-weight: 800; }
.ed-cal-foot { display: flex; align-items: center; justify-content: space-between; gap: 10px; margin-top: 10px; font-size: 12.5px; color: var(--muted); flex-wrap: wrap; }
.ed-quick { display: flex; gap: 12px; }
.switch-row { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 12px 14px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line); cursor: pointer; }
.switch-row span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.switch-row b { font-size: 14px; }
.switch-row small { font-size: 12px; color: var(--dim); }
.switch { appearance: none; -webkit-appearance: none; width: 44px; height: 26px; border-radius: 13px; background: var(--line); position: relative; flex: none; cursor: pointer; transition: background 0.15s; margin: 0; }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; transition: transform 0.15s; }
.switch:checked { background: var(--ok); }
.switch:checked::after { transform: translateX(18px); }
.ed-refs { display: flex; flex-wrap: wrap; gap: 10px; }
.ed-ref { position: relative; width: 92px; height: 92px; border-radius: 10px; overflow: hidden; background: var(--raised); border: 1px solid var(--line); display: grid; place-items: center; }
.ed-ref.link { width: 120px; }
.ed-ref img { width: 100%; height: 100%; object-fit: cover; }
.ed-ref-x { position: absolute; top: 4px; right: 4px; width: 24px; height: 24px; border-radius: 50%; background: rgba(0, 0, 0, 0.72); color: #fff; display: grid; place-items: center; }
.ed-ref-x .i { width: 14px; height: 14px; }
.ed-ref-x:hover { background: var(--bad); }
.ed-ref-prog, .ed-ref-vid, .ed-ref-link, .ed-ref-err { display: flex; flex-direction: column; align-items: center; gap: 5px; padding: 6px; text-align: center; font-size: 11px; color: var(--muted); }
.ed-ref-prog b { color: var(--accent); font-size: 12px; }
.ed-ref-vid .i { width: 26px; height: 26px; color: var(--info); }
.ed-ref-vid small { max-width: 80px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ed-ref-link { color: var(--c); }
.ed-ref-link .i { width: 26px; height: 26px; }
.ed-ref-err { color: var(--bad); }
.ed-ref-add { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.ed-ref-add .input { flex: 1; min-width: 220px; }
.ed-foot {
  position: sticky; bottom: 0; z-index: 2;
  display: flex; align-items: center; gap: 10px; flex-wrap: wrap;
  margin: 4px calc(-1 * var(--gutter-r)) 0 calc(-1 * var(--gutter-l)); padding: 14px var(--gutter-r) 16px var(--gutter-l);
  background: var(--surface); border-top: 1px solid var(--line);
}
.ed-summary { flex: 1; min-width: 160px; font-size: 13px; }
.ed-summary b { color: var(--primary); font-size: 15px; }

/* Push */
.push-grid { display: grid; grid-template-columns: minmax(0, 1fr) 300px; gap: 18px; align-items: start; }
.push-preview .lock {
  margin-top: 8px; padding: 26px 12px; border-radius: 22px; min-height: 180px;
  background: radial-gradient(120% 90% at 30% 0%, #3a2414, #0b0b0b 70%); border: 1px solid var(--line);
}
.notif { display: flex; gap: 10px; align-items: flex-start; padding: 11px 12px; border-radius: 16px; background: rgba(40, 40, 40, 0.85); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.notif img { border-radius: 8px; flex: none; }
.notif div { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 13px; }
.notif b { font-size: 13.5px; }
.notif span { color: var(--text-2); overflow-wrap: anywhere; white-space: pre-wrap; }
.notif small { color: var(--muted); font-size: 11px; }

/* Selbstmeldungen */
.m-reports { display: flex; flex-direction: column; gap: 8px; }
.m-reports .m-group-head { margin-top: 10px; }
.m-report { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); }
.m-report-body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 5px; }
.m-report-top { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; font-size: 14px; }
.m-report-top small { color: var(--dim); font-size: 12px; }
.m-report-text { color: var(--text-2); font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.pf-tag { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 999px; font-size: 11.5px; font-weight: 600; background: color-mix(in srgb, var(--pc) 20%, transparent); color: var(--text); }
.pf-tag .i { width: 12px; height: 12px; }

/* Leaderboard */
.m-lb-grid { display: grid; grid-template-columns: 280px minmax(0, 1fr); gap: 24px; align-items: start; max-width: 1400px; }
.m-sub { font-size: 15px; font-weight: 700; margin-bottom: 10px; }
.m-lb-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 6px; }
.m-lb-list li { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface); border: 1px solid var(--line-soft); font-size: 14px; }
.m-lb-list b { flex: 1; min-width: 0; }
.m-lb-rank { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--raised); font-weight: 800; font-size: 12px; font-variant-numeric: tabular-nums; }
.m-lb-list .r1 .m-lb-rank { background: #ffd700; color: #000; }
.m-lb-list .r2 .m-lb-rank { background: #c0c0c0; color: #000; }
.m-lb-list .r3 .m-lb-rank { background: #cd7f32; color: #000; }
.m-lb-pts { color: var(--primary); font-weight: 700; font-variant-numeric: tabular-nums; }
.m-rank-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; margin-bottom: 10px; }
.m-rank-head .m-sub { margin: 0; }
.m-rank-btns { display: flex; gap: 8px; flex-wrap: wrap; }
.m-table-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 12px; }
.m-table { border-collapse: collapse; width: 100%; font-size: 13px; }
.m-table th { position: sticky; top: 0; background: var(--surface); text-align: left; font-weight: 700; color: var(--muted); padding: 8px 6px; white-space: nowrap; border-bottom: 1px solid var(--line); }
.m-table th .link-btn { color: var(--muted); font-size: 12.5px; }
.m-table th .link-btn:hover { color: var(--accent); }
.m-table td { padding: 4px 6px; border-bottom: 1px solid var(--line-soft); }
.m-table td.num { color: var(--muted); font-weight: 700; text-align: center; width: 44px; }
.m-table .input.sm { min-height: 32px; padding: 5px 8px; font-size: 13px; min-width: 86px; }
.m-table .input.num { text-align: right; font-variant-numeric: tabular-nums; min-width: 78px; }

/* Farben */
.m-colors { display: flex; flex-direction: column; gap: 8px; }
.m-color-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; padding: 10px 12px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); border-left: 5px solid var(--stripe); }
.m-color-row > .input { flex: 1 1 200px; width: auto; min-height: 40px; padding: 8px 12px; }
.m-color-order { display: flex; flex-direction: column; }
.m-color-order .icon-btn { width: 26px; height: 20px; background: transparent; color: var(--muted); }
.m-color-order .icon-btn:disabled { opacity: 0.25; }
.m-swatches { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; }
.sw { width: 24px; height: 24px; border-radius: 50%; background: var(--sw); border: 2px solid transparent; }
.sw.on { border-color: #fff; box-shadow: 0 0 0 2px var(--sw); }
.sw-custom { width: 28px; height: 28px; padding: 0; border: 1px dashed var(--line); border-radius: 50%; background: none; cursor: pointer; }
.m-hits { font-size: 12px; color: var(--muted); min-width: 80px; text-align: right; font-variant-numeric: tabular-nums; }

/* Team */
.m-team { display: flex; flex-direction: column; gap: 8px; }
.m-team-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); }
.m-team-row.off { opacity: 0.6; }
.m-team-info { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.m-team-info small { color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.m-perms { display: flex; flex-direction: column; gap: 6px; }
.m-inline { display: flex; gap: 8px; }
.m-inline .input { flex: 1; }

/* Drive */
.m-drive { position: relative; display: flex; flex-direction: column; gap: 14px; }
.m-drive.dragging::after { content: ""; position: absolute; inset: -8px; border: 2px dashed var(--accent); border-radius: 14px; background: rgba(255, 107, 0, 0.06); pointer-events: none; }
.m-drive-bar { display: flex; align-items: center; justify-content: space-between; gap: 10px; flex-wrap: wrap; }
.m-drive-btns { display: flex; gap: 8px; }
.m-files { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; transition: opacity 0.2s; }
.m-files.busy { opacity: 0.5; pointer-events: none; }
.m-file { position: relative; border-radius: 12px; background: var(--surface); border: 1px solid var(--line-soft); min-width: 0; }
.m-file:hover { border-color: var(--line); }
.m-file-main { width: 100%; display: flex; flex-direction: column; gap: 3px; padding: 8px 8px 10px; text-align: left; }
.m-file-thumb { position: relative; width: 100%; aspect-ratio: 1 / 1; max-width: 100%; border-radius: 8px; overflow: hidden; background: var(--raised); display: grid; place-items: center; margin-bottom: 6px; }
.m-file-thumb img { width: 100%; height: 100%; object-fit: cover; }
.m-file-thumb > .i { width: 38px; height: 38px; }
.m-file-thumb.folder { background: rgba(255, 107, 0, 0.1); color: var(--primary); }
.m-file-thumb.video { color: var(--info); }
.m-file-thumb.image { color: var(--accent); }
.m-file-thumb .play { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, 0.3); color: #fff; }
.m-file-thumb .play .i { width: 34px; height: 34px; }
.m-file-name { font-size: 13px; font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.m-file-sub { font-size: 11.5px; color: var(--dim); font-variant-numeric: tabular-nums; }
.m-file-menu { position: absolute; top: 12px; right: 12px; background: rgba(0, 0, 0, 0.65) !important; color: #fff !important; opacity: 0; transition: opacity 0.12s; }
.m-file:hover .m-file-menu, .m-file-menu:focus-visible { opacity: 1; }
@media (pointer: coarse) { .m-file-menu { opacity: 1; } }

/* Login: Manager-Zugang */
.or-line { display: flex; align-items: center; gap: 12px; color: var(--dim); font-size: 11px; font-weight: 700; letter-spacing: 1px; margin: 4px 0 14px; }
.or-line::before, .or-line::after { content: ""; flex: 1; height: 1px; background: var(--line); }
.role-btn { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; border-radius: var(--r-lg); background: var(--surface); border: 1px solid var(--line); text-align: left; margin-bottom: 20px; }
.role-btn:hover { border-color: rgba(255, 107, 0, 0.5); }
.role-ico { width: 44px; height: 44px; border-radius: 12px; background: var(--primary); color: var(--on-primary); display: grid; place-items: center; flex: none; }
.role-ico .i { width: 22px; height: 22px; }
.role-text { flex: 1; display: flex; flex-direction: column; gap: 2px; }
.role-text b { font-size: 15px; }
.role-text small { color: var(--muted); font-size: 12.5px; }
.input.pw { letter-spacing: 2px; text-transform: none; }
.link-btn.back { align-self: center; color: var(--muted); }

/* Dialoge am Computer mittig */
@media (min-width: 760px) {
  .sheet-wrap { align-items: center; padding: 24px; }
  .sheet { border-radius: 18px; border-bottom: 1px solid var(--line); max-height: calc(100vh - 48px); max-width: 520px; padding-bottom: 0; }
  .sheet.wide { max-width: 880px; }
  .sheet-grip { display: none; }
  .sheet-head { padding-top: 16px; }
}

/* Schmale Fenster: Seitenleiste als Menue */
@media (max-width: 979px) {
  .m-shell { grid-template-columns: minmax(0, 1fr); }
  .m-side { position: fixed; left: 0; top: 0; bottom: 0; width: 280px; z-index: 35; transform: translateX(-102%); transition: transform 0.2s ease-out; height: auto; }
  body.m-menu-open .m-side { transform: none; box-shadow: 20px 0 60px rgba(0, 0, 0, 0.6); }
  .m-scrim { display: none; }
  body.m-menu-open .m-scrim { display: block; position: fixed; inset: 0; z-index: 34; background: rgba(0, 0, 0, 0.6); }
  .m-burger { display: grid; }
  .m-head { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .m-pad { padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
  .m-lb-grid { grid-template-columns: minmax(0, 1fr); }
  .push-grid { grid-template-columns: minmax(0, 1fr); }
  .mcal-day { min-height: 92px; }
  .mcal-chip b { display: none; }
}
@media (min-width: 980px) { .m-scrim { display: none; } }
@media (max-width: 640px) {
  .hide-sm { display: none; }
  .m-head h1 { font-size: 19px; }
  .mcal { gap: 3px; }
  .mcal-day { min-height: 64px; padding: 3px; }
  .mcal-chip { padding: 2px 3px; font-size: 10px; }
  .mcal-chip span { display: none; }
  .mcal-chip { height: 6px; }
  .m-row-actions { display: none; }
  .m-filter-row select { min-width: 0; flex: 1; }
  .seg { overflow-x: auto; max-width: 100%; }
}

/* Feinschliff Manager */
.m-lb-grid { grid-template-columns: minmax(0, 1fr); }
.m-lb-list { display: grid; grid-template-columns: repeat(auto-fill, minmax(210px, 1fr)); gap: 6px; }
@media (min-width: 980px) {
  body.mgr .toast { top: auto; left: auto; right: 28px; bottom: 28px; transform: translateY(16px); }
  body.mgr .toast.show { transform: none; }
}
@media (max-width: 640px) {
  .m-search { flex-basis: 100%; }
  .m-filter-row select { flex: 1 1 40%; }
}
