@font-face { font-family: "Cormorant"; src: url("fonts/cormorant.woff2") format("woff2"); font-weight: 300 700; font-style: normal; font-display: swap; }
@font-face { font-family: "Cormorant"; src: url("fonts/cormorant-italic.woff2") format("woff2"); font-weight: 300 700; font-style: italic; font-display: swap; }
@font-face { font-family: "Montserrat"; src: url("fonts/montserrat.woff2") format("woff2"); font-weight: 100 900; font-display: swap; }
/* Layout: schwarzes Markenband; Coach sieht Cockpit (Tabelle aller Gamechanger), Kunde sieht sein Board (Pfad → Zahlen → Rechnung → Quoten/Aufgaben → Verlauf) */
:root {
  --bg: #F6F3EC; --surface: #FFFFFF; --line: #E3DCCD; --fg: #1B1A18; --muted: #6F695E;
  --gold: #A9802C; --gold-soft: #F1E6CC; --red: #A3191F; --red-soft: #F6E1E1; --good: #2F7D4F; --good-soft: #E1F0E6;
  --band: #000000; --band-fg: #F3EEE3; --band-gold: #D4AE5A;
  --font-display: "Cormorant", Georgia, "Times New Roman", serif;
  --font-body: "Montserrat", "Helvetica Neue", Arial, sans-serif;
}
@media (prefers-color-scheme: dark) { :root:not([data-theme="light"]) {
  --bg: #0E0E0F; --surface: #18181A; --line: #2C2B29; --fg: #F1ECE2; --muted: #A39C8F;
  --gold: #D4AE5A; --gold-soft: #2B2417; --red: #E0595E; --red-soft: #351A1B; --good: #58B07E; --good-soft: #17291E; color-scheme: dark; } }
:root[data-theme="dark"] {
  --bg: #0E0E0F; --surface: #18181A; --line: #2C2B29; --fg: #F1ECE2; --muted: #A39C8F;
  --gold: #D4AE5A; --gold-soft: #2B2417; --red: #E0595E; --red-soft: #351A1B; --good: #58B07E; --good-soft: #17291E; color-scheme: dark; }

* { box-sizing: border-box; }
body { background: var(--bg); color: var(--fg); font-family: var(--font-body); font-size: 15px; line-height: 1.5; margin: 0; }
button, input, select, textarea { font: inherit; color: inherit; }
button { cursor: pointer; }
button:disabled { cursor: default; opacity: .55; }
:focus-visible { outline: 2px solid var(--gold); outline-offset: 2px; }

.band { background: var(--band); color: var(--band-fg); }
.wrap { max-width: 1100px; margin: 0 auto; padding-left: max(16px, env(safe-area-inset-left, 0px)); padding-right: max(16px, env(safe-area-inset-right, 0px)); }
.band .wrap { display: flex; align-items: center; justify-content: space-between; gap: 20px; flex-wrap: wrap; padding-block: 18px; }
.band img { height: 64px; width: auto; display: block; }
.band h1 { font-family: var(--font-display); font-weight: 600; font-size: 30px; line-height: 1.05; margin: 0; text-wrap: balance; }
.band h1 em { color: var(--band-gold); font-weight: 500; }
.band .sub { font-size: 11px; letter-spacing: .22em; text-transform: uppercase; color: var(--band-gold); margin-top: 4px; }
.goal { min-width: 200px; flex: 0 1 260px; }
.goal .lbl { font-size: 11px; letter-spacing: .2em; text-transform: uppercase; color: #B8B0A2; display: flex; justify-content: space-between; }
.goal .bar { height: 8px; background: #2A2A2D; margin-top: 8px; position: relative; overflow: hidden; }
.goal .bar i { position: absolute; inset: 0 auto 0 0; background: var(--band-gold); width: 0; transition: width .4s; }
.goal .num { font-family: var(--font-display); font-size: 26px; font-weight: 600; color: var(--band-fg); margin-top: 6px; font-variant-numeric: tabular-nums; }
.goal .num span { color: var(--band-gold); }

main.wrap { padding-block: 24px 48px; display: grid; gap: 28px; }
.status { font-size: 13px; color: var(--muted); padding: 10px 14px; border: 1px solid var(--line); background: var(--surface); }
.status.warn { border-color: var(--red); color: var(--red); }
.section-h { font-size: 11px; letter-spacing: .24em; text-transform: uppercase; font-weight: 700; color: var(--gold); margin: 0 0 12px; }
.btn { border: none; background: var(--fg); color: var(--bg); padding: 10px 16px; font-weight: 600; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; }
.btn.gold { background: var(--gold); color: #120F08; }
.btn.ghost { background: transparent; color: var(--fg); border: 1px solid var(--line); }

/* Cockpit */
.kpis4 { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.kpi { background: var(--surface); border: 1px solid var(--line); padding: 14px 16px; }
.kpi b { display: block; font-family: var(--font-display); font-size: 40px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.kpi span { font-size: 12px; color: var(--muted); }
.kpi.alert { border-color: var(--red); }
.kpi.alert b { color: var(--red); }
.cp-bar { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.tablebox { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); }
table { border-collapse: collapse; width: 100%; font-size: 13px; font-variant-numeric: tabular-nums; }
th { text-align: left; font-size: 11px; letter-spacing: .12em; text-transform: uppercase; color: var(--muted); font-weight: 700; padding: 10px 12px; border-bottom: 1px solid var(--line); white-space: nowrap; }
td { padding: 11px 12px; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr:last-child td { border-bottom: none; }
.cp-table { min-width: 900px; }
.cp-table tbody tr { cursor: pointer; }
.cp-table tbody tr:hover td { background: var(--gold-soft); }
.who { display: flex; align-items: center; gap: 10px; min-width: 170px; }
.who img { width: 30px; height: 30px; border-radius: 50%; flex: none; }
.who b { display: block; font-weight: 600; }
.who small { color: var(--muted); font-size: 11px; }
.mini { height: 6px; background: var(--gold-soft); width: 90px; position: relative; margin-top: 5px; }
.mini i { position: absolute; inset: 0 auto 0 0; background: var(--gold); }
.chip { display: inline-block; font-size: 11px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; padding: 4px 8px; white-space: nowrap; }
.chip.ok { background: var(--good-soft); color: var(--good); }
.chip.warn { background: var(--red-soft); color: var(--red); }
.chip.wait { background: var(--red); color: #fff; }
.chip.neutral { background: var(--gold-soft); color: var(--gold); }
.chip.off { background: var(--line); color: var(--muted); }
.num-r { text-align: right; }
.empty-cp { padding: 28px 20px; color: var(--muted); font-size: 14px; display: grid; gap: 8px; }
.empty-cp b { color: var(--fg); font-size: 15px; }

/* Board */
.backbar { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; background: var(--surface); border: 1px solid var(--line); padding: 12px 14px; }
.backbar .t { font-family: var(--font-display); font-size: 24px; font-weight: 600; margin-right: auto; }
.backbar input { border: 1px solid var(--line); background: var(--bg); padding: 8px 10px; min-width: 0; width: 180px; }
.daybar { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.daybar h2 { font-family: var(--font-display); font-size: 28px; font-weight: 600; margin: 0 auto 0 0; }
.daybar button, .daybar input { border: 1px solid var(--line); background: var(--surface); padding: 8px 12px; min-height: 40px; }
.daybar .today { background: var(--fg); color: var(--bg); border-color: var(--fg); font-weight: 600; font-size: 13px; letter-spacing: .08em; text-transform: uppercase; }

.counters { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; }
.ctr { background: var(--surface); border: 1px solid var(--line); padding: 16px; display: grid; gap: 10px; }
.ctr .name { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; font-weight: 700; }
.ctr .hint { font-size: 12px; color: var(--muted); margin-top: -6px; }
.ctr .row { display: flex; align-items: center; gap: 8px; }
.ctr .val { flex: 1; min-width: 0; text-align: center; font-family: var(--font-display); font-size: 44px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; border: none; background: transparent; width: 100%; padding: 0; -moz-appearance: textfield; }
.ctr .val::-webkit-inner-spin-button, .ctr .val::-webkit-outer-spin-button { -webkit-appearance: none; margin: 0; }
.ctr button { width: 44px; height: 44px; border: 1px solid var(--line); background: var(--bg); font-size: 22px; line-height: 1; flex: none; }
.ctr button.plus { background: var(--gold); border-color: var(--gold); color: #120F08; font-weight: 600; }
.ctr .rate { font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); padding-top: 8px; display: flex; justify-content: space-between; font-variant-numeric: tabular-nums; }
.ctr .rate b { color: var(--fg); }
.ctr.k-abschluesse { border-color: var(--gold); }
.ctr.k-abschluesse .name { color: var(--gold); }

.period { display: flex; border: 1px solid var(--line); width: max-content; max-width: 100%; overflow-x: auto; margin-bottom: 14px; }
.period button { border: none; background: var(--surface); padding: 8px 14px; font-size: 13px; font-weight: 600; color: var(--muted); white-space: nowrap; }
.period button[aria-pressed="true"] { background: var(--fg); color: var(--bg); }
.funnel { background: var(--surface); border: 1px solid var(--line); padding: 18px; display: grid; gap: 14px; }
.stage { display: grid; grid-template-columns: 150px minmax(0, 1fr) 70px; gap: 12px; align-items: center; }
.stage .s-name { font-size: 13px; font-weight: 600; }
.stage .s-bar { height: 26px; background: var(--gold-soft); position: relative; }
.stage .s-bar i { position: absolute; inset: 0 auto 0 0; background: var(--gold); min-width: 2px; transition: width .4s; }
.stage .s-num { text-align: right; font-family: var(--font-display); font-size: 24px; font-weight: 600; font-variant-numeric: tabular-nums; }
.stage .s-q { grid-column: 2 / 4; font-size: 12px; color: var(--muted); margin-top: -8px; }
.stage .s-q b { color: var(--fg); }
.kpis { display: flex; flex-wrap: wrap; gap: 10px 28px; border-top: 1px solid var(--line); padding-top: 14px; font-size: 13px; color: var(--muted); }
.kpis b { font-family: var(--font-display); font-size: 22px; color: var(--fg); font-weight: 600; margin-right: 4px; font-variant-numeric: tabular-nums; }

.tasks { background: var(--surface); border: 1px solid var(--line); }
.addtask { display: flex; gap: 8px; padding: 14px; border-bottom: 1px solid var(--line); }
.addtask input { flex: 1; min-width: 0; border: 1px solid var(--line); background: var(--bg); padding: 10px 12px; }
.tlist { list-style: none; margin: 0; padding: 0; }
.tlist li { display: flex; align-items: center; gap: 12px; padding: 12px 14px; border-bottom: 1px solid var(--line); }
.tlist li:last-child { border-bottom: none; }
.chk { width: 26px; height: 26px; border: 1.5px solid var(--gold); background: transparent; flex: none; position: relative; padding: 0; }
.done > .chk { background: var(--gold); }
.done > .chk::after { content: ""; position: absolute; left: 8px; top: 3px; width: 6px; height: 12px; border: solid #120F08; border-width: 0 2.5px 2.5px 0; transform: rotate(45deg); }
.tlist .tt { flex: 1; min-width: 0; overflow-wrap: anywhere; }
.tlist li.done .tt { color: var(--muted); text-decoration: line-through; }
.tlist .tag { font-size: 11px; letter-spacing: .1em; text-transform: uppercase; color: var(--red); font-weight: 700; white-space: nowrap; }
.tlist .tag.coach { color: var(--gold); }
.tlist .del { border: none; background: none; color: var(--muted); font-size: 20px; width: 32px; height: 32px; flex: none; }
.tlist .del:hover { color: var(--red); }
.tlist .empty { color: var(--muted); font-size: 14px; justify-content: center; padding: 22px 14px; }
.tprog { padding: 10px 14px; font-size: 12px; color: var(--muted); border-top: 1px solid var(--line); }

.hist { overflow-x: auto; background: var(--surface); border: 1px solid var(--line); }
.hist table { min-width: 620px; }
.hist th, .hist td { text-align: right; }
.hist th:first-child, .hist td:first-child { text-align: left; }
.hist tbody tr { cursor: pointer; }
.hist tbody tr:hover td { background: var(--gold-soft); }
.hist tr.sel td { background: var(--gold-soft); font-weight: 600; }
.hist td.close { color: var(--gold); font-weight: 700; }

.two { display: grid; grid-template-columns: minmax(0, 1.15fr) minmax(0, 1fr); gap: 28px; align-items: start; }

.plan { background: var(--surface); border: 1px solid var(--line); display: grid; grid-template-columns: minmax(0, 1.1fr) minmax(0, 1fr); }
.plan .left { padding: 20px; border-right: 1px solid var(--line); display: grid; gap: 14px; align-content: start; }
.plan .right { padding: 20px; display: grid; gap: 12px; align-content: start; }
.phase { font-size: 12px; font-weight: 700; letter-spacing: .1em; text-transform: uppercase; padding: 6px 10px; width: max-content; max-width: 100%; }
.phase.mess { background: var(--gold-soft); color: var(--gold); }
.phase.live { background: var(--fg); color: var(--bg); }
.big { display: flex; align-items: baseline; gap: 10px; flex-wrap: wrap; }
.big b { font-family: var(--font-display); font-size: 54px; font-weight: 600; line-height: 1; font-variant-numeric: tabular-nums; }
.big span { font-size: 13px; color: var(--muted); }
.todaybar { display: grid; gap: 6px; }
.todaybar .t { display: flex; justify-content: space-between; font-size: 13px; font-variant-numeric: tabular-nums; }
.todaybar .bar { height: 10px; background: var(--gold-soft); position: relative; }
.todaybar .bar i { position: absolute; inset: 0 auto 0 0; background: var(--gold); transition: width .4s; }
.todaybar.ok .bar i { background: var(--good); }
.todaybar.ok .t b { color: var(--good); }
.pl-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 10px 16px; font-size: 13px; color: var(--muted); }
.pl-grid div b { display: block; font-family: var(--font-display); font-size: 24px; color: var(--fg); font-weight: 600; font-variant-numeric: tabular-nums; }
.qrow { display: flex; justify-content: space-between; gap: 10px; font-size: 13px; border-bottom: 1px solid var(--line); padding: 6px 0; font-variant-numeric: tabular-nums; }
.qrow em { font-style: normal; font-size: 11px; color: var(--muted); margin-left: 6px; }

.cfgwrap { background: var(--surface); border: 1px solid var(--line); padding: 14px 20px; }
.cfgwrap summary { cursor: pointer; font-size: 12px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; color: var(--gold); }
.cfg { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 14px; }
.cfg label { display: grid; gap: 4px; font-size: 12px; color: var(--muted); }
.cfg input, .cfg select { border: 1px solid var(--line); background: var(--bg); padding: 8px 10px; min-width: 0; }
.cfg .actions { grid-column: 1 / -1; display: flex; gap: 10px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.cfg .msg { color: var(--good); }

.path { background: var(--surface); border: 1px solid var(--line); }
.path-head { display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; padding: 16px 20px; border-bottom: 1px solid var(--line); }
.path-head .ttl { font-family: var(--font-display); font-size: 24px; font-weight: 600; }
.path-head .meta { font-size: 13px; color: var(--muted); font-variant-numeric: tabular-nums; }
.steps-track { display: flex; gap: 6px; padding: 14px 20px; border-bottom: 1px solid var(--line); overflow-x: auto; }
.steps-track span { flex: 1 0 34px; height: 6px; background: var(--line); }
.steps-track span.done { background: var(--gold); }
.steps-track span.act { background: var(--gold-soft); outline: 1px solid var(--gold); }
.stufe { border-bottom: 1px solid var(--line); }
.stufe:last-child { border-bottom: none; }
.stufe-h { display: flex; align-items: center; gap: 14px; padding: 14px 20px; flex-wrap: wrap; }
.stufe-h .nr { width: 34px; height: 34px; flex: none; border: 1.5px solid var(--line); display: grid; place-items: center; font-family: var(--font-display); font-size: 18px; font-weight: 600; color: var(--muted); }
.stufe.done .nr { background: var(--gold); border-color: var(--gold); color: #120F08; }
.stufe.act .nr { border-color: var(--gold); color: var(--gold); }
.stufe-h .nm { flex: 1; min-width: 0; font-weight: 600; }
.stufe-h .nm small { display: block; font-weight: 500; font-size: 12px; color: var(--muted); }
.stufe-h .tbtn { border: 1px solid var(--line); background: var(--bg); font-size: 12px; padding: 6px 10px; }
.stufe-body { padding: 0 20px 16px 68px; }
.stufe.lock .stufe-body { opacity: .5; }
.ptask { display: flex; gap: 12px; align-items: flex-start; padding: 7px 0; }
.ptask .chk { width: 22px; height: 22px; margin-top: 1px; }
.ptask.done .chk::after { left: 7px; top: 2px; width: 5px; height: 11px; }
.ptask.lock .chk { border-color: var(--line); }
.ptask span { overflow-wrap: anywhere; }
.ptask.done span { color: var(--muted); text-decoration: line-through; }
.release { margin-top: 10px; display: flex; gap: 10px; align-items: center; flex-wrap: wrap; font-size: 13px; color: var(--muted); }
.edit-box { display: grid; gap: 8px; margin-top: 6px; }
.edit-box input, .edit-box textarea { border: 1px solid var(--line); background: var(--bg); padding: 8px 10px; width: 100%; min-width: 0; }
.edit-box textarea { min-height: 140px; resize: vertical; line-height: 1.5; }
.edit-box .row { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; font-size: 12px; color: var(--muted); }
.path-foot { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; padding: 14px 20px; border-top: 1px solid var(--line); font-size: 12px; color: var(--muted); }

@media (max-width: 860px) { .counters, .kpis4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .two { grid-template-columns: minmax(0, 1fr); } }
@media (max-width: 760px) { .plan { grid-template-columns: minmax(0, 1fr); } .plan .left { border-right: none; border-bottom: 1px solid var(--line); } }
@media (max-width: 460px) { .stage { grid-template-columns: 96px minmax(0, 1fr) 54px; } .ctr .val { font-size: 36px; } .band h1 { font-size: 25px; } .stufe-body { padding-left: 20px; } }
@media (prefers-reduced-motion: reduce) { * { transition: none !important; } }

[hidden] { display: none !important; }
body { padding-top: env(safe-area-inset-top, 0px); padding-bottom: env(safe-area-inset-bottom, 0px); }
.usermenu { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; font-size: 12px; color: #B8B0A2; }
.usermenu button { background: transparent; border: 1px solid #3A3A3F; color: #F3EEE3; padding: 7px 12px; font-size: 12px; letter-spacing: .06em; }
.usermenu button:hover { border-color: var(--band-gold); }
.band-right { display: flex; flex-direction: column; gap: 14px; align-items: flex-end; }
@media (max-width: 700px) { .band-right { align-items: flex-start; } }

/* Anmeldung */
body.auth { min-height: 100vh; display: grid; place-items: center; background: #000; color: #F3EEE3; padding: 24px max(16px, env(safe-area-inset-left, 0px)); }
.auth-card { width: 100%; max-width: 440px; background: #111113; border: 1px solid #2C2B29; padding: 34px 30px; display: grid; gap: 16px; }
.auth-logo { width: 190px; margin: 0 auto 6px; display: block; mix-blend-mode: lighten; }
.auth-card h1 { font-family: var(--font-display); font-weight: 600; font-size: 34px; margin: 0; text-align: center; color: #F3EEE3; }
.auth-card h1 em { color: #D4AE5A; font-weight: 500; }
.auth-card p { margin: 0; font-size: 14px; color: #CFC8BB; text-align: center; }
.auth-form { display: grid; gap: 14px; }
.auth-form label { display: grid; gap: 6px; font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: #A39C8F; }
.auth-form input { background: #000; border: 1px solid #3A3A3F; color: #F3EEE3; padding: 12px 14px; font-size: 15px; text-transform: none; letter-spacing: 0; }
.auth-form input:focus { border-color: #D4AE5A; outline: none; }
.auth-form .btn { padding: 14px; font-size: 13px; }
.auth-card .err { color: #F08A8E; }
.auth-card .ok { color: #7FD0A0; }
.auth-foot { font-size: 12px !important; color: #7C766C !important; }

/* Kommandozentrale */
.newclient { background: var(--surface); border: 1px solid var(--line); padding: 16px 20px; display: grid; gap: 12px; }
.newclient form { display: flex; gap: 10px; flex-wrap: wrap; }
.newclient input { flex: 1 1 200px; min-width: 0; border: 1px solid var(--line); background: var(--bg); padding: 10px 12px; }
.linkbox { display: grid; gap: 8px; background: var(--gold-soft); border: 1px solid var(--gold); padding: 14px 16px; font-size: 13px; }
.linkbox .row { display: flex; gap: 8px; flex-wrap: wrap; }
.linkbox input { flex: 1 1 260px; min-width: 0; border: 1px solid var(--line); background: var(--surface); padding: 9px 10px; font-size: 13px; }
.manage { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.manage .btn { padding: 8px 12px; font-size: 11px; }
.chip.invite { background: var(--gold-soft); color: var(--gold); }
.err-inline { color: var(--red); font-size: 13px; }
.toast { position: fixed; left: 50%; bottom: calc(24px + env(safe-area-inset-bottom, 0px)); transform: translateX(-50%); background: var(--fg); color: var(--bg); padding: 10px 18px; font-size: 13px; font-weight: 600; z-index: 50; max-width: calc(100% - 32px); }
.pwbox { background: var(--surface); border: 1px solid var(--line); padding: 16px 20px; }
.pwbox form { display: flex; gap: 10px; flex-wrap: wrap; margin-top: 10px; }
.pwbox input { flex: 1 1 180px; min-width: 0; border: 1px solid var(--line); background: var(--bg); padding: 10px 12px; }
main.wrap > *, #board > *, #cockpit > div > * { min-width: 0; }
.band-right .goal { flex: none; width: 260px; max-width: 100%; }
.stufe.collapsed .stufe-body { display: none; }
.stufe-h .nm { flex: 1 1 170px; }
@media (max-width: 460px) { .stufe-h { gap: 10px 12px; } .stufe-h .tbtn { margin-left: 46px; } .stufe-h .chip + .tbtn { margin-left: 0; } }
