/* Aterum: seitenspezifische Gestaltung. Grundbausteine stehen in app.css. */

/* ---------- Anmeldung ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 24px 16px; background: radial-gradient(ellipse at 30% 0%, rgba(244, 209, 126, .07), transparent 60%), var(--bg); }
.auth-card { width: min(420px, 100%); background: var(--surface); border: 1px solid var(--border); border-radius: 18px; padding: 28px; }
.auth-card .brand { padding: 0 0 22px; }
.auth-card h1 { font-size: 24px; }
.auth-card .sub { margin-bottom: 22px; }

/* ---------- Übersicht ---------- */
.list-foot { display: block; margin-top: 10px; }
.empty.compact { padding: 10px 0 4px; }
.empty.compact p { margin-bottom: 10px; }
.agenda { display: grid; gap: 4px; }
.agenda-item { display: flex; gap: 14px; align-items: flex-start; width: 100%; padding: 9px 10px; border-radius: var(--radius-sm); text-align: left; }
.agenda-item:hover { background: var(--surface-2); }
.agenda-item.past { opacity: .5; }
.agenda-time { font-size: 13px; font-variant-numeric: tabular-nums; color: var(--gold); min-width: 44px; line-height: 1.35; }
.agenda-time small, .agenda-text small { display: block; color: var(--muted); font-size: 12px; }
.agenda-text { border-left: 2px solid var(--gold-dim); padding-left: 12px; min-width: 0; overflow-wrap: anywhere; }
.agenda-text strong { font-weight: 500; font-size: 14px; }
.glance { display: grid; gap: 6px; width: 100%; padding: 10px 2px; border-bottom: 1px solid var(--border); text-align: left; }
.glance:last-child { border-bottom: 0; }
.glance:hover strong { color: var(--gold); }
.glance-top { display: flex; justify-content: space-between; gap: 10px; }
.glance-top strong { font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
.glance small { color: var(--muted); font-size: 12px; }

/* ---------- Posteingang ---------- */
.notice { padding: 12px 2px 12px 14px; border-bottom: 1px solid var(--border); border-left: 2px solid transparent; font-size: 14px; }
.notice:last-child { border-bottom: 0; }
.notice.unread { border-left-color: var(--gold); }
.notice small { display: block; color: var(--muted); font-size: 12px; margin-top: 3px; }

/* ---------- Kennzahlen-Varianten ---------- */
.kpis-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.kpi-value.small { font-size: 18px; line-height: 1.4; }
.check-field.inline { margin: 0 6px 0 0; }

/* ---------- Kalender ---------- */
.cal-card { padding: 0; overflow: hidden; }
.cal-scroll { overflow: auto; max-height: 70vh; }
.cal-grid { display: grid; grid-template-columns: 54px repeat(7, minmax(96px, 1fr)); min-width: 740px; }
.cal-head { position: sticky; top: 0; z-index: 2; background: var(--surface); text-align: center; padding: 10px 4px; font-size: 12px; color: var(--muted); border-bottom: 1px solid var(--border-strong); }
.cal-head strong { display: block; font: 600 17px var(--font-head); color: var(--ink); }
.cal-head.today, .cal-head.today strong { color: var(--gold); }
.cal-hour { font-size: 11px; color: var(--muted); height: 56px; padding: 6px 8px; border-bottom: 1px solid var(--border); text-align: right; }
/* Feste Zeilenhöhe: die Blockhöhe eines Termins rechnet in calendar.js damit (CELL_HEIGHT). */
.cal-cell { position: relative; height: 56px; border-left: 1px solid var(--border); border-bottom: 1px solid var(--border); cursor: cell; }
.cal-cell:hover { background: rgba(255, 255, 255, .015); }
.cal-cell.today { background: rgba(244, 209, 126, .03); }
/* Termine liegen über dem Raster, damit sie ihre echte Dauer nach unten belegen dürfen. */
.cal-event { position: absolute; z-index: 2; overflow: hidden; padding: 4px 6px; border-radius: 6px; text-align: left;
  font-size: 12px; line-height: 1.3; overflow-wrap: anywhere;
  background: var(--surface-3);
  background: color-mix(in srgb, var(--bereich) 16%, var(--surface));
  border-left: 3px solid var(--bereich); box-shadow: 0 1px 4px rgba(0, 0, 0, .35); }

/* Aufwand und Dauer: Stunden und Minuten nebeneinander statt Dezimalzahlen. */
.dur-pair { display: flex; align-items: center; gap: 6px; }
.dur-pair input { width: 100%; min-width: 0; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 10px; padding: 10px 8px; font-size: 14.5px; color: var(--ink); text-align: right; }
.dur-pair input:focus { outline: none; border-color: var(--gold-dim); }
.dur-pair span { font-size: 12.5px; color: var(--muted); }
.cal-event:hover { filter: brightness(1.18); }
.cal-event b { display: block; font-weight: 600; font-size: 10.5px; color: var(--bereich); }
.cal-event.other { border-left-style: dashed; opacity: .78; }
.cal-legend { display: flex; flex-wrap: wrap; gap: 6px 16px; margin: -6px 0 14px; font-size: 12px; color: var(--muted); }
.cal-legend span { display: inline-flex; align-items: center; gap: 7px; }
.cal-legend i { width: 10px; height: 10px; border-radius: 3px; flex: 0 0 auto; }
.agenda-item { --bereich: var(--gold); }
.agenda-item .agenda-time { color: var(--bereich); }
.agenda-item .agenda-text { border-left-color: var(--bereich); }
.cal-list { display: none; }
.cal-day + .cal-day { margin-top: 10px; }
.cal-day-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; font-size: 13px; color: var(--ink-2); margin-bottom: 6px; }
.cal-day.today .cal-day-head span { color: var(--gold); }

/* ---------- Wissen ---------- */
.note-card { display: flex; flex-direction: column; gap: 8px; min-height: 160px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-align: left; min-width: 0; }
.note-card:hover { border-color: var(--border-strong); }
.note-card h3 { font-size: 16px; overflow-wrap: anywhere; }
.note-card p { flex: 1; font-size: 13.5px; color: var(--ink-2); white-space: pre-line; overflow-wrap: anywhere; }
.note-card small { font-size: 12px; color: var(--muted); }

.template-row { display: flex; flex-wrap: wrap; align-items: center; gap: 6px; margin: -4px 0 16px; }
.template-chip { font-size: 12.5px; color: var(--ink-2); border: 1px dashed var(--border-strong); border-radius: 20px; padding: 4px 11px; }
.template-chip:hover { color: var(--gold); border-color: var(--gold-dim); }
.company-mark { width: 30px; height: 30px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-3); color: var(--gold); font: 600 13px var(--font-head); flex: 0 0 auto; }

/* ---------- Projekte ---------- */
.project-card { display: flex; flex-direction: column; gap: 10px; padding: 18px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); text-align: left; min-width: 0; }
.project-card:hover { border-color: var(--border-strong); }
.project-top { display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.project-card h3 { font-size: 17px; overflow-wrap: anywhere; }
.project-card > p { font-size: 13.5px; color: var(--ink-2); overflow-wrap: anywhere; }
.project-owner { display: inline-flex; align-items: center; gap: 6px; min-width: 0; font-size: 12px; color: var(--muted); }
.project-owner .avatar { width: 22px; height: 22px; font-size: 10px; }
.project-next { font-size: 13px; overflow-wrap: anywhere; border-top: 1px solid var(--border); padding-top: 10px; margin-top: auto; }
.project-next small { display: block; font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dim); margin-bottom: 3px; }
.project-foot { display: flex; justify-content: space-between; gap: 10px; font-size: 12px; color: var(--muted); }
.detail-progress { margin: -4px 0 16px; }
.plan-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px; margin: 16px 0 8px; }
.plan-item { background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; padding: 13px 14px; min-width: 0; }
.plan-item h3 { font: 600 11px var(--font); letter-spacing: .08em; text-transform: uppercase; color: var(--gold-dim); margin-bottom: 6px; }
.plan-item p { font-size: 13.5px; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }
.detail-section { border-top: 1px solid var(--border); margin-top: 18px; padding-top: 14px; }
.detail-section > h3, .detail-section .card-head h3 { font-size: 14px; margin-bottom: 8px; }
.detail-section .card-head { margin-bottom: 4px; }
.detail-section.comments { margin-top: 18px; }
.resource-row { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 0; border-bottom: 1px solid var(--border); }
.resource-row:last-child { border-bottom: 0; }
.resource-open { text-align: left; min-width: 0; overflow-wrap: anywhere; font-size: 14px; }
.resource-open:hover { color: var(--gold); }
.resource-open small { display: block; font-size: 11px; color: var(--muted); text-transform: uppercase; letter-spacing: .08em; }

/* ---------- Dokumente ---------- */
.doc-row { align-items: center; }
.doc-glyph { width: 40px; height: 46px; border-radius: 8px; display: grid; place-items: center; background: var(--surface-2); border: 1px solid var(--border-strong); color: var(--gold); font-size: 10px; font-weight: 600; letter-spacing: .06em; flex: 0 0 auto; }
.search.year { flex: 0 0 110px; }
.ocr-row { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; margin-bottom: 12px; }
.drop { position: relative; display: block; border: 1.5px dashed var(--border-strong); border-radius: 12px; padding: 22px 16px; text-align: center; margin-bottom: 16px; font-size: 14px; color: var(--ink-2); }
.drop:hover, .drop:focus-within { border-color: var(--gold-dim); }
.drop input { position: absolute; inset: 0; opacity: 0; cursor: pointer; width: 100%; }
.drop strong { color: var(--gold); font-weight: 600; }
.drop small { display: block; color: var(--muted); font-size: 12px; margin-top: 4px; }

