/* ============ Kundenportal – Design ============ */
:root {
  --accent: #6d5efc;
  --accent-ink: #fff;
  --accent-soft: color-mix(in srgb, var(--accent) 12%, transparent);
  --accent-line: color-mix(in srgb, var(--accent) 30%, transparent);
  --bg: #f5f5fa;
  --surface: rgba(255, 255, 255, .78);
  --surface-solid: #ffffff;
  --surface-2: #f0f0f6;
  --text: #15152b;
  --muted: #6c6c86;
  --faint: #9d9db3;
  --line: rgba(21, 21, 43, .09);
  --ok: #12a150; --ok-soft: #e3f8ec; --ok-ink: #0c6b36;
  --bad: #e5484d; --bad-soft: #fdecec; --bad-ink: #a51d22;
  --warn: #d98a04; --warn-soft: #fff4dc; --warn-ink: #8a5600;
  --info: #3e63dd; --info-soft: #e8eeff; --info-ink: #2a45a8;
  --radius: 22px; --radius-sm: 14px;
  --shadow: 0 1px 2px rgba(21,21,43,.04), 0 10px 30px -10px rgba(21,21,43,.12);
  --shadow-lg: 0 30px 80px -20px rgba(21,21,43,.35);
  --font: ui-sans-serif, -apple-system, BlinkMacSystemFont, "Inter", "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
  color-scheme: light;
}
:root[data-theme="dark"] { --bg: #0d0d16; --surface: rgba(26, 26, 40, .72); --surface-solid: #181826; --surface-2: #222234;
    --text: #ececf6; --muted: #a0a0ba; --faint: #6f6f8a; --line: rgba(255,255,255,.08);
    --ok-soft: rgba(18,161,80,.16); --ok-ink: #5fd98f; --bad-soft: rgba(229,72,77,.16); --bad-ink: #ff8a8e;
    --warn-soft: rgba(217,138,4,.16); --warn-ink: #ffc24d; --info-soft: rgba(62,99,221,.18); --info-ink: #9db4ff;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -10px rgba(0,0,0,.5);
    color-scheme: dark; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --bg: #0d0d16; --surface: rgba(26, 26, 40, .72); --surface-solid: #181826; --surface-2: #222234;
    --text: #ececf6; --muted: #a0a0ba; --faint: #6f6f8a; --line: rgba(255,255,255,.08);
    --ok-soft: rgba(18,161,80,.16); --ok-ink: #5fd98f; --bad-soft: rgba(229,72,77,.16); --bad-ink: #ff8a8e;
    --warn-soft: rgba(217,138,4,.16); --warn-ink: #ffc24d; --info-soft: rgba(62,99,221,.18); --info-ink: #9db4ff;
    --shadow: 0 1px 2px rgba(0,0,0,.3), 0 10px 30px -10px rgba(0,0,0,.5);
    color-scheme: dark; } }

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: var(--font); color: var(--text); background: var(--bg);
  font-size: 15px; line-height: 1.55; -webkit-font-smoothing: antialiased; min-height: 100vh;
  background-image:
    radial-gradient(900px 500px at 8% -10%, color-mix(in srgb, var(--accent) 16%, transparent), transparent 60%),
    radial-gradient(700px 500px at 100% 0%, color-mix(in srgb, var(--accent) 6%, transparent), transparent 60%);
  background-attachment: fixed;
}
body.noscroll { overflow: hidden; }
a { color: var(--accent); text-decoration: none; }
button, input, textarea, select { font: inherit; color: inherit; }
img, video { display: block; max-width: 100%; }
h1, h2, h3 { line-height: 1.2; letter-spacing: -.02em; margin: 0; }
h1 { font-size: clamp(26px, 4vw, 36px); font-weight: 750; }
h2 { font-size: 20px; font-weight: 700; }
h3 { font-size: 17px; font-weight: 650; }
.muted { color: var(--muted); }
.eyebrow { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; color: var(--accent); margin: 0 0 6px; }
[hidden] { display: none !important; }
svg.i { width: 18px; height: 18px; flex: none; stroke: currentColor; fill: none; stroke-width: 2; stroke-linecap: round; stroke-linejoin: round; }

/* ---------- Grundgerüst ---------- */
.topbar { position: sticky; top: 0; z-index: 20; backdrop-filter: saturate(1.6) blur(16px); -webkit-backdrop-filter: saturate(1.6) blur(16px); background: color-mix(in srgb, var(--bg) 72%, transparent); border-bottom: 1px solid var(--line); }
.topbar-in { max-width: 1180px; margin: 0 auto; padding: 12px 20px; display: flex; align-items: center; gap: 12px; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.brand-mark { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 15px; background: linear-gradient(135deg, var(--accent), color-mix(in srgb, var(--accent) 78%, #000)); box-shadow: 0 6px 16px -6px var(--accent); }
.brand.big .brand-mark { width: 44px; height: 44px; font-size: 20px; border-radius: 14px; }
.spacer { flex: 1; }
.who { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--muted); }
.avatar { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 13px; font-weight: 700; background: var(--accent-soft); color: var(--accent); }
.container { max-width: 1180px; margin: 0 auto; padding: 28px 20px 80px; }
.iconbtn { width: 38px; height: 38px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface); display: grid; place-items: center; cursor: pointer; color: var(--muted); transition: .15s; }
.iconbtn:hover { color: var(--text); background: var(--surface-solid); }

/* ---------- Buttons ---------- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; padding: 10px 16px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-solid); font-weight: 600; font-size: 14px; cursor: pointer; transition: transform .12s, box-shadow .2s, background .2s; white-space: nowrap; }
.btn:hover { box-shadow: var(--shadow); }
.btn:active { transform: scale(.97); }
.btn:disabled { opacity: .55; cursor: not-allowed; transform: none; }
.btn-primary { background: var(--accent); border-color: transparent; color: var(--accent-ink); box-shadow: 0 8px 20px -10px var(--accent); }
.btn-primary:hover { box-shadow: 0 12px 26px -10px var(--accent); }
.btn-ok { background: var(--ok); color: #fff; border-color: transparent; box-shadow: 0 10px 24px -12px var(--ok); }
.btn-bad { background: var(--bad); color: #fff; border-color: transparent; }
.btn-bad-soft { background: var(--bad-soft); color: var(--bad-ink); border-color: transparent; }
.btn-ghost { background: transparent; border-color: transparent; }
.btn-ghost:hover { background: var(--surface-2); box-shadow: none; }
.btn-danger-ghost { background: transparent; border-color: transparent; color: var(--bad-ink); }
.btn-danger-ghost:hover { background: var(--bad-soft); box-shadow: none; }
.btn-lg { padding: 14px 22px; font-size: 15px; border-radius: 14px; }
.btn-sm { padding: 7px 12px; font-size: 13px; border-radius: 10px; }
.btn.loading { pointer-events: none; opacity: .7; }
.btn.loading::after { content: ""; width: 14px; height: 14px; border-radius: 50%; border: 2px solid currentColor; border-right-color: transparent; animation: spin .7s linear infinite; }

/* ---------- Formulare ---------- */
.field { display: flex; flex-direction: column; gap: 6px; }
.field > span, .label { font-size: 13px; font-weight: 600; color: var(--muted); }
input[type=text], input[type=email], input[type=password], input[type=datetime-local], input[type=search], textarea, select {
  width: 100%; padding: 11px 14px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-solid); outline: none; transition: border-color .15s, box-shadow .15s;
}
input:focus, textarea:focus, select:focus { border-color: var(--accent); box-shadow: 0 0 0 4px var(--accent-soft); }
textarea { resize: vertical; min-height: 90px; line-height: 1.5; }
.check { display: flex; align-items: center; gap: 10px; font-size: 14px; cursor: pointer; user-select: none; }
.check input { width: 18px; height: 18px; accent-color: var(--accent); }
.stack { display: flex; flex-direction: column; gap: 14px; }
.row { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
@media (max-width: 640px) { .grid2 { grid-template-columns: 1fr; } }
.counter { font-size: 12px; color: var(--faint); text-align: right; }
.counter.over { color: var(--bad); font-weight: 700; }

/* ---------- Karten & Flächen ---------- */
.glass { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); backdrop-filter: blur(14px); -webkit-backdrop-filter: blur(14px); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: var(--shadow); }
.notice { border-radius: var(--radius-sm); padding: 12px 14px; font-size: 14px; }
.notice.ok { background: var(--ok-soft); color: var(--ok-ink); }
.notice.bad { background: var(--bad-soft); color: var(--bad-ink); }
.notice.info { background: var(--info-soft); color: var(--info-ink); }

/* ---------- Login ---------- */
.auth { min-height: 100vh; display: grid; place-items: center; padding: 24px; }
.auth-card { width: 100%; max-width: 440px; padding: 36px 32px; display: flex; flex-direction: column; gap: 18px; animation: rise .5s cubic-bezier(.2,.8,.2,1); }
.auth-card.center { text-align: center; align-items: center; }
.auth-card h1 { font-size: 28px; }
.auth-foot { margin-top: 6px; font-size: 12px; color: var(--faint); display: flex; gap: 14px; justify-content: center; }
.auth-foot a { color: var(--faint); }
.admin-toggle { border-top: 1px solid var(--line); padding-top: 14px; }
.admin-toggle summary { cursor: pointer; font-size: 13px; color: var(--muted); list-style: none; }
.admin-toggle summary::-webkit-details-marker { display: none; }
.admin-toggle[open] summary { margin-bottom: 14px; }
.hero-icon { width: 72px; height: 72px; border-radius: 22px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.hero-icon svg { width: 34px; height: 34px; }

/* ---------- Kopfbereich & Kennzahlen ---------- */
.hero { display: flex; align-items: flex-end; justify-content: space-between; gap: 20px; flex-wrap: wrap; margin-bottom: 26px; }
.hero p.muted { margin: 8px 0 0; max-width: 640px; }
.hero-actions { display: flex; gap: 10px; flex-wrap: wrap; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 14px; margin-bottom: 34px; }
.stat { padding: 18px 20px; display: flex; align-items: center; gap: 14px; }
.stat .ic { width: 42px; height: 42px; border-radius: 14px; display: grid; place-items: center; background: var(--accent-soft); color: var(--accent); }
.stat.pending .ic { background: var(--warn-soft); color: var(--warn); }
.stat.approved .ic { background: var(--ok-soft); color: var(--ok); }
.stat.rejected .ic { background: var(--bad-soft); color: var(--bad); }
.stat.published .ic { background: var(--info-soft); color: var(--info); }
.stat b { display: block; font-size: 26px; line-height: 1.1; letter-spacing: -.02em; }
.stat span { font-size: 13px; color: var(--muted); }
.section-head { display: flex; align-items: center; justify-content: space-between; gap: 14px; margin-bottom: 16px; flex-wrap: wrap; }
.search { max-width: 280px; }

/* ---------- Kunden-Kacheln ---------- */
.cust-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(280px, 1fr)); gap: 16px; }
.cust { --c: var(--accent); position: relative; display: flex; flex-direction: column; gap: 14px; padding: 20px; color: inherit; overflow: hidden; transition: transform .2s cubic-bezier(.2,.8,.2,1), box-shadow .2s; }
.cust::before { content: ""; position: absolute; inset: 0 0 auto 0; height: 4px; background: var(--c); }
.cust:hover { transform: translateY(-3px); box-shadow: 0 20px 40px -18px color-mix(in srgb, var(--c) 60%, transparent); }
.cust-top { display: flex; align-items: center; gap: 12px; }
.cust-logo { width: 46px; height: 46px; border-radius: 14px; display: grid; place-items: center; color: #fff; font-weight: 800; background: var(--c); font-size: 17px; }
.cust-top h3 { font-size: 16px; }
.cust-top small { color: var(--muted); font-size: 13px; }
.chips { display: flex; gap: 6px; flex-wrap: wrap; }
.mini { font-size: 12px; font-weight: 600; padding: 4px 9px; border-radius: 99px; background: var(--surface-2); color: var(--muted); display: inline-flex; gap: 5px; align-items: center; }
.mini.pending { background: var(--warn-soft); color: var(--warn-ink); }
.mini.approved { background: var(--ok-soft); color: var(--ok-ink); }
.mini.rejected { background: var(--bad-soft); color: var(--bad-ink); }
.mini.published { background: var(--info-soft); color: var(--info-ink); }
.bar { height: 6px; border-radius: 99px; background: var(--surface-2); overflow: hidden; display: flex; }
.bar i { display: block; height: 100%; }
.empty { grid-column: 1 / -1; text-align: center; padding: 56px 20px; color: var(--muted); display: flex; flex-direction: column; align-items: center; gap: 12px; }
.empty .hero-icon { margin-bottom: 4px; }
.empty h3 { color: var(--text); }

/* ---------- Tabs & Filter ---------- */
.cust-head { display: flex; align-items: center; gap: 16px; margin-bottom: 22px; flex-wrap: wrap; }
.cust-head .cust-logo { width: 58px; height: 58px; font-size: 22px; border-radius: 18px; background: var(--accent); }
.tabs { display: inline-flex; gap: 4px; padding: 4px; border-radius: 14px; background: var(--surface); border: 1px solid var(--line); margin-bottom: 22px; }
.tab { padding: 8px 16px; border-radius: 10px; border: 0; background: transparent; font-weight: 600; font-size: 14px; cursor: pointer; color: var(--muted); display: inline-flex; gap: 8px; align-items: center; }
.tab.active { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow); }
.filters { display: flex; gap: 8px; flex-wrap: wrap; margin-bottom: 20px; }
.filter { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: var(--surface); font-size: 13px; font-weight: 600; cursor: pointer; color: var(--muted); display: inline-flex; align-items: center; gap: 7px; transition: .15s; }
.filter b { font-size: 12px; padding: 1px 7px; border-radius: 99px; background: var(--surface-2); color: var(--muted); }
.filter.active { background: var(--text); color: var(--bg); border-color: var(--text); }
.filter.active b { background: color-mix(in srgb, var(--bg) 20%, transparent); color: var(--bg); }

