:root {
  --bg: #f3f6f8;
  --panel: #ffffff;
  --panel-2: #f8fafb;
  --ink: #1c2b36;
  --ink-2: #3b4b57;
  --muted: #6b7a86;
  --line: #e2e8ee;
  --line-2: #eef2f5;
  --accent: #009fe3;
  --accent-ink: #0a6fa3;
  --accent-soft: #e2f4fc;
  --danger: #d63c3c;
  --danger-soft: #fdeceb;
  --warn: #c77700;
  --warn-soft: #fff4dd;
  --ok: #4f9a1a;
  --ok-soft: #eef7e3;
  --shadow: 0 1px 2px rgba(20, 40, 60, .06), 0 4px 16px rgba(20, 40, 60, .06);
  --shadow-lg: 0 10px 40px rgba(20, 40, 60, .18);
  --r: 12px;
  --l-vorlesung: rgba(37, 99, 235, .06);
  --l-pruefung: rgba(214, 60, 60, .09);
  --l-ferien: rgba(234, 179, 8, .13);
  --l-feiertag: rgba(100, 116, 139, .16);
  --l-urlaub: rgba(124, 58, 237, .10);
  --off: rgba(100, 116, 139, .07);
  font-family: "Segoe UI", system-ui, -apple-system, Roboto, sans-serif;
  color: var(--ink);
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; background: var(--bg); }
body { font-size: 14px; line-height: 1.45; }
button, input, select, textarea { font: inherit; color: inherit; }
h1, h2, h3, h4 { margin: 0; font-weight: 650; letter-spacing: -.01em; }
h1 { font-size: 24px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
a { color: var(--accent-ink); }
.muted { color: var(--muted); }
.small { font-size: 12px; }
.grow { flex: 1; }
.row { display: flex; align-items: center; gap: 8px; }
.col { display: flex; flex-direction: column; gap: 8px; }
.hidden { display: none !important; }

/* ---------- Layout ---------- */
#app { display: grid; grid-template-columns: 248px 1fr; height: 100vh; }
#side { background: #fff; border-right: 1px solid var(--line); overflow-y: auto; padding: 18px 14px; display: flex; flex-direction: column; gap: 18px; }
#main { overflow-y: auto; padding: 26px 30px 60px; min-width: 0; }
#main.full { padding: 0; overflow: hidden; }

.brand { display: flex; align-items: center; gap: 10px; padding: 0 6px; }
.logo { width: 34px; height: 34px; border-radius: 10px; background: conic-gradient(from 200deg, #009fe3, #95c11f, #ea580c, #7c3aed, #009fe3); display: grid; place-items: center; }
.logo::after { content: ""; width: 14px; height: 14px; background: #fff; border-radius: 50%; }
.brand b { display: block; font-size: 16px; }
.brand small { color: var(--muted); font-size: 11px; }

.nav { display: flex; flex-direction: column; gap: 2px; }
.nav a { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; text-decoration: none; color: var(--ink-2); font-weight: 500; }
.nav a:hover { background: var(--panel-2); }
.nav a.on { background: var(--accent-soft); color: var(--accent-ink); }
.nav .ic { width: 18px; text-align: center; opacity: .8; }
.nav .badge { margin-left: auto; }

.side-sec h4 { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 600; margin: 0 6px 6px; }
.toggle { display: flex; align-items: center; gap: 8px; padding: 4px 6px; border-radius: 6px; cursor: pointer; user-select: none; }
.toggle:hover { background: var(--panel-2); }
.toggle input { accent-color: var(--accent-ink); margin: 0; }
.toggle .sw { width: 12px; height: 12px; border-radius: 3px; background: var(--c); }
.toggle.off-t { opacity: .5; }
.side-foot { margin-top: auto; display: flex; flex-direction: column; gap: 8px; padding: 10px 6px 0; border-top: 1px solid var(--line); }
.side-foot label { font-size: 12px; color: var(--muted); display: flex; flex-direction: column; gap: 3px; }

/* ---------- Bausteine ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); }
.card-h { display: flex; align-items: center; gap: 8px; padding: 14px 16px 6px; }
.card-b { padding: 6px 16px 14px; }
.btn { border: 1px solid var(--line); background: #fff; border-radius: 8px; padding: 6px 12px; cursor: pointer; font-weight: 500; white-space: nowrap; }
.btn:hover { background: var(--panel-2); }
.btn.pri { background: var(--accent-ink); border-color: var(--accent-ink); color: #fff; }
.btn.pri:hover { background: #085c87; }
.btn.ghost { border-color: transparent; background: transparent; }
.btn.ghost:hover { background: var(--line-2); }
.btn.sm { padding: 3px 8px; font-size: 12px; border-radius: 6px; }
.btn.danger { color: var(--danger); }
.inp, select.inp, textarea.inp { border: 1px solid var(--line); border-radius: 8px; padding: 6px 10px; background: #fff; width: 100%; }
.inp:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
textarea.inp { min-height: 70px; resize: vertical; }
.seg { display: inline-flex; background: var(--line-2); border-radius: 9px; padding: 3px; gap: 2px; }
.seg button { border: 0; background: transparent; padding: 4px 11px; border-radius: 7px; cursor: pointer; color: var(--ink-2); font-weight: 500; }
.seg button.on { background: #fff; box-shadow: 0 1px 2px rgba(0,0,0,.08); color: var(--ink); }

.av { --c: #888; display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--c); color: #fff; font-size: 9.5px; font-weight: 700; border: 2px solid #fff; flex: none; }
.av-lg { width: 40px; height: 40px; font-size: 14px; }
.avs { display: inline-flex; }
.avs .av + .av { margin-left: -6px; }
.dot { --c: #888; width: 9px; height: 9px; border-radius: 50%; background: var(--c); flex: none; display: inline-block; }
.chip { --c: #888; display: inline-flex; align-items: center; gap: 5px; font-size: 11.5px; padding: 1px 8px; border-radius: 99px; background: color-mix(in srgb, var(--c) 12%, white); color: color-mix(in srgb, var(--c) 75%, black); font-weight: 600; white-space: nowrap; }
.tag { display: inline-flex; align-items: center; gap: 4px; font-size: 11.5px; padding: 1px 7px; border-radius: 6px; background: var(--line-2); color: var(--ink-2); white-space: nowrap; }
.tag.warn { background: var(--warn-soft); color: var(--warn); }
.tag.danger { background: var(--danger-soft); color: var(--danger); }
.tag.ok { background: var(--ok-soft); color: var(--ok); }
.tag.info { background: var(--accent-soft); color: var(--accent-ink); }
.badge { font-size: 11px; font-weight: 700; padding: 0 7px; border-radius: 99px; background: var(--danger); color: #fff; line-height: 18px; }
.badge.soft { background: var(--line-2); color: var(--ink-2); }
.prog { height: 6px; border-radius: 9px; background: var(--line-2); overflow: hidden; }
.prog > i { display: block; height: 100%; background: var(--c, var(--accent)); border-radius: 9px; }
.empty { color: var(--muted); font-size: 13px; padding: 10px 0; }

/* ---------- Startseite ---------- */
.hello { display: flex; align-items: flex-end; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.hello .ctx { display: flex; gap: 6px; flex-wrap: wrap; margin-top: 6px; }
.quick { display: flex; gap: 8px; margin-bottom: 18px; }
.quick .inp { padding: 10px 14px; font-size: 15px; border-radius: 10px; box-shadow: var(--shadow); }
.quick-hint { font-size: 12px; color: var(--muted); margin: -12px 0 18px 4px; }

.banner { border-radius: var(--r); padding: 16px 18px; margin-bottom: 18px; display: grid; grid-template-columns: 1fr 320px; gap: 18px; border: 1px solid; }
.banner.thu { background: linear-gradient(120deg, #fff7e8, #fff); border-color: #f5dcae; }
.banner.mon { background: linear-gradient(120deg, #e8f6fd, #fff); border-color: #bfe5f7; }
.banner h2 { margin-bottom: 4px; }
.banner ul { margin: 8px 0 0; padding: 0; list-style: none; display: flex; flex-direction: column; gap: 4px; }
.banner li { display: flex; gap: 8px; align-items: center; }
.banner textarea { min-height: 84px; background: rgba(255,255,255,.8); }

.week { display: grid; gap: 8px; margin-bottom: 22px; }
.day { background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-height: 150px; display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.day.off { background: transparent; border-style: dashed; }
.day.today { border-color: var(--accent); box-shadow: 0 0 0 2px var(--accent-soft); }
.day.past { opacity: .62; }
.day-h { display: flex; align-items: baseline; gap: 6px; font-weight: 600; }
.day-h .num { font-size: 20px; }
.day-h .wd { color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .04em; }
.day-ctx { font-size: 11px; color: var(--muted); }
.ev { --c: #888; border-left: 3px solid var(--c); background: color-mix(in srgb, var(--c) 8%, white); border-radius: 6px; padding: 4px 7px; font-size: 12.5px; cursor: pointer; }
.ev:hover { background: color-mix(in srgb, var(--c) 14%, white); }
.ev b { font-weight: 600; }
.ev .t { color: var(--muted); font-size: 11.5px; font-variant-numeric: tabular-nums; }
.dtask { display: flex; gap: 6px; align-items: flex-start; font-size: 12.5px; padding: 2px 0; cursor: pointer; }
.dtask.done span { text-decoration: line-through; color: var(--muted); }

.cols { display: grid; grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); gap: 18px; align-items: start; }
.grp-h { font-size: 11.5px; font-weight: 700; text-transform: uppercase; letter-spacing: .05em; margin: 12px 0 4px; display: flex; gap: 6px; align-items: center; }
.grp-h.over { color: var(--danger); }
.grp-h.today { color: var(--accent-ink); }
.grp-h.start { color: var(--warn); }
.grp-h.week { color: var(--muted); }
.trow { display: grid; grid-template-columns: 22px 1fr auto; gap: 8px; align-items: start; padding: 7px 4px; border-radius: 8px; }
.trow:hover { background: var(--panel-2); }
.trow .tt { cursor: pointer; min-width: 0; }
.trow .tt b { font-weight: 550; }
.trow .meta { display: flex; gap: 5px; flex-wrap: wrap; margin-top: 3px; align-items: center; }
.chk { appearance: none; width: 18px; height: 18px; border: 2px solid #b6c2cc; border-radius: 6px; cursor: pointer; margin: 1px 0 0; display: grid; place-items: center; background: #fff; }
.chk:checked { background: var(--ok); border-color: var(--ok); }
.chk:checked::after { content: "✓"; color: #fff; font-size: 12px; font-weight: 800; }

.wait { display: grid; grid-template-columns: 1fr auto; gap: 6px; padding: 9px 4px; border-bottom: 1px solid var(--line-2); }
.wait:last-child { border-bottom: 0; }
.wait .who { font-size: 12.5px; color: var(--ink-2); }
.wait.due { background: linear-gradient(90deg, var(--warn-soft), transparent); border-radius: 8px; padding-left: 8px; }

.evcard { display: grid; grid-template-columns: 48px 1fr; gap: 10px; padding: 9px 4px; border-bottom: 1px solid var(--line-2); cursor: pointer; }
.evcard:last-child { border-bottom: 0; }
.evcard:hover { background: var(--panel-2); border-radius: 8px; }
.datebox { --c: #888; text-align: center; border-radius: 8px; background: color-mix(in srgb, var(--c) 10%, white); color: color-mix(in srgb, var(--c) 80%, black); padding: 4px 0; line-height: 1.1; }
.datebox b { display: block; font-size: 18px; }
.datebox small { font-size: 10.5px; text-transform: uppercase; font-weight: 600; }
.next { font-size: 12px; color: var(--ink-2); margin-top: 3px; }

/* ---------- Board ---------- */
.page-h { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.board { display: grid; grid-template-columns: repeat(4, minmax(220px, 1fr)); gap: 14px; align-items: start; }
.bcol { background: var(--line-2); border-radius: var(--r); padding: 10px; min-height: 300px; transition: background .15s; }
.bcol.drop { background: var(--accent-soft); outline: 2px dashed var(--accent); }
.bcol-h { display: flex; align-items: center; gap: 8px; padding: 2px 4px 10px; font-weight: 600; }
.bcard { --c: #888; background: #fff; border-radius: 10px; border: 1px solid var(--line); border-left: 4px solid var(--c); padding: 9px 10px; margin-bottom: 8px; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.04); }
.bcard:hover { box-shadow: var(--shadow); }
.bcard.dragging { opacity: .4; }
.bcard .meta { display: flex; gap: 5px; flex-wrap: wrap; align-items: center; margin-top: 6px; }
.bcard .sub { font-size: 11.5px; color: var(--muted); }

/* ---------- Termine ---------- */
.tm-grid { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 18px; align-items: start; }
.mon-h { font-size: 12px; font-weight: 700; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); margin: 18px 0 6px; }
.drop-ics { border: 2px dashed #b9c6d0; border-radius: var(--r); padding: 20px 16px; text-align: center; background: #fff; transition: all .15s; }
.drop-ics.over { border-color: var(--accent); background: var(--accent-soft); }
.drop-ics .big { font-size: 28px; }
.src { font-size: 10.5px; font-weight: 700; color: #0f62b5; background: #e6f0fb; border-radius: 5px; padding: 0 6px; }

/* ---------- Kanäle ---------- */
.chgrid { display: grid; gap: 0; background: #fff; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; box-shadow: var(--shadow); }
.chgrid > div { border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 8px; min-height: 64px; }
.chgrid .hd { background: var(--panel-2); font-size: 12px; font-weight: 600; min-height: 0; }
.chgrid .rowh { font-weight: 600; background: var(--panel-2); }
.chgrid .now { background: #f2fbff; }
.post { --c: #db2777; font-size: 12px; background: color-mix(in srgb, var(--c) 9%, white); border-left: 3px solid var(--c); border-radius: 6px; padding: 4px 6px; margin-bottom: 4px; cursor: pointer; }
.post.done { opacity: .55; text-decoration: line-through; }
.slot { font-size: 12px; border: 1.5px dashed #cdd6dd; color: var(--muted); border-radius: 6px; padding: 4px 6px; cursor: pointer; text-align: center; }
.slot:hover { border-color: var(--accent); color: var(--accent-ink); }
.occ { font-size: 11px; color: var(--ink-2); display: flex; gap: 4px; align-items: center; margin-bottom: 3px; }

/* ---------- Ideen ---------- */
.ideas { columns: 3 300px; column-gap: 16px; }
.idea { break-inside: avoid; margin-bottom: 16px; padding: 14px 16px; }
.idea p { margin: 6px 0 10px; color: var(--ink-2); }
.cmt { display: flex; gap: 8px; font-size: 12.5px; padding: 5px 0; border-top: 1px solid var(--line-2); }
.vote { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 2px 10px; cursor: pointer; font-weight: 600; }
.vote.on { background: var(--accent-soft); border-color: #a8dcf3; color: var(--accent-ink); }

/* ---------- Team ---------- */
.team { display: grid; grid-template-columns: repeat(auto-fill, minmax(250px, 1fr)); gap: 14px; margin-bottom: 22px; }
.pcard { padding: 16px; display: flex; flex-direction: column; gap: 10px; }
.wds { display: flex; gap: 3px; }
.wds span { font-size: 10.5px; width: 22px; text-align: center; border-radius: 5px; padding: 1px 0; background: var(--line-2); color: var(--muted); }
.wds span.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 700; }

/* ---------- Drawer & Modal ---------- */
#drawer { position: fixed; top: 0; right: 0; width: 440px; max-width: 100vw; height: 100vh; background: #fff; box-shadow: var(--shadow-lg); transform: translateX(105%); transition: transform .22s ease; z-index: 40; display: flex; flex-direction: column; }
#drawer.on { transform: none; }
.dr-h { padding: 16px 18px 10px; display: flex; gap: 10px; align-items: flex-start; border-bottom: 1px solid var(--line); }
.dr-b { padding: 14px 18px 40px; overflow-y: auto; flex: 1; display: flex; flex-direction: column; gap: 14px; }
.dr-title { font-size: 18px; font-weight: 650; border: 0; padding: 2px 0; width: 100%; border-bottom: 1px dashed transparent; }
.dr-title:focus { outline: none; border-bottom-color: var(--accent); }
.fld { display: flex; flex-direction: column; gap: 4px; }
.fld > label { font-size: 11.5px; font-weight: 600; color: var(--muted); text-transform: uppercase; letter-spacing: .04em; }
.fld2 { display: grid; grid-template-columns: 1fr 1fr; gap: 10px; }
.note { font-size: 12.5px; padding: 8px 10px; border-radius: 8px; background: var(--panel-2); color: var(--ink-2); }
.note.warn { background: var(--warn-soft); color: #8a5300; }
.note.danger { background: var(--danger-soft); color: #9b2323; }
.note.info { background: var(--accent-soft); color: #0b5578; }
.pick { display: flex; gap: 6px; flex-wrap: wrap; }
.pick button { border: 1px solid var(--line); background: #fff; border-radius: 99px; padding: 2px 10px 2px 3px; display: inline-flex; gap: 6px; align-items: center; cursor: pointer; font-size: 12.5px; }
.pick button.on { border-color: var(--accent); background: var(--accent-soft); }
.subt { display: flex; gap: 8px; align-items: center; padding: 3px 0; }
.subt.done span { text-decoration: line-through; color: var(--muted); }
.prep { display: grid; grid-template-columns: 22px 1fr 58px 26px; gap: 6px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.prep .inp { padding: 3px 6px; }
.prep .when { font-size: 11.5px; color: var(--muted); grid-column: 2 / 5; margin-top: -4px; display: flex; gap: 6px; align-items: center; }
.runway { position: relative; height: 46px; margin: 4px 6px 10px; }
.runway .ln { position: absolute; left: 0; right: 0; top: 18px; height: 2px; background: var(--line); }
.runway .pt { position: absolute; top: 12px; width: 14px; height: 14px; margin-left: -7px; border-radius: 50%; background: #fff; border: 2px solid var(--c); }
.runway .pt.done { background: var(--c); }
.runway .ev-pt { position: absolute; top: 10px; width: 18px; height: 18px; margin-left: -9px; transform: rotate(45deg); background: var(--c); border-radius: 3px; }
.runway .lbl { position: absolute; top: 32px; font-size: 10.5px; color: var(--muted); transform: translateX(-50%); white-space: nowrap; }
.runway .today { position: absolute; top: 4px; bottom: 14px; width: 2px; background: var(--danger); }

#modal { position: fixed; inset: 0; background: rgba(20, 35, 50, .35); display: none; place-items: center; z-index: 50; padding: 20px; }
#modal.on { display: grid; }
.mbox { background: #fff; border-radius: 14px; box-shadow: var(--shadow-lg); width: min(640px, 100%); max-height: 90vh; overflow-y: auto; padding: 20px 22px; display: flex; flex-direction: column; gap: 14px; }
.pv { width: 100%; border-collapse: collapse; font-size: 13px; }
.pv td { padding: 5px 6px; border-bottom: 1px solid var(--line-2); }

#toast { position: fixed; left: 50%; bottom: 24px; transform: translate(-50%, 30px); background: var(--ink); color: #fff; padding: 9px 16px; border-radius: 10px; opacity: 0; transition: all .2s; z-index: 60; pointer-events: none; font-size: 13.5px; }
#toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---------- Zeitstrahl ---------- */
.tl-wrap { display: flex; flex-direction: column; height: 100vh; }
.tl-bar { display: flex; align-items: center; gap: 12px; padding: 16px 22px 12px; flex-wrap: wrap; border-bottom: 1px solid var(--line); background: #fff; }
.tl-bar .hint { font-size: 12px; color: var(--muted); }
.tl { flex: 1; display: flex; flex-direction: column; min-height: 0; background: #fff; position: relative; }
.tl-head { height: 50px; position: relative; border-bottom: 1px solid var(--line); flex: none; overflow: hidden; background: #fff; z-index: 3; }
.tl-scroll { flex: 1; overflow-y: auto; overflow-x: hidden; position: relative; }
.tl-body { position: relative; cursor: grab; }
.tl-body.drag { cursor: grabbing; }
.tl-labels-bg { position: absolute; left: 0; top: 0; bottom: 0; background: #fff; border-right: 1px solid var(--line); z-index: 4; }
.tl-lane-l { position: absolute; left: 0; z-index: 5; padding: 10px 12px; font-weight: 600; font-size: 13px; display: flex; gap: 8px; align-items: flex-start; border-bottom: 1px solid var(--line-2); background: #fff; }
.tl-lane-l small { display: block; font-weight: 400; color: var(--muted); font-size: 11px; }
.tl-lane-sep { position: absolute; height: 1px; background: var(--line-2); z-index: 1; }
.tk { position: absolute; font-size: 11px; color: var(--muted); white-space: nowrap; top: 0; }
.tk.top { top: 6px; font-weight: 650; color: var(--ink-2); font-size: 12px; }
.tk.bot { top: 28px; }
.tk.bot.today { color: var(--danger); font-weight: 700; }
.gl { position: absolute; top: 0; bottom: 0; width: 1px; background: var(--line-2); z-index: 0; }
.gl.strong { background: var(--line); }
.bgband { position: absolute; top: 0; bottom: 0; z-index: 0; pointer-events: none; }
.bgband.off { background: var(--off); }
.bgband.vorlesung { background: var(--l-vorlesung); }
.bgband.pruefung { background: var(--l-pruefung); }
.bgband.ferien { background: var(--l-ferien); }
.bgband.feiertag { background: var(--l-feiertag); }
.bgband.urlaub { background: repeating-linear-gradient(135deg, var(--l-urlaub) 0 6px, transparent 6px 12px); }
.todayline { position: absolute; top: 0; bottom: 0; width: 2px; background: var(--danger); z-index: 6; pointer-events: none; }
.todayline::before { content: ""; position: absolute; top: -1px; left: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.it { position: absolute; z-index: 2; height: 20px; display: flex; align-items: center; font-size: 12px; white-space: nowrap; cursor: pointer; }
.it .lab { padding: 0 6px; overflow: hidden; text-overflow: ellipsis; }
.it.out .lab { position: absolute; left: 100%; color: var(--ink-2); overflow: visible; }
.it.phase { --c: #888; background: color-mix(in srgb, var(--c) 16%, white); border: 1px solid color-mix(in srgb, var(--c) 40%, white); border-radius: 6px; color: color-mix(in srgb, var(--c) 70%, black); font-weight: 600; }
.it.task { --c: #888; height: 18px; background: #fff; border: 1.5px solid var(--c); border-radius: 5px; color: var(--ink); }
.it.task.arbeit { background: color-mix(in srgb, var(--c) 22%, white); }
.it.task.wartet { background: repeating-linear-gradient(135deg, color-mix(in srgb, var(--c) 14%, white) 0 5px, #fff 5px 10px); border-style: dashed; }
.it.task.erledigt { opacity: .45; border-style: dotted; }
.it.task.erledigt .lab { text-decoration: line-through; }
.it.task.over { box-shadow: 0 0 0 2px var(--danger-soft); border-color: var(--danger); }
.it.ev .dia { width: 12px; height: 12px; background: var(--c); transform: rotate(45deg); border-radius: 2px; flex: none; margin: 0 2px; box-shadow: 0 0 0 2px #fff; }
.it.ev.ms .dia { width: 14px; height: 14px; background: #fff; border: 3px solid var(--c); }
.it.ev .lab { color: var(--ink); font-weight: 550; }
.it.evbox { --c: #888; background: var(--c); color: #fff; border-radius: 5px; font-weight: 600; }
.it.ctx { height: 20px; border-radius: 5px; font-size: 11.5px; color: var(--ink-2); }
.it.ctx.vorlesung { background: rgba(37, 99, 235, .14); }
.it.ctx.pruefung { background: rgba(214, 60, 60, .18); }
.it.ctx.ferien { background: rgba(234, 179, 8, .28); }
.it.ctx.feiertag { background: rgba(100, 116, 139, .25); }
.it.ctx.urlaub { background: repeating-linear-gradient(135deg, rgba(124,58,237,.22) 0 6px, rgba(124,58,237,.08) 6px 12px); }
.it:hover { z-index: 7; filter: brightness(.97); }
.it.dim { opacity: .25; }
#tl-svg { position: absolute; left: 0; top: 0; pointer-events: none; z-index: 1; overflow: visible; }
.tl-legend { display: flex; gap: 12px; font-size: 11.5px; color: var(--muted); align-items: center; flex-wrap: wrap; }
.tl-legend i { display: inline-block; width: 14px; height: 10px; border-radius: 3px; vertical-align: -1px; margin-right: 4px; }

@media (max-width: 1100px) {
  .cols, .tm-grid, .banner { grid-template-columns: 1fr; }
  .board { grid-template-columns: repeat(2, minmax(200px, 1fr)); }
}

/* ---------- E-Mail ablegen ---------- */
#maildrop { position: fixed; inset: 0; z-index: 70; background: rgba(20, 35, 50, .45); backdrop-filter: blur(2px); display: none; place-items: center; padding: 24px; }
#maildrop.on { display: grid; }
.md-box { background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 22px; width: min(820px, 100%); }
.md-title { font-size: 18px; font-weight: 650; margin-bottom: 14px; }
.md-zones { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; }
.md-zone { border: 2px dashed #b9c6d0; border-radius: 14px; padding: 28px 16px; text-align: center; display: flex; flex-direction: column; gap: 6px; align-items: center; transition: all .12s; }
.md-zone * { pointer-events: none; }
.md-zone .md-ic { font-size: 30px; color: var(--accent-ink); }
.md-zone b { font-size: 16px; }
.md-zone small { color: var(--muted); font-size: 12px; }
.md-zone.hot { border-style: solid; border-color: var(--accent); background: var(--accent-soft); transform: scale(1.03); }
.md-foot { margin-top: 12px; font-size: 12px; color: var(--muted); text-align: center; }
.onboard { display: grid; grid-template-columns: repeat(4, 1fr); gap: 12px; margin-bottom: 22px; }
.onboard .card { padding: 14px 16px; }
.onboard .n { width: 24px; height: 24px; border-radius: 50%; background: var(--accent-soft); color: var(--accent-ink); display: grid; place-items: center; font-weight: 700; font-size: 12px; margin-bottom: 6px; }
@media (max-width: 1100px) { .onboard, .md-zones { grid-template-columns: 1fr 1fr; } }

/* ---------- Dienst & Sciebo ---------- */
.svc-line { font-size: 11.5px; color: var(--muted); padding: 2px 10px; }
.svc-line.ok { color: var(--ok); }
.filedrop { border: 1.5px dashed #c6d1d9; border-radius: 8px; padding: 8px 10px; font-size: 12px; color: var(--muted); background: var(--panel-2); }
.file { display: flex; gap: 6px; align-items: center; font-size: 12.5px; padding: 3px 4px; border-radius: 6px; cursor: pointer; }
.file:hover { background: var(--panel-2); }
.file span { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.file small { color: var(--muted); }
code { font-size: 12px; background: var(--line-2); padding: 0 4px; border-radius: 4px; }

/* ---------- Post ---------- */
.post { display: flex; flex-direction: column; height: 100vh; background: #fff; }
.post-bar { display: flex; align-items: center; gap: 10px; padding: 14px 20px; border-bottom: 1px solid var(--line); flex-wrap: wrap; }
.post-cols { flex: 1; display: grid; grid-template-columns: 210px 360px minmax(0, 1fr); min-height: 0; }
.post-folders { border-right: 1px solid var(--line); overflow-y: auto; padding: 8px 6px; background: var(--panel-2); }
.pf { display: flex; gap: 6px; padding: 6px 10px; border-radius: 7px; font-size: 13px; cursor: pointer; color: var(--ink-2); }
.pf:hover { background: var(--line-2); }
.pf.on { background: var(--accent-soft); color: var(--accent-ink); font-weight: 600; }
.pf b { font-size: 11.5px; color: var(--accent-ink); }
.post-list { border-right: 1px solid var(--line); overflow-y: auto; }
.pm { padding: 9px 14px 10px; border-bottom: 1px solid var(--line-2); cursor: pointer; border-left: 3px solid transparent; }
.pm:hover { background: var(--panel-2); }
.pm.on { background: var(--accent-soft); }
.pm.unread { border-left-color: var(--accent); }
.pm.unread .pm-from, .pm.unread .pm-subj { font-weight: 650; }
.pm-from { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pm-date { font-size: 11.5px; color: var(--muted); white-space: nowrap; }
.pm-subj { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; color: var(--ink); }
.pm.unread .pm-subj { color: var(--accent-ink); }
.pm-prev { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.post-read { display: flex; flex-direction: column; min-width: 0; min-height: 0; }
.pr-head { padding: 16px 22px 12px; border-bottom: 1px solid var(--line); }
.pr-head h2 { font-size: 18px; }
.pr-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; align-items: center; }
.pr-actions .sep { width: 1px; height: 22px; background: var(--line); margin: 0 4px; }
.pr-actions select.inp { width: auto; padding: 3px 8px; font-size: 12px; }
.pr-atts { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 10px; }
.att { display: inline-flex; align-items: center; gap: 2px; border: 1px solid var(--line); border-radius: 8px; padding: 2px 2px 2px 8px; font-size: 12.5px; background: var(--panel-2); }
.att > span { cursor: pointer; }
.att > span:hover { text-decoration: underline; }
.pr-body { flex: 1; border: 0; width: 100%; background: #fff; }
@media (max-width: 1250px) { .post-cols { grid-template-columns: 170px 290px minmax(0, 1fr); } }

/* ---------- Anmeldung & Team ---------- */
body.auth #app { display: block; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(circle at 20% 10%, #e2f4fc, transparent 50%), radial-gradient(circle at 90% 90%, #eef6d9, transparent 45%), var(--bg); }
.auth-card { width: min(420px, 100%); background: #fff; border-radius: 18px; box-shadow: var(--shadow-lg); padding: 26px 26px 22px; }
.auth-card h2 { font-size: 20px; }
.team-line { font-size: 11.5px; color: var(--ok); }
.team-line.err { color: var(--danger); }

/* ---------- Sciebo-Ordnerauswahl ---------- */
.pk-crumbs { font-size: 13px; padding: 6px 10px; background: var(--panel-2); border-radius: 8px; }
.pk-crumbs a { text-decoration: none; }
.pk-list { border: 1px solid var(--line); border-radius: 10px; max-height: 46vh; overflow-y: auto; }
.pk-row { display: flex; gap: 8px; align-items: center; padding: 7px 12px; border-bottom: 1px solid var(--line-2); cursor: pointer; font-size: 13.5px; }
.pk-row:hover { background: var(--accent-soft); }
.pk-row.file-row { cursor: default; color: var(--muted); font-size: 12.5px; }
.pk-row.file-row:hover { background: none; }
.pk-row small { color: var(--muted); }

/* Kalenderebenen mit eigener Farbe */
.it.ctx { background: color-mix(in srgb, var(--c) 22%, white); }
.it.ctx.urlaub { background: repeating-linear-gradient(135deg, rgba(124,58,237,.22) 0 6px, rgba(124,58,237,.08) 6px 12px); }
.mgr-row { display: grid; grid-template-columns: 34px 1fr auto auto; gap: 8px; align-items: center; padding: 6px 0; border-bottom: 1px solid var(--line-2); }
.mgr-row input[type=color] { width: 30px; height: 26px; border: 1px solid var(--line); border-radius: 6px; padding: 1px; background: #fff; cursor: pointer; }
.mgr-row .inp { padding: 4px 8px; }
.ent-row { display: grid; grid-template-columns: 1fr auto auto; gap: 8px; align-items: center; padding: 4px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; }

/* ---------- Post: Projekte & Board ---------- */
.pf-sec { font-size: 11px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); font-weight: 700; padding: 12px 10px 4px; }
.pf-sec .btn { text-transform: none; letter-spacing: 0; }
.pf.proj { align-items: center; }
.pf.proj .dot { margin-right: 2px; }
.pf-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pf-tools { display: none; gap: 0; }
.pf-tools .btn { padding: 0 5px; line-height: 18px; }
.pf:hover .pf-tools { display: inline-flex; }
.pf:hover b { display: none; }
.post-cols.boarded { grid-template-columns: 230px minmax(0, 1fr); position: relative; }
.post-board { display: flex; flex-direction: column; min-width: 0; min-height: 0; background: var(--bg); }
.pb-head { display: flex; align-items: center; gap: 8px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: #fff; flex-wrap: wrap; }
.pb-head h2 { font-size: 17px; }
.pb-head select.inp { width: auto; padding: 3px 8px; font-size: 12px; }
.pb-cols { flex: 1; display: flex; gap: 12px; padding: 14px 16px; overflow: auto; align-items: flex-start; }
.pb-col { flex: 0 0 280px; background: var(--line-2); border-radius: 12px; padding: 8px; max-height: 100%; overflow-y: auto; transition: background .12s; }
.pb-col-h { display: flex; align-items: center; gap: 4px; font-weight: 600; font-size: 13.5px; padding: 2px 4px 8px; }
.pb-col-h .btn { padding: 0 5px; }
.pb-empty { padding: 14px 6px; text-align: center; border: 1.5px dashed #cdd6dd; border-radius: 8px; }
.mcard { background: #fff; border: 1px solid var(--line); border-radius: 9px; padding: 8px 10px; margin-bottom: 7px; cursor: grab; border-left: 3px solid transparent; }
.mcard:hover { box-shadow: var(--shadow); }
.mcard.unread { border-left-color: var(--accent); }
.mcard.unread .pm-from, .mcard.unread .pm-subj { font-weight: 650; }
.mcard.on { outline: 2px solid var(--accent); }
.mcard .pm-subj { white-space: normal; }
.dragging { opacity: .45; }
.mdrop-on { background: var(--accent-soft) !important; outline: 2px dashed var(--accent); }
.post-read.over { position: absolute; top: 0; right: 0; bottom: 0; width: min(720px, 62%); background: #fff; box-shadow: var(--shadow-lg); z-index: 5; border-left: 1px solid var(--line); }

/* ---------- Termine: Personen ---------- */
.guests { display: flex; flex-wrap: wrap; gap: 5px; }
.guest { display: inline-flex; align-items: center; gap: 4px; font-size: 12.5px; border: 1px solid var(--line); border-radius: 99px; padding: 2px 10px; background: #fff; }
.guest i { font-style: normal; font-weight: 700; color: var(--ok); }
.guest.own { padding-right: 2px; background: var(--panel-2); }
.guest .btn { padding: 0 5px; }

/* ---------- Kalender (Tag / Woche / Monat) ---------- */
.kc-bar { margin-bottom: 12px; }
.kc-title { font-size: 17px; margin-left: 6px; }
.kc-week { background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; display: flex; flex-direction: column; height: calc(100vh - 150px); }
.kc-whead, .kc-allday, .kc-grid { display: grid; }
.kc-whead { border-bottom: 1px solid var(--line); }
.kc-dh { padding: 8px 6px; text-align: center; cursor: pointer; border-left: 1px solid var(--line-2); }
.kc-dh small { color: var(--muted); text-transform: uppercase; font-size: 11px; }
.kc-dh b { font-size: 16px; }
.kc-dh.today b { background: var(--accent-ink); color: #fff; border-radius: 99px; padding: 0 7px; }
.kc-dh.off, .kc-adcell.off, .kc-day.off { background: var(--off); }
.kc-allday { border-bottom: 1px solid var(--line); min-height: 30px; }
.kc-adcell { border-left: 1px solid var(--line-2); padding: 3px; display: flex; flex-direction: column; gap: 2px; min-width: 0; }
.kc-axis { position: relative; font-size: 11px; color: var(--muted); padding: 6px 4px; text-align: right; }
.kc-scroll { flex: 1; overflow-y: auto; }
.kc-grid { position: relative; }
.kc-hl { position: absolute; right: 6px; transform: translateY(-6px); font-size: 11px; color: var(--muted); }
.kc-day { position: relative; border-left: 1px solid var(--line-2); cursor: cell; }
.kc-line { position: absolute; left: 0; right: 0; border-top: 1px solid var(--line-2); }
.kc-day.today { background: linear-gradient(rgba(0, 159, 227, .04), rgba(0, 159, 227, .04)); }
.kc-ev { --c: #888; position: absolute; background: color-mix(in srgb, var(--c) 18%, white); border-left: 3px solid var(--c); border-radius: 6px; padding: 2px 6px; font-size: 12px; overflow: hidden; cursor: pointer; line-height: 1.3; z-index: 2; color: color-mix(in srgb, var(--c) 60%, black); }
.kc-ev:hover { box-shadow: var(--shadow); z-index: 3; }
.kc-ev.movable { cursor: grab; }
.kc-ev b { font-weight: 600; font-variant-numeric: tabular-nums; }
.kc-ev small { display: block; opacity: .8; }
.kc-ev.dragging { opacity: .8; box-shadow: var(--shadow-lg); cursor: grabbing; }
.kc-now { position: absolute; left: 0; right: 0; height: 2px; background: var(--danger); z-index: 4; pointer-events: none; }
.kc-now::before { content: ""; position: absolute; left: -4px; top: -4px; width: 10px; height: 10px; border-radius: 50%; background: var(--danger); }
.kc-chip { --c: #888; font-size: 11.5px; border-radius: 5px; padding: 1px 6px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; cursor: pointer; }
.kc-chip.ev { background: color-mix(in srgb, var(--c) 18%, white); border-left: 3px solid var(--c); }
.kc-chip.layer { background: color-mix(in srgb, var(--c) 22%, white); cursor: default; color: var(--ink-2); }
.kc-chip.task { background: var(--panel-2); color: var(--ink-2); border: 1px dashed #cfd8df; }
.kc-month { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); background: #fff; border: 1px solid var(--line); border-radius: var(--r); box-shadow: var(--shadow); overflow: hidden; }
.kc-mh { padding: 6px 8px; font-size: 11.5px; font-weight: 700; color: var(--muted); text-transform: uppercase; border-bottom: 1px solid var(--line); }
.kc-mcell { min-height: 112px; border-right: 1px solid var(--line-2); border-bottom: 1px solid var(--line-2); padding: 4px; display: flex; flex-direction: column; gap: 2px; min-width: 0; cursor: cell; }
.kc-mcell.other { background: var(--panel-2); color: var(--muted); }
.kc-mcell.off { background: var(--off); }
.kc-mcell.today .kc-mnum span { background: var(--accent-ink); color: #fff; border-radius: 99px; padding: 0 6px; }
.kc-mnum { font-size: 12.5px; font-weight: 600; }
.kc-mnum span { cursor: pointer; }
.kc-more { font-size: 11.5px; color: var(--accent-ink); cursor: pointer; padding-left: 4px; }
/* Zeitstrahl-Rauten nicht wie die Termin-Kärtchen der Startseite (.ev) gestalten */
.it.ev { background: none; border: 0; border-radius: 0; padding: 0; }
.it.ev:hover { background: none; }
.kc-week, .kc-month { touch-action: pan-y; user-select: none; transition: transform .18s ease; }
.kc-week.panning, .kc-month.panning { transition: none; cursor: grabbing; }
.board-add { margin-top: 4px; border-style: dashed; background: transparent; font-size: 13px; }
.board-add:focus { background: #fff; border-style: solid; }

/* Wissen */
.w-cite { display: inline-flex; align-items: center; justify-content: center; min-width: 18px; height: 18px; padding: 0 4px; border-radius: 9px; background: var(--accent, #2563eb); color: #fff; font-size: 11px; font-weight: 700; text-decoration: none; vertical-align: 1px; margin: 0 1px; }
.w-hit:hover { border-color: var(--accent, #2563eb); }

/* Post als Dorf */
.dorf { flex: none; border-bottom: 1px solid var(--line); background: #dbeefe; }
.dorf-svg { display: block; width: 100%; height: 200px; }
.dorf-house { cursor: pointer; outline: none; }
.dorf-house > *:not(.dorf-glow) { transition: transform .15s; }
.dorf-house:hover > *:not(.dorf-glow), .dorf-house:focus-visible > *:not(.dorf-glow) { transform: translateY(-3px); }
.dorf-glow { fill: #fde68a; opacity: 0; transition: opacity .15s; }
.dorf-house.on .dorf-glow { opacity: .9; }
.dorf-house:hover .dorf-glow { opacity: .45; }
.dorf-house.mdrop-on .dorf-glow { fill: #86efac; opacity: 1; }
.post-cols.dorfed { grid-template-columns: 236px 360px minmax(0, 1fr); }
.post-cols.dorfed.boarded { grid-template-columns: 236px minmax(0, 1fr); }
.dorf-nav { padding: 10px 10px 16px; }
.dorf-rooms { display: flex; flex-direction: column; gap: 8px; }
.dr-crumbs { font-weight: 700; font-size: 15px; margin: 0 2px 2px; }
.dr-crumbs a { cursor: pointer; }
.dr-crumbs a:hover { text-decoration: underline; }
.room { border: 1px solid var(--line); border-radius: 12px; background: #fff; padding: 8px 10px; cursor: pointer; transition: box-shadow .15s, border-color .15s, transform .15s; }
.room:hover { box-shadow: var(--shadow, 0 4px 14px rgba(15,23,42,.08)); transform: translateY(-1px); }
.room.on { border-color: #f59e0b; box-shadow: 0 0 0 2px #fde68a; }
.room.mdrop-on { border-color: #22c55e; box-shadow: 0 0 0 3px #bbf7d0; }
.room-name { font-weight: 700; font-size: 13px; }
.room.pic { padding: 8px 8px 2px; }
.room-svg { display: block; width: 100%; height: auto; margin-top: 2px; }
.room-u { background: #ef4444; color: #fff; border-radius: 99px; font-size: 10.5px; padding: 0 6px; margin-left: 4px; }
@media (max-width: 1250px) { .post-cols.dorfed { grid-template-columns: 200px 290px minmax(0, 1fr); } .dorf-svg { height: 170px; } }
