/* ==========================================================================
   Sasa HQ – angelehnt an die YouTube-Oberfläche: Roboto, Rot, ruhige Flächen
   ========================================================================== */

:root {
  --red: #ff0033;
  --red-2: #ff2791;
  --red-grad: linear-gradient(90deg, #ff0033 0%, #ff0033 70%, #ff2791 100%);
  --red-soft: rgba(255, 0, 51, .1);
  --green: #2ba640;
  --green-soft: rgba(43, 166, 64, .14);
  --amber: #f2a600;
  --amber-soft: rgba(242, 166, 0, .16);

  --bg: #f9f9f9;
  --surface: #ffffff;
  --surface-2: #f2f2f2;
  --hover: #e5e5e5;
  --text: #0f0f0f;
  --text-2: #606060;
  --text-3: #8c8c8c;
  --line: rgba(0, 0, 0, .1);
  --blue: #065fd4;
  --blue-soft: rgba(6, 95, 212, .1);
  --shadow: 0 1px 2px rgba(0, 0, 0, .05), 0 4px 16px rgba(0, 0, 0, .04);
  --shadow-hover: 0 2px 4px rgba(0, 0, 0, .06), 0 12px 32px rgba(0, 0, 0, .08);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, .22), 0 2px 8px rgba(0, 0, 0, .08);
  --backdrop: rgba(15, 15, 15, .22);

  --radius: 16px;
  --radius-sm: 10px;
  --ease: cubic-bezier(.32, .72, 0, 1);
  --ease-out: cubic-bezier(.23, 1, .32, 1);
  --font: "Roboto", system-ui, -apple-system, "Segoe UI", sans-serif;
  --mono: "Roboto Mono", ui-monospace, monospace;
  --topbar: 56px;
  color-scheme: light;
}

:root[data-theme="dark"] {
  --bg: #0f0f0f;
  --surface: #1b1b1b;
  --surface-2: #272727;
  --hover: #3f3f3f;
  --text: #f1f1f1;
  --text-2: #aaaaaa;
  --text-3: #7a7a7a;
  --line: rgba(255, 255, 255, .1);
  --blue: #3ea6ff;
  --blue-soft: rgba(62, 166, 255, .14);
  --red-soft: rgba(255, 0, 51, .18);
  --shadow: 0 0 0 1px rgba(255, 255, 255, .04);
  --shadow-hover: 0 0 0 1px rgba(255, 255, 255, .08), 0 12px 32px rgba(0, 0, 0, .4);
  --shadow-lg: 0 24px 80px rgba(0, 0, 0, .6), 0 0 0 1px rgba(255, 255, 255, .06);
  --backdrop: rgba(0, 0, 0, .45);
  color-scheme: dark;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0;
  font: 14px/1.45 var(--font);
  color: var(--text);
  background: var(--bg);
  -webkit-font-smoothing: antialiased;
  transition: background-color .3s ease;
}
button, input, textarea, select { font: inherit; color: inherit; }
button { cursor: pointer; background: none; border: 0; padding: 0; }
a { color: var(--blue); text-decoration: none; }
a:hover { text-decoration: underline; }
img { display: block; max-width: 100%; }
h1, h2, h3, h4 { margin: 0; font-weight: 500; letter-spacing: -.01em; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--blue); outline-offset: 2px; border-radius: 6px; }
::selection { background: var(--red-soft); }
[hidden] { display: none !important; }

.icon { width: 20px; height: 20px; flex: none; stroke: currentColor; fill: none; stroke-width: 1.8; stroke-linecap: round; stroke-linejoin: round; }
.icon.sm { width: 16px; height: 16px; }
.icon.lg { width: 24px; height: 24px; }
.muted { color: var(--text-2); }
.faint { color: var(--text-3); }
.mono { font-family: var(--mono); }
.nowrap { white-space: nowrap; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }

/* ---------- Boot ---------- */
.boot { min-height: 100vh; display: grid; place-items: center; }
.boot-logo { animation: pulse 1.2s var(--ease) infinite alternate; }
@keyframes pulse { from { transform: scale(.92); opacity: .6; } to { transform: scale(1); opacity: 1; } }

/* ---------- Logo ---------- */
.logo { display: inline-flex; align-items: center; gap: 8px; font-weight: 700; font-size: 18px; letter-spacing: -.03em; color: var(--text); }
.logo:hover { text-decoration: none; }
.logo-mark {
  width: 30px; height: 22px; border-radius: 7px; display: grid; place-items: center;
  background: var(--red); color: #fff; font-size: 13px; font-weight: 700; letter-spacing: 0;
}
.boot-logo .logo-mark { width: 56px; height: 40px; border-radius: 12px; font-size: 22px; }
.logo small { font-weight: 400; color: var(--text-2); font-size: 12px; letter-spacing: 0; margin-left: 2px; }

