:root {
  color-scheme: light;
  --bg: #f6f6f4;
  --surface: #ffffff;
  --surface-2: #f1f1ee;
  --surface-3: #e8e8e4;
  --border: #e3e3de;
  --border-strong: #cfcfc8;
  --text: #121211;
  --text-2: #52514e;
  --text-3: #85847e;
  --accent: #121211;
  --accent-text: #ffffff;
  --gold: #b9a36b;
  --good: #0f7b3f; --good-bg: #e3f4ea;
  --warn: #9a6100; --warn-bg: #fdf1d8;
  --bad: #c22d2d; --bad-bg: #fbe5e4;
  --info: #1c5cab; --info-bg: #e3eefb;
  --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #7a5bd6;
  --seq-0: #f1f1ee; --seq-1: #cde2fb; --seq-2: #9ec5f4; --seq-3: #6da7ec; --seq-4: #3987e5; --seq-5: #256abf; --seq-6: #184f95;
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 4px 16px rgba(0,0,0,.05);
  --shadow-lg: 0 10px 40px rgba(0,0,0,.18);
  --radius: 12px;
  --space-color: #2a78d6;
}
@media (prefers-color-scheme: dark) {
  :root:not([data-theme="light"]) {
    color-scheme: dark;
    --bg: #111110; --surface: #1a1a19; --surface-2: #232321; --surface-3: #2d2d2a;
    --border: #2f2f2c; --border-strong: #44443f;
    --text: #f0efec; --text-2: #c3c2b7; --text-3: #8d8c84;
    --accent: #f0efec; --accent-text: #111110;
    --good: #4cc27f; --good-bg: #183324; --warn: #e7b04a; --warn-bg: #352a12; --bad: #f07272; --bad-bg: #3a1c1c; --info: #79aef0; --info-bg: #182a40;
    --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #8a6fe8;
    --seq-0: #232321; --seq-1: #0d366b; --seq-2: #104281; --seq-3: #184f95; --seq-4: #256abf; --seq-5: #3987e5; --seq-6: #6da7ec;
    --shadow: 0 1px 2px rgba(0,0,0,.4); --shadow-lg: 0 10px 40px rgba(0,0,0,.6);
  }
}
:root[data-theme="dark"] {
  color-scheme: dark;
  --bg: #111110; --surface: #1a1a19; --surface-2: #232321; --surface-3: #2d2d2a;
  --border: #2f2f2c; --border-strong: #44443f;
  --text: #f0efec; --text-2: #c3c2b7; --text-3: #8d8c84;
  --accent: #f0efec; --accent-text: #111110;
  --good: #4cc27f; --good-bg: #183324; --warn: #e7b04a; --warn-bg: #352a12; --bad: #f07272; --bad-bg: #3a1c1c; --info: #79aef0; --info-bg: #182a40;
  --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #8a6fe8;
  --seq-0: #232321; --seq-1: #0d366b; --seq-2: #104281; --seq-3: #184f95; --seq-4: #256abf; --seq-5: #3987e5; --seq-6: #6da7ec;
}

* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { background: var(--bg); color: var(--text); font: 14px/1.45 Inter, ui-sans-serif, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: inherit; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -0.01em; }
h1 { font-size: 22px; } h2 { font-size: 17px; } h3 { font-size: 15px; } h4 { font-size: 13px; }
.muted { color: var(--text-2); } .faint { color: var(--text-3); } .small { font-size: 12px; } .tiny { font-size: 11px; }
.num { font-variant-numeric: tabular-nums; }
.row { display: flex; align-items: center; gap: 8px; } .row.wrap { flex-wrap: wrap; } .between { justify-content: space-between; }
.col { display: flex; flex-direction: column; gap: 8px; }
.grow { flex: 1; min-width: 0; }
.ellipsis { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 248px 1fr; min-height: 100vh; }
.sidebar { background: var(--surface); border-right: 1px solid var(--border); padding: 16px 12px; display: flex; flex-direction: column; gap: 4px; position: sticky; top: 0; height: 100vh; overflow-y: auto; }
.brand { display: flex; align-items: center; gap: 10px; padding: 4px 8px 16px; font-weight: 700; font-size: 15px; }
.brand-mark { width: 28px; height: 28px; border-radius: 8px; background: var(--accent); color: var(--accent-text); display: grid; place-items: center; font-size: 13px; }
/* LÉTOH-Wortmarke (wie auf letoh.at) */
.brand-word { font-family: "Cormorant Garamond", Georgia, serif; font-weight: 500; font-size: 21px; letter-spacing: .34em; line-height: 1; }
.brand-sub { font-size: 10px; font-weight: 600; letter-spacing: .24em; text-transform: uppercase; color: var(--gold); }
.nav-label { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--text-3); padding: 14px 8px 6px; font-weight: 600; }
.nav-item { display: flex; align-items: center; gap: 10px; padding: 8px; border-radius: 8px; text-decoration: none; color: var(--text-2); cursor: pointer; border: 0; background: none; width: 100%; text-align: left; }
.nav-item svg { width: 18px; height: 18px; flex: none; }
.nav-item:hover { background: var(--surface-2); color: var(--text); }
.nav-item.active { background: var(--surface-2); color: var(--text); font-weight: 600; }
.dot { width: 10px; height: 10px; border-radius: 50%; flex: none; }
.space-badge { width: 26px; height: 26px; border-radius: 7px; display: grid; place-items: center; color: #fff; font-weight: 700; font-size: 11px; flex: none; }
.main { min-width: 0; }
.page { padding: 28px 32px 64px; max-width: 1360px; margin: 0 auto; }
.mobile-bar { display: none; }

/* ---------- Space-Kopf ---------- */
.space-head { background: var(--surface); border-bottom: 1px solid var(--border); position: sticky; top: 0; z-index: 20; }
.space-strip { height: 4px; background: var(--space-color); }
.space-head-inner { max-width: 1360px; margin: 0 auto; padding: 16px 32px 0; }
.space-title { display: flex; align-items: center; gap: 12px; }
.space-title .space-badge { width: 40px; height: 40px; border-radius: 10px; font-size: 15px; }
.space-pill { display: inline-flex; align-items: center; gap: 6px; font-size: 11px; font-weight: 600; padding: 3px 8px; border-radius: 99px; background: color-mix(in srgb, var(--space-color) 14%, transparent); color: var(--text); }
.tabs { display: flex; gap: 2px; margin-top: 14px; overflow-x: auto; scrollbar-width: none; }
.tab { padding: 10px 14px; border: 0; background: none; color: var(--text-2); cursor: pointer; border-bottom: 2px solid transparent; white-space: nowrap; font-weight: 500; text-decoration: none; }
.tab:hover { color: var(--text); }
.tab.active { color: var(--text); border-bottom-color: var(--space-color); font-weight: 600; }

/* ---------- Bausteine ---------- */
.card { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 18px; box-shadow: var(--shadow); }
.card.flat { box-shadow: none; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 14px; }
.grid { display: grid; gap: 16px; }
.g2 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .g3 { grid-template-columns: repeat(3, minmax(0, 1fr)); } .g4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.g5 { grid-template-columns: repeat(5, minmax(0, 1fr)); }
.span2 { grid-column: span 2; }
.section { margin-top: 28px; } .section-head { display: flex; align-items: end; justify-content: space-between; gap: 12px; margin-bottom: 12px; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 6px; padding: 8px 14px; border-radius: 8px; border: 1px solid var(--border-strong); background: var(--surface); cursor: pointer; font-weight: 550; white-space: nowrap; text-decoration: none; }
.btn:hover { background: var(--surface-2); }
.btn.primary { background: var(--accent); color: var(--accent-text); border-color: var(--accent); }
.btn.primary:hover { opacity: .88; }
.btn.good { background: var(--good); color: #fff; border-color: var(--good); }
.btn.good:hover { opacity: .88; }
.btn.danger { color: var(--bad); }
.btn.ghost { border-color: transparent; background: none; }
.btn.ghost:hover { background: var(--surface-2); }
.btn.sm { padding: 5px 10px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn svg { width: 16px; height: 16px; }

.input, select.input, textarea.input { width: 100%; padding: 9px 11px; border: 1px solid var(--border-strong); border-radius: 8px; background: var(--surface); outline: none; }
.input:focus { border-color: var(--text-2); box-shadow: 0 0 0 3px color-mix(in srgb, var(--space-color) 22%, transparent); }
textarea.input { resize: vertical; min-height: 140px; line-height: 1.5; }
label.field { display: flex; flex-direction: column; gap: 6px; font-weight: 550; font-size: 13px; }
.seg { display: inline-flex; background: var(--surface-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: none; padding: 6px 12px; border-radius: 7px; cursor: pointer; color: var(--text-2); font-weight: 550; font-size: 13px; }
.seg button.active { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }

.badge { display: inline-flex; align-items: center; gap: 4px; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600; background: var(--surface-2); color: var(--text-2); white-space: nowrap; }
.badge.good { background: var(--good-bg); color: var(--good); } .badge.warn { background: var(--warn-bg); color: var(--warn); }
.badge.bad { background: var(--bad-bg); color: var(--bad); } .badge.info { background: var(--info-bg); color: var(--info); }
.badge.demo { background: var(--warn-bg); color: var(--warn); letter-spacing: .04em; }
.mult { font-weight: 700; font-variant-numeric: tabular-nums; padding: 2px 8px; border-radius: 6px; font-size: 12.5px; }
.mult.m0 { background: var(--surface-2); color: var(--text-2); } .mult.m1 { background: var(--info-bg); color: var(--info); }
.mult.m2 { background: var(--good-bg); color: var(--good); } .mult.m3 { background: var(--good); color: #fff; }

.pf { width: 20px; height: 20px; border-radius: 6px; display: inline-grid; place-items: center; flex: none; }
.pf svg { width: 12px; height: 12px; }
.pf.instagram { background: linear-gradient(45deg, #f09433, #dc2743 50%, #bc1888); color: #fff; }
.pf.facebook { background: #1877f2; color: #fff; } .pf.youtube { background: #ff0000; color: #fff; } .pf.snapchat { background: #fffc00; color: #111; } .pf.linkedin { background: #0a66c2; color: #fff; }
.pf.lg { width: 36px; height: 36px; border-radius: 10px; } .pf.lg svg { width: 20px; height: 20px; }
.avatar { width: 36px; height: 36px; border-radius: 50%; background: var(--surface-3); position: relative; flex: none; display: grid; place-items: center; font-weight: 700; color: var(--text-2); overflow: visible; }
.avatar img { width: 100%; height: 100%; border-radius: 50%; object-fit: cover; }
.avatar .pf { position: absolute; right: -4px; bottom: -4px; width: 16px; height: 16px; border-radius: 5px; border: 2px solid var(--surface); }
.avatar .pf svg { width: 9px; height: 9px; }

/* ---------- Hauptplattform ---------- */
.home-head { display: flex; align-items: end; justify-content: space-between; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.client-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 16px; }
.client { background: var(--surface); border: 1px solid var(--border); border-radius: 14px; overflow: hidden; cursor: pointer; transition: transform .12s, box-shadow .12s; text-decoration: none; display: flex; flex-direction: column; box-shadow: var(--shadow); }
.client:hover { transform: translateY(-2px); box-shadow: var(--shadow-lg); }
.client-top { height: 6px; }
.client-body { padding: 16px 18px 18px; display: flex; flex-direction: column; gap: 14px; flex: 1; }
.client-body .row:first-child { align-items: flex-start; }
.client-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.client-stat { background: var(--surface-2); border-radius: 9px; padding: 8px 10px; }
.client-stat b { display: block; font-size: 17px; font-variant-numeric: tabular-nums; }
.client-stat span { font-size: 11.5px; color: var(--text-2); white-space: nowrap; }
.client-next { font-size: 12.5px; color: var(--text-2); border-top: 1px solid var(--border); padding-top: 12px; }
.client.new { border: 2px dashed var(--border-strong); background: transparent; box-shadow: none; align-items: center; justify-content: center; min-height: 230px; color: var(--text-2); font-weight: 600; gap: 8px; }

/* ---------- KPIs ---------- */
.kpi { padding: 16px 18px; }
.kpi .label { color: var(--text-2); font-size: 12.5px; font-weight: 550; }
.kpi .value { font-size: 26px; font-weight: 700; margin-top: 6px; font-variant-numeric: tabular-nums; letter-spacing: -0.02em; }
.delta { font-size: 12px; font-weight: 600; } .delta.up { color: var(--good); } .delta.down { color: var(--bad); }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table.t { width: 100%; border-collapse: collapse; font-size: 13px; }
table.t th { text-align: left; font-weight: 600; color: var(--text-2); font-size: 12px; padding: 8px 10px; border-bottom: 1px solid var(--border); white-space: nowrap; }
table.t th.r, table.t td.r { text-align: right; }
table.t td { padding: 10px; border-bottom: 1px solid var(--border); vertical-align: middle; }
table.t tr:last-child td { border-bottom: 0; }
table.t tbody tr:hover { background: var(--surface-2); }
.thumb { width: 64px; height: 40px; border-radius: 6px; background: var(--surface-3); object-fit: cover; flex: none; display: grid; place-items: center; color: var(--text-3); }
.scorebar { width: 60px; height: 6px; border-radius: 3px; background: var(--surface-3); overflow: hidden; display: inline-block; vertical-align: middle; }
.scorebar i { display: block; height: 100%; background: var(--s1); border-radius: 3px; }

/* ---------- Charts ---------- */
.chart { width: 100%; display: block; }
.chart text { fill: var(--text-3); font-size: 11px; font-family: inherit; }
.chart .grid line { stroke: var(--border); }
.legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--text-2); }
.legend span { display: inline-flex; align-items: center; gap: 6px; }
.legend i { width: 10px; height: 10px; border-radius: 3px; display: inline-block; }
#tooltip { position: fixed; pointer-events: none; z-index: 1000; background: var(--text); color: var(--bg); padding: 8px 10px; border-radius: 8px; font-size: 12px; opacity: 0; transition: opacity .1s; max-width: 280px; box-shadow: var(--shadow-lg); }
#tooltip.show { opacity: 1; }
.heat { display: grid; grid-template-columns: 34px repeat(24, 1fr); gap: 2px; font-size: 10.5px; color: var(--text-3); }
.heat .c { aspect-ratio: 1; border-radius: 3px; background: var(--seq-0); }
.heat .h { text-align: center; }
.hbar { display: grid; grid-template-columns: 170px 1fr 60px; align-items: center; gap: 10px; font-size: 13px; padding: 5px 0; }
.hbar .track { height: 10px; background: var(--surface-2); border-radius: 0 4px 4px 0; overflow: hidden; }
.hbar .fill { height: 100%; background: var(--s1); border-radius: 0 4px 4px 0; }

/* ---------- Kalender ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border: 1px solid var(--border); border-radius: var(--radius); overflow: hidden; background: var(--border); gap: 1px; }
.cal-h { background: var(--surface-2); padding: 8px 10px; font-size: 12px; font-weight: 600; color: var(--text-2); }
.cal-d { background: var(--surface); min-height: 118px; padding: 6px; display: flex; flex-direction: column; gap: 4px; }
.cal-d.out { background: var(--surface-2); } .cal-d.out .cal-n { color: var(--text-3); }
.cal-d.today .cal-n { background: var(--space-color); color: #fff; }
.cal-d.drop { outline: 2px dashed var(--space-color); outline-offset: -3px; }
.cal-n { font-size: 12px; font-weight: 600; width: 24px; height: 24px; border-radius: 50%; display: grid; place-items: center; }
.cal-add { margin-left: auto; opacity: 0; border: 0; background: var(--surface-2); border-radius: 6px; width: 22px; height: 22px; cursor: pointer; color: var(--text-2); }
.cal-d:hover .cal-add { opacity: 1; }
.chip { display: flex; align-items: center; gap: 5px; padding: 4px 6px; border-radius: 6px; font-size: 11.5px; cursor: pointer; background: var(--surface-2); border-left: 3px solid var(--text-3); overflow: hidden; }
.chip:hover { background: var(--surface-3); }
.chip.scheduled { border-left-color: var(--s1); } .chip.published { border-left-color: var(--good); opacity: .8; }
.chip.draft { border-left-color: var(--text-3); border-style: dashed; } .chip.failed, .chip.partial { border-left-color: var(--bad); }
.chip.approval { border-left-color: var(--warn); border-left-style: solid; background: var(--warn-bg); }
.chip.hold { border-left-color: var(--bad); border-left-style: solid; background: var(--bad-bg); }
.chip .pfs { display: flex; gap: 2px; } .chip .pf { width: 14px; height: 14px; border-radius: 4px; } .chip .pf svg { width: 8px; height: 8px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 10px; }
.week-col { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); min-height: 420px; padding: 10px; display: flex; flex-direction: column; gap: 8px; }
.week-col.today { border-color: var(--space-color); box-shadow: 0 0 0 1px var(--space-color); }
.week-col.drop { outline: 2px dashed var(--space-color); }
.qpost { background: var(--surface); border: 1px solid var(--border); border-radius: 10px; padding: 12px; display: flex; gap: 12px; cursor: pointer; }
.qpost:hover { border-color: var(--border-strong); }
.qpost .time { width: 64px; flex: none; font-weight: 650; font-variant-numeric: tabular-nums; }
.qmedia { width: 54px; height: 54px; border-radius: 8px; object-fit: cover; background: var(--surface-3); flex: none; }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10,10,10,.45); z-index: 100; display: flex; align-items: flex-start; justify-content: center; padding: 4vh 16px; overflow-y: auto; animation: fade .12s; }
.modal { background: var(--surface); border-radius: 16px; width: 100%; max-width: 560px; box-shadow: var(--shadow-lg); overflow: hidden; }
.modal.lg { max-width: 760px; }
.modal.xl { max-width: 1120px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.modal-body { padding: 20px; }
.modal-foot { padding: 14px 20px; border-top: 1px solid var(--border); display: flex; gap: 8px; justify-content: flex-end; align-items: center; background: var(--surface-2); flex-wrap: wrap; }
@keyframes fade { from { opacity: 0; } }
.composer { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
.composer-edit { padding: 20px; display: flex; flex-direction: column; gap: 16px; border-right: 1px solid var(--border); }
.composer-prev { padding: 20px; background: var(--surface-2); display: flex; flex-direction: column; gap: 14px; max-height: 76vh; overflow-y: auto; }
.acc-pick { display: flex; flex-wrap: wrap; gap: 8px; }
.acc-btn { display: flex; align-items: center; gap: 8px; padding: 6px 12px 6px 6px; border-radius: 99px; border: 1.5px solid var(--border); background: var(--surface); cursor: pointer; opacity: .6; }
.acc-btn.on { border-color: var(--text); opacity: 1; background: var(--surface-2); }
.acc-btn .avatar { width: 28px; height: 28px; font-size: 11px; }
.drop-zone { border: 1.5px dashed var(--border-strong); border-radius: 10px; padding: 16px; text-align: center; color: var(--text-2); cursor: pointer; }
.drop-zone.over { border-color: var(--space-color); background: color-mix(in srgb, var(--space-color) 8%, transparent); }
.media-list { display: flex; gap: 8px; flex-wrap: wrap; }
.media-item { position: relative; width: 84px; height: 84px; border-radius: 8px; overflow: hidden; background: var(--surface-3); }
.media-item img, .media-item video { width: 100%; height: 100%; object-fit: cover; }
.media-item button { position: absolute; top: 4px; right: 4px; width: 22px; height: 22px; border-radius: 50%; border: 0; background: rgba(0,0,0,.65); color: #fff; cursor: pointer; }
.counter { font-size: 11.5px; color: var(--text-3); font-variant-numeric: tabular-nums; }
.counter.over { color: var(--bad); font-weight: 600; }
.issues { background: var(--bad-bg); color: var(--bad); border-radius: 10px; padding: 10px 12px; font-size: 13px; }
.issues ul { margin: 4px 0 0; padding-left: 18px; }
.preview { background: var(--surface); border-radius: 12px; border: 1px solid var(--border); overflow: hidden; }
.preview-head { display: flex; align-items: center; gap: 8px; padding: 10px 12px; font-weight: 600; font-size: 13px; }
.preview-media { background: var(--surface-3); aspect-ratio: 4/5; display: grid; place-items: center; color: var(--text-3); overflow: hidden; }
.preview-media.wide { aspect-ratio: 16/9; } .preview-media.tall { aspect-ratio: 9/16; max-height: 360px; }
.preview-media img, .preview-media video { width: 100%; height: 100%; object-fit: cover; }
.preview-text { padding: 10px 12px; font-size: 13px; white-space: pre-wrap; word-break: break-word; max-height: 160px; overflow: hidden; }
.slot-chip { border: 1px solid var(--border-strong); background: var(--surface); border-radius: 99px; padding: 4px 10px; font-size: 12px; cursor: pointer; }
.slot-chip:hover { border-color: var(--text); }

/* ---------- Vorschläge ---------- */
.sugg { display: flex; flex-direction: column; gap: 10px; }
.sugg-type { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; font-weight: 700; color: var(--text-3); }
.sugg h3 { line-height: 1.3; }
.evidence { display: flex; flex-direction: column; gap: 6px; border-top: 1px solid var(--border); padding-top: 10px; }
.evidence a, .evidence div { display: flex; gap: 8px; align-items: center; font-size: 12.5px; text-decoration: none; color: var(--text-2); }
.outlier { display: flex; flex-direction: column; gap: 10px; }
.outlier .big { font-size: 28px; font-weight: 750; letter-spacing: -0.02em; color: var(--good); font-variant-numeric: tabular-nums; }

.empty { text-align: center; padding: 40px 20px; color: var(--text-2); }
.empty h3 { color: var(--text); margin-bottom: 6px; }
.notice { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 10px; background: var(--info-bg); color: var(--info); font-size: 13px; }
.notice.warn { background: var(--warn-bg); color: var(--warn); }
.notice.bad { background: var(--bad-bg); color: var(--bad); }
.notice b { color: inherit; }

#toasts { position: fixed; bottom: 20px; right: 20px; z-index: 300; display: flex; flex-direction: column; gap: 8px; }
.toast { background: var(--text); color: var(--bg); padding: 11px 16px; border-radius: 10px; box-shadow: var(--shadow-lg); max-width: 420px; animation: fade .15s; font-size: 13.5px; }
.toast.bad { background: var(--bad); color: #fff; }
.spinner { width: 18px; height: 18px; border: 2px solid var(--border-strong); border-top-color: var(--text); border-radius: 50%; animation: spin .7s linear infinite; display: inline-block; }
@keyframes spin { to { transform: rotate(360deg); } }
.loading { display: grid; place-items: center; padding: 80px; }

/* ---------- Feedback ---------- */
.chip .badge { padding: 0 5px; font-size: 10px; }
.thread { display: flex; flex-direction: column; gap: 10px; }
.msg { border-radius: 12px; padding: 10px 12px; background: var(--surface); border: 1px solid var(--border); font-size: 13px; }
.msg.client { border-left: 3px solid var(--space-color); }
.msg.agency { background: var(--surface-2); }
.msg.change { border-left-color: var(--bad); }
.msg.approve { border-left-color: var(--good); }
.msg.resolved { opacity: .6; }
.msg-head { display: flex; align-items: center; gap: 6px; font-size: 12px; color: var(--text-2); margin-bottom: 4px; flex-wrap: wrap; }
.msg-body { white-space: pre-wrap; word-break: break-word; }
.ts { font-variant-numeric: tabular-nums; background: var(--info-bg); color: var(--info); border-radius: 5px; padding: 0 5px; font-weight: 600; cursor: pointer; }
.check { display: flex; gap: 8px; align-items: flex-start; font-size: 13px; cursor: pointer; }
.check input { margin-top: 2px; }
.invite { display: flex; gap: 8px; align-items: center; background: var(--surface-2); border-radius: 10px; padding: 10px; }
.invite code { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 12px; }

/* ---------- Produktion ---------- */
.me-box { border-top: 1px solid var(--border); padding-top: 8px; display: flex; flex-direction: column; gap: 2px; }
.hdot { width: 10px; height: 10px; border-radius: 50%; display: inline-block; flex: none; }
.board { display: grid; grid-template-columns: repeat(7, minmax(190px, 1fr)); gap: 10px; overflow-x: auto; padding-bottom: 8px; }
.board-col { background: var(--surface-2); border-radius: 12px; padding: 8px; display: flex; flex-direction: column; gap: 8px; min-height: 160px; }
.board-col.drop { outline: 2px dashed var(--text-3); }
.board-head { display: flex; align-items: center; gap: 6px; font-size: 12.5px; padding: 2px 4px 4px; }
.job { background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--text-3); border-radius: 9px; padding: 8px 10px; display: flex; flex-direction: column; gap: 6px; cursor: grab; box-shadow: var(--shadow); }
.job:hover { border-color: var(--border-strong); }
.job-title { font-weight: 600; font-size: 13px; line-height: 1.3; }
.task-row { display: flex; align-items: center; gap: 12px; background: var(--surface); border: 1px solid var(--border); border-left: 4px solid var(--text-3); border-radius: 10px; padding: 12px 14px; }
.mini { background: var(--surface-2); border-radius: 10px; padding: 10px 12px; display: flex; flex-direction: column; gap: 2px; }
.mini span { font-size: 12px; color: var(--text-2); } .mini b { font-size: 18px; } .mini em { font-style: normal; font-size: 11.5px; color: var(--text-3); }
.quota { display: grid; grid-template-columns: 90px 70px 40px; gap: 6px; align-items: center; font-size: 11.5px; margin: 2px 0; }
.quota.big { grid-template-columns: 1fr 160px 150px; font-size: 13px; margin: 8px 0; }
.qbar { height: 7px; background: var(--surface-3); border-radius: 4px; overflow: hidden; display: block; }
.qbar i { display: block; height: 100%; border-radius: 4px; }
.chk { display: inline-flex; align-items: center; gap: 6px; padding: 5px 10px; border: 1px solid var(--border); border-radius: 99px; font-size: 13px; cursor: pointer; }
.chk:has(input:checked) { border-color: var(--text); background: var(--surface-2); }
.notif.read { opacity: .55; }
.deliv { display: grid; grid-template-columns: 1.6fr 70px 1.2fr 1fr 34px; gap: 6px; align-items: start; }
.deliv select[multiple] { height: 40px; padding: 2px 6px; font-size: 12px; }

@media (max-width: 1100px) {
  .g4, .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .g3 { grid-template-columns: 1fr; }
  .composer { grid-template-columns: 1fr; } .composer-edit { border-right: 0; } .composer-prev { max-height: none; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { display: none; position: fixed; inset: 0; z-index: 200; width: 280px; box-shadow: var(--shadow-lg); }
  .sidebar.open { display: flex; }
  .mobile-bar { display: flex; align-items: center; gap: 10px; padding: 10px 16px; background: var(--surface); border-bottom: 1px solid var(--border); }
  .page { padding: 18px 16px 48px; }
  .space-head { position: static; }
  .space-head-inner { padding: 14px 16px 0; }
  .g2, .g3 { grid-template-columns: 1fr; } .g4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .span2 { grid-column: auto; }
  .g5 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .cal-d { min-height: 74px; } .chip .txt { display: none; }
  .week { grid-template-columns: 1fr; } .week-col { min-height: 0; }
  .hbar { grid-template-columns: 110px 1fr 50px; }
  .deliv { grid-template-columns: 1fr 70px; }
  .quota.big { grid-template-columns: 1fr; }
  .task-row { flex-wrap: wrap; }
}

/* Content-Eingang */
.steps { display: grid; grid-template-columns: repeat(4, 1fr); padding: 0; overflow: hidden; }
.step { display: flex; flex-direction: column; gap: 2px; padding: 12px 16px; border-right: 1px solid var(--border); font-size: 13px; }
.step:last-child { border-right: 0; }
.step span { color: var(--text-2); font-size: 12px; }
.step.now { background: var(--warn-bg); }
.inbox-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.inbox-card { border: 1px solid var(--border); border-radius: 12px; overflow: hidden; background: var(--surface); display: flex; flex-direction: column; transition: box-shadow .15s, border-color .15s; }
.inbox-card.picked { border-color: var(--text); box-shadow: 0 0 0 2px var(--text); }
.inbox-media { position: relative; display: block; aspect-ratio: 4 / 5; background: var(--surface-3); cursor: pointer; }
.inbox-media img, .inbox-media video { width: 100%; height: 100%; object-fit: cover; display: block; }
.inbox-media .inbox-pick { position: absolute; top: 10px; left: 10px; width: 20px; height: 20px; accent-color: var(--text); }
.inbox-count { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.65); color: #fff; font-size: 11px; padding: 2px 7px; border-radius: 99px; }
.inbox-strip { display: flex; gap: 3px; padding: 3px; background: var(--surface-3); }
.inbox-strip span { flex: 1; aspect-ratio: 1; overflow: hidden; border-radius: 4px; }
.inbox-strip img, .inbox-strip video { width: 100%; height: 100%; object-fit: cover; display: block; }
.qmedia img, .qmedia video { width: 100%; height: 100%; object-fit: cover; display: block; }
@media (max-width: 720px) { .steps { grid-template-columns: 1fr 1fr; } .step:nth-child(2) { border-right: 0; } .step:nth-child(-n+2) { border-bottom: 1px solid var(--border); } .inbox-grid { grid-template-columns: 1fr 1fr; } }

/* Wissen & Stil */
.learn { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; padding-bottom: 12px; border-bottom: 1px solid var(--border); }
.learn > div:first-child .small { color: var(--text-3); text-decoration: line-through; text-decoration-color: color-mix(in srgb, var(--text-3) 50%, transparent); }
.learn .small { white-space: pre-wrap; }

/* Buchhaltung */
.sr { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.pay-table th.c, .pay-table td.c { text-align: center; }
.pay { display: inline-grid; place-items: center; width: 30px; height: 30px; border-radius: 8px; border: 1px solid transparent; font-weight: 700; font-size: 13px; cursor: pointer; background: var(--surface-2); color: var(--text-2); position: relative; }
.pay.mini { width: 20px; height: 20px; font-size: 11px; border-radius: 6px; cursor: default; vertical-align: middle; margin-right: 4px; }
.pay.paid { background: var(--good-bg); color: var(--good); }
.pay.open { background: var(--info-bg); color: var(--info); }
.pay.overdue { background: var(--bad-bg); color: var(--bad); }
.pay.draft { background: var(--warn-bg); color: var(--warn); }
.pay:not(.mini):hover { border-color: var(--border-strong); }
.bars { display: flex; align-items: flex-end; gap: 6px; height: 180px; padding-top: 8px; }
.bar-col { flex: 1; height: 100%; display: flex; flex-direction: column; justify-content: flex-end; align-items: center; gap: 6px; min-width: 0; }
.bar-col .bar { width: 100%; max-width: 28px; background: var(--s1); border-radius: 4px 4px 0 0; min-height: 0; }
.bar-col span { font-size: 11px; color: var(--text-3); }
.bar-col.cur span { color: var(--text); font-weight: 650; }
.bar-col.cur .bar { box-shadow: 0 0 0 2px var(--surface), 0 0 0 4px var(--s1); }
.inv-layout { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(300px, 1fr); gap: 18px; align-items: start; }
.inv-pdf { width: 100%; height: 72vh; border: 1px solid var(--border); border-radius: 10px; background: #fff; }
.inv-sum { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.inv-sum > div { display: flex; flex-direction: column; gap: 2px; padding: 10px 12px; border: 1px solid var(--border); border-radius: 10px; }
.inv-sum b { font-variant-numeric: tabular-nums; }
.inv-item { display: grid; grid-template-columns: minmax(0, 1fr) 54px 64px 96px 30px; gap: 6px; padding: 8px; border: 1px solid var(--border); border-radius: 10px; }
.inv-item textarea { grid-column: 1 / -1; min-height: 52px; font-size: 12.5px; }
.inv-item .input { height: 32px; font-size: 13px; padding: 4px 8px; }
.inv-item textarea.input { height: auto; }
@media (max-width: 900px) { .inv-layout { grid-template-columns: 1fr; } .inv-pdf { height: 55vh; } .learn { grid-template-columns: 1fr; } }
.qpost > .badge, .qpost > .btn { align-self: center; flex: none; }
.pay { padding: 0; line-height: 1; }
.pay.mini { display: inline-flex; align-items: center; justify-content: center; }
.nowrap { white-space: nowrap; }
h1 > svg, h2 > svg, h3 > svg { width: 18px; height: 18px; vertical-align: -3px; margin-right: 4px; }
a.qpost { text-decoration: none; color: inherit; }
.seg a { padding: 6px 12px; border-radius: 7px; color: var(--text-2); font-weight: 550; font-size: 13px; text-decoration: none; }
.seg a.on { background: var(--surface); color: var(--text); box-shadow: var(--shadow); }
.inv-item { grid-template-columns: minmax(0, 1fr) 50px 60px 88px 78px 30px; }
@media (max-width: 900px) { .inv-item { grid-template-columns: 1fr 1fr 1fr; } .inv-item [name=description] { grid-column: 1 / -1; } }
/* Team-Aufgaben & Schnitt-Auftrag */
.tasks-n:empty { display: none; }
.task-row.done { opacity: .6; }
.task-row.done b { text-decoration: line-through; }
.gift-card { background: linear-gradient(135deg, color-mix(in srgb, var(--warn-bg) 70%, var(--surface)), var(--surface)); }
details.brief { border: 1px solid var(--border); border-radius: 10px; padding: 10px 12px; background: var(--surface-2); }
details.brief > summary { cursor: pointer; }
.bcheck { padding: 4px 0; }
.bref a { color: inherit; }

/* Video nach Veröffentlichung vom Server gelöscht (Original im Drive) */
.media-gone { width: 100%; height: 100%; min-height: 64px; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 4px; padding: 6px;
  background: var(--surface-3); color: var(--text-3); font-size: 18px; text-align: center; }
.media-gone span { font-size: 10.5px; line-height: 1.25; }