/* ---------- Unternehmen ---------- */
.milestones { display: grid; gap: 2px; }
.milestone { display: flex; gap: 12px; align-items: flex-start; width: 100%; padding: 10px 4px; border-bottom: 1px solid var(--border); text-align: left; }
.milestone:last-child { border-bottom: 0; }
.milestone:hover strong { color: var(--gold); }
.milestone-num { width: 26px; height: 26px; border-radius: 50%; border: 1px solid var(--gold-dim); color: var(--gold); display: grid; place-items: center; font-size: 12px; flex: 0 0 auto; }
.milestone strong { display: block; font-weight: 500; font-size: 14px; overflow-wrap: anywhere; }
.milestone small { display: block; color: var(--muted); font-size: 12.5px; overflow-wrap: anywhere; }
.facts { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 16px 22px; margin: 0; }
.facts dt { font-size: 11.5px; color: var(--muted); margin-bottom: 3px; }
.facts dd { margin: 0; font-size: 14px; color: var(--ink-2); white-space: pre-wrap; overflow-wrap: anywhere; }

/* ---------- Finanzen ---------- */
.fin-toolbar select { min-width: 220px; }
.save-note { font-size: 12.5px; color: var(--muted); margin-right: auto; }
.save-note.dirty { color: var(--warn); }
.fin-group { border-top: 1px solid var(--border); padding-top: 12px; margin-top: 4px; }
.fin-group-label { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; }
.cost-table { display: grid; gap: 6px; margin-bottom: 12px; overflow-x: auto; }
.cost-row { display: grid; grid-template-columns: minmax(110px, 1.5fr) minmax(80px, 1fr) minmax(80px, 1fr) 42px 28px; gap: 6px; align-items: center; min-width: 380px; }
.cost-flag { display: grid; place-items: center; }
.cost-flag input { width: 18px; height: 18px; accent-color: var(--gold); }
.fin-hint { margin-bottom: 10px; }
#company-total { margin-bottom: 10px; }
.cost-row input { width: 100%; min-width: 0; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 8px; padding: 7px 9px; font-size: 13.5px; }
.cost-row input:focus { outline: none; border-color: var(--gold-dim); }
.cost-head { font-size: 11.5px; color: var(--muted); }
.sliders { display: grid; gap: 14px; margin: 14px 0 16px; }
.slider { display: grid; gap: 7px; font-size: 13px; color: var(--ink-2); }
.slider > span { display: flex; justify-content: space-between; gap: 10px; }
.slider b { color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }
input[type=range] { width: 100%; -webkit-appearance: none; appearance: none; height: 4px; border-radius: 3px; background: var(--surface-3); outline: none; cursor: pointer; margin: 6px 0; }
input[type=range]::-webkit-slider-thumb { -webkit-appearance: none; width: 18px; height: 18px; border-radius: 50%; background: var(--gold); border: 0; }
input[type=range]::-moz-range-thumb { width: 18px; height: 18px; border-radius: 50%; background: var(--gold); border: 0; }
.impact-hero { background: var(--surface-2); border: 1px solid var(--border); border-radius: 12px; padding: 14px 16px; margin-bottom: 12px; }
.impact-hero span { display: block; font-size: 12.5px; color: var(--muted); }
.impact-hero strong { display: block; font: 600 28px/1.25 var(--font-head); color: var(--gold); font-variant-numeric: tabular-nums; }
.impact-hero small { font-size: 12.5px; color: var(--ink-2); }
.impact-hero .bad, .ladder .bad { color: var(--bad); }
.impact-hero .good { color: var(--good); }
.impact-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 8px 14px; margin-bottom: 16px; }
.impact-grid span { display: block; font-size: 12px; color: var(--muted); }
.impact-grid b { font-weight: 600; font-variant-numeric: tabular-nums; }
.ladder { border-top: 1px solid var(--border); padding-top: 12px; }
.ladder-row { display: grid; grid-template-columns: 38px 1fr 64px; gap: 10px; align-items: center; font-size: 12.5px; color: var(--muted); padding: 3px 0; }
.ladder-row b { text-align: right; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; }
.ladder-row.on span:first-child, .ladder-row.on b { color: var(--gold); }
.ladder-bar { height: 6px; background: var(--surface-3); border-radius: 4px; overflow: hidden; }
.ladder-bar i { display: block; height: 100%; background: var(--gold-dim); border-radius: 4px; }
.ladder-row.on .ladder-bar i { background: var(--gold); }
.res-group + .res-group { margin-top: 16px; }
.res-row { display: flex; justify-content: space-between; gap: 14px; padding: 7px 0; border-bottom: 1px solid var(--border); font-size: 13.5px; color: var(--ink-2); }
.res-row b { font-weight: 500; color: var(--ink); font-variant-numeric: tabular-nums; white-space: nowrap; }
.res-row.strong b { color: var(--gold); }
#finance-details .note { margin-top: 14px; }

/* ---------- Finanzen · Überblick ---------- */
.amount { font-variant-numeric: tabular-nums; font-weight: 500; white-space: nowrap; color: var(--ink); }
.amount.in { color: var(--good); }
.amount.out { color: var(--ink-2); }
.ledger-row.reversed strong { text-decoration: line-through; color: var(--muted); }
.ledger-row.reversed .amount { opacity: .55; }
.recurring-row { width: 100%; text-align: left; align-items: center; }
.recurring-row strong { display: block; font-weight: 500; }
.recurring-row:hover strong { color: var(--gold); }
.recurring-row.ended { opacity: .5; }
.invest { display: grid; gap: 6px; padding: 10px 2px; border-bottom: 1px solid var(--border); }
.invest:last-child { border-bottom: 0; }
.invest strong { font-weight: 500; }
.invest small { color: var(--muted); font-size: 12px; }
.invest-foot { display: flex; justify-content: space-between; align-items: center; gap: 10px; }
.radio-seg { display: inline-flex; gap: 2px; padding: 3px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 11px; margin-bottom: 14px; }
.radio-seg label { display: flex; align-items: center; gap: 7px; padding: 6px 14px; border-radius: 8px; font-size: 13.5px; color: var(--ink-2); cursor: pointer; }
.radio-seg label:has(input:checked) { background: var(--surface-3); color: var(--gold); }
.radio-seg input { accent-color: var(--gold); margin: 0; }

/* ---------- Punkte ---------- */
.pts { font-size: 11px; color: var(--gold-dim); border: 1px solid rgba(201, 162, 74, .35); padding: 1px 8px; border-radius: 20px; white-space: nowrap; }
.threshold { position: relative; display: block; height: 8px; background: var(--surface-3); border-radius: 5px; margin: 8px 0; }
.threshold i { position: absolute; left: 0; top: 0; bottom: 0; background: var(--gold-dim); border-radius: 5px; }
.threshold i.reached { background: var(--gold); }
.threshold b { position: absolute; top: -3px; bottom: -3px; width: 2px; background: var(--ink-2); opacity: .6; }
.activity { display: flex; align-items: baseline; gap: 8px; }
.activity strong { font: 600 28px var(--font-head); }
.activity span { color: var(--muted); font-size: 13px; }
.team-points { display: grid; grid-template-columns: 110px 1fr 36px; align-items: center; gap: 12px; padding: 4px 0; font-size: 14px; }
.team-points b { text-align: right; font-weight: 500; }
.bars { position: relative; height: 120px; display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; align-items: end; border-bottom: 1px solid var(--border); margin-top: 8px; }
.bar { display: block; background: var(--surface-3); border-radius: 6px 6px 0 0; }
.bar.reached { background: var(--gold-dim); }
.bar.now { outline: 1px solid var(--gold-dim); outline-offset: 2px; }
.bars .target { position: absolute; left: 0; right: 0; border-top: 1px dashed var(--gold); opacity: .7; }
.bar-labels { display: grid; grid-template-columns: repeat(6, 1fr); gap: 10px; text-align: center; font-size: 11px; color: var(--muted); margin-top: 6px; }
.bars.week, .bar-labels.week { grid-template-columns: repeat(7, 1fr); }
.bar-labels.week { gap: 4px; font-size: 10.5px; }
.bar-labels b { display: block; color: var(--ink); font-weight: 500; font-size: 13px; }