/* ---------- Fokus-Banner (Kunde) ---------- */
.focus { display: flex; align-items: center; gap: 18px; padding: 22px 24px; margin-bottom: 26px; border-radius: var(--radius); color: #fff; position: relative; overflow: hidden;
  background: linear-gradient(120deg, var(--accent), color-mix(in srgb, var(--accent) 80%, #000)); box-shadow: 0 24px 50px -24px var(--accent); }
.focus::after { content: ""; position: absolute; right: -60px; top: -60px; width: 220px; height: 220px; border-radius: 50%; background: rgba(255,255,255,.12); }
.focus .big { font-size: 40px; font-weight: 800; line-height: 1; letter-spacing: -.03em; }
.focus p { margin: 2px 0 0; opacity: .9; }
.focus .btn { margin-left: auto; background: #fff; color: #15152b; border: 0; position: relative; z-index: 1; }
.focus.done { background: linear-gradient(120deg, #12a150, #2bc48a); box-shadow: 0 24px 50px -24px #12a150; }

/* ---------- Beitrags-Karten ---------- */
.feed { display: flex; flex-direction: column; gap: 18px; }
.post { display: grid; grid-template-columns: 340px 1fr; gap: 26px; padding: 22px; animation: rise .4s cubic-bezier(.2,.8,.2,1) both; scroll-margin-top: 90px; }
.post.flash { box-shadow: 0 0 0 3px var(--accent), var(--shadow); }
@media (max-width: 860px) { .post { grid-template-columns: 1fr; } .post-media { max-width: 380px; width: 100%; margin: 0 auto; } }
.post-body { display: flex; flex-direction: column; gap: 12px; min-width: 0; }
.post-meta { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.pill { font-size: 12px; font-weight: 700; padding: 5px 10px; border-radius: 99px; display: inline-flex; align-items: center; gap: 6px; }
.pill::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }
.pill.draft { background: var(--surface-2); color: var(--muted); }
.pill.pending { background: var(--warn-soft); color: var(--warn-ink); }
.pill.pending::before { animation: pulse 1.6s infinite; }
.pill.approved { background: var(--ok-soft); color: var(--ok-ink); }
.pill.rejected { background: var(--bad-soft); color: var(--bad-ink); }
.pill.published { background: var(--info-soft); color: var(--info-ink); }
.tag { font-size: 12px; font-weight: 600; color: var(--muted); padding: 4px 9px; border-radius: 8px; border: 1px solid var(--line); }
.when { display: flex; align-items: center; gap: 8px; color: var(--muted); font-size: 14px; }
.caption { white-space: pre-wrap; word-wrap: break-word; font-size: 15px; line-height: 1.6; background: var(--surface-2); padding: 14px 16px; border-radius: var(--radius-sm); max-height: 220px; overflow: auto; }
.caption.empty-cap { color: var(--faint); font-style: italic; }
.decided { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: var(--radius-sm); font-size: 14px; }
.decided.approved { background: var(--ok-soft); color: var(--ok-ink); }
.decided.rejected { background: var(--bad-soft); color: var(--bad-ink); }
.decided.published { background: var(--info-soft); color: var(--info-ink); }
.decided q { display: block; margin-top: 4px; quotes: none; white-space: pre-wrap; color: var(--text); }
.decide { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; margin-top: auto; }
@media (max-width: 500px) { .decide { grid-template-columns: 1fr; } }
.reject-form { display: flex; flex-direction: column; gap: 10px; padding: 14px; border-radius: var(--radius-sm); background: var(--bad-soft); animation: rise .25s ease both; }
.reject-form label { font-weight: 600; font-size: 14px; color: var(--bad-ink); }
.post-actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: auto; padding-top: 4px; }

/* Verlauf */
.thread { border-top: 1px solid var(--line); padding-top: 12px; }
.thread summary { cursor: pointer; font-size: 14px; font-weight: 600; color: var(--muted); display: flex; align-items: center; gap: 8px; list-style: none; }
.thread summary::-webkit-details-marker { display: none; }
.thread summary .count { font-size: 12px; background: var(--surface-2); padding: 1px 8px; border-radius: 99px; }
.timeline { list-style: none; margin: 14px 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.ev { display: flex; gap: 10px; font-size: 13px; color: var(--muted); align-items: flex-start; }
.ev .dot { width: 26px; height: 26px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); flex: none; }
.ev .dot svg { width: 14px; height: 14px; }
.ev.approved .dot { background: var(--ok-soft); color: var(--ok); }
.ev.rejected .dot { background: var(--bad-soft); color: var(--bad); }
.ev.published .dot { background: var(--info-soft); color: var(--info); }
.ev.submitted .dot, .ev.resubmitted .dot { background: var(--warn-soft); color: var(--warn); }
.ev .ev-body { flex: 1; min-width: 0; padding-top: 3px; }
.ev time { font-size: 12px; color: var(--faint); margin-left: 6px; }
.bubble { margin-top: 6px; padding: 10px 13px; border-radius: 4px 14px 14px 14px; background: var(--surface-2); color: var(--text); white-space: pre-wrap; word-wrap: break-word; font-size: 14px; }
.ev.mine { flex-direction: row-reverse; text-align: right; }
.ev.mine .bubble { border-radius: 14px 4px 14px 14px; background: var(--accent-soft); text-align: left; }
.comment-form { display: flex; gap: 8px; align-items: flex-end; }
.comment-form textarea { min-height: 44px; height: 44px; resize: none; }

/* ---------- Smartphone-Vorschau ---------- */
.phone { background: var(--surface-solid); border: 1px solid var(--line); border-radius: 26px; overflow: hidden; box-shadow: 0 20px 50px -25px rgba(21,21,43,.35); }
.ph-head { display: flex; align-items: center; gap: 10px; padding: 11px 14px; font-size: 13px; }
.ph-avatar { width: 30px; height: 30px; border-radius: 50%; padding: 2px; background: conic-gradient(from 200deg, #feda75, #fa7e1e, #d62976, #962fbf, #4f5bd5, #feda75); }
.ph-avatar span { width: 100%; height: 100%; border-radius: 50%; display: grid; place-items: center; background: var(--accent); color: #fff; font-weight: 800; font-size: 11px; border: 2px solid var(--surface-solid); }
.ph-head b { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ph-media { position: relative; background: #0b0b12; aspect-ratio: 4 / 5; }
.ph-media.tall { aspect-ratio: 9 / 16; }
.ph-track { display: flex; overflow-x: auto; scroll-snap-type: x mandatory; height: 100%; scrollbar-width: none; }
.ph-track::-webkit-scrollbar { display: none; }
.ph-slide { flex: 0 0 100%; height: 100%; scroll-snap-align: center; display: grid; place-items: center; }
.ph-slide img, .ph-slide video { width: 100%; height: 100%; object-fit: cover; }
.ph-slide video { object-fit: contain; background: #000; }
.ph-dots { position: absolute; bottom: 10px; left: 0; right: 0; display: flex; justify-content: center; gap: 5px; pointer-events: none; }
.ph-dots i { width: 6px; height: 6px; border-radius: 50%; background: rgba(255,255,255,.5); transition: .2s; }
.ph-dots i.on { background: #fff; width: 16px; border-radius: 6px; }
.ph-count { position: absolute; top: 10px; right: 10px; background: rgba(0,0,0,.55); color: #fff; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 99px; }
.ph-empty { height: 100%; display: grid; place-items: center; color: #8888a0; font-size: 13px; text-align: center; padding: 20px; }
.ph-empty svg { width: 36px; height: 36px; margin: 0 auto 8px; display: block; opacity: .6; }
.ph-actions { display: flex; gap: 14px; padding: 11px 14px 4px; }
.ph-actions svg { width: 22px; height: 22px; }
.ph-actions .last { margin-left: auto; }
.ph-caption { padding: 4px 14px 14px; font-size: 13px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; max-height: 7.3em; overflow: hidden; -webkit-mask-image: linear-gradient(#000 70%, transparent); mask-image: linear-gradient(#000 70%, transparent); }
.ph-caption.short { -webkit-mask-image: none; mask-image: none; }
.media-tools { display: flex; justify-content: center; gap: 6px; margin-top: 10px; }

/* ---------- Modal ---------- */
.overlay { position: fixed; inset: 0; z-index: 50; background: rgba(10,10,20,.45); backdrop-filter: blur(6px); -webkit-backdrop-filter: blur(6px); display: grid; place-items: center; padding: 20px; animation: fade .2s ease both; overflow-y: auto; }
.overlay.out { animation: fade .18s ease reverse both; }
.modal { width: 100%; max-width: 520px; background: var(--surface-solid); border-radius: 26px; box-shadow: var(--shadow-lg); padding: 26px; animation: pop .3s cubic-bezier(.2,.9,.3,1.2) both; max-height: calc(100vh - 40px); overflow: auto; }
.modal.wide { max-width: 1040px; padding: 0; overflow: hidden; display: flex; }
.modal-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 18px; }
.modal-foot { display: flex; justify-content: flex-end; gap: 10px; flex-wrap: wrap; margin-top: 22px; }
.linkbox { display: flex; gap: 8px; }
.linkbox input { font-size: 13px; font-family: ui-monospace, Menlo, monospace; }

/* ---------- Editor ---------- */
.composer { display: grid; grid-template-columns: 1fr 380px; width: 100%; max-height: calc(100vh - 40px); }
.composer-form { padding: 26px; overflow-y: auto; display: flex; flex-direction: column; gap: 18px; }
.composer-form .modal-head { margin: 0; }
.composer-form .modal-foot { margin-top: 4px; position: sticky; bottom: -26px; background: var(--surface-solid); padding: 14px 0 0; }
.composer-preview { background: var(--surface-2); padding: 26px; overflow-y: auto; border-left: 1px solid var(--line); }
.composer-preview .phone { max-width: 320px; margin: 0 auto; }
@media (max-width: 900px) { .composer { grid-template-columns: 1fr; } .composer-preview { display: none; } }
.drop { border: 2px dashed var(--accent-line); border-radius: 18px; padding: 26px; text-align: center; cursor: pointer; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); background: var(--accent-soft); transition: .15s; }
.drop svg { width: 30px; height: 30px; color: var(--accent); }
.drop b { color: var(--text); }
.drop.over { border-color: var(--accent); transform: scale(1.01); }
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 10px; }
.thumb { position: relative; aspect-ratio: 1; border-radius: 12px; overflow: hidden; background: #0b0b12; }
.thumb img, .thumb video { width: 100%; height: 100%; object-fit: cover; }
.thumb button { position: absolute; top: 5px; right: 5px; width: 24px; height: 24px; border-radius: 50%; border: 0; background: rgba(0,0,0,.6); color: #fff; display: grid; place-items: center; cursor: pointer; }
.thumb button svg { width: 13px; height: 13px; }
.thumb .vid { position: absolute; left: 6px; bottom: 6px; background: rgba(0,0,0,.6); color: #fff; border-radius: 6px; font-size: 11px; padding: 1px 6px; font-weight: 600; }
.seg { display: flex; flex-wrap: wrap; gap: 6px; }
.seg label, .toggles label { cursor: pointer; }
.seg input, .toggles input { position: absolute; opacity: 0; pointer-events: none; }
.seg span, .toggles span { display: inline-flex; align-items: center; gap: 6px; padding: 8px 13px; border-radius: 10px; border: 1px solid var(--line); background: var(--surface-solid); font-size: 13px; font-weight: 600; color: var(--muted); transition: .15s; }
.seg input:checked + span, .toggles input:checked + span { border-color: var(--accent); background: var(--accent-soft); color: var(--accent); }
.seg input:focus-visible + span, .toggles input:focus-visible + span { box-shadow: 0 0 0 3px var(--accent-soft); }
.toggles { display: flex; gap: 6px; flex-wrap: wrap; }
.progress { height: 8px; border-radius: 99px; background: var(--surface-2); overflow: hidden; }
.progress > div { height: 100%; width: 0; background: linear-gradient(90deg, var(--accent), color-mix(in srgb, var(--accent) 80%, #000)); transition: width .2s; }
.progress-label { font-size: 13px; color: var(--muted); }

/* Farbauswahl */
.swatches { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.swatch { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--surface-solid); box-shadow: 0 0 0 1px var(--line); cursor: pointer; padding: 0; }
.swatch.on { box-shadow: 0 0 0 2px var(--text); }
.swatches input[type=color] { width: 34px; height: 34px; border: 0; background: none; padding: 0; cursor: pointer; }

/* Zugänge */
.contacts { display: flex; flex-direction: column; gap: 10px; }
.contact { display: flex; align-items: center; gap: 14px; padding: 14px 16px; flex-wrap: wrap; }
.contact .info { flex: 1; min-width: 200px; }
.contact .info small { color: var(--muted); display: block; font-size: 13px; }
.settings { max-width: 640px; padding: 24px; display: flex; flex-direction: column; gap: 18px; }
.danger-zone { max-width: 640px; margin-top: 18px; padding: 20px 24px; border: 1px solid color-mix(in srgb, var(--bad) 35%, transparent); border-radius: var(--radius); display: flex; justify-content: space-between; align-items: center; gap: 16px; flex-wrap: wrap; }

/* ---------- Toasts & Effekte ---------- */
#toasts { position: fixed; bottom: 20px; left: 50%; transform: translateX(-50%); z-index: 100; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--text); color: var(--bg); padding: 12px 18px; border-radius: 14px; font-size: 14px; font-weight: 600; box-shadow: var(--shadow-lg); animation: rise .3s cubic-bezier(.2,.8,.2,1) both; display: flex; gap: 8px; align-items: center; }
.toast.bad { background: var(--bad); color: #fff; }
.toast.out { animation: fade .3s ease reverse both; }
.confetti { position: fixed; z-index: 90; width: 9px; height: 13px; border-radius: 2px; pointer-events: none; animation: confetti 1.1s cubic-bezier(.2,.7,.4,1) forwards; }
.boot { min-height: 100vh; display: grid; place-items: center; }
.spinner { width: 30px; height: 30px; border-radius: 50%; border: 3px solid var(--accent-soft); border-top-color: var(--accent); animation: spin .8s linear infinite; }
.skeleton { height: 220px; border-radius: var(--radius); background: linear-gradient(90deg, var(--surface) 25%, var(--surface-2) 50%, var(--surface) 75%); background-size: 200% 100%; animation: shimmer 1.2s infinite; }

@keyframes spin { to { transform: rotate(360deg); } }
@keyframes fade { from { opacity: 0; } }
@keyframes rise { from { opacity: 0; transform: translateY(10px); } }
@keyframes pop { from { opacity: 0; transform: translateY(14px) scale(.97); } }
@keyframes pulse { 50% { opacity: .35; } }
@keyframes shimmer { to { background-position: -200% 0; } }
@keyframes confetti { to { transform: translate(var(--dx), var(--dy)) rotate(var(--r)); opacity: 0; } }
@media (prefers-reduced-motion: reduce) { *, *::before, *::after { animation-duration: .01ms !important; transition: none !important; } }
@media (max-width: 640px) {
  .container { padding: 20px 14px 70px; }
  .who-name { display: none; }
  .post { padding: 16px; gap: 18px; }
  .focus { flex-wrap: wrap; padding: 18px; gap: 14px; } .focus .big { font-size: 34px; } .focus .btn { margin-left: 0; width: 100%; }
  .focus > div:nth-child(2) { flex: 1; min-width: 0; }
  .stats { grid-template-columns: repeat(2, 1fr); gap: 10px; margin-bottom: 24px; }
  .stats.three { grid-template-columns: repeat(3, 1fr); }
  .stat { flex-direction: column; align-items: flex-start; gap: 8px; padding: 14px; }
  .stat .ic { width: 34px; height: 34px; border-radius: 11px; }
  .stat b { font-size: 22px; } .stat span { font-size: 12px; line-height: 1.3; display: block; }
  .hero { margin-bottom: 18px; }
  .composer-form { padding: 20px; }
}

/* Passwortfelder */
.pw-wrap { position: relative; }
.pw-wrap input { padding-right: 46px; }
.pw-eye { position: absolute; right: 6px; top: 50%; transform: translateY(-50%); width: 34px; height: 34px; border: 0; background: none; color: var(--faint); cursor: pointer; display: grid; place-items: center; border-radius: 8px; }
.pw-eye:hover { color: var(--text); background: var(--surface-2); }
.strength { display: flex; align-items: center; gap: 5px; margin-top: -6px; }
.strength i { flex: 1; max-width: 48px; height: 5px; border-radius: 99px; background: var(--surface-2); transition: background .2s; }
.strength i.on.s1 { background: var(--bad); }
.strength i.on.s2 { background: var(--warn); }
.strength i.on.s3, .strength i.on.s4 { background: var(--ok); }
.strength span { font-size: 12px; color: var(--muted); margin-left: 6px; }

/* ============ Kalender ============ */
.cal-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
@media (max-width: 1020px) { .cal-layout { grid-template-columns: 1fr; } }
.cal { padding: 18px; }
.cal-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-nav { display: flex; align-items: center; gap: 8px; }
.cal-nav h2 { min-width: 170px; text-align: center; font-size: 19px; }
.check.small { font-size: 13px; color: var(--muted); }
.check.small input { width: 16px; height: 16px; }
.cal-week { display: grid; grid-template-columns: repeat(7, 1fr); gap: 6px; margin-bottom: 6px; }
.cal-week span { font-size: 12px; font-weight: 700; color: var(--faint); text-transform: uppercase; letter-spacing: .06em; padding: 0 8px; }
.cal-grid { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 6px; }
.cal-cell { min-height: 112px; border-radius: 14px; background: var(--surface-solid); border: 1px solid var(--line); padding: 6px; display: flex; flex-direction: column; gap: 4px; cursor: pointer; transition: border-color .15s, box-shadow .15s; min-width: 0; }
.cal-cell:hover { border-color: var(--accent-line); }
.cal-cell.other { background: transparent; opacity: .55; }
.cal-cell.before .num { color: var(--faint); }
.cal-cell.sel { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft); }
.cal-cell .num { font-size: 13px; font-weight: 700; width: 26px; height: 26px; display: grid; place-items: center; border-radius: 50%; color: var(--muted); }
.cal-cell.today .num { background: var(--accent); color: #fff; }
.chips-col { display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.ev-chip { --k: var(--accent); display: block; width: 100%; text-align: left; border: 0; cursor: pointer; font-size: 12px; line-height: 1.3; padding: 4px 7px 5px; border-radius: 8px; color: var(--text);
  background: color-mix(in srgb, var(--k) 14%, var(--surface-solid)); border-left: 3px solid var(--k); overflow: hidden; }
.ev-chip span { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.ev-chip .l1 { font-size: 10.5px; font-weight: 700; color: color-mix(in srgb, var(--k) 80%, var(--text)); }
.ev-chip .l2 { font-weight: 500; }
.ev-chip.post .l1 { color: var(--faint); }
.ev-chip:hover { background: color-mix(in srgb, var(--k) 24%, var(--surface-solid)); }
.ev-chip.past { opacity: .55; }
.ev-chip.post { background: transparent; border: 1px dashed var(--line); border-left: 3px dashed var(--faint); color: var(--muted); }
.ev-chip.post.st-approved { border-left-color: var(--ok); } .ev-chip.post.st-pending { border-left-color: var(--warn); }
.ev-chip.post.st-rejected { border-left-color: var(--bad); } .ev-chip.post.st-published { border-left-color: var(--info); }
.more { border: 0; background: none; font-size: 11px; font-weight: 700; color: var(--accent); text-align: left; padding: 2px 4px; cursor: pointer; }
.dots { display: none; gap: 3px; justify-content: center; margin-top: auto; }
.dots i { width: 6px; height: 6px; border-radius: 50%; background: var(--k, var(--accent)); }
.dots i.p { background: transparent; border: 1.5px solid var(--faint); width: 5px; height: 5px; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 14px; font-size: 12px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 6px; }
.cal-legend i { width: 10px; height: 10px; border-radius: 3px; background: var(--k); }
.cal-legend .leg-post i { background: transparent; border: 1.5px dashed var(--faint); }
.day-panel { margin-top: 12px; padding: 14px; border-radius: 14px; background: var(--surface-2); display: flex; flex-direction: column; gap: 10px; animation: rise .2s ease both; }
.day-list { display: flex; flex-direction: column; gap: 6px; }
.day-list .ev-chip { font-size: 14px; padding: 9px 11px; }
.day-list .ev-chip .l1 { font-size: 12px; }

/* Nächste Termine */
.cal-side { padding: 18px; position: sticky; top: 84px; }
.cal-side h3 { margin-bottom: 12px; }
.up-list { display: flex; flex-direction: column; gap: 8px; }
.up-item { --k: var(--accent); display: flex; gap: 12px; align-items: flex-start; text-align: left; width: 100%; border: 1px solid var(--line); background: var(--surface-solid); border-radius: 14px; padding: 10px; cursor: pointer; transition: .15s; }
.up-item:hover { border-color: var(--k); transform: translateX(2px); }
.up-date { width: 46px; flex: none; border-radius: 11px; background: color-mix(in srgb, var(--k) 14%, transparent); color: var(--k); display: flex; flex-direction: column; align-items: center; padding: 5px 0; }
.up-date b { font-size: 19px; line-height: 1.1; }
.up-date small { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.up-txt { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.up-txt b { font-size: 14px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.up-txt small { font-size: 12px; color: var(--muted); display: flex; align-items: center; gap: 4px; }
.up-txt small svg { width: 12px; height: 12px; }
.up-txt .up-cust { color: var(--k); font-weight: 700; }
.up-empty { text-align: center; color: var(--muted); font-size: 14px; padding: 18px 6px; }
.up-empty svg { width: 30px; height: 30px; color: var(--faint); }

/* Termin-Details & Editor */
.kind-pill { display: inline-flex; gap: 6px; align-items: center; font-size: 12px; font-weight: 700; padding: 5px 11px; border-radius: 99px; background: color-mix(in srgb, var(--k) 14%, transparent); color: var(--k); }
.appt-modal .modal-head { align-items: flex-start; }
.appt-rows { display: flex; flex-direction: column; gap: 14px; }
.appt-rows > div { display: flex; gap: 12px; align-items: flex-start; font-size: 15px; }
.appt-rows > div > svg { margin-top: 2px; color: var(--muted); }
.appt-rows .pre { white-space: pre-wrap; }
.appt-modal .modal-foot .spacer { flex: 1; }
.grid3 { display: grid; grid-template-columns: 1.4fr 1fr 1fr; gap: 12px; }
@media (max-width: 520px) { .grid3 { grid-template-columns: 1fr 1fr; } .grid3 > :first-child { grid-column: 1 / -1; } }
input[type=date], input[type=time] { width: 100%; padding: 11px 12px; border-radius: 12px; border: 1px solid var(--line); background: var(--surface-solid); outline: none; }
select { appearance: auto; }

/* Nächster Termin (Kunde) & Kundenkarten */
.next-appt { --k: var(--accent); display: flex; align-items: center; gap: 14px; padding: 14px 18px; margin-bottom: 18px; color: inherit; border-left: 4px solid var(--k); transition: transform .2s; }
.next-appt:hover { transform: translateY(-2px); }
.na-ico { font-size: 26px; }
.na-txt { display: flex; flex-direction: column; flex: 1; min-width: 0; }
.na-txt small { font-size: 12px; font-weight: 700; color: var(--k); text-transform: uppercase; letter-spacing: .05em; }
.na-txt b { font-size: 16px; }
.na-txt span { font-size: 14px; color: var(--muted); }
.na-go { display: inline-flex; align-items: center; gap: 4px; font-size: 13px; font-weight: 600; color: var(--accent); white-space: nowrap; }
.cust-next { --k: var(--accent); font-size: 13px; color: var(--muted); padding: 7px 10px; border-radius: 10px; background: color-mix(in srgb, var(--k) 10%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.cust-next b { color: var(--text); }

@media (max-width: 720px) {
  .cal { padding: 12px; }
  .cal-nav h2 { min-width: 0; font-size: 17px; }
  .cal-week, .cal-grid { gap: 3px; }
  .cal-week span { padding: 0; text-align: center; font-size: 11px; }
  .cal-cell { min-height: 54px; padding: 4px 2px; align-items: center; border-radius: 10px; }
  .chips-col { display: none; }
  .dots { display: flex; }
  .cal-side { position: static; }
  .na-go { display: none; }
}

/* ============ Auswertung ============ */
:root { --s1: #2a78d6; --s2: #eb6834; --s3: #1baf7a; --s4: #eda100; --s5: #e87ba4; --spark: #c9c8d6; --viz-grid: #ececf2; --viz-base: #d3d3de; }
:root[data-theme="dark"] { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --spark: #4a4a60; --viz-grid: #26263a; --viz-base: #3a3a52; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] { --s1: #3987e5; --s2: #d95926; --s3: #199e70; --s4: #c98500; --s5: #d55181; --spark: #4a4a60; --viz-grid: #26263a; --viz-base: #3a3a52; } }
.an-filters { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 16px; }
.an-filters .spacer { flex: 1; }
.an-filters select { width: auto; padding: 9px 12px; font-size: 14px; }
.seg-tabs { display: inline-flex; gap: 3px; padding: 4px; border-radius: 13px; background: var(--surface); border: 1px solid var(--line); flex-wrap: wrap; }
.seg-tabs button { border: 0; background: transparent; padding: 7px 13px; border-radius: 9px; font-size: 13px; font-weight: 600; color: var(--muted); cursor: pointer; display: inline-flex; align-items: center; gap: 7px; }
.seg-tabs button i { width: 9px; height: 9px; border-radius: 3px; }
.seg-tabs button.on { background: var(--surface-solid); color: var(--text); box-shadow: var(--shadow); }
.an-period { margin: 0 0 12px; font-size: 14px; color: var(--muted); }
.pf-dot { display: inline-block; width: 9px; height: 9px; border-radius: 3px; margin-right: 7px; vertical-align: 0; }

.kpi-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; margin-bottom: 18px; }
.kpi { padding: 16px 18px; display: flex; flex-direction: column; gap: 4px; }
.kpi-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; min-height: 30px; }
.kpi-label { font-size: 13px; font-weight: 600; color: var(--muted); }
.kpi-value { font-size: 32px; font-weight: 750; letter-spacing: -.03em; line-height: 1.1; }
.kpi-delta { font-size: 13px; font-weight: 700; display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; }
.kpi-delta small { font-weight: 500; color: var(--faint); font-size: 12px; }
.kpi-delta.up { color: var(--ok-ink); } .kpi-delta.down { color: var(--bad-ink); } .kpi-delta.flat { color: var(--muted); }
.spark { flex: none; }

.viz-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-bottom: 16px; }
.viz-grid.one { grid-template-columns: 1fr; }
@media (max-width: 900px) { .viz-grid { grid-template-columns: 1fr; } }
.viz-card { padding: 18px 18px 12px; min-width: 0; }
.viz-head { display: flex; justify-content: space-between; align-items: flex-start; gap: 10px; margin-bottom: 10px; }
.viz-head h3 { font-size: 16px; }
.viz-head p { margin: 3px 0 0; font-size: 13px; color: var(--muted); }
.viz-toggle { flex: none; }
.viz { position: relative; }
.viz-box { position: relative; width: 100%; }
.viz svg { display: block; overflow: visible; font-family: var(--font); }
.viz-axis text { font-size: 11px; fill: var(--faint); }
.viz-axis line.grid { stroke: var(--viz-grid); stroke-width: 1; }
.viz-axis line.base { stroke: var(--viz-base); stroke-width: 1; }
.viz-end { font-size: 12px; font-weight: 700; fill: var(--text); }
.viz-label { font-size: 13px; fill: var(--text); }
.viz-ring { stroke: var(--surface-solid); stroke-width: 2; }
.viz-cross { stroke: var(--faint); stroke-width: 1; pointer-events: none; }
.viz-col { outline: none; cursor: default; }
.viz-col path { transition: opacity .12s; }
.viz-box:has(.viz-col.on) .viz-col:not(.on) path { opacity: .45; }
.viz svg rect[tabindex]:focus-visible, .viz-col:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.viz-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: 0 0 10px; font-size: 13px; color: var(--muted); }
.viz-legend > span { display: inline-flex; align-items: center; gap: 7px; }
.viz-legend i.line { width: 16px; height: 3px; border-radius: 2px; }
.viz-legend i.rect { width: 10px; height: 10px; border-radius: 3px; }
.viz-tip { position: absolute; z-index: 5; pointer-events: none; background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow-lg); border-radius: 12px; padding: 9px 12px; min-width: 140px; max-width: 260px; }
.viz-tip-title { font-size: 12px; color: var(--muted); margin-bottom: 5px; font-weight: 600; }
.viz-tip-row { display: flex; align-items: center; gap: 8px; font-size: 13px; line-height: 1.6; }
.viz-tip-row i { width: 12px; height: 3px; border-radius: 2px; flex: none; }
.viz-tip-row b { font-variant-numeric: tabular-nums; color: var(--text); }
.viz-tip-row span { color: var(--muted); }
.viz-tip-row.total { border-top: 1px solid var(--line); margin-top: 4px; padding-top: 4px; }

.tbl-wrap { overflow-x: auto; -webkit-overflow-scrolling: touch; }
.tbl { width: 100%; border-collapse: collapse; font-size: 13px; font-variant-numeric: tabular-nums; }
.tbl th { text-align: left; font-weight: 600; color: var(--muted); padding: 8px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); white-space: nowrap; }
.tbl th:not(:first-child), .tbl td:not(:first-child) { text-align: right; }
.tbl.click tbody tr { cursor: pointer; }
.tbl.click tbody tr:hover { background: var(--surface-2); }
.tbl td:first-child { white-space: normal; min-width: 120px; }
.iconbtn.sm { width: 30px; height: 30px; border-radius: 9px; }
.iconbtn.sm svg { width: 15px; height: 15px; }
.an-admin { padding: 18px; }
.hint { font-size: 11.5px; color: var(--faint); }
.hint.prev { color: var(--accent); font-weight: 600; }
.grid3.metrics { grid-template-columns: repeat(3, 1fr); }
@media (max-width: 520px) {
  .grid3.metrics { grid-template-columns: 1fr 1fr; } .grid3.metrics > :first-child { grid-column: auto; }
  .kpi-grid { grid-template-columns: 1fr 1fr; gap: 10px; }
  .kpi { padding: 13px 14px; }
  .kpi-top .spark { display: none; }
  .kpi-top { min-height: 0; }
  .kpi-value { font-size: 24px; }
  .kpi-delta small { display: none; }
  .viz-card { padding: 14px 12px 10px; }
}

/* Design-Umschalter */
.auth { position: relative; }
.auth-theme { position: absolute; top: 18px; right: 18px; }
.theme-menu { position: absolute; z-index: 60; width: 220px; padding: 6px; border-radius: 16px; background: var(--surface-solid); border: 1px solid var(--line); box-shadow: var(--shadow-lg); -webkit-backdrop-filter: blur(22px) saturate(170%); backdrop-filter: blur(22px) saturate(170%); display: flex; flex-direction: column; gap: 2px; animation: pop .18s ease both; }
.theme-menu button { display: flex; align-items: center; gap: 10px; width: 100%; padding: 9px 10px; border: 0; background: none; border-radius: 10px; font-size: 14px; font-weight: 500; color: var(--text); cursor: pointer; text-align: left; }
.theme-menu button span { flex: 1; }
.theme-menu button:hover { background: var(--surface-2); }
.theme-menu button[aria-checked="true"] { font-weight: 700; }
.theme-menu button[aria-checked="true"] > svg:last-child { color: var(--accent); }

/* ============ Kalender v2 ============ */
.cd-chip { display: inline-flex; align-items: center; font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 99px; background: var(--surface-2); color: var(--muted); white-space: nowrap; }
.cd-chip.soon { background: var(--warn-soft); color: var(--warn-ink); }
.cd-chip.now { background: var(--accent); color: #fff; }
.cd-chip.past { opacity: .7; }
.cal-next { --k: var(--accent); display: grid; grid-template-columns: auto 1fr auto; gap: 22px; align-items: center; padding: 22px 24px; margin-bottom: 14px; border-left: 5px solid var(--k); }
.cal-next.empty-next { grid-template-columns: auto 1fr; border-left-color: var(--line); }
.cn-date { width: 78px; padding: 10px 0; border-radius: 18px; text-align: center; display: flex; flex-direction: column; background: color-mix(in srgb, var(--k) 13%, transparent); color: var(--k); }
.cn-date b { font-size: 34px; line-height: 1.05; letter-spacing: -.02em; }
.cn-date small { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; }
.cn-body { min-width: 0; display: flex; flex-direction: column; gap: 6px; }
.cn-top { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.cn-body h2 { font-size: 22px; }
.cn-meta { display: flex; flex-wrap: wrap; gap: 6px 16px; font-size: 14px; color: var(--muted); }
.cn-meta > * { display: inline-flex; align-items: center; gap: 6px; }
.cn-meta svg { width: 15px; height: 15px; }
.cn-meta a { color: var(--accent); font-weight: 600; }
.cn-notes { margin: 4px 0 0; font-size: 14px; color: var(--text); background: var(--surface-2); padding: 9px 12px; border-radius: 10px; white-space: pre-wrap; }
.cn-actions { display: flex; flex-direction: column; gap: 8px; }
.cal-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 12px; margin-bottom: 18px; }
.cal-stats .cs { padding: 12px 16px; border-radius: 16px; background: var(--surface); border: 1px solid var(--line); display: flex; align-items: baseline; gap: 10px; }
.cal-stats b { font-size: 22px; letter-spacing: -.02em; }
.cal-stats span { font-size: 13px; color: var(--muted); }
.cal-toolbar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 14px; }
.cal-toolbar .spacer { flex: 1; }
.cal-toolbar select { width: auto; padding: 9px 12px; font-size: 14px; }
.seg-tabs button svg { width: 15px; height: 15px; }
/* Liste */
.agenda { padding: 10px 18px 16px; display: flex; flex-direction: column; }
.ag-group { margin: 16px 4px 8px; font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); }
.ag-row { --k: var(--accent); display: flex; align-items: center; gap: 14px; width: 100%; text-align: left; border: 0; background: transparent; padding: 10px 8px; border-radius: 14px; cursor: pointer; color: var(--text); transition: background .15s; }
.ag-row:hover { background: color-mix(in srgb, var(--k) 7%, transparent); }
.ag-row + .ag-row { border-top: 1px solid var(--line); border-radius: 0; }
.ag-row:hover + .ag-row, .ag-row:hover { border-top-color: transparent; }
.ag-row.past { opacity: .6; }
.ag-date { width: 48px; flex: none; display: flex; flex-direction: column; align-items: center; line-height: 1.1; }
.ag-date b { font-size: 22px; }
.ag-date small { font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; }
.ag-bar { width: 4px; align-self: stretch; border-radius: 4px; background: var(--k); flex: none; }
.ag-row.post .ag-bar { background: transparent; border-left: 3px dashed var(--faint); width: 3px; }
.ag-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.ag-main b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ag-meta { display: flex; flex-wrap: wrap; gap: 3px 14px; font-size: 13px; color: var(--muted); }
.ag-meta > span { display: inline-flex; align-items: center; gap: 5px; }
.ag-meta svg { width: 13px; height: 13px; }
.ag-cust { font-weight: 700; color: var(--k) !important; }
.ag-past-toggle { align-self: center; margin-top: 12px; }
.ag-past { margin-top: 6px; }
.day-list .ag-row { background: var(--surface-solid); border-radius: 12px !important; border-top: 0 !important; }
.day-list { gap: 6px; }
/* Monat kompakter */
.cal-cell { min-height: 92px; }
.cal-cell.weekend:not(.other) { background: color-mix(in srgb, var(--surface-2) 70%, transparent); }
.cal-cell:not(.has):not(.today) .num { color: var(--faint); }
.cal-cell.has .num { color: var(--text); }
/* Abo-Dialog */
.sub-opts { display: flex; flex-direction: column; gap: 8px; }
.sub-opt { display: flex; flex-direction: column; gap: 2px; padding: 13px 16px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2); color: var(--text); transition: border-color .15s, transform .12s; }
.sub-opt:hover { border-color: var(--accent); transform: translateX(2px); }
.sub-opt span { font-size: 13px; color: var(--muted); }
.next-appt .cd-chip { margin-left: auto; }
.next-appt .na-go { margin-left: 8px; }
@media (max-width: 720px) {
  .cal-next { grid-template-columns: auto 1fr; padding: 16px; gap: 14px; }
  .cn-actions { grid-column: 1 / -1; flex-direction: row; }
  .cn-actions .btn { flex: 1; }
  .cn-date { width: 62px; } .cn-date b { font-size: 26px; }
  .cn-body h2 { font-size: 18px; }
  .cal-stats { grid-template-columns: repeat(3, 1fr); gap: 8px; }
  .cal-stats .cs { flex-direction: column; gap: 0; padding: 10px 12px; }
  .cal-stats b { font-size: 20px; } .cal-stats span { font-size: 11.5px; line-height: 1.3; }
  .cal-cell { min-height: 50px; }
  .agenda { padding: 6px 10px 12px; }
  .ag-row { gap: 10px; padding: 10px 4px; }
  .ag-row .cd-chip { display: none; }
  #cal-sub { order: 5; }
}

/* ============ Neuigkeiten ============ */
.news-grid { display: grid; grid-template-columns: 1.6fr 1fr; gap: 16px; margin-bottom: 30px; }
@media (max-width: 900px) { .news-grid { grid-template-columns: 1fr; } }
.news-card { padding: 16px 16px 10px; display: flex; flex-direction: column; min-width: 0; }
.news-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin: 0 4px 8px; }
.news-head h3 { display: flex; align-items: center; gap: 8px; font-size: 16px; }
.news-head h3 svg { width: 18px; height: 18px; color: var(--accent); }
.news-feed { display: flex; flex-direction: column; max-height: 330px; overflow-y: auto; }
.news-item, .news-appt { --c: var(--accent); display: flex; align-items: flex-start; gap: 12px; padding: 10px 8px; border-radius: 12px; color: var(--text); position: relative; }
.news-item:hover, .news-appt:hover { background: var(--surface-2); }
.news-item + .news-item, .news-appt + .news-appt { border-top: 1px solid var(--line); }
.ni-ico { width: 32px; height: 32px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--surface-2); color: var(--muted); }
.ni-ico svg { width: 16px; height: 16px; }
.ni-ico.ok { background: var(--ok-soft); color: var(--ok); }
.ni-ico.bad { background: var(--bad-soft); color: var(--bad); }
.ni-ico.msg { background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.ni-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
.ni-quote { font-size: 13px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.ni-txt small { font-size: 12px; color: var(--faint); display: flex; align-items: center; gap: 6px; }
.ni-txt small i { width: 8px; height: 8px; border-radius: 3px; background: var(--c); }
.news-item.new { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.ni-dot { width: 9px; height: 9px; border-radius: 50%; background: var(--accent); margin-top: 6px; flex: none; }
.news-appt { align-items: center; }
.na-day { width: 40px; flex: none; text-align: center; display: flex; flex-direction: column; line-height: 1.1; color: var(--c); }
.na-day b { font-size: 19px; } .na-day small { font-size: 11px; font-weight: 700; text-transform: uppercase; }
.news-empty { display: flex; align-items: center; gap: 10px; padding: 18px 8px; color: var(--muted); font-size: 14px; }
.news-empty svg { color: var(--faint); }
.cust { position: relative; }
.cust-msg { position: absolute; top: 14px; right: 14px; z-index: 3; display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 700; padding: 4px 9px; border-radius: 99px; background: var(--accent); color: #fff; }
.cust-msg svg { width: 13px; height: 13px; }
.color-preview { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin-top: 18px; padding: 16px; border-radius: 14px; background: var(--surface-2); }
.hero-actions .btn svg { width: 18px; height: 18px; }

/* ============ Nachrichten ============ */
.chat { display: flex; flex-direction: column; height: min(72vh, 720px); padding: 0; overflow: hidden; }
.chat-head { display: flex; align-items: center; gap: 12px; padding: 14px 18px; border-bottom: 1px solid var(--line); }
.chat-head small { display: block; font-size: 12px; color: var(--muted); }
.chat-list { flex: 1; overflow-y: auto; padding: 16px 18px; display: flex; flex-direction: column; gap: 2px; scroll-behavior: smooth; }
.chat-day { text-align: center; margin: 14px 0 8px; }
.chat-day span { font-size: 12px; font-weight: 600; color: var(--muted); background: var(--surface-2); padding: 4px 11px; border-radius: 99px; }
.msg { display: flex; flex-direction: column; max-width: min(75%, 560px); margin-top: 10px; }
.msg.grouped { margin-top: 3px; }
.msg.me { align-self: flex-end; align-items: flex-end; }
.msg.them { align-self: flex-start; }
.msg-name { font-size: 12px; font-weight: 600; color: var(--muted); margin: 0 10px 3px; }
.msg-bubble { padding: 10px 14px; border-radius: 18px; font-size: 15px; line-height: 1.45; white-space: pre-wrap; word-wrap: break-word; }
.msg.them .msg-bubble { background: var(--surface-solid); border: 1px solid var(--line); border-bottom-left-radius: 6px; }
.msg.me .msg-bubble { background: var(--accent); color: #fff; border-bottom-right-radius: 6px; }
.msg.grouped.them .msg-bubble { border-top-left-radius: 6px; }
.msg.grouped.me .msg-bubble { border-top-right-radius: 6px; }
.msg-meta { font-size: 11px; color: var(--faint); margin: 3px 8px 0; display: inline-flex; align-items: center; gap: 4px; }
.msg-del { border: 0; background: none; color: var(--faint); cursor: pointer; padding: 0 2px; opacity: 0; transition: opacity .15s; display: inline-grid; }
.msg-del svg { width: 12px; height: 12px; }
.msg:hover .msg-del, .msg-del:focus-visible { opacity: 1; }
.chat-empty { margin: auto; text-align: center; display: flex; flex-direction: column; align-items: center; gap: 6px; color: var(--muted); max-width: 320px; font-size: 14px; }
.chat-empty svg { width: 34px; height: 34px; color: var(--accent); margin-bottom: 4px; }
.chat-empty b { color: var(--text); font-size: 16px; }
.chat-form { display: flex; gap: 10px; align-items: flex-end; padding: 12px 14px 6px; border-top: 1px solid var(--line); }
.chat-form textarea { min-height: 46px; max-height: 180px; resize: none; border-radius: 16px; padding: 12px 14px; }
.chat-form .btn { height: 46px; width: 46px; padding: 0; border-radius: 14px; flex: none; }
.chat-hint { margin: 0; padding: 0 16px 12px; font-size: 11.5px; color: var(--faint); }
@media (max-width: 640px) {
  .chat { height: calc(100vh - 230px); min-height: 420px; }
  .msg { max-width: 86%; }
  .msg-del { opacity: .6; }
  .chat-hint { display: none; }
}

/* Diagrammart-Auswahl & Ring */
.viz-tools { display: flex; gap: 6px; align-items: center; flex: none; }
.viz-type { width: auto; padding: 6px 28px 6px 10px; font-size: 12.5px; border-radius: 10px; }
.viz-donut { display: flex; align-items: center; gap: 24px; flex-wrap: wrap; justify-content: center; padding: 6px 0; }
.viz-donut svg { flex: none; }
.viz-donut-v { font-size: 22px; font-weight: 750; fill: var(--text); }
.viz-donut-l { font-size: 12px; fill: var(--muted); }
.viz-donut-legend { display: flex; flex-direction: column; gap: 8px; min-width: 160px; }
.viz-donut-legend div { display: flex; align-items: center; gap: 8px; font-size: 14px; }
.viz-donut-legend i { width: 10px; height: 10px; border-radius: 3px; flex: none; }
.viz-donut-legend span { flex: 1; color: var(--muted); }
.viz-donut-legend b { font-variant-numeric: tabular-nums; }
.viz-donut .viz-col.on path, .viz-donut .viz-col path { transition: opacity .12s; }
.viz-donut:has(.viz-col.on) .viz-col:not(.on) path { opacity: .35; }
@media (max-width: 520px) { .viz-head { flex-wrap: wrap; } .viz-tools { width: 100%; } .viz-type { flex: 1; } }

/* ============ Dateien ============ */
.files { position: relative; padding: 0; overflow: hidden; }
.files-top { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 16px 18px 12px; flex-wrap: wrap; }
.crumbs { display: flex; align-items: center; gap: 4px; flex-wrap: wrap; min-width: 0; font-size: 15px; }
.crumb { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 6px 8px; border-radius: 9px; color: var(--muted); font-weight: 600; cursor: pointer; max-width: 240px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.crumb:hover { background: var(--surface-2); color: var(--text); }
.crumb.cur { color: var(--text); font-weight: 700; cursor: default; font-size: 17px; }
.crumb svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.crumb-sep svg { width: 14px; height: 14px; color: var(--faint); }
.crumbs .iconbtn.sm { margin-right: 4px; }
.files-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.files-actions svg { width: 16px; height: 16px; }
.files-bar { display: flex; align-items: center; gap: 10px; padding: 0 18px 14px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.files-bar .seg-tabs button b { font-size: 11px; margin-left: 2px; color: var(--muted); }
.files-search { flex: 1; min-width: 180px; padding: 9px 13px !important; font-size: 14px; }
.view-tog button { padding: 7px 10px; }
.files-body { padding: 16px 18px 20px; min-height: 260px; }
.folder-row { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 10px; margin-bottom: 18px; }
.fold { display: flex; align-items: center; gap: 11px; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-solid); color: var(--text); font-weight: 600; font-size: 14px; cursor: pointer; text-align: left; transition: border-color .15s, transform .12s, box-shadow .15s; min-width: 0; }
.fold span:last-child { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.fold:hover { border-color: var(--accent-line); transform: translateY(-1px); box-shadow: var(--shadow); }
.fold-ico { width: 36px; height: 36px; border-radius: 10px; display: grid; place-items: center; flex: none; background: var(--accent-soft); color: var(--accent); }
.fold-ico svg { width: 19px; height: 19px; fill: color-mix(in srgb, var(--accent) 25%, transparent); }
.ftiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(168px, 1fr)); gap: 14px; }
.ftile { --k: var(--accent); display: flex; flex-direction: column; gap: 4px; text-align: left; border: 1px solid var(--line); background: var(--surface-solid); border-radius: 16px; padding: 8px 8px 11px; cursor: pointer; color: var(--text); transition: border-color .15s, transform .12s, box-shadow .15s; min-width: 0; }
.ftile:hover { border-color: color-mix(in srgb, var(--k) 45%, transparent); transform: translateY(-2px); box-shadow: var(--shadow); }
.ft-vis { position: relative; aspect-ratio: 4 / 3; border-radius: 11px; overflow: hidden; display: grid; place-items: center; background: color-mix(in srgb, var(--k) 10%, var(--surface-2)); margin-bottom: 6px; }
.ft-vis img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.k-pdf .ft-vis img, .k-doc .ft-vis img, .k-slides .ft-vis img { object-fit: cover; object-position: top; }
.ft-ico { width: 46px; height: 46px; border-radius: 13px; display: grid; place-items: center; background: color-mix(in srgb, var(--k) 16%, transparent); color: var(--k); }
.ft-ico svg { width: 24px; height: 24px; }
.ft-ico.big { width: 56px; height: 56px; flex: none; } .ft-ico.big svg { width: 28px; height: 28px; }
.ft-play { position: absolute; width: 38px; height: 38px; border-radius: 50%; background: rgba(0, 0, 0, .55); color: #fff; display: grid; place-items: center; backdrop-filter: blur(4px); }
.ft-play svg { width: 16px; height: 16px; fill: #fff; margin-left: 2px; }
.ft-dur { position: absolute; right: 6px; bottom: 6px; background: rgba(0, 0, 0, .6); color: #fff; font-size: 11px; font-weight: 600; padding: 1px 6px; border-radius: 6px; }
.ft-name { font-size: 13.5px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; padding: 0 4px; }
.ft-meta { font-size: 12px; color: var(--muted); padding: 0 4px; }
.frows { display: flex; flex-direction: column; }
.frow { --k: var(--accent); display: grid; grid-template-columns: 40px 1fr 110px 90px 100px; align-items: center; gap: 12px; padding: 8px 8px; border: 0; background: none; border-bottom: 1px solid var(--line); text-align: left; cursor: pointer; color: var(--text); font-size: 14px; border-radius: 0; }
.frow:hover:not(.head) { background: var(--surface-2); }
.frow.head { font-size: 12px; font-weight: 600; color: var(--muted); cursor: default; }
.fr-ico { width: 36px; height: 36px; border-radius: 10px; overflow: hidden; position: relative; display: grid; place-items: center; background: color-mix(in srgb, var(--k) 14%, transparent); color: var(--k); }
.fr-ico svg { width: 18px; height: 18px; } .fr-ico img { position: absolute; inset: 0; width: 100%; height: 100%; object-fit: cover; }
.fr-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-weight: 500; }
.fr-kind, .fr-size, .fr-date { color: var(--muted); font-size: 13px; }
.files-empty { display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 50px 20px; color: var(--muted); text-align: center; font-size: 14px; border: 2px dashed var(--line); border-radius: 18px; }
.files-empty svg { width: 30px; height: 30px; color: var(--accent); }
.files-empty b { color: var(--text); font-size: 16px; }
.files-drop { position: absolute; inset: 8px; border-radius: 18px; border: 2px dashed var(--accent); background: color-mix(in srgb, var(--accent) 12%, var(--surface-solid)); display: grid; place-items: center; z-index: 5; pointer-events: none; }
.files-drop > div { display: flex; flex-direction: column; align-items: center; gap: 4px; color: var(--accent); }
.files-drop svg { width: 36px; height: 36px; } .files-drop b { font-size: 18px; color: var(--text); } .files-drop span { color: var(--muted); font-size: 14px; }
.files-foot { padding: 10px 18px 14px; font-size: 12.5px; color: var(--faint); border-top: 1px solid var(--line); }
.linkish { border: 0; background: none; padding: 0; color: var(--muted); text-decoration: underline; cursor: pointer; font-size: inherit; }
.files-setup { display: flex; gap: 20px; align-items: flex-start; padding: 26px; }
.files-setup h3 { font-size: 19px; margin-bottom: 6px; } .files-setup p { margin: 0 0 14px; max-width: 560px; }
.files-setup code { background: var(--surface-2); padding: 1px 6px; border-radius: 6px; font-size: 12.5px; }
.files-setup .btn svg { width: 18px; height: 18px; }
.files-setup-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 16px; }
.files-option { padding: 24px; display: flex; flex-direction: column; gap: 10px; align-items: flex-start; }
.files-option p { margin: 0 0 6px; } .files-option .linkbox { width: 100%; }
.fsheet { display: flex; gap: 14px; align-items: center; padding: 14px; border-radius: 14px; background: var(--surface-2); }
.fsheet div { display: flex; flex-direction: column; gap: 2px; font-size: 14px; }
/* Upload-Fortschritt */
.upl { position: fixed; right: 20px; bottom: 20px; z-index: 70; width: 320px; max-width: calc(100vw - 32px); background: var(--surface-solid); border: 1px solid var(--line); border-radius: 18px; box-shadow: var(--shadow-lg); padding: 12px 14px; display: flex; flex-direction: column; gap: 8px; animation: rise .25s ease both; }
.upl-head { display: flex; justify-content: space-between; align-items: center; font-size: 14px; }
.upl-item { display: grid; grid-template-columns: 1fr auto; gap: 4px 10px; font-size: 13px; }
.upl-item .progress { grid-column: 1 / -1; height: 5px; }
.upl-item small { grid-column: 1 / -1; color: var(--bad-ink); }
.upl-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.upl-st { color: var(--muted); font-variant-numeric: tabular-nums; display: inline-flex; }
.upl-st svg { width: 15px; height: 15px; }
.upl-item.done .upl-st { color: var(--ok); } .upl-item.err .upl-st { color: var(--bad); }
.upl-item.done .progress > div { background: var(--ok); }
/* Vollbild-Vorschau */
.lightbox { position: fixed; inset: 0; z-index: 80; background: rgba(8, 8, 14, .97); -webkit-backdrop-filter: blur(20px); backdrop-filter: blur(20px); display: flex; flex-direction: column; animation: fade .2s ease both; color: #fff; -webkit-user-select: none; user-select: none; }
.lb-top { display: flex; align-items: center; gap: 8px; padding: 12px 16px; background: linear-gradient(rgba(0, 0, 0, .45), transparent); position: relative; z-index: 2; }
.lb-top .iconbtn { background: rgba(255, 255, 255, .1); border-color: rgba(255, 255, 255, .14); color: #fff; }
.lb-top .iconbtn:hover { background: rgba(255, 255, 255, .2); }
.lb-title { flex: 1; min-width: 0; display: flex; flex-direction: column; line-height: 1.25; }
.lb-name { font-weight: 650; font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.lb-sub { font-size: 12.5px; opacity: .6; }
.lb-count { font-size: 13px; font-weight: 600; opacity: .75; padding: 4px 10px; border-radius: 99px; background: rgba(255, 255, 255, .08); }
.lb-count:empty { display: none; }
/* Bühne: Bild/Video passt immer komplett ins Fenster */
.lb-stage { flex: 1; min-height: 0; position: relative; display: flex; padding: 6px 84px 14px; overflow: hidden; }
.lb-frame { position: relative; width: 100%; height: 100%; display: flex; align-items: center; justify-content: center; animation: lb-in .22s ease both; }
@keyframes lb-in { from { opacity: 0; transform: scale(.985); } }
.lb-frame img, .lb-frame video { display: block; max-width: 100%; max-height: 100%; width: auto; height: auto; object-fit: contain; border-radius: 10px; box-shadow: 0 24px 70px rgba(0, 0, 0, .55); transition: opacity .25s ease; }
.lb-frame img { cursor: zoom-in; }
.lb-frame.loading img { opacity: 0; }
.lb-spin { display: none; position: absolute; width: 34px; height: 34px; border-radius: 50%; border: 3px solid rgba(255, 255, 255, .18); border-top-color: #fff; animation: spin .8s linear infinite; }
.lb-frame.loading .lb-spin { display: block; }
@keyframes spin { to { transform: rotate(360deg); } }
/* Zoom (Originalgröße): frei scrollen / ziehen */
.lightbox.zoomed .lb-stage { overflow: auto; padding: 0; display: block; overscroll-behavior: contain; }
.lightbox.zoomed .lb-frame { width: max-content; height: auto; min-width: 100%; min-height: 100%; animation: none; }
.lightbox.zoomed .lb-frame img { max-width: none; max-height: none; border-radius: 0; box-shadow: none; cursor: grab; }
.lightbox.zoomed .lb-frame img:active { cursor: grabbing; }
.lightbox.zoomed .lb-zoombtn { background: #fff; color: #111; }
.lightbox.zoomed .lb-nav, .lightbox.zoomed .lb-strip { display: none; }
/* Blättern */
.lb-nav { position: absolute; top: 50%; transform: translateY(-50%); z-index: 2; width: 48px; height: 48px; border-radius: 50%; border: 1px solid rgba(255, 255, 255, .14); background: rgba(255, 255, 255, .1); color: #fff; display: grid; place-items: center; cursor: pointer; transition: background .15s, transform .15s; }
.lb-nav:hover { background: rgba(255, 255, 255, .22); transform: translateY(-50%) scale(1.06); }
.lb-nav.prev { left: 18px; } .lb-nav.next { right: 18px; }
/* Miniaturleiste */
.lb-strip { display: flex; gap: 8px; justify-content: safe center; overflow-x: auto; padding: 10px 16px 16px; scrollbar-width: none; }
.lb-strip::-webkit-scrollbar { display: none; }
.lb-th { flex: none; width: 58px; height: 58px; border-radius: 10px; overflow: hidden; border: 2px solid transparent; padding: 0; background: rgba(255, 255, 255, .08); color: rgba(255, 255, 255, .7); cursor: pointer; opacity: .55; transition: opacity .15s, border-color .15s, transform .15s; position: relative; display: grid; place-items: center; }
.lb-th:hover { opacity: .9; }
.lb-th.on { opacity: 1; border-color: #fff; transform: translateY(-2px); }
.lb-th img { width: 100%; height: 100%; object-fit: cover; display: block; }
.lb-th svg { width: 22px; height: 22px; }
.lb-th.is-video::after { content: ""; position: absolute; right: 5px; bottom: 5px; border-left: 8px solid #fff; border-top: 5px solid transparent; border-bottom: 5px solid transparent; filter: drop-shadow(0 1px 2px rgba(0,0,0,.6)); }
@media (max-width: 760px) {
  .files-setup-grid { grid-template-columns: 1fr; }
  .frow { grid-template-columns: 40px 1fr 70px; }
  .frow .fr-kind, .frow .fr-date { display: none; }
}
@media (max-width: 640px) {
  .files-top { padding: 14px 14px 10px; }
  .files-actions { width: 100%; }
  .files-actions .btn { flex: 1; }
  .files-actions a.btn { flex-basis: 100%; order: 3; }
  .files-bar { padding: 0 14px 12px; }
  .files-bar .seg-tabs:first-child { width: 100%; flex-wrap: nowrap; overflow-x: auto; }
  .files-bar .seg-tabs:first-child button { flex: 1 0 auto; justify-content: center; }
  .files-body { padding: 14px; }
  .folder-row { grid-template-columns: 1fr 1fr; gap: 8px; }
  .fold { padding: 10px; gap: 8px; font-size: 13px; }
  .fold-ico { width: 30px; height: 30px; }
  .ftiles { grid-template-columns: 1fr 1fr; gap: 10px; }
  .files-setup { flex-direction: column; padding: 20px; }
  .lb-stage { padding: 0 6px 8px; }
  .lb-nav { display: none; }
  .lb-top { padding: 10px 12px; gap: 6px; }
  .lb-zoombtn { display: none; }
  .lb-th { width: 48px; height: 48px; }
  .upl { right: 16px; bottom: 16px; left: 16px; width: auto; }
}

/* Kundenlogo statt Initialen */
.logo-img { width: 100%; height: 100%; object-fit: contain; display: block; border-radius: inherit; }
.has-logo { background: #fff !important; overflow: hidden; padding: 0; box-shadow: inset 0 0 0 1px rgba(20, 20, 50, .08); }
.cust-logo.has-logo .logo-img, .avatar.has-logo .logo-img, .logo-prev.has-logo .logo-img { padding: 12%; }
.ph-avatar span.has-logo .logo-img { padding: 8%; }
.logo-set { display: flex; gap: 16px; align-items: flex-start; }
.logo-prev { flex: none; width: 76px; height: 76px; border-radius: 20px; display: grid; place-items: center; font-size: 26px; font-weight: 800; color: #fff; background: var(--accent); }
.logo-txt { display: flex; flex-direction: column; gap: 10px; min-width: 0; }
.logo-txt p { margin: 0; font-size: 14px; line-height: 1.5; }
.logo-img.fill { object-fit: cover; padding: 0 !important; }
.logo-mode { width: fit-content; }
.has-logo.logo-clear { background: transparent !important; box-shadow: none !important; }
.has-logo.logo-clear .logo-img { padding: 2% !important; }
.ph-avatar span.has-logo.logo-clear { background: var(--surface-solid) !important; }
/* Kopf der Kundenseite: transparentes Logo exakt so hoch wie Überschrift + Name */
.cust-head .cust-logo.logo-clear { display: block; width: auto; height: 68px; min-width: 40px; border-radius: 0; }
.cust-head .cust-logo.logo-clear .logo-img { padding: 0 !important; width: auto; height: 100%; max-width: 180px; object-fit: contain; }

/* Freigabe-Frist */
.due { display: inline-flex; align-items: center; gap: 7px; width: fit-content; margin-top: -4px; padding: 5px 11px; border-radius: 99px; font-size: 13.5px; font-weight: 600;
  color: var(--muted); background: color-mix(in srgb, var(--text) 6%, transparent); }
.due svg { width: 15px; height: 15px; }
.due b { color: var(--text); }
.due.soon { color: var(--warn-ink); background: var(--warn-soft); }
.due.over { color: #fff; background: #dc2626; }
.ph-empty small { display: block; margin-top: 4px; font-size: 11.5px; opacity: .8; }

/* Backup & Speicher */
.sys { gap: 22px; }
.sys-sec { display: flex; flex-direction: column; gap: 12px; }
.sys-sec + .sys-sec { padding-top: 20px; border-top: 1px solid var(--line); }
.sys-sec h3 { margin: 0; font-size: 16px; display: flex; align-items: center; gap: 8px; }
.sys-sec h3 svg { width: 18px; height: 18px; color: var(--accent); }
.sys-sec p { margin: 0; font-size: 14px; line-height: 1.55; }
.sys-state { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; background: color-mix(in srgb, var(--text) 5%, transparent); }
.sys-state i { flex: none; width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; background: var(--muted); }
.sys-state.ok { background: color-mix(in srgb, #16a34a 10%, transparent); } .sys-state.ok i { background: #16a34a; box-shadow: 0 0 0 4px color-mix(in srgb, #16a34a 20%, transparent); }
.sys-state.warn { background: var(--warn-soft); color: var(--warn-ink); } .sys-state.warn i { background: var(--warn); }
.sys-state.bad { background: color-mix(in srgb, #dc2626 10%, transparent); color: var(--bad-ink); } .sys-state.bad i { background: #dc2626; }
.sys-bar { height: 10px; border-radius: 99px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; }
.sys-bar > div { height: 100%; border-radius: inherit; background: var(--accent); }
.sys-bar.warn > div { background: var(--warn); } .sys-bar.bad > div { background: #dc2626; }
.sys-meta { font-size: 13.5px !important; color: var(--muted); }
.sys-meta b { color: var(--text); }
.warn-dot { position: relative; }
.warn-dot::after { content: ""; position: absolute; top: 6px; right: 6px; width: 9px; height: 9px; border-radius: 50%; background: #dc2626; box-shadow: 0 0 0 2px var(--bg); }

/* ============ Monatsbericht ============ */
#report-root { position: fixed; inset: 0; z-index: 150; overflow: auto; background: color-mix(in srgb, var(--bg) 92%, #000 8%); padding: 0 16px 40px; }
html.report-mode body { overflow: hidden; }
html.report-mode .chat-fab { display: none; }
.rp-bar { position: sticky; top: 0; z-index: 2; display: flex; gap: 10px; align-items: center; max-width: 820px; margin: 0 auto; padding: 14px 0; flex-wrap: wrap; }
.rp-bar select { width: auto; }
.rp-page {
  /* Bericht immer hell – unabhängig vom Dunkel-Modus */
  --text: #15152b; --muted: #6c6c86; --faint: #9d9db3; --line: rgba(21, 21, 43, .1); --spark: #c9c8d6; --viz-grid: #ececf2; --viz-base: #d3d3de;
  --ok-ink: #0c6b36; --bad-ink: #a51d22; --surface-solid: #fff;
  color-scheme: light; color: var(--text);
  max-width: 820px; margin: 0 auto; background: #fff; border-radius: 18px; padding: 44px 48px 32px; box-shadow: 0 30px 80px -30px rgba(0, 0, 0, .35);
}
.rp-head { display: flex; justify-content: space-between; align-items: center; gap: 16px; padding-bottom: 18px; border-bottom: 1px solid var(--line); }
.rp-brand { display: flex; align-items: center; gap: 10px; font-weight: 700; }
.rp-cust { display: flex; align-items: center; gap: 10px; font-weight: 600; color: var(--muted); }
.rp-cust img { height: 36px; width: auto; max-width: 140px; object-fit: contain; }
.rp-title { margin: 28px 0 8px; }
.rp-title p { margin: 0; font-size: 13px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; color: var(--accent); }
.rp-title h1 { margin: 4px 0 8px; font-size: 34px; letter-spacing: -.02em; }
.rp-title span { font-size: 13.5px; color: var(--muted); }
.rp-title i, .rp-tbl i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 6px; vertical-align: 1px; }
.rp-page h2 { font-size: 15px; margin: 26px 0 12px; letter-spacing: .01em; }
.rp-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; }
.rp-tile { border: 1px solid var(--line); border-radius: 14px; padding: 12px 14px; display: flex; flex-direction: column; gap: 2px; break-inside: avoid; }
.rp-tile span:first-child { font-size: 12.5px; color: var(--muted); }
.rp-tile b { font-size: 24px; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.rp-d { font-size: 12.5px; font-weight: 700; white-space: nowrap; }
.rp-d.up { color: var(--ok-ink); } .rp-d.down { color: var(--bad-ink); } .rp-d.flat { color: var(--muted); }
.rp-note { font-size: 12px; color: var(--faint); margin: 8px 0 0; }
.rp-tbl { width: 100%; border-collapse: collapse; font-size: 13px; }
.rp-tbl th { text-align: left; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; padding: 8px 10px; border-bottom: 1px solid var(--line); }
.rp-tbl td { padding: 9px 10px; border-bottom: 1px solid var(--line); font-variant-numeric: tabular-nums; }
.rp-tbl td .rp-d { margin-left: 4px; font-size: 11.5px; }
.rp-tbl tr { break-inside: avoid; }
.rp-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 20px; break-inside: avoid; }
.rp-chart { min-height: 200px; }
.rp-chart .viz-tip { display: none !important; }
.rp-foot { display: flex; justify-content: space-between; gap: 12px; margin-top: 32px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 12px; color: var(--faint); }
@media (max-width: 720px) {
  .rp-page { padding: 24px 18px; border-radius: 14px; }
  .rp-title h1 { font-size: 26px; }
  .rp-charts { grid-template-columns: 1fr; }
  .rp-tbl { font-size: 12px; display: block; overflow-x: auto; white-space: nowrap; } .rp-tbl th, .rp-tbl td { padding: 7px 8px; }
  #report-root { overflow-x: hidden; }
  .rp-tiles { grid-template-columns: 1fr 1fr; }
}
@media print {
  @page { size: A4; margin: 12mm; }
  html.report-mode body > *:not(#report-root) { display: none !important; }
  html.report-mode, html.report-mode body { overflow: visible; background: #fff !important; background-image: none !important; }
  #report-root { position: static; overflow: visible; padding: 0; background: #fff; }
  .rp-bar { display: none !important; }
  .rp-page { max-width: none; box-shadow: none; border-radius: 0; padding: 0; }
  .rp-charts { grid-template-columns: 1fr 1fr; }
  .rp-tiles { grid-template-columns: repeat(4, 1fr); }
  * { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}
.rp-sec { break-inside: avoid; } .rp-page h2 { break-after: avoid; }

/* Neuigkeiten: einzeln entfernen */
.ni-del { flex: none; align-self: center; width: 30px; height: 30px; border-radius: 9px; display: grid; place-items: center; color: var(--muted); opacity: 0; cursor: pointer; transition: opacity .15s, background .15s, color .15s; }
.ni-del svg { width: 15px; height: 15px; }
.news-item:hover .ni-del, .ni-del:focus-visible { opacity: 1; }
.ni-del:hover { background: color-mix(in srgb, #dc2626 12%, transparent); color: #dc2626; }
@media (hover: none) { .ni-del { opacity: .7; } }
.news-item.removing { pointer-events: none; }
.news-item.gone { opacity: 0; height: 0 !important; padding-top: 0; padding-bottom: 0; margin: 0; overflow: hidden; transition: opacity .2s, height .25s, padding .25s; border-top-color: transparent; }
.news-foot { margin: 10px 4px 0; font-size: 12px; color: var(--faint); }

/* „Geplant für …“ leicht farbig hervorheben (Kundenfarbe) */
.post-body .when { width: fit-content; padding: 7px 14px 7px 11px; border-radius: 12px; font-size: 14.5px;
  color: color-mix(in srgb, var(--accent) 75%, var(--text));
  background: color-mix(in srgb, var(--accent) 10%, transparent);
  box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 22%, transparent); }
.post-body .when svg { width: 17px; height: 17px; color: var(--accent); }
.post-body .when b { color: var(--text) !important; }
.post-body .due { margin-top: 0; }

/* E-Mail-Einstellungen */
.pref-presets { display: flex; gap: 6px; flex-wrap: wrap; }
.pref-presets button { padding: 8px 14px; border-radius: 99px; border: 1px solid var(--line); background: transparent; color: var(--muted); font: inherit; font-size: 13.5px; font-weight: 600; cursor: pointer; }
.pref-presets button.on { color: var(--text); border-color: color-mix(in srgb, var(--accent) 55%, transparent); background: color-mix(in srgb, var(--accent) 10%, transparent); }
.pref-list { display: flex; flex-direction: column; border: 1px solid var(--line); border-radius: 16px; overflow: hidden; }
.pref { display: flex; align-items: center; justify-content: space-between; gap: 14px; padding: 13px 16px; cursor: pointer; }
.pref + .pref { border-top: 1px solid var(--line); }
.pref > span { display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.pref b { font-size: 14.5px; } .pref small { font-size: 12.5px; color: var(--muted); }
.sw { appearance: none; -webkit-appearance: none; flex: none; width: 44px; height: 26px; border-radius: 99px; margin: 0; position: relative; cursor: pointer;
  background: color-mix(in srgb, var(--text) 18%, transparent); transition: background .18s; }
.sw::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, .25); transition: transform .18s; }
.sw:checked { background: var(--accent); } .sw:checked::after { transform: translateX(18px); }
.sw:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.muted svg { width: 14px; height: 14px; vertical-align: -2px; }
.pref-account { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 12px 14px; border-radius: 14px; background: color-mix(in srgb, var(--text) 4%, transparent); }
.pref-account > span { display: flex; align-items: center; gap: 10px; min-width: 0; }
.pref-account > span > svg { width: 18px; height: 18px; color: var(--accent); flex: none; }
.pref-account > span > span { display: flex; flex-direction: column; min-width: 0; }
.pref-account small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.pref-sum { display: inline-flex; align-items: center; gap: 5px; color: var(--muted); }
.pref-sum svg { width: 13px; height: 13px; }
.contact .info small.pref-sum { display: flex; margin-top: 3px; font-size: 12.5px; }

/* Änderungswunsch beantworten */
.revise { display: flex; flex-direction: column; gap: 12px; padding: 14px; border-radius: 16px; background: var(--bad-soft); border: 1px solid color-mix(in srgb, var(--bad) 22%, transparent); }
.revise-req { display: flex; gap: 10px; align-items: flex-start; color: var(--bad-ink); font-size: 14px; }
.revise-req svg { width: 18px; height: 18px; flex: none; margin-top: 2px; }
.revise-req small { color: var(--muted); font-weight: 500; }
.revise-req q { display: block; margin-top: 4px; quotes: none; white-space: pre-wrap; color: var(--text); font-size: 14.5px; }
.revise textarea { background: var(--surface-solid); }
.decided.revised { background: color-mix(in srgb, var(--accent) 9%, transparent); color: color-mix(in srgb, var(--accent) 70%, var(--text)); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent); }
.decided.revised .rv-was { display: block; margin-top: 3px; font-size: 13px; color: var(--muted); }
.decided.revised q { margin-top: 8px; padding: 10px 12px; border-radius: 10px; background: var(--surface-solid); }
.decided.revised cite { display: block; margin-top: 4px; font-style: normal; font-size: 12.5px; color: var(--muted); }

/* Neu im Portal */
.ann-list { display: flex; flex-direction: column; gap: 10px; }
.ann-item { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--accent) 7%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 14%, transparent); }
.ann-emo { flex: none; width: 44px; height: 44px; border-radius: 13px; display: grid; place-items: center; font-size: 22px; background: var(--surface-solid); box-shadow: 0 2px 8px -4px rgba(0, 0, 0, .2); }
.ann-item b, .ann-row-txt b { font-size: 15px; }
.ann-item p, .ann-row-txt p { margin: 3px 0 0; font-size: 14px; line-height: 1.5; color: var(--muted); }
.ann-item .ann-go { margin: 8px 0 0 -10px; color: var(--accent); }
.ann-item .ann-go svg { width: 15px; height: 15px; }
.ann-modal .eyebrow svg { width: 13px; height: 13px; vertical-align: -2px; }
.ann-admin-list { display: flex; flex-direction: column; gap: 10px; }
.ann-row { display: flex; gap: 14px; align-items: flex-start; padding: 14px; border: 1px solid var(--line); border-radius: 16px; }
.ann-row.draft { border-style: dashed; }
.ann-row.draft .ann-emo { opacity: .6; }
.ann-row-txt { flex: 1; min-width: 0; }
.ann-row-txt small { display: flex; align-items: center; gap: 6px; flex-wrap: wrap; margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.ann-row-act { display: flex; gap: 6px; align-items: center; flex: none; }
.ann-form { padding: 16px; display: flex; flex-direction: column; gap: 12px; margin-bottom: 14px; }
.ann-form-row { display: flex; gap: 12px; }
.ann-emoji { width: 82px; } .ann-emoji input { text-align: center; font-size: 20px; }
@media (max-width: 640px) { .ann-row { flex-wrap: wrap; } .ann-row-act { width: 100%; justify-content: flex-end; } }
.modal.ann-wide { width: min(760px, calc(100vw - 32px)); max-width: none; }
.ann-emoji { flex: none; }
.ann-auto { border: 1px solid var(--line); border-radius: 16px; margin-bottom: 16px; }
.ann-auto b svg { width: 15px; height: 15px; color: var(--accent); vertical-align: -2px; }
.ann-auto-tag { display: inline-block; margin-left: 6px; padding: 2px 8px; border-radius: 99px; font-size: 11px; font-weight: 700; vertical-align: 2px; color: var(--accent); background: color-mix(in srgb, var(--accent) 12%, transparent); }

/* ============ Content-Plan ============ */
.pl-sum { display: flex; gap: 24px; align-items: center; padding: 20px 22px; margin-bottom: 14px; }
.pl-sum-l { flex: 1; min-width: 0; }
.pl-sum h2 { margin: 4px 0 12px; font-size: 21px; letter-spacing: -.01em; }
.pl-prog { display: flex; gap: 3px; height: 10px; border-radius: 99px; overflow: hidden; }
.pl-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin-top: 10px; font-size: 13px; color: var(--muted); }
.pl-legend i { display: inline-block; width: 9px; height: 9px; border-radius: 50%; margin-right: 6px; }
.pl-next { flex: none; min-width: 230px; padding: 14px 18px; border-radius: 16px; display: flex; flex-direction: column; gap: 2px;
  background: color-mix(in srgb, var(--accent) 9%, transparent); box-shadow: inset 0 0 0 1px color-mix(in srgb, var(--accent) 20%, transparent); }
.pl-next small { font-size: 12px; font-weight: 700; letter-spacing: .05em; text-transform: uppercase; color: var(--accent); }
.pl-next b { font-size: 16.5px; } .pl-next span { font-size: 13.5px; color: var(--muted); }
.pl-nav { display: flex; align-items: center; gap: 8px; margin: 0 0 12px; flex-wrap: wrap; }
.pl-hint { margin-left: auto; font-size: 12.5px; color: var(--muted); display: inline-flex; align-items: center; gap: 6px; }
.pl-hint svg { width: 14px; height: 14px; }
.pl-grid { padding: 14px; }
.pl-gh, .pl-gw { display: grid; grid-template-columns: 92px repeat(7, minmax(0, 1fr)); gap: 6px; }
.pl-gh { padding-bottom: 8px; font-size: 12px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; text-align: center; }
.pl-gw { margin-top: 6px; }
.pl-wk { display: flex; flex-direction: column; justify-content: center; padding: 6px 8px; font-size: 12px; color: var(--muted); line-height: 1.35; }
.pl-wk b { font-size: 15px; color: var(--text); }
.pl-wk em { font-style: normal; font-weight: 700; color: var(--accent); }
.pl-wk.now b { color: var(--accent); }
.pl-day { min-height: 120px; border-radius: 14px; padding: 7px; background: color-mix(in srgb, var(--text) 3.5%, transparent); display: flex; flex-direction: column; gap: 5px; min-width: 0; }
.pl-day.past { opacity: .55; }
.pl-day.today { background: color-mix(in srgb, var(--accent) 9%, transparent); box-shadow: inset 0 0 0 1.5px var(--accent); }
.pl-dn { display: flex; justify-content: space-between; font-size: 12px; font-weight: 700; color: var(--muted); }
.pl-day.today .pl-dn { color: var(--accent); }
.pl-it { all: unset; box-sizing: border-box; display: flex; gap: 7px; align-items: flex-start; width: 100%; padding: 6px; border-radius: 11px; cursor: pointer;
  background: var(--surface-solid); box-shadow: 0 1px 3px rgba(20, 20, 50, .08); border-left: 3px solid var(--c); transition: transform .12s, box-shadow .12s; }
.pl-it:hover { transform: translateY(-1px); box-shadow: 0 4px 12px -4px rgba(20, 20, 50, .2); }
.pl-it:focus-visible { outline: 2px solid var(--accent); outline-offset: 2px; }
.pl-it-t { min-width: 0; }
.pl-it-t b { display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; font-size: 12px; line-height: 1.25; }
.pl-it-t small { font-size: 11px; color: var(--muted); }
.pl-pf { display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 2px; vertical-align: 1px; }
.pl-th { flex: none; width: 30px; height: 38px; border-radius: 7px; overflow: hidden; position: relative; background: color-mix(in srgb, var(--text) 8%, transparent); display: block; }
.pl-th img, .pl-th video { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-th.vid b { position: absolute; inset: 0; display: grid; place-items: center; color: #fff; font-size: 10px; text-shadow: 0 1px 3px rgba(0, 0, 0, .6); }
.pl-th.ph { display: grid; place-items: center; color: var(--faint); border: 1.5px dashed color-mix(in srgb, var(--text) 18%, transparent);
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--text) 5%, transparent) 0 5px, transparent 5px 10px); }
.pl-th.ph svg { width: 13px; height: 13px; }
.pl-it.hidden-draft, .pl-row.hidden-draft { border-style: dashed; opacity: .6; box-shadow: none; outline: 1.5px dashed color-mix(in srgb, var(--text) 20%, transparent); outline-offset: -1.5px; }
.pl-ap, .pl-lap { all: unset; box-sizing: border-box; cursor: pointer; font-size: 11px; font-weight: 600; padding: 3px 7px; border-radius: 8px; color: #7e22ce;
  background: color-mix(in srgb, #9333ea 12%, transparent); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; max-width: 100%; }
:root[data-theme="dark"] .pl-ap, :root[data-theme="dark"] .pl-lap { color: #d8b4fe; }
/* Handy: Liste */
.pl-list { display: flex; flex-direction: column; gap: 18px; }
.pl-lwh { display: flex; align-items: baseline; gap: 8px; margin: 0 0 8px 2px; }
.pl-lwh b { font-size: 15px; } .pl-lwh span { font-size: 12.5px; color: var(--muted); }
.pl-lwh em { font-style: normal; font-size: 11px; font-weight: 800; color: #fff; background: var(--accent); padding: 2px 8px; border-radius: 99px; }
.pl-lw { display: flex; flex-direction: column; gap: 8px; }
.pl-lempty { font-size: 13px; color: var(--faint); padding: 2px 4px; } .pl-lempty.big { padding: 26px; text-align: center; }
.pl-lap { padding: 9px 12px; font-size: 13px; border: 1.5px dashed color-mix(in srgb, #9333ea 35%, transparent); background: color-mix(in srgb, #9333ea 5%, transparent); border-radius: 12px; }
.pl-row { all: unset; box-sizing: border-box; cursor: pointer; display: grid; grid-template-columns: 42px 52px minmax(0, 1fr); gap: 12px; align-items: center; padding: 10px; border-radius: 18px; }
.pl-row { background: var(--glass-bg); border: 1px solid var(--glass-line); }
.pl-row.past { opacity: .62; }
.pl-date { text-align: center; line-height: 1.1; } .pl-date small { display: block; font-size: 11px; font-weight: 700; text-transform: uppercase; color: var(--muted); } .pl-date b { font-size: 20px; }
.pl-th.big { width: 52px; height: 66px; border-radius: 11px; }
.pl-mid { display: flex; flex-direction: column; gap: 4px; min-width: 0; }
.pl-mid b { font-size: 14.5px; }
.pl-meta { display: flex; flex-wrap: wrap; gap: 4px 10px; font-size: 12px; color: var(--muted); }
.pl-stp { display: inline-flex; align-items: center; gap: 6px; width: fit-content; font-size: 11.5px; font-weight: 700; padding: 3px 9px; border-radius: 99px; color: var(--c); background: color-mix(in srgb, var(--c) 13%, transparent); }
.pl-stp i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
@media (max-width: 720px) { .pl-sum { flex-direction: column; align-items: stretch; gap: 14px; padding: 16px; } .pl-sum h2 { font-size: 18px; } .pl-next { min-width: 0; } .pl-hint { width: 100%; margin: 4px 0 0; } }

/* ============ Rechte: Bedienelemente ausblenden, die jemand nicht nutzen darf ============ */
body.no-posts #new-post, body.no-posts .post-actions, body.no-posts .pl-feed-hint-admin { display: none !important; }
body.no-calendar #cal-new, body.no-calendar #ad-edit, body.no-calendar #ad-del { display: none !important; }
body.no-analytics #an-add, body.no-analytics #an-post, body.no-analytics .an-admin { display: none !important; }
body.no-files #f-newfolder, body.no-files #f-upload, body.no-files #f-unlink, body.no-files .files-option, body.no-files a[href="/api/drive/connect"], body.no-files #fm-del, body.no-files #fm-more { display: none !important; }
body.no-messages #chat-form, body.no-messages .comment-form { display: none !important; }
body.no-customers #new-cust, body.no-customers .tab[data-tab=settings] { display: none !important; }
body.no-access .tab[data-tab=access] { display: none !important; }
body.no-system #sys-btn, body.no-system #ann-btn, body.no-system #agency-color { display: none !important; }
body.no-team #team-btn { display: none !important; }
body.no-c-comment #chat-form, body.no-c-comment .comment-form, body.no-c-comment .chat-fab { display: none !important; }
body.no-c-files #f-newfolder, body.no-c-files #f-upload { display: none !important; }
body.no-c-analytics .tab[data-tab=auswertung] { display: none !important; }

/* ============ Art: Social-Media-Beitrag / Videoprojekt ============ */
.type-pick { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.type-pick label { cursor: pointer; }
.type-pick input { position: absolute; opacity: 0; pointer-events: none; }
.type-pick label > span { display: grid; grid-template-columns: 22px 1fr; gap: 2px 10px; align-items: center; padding: 12px 14px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface-solid); transition: border-color .15s, background .15s; height: 100%; box-sizing: border-box; }
.type-pick svg { width: 20px; height: 20px; color: var(--muted); grid-row: 1 / 3; }
.type-pick b { font-size: 14.5px; } .type-pick small { grid-column: 2; font-size: 12px; color: var(--muted); line-height: 1.4; }
.type-pick input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 8%, var(--surface-solid)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.type-pick input:checked + span svg { color: var(--accent); }
.type-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
.composer-form .only-video { display: none; }
.composer-form.is-video .only-video { display: inline; }
.composer-form.is-video .only-social { display: none !important; }
@media (max-width: 640px) { .type-pick { grid-template-columns: 1fr; } }
.tag-video { display: inline-flex; align-items: center; gap: 5px; color: var(--accent); background: color-mix(in srgb, var(--accent) 10%, transparent); border-color: transparent; }
.tag-video svg { width: 11px; height: 11px; }
.vproj { --vp-max-h: min(640px, 78vh); width: fit-content; min-width: min(100%, 260px); max-width: 100%; margin-inline: auto; border-radius: 20px; overflow: hidden; background: #0d0d16; box-shadow: var(--shadow); display: flex; flex-direction: column; gap: 2px; }
.vproj.empty { aspect-ratio: 16 / 10; align-items: center; justify-content: center; gap: 10px; color: #9a9ab0; font-size: 14px; }
.vproj.empty svg { width: 34px; height: 34px; }
.vp-item { position: relative; background: #000; }
/* Rahmen passt sich automatisch an das Seitenverhältnis an (9:16, 4:5, 16:9 …) – keine Balken, nichts abgeschnitten */
.vp-item { display: flex; justify-content: center; }
.vp-item video, .vp-item img { display: block; aspect-ratio: var(--ar, 16 / 9); width: calc(var(--vp-max-h) * var(--ar, 1.7778)); max-width: 100%; height: auto; object-fit: contain; background: #000; }
.vproj:has(.vp-item + .vp-item) { width: min(100%, 520px); }
@media (max-width: 640px) { .vproj { --vp-max-h: 72vh; } }
.vp-n { position: absolute; top: 10px; right: 10px; font-size: 12px; font-weight: 700; color: #fff; background: rgba(0, 0, 0, .55); padding: 3px 8px; border-radius: 99px; }
.vp-foot { display: flex; justify-content: space-between; align-items: center; padding: 10px 14px; color: #c9c9da; font-size: 13px; }
.vp-foot span { display: inline-flex; align-items: center; gap: 6px; } .vp-foot svg { width: 13px; height: 13px; }
.vp-foot b { color: #fff; font-size: 12.5px; padding: 3px 9px; border-radius: 99px; background: rgba(255, 255, 255, .12); }
.post:has(.vproj) { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
@media (max-width: 860px) { .post:has(.vproj) { grid-template-columns: 1fr; } .post:has(.vproj) .post-media { max-width: none; } }

/* ============ Team & Rechte ============ */
.who-name small.who-role { display: block; font-size: 11.5px; color: var(--muted); font-weight: 500; line-height: 1.1; }
.team-tabs { margin-bottom: 16px; width: fit-content; }
.team-tabs b { font-size: 11.5px; opacity: .7; margin-left: 4px; }
.tm-list { display: flex; flex-direction: column; gap: 8px; margin-bottom: 16px; }
.tm-row { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border: 1px solid var(--line); border-radius: 16px; flex-wrap: wrap; }
.tm-row.owner { background: color-mix(in srgb, var(--accent) 6%, transparent); }
.tm-row.off { opacity: .55; }
.tm-info { flex: 1; min-width: 180px; display: flex; flex-direction: column; gap: 2px; }
.tm-info small { color: var(--muted); font-size: 12.5px; }
.tm-role { width: auto; min-width: 170px; }
.tm-act { display: flex; gap: 6px; align-items: center; }
.tm-add { padding: 16px; display: flex; flex-direction: column; gap: 12px; }
.tm-add h3 { margin: 0; font-size: 15px; display: flex; align-items: center; gap: 6px; } .tm-add h3 svg { width: 16px; height: 16px; }
.tm-roles { display: flex; flex-direction: column; gap: 10px; }
.tm-role-card { padding: 14px 16px; }
.tm-rh { display: flex; align-items: center; gap: 10px; margin-bottom: 10px; } .tm-rh b { font-size: 15px; } .tm-rh small { color: var(--muted); margin-right: auto; }
.tm-chips { display: flex; flex-wrap: wrap; gap: 6px; }
.tm-chips span { font-size: 12px; padding: 4px 9px; border-radius: 99px; color: var(--faint); background: color-mix(in srgb, var(--text) 4%, transparent); }
.tm-chips span.on { color: var(--ok-ink); background: var(--ok-soft); font-weight: 600; }
.cred { display: grid; grid-template-columns: auto 1fr; gap: 6px 14px; padding: 14px 16px; border-radius: 14px; background: color-mix(in srgb, var(--text) 5%, transparent); font-size: 14px; }
.cred span { color: var(--muted); } .cred b { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; word-break: break-all; }
.acc-mode { width: fit-content; } .acc-mode svg { width: 14px; height: 14px; vertical-align: -2px; }
.pm-sw:disabled { opacity: .4; }
@media (max-width: 640px) { .tm-role { width: 100%; } .tm-act { margin-left: auto; } }

/* ============ Feed-Vorschau ============ */
.pl-views { width: fit-content; margin-bottom: 14px; }
.fd-wrap { display: grid; grid-template-columns: minmax(0, 470px) minmax(0, 1fr); gap: 20px; align-items: start; }
.fd-phone { padding: 18px 0 0; overflow: hidden; }
.fd-prof { display: flex; align-items: center; gap: 18px; padding: 0 20px 14px; }
.fd-av { width: 76px; height: 76px; border-radius: 50%; display: grid; place-items: center; color: #fff; font-weight: 800; font-size: 24px; flex: none; overflow: hidden;
  box-shadow: 0 0 0 3px var(--surface-solid), 0 0 0 5px #d62976; }
.fd-av .logo-img { border-radius: 50%; }
.fd-stats { display: flex; flex-direction: column; gap: 6px; min-width: 0; } .fd-stats > b { font-size: 16px; }
.fd-stats div { display: flex; gap: 14px; font-size: 14px; } .fd-stats div b { font-weight: 800; }
.fd-tabs { display: grid; grid-template-columns: 1fr 1fr; border-top: 1px solid var(--line); }
.fd-tabs span { display: grid; place-items: center; padding: 10px; color: var(--faint); } .fd-tabs span.on { color: var(--text); box-shadow: inset 0 -2px 0 var(--text); }
.fd-tabs svg { width: 20px; height: 20px; }
.fd-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 2px; }
.fd-tile { position: relative; aspect-ratio: 3 / 4; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; cursor: pointer; user-select: none; }
.fd-tile img, .fd-tile video { width: 100%; height: 100%; object-fit: cover; display: block; pointer-events: none; }
.fd-tile.future::after { content: ""; position: absolute; inset: 0; box-shadow: inset 0 0 0 2px color-mix(in srgb, #fff 70%, transparent); pointer-events: none; }
.fd-tile.hidden-draft { opacity: .5; }
.fd-ph { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 6px; padding: 10px; text-align: center; color: var(--muted);
  background: repeating-linear-gradient(45deg, color-mix(in srgb, var(--text) 5%, transparent) 0 8px, transparent 8px 16px); }
.fd-ph svg { width: 20px; height: 20px; } .fd-ph small { font-size: 11px; line-height: 1.3; display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.fd-ic { position: absolute; top: 7px; right: 7px; color: #fff; filter: drop-shadow(0 1px 2px rgba(0, 0, 0, .6)); }
.fd-ic svg { width: 16px; height: 16px; fill: #fff; }
.fd-multi { width: 15px; height: 15px; border: 2px solid #fff; border-radius: 3px; box-shadow: 3px -3px 0 -1px rgba(255, 255, 255, .9); }
.fd-date { position: absolute; left: 6px; bottom: 6px; display: inline-flex; align-items: center; gap: 5px; font-size: 11px; font-weight: 700; color: #fff;
  background: rgba(15, 15, 30, .7); -webkit-backdrop-filter: blur(6px); backdrop-filter: blur(6px); padding: 3px 8px; border-radius: 99px; }
.fd-date i { width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.fd-tile.movable { cursor: grab; }
.fd-tile.dragging { opacity: .35; }
.fd-tile.over, .fd-tile.sel { outline: 3px solid var(--accent); outline-offset: -3px; z-index: 1; }
.fd-tile.sel { transform: scale(.96); transition: transform .12s; }
.fd-empty { padding: 40px 20px; text-align: center; color: var(--muted); }
.fd-side { padding: 18px 20px; display: flex; flex-direction: column; gap: 12px; position: sticky; top: 90px; }
.fd-side h3 { margin: 0; font-size: 16px; display: flex; gap: 8px; align-items: center; } .fd-side h3 svg { width: 18px; height: 18px; color: var(--accent); }
.fd-side p { margin: 0; font-size: 14px; line-height: 1.55; }
.fd-side .notice { display: flex; gap: 8px; font-size: 13.5px; } .fd-side .notice svg { width: 16px; height: 16px; flex: none; margin-top: 2px; }
.fd-legend { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--muted); }
.fd-legend i { display: inline-block; width: 8px; height: 8px; border-radius: 50%; margin-right: 5px; }
@media (max-width: 900px) { .fd-wrap { grid-template-columns: 1fr; } .fd-side { position: static; order: -1; } }
@media (max-width: 640px) { .fd-phone { margin: 0 -4px; } .fd-prof { padding: 0 14px 12px; } .fd-av { width: 64px; height: 64px; } }
/* Videoprojekt abgeschlossen: lila */
.pill.done { background: color-mix(in srgb, #9333ea 13%, transparent); color: #7e22ce; }
.pill.done::before { background: #9333ea; }
.decided.done { background: color-mix(in srgb, #9333ea 10%, transparent); color: #7e22ce; }
:root[data-theme="dark"] .pill.done, :root[data-theme="dark"] .decided.done { color: #d8b4fe; }

/* ============ Text-Editor (Emojis, Fett, Unterstrichen, Größe, Farbe) ============ */
.fc-red { color: #dc2626; } .fc-orange { color: #ea580c; } .fc-green { color: #16a34a; } .fc-blue { color: #2563eb; } .fc-purple { color: #9333ea; } .fc-gray { color: #6b7280; }
:root[data-theme="dark"] .fc-red { color: #f87171; } :root[data-theme="dark"] .fc-orange { color: #fb923c; } :root[data-theme="dark"] .fc-green { color: #4ade80; }
:root[data-theme="dark"] .fc-blue { color: #60a5fa; } :root[data-theme="dark"] .fc-purple { color: #c084fc; } :root[data-theme="dark"] .fc-gray { color: #9ca3af; }
.fs-l { font-size: 1.25em; line-height: 1.35; } .fs-s { font-size: .85em; }
.rt { position: relative; display: flex; flex-direction: column; border: 1px solid var(--glass-line, var(--line)); border-radius: 14px; background: var(--glass-bg-strong, var(--surface-solid)); transition: border-color .15s, box-shadow .15s; min-width: 0; }
.rt.rt-on { border-color: color-mix(in srgb, var(--accent) 60%, transparent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 15%, transparent); }
.rt-bar { display: flex; align-items: center; gap: 2px; padding: 4px 6px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.rt-fmt { display: contents; }
.rt-bar button { all: unset; box-sizing: border-box; cursor: pointer; min-width: 30px; height: 28px; padding: 0 6px; border-radius: 8px; display: inline-grid; place-items: center; color: var(--text); }
.rt-bar button:hover, .rt-bar button.open { background: color-mix(in srgb, var(--text) 8%, transparent); }
.rt-bar button:focus-visible { outline: 2px solid var(--accent); }
.rt-sep { width: 1px; height: 18px; background: var(--line); margin: 0 4px; }
.rt-cdot { width: 14px; height: 14px; border-radius: 50%; background: conic-gradient(#dc2626, #ea580c, #16a34a, #2563eb, #9333ea, #dc2626); }
.rt-hint { margin-left: auto; font-size: 11.5px; color: var(--faint); padding-right: 4px; }
.rt-ed { padding: 10px 12px; outline: none; white-space: pre-wrap; word-break: break-word; line-height: 1.5; font-size: 15px; max-height: 320px; overflow-y: auto; cursor: text; }
.rt-ed:empty::before { content: attr(data-ph); color: var(--faint); pointer-events: none; }
.rt-pop { position: absolute; top: 40px; z-index: 30; background: var(--surface-solid); border: 1px solid var(--line); border-radius: 14px; box-shadow: var(--shadow-lg); padding: 6px; animation: pop .15s ease both; }
.rt-list { display: flex; flex-direction: column; min-width: 120px; }
.rt-list button { all: unset; cursor: pointer; padding: 7px 10px; border-radius: 8px; } .rt-list button:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.rt-colors { display: flex; align-items: center; gap: 4px; }
.rt-colors button { all: unset; cursor: pointer; width: 30px; height: 30px; display: grid; place-items: center; border-radius: 8px; } .rt-colors button:hover { background: color-mix(in srgb, var(--text) 7%, transparent); }
.rt-colors i { width: 18px; height: 18px; border-radius: 50%; }
.fcb-red { background: #dc2626; } .fcb-orange { background: #ea580c; } .fcb-green { background: #16a34a; } .fcb-blue { background: #2563eb; } .fcb-purple { background: #9333ea; } .fcb-gray { background: #6b7280; }
.rt-colors .rt-nocol { width: auto; padding: 0 8px; font-size: 12.5px; color: var(--muted); }
.rt-emo { width: min(330px, calc(100vw - 48px)); }
.rt-emo-tabs { display: flex; gap: 2px; border-bottom: 1px solid var(--line); padding-bottom: 4px; margin-bottom: 4px; }
.rt-emo-tabs button { all: unset; cursor: pointer; flex: 1; text-align: center; padding: 4px 0; border-radius: 8px; font-size: 17px; opacity: .55; } .rt-emo-tabs button.on { opacity: 1; background: color-mix(in srgb, var(--text) 7%, transparent); }
.rt-emo-body { max-height: 230px; overflow-y: auto; }
.rt-emo-cat small { display: block; font-size: 11px; font-weight: 700; color: var(--muted); text-transform: uppercase; letter-spacing: .05em; padding: 6px 4px 2px; }
.rt-emo-cat div { display: grid; grid-template-columns: repeat(8, 1fr); }
.rt-emo-cat button { all: unset; cursor: pointer; text-align: center; font-size: 21px; padding: 4px 0; border-radius: 8px; } .rt-emo-cat button:hover { background: color-mix(in srgb, var(--text) 8%, transparent); transform: scale(1.12); }
/* Social-Beitragstext: nur Emojis (Plattformen übernehmen keine Formatierung) */
.composer-form:not(.is-video) .rt-caption .rt-fmt { display: none; }
.composer-form.is-video .rt-caption .rt-hint { display: none; }
/* Kompakte Varianten */
.chat-form { align-items: flex-end; }
.chat-form .rt { flex: 1; }
.chat-form .rt-ed { max-height: 180px; min-height: 0 !important; padding: 9px 12px; }
.comment-form .rt { flex: 1; } .comment-form { align-items: flex-end; }
.comment-form .rt-ed { min-height: 2.6em !important; }
.msg-bubble, .bubble, .caption, .decided q, .revise-req q { white-space: pre-wrap; }
@media (max-width: 640px) { .rt-hint { display: none; } .rt-bar button { min-width: 34px; height: 32px; } }
@media (prefers-color-scheme: dark) {
  :root[data-theme="auto"] .fc-red { color: #f87171; } :root[data-theme="auto"] .fc-orange { color: #fb923c; } :root[data-theme="auto"] .fc-green { color: #4ade80; }
  :root[data-theme="auto"] .fc-blue { color: #60a5fa; } :root[data-theme="auto"] .fc-purple { color: #c084fc; } :root[data-theme="auto"] .fc-gray { color: #9ca3af; }
}
/* Farbige Schrift in eigenen (farbigen) Chat-Blasen lesbar halten */
.msg.me .msg-bubble [class^="fc-"] { background: rgba(255, 255, 255, .94); border-radius: 5px; padding: 0 4px; -webkit-box-decoration-break: clone; box-decoration-break: clone; }
:root .msg.me .msg-bubble .fc-red { color: #dc2626; } :root .msg.me .msg-bubble .fc-orange { color: #ea580c; } :root .msg.me .msg-bubble .fc-green { color: #16a34a; }
:root .msg.me .msg-bubble .fc-blue { color: #2563eb; } :root .msg.me .msg-bubble .fc-purple { color: #9333ea; } :root .msg.me .msg-bubble .fc-gray { color: #4b5563; }
.rt-pop { background: color-mix(in srgb, var(--bg) 97%, transparent); -webkit-backdrop-filter: blur(18px); backdrop-filter: blur(18px); }
/* Leistung je Kunde */
.svc-pick { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 8px; }
.svc-pick label { cursor: pointer; }
.svc-pick input { position: absolute; opacity: 0; pointer-events: none; }
.svc-pick span { display: flex; flex-direction: column; gap: 2px; height: 100%; padding: 11px 13px; border-radius: 14px; border: 1.5px solid var(--line); background: var(--surface); transition: border-color .15s, background .15s, box-shadow .15s; }
.svc-pick b { font-size: 14px; } .svc-pick small { font-size: 12.5px; color: var(--muted); line-height: 1.35; }
.svc-pick label:hover span { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.svc-pick input:checked + span { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 9%, var(--surface)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--accent) 14%, transparent); }
.svc-pick input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 2px; }
@media (max-width: 640px) { .svc-pick { grid-template-columns: 1fr; } }
.cust-svc { display: inline-block; margin-left: 4px; padding: 1px 7px; border-radius: 99px; font-size: 11px; font-weight: 650; color: #7c3aed; background: color-mix(in srgb, #7c3aed 12%, transparent); vertical-align: 1px; }
/* Manuelle Erinnerung */
.btn-remind { color: var(--warn-ink, #b45309); border-color: color-mix(in srgb, #f59e0b 45%, var(--line)); background: color-mix(in srgb, #f59e0b 10%, var(--surface)); }
.btn-remind:hover { background: color-mix(in srgb, #f59e0b 18%, var(--surface)); }
.remind-last { display: flex; align-items: center; gap: 6px; margin: 0 0 8px; font-size: 12.5px; color: var(--muted); }
.remind-last svg { width: 13px; height: 13px; }
.remind .modal-head h2 { display: flex; align-items: center; gap: 8px; } .remind .modal-head h2 svg { width: 20px; height: 20px; color: #d97706; }
.rm-post { display: flex; flex-direction: column; gap: 2px; padding: 12px 14px; border-radius: 14px; background: var(--surface-2, rgba(0,0,0,.03)); border: 1px solid var(--line); }
.rm-post span { font-size: 13px; }
.rm-people { display: flex; flex-direction: column; gap: 6px; }
.rm-person { display: flex; align-items: center; gap: 10px; padding: 9px 12px; border-radius: 12px; border: 1px solid var(--line); cursor: pointer; background: var(--surface); }
.rm-person:has(input:checked) { border-color: var(--accent); background: color-mix(in srgb, var(--accent) 7%, var(--surface)); }
.rm-person input { width: 18px; height: 18px; accent-color: var(--accent); flex: none; }
.rm-person .dot { width: 32px; height: 32px; border-radius: 50%; display: grid; place-items: center; font-size: 12px; font-weight: 700; background: color-mix(in srgb, var(--accent) 16%, transparent); color: var(--accent); flex: none; }
.rm-person span:last-child { display: flex; flex-direction: column; min-width: 0; } .rm-person small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; }
.rm-prev { border: 1px solid var(--line); border-radius: 14px; overflow: hidden; }
.rm-prev summary { cursor: pointer; padding: 10px 14px; font-weight: 600; font-size: 14px; display: flex; align-items: center; gap: 8px; } .rm-prev summary svg { width: 16px; height: 16px; }
.rm-subj { padding: 0 14px 10px; font-size: 13.5px; }
.rm-prev iframe { display: block; width: 100%; height: 420px; border: 0; border-top: 1px solid var(--line); background: #f4f4f9; }
.modal.rm-modal { width: min(640px, calc(100vw - 32px)); max-width: none; }

/* ================= Tickets (intern) ================= */
.tk-head { display: flex; gap: 10px; align-items: stretch; margin-bottom: 14px; flex-wrap: wrap; }
.tk-quick { flex: 1; min-width: 260px; display: flex; align-items: center; gap: 8px; padding: 6px 6px 6px 14px; margin: 0; }
.tk-quick input { flex: 1; min-width: 0; border: 0; background: transparent; box-shadow: none; padding: 8px 0; font-size: 15px; outline: none; }
.tk-quick select { width: auto; padding: 6px 28px 6px 10px; font-size: 13px; border-radius: 10px; }
.tk-q-ic { color: var(--accent); display: grid; } .tk-q-ic svg { width: 18px; height: 18px; }
.tk-sums { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 8px; margin-bottom: 14px; }
.tk-sum { all: unset; box-sizing: border-box; cursor: pointer; display: flex; flex-direction: column; gap: 2px; padding: 11px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface); transition: border-color .15s, transform .15s, box-shadow .15s; --k: var(--accent); }
.tk-sum b { font-size: 22px; line-height: 1.1; color: var(--k); } .tk-sum span { font-size: 12.5px; color: var(--muted); font-weight: 600; }
.tk-sum:hover:not([disabled]) { transform: translateY(-1px); border-color: color-mix(in srgb, var(--k) 40%, var(--line)); }
.tk-sum.on { border-color: var(--k); box-shadow: 0 0 0 3px color-mix(in srgb, var(--k) 15%, transparent); background: color-mix(in srgb, var(--k) 7%, var(--surface)); }
.tk-sum[disabled] { opacity: .55; cursor: default; } .tk-sum[disabled] b { color: var(--muted); }
.tk-sum.all { --k: var(--text); } .tk-sum.mine { --k: #7c3aed; } .tk-sum.urgent { --k: #dc2626; } .tk-sum.overdue { --k: #ea580c; } .tk-sum.unread { --k: #2563eb; }
.tk-bar { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.tk-bar select { width: auto; padding: 8px 30px 8px 12px; font-size: 13.5px; }
.tk-bar .search { max-width: 220px; }
.tk-bar .spacer { flex: 1; }
/* Board */
.tk-board { display: grid; grid-template-columns: repeat(4, minmax(240px, 1fr)); gap: 12px; align-items: start; }
.tk-col { border-radius: 18px; background: color-mix(in srgb, var(--s) 6%, var(--surface)); border: 1px solid color-mix(in srgb, var(--s) 18%, var(--line)); padding: 10px; min-height: 160px; transition: box-shadow .15s, background .15s; }
.tk-col.over { box-shadow: 0 0 0 3px color-mix(in srgb, var(--s) 35%, transparent); background: color-mix(in srgb, var(--s) 12%, var(--surface)); }
.tk-col header { display: flex; align-items: center; gap: 8px; padding: 4px 6px 10px; font-size: 14px; }
.tk-col header i { width: 9px; height: 9px; border-radius: 50%; background: var(--s); }
.tk-col header span { margin-left: auto; font-size: 12px; font-weight: 700; color: var(--muted); background: var(--surface); border-radius: 99px; padding: 1px 8px; }
.tk-drop { display: flex; flex-direction: column; gap: 8px; min-height: 60px; }
.tk-empty { margin: 0; padding: 18px 8px; text-align: center; font-size: 13px; color: var(--faint); border: 1.5px dashed var(--line); border-radius: 12px; }
.tk-card { position: relative; background: var(--surface-solid, var(--surface)); border: 1px solid var(--line); border-left: 4px solid var(--p); border-radius: 14px; padding: 10px 12px; cursor: pointer; box-shadow: 0 1px 2px rgba(0,0,0,.04); transition: transform .12s, box-shadow .12s; display: flex; flex-direction: column; gap: 6px; }
.tk-card:hover, .tk-card:focus-visible { transform: translateY(-1px); box-shadow: 0 8px 20px -10px rgba(0,0,0,.25); outline: none; }
.tk-card.dragging { opacity: .45; }
.tk-card h4 { margin: 0; font-size: 14.5px; line-height: 1.35; word-break: break-word; }
.tk-c-top { display: flex; align-items: center; gap: 6px; font-size: 11.5px; }
.tk-prio { font-weight: 700; color: var(--p); background: color-mix(in srgb, var(--p) 12%, transparent); padding: 1px 7px; border-radius: 99px; }
.tk-no { color: var(--faint); font-weight: 600; font-size: 12px; }
.tk-c-top .tk-no { margin-left: auto; }
.tk-new { font-style: normal; font-size: 10.5px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: #2563eb; padding: 1px 6px; border-radius: 99px; margin-right: 4px; }
.tk-cust { align-self: flex-start; font-size: 11.5px; font-weight: 650; color: var(--c); background: color-mix(in srgb, var(--c) 12%, transparent); padding: 1px 8px; border-radius: 99px; }
.tk-last, .tk-desc { margin: 0; font-size: 12.5px; line-height: 1.45; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 3; -webkit-box-orient: vertical; overflow: hidden; }
.tk-last.tone { color: var(--text); background: color-mix(in srgb, var(--t) 10%, transparent); border-left: 3px solid var(--t); padding: 5px 8px; border-radius: 8px; }
.tk-last b { color: var(--text); font-weight: 650; }
.tk-c-foot { display: flex; align-items: center; gap: 10px; font-size: 12px; color: var(--muted); flex-wrap: wrap; }
.tk-c-foot > span { display: inline-flex; align-items: center; gap: 4px; } .tk-c-foot svg, .tk-due svg { width: 13px; height: 13px; }
.tk-c-foot .spacer { flex: 1; }
.tk-due { display: inline-flex; align-items: center; gap: 4px; font-size: 12px; font-weight: 600; color: var(--muted); }
.tk-due.today { color: #d97706; } .tk-due.over { color: #dc2626; }
.tk-chk.all { color: #16a34a; }
.tk-av { --h: 220; width: 26px; height: 26px; flex: none; border-radius: 50%; display: inline-grid !important; place-items: center; font-size: 10.5px; font-weight: 750; color: hsl(var(--h) 60% 35%); background: hsl(var(--h) 75% 90%); }
.tk-av.none { color: var(--faint); background: color-mix(in srgb, var(--text) 6%, transparent); }
:root[data-theme="dark"] .tk-av:not(.none) { color: hsl(var(--h) 80% 80%); background: hsl(var(--h) 40% 25%); }
.tk-more-done { align-self: center; }
/* Liste */
.tk-list { padding: 6px; display: flex; flex-direction: column; }
.tk-row { all: unset; box-sizing: border-box; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; }
.tk-row + .tk-row { border-top: 1px solid var(--line); }
.tk-row:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.tk-row-prio { width: 10px; height: 10px; border-radius: 50%; background: var(--p); flex: none; box-shadow: 0 0 0 3px color-mix(in srgb, var(--p) 20%, transparent); }
.tk-row-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.tk-row-t { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; font-size: 14.5px; }
.tk-row-main small { color: var(--muted); font-size: 12.5px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.tk-st { font-size: 12px; font-weight: 700; color: var(--s); background: color-mix(in srgb, var(--s) 12%, transparent); padding: 2px 9px; border-radius: 99px; white-space: nowrap; }
.tk-toggle-done { align-self: center; margin: 6px; }
.mini.tk-mini { display: inline-flex; align-items: center; gap: 4px; color: #7c3aed; background: color-mix(in srgb, #7c3aed 10%, transparent); } .mini.tk-mini svg { width: 12px; height: 12px; }
/* Detail */
.modal.tk-modal { width: min(1040px, calc(100vw - 32px)); max-width: none; border-top: 5px solid var(--p, var(--accent)); }
.modal.tk-modal-new { width: min(680px, calc(100vw - 32px)); max-width: none; }
.tk-d-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; }
.tk-d-meta { display: flex; gap: 10px; align-items: baseline; font-size: 13px; }
.tk-d-meta .tk-no { font-size: 14px; }
.tk-title-in { width: 100%; font-size: 22px; font-weight: 750; letter-spacing: -.01em; border: 1px solid transparent; background: transparent; box-shadow: none; padding: 6px 8px; margin: 4px 0 12px -8px; border-radius: 10px; }
.tk-title-in:hover { border-color: var(--line); } .tk-title-in:focus { border-color: var(--accent); background: var(--surface); }
.tk-d-grid { display: grid; grid-template-columns: minmax(0, 1fr) 260px; gap: 22px; }
.tk-d-main { display: flex; flex-direction: column; gap: 18px; min-width: 0; }
.tk-sec h4 { display: flex; align-items: center; gap: 8px; margin: 0 0 8px; font-size: 13px; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); }
.tk-sec h4 .btn { margin-left: auto; text-transform: none; letter-spacing: 0; }
.tk-body-txt { white-space: pre-wrap; line-height: 1.55; font-size: 15px; word-break: break-word; }
.tk-progress { height: 6px; border-radius: 99px; background: color-mix(in srgb, var(--text) 8%, transparent); overflow: hidden; margin-bottom: 8px; }
.tk-progress i { display: block; height: 100%; background: #16a34a; border-radius: inherit; transition: width .3s; }
.tk-checks { list-style: none; margin: 0 0 8px; padding: 0; display: flex; flex-direction: column; gap: 2px; }
.tk-checks li { display: flex; align-items: center; gap: 6px; padding: 4px 6px; border-radius: 10px; }
.tk-checks li:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.tk-checks label { flex: 1; display: flex; align-items: center; gap: 10px; cursor: pointer; font-size: 14.5px; }
.tk-checks input { width: 18px; height: 18px; accent-color: #16a34a; flex: none; }
.tk-checks li.done span { text-decoration: line-through; color: var(--muted); }
.tk-checks .iconbtn { opacity: 0; } .tk-checks li:hover .iconbtn, .tk-checks .iconbtn:focus { opacity: 1; }
.tk-add-check { display: flex; gap: 6px; } .tk-add-check input { flex: 1; }
.tk-compose { display: flex; flex-direction: column; gap: 8px; margin-bottom: 14px; }
.tk-compose-foot { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; justify-content: space-between; }
.tk-tones { display: flex; gap: 4px; flex-wrap: wrap; }
.tk-tones label { cursor: pointer; } .tk-tones input { position: absolute; opacity: 0; pointer-events: none; }
.tk-tones span { display: inline-flex; align-items: center; gap: 5px; font-size: 12.5px; font-weight: 650; padding: 4px 10px; border-radius: 99px; border: 1px solid var(--line); color: var(--muted); }
.tk-tones span::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: var(--t); }
.tk-tones input:checked + span { border-color: var(--t); color: var(--text); background: color-mix(in srgb, var(--t) 12%, transparent); }
.tk-tones input:focus-visible + span { outline: 2px solid var(--accent); }
.tk-timeline { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 10px; }
.tk-ev.comment { display: flex; gap: 10px; }
.tk-ev-av { width: 30px; height: 30px; flex: none; border-radius: 50%; display: grid; place-items: center; font-size: 11px; font-weight: 750; background: color-mix(in srgb, var(--accent) 14%, transparent); color: var(--accent); }
.tk-ev-b { flex: 1; min-width: 0; background: var(--surface-2, color-mix(in srgb, var(--text) 4%, transparent)); border: 1px solid var(--line); border-radius: 4px 14px 14px 14px; padding: 9px 12px; }
.tk-ev.toned .tk-ev-b { background: color-mix(in srgb, var(--t) 9%, var(--surface)); border-color: color-mix(in srgb, var(--t) 45%, var(--line)); border-left: 4px solid var(--t); }
.tk-ev-h { display: flex; align-items: center; gap: 8px; font-size: 13px; margin-bottom: 3px; flex-wrap: wrap; }
.tk-ev-h time { color: var(--faint); font-size: 12px; }
.tk-tone-pill { font-size: 11px; font-weight: 800; text-transform: uppercase; letter-spacing: .04em; color: #fff; background: var(--t); padding: 1px 7px; border-radius: 99px; }
.tk-ev-tools { margin-left: auto; display: flex; align-items: center; gap: 4px; opacity: 0; transition: opacity .15s; }
.tk-ev:hover .tk-ev-tools, .tk-ev-tools:focus-within { opacity: 1; }
.tk-ev-tools select { width: auto; padding: 2px 22px 2px 8px; font-size: 12px; border-radius: 8px; }
.tk-ev-txt { white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.5; }
.tk-ev.sys { display: flex; align-items: center; gap: 10px; font-size: 12.5px; color: var(--muted); padding-left: 10px; }
.tk-ev.sys b { color: var(--text); font-weight: 600; }
.tk-ev-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--line); flex: none; margin-right: 6px; box-shadow: 0 0 0 3px var(--surface); }
.tk-d-side { display: flex; flex-direction: column; gap: 14px; padding: 14px; border-radius: 16px; background: color-mix(in srgb, var(--text) 3%, transparent); border: 1px solid var(--line); align-self: start; position: sticky; top: 0; }
.tk-d-side .field { margin: 0; }
.tk-sseg, .tk-pseg { display: grid; grid-template-columns: 1fr 1fr; gap: 5px; }
.tk-sseg label, .tk-pseg label { cursor: pointer; } .tk-sseg input, .tk-pseg input { position: absolute; opacity: 0; pointer-events: none; }
.tk-sseg span, .tk-pseg span { display: block; text-align: center; padding: 7px 6px; border-radius: 10px; border: 1px solid var(--line); font-size: 13px; font-weight: 650; color: var(--muted); background: var(--surface); }
.tk-sseg input:checked + span { color: #fff; background: var(--s); border-color: var(--s); }
.tk-pseg span { border-left: 4px solid var(--p); }
.tk-pseg input:checked + span { color: #fff; background: var(--p); border-color: var(--p); }
.tk-sseg input:focus-visible + span, .tk-pseg input:focus-visible + span { outline: 2px solid var(--accent); outline-offset: 1px; }
.tk-new-form .tk-pseg { grid-template-columns: repeat(4, 1fr); }
@media (max-width: 1100px) { .tk-board { grid-template-columns: repeat(4, minmax(250px, 1fr)); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 6px; } .tk-col { scroll-snap-align: start; } }
@media (max-width: 860px) { .tk-d-grid { grid-template-columns: 1fr; } .tk-d-side { position: static; order: -1; } .tk-sums { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 640px) {
  .tk-sums { grid-template-columns: repeat(2, minmax(0, 1fr)); } .tk-sum b { font-size: 18px; }
  .tk-board { grid-template-columns: repeat(4, 84vw); }
  .tk-bar .search { max-width: none; flex: 1; } .tk-bar .spacer { display: none; }
  .tk-row .tk-due, .tk-row .tk-st { display: none; }
  .tk-title-in { font-size: 19px; }
  .tk-new-form .tk-pseg { grid-template-columns: 1fr 1fr; }
  .tk-ev-tools { opacity: 1; }
}
.tk-due-row { display: flex; gap: 6px; align-items: center; } .tk-due-row input { flex: 1; min-width: 0; }
.tk-quick input[type=text], :root[data-theme="dark"] .tk-quick input[type=text] { background: transparent !important; border: 0 !important; box-shadow: none !important; }
@media (max-width: 860px) {
  .tk-d-side { display: grid; grid-template-columns: 1fr 1fr; gap: 10px 12px; }
  .tk-d-side > .field:nth-child(1), .tk-d-side > .field:nth-child(2) { grid-column: 1 / -1; }
  .tk-d-side .tk-sseg, .tk-d-side .tk-pseg { grid-template-columns: repeat(4, 1fr); }
  .tk-d-side .tk-sseg span, .tk-d-side .tk-pseg span { padding: 7px 2px; font-size: 12px; }
  .tk-d-side #tk-del { justify-self: end; }
}
@media (max-width: 860px) { .tk-d-side { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); } .tk-d-side select { min-width: 0; } .tk-d-grid > * { min-width: 0; } }
@media (max-width: 640px) {
  .tk-quick { flex-wrap: wrap; padding: 8px 8px 8px 12px; }
  .tk-quick input[type=text] { flex: 1 1 100%; order: 0; }
  .tk-quick .tk-q-ic { display: none; }
  .tk-quick select { flex: 1; }
  #tk-new { width: 100%; justify-content: center; }
  .tk-bar .search { min-width: 140px; }
  .tk-add-check input { min-width: 0; }
}
@media (max-width: 860px) { .tk-d-side #tk-del { grid-column: 1 / -1; justify-self: center; } }
/* Leistungen: Mehrfachauswahl mit Symbol + Haken */
.svc-pick span { position: relative; padding-right: 34px; }
.svc-ic { display: inline-grid; place-items: center; width: 28px; height: 28px; border-radius: 9px; margin-bottom: 4px; background: color-mix(in srgb, var(--accent) 12%, transparent); color: var(--accent); font-style: normal; }
.svc-ic svg { width: 16px; height: 16px; }
.svc-pick span::after { content: ""; position: absolute; top: 11px; right: 11px; width: 18px; height: 18px; border-radius: 6px; border: 1.5px solid var(--line); background: var(--surface); }
.svc-pick input:checked + span::after { border-color: var(--accent); background: var(--accent) url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' viewBox='0 0 24 24' fill='none' stroke='white' stroke-width='3.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M20 6 9 17l-5-5'/%3E%3C/svg%3E") center / 12px no-repeat; }
/* Bildbeitrag-Galerie */
.pproj { width: 100%; border-radius: 20px; overflow: hidden; background: #0d0d16; box-shadow: var(--shadow); display: flex; flex-direction: column; }
.pp-grid { display: grid; gap: 3px; grid-template-columns: 1fr 1fr; grid-auto-rows: 1fr; aspect-ratio: 4 / 3.4; }
.pp-grid.n1 { grid-template-columns: 1fr; aspect-ratio: auto; }
.pp-grid.n1 .pp-item img, .pp-grid.n1 .pp-item video { max-height: min(620px, 75vh); object-fit: contain; height: auto; }
.pp-grid.n2 { aspect-ratio: 4 / 2.4; }
.pp-grid.n3 { grid-template-rows: 1fr 1fr; } .pp-grid.n3 .pp-item:first-child { grid-row: span 2; }
.pp-grid.n5 { grid-template-columns: repeat(6, 1fr); grid-template-rows: 1.3fr 1fr; } .pp-grid.n5 .pp-item:nth-child(-n+2) { grid-column: span 3; } .pp-grid.n5 .pp-item:nth-child(n+3) { grid-column: span 2; }
.pp-item { all: unset; position: relative; cursor: zoom-in; overflow: hidden; background: #000; display: block; min-height: 0; }
.pp-item img, .pp-item video { width: 100%; height: 100%; object-fit: cover; display: block; transition: transform .35s ease; }
.pp-item:hover img, .pp-item:hover video { transform: scale(1.03); }
.pp-item:focus-visible { outline: 3px solid var(--accent); outline-offset: -3px; }
.pp-more { position: absolute; inset: 0; display: grid; place-items: center; background: rgba(0, 0, 0, .55); color: #fff; font-size: 26px; font-weight: 800; }
.pp-play { position: absolute; left: 50%; top: 50%; transform: translate(-50%, -50%); width: 42px; height: 42px; border-radius: 50%; background: rgba(0,0,0,.5); color: #fff; display: grid; place-items: center; font-style: normal; } .pp-play svg { width: 18px; height: 18px; }
.lb-th video { width: 100%; height: 100%; object-fit: cover; display: block; }
.post:has(.pproj) { grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); }
@media (max-width: 860px) { .post:has(.pproj) { grid-template-columns: 1fr; } .post:has(.pproj) .post-media { max-width: none; } }
/* Beitragstexte als PDF */
.filter-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; justify-content: space-between; }
.filter-row .filters { flex: 1; min-width: 0; margin-bottom: 0; }
.filter-row { margin-bottom: 18px; }
.label-row { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.cap-pdf-btn { font-size: 12.5px; padding: 4px 10px; min-height: 0; }
.cp-item { padding: 18px 0; border-bottom: 1px solid var(--line); break-inside: avoid; }
.cp-item:last-of-type { border-bottom: 0; }
.cp-meta { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; font-size: 12.5px; color: var(--muted); margin-bottom: 6px; }
.cp-meta b { color: var(--text); font-size: 13px; margin-right: 4px; }
.cp-meta span { padding: 1px 8px; border-radius: 99px; background: #f2f2f7; }
.cp-st.st-approved { background: #e3f6ea !important; color: #0c6b36; } .cp-st.st-published { background: #e6efff !important; color: #1d4ed8; } .cp-st.st-pending { background: #fff4dd !important; color: #9a5b00; } .cp-st.st-rejected { background: #fde7e7 !important; color: #a51d22; }
.cp-page .cp-item h2 { margin: 0 0 8px; font-size: 17px; }
.cp-text { white-space: pre-wrap; word-break: break-word; font-size: 14.5px; line-height: 1.6; background: #fafafc; border: 1px solid var(--line); border-radius: 12px; padding: 14px 16px; }
.cp-foot { margin-top: 6px; font-size: 11.5px; color: var(--faint); }
@media print { .cp-text { background: #fff; } }
/* Einzelfoto: Rahmen passt sich dem Bild an (keine schwarzen Balken) */
.pproj:has(.pp-grid.n1) { width: fit-content; max-width: 100%; margin-inline: auto; min-width: min(100%, 260px); }
.pp-grid.n1 .pp-item { display: flex; justify-content: center; }
.pp-grid.n1 .pp-item img { width: auto; height: auto; max-width: 100%; max-height: min(640px, 78vh); object-fit: contain; }
.pp-grid.n1 .pp-item:hover img { transform: none; }
/* Beiträge als Liste */
.filter-tools { display: flex; align-items: center; gap: 8px; flex-wrap: wrap; }
.view-seg span { display: inline-flex; align-items: center; gap: 6px; } .view-seg svg { width: 15px; height: 15px; }
.pl { padding: 6px; display: flex; flex-direction: column; }
.pl-item + .pl-item { border-top: 1px solid var(--line); }
.pl-row { all: unset; box-sizing: border-box; width: 100%; cursor: pointer; display: flex; align-items: center; gap: 12px; padding: 10px 12px; border-radius: 12px; }
.pl-row:hover { background: color-mix(in srgb, var(--text) 4%, transparent); }
.pl-row:focus-visible { outline: 2px solid var(--accent); outline-offset: -2px; }
.pl-thumb { width: 48px; height: 48px; flex: none; border-radius: 10px; overflow: hidden; background: color-mix(in srgb, var(--text) 7%, transparent); display: grid; place-items: center; color: var(--muted); }
.pl-thumb img { width: 100%; height: 100%; object-fit: cover; display: block; }
.pl-thumb.vid { background: #14141f; color: #fff; } .pl-thumb svg { width: 18px; height: 18px; }
.pl-main { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 2px; }
.pl-main b { font-size: 15px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-main small { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pl-n { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; color: var(--muted); } .pl-n svg { width: 14px; height: 14px; }
.pl-row .pill { flex: none; }
.pl-chev { display: grid; color: var(--faint); transition: transform .2s; } .pl-chev svg { width: 16px; height: 16px; }
.pl-row.open .pl-chev { transform: rotate(90deg); }
.pl-item > .post { margin: 4px 0 12px; box-shadow: none; border: 1px solid var(--line); animation: rise .2s ease both; }
@media (max-width: 640px) {
  .filter-row { flex-direction: column; align-items: stretch; } .filter-tools { justify-content: space-between; }
  .pl-row { gap: 10px; padding: 9px 8px; } .pl-thumb { width: 42px; height: 42px; } .pl-n { display: none; }
  .pl-row .pill { font-size: 11px; padding: 3px 8px; }
}
@media (max-width: 640px) {
  .pl-row { display: grid; grid-template-columns: 42px minmax(0, 1fr) auto; grid-template-areas: "thumb main chev" "thumb pill chev"; column-gap: 10px; row-gap: 4px; align-items: center; }
  .pl-thumb { grid-area: thumb; } .pl-main { grid-area: main; } .pl-chev { grid-area: chev; } .pl-row .pill { grid-area: pill; justify-self: start; }
  .pl-main small { white-space: normal; display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; }
}

/* ---------- Agenturlogo (Kopfzeile, Login, PDF) ---------- */
.brand-logo { display: inline-flex; align-items: center; line-height: 0; border-radius: 10px; }
.brand-logo img { display: block; height: calc(40px * var(--logo-scale, 1)); width: auto; max-width: calc(220px * var(--logo-scale, 1)); object-fit: contain; transition: height .12s ease; }
.brand.big .brand-logo img { height: calc(56px * var(--logo-scale, 1)); max-width: min(calc(280px * var(--logo-scale, 1)), 100%); }
.brand.brand-with-logo { gap: 0; min-width: 0; }
.brand.brand-with-logo > .brand-logo { display: inline-flex !important; overflow: visible; white-space: normal; min-width: 0; }
.brand-logo.bg-1 { background: #fff; padding: 5px 10px; box-shadow: 0 4px 14px -8px rgba(0, 0, 0, .35); }
:root[data-theme="dark"] .brand-logo.bg-0 { background: #fff; padding: 5px 10px; }
@media (prefers-color-scheme: dark) { :root[data-theme="auto"] .brand-logo.bg-0 { background: #fff; padding: 5px 10px; } }
.rp-brand .brand-logo, .rp-brand .brand-logo.bg-1 { background: none; padding: 0; box-shadow: none; }
.rp-brand .brand-logo img { height: 34px; max-width: 200px; }
@media (max-width: 600px) {
  .topbar .brand-logo { flex: none; }
  .topbar .brand-logo img { height: auto; max-height: calc(32px * var(--logo-scale, 1)); max-width: min(calc(150px * var(--logo-scale, 1)), 40vw); }
}
@media (max-width: 400px) {
  .topbar .brand-logo img { max-width: min(calc(100px * var(--logo-scale, 1)), 30vw); }
  .topbar .brand-logo.bg-1, :root[data-theme="dark"] .topbar .brand-logo.bg-0 { padding: 4px 6px; border-radius: 8px; }
  .brand.big .brand-logo img { height: calc(46px * var(--logo-scale, 1)); max-width: 100%; }
}
.ag-logo-set { display: grid; gap: 12px; }
.ag-prev { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.ag-prev > div { display: grid; place-items: center; gap: 8px; padding: 16px 12px 10px; border-radius: 14px; border: 1px solid var(--line, rgba(0,0,0,.08)); min-height: 92px; }
.ag-prev small { font-size: 11px; color: var(--muted); }
.ag-prev-l { background: #f5f5fa; }
.ag-prev-d { background: #0d0d16; }
.ag-prev-d small { color: #9a9ab0; }
.ag-prev .brand-logo img { height: calc(40px * var(--logo-scale, 1)); max-width: 100%; }
.ag-prev-l .brand-logo.bg-0 { background: none !important; padding: 0 !important; }
.ag-prev-d .brand-logo.bg-0 { background: #fff !important; padding: 5px 10px !important; }
.ag-cust { display: flex; gap: 12px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; border: 1px solid var(--line); background: var(--surface-2, transparent); cursor: pointer; }
.ag-cust input { width: 18px; height: 18px; margin-top: 2px; accent-color: var(--accent); flex: none; }
.ag-cust span { display: grid; gap: 2px; }
.ag-cust small { color: var(--muted); font-size: 12.5px; line-height: 1.4; font-weight: 500; }

.ag-size { display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 12px; }
.ag-size > span { font-weight: 600; font-size: 14px; }
.ag-size input[type=range] { width: 100%; accent-color: var(--accent); }
.ag-size b { font-variant-numeric: tabular-nums; min-width: 48px; text-align: right; font-size: 14px; }
.ag-size .btn[hidden] { display: none; }

/* ---------- Panther Workspace (Abo-Version) ---------- */
.trial-bar { display: flex; align-items: center; gap: 12px; justify-content: center; flex-wrap: wrap; padding: 10px 18px; font-size: 14px; color: #fff; background: linear-gradient(90deg, #2d4fb0, #b46fe0); text-align: center; }
.trial-bar svg { width: 18px; height: 18px; flex: none; }
.trial-bar a { color: #fff; font-weight: 700; background: rgba(255,255,255,.18); padding: 6px 14px; border-radius: 999px; text-decoration: none; white-space: nowrap; }
.trial-bar a:hover { background: rgba(255,255,255,.28); }
body.feat-off-roles .team-tabs [data-v="roles"] { display: none; }

/* ---------- Panther: Paket wählen, Nutzung, Support-Zugang ---------- */
.trial-bar .tb-btn { font: inherit; color: #fff; font-weight: 700; background: rgba(255,255,255,.18); border: 1px solid rgba(255,255,255,.35); padding: 6px 14px; border-radius: 999px; cursor: pointer; white-space: nowrap; }
.trial-bar .tb-btn:hover { background: rgba(255,255,255,.3); }
.support-chip { font-size: 12px; font-weight: 700; padding: 4px 10px; border-radius: 999px; background: var(--warn-soft); color: var(--warn-ink); white-space: nowrap; }
.bill-tog { display: inline-flex; gap: 4px; padding: 4px; border-radius: 999px; background: color-mix(in srgb, var(--text) 6%, transparent); margin: 0 0 16px; flex-wrap: wrap; }
.bill-tog button { font: inherit; font-size: 14px; font-weight: 600; border: 0; background: transparent; color: var(--muted); padding: 8px 16px; border-radius: 999px; cursor: pointer; display: inline-flex; gap: 8px; align-items: center; }
.bill-tog button.on { background: var(--surface-solid); color: var(--text); box-shadow: 0 2px 8px -3px rgba(0,0,0,.2); }
.bill-tog em { font-style: normal; font-size: 12px; font-weight: 700; color: var(--ok-ink); background: var(--ok-soft); padding: 2px 8px; border-radius: 999px; }
.modal.plan-modal { width: min(900px, calc(100vw - 32px)); max-width: none; }
.plan-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 12px; }
.plan-card { position: relative; text-align: left; font: inherit; color: var(--text); background: var(--surface-solid); border: 1.5px solid var(--line); border-radius: 18px; padding: 18px 16px 14px; cursor: pointer; display: flex; flex-direction: column; gap: 10px; transition: border-color .15s, box-shadow .15s, transform .15s; }
.plan-card:hover { border-color: color-mix(in srgb, var(--accent) 45%, var(--line)); }
.plan-card.on { border-color: var(--accent); box-shadow: 0 0 0 3px var(--accent-soft), 0 14px 30px -18px color-mix(in srgb, var(--accent) 60%, transparent); }
.plan-card.nofit { opacity: .55; cursor: not-allowed; }
.plan-name { font-weight: 800; font-size: 17px; }
.plan-price b { font-size: 26px; letter-spacing: -.02em; } .plan-price small { display: block; color: var(--muted); font-size: 13px; }
.plan-card ul { list-style: none; margin: 4px 0 0; padding: 0; display: grid; gap: 7px; font-size: 13.5px; }
.plan-card li { display: flex; gap: 8px; align-items: flex-start; } .plan-card li svg { width: 15px; height: 15px; flex: none; margin-top: 2px; color: var(--accent); }
.plan-card li.off { color: var(--faint); text-decoration: line-through; } .plan-card li.off svg { color: var(--faint); }
.plan-badge { position: absolute; top: 12px; right: 12px; font-size: 11px; font-weight: 800; letter-spacing: .02em; padding: 3px 9px; border-radius: 999px; background: var(--accent); color: #fff; }
.plan-badge.cur { background: var(--ok-soft); color: var(--ok-ink); }
.plan-warn { font-size: 12px; color: var(--bad-ink); }
.plan-note { display: flex; gap: 10px; align-items: flex-start; padding: 12px 14px; border-radius: 14px; font-size: 14px; line-height: 1.5; background: color-mix(in srgb, var(--text) 5%, transparent); margin: 0 0 14px; }
.plan-note svg { width: 18px; height: 18px; flex: none; margin-top: 1px; } .plan-note.ok { background: var(--ok-soft); color: var(--ok-ink); }
.plan-now { display: flex; align-items: center; gap: 14px; justify-content: space-between; flex-wrap: wrap; padding: 14px 16px; border-radius: 16px; background: var(--accent-soft); }
.plan-now b { font-size: 18px; display: block; } .plan-now small { color: var(--muted); }
.use-grid { display: grid; gap: 12px; margin-top: 4px; }
.use-top { display: flex; justify-content: space-between; gap: 10px; font-size: 14px; margin-bottom: 6px; } .use-top small { color: var(--muted); font-weight: 500; }
@media (max-width: 640px) { .plan-grid { grid-template-columns: 1fr; } .modal-foot small { max-width: none !important; width: 100%; } }
