:root {
  --bg: #f6f6f4; --panel: #ffffff; --ink: #18181b; --muted: #6b6b73; --line: #e6e5e1;
  --accent: #1f4fd1; --accent-soft: #e8eefc; --danger: #c2321f; --ok: #1d8a4e; --warn: #b7791f;
  --side: #111113; --side-ink: #d8d8dc; --radius: 10px;
  font-family: -apple-system, BlinkMacSystemFont, "SF Pro Text", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) {
  :root { --bg: #161618; --panel: #1f1f22; --ink: #ececf0; --muted: #9a9aa3; --line: #2e2e33;
    --accent: #7b9bff; --accent-soft: #232b45; --side: #0c0c0d; }
}
* { box-sizing: border-box; }
html, body { margin: 0; height: 100%; }
body { display: flex; background: var(--bg); color: var(--ink); font-size: 14px; }
a { color: var(--accent); text-decoration: none; }
a:hover { text-decoration: underline; }

.sidebar { width: 230px; flex-shrink: 0; background: var(--side); color: var(--side-ink);
  display: flex; flex-direction: column; padding: 18px 12px; position: sticky; top: 0; height: 100vh; }
.brand { display: flex; gap: 10px; align-items: center; padding: 0 6px 16px; }
.brand strong { display: block; color: #fff; font-size: 15px; }
.brand small { color: #8d8d95; font-size: 11.5px; }
.logo { width: 34px; height: 34px; border-radius: 9px; background: #fff; color: #111; display: grid;
  place-items: center; font-weight: 800; font-size: 18px; }
.search input { width: 100%; padding: 8px 10px; border-radius: 8px; border: 1px solid #2c2c31;
  background: #1c1c20; color: #fff; font-size: 13px; outline: none; }
.search input:focus { border-color: #4a64c9; }
nav { display: flex; flex-direction: column; gap: 2px; margin-top: 14px; flex: 1; }
nav a { color: var(--side-ink); padding: 8px 10px; border-radius: 7px; font-size: 13.5px; }
nav a:hover { background: #1f1f24; text-decoration: none; }
nav a.active { background: #26262c; color: #fff; font-weight: 600; }
nav .nav-bottom { margin-top: auto; }
.local-badge { font-size: 11px; color: #5fbf85; padding: 10px 8px 0; }

main { flex: 1; min-width: 0; padding: 26px 32px 60px; }
.page-head { display: flex; align-items: center; gap: 12px; margin-bottom: 18px; flex-wrap: wrap; }
.page-head h1 { font-size: 22px; margin: 0; flex: 1; letter-spacing: -0.01em; }
.crumb { color: var(--muted); font-size: 13px; margin-bottom: 4px; }

button, .btn { font: inherit; border: 1px solid var(--line); background: var(--panel); color: var(--ink);
  padding: 7px 13px; border-radius: 8px; cursor: pointer; font-size: 13px; }
button:hover { border-color: #bdbdb8; }
.btn-primary { background: var(--accent); border-color: var(--accent); color: #fff; font-weight: 600; }
.btn-primary:hover { filter: brightness(1.08); border-color: var(--accent); }
.btn-danger { color: var(--danger); }
.btn-sm { padding: 4px 9px; font-size: 12px; }
.icon-btn { border: none; background: none; font-size: 16px; color: var(--muted); padding: 4px 8px; }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: none; border-radius: 0; }
.seg button.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

.card { background: var(--panel); border: 1px solid var(--line); border-radius: var(--radius); padding: 16px 18px; }
.card h3 { margin: 0 0 12px; font-size: 13px; text-transform: uppercase; letter-spacing: .04em; color: var(--muted); }
.grid { display: grid; gap: 16px; }
.kpis { grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); margin-bottom: 16px; }
.kpi .num { font-size: 24px; font-weight: 700; margin-top: 2px; letter-spacing: -0.01em; }
.kpi .lbl { color: var(--muted); font-size: 12.5px; }
.kpi .sub { color: var(--muted); font-size: 12px; margin-top: 2px; }
.two { grid-template-columns: 1.3fr 1fr; }
@media (max-width: 1050px) { .two { grid-template-columns: 1fr; } }

.toolbar { display: flex; gap: 10px; margin-bottom: 12px; flex-wrap: wrap; align-items: center; }
.toolbar input[type=search], .toolbar select { padding: 7px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel); color: var(--ink); font: inherit; font-size: 13px; }
.toolbar input[type=search] { min-width: 260px; }

table.list { width: 100%; border-collapse: collapse; background: var(--panel); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; }
.list th { text-align: left; font-size: 11.5px; text-transform: uppercase; letter-spacing: .04em;
  color: var(--muted); font-weight: 600; padding: 9px 12px; border-bottom: 1px solid var(--line); }
.list td { padding: 10px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
.list tr:last-child td { border-bottom: none; }
.list tbody tr { cursor: pointer; }
.list tbody tr:hover { background: var(--accent-soft); }
.list td.num, .list th.num { text-align: right; font-variant-numeric: tabular-nums; }
.empty { padding: 30px; text-align: center; color: var(--muted); }

.pill { display: inline-block; padding: 2px 8px; border-radius: 99px; font-size: 11.5px; font-weight: 600;
  background: #ececea; color: #45454b; white-space: nowrap; }
@media (prefers-color-scheme: dark) { .pill { background: #2c2c31; color: #c9c9d0; } }
.pill.blue { background: #e3ebff; color: #1f43b0; }
.pill.green { background: #def3e6; color: #17703f; }
.pill.red { background: #fbe3df; color: #a92b19; }
.pill.amber { background: #fbefd9; color: #8a5a10; }
.pill.violet { background: #eee4fb; color: #5d2fa8; }
.muted { color: var(--muted); }
.overdue { color: var(--danger); font-weight: 600; }

/* Pipeline */
.board { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(165px, 1fr); gap: 12px;
  overflow-x: auto; padding-bottom: 8px; }
.col { background: #ecebe7; border-radius: var(--radius); padding: 10px; min-height: 200px; }
@media (prefers-color-scheme: dark) { .col { background: #1a1a1d; } }
.col.drop { outline: 2px dashed var(--accent); }
.col-head { display: flex; justify-content: space-between; font-weight: 700; font-size: 12.5px; margin-bottom: 4px; }
.col-sum { color: var(--muted); font-size: 12px; margin-bottom: 10px; }
.deal-card { background: var(--panel); border: 1px solid var(--line); border-radius: 8px; padding: 10px;
  margin-bottom: 8px; cursor: grab; }
.deal-card:hover { border-color: var(--accent); }
.deal-card .t { font-weight: 600; margin-bottom: 3px; }
.deal-card .m { color: var(--muted); font-size: 12px; display: flex; justify-content: space-between; }

/* Detail */
.detail { display: grid; grid-template-columns: 340px 1fr; gap: 16px; align-items: start; }
@media (max-width: 1050px) { .detail { grid-template-columns: 1fr; } }
dl.props { margin: 0; display: grid; grid-template-columns: 110px 1fr; gap: 8px 10px; font-size: 13px; }
dl.props dt { color: var(--muted); }
dl.props dd { margin: 0; word-break: break-word; white-space: pre-wrap; }
.section { margin-bottom: 16px; }
.section-head { display: flex; align-items: center; justify-content: space-between; margin-bottom: 8px; }
.section-head h3 { margin: 0; }
.mini { list-style: none; margin: 0; padding: 0; }
.mini li { padding: 8px 0; border-bottom: 1px solid var(--line); display: flex; gap: 10px; align-items: center; }
.mini li:last-child { border-bottom: none; }
.mini .grow { flex: 1; min-width: 0; }

.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: flex; gap: 12px; padding: 10px 0; border-bottom: 1px solid var(--line); }
.timeline li:last-child { border-bottom: none; }
.tl-icon { width: 30px; height: 30px; border-radius: 50%; background: var(--accent-soft); display: grid;
  place-items: center; flex-shrink: 0; font-size: 14px; }
.tl-body { flex: 1; min-width: 0; }
.tl-meta { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.tl-text { white-space: pre-wrap; word-break: break-word; }
.add-activity { display: grid; gap: 8px; margin-bottom: 10px; }
.add-activity .row { display: flex; gap: 8px; }
.add-activity textarea { min-height: 60px; }

/* Formulare */
.form { display: grid; grid-template-columns: 1fr 1fr; gap: 12px 14px; }
.form .full { grid-column: 1 / -1; }
.form label { display: grid; gap: 4px; font-size: 12.5px; color: var(--muted); font-weight: 600; }
input, select, textarea { font: inherit; font-size: 13.5px; padding: 8px 10px; border: 1px solid var(--line);
  border-radius: 8px; background: var(--panel); color: var(--ink); width: 100%; }
textarea { min-height: 90px; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent-soft); border-color: var(--accent); }
.form-actions { display: flex; justify-content: flex-end; gap: 8px; margin-top: 16px; }
input[type=checkbox] { width: 16px; height: 16px; accent-color: var(--accent); }

.modal { position: fixed; inset: 0; background: rgba(10,10,12,.45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal[hidden] { display: none; }
.modal-box { background: var(--panel); border-radius: 14px; width: min(640px, 100%); max-height: 90vh;
  overflow: auto; padding: 20px 22px; box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.modal-head { display: flex; justify-content: space-between; align-items: center; margin-bottom: 14px; }
.modal-head h2 { margin: 0; font-size: 18px; }
.toast { position: fixed; bottom: 22px; left: 50%; transform: translateX(-50%); background: #18181b; color: #fff;
  padding: 10px 16px; border-radius: 9px; font-size: 13px; z-index: 60; }
.toast.err { background: var(--danger); }
.bar { height: 8px; border-radius: 4px; background: var(--accent); }
.pipe-row { display: grid; grid-template-columns: 110px 1fr 110px; gap: 10px; align-items: center; font-size: 13px; margin-bottom: 8px; }
.pipe-track { background: var(--accent-soft); border-radius: 4px; }
.search-group { margin-bottom: 18px; }

/* Benutzer & Anmeldung */
.user-box { border-top: 1px solid #26262c; margin-top: 10px; padding: 12px 8px 0; font-size: 12.5px; }
.user-name { color: #fff; font-weight: 600; margin-bottom: 4px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.user-links { display: flex; gap: 12px; }
.user-links a { color: #9aa6c8; }
body.auth-mode .sidebar { display: none; }
body.auth-mode main { padding: 0; }
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; }
.auth-card { width: min(400px, 100%); background: var(--panel); border: 1px solid var(--line); border-radius: 16px; padding: 30px 28px;
  box-shadow: 0 10px 40px rgba(0,0,0,.06); }
.auth-card h1 { font-size: 21px; margin: 18px 0 6px; letter-spacing: -0.01em; }
.auth-card p { line-height: 1.5; }
.auth-brand { padding: 0; }
.auth-brand strong { color: var(--ink); }
.auth-brand .logo { background: #111; color: #fff; }
.auth-form { display: grid; gap: 12px; margin-top: 16px; }
.auth-form label { display: grid; gap: 5px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.auth-btn { width: 100%; padding: 10px; font-size: 14px; display: block; text-align: center; margin-top: 4px; }
a.auth-btn { margin-top: 16px; text-decoration: none; }
.auth-links { display: flex; justify-content: space-between; gap: 10px; margin-top: 16px; font-size: 13px; flex-wrap: wrap; }
.auth-msg { font-size: 13px; padding: 9px 11px; border-radius: 8px; line-height: 1.45; }
.auth-msg.err { background: #fbe3df; color: #8f2414; }
.auth-msg.ok { background: #def3e6; color: #135c33; }
@media (max-width: 760px) {
  body { flex-direction: column; }
  .sidebar { width: 100%; height: auto; position: static; }
  main { padding: 18px 16px 40px; }
}

/* Contentplaner */
.month-label { min-width: 150px; text-align: center; text-transform: capitalize; }
.cal-wrap { overflow-x: auto; }
.cal { display: grid; grid-template-columns: repeat(7, minmax(110px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line);
  border-radius: var(--radius); overflow: hidden; min-width: 770px; }
.cal-h { background: var(--panel); padding: 7px 9px; font-size: 11.5px; font-weight: 600; color: var(--muted); }
.cal-day { background: var(--panel); min-height: 108px; padding: 6px; cursor: pointer; display: flex; flex-direction: column; gap: 4px; }
.cal-day:hover { background: var(--accent-soft); }
.cal-day.out { background: var(--bg); }
.cal-day.out .cal-num { color: #b5b5ba; }
.cal-day.today .cal-num { background: var(--accent); color: #fff; border-radius: 99px; padding: 0 7px; align-self: flex-start; }
.cal-day.drop { outline: 2px dashed var(--accent); outline-offset: -3px; }
.cal-num { font-size: 12px; font-weight: 600; }
.post-chip { font-size: 11.5px; line-height: 1.3; padding: 4px 6px; border-radius: 6px; border-left: 3px solid; background: #f1f1ef;
  overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; cursor: grab; }
@media (prefers-color-scheme: dark) { .post-chip { background: #2a2a2f; } }
.post-chip.st-5 { opacity: .55; text-decoration: line-through; }
.pc-time { color: var(--muted); font-variant-numeric: tabular-nums; }
.ch-ig { border-color: #d6249f; } .ch-li { border-color: #0a66c2; } .ch-fb { border-color: #1877f2; } .ch-tt { border-color: #111; }
.ch-yt { border-color: #e62117; } .ch-pi { border-color: #bd081c; } .ch-bl { border-color: #1d8a4e; } .ch-nl { border-color: #b7791f; }
.ch-web { border-color: #6b6b73; } .ch-other { border-color: #9a9aa3; }
.dot { display: inline-block; width: 9px; height: 9px; border-radius: 50%; border: 4.5px solid; vertical-align: middle; margin-right: 4px; }
.legend { display: flex; flex-wrap: wrap; gap: 14px; margin: 10px 0 4px; font-size: 12px; color: var(--muted); }
.post-strip { display: grid; grid-template-columns: repeat(auto-fill, minmax(180px, 1fr)); gap: 10px; }
.post-mini { border-left: 3px solid; padding: 6px 10px; background: var(--bg); border-radius: 6px; cursor: pointer; }
.pm-date { font-size: 11.5px; color: var(--muted); } .pm-title { font-weight: 600; margin: 2px 0; } .pm-meta { font-size: 12px; color: var(--muted); }
.ai-btn { justify-self: start; margin-top: 4px; }
.kpi-link { color: inherit; } .kpi-link:hover { text-decoration: none; border-color: var(--accent); }
.scroll { overflow-x: auto; }
.notice { border-color: #e9c46a; background: #fdf8ea; color: #6b4e0f; margin-bottom: 12px; font-size: 13.5px; }
@media (prefers-color-scheme: dark) { .notice { background: #2c2618; color: #e8d29b; border-color: #5c4a1c; } }

/* Lead-Suche */
.lead-form { display: grid; grid-template-columns: 2fr 1.5fr 0.8fr auto; gap: 12px; align-items: end; margin-bottom: 14px; }
.lead-form label { display: grid; gap: 4px; font-size: 12.5px; font-weight: 600; color: var(--muted); }
.lead-form button { height: 38px; padding: 0 22px; }
@media (max-width: 760px) { .lead-form { grid-template-columns: 1fr; } }
.lead-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(320px, 1fr)); gap: 12px; }
.lead { display: flex; flex-direction: column; gap: 8px; }
.lead-top { display: flex; gap: 12px; align-items: center; }
.lead-name { font-weight: 700; font-size: 15px; }
.lead-cat { font-size: 12.5px; }
.score { width: 44px; height: 44px; border-radius: 12px; display: grid; place-items: center; font-weight: 800; font-size: 16px; flex-shrink: 0; }
.score.shi { background: #def3e6; color: #17703f; } .score.smid { background: #fbefd9; color: #8a5a10; } .score.slo { background: #ececea; color: #6b6b73; }
.lead-reason { margin: 0; font-size: 13.5px; line-height: 1.45; }
.lead-pitch { font-size: 13px; font-style: italic; color: var(--muted); border-left: 2px solid var(--line); padding-left: 10px; }
.lead-facts { display: flex; flex-wrap: wrap; gap: 4px 12px; font-size: 12.5px; }
.lead-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; align-items: center; }
.lead-row { font-size: 12.5px; display: flex; gap: 6px; align-items: center; }

/* Rechnungen */
.inv-layout { display: grid; grid-template-columns: minmax(0, 1fr) 320px; gap: 16px; align-items: start; }
@media (max-width: 1100px) { .inv-layout { grid-template-columns: 1fr; } }
table.items { width: 100%; border-collapse: collapse; min-width: 620px; }
.items th { text-align: left; font-size: 11.5px; color: var(--muted); font-weight: 600; padding: 4px 6px; }
.items th.num, .items td.num { text-align: right; }
.items td { padding: 4px 6px; vertical-align: top; }
.items textarea { min-height: 38px; resize: vertical; }
.items input.n { text-align: right; width: 90px; } .items input.s { width: 64px; } .items input.u { width: 80px; }
.items .line-total { padding-top: 12px; white-space: nowrap; font-variant-numeric: tabular-nums; }
.totals { margin: 14px 0 0 auto; max-width: 300px; display: grid; gap: 6px; font-variant-numeric: tabular-nums; }
.totals div { display: flex; justify-content: space-between; gap: 20px; }
.totals .grand { font-weight: 800; font-size: 17px; border-top: 1px solid var(--line); padding-top: 8px; }
.paylink { margin-top: 14px; } .paylink .row { display: flex; gap: 6px; } .paylink input { font-size: 12px; }
.pay-actions { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 14px; }
.form-actions .btn-danger { margin-right: auto; }
.toolbar select { width: auto; }
input:disabled, select:disabled, textarea:disabled { background: var(--bg); color: var(--ink); opacity: .85; }

/* Auswertung */
:root { --y1: #257de0; --y2: #f47230; --y3: #00b894; }
@media (prefers-color-scheme: dark) { :root { --y1: #338ced; --y2: #e76624; --y3: #00a888; } }
.year-bar { gap: 6px; }
.year-chip { border-radius: 99px; padding: 5px 12px; display: inline-flex; align-items: center; gap: 6px; font-variant-numeric: tabular-nums; }
.year-chip.on { border-color: var(--ink); font-weight: 600; }
.year-chip i, i.sw { display: inline-block; width: 10px; height: 10px; border-radius: 3px; }
i.sw { margin-right: 6px; vertical-align: -1px; }
.an-kpis { grid-template-columns: repeat(auto-fit, minmax(190px, 1fr)); margin-bottom: 16px; }
.an-kpi { text-align: left; font: inherit; color: inherit; cursor: pointer; }
.an-kpi.sel { border-color: var(--accent); box-shadow: inset 0 0 0 1px var(--accent); }
.an-kpi .num { font-size: 22px; font-variant-numeric: tabular-nums; }
.an-kpi .sub { display: flex; gap: 6px; flex-wrap: wrap; align-items: baseline; }
.delta { font-weight: 700; font-size: 12px; white-space: nowrap; }
.delta.up { color: var(--ok); } .delta.down { color: var(--danger); } .delta.flat { color: var(--muted); }
.an-main { margin-bottom: 16px; }
.an-head { align-items: flex-start; gap: 12px; flex-wrap: wrap; }
.an-title { font-size: 19px; margin: 0 0 2px; letter-spacing: -0.01em; }
.an-controls { display: flex; gap: 8px; flex-wrap: wrap; }
.an-controls select { width: auto; }
.an-legend { margin: 4px 0 6px; font-size: 13px; color: var(--ink); font-variant-numeric: tabular-nums; }
.an-fig { position: relative; height: 320px; }
.an-fig svg { position: absolute; inset: 0; }
.an-fig .ax { font-size: 11.5px; fill: var(--muted); font-variant-numeric: tabular-nums; }
.an-fig .grid-l { stroke: var(--line); stroke-width: 1; }
.an-fig .base-l { stroke: var(--muted); stroke-width: 1; }
.an-fig .cross { stroke: var(--muted); stroke-width: 1; stroke-dasharray: 3 3; }
.an-tip { position: absolute; z-index: 2; pointer-events: none; background: var(--panel); border: 1px solid var(--line); border-radius: 8px;
  padding: 8px 10px; font-size: 12.5px; box-shadow: 0 6px 20px rgba(0,0,0,.12); min-width: 150px; }
.tt-h { font-weight: 700; margin-bottom: 4px; }
.tt-r { display: flex; align-items: center; gap: 2px; } .tt-r b { margin-left: auto; padding-left: 12px; font-variant-numeric: tabular-nums; }
.an-two { grid-template-columns: minmax(0, 1.25fr) minmax(0, 1fr); }
@media (max-width: 1050px) { .an-two { grid-template-columns: 1fr; } }
.an-table td, .an-table th { padding: 7px 10px; white-space: nowrap; }
.an-table tbody tr { cursor: default; } .an-table tbody tr:hover { background: transparent; }
.an-table tr.dim td { color: var(--muted); }
.an-table tr.qrow td { background: var(--bg); font-weight: 600; }
.an-table tr.total td { font-weight: 800; border-top: 2px solid var(--line); }
.hbars { display: grid; gap: 8px; }
.hb { display: grid; grid-template-columns: minmax(0, 140px) minmax(0, 1fr) auto; gap: 10px; align-items: center; font-size: 13px; }
.hb-name { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.hb-track { height: 10px; }
.hb-bar { height: 10px; background: var(--y1); border-radius: 0 4px 4px 0; }
.hb-val { font-variant-numeric: tabular-nums; white-space: nowrap; }

/* ---------- Schlanke Oberfläche (v2) ---------- */
:root { --side: #fbfbfa; --side-ink: #3b3b42; --side-line: #e9e8e4; --side-hover: #f0efec; --side-active: #e8eefc; }
@media (prefers-color-scheme: dark) { :root { --side: #141416; --side-ink: #c9c9d0; --side-line: #26262b; --side-hover: #1e1e22; --side-active: #232b45; } }
body { font-size: 14.5px; }
.sidebar { width: 220px; background: var(--side); border-right: 1px solid var(--side-line); padding: 20px 14px; }
.brand strong { color: var(--ink); }
.brand small { color: var(--muted); }
.logo { background: var(--ink); color: var(--panel); }
.search input { background: var(--panel); border-color: var(--side-line); color: var(--ink); font-size: 13.5px; padding: 9px 11px; }
.search input:focus { border-color: var(--accent); }
nav { gap: 2px; margin-top: 12px; }
nav a { display: flex; align-items: center; gap: 11px; color: var(--side-ink); padding: 9px 10px; border-radius: 8px; font-size: 14.5px; }
nav a:hover { background: var(--side-hover); text-decoration: none; }
nav a.active { background: var(--side-active); color: var(--accent); font-weight: 600; }
.ni { width: 19px; height: 19px; flex-shrink: 0; fill: none; stroke: currentColor; stroke-width: 1.7; stroke-linecap: round; stroke-linejoin: round; opacity: .85; }
.nav-new { position: relative; margin-bottom: 12px; }
.nav-new > .btn-primary { width: 100%; padding: 9px; font-size: 14px; }
.new-menu { position: absolute; z-index: 30; top: calc(100% + 6px); left: 0; right: 0; background: var(--panel); border: 1px solid var(--line);
  border-radius: 10px; box-shadow: 0 12px 30px rgba(0,0,0,.12); padding: 5px; display: grid; }
.new-menu[hidden] { display: none; }
.new-menu button { border: none; background: none; text-align: left; padding: 8px 10px; font-size: 14px; border-radius: 7px; }
.new-menu button:hover { background: var(--accent-soft); }
.nav-more { border: none; background: none; text-align: left; color: var(--muted); font-size: 12px; font-weight: 600; text-transform: uppercase;
  letter-spacing: .05em; padding: 16px 10px 6px; display: flex; align-items: center; gap: 6px; }
.nav-more .caret { display: inline-block; transition: transform .15s; font-size: 14px; }
.nav-more.open .caret { transform: rotate(90deg); }
.nav-more-list { display: flex; flex-direction: column; gap: 2px; }
.nav-more-list[hidden] { display: none; }
.user-box { border-top: 1px solid var(--side-line); }
.user-name { color: var(--ink); }
.user-links a { color: var(--accent); }
main { padding: 32px 40px 70px; max-width: 1400px; }
.page-head h1 { font-size: 26px; }
.page-head { margin-bottom: 22px; }
.card { padding: 18px 20px; border-radius: 12px; }
.grid { gap: 18px; }
.list td { padding: 12px 14px; }
.list th { padding: 10px 14px; }
.big-seg { margin: -8px 0 18px; }
.big-seg a { padding: 8px 18px; color: var(--ink); font-size: 14px; }
.big-seg a:hover { text-decoration: none; background: var(--side-hover); }
.big-seg a.on { background: var(--accent-soft); color: var(--accent); font-weight: 600; }

/* Startseite „Heute“ */
.home-head { display: flex; align-items: flex-end; justify-content: space-between; margin-bottom: 22px; gap: 12px; }
.home-head h1 { font-size: 30px; margin: 0; letter-spacing: -0.02em; }
.home-date { font-size: 15px; margin-top: 4px; }
.home-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 22px; }
.home-stats a { display: grid; gap: 3px; background: var(--panel); border: 1px solid var(--line); border-radius: 12px; padding: 16px 20px; color: var(--ink); }
.home-stats a:hover { text-decoration: none; border-color: #c9c8c3; }
.home-stats .lbl { color: var(--muted); font-size: 13px; }
.home-stats .num { font-size: 26px; font-weight: 700; letter-spacing: -0.01em; font-variant-numeric: tabular-nums; }
.home-stats .sub { font-size: 12.5px; color: var(--muted); }
.home-grid { display: grid; grid-template-columns: 1.4fr 1fr; gap: 18px; align-items: start; }
.home-side { display: grid; gap: 18px; }
.home-block h3 { font-size: 15px; text-transform: none; letter-spacing: 0; color: var(--ink); display: flex; align-items: center; gap: 8px; }
.home-block .section-head { margin-bottom: 12px; }
.home-block .section-head a { font-size: 13px; }
.home-todo .mini li { padding: 11px 0; font-size: 15px; }
.home-todo input[type=checkbox] { width: 18px; height: 18px; }
.quick-add input { width: 100%; padding: 11px 13px; border: 1px dashed var(--line); border-radius: 9px; background: var(--bg); color: var(--ink); font: inherit; margin-bottom: 6px; }
.quick-add input:focus { outline: none; border-style: solid; border-color: var(--accent); background: var(--panel); }
.sub-head { font-size: 12px; font-weight: 600; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); margin: 18px 0 2px; }
.count-badge { background: var(--accent-soft); color: var(--accent); border-radius: 99px; padding: 1px 8px; font-size: 12px; font-weight: 700; }
.count-badge.red { background: #fbe3df; color: #a32a17; }
@media (prefers-color-scheme: dark) { .count-badge.red { background: #3b1d18; color: #f0a596; } }
.home-list { list-style: none; margin: 0; padding: 0; }
.home-list li + li { border-top: 1px solid var(--line); }
.home-list a { display: flex; align-items: center; gap: 12px; padding: 10px 0; color: var(--ink); }
.home-list a:hover { text-decoration: none; color: var(--accent); }
.home-list .grow { flex: 1; min-width: 0; }
.home-list small { display: block; color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.home-list strong { font-variant-numeric: tabular-nums; white-space: nowrap; }
.ch-dot { width: 9px; height: 9px; border-radius: 99px; flex-shrink: 0; border-width: 4.5px; border-style: solid; }
.hint { font-size: 12.5px; color: var(--muted); margin: 10px 0 0; }
.empty.small { padding: 18px 8px; font-size: 14px; }
@media (max-width: 1050px) { .home-grid { grid-template-columns: 1fr; } }
@media (max-width: 760px) {
  .sidebar { border-right: none; border-bottom: 1px solid var(--side-line); }
  main { padding: 20px 16px 40px; }
  .home-stats { grid-template-columns: 1fr; }
  .home-head h1 { font-size: 24px; }
}
@media (prefers-color-scheme: dark) { .btn-primary { color: #0b1230; } }
@media (max-width: 760px) {
  .sidebar { width: 100%; padding: 12px 16px 8px; display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; }
  .brand { padding: 0; }
  .search { grid-column: 1 / -1; grid-row: 2; }
  nav { grid-column: 1 / -1; flex-direction: row; overflow-x: auto; margin: 0; gap: 4px; scrollbar-width: none; }
  nav a { padding: 7px 11px; font-size: 14px; white-space: nowrap; flex-shrink: 0; }
  nav a .ni { width: 17px; height: 17px; }
  .nav-new { position: fixed; right: 16px; bottom: 84px; z-index: 35; margin: 0; }
  .nav-new > .btn-primary { width: auto; border-radius: 99px; padding: 12px 20px; box-shadow: 0 6px 20px rgba(31,79,209,.35); }
  .new-menu { top: auto; bottom: calc(100% + 6px); left: auto; right: 0; width: 180px; }
  .nav-more { display: none; }
  .nav-more-list, .nav-more-list[hidden] { display: contents; }
  nav .nav-bottom { margin: 0; }
  .user-box { grid-column: 2; grid-row: 1; border: none; margin: 0; padding: 0; text-align: right; }
  .user-name { display: none; }
}

/* Termine */
.appt-list { list-style: none; margin: 0; padding: 0; }
.appt { display: flex; align-items: center; gap: 14px; padding: 11px 0; cursor: pointer; }
.appt + .appt { border-top: 1px solid var(--line); }
.appt:hover .appt-title { color: var(--accent); }
.appt-time { min-width: 92px; font-variant-numeric: tabular-nums; font-weight: 600; font-size: 14px; }
.appt-time b { display: block; font-weight: 500; color: var(--muted); font-size: 12px; }
.appt-title { font-size: 15px; }
.appt-meta { color: var(--muted); font-size: 12.5px; margin-top: 2px; }
.appt.canceled .appt-title, .appt.canceled .appt-time { text-decoration: line-through; color: var(--muted); }
.appt-day { margin-bottom: 14px; }
.appt-day h3 { text-transform: none; letter-spacing: 0; font-size: 14px; color: var(--ink); margin-bottom: 4px; }
.cal-connect { display: flex; gap: 16px; align-items: center; margin-bottom: 16px; border-color: var(--accent); background: var(--accent-soft); }
.cal-connect p { margin: 4px 0 0; }
.cal-bar { display: flex; gap: 12px; align-items: center; flex-wrap: wrap; margin: -6px 0 16px; font-size: 13px; }
