@font-face { font-family: Inter; src: url(/assets/fonts/InterVariable.woff2) format('woff2'); font-weight: 100 900; font-display: swap; }
/* Farben – hell (Standard) und dunkel über [data-theme]. Das Skript im Kopf setzt das Attribut immer (Auto = Systemeinstellung). */
:root, [data-theme=light] {
  color-scheme: light;
  --brand: #ff6a00; --ink: #1f1d1a; --muted: #7a7266; --line: #e7e1d6; --bg: #f6f3ed; --card: #ffffff; --soft: #faf8f4; --soft2: #efe9de;
  --green: #2e8540; --orange: #d9822b; --red: #c8382c; --grey: #a39e95; --link-line: #cfc6b6; --text2: #4d473f; --framework: #6b5bd2;
  --pill-green: #e4f2e6; --pill-orange: #fbeedd; --pill-orange-ink: #a65f12; --pill-red: #fae3e0; --pill-ink: #5b5449;
  --note-bg: #fbf4ea; --note-line: #f0dfc6; --btn-on: #e9e4da; --btn-on-line: #d8d1c4; --shadow: 0 10px 30px rgba(60, 40, 10, .08);
  --chart-grid: #e5e1da; --chart-text: #8a8277; --chart-mark: #b9b2a6; --chart-seo: #1f1d1a; --chart-geo: var(--brand);
}
[data-theme=dark] {
  color-scheme: dark;
  --ink: #ece7df; --muted: #a39b8f; --line: #3a3631; --bg: #161513; --card: #201e1b; --soft: #282521; --soft2: #33302b;
  --green: #5cbf6d; --orange: #f0a04b; --red: #f0776a; --grey: #8a847b; --link-line: #5a544c; --text2: #cfc8bd; --framework: #a79bff;
  --pill-green: #1f3a25; --pill-orange: #43301a; --pill-orange-ink: #f3b46b; --pill-red: #47231f; --pill-ink: #d8d1c5;
  --note-bg: #2c241a; --note-line: #4a3a26; --btn-on: #3a3631; --btn-on-line: #4b463f; --shadow: 0 10px 30px rgba(0, 0, 0, .45);
  --chart-grid: #34302b; --chart-text: #8f887e; --chart-mark: #6c665e; --chart-seo: #ece7df;
}
html, body { font-family: Inter, system-ui, sans-serif; color: var(--ink); background: var(--bg); font-size: 15px; }
a { color: var(--ink); text-decoration: underline; text-decoration-color: var(--link-line); text-underline-offset: 3px; }
a:hover { color: var(--brand); }
.topbar { background: var(--card); border-bottom: 1px solid var(--line); padding: 0 24px; height: 56px; display: flex; align-items: center; gap: 22px; position: sticky; top: 0; z-index: 10; }
.topbar .logo { display: flex; align-items: center; gap: 10px; font-weight: 700; text-decoration: none; }
.topbar .logo i { width: 26px; height: 26px; border-radius: 6px; background: var(--brand); display: inline-grid; place-items: center; color: #fff; font-style: normal; font-size: 13px; }
.topbar nav { display: flex; gap: 18px; flex: 1; }
.topbar nav a { text-decoration: none; color: var(--muted); font-weight: 500; }
.topbar nav a.on, .topbar nav a:hover { color: var(--ink); }
.topbar .who { color: var(--muted); font-size: .85rem; }
.wrap { max-width: 1180px; margin: 0 auto; padding: 28px 24px 80px; }
h1.page { font-size: 1.6rem; font-weight: 700; margin-bottom: 4px; }
.sub { color: var(--muted); margin-bottom: 24px; }
.card-x { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 20px 22px; margin-bottom: 18px; }
.card-x h2 { font-size: 1.05rem; font-weight: 700; margin-bottom: 12px; }
.button.is-brand { background: var(--brand); color: #fff; border: 0; font-weight: 600; }
.button.is-brand:hover { filter: brightness(.95); color: #fff; }
.table td, .table th { vertical-align: middle; border-color: var(--line); }
.table th { color: var(--muted); font-weight: 600; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; }
.score { display: inline-flex; align-items: baseline; gap: 2px; font-weight: 700; font-variant-numeric: tabular-nums; }
.score small { font-weight: 500; color: var(--muted); font-size: .75em; }
.c-green { color: var(--green); } .c-orange { color: var(--orange); } .c-red { color: var(--red); } .c-grey { color: var(--grey); }
.dot { width: 9px; height: 9px; border-radius: 50%; display: inline-block; }
.dot.green { background: var(--green); } .dot.orange { background: var(--orange); } .dot.red { background: var(--red); } .dot.grey { background: var(--grey); }
.pill { display: inline-block; padding: 2px 9px; border-radius: 99px; font-size: .75rem; font-weight: 600; background: var(--soft2); color: var(--pill-ink); }
.pill.green { background: var(--pill-green); color: var(--green); } .pill.orange { background: var(--pill-orange); color: var(--pill-orange-ink); } .pill.red { background: var(--pill-red); color: var(--red); }
.big-scores { display: grid; grid-template-columns: 1fr 1fr; gap: 18px; }
.big-score { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 22px; }
.big-score .lbl { font-size: .8rem; font-weight: 700; letter-spacing: .06em; color: var(--muted); }
.big-score .num { font-size: 3rem; font-weight: 800; line-height: 1.1; }
.big-score .num small { font-size: 1.3rem; color: var(--grey); font-weight: 600; }
.cats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px; margin-top: 14px; }
.cats div { background: var(--soft); border-radius: 8px; padding: 10px 12px; font-size: .85rem; display: flex; justify-content: space-between; }
details.chk { border-top: 1px solid var(--line); }
details.chk > summary { list-style: none; cursor: pointer; display: grid; grid-template-columns: 22px 260px 70px 1fr; gap: 10px; align-items: center; padding: 10px 2px; }
details.chk > summary::-webkit-details-marker { display: none; }
details.chk > summary:hover { background: var(--soft); }
details.chk .det { padding: 4px 0 14px 32px; font-size: .85rem; color: var(--text2); }
details.chk .det pre { background: var(--soft); color: var(--text2); font-size: .78rem; max-height: 280px; overflow: auto; white-space: pre-wrap; }
.muted { color: var(--muted); }
.small { font-size: .85rem; }
.flash { margin-bottom: 16px; }
.progress-box { text-align: center; padding: 60px 20px; }
.spinner { width: 34px; height: 34px; border: 3px solid var(--soft2); border-top-color: var(--brand); border-radius: 50%; animation: spin 1s linear infinite; margin: 0 auto 18px; }
@keyframes spin { to { transform: rotate(360deg); } }
.owner-framework { color: var(--framework); }
.hist { display: flex; gap: 6px; align-items: flex-end; height: 60px; }
.hist span { width: 14px; border-radius: 3px 3px 0 0; }
.form-grid { display: grid; grid-template-columns: 1fr 1fr; gap: 0 18px; }
.swatch { width: 38px; height: 38px; border-radius: 6px; border: 1px solid var(--line); padding: 0; }
.linkbox { display: flex; gap: 8px; align-items: center; }
.linkbox input { font-family: ui-monospace, monospace; font-size: .8rem; }
.nowrap { white-space: nowrap; }
.betreuung { background: var(--note-bg); border: 1px solid var(--note-line); border-radius: 8px; padding: 12px 14px; margin: 6px 0 14px; }
.mstat { display: inline-flex; gap: 4px; }
.mstat button { white-space: nowrap; border: 1px solid var(--line); background: var(--card); border-radius: 99px; font-size: .72rem; padding: 2px 9px; cursor: pointer; color: var(--muted); }
.mstat button.on { background: var(--btn-on); color: var(--ink); border-color: var(--btn-on-line); }
.mstat button.on.erledigt { background: var(--green); border-color: var(--green); color: #fff; }
.mstat button.on.arbeit { background: var(--orange); border-color: var(--orange); color: #fff; }
.todo { display: grid; grid-template-columns: repeat(3, 1fr); gap: 14px; margin-bottom: 18px; }
.todo .card-x { margin: 0; }
.todo h2 { display: flex; justify-content: space-between; }
.todo li { padding: 6px 0; border-top: 1px dashed var(--line); font-size: .88rem; }
.todo li:first-child { border-top: 0; }
.delta-up { color: var(--green); font-weight: 600; } .delta-down { color: var(--red); font-weight: 600; }

/* Bulma-Bestandteile an die Flächen anpassen */
.card-x .table, .table { background: transparent; color: var(--ink); }
.table td, .table th { color: inherit; }
.table.is-hoverable tbody tr:hover, .table.is-hoverable tbody tr:not(.is-selected):hover { background: var(--soft) !important; }
.label { color: var(--ink); } .help { color: var(--muted); }
.button:not(.is-brand):not(.is-text) { background: var(--card); border-color: var(--line); color: var(--ink); }
.button:not(.is-brand):not(.is-text):hover { border-color: var(--muted); }
.button.is-text { color: var(--muted); }
.input, .textarea, .select select { background: var(--card); border-color: var(--line); color: var(--ink); }
.input::placeholder, .textarea::placeholder { color: var(--grey); }
.checkbox:hover { color: inherit; }

/* Umschalter Hell / Dunkel / Auto */
.theme-switch { display: inline-flex; border: 1px solid var(--line); border-radius: 99px; padding: 2px; background: var(--soft); }
.theme-switch button { border: 0; background: transparent; color: var(--muted); width: 28px; height: 24px; border-radius: 99px; cursor: pointer; display: grid; place-items: center; }
.theme-switch button svg { width: 14px; height: 14px; }
[data-theme-mode=light] .theme-switch [data-mode=light], [data-theme-mode=dark] .theme-switch [data-mode=dark], [data-theme-mode=auto] .theme-switch [data-mode=auto] { background: var(--card); color: var(--ink); box-shadow: 0 1px 2px rgba(0,0,0,.15); }

/* Arbeitsplan: Monate untereinander */
.timeline { padding: 6px 22px; }
.tl-month { display: grid; grid-template-columns: 170px 1fr; gap: 18px; padding: 14px 0; border-top: 1px solid var(--line); }
.tl-month:first-child { border-top: 0; }
.tl-head strong { display: block; font-weight: 700; }
.tl-head .bar { height: 4px; border-radius: 2px; background: var(--soft2); margin-top: 8px; overflow: hidden; }
.tl-head .bar span { display: block; height: 100%; background: var(--brand); }
.tl-items { display: grid; gap: 2px; }
.tl-item { display: grid; grid-template-columns: 1fr 120px 70px; gap: 12px; align-items: baseline; padding: 4px 0; font-size: .9rem; }
.tl-item .st { color: var(--muted); font-size: .8rem; }
.tl-item .h { text-align: right; font-variant-numeric: tabular-nums; white-space: nowrap; }
.tl-item.is-cont { color: var(--muted); }
.tl-item .arbeit-dot { color: var(--orange); }
@media (max-width: 760px) { .tl-month { grid-template-columns: 1fr; gap: 6px; } .tl-item { grid-template-columns: 1fr 70px; } .tl-item .st { display: none; } .todo, .big-scores, .cats, .form-grid { grid-template-columns: 1fr; } }

/* Präsentationsmodus */
.redact { filter: blur(5px); user-select: none; pointer-events: none; }
.present-toggle button { display: inline-flex; align-items: center; gap: 6px; border: 1px solid var(--line); background: var(--soft); color: var(--muted); border-radius: 99px; padding: 3px 11px 3px 9px; font-size: .78rem; font-weight: 600; cursor: pointer; }
.present-toggle button svg { width: 14px; height: 14px; }
.present-toggle button:hover { color: var(--ink); }
.present-toggle button.on { background: var(--brand); border-color: var(--brand); color: #fff; }
.present-bar { background: var(--brand); color: #fff; text-align: center; font-size: .85rem; font-weight: 600; padding: 7px 16px; display: flex; justify-content: center; align-items: center; gap: 14px; }
.present-bar button { background: rgba(255,255,255,.2); border: 1px solid rgba(255,255,255,.5); color: #fff; border-radius: 99px; padding: 2px 12px; font-weight: 600; cursor: pointer; }

/* Eigene Maßnahmen */
.check-grid { display: grid; grid-template-columns: repeat(3, 1fr); gap: 10px 18px; background: var(--soft); border-radius: 8px; padding: 12px 14px; }
.check-grid label { display: block; margin: 2px 0; }
.check-grid strong { display: block; margin-bottom: 4px; }
.month-pin select { font-size: .75rem; padding: 1px 4px; border: 1px solid var(--line); border-radius: 6px; background: var(--card); color: var(--ink); }
.month-pin select.pinned { border-color: var(--brand); }
.tag-custom { font-size: .68rem; font-weight: 700; color: var(--framework); text-transform: uppercase; letter-spacing: .04em; }
/* KI-Abfrage */
.ki-kpis { display: grid; grid-template-columns: 1.3fr 1fr 1fr 1fr; gap: 14px; }
.ki-kpis > div { background: var(--card); border: 1px solid var(--line); border-radius: 10px; padding: 16px 18px; }
.ki-kpis .lbl { font-size: .8rem; color: var(--muted); font-weight: 600; text-transform: uppercase; letter-spacing: .03em; }
.ki-kpis .num { font-size: 2rem; font-weight: 800; line-height: 1.2; font-variant-numeric: tabular-nums; }
.ki-kpis .num small { font-size: .9rem; color: var(--muted); font-weight: 600; }
.ki-cell { text-align: center; white-space: nowrap; }
.ki-yes { color: var(--green); font-weight: 700; } .ki-no { color: var(--grey); } .ki-src { color: var(--brand); font-weight: 700; }
.ki-q { font-weight: 600; }
.ki-answer { background: var(--soft); border-radius: 8px; padding: 12px 14px; margin: 6px 0 10px; font-size: .88rem; white-space: pre-wrap; max-height: 360px; overflow: auto; }
.ki-answer mark { background: var(--note-bg); color: inherit; padding: 0 2px; border-radius: 3px; }
.ki-prompt { display: grid; grid-template-columns: 1fr auto; gap: 10px; align-items: center; padding: 6px 0; border-top: 1px solid var(--line); }
.ki-prompt.off { opacity: .5; }
.bar { height: 8px; background: var(--soft2); border-radius: 99px; overflow: hidden; } .bar span { display: block; height: 100%; background: var(--brand); }
@media (max-width: 800px) { .ki-kpis { grid-template-columns: 1fr 1fr; } }
.quota-grid { display: grid; grid-template-columns: repeat(6, 1fr); gap: 0 12px; } .quota-grid .label { font-size: .72rem; }
/* Arbeitsplan: Jetzt dran + Zeitplan */
.big-scores.compact .big-score { padding: 12px 16px; } .big-scores.compact .num { font-size: 1.7rem; }
.now-row { display: flex; justify-content: space-between; align-items: center; gap: 12px; padding: 8px 0; border-top: 1px solid var(--line); }
.now-row:first-of-type { border-top: 0; }
.now-title a { font-weight: 600; color: var(--ink); text-decoration: none; }
.gantt { --name: minmax(220px, 2.4fr); font-size: .9rem; }
.g-row { display: grid; grid-template-columns: var(--name) repeat(var(--n), minmax(34px, 1fr)); align-items: center; position: relative; }
.g-head { border-bottom: 1px solid var(--line); padding-bottom: 6px; }
.g-m { text-align: center; line-height: 1.15; } .g-m span { font-size: .68rem; }
.g-item { border-bottom: 1px solid var(--line); }
.g-item > summary { list-style: none; cursor: pointer; min-height: 40px; }
.g-item > summary::-webkit-details-marker { display: none; }
.g-item > summary:hover { background: var(--soft); }
.g-item[open] > summary { background: var(--soft); }
.g-name { padding: 8px 10px 8px 2px; grid-column: 1; grid-row: 1; }
.g-cell { grid-row: 1; height: 100%; border-left: 1px dashed var(--line); }
.g-bar { grid-row: 1; height: 22px; margin: 0 2px; border-radius: 6px; background: var(--soft2); border: 1px solid var(--line); display: flex; align-items: center; padding: 0 7px; overflow: hidden; z-index: 1; }
.g-bar span { font-size: .7rem; white-space: nowrap; color: var(--muted); font-variant-numeric: tabular-nums; }
.g-bar.offen { background: color-mix(in srgb, var(--brand) 18%, var(--card)); border-color: color-mix(in srgb, var(--brand) 40%, var(--card)); }
.g-bar.offen span { color: var(--ink); }
.g-bar.arbeit { background: var(--orange); border-color: var(--orange); } .g-bar.arbeit span { color: #fff; }
.g-bar.fw { background: color-mix(in srgb, var(--framework) 18%, var(--card)); border-color: color-mix(in srgb, var(--framework) 45%, var(--card)); }
.g-bar.pinned { outline: 2px solid var(--brand); outline-offset: -2px; }
.g-detail { display: grid; grid-template-columns: 1fr auto; gap: 18px; padding: 10px 4px 16px; font-size: .88rem; }
.g-actions { display: flex; flex-direction: column; align-items: flex-end; gap: 6px; }
.g-load { padding-top: 6px; }
.leg { display: inline-block; width: 14px; height: 9px; border-radius: 3px; vertical-align: middle; background: color-mix(in srgb, var(--brand) 18%, var(--card)); border: 1px solid color-mix(in srgb, var(--brand) 40%, var(--card)); }
.leg.arbeit { background: var(--orange); border-color: var(--orange); } .leg.fw { background: color-mix(in srgb, var(--framework) 18%, var(--card)); border-color: color-mix(in srgb, var(--framework) 45%, var(--card)); }
@media (max-width: 760px) { .gantt { --name: 140px; } .g-detail { grid-template-columns: 1fr; } .g-actions { align-items: flex-start; } }
.arbeit-dot { color: var(--orange); }
.g-item[open] > .g-detail { background: var(--soft); border-top: 1px dashed var(--line); padding-left: 10px; padding-right: 10px; }
.g-done .g-name { color: var(--muted); } .done-check { color: var(--green); font-weight: 800; }
.g-donenote { grid-row: 1; z-index: 1; font-size: .75rem; color: var(--green); padding: 3px 9px; margin: 0 2px; border-radius: 6px; background: color-mix(in srgb, var(--green) 12%, var(--card)); justify-self: start; }
.leg.done { background: color-mix(in srgb, var(--green) 25%, var(--card)); border-color: var(--green); }
/* Detailfenster Maßnahme */
.g-item[data-open] { cursor: pointer; }
.g-item[data-open]:hover { background: var(--soft); }
.tag-ki { font-size: .66rem; font-weight: 800; color: #fff; background: var(--brand); border-radius: 4px; padding: 1px 5px; margin-left: 4px; vertical-align: middle; }
.cm-count { font-size: .72rem; color: var(--muted); margin-left: 6px; white-space: nowrap; }
.mdlg { width: min(860px, 94vw); max-height: 88vh; border: 1px solid var(--line); border-radius: 14px; padding: 0; background: var(--card); color: var(--ink); box-shadow: 0 20px 60px rgba(0,0,0,.25); }
.mdlg::backdrop { background: rgba(20, 18, 15, .45); }
#mdlg-body { padding: 22px 26px 24px; }
.md-head { display: flex; justify-content: space-between; gap: 16px; align-items: flex-start; border-bottom: 1px solid var(--line); padding-bottom: 12px; margin-bottom: 16px; }
.md-title { font-size: 1.35rem; font-weight: 800; line-height: 1.25; margin: 0; }
.md-close { background: none; border: 0; font-size: 1.8rem; line-height: 1; color: var(--muted); cursor: pointer; padding: 0 4px; }
.md-close:hover { color: var(--ink); }
.md-body { display: grid; grid-template-columns: 1fr 210px; gap: 28px; }
.md-facts { display: grid; grid-template-columns: 130px 1fr; gap: 6px 14px; margin: 16px 0 20px; font-size: .88rem; }
.md-facts dt { color: var(--muted); } .md-facts dd { margin: 0; }
.md-sub { font-size: .95rem; font-weight: 700; margin: 0 0 8px; padding-top: 14px; border-top: 1px solid var(--line); }
.md-comments .cm { padding: 8px 0; border-bottom: 1px dashed var(--line); font-size: .9rem; }
.cm-h { font-size: .8rem; color: var(--muted); margin-bottom: 2px; } .cm-h strong { color: var(--ink); }
.cm-act { margin-left: 6px; } .cm-act a { color: var(--muted); text-decoration: underline; }
.cm-rep { font-size: .68rem; margin-left: 4px; }
.md-form { margin-top: 12px; } .md-form .textarea { min-height: 64px; font-size: .9rem; background: var(--card); color: var(--ink); border-color: var(--line); }
.md-side .mstat { flex-wrap: wrap; }
@media (max-width: 760px) { .md-body { grid-template-columns: 1fr; } .md-facts { grid-template-columns: 1fr; } }