/* ---------- Buttons ---------- */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 8px;
  height: 36px; padding: 0 16px; border-radius: 18px;
  background: var(--surface-2); color: var(--text); font-weight: 500; white-space: nowrap;
  transition: background-color .15s ease, transform .16s var(--ease-out), opacity .15s;
  -webkit-tap-highlight-color: transparent; user-select: none;
}
.btn:hover { background: var(--hover); text-decoration: none; }
.btn:active, .icon-btn:active, .chip:active, .tile:active, .pcard:active { transform: scale(.97); transition-duration: .08s; }
.btn[disabled] { opacity: .45; pointer-events: none; }
.btn.primary { background: var(--text); color: var(--bg); }
.btn.primary:hover { opacity: .88; }
.btn.red { background: var(--red); color: #fff; }
.btn.red:hover { background: #e6002e; }
.btn.ghost { background: transparent; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.blue { background: var(--blue-soft); color: var(--blue); }
.btn.danger { color: var(--red); background: transparent; }
.btn.danger:hover { background: var(--red-soft); }
.btn.sm { height: 30px; padding: 0 12px; font-size: 13px; border-radius: 15px; }
.btn.block { width: 100%; }

.icon-btn {
  width: 40px; height: 40px; border-radius: 50%; display: inline-grid; place-items: center; flex: none;
  color: var(--text); transition: background-color .15s ease, transform .16s var(--ease-out);
  -webkit-tap-highlight-color: transparent; position: relative;
}
.icon-btn:hover { background: var(--surface-2); }
.icon-btn.sm { width: 32px; height: 32px; }
.icon-btn .badge { position: absolute; top: 6px; right: 6px; }

.chip {
  display: inline-flex; align-items: center; gap: 6px; height: 32px; padding: 0 12px; border-radius: 8px;
  background: var(--surface-2); font-weight: 500; font-size: 14px; white-space: nowrap;
  transition: background-color .15s, color .15s, transform .16s var(--ease-out);
}
.chip:hover { background: var(--hover); }
.chip.active { background: var(--text); color: var(--bg); }
.chips { display: flex; gap: 8px; flex-wrap: wrap; }

.badge {
  min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--red); color: #fff;
  font-size: 11px; font-weight: 700; display: inline-grid; place-items: center; line-height: 1;
}
.pill { display: inline-flex; align-items: center; gap: 4px; height: 22px; padding: 0 8px; border-radius: 6px; font-size: 12px; font-weight: 500; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.pill.red { background: var(--red-soft); color: var(--red); }
.pill.green { background: var(--green-soft); color: var(--green); }
.pill.amber { background: var(--amber-soft); color: #b37900; }
:root[data-theme="dark"] .pill.amber { color: var(--amber); }
.pill.blue { background: var(--blue-soft); color: var(--blue); }
.pill.dark { background: var(--text); color: var(--bg); }

/* ---------- Forms ---------- */
.field { display: grid; gap: 6px; }
.field > span, .label { font-size: 12px; font-weight: 500; color: var(--text-2); }
.input, .textarea, .select {
  width: 100%; min-height: 40px; padding: 9px 12px; border-radius: var(--radius-sm);
  border: 1px solid var(--line); background: var(--surface); color: var(--text);
  transition: border-color .15s, box-shadow .15s, background-color .15s;
}
.input:hover, .textarea:hover, .select:hover { border-color: var(--text-3); }
.input:focus, .textarea:focus, .select:focus { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.textarea { resize: none; line-height: 1.5; }
.input.plain, .textarea.plain { border-color: transparent; background: transparent; padding-left: 0; padding-right: 0; }
.input.plain:hover, .textarea.plain:hover { border-color: transparent; }
.input.plain:focus, .textarea.plain:focus { box-shadow: none; border-color: transparent; }
.form-error { color: var(--red); font-size: 13px; min-height: 18px; }

.seg { display: inline-flex; padding: 3px; border-radius: 10px; background: var(--surface-2); gap: 2px; }
.seg button { height: 30px; padding: 0 12px; border-radius: 8px; font-weight: 500; color: var(--text-2); transition: background-color .2s var(--ease), color .2s; }
.seg button.on { background: var(--surface); color: var(--text); box-shadow: 0 1px 3px rgba(0, 0, 0, .12); }

/* ---------- Avatar ---------- */
.av {
  --s: 32px;
  width: var(--s); height: var(--s); border-radius: 50%; flex: none;
  display: inline-grid; place-items: center; color: #fff; font-weight: 500;
  font-size: calc(var(--s) * .42); background: var(--c, #888); user-select: none; position: relative;
}
.av img { width: 100%; height: 100%; object-fit: cover; border-radius: 50%; }
/* Online-Punkt sitzt auf dem Rand des Kreises, nicht im Bild */
.av.online::after {
  content: ""; position: absolute; right: -1px; bottom: -1px;
  width: max(9px, 26%); height: max(9px, 26%); border-radius: 50%;
  background: var(--green); box-shadow: 0 0 0 2px var(--surface);
}
.sheet .av.online::after { box-shadow: 0 0 0 2px var(--bg); }
:root[data-theme="light"] .sheet .av.online::after { box-shadow: 0 0 0 2px var(--surface); }
.av-stack { display: inline-flex; }
.av-stack .av { box-shadow: 0 0 0 2px var(--surface); }
.av-stack .av + .av { margin-left: -8px; }

/* ==========================================================================
   Topbar + Home
   ========================================================================== */
.topbar {
  position: sticky; top: 0; z-index: 20; height: var(--topbar);
  display: flex; align-items: center; gap: 12px; padding: 0 24px;
  background: color-mix(in srgb, var(--bg) 86%, transparent);
  backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px);
}
.topbar .spacer { flex: 1; }
.topbar .demo-flag { margin-left: 4px; }
.topbar .me-btn { border-radius: 50%; transition: transform .16s var(--ease-out); }
.topbar .me-btn:active { transform: scale(.94); }

.home { padding: 8px 24px 48px; max-width: 1440px; margin: 0 auto; transition: transform .5s var(--ease), filter .5s var(--ease); transform-origin: 50% 30vh; }
body.has-layer .home { transform: scale(.985); }
.hello { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin: 16px 0 24px; flex-wrap: wrap; }
.hello h1 { font-size: 28px; font-weight: 700; letter-spacing: -.025em; }
.hello p { color: var(--text-2); margin-top: 4px; }

/* Monatsziel mittig im Header */
.topbar { display: grid; grid-template-columns: 1fr minmax(0, auto) 1fr; }
.tb-left, .tb-right { display: flex; align-items: center; gap: 12px; min-width: 0; }
.tb-right { justify-content: flex-end; }
.hgoal {
  width: min(440px, 100%); display: grid; gap: 6px; padding: 7px 18px 6px; border-radius: 14px;
  text-align: left; position: relative; transition: background-color .2s, transform .16s var(--ease-out);
  animation: fadeIn .5s var(--ease) both .2s;
}
.hgoal:hover { background: var(--surface-2); }
.hgoal:active { transform: scale(.98); transition-duration: .08s; }
.hgoal-inner { display: grid; gap: 5px; }
.hgoal-track { position: relative; display: block; height: 8px; border-radius: 4px; background: var(--hover); }
.hgoal-track > i { position: absolute; inset: 0 auto 0 0; border-radius: inherit; background: var(--red-grad); transition: width .8s var(--ease); }
.hgoal.done .hgoal-track > i { background: var(--green); }
.hgoal-pace { position: absolute; top: -3px; bottom: -3px; width: 2px; border-radius: 1px; background: var(--text); opacity: .45; transform: translateX(-1px); }
.hgoal-cap { display: flex; align-items: center; gap: 6px; font-size: 13px; color: var(--text-2); justify-content: center; min-width: 0; }
.hgoal-cap b { color: var(--text); font-weight: 700; }
.hgoal-dot { width: 6px; height: 6px; border-radius: 50%; flex: none; background: var(--red); }
.hgoal-dot.ok { background: var(--green); }
.hgoal-tag { font-size: 10px; font-weight: 500; padding: 1px 5px; border-radius: 4px; background: var(--amber-soft); color: #b37900; flex: none; }
:root[data-theme="dark"] .hgoal-tag { color: var(--amber); }
.hgoal-dots { position: absolute; right: 6px; top: 50%; translate: 0 -50%; display: grid; gap: 3px; }
.hgoal-dots i { width: 4px; height: 4px; border-radius: 50%; background: var(--hover); transition: background-color .3s; }
.hgoal-dots i.on { background: var(--text-2); }
.hgoal-empty { display: flex; align-items: center; justify-content: center; gap: 6px; color: var(--text-2); font-weight: 500; border: 1.5px dashed var(--line); padding: 8px 14px; }

.grid {
  display: grid; gap: 16px;
  grid-template-columns: repeat(12, minmax(0, 1fr));
  grid-auto-flow: dense;
}
.tile {
  --i: 0;
  position: relative; display: flex; flex-direction: column; min-height: 200px; min-width: 0;
  background: var(--surface); border-radius: var(--radius); box-shadow: var(--shadow);
  padding: 18px 20px 20px; text-align: left; cursor: pointer; overflow: hidden;
  transition: box-shadow .25s var(--ease), transform .25s var(--ease);
  animation: rise .6s var(--ease) both; animation-delay: calc(var(--i) * 45ms);
  -webkit-tap-highlight-color: transparent;
}
.tile:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.tile-head { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; }
.tile-head h2 { font-size: 16px; }
.tile-head .ti { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface-2); }
.tile-head .ti.red { background: var(--red-soft); color: var(--red); }
.tile-head .go { margin-left: auto; color: var(--text-3); transition: transform .25s var(--ease), color .2s; }
.tile:hover .go { transform: translateX(3px); color: var(--text); }
.tile-body { flex: 1; display: flex; flex-direction: column; min-height: 0; }
.tile .empty { color: var(--text-3); margin: auto 0; }

.t-next { grid-column: span 4; grid-row: span 2; }
.t-board { grid-column: span 8; }
.t-ideas { grid-column: span 4; }
.t-cal { grid-column: span 4; }
.t-chats { grid-column: span 4; }
.t-perf { grid-column: span 8; }
.t-channel { grid-column: span 4; }
.t-footage { grid-column: span 4; }
.t-team { grid-column: span 8; }

/* Nach dem ersten Auftritt keine Einblend-Animationen mehr bei Aktualisierungen */
.settled .tile, .settled .progress > i, .settled .flow-bar > i, .settled .line.draw, .settled .area { animation: none; stroke-dashoffset: 0; opacity: 1; }
.tile [data-open] { cursor: pointer; transition: background-color .15s, transform .16s var(--ease-out); }
.tile .queue-item[data-open]:hover, .tile .act[data-open]:hover { background: var(--surface-2); }
.tile .idea-mini-item[data-open]:hover { background: var(--hover); }
.tile [data-open]:active { transform: scale(.98); }

@keyframes rise { from { opacity: 0; transform: translateY(14px); } to { opacity: 1; transform: none; } }

/* Next-up tile */
.next-hero { border-radius: 12px; padding: 16px; background: var(--surface-2); display: grid; gap: 10px; }
.next-hero h3 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; line-height: 1.2; }
.next-meta { display: flex; gap: 6px; flex-wrap: wrap; }
.progress { height: 4px; border-radius: 2px; background: var(--hover); overflow: hidden; }
.progress > i { display: block; height: 100%; background: var(--red-grad); border-radius: inherit; transform-origin: left; animation: grow .9s var(--ease) both .2s; }
@keyframes grow { from { transform: scaleX(0); } }
.queue { margin-top: 16px; display: grid; gap: 2px; grid-template-columns: minmax(0, 1fr); }
.queue-item { display: flex; align-items: center; gap: 10px; padding: 8px 4px; border-radius: 8px; }
.queue-item .n { width: 20px; color: var(--text-3); font-weight: 500; font-size: 13px; text-align: center; }
.queue-item .t { flex: 1; min-width: 0; }
.countdown { font-size: 44px; font-weight: 700; letter-spacing: -.04em; line-height: 1; }
.countdown small { font-size: 14px; font-weight: 500; letter-spacing: 0; color: var(--text-2); margin-left: 6px; }

/* Board summary tile */
.flow { display: grid; grid-template-columns: repeat(6, 1fr); gap: 8px; margin-top: auto; }
.flow-col { display: grid; gap: 8px; align-content: end; }
.flow-bar { height: 90px; border-radius: 10px; background: var(--surface-2); position: relative; overflow: hidden; display: flex; align-items: flex-end; }
.flow-bar > i { width: 100%; background: var(--red); opacity: var(--o, 1); border-radius: 10px 10px 0 0; transform-origin: bottom; animation: growY .8s var(--ease) both; animation-delay: calc(var(--i) * 60ms + .15s); }
@keyframes growY { from { transform: scaleY(0); } }
.flow-col b { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.flow-col span { font-size: 12px; color: var(--text-2); }
.board-latest { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 16px; }

/* Ideas tile */
.idea-mini { display: grid; gap: 8px; grid-template-columns: minmax(0, 1fr); }
.idea-mini-item { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--surface-2); }
.idea-mini-item .t { flex: 1; min-width: 0; font-weight: 500; }
.big-num { font-size: 36px; font-weight: 700; letter-spacing: -.03em; line-height: 1; }

/* Calendar tile */
.week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; }
.week-day { border-radius: 10px; background: var(--surface-2); padding: 8px 4px; text-align: center; display: grid; gap: 4px; justify-items: center; min-height: 82px; align-content: start; }
.week-day.today { box-shadow: inset 0 0 0 2px var(--text); }
.week-day small { font-size: 11px; color: var(--text-2); text-transform: uppercase; letter-spacing: .04em; }
.week-day b { font-size: 16px; }
.dots { display: flex; gap: 3px; flex-wrap: wrap; justify-content: center; }
.dot { width: 7px; height: 7px; border-radius: 50%; background: var(--red); }
.dot.g { background: var(--green); }
.next-shoot { margin-top: 12px; display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 10px; background: var(--green-soft); }
.next-shoot .t { flex: 1; min-width: 0; }

/* Chats tile */
.activity { display: grid; gap: 4px; grid-template-columns: minmax(0, 1fr); }
.act { display: flex; gap: 10px; align-items: flex-start; padding: 8px; border-radius: 10px; margin: 0 -8px; }
.act .b { flex: 1; min-width: 0; }
.act .b p { color: var(--text-2); }
.act.unread .b strong::after { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; background: var(--red); margin-left: 6px; vertical-align: middle; }

/* Perf tile */
.kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { display: grid; gap: 2px; }
.kpi small { color: var(--text-2); font-size: 12px; }
.kpi b { font-size: 24px; font-weight: 700; letter-spacing: -.02em; }
.delta { font-size: 12px; font-weight: 500; }
.delta.up { color: var(--green); }
.delta.down { color: var(--red); }
.sample-flag { margin-left: 8px; }

/* Channel tile */
.channel-row { display: flex; align-items: center; gap: 14px; }
.channel-row .av { --s: 56px; }
.yt-state { margin-top: auto; display: flex; align-items: center; gap: 10px; padding: 12px; border-radius: 12px; background: var(--surface-2); }

/* Team tile */
.team-row { display: flex; gap: 18px; flex-wrap: wrap; }
.team-member { display: grid; justify-items: center; gap: 6px; text-align: center; min-width: 72px; }
.team-member .av { --s: 52px; }
.team-member small { color: var(--text-2); }

/* ==========================================================================
   Layers (Unterseiten im Vordergrund)
   ========================================================================== */
.layer { position: fixed; inset: 0; z-index: 50; display: grid; place-items: center; }
.layer-backdrop {
  position: absolute; inset: 0; background: var(--backdrop);
  backdrop-filter: blur(14px) saturate(1.2); -webkit-backdrop-filter: blur(14px) saturate(1.2);
}
.sheet {
  position: relative; display: flex; flex-direction: column;
  width: min(1240px, calc(100vw - 48px)); height: calc(100dvh - 48px);
  background: var(--bg); border-radius: 20px; box-shadow: var(--shadow-lg); overflow: hidden;
  transition: transform .45s var(--ease), filter .45s var(--ease);
}
:root[data-theme="light"] .sheet { background: var(--surface); }
.sheet.md { width: min(820px, calc(100vw - 48px)); height: min(860px, calc(100dvh - 48px)); }
.sheet.sm { width: min(560px, calc(100vw - 48px)); height: auto; max-height: calc(100dvh - 48px); }
.layer.covered .sheet { transform: scale(.965) translateY(-6px); }
.sheet-head {
  display: flex; align-items: center; gap: 8px; padding: 12px 16px 12px 20px; min-height: 64px; flex: none;
  border-bottom: 1px solid var(--line);
}
.sheet-head h2 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; flex: 1; min-width: 0; }
.sheet-head .actions { display: flex; align-items: center; gap: 8px; }
.sheet-body { flex: 1; min-height: 0; overflow: auto; overscroll-behavior: contain; }
.sheet-pad { padding: 20px 24px 32px; }
.sheet-inner { animation: fadeIn .35s var(--ease) both .08s; }
@keyframes fadeIn { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

/* ---------- Dialogs ---------- */
.dlg-wrap { position: fixed; inset: 0; z-index: 90; display: grid; place-items: center; padding: 16px; }
.dlg-bg { position: absolute; inset: 0; background: var(--backdrop); }
.dlg {
  position: relative; width: min(440px, 100%); max-height: calc(100dvh - 32px); overflow: auto;
  background: var(--surface); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 20px;
}
:root[data-theme="dark"] .dlg { background: #212121; }
.dlg h3 { font-size: 18px; font-weight: 700; margin-bottom: 14px; padding-right: 32px; }
.dlg .x { position: absolute; top: 12px; right: 12px; }
.dlg-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 18px; flex-wrap: wrap; }
.stack { display: grid; gap: 14px; grid-template-columns: minmax(0, 1fr); }
.dlg-content { min-width: 0; }
.invite-code {
  font-family: var(--mono); font-size: 26px; font-weight: 500; letter-spacing: .08em; text-align: center;
  padding: 18px 12px; border-radius: 14px; border: 2px dashed var(--line); background: var(--surface-2);
  user-select: all; overflow-wrap: anywhere;
}
.invite-meta { display: flex; justify-content: center; gap: 8px; flex-wrap: wrap; }
.invite-actions { display: grid; grid-template-columns: 1fr 1fr; gap: 8px; }
.invite-link { font-family: var(--mono); font-size: 11px; color: var(--text-3); text-align: center; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

/* ---------- Toasts ---------- */
#toasts { position: fixed; left: 24px; bottom: 24px; z-index: 100; display: grid; gap: 8px; pointer-events: none; }
.toast {
  pointer-events: auto; display: flex; align-items: center; gap: 12px; max-width: 420px;
  padding: 12px 14px 12px 16px; border-radius: 10px; background: #0f0f0f; color: #f1f1f1;
  box-shadow: 0 8px 24px rgba(0, 0, 0, .25); animation: toastIn .4s var(--ease) both;
}
:root[data-theme="dark"] .toast { background: #f1f1f1; color: #0f0f0f; }
.toast.out { animation: toastOut .25s ease-in both; }
.toast .av { --s: 28px; }
.toast button { color: #3ea6ff; font-weight: 500; }
:root[data-theme="dark"] .toast button { color: var(--blue); filter: brightness(.8); }
@keyframes toastIn { from { opacity: 0; transform: translateY(16px) scale(.96); } }
@keyframes toastOut { to { opacity: 0; transform: translateY(8px) scale(.98); } }

/* ==========================================================================
   Auth
   ========================================================================== */
.auth { min-height: 100dvh; display: grid; place-items: center; padding: 24px 16px; position: relative; overflow: hidden; }
.auth::before {
  content: ""; position: absolute; width: 900px; height: 900px; border-radius: 50%; top: -520px; left: 50%; translate: -50% 0;
  background: radial-gradient(closest-side, rgba(255, 0, 51, .14), transparent);
  pointer-events: none;
}
.auth-card {
  position: relative; width: min(400px, 100%); background: var(--surface); border-radius: 20px;
  box-shadow: var(--shadow-hover); padding: 28px; animation: rise .6s var(--ease) both;
}
.auth-card .logo { margin-bottom: 20px; }
.auth-card h1 { font-size: 22px; font-weight: 700; letter-spacing: -.02em; margin-bottom: 4px; }
.auth-card .seg { width: 100%; margin: 20px 0; }
.auth-card .seg button { flex: 1; }
.auth-foot { margin-top: 16px; text-align: center; font-size: 13px; }
.notice { padding: 12px 14px; border-radius: 12px; background: var(--surface-2); color: var(--text-2); font-size: 13px; }
.notice.green { background: var(--green-soft); color: var(--text); }

/* ==========================================================================
   Ideenschmiede
   ========================================================================== */
.idea-compose { display: flex; gap: 10px; align-items: center; padding: 6px 6px 6px 16px; border-radius: 28px; background: var(--surface-2); margin-bottom: 20px; transition: box-shadow .2s; }
.idea-compose:focus-within { box-shadow: 0 0 0 2px var(--text) inset; }
.idea-compose input { flex: 1; border: 0; background: transparent; height: 40px; font-size: 15px; outline: none; }
.toolbar { display: flex; align-items: center; gap: 12px; margin-bottom: 16px; flex-wrap: wrap; }
.toolbar .spacer { flex: 1; }
.ideas { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 14px; }
.idea {
  display: flex; flex-direction: column; gap: 10px; padding: 16px; border-radius: 14px; min-height: 150px;
  background: var(--surface); box-shadow: var(--shadow); cursor: pointer; text-align: left;
  transition: box-shadow .2s var(--ease), transform .2s var(--ease);
  animation: rise .45s var(--ease) both; animation-delay: calc(var(--i, 0) * 30ms);
}
:root[data-theme="light"] .sheet .idea { box-shadow: 0 0 0 1px var(--line); }
.settled-ideas .idea { animation: none; }
.idea:hover { box-shadow: var(--shadow-hover); transform: translateY(-2px); }
.idea h3 { font-size: 16px; font-weight: 500; line-height: 1.3; }
.idea p { color: var(--text-2); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.idea-foot { margin-top: auto; display: flex; align-items: center; gap: 8px; }
.idea-foot .who { display: flex; align-items: center; gap: 6px; color: var(--text-2); font-size: 12px; flex: 1; min-width: 0; }
.like { display: inline-flex; align-items: center; gap: 4px; height: 28px; padding: 0 10px; border-radius: 14px; background: var(--surface-2); font-size: 13px; font-weight: 500; transition: background-color .15s, transform .16s var(--ease-out); }
.like:hover { background: var(--hover); }
.like.on { background: var(--red-soft); color: var(--red); }
.like.on .icon { fill: currentColor; }
.like:active { transform: scale(.9); }
.like.pop .icon { animation: pop .4s var(--ease-out); }
@keyframes pop { 40% { transform: scale(1.35); } }
.empty-state { text-align: center; padding: 64px 16px; color: var(--text-2); display: grid; gap: 8px; justify-items: center; }
.empty-state .icon { width: 40px; height: 40px; color: var(--text-3); }

/* ==========================================================================
   Produktion (Board)
   ========================================================================== */
.board-wrap { height: 100%; display: flex; flex-direction: column; }
.board-tools { display: flex; align-items: center; gap: 10px; padding: 14px 24px 6px; flex-wrap: wrap; }
.board-tools .spacer { flex: 1; }
.board {
  flex: 1; min-height: 0; display: grid; grid-auto-flow: column; grid-auto-columns: minmax(176px, 1fr);
  gap: 12px; padding: 10px 24px 24px; overflow-x: auto; overscroll-behavior-x: contain;
}
.col { display: flex; flex-direction: column; min-height: 0; border-radius: 14px; background: var(--surface-2); transition: background-color .2s, box-shadow .2s; }
:root[data-theme="dark"] .col { background: #181818; }
.col.drop { box-shadow: inset 0 0 0 2px var(--text); }
.col-head { display: flex; align-items: center; gap: 8px; padding: 12px 12px 8px 14px; }
.col-head h3 { font-size: 14px; font-weight: 500; }
.col-head .count { color: var(--text-3); font-size: 13px; }
.col-head .icon-btn { margin-left: auto; }
.col-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.col-list { flex: 1; overflow-y: auto; padding: 4px 8px 12px; display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.pcard {
  display: grid; gap: 8px; padding: 12px; border-radius: 12px; background: var(--surface); text-align: left; cursor: grab;
  box-shadow: 0 1px 2px rgba(0, 0, 0, .06), 0 0 0 1px var(--line);
  transition: box-shadow .2s var(--ease), transform .2s var(--ease), opacity .2s;
  user-select: none; -webkit-user-select: none; -webkit-touch-callout: none; touch-action: manipulation;
}
:root[data-theme="dark"] .pcard { background: #272727; box-shadow: none; }
.pcard:hover { box-shadow: 0 4px 14px rgba(0, 0, 0, .1), 0 0 0 1px var(--line); }
.pcard h4 { font-size: 14px; font-weight: 500; line-height: 1.3; }
.pcard-meta { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; color: var(--text-2); font-size: 12px; }
.pcard-meta .grow { flex: 1; }
.pcard-meta .stat { display: inline-flex; align-items: center; gap: 3px; }
.pcard-meta .stat.unread { color: var(--red); font-weight: 700; }
.pcard .progress { height: 3px; }
.pcard.placeholder { opacity: .35; box-shadow: inset 0 0 0 2px var(--text-3); }
.pcard.ghost {
  position: fixed; z-index: 200; pointer-events: none; margin: 0; cursor: grabbing;
  box-shadow: 0 18px 48px rgba(0, 0, 0, .28); transition: none;
  animation: lift .2s var(--ease-out) forwards;
}
@keyframes lift { to { transform: rotate(-2deg) scale(1.03); } }
body.dragging, body.dragging * { cursor: grabbing !important; user-select: none !important; }
.col-more { margin: 4px auto 0; }

/* ==========================================================================
   Projekt-Detail + Chat
   ========================================================================== */
.project { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(340px, 1fr); height: 100%; }
.project-main { overflow-y: auto; padding: 20px 28px 40px; overscroll-behavior: contain; }
.project-chat { border-left: 1px solid var(--line); display: flex; flex-direction: column; min-height: 0; background: var(--bg); }
:root[data-theme="light"] .project-chat { background: #fafafa; }
.ptitle { font-size: 26px; font-weight: 700; letter-spacing: -.025em; line-height: 1.2; width: 100%; padding: 4px 0; }
.stages { display: grid; grid-template-columns: repeat(7, 1fr); gap: 4px; margin: 18px 0 6px; }
.stage-btn { display: grid; gap: 6px; text-align: left; padding: 0; font-size: 12px; color: var(--text-3); font-weight: 500; }
.stage-btn i { height: 6px; border-radius: 3px; background: var(--surface-2); transition: background-color .3s var(--ease); }
:root[data-theme="dark"] .stage-btn i { background: #303030; }
.stage-btn.done i { background: var(--red); }
.stage-btn.current { color: var(--text); }
.stage-btn.current i { background: var(--red-grad); }
.stage-btn:hover { color: var(--text); }
.stage-actions { display: flex; gap: 8px; margin: 14px 0 6px; flex-wrap: wrap; }
.props { display: grid; grid-template-columns: 140px 1fr; gap: 4px 12px; margin: 22px 0; align-items: center; }
.props > .k { color: var(--text-2); font-size: 13px; display: flex; align-items: center; gap: 8px; min-height: 40px; }
.props > .v { min-width: 0; }
.props .input, .props .select { min-height: 36px; padding: 6px 10px; border-color: transparent; background: transparent; }
.props .input:hover, .props .select:hover { background: var(--surface-2); border-color: transparent; }
.props .input:focus, .props .select:focus { background: var(--surface); border-color: var(--blue); }
.section { margin-top: 26px; }
.section-head { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; }
.section-head h3 { font-size: 15px; font-weight: 500; }
.section-head .spacer { flex: 1; }
.check-list { display: grid; gap: 2px; }
.check { display: flex; align-items: center; gap: 10px; padding: 6px 8px; border-radius: 8px; margin: 0 -8px; }
.check:hover { background: var(--surface-2); }
.check input[type=checkbox] { appearance: none; width: 20px; height: 20px; border-radius: 6px; border: 2px solid var(--text-3); display: grid; place-items: center; flex: none; cursor: pointer; transition: background-color .2s var(--ease), border-color .2s; }
.check input[type=checkbox]:checked { background: var(--red); border-color: var(--red); }
.check input[type=checkbox]:checked::after { content: ""; width: 10px; height: 6px; border: 2px solid #fff; border-top: 0; border-right: 0; transform: rotate(-45deg) translate(1px, -1px); animation: pop .3s var(--ease-out); }
.check .input { flex: 1; min-height: 30px; padding: 4px 0; }
.check.done .input { text-decoration: line-through; color: var(--text-3); }
.check .icon-btn { opacity: 0; transition: opacity .15s; }
.check:hover .icon-btn, .check:focus-within .icon-btn { opacity: 1; }
.links { display: grid; gap: 6px; }
.link-row { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; background: var(--surface-2); }
.link-row a { flex: 1; min-width: 0; }
.add-row { display: flex; gap: 8px; margin-top: 8px; }
.meta-foot { margin-top: 32px; padding-top: 16px; border-top: 1px solid var(--line); color: var(--text-3); font-size: 12px; display: flex; justify-content: space-between; gap: 12px; flex-wrap: wrap; }
.mobile-tabs { display: none; }

/* Chat */
.chat-head { padding: 14px 18px; border-bottom: 1px solid var(--line); display: flex; align-items: center; gap: 10px; }
.chat-head h3 { font-size: 15px; font-weight: 500; flex: 1; }
.chat-scroll { flex: 1; overflow-y: auto; padding: 12px 10px 8px; overscroll-behavior: contain; }
.day-sep { text-align: center; margin: 14px 0 8px; font-size: 12px; color: var(--text-3); font-weight: 500; }
.msg { display: flex; gap: 10px; padding: 3px 8px; border-radius: 10px; position: relative; }
.msg.first { margin-top: 10px; }
.msg:hover { background: var(--surface-2); }
:root[data-theme="dark"] .msg:hover { background: #1b1b1b; }
.msg .gutter { width: 32px; flex: none; }
.msg .gutter time { display: none; font-size: 10px; color: var(--text-3); padding-top: 3px; }
.msg:hover .gutter time { display: block; }
.msg-body { flex: 1; min-width: 0; }
.msg-top { display: flex; align-items: baseline; gap: 8px; }
.msg-top strong { font-weight: 500; font-size: 13px; }
.msg-top time { color: var(--text-3); font-size: 11px; }
.msg-text { white-space: pre-wrap; word-wrap: break-word; overflow-wrap: anywhere; }
.msg-text .mention { color: var(--blue); background: var(--blue-soft); border-radius: 4px; padding: 0 3px; font-weight: 500; }
.msg-text .mention.me { color: var(--red); background: var(--red-soft); }
.msg.new { animation: msgIn .35s var(--ease) both; }
@keyframes msgIn { from { opacity: 0; transform: translateY(8px); } }
.msg-tools {
  position: absolute; right: 8px; top: -14px; display: none; gap: 2px; padding: 2px; border-radius: 10px;
  background: var(--surface); box-shadow: 0 2px 8px rgba(0, 0, 0, .15), 0 0 0 1px var(--line);
}
.msg:hover .msg-tools, .msg-tools.open { display: flex; }
.msg-tools button { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; font-size: 16px; }
.msg-tools button:hover { background: var(--surface-2); }
.reactions { display: flex; gap: 4px; flex-wrap: wrap; margin-top: 4px; }
.reaction { display: inline-flex; align-items: center; gap: 4px; height: 24px; padding: 0 8px; border-radius: 12px; background: var(--surface-2); font-size: 12px; box-shadow: inset 0 0 0 1px transparent; transition: transform .16s var(--ease-out); }
.reaction.mine { background: var(--blue-soft); box-shadow: inset 0 0 0 1px var(--blue); }
.reaction:active { transform: scale(.9); }
.atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 6px; }
.att-img { width: 180px; height: 120px; border-radius: 10px; overflow: hidden; background: var(--surface-2); cursor: zoom-in; }
.att-img img { width: 100%; height: 100%; object-fit: cover; transition: transform .3s var(--ease); }
.att-img:hover img { transform: scale(1.04); }
.att-file { display: inline-flex; align-items: center; gap: 8px; padding: 8px 12px; border-radius: 10px; background: var(--surface-2); color: var(--text); max-width: 260px; }
.att-file:hover { text-decoration: none; background: var(--hover); }
.att-file small { color: var(--text-3); }
.typing { height: 20px; padding: 0 18px; font-size: 12px; color: var(--text-2); }
.typing i { display: inline-block; width: 4px; height: 4px; border-radius: 50%; background: currentColor; margin-right: 2px; animation: blink 1s infinite; }
.typing i:nth-child(2) { animation-delay: .15s; }
.typing i:nth-child(3) { animation-delay: .3s; margin-right: 6px; }
@keyframes blink { 50% { opacity: .2; } }
.composer { padding: 8px 12px 14px; position: relative; }
.composer-box { border-radius: 14px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); transition: box-shadow .2s; }
.composer-box:focus-within { box-shadow: 0 0 0 2px var(--text); }
.composer textarea { width: 100%; border: 0; background: transparent; resize: none; padding: 12px 14px 4px; max-height: 180px; outline: none; line-height: 1.45; display: block; }
.composer-row { display: flex; align-items: center; gap: 2px; padding: 4px 6px 6px; }
.composer-row .spacer { flex: 1; }
.send-btn { width: 34px; height: 34px; border-radius: 50%; background: var(--red); color: #fff; display: grid; place-items: center; transition: transform .16s var(--ease-out), opacity .2s; }
.send-btn:disabled { opacity: .3; }
.send-btn:active { transform: scale(.9); }
.pending-atts { display: flex; gap: 6px; flex-wrap: wrap; padding: 8px 10px 0; }
.pending-att { display: inline-flex; align-items: center; gap: 6px; padding: 4px 4px 4px 10px; border-radius: 8px; background: var(--surface-2); font-size: 12px; max-width: 200px; }
.pending-att.uploading { opacity: .6; }
.mention-pop {
  position: absolute; left: 12px; bottom: calc(100% - 4px); min-width: 220px; padding: 6px; border-radius: 12px;
  background: var(--surface); box-shadow: 0 8px 30px rgba(0, 0, 0, .18), 0 0 0 1px var(--line); z-index: 5;
  animation: fadeIn .2s var(--ease) both;
}
:root[data-theme="dark"] .mention-pop { background: #282828; }
.mention-pop button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 6px 8px; border-radius: 8px; text-align: left; }
.mention-pop button.on, .mention-pop button:hover { background: var(--surface-2); }
.chat-drop { position: absolute; inset: 0; display: grid; place-items: center; background: color-mix(in srgb, var(--bg) 80%, transparent); border: 2px dashed var(--text-3); border-radius: 12px; font-weight: 500; z-index: 4; pointer-events: none; }
.chat-empty { text-align: center; color: var(--text-3); padding: 48px 16px; display: grid; gap: 6px; justify-items: center; }
.edit-box { margin-top: 4px; }
.edit-box .textarea { min-height: 60px; }

/* Chat-Übersicht: Liste links, Chat rechts */
.chats { display: grid; grid-template-columns: 320px minmax(0, 1fr); height: 100%; }
.chat-list { overflow-y: auto; padding: 10px 8px 20px; border-right: 1px solid var(--line); overscroll-behavior: contain; }
.chat-list-label { padding: 16px 10px 6px; }
.chat-item { display: flex; align-items: center; gap: 12px; width: 100%; padding: 10px; border-radius: 12px; text-align: left; transition: background-color .15s, transform .16s var(--ease-out); }
.chat-item:hover { background: var(--surface-2); }
.chat-item:active { transform: scale(.98); }
.chat-item.on { background: var(--surface-2); box-shadow: inset 3px 0 0 var(--red); }
.chat-item .b { flex: 1; min-width: 0; display: grid; }
.chat-item .b > span { color: var(--text-2); font-size: 13px; }
.chat-item.unread strong { font-weight: 700; }
.chat-item .m { display: grid; justify-items: end; gap: 4px; color: var(--text-3); font-size: 11px; }
.chat-pane { display: flex; flex-direction: column; min-height: 0; }
.chat-pane .project-chat { flex: 1; border-left: 0; }
.chat-pane-bar { display: flex; align-items: center; gap: 8px; min-height: 53px; padding: 8px 12px 8px 18px; border-bottom: 1px solid var(--line); }
.chat-pane .chat-head { display: none; }
.chat-pane-bar .spacer { flex: 1; }
.m-only { display: none; }

/* Lightbox */
.lightbox { position: fixed; inset: 0; z-index: 120; background: rgba(0, 0, 0, .85); display: grid; place-items: center; padding: 24px; animation: fadeIn .2s ease both; cursor: zoom-out; }
.lightbox img { max-width: 100%; max-height: 100%; border-radius: 8px; animation: zoomIn .35s var(--ease) both; }
@keyframes zoomIn { from { transform: scale(.92); opacity: 0; } }

/* ==========================================================================
   Kalender
   ========================================================================== */
.cal-wrap { padding: 16px 24px 28px; }
.cal-tools { display: flex; align-items: center; gap: 10px; margin-bottom: 14px; flex-wrap: wrap; }
.cal-tools h3 { font-size: 20px; font-weight: 700; letter-spacing: -.02em; min-width: 170px; }
.cal-tools .spacer { flex: 1; }
.legend { display: flex; gap: 14px; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal { display: grid; grid-template-columns: minmax(0, 1fr); border-radius: 14px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: var(--line); gap: 1px; user-select: none; }
.cal-head, .cal-days { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 1px; }
.cal-week { --lane-h: 25px; position: relative; }
.cal-bars { position: absolute; top: 34px; left: 0; right: 0; display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); grid-auto-rows: var(--lane-h); column-gap: 1px; pointer-events: none; }
.lane-space { flex: none; height: calc(var(--lanes) * var(--lane-h)); margin-bottom: -3px; }
.bar {
  pointer-events: auto; position: relative; display: flex; align-items: center; gap: 5px; height: 22px; margin: 0 4px; padding: 0 8px; min-width: 0;
  border-radius: 6px; background: var(--green); color: #fff; font-size: 12px; font-weight: 500; text-align: left; white-space: nowrap; overflow: hidden;
  cursor: grab; transition: filter .15s, opacity .15s;
}
.bar:hover { filter: brightness(.95); }
.bar.cont-l { margin-left: 0; border-top-left-radius: 0; border-bottom-left-radius: 0; }
.bar.cont-r { margin-right: 0; border-top-right-radius: 0; border-bottom-right-radius: 0; }
.bar .t { overflow: hidden; text-overflow: ellipsis; min-width: 0; }
.bar .v { margin-left: auto; opacity: .9; font-size: 11px; flex: none; }
.bar .grip { position: absolute; top: 0; bottom: 0; width: 8px; cursor: ew-resize; }
.bar .grip.l { left: 0; }
.bar .grip.r { right: 0; }
.bar.lifted { opacity: .35; }
.cal.dragging .bar, .cal.dragging .ev { pointer-events: none; }
.cal-wrap.painting .bar { pointer-events: none; }
.cal-day.drop { background: var(--green-soft) !important; box-shadow: inset 0 0 0 2px var(--green); }
.cal.drop-upload .cal-day.drop { background: var(--surface-2) !important; box-shadow: inset 0 0 0 2px var(--text-3); }
.ev.upload { cursor: grab; }
.ev.upload.lifted { opacity: .35; }
body.cal-dragging, body.cal-dragging * { cursor: grabbing !important; user-select: none !important; }
.drag-tip { position: fixed; z-index: 200; padding: 6px 10px; border-radius: 8px; background: #0f0f0f; color: #fff; font-size: 12px; font-weight: 500; pointer-events: none; white-space: nowrap; }
.cal-tip { font-size: 12px; color: var(--text-3); margin: -6px 0 12px; }
.cal-dow { background: var(--surface); padding: 8px 10px; font-size: 12px; color: var(--text-2); font-weight: 500; text-transform: uppercase; letter-spacing: .04em; }
:root[data-theme="dark"] .cal-dow, :root[data-theme="dark"] .cal-day { background: #161616; }
.cal-day { background: var(--surface); min-height: 112px; padding: 6px; display: flex; flex-direction: column; gap: 3px; cursor: pointer; position: relative; transition: background-color .15s; }
.cal-day:hover { background: var(--surface-2); }
.cal-day.other { opacity: .45; }
.cal-day.past .num { color: var(--text-3); }
.cal-day .num { font-size: 13px; font-weight: 500; width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; }
.cal-day.today .num { background: var(--red); color: #fff; }
.cal-day.mine-blocked { background: color-mix(in srgb, var(--red) 9%, var(--surface)); }
:root[data-theme="dark"] .cal-day.mine-blocked { background: color-mix(in srgb, var(--red) 14%, #161616); }
.cal-day.paint-preview { box-shadow: inset 0 0 0 2px var(--red); }
.ev { display: flex; align-items: center; gap: 5px; height: 22px; padding: 0 6px; border-radius: 6px; font-size: 12px; font-weight: 500; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; text-align: left; width: 100%; transition: transform .15s var(--ease-out), filter .15s; }
.ev:hover { filter: brightness(.96); }
.ev.block { background: var(--red-soft); color: var(--red); }
.ev.block .av { --s: 16px; font-size: 9px; }
.ev.shoot { background: var(--green); color: #fff; }
.ev.upload { background: var(--surface-2); color: var(--text-2); }
.ev .t { overflow: hidden; text-overflow: ellipsis; }
.ev .v { margin-left: auto; opacity: .9; font-size: 11px; }
.cal-wrap.painting .cal-day { cursor: cell; }
.paint-hint { font-size: 13px; color: var(--red); font-weight: 500; }
.vote-row { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.vote-btn { height: 44px; border-radius: 12px; background: var(--surface-2); font-weight: 500; display: inline-flex; align-items: center; justify-content: center; gap: 6px; transition: background-color .2s var(--ease), color .2s, transform .16s var(--ease-out); }
.vote-btn:active { transform: scale(.96); }
.vote-btn.on.yes { background: var(--green); color: #fff; }
.vote-btn.on.maybe { background: var(--amber); color: #fff; }
.vote-btn.on.no { background: var(--red); color: #fff; }
.voters { display: grid; gap: 6px; }
.voter { display: flex; align-items: center; gap: 10px; }
.voter .n { flex: 1; }
.day-list { display: grid; gap: 8px; }

/* ==========================================================================
   Performance
   ========================================================================== */
.perf { padding: 20px 24px 32px; display: grid; gap: 20px; }
.banner { display: flex; align-items: center; gap: 12px; padding: 12px 16px; border-radius: 12px; background: var(--amber-soft); }
.banner .t { flex: 1; }
.card { background: var(--surface); border-radius: 14px; box-shadow: 0 0 0 1px var(--line); padding: 18px; }
:root[data-theme="dark"] .card { background: #181818; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h3 { font-size: 16px; font-weight: 500; flex: 1; }
.chart { width: 100%; height: 240px; display: block; overflow: visible; }
.chart .grid-l { stroke: var(--line); }
.chart .axis { fill: var(--text-3); font-size: 11px; }
.chart .line { stroke: var(--red); stroke-width: 2.5; fill: none; stroke-linejoin: round; stroke-linecap: round; }
.chart .line.draw { stroke-dasharray: var(--len); stroke-dashoffset: var(--len); animation: draw 1.2s var(--ease) forwards .1s; }
.chart .line.prev { stroke: var(--text-3); stroke-width: 1.5; stroke-dasharray: 4 4; }
.chart .area { fill: url(#areaGrad); opacity: 0; animation: fadeIn .8s ease forwards .5s; }
.chart .hover-l { stroke: var(--text-3); stroke-width: 1; }
.chart .hover-d { fill: var(--red); stroke: var(--surface); stroke-width: 2; }
@keyframes draw { to { stroke-dashoffset: 0; } }
.chart-tip { position: absolute; pointer-events: none; padding: 8px 10px; border-radius: 8px; background: #0f0f0f; color: #fff; font-size: 12px; white-space: nowrap; transform: translate(-50%, -110%); transition: opacity .15s; }
.chart-box { position: relative; }
.vtable { width: 100%; border-collapse: collapse; }
.vtable th { text-align: right; font-weight: 500; font-size: 12px; color: var(--text-2); padding: 8px 10px; white-space: nowrap; cursor: pointer; user-select: none; }
.vtable th:first-child { text-align: left; }
.vtable th.sorted { color: var(--text); }
.vtable td { padding: 8px 10px; text-align: right; border-top: 1px solid var(--line); white-space: nowrap; font-variant-numeric: tabular-nums; }
.vtable td:first-child { text-align: left; white-space: normal; }
.vtable tr.vrow { cursor: pointer; transition: background-color .15s; }
.vtable tr.vrow:hover td { background: var(--surface-2); }
.vtitle { display: flex; align-items: center; gap: 12px; min-width: 260px; }
.thumb { width: 96px; aspect-ratio: 16 / 9; border-radius: 8px; flex: none; position: relative; background: var(--surface-2); overflow: hidden; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 18px; }
.thumb.short { width: 44px; aspect-ratio: 9 / 16; }
.thumb small { position: absolute; right: 4px; bottom: 4px; font-size: 10px; background: rgba(0, 0, 0, .75); padding: 1px 4px; border-radius: 4px; font-weight: 500; }
.vdetail td { background: var(--surface-2); }
.vdetail-inner { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; padding: 8px 4px; text-align: left; white-space: normal; }
.spark { width: 100%; height: 70px; display: block; }
.spark path.l { fill: none; stroke: var(--red); stroke-width: 2; }
.spark path.a { fill: var(--red-soft); }
.bars { display: grid; gap: 8px; }
.bar-row { display: grid; grid-template-columns: 140px 1fr 60px; gap: 10px; align-items: center; font-size: 13px; }
.bar-row .tr { height: 8px; border-radius: 4px; background: var(--surface-2); overflow: hidden; }
.bar-row .tr i { display: block; height: 100%; background: var(--red); border-radius: 4px; transform-origin: left; animation: grow .8s var(--ease) both; }
.perf-grid { display: grid; grid-template-columns: 2fr 1fr; gap: 20px; }

/* ==========================================================================
   Kanal / YouTube-Assistent
   ========================================================================== */
.yt { padding: 20px 24px 32px; display: grid; gap: 20px; }
.channel-card { display: flex; align-items: center; gap: 18px; flex-wrap: wrap; }
.channel-card .av { --s: 72px; font-size: 28px; }
.channel-stats { display: flex; gap: 28px; flex-wrap: wrap; }
.channel-stats b { font-size: 22px; font-weight: 700; display: block; letter-spacing: -.02em; }
.channel-stats small { color: var(--text-2); }
.steps { display: grid; gap: 10px; }
.step { border-radius: 14px; box-shadow: 0 0 0 1px var(--line); overflow: hidden; transition: box-shadow .2s; }
.step.open { box-shadow: 0 0 0 2px var(--text); }
.step-head { display: flex; align-items: center; gap: 14px; width: 100%; padding: 14px 16px; text-align: left; }
.step-num { width: 28px; height: 28px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; font-size: 13px; flex: none; transition: background-color .3s var(--ease), color .3s; }
.step.done .step-num { background: var(--green); color: #fff; }
.step-head h4 { font-size: 15px; font-weight: 500; flex: 1; }
.step-body { padding: 0 16px 16px 58px; display: grid; gap: 12px; color: var(--text-2); }
.step-body ol { margin: 0; padding-left: 18px; display: grid; gap: 6px; }
.step-body b { color: var(--text); font-weight: 500; }
.copy-field { display: flex; gap: 8px; align-items: center; padding: 6px 6px 6px 12px; border-radius: 10px; background: var(--surface-2); color: var(--text); font-family: var(--mono); font-size: 12px; }
.copy-field span { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.step-art { width: 100%; max-width: 420px; border-radius: 12px; background: var(--surface-2); padding: 14px; }
.yt-progress { display: flex; align-items: center; gap: 12px; }
.yt-progress .progress { flex: 1; height: 6px; }

/* ==========================================================================
   Team / Profil
   ========================================================================== */
.team { padding: 20px 24px 32px; display: grid; gap: 24px; }
.members { display: grid; gap: 4px; }
.member { display: flex; align-items: center; gap: 14px; padding: 10px 12px; border-radius: 12px; }
.member:hover { background: var(--surface-2); }
.member .av { --s: 44px; }
.member .info { flex: 1; min-width: 0; }
.member .info small { color: var(--text-2); }
.role-dev { background: linear-gradient(90deg, #a142f4, #3ea6ff); color: #fff; }
.invite-list { display: grid; gap: 8px; }
.invite { display: flex; align-items: center; gap: 10px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); flex-wrap: wrap; }
.invite code { font-family: var(--mono); font-size: 14px; font-weight: 500; letter-spacing: .04em; }
.invite .grow { flex: 1; }
.profile { padding: 24px; display: grid; gap: 24px; }
.avatar-edit { display: flex; align-items: center; gap: 18px; }
.avatar-edit .av { --s: 88px; font-size: 34px; }
.swatches { display: flex; gap: 8px; flex-wrap: wrap; }
.swatch { width: 30px; height: 30px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 2px var(--surface), 0 0 0 2px transparent; transition: box-shadow .2s, transform .16s var(--ease-out); }
.swatch.on { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--c); }
.swatch:active { transform: scale(.88); }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.row .spacer { flex: 1; }
.divider { height: 1px; background: var(--line); }
.switch { width: 44px; height: 26px; border-radius: 13px; background: var(--hover); position: relative; flex: none; transition: background-color .25s var(--ease); }
.switch::after { content: ""; position: absolute; top: 3px; left: 3px; width: 20px; height: 20px; border-radius: 50%; background: #fff; box-shadow: 0 1px 3px rgba(0, 0, 0, .3); transition: transform .3s var(--ease); }
.switch.on { background: var(--text); }
.switch.on::after { transform: translateX(18px); }
:root[data-theme="dark"] .switch.on::after { background: #0f0f0f; }

/* ==========================================================================
   Responsiv: Desktop zuerst, auf dem Handy Projekte & Chat nach vorn
   ========================================================================== */
@media (max-width: 1100px) {
  .t-next { grid-column: span 6; grid-row: span 1; }
  .t-board { grid-column: span 6; }
  .t-ideas, .t-cal, .t-chats { grid-column: span 6; }
  .t-perf { grid-column: span 12; }
  .flow { grid-template-columns: repeat(3, 1fr); }
  .perf-grid { grid-template-columns: 1fr; }
  .project { grid-template-columns: minmax(0, 1fr) minmax(320px, .9fr); }
}

@media (max-width: 760px) {
  body { font-size: 15px; }
  .topbar { padding: 0 12px; padding-top: env(safe-area-inset-top); height: calc(var(--topbar) + env(safe-area-inset-top)); }
  .hide-m { display: none !important; }
  .home { padding: 4px 12px 32px; }
  .hello { margin: 8px 4px 16px; }
  .hello h1 { font-size: 24px; }
  .grid { gap: 12px; display: flex; flex-direction: column; }
  .tile { min-height: 0; padding: 16px; }
  .tile:hover { transform: none; }
  /* Reihenfolge: Projekte und Chat zuerst, Analysen ans Ende */
  .t-next { order: 1; }
  .t-chats { order: 2; }
  .t-board { order: 3; }
  .t-ideas { order: 4; }
  .t-cal { order: 5; }
  .t-team { order: 6; }
  .t-footage { order: 5; }
  .t-perf { order: 7; }
  .t-channel { order: 8; }
  .t-perf .kpis { grid-template-columns: repeat(2, 1fr); }
  .t-perf .chart-box { display: none; }
  .flow-bar { height: 56px; }

  .layer { place-items: end center; }
  .sheet, .sheet.md, .sheet.sm {
    width: 100vw; height: calc(100dvh - 10px - env(safe-area-inset-top)); max-height: none;
    border-radius: 16px 16px 0 0;
  }
  .sheet-head { padding: 8px 8px 8px 16px; min-height: 56px; }
  .sheet-head h2 { font-size: 18px; }
  .sheet-pad, .perf, .yt, .team, .cal-wrap { padding-left: 14px; padding-right: 14px; }
  .board-tools { padding: 12px 14px 4px; }
  .board { grid-auto-columns: 82vw; padding: 8px 14px 16px; scroll-snap-type: x mandatory; scroll-padding: 14px; }
  .col { scroll-snap-align: start; }

  .project { display: flex; flex-direction: column; }
  .mobile-tabs { display: flex; padding: 8px 14px; gap: 8px; border-bottom: 1px solid var(--line); flex: none; }
  .mobile-tabs .chip { flex: 1; justify-content: center; }
  .project-main, .project-chat { flex: 1; min-height: 0; }
  .project[data-tab="chat"] .project-main, .project[data-tab="details"] .project-chat { display: none; }
  .project-main { padding: 14px 16px 32px; }
  .project-chat { border-left: 0; }
  .chat-head { display: none; }
  .ptitle { font-size: 22px; }
  .stages { grid-template-columns: repeat(7, minmax(0, 1fr)); }
  .stage-btn span { display: none; }
  .stage-btn.current span { display: block; position: absolute; }
  .props { grid-template-columns: 1fr; gap: 0; }
  .props > .k { min-height: 0; margin-top: 10px; }
  .msg-tools { top: auto; bottom: 100%; }

  .topbar { grid-template-columns: auto minmax(0, 1fr) auto; gap: 8px; }
  .logo-text { display: none; }
  .tb-right { gap: 4px; }
  .hgoal { width: 100%; padding: 6px 10px 5px; }
  .hgoal-cap { font-size: 11px; }
  .hgoal-dots { right: 2px; }

  .chats { grid-template-columns: 1fr; }
  .chats[data-view="list"] .chat-pane, .chats[data-view="chat"] .chat-list { display: none; }
  .chat-list { border-right: 0; }
  .chat-pane-bar { padding-left: 8px; }
  .m-only { display: inline-grid; }

  .cal-day { min-height: 64px; padding: 4px; }
  .cal-week { --lane-h: 9px; }
  .cal-bars { top: 31px; }
  .bar { height: 6px; padding: 0; margin: 0 2px; border-radius: 3px; }
  .bar > * { display: none; }
  .lane-space { margin-bottom: 0; }
  .cal-day .ev { height: 6px; padding: 0; font-size: 0; border-radius: 3px; }
  .cal-day .ev * { display: none; }
  .cal-day .ev.block { background: var(--red); }
  .cal-day .ev.upload { background: var(--text-3); }
  .cal-dow { padding: 6px 4px; text-align: center; font-size: 11px; }
  .legend { width: 100%; }
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .vdetail-inner { grid-template-columns: 1fr; }
  .bar-row { grid-template-columns: 90px 1fr 48px; }
  #toasts { left: 12px; right: 12px; bottom: calc(12px + env(safe-area-inset-bottom)); }
  .step-body { padding-left: 16px; }
}

/* Bewegung reduzieren: nur noch Überblendungen */
@media (prefers-reduced-motion: reduce) {
  *, *::before, *::after {
    animation-duration: .01ms !important; animation-delay: 0ms !important; transition-duration: .01ms !important;
  }
  .tile:hover, .idea:hover { transform: none; }
  body.has-layer .home { transform: none; }
}

/* Kanal-Banner */
.channel-banner { height: 84px; margin: -4px -4px 0; border-radius: 12px; background: var(--surface-2) center / cover no-repeat; }
.channel-row .channel-av { margin-top: -26px; box-shadow: 0 0 0 4px var(--surface); background: var(--surface-2); }
.channel-hero { border-radius: 16px; overflow: hidden; box-shadow: 0 0 0 1px var(--line); background: var(--surface); }
:root[data-theme="dark"] .channel-hero { background: #181818; }
.channel-hero .banner { aspect-ratio: 6.2 / 1; background: var(--surface-2) center / cover no-repeat; }
.channel-hero .info { display: flex; align-items: center; gap: 18px; padding: 0 20px 18px; flex-wrap: wrap; }
.channel-hero .av { --s: 96px; margin-top: -32px; box-shadow: 0 0 0 4px var(--surface); }
:root[data-theme="dark"] .channel-hero .av { box-shadow: 0 0 0 4px #181818; }
.vgrid { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); gap: 14px; }
.vcard { display: grid; gap: 8px; color: var(--text); border-radius: 12px; transition: transform .2s var(--ease); }
.vcard:hover { text-decoration: none; transform: translateY(-2px); }
.vcard .img { position: relative; aspect-ratio: 16 / 9; border-radius: 12px; overflow: hidden; background: var(--surface-2); }
.vcard .img img { width: 100%; height: 100%; object-fit: cover; transition: transform .35s var(--ease); }
.vcard:hover .img img { transform: scale(1.04); }
.vcard .img small { position: absolute; right: 6px; bottom: 6px; font-size: 11px; font-weight: 500; background: rgba(0, 0, 0, .8); color: #fff; padding: 1px 5px; border-radius: 4px; }
.vcard b { font-weight: 500; font-size: 14px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; }
.vcard span { color: var(--text-2); font-size: 12px; }
.thumb img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }

/* ==========================================================================
   Deals & Retainer
   ========================================================================== */
.deals { display: grid; gap: 16px; grid-template-columns: minmax(0, 1fr); }
.deal-alert { display: flex; gap: 12px; align-items: center; padding: 14px 16px; border-radius: 14px; background: var(--amber-soft); }
.deal-alert > div { display: grid; }
.deal-alert.ok { background: var(--green-soft); }
.deal { border-radius: 16px; padding: 16px 18px; background: var(--surface); box-shadow: 0 0 0 1px var(--line); display: grid; gap: 12px; position: relative; overflow: hidden; }
:root[data-theme="dark"] .deal { background: #181818; }
.deal::before { content: ""; position: absolute; left: 0; top: 0; bottom: 0; width: 4px; background: var(--c); }
.deal.inactive { opacity: .6; }
.deal-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.deal-head h3 { font-size: 17px; font-weight: 700; }
.deal-head .spacer { flex: 1; }
.deal-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); }
.deal-note { font-size: 13px; }
.periods { display: flex; gap: 8px; overflow-x: auto; padding: 2px 2px 6px; scrollbar-width: thin; }
.period {
  flex: none; display: grid; gap: 2px; min-width: 128px; padding: 10px 12px; border-radius: 12px; text-align: left;
  background: var(--surface-2); color: var(--text-2); cursor: default; transition: transform .16s var(--ease-out), box-shadow .2s;
}
.period-label { font-size: 12px; font-weight: 500; }
.period-count { display: flex; align-items: center; gap: 4px; font-size: 18px; font-weight: 700; color: var(--text); }
.period.current { box-shadow: inset 0 0 0 2px var(--text); }
.period.done .period-count, .period.ok .period-count { color: var(--green); }
.period.missed { background: var(--red-soft); }
.period.missed .period-count { color: var(--red); }
.period.gap { background: var(--amber-soft); cursor: pointer; }
.period.gap .period-count { color: #b37900; }
:root[data-theme="dark"] .period.gap .period-count { color: var(--amber); }
.period.gap:hover { box-shadow: inset 0 0 0 2px var(--amber); }
.period.gap:active { transform: scale(.96); }
.period-cta { display: flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 500; color: var(--text); }
.deal-projects { display: grid; gap: 2px; grid-template-columns: minmax(0, 1fr); }
.deal-project { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 10px; text-align: left; transition: background-color .15s; }
.deal-project:hover { background: var(--surface-2); }

.deal-mini { display: grid; gap: 10px; grid-template-columns: minmax(0, 1fr); }
.deal-mini-item { display: grid; gap: 6px; }
.deal-mini-item .top { display: flex; align-items: center; gap: 8px; }
.deal-mini-item .top b { flex: 1; min-width: 0; font-weight: 500; }
.deal-mini-item .progress > i { animation: none; }
.t-deals { grid-column: span 8; }
@media (max-width: 760px) {
  .t-deals { order: 2; }
}

/* Werbeeinnahmen */
.revenue .card-head h3 { display: flex; align-items: center; gap: 8px; }
.rev-kpis .kpi b { font-size: 22px; }
.rev-toggle { gap: 8px; }
.rev-toggle .switch { transform: scale(.85); }
@media (max-width: 760px) { .rev-kpis { grid-template-columns: repeat(2, 1fr); } }

/* ==========================================================================
   Mitteilungen (Glocke oben rechts)
   ========================================================================== */
.bell .badge { top: auto; right: 3px; bottom: 3px; min-width: 16px; height: 16px; font-size: 10px; padding: 0 4px; box-shadow: 0 0 0 2px var(--bg); }
.bell[aria-expanded="true"] { background: var(--surface-2); }
.notif-panel {
  position: fixed; z-index: 80; width: min(400px, calc(100vw - 16px)); max-height: min(560px, calc(100dvh - 80px));
  display: flex; flex-direction: column; border-radius: 16px; overflow: hidden;
  background: var(--surface); box-shadow: 0 16px 48px rgba(0, 0, 0, .18), 0 0 0 1px var(--line);
}
:root[data-theme="dark"] .notif-panel { background: #212121; box-shadow: 0 16px 48px rgba(0, 0, 0, .5), 0 0 0 1px var(--line); }
.notif-head { padding: 14px 16px 10px; font-size: 16px; border-bottom: 1px solid var(--line); }
.notif-body { overflow-y: auto; padding: 6px; overscroll-behavior: contain; }
.notif-group { padding: 10px 10px 4px; font-size: 12px; font-weight: 500; color: var(--text-2); }
.notif { display: flex; align-items: center; gap: 6px; padding: 4px; border-radius: 12px; }
.notif:hover { background: var(--surface-2); }
.notif-main { flex: 1; min-width: 0; display: flex; align-items: center; gap: 10px; padding: 6px; text-align: left; border-radius: 10px; }
.notif-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 22%, transparent); }
.notif.urgent .notif-text b { color: var(--red); }
.notif-text { flex: 1; min-width: 0; display: grid; gap: 1px; }
.notif-text b { font-weight: 500; font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif-text small { color: var(--text-2); font-size: 12px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.notif .icon-btn { opacity: .6; }
.notif:hover .icon-btn { opacity: 1; }
.notif-empty { display: grid; justify-items: center; gap: 4px; padding: 32px 16px; color: var(--text-2); text-align: center; }
.notif-empty .icon { color: var(--green); }

/* ==========================================================================
   Footage (Google Drive)
   ========================================================================== */
.footage { padding: 20px 24px 32px; display: grid; gap: 20px; grid-template-columns: minmax(0, 1fr); }
.footage .row { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.fu-wait { display: flex; gap: 14px; align-items: center; }
.fu-status { display: grid; gap: 12px; }
.fu-quota { display: flex; align-items: center; gap: 12px; }
.fu-quota .progress { flex: 1; height: 6px; }
.fu-upload { display: grid; gap: 14px; }
.dropzone {
  display: grid; justify-items: center; gap: 6px; padding: 32px 16px; text-align: center; cursor: pointer;
  border-radius: 14px; border: 2px dashed var(--line); background: var(--surface-2);
  transition: border-color .2s, background-color .2s, transform .16s var(--ease-out);
}
.dropzone:hover { border-color: var(--text-3); }
.dropzone:active { transform: scale(.99); }
.dropzone:focus-visible { outline: none; border-color: var(--blue); box-shadow: 0 0 0 3px var(--blue-soft); }
.dropzone.over { border-color: var(--red); background: var(--red-soft); transform: scale(1.01); }
.dropzone.off { cursor: default; opacity: .7; }
.dropzone.off:active { transform: none; }
.dz-icon { width: 48px; height: 48px; border-radius: 50%; display: grid; place-items: center; background: var(--surface); color: var(--red); box-shadow: 0 0 0 1px var(--line); transition: transform .3s var(--ease); }
.dropzone.over .dz-icon { transform: translateY(-4px); }
.dropzone b { font-size: 15px; font-weight: 500; }
.fu-queue, .fu-group { display: grid; gap: 4px; }
.fu-item, .fu-file { display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; }
.fu-item { background: var(--surface-2); }
.fu-file:hover { background: var(--surface-2); }
.fu-item .b, .fu-file .b { flex: 1; min-width: 0; display: grid; gap: 4px; }
.fu-item .top { display: flex; gap: 8px; align-items: baseline; min-width: 0; }
.fu-item .top b { font-weight: 500; min-width: 0; }
.fu-item .top small { margin-left: auto; max-width: 40%; }
.fu-item .progress > i { transition: width .3s linear; }
.fu-item.done .progress > i { background: var(--green); }
.fu-item.error .progress > i { background: var(--text-3); }
.fu-item small.err { color: var(--red); }
.fu-ic { width: 32px; height: 32px; border-radius: 9px; display: grid; place-items: center; background: var(--surface); color: var(--text-2); flex: none; }
.fu-item.done .fu-ic { background: var(--green); color: #fff; }
.fu-file .b b { font-weight: 500; }
.fu-file .fu-ic { background: var(--surface-2); }
.fu-group + .fu-group { margin-top: 14px; }
.fu-group-head { display: flex; align-items: center; gap: 8px; padding: 0 4px 4px; min-width: 0; }
.fu-group-head .spacer { flex: 1; }
.fu-mini-live { display: grid; gap: 6px; padding: 10px 12px; border-radius: 12px; background: var(--surface-2); margin-bottom: 10px; }
.fu-mini-live .top { display: flex; justify-content: space-between; font-size: 13px; }
.fu-mini-live b { font-weight: 500; }
.fu-mini-live .progress > i { transition: width .3s linear; }
@media (max-width: 760px) {
  .footage { padding-left: 14px; padding-right: 14px; }
  .dropzone { padding: 24px 12px; }
}
@media (prefers-reduced-motion: reduce) {
  .dropzone, .dz-icon, .fu-item .progress > i { transition: none; }
}
