:root {
  --primary: #1f5f5b; --primary-ink: #ffffff; --primary-soft: #e3efed;
  --side: #1c232b; --side-ink: #e8ecef; --side-muted: #98a3ad; --side-active: #27333d;
  --bg: #f7f6f2; --surface: #ffffff; --ink: #1d1f22; --muted: #6b7078; --line: #e6e2da; --line-soft: #efece6;
  --ok: #1a7f4b; --ok-soft: #e3f3ea; --warn: #9a5b00; --warn-soft: #fdf1dc; --bad: #b42323; --bad-soft: #fde5e5; --info: #1d5fa8; --info-soft: #e4eefb;
  --radius: 12px; --shadow: 0 1px 2px rgba(20,20,20,.04), 0 8px 24px rgba(20,20,20,.06);
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; background: var(--bg); color: var(--ink); font: 15px/1.55 "Segoe UI", system-ui, -apple-system, sans-serif; }
a { color: var(--primary); }
button { font: inherit; }
h1 { font-size: 30px; font-weight: 600; margin: 0 0 4px; letter-spacing: -.01em; }
h2 { font-size: 20px; font-weight: 600; margin: 0 0 4px; }
h3 { font-size: 16px; font-weight: 600; margin: 0 0 4px; }
.lead { color: var(--muted); margin: 0 0 16px; }
.small { font-size: 13px; color: var(--muted); }
.eyebrow { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 600; margin-bottom: 6px; }
.loading { padding: 40px; text-align: center; color: var(--muted); }

/* Layout Beraterbereich */
.shell { display: grid; grid-template-columns: 250px 1fr; min-height: 100vh; }
aside.side { background: var(--side); color: var(--side-ink); padding: 18px 14px; position: sticky; top: 0; height: 100vh; display: flex; flex-direction: column; gap: 6px; }
.brandbox { display: flex; gap: 10px; align-items: center; padding: 6px 8px 18px; }
.brandbox .logo { width: 34px; height: 34px; border-radius: 8px; background: var(--primary); color: var(--primary-ink); display: grid; place-items: center; font-weight: 700; font-size: 16px; flex: none; }
.brandbox .name { font-weight: 600; font-size: 15px; line-height: 1.2; }
.brandbox .claim { font-size: 12px; color: var(--side-muted); line-height: 1.3; }
aside .nav { background: none; border: 0; color: var(--side-ink); text-align: left; padding: 10px 12px; border-radius: 8px; display: flex; align-items: center; gap: 10px; cursor: pointer; font-weight: 500; }
aside .nav:hover { background: var(--side-active); }
aside .nav.active { background: var(--primary); color: var(--primary-ink); }
aside .nav .cnt { margin-left: auto; background: rgba(255,255,255,.14); border-radius: 999px; font-size: 12px; padding: 1px 8px; }
aside .nav.active .cnt { background: rgba(255,255,255,.22); }
aside .spacer { flex: 1; }
aside .who { font-size: 12px; color: var(--side-muted); padding: 8px 12px; }
main.content { padding: 28px 32px 80px; max-width: 1400px; }
.pagehead { display: flex; align-items: flex-start; justify-content: space-between; gap: 16px; flex-wrap: wrap; margin-bottom: 20px; }