/* ---------- Einstellungen ---------- */
.profile-line { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.profile-line .avatar { width: 48px; height: 48px; font-size: 18px; }
.profile-line small { display: block; color: var(--muted); font-size: 13px; }
.scopes { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 8px; }
.warn-text { color: var(--warn); margin-top: 6px; }
.row > .avatar { margin-top: 1px; }

/* ---------- Umsatzverlauf ---------- */
.spark { display: block; width: 100%; height: auto; margin: 4px 0 2px; overflow: visible; }
.spark-area { fill: var(--gold-soft); stroke: none; }
.spark-line { fill: none; stroke: var(--gold); stroke-width: 1.8; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.spark-dot { fill: var(--gold-dim); }
.spark-dot.now { fill: var(--gold); }
.spark-labels { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; text-align: center; font-size: 11px; color: var(--muted); margin-top: 6px; }
.spark-labels b { display: block; font-size: 12px; font-weight: 500; color: var(--ink-2); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.spark-labels .now b { color: var(--gold); }
.card-head .note.good { color: var(--good); }
.card-head .note.bad { color: var(--bad); }

/* ---------- Kapitalanteile ---------- */
.pool-row { display: grid; grid-template-columns: minmax(70px, 1fr) minmax(0, 2fr) 56px 88px; align-items: center; gap: 12px; padding: 7px 0; font-size: 13.5px; }
.pool-name { overflow-wrap: anywhere; }
.pool-share { text-align: right; font-weight: 600; color: var(--gold); font-variant-numeric: tabular-nums; }
.pool-row small { text-align: right; color: var(--muted); font-variant-numeric: tabular-nums; }

/* ---------- Aufgaben verschieben ---------- */

/* ---------- Konten und Einladungen ---------- */
.invite-code { margin: 14px 0 8px; padding: 16px; text-align: center; font: 600 26px/1.2 var(--font-head); letter-spacing: .12em;
  color: var(--gold); background: var(--surface-2); border: 1px dashed var(--gold-dim); border-radius: 12px; user-select: all; overflow-wrap: anywhere; }
.member-row { align-items: center; flex-wrap: wrap; }
.member-row .row-main { flex: 1 1 120px; }
.member-row input { flex: 2 1 140px; min-width: 0; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 9px; padding: 7px 10px; font-size: 13.5px; }
.member-row input:focus { outline: none; border-color: var(--gold-dim); }
.auth-switch { margin-top: 18px; text-align: center; }

/* ---------- Beleg → Buchung, automatische Kosten ---------- */
.booking-fields { border-top: 1px solid var(--border); margin-top: 4px; padding-top: 12px; }
.booked-note { border-left: 2px solid var(--good); background: rgba(134, 185, 143, .07); padding: 9px 12px; border-radius: 0 9px 9px 0; font-size: 13px; color: var(--ink-2); margin: 4px 0 8px; }
.booked-note b { color: var(--ink); font-weight: 600; }
.catch-up { display: block; margin: -2px 0 8px 2px; font-size: 12.5px; color: var(--gold); }

/* ---------- Rückmeldung mit Knopf, Kategorien ---------- */
.toast-action { margin-left: 12px; padding: 3px 10px; border-radius: 8px; background: rgba(28, 24, 8, .14); color: #1c1808; font-size: 13px; font-weight: 600; }
.toast-action:hover { background: rgba(28, 24, 8, .24); }
.chips { display: flex; flex-wrap: wrap; gap: 6px; }

/* ---------- E-Mail ---------- */
.mail-row { display: grid; gap: 3px; width: 100%; min-width: 0; padding: 12px 6px 12px 14px; text-align: left;
  border-bottom: 1px solid var(--border); border-left: 3px solid var(--bereich, var(--border-strong)); }
.mail-row:last-of-type { border-bottom: 0; }
.mail-row:hover .mail-subject { color: var(--gold); }
.mail-row.done { opacity: .58; }
.mail-top { display: flex; justify-content: space-between; align-items: baseline; gap: 12px; font-size: 13.5px; }
.mail-top strong { font-weight: 600; overflow-wrap: anywhere; }
.mail-top small { flex: 0 0 auto; color: var(--muted); font-size: 12px; white-space: nowrap; }
.mail-subject { font-size: 14.5px; overflow-wrap: anywhere; }
.mail-snippet { font-size: 12.5px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.mail-body { margin: 12px 0 4px; padding: 14px 16px; max-height: 50vh; overflow-y: auto; background: var(--surface-2);
  border: 1px solid var(--border); border-radius: 11px; font-size: 14px; line-height: 1.65; color: var(--ink-2);
  white-space: pre-wrap; overflow-wrap: anywhere; }
.mail-warn { margin-bottom: 14px; }

/* ---------- Suche über alles ---------- */
.search-field { margin-bottom: 10px; }
.search-field input { font-size: 16px; }
.search-results { max-height: min(52vh, 420px); overflow-y: auto; margin: 0 -4px; padding: 0 4px; }
.search-results .group-label { padding-top: 12px; }
.search-hit { display: grid; gap: 2px; width: 100%; padding: 9px 10px; border-radius: var(--radius-sm); text-align: left; }
.search-hit:hover, .search-hit.on { background: var(--surface-2); }
.search-hit.on { outline: 1px solid var(--gold-dim); }
.search-title { font-size: 14.5px; overflow-wrap: anywhere; }
.search-hit.on .search-title, .search-hit:hover .search-title { color: var(--gold); }
.search-sub { font-size: 12px; color: var(--muted); overflow-wrap: anywhere; }
.search-more { padding: 4px 10px 0; }
.search-hint { padding: 8px 2px 2px; }
.search-foot { margin-top: 12px; border-top: 1px solid var(--border); padding-top: 10px; }

/* ---------- Erste Schritte ---------- */
.setup-card .progress { margin-bottom: 6px; }
.setup-step { display: flex; align-items: center; gap: 12px; padding: 10px 2px; border-bottom: 1px solid var(--border); }
.setup-step:last-child { border-bottom: 0; }
.setup-step .row-main { display: grid; gap: 2px; }
.setup-step strong { font-size: 14px; font-weight: 500; }
.setup-step small { font-size: 12.5px; color: var(--muted); overflow-wrap: anywhere; }
.setup-check { width: 20px; height: 20px; border-radius: 50%; border: 1.5px solid var(--border-strong); display: grid; place-items: center; font-size: 11px; flex: 0 0 auto; }
.setup-step.done .setup-check { background: var(--good); border-color: var(--good); color: var(--bg); }
.setup-step.done strong { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }

/* ---------- Mitteilungen ---------- */
.push-state { display: flex; align-items: center; flex-wrap: wrap; gap: 8px 10px; padding: 4px 0 2px; }
.push-state .dot { width: 9px; height: 9px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.push-state.on .dot { background: var(--good); }
.push-state-text { flex: 1 1 160px; font-size: 14px; }
.push-toggles { margin: 16px 0 6px; padding-top: 14px; border-top: 1px solid var(--border); }
.push-toggle { align-items: flex-start; }
.push-toggle input { margin-top: 2px; }
.push-toggle span { display: grid; gap: 2px; }
.push-toggle small { color: var(--muted); font-size: 12.5px; }
.push-time { max-width: 160px; margin: -4px 0 14px 28px; }

.password-form { margin-bottom: 4px; }
.password-form .field-row { margin-bottom: 0; }

/* ---------- Seiten scannen ---------- */
.scan-or { text-align: center; font-size: 12px; color: var(--muted); margin: 8px 0; }
.scan-add { display: flex; align-items: center; justify-content: center; gap: 8px; cursor: pointer; }
.scan-add svg { width: 18px; height: 18px; }
.scan-list { margin: 14px 0 4px; }
.scan-thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(92px, 1fr)); gap: 8px; margin-bottom: 12px; }
.scan-thumb { position: relative; border: 1px solid var(--border); border-radius: 8px; overflow: hidden; background: var(--surface-2); }
.scan-thumb img { display: block; width: 100%; aspect-ratio: 3 / 4; object-fit: cover; }
.scan-number { position: absolute; top: 4px; left: 5px; font-size: 11px; background: rgba(0, 0, 0, .6); color: #fff; border-radius: 10px; padding: 1px 7px; }
.scan-actions { position: absolute; right: 3px; bottom: 2px; display: flex; gap: 6px; background: rgba(0, 0, 0, .55); border-radius: 8px; padding: 1px 6px; }
.scan-actions .link { color: #fff; font-size: 13px; }
.scan-actions .link.bad { color: var(--bad); }

.auth-hint { margin-bottom: 16px; }
.boot .note { max-width: 32ch; text-align: center; }
.boot-fehler p { color: var(--gold); max-width: 34ch; text-align: center; line-height: 1.6; }
.boot .btn { margin-top: 4px; }

/* ---------- Kontakte ---------- */
.contact-row { align-items: center; text-align: left; width: 100%; }
.contact-row:hover { background: var(--surface-2); }
.contact-row .row-side { flex-wrap: wrap; justify-content: flex-end; gap: 4px; max-width: 45%; }

/* ---------- Marketing ---------- */
.market-row { align-items: center; gap: 10px; text-align: left; width: 100%; }
.market-row:hover { background: var(--surface-2); }
.market-figures { display: grid; grid-template-columns: repeat(4, minmax(56px, auto)); gap: 4px 16px; flex: 0 0 auto; text-align: right; }
.market-figures b { display: block; font-size: 14px; font-weight: 500; font-variant-numeric: tabular-nums; }
.market-figures small { display: block; font-size: 10.5px; color: var(--muted); }
.market-figures .good b { color: var(--good); }
.market-figures .bad b { color: var(--bad); }
#utm-ergebnis input { font-size: 12.5px; }

/* ---------- To-do-Liste ---------- */
.todo-add { display: flex; gap: 8px; margin-bottom: 12px; }
.todo-add input { flex: 1; min-width: 0; background: var(--surface-2); border: 1px solid var(--border); border-radius: 10px; padding: 9px 13px; font-size: 14px; }
.todo-add input:focus { border-color: var(--gold-dim); outline: none; }
.todos { display: grid; }
.todo { display: flex; align-items: center; gap: 12px; padding: 9px 2px; border-bottom: 1px solid var(--border); }
.todo:last-child { border-bottom: 0; }
.todo-check { position: relative; width: 22px; height: 22px; flex: 0 0 auto; border-radius: 7px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; font-size: 12px; color: transparent; }
/* Fläche zum Antippen, ohne dass das Kästchen größer aussieht. */
.todo-check::after { content: ""; position: absolute; inset: -6px; }
.todo-check:hover { border-color: var(--gold); }
.todo.done .todo-check { background: var(--good); border-color: var(--good); color: var(--bg); }
.todo-text { flex: 1; min-width: 0; font-size: 14px; overflow-wrap: anywhere; }
.todo.done .todo-text { color: var(--muted); text-decoration: line-through; text-decoration-color: var(--border-strong); }
.todo-side { display: flex; align-items: center; gap: 8px; flex: 0 0 auto; }
.todo-side .icon-btn.small { width: 26px; height: 26px; font-size: 16px; opacity: 0; }
.todo:hover .todo-side .icon-btn.small, .todo-side .icon-btn.small:focus-visible { opacity: 1; }
/* Am Handy gibt es kein Überfahren mit der Maus – dort muss das × immer sichtbar sein. */
@media (hover: none) { .todo-side .icon-btn.small { opacity: .55; } .todo-check { width: 28px; height: 28px; } }
.todo-day + .todo-day { margin-top: 6px; }

/* ---------- Die drei Säulen ---------- */
.roof { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 10px 24px; border-color: var(--gold-dim); }
.roof strong { font: 600 16px var(--font-head); }
.roof .note { margin-top: 4px; max-width: 62ch; }
.roof-facts { display: flex; gap: 18px; font-size: 13px; color: var(--muted); }
.pillar { display: flex; flex-direction: column; gap: 14px; }
.pillar-head { display: flex; align-items: flex-start; gap: 12px; }
.pillar-head h3 { font-size: 15.5px; }
.pillar-head .note { margin-top: 4px; }
.pillar-num { width: 34px; height: 34px; flex: 0 0 auto; border-radius: 50%; border: 1px solid var(--gold-dim); color: var(--gold); display: grid; place-items: center; font: 600 13px var(--font-head); }
.pillar-body { flex: 1; }
.pillar-body .group-label:first-child { padding-top: 0; }
.pillar-body .row { padding: 10px 2px; }
.pillar-rules { list-style: none; margin: 0; padding: 12px 0 0; border-top: 1px solid var(--border); display: grid; gap: 6px; font-size: 12.5px; color: var(--muted); }
.pillar-rules li { position: relative; padding-left: 14px; line-height: 1.5; }
.pillar-rules li::before { content: ""; position: absolute; left: 0; top: 7px; width: 5px; height: 5px; border-radius: 50%; background: var(--gold-dim); }
.row-side select { background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 6px 9px; font-size: 12.5px; max-width: 210px; }
.phase-start { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--muted); }
.phase-start input { background: var(--surface-2); border: 1px solid var(--border); border-radius: 8px; padding: 4px 8px; font-size: 12.5px; }
.phase-now { display: flex; align-items: baseline; gap: 8px; margin-bottom: 8px; }
.phase-now strong { font: 600 22px var(--font-head); }
.phase-now span { font-size: 12.5px; color: var(--muted); }
button.setup-check:hover { border-color: var(--gold); color: var(--gold); }

/* ---------- Meine Cloud ---------- */
.visually-hidden { position: absolute; width: 1px; height: 1px; opacity: 0; overflow: hidden; pointer-events: none; }
.cloud-pick { cursor: pointer; }
.cloud-usage { display: grid; gap: 6px; margin: -6px 0 16px; max-width: 520px; }
.cloud-hint { margin: -4px 0 16px; max-width: 720px; }
.progress.full i { background: var(--bad); }
.cloud-body { min-height: 220px; border-radius: var(--radius); transition: box-shadow .15s; }
.cloud-body.dragging { box-shadow: 0 0 0 2px var(--gold-dim) inset; background: var(--gold-soft); }
.cloud-crumbs { display: flex; flex-wrap: wrap; align-items: center; justify-content: space-between; gap: 6px 16px; margin-bottom: 14px; font-size: 14px; }
.cloud-crumbs nav { display: flex; flex-wrap: wrap; align-items: center; gap: 4px 6px; min-width: 0; }
.cloud-crumbs nav strong { overflow-wrap: anywhere; }
.cloud-crumbs .sep { color: var(--muted); }
.cloud-folder-actions { display: flex; gap: 14px; }
.link.bad { color: var(--bad); }
.cloud-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(150px, 1fr)); gap: 12px; }
.cloud-grid.media { grid-template-columns: repeat(auto-fill, minmax(118px, 1fr)); gap: 6px; }
.cloud-tile { display: grid; gap: 4px; align-content: start; min-width: 0; padding: 8px; background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius-sm); text-align: left; }
.cloud-tile:hover { border-color: var(--border-strong); }
.cloud-visual { position: relative; display: grid; place-items: center; aspect-ratio: 1; border-radius: 8px; background: var(--surface-2); overflow: hidden; color: var(--muted); }
.cloud-visual svg { width: 38%; height: 38%; }
.cloud-tile.folder .cloud-visual { color: var(--gold); }
.cloud-visual img { width: 100%; height: 100%; object-fit: cover; }
.cloud-play { position: absolute; right: 7px; bottom: 6px; font-size: 11px; color: #fff; background: rgba(0, 0, 0, .55); border-radius: 20px; padding: 2px 7px; }
.cloud-name { font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-tile small { font-size: 11.5px; color: var(--muted); }
.cloud-grid.media .cloud-tile { padding: 0; border: 0; background: none; }
.cloud-grid.media .cloud-name, .cloud-grid.media .cloud-tile small { display: none; }
.cloud-row-icon { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 8px; background: var(--surface-2); color: var(--muted); flex: 0 0 auto; }
.cloud-row-icon svg { width: 18px; height: 18px; }
.cloud-viewer { display: grid; place-items: center; background: #000; border-radius: 10px; overflow: hidden; margin-bottom: 14px; min-height: 120px; }
.cloud-media { display: block; max-width: 100%; max-height: 68vh; }
.cloud-viewer audio { width: 100%; margin: 24px; }
.cloud-placeholder { display: grid; justify-items: center; gap: 12px; padding: 36px 20px; color: var(--muted); text-align: center; }
.cloud-placeholder svg { width: 44px; height: 44px; }
.cloud-view-actions { display: flex; flex-wrap: wrap; gap: 8px; align-items: center; }
.cloud-steps { display: flex; gap: 6px; margin-right: auto; }
.cloud-queue { position: fixed; right: 18px; bottom: 18px; z-index: 60; width: min(360px, calc(100% - 32px)); background: var(--surface); border: 1px solid var(--border-strong); border-radius: 14px; padding: 12px 14px; box-shadow: 0 16px 50px rgba(0, 0, 0, .55); }
.cloud-queue-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; margin-bottom: 8px; font-size: 13.5px; }
.cloud-queue .note { margin-top: 8px; }
.cloud-queue-list { display: grid; gap: 8px; max-height: 40vh; overflow: auto; margin-top: 10px; }
.cloud-queue-row { display: flex; align-items: center; gap: 10px; }
.cloud-queue-row .row-main { display: grid; gap: 3px; }
.cloud-queue-row strong { font-size: 13px; font-weight: 500; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.cloud-queue-row small { font-size: 11.5px; color: var(--muted); overflow-wrap: anywhere; }
.cloud-queue-row.error small { color: var(--bad); }
.cloud-queue-row.done .progress i { background: var(--good); }
.cloud-quota-bar { margin-top: 6px; max-width: 260px; }

/* ---------- Kleinere Bildschirme ---------- */
@media (max-width: 1080px) {
  .facts { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .cal-card { display: none; }
  .cal-list { display: block; }
  .plan-grid, .facts { grid-template-columns: minmax(0, 1fr); }
  .kpis-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kpis-3 .kpi:last-child { grid-column: 1 / -1; }
  .fin-toolbar select { min-width: 0; flex: 1 1 100%; }
  .row-side .btn.small { padding: 6px 9px; }
  .doc-row .row-side .tag { display: none; }
  .auth-card { padding: 22px; }
  .spark-labels { font-size: 9.5px; gap: 4px; }
  .spark-labels b { font-size: 10.5px; }
  .pool-row { grid-template-columns: minmax(0, 1fr) 52px 76px; gap: 8px; font-size: 13px; }
  .pool-row .progress { display: none; }
  .search-foot { display: none; }
  .cloud-grid { grid-template-columns: repeat(auto-fill, minmax(104px, 1fr)); gap: 8px; }
  .cloud-grid.media { grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 3px; }
  .cloud-grid.media .cloud-visual { border-radius: 4px; }
  .cloud-queue { right: 16px; bottom: calc(84px + env(safe-area-inset-bottom)); }
  .cloud-view-actions .btn.small { flex: 1 1 auto; }
}

/* ---------- Bilu System Test ---------- */
/* Das Grün der zweiten Linie. --good (#86b98f) ist als Textfarbe gedacht und
   hat für eine Linie zu wenig Buntheit — es liest sich auf Dunkel als Grau
   (OKLCH-Chroma 0,081). #5cc085 liegt gegen das Gold bei ΔE 19,5 normalsichtig
   und 9,8 bei Rotschwäche; beides über den Schwellen. Geprüft, nicht geschätzt. */
:root { --serie-gruen: #5cc085; }

.kz-legend { display: flex; flex-wrap: wrap; gap: 8px 22px; margin: 2px 0 10px; font-size: 12.5px; color: var(--muted); }
.kz-legend span { display: inline-flex; align-items: center; gap: 7px; }
.kz-legend b { color: var(--ink); font-variant-numeric: tabular-nums; font-weight: 600; }
.kz-legend i, .kz-tip i { width: 12px; height: 2.5px; border-radius: 2px; flex: 0 0 auto; }
.kz-legend i.kontowert, .kz-tip i.kontowert { background: var(--gold); }
.kz-legend i.abgerechnet, .kz-tip i.abgerechnet { background: var(--serie-gruen); }
.kz-tip i.leer { background: var(--border-strong); }

.kz-chart { position: relative; }
.kz-chart svg { display: block; width: 100%; height: auto; overflow: visible; touch-action: pan-y; }
.kz-grid { stroke: rgba(255, 255, 255, .06); stroke-width: 1; vector-effect: non-scaling-stroke; }
.kz-axis { fill: var(--muted); font-size: 11px; font-variant-numeric: tabular-nums; }
.kz-area { stroke: none; }
.kz-area.gold { fill: url(#kz-gold); }
.kz-area.gruen { fill: url(#kz-gruen); }
.kpi-value.good { color: var(--good); }
.kz-line { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; vector-effect: non-scaling-stroke; }
.kz-line.kontowert { stroke: var(--gold); }
.kz-line.abgerechnet { stroke: var(--serie-gruen); }
.kz-dot { stroke: var(--surface); stroke-width: 2; vector-effect: non-scaling-stroke; }
.kz-dot.kontowert { fill: var(--gold); }
.kz-dot.abgerechnet { fill: var(--serie-gruen); }
.kz-endlabel { font: 600 12px var(--font-head); font-variant-numeric: tabular-nums; }
.kz-endlabel.kontowert { fill: var(--gold); }
.kz-endlabel.abgerechnet { fill: var(--serie-gruen); }
/* SVG kennt das HTML-Attribut hidden nicht von selbst — ohne diese Regel
   bleibt der Zeiger nach dem Verlassen der Fläche stehen. */
.kz-cursor[hidden], .kz-cursor circle[hidden] { display: none; }
.kz-crosshair { stroke: var(--border-strong); stroke-width: 1; stroke-dasharray: 3 3; vector-effect: non-scaling-stroke; }
.kz-hit { cursor: crosshair; }

.kz-tip { position: absolute; top: 4px; pointer-events: none; background: var(--surface-2); border: 1px solid var(--border-strong);
  border-radius: 10px; padding: 9px 12px; font-size: 12px; color: var(--muted); display: grid; gap: 3px;
  box-shadow: 0 10px 30px rgba(0, 0, 0, .45); white-space: nowrap; z-index: 2; }
.kz-tip > b { color: var(--ink); font-size: 12.5px; margin-bottom: 2px; }
.kz-tip span { display: flex; align-items: center; gap: 7px; }
.kz-tip span b { margin-left: auto; padding-left: 12px; color: var(--ink); font-variant-numeric: tabular-nums; }

.kz-bot { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px 14px; min-width: 0; }
.kz-bot-kopf { display: flex; align-items: baseline; justify-content: space-between; gap: 10px; }
.kz-bot-name { display: inline-flex; align-items: center; gap: 8px; font: 600 14.5px var(--font-head); }
.kz-bot-wert { font: 600 19px/1.2 var(--font-head); color: var(--gold); font-variant-numeric: tabular-nums; }
.kz-spark { height: 54px; margin: 10px 0 4px; }
.kz-fakten { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 10px 14px; margin-top: 10px; }
.kz-fakt { min-width: 0; }
.kz-fakt span { display: block; font-size: 11px; color: var(--muted); }
.kz-fakt b { font-size: 13.5px; font-weight: 500; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.kz-fakt b.good { color: var(--good); }
.kz-fakt b.bad { color: var(--bad); }
.kz-fakt small { display: block; font-size: 10.5px; color: var(--muted); font-weight: 400; }
.list-foot { margin-top: 12px; }

@media (max-width: 760px) {
  .kz-bots { grid-template-columns: minmax(0, 1fr); }
  .kz-fakten { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .kz-tip { font-size: 11.5px; padding: 8px 10px; }
}

/* ---------- Übersicht: das Cockpit ----------
   Gold nur für das, was zählt: der heutige Tag, das Kapital, „jetzt". Alles andere
   bleibt ruhig, damit das Auge weiß, wohin es zuerst gehen soll. */
.dash-kpis { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 14px; margin-bottom: 16px; }
.dash-kpi {
  display: flex; align-items: center; justify-content: space-between; gap: 12px; width: 100%; min-width: 0;
  padding: 18px 20px; text-align: left; border-radius: var(--radius);
  background: linear-gradient(180deg, var(--surface-2), var(--surface)); border: 1px solid var(--border);
  transition: border-color .15s, transform .15s;
}
.dash-kpi:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.dash-kpi-text { display: grid; gap: 4px; min-width: 0; }
.dash-label { font: 500 12.5px var(--font); color: var(--muted); }
.dash-value { font: 600 30px/1.1 var(--font-head); letter-spacing: -.02em; font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.dash-value small { font-size: 16px; color: var(--muted); font-weight: 500; }
.dash-value.gold { color: var(--gold); }
.dash-value.bad, .dash-sub.bad { color: var(--bad); }
.dash-sub { font-size: 12.5px; color: var(--ink-2); }
.dash-sub.good { color: var(--good); }
.dash-kpi.leer { background: var(--surface); border-style: dashed; }
.dash-kpi.leer .dash-value { color: var(--muted); }

.ring { width: 54px; height: 54px; flex: none; transform: rotate(-90deg); }
.ring-track { fill: none; stroke: var(--surface-3); stroke-width: 5; }
.ring-fill { fill: none; stroke: var(--gold); stroke-width: 5; stroke-linecap: round; transition: stroke-dashoffset .5s ease; }
/* Aufgaben je Person */
.person-tiles { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 10px; margin-bottom: 14px; }
.person-tile { display: flex; align-items: center; gap: 11px; padding: 12px 14px; text-align: left; background: var(--surface); border: 1px solid var(--border); border-radius: 14px; transition: border-color .15s, transform .15s; min-width: 0; }
.person-tile:hover { border-color: var(--border-strong); transform: translateY(-1px); }
.person-tile.on { border-color: var(--gold); background: var(--surface-2); }
.person-tile .mark { flex: none; width: 34px; height: 34px; border-radius: 50%; display: grid; place-items: center; background: var(--surface-3); font: 600 14px var(--font-head); color: var(--ink); }
.person-tile.on .mark { background: var(--gold); color: var(--bg, #111); }
.person-tile.frei .mark { background: transparent; border: 1px dashed var(--gold); color: var(--gold); }
.person-tile-text { display: grid; gap: 2px; min-width: 0; }
.person-tile-text strong { font-size: 14px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.person-tile-text small { font-size: 12px; color: var(--muted); }
.person-tile-text .bad { color: var(--bad); font-weight: 600; }
/* Buchhaltung */
.choice { display: flex; gap: 10px; align-items: flex-start; padding: 10px 12px; margin: 6px 0; border: 1px solid var(--border); border-radius: 12px; cursor: pointer; }
.choice:has(input:checked) { border-color: var(--gold); background: var(--surface-2); }
.choice input { margin-top: 4px; accent-color: var(--gold); }
.choice span { display: grid; gap: 2px; }
.choice small { color: var(--muted); font-size: 12.5px; }
.ust-kz { display: inline-block; min-width: 46px; color: var(--gold); font-weight: 600; font-variant-numeric: tabular-nums; }
.export-card .btn.block { margin-top: 10px; text-align: center; justify-content: center; }
.ledger-row .row-side small.note { display: block; text-align: right; font-size: 11.5px; }
/* Arbeiten */
.work-hero { display: flex; flex-wrap: wrap; align-items: center; gap: 14px 20px; padding: 20px 24px; margin-bottom: 16px; border: 1px solid rgba(244, 209, 126, .28); border-radius: var(--radius); background: linear-gradient(120deg, rgba(244, 209, 126, .1), var(--surface) 60%); box-shadow: var(--shadow); }
.work-hero-main { display: grid; gap: 3px; flex: 1 1 260px; min-width: 0; }
.work-hero-main strong { font: 600 18px/1.3 var(--font-head); overflow-wrap: anywhere; }
.work-hero-main small { color: var(--ink-2); font-size: 12.5px; }
.work-hero-review { flex: 1 1 100%; text-align: left; font-size: 13px; color: var(--gold); padding-top: 10px; border-top: 1px solid var(--border); }
.work-why { color: var(--ink-2); }
.work-runs { display: grid; gap: 10px; }
.work-run { display: flex; align-items: center; gap: 16px; width: 100%; text-align: left; padding: 13px 15px; border: 1px solid var(--border); border-radius: 14px; transition: border-color .12s; }
.work-run-clock { font: 600 16px var(--font-head); font-variant-numeric: tabular-nums; color: var(--muted); }
.work-run-clock.on { color: var(--gold); }
.work-run:hover { border-color: var(--border-strong); }
.work-run .row-main { display: grid; gap: 6px; flex: 1; min-width: 0; }
.work-progress .card-head { margin-bottom: 8px; }
.work-steps { display: grid; gap: 4px; }
.work-step { display: flex; gap: 12px; padding: 12px; border-radius: 12px; border: 1px solid transparent; }
.work-step.done > .row-main > strong { color: var(--muted); }
.work-evidence { list-style: none; margin: 8px 0; padding: 0; display: grid; gap: 6px; }
.work-evidence li { display: flex; align-items: baseline; gap: 8px; font-size: 13.5px; overflow-wrap: anywhere; }
.work-evidence small { color: var(--muted); flex: 0 0 auto; }
.work-evidence span { flex: 1; min-width: 0; }
.work-actions { display: grid; gap: 10px; }
.work-facts { display: grid; gap: 12px; margin: 10px 0 0; }
.work-fact dt { font-size: 12px; color: var(--muted); margin-bottom: 2px; }
.work-fact dd { margin: 0; font-size: 14px; white-space: pre-wrap; overflow-wrap: anywhere; }
.work-outline { margin: 0; padding-left: 20px; font-size: 14px; display: grid; gap: 12px; }
.work-outline small { color: var(--muted); }
.work-outline p { margin: 3px 0 0; color: var(--ink-2); line-height: 1.55; }
.work-outline ul { margin: 6px 0 0; padding-left: 18px; color: var(--ink-2); display: grid; gap: 3px; }
.form-note { margin-right: auto; align-self: center; }
.work-history { list-style: none; margin: 0; padding: 0; display: grid; gap: 10px; }
.work-history li { display: grid; gap: 1px; font-size: 13px; padding-left: 10px; border-left: 2px solid var(--border-strong); overflow-wrap: anywhere; }
.work-history small { color: var(--muted); font-size: 12px; }
.runbook-step { padding: 12px 14px; margin-bottom: 10px; border: 1px solid var(--border); border-radius: 12px; }
.ring-teil { fill: none; stroke-width: 5; }
.ring-teil.p-dringend { stroke: var(--bad); }
.ring-teil.p-hoch { stroke: var(--gold); }
.ring-teil.p-normal { stroke: var(--border-strong); }

.saeulen { display: flex; align-items: flex-end; gap: 4px; height: 44px; flex: none; }
.saeulen i { display: block; width: 7px; height: var(--h); border-radius: 3px; background: var(--surface-3); }
.saeulen i.heute { background: var(--gold); }
.saeulen i.kommt { background: transparent; border: 1px dashed var(--border-strong); }

.dash-woche { margin-bottom: 0; }
.wochenleiste { display: grid; grid-template-columns: repeat(7, minmax(0, 1fr)); gap: 8px; }
.wochentag {
  display: grid; gap: 8px; padding: 12px; text-align: left; min-width: 0;
  border-radius: var(--radius-sm); border: 1px solid var(--border); background: var(--surface-2);
  transition: border-color .15s;
}
.wochentag:hover { border-color: var(--border-strong); }
.wochentag.heute { border-color: var(--gold-dim); background: var(--gold-soft); }
.wochentag.vorbei { opacity: .5; }
.wochentag-kopf { display: flex; align-items: baseline; justify-content: space-between; font-size: 12px; color: var(--muted); text-transform: capitalize; }
.wochentag-kopf strong { font: 600 18px var(--font-head); color: var(--ink); }
.wochentag.heute .wochentag-kopf strong { color: var(--gold); }
.wochentag small { font-size: 11.5px; color: var(--ink-2); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.last { display: block; height: 5px; border-radius: 3px; background: var(--surface-3); overflow: hidden; }
.last i { display: block; height: 100%; border-radius: 3px; background: var(--ink-2); }
.wochentag.heute .last i { background: var(--gold); }

/* Zeitstrahl: eine Linie, an der die Termine hängen. */
.zeitstrahl { position: relative; display: grid; gap: 4px; padding-left: 2px; }
.zs-termin {
  display: grid; grid-template-columns: 52px 1fr; gap: 12px; align-items: start; text-align: left;
  padding: 9px 10px; border-radius: var(--radius-sm); transition: background .15s;
}
.zs-termin:hover { background: var(--surface-2); }
.zs-zeit { font: 600 13px var(--font-head); font-variant-numeric: tabular-nums; color: var(--ink); display: grid; }
.zs-zeit small { font: 500 11.5px var(--font); color: var(--muted); }
.zs-inhalt { display: grid; gap: 2px; padding-left: 12px; border-left: 3px solid var(--bereich); min-width: 0; }
.zs-inhalt strong { font-weight: 600; overflow-wrap: anywhere; }
.zs-inhalt small { color: var(--muted); font-size: 12px; }
.zs-termin.vorbei { opacity: .45; }
.zs-termin.laeuft { background: var(--gold-soft); }
.zs-termin.laeuft .zs-inhalt small { color: var(--gold); }
.zs-jetzt { display: flex; align-items: center; gap: 8px; margin: 2px 0; color: var(--gold); font: 600 11px var(--font-head); }
.zs-jetzt::before { content: ''; width: 8px; height: 8px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px var(--gold-soft); }
.zs-jetzt::after { content: ''; flex: 1; height: 1px; background: linear-gradient(90deg, var(--gold-dim), transparent); }

/* Bereiche: je Unternehmen eine Karte, die zeigt, wo es brennt. */
.bereiche { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: 12px; }
.bereich {
  display: grid; gap: 10px; padding: 16px; text-align: left; min-width: 0; border-radius: var(--radius-sm);
  background: var(--surface-2); border: 1px solid var(--border); border-top: 3px solid var(--bereich);
  transition: border-color .15s, transform .15s;
}
.bereich:hover { transform: translateY(-1px); border-color: var(--border-strong); border-top-color: var(--bereich); }
.bereich-kopf { display: flex; align-items: center; gap: 10px; min-width: 0; }
.bereich-kopf strong { font: 600 14.5px var(--font-head); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.bereich-kopf .mark { width: 24px; height: 24px; border-radius: 7px; display: grid; place-items: center; flex: none;
  background: var(--surface-3); font: 600 12px var(--font-head); color: var(--ink-2); }
.bereich-zahlen { display: flex; flex-wrap: wrap; gap: 6px 14px; font-size: 12.5px; color: var(--ink-2); }
.bereich-zahlen b { font: 600 16px var(--font-head); color: var(--ink); margin-right: 2px; }
.bereich-zahlen .bad, .bereich-zahlen .bad b { color: var(--bad); }
.bereich small { font-size: 12px; color: var(--muted); overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }

@media (max-width: 1080px) {
  .dash-kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 760px) {
  .dash-kpi { padding: 14px 16px; }
  .dash-value { font-size: 25px; }
  .ring { width: 44px; height: 44px; }
  .saeulen { height: 36px; }
  /* Sieben Tage passen am Handy nicht nebeneinander – lieber wischen als quetschen. */
  .wochenleiste { grid-template-columns: repeat(7, 104px); overflow-x: auto; scroll-snap-type: x mandatory; padding-bottom: 4px; }
  .wochentag { scroll-snap-align: start; }
}

/* Trading auf der Übersicht: drei Zahlen und eine Woche Kurve.
   Gold ist der Kontowert, Grün das Abgerechnete - wie auf der eigenen Seite. */
.trading-zahlen { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); gap: 12px; }
.trading-zahlen > div { display: grid; gap: 3px; min-width: 0; }
.trading-zahlen strong { font: 600 19px/1.15 var(--font-head); font-variant-numeric: tabular-nums; overflow-wrap: anywhere; }
.trading-zahlen strong.gold { color: var(--gold); }
.trading-zahlen strong.gruen { color: var(--serie-gruen); }
.trading-zahlen strong.good { color: var(--good); }
.trading-zahlen strong.bad { color: var(--bad); }
.trading-zahlen small { font-size: 11.5px; color: var(--muted); }
.trading-kurve { display: block; width: 100%; height: 58px; margin: 14px 0 8px; overflow: visible; }
.trading-kurve path { fill: none; stroke-width: 2; vector-effect: non-scaling-stroke; stroke-linejoin: round; }
.kurve-konto { stroke: var(--gold); }
.kurve-abgerechnet { stroke: var(--serie-gruen); opacity: .8; }

/* ---------- Timer ---------- */
.timer-dot { width: 8px; height: 8px; border-radius: 50%; background: var(--muted); flex: 0 0 auto; }
.running .timer-dot, .timer-pill .timer-dot { background: var(--gold); box-shadow: 0 0 0 0 rgba(244, 209, 126, .5); animation: timer-puls 2s infinite; }
@keyframes timer-puls { 70% { box-shadow: 0 0 0 7px rgba(244, 209, 126, 0); } 100% { box-shadow: 0 0 0 0 rgba(244, 209, 126, 0); } }
.timer-pill { display: flex; align-items: center; height: 38px; border-radius: 12px; border: 1px solid rgba(244, 209, 126, .3); background: var(--gold-soft); color: var(--gold); min-width: 0; }
.timer-pill-open { display: flex; align-items: center; gap: 9px; padding: 0 4px 0 12px; height: 100%; min-width: 0; font: 600 13.5px var(--font-head); font-variant-numeric: tabular-nums; }
.timer-pill-title { font: 500 12.5px var(--font); color: var(--ink-2); max-width: 170px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.timer-pill-stop { display: grid; place-items: center; width: 32px; height: 100%; flex: 0 0 auto; }
.timer-pill-stop svg { width: 15px; height: 15px; }
.timer-bar { position: sticky; top: 68px; z-index: 10; display: grid; grid-template-columns: 1fr auto 1fr; align-items: center; gap: 10px 14px; margin: 18px 0 16px; padding: 14px 18px; border: 1px solid var(--border-strong); border-radius: var(--radius); background: rgba(26, 26, 29, .88); backdrop-filter: blur(18px); -webkit-backdrop-filter: blur(18px); box-shadow: 0 14px 40px rgba(0, 0, 0, .35); }
.timer-bar.running { border-color: rgba(244, 209, 126, .32); }
.timer-state { display: inline-flex; align-items: center; gap: 9px; font-size: 13px; color: var(--ink-2); min-width: 0; }
.timer-clock { font: 700 32px/1 var(--font-head); letter-spacing: -.01em; font-variant-numeric: tabular-nums; }
.timer-bar.running .timer-clock { color: var(--gold); }
.timer-actions { justify-self: end; }
.timer-progress { grid-column: 1 / -1; display: flex; align-items: center; gap: 12px; }
.timer-progress .progress { flex: 1; }
.timer-progress small { color: var(--muted); font-size: 12px; white-space: nowrap; }

/* ---------- Konzentriert arbeiten ---------- */
.focus { max-width: 760px; margin: 0 auto; }
.focus h1 { font-size: 28px; line-height: 1.18; font-weight: 700; letter-spacing: -.025em; margin-top: 12px; overflow-wrap: anywhere; }
.focus-text { margin: 0 0 14px; }
.focus-note { margin-top: 10px; }
.focus-facts { margin-bottom: 12px; padding: 12px 16px; border-radius: 16px; background: rgba(255, 255, 255, .025); }
.focus-facts .work-facts { margin: 10px 0 4px; }
.focus-foot { display: grid; gap: 14px; margin-top: 20px; }
.focus-tools { display: flex; flex-wrap: wrap; justify-content: center; gap: 8px 20px; }
.steps { display: grid; gap: 8px; }
.step { border: 1px solid var(--border); border-radius: 16px; background: var(--surface); transition: border-color .12s; }
.step.open { border-color: var(--border-strong); box-shadow: var(--shadow); }
.step.current.open { border-color: rgba(244, 209, 126, .36); }
.step-top { display: flex; align-items: center; gap: 12px; padding: 13px 16px; }
.step-title { flex: 1; min-width: 0; display: grid; gap: 1px; text-align: left; }
.step-title strong { font-weight: 600; font-size: 15px; overflow-wrap: anywhere; }
.step-title small { color: var(--muted); font-size: 12px; }
.step.done .step-title strong { color: var(--muted); }
.step-tick { width: 26px; height: 26px; flex: 0 0 auto; display: grid; place-items: center; border-radius: 50%; border: 1.5px solid var(--border-strong); color: transparent; font-size: 13px; transition: .12s; }
button.step-tick:hover:not(:disabled) { border-color: var(--gold); }
.step-tick.done { background: var(--gold); border-color: var(--gold); color: #1c1808; }
.step-body { padding: 0 16px 16px 54px; }
.step-detail { color: var(--ink-2); font-size: 14.5px; line-height: 1.65; white-space: pre-wrap; overflow-wrap: anywhere; }
.step-tools { display: flex; flex-wrap: wrap; gap: 8px 18px; margin-top: 12px; }
.ticks { list-style: none; margin: 8px 0 8px -8px; padding: 0; display: grid; gap: 1px; }
.tick-row { display: flex; align-items: flex-start; gap: 11px; width: 100%; padding: 8px; border-radius: 10px; font-size: 14.5px; line-height: 1.45; text-align: left; transition: background .1s; }
.tick-row:disabled { opacity: .6; }
.tick-row:hover:not(:disabled) { background: rgba(255, 255, 255, .04); }
.tick-box { width: 20px; height: 20px; flex: 0 0 auto; margin-top: 1px; display: grid; place-items: center; border-radius: 6px; border: 1.5px solid var(--border-strong); color: transparent; font-size: 12px; transition: .12s; }
.tick-row.done .tick-box { background: var(--gold); border-color: var(--gold); color: #1c1808; }
.tick-row.done > span:last-child { color: var(--muted); }
.work-question { margin: 10px 0; padding: 11px 13px; border-radius: 12px; background: rgba(255, 255, 255, .035); display: grid; gap: 8px; font-size: 14px; }
.work-question.answered { background: var(--gold-soft); }
.work-question p { margin: 0; white-space: pre-wrap; overflow-wrap: anywhere; }
.work-question small { display: block; color: var(--muted); font-size: 12px; }
.work-times-steps { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 4px; font-size: 13.5px; color: var(--ink-2); }
.work-times-steps li { display: flex; justify-content: space-between; gap: 14px; }
.work-times-steps small { color: var(--muted); white-space: nowrap; }
.work-time { font: 600 14px var(--font-head); font-variant-numeric: tabular-nums; white-space: nowrap; }
.runbook-hint { margin-bottom: 16px; }
@media (max-width: 760px) {
  .timer-bar { top: calc(60px + env(safe-area-inset-top)); padding: 12px 14px; grid-template-columns: auto 1fr auto; }
  .timer-state { font-size: 0; gap: 0; }
  .timer-clock { font-size: 26px; }
  .focus h1 { font-size: 23px; }
  .step-body { padding-left: 16px; }
  .timer-pill-title { display: none; }
  .timer-pill-open { padding-left: 10px; font-size: 13px; }
  /* Oben ist es eng: Läuft die Uhr, weichen Schriftzug und Profilknopf. */
  .topbar-right { gap: 6px; }
  .topbar:has(.timer-pill) .topbar-brand b, .topbar:has(.timer-pill) .topbar-right > .avatar { display: none; }
  .tick-row { padding: 10px 8px; }
}

/* ---------- Claude ---------- */
.chat { position: fixed; top: 0; right: 0; bottom: 0; z-index: 40; width: min(440px, 100%); display: flex; flex-direction: column; background: var(--surface); border-left: 1px solid var(--border-strong); box-shadow: -24px 0 70px rgba(0, 0, 0, .45); }
.chat-head { display: flex; align-items: center; gap: 12px; min-height: 60px; padding: 0 16px; border-bottom: 1px solid var(--border); }
.chat-head strong { font: 700 15px var(--font-head); margin-right: auto; }
.chat-older { max-width: 130px; background: var(--surface-2); border: 1px solid var(--border); border-radius: 9px; padding: 5px 8px; font-size: 12.5px; }
.chat-log { flex: 1; min-height: 0; overflow-y: auto; padding: 18px 16px; display: flex; flex-direction: column; gap: 12px; }
.chat-empty { margin: auto 0; text-align: center; padding: 12px; }
.chat-empty h3 { font-size: 18px; margin-bottom: 8px; }
.chat-empty p { color: var(--muted); font-size: 13.5px; line-height: 1.6; margin-bottom: 16px; }
.chat-ideas { display: flex; flex-wrap: wrap; justify-content: center; gap: 6px; }
.chat-msg { max-width: 100%; font-size: 14.5px; line-height: 1.6; overflow-wrap: anywhere; }
.chat-msg p { margin: 0 0 8px; }
.chat-msg p:last-child { margin-bottom: 0; }
.chat-msg ul, .chat-msg ol { margin: 0 0 8px; padding-left: 20px; }
.chat-msg code { font-size: 13px; background: var(--surface-3); padding: 1px 5px; border-radius: 5px; }
.chat-msg.mine { align-self: flex-end; max-width: 86%; padding: 9px 14px; border-radius: 16px 16px 4px 16px; background: var(--surface-3); white-space: pre-wrap; }
.chat-msg.failed { color: var(--bad); font-size: 13.5px; }
.chat-wait { display: inline-flex; align-items: center; gap: 4px; color: var(--muted); font-size: 13px; }
.chat-wait i { width: 6px; height: 6px; border-radius: 50%; background: var(--gold); animation: chat-puls 1.2s infinite; }
.chat-wait i:nth-child(2) { animation-delay: .15s; }
.chat-wait i:nth-child(3) { animation-delay: .3s; margin-right: 4px; }
@keyframes chat-puls { 0%, 100% { opacity: .25; } 40% { opacity: 1; } }
.chat-sources { margin-top: 8px; font-size: 12.5px; color: var(--muted); }
.chat-sources summary { cursor: pointer; }
.chat-sources div { display: flex; flex-wrap: wrap; gap: 5px; margin-top: 6px; }
.chat-source { padding: 2px 8px; border-radius: 8px; background: rgba(255, 255, 255, .05); color: var(--ink-2); font-size: 12px; }
button.chat-source:hover { color: var(--gold); }
.chat-form { padding: 10px 14px calc(12px + env(safe-area-inset-bottom)); border-top: 1px solid var(--border); }
.chat-context { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-bottom: 8px; padding: 3px 4px 3px 10px; border-radius: 9px; background: var(--gold-soft); color: var(--gold); font-size: 12.5px; }
.chat-context span { min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.chat-context .close { font-size: 18px; }
.chat-input { display: flex; align-items: flex-end; gap: 8px; }
.chat-input textarea { flex: 1; min-width: 0; max-height: 140px; resize: none; field-sizing: content; background: var(--surface-2); border: 1px solid var(--border-strong); border-radius: 12px; padding: 9px 12px; font-size: 15px; line-height: 1.45; }
.chat-input textarea:focus { outline: none; border-color: var(--gold-dim); }
.guide-note { margin: 12px 0; }
.guide-error { color: var(--bad); margin-top: 10px; }
@media (min-width: 1500px) {
  body.chat-open .main-col { margin-right: 440px; }
  body.chat-open main { padding-inline: 28px; }
}
@media (max-width: 760px) {
  .chat { top: env(safe-area-inset-top); border-left: 0; }
}

/* Zwei-Faktor-Anmeldung: QR-Code immer auf Weiß, damit ihn jede Kamera liest. */
.tfa-steps { margin: 0 0 14px; padding-left: 20px; color: var(--ink-2); line-height: 1.5; }
.tfa-steps li + li { margin-top: 4px; }
.tfa-qr svg { display: block; width: min(220px, 100%); height: auto; margin: 6px auto 10px; border-radius: 10px; }
.tfa-links { text-align: center; margin: 0 0 10px; }
.tfa-key { margin: 0 0 14px; }
.tfa-key summary { cursor: pointer; color: var(--muted); font-size: 14px; }
.tfa-key .invite-code { font-size: 16px; letter-spacing: .06em; word-break: break-all; }
.tfa-codes { display: grid; grid-template-columns: repeat(2, 1fr); gap: 8px; margin: 14px 0; }
.tfa-codes code { padding: 8px 10px; text-align: center; border-radius: var(--radius-sm); background: var(--surface-2);
  font: 600 15px/1.2 ui-monospace, 'SFMono-Regular', Menlo, Consolas, monospace; letter-spacing: .05em; }

/* ---------- Handy: Personen-Kacheln als eine Zeile ---------- */
@media (max-width: 760px) {
  /* Fünf gestapelte Kacheln schoben die Aufgaben aus dem Bild. Jetzt eine Zeile zum Wischen. */
  .person-tiles { display: flex; overflow-x: auto; gap: 8px; margin: 0 -16px 12px; padding: 0 16px 4px; scrollbar-width: none; scroll-snap-type: x proximity; }
  .person-tiles::-webkit-scrollbar { display: none; }
  .person-tile { flex: 0 0 auto; min-width: 128px; padding: 10px 12px; scroll-snap-align: start; }
  .person-tile:hover { transform: none; }
}

/* ---------- Pyramide ---------- */
.view-switch { display: inline-flex; }
.pyr-kopf { display: flex; flex-wrap: wrap; align-items: center; gap: 8px 16px; margin: -2px 0 20px; font-size: 13px; color: var(--ink-2); }
.pyr-jetzt { display: inline-flex; align-items: center; gap: 9px; padding: 6px 13px 6px 11px; border-radius: 999px; background: var(--gold-soft); color: var(--gold); }
.pyr-jetzt i { width: 7px; height: 7px; border-radius: 50%; background: var(--gold); box-shadow: 0 0 0 4px rgba(244, 209, 126, .16); }
.pyr-jetzt strong { color: var(--ink); font-weight: 600; }
.pyr-jetzt.fertig { background: rgba(134, 185, 143, .12); color: var(--good); }
.pyr-summe { color: var(--muted); }
.pyr-layout { display: grid; grid-template-columns: minmax(280px, 380px) minmax(0, 1fr); gap: 28px 36px; align-items: start; }
.pyr-bild { display: grid; gap: 14px; }

/* Die Zeichnung */
.pyr-svg { display: block; width: 100%; height: auto; overflow: visible; filter: drop-shadow(0 18px 30px rgba(0, 0, 0, .35)); }
.pyr-svg .pb { cursor: pointer; }
.pyr-svg polygon { fill: #2b2b30; stroke: rgba(255, 255, 255, .07); stroke-width: 1; stroke-linejoin: round; transition: fill .15s, stroke .15s, opacity .15s; }
.pyr-svg .pb.spaeter polygon { fill: #34343a; }
.pyr-svg .pb.leer polygon { fill: rgba(255, 255, 255, .025); stroke: rgba(255, 255, 255, .22); stroke-dasharray: 5 5; }
.pyr-svg .pb.fertig polygon { fill: rgba(134, 185, 143, .42); stroke: rgba(134, 185, 143, .5); }
.pyr-svg .pb.jetzt polygon { stroke: rgba(255, 236, 180, .9); filter: drop-shadow(0 0 16px rgba(244, 209, 126, .38)); }
.pyr-svg .pb:hover polygon { stroke: rgba(255, 255, 255, .45); }
.pyr-svg .pb.gewaehlt polygon { stroke: #fff; stroke-width: 2; stroke-dasharray: none; }
.pyr-svg .pb.jetzt.gewaehlt polygon { stroke: #fff6da; }
.pyr-svg text { pointer-events: none; font-family: var(--font-head); }
.pyr-svg .pb-name { font-size: 13px; font-weight: 600; fill: var(--ink); }
.pyr-svg .pb-name .nr { font-weight: 800; font-size: 14px; }
.pyr-svg .pb-zahl { font-size: 10.5px; fill: var(--muted); font-family: var(--font); }
.pyr-svg .pb.leer .pb-name { fill: var(--muted); }
.pyr-svg .pb.jetzt .pb-name { fill: #1b1608; }
.pyr-svg .pb.jetzt .pb-zahl { fill: rgba(27, 22, 8, .72); }
.pyr-svg .pb.fertig .pb-name { fill: #eaf5ec; }

/* Die Ebenen als Liste unter der Zeichnung */
.pyr-leiste { display: grid; gap: 3px; }
.pyr-nav { display: flex; align-items: center; gap: 11px; width: 100%; padding: 7px 10px 7px 8px; border-radius: 11px; border: 1px solid transparent; text-align: left; font-size: 13.5px; color: var(--ink-2); transition: background .12s, border-color .12s; }
.pyr-nav:hover { background: rgba(255, 255, 255, .035); }
.pyr-nav.on { background: var(--surface-2); border-color: var(--border-strong); color: var(--ink); }
.pyr-dot { flex: none; width: 24px; height: 24px; border-radius: 8px; display: grid; place-items: center; background: #34343a; color: var(--ink-2); font: 700 12px/1 var(--font-head); }
.pyr-nav.jetzt .pyr-dot { background: var(--gold); color: #1b1608; }
.pyr-nav.fertig .pyr-dot { background: rgba(134, 185, 143, .3); color: var(--good); }
.pyr-nav.leer .pyr-dot { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); color: var(--muted); }
.pyr-nav-name { flex: 1; min-width: 0; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.pyr-nav.jetzt .pyr-nav-name { color: var(--ink); font-weight: 600; }
.pyr-nav small { color: var(--muted); font-size: 12px; font-variant-numeric: tabular-nums; }

/* Die aufgeschlagene Ebene */
.pyr-panel { min-width: 0; border: 1px solid var(--border-strong); border-radius: 16px; background: var(--surface-2); padding: 18px 18px 16px; }
.pyr-panel.jetzt { border-color: rgba(244, 209, 126, .45); background: linear-gradient(180deg, rgba(244, 209, 126, .07), var(--surface-2) 120px); }
.pyr-panel header { display: flex; align-items: center; gap: 13px; }
.pyr-nr { flex: none; width: 38px; height: 38px; border-radius: 12px; display: grid; place-items: center; background: #34343a; color: var(--ink); font: 800 17px/1 var(--font-head); }
.pyr-panel.jetzt .pyr-nr { background: linear-gradient(180deg, #fbe2a0, #d6a84a); color: #1b1608; }
.pyr-panel.fertig .pyr-nr { background: rgba(134, 185, 143, .3); color: var(--good); }
.pyr-panel.leer .pyr-nr { background: transparent; box-shadow: inset 0 0 0 1px rgba(255, 255, 255, .22); color: var(--muted); }
.pyr-name { display: grid; gap: 3px; min-width: 0; flex: 1; }
.pyr-name strong { font: 700 19px/1.2 var(--font-head); letter-spacing: -.01em; }
.pyr-name small { font-size: 13px; color: var(--muted); }
.pyr-panel.jetzt .pyr-name small { color: var(--gold); }
.pyr-fort { display: flex; align-items: center; gap: 12px; margin: 16px 0 4px; }
.pyr-fort .progress { flex: 1; }
.pyr-fort small { color: var(--muted); font-size: 12px; white-space: nowrap; }
.pyr-rows { display: grid; gap: 7px; margin-top: 12px; min-width: 0; }
.pyr-row { display: flex; align-items: flex-start; gap: 12px; width: 100%; padding: 12px 12px 12px 13px; border-radius: 12px; border: 1px solid var(--border-strong); background: var(--surface); text-align: left; transition: border-color .12s, transform .12s; }
.pyr-row:hover { border-color: var(--gold-dim); transform: translateY(-1px); }
.pyr-mark { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 6px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; font-size: 11px; line-height: 1; }
.pyr-text { display: grid; gap: 5px; min-width: 0; flex: 1; }
.pyr-title { font-size: 14.5px; font-weight: 500; line-height: 1.35; overflow-wrap: anywhere; }
.pyr-text .row-meta { margin: 0; }
.pyr-go { flex: none; align-self: center; color: var(--muted); font-size: 18px; line-height: 1; }
.pyr-row.dran { border-color: rgba(244, 209, 126, .5); }
.pyr-row.dran .pyr-mark { border-color: var(--gold); }
.pyr-row.done { color: var(--muted); }
.pyr-row.done .pyr-title { text-decoration: line-through; }
.pyr-row.done .pyr-mark { background: var(--good); border-color: var(--good); color: #10160f; }
.pyr-row.wartet { background: transparent; }
.pyr-row.wartet .pyr-title { color: var(--ink-2); }
.pyr-row.wartet .pyr-mark { border-style: dashed; }
/* Bauen Aufgaben einer Ebene aufeinander auf, stehen sie als Schritte an einer Linie. */
.pyr-steps { list-style: none; margin: 14px 0 0; padding: 0; display: grid; gap: 12px; }
.pyr-steps li { position: relative; display: grid; grid-template-columns: 26px minmax(0, 1fr); gap: 12px; align-items: start; }
.pyr-steps li .pyr-rows { margin-top: 0; }
.pyr-steps li:not(:last-child)::before { content: ''; position: absolute; left: 12.5px; top: 30px; bottom: -14px; width: 1px; background: var(--border-strong); }
.pyr-step-nr { width: 26px; height: 26px; margin-top: 9px; border-radius: 50%; display: grid; place-items: center; border: 1px solid var(--border-strong); background: var(--surface); color: var(--ink-2); font: 700 12px/1 var(--font-head); position: relative; z-index: 1; }
.pyr-steps + .note { margin: 12px 0 0 38px; }
.pyr-empty { margin-top: 14px; padding: 18px 16px; border: 1px dashed var(--border-strong); border-radius: 12px; display: grid; gap: 12px; justify-items: start; }
.pyr-empty p { margin: 0; color: var(--ink-2); font-size: 14px; line-height: 1.5; }
.pyr-ohne { margin-top: 24px; padding-top: 16px; border-top: 1px solid var(--border); }
.pyr-ohne h3 { margin: 0 0 6px; font: 600 12.5px var(--font-head); letter-spacing: .04em; text-transform: uppercase; color: var(--muted); }
.group-label.pyr { color: var(--gold); }
.row.wartet .row-title { color: var(--ink-2); }
.waits { color: var(--muted); font-style: italic; }
.needs-box { border: 1px solid var(--border); border-radius: 12px; padding: 8px 12px 10px; margin: 0 0 14px; max-height: 240px; overflow-y: auto; }
.needs-box legend { font-size: 12.5px; color: var(--ink-2); padding: 0 6px; }
.check-line { display: flex; align-items: flex-start; gap: 10px; padding: 7px 2px; font-size: 14px; line-height: 1.4; cursor: pointer; }
.check-line input { margin-top: 3px; flex: none; width: 17px; height: 17px; accent-color: var(--gold); }
.check-line small { color: var(--muted); margin-left: 4px; }
/* Die Pyramide auf der Übersicht: dieselbe Zeichnung in klein. */
.pyr-mini-wrap { display: flex; align-items: center; gap: 18px; width: 100%; padding: 2px 2px 10px; text-align: left; }
.pyr-mini { flex: none; width: 104px; }
.pyr-svg.mini { filter: none; }
.pyr-svg.mini .pb { cursor: inherit; }
.pyr-svg.mini polygon { stroke-width: 1.5; }
.pyr-svg.mini .pb.leer polygon { stroke-dasharray: 9 8; stroke-width: 3; }
.pyr-svg.mini .pb.jetzt polygon { filter: drop-shadow(0 0 20px rgba(244, 209, 126, .5)); }
.pyr-mini-text { display: grid; gap: 3px; min-width: 0; }
.pyr-mini-text strong { font: 600 18px/1.2 var(--font-head); }
.pyr-mini-text small { color: var(--muted); font-size: 12.5px; }
@media (max-width: 900px) {
  .pyr-layout { grid-template-columns: minmax(0, 1fr); }
  .pyr-bild { justify-items: center; }
  .pyr-svg:not(.mini) { max-width: 330px; }
  /* Am Handy werden die Ebenen zu einer Zeile zum Wischen. */
  .pyr-leiste { display: flex; gap: 6px; width: calc(100% + 32px); margin: 0 -16px; padding: 0 16px 2px; overflow-x: auto; scrollbar-width: none; }
  .pyr-leiste::-webkit-scrollbar { display: none; }
  .pyr-nav { flex: 0 0 auto; width: auto; border-color: var(--border); padding-right: 12px; }
  .pyr-nav small { display: none; }
  .pyr-panel { padding: 16px 14px 14px; }
  .view-switch { order: 2; }
}

/* ---------- Checkliste ---------- */
.chip-progress { display: inline-flex; align-items: center; gap: 7px; }
.chip-progress .progress { width: 46px; }
.checklist-mini { list-style: none; margin: 10px 0 0; padding: 0; display: grid; gap: 2px; }
.checklist-mini li { display: flex; align-items: flex-start; gap: 10px; padding: 6px 8px; border-radius: 9px; font-size: 14px; line-height: 1.45; }
.checklist-mini .box { flex: none; width: 18px; height: 18px; margin-top: 1px; border-radius: 5px; border: 1.5px solid var(--border-strong); display: grid; place-items: center; font-size: 11px; line-height: 1; }
.checklist-mini li.done { color: var(--muted); }
.checklist-mini li.done .box { background: var(--gold); border-color: var(--gold); color: var(--bg, #111); }
.checklist-mini li.current { background: rgba(244, 209, 126, .07); }
.checklist-mini li.current .box { border-color: var(--gold); }
.checklist-mini small { color: var(--gold); margin-left: 6px; font-size: 12px; }
.work-outline.haken { list-style: none; padding-left: 0; }
.work-outline.haken ul { list-style: none; padding-left: 2px; }
.work-outline.haken ul li { position: relative; padding-left: 26px; }
.work-outline.haken ul li::before { content: ''; position: absolute; left: 0; top: 3px; width: 15px; height: 15px; border-radius: 4px; border: 1.5px solid var(--border-strong); }
.wo-bin-ich { margin: 0 0 14px; font-size: 14.5px; color: var(--ink-2); }
.wo-bin-ich strong { color: var(--ink); }
.step-title .hier { justify-self: start; align-self: start; width: fit-content; margin: 3px 0 1px; padding: 2px 9px; border-radius: 999px; background: rgba(244, 209, 126, .14); color: var(--gold); font-size: 11.5px; font-weight: 600; white-space: nowrap; }
.ticks.liste { margin: 2px 0 6px 34px; }
.step.done .ticks.liste { opacity: .7; }
@media (max-width: 760px) {
  .ticks.liste { margin-left: 6px; }
}
/* Am Handy trifft der Finger ein 20-Pixel-Kästchen schlecht: die Fläche drumherum zählt mit. */
@media (hover: none) {
  .row > .check { position: relative; }
  .row > .check::after { content: ''; position: absolute; inset: -11px; }
}
