/* New Horizon Team-Portal */
@font-face { font-family: Inter; font-weight: 400; font-display: swap; src: url(/fonts/inter/inter-latin-400-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 500; font-display: swap; src: url(/fonts/inter/inter-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 600; font-display: swap; src: url(/fonts/inter/inter-latin-600-normal.woff2) format("woff2"); }
@font-face { font-family: Inter; font-weight: 700; font-display: swap; src: url(/fonts/inter/inter-latin-700-normal.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 500; font-display: swap; src: url(/fonts/space-grotesk/space-grotesk-latin-500-normal.woff2) format("woff2"); }
@font-face { font-family: "Space Grotesk"; font-weight: 700; font-display: swap; src: url(/fonts/space-grotesk/space-grotesk-latin-700-normal.woff2) format("woff2"); }

:root {
  --bg: #0E0A1F; --side: #140F2B; --panel: #171230; --panel2: #1A1436; --deep: #130E28; --input: #0E0A1F;
  --line: #2A2350; --line2: #241D46; --line3: #3A3170; --sel: #2A1F55;
  --text: #F4F1FF; --soft: #CFC8EE; --muted: #A79FCC; --dim: #8F86B8;
  --pink: #FF3EA5; --pink2: #FF6EBB; --cyan: #48D6FF; --gold: #FFD678; --orange: #FF8A3D; --green: #7CE0A8; --violet: #B9A6FF;
  --ink: #1A0B24; --r: 14px;
  color-scheme: dark;
}
* { box-sizing: border-box; }
html, body { margin: 0; background: var(--bg); color: var(--text); }
body { font: 400 15px/1.5 Inter, system-ui, -apple-system, "Segoe UI", sans-serif; -webkit-font-smoothing: antialiased; }
a { color: var(--cyan); }
a:hover { color: #8FE6FF; }
h1, h2, h3 { font-family: "Space Grotesk", Inter, sans-serif; margin: 0; line-height: 1.2; }
h1 { font-size: 32px; font-weight: 700; }
h2 { font-size: 19px; font-weight: 700; }
h3 { font-size: 16px; font-weight: 700; }
p { margin: 0; }
:focus-visible { outline: 2px solid var(--cyan); outline-offset: 2px; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; }
.muted { color: var(--muted); }
.soft { color: var(--soft); }
.small { font-size: 13px; }
.tiny { font-size: 12px; }
.nowrap { white-space: nowrap; }

/* ---------- Layout ---------- */
.layout { display: flex; flex-wrap: wrap; min-height: 100vh; align-items: stretch; }
.side { flex: 1 1 240px; max-width: 280px; background: var(--side); border-right: 1px solid var(--line); padding: 24px 16px; display: flex; flex-direction: column; gap: 28px; }
.brand { display: flex; align-items: center; gap: 12px; padding: 0 8px; color: var(--text); text-decoration: none; }
.brand img { width: 48px; height: 41px; object-fit: contain; }
.brand b { display: block; font-family: "Space Grotesk", sans-serif; font-size: 17px; }
.brand span { display: block; font-size: 12px; color: var(--muted); }
.nav { display: flex; flex-direction: column; gap: 4px; }
.nav a { display: flex; align-items: center; gap: 12px; min-height: 44px; padding: 0 12px; border-radius: 10px; color: var(--soft); text-decoration: none; font-weight: 500; }
.nav a:hover { background: #1E1840; color: var(--text); }
.nav a.on { background: var(--sel); color: #fff; font-weight: 600; }
.nav a.on svg { stroke: var(--pink); }
.nav a .grow { flex: 1; }
.count { font-size: 12px; font-weight: 700; border-radius: 999px; padding: 2px 8px; color: var(--bg); background: var(--cyan); }
.count.pink { background: var(--pink); color: var(--ink); }
.count.gold { background: var(--gold); color: var(--bg); }
.me { margin-top: auto; display: flex; align-items: center; gap: 12px; padding: 12px; border-radius: 12px; background: #1B1538; border: 1px solid var(--line); }
.me .who { flex: 1; min-width: 0; display: flex; flex-direction: column; }
.me .who a { color: var(--text); text-decoration: none; font-weight: 600; font-size: 14px; }
.me .who span { font-size: 12px; }
.main { flex: 999 1 560px; min-width: 0; padding: 32px 32px 48px; display: flex; flex-direction: column; gap: 22px; }
.head { display: flex; flex-wrap: wrap; align-items: flex-end; justify-content: space-between; gap: 16px; }
.head .t { display: flex; flex-direction: column; gap: 6px; }
.head .tools { display: flex; flex-wrap: wrap; gap: 12px; align-items: center; }
.split { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.split > .grow { flex: 999 1 560px; min-width: 0; display: flex; flex-direction: column; gap: 20px; }
.split > .aside { flex: 1 1 300px; max-width: 360px; display: flex; flex-direction: column; gap: 20px; }
.cols { display: flex; flex-wrap: wrap; gap: 24px; align-items: flex-start; }
.cols > .a { flex: 3 1 460px; min-width: 0; }
.cols > .b { flex: 2 1 320px; min-width: 0; display: flex; flex-direction: column; gap: 24px; }
.stack { display: flex; flex-direction: column; gap: 12px; }
.row { display: flex; align-items: center; gap: 12px; }
.row.wrap { flex-wrap: wrap; }
.spacer { flex: 1; }

@media (max-width: 860px) {
  .side { max-width: none; min-width: 0; flex-basis: 100%; padding: 12px; gap: 10px; border-right: 0; border-bottom: 1px solid var(--line); flex-direction: row; flex-wrap: wrap; align-items: center; }
  .brand img { width: 36px; height: 31px; }
  .nav { flex-direction: row; overflow-x: auto; flex: 1 1 100%; min-width: 0; order: 3; scrollbar-width: none; }
  .nav a { white-space: nowrap; }
  .me { margin: 0 0 0 auto; padding: 6px 10px; }
  .me .via { display: none; }
  .main { padding: 20px 14px 40px; flex-basis: 100%; }
  .split > .aside { max-width: none; }
  .convs { max-width: none; }
  h1 { font-size: 26px; }
}

/* ---------- Bausteine ---------- */
.card { background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 22px; }
.card.accent { border-color: var(--pink); }
.card.tight { padding: 16px; }
.card > h2 + * { margin-top: 12px; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 8px; }
.card-head a { font-size: 14px; font-weight: 600; text-decoration: none; }
.stats { display: grid; grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); gap: 16px; }
.stat { background: var(--panel); border: 1px solid var(--line); border-radius: var(--r); padding: 20px; display: flex; flex-direction: column; gap: 6px; text-decoration: none; color: var(--text); }
a.stat:hover { border-color: var(--line3); color: var(--text); }
.stat .l { font-size: 13px; color: var(--muted); }
.stat .n { font-family: "Space Grotesk", sans-serif; font-size: 36px; font-weight: 700; line-height: 1.1; }
.stat .s { font-size: 13px; color: var(--muted); }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; min-height: 44px; padding: 0 18px; border-radius: 10px; border: 1px solid var(--line3); background: transparent; color: var(--text); font: 600 14px Inter, sans-serif; text-decoration: none; cursor: pointer; }
.btn:hover { background: #1E1840; color: var(--text); }
.btn.primary { background: var(--pink); border-color: var(--pink); color: var(--ink); font-weight: 700; }
.btn.primary:hover { background: #ff5cb4; }
.btn.sm { min-height: 36px; padding: 0 12px; font-size: 13px; border-radius: 9px; }
.btn.danger { border-color: #6b2a3f; color: #FF9DB0; }
.btn.danger:hover { background: #2a1224; }
.btn.block { width: 100%; }
.linkbtn { background: none; border: 0; padding: 0; color: var(--cyan); font: inherit; cursor: pointer; text-decoration: underline; }
.iconbtn { width: 40px; height: 40px; border-radius: 10px; border: 1px solid var(--line3); background: transparent; color: var(--text); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; text-decoration: none; }
.iconbtn:hover { background: #1E1840; }
form.inline { display: inline; margin: 0; }

.tag { display: inline-block; font-size: 12px; font-weight: 700; border-radius: 6px; padding: 3px 8px; white-space: nowrap; }
.av { flex: none; border-radius: 999px; display: inline-flex; align-items: center; justify-content: center; font-weight: 700; color: var(--bg); width: 36px; height: 36px; font-size: 14px; }
.av.s { width: 26px; height: 26px; font-size: 12px; }
.av.l { width: 40px; height: 40px; font-size: 16px; }
.dot { width: 8px; height: 8px; border-radius: 999px; display: inline-block; flex: none; }

.seg { display: flex; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; padding: 3px; }
.seg a { min-height: 38px; padding: 0 14px; border-radius: 8px; display: inline-flex; align-items: center; color: var(--soft); text-decoration: none; font-size: 13px; font-weight: 500; }
.seg a.on { background: var(--sel); color: #fff; font-weight: 600; }
.search { display: flex; align-items: center; gap: 8px; min-height: 44px; padding: 0 12px; background: var(--panel); border: 1px solid var(--line); border-radius: 10px; }
.search input { width: 160px; background: transparent; border: 0; outline: none; color: var(--text); font: 14px Inter, sans-serif; }

.field { display: flex; flex-direction: column; gap: 6px; font-size: 13px; font-weight: 600; color: var(--soft); }
.field input, .field select, .field textarea, .input { min-height: 42px; width: 100%; padding: 0 12px; background: var(--input); border: 1px solid var(--line3); border-radius: 9px; color: var(--text); font: 400 14px Inter, sans-serif; }
.field textarea, textarea.input { padding: 10px 12px; line-height: 1.5; resize: vertical; }
.field input:focus, .field select:focus, .field textarea:focus, .input:focus { border-color: var(--cyan); outline: none; }
.field .hint { font-weight: 400; color: var(--muted); font-size: 12px; }
.fields2 { display: flex; gap: 12px; }
.fields2 > * { flex: 1; min-width: 0; }
.pw { position: relative; display: block; }
.pw input { padding-right: 52px; }
.pw-toggle { position: absolute; top: 50%; right: 4px; transform: translateY(-50%); width: 44px; height: 38px; border: 0; border-radius: 8px; background: transparent; color: var(--muted); display: inline-flex; align-items: center; justify-content: center; cursor: pointer; }
.pw-toggle:hover, .pw-toggle[aria-pressed="true"] { color: var(--text); }
.check { display: flex; align-items: flex-start; gap: 10px; font-size: 13px; line-height: 1.45; color: var(--soft); cursor: pointer; }
.check input { width: 18px; height: 18px; margin: 1px 0 0; accent-color: var(--pink); flex: none; }
.radios { display: grid; grid-template-columns: repeat(auto-fit, minmax(90px, 1fr)); gap: 6px; }
.radios label { position: relative; }
.radios input { position: absolute; opacity: 0; inset: 0; }
.radios span { display: flex; align-items: center; justify-content: center; min-height: 40px; padding: 0 8px; border-radius: 9px; border: 1px solid var(--line3); color: var(--soft); font-size: 13px; font-weight: 600; cursor: pointer; text-align: center; }
.radios input:checked + span { border-color: var(--cyan); background: rgba(72,214,255,0.12); color: var(--cyan); }
.radios input:focus-visible + span { outline: 2px solid var(--cyan); outline-offset: 2px; }
.form { display: flex; flex-direction: column; gap: 16px; }
.picker { border: 1px solid var(--line3); border-radius: 9px; background: var(--input); }
.picker summary { min-height: 42px; padding: 0 12px; display: flex; align-items: center; cursor: pointer; list-style: none; font-weight: 400; color: var(--text); font-size: 14px; }
.picker summary::-webkit-details-marker { display: none; }
.picker summary::after { content: "▾"; margin-left: auto; color: var(--muted); }
.picker .opts { max-height: 220px; overflow: auto; padding: 6px 12px 12px; display: flex; flex-direction: column; gap: 8px; border-top: 1px solid var(--line2); }

.flash { border-radius: 12px; padding: 12px 16px; font-size: 14px; border: 1px solid; }
.flash.ok { border-color: #2f6b52; background: rgba(124,224,168,0.08); color: #B5F0CF; }
.flash.error { border-color: #7a3550; background: rgba(255,62,165,0.08); color: #FFB3D7; }
.errors { margin: 0; padding: 12px 16px 12px 32px; border-radius: 12px; border: 1px solid #7a3550; background: rgba(255,62,165,0.08); color: #FFB3D7; font-size: 14px; }
.empty { color: var(--muted); font-size: 14px; padding: 8px 0; }

/* ---------- Listen ---------- */
.list > .item { display: flex; align-items: center; gap: 14px; padding: 13px 0; border-top: 1px solid var(--line2); }
.list > .item:first-child { border-top: 0; }
.item .main-txt { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 3px; }
.item .main-txt a { color: var(--text); text-decoration: none; font-weight: 600; }
.item .main-txt a:hover { color: var(--cyan); }
.tickbox { width: 22px; height: 22px; border-radius: 6px; border: 2px solid var(--line3); background: transparent; cursor: pointer; flex: none; display: inline-flex; align-items: center; justify-content: center; color: transparent; padding: 0; }
.tickbox:hover { border-color: var(--pink); color: var(--pink); }
.tickbox.on { background: var(--pink); border-color: var(--pink); color: var(--ink); }

/* ---------- Aufgaben ---------- */
.kanban { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px; align-items: start; }
@media (max-width: 1100px) { .kanban { grid-template-columns: minmax(0, 1fr); } }
.kcol { background: var(--deep); border: 1px solid var(--line2); border-radius: 14px; padding: 14px; display: flex; flex-direction: column; gap: 12px; min-height: 120px; }
.kcol.drop { border-color: var(--cyan); background: #161033; }
.kcol-head { display: flex; align-items: center; gap: 8px; padding: 2px 4px; }
.kcol-head h2 { font-size: 16px; flex: 1; }
.tcard { display: block; background: var(--panel2); border: 1px solid var(--line); border-radius: 12px; padding: 14px; color: var(--text); text-decoration: none; }
.tcard:hover { border-color: var(--line3); color: var(--text); }
.tcard[draggable="true"] { cursor: grab; }
.tcard.dragging { opacity: .4; }
.tcard.done { opacity: .72; }
.tcard .tags { display: flex; flex-wrap: wrap; gap: 6px; }
.tcard .ttl { display: block; font-weight: 600; font-size: 14px; line-height: 1.4; margin: 10px 0; }
.tcard .foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; }
.tcard .who { display: flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: var(--soft); }
.tcard .who span:last-child { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.bar { flex: 1; height: 5px; background: var(--line); border-radius: 999px; overflow: hidden; }
.bar > i { display: block; height: 5px; background: var(--cyan); }
.steps { display: flex; align-items: center; gap: 8px; margin-bottom: 10px; font-size: 12px; color: var(--muted); }

/* ---------- Nachrichten ---------- */
.chat { display: flex; flex-wrap: wrap; gap: 20px; align-items: stretch; }
.convs { flex: 1 1 240px; max-width: 290px; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 18px 12px; display: flex; flex-direction: column; gap: 18px; }
.convs .lbl { font-size: 11px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--muted); padding: 0 10px 6px; }
.convs a { display: flex; align-items: center; gap: 10px; min-height: 42px; padding: 0 10px; border-radius: 9px; color: var(--soft); text-decoration: none; font-size: 14px; }
.convs a:hover { background: #1E1840; color: var(--text); }
.convs a.on { background: var(--sel); color: #fff; font-weight: 600; }
.convs a.unread { color: #fff; font-weight: 600; }
.convs .hash { color: var(--muted); font-weight: 700; }
.convs .grow { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.thread { flex: 999 1 480px; min-width: 0; background: var(--panel); border: 1px solid var(--line); border-radius: 16px; display: flex; flex-direction: column; min-height: 640px; }
.thread-head { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px; border-bottom: 1px solid var(--line); }
.pins { padding: 14px 22px 0; display: flex; flex-direction: column; gap: 10px; }
.pin { border: 1px solid var(--pink); background: #1E1440; border-radius: 12px; padding: 14px 16px; display: flex; flex-direction: column; gap: 8px; }
.pin .pin-l { font-size: 12px; font-weight: 700; letter-spacing: .8px; text-transform: uppercase; color: var(--pink2); display: flex; align-items: center; gap: 8px; }
.msgs { flex: 1; padding: 20px 22px; display: flex; flex-direction: column; gap: 18px; max-height: 62vh; overflow-y: auto; }
.msg { display: flex; gap: 14px; }
.msg .body { flex: 1; min-width: 0; display: flex; flex-direction: column; gap: 4px; }
.msg .meta { display: flex; align-items: baseline; gap: 8px; flex-wrap: wrap; }
.msg .meta b { font-size: 15px; }
.msg .txt { font-size: 14px; line-height: 1.55; color: #E4DFFA; overflow-wrap: anywhere; }
.msg .acts { margin-left: auto; display: flex; gap: 10px; opacity: 0; transition: opacity .12s; }
.msg:hover .acts, .msg:focus-within .acts { opacity: 1; }
.msg .acts button { background: none; border: 0; color: var(--muted); font: 500 12px Inter, sans-serif; cursor: pointer; padding: 2px 0; }
.msg .acts button:hover { color: var(--text); }
.sys { display: flex; align-items: center; gap: 10px; padding: 10px 14px; border-radius: 10px; background: #1E1840; font-size: 13px; color: var(--soft); }
.composer { margin: 0 22px 22px; padding: 12px; border: 1px solid var(--line3); border-radius: 14px; background: var(--input); display: flex; flex-direction: column; gap: 10px; }
.composer textarea { background: transparent; border: 0; outline: none; resize: vertical; min-height: 48px; color: var(--text); font: 14px/1.5 Inter, sans-serif; }
.composer .row { flex-wrap: wrap; }
.composer .btn { margin-left: auto; }

/* ---------- Abmeldungen ---------- */
.gantt { overflow-x: auto; }
.gantt-in { min-width: 680px; display: flex; flex-direction: column; gap: 6px; }
.grow-row { display: grid; grid-template-columns: 150px repeat(14, minmax(0, 1fr)); gap: 3px; align-items: center; }
.grow-row.days { align-items: end; }
.day { display: flex; flex-direction: column; align-items: center; gap: 2px; padding: 6px 0; border-radius: 8px; }
.day .wd { font-size: 11px; color: var(--muted); }
.day .num { font-size: 14px; font-weight: 700; color: #E4DFFA; }
.day.we .wd { color: var(--dim); }
.day.we .num { color: var(--muted); }
.day.today { background: rgba(255,62,165,0.22); }
.day.today .wd { color: var(--pink2); }
.day.today .num { color: #fff; }
.grow-row.person { min-height: 42px; border-top: 1px solid var(--line2); }
.grow-row .who { grid-column: 1 / 2; grid-row: 1; display: flex; align-items: center; gap: 8px; min-width: 0; }
.grow-row .who span { display: flex; flex-direction: column; min-width: 0; font-size: 13px; font-weight: 600; }
.grow-row .who small { font-size: 11px; color: var(--muted); font-weight: 400; }
.todaycol { grid-row: 1; align-self: stretch; background: rgba(255,62,165,0.10); border-radius: 6px; }
.absbar { grid-row: 1; height: 26px; border-radius: 7px; border: 1px solid; font-size: 11px; font-weight: 700; display: flex; align-items: center; padding: 0 8px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.legend { display: flex; flex-wrap: wrap; gap: 18px; padding-top: 10px; font-size: 12px; color: var(--soft); }
.legend span { display: flex; align-items: center; gap: 6px; }
.legend i { width: 14px; height: 10px; border-radius: 3px; display: inline-block; border: 1px solid transparent; }

/* ---------- Team ---------- */
.tbl { overflow-x: auto; }
.tbl table { width: 100%; min-width: 680px; border-collapse: collapse; font-size: 14px; }
.tbl th { text-align: left; color: var(--muted); font-size: 12px; text-transform: uppercase; letter-spacing: .6px; font-weight: 600; padding: 12px 8px; }
.tbl td { padding: 12px 8px; border-top: 1px solid var(--line2); vertical-align: middle; }
.tbl .person { display: flex; align-items: center; gap: 10px; }
.tbl .person span { display: flex; flex-direction: column; }
.manage { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.manage select { min-height: 36px; background: var(--input); border: 1px solid var(--line3); border-radius: 8px; color: var(--text); font: 13px Inter, sans-serif; padding: 0 8px; }
details.more summary { cursor: pointer; color: var(--cyan); font-size: 13px; font-weight: 600; list-style: none; }
details.more summary::-webkit-details-marker { display: none; }
details.more[open] summary { margin-bottom: 10px; }
.temp { font: 700 22px/1.4 ui-monospace, SFMono-Regular, Menlo, monospace; letter-spacing: 1px; padding: 14px 18px; border-radius: 12px; background: var(--input); border: 1px dashed var(--gold); color: var(--gold); user-select: all; }

.swatch { position: relative; cursor: pointer; }
.swatch input { position: absolute; opacity: 0; inset: 0; }
.swatch input:checked + .av { outline: 3px solid #fff; outline-offset: 2px; }
.swatch input:focus-visible + .av { outline: 3px solid var(--cyan); outline-offset: 2px; }

/* ---------- Anmeldung ---------- */
.auth { min-height: 100vh; display: flex; align-items: center; justify-content: center; padding: 32px 16px; background: radial-gradient(1200px 600px at 50% -10%, #2A1450 0%, var(--bg) 60%); }
.auth-box { width: 100%; max-width: 420px; display: flex; flex-direction: column; gap: 20px; }
.auth-brand { display: flex; flex-direction: column; align-items: center; gap: 10px; text-align: center; }
.auth-brand img { width: 120px; height: auto; }
.auth .card { padding: 28px; }
.hp { position: absolute; left: -10000px; width: 1px; height: 1px; overflow: hidden; }