/* Karten und Bausteine */
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 0 0 16px; }
.card.tight { padding: 12px 16px; }
.cardhead { display: flex; justify-content: space-between; align-items: flex-start; gap: 12px; padding-bottom: 12px; border-bottom: 1px solid var(--line-soft); margin-bottom: 12px; }
.grid { display: grid; gap: 16px; }
.grid.kpi { grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); }
.grid.two { grid-template-columns: 2fr 1fr; }
.grid.half { grid-template-columns: 1fr 1fr; }
.kpi .card { margin: 0; }
.kpi .num { font-size: 34px; font-weight: 600; line-height: 1.1; margin: 6px 0 2px; }
.kpi .num.warn { color: var(--warn); }
.kpi .num.bad { color: var(--bad); }
.chip { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; font-weight: 600; padding: 3px 9px; border-radius: 6px; background: var(--line-soft); color: var(--muted); white-space: nowrap; }
.chip::before { content: ""; width: 6px; height: 6px; border-radius: 50%; background: currentColor; }
.chip.plain::before { display: none; }
.chip.neu { background: var(--info-soft); color: var(--info); }
.chip.pruefung, .chip.termin, .chip.gespraech, .chip.angebot, .chip.berater { background: var(--warn-soft); color: var(--warn); }
.chip.qualifiziert, .chip.gewonnen, .chip.ok, .chip.bewerber, .chip.mandant, .chip.onboarding, .chip.aktiv { background: var(--ok-soft); color: var(--ok); }
.chip.verloren, .chip.bad, .chip.aufmerksamkeit { background: var(--bad-soft); color: var(--bad); }
.chip.still { background: var(--warn-soft); color: var(--warn); }
.score { display: inline-block; font-weight: 700; padding: 3px 9px; border-radius: 6px; background: var(--ok-soft); color: var(--ok); font-size: 13px; }
.score small { font-weight: 500; opacity: .7; }
.score.mid { background: var(--warn-soft); color: var(--warn); }
.score.low { background: var(--bad-soft); color: var(--bad); }
.score.big { font-size: 24px; padding: 8px 14px; }
.btn { display: inline-flex; align-items: center; gap: 8px; border: 1px solid var(--line); border-radius: 9px; padding: 9px 14px; font-weight: 600; cursor: pointer; background: var(--surface); color: var(--ink); text-decoration: none; }
.btn:hover { border-color: #cfc9be; }
.btn.primary { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.btn.danger { color: var(--bad); }
.btn.sm { padding: 6px 10px; font-size: 13px; }
.btn:disabled { opacity: .45; cursor: not-allowed; }
.btn.link { border: 0; background: none; color: var(--primary); text-decoration: underline; padding: 0; }
.actions { display: flex; gap: 8px; flex-wrap: wrap; margin: 12px 0 20px; }
.row { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.between { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
label { display: block; font-weight: 600; margin: 12px 0 6px; font-size: 14px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=date], input[type=datetime-local], input[type=number], textarea, select {
  width: 100%; padding: 10px 12px; border: 1px solid var(--line); border-radius: 8px; font: inherit; background: var(--surface); color: var(--ink);
}
input:focus, textarea:focus, select:focus { outline: 2px solid var(--primary-soft); border-color: var(--primary); }
textarea { min-height: 100px; resize: vertical; }
.hint { font-size: 13px; color: var(--muted); margin-top: 4px; }
.counter { font-size: 12px; color: var(--muted); text-align: right; }
.notice { border-left: 3px solid var(--primary); background: var(--primary-soft); padding: 10px 14px; border-radius: 0 8px 8px 0; margin: 12px 0; }
.notice.warn { border-color: var(--warn); background: var(--warn-soft); }
.notice.bad { border-color: var(--bad); background: var(--bad-soft); }
.notice.ok { border-color: var(--ok); background: var(--ok-soft); }
.notice.muted { border-color: var(--line); background: var(--line-soft); color: var(--muted); font-size: 13px; }
.kv { display: grid; grid-template-columns: auto 1fr; gap: 6px 16px; }
.kv .k { color: var(--muted); }
.kv .v { text-align: right; }
.list { list-style: none; margin: 0; padding: 0; }
.list li { padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.list li:last-child { border-bottom: 0; }
.check { display: flex; gap: 8px; align-items: flex-start; }
.check .ico { width: 16px; height: 16px; border: 1.5px solid var(--muted); border-radius: 50%; flex: none; margin-top: 3px; display: grid; place-items: center; font-size: 10px; color: var(--ok); }
.check.done .ico { border-color: var(--ok); background: var(--ok-soft); }
.bar { height: 6px; background: var(--line-soft); border-radius: 3px; overflow: hidden; }
.bar > i { display: block; height: 100%; background: var(--primary); }
.factor { margin: 12px 0; }
.factor .between { margin-bottom: 4px; }
.optlist { display: grid; gap: 8px; }
.optlist.grid2 { grid-template-columns: 1fr 1fr; }
.opt { display: flex; gap: 10px; align-items: center; border: 1px solid var(--line); border-radius: 8px; padding: 11px 14px; cursor: pointer; background: var(--surface); }
.opt:hover { border-color: #cfc9be; }
.opt.on { border-color: var(--primary); background: var(--primary-soft); }
.opt input { margin: 0; accent-color: var(--primary); }
.opt .sub { font-size: 13px; color: var(--muted); }
.toast { position: fixed; top: 16px; right: 16px; z-index: 50; background: var(--surface); border: 1px solid var(--line); border-left: 4px solid var(--ok); border-radius: 10px; padding: 12px 40px 12px 14px; box-shadow: var(--shadow); max-width: 380px; }
.toast.bad { border-left-color: var(--bad); background: #fff7f7; }
.toast.warn { border-left-color: var(--warn); background: #fffaf1; }
.toast b { display: block; font-weight: 600; }
.toast .x { position: absolute; top: 8px; right: 10px; border: 0; background: none; color: var(--muted); cursor: pointer; font-size: 16px; }
dialog { border: 1px solid var(--line); border-radius: 14px; max-width: 760px; width: calc(100% - 32px); background: var(--surface); color: var(--ink); padding: 0; box-shadow: var(--shadow); }
dialog::backdrop { background: rgba(20,20,20,.45); }
dialog .dhead { padding: 18px 22px 12px; border-bottom: 1px solid var(--line-soft); }
dialog .dbody { padding: 12px 22px; max-height: 70vh; overflow-y: auto; }
dialog .dfoot { padding: 12px 22px 18px; border-top: 1px solid var(--line-soft); display: flex; justify-content: flex-end; gap: 8px; }
.spinner { display: inline-block; width: 14px; height: 14px; border: 2px solid var(--line); border-top-color: var(--primary); border-radius: 50%; animation: spin 1s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* Pipeline */
.filters { display: flex; gap: 6px; flex-wrap: wrap; align-items: center; }
.filters .f { border: 1px solid var(--line); background: var(--surface); border-radius: 8px; padding: 6px 12px; cursor: pointer; font-weight: 600; font-size: 13px; }
.filters .f.on { background: var(--primary); color: var(--primary-ink); border-color: var(--primary); }
.seg { display: inline-flex; border: 1px solid var(--line); border-radius: 8px; overflow: hidden; }
.seg button { border: 0; background: var(--surface); padding: 7px 12px; cursor: pointer; font-weight: 600; font-size: 13px; }
.seg button.on { background: var(--primary); color: var(--primary-ink); }
.board { display: flex; gap: 14px; overflow-x: auto; padding-bottom: 12px; align-items: flex-start; }
.col { flex: 0 0 258px; background: var(--bg); border: 1px solid var(--line); border-radius: 10px; padding: 10px; min-height: 120px; }
.col.over { outline: 2px dashed var(--primary); }
.col .colhead { display: flex; justify-content: space-between; font-weight: 600; font-size: 14px; padding: 2px 4px 8px; border-bottom: 2px solid var(--line); margin-bottom: 10px; }
.col.neu .colhead { border-color: var(--info); } .col.pruefung .colhead, .col.termin .colhead, .col.gespraech .colhead, .col.angebot .colhead, .col.qualifiziert .colhead { border-color: var(--warn); } .col.gewonnen .colhead { border-color: var(--ok); } .col.verloren .colhead { border-color: var(--bad); }
.col .empty { color: var(--muted); font-size: 13px; text-align: center; padding: 22px 0; border: 1px dashed var(--line); border-radius: 8px; }
.kcard { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; cursor: grab; box-shadow: 0 1px 2px rgba(0,0,0,.03); }
.kcard:active { cursor: grabbing; }
.kcard.dragging { opacity: .4; }
.kcard.locked { cursor: pointer; }
.kcard .t { font-weight: 600; display: flex; justify-content: space-between; align-items: center; gap: 8px; }
.kcard .t .av { width: 24px; height: 24px; border-radius: 50%; background: var(--line-soft); font-size: 10px; display: grid; place-items: center; color: var(--muted); flex: none; }
.kcard .sub { font-size: 12px; color: var(--muted); }
.kcard .txt { font-size: 13px; color: var(--muted); margin: 8px 0; display: -webkit-box; -webkit-line-clamp: 4; -webkit-box-orient: vertical; overflow: hidden; }
.kcard .act { font-size: 13px; font-weight: 600; }
.kcard .foot { display: flex; justify-content: space-between; align-items: center; margin-top: 6px; font-size: 12px; color: var(--muted); gap: 6px; }
.kcard .foot .due.bad { color: var(--bad); font-weight: 600; }
.explain { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; padding: 12px; margin-bottom: 10px; font-size: 13px; }
.explain .eyebrow { margin-top: 10px; }
.explain ul { margin: 4px 0; padding-left: 18px; }
.msgbox { background: var(--primary-soft); border-radius: 8px; padding: 10px 12px; margin: 8px 0; }
.msgbox .eyebrow { margin: 0 0 2px; color: var(--primary); }
.tbl { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
table { width: 100%; border-collapse: collapse; }
th, td { text-align: left; padding: 10px 12px; border-bottom: 1px solid var(--line-soft); vertical-align: top; font-size: 14px; }
th { font-size: 12px; text-transform: uppercase; letter-spacing: .06em; color: var(--muted); }
tr.click { cursor: pointer; } tr.click:hover td { background: var(--bg); }
.timeline { list-style: none; margin: 0; padding: 0; }
.timeline li { display: grid; grid-template-columns: 28px 1fr auto; gap: 10px; padding: 10px 0; border-bottom: 1px solid var(--line-soft); }
.timeline li:last-child { border-bottom: 0; }
.timeline .dot { width: 24px; height: 24px; border-radius: 50%; background: var(--line-soft); display: grid; place-items: center; font-size: 11px; color: var(--muted); }
.timeline .when { font-size: 12px; color: var(--muted); white-space: nowrap; }
.timeline .who { font-size: 11px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); }
.nextbox { display: grid; grid-template-columns: 1fr auto; gap: 12px; }
.nextbox .r { text-align: right; }
.answers .q { color: var(--muted); font-size: 13px; margin-top: 10px; }
.answers .a { white-space: pre-wrap; }
.pre { white-space: pre-wrap; font-family: inherit; margin: 0; }
.sig { color: var(--muted); font-size: 13px; }

/* Öffentliche Seiten */
.pub { max-width: 820px; margin: 0 auto; padding: 0 20px 80px; }
.pub .topbar { display: flex; justify-content: space-between; align-items: center; padding: 18px 0; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.pub .topbar .brandbox { padding: 0; }
.pub .topbar .name { color: var(--ink); }
.pub .topbar .claim { color: var(--muted); }
.steps { display: flex; align-items: center; gap: 8px; margin: 12px 0 28px; flex-wrap: wrap; }
.steps .s { width: 26px; height: 26px; border-radius: 50%; border: 1.5px solid var(--line); display: grid; place-items: center; font-size: 12px; color: var(--muted); }
.steps .s.on { border-color: var(--primary); color: var(--primary); font-weight: 700; }
.steps .s.done { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.steps .ln { width: 24px; height: 1px; background: var(--line); }
.progressline { height: 3px; background: var(--line-soft); margin: -28px -20px 28px; }
.progressline > i { display: block; height: 100%; background: var(--primary); transition: width .3s; }
.dictate { float: right; margin-top: -34px; }
.dictate.rec { background: var(--bad); color: #fff; border-color: var(--bad); }
.dicthint { background: var(--bad-soft); border-radius: 8px; padding: 8px 12px; font-size: 13px; margin-top: 6px; }
.pricebox { display: grid; grid-template-columns: repeat(3, 1fr); border: 1px solid var(--line); border-radius: 10px; overflow: hidden; margin: 22px 0; }
.pricebox > div { padding: 16px 18px; border-right: 1px solid var(--line); }
.pricebox > div:last-child { border-right: 0; }
.pricebox .big { font-size: 26px; font-weight: 600; }
.section { padding: 22px 0; border-bottom: 1px solid var(--line-soft); }
.section:last-of-type { border-bottom: 0; }
.tasks .task { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; margin-bottom: 12px; }
.tasks .task .th { padding: 14px 16px; display: flex; gap: 10px; align-items: flex-start; }
.tasks .task .tb { padding: 12px 16px; border-top: 1px solid var(--line-soft); background: var(--bg); border-radius: 0 0 10px 10px; }
.tasks .task.done .tb { display: none; }
.req { font-size: 11px; font-weight: 600; padding: 2px 6px; border-radius: 4px; background: var(--warn-soft); color: var(--warn); margin-left: 6px; }
.req.opt { background: var(--line-soft); color: var(--muted); }
.mask { letter-spacing: .1em; }
.center { text-align: center; }
.mt { margin-top: 16px; }
.mb0 { margin-bottom: 0; }
.hidden { display: none !important; }
@media (max-width: 900px) {
  .shell { grid-template-columns: 1fr; }
  aside.side { position: static; height: auto; flex-direction: row; flex-wrap: wrap; align-items: center; padding: 10px 12px; }
  .brandbox { padding: 4px 8px; width: 100%; }
  aside .spacer, aside .who { display: none; }
  main.content { padding: 18px 16px 60px; }
  .grid.two, .grid.half { grid-template-columns: 1fr; }
  .pricebox { grid-template-columns: 1fr; } .pricebox > div { border-right: 0; border-bottom: 1px solid var(--line); }
  .optlist.grid2 { grid-template-columns: 1fr; }
  h1 { font-size: 24px; }
}

/* Diagnose-Strecke */
.dg-title { font-size: 34px; line-height: 1.2; margin: 6px 0 12px; }
.dg-aud { display: grid; grid-template-columns: repeat(2, 1fr); gap: 12px; }
.dg-card { text-align: left; display: flex; flex-direction: column; gap: 4px; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); padding: 16px 18px; cursor: pointer; font: inherit; color: var(--ink); border-top: 3px solid var(--line); }
.dg-card:hover, .dg-card:focus-visible { border-color: var(--primary); border-top-color: var(--primary); background: var(--primary-soft); outline: none; }
.dg-card b { font-size: 17px; }
.dg-num { font: 600 12px ui-monospace, monospace; color: var(--primary); letter-spacing: .1em; }
.optlist.grid3 { grid-template-columns: repeat(3, 1fr); }
.dg-sec { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; margin: 16px 0; }
.dg-key { border-left: 4px solid var(--primary); }
.dg-quote { font-size: 19px; line-height: 1.5; margin: 0; }
.dg-not { border-left: 4px solid var(--bad); }
.dg-cta { background: var(--primary-soft); border-color: var(--primary); }
.funnel .fr { display: grid; grid-template-columns: 200px 1fr 90px; gap: 12px; align-items: center; padding: 5px 0; }
.funnel .fb { height: 14px; background: var(--line-soft); border-radius: 7px; overflow: hidden; }
.funnel .fb > i { display: block; height: 100%; background: var(--primary); }
.tabs { display: flex; gap: 6px; flex-wrap: wrap; margin-bottom: 16px; }
@media (max-width: 700px) {
  .dg-title { font-size: 26px; }
  .dg-aud, .optlist.grid3 { grid-template-columns: 1fr 1fr; }
  .funnel .fr { grid-template-columns: 1fr 70px; }
  .funnel .fr .fb { grid-column: 1 / -1; order: 3; }
}
@media (max-width: 420px) { .dg-aud { grid-template-columns: 1fr; } }

/* Version 0.3: Navigation nach Bereichen, Suche, Daten verdeckt */
aside .navlist { display: flex; flex-direction: column; gap: 2px; overflow-y: auto; }
aside .navsec { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--side-muted); padding: 12px 12px 4px; }
aside .nav { padding: 8px 12px; }
aside .ver { font-size: 11px; color: var(--side-muted); padding: 4px 12px; }
.topbar2 { display: flex; justify-content: space-between; align-items: center; gap: 12px; margin: -12px 0 18px; position: sticky; top: 0; z-index: 5; background: var(--bg); padding: 8px 0; }
.searchbtn { display: inline-flex; align-items: center; gap: 10px; border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 8px 12px; min-width: 260px; cursor: pointer; color: var(--muted); font: inherit; }
.searchbtn span { flex: 1; text-align: left; }
kbd { font: 11px ui-monospace, monospace; border: 1px solid var(--line); border-bottom-width: 2px; border-radius: 4px; padding: 1px 5px; color: var(--muted); background: var(--bg); }
.privbtn { border: 1px solid var(--line); background: var(--surface); border-radius: 9px; padding: 8px 12px; cursor: pointer; font: inherit; font-weight: 600; font-size: 13px; }
.privbtn.on { background: var(--warn-soft); color: var(--warn); border-color: var(--warn); }
.sp-back { position: fixed; inset: 0; background: rgba(20,20,20,.35); z-index: 60; display: flex; justify-content: center; align-items: flex-start; padding-top: 10vh; }
.sp { background: var(--surface); border-radius: 14px; width: min(680px, calc(100% - 24px)); box-shadow: var(--shadow); overflow: hidden; border: 1px solid var(--line); }
.sp-in { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line-soft); }
.sp-in input { border: 0 !important; outline: none !important; font-size: 16px; padding: 6px 0; }
.sp-r { max-height: 60vh; overflow-y: auto; padding: 6px 8px; }
.sp-g { font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); padding: 10px 8px 4px; font-weight: 600; }
.sp-i { display: flex; align-items: center; gap: 10px; padding: 8px 10px; border-radius: 8px; cursor: pointer; }
.sp-i.on, .sp-i:hover { background: var(--primary-soft); }
.sp-ic { width: 26px; text-align: center; }
.sp-a { font-weight: 700; white-space: nowrap; }
.sp-f { display: flex; justify-content: space-between; padding: 8px 16px; border-top: 1px solid var(--line-soft); }
.valbox { text-align: right; padding: 4px 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface); }
.valbox b { font-size: 20px; }
.av { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--line-soft); font-size: 10px; color: var(--muted); }
tr.off td { opacity: .5; }

/* Angebote mit Positionen, Nachweis der Annahme */
dialog.wide { max-width: 1100px; }
table.pos input { padding: 6px 8px; font-size: 14px; }
table.pos td { padding: 6px; vertical-align: middle; }
.r, td.r, th.r { text-align: right; }
.totals { margin: 12px 0 0 auto; max-width: 340px; display: grid; gap: 4px; }
.totals .big { font-size: 18px; border-top: 1px solid var(--line); padding-top: 6px; }
table.mini td { padding: 4px 6px; font-size: 13px; }
.proof { background: var(--ok-soft); border-radius: 10px; padding: 12px; margin-top: 12px; }
.sig-img { max-width: 100%; height: 80px; background: #fff; border: 1px solid var(--line); border-radius: 8px; margin-top: 8px; }
.sigbox { position: relative; border: 1px dashed var(--muted); border-radius: 10px; background: #fff; }
.sigbox canvas { width: 100%; height: 180px; display: block; touch-action: none; cursor: crosshair; }
.sigbox .btn { position: absolute; right: 10px; bottom: 8px; }
.sticky-actions { position: sticky; bottom: 0; background: var(--bg); padding: 12px 0; border-top: 1px solid var(--line); justify-content: flex-end; }
table.pos-view td, table.pos-view th { font-size: 14px; }
table.pos-view tfoot td { border-bottom: 0; }

/* Potenzialanalyse, Rechner */
.pot { background: linear-gradient(180deg, var(--surface), var(--primary-soft)); }
.pot-g { display: grid; grid-template-columns: auto 1fr; gap: 24px; align-items: center; margin-bottom: 12px; }
.ring { --p: 0; width: 150px; height: 150px; border-radius: 50%; background: conic-gradient(var(--primary) calc(var(--p) * 1%), var(--line-soft) 0); display: grid; place-items: center; }
.ring > div { width: 118px; height: 118px; border-radius: 50%; background: var(--surface); display: grid; place-items: center; text-align: center; align-content: center; }
.ring b { font-size: 26px; }
.pot-o, .calc-out { display: grid; grid-template-columns: repeat(auto-fit, minmax(180px, 1fr)); gap: 10px; }
.calc-o { border: 1px solid var(--line); border-radius: 10px; padding: 10px 12px; background: var(--surface); display: flex; flex-direction: column; gap: 2px; }
.calc-o span { font-size: 12px; color: var(--muted); text-transform: uppercase; letter-spacing: .06em; }
.calc-o b { font-size: 20px; }
.numin { display: flex; gap: 8px; align-items: center; }
.numin input { max-width: 200px; font-size: 22px; text-align: center; }
.numin .unit { color: var(--muted); }
input[type=range] { width: 100%; margin-top: 14px; accent-color: var(--primary); }

/* Fotos, Termine, Wochenplan, Anrufliste, Statistik */
.thumbs { display: grid; grid-template-columns: repeat(auto-fill, minmax(110px, 1fr)); gap: 8px; }
.thumb { position: relative; display: block; aspect-ratio: 1; border-radius: 8px; overflow: hidden; border: 1px solid var(--line); background: var(--bg); text-decoration: none; color: var(--ink); }
.thumb img { width: 100%; height: 100%; object-fit: cover; }
.thumb span { position: absolute; left: 0; right: 0; bottom: 0; background: rgba(0,0,0,.55); color: #fff; font-size: 11px; padding: 2px 6px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.thumb.doc { display: grid; place-items: center; font-size: 34px; }
.week { display: grid; grid-template-columns: repeat(7, minmax(130px, 1fr)); gap: 8px; overflow-x: auto; }
.day { background: var(--surface); border: 1px solid var(--line); border-radius: 10px; min-height: 180px; padding: 6px; }
.day.today { border-color: var(--primary); }
.day .dh { font-weight: 600; font-size: 13px; padding: 4px 6px 8px; border-bottom: 1px solid var(--line-soft); margin-bottom: 6px; }
.appt { display: block; text-decoration: none; color: var(--ink); background: var(--primary-soft); border-left: 3px solid var(--primary); border-radius: 6px; padding: 6px 8px; margin-bottom: 6px; font-size: 13px; }
.appt.erledigt { background: var(--ok-soft); border-color: var(--ok); }
.appt.abgesagt { opacity: .5; text-decoration: line-through; }
.card.call { margin-bottom: 10px; }
.card.hl { border-color: var(--primary); background: var(--primary-soft); }
.bars { display: flex; gap: 10px; align-items: flex-end; overflow-x: auto; padding: 10px 0; }
.bcol { text-align: center; min-width: 48px; }
.bstack { display: flex; gap: 3px; align-items: flex-end; justify-content: center; height: 150px; }
.bstack i { width: 14px; background: var(--line); border-radius: 3px 3px 0 0; display: block; }
.bstack i.won { background: var(--primary); }

/* Kundenbereich, Chat, Assistent */
.psteps { display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; margin: 18px 0 22px; }
.psteps .step { text-align: center; font-size: 12px; color: var(--muted); }
.psteps .step span { display: grid; place-items: center; width: 28px; height: 28px; margin: 0 auto 4px; border-radius: 50%; border: 1.5px solid var(--line); font-weight: 700; background: var(--surface); }
.psteps .step.done span { background: var(--primary); border-color: var(--primary); color: var(--primary-ink); }
.psteps .step.now span { border-color: var(--primary); color: var(--primary); }
.psteps .step.now { color: var(--ink); font-weight: 600; }
.chatlog { max-height: 340px; overflow-y: auto; display: flex; flex-direction: column; gap: 8px; margin-top: 10px; }
.bubble { background: var(--bg); border: 1px solid var(--line); border-radius: 12px 12px 12px 4px; padding: 8px 12px; max-width: 88%; white-space: pre-wrap; }
.bubble.me { align-self: flex-end; background: var(--primary-soft); border-color: transparent; border-radius: 12px 12px 4px 12px; }
.bubble p { margin: 0 0 6px; } .bubble ul { margin: 0 0 6px; padding-left: 18px; }
.ai-box .ai-log { max-height: 60vh; overflow-y: auto; padding: 6px 0; }
.ai-u { display: flex; justify-content: flex-end; margin: 8px 0; } .ai-u > div { background: var(--primary-soft); border-radius: 12px; padding: 8px 12px; max-width: 80%; white-space: pre-wrap; }
.ai-a { margin: 8px 0; } .ai-a p { margin: 0 0 8px; } .ai-a ul { margin: 0 0 8px; padding-left: 20px; }
.ai-step { font-size: 12px; color: var(--muted); margin: 4px 0; } .ai-step code { font-size: 11px; }
.ai-step.fehler, .ai-step.fehlgeschlagen, .ai-step.abgebrochen { color: var(--bad); }
.ai-pending { border: 1px solid var(--warn); background: var(--warn-soft); border-radius: 10px; padding: 12px; margin: 10px 0; }
.ai-input { display: flex; gap: 8px; margin: 10px 0; } .ai-input textarea { min-height: 60px; }
.card.mail.unread { border-left: 4px solid var(--info); }

@media (max-width: 900px) {
  .topbar2 { position: static; margin-top: 0; }
  .searchbtn { min-width: 0; flex: 1; }
  aside .navlist { flex-direction: row; flex-wrap: wrap; }
  aside .navsec, aside .ver { display: none; }
  .pot-g { grid-template-columns: 1fr; justify-items: center; }
  .week { grid-template-columns: repeat(7, 150px); }
  .psteps { grid-template-columns: repeat(3, 1fr); row-gap: 12px; }
  .sticky-actions { flex-wrap: wrap; } .sticky-actions .btn { flex: 1; justify-content: center; }
}

/* Feinschliff 0.3 */
aside .navlist { flex: 1 1 auto; min-height: 0; }
aside .spacer { flex: 0 0 8px; }
.pot-g { align-items: start; }

/* Rechtstexte */
.legal h2 { font-size: 18px; margin: 24px 0 8px; }
.legal p { margin: 0 0 12px; }
