/* ================================================================
   Fäden. Lisas CRM im Look von bodner-consulting.com
   ================================================================ */
@font-face { font-family: "Outfit"; src: url("../fonts/outfit-var.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
@font-face { font-family: "JetBrains Mono"; src: url("../fonts/jetbrains-mono.woff2") format("woff2"); font-weight: 400; font-display: swap; }

:root {
  --bg: #fafafa;
  --ink: #18181b;
  --ink-2: #52525b;
  --ink-3: #71717a;
  --line: #e4e4e7;
  --line-2: #d4d4d8;
  --panel: #ffffff;
  --lead: #8b7cf6;
  --kunde: #f472b6;
  --upsell: #fbbf24;
  --sky: #38bdf8;
  --ok: #16a34a;
  --bad: #e11d48;
  --grad: linear-gradient(100deg, #7c6cf0 0%, #ec4899 55%, #f59e0b 100%);
  --grad-btn: linear-gradient(105deg, #38bdf8, #8b7cf6 50%, #f472b6);
  --ease: cubic-bezier(0.16, 1, 0.3, 1);
  --mono: "JetBrains Mono", ui-monospace, monospace;
  --radius: 22px;
}

* { margin: 0; padding: 0; box-sizing: border-box; }
[hidden] { display: none !important; }
html { scroll-behavior: smooth; }
html, body { overflow-x: clip; }
body {
  min-height: 100dvh;
  background: var(--bg);
  color: var(--ink);
  font-family: "Outfit", ui-sans-serif, system-ui, sans-serif;
  font-weight: 400;
  -webkit-font-smoothing: antialiased;
}
button, input, select, textarea { font: inherit; color: inherit; }
a { color: inherit; }
::selection { background: rgba(139, 124, 246, 0.25); }

/* ---- Nebel in den Markenfarben, wie im Hero der Webseite ---- */
.mist { position: fixed; inset: 0; pointer-events: none; z-index: -1; overflow: hidden; }
.mist i { position: absolute; width: 46vmax; aspect-ratio: 1; border-radius: 50%; opacity: 0.2; }
.m-purple { left: -6%; top: -18%; background: radial-gradient(circle, rgba(139,124,246,0.9) 0%, rgba(139,124,246,0.35) 35%, transparent 70%); }
.m-pink { right: -10%; top: 6%; background: radial-gradient(circle, rgba(244,114,182,0.9) 0%, rgba(244,114,182,0.35) 35%, transparent 70%); }
.m-sky { left: 14%; bottom: -30%; background: radial-gradient(circle, rgba(56,189,248,0.9) 0%, rgba(56,189,248,0.35) 35%, transparent 70%); opacity: 0.14; }
.m-amber { right: 8%; bottom: -24%; width: 34vmax; background: radial-gradient(circle, rgba(251,191,36,0.9) 0%, rgba(251,191,36,0.35) 35%, transparent 70%); opacity: 0.16; }

/* ---- Navigation ---- */
.nav {
  position: sticky; top: 0; z-index: 40;
  display: flex; align-items: center; justify-content: space-between; gap: 1rem;
  padding: 0.75rem clamp(1rem, 4vw, 2.5rem);
  background: rgba(250, 250, 250, 0.78);
  -webkit-backdrop-filter: blur(14px);
  backdrop-filter: blur(14px);
  box-shadow: 0 1px 0 rgba(24, 24, 27, 0.07);
}
.brand { display: flex; align-items: center; gap: 0.6rem; text-decoration: none; }
.brand img { width: 30px; height: 30px; }
.brand span { display: flex; flex-direction: column; line-height: 1.05; }
.brand strong { font-size: 1.02rem; font-weight: 600; letter-spacing: -0.01em; }
.brand em { font-style: normal; font: 0.6rem var(--mono); text-transform: uppercase; letter-spacing: 0.18em; color: var(--ink-3); }
.tabs { display: flex; gap: 0.25rem; padding: 0.25rem; border-radius: 999px; background: rgba(255,255,255,0.7); border: 1px solid var(--line); }
.tabs a { padding: 0.42rem 0.95rem; border-radius: 999px; font-size: 0.9rem; color: var(--ink-2); text-decoration: none; transition: color 0.2s, background 0.2s; }
.tabs a:hover { color: var(--ink); }
.tabs a.on { color: var(--ink); background: rgba(139, 124, 246, 0.14); font-weight: 500; }
.nav-right { display: flex; align-items: center; gap: 0.6rem; }
.icon-btn { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 50%; color: var(--ink-2); border: 1px solid var(--line); background: rgba(255,255,255,0.7); transition: color 0.2s, border-color 0.2s; }
.icon-btn:hover, .icon-btn.on { color: var(--ink); border-color: #a1a1aa; }
button.icon-btn { cursor: pointer; }
.save-state { font: 0.66rem var(--mono); letter-spacing: 0.06em; color: var(--ink-3); display: inline-flex; align-items: center; gap: 0.4rem; white-space: nowrap; }
.save-state::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: #a1a1aa; }
.save-state.ok::before { background: #22c55e; }
.save-state.busy::before { background: var(--upsell); }
.save-state.bad { color: var(--bad); }
.save-state.bad::before { background: var(--bad); }

.banner { position: sticky; top: 62px; z-index: 39; margin: 0.75rem auto 0; max-width: 1240px; width: calc(100% - 2rem); padding: 0.8rem 1rem; border-radius: 14px; background: #fff1f3; border: 1.5px solid #fda4af; color: #9f1239; font-size: 0.92rem; display: flex; gap: 0.8rem; align-items: center; flex-wrap: wrap; }

/* ---- Seite ---- */
.page { max-width: 1240px; margin: 0 auto; padding: clamp(1.6rem, 4vw, 3rem) clamp(1rem, 4vw, 2.5rem) 9rem; outline: none; }
.eyebrow { font: 0.6875rem var(--mono); text-transform: uppercase; letter-spacing: 0.22em; color: var(--ink-3); display: flex; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }
.eyebrow::before { content: ""; width: 8px; height: 8px; border-radius: 50%; background: linear-gradient(135deg, var(--lead), var(--kunde)); }
h1 { font-size: clamp(2rem, 4.4vw, 3.3rem); font-weight: 500; letter-spacing: -0.035em; line-height: 1.04; }
h2 { font-size: 1.25rem; font-weight: 600; letter-spacing: -0.02em; }
h3 { font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.grad { background: var(--grad); -webkit-background-clip: text; background-clip: text; color: transparent; }
.lede { margin-top: 0.8rem; font-size: 1.06rem; font-weight: 300; line-height: 1.55; color: var(--ink-2); max-width: 56ch; }
.head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1.5rem; flex-wrap: wrap; margin-bottom: 2rem; }
.muted { color: var(--ink-3); }
.mono { font-family: var(--mono); }
.small { font-size: 0.85rem; }

/* ---- Karten ---- */
.card { background: var(--panel); border: 2px solid var(--ink); border-radius: var(--radius); box-shadow: 0 10px 0 rgba(24, 24, 27, 0.07); padding: 1.3rem 1.4rem; }
.soft { background: rgba(255,255,255,0.86); border: 1px solid var(--line); border-radius: 18px; padding: 1.1rem 1.2rem; }
.card-head { display: flex; justify-content: space-between; align-items: center; gap: 0.6rem; margin-bottom: 0.9rem; }
.card-head .k { font: 0.72rem var(--mono); color: var(--ink-3); }

/* ---- Kennzahlen ---- */
.kpis { display: grid; grid-template-columns: repeat(4, 1fr); gap: 1rem; margin-bottom: 2.2rem; }
.kpi { position: relative; overflow: hidden; }
.kpi::after { content: ""; position: absolute; inset: auto 0 0 0; height: 3px; background: var(--c, var(--lead)); opacity: 0.85; }
.kpi .k { font: 0.66rem var(--mono); text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-3); }
.kpi .v { margin-top: 0.45rem; font-size: 1.75rem; font-weight: 600; letter-spacing: -0.03em; }
.kpi .s { margin-top: 0.15rem; font-size: 0.84rem; color: var(--ink-3); }
.kpi .s b { color: var(--ink); font-weight: 500; }
.kpi .s .late { color: var(--bad); font-weight: 500; }

/* ---- Knöpfe, Chips, Pillen ---- */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 0.45rem; padding: 0.68rem 1.25rem; border-radius: 999px; border: 0; background: var(--ink); color: #fff; font-size: 0.92rem; font-weight: 500; text-decoration: none; cursor: pointer; transition: transform 0.15s var(--ease), background 0.2s, box-shadow 0.2s; white-space: nowrap; }
.btn:hover { transform: translateY(-1px); }
.btn:active { transform: scale(0.97); }
.btn-grad { color: #fff; background: var(--grad-btn); background-size: 160% 100%; box-shadow: 0 14px 30px -14px rgba(139, 124, 246, 0.7); transition: transform 0.15s var(--ease), background-position 0.5s var(--ease); }
.btn-grad:hover { background-position: 100% 0; }
.btn-ghost { background: rgba(255,255,255,0.8); color: var(--ink); border: 1px solid var(--line-2); }
.btn-ghost:hover { border-color: #a1a1aa; }
.btn-danger { background: #fff; color: var(--bad); border: 1px solid #fecdd3; }
.btn-sm { padding: 0.45rem 0.9rem; font-size: 0.84rem; }
.btn-xs { padding: 0.28rem 0.65rem; font-size: 0.78rem; }
.btn[disabled] { opacity: 0.45; cursor: not-allowed; transform: none; }
.link { background: none; border: 0; color: #4f55e6; font-weight: 500; cursor: pointer; text-decoration: none; font-size: 0.9rem; }
.link:hover { text-decoration: underline; }
.x-btn { background: none; border: 0; color: var(--ink-3); cursor: pointer; padding: 0.15rem 0.35rem; border-radius: 6px; font-size: 0.95rem; line-height: 1; opacity: 0; transition: opacity 0.15s, color 0.15s; }
.x-btn:hover { color: var(--bad); }
.x-btn:focus-visible { opacity: 1; }

.chips { display: flex; gap: 0.4rem; flex-wrap: wrap; }
.chip { padding: 0.42rem 0.85rem; border-radius: 999px; border: 1px solid var(--line-2); background: rgba(255,255,255,0.8); font-size: 0.86rem; color: var(--ink-2); cursor: pointer; transition: all 0.2s var(--ease); }
.chip:hover { color: var(--ink); border-color: #a1a1aa; }
.chip.on { background: var(--ink); color: #fff; border-color: var(--ink); }
.chip .n { font: 0.68rem var(--mono); opacity: 0.7; margin-left: 0.3rem; }
.chip input { display: none; }

.pill { display: inline-flex; align-items: center; gap: 0.35rem; font: 400 0.66rem var(--mono); color: #fff; background: var(--ink); border-radius: 999px; padding: 0.22rem 0.6rem; white-space: nowrap; letter-spacing: 0.02em; }
.pill.st { color: var(--ink); background: var(--tint); }
.pill.st::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: var(--c); }
.pill.line { background: transparent; color: var(--ink-2); border: 1px solid var(--line-2); }
.pill.check { background: #fff7ed; color: #9a3412; border: 1px solid #fed7aa; cursor: pointer; }
.pill.paused { background: #f4f4f5; color: var(--ink-2); }
.pill.lost { background: #fff1f2; color: #9f1239; }
.pill.ok { background: #dcfce7; color: #166534; }
.pill.warn { background: #fef3c7; color: #92400e; }

/* ---- Eingaben ---- */
.in { width: 100%; padding: 0.62rem 0.8rem; border: 1px solid var(--line-2); border-radius: 12px; background: #fff; font-size: 0.93rem; transition: border-color 0.2s, box-shadow 0.2s; }
.in:focus { outline: none; border-color: var(--lead); box-shadow: 0 0 0 3px rgba(139, 124, 246, 0.18); }
.in.bare { border-color: transparent; background: transparent; padding-left: 0.4rem; padding-right: 0.4rem; }
.in.bare:hover { border-color: var(--line); background: #fff; }
.in.bare:focus { border-color: var(--lead); background: #fff; }
textarea.in { resize: vertical; min-height: 4.2rem; line-height: 1.45; }
label.f { display: flex; flex-direction: column; gap: 0.3rem; font-size: 0.78rem; color: var(--ink-3); }
label.f > span { font: 0.64rem var(--mono); text-transform: uppercase; letter-spacing: 0.14em; }
.grid2 { display: grid; grid-template-columns: 1fr 1fr; gap: 0.75rem; }
.grid3 { display: grid; grid-template-columns: repeat(3, 1fr); gap: 0.75rem; }
.hint { font: 0.68rem var(--mono); color: var(--ink-3); }
.hint.bad { color: var(--bad); }
.hint.good { color: var(--ok); }

/* ---- Fäden-Übersicht ---- */
.filter-bar { display: flex; justify-content: space-between; align-items: center; gap: 1rem; flex-wrap: wrap; margin-bottom: 0.9rem; }
.toggle { display: inline-flex; align-items: center; gap: 0.45rem; font-size: 0.86rem; color: var(--ink-2); cursor: pointer; }
.toggle input { accent-color: var(--lead); width: 15px; height: 15px; }
.threads { position: relative; }
.t-grid { display: grid; grid-template-columns: minmax(180px, 250px) minmax(0, 1fr) minmax(150px, 210px); gap: 1.2rem; align-items: center; }
.t-head { padding: 0 1.1rem 0.5rem; font: 0.64rem var(--mono); text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-3); }
.t-stages { position: relative; height: 1rem; }
.t-stages span { position: absolute; transform: translateX(-50%); white-space: nowrap; display: inline-flex; align-items: center; gap: 0.35rem; }
.t-stages span::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: var(--c); }
.t-right-h { text-align: right; }
.t-row { position: relative; padding: 0.85rem 1.1rem; border-radius: 18px; border: 1px solid transparent; text-decoration: none; color: inherit; cursor: pointer; transition: background 0.3s var(--ease), border-color 0.3s, transform 0.3s var(--ease); }
.t-row + .t-row { margin-top: 0.25rem; }
.t-row:hover, .t-row:focus-visible { background: rgba(255,255,255,0.92); border-color: var(--line); outline: none; }
.t-row:hover .th-done { stroke-width: 3.4; }
.t-row:focus-visible { box-shadow: 0 0 0 3px rgba(139, 124, 246, 0.35); }
.t-name { min-width: 0; }
.t-name b { display: block; font-size: 1.02rem; font-weight: 600; letter-spacing: -0.015em; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-name small { display: flex; gap: 0.4rem; align-items: center; margin-top: 0.25rem; font: 0.68rem var(--mono); color: var(--ink-3); white-space: nowrap; overflow: hidden; }
.t-stand { margin-top: 0.3rem; font-size: 0.8rem; font-weight: 300; color: var(--ink-2); display: -webkit-box; -webkit-line-clamp: 1; -webkit-box-orient: vertical; overflow: hidden; }
.t-right { text-align: right; min-width: 0; }
.t-right b { display: block; font-size: 1rem; font-weight: 600; letter-spacing: -0.01em; }
.t-right b small { font-weight: 400; color: var(--ink-3); font-size: 0.78rem; }
.t-next { margin-top: 0.25rem; font-size: 0.78rem; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.t-next.late { color: var(--bad); }
.t-row.dim .t-name b, .t-row.dim .t-right b { color: var(--ink-3); }
.empty { padding: 3rem 1rem; text-align: center; color: var(--ink-3); }
.empty b { display: block; color: var(--ink); font-size: 1.1rem; margin-bottom: 0.4rem; }

/* ---- Der Faden (SVG) ---- */
.thread { position: relative; width: 100%; }
.thread-svg { display: block; overflow: visible; }
.th-rest { fill: none; stroke: var(--line-2); stroke-width: 1.6; stroke-dasharray: 3 5; }
.th-done { fill: none; stroke-width: 2.6; stroke-linecap: round; transition: stroke-width 0.25s var(--ease); }
.th-done.paused { stroke: #c4c4cc !important; }
.th-glow { fill: none; stroke-width: 10; opacity: 0.16; stroke-linecap: round; }
.th-fray { stroke: #a1a1aa; stroke-width: 1.6; stroke-linecap: round; }
.th-signal-halo { fill: #ec4899; opacity: 0.28; }
.th-signal-core { fill: #fff; }
.th-hang { fill: none; stroke: #a1a1aa; stroke-width: 1.3; }
.bead { transition: r 0.2s; }
.th-layer { position: absolute; inset: 0; pointer-events: none; }
.th-layer > * { position: absolute; pointer-events: auto; }
.th-knot-label { transform: translateX(-50%); text-align: center; white-space: nowrap; display: flex; flex-direction: column; gap: 0.1rem; }
.th-knot-label b { font-size: 0.88rem; font-weight: 600; color: var(--ink-3); letter-spacing: -0.01em; }
.th-knot-label.on b { color: var(--ink); }
.th-knot-label span { font: 0.64rem var(--mono); color: var(--ink-3); }
.th-bead { width: 18px; height: 18px; transform: translate(-50%, -50%); border-radius: 50%; cursor: pointer; outline: none; }
.th-bead:focus-visible { box-shadow: 0 0 0 3px rgba(139, 124, 246, 0.45); }
.th-tip { position: absolute; left: 50%; bottom: calc(100% + 10px); transform: translate(-50%, 4px); width: max-content; max-width: 240px; padding: 0.55rem 0.7rem; border-radius: 12px; background: var(--ink); color: #fff; font-size: 0.82rem; line-height: 1.35; opacity: 0; pointer-events: none; transition: opacity 0.18s, transform 0.18s var(--ease); z-index: 5; }
.th-tip em { display: block; font: normal 0.62rem var(--mono); color: #c4c4cc; margin-bottom: 0.2rem; }
.th-bead:hover .th-tip, .th-bead:focus-visible .th-tip, .th-bead.peek .th-tip { opacity: 1; transform: translate(-50%, 0); }
.th-now { transform: translate(-50%, -30px); }
.th-now span { font: 0.6rem var(--mono); text-transform: uppercase; letter-spacing: 0.16em; color: var(--ink-3); }
.th-tag { width: 178px; padding: 0.55rem 0.65rem; background: #fff; border: 1.5px solid var(--ink); border-radius: 12px; box-shadow: 0 6px 0 rgba(24,24,27,0.06); font-size: 0.82rem; line-height: 1.3; transform-origin: 50% -30px; animation: sway 5s ease-in-out infinite; transition: transform 0.45s var(--ease), opacity 0.45s; }
.th-tag:nth-child(odd) { animation-delay: -2.2s; }
.th-tag label { display: flex; gap: 0.45rem; align-items: flex-start; cursor: pointer; }
.th-tag input { margin-top: 0.15rem; accent-color: var(--kunde); flex: none; }
.th-tag em { display: block; margin: 0.3rem 0 0 1.4rem; font: normal 0.62rem var(--mono); color: var(--ink-3); }
.th-tag em.late { color: var(--bad); }
.th-tag.snap { animation: none; transform: translateY(-120px) scale(0.3); opacity: 0; }
.th-more { transform: translateX(-50%); font: 0.7rem var(--mono); color: var(--ink-3); }
.th-empty { transform: translateX(-50%); font-size: 0.82rem; color: var(--ink-3); white-space: nowrap; }
@keyframes sway { 0%, 100% { transform: rotate(-1.2deg); } 50% { transform: rotate(1.2deg); } }

/* ---- Kunden-Detail ---- */
.back { display: inline-flex; gap: 0.4rem; align-items: center; font-size: 0.88rem; color: var(--ink-2); text-decoration: none; margin-bottom: 1.2rem; }
.back:hover { color: var(--ink); }
.c-head { display: flex; justify-content: space-between; gap: 1.5rem; align-items: flex-end; flex-wrap: wrap; }
.c-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin-bottom: 0.8rem; }
.c-sub { margin-top: 0.6rem; display: flex; gap: 1rem; flex-wrap: wrap; font-size: 0.92rem; color: var(--ink-2); }
.c-sub a { text-decoration: none; }
.c-sub a:hover { color: #4f55e6; }
.c-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }
.thread-card { margin: 1.6rem 0 2rem; padding: 1.4rem 1.4rem 0.6rem; }
.c-grid { display: grid; grid-template-columns: minmax(0, 1.55fr) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.stack { display: flex; flex-direction: column; gap: 1.4rem; }
.stand-box textarea { font-size: 1.02rem; }
.log-form { display: grid; grid-template-columns: 130px 120px 1fr auto; gap: 0.5rem; align-items: start; }
.log-types { display: flex; gap: 0.3rem; flex-wrap: wrap; margin-bottom: 0.6rem; }
.log-types .chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.32rem 0.7rem; font-size: 0.8rem; }
.dur-hint { margin-top: 0.3rem; min-height: 1em; }
.quick-dur { display: flex; gap: 0.3rem; margin-top: 0.45rem; }
.quick-dur button { font: 0.68rem var(--mono); padding: 0.2rem 0.5rem; border-radius: 999px; border: 1px solid var(--line); background: #fff; cursor: pointer; color: var(--ink-2); }
.quick-dur button:hover { border-color: var(--lead); color: var(--ink); }

.feed { list-style: none; }
.feed li { display: grid; grid-template-columns: 30px 1fr auto auto auto; gap: 0.6rem; align-items: center; padding: 0.6rem 0.2rem; border-top: 1px solid var(--line); }
.learn-btn:hover { color: #a16207; }
.feed li:first-child { border-top: 0; }
.feed li:hover .x-btn { opacity: 1; }
.feed li.flash { animation: flash 1.6s var(--ease); border-radius: 10px; }
@keyframes flash { 0%, 40% { background: rgba(139, 124, 246, 0.16); } 100% { background: transparent; } }
.feed .ic { width: 30px; height: 30px; border-radius: 50%; display: grid; place-items: center; color: var(--c); background: var(--tint); }
.feed .t { font-size: 0.92rem; line-height: 1.35; min-width: 0; }
.feed .t small { display: block; font: 0.64rem var(--mono); color: var(--ink-3); margin-top: 0.15rem; }
.feed .d { font: 0.72rem var(--mono); color: var(--ink-2); white-space: nowrap; }

.todo-add { display: grid; grid-template-columns: 1fr 140px auto; gap: 0.5rem; margin-bottom: 0.8rem; }
.todos { list-style: none; }
.todos li { display: grid; grid-template-columns: 20px 1fr auto auto; gap: 0.55rem; align-items: center; padding: 0.5rem 0.1rem; border-top: 1px solid var(--line); font-size: 0.92rem; }
.todos li:first-child { border-top: 0; }
.todos li:hover .x-btn { opacity: 1; }
.todos input[type=checkbox] { accent-color: var(--kunde); width: 16px; height: 16px; cursor: pointer; }
.todos .due { font: 0.66rem var(--mono); color: var(--ink-3); white-space: nowrap; }
.todos .due.late { color: var(--bad); }
.todos li.done span { text-decoration: line-through; color: var(--ink-3); }
.todos details summary { cursor: pointer; font: 0.7rem var(--mono); color: var(--ink-3); padding: 0.6rem 0 0.2rem; }

.fields { display: grid; grid-template-columns: 1fr 1fr; gap: 0.15rem 0.6rem; }
.fields label { display: flex; flex-direction: column; font: 0.6rem var(--mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); padding-top: 0.45rem; }
.fields label.wide { grid-column: 1 / -1; }
.fields .in { margin-top: 0.15rem; font-size: 0.92rem; text-transform: none; letter-spacing: 0; font-family: "Outfit", sans-serif; color: var(--ink); }
.bill-box .big { font-size: 1.9rem; font-weight: 600; letter-spacing: -0.03em; }
.bill-list { list-style: none; margin-top: 0.8rem; }
.bill-list li { display: flex; justify-content: space-between; gap: 0.6rem; padding: 0.45rem 0; border-top: 1px solid var(--line); font-size: 0.88rem; }
.bill-list a { text-decoration: none; font-weight: 500; }
.danger-zone { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---- Leads ---- */
.leads-grid { display: grid; grid-template-columns: minmax(320px, 420px) minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.lead-form { display: flex; flex-direction: column; gap: 0.75rem; }
.lead-form h2 { margin-bottom: 0.2rem; }
.src-chips .chip { padding: 0.32rem 0.72rem; font-size: 0.82rem; }
.lead-list { display: flex; flex-direction: column; gap: 0.7rem; }
.lead { display: grid; grid-template-columns: 1fr auto; gap: 0.8rem; align-items: center; padding: 1rem 1.1rem; }
.lead h3 a { text-decoration: none; }
.lead h3 a:hover { color: #5b4bd6; }
.lead .meta { margin-top: 0.3rem; display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; font-size: 0.82rem; color: var(--ink-3); }
.lead .next { margin-top: 0.45rem; font-size: 0.86rem; color: var(--ink-2); }
.lead .acts { display: flex; flex-direction: column; gap: 0.35rem; align-items: flex-end; }
.src-stats { margin-top: 1.6rem; }
.src-row { display: grid; grid-template-columns: 110px 1fr 120px; gap: 0.8rem; align-items: center; padding: 0.35rem 0; font-size: 0.86rem; }
.src-bar { height: 10px; border-radius: 999px; background: #f4f4f5; overflow: hidden; }
.src-bar i { display: block; height: 100%; border-radius: 999px; background: var(--grad-btn); }
.src-row .n { text-align: right; font: 0.72rem var(--mono); color: var(--ink-2); }

/* ---- Kunden-Liste mit Zeit- und To-do-Zeile ---- */
.cust { padding: 1.1rem 1.2rem; margin-bottom: 1rem; }
.cust-top { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 1rem; align-items: center; }
.cust-top h3 { font-size: 1.1rem; }
.cust-top h3 a { text-decoration: none; }
.cust-top h3 a:hover { color: #c0267a; }
.cust-nums { display: flex; gap: 1.4rem; text-align: right; }
.cust-nums div { font: 0.6rem var(--mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); }
.cust-nums b { display: block; margin-top: 0.15rem; font: 600 1.05rem "Outfit", sans-serif; letter-spacing: -0.01em; text-transform: none; color: var(--ink); }
.cust-line { margin-top: 0.9rem; display: grid; grid-template-columns: minmax(0, 1.2fr) minmax(0, 1fr); gap: 0.8rem; }
.qrow { display: grid; gap: 0.4rem; align-items: center; padding: 0.5rem; border-radius: 14px; background: #f7f7f8; }
.qrow.time { grid-template-columns: 82px 1fr auto; }
.qrow.todo { grid-template-columns: 1fr 128px auto; }
.qrow .in { padding: 0.48rem 0.65rem; font-size: 0.88rem; }
.qrow .lbl { grid-column: 1 / -1; font: 0.6rem var(--mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); padding: 0 0.2rem; display: flex; justify-content: space-between; }
.cust-todos { margin-top: 0.7rem; display: flex; gap: 0.4rem; flex-wrap: wrap; }
.todo-chip { display: inline-flex; gap: 0.4rem; align-items: center; padding: 0.3rem 0.65rem; border-radius: 999px; border: 1px solid var(--line-2); background: #fff; font-size: 0.82rem; cursor: pointer; }
.todo-chip input { accent-color: var(--kunde); }
.todo-chip.late { border-color: #fda4af; }
.todo-chip em { font: normal 0.62rem var(--mono); color: var(--ink-3); }
.todo-chip.late em { color: var(--bad); }

/* ---- Tabellen ---- */
.table { width: 100%; border-collapse: collapse; font-size: 0.92rem; }
.table th { text-align: left; font: 0.62rem var(--mono); text-transform: uppercase; letter-spacing: 0.14em; color: var(--ink-3); padding: 0 0.6rem 0.7rem; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.table td { padding: 0.75rem 0.6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
.table tr.clickable { cursor: pointer; }
.table tr.clickable:hover td { background: rgba(139, 124, 246, 0.05); }
.table .r { text-align: right; white-space: nowrap; }
.table .no { font-family: var(--mono); font-size: 0.84rem; }

/* ---- Rechnungs-Editor ---- */
.inv-wrap { display: grid; grid-template-columns: minmax(340px, 470px) minmax(0, 1fr); gap: 1.6rem; align-items: start; }
.inv-form { display: flex; flex-direction: column; gap: 0.9rem; position: sticky; top: 80px; max-height: calc(100dvh - 96px); overflow: auto; }
.items-ed { display: flex; flex-direction: column; gap: 0.6rem; }
.item-ed { padding: 0.7rem; border: 1px solid var(--line); border-radius: 14px; background: #fafafa; display: grid; grid-template-columns: 1fr 1fr 1fr; gap: 0.45rem; position: relative; }
.item-ed .full { grid-column: 1 / -1; }
.item-ed .x-btn { position: absolute; top: 0.3rem; right: 0.3rem; opacity: 1; }
.checks { list-style: none; display: flex; flex-direction: column; gap: 0.35rem; }
.checks li { display: flex; gap: 0.5rem; font-size: 0.84rem; line-height: 1.35; }
.checks li::before { content: "!"; flex: none; width: 18px; height: 18px; border-radius: 50%; display: grid; place-items: center; font: 600 0.7rem var(--mono); background: #fef3c7; color: #92400e; }
.checks li.okk::before { content: "✓"; background: #dcfce7; color: #166534; }
.inv-preview { display: flex; justify-content: center; }
.inv-actions { display: flex; gap: 0.5rem; flex-wrap: wrap; }

/* ---- Einstellungen ---- */
.set-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 1.4rem; align-items: start; }
.set-grid .card { display: flex; flex-direction: column; gap: 0.75rem; }

/* ---- Verlauf nach Monaten ---- */
.feed-chips { margin-bottom: 0.4rem; }
.feed-chips .chip { display: inline-flex; align-items: center; gap: 0.35rem; padding: 0.32rem 0.7rem; font-size: 0.8rem; }
.chip .sw { width: 8px; height: 8px; border-radius: 50%; background: var(--c); }
.feed-month { margin-top: 1.1rem; }
.feed-month h3 { display: flex; justify-content: space-between; align-items: baseline; gap: 0.6rem; padding-bottom: 0.35rem; border-bottom: 2px solid var(--ink); font-size: 0.95rem; }
.feed-month h3 small { font: 0.66rem var(--mono); color: var(--ink-3); font-weight: 400; }
.feed-month .feed li:first-child { border-top: 0; }
.feed .ic { color: var(--c); background: color-mix(in srgb, var(--c) 15%, #fff); }
.feed li { border-left: 3px solid transparent; padding-left: 0.4rem; }
.feed li:hover { border-left-color: var(--c); }
.link-k { text-decoration: none; }
.link-k:hover { color: #4f55e6; }
.kpi-link { text-decoration: none; color: inherit; transition: transform 0.3s var(--ease), border-color 0.2s, box-shadow 0.3s; }
.kpi-link:hover { transform: translateY(-3px); border-color: var(--ink); box-shadow: 0 8px 0 color-mix(in srgb, var(--c) 30%, transparent); }
.kpi-link:focus-visible { outline: 3px solid #8b7cf6; outline-offset: 3px; }

/* ---- Dokumente ---- */
.dropzone { display: flex; flex-direction: column; align-items: center; gap: 0.2rem; padding: 1rem; border: 1.5px dashed var(--line-2); border-radius: 14px; background: #fafafa; cursor: pointer; text-align: center; transition: border-color 0.2s, background 0.2s; }
.dropzone b { font-size: 0.9rem; font-weight: 600; }
.dropzone span { font: 0.64rem var(--mono); color: var(--ink-3); }
.dropzone:hover, .dropzone.over { border-color: var(--lead); background: rgba(139, 124, 246, 0.07); }
.doc-progress:empty { display: none; }
.doc-progress { margin-top: 0.5rem; }
.doc-list { list-style: none; margin-top: 0.7rem; }
.doc-list li { display: grid; grid-template-columns: 38px minmax(0, 1fr) auto auto auto; gap: 0.5rem; align-items: center; padding: 0.45rem 0; border-top: 1px solid var(--line); font-size: 0.88rem; }
.doc-list li:hover .x-btn { opacity: 1; }
.doc-list a:not(.x-btn) { text-decoration: none; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.doc-list a:not(.x-btn):hover { color: #4f55e6; }
.doc-list .dl { text-decoration: none; }
.doc-ic { font: 600 0.55rem var(--mono); letter-spacing: 0.04em; text-align: center; padding: 0.3rem 0; border-radius: 6px; background: #f4f4f5; color: var(--ink-2); }

/* ---- Alle To-dos mit Faden ---- */
.todo-group { margin-bottom: 1.8rem; }
.todo-group-h { display: flex; align-items: center; gap: 0.5rem; font-size: 1rem; margin-bottom: 0.6rem; }
.todo-group-h .n { font: 0.68rem var(--mono); color: var(--ink-3); }
.todo-group-h.late { color: var(--bad); }
.todo-row { display: grid; grid-template-columns: minmax(40px, 1fr) minmax(0, 560px); align-items: center; transition: opacity 0.45s, transform 0.45s var(--ease); }
.todo-row + .todo-row { margin-top: 0.6rem; }
.todo-thread { height: 64px; align-self: stretch; }
.todo-thread svg { display: block; overflow: visible; }
.todo-card { padding: 0.8rem 1rem; background: #fff; border: 1.5px solid var(--ink); border-radius: 14px; box-shadow: 0 6px 0 rgba(24,24,27,0.06); margin-left: 6px; }
.todo-check { display: flex; gap: 0.6rem; align-items: flex-start; cursor: pointer; font-size: 0.98rem; line-height: 1.35; }
.todo-check input { margin-top: 0.2rem; width: 17px; height: 17px; accent-color: var(--c); flex: none; cursor: pointer; }
.todo-meta { display: flex; gap: 0.5rem; flex-wrap: wrap; align-items: center; margin: 0.4rem 0 0 1.7rem; font-size: 0.8rem; }
.todo-client { font-weight: 600; text-decoration: none; }
.todo-client:hover { color: #4f55e6; }
.todo-due { font: 0.66rem var(--mono); color: var(--ink-3); }
.todo-due.late { color: var(--bad); }
.todo-row.done { opacity: 0; transform: translateX(-40px); }

/* ---- Nico füttern ---- */
.feed-wrap { position: relative; }
.food-icon { width: 16px; height: 16px; image-rendering: pixelated; }
.feed-menu { position: absolute; right: 0; top: calc(100% + 8px); z-index: 50; width: 230px; padding: 0.5rem; border-radius: 16px; background: #fff; border: 2px solid var(--ink); box-shadow: 0 10px 0 rgba(24,24,27,0.07); }
.feed-head { padding: 0.35rem 0.5rem 0.5rem; font-weight: 600; font-size: 0.9rem; display: flex; flex-direction: column; gap: 0.1rem; }
.feed-menu button { width: 100%; display: grid; grid-template-columns: 22px 1fr; column-gap: 0.55rem; align-items: center; text-align: left; padding: 0.5rem; border: 0; border-radius: 10px; background: none; cursor: pointer; font-size: 0.9rem; }
.feed-menu button em { grid-column: 2; font-style: normal; font: 0.64rem var(--mono); color: var(--ink-3); }
.feed-menu button .food-icon { grid-row: span 2; width: 20px; height: 20px; }
.feed-menu button:hover, .feed-menu button:focus-visible { background: rgba(139, 124, 246, 0.1); outline: none; }
.meal { position: fixed; z-index: 46; width: 32px; height: 32px; image-rendering: pixelated; pointer-events: none; transform: scale(var(--bite, 1)); transform-origin: 50% 100%; transition: transform 0.25s var(--ease), opacity 0.5s; }
.meal.falling { transition: left 0.8s cubic-bezier(0.2, 0.6, 0.4, 1), top 0.8s cubic-bezier(0.55, 0, 1, 0.45), transform 0.25s var(--ease); }
.meal.landed { animation: squash 0.3s var(--ease); }
.meal.gone { opacity: 0; }
@keyframes squash { 40% { transform: scale(1.15, 0.8); } }
.nico .fx.crumb { color: #a16207; font-size: 1.2rem; animation-duration: 0.8s; }

/* ---- Notizen ---- */
.notes-grid { display: grid; grid-template-columns: minmax(220px, 290px) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.notes-list { display: flex; flex-direction: column; gap: 0.35rem; position: sticky; top: 80px; max-height: calc(100dvh - 100px); overflow: auto; padding-bottom: 1rem; }
.notes-list .btn { margin-bottom: 0.5rem; }
.note-item { display: flex; flex-direction: column; gap: 0.2rem; text-align: left; padding: 0.7rem 0.85rem; border-radius: 14px; border: 1px solid transparent; background: rgba(255,255,255,0.6); cursor: pointer; transition: background 0.2s, border-color 0.2s; }
.note-item:hover { background: #fff; border-color: var(--line); }
.note-item.on { background: #fff; border-color: var(--ink); }
.note-item b { font-weight: 600; font-size: 0.92rem; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.note-item small { font: 0.64rem var(--mono); color: var(--ink-3); display: flex; align-items: center; gap: 0.3rem; }
.dot { width: 7px; height: 7px; border-radius: 50%; display: inline-block; }
.dot.ok { background: #22c55e; }
.dot.warn { background: var(--upsell); }
.note-ed { display: flex; flex-direction: column; gap: 0.4rem; min-height: 62vh; }
.note-title { font-size: 1.5rem; font-weight: 600; letter-spacing: -0.02em; }
.note-text { flex: 1; min-height: 46vh; font-size: 1.02rem; line-height: 1.6; resize: vertical; }
.note-foot { display: flex; justify-content: space-between; align-items: center; gap: 0.8rem; flex-wrap: wrap; padding-top: 0.6rem; border-top: 1px solid var(--line); }
.note-warn { padding: 0.6rem 0.8rem; border-radius: 12px; background: #fff7ed; border: 1px solid #fed7aa; color: #9a3412; font-size: 0.86rem; }
.note-status { font-size: 0.84rem; color: var(--ink-2); }
.note-status.ok::before, .note-status.warn::before { content: ""; display: inline-block; width: 7px; height: 7px; border-radius: 50%; margin-right: 0.4rem; background: #22c55e; }
.note-status.warn::before { background: var(--upsell); }
.md { line-height: 1.6; font-size: 0.98rem; max-width: 78ch; }
.md h2, .md h3, .md h4 { margin: 1.2rem 0 0.4rem; }
.md h2:first-of-type { margin-top: 0; }
.md p { margin: 0.5rem 0; color: var(--ink-2); }
.md ul, .md ol { margin: 0.4rem 0 0.6rem 1.3rem; color: var(--ink-2); }
.md li { margin: 0.2rem 0; }
.md strong { color: var(--ink); }
.md code { font: 0.85em var(--mono); background: #f4f4f5; padding: 0.05rem 0.3rem; border-radius: 5px; }
.md blockquote { margin: 0.6rem 0; padding: 0.4rem 0.9rem; border-left: 3px solid var(--lead); color: var(--ink-2); }
.md .wl { color: #5b4bd6; }
.md hr { border: 0; border-top: 1px solid var(--line); margin: 1rem 0; }
.md del { color: var(--ink-3); }
.hint .link { font: inherit; }
.md a { color: #4f55e6; }
.md-row { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); gap: 0.8rem; padding: 0.35rem 0; border-bottom: 1px solid var(--line); font-size: 0.88rem; }

/* ---- LinkedIn ---- */
.li-grid { display: grid; grid-template-columns: minmax(280px, 360px) minmax(0, 1fr); gap: 1.4rem; align-items: start; }
.li-lower { margin-top: 1.4rem; grid-template-columns: minmax(0, 1fr) minmax(0, 1.3fr); }
.li-form { display: flex; flex-direction: column; gap: 0.75rem; }
.li-charts { display: grid; grid-template-columns: 1fr 1fr; gap: 1.4rem; }
.li-chart { margin: 0; padding: 1.1rem 1.1rem 0.6rem; }
.li-chart figcaption { display: flex; justify-content: space-between; align-items: baseline; gap: 0.5rem; margin-bottom: 0.4rem; }
.chart { position: relative; min-height: 190px; }
.chart svg { display: block; overflow: visible; }
.chart-empty { padding: 4rem 0.5rem; text-align: center; }
.ch-grid { stroke: #ececef; stroke-width: 1; }
.ch-tick { font: 11px "Outfit", sans-serif; fill: var(--ink-3); }
.ch-cross { stroke: #a1a1aa; stroke-width: 1; }
.ch-bar { transition: opacity 0.15s; }
.ch-tip { position: absolute; width: 140px; padding: 0.45rem 0.6rem; border-radius: 10px; background: var(--ink); color: #fff; font-size: 0.8rem; line-height: 1.3; pointer-events: none; }
.ch-tip em { display: block; font: normal 0.6rem var(--mono); color: #c4c4cc; }

/* ---- Dialog ---- */
.modal-scrim { position: fixed; inset: 0; z-index: 70; display: grid; place-items: center; padding: 1rem; background: rgba(24, 24, 27, 0.35); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal { width: min(560px, 100%); max-height: calc(100dvh - 2rem); overflow: auto; }
.modal h2 { margin-bottom: 0.8rem; }
.modal-actions { justify-content: flex-end; margin-top: 1rem; }
.token-box { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.8rem; border-radius: 14px; background: #f5f5f9; }
.token { display: block; padding: 0.55rem 0.7rem; border-radius: 10px; background: #fff; border: 1px solid var(--line); font-size: 0.78rem; word-break: break-all; user-select: all; }

/* ---- Toast ---- */
.toast { position: fixed; left: 50%; bottom: 1.4rem; transform: translate(-50%, 20px); padding: 0.7rem 1.1rem; border-radius: 999px; background: var(--ink); color: #fff; font-size: 0.9rem; opacity: 0; transition: opacity 0.25s, transform 0.3s var(--ease); z-index: 60; box-shadow: 0 16px 40px -18px rgba(0,0,0,0.6); }
.toast.on { opacity: 1; transform: translate(-50%, 0); }

/* ---- Nico ---- */
.nico { position: fixed; left: 0; bottom: 0; z-index: 45; width: 102px; height: 104px; pointer-events: none; }
.nico canvas { position: absolute; left: 0; bottom: 4px; width: 102px; height: 90px; image-rendering: pixelated; pointer-events: auto; cursor: grab; touch-action: none; }
.nico.drag canvas { cursor: grabbing; }
.nico.left canvas { transform: scaleX(-1); }
.nico .shadow { position: absolute; left: 22px; bottom: 0; width: 64px; height: 8px; border-radius: 50%; background: rgba(24,24,27,0.16); transition: transform 0.2s, opacity 0.2s; }
.nico .tag { position: absolute; left: 50%; bottom: 100%; transform: translateX(-50%); font: 0.62rem var(--mono); letter-spacing: 0.14em; text-transform: uppercase; padding: 0.15rem 0.45rem; border-radius: 999px; background: #fff; border: 1px solid var(--line-2); opacity: 0; transition: opacity 0.2s; white-space: nowrap; }
.nico.hover .tag { opacity: 1; }
.nico .say { position: absolute; bottom: calc(100% + 6px); left: 50%; transform: translate(-50%, 6px); width: max-content; max-width: 230px; padding: 0.5rem 0.75rem; border-radius: 14px; background: var(--ink); color: #fff; font-size: 0.82rem; line-height: 1.35; opacity: 0; transition: opacity 0.2s, transform 0.25s var(--ease); pointer-events: none; }
.nico .say.on { opacity: 1; transform: translate(-50%, 0); }
.nico .say::after { content: ""; position: absolute; top: 100%; left: 50%; margin-left: -6px; border: 6px solid transparent; border-top-color: var(--ink); }
.nico .fx { position: absolute; font: 600 1rem var(--mono); color: var(--kunde); pointer-events: none; animation: rise 1.4s var(--ease) forwards; }
.nico .fx.z { color: var(--lead); font-size: 0.85rem; animation-duration: 2.4s; }
@keyframes rise { 0% { opacity: 0; transform: translateY(0) scale(0.6); } 20% { opacity: 1; } 100% { opacity: 0; transform: translateY(-46px) scale(1.15); } }

/* ---- Responsiv ---- */
@media (max-width: 1060px) {
  .kpis { grid-template-columns: repeat(2, 1fr); }
  .notes-grid, .li-grid, .li-lower { grid-template-columns: 1fr; }
  .notes-list { position: static; max-height: 260px; }
  .c-grid, .leads-grid, .inv-wrap, .set-grid { grid-template-columns: 1fr; }
  .inv-form { position: static; max-height: none; }
}
/* Sechs Tabs plus Knöpfe passen erst ab ~1000 px in eine Zeile: darunter bekommen die Tabs eine eigene Zeile */
@media (max-width: 1000px) {
  .nav { flex-wrap: wrap; row-gap: 0.55rem; }
  .tabs { order: 3; width: 100%; overflow-x: auto; scrollbar-width: none; }
  .tabs::-webkit-scrollbar { display: none; }
  .tabs a { flex: none; }
  .banner { top: 110px; }
}
@media (max-width: 860px) {
  .tabs a { padding: 0.4rem 0.6rem; font-size: 0.84rem; }
  .save-state { display: none; }
  .t-grid { grid-template-columns: minmax(0, 1fr) minmax(0, 42%); }
  .t-grid .thread, .t-grid .t-stages { grid-column: 1 / -1; grid-row: 2; }
  .t-head .t-name-h { display: none; }
  .t-head .t-right-h { display: none; }
  .cust-line { grid-template-columns: 1fr; }
  .log-form { grid-template-columns: 1fr 1fr; }
  .log-form .what { grid-column: 1 / -1; }
}
@media (max-width: 640px) {
  .brand em { display: none; }
  .kpis { gap: 0.6rem; }
  .kpi .v { font-size: 1.35rem; }
  .card { padding: 1.05rem 1rem; }
  .grid2, .grid3, .fields { grid-template-columns: 1fr; }
  .todo-add, .qrow.todo { grid-template-columns: 1fr 1fr; }
  .todo-add .in:first-child, .qrow.todo .in:first-child { grid-column: 1 / -1; }
  .cust-top { grid-template-columns: 1fr; }
  .cust-nums { text-align: left; }
  .src-row { grid-template-columns: 90px 1fr 80px; }
  .table .hide-sm { display: none; }
  .li-charts { grid-template-columns: 1fr; }
  .todo-row { grid-template-columns: 28px minmax(0, 1fr); }
  .nico canvas { width: 78px; height: 69px; }
  .nico .shadow { left: 16px; width: 50px; }
}
@media (prefers-reduced-motion: reduce) {
  .th-tag { animation: none; }
  * { scroll-behavior: auto; }
}
@media print {
  .mist, .nav, .banner, .toast, .nico, .meal, .no-print { display: none !important; }
}
