:root {
  --navy: #18414f;
  --navy-2: #22586a;
  --navy-soft: #e3ecef;
  --lime: #95c11f;
  --lime-dark: #6f9312;
  --bg: #f2f5f6;
  --card: #ffffff;
  --text: #1d2a30;
  --muted: #64737a;
  --line: #dbe3e6;
  --danger: #c6283a;
  --radius: 10px;
  --shadow: 0 1px 2px rgba(16, 40, 50, .06), 0 4px 14px rgba(16, 40, 50, .06);

  --s-geplant: #c3ccd1;
  --s-warten_anmeldung: #b9a7d8;
  --s-druckdaten: #1f7a53;
  --s-absage: #8c969b;
  --s-material_fehlt: #e98b8b;
  --s-material_da: #f2c14e;
  --s-im_satz: #3d8bd4;
  --s-lektorat: #5b5fc7;
  --s-in_freigabe: #f08a24;
  --s-korrektur: #c6283a;
  --s-freigegeben: #6fae1c;

  --so-idee: #c3ccd1;
  --so-entwurf: #9aa8ae;
  --so-abstimmung: #f08a24;
  --so-korrektur: #c6283a;
  --so-freigegeben: #6fae1c;
  --so-geplant: #3d8bd4;
  --so-veroeffentlicht: #18414f;
}

* { box-sizing: border-box; }
html, body { margin: 0; }
body {
  font-family: "Open Sans", "Segoe UI", system-ui, -apple-system, sans-serif;
  font-size: 14.5px;
  color: var(--text);
  background: var(--bg);
  line-height: 1.45;
}
a { color: var(--navy-2); }
h1, h2, h3 { margin: 0 0 .6em; line-height: 1.2; }
h1 { font-size: 1.55rem; font-weight: 700; }
h2 { font-size: 1.15rem; }
h3 { font-size: 1rem; }
.muted { color: var(--muted); }
.small { font-size: .85em; }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
.shell { display: grid; grid-template-columns: 236px 1fr; min-height: 100vh; }
.sidebar {
  background: var(--navy); color: #fff; padding: 20px 14px; position: sticky; top: 0; height: 100vh;
  display: flex; flex-direction: column; gap: 4px; overflow-y: auto;
}
.brand { display: flex; flex-direction: column; align-items: flex-start; gap: 6px; padding: 4px 8px 20px; text-decoration: none; }
.brand img { display: block; width: 168px; height: auto; }
.brand span { display: block; font-size: .72rem; color: #b9d0d8; letter-spacing: .08em; text-transform: uppercase; padding-left: 2px; }
.nav a {
  display: flex; align-items: center; gap: 10px; color: #dbe9ee; text-decoration: none;
  padding: 9px 12px; border-radius: 8px; font-weight: 600;
}
.nav a:hover { background: rgba(255, 255, 255, .08); color: #fff; }
.nav a.active { background: var(--lime); color: var(--navy); }
.nav .badge { margin-left: auto; background: #f08a24; color: #fff; border-radius: 99px; padding: 0 7px; font-size: .75rem; }
.sidebar-foot { margin-top: auto; font-size: .82rem; color: #b9d0d8; padding: 8px; }
.sidebar-foot b { color: #fff; display: block; }
.sidebar-foot button { margin-top: 8px; }

.main { padding: 22px 28px 60px; min-width: 0; }
.topbar { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.topbar h1 { margin: 0; margin-right: auto; }
.deadline {
  display: inline-flex; gap: 6px; align-items: center; background: #fff3e6; color: #8a4b0b;
  border: 1px solid #f6d3ad; padding: 5px 10px; border-radius: 99px; font-weight: 600; font-size: .85rem;
}
.deadline.over { background: #fde8ea; color: var(--danger); border-color: #f4c1c7; }

.card { background: var(--card); border-radius: var(--radius); box-shadow: var(--shadow); padding: 18px; }
.card + .card { margin-top: 16px; }
.card-head { display: flex; align-items: center; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; }
.card-head h2 { margin: 0; margin-right: auto; }
.grid { display: grid; gap: 16px; }
.grid-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-side { grid-template-columns: minmax(0, 1fr) 320px; align-items: start; }
.stack > * + * { margin-top: 16px; }

/* ---------- Kennzahlen ---------- */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 12px; margin-bottom: 16px; }
.kpi { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); padding: 14px 16px; border-top: 4px solid var(--c, var(--navy)); }
.kpi .v { font-size: 1.9rem; font-weight: 700; line-height: 1.1; }
.kpi .l { color: var(--muted); font-size: .85rem; }
.progress { display: flex; height: 14px; border-radius: 99px; overflow: hidden; background: #e8edef; }
.progress span { display: block; height: 100%; }
.legend { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: .85rem; }
.legend > span { display: inline-flex; align-items: center; gap: 6px; }
.legend button { all: unset; cursor: pointer; display: inline-flex; align-items: center; gap: 6px; padding: 2px 6px; border-radius: 6px; }
.legend button:hover, .legend button.on { background: var(--navy-soft); }
.dot { width: 11px; height: 11px; border-radius: 3px; display: inline-block; flex: none; }

/* ---------- Formulare & Buttons ---------- */
.btn {
  appearance: none; border: 1px solid var(--line); background: #fff; color: var(--text);
  padding: 8px 14px; border-radius: 8px; font: inherit; font-weight: 600; cursor: pointer;
  display: inline-flex; align-items: center; gap: 6px; text-decoration: none; white-space: nowrap;
}
.btn:hover { border-color: #b7c5ca; background: #f7f9fa; }
.btn.primary { background: var(--navy); color: #fff; border-color: var(--navy); }
.btn.primary:hover { background: var(--navy-2); }
.btn.lime { background: var(--lime); color: var(--navy); border-color: var(--lime); }
.btn.lime:hover { background: #a6d12c; }
.btn.danger { color: var(--danger); }
.btn.danger.solid { background: var(--danger); color: #fff; border-color: var(--danger); }
.btn.sm { padding: 4px 10px; font-size: .85rem; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: rgba(0, 0, 0, .05); }
.sidebar .btn.ghost { color: #dbe9ee; padding-left: 0; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.btns { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }

label.f { display: block; margin-bottom: 12px; }
label.f > span { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 4px; color: #33464e; }
input[type=text], input[type=url], input[type=search], input[type=email], input[type=password], input[type=number], input[type=date], input[type=time], select, textarea {
  width: 100%; padding: 8px 10px; border: 1px solid #c9d4d8; border-radius: 8px; font: inherit; background: #fff; color: inherit;
}
textarea { resize: vertical; min-height: 70px; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--lime); outline-offset: 0; border-color: var(--lime-dark); }
.check { display: flex; gap: 8px; align-items: flex-start; margin: 8px 0; cursor: pointer; }
.check input { margin-top: 3px; width: 16px; height: 16px; accent-color: var(--navy); }
.row { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 0 14px; }
.counter { font-size: .8rem; color: var(--muted); text-align: right; margin-top: 2px; }
.counter.over { color: var(--danger); font-weight: 700; }
.select-sm { width: auto; padding: 5px 8px; }

/* ---------- Tabellen ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 9px 10px; border-bottom: 1px solid var(--line); vertical-align: top; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); font-weight: 700; }
tr.click { cursor: pointer; }
tr.click:hover td { background: #f6f9fa; }

/* ---------- Pills ---------- */
.pill {
  display: inline-flex; align-items: center; gap: 5px; padding: 2px 9px; border-radius: 99px;
  font-size: .78rem; font-weight: 700; background: color-mix(in srgb, var(--c) 18%, #fff); color: color-mix(in srgb, var(--c) 75%, #000);
  border: 1px solid color-mix(in srgb, var(--c) 45%, #fff); white-space: nowrap;
}
.yes { color: var(--lime-dark); font-weight: 700; }
.no { color: #a0aaae; }
.warn-t { color: #b4610b; font-weight: 600; }

/* ---------- Heftplan ---------- */
.heft-tools { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; margin-bottom: 14px; }
.spreads { display: grid; grid-template-columns: repeat(auto-fill, minmax(232px, 1fr)); gap: 22px 18px; }
.spread { display: grid; grid-template-columns: 1fr 1fr; gap: 0; }
.spread .ph { visibility: hidden; }
.page {
  position: relative; aspect-ratio: 210 / 297; background: #fff; border: 1px solid #cfd8dc; cursor: pointer;
  display: flex; flex-direction: column; overflow: hidden; transition: transform .1s, box-shadow .1s;
}
.spread .page:first-child { border-radius: 6px 0 0 6px; }
.spread .page:last-child { border-radius: 0 6px 6px 0; border-left: none; }
.spread .page.solo-r { border-radius: 0 6px 6px 0; border-left: 1px solid #cfd8dc; }
.page:hover { box-shadow: 0 6px 16px rgba(16, 40, 50, .18); transform: translateY(-2px); z-index: 2; }
.page.dim { opacity: .25; }
.page.drop { outline: 3px dashed var(--lime); outline-offset: -3px; }
.page .num { position: absolute; top: 5px; left: 7px; font-weight: 700; font-size: .8rem; color: var(--navy); z-index: 2; background: rgba(255,255,255,.85); border-radius: 4px; padding: 0 4px; }
.page .cmt { position: absolute; top: 5px; right: 6px; font-size: .72rem; z-index: 2; background: rgba(255,255,255,.85); border-radius: 4px; padding: 0 4px; }
.page .thumb { flex: 1; min-height: 0; display: flex; align-items: center; justify-content: center; background: repeating-linear-gradient(135deg, #f7f9fa 0 8px, #f1f4f5 8px 16px); }
.page .thumb img { width: 100%; height: 100%; object-fit: cover; object-position: top; }
.page .thumb .ty { font-size: .7rem; text-transform: uppercase; letter-spacing: .08em; color: #8c9a9f; font-weight: 700; text-align: center; padding: 6px; }
.page .meta { padding: 5px 7px 6px; font-size: .74rem; line-height: 1.25; border-top: 1px solid #eef2f3; background: #fff; }
.page .meta b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page .meta i { display: block; font-style: normal; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.page .bar { height: 7px; background: var(--c); }
.spread-label { font-size: .72rem; color: var(--muted); margin-top: 4px; text-align: center; }

/* ---------- Drawer & Modal ---------- */
.overlay { position: fixed; inset: 0; background: rgba(10, 30, 38, .45); z-index: 50; display: flex; justify-content: flex-end; }
.overlay.center { justify-content: center; align-items: flex-start; padding: 5vh 16px; overflow-y: auto; }
.drawer { width: min(620px, 100%); height: 100%; background: var(--bg); overflow-y: auto; padding: 20px 22px 40px; box-shadow: -10px 0 30px rgba(0,0,0,.15); }
.modal { width: min(760px, 100%); background: var(--bg); border-radius: 12px; padding: 20px 22px; box-shadow: 0 20px 50px rgba(0,0,0,.25); }
.close-x { float: right; font-size: 1.4rem; line-height: 1; background: none; border: none; cursor: pointer; color: var(--muted); padding: 4px; }

/* ---------- Upload ---------- */
.drop-zone {
  border: 2px dashed #b7c7cc; border-radius: 10px; padding: 14px; text-align: center; color: var(--muted);
  background: #fafcfc; cursor: pointer; transition: background .1s, border-color .1s;
}
.drop-zone:hover, .drop-zone.over { border-color: var(--lime-dark); background: #f4f9e8; color: var(--navy); }
.drop-zone b { color: var(--navy); }
.files { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 6px; }
.file { display: grid; grid-template-columns: 44px 1fr auto; gap: 10px; align-items: center; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 6px 8px; }
.file .ico { width: 44px; height: 44px; border-radius: 6px; background: var(--navy-soft); display: flex; align-items: center; justify-content: center; font-size: .66rem; font-weight: 700; color: var(--navy); overflow: hidden; text-transform: uppercase; }
.file .ico img { width: 100%; height: 100%; object-fit: cover; }
.file .nm { overflow: hidden; }
.file .nm a { font-weight: 600; text-decoration: none; color: var(--text); word-break: break-all; }
.pf { list-style: none; margin: 2px 0 0; padding: 0; font-size: .78rem; }
.pf li::before { content: "● "; }
.pf .ok { color: var(--lime-dark); }
.pf .info { color: var(--muted); }
.pf .warn { color: #b4610b; font-weight: 600; }
.upbar { height: 4px; background: var(--line); border-radius: 4px; overflow: hidden; margin-top: 8px; }
.upbar span { display: block; height: 100%; background: var(--lime); width: 0; transition: width .2s; }

/* ---------- Material ---------- */
.contrib { border: 1px solid var(--line); border-radius: var(--radius); background: #fff; }
.contrib + .contrib { margin-top: 14px; }
.contrib-head { display: flex; gap: 10px; align-items: center; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #f8fafb; border-radius: var(--radius) var(--radius) 0 0; }
.contrib-head .n { background: var(--navy); color: #fff; border-radius: 6px; padding: 1px 8px; font-weight: 700; font-size: .8rem; }
.contrib-head input { font-weight: 700; border-color: transparent; background: transparent; font-size: 1rem; }
.contrib-head input:hover { border-color: #c9d4d8; background: #fff; }
.contrib-body { padding: 14px 16px; display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); gap: 18px; }
.checklist { list-style: none; padding: 0; margin: 0; }
.checklist li { display: flex; gap: 8px; padding: 6px 0; border-bottom: 1px dashed var(--line); }
.checklist li:last-child { border: none; }
.checklist .i { width: 20px; flex: none; text-align: center; font-weight: 700; }
.checklist .done .i { color: var(--lime-dark); }
.checklist .open .i { color: #c3ccd1; }
.checklist .warnx .i { color: #f08a24; }
.req dt { font-weight: 700; margin-top: 10px; color: var(--navy); font-size: .85rem; }
.req dd { margin: 2px 0 0; font-size: .85rem; color: #3c4d54; }
.price { background: var(--navy-soft); border-radius: 8px; padding: 10px 14px; margin-top: 10px; }
.price table td { border: none; padding: 2px 0; }
.price .sum td { border-top: 1px solid #b8ccd3; font-weight: 700; padding-top: 6px; }
.notice { padding: 10px 14px; border-radius: 8px; background: #eef6dc; border: 1px solid #cfe5a0; color: #3d5a07; margin-bottom: 14px; }
.notice.warn { background: #fff3e6; border-color: #f6d3ad; color: #8a4b0b; }
.notice.info { background: var(--navy-soft); border-color: #c3d6dd; color: var(--navy); }

/* ---------- Freigaben ---------- */
.proof { display: grid; grid-template-columns: 300px 1fr; gap: 18px; }
.proof iframe, .proof .pdfprev { width: 100%; aspect-ratio: 210 / 297; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pdfprev { display: flex; align-items: center; justify-content: center; overflow: hidden; }
.pdfprev img { width: 100%; height: 100%; object-fit: contain; }
.timeline { list-style: none; padding: 0; margin: 0; }
.timeline li { padding: 8px 0 8px 16px; border-left: 2px solid var(--line); position: relative; }
.timeline li::before { content: ""; position: absolute; left: -6px; top: 13px; width: 10px; height: 10px; border-radius: 50%; background: var(--c, var(--navy)); }
.comment { background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin-bottom: 8px; }
.comment .who { font-size: .8rem; color: var(--muted); }
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { padding: 8px 0; border-bottom: 1px solid var(--line); font-size: .9rem; }
.feed li:last-child { border: none; }
.feed time { color: var(--muted); font-size: .78rem; display: block; }

/* ---------- Social-Kalender ---------- */
.cal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); background: #fff; border-radius: 8px; overflow: hidden; }
.cal .dow { padding: 6px 8px; font-size: .75rem; font-weight: 700; text-transform: uppercase; color: var(--muted); background: #f6f9fa; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); }
.cal .day { min-height: 112px; padding: 4px 5px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); position: relative; }
.cal .day.other { background: #fafbfb; }
.cal .day.other .d { color: #b5c0c4; }
.cal .day.today .d { background: var(--lime); color: var(--navy); }
.cal .day.drop { background: #f4f9e8; }
.cal .d { font-size: .78rem; font-weight: 700; display: inline-block; min-width: 22px; text-align: center; border-radius: 99px; padding: 0 4px; }
.cal .add { position: absolute; top: 3px; right: 4px; opacity: 0; border: none; background: var(--navy-soft); color: var(--navy); border-radius: 6px; cursor: pointer; font-weight: 700; }
.cal .day:hover .add { opacity: 1; }
.chip {
  display: block; margin-top: 3px; padding: 3px 6px; border-radius: 6px; font-size: .74rem; line-height: 1.25; cursor: pointer;
  background: color-mix(in srgb, var(--c) 16%, #fff); border-left: 4px solid var(--c); overflow: hidden;
}
.chip b { display: block; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.chip > span { color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; }
.chip:hover { filter: brightness(.96); }
.ch { display: inline-block; font-size: .65rem; font-weight: 800; border-radius: 4px; padding: 0 4px; margin-right: 2px; color: #fff; background: var(--navy-2); }
.ch.instagram { background: #c13584; }
.ch.facebook { background: #1877f2; }
.ch.instore { background: #18414f; }
.ch.linkedin { background: #0a66c2; }
.ch.pinterest { background: #e60023; }
.preview-frame { background: #1d2a30; border-radius: 22px; padding: 10px; margin: 0 auto; }
.preview-frame .scr { background: #fff; border-radius: 14px; overflow: hidden; }
.preview-frame .img { background: #dfe6e9 center/cover no-repeat; display: flex; align-items: center; justify-content: center; color: #8c9a9f; font-size: .8rem; }
.preview-frame .cap { padding: 8px 10px; font-size: .78rem; max-height: 120px; overflow: auto; white-space: pre-wrap; }

/* ---------- Login ---------- */
.login { min-height: 100vh; display: grid; grid-template-columns: 1.1fr 1fr; }
.login .art {
  background: linear-gradient(160deg, rgba(24,65,79,.92), rgba(24,65,79,.75)), repeating-linear-gradient(45deg, #2c6070 0 2px, transparent 2px 22px), var(--navy);
  color: #fff; padding: 60px; display: flex; flex-direction: column; justify-content: center;
}
.login .art h1 { margin: 0; line-height: 0; }
.login .art h1 img { width: min(340px, 80%); height: auto; }
.login .art .script { font-family: "Segoe Script", "Brush Script MT", cursive; font-size: 2.2rem; margin: 10px 0 0 30%; color: var(--lime); }
.login .art p { max-width: 460px; color: #d4e4ea; font-size: 1.05rem; }
.login form { align-self: center; justify-self: center; width: min(380px, 90%); }

#toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%) translateY(30px); opacity: 0; background: var(--navy); color: #fff; padding: 10px 18px; border-radius: 10px; box-shadow: var(--shadow); transition: all .2s; z-index: 100; pointer-events: none; max-width: 90vw; }
#toast.show { opacity: 1; transform: translateX(-50%) translateY(0); }
#toast.err { background: var(--danger); }

.empty { text-align: center; color: var(--muted); padding: 30px 10px; }
.tabs { display: inline-flex; background: #e3eaec; padding: 3px; border-radius: 9px; }
.tabs button { border: none; background: transparent; padding: 5px 12px; border-radius: 7px; font: inherit; font-weight: 600; cursor: pointer; color: var(--muted); }
.tabs button.on { background: #fff; color: var(--navy); box-shadow: 0 1px 2px rgba(0,0,0,.08); }

@media (max-width: 1100px) {
  .grid-side, .grid-3 { grid-template-columns: 1fr; }
  .contrib-body { grid-template-columns: 1fr; }
}
@media (max-width: 820px) {
  .shell { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; flex-direction: row; flex-wrap: wrap; padding: 10px; }
  .brand { padding: 0 8px; width: 100%; }
  .nav { display: flex; flex-wrap: wrap; gap: 2px; }
  .sidebar-foot { display: none; }
  .main { padding: 16px; }
  .grid-2, .proof { grid-template-columns: 1fr; }
  .login { grid-template-columns: 1fr; }
  .login .art { padding: 30px 20px; }
  .cal .day { min-height: 70px; }
}

@media print {
  .sidebar, .heft-tools .btns, .no-print, #toast { display: none !important; }
  .shell { display: block; }
  .main { padding: 0; }
  body { background: #fff; }
  .card { box-shadow: none; padding: 0; }
  .spreads { grid-template-columns: repeat(4, 1fr); gap: 14px; }
  .page { break-inside: avoid; }
  .page .bar { -webkit-print-color-adjust: exact; print-color-adjust: exact; }
}

/* ---------- Social-Generator ---------- */
.modal.wide { width: min(1320px, 100%); }
.gen { display: grid; grid-template-columns: 340px minmax(0, 1fr); gap: 22px; align-items: start; }
.gen-ctrl .lbl { display: block; font-weight: 600; font-size: .85rem; margin-bottom: 4px; color: #33464e; }
.gen-ctrl hr { border: none; border-top: 1px solid var(--line); margin: 6px 0 14px; }
.gen-thumbs { display: flex; flex-wrap: wrap; gap: 6px; }
.gen-thumb { width: 64px; height: 64px; padding: 0; border: 2px solid var(--line); border-radius: 8px; background: #fff; cursor: pointer; overflow: hidden; display: flex; align-items: center; justify-content: center; font: inherit; font-size: .7rem; font-weight: 700; color: var(--navy); text-transform: uppercase; }
.gen-thumb img { width: 100%; height: 100%; object-fit: contain; }
.gen-thumb.on { border-color: var(--lime-dark); box-shadow: 0 0 0 2px var(--lime); }
.gen-thumb.off { opacity: .45; cursor: not-allowed; }
.gen-thumb.txt { text-transform: none; line-height: 1.1; padding: 4px; }
.gen-prev { display: flex; flex-wrap: wrap; gap: 18px; align-items: flex-start; position: sticky; top: 0; }
.gen-fig { margin: 0; background: #fff; border-radius: 10px; padding: 10px; box-shadow: var(--shadow); }
.gen-fig.off canvas { opacity: .3; }
.gen-fig figcaption { display: flex; gap: 8px; align-items: center; margin-bottom: 8px; font-size: .85rem; }
.gen-fig canvas { display: block; cursor: grab; border-radius: 4px; box-shadow: 0 1px 4px rgba(0,0,0,.2); touch-action: none; }
.gen-fig canvas:active { cursor: grabbing; }
.gen-zoom { display: flex; align-items: center; gap: 8px; margin-top: 6px; }
.gen-zoom input { flex: 1; accent-color: var(--navy); }
.social-drafts { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 8px; }
.social-drafts a { display: block; text-decoration: none; color: var(--text); font-size: .78rem; text-align: center; }
.social-drafts img { height: 120px; border-radius: 6px; box-shadow: var(--shadow); display: block; margin-bottom: 4px; }
@media (max-width: 1100px) { .gen { grid-template-columns: 1fr; } .gen-prev { position: static; } }

/* ---------- Rubriken-Tafel (wie Trello) ---------- */
.board { display: flex; gap: 14px; align-items: flex-start; overflow-x: auto; padding-bottom: 14px; min-height: 60vh; }
.col { flex: 0 0 280px; background: #e7ecee; border-radius: 12px; display: flex; flex-direction: column; max-height: calc(100vh - 190px); border-top: 5px solid var(--rc); }
.col.drop { outline: 3px dashed var(--lime); outline-offset: -3px; background: #eef6dc; }
.col header { display: flex; align-items: flex-start; gap: 8px; padding: 10px 12px 8px; }
.col header > div { flex: 1; min-width: 0; }
.col header b { display: block; font-size: .9rem; line-height: 1.25; color: var(--rc); filter: brightness(.8); }
.col header span { font-size: .75rem; color: var(--muted); }
.col-add { border: none; background: transparent; font-size: 1.3rem; line-height: 1; cursor: pointer; color: var(--muted); padding: 0 4px; border-radius: 6px; }
.col-add:hover { background: rgba(0,0,0,.07); color: var(--text); }
.col-body { overflow-y: auto; padding: 0 8px 8px; flex: 1; }
.col-empty { color: var(--muted); font-size: .82rem; text-align: center; padding: 18px 6px; }
.col-foot { border: none; background: transparent; text-align: left; padding: 8px 14px 10px; font: inherit; font-size: .85rem; color: var(--muted); cursor: pointer; border-radius: 0 0 12px 12px; }
.col-foot:hover { background: rgba(0,0,0,.05); color: var(--text); }
.grp + .grp { margin-top: 10px; }
.grp-h { font-size: .68rem; font-weight: 800; text-transform: uppercase; letter-spacing: .05em; color: #3f5057; padding: 4px 6px; margin-bottom: 6px;
  background: #fff; border-radius: 6px; border-left: 4px solid var(--c); display: flex; justify-content: space-between; }
.grp-h span { color: var(--muted); }
.kcard { background: #fff; border-radius: 8px; padding: 8px 10px 7px; margin-bottom: 6px; box-shadow: 0 1px 2px rgba(16,40,50,.12); cursor: pointer;
  border-left: 4px solid var(--c); transition: box-shadow .1s, transform .1s; }
.kcard:hover { box-shadow: 0 4px 12px rgba(16,40,50,.18); transform: translateY(-1px); }
.kcard.dragging { opacity: .4; }
.kc-t { font-weight: 700; font-size: .88rem; line-height: 1.25; word-break: break-word; }
.kc-s { font-size: .75rem; color: var(--muted); margin-top: 2px; }
.kc-b { display: flex; flex-wrap: wrap; gap: 3px; margin-top: 6px; }
.kc-f { display: flex; gap: 8px; align-items: center; margin-top: 6px; font-size: .72rem; color: var(--muted); }
.kc-st { margin-left: auto; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; max-width: 60%; }
.xb { display: inline-block; font-size: .64rem; font-weight: 800; letter-spacing: .03em; border-radius: 4px; padding: 1px 5px; background: var(--navy-soft); color: var(--navy); }
.x-sm { background: #fde3f1; color: #a0266b; } .x-tv { background: #dfe9f7; color: #18414f; } .x-ar { background: #fff0cc; color: #8a5a00; }
.x-adaption { background: #e7f3d2; color: #4d6b0b; } .x-print { background: #e6e6e6; color: #333; } .x-digital { background: #dceffd; color: #1b5d93; } .x-pw { background: #ffe1d6; color: #9a3a12; }
.mk { display: inline-block; font-size: .64rem; font-weight: 700; border-radius: 4px; padding: 1px 5px; background: #eef1f2; color: #44545b; }
.mk-bv { background: #f1e3fb; color: #7b3fa0; } .mk-bv-ok { background: #1d5fae; color: #fff; } .mk-ges { background: #e3f1e7; color: #2e7d4f; }
.bvcard { border-left: 4px solid #7b3fa0; }
@media (max-width: 820px) { .col { flex-basis: 85vw; max-height: none; } }

/* ---------- Posteingang ---------- */
.pe-grid { display: grid; grid-template-columns: minmax(280px, 400px) minmax(0, 1fr); gap: 16px; align-items: start; }
.pe-list { background: #fff; border-radius: var(--radius); box-shadow: var(--shadow); max-height: calc(100vh - 230px); overflow-y: auto; }
.pe-item { padding: 10px 14px; border-bottom: 1px solid var(--line); cursor: pointer; border-left: 4px solid transparent; }
.pe-item:hover { background: #f6f9fa; }
.pe-item.on { background: var(--navy-soft); border-left-color: var(--navy); }
.pe-top { display: flex; gap: 8px; justify-content: space-between; align-items: baseline; }
.pe-top b { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-top time { font-size: .72rem; color: var(--muted); white-space: nowrap; }
.pe-sub { font-size: .86rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pe-prev { font-size: .78rem; color: var(--muted); display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; overflow: hidden; margin-top: 2px; }
.pe-task { font-size: .8rem; font-weight: 600; margin-top: 3px; display: flex; gap: 6px; align-items: center; }
.pe-tags { display: flex; flex-wrap: wrap; gap: 4px; margin-top: 6px; }
.pe-detail { position: sticky; top: 0; max-height: calc(100vh - 200px); overflow-y: auto; }
.pe-box { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; margin-bottom: 12px; background: #fafcfc; }
.pe-box.pe-open { border-color: #f6d3ad; background: #fffaf3; }
.mailtext { white-space: pre-wrap; word-break: break-word; font: inherit; font-size: .9rem; line-height: 1.5; background: #fff; border: 1px solid var(--line); border-radius: 8px; padding: 12px 14px; margin: 0; }
@media (max-width: 1000px) { .pe-grid { grid-template-columns: 1fr; } .pe-detail { position: static; max-height: none; } }

/* Kataloge je Partner */
.kat-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 10px; }
.kat { display: block; padding: 12px 14px; border: 1px solid var(--line); border-radius: var(--radius); color: inherit; text-decoration: none; background: #fff; }
.kat:hover { border-color: var(--navy-2); box-shadow: var(--shadow); }
.kat-kopf { margin-bottom: 8px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.spiegel { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 6px; }
.sp-feld { position: relative; height: 64px; border-radius: 6px; padding: 4px 6px; background: color-mix(in srgb, var(--c, #888) 14%, #fff); border-left: 4px solid var(--c, #888); font-size: .72rem; line-height: 1.2; overflow: hidden; }
.sp-feld small { display: block; color: var(--muted); font-weight: 700; }
.sp-feld span { display: block; }
.sp-feld .dot { position: absolute; right: 5px; top: 5px; }
.sp-leer { background: repeating-linear-gradient(45deg, #f4f6f7, #f4f6f7 6px, #fff 6px, #fff 12px); border: 1px dashed #c9d3d7; }
.sp-u { --c: #8a5a9e; font-weight: 700; }
.sp-ueber { outline: 2px solid var(--danger); }
.kat-liste { list-style: none; margin: 0; padding: 0; counter-reset: kat; }
.kat-liste li { display: flex; align-items: center; gap: 8px; padding: 7px 4px; border-bottom: 1px solid var(--line); }
.kat-liste li .kl-t { flex: 1; min-width: 0; }
.kat-liste li .kl-t b { display: block; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kat-liste li.dragging { opacity: .4; }
.kat-liste .griff { cursor: grab; color: var(--muted); user-select: none; }
.kat-liste.pool { max-height: 620px; overflow: auto; }
.kat-vs { flex: none; display: block; text-decoration: none; }
.kat-vs .pdfprev { border: 1px solid var(--line); border-radius: 4px; background: #fff; font-size: .6rem; color: var(--muted); }
.kat-vs.leer { aspect-ratio: 210 / 297; border: 1px dashed #c9d3d7; border-radius: 4px; color: var(--muted); display: flex; align-items: center; justify-content: center; font-size: .7rem; }

/* Zuständigkeit, Fälligkeit, Textversionen */
.zust { display: inline-flex; align-items: center; justify-content: center; min-width: 22px; height: 22px; padding: 0 4px; border-radius: 99px; background: var(--navy-2); color: #fff; font-size: .68rem; font-weight: 700; margin-left: 4px; }
.faellig { font-weight: 600; white-space: nowrap; }
.vers-liste { display: flex; flex-direction: column; gap: 10px; }
.vers { border: 1px solid var(--line); border-radius: 8px; padding: 10px 12px; background: #fff; }
.vers-mark { border-left: 4px solid var(--lime-dark); }
.vers-kopf { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; margin-bottom: 6px; }
.vers-kopf .btn { margin-left: auto; }
.vers-diff { white-space: pre-wrap; font-size: .88rem; line-height: 1.5; margin-bottom: 6px; }
.vers-diff ins { background: #dff3c4; text-decoration: none; }
.vers-diff del { background: #fbdada; color: #8a1f1f; margin-right: 2px; }
.vers-diff ins + del, .vers-diff del + ins { margin-left: 2px; }

/* Ablauf & Termine */
.ms-liste { list-style: none; margin: 0; padding: 0; }
.ms { display: flex; gap: 12px; align-items: flex-start; padding: 10px 4px; border-bottom: 1px solid var(--line); }
.ms-ampel { flex: none; width: 14px; height: 14px; border-radius: 50%; background: var(--c); margin-top: 6px; box-shadow: 0 0 0 3px color-mix(in srgb, var(--c) 25%, transparent); }
.ms-haupt { flex: 1; min-width: 0; }
.ms-kopf { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; }
.ms-titel { font-weight: 700; border: 1px solid transparent; background: transparent; padding: 2px 4px; margin-left: -4px; min-width: 260px; flex: 1; }
.ms-titel:hover, .ms-titel:focus { border-color: var(--line); background: #fff; }
.ms-notiz { width: 100%; border: 1px solid transparent; background: transparent; padding: 2px 4px; margin-left: -4px; color: var(--muted); }
.ms-notiz:hover, .ms-notiz:focus { border-color: var(--line); background: #fff; color: inherit; }
.ms-fort { display: block; margin: 4px 0; }
.ms-fort:has(> .progress) { display: grid; grid-template-columns: minmax(120px, 220px) 1fr; gap: 10px; align-items: center; }
.ms-rechts { display: flex; gap: 10px; align-items: center; flex: none; }
.ms-gruen .ms-titel, .ms-gruen b { color: var(--muted); }
.ms-banner { display: flex; gap: 12px; align-items: center; text-decoration: none; color: inherit; border-left: 4px solid var(--c); }
.ms-banner .ms-ampel { margin-top: 0; }
.regel { align-items: flex-start; margin: 10px 0; }
.ablauf-schema { display: flex; flex-wrap: wrap; gap: 6px; align-items: center; margin-top: 14px; padding: 10px; background: #f4f7f8; border-radius: 8px; }
.ablauf-schema span { background: #fff; border: 1px solid var(--line); border-radius: 99px; padding: 3px 10px; }
.ablauf-schema i { color: var(--muted); font-style: normal; }
/* Titel/Notiz im Terminplan erst beim Bearbeiten als Feld zeigen */
.ms input.ms-titel, .ms input.ms-notiz { border: 1px solid transparent; background: transparent; box-shadow: none; min-height: 0; height: auto; padding: 2px 6px; margin-left: -6px; border-radius: 6px; }
.ms input.ms-titel { font-weight: 700; font-size: 1rem; }
.ms input.ms-notiz { font-size: .82rem; color: var(--muted); }
.ms input.ms-titel:hover, .ms input.ms-titel:focus, .ms input.ms-notiz:hover, .ms input.ms-notiz:focus { border-color: var(--line); background: #fff; color: inherit; }
.ms input.ms-notiz::placeholder { color: #b9c4c8; }

/* Anmeldungen */
.anm-grid { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 18px; align-items: start; }
@media (max-width: 900px) { .anm-grid { grid-template-columns: 1fr; } }
.anm-vs { display: block; width: 100%; max-height: 520px; object-fit: contain; border: 1px solid var(--line); border-radius: 8px; background: #fff; }
.pdfprev.anm-vs { aspect-ratio: 210 / 297; }
.anm-file { margin-bottom: 12px; }
.anm-f { font-size: 1.15rem; text-decoration: none; margin-right: 4px; }
.anm-satz { font-style: italic; margin: 6px 0 2px; color: #4a3500; }

/* Social-Media-Motive (Galerie) */
.motiv-gruppe { padding: 14px 0; border-top: 1px solid var(--line); }
.motiv-gruppe:first-of-type { border-top: 0; padding-top: 0; }
.motiv-grid { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-start; margin-top: 10px; }
.motiv { width: 210px; border: 1px solid var(--line); border-radius: 10px; background: #fff; overflow: hidden; cursor: pointer; transition: box-shadow .15s; }
.motiv:hover { box-shadow: var(--shadow); }
.motiv-bild { background: #eef2f3; display: flex; align-items: center; justify-content: center; text-align: center; font-size: .75rem; color: var(--muted); overflow: hidden; }
.motiv-bild img { width: 100%; height: 100%; object-fit: cover; display: block; }
.motiv-info { padding: 8px 10px 0; font-size: .85rem; }
.motiv-titel { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; margin-top: 2px; }
.motiv-btns { padding: 8px 10px 10px; gap: 6px; }
.motiv.quer { width: 330px; }

/* Material per Download-Link */
.link-liste { list-style: none; margin: 0; padding: 0; }
.link-liste li { display: flex; gap: 10px; align-items: center; padding: 8px 0; border-bottom: 1px solid var(--line); }
.link-liste li .kl-t { flex: 1; min-width: 0; word-break: break-all; }
.link-liste li.erledigt a { color: var(--muted); }

/* Bestellformular Gesellschafter */
.tvar-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(140px, 1fr)); gap: 14px; }
.tvar { position: relative; display: flex; flex-direction: column; gap: 6px; cursor: pointer; border: 2px solid transparent; border-radius: 10px; padding: 6px; }
.tvar:has(input:checked) { border-color: var(--lime-dark); background: #f4f9e8; }
.tvar input { position: absolute; opacity: 0; pointer-events: none; }
.tvar-bild { aspect-ratio: 3 / 4; border-radius: 6px; overflow: hidden; background: var(--navy-soft); display: flex; align-items: center; justify-content: center; }
.tvar-bild img { width: 100%; height: 100%; object-fit: cover; }
.tvar-leer { color: var(--navy); font-weight: 800; text-align: center; font-size: .95rem; line-height: 1.1; padding: 8px; word-break: break-word; }
.tvar-leer small { display: block; font-weight: 400; font-style: italic; margin-top: 4px; }
.tvar-l { font-size: .9rem; display: flex; align-items: center; gap: 6px; }
.tvar-l::before { content: ''; width: 14px; height: 14px; border-radius: 50%; border: 2px solid #9fb3ba; flex: none; }
.tvar:has(input:checked) .tvar-l::before { border-color: var(--lime-dark); background: radial-gradient(var(--lime-dark) 45%, transparent 50%); }
.eigenes { margin-top: 14px; }
.choice-list { display: flex; flex-direction: column; gap: 2px; }
.choice-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(230px, 1fr)); gap: 4px 16px; }
.check.opt { align-items: flex-start; padding: 8px 0; }
.wm-tab td { vertical-align: top; }
.vorjahr { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; justify-content: space-between; }
.best-side { position: sticky; top: 12px; }
.kfg-row { display: flex; flex-wrap: nowrap; align-items: center; gap: 10px; margin-bottom: 8px; }
.kfg-row .f { margin: 0; min-width: 0; flex: 1; }
.kfg-row .btn { flex: none; }
.kfg-bild { width: 60px; height: 80px; flex: none; display: flex; align-items: center; justify-content: center; background: var(--navy-soft); border-radius: 4px; overflow: hidden; }
.kfg-bild img { width: 100%; height: 100%; object-fit: cover; }
.kfg-wm { border-top: 1px solid var(--line, #e3e8ea); padding-top: 8px; margin-top: 8px; }
@media (max-width: 900px) { .best-side { position: static; } }
[hidden] { display: none !important; }
/* Viele Menüpunkte: bei niedrigen Fenstern kompakter, damit „Mein Konto“/„Abmelden“ sichtbar bleiben */
@media (max-height: 820px) { .nav a { padding: 6px 12px; } .brand { padding-bottom: 10px; } }

/* @-Erwähnungen und interne Notizen */
.mention-wrap { position: relative; }
.mention-box { position: absolute; z-index: 30; left: 0; right: 0; top: 100%; background: #fff; border: 1px solid var(--line); border-radius: 8px; box-shadow: 0 6px 18px rgba(0, 0, 0, .12); padding: 4px; max-height: 260px; overflow-y: auto; }
.mention-box button { display: block; width: 100%; text-align: left; background: none; border: 0; padding: 6px 10px; border-radius: 6px; cursor: pointer; font: inherit; }
.mention-box button.on, .mention-box button:hover { background: var(--navy-soft); }
.mention { color: var(--navy); font-weight: 700; background: var(--navy-soft); border-radius: 4px; padding: 0 3px; }
.mention.me { background: #fde9c8; color: #8a4b0b; }
.comment.intern { background: #fffaf0; border-color: #f2dcb4; }
.comment.fuer-mich { border-left: 4px solid #f08a24; }

/* Projektunterlagen */
.unt-liste { display: grid; gap: 12px; }
.unt { border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; display: grid; gap: 6px; }
.unt-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 6px 12px; }
.unt-kopf .btn { margin-left: auto; }

/* Sortiment-Kategorien und Sonderthemen NEU / ÜBERNAHME */
.kat-chip { display: inline-block; font-size: .7rem; line-height: 1.3; padding: 1px 7px; margin: 2px 3px 0 0; border-radius: 99px; background: #eef4e2; color: #3d5a07; border: 1px solid #d5e6b3; }
button.kat-chip.add { cursor: pointer; font: inherit; font-size: .72rem; background: #fff; color: var(--navy); border-color: var(--line); }
button.kat-chip.add:hover { background: var(--navy-soft); }
.kat-vorschlag { margin: -6px 0 10px; }
.kc-k { margin-top: 4px; }
.grp-sek { font-size: .72rem; font-weight: 800; text-transform: uppercase; letter-spacing: .06em; color: var(--navy); border-bottom: 2px dashed #b8ccd3; padding: 6px 4px 4px; margin: 4px 0 8px; display: flex; justify-content: space-between; }
.grp-sek span { color: var(--muted); font-weight: 600; text-transform: none; letter-spacing: 0; }
.grp-uebernahme { margin-top: 10px; }

/* Checklisten auf Karten */
.cl-bar { height: 6px; background: var(--line); border-radius: 99px; overflow: hidden; margin: 6px 0 8px; }
.cl-bar span { display: block; height: 100%; background: var(--lime-dark, #7aa012); }
.cl-liste { list-style: none; margin: 0 0 8px; padding: 0; }
.cl-liste li { display: flex; align-items: center; gap: 8px; padding: 4px 2px; border-bottom: 1px solid var(--line); }
.cl-liste li .griff { cursor: grab; color: var(--muted); font-size: .8rem; }
.cl-liste li .cl-text { flex: 1; min-width: 0; }
.cl-liste li.erledigt .cl-text { text-decoration: line-through; color: var(--muted); }
.cl-liste li .cl-wer { white-space: nowrap; }
.cl-liste li.dragging { opacity: .4; }
.cl-neu { display: flex; gap: 8px; align-items: flex-start; margin-bottom: 8px; }
.cl-neu textarea { flex: 1; resize: vertical; min-height: 34px; }

/* Kalenderansicht der Rubriken */
.kal-nav { gap: 10px; justify-content: flex-start; }
.kal { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); border-top: 1px solid var(--line); border-left: 1px solid var(--line); }
.kal-kopf { font-size: .72rem; font-weight: 800; text-transform: uppercase; color: var(--muted); padding: 6px 8px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); background: #f6f8f9; }
.kal-tag { min-height: 104px; padding: 4px 5px 6px; border-right: 1px solid var(--line); border-bottom: 1px solid var(--line); display: flex; flex-direction: column; gap: 3px; min-width: 0; }
.kal-tag.fremd { background: #fafbfb; }
.kal-tag.fremd .kal-nr { color: #b5c0c4; }
.kal-tag.we { background: #f7f9fa; }
.kal-tag.heute { box-shadow: inset 0 0 0 2px var(--lime); }
.kal-tag.drop { background: var(--navy-soft); }
.kal-nr { font-size: .75rem; font-weight: 700; color: var(--muted); }
.kal-k { font-size: .74rem; line-height: 1.25; padding: 3px 6px; border-radius: 5px; background: #fff; border: 1px solid var(--line); border-left: 4px solid var(--c); cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kal-k:hover { background: var(--navy-soft); }
.kal-k.ueber { border-color: #f1b5b5; border-left-color: var(--danger); background: #fff5f5; }
.kal-k.fertig { opacity: .55; }
.kal-k .zust { transform: scale(.8); vertical-align: middle; }
.kal-cl { color: var(--muted); }
.kal-ms { font-size: .72rem; font-weight: 700; color: #6b3fa0; text-decoration: none; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.kal-ms.erledigt { color: var(--muted); text-decoration: line-through; }
@media (max-width: 800px) { .kal-tag { min-height: 70px; } .kal-k { white-space: normal; } }

/* ---------- Karten im Trello-Stil ---------- */
.kcard { position: relative; border-radius: 8px; padding: 0; overflow: hidden; border-left: none;
  box-shadow: 0 1px 1px rgba(9,30,66,.25), 0 0 1px rgba(9,30,66,.31); }
.kcard::before { content: ''; position: absolute; left: 0; top: 0; bottom: 0; width: 3px; background: var(--c); opacity: .9; }
.kcard:hover { box-shadow: 0 0 0 2px #388bff, 0 4px 10px rgba(9,30,66,.18); transform: none; }
.kc-in { padding: 8px 10px 8px 12px; }
.kc-cover { height: 96px; overflow: hidden; background: #dfe5e7 linear-gradient(135deg, #e9eef0, #d8e0e3); border-bottom: 1px solid #e3e8ea; }
.kc-cover img { width: 100%; display: block; }
.kc-edit { position: absolute; top: 6px; right: 6px; width: 26px; height: 26px; border-radius: 50%; background: #fff; color: #44546f;
  display: flex; align-items: center; justify-content: center; box-shadow: 0 1px 2px rgba(9,30,66,.25); opacity: 0; transition: opacity .1s; }
.kc-edit svg { width: 14px; height: 14px; }
.mit-cover .kc-edit { top: 6px; }
.kcard:hover .kc-edit { opacity: 1; }
.kc-t { font-weight: 600; font-size: .88rem; color: #172b4d; padding-right: 18px; }

/* Labels: farbige Felder mit Text, per Klick zu schmalen Balken */
.kc-labels { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 6px; cursor: pointer; }
.kc-labels span { display: inline-block; min-width: 40px; max-width: 100%; height: 18px; line-height: 18px; padding: 0 7px; border-radius: 4px;
  font-size: .68rem; font-weight: 700; color: #172b4d; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; transition: height .12s; }
.labels-zu .kc-labels span { height: 8px; min-width: 40px; width: 40px; padding: 0; font-size: 0; line-height: 0; }
.lbl-gruen { background: #4bce97; } .lbl-gelb { background: #f5cd47; } .lbl-orange { background: #fea362; } .lbl-rot { background: #f87168; }
.lbl-lila { background: #9f8fef; } .lbl-lila-dunkel { background: #6e5dc6; color: #fff !important; } .lbl-blau { background: #579dff; }
.lbl-blau-dunkel { background: #0c66e4; color: #fff !important; } .lbl-sky { background: #6cc3e0; } .lbl-lime { background: #94c748; }
.lbl-pink { background: #e774bb; } .lbl-grau { background: #8590a2; color: #fff !important; }

/* Abzeichen unten: Fälligkeit, Checkliste, Kommentare, Korrekturstufe – Mitglieder rechts */
.kc-f { display: flex; flex-wrap: wrap; gap: 2px 6px; align-items: center; margin-top: 6px; font-size: .74rem; color: #44546f; }
.kb { display: inline-flex; align-items: center; gap: 3px; padding: 1px 4px; border-radius: 3px; line-height: 18px; white-space: nowrap; }
.kb svg { width: 14px; height: 14px; flex: none; }
.kb-ok { background: #1f845a; color: #fff; }
.kb-gelb { background: #f5cd47; color: #172b4d; }
.kb-rot { background: #c9372c; color: #fff; }
.kb-st { border-left: 3px solid var(--c); border-radius: 2px; padding-left: 5px; }
.kc-mit { margin-left: auto; display: flex; }
.kc-mit .zust { width: 26px; height: 26px; min-width: 26px; font-size: .7rem; margin-left: 0; box-shadow: 0 0 0 2px #fff; }
.kc-k { margin-top: 4px; }

/* ---------- Aufgaben-Tafel ---------- */
.aboard .col { flex-basis: 300px; }
.akarte { margin-bottom: 6px; }
.akarte.erledigt .kc-t { color: var(--muted); text-decoration: line-through; }
.a-haken { color: #1f845a; text-decoration: none; display: inline-block; }
.a-neu { padding: 0 8px 8px; }
.a-neu textarea { width: 100%; border-radius: 8px; border: none; box-shadow: 0 1px 1px rgba(9,30,66,.25), 0 0 1px rgba(9,30,66,.31); padding: 8px 10px; font: inherit; font-size: .88rem; resize: vertical; margin-bottom: 6px; }
.a-kopf { padding-right: 34px; }
input.a-titel { font-size: 1.25rem !important; font-weight: 700; color: var(--text); border: 1px solid transparent !important; background: transparent !important; padding: 4px 6px !important; width: 100%; }
input.a-titel:hover { background: #f1f4f5 !important; }
input.a-titel:focus { border-color: var(--line) !important; background: #fff !important; }
.kal-a { font-size: .74rem; line-height: 1.25; padding: 3px 6px; border-radius: 5px; background: #f3effb; border: 1px dashed #b9a5dd; color: #4b2a7a; cursor: pointer; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.kal-a.ueber { background: #fff5f5; border-color: #f1b5b5; color: var(--danger); }
.kal-a.fertig { opacity: .55; text-decoration: line-through; }

/* Übernahme aus früherer Ausgabe */
.ueb-gruppe { padding: 10px 14px; margin-bottom: 10px; }
.ueb-kopf { margin: 0 0 6px; }
.ueb-liste { list-style: none; margin: 0; padding: 0 0 0 22px; }
.ueb-liste li { display: flex; flex-wrap: wrap; gap: 6px 10px; align-items: baseline; padding: 3px 0; border-top: 1px solid var(--line); }
.ueb-liste li:first-child { border-top: 0; }
.vj-box { border-left: 4px solid var(--s-geplant); }

/* Vorlage auf dem NAS */
.nas-pfad { flex-wrap: nowrap; }
.nas-pfad input { flex: 1; min-width: 0; font-family: ui-monospace, Consolas, monospace; font-size: 13px; }
.nas-pfad .btn svg { width: 14px; height: 14px; vertical-align: -2px; }

/* Markierungen im Korrekturabzug */
.modal.mk-modal { width: min(1500px, calc(100vw - 32px)); max-width: none; max-height: calc(100vh - 32px); display: flex; flex-direction: column; }
.mk-wrap { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; min-height: 0; flex: 1; }
.mk-seiten { overflow-y: auto; max-height: calc(100vh - 170px); background: var(--bg); border-radius: 8px; padding: 2px; }
.mk-modal .close-x { align-self: flex-end; float: none; margin: -6px -6px -24px 0; }
.mk-seite { position: relative; max-width: 860px; margin: 0 auto 14px; box-shadow: var(--shadow); background: #fff; line-height: 0; }
.mk-seite canvas { width: 100%; height: auto; display: block; }
.mk-seite.kann { cursor: crosshair; }
.mk-snr { position: absolute; top: 6px; left: 6px; z-index: 1; line-height: 1.4; font-size: 11px; background: rgba(0,0,0,.55); color: #fff; padding: 1px 7px; border-radius: 10px; }
.mk-pin { position: absolute; z-index: 2; transform: translate(-50%, -100%); min-width: 26px; height: 26px; padding: 0 6px; border-radius: 13px 13px 13px 2px; border: 2px solid #fff;
  background: var(--danger); color: #fff; font-weight: 700; font-size: 12px; font-family: inherit; cursor: pointer; box-shadow: 0 2px 6px rgba(0,0,0,.35); line-height: 22px; }
.mk-pin.ok { background: var(--lime-dark); }
.mk-pin.neu { background: var(--navy); cursor: default; }
.mk-pin.hl, .mk-pin.blink { transform: translate(-50%, -100%) scale(1.3); outline: 3px solid rgba(198, 40, 58, .35); }
.mk-pop { position: absolute; z-index: 3; width: min(340px, 90%); margin-top: 6px; padding: 10px; background: var(--card); border-radius: 8px; box-shadow: 0 6px 24px rgba(0,0,0,.25); line-height: 1.4; cursor: default; }
.mk-pop textarea { width: 100%; margin-bottom: 6px; }
.mk-seite-liste { overflow-y: auto; max-height: calc(100vh - 170px); }
.mk-seite-liste h3 { margin-top: 0; }
.mk-liste { list-style: none; margin: 0; padding: 0; }
.mk-liste li { display: flex; gap: 10px; padding: 8px; border-radius: 8px; border: 1px solid var(--line); margin-bottom: 8px; background: var(--card); cursor: pointer; }
.mk-liste li.ok { opacity: .65; }
.mk-liste li.ok .mk-t { text-decoration: line-through; }
.mk-liste li.blink { outline: 2px solid var(--danger); }
.mk-liste li.empty { cursor: default; display: block; }
.mk-nr { flex: none; width: 24px; height: 24px; border-radius: 12px; background: var(--danger); color: #fff; font-weight: 700; font-size: 12px; display: grid; place-items: center; }
.mk-liste li.ok .mk-nr { background: var(--lime-dark); }
.mk-text { flex: 1; min-width: 0; }
.mk-akt { margin-top: 4px; gap: 10px; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--navy); text-decoration: underline; cursor: pointer; font: inherit; }
.linkbtn.danger { color: var(--danger); }
@media (max-width: 860px) {
  .mk-wrap { grid-template-columns: 1fr; }
  .mk-seiten, .mk-seite-liste { max-height: none; }
  .modal.mk-modal { max-height: none; }
}

/* Auslastung */
.al-card { padding: 10px; }
.al-tab { border-collapse: separate; border-spacing: 0; min-width: 100%; }
.al-tab th, .al-tab td { border-bottom: 1px solid var(--line); border-right: 1px solid var(--line); vertical-align: top; padding: 6px; }
.al-tab tr > :first-child { position: sticky; left: 0; z-index: 1; background: var(--card); }
.al-tab th { font-size: 12px; text-align: left; white-space: nowrap; }
.al-tab th.ueber { color: var(--danger); }
.al-tab th.ms { background: #fff6e0; }
.al-ms { color: #a56a00; font-weight: 600; }
.al-person { min-width: 170px; max-width: 200px; white-space: normal !important; }
.al-person .zust { display: inline-grid; vertical-align: middle; }
.al-kap { display: block; margin-top: 4px; font-weight: 400; }
.al-kap input { width: 46px; padding: 2px 4px; font-size: 12px; }
.al-kap input.std { color: var(--muted); }
.al-zelle { min-width: 128px; width: 128px; background: var(--card); }
.al-zelle.gruen { background: #f1f8e6; }
.al-zelle.gelb { background: #fff7dc; }
.al-zelle.rot { background: #fde9eb; }
.al-zelle.ueber { background: #fdf0f1; }
.al-zelle.drop { outline: 2px dashed var(--navy); outline-offset: -3px; }
.al-kopf { font-size: 12px; margin-bottom: 3px; }
.al-bar { height: 4px; border-radius: 2px; background: rgba(0,0,0,.08); margin-bottom: 5px; overflow: hidden; }
.al-bar i { display: block; height: 100%; background: var(--lime-dark); }
.al-zelle.gelb .al-bar i { background: #d79b00; }
.al-zelle.rot .al-bar i { background: var(--danger); }
.al-chip { display: flex; gap: 4px; align-items: center; font-size: 11.5px; line-height: 1.3; padding: 3px 6px; margin-bottom: 3px; border-radius: 5px; background: #fff;
  border: 1px solid var(--line); border-left: 4px solid var(--c, var(--line)); cursor: grab; }
.al-chip:hover { box-shadow: var(--shadow); }
.al-chip.wartet { opacity: .6; border-style: dashed; border-left-style: solid; }
.al-chip.al-auf { border-left-color: #7b5cc4; }
.al-chip.zieht { opacity: .4; }
.al-n { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.al-s { flex: none; font-weight: 700; color: var(--muted); }

/* Glocke */
.topbar .glocke { position: relative; margin-left: 4px; width: 38px; height: 38px; border-radius: 10px; border: 1px solid var(--line); background: var(--card); color: var(--navy); cursor: pointer; display: grid; place-items: center; flex: none; }
.glocke svg { width: 20px; height: 20px; }
.glocke b { position: absolute; top: -6px; right: -6px; min-width: 18px; height: 18px; padding: 0 5px; border-radius: 9px; background: var(--danger); color: #fff; font-size: 11px; line-height: 18px; text-align: center; }
.glocke-panel { position: fixed; z-index: 60; width: min(380px, calc(100vw - 16px)); max-height: min(520px, 75vh); overflow-y: auto; background: var(--card); border-radius: 12px; box-shadow: 0 12px 40px rgba(0,0,0,.25); }
.gp-kopf { position: sticky; top: 0; display: flex; justify-content: space-between; align-items: center; gap: 8px; padding: 12px 14px; background: var(--card); border-bottom: 1px solid var(--line); }
.glocke-panel ul { list-style: none; margin: 0; padding: 0; }
.glocke-panel li { padding: 10px 14px 10px 22px; border-bottom: 1px solid var(--line); cursor: pointer; font-size: 13.5px; position: relative; }
.glocke-panel li:hover { background: var(--bg); }
.glocke-panel li.neu::before { content: ''; position: absolute; left: 9px; top: 15px; width: 7px; height: 7px; border-radius: 50%; background: var(--danger); }
.glocke-panel li.neu > div { font-weight: 600; }
.glocke-panel time { display: block; font-size: 11.5px; color: var(--muted); margin-top: 2px; }
.glocke-panel li.empty { cursor: default; padding: 16px; }

/* Fortschritts-Kurven */
.fk-kopf { display: flex; flex-wrap: wrap; gap: 4px 10px; align-items: baseline; margin-bottom: 4px; }
.fk-plan.ok { color: var(--lime-dark); font-weight: 600; }
.fk-plan.rueck { color: var(--danger); font-weight: 600; }
.fk-svg { width: 100%; height: auto; display: block; }
.fk-t { font-size: 11px; fill: var(--muted); }

/* Regeln */
.rg-liste { list-style: none; margin: 0; padding: 0; }
.rg-liste li { display: grid; grid-template-columns: auto 1fr auto; gap: 12px; align-items: center; padding: 10px 0; border-top: 1px solid var(--line); }
.rg-liste li.aus { opacity: .55; }
.schalter { position: relative; display: inline-block; width: 36px; height: 20px; }
.schalter input { opacity: 0; width: 0; height: 0; }
.schalter span { position: absolute; inset: 0; background: var(--s-geplant); border-radius: 10px; cursor: pointer; transition: background .15s; }
.schalter span::before { content: ''; position: absolute; left: 2px; top: 2px; width: 16px; height: 16px; border-radius: 50%; background: #fff; transition: transform .15s; }
.schalter input:checked + span { background: var(--lime-dark); }
.schalter input:checked + span::before { transform: translateX(16px); }
#rgf fieldset { border: 1px solid var(--line); border-radius: 8px; padding: 8px 12px; margin: 0 0 10px; }

/* Statusbericht */
.sb-kurz { display: flex; flex-wrap: wrap; gap: 6px 14px; margin-top: 10px; font-size: 13px; }
.sb-r { display: inline-flex; align-items: center; gap: 6px; }
.sb-vorschau { width: 100%; height: 70vh; border: 1px solid var(--line); border-radius: 8px; background: #f2f5f6; }
