/* COmpanion – Designsystem
   Anlehnung an Porsche Consulting: Schwarz/Weiß, viel Weißraum, scharfe Kanten,
   Porsche-Rot (#D5001C) nur als Akzent. Lizenzierte "Porsche Next" kann unter
   assets/fonts abgelegt und per @font-face eingebunden werden – sonst Fallback. */

:root {
  --black: #000;
  --ink: #0e0e12;
  --white: #fff;
  --stage: rgba(20, 20, 32, .055);
  --stage-2: rgba(255, 255, 255, .5);
  --line: #d8d8db;
  --line-soft: #ececee;
  --muted: #6b6a72;
  --soft: #b6b5ba;
  --dark: #3f3e45;
  --red: #d5001c;
  --red-dark: #a80016;
  --red-soft: #fbe5e8;
  --success: #00843a;
  --success-soft: #e3f3e9;
  --warning: #b86e00;
  --warning-bg: #fdf1df;
  --warning-line: #f9b456;
  --info: #1f4fa8;
  --info-soft: #e6edf9;
  --font: "Porsche Next", "Helvetica Neue", Helvetica, Arial, system-ui, sans-serif;
  --wrap: 1360px;
  --gutter: clamp(16px, 3vw, 40px);
  --shadow: 0 1px 2px rgba(0,0,0,.04), 0 8px 24px rgba(0,0,0,.06);
  /* Glassmorphism (Porsche-Design „frosted“) */
  --surface: rgba(255, 255, 255, .52);
  --surface-strong: rgba(255, 255, 255, .78);
  --surface-soft: rgba(255, 255, 255, .34);
  --glass-border: rgba(255, 255, 255, .72);
  --glass-blur: blur(22px) saturate(165%);
  --glass-shadow: inset 0 1px 0 rgba(255,255,255,.75), 0 12px 32px rgba(18, 18, 30, .08);
  --radius: 8px;
  --radius-sm: 4px;
}

*, *::before, *::after { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body {
  margin: 0; font-family: var(--font); font-size: 15px; line-height: 1.5; color: var(--ink);
  background: var(--surface-strong); -webkit-font-smoothing: antialiased; min-height: 100vh; display: flex; flex-direction: column;
}
a { color: inherit; text-decoration: none; }
a:hover { color: var(--red); }
h1, h2, h3, h4 { margin: 0; font-weight: 700; line-height: 1.15; letter-spacing: -.01em; }
h1 { font-size: clamp(28px, 3.2vw, 42px); }
h2 { font-size: clamp(20px, 1.8vw, 24px); }
h3 { font-size: 17px; }
h4 { font-size: 15px; }
p { margin: 0 0 .75em; }
small, .small { font-size: 13px; }
.muted { color: var(--muted); }
.red { color: var(--red); }
.nowrap { white-space: nowrap; }
.right { text-align: right; }
.center { text-align: center; }
.strong { font-weight: 700; }
.hidden, [hidden] { display: none !important; }
.sr-only { position: absolute; width: 1px; height: 1px; overflow: hidden; clip: rect(0 0 0 0); }
.co { color: var(--red); }
hr { border: 0; border-top: 1px solid var(--line); margin: 24px 0; }

.icon { flex: none; vertical-align: middle; }

/* ---------------------------------------------------------------- Header */
.topbar { background: var(--black); color: var(--white); position: sticky; top: 0; z-index: 50; }
.topbar__inner { max-width: var(--wrap); margin: 0 auto; padding: 0 var(--gutter); display: flex; align-items: stretch; gap: 28px; min-height: 64px; }
.brand { display: flex; flex-direction: column; justify-content: center; line-height: 1; padding: 10px 0; }
.brand:hover { color: var(--white); }
.brand__mark { font-size: 22px; font-weight: 700; letter-spacing: -.02em; }
.brand__mark .co { color: var(--red); }
.brand { flex: none; }
.brand__sub { font-size: 10px; letter-spacing: .14em; text-transform: uppercase; color: var(--soft); margin-top: 5px; white-space: nowrap; }
.mainnav { display: flex; align-items: stretch; gap: 4px; flex: 1; }
.mainnav__item { display: flex; align-items: center; gap: 7px; padding: 0 12px; white-space: nowrap; font-weight: 600; font-size: 15px; color: #d6d6da; position: relative; }
.mainnav__item:hover { color: var(--white); }
.mainnav__item.is-active { color: var(--white); }
.mainnav__item.is-active::after { content: ""; position: absolute; left: 14px; right: 14px; bottom: 0; height: 3px; background: var(--red); }
.mainnav__no { font-size: 11px; color: var(--soft); font-weight: 400; letter-spacing: .06em; }
.mainnav__item.is-active .mainnav__no { color: var(--red); }
.topbar__right { display: flex; align-items: center; gap: 14px; margin-left: auto; }
.toollink { display: flex; align-items: center; gap: 6px; color: #d6d6da; font-size: 14px; padding: 6px 4px; border-bottom: 2px solid transparent; }
.toollink:hover, .toollink.is-active { color: var(--white); }
.toollink.is-active { border-bottom-color: var(--red); }
.roleswitch { flex: none; display: flex; align-items: center; gap: 8px; background: #1c1c21; border: 1px solid #3a3a40; padding: 0 0 0 10px; height: 36px; }
.roleswitch__label { font-size: 10.5px; letter-spacing: .12em; text-transform: uppercase; color: var(--soft); }
.roleswitch select { background: transparent; color: var(--white); border: 0; font: inherit; font-size: 13.5px; height: 34px; padding: 0 28px 0 4px; max-width: 300px; cursor: pointer;
  appearance: none; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23fff' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 10px center; }
.roleswitch select option { color: var(--ink); background: var(--surface-strong); }
.me { display: flex; }
.navtoggle { display: none; background: none; border: 0; color: var(--white); width: 40px; cursor: pointer; }
.navtoggle span, .navtoggle span::before, .navtoggle span::after { display: block; width: 22px; height: 2px; background: currentColor; position: relative; content: ""; }
.navtoggle span::before { position: absolute; top: -7px; } .navtoggle span::after { position: absolute; top: 7px; }
.demobar { background: var(--warning-bg); color: var(--warning); text-align: center; font-size: 13px; padding: 4px; }

/* ---------------------------------------------------------------- Layout */
.main { flex: 1; width: 100%; max-width: var(--wrap); margin: 0 auto; padding: 36px var(--gutter) 64px; }
.footer { border-top: 1px solid var(--line); color: var(--muted); font-size: 12.5px; }
.footer__inner { max-width: var(--wrap); margin: 0 auto; padding: 18px var(--gutter); display: flex; justify-content: space-between; gap: 16px; flex-wrap: wrap; }

.pagehead { display: flex; align-items: flex-end; justify-content: space-between; gap: 24px; margin-bottom: 28px; flex-wrap: wrap; }
.pagehead__actions { display: flex; gap: 10px; flex-wrap: wrap; align-items: center; }
.kicker { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 10px; font-weight: 600; }
.kicker .red, .kicker b { color: var(--red); }
.lead { font-size: 17px; color: var(--muted); margin: 10px 0 0; max-width: 760px; }

.subnav { display: flex; gap: 28px; border-bottom: 1px solid var(--line); margin-bottom: 28px; overflow-x: auto; scrollbar-width: none; }
.subnav__item { padding: 10px 0 12px; font-weight: 600; color: var(--muted); border-bottom: 3px solid transparent; margin-bottom: -1px; white-space: nowrap; display: flex; align-items: center; gap: 8px; }
.subnav__item:hover { color: var(--ink); }
.subnav__item.is-active { color: var(--ink); border-bottom-color: var(--ink); }
.subnav__count { background: var(--red); color: var(--white); font-size: 11px; min-width: 20px; height: 20px; padding: 0 6px; display: inline-flex; align-items: center; justify-content: center; border-radius: 10px; }

.grid { display: grid; gap: 24px; }
.grid--2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid--3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid--4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid--main { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); }
.grid--side { grid-template-columns: 300px minmax(0, 1fr); }
.span-2 { grid-column: span 2; }
.stack > * + * { margin-top: 24px; }
.stack-sm > * + * { margin-top: 12px; }
.row { display: flex; align-items: center; gap: 12px; flex-wrap: wrap; }
.row--between { justify-content: space-between; }
.row--top { align-items: flex-start; }
.grow { flex: 1; min-width: 0; }
.mt-0 { margin-top: 0 !important; } .mt-1 { margin-top: 8px; } .mt-2 { margin-top: 16px; } .mt-3 { margin-top: 24px; } .mt-4 { margin-top: 40px; }
.mb-0 { margin-bottom: 0 !important; } .mb-1 { margin-bottom: 8px; } .mb-2 { margin-bottom: 16px; } .mb-3 { margin-bottom: 24px; }

/* ---------------------------------------------------------------- Karten */
.card { background: var(--surface-strong); border: 1px solid var(--line); }
.card--stage { background: var(--stage); border-color: var(--stage); }
.card--dark { background: var(--black); color: var(--white); border-color: var(--black); }
.card--dark .muted { color: var(--soft); }
.card--accent { border-top: 3px solid var(--red); }
.card__head { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 18px 22px 0; flex-wrap: wrap; }
.card__title { font-size: 17px; font-weight: 700; display: flex; align-items: center; gap: 10px; }
.card__title .no { font-size: 12px; color: var(--red); font-weight: 600; letter-spacing: .06em; }
.card__body { padding: 18px 22px 22px; }
.card__body--flush { padding: 12px 0 4px; }
.card__foot { border-top: 1px solid var(--line-soft); padding: 12px 22px; display: flex; justify-content: space-between; align-items: center; gap: 12px; flex-wrap: wrap; }
.link-arrow { display: inline-flex; align-items: center; gap: 6px; font-weight: 600; font-size: 14px; }
.link-arrow .icon { transition: transform .15s; }
.link-arrow:hover .icon { transform: translateX(3px); }

.section-title { display: flex; align-items: baseline; gap: 12px; margin: 40px 0 16px; }
.section-title:first-child { margin-top: 0; }
.section-title .no { color: var(--red); font-size: 13px; font-weight: 600; }

/* KPI-Kacheln */
.kpis { display: grid; grid-template-columns: repeat(auto-fit, minmax(170px, 1fr)); gap: 1px; background: var(--line); border: 1px solid var(--line); }
.kpi { background: var(--surface-strong); padding: 18px 20px; display: block; }
a.kpi:hover { background: var(--stage-2); color: inherit; }
.kpi__label { font-size: 12px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; }
.kpi__value { font-size: 30px; font-weight: 700; margin-top: 6px; line-height: 1.1; letter-spacing: -.02em; }
.kpi__sub { font-size: 13px; color: var(--muted); margin-top: 4px; }

/* ---------------------------------------------------------------- Buttons */
.btn { display: inline-flex; align-items: center; justify-content: center; gap: 8px; height: 42px; padding: 0 18px; font: inherit; font-weight: 600; font-size: 14.5px;
  border: 2px solid var(--ink); background: var(--surface-strong); color: var(--ink); cursor: pointer; white-space: nowrap; transition: background .15s, color .15s, border-color .15s; border-radius: 0; }
.btn:hover { background: var(--ink); color: var(--white); }
.btn--primary { background: var(--ink); color: var(--white); }
.btn--primary:hover { background: var(--dark); border-color: var(--dark); color: var(--white); }
.btn--red { background: var(--red); border-color: var(--red); color: var(--white); }
.btn--red:hover { background: var(--red-dark); border-color: var(--red-dark); }
.btn--ghost { border-color: transparent; background: transparent; padding: 0 10px; }
.btn--ghost:hover { background: var(--stage); color: var(--ink); }
.btn--danger { border-color: var(--red); color: var(--red); }
.btn--danger:hover { background: var(--red); color: var(--white); }
.btn--sm { height: 32px; padding: 0 12px; font-size: 13px; border-width: 1.5px; }
.btn--xs { height: 26px; padding: 0 8px; font-size: 12px; border-width: 1px; gap: 4px; }
.btn--block { width: 100%; }
.btn[disabled], .btn.is-disabled { opacity: .4; pointer-events: none; }
.btn.is-loading { opacity: .6; pointer-events: none; }
.btn-group { display: flex; gap: 8px; flex-wrap: wrap; }

/* ---------------------------------------------------------------- Formulare */
.field { display: flex; flex-direction: column; gap: 6px; min-width: 0; }
.field > label, .label { font-size: 13px; font-weight: 600; }
.field .help, .help { font-size: 12.5px; color: var(--muted); }
.form-grid { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px 20px; }
.form-grid .full { grid-column: 1 / -1; }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=datetime-local], input[type=search], input[type=tel], select, textarea {
  font: inherit; font-size: 15px; color: var(--ink); background: var(--surface-strong); border: 2px solid var(--line); border-radius: 0; height: 44px; padding: 0 12px; width: 100%; transition: border-color .15s; }
textarea { height: auto; min-height: 96px; padding: 10px 12px; resize: vertical; line-height: 1.45; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--ink); }
input:disabled, select:disabled, textarea:disabled { background: var(--stage); color: var(--muted); }
select { appearance: none; padding-right: 36px; background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%23000' stroke-width='2'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E"); background-repeat: no-repeat; background-position: right 12px center; }
.input-sm, select.input-sm { height: 36px; font-size: 14px; }
.check { display: inline-flex; align-items: center; gap: 8px; cursor: pointer; font-size: 14.5px; }
.check input { width: 18px; height: 18px; accent-color: var(--ink); margin: 0; }
.form-actions { display: flex; gap: 10px; justify-content: flex-end; margin-top: 24px; flex-wrap: wrap; }
.searchbox { position: relative; }
.searchbox .icon { position: absolute; left: 12px; top: 50%; transform: translateY(-50%); color: var(--muted); }
.searchbox input { padding-left: 38px; }

.toolbar { display: flex; gap: 12px; flex-wrap: wrap; align-items: center; margin-bottom: 20px; }
.toolbar .searchbox { flex: 1; min-width: 220px; max-width: 420px; }
.toolbar select { width: auto; min-width: 160px; }

/* Bewertungsskala (segmentiert) */
.scaleinput { display: grid; grid-template-columns: repeat(6, minmax(0, 1fr)); border: 2px solid var(--line); }
.scaleinput input { position: absolute; opacity: 0; pointer-events: none; }
.scaleinput label { display: flex; flex-direction: column; align-items: center; justify-content: center; gap: 1px; padding: 8px 4px; cursor: pointer; border-left: 1px solid var(--line); text-align: center; min-height: 54px; transition: background .12s; }
.scaleinput label:first-of-type { border-left: 0; }
.scaleinput label b { font-size: 16px; }
.scaleinput label small { font-size: 10.5px; color: var(--muted); line-height: 1.15; }
.scaleinput label:hover { background: var(--stage); }
.scaleinput input:checked + label { background: var(--ink); color: var(--white); }
.scaleinput input:checked + label small { color: var(--soft); }
.scaleinput input:focus-visible + label { outline: 2px solid var(--red); outline-offset: -2px; }
.scaleinput input:disabled + label { cursor: default; }
.scaleinput--compact label { min-height: 38px; padding: 4px; }
.scaleinput--compact label small { display: none; }

.choice { display: grid; grid-template-columns: repeat(3, minmax(0, 1fr)); border: 2px solid var(--line); }
.choice input { position: absolute; opacity: 0; }
.choice label { padding: 10px 6px; text-align: center; cursor: pointer; font-weight: 600; font-size: 14px; border-left: 1px solid var(--line); }
.choice label:first-of-type { border-left: 0; }
.choice input:checked + label { background: var(--ink); color: var(--white); }

/* ---------------------------------------------------------------- Tabellen */
.table-wrap { overflow-x: auto; }
.table { width: 100%; border-collapse: collapse; font-size: 14.5px; }
.table th { text-align: left; font-size: 11.5px; letter-spacing: .08em; text-transform: uppercase; color: var(--muted); font-weight: 600; padding: 10px 12px; border-bottom: 2px solid var(--ink); white-space: nowrap; }
.table td { padding: 12px; border-bottom: 1px solid var(--line-soft); vertical-align: middle; }
.table tr:last-child td { border-bottom: 0; }
.table tbody tr:hover td { background: var(--stage-2); }
.table th:first-child, .table td:first-child { padding-left: 22px; }
.table th:last-child, .table td:last-child { padding-right: 22px; }
.table--plain th:first-child, .table--plain td:first-child { padding-left: 0; }
.table--plain th:last-child, .table--plain td:last-child { padding-right: 0; }
.table td.actions { text-align: right; white-space: nowrap; }
.table tr.is-muted td { color: var(--muted); }
.table tfoot td { border-top: 2px solid var(--ink); font-weight: 700; }

/* ---------------------------------------------------------------- Chips, Badges */
.chip { display: inline-flex; align-items: center; gap: 5px; height: 24px; padding: 0 9px; font-size: 12px; font-weight: 600; white-space: nowrap; border: 1px solid transparent; letter-spacing: .01em; }
.chip--neutral { background: var(--stage); color: var(--dark); }
.chip--success { background: var(--success-soft); color: var(--success); }
.chip--warning { background: var(--warning-bg); color: var(--warning); }
.chip--danger, .chip--red { background: var(--red-soft); color: var(--red); }
.chip--info { background: var(--info-soft); color: var(--info); }
.chip--dark { background: var(--ink); color: var(--white); }
.chip--outline { border-color: var(--line); color: var(--dark); background: var(--surface-strong); }
.chip--dot::before { content: ""; width: 7px; height: 7px; border-radius: 50%; background: currentColor; }

.scale { display: inline-block; min-width: 54px; text-align: center; font-weight: 700; font-size: 13.5px; padding: 3px 8px; }
.scale--top { background: var(--ink); color: var(--white); }
.scale--good { background: var(--success-soft); color: var(--success); }
.scale--ok { background: var(--stage); color: var(--ink); }
.scale--low { background: var(--warning-bg); color: var(--warning); }
.scale--bad { background: var(--red-soft); color: var(--red); }
.scale--none { color: var(--soft); }

.bar { display: inline-block; width: 100%; min-width: 60px; height: 6px; background: var(--line-soft); vertical-align: middle; position: relative; }
.bar > span { display: block; height: 100%; background: var(--ink); }
.bar--red > span { background: var(--red); }
.bar--success > span { background: var(--success); }
.bar--warning > span { background: var(--warning-line); }

/* ---------------------------------------------------------------- Personen */
.avatar { --s: 36px; width: var(--s); height: var(--s); border-radius: 50%; display: inline-flex; align-items: center; justify-content: center; flex: none;
  font-size: calc(var(--s) * .38); font-weight: 700; color: var(--white); background: hsl(var(--h), 10%, 32%); letter-spacing: .02em; }
.topbar .avatar { background: #2c2c33; box-shadow: 0 0 0 2px #45454c; }
.person { display: inline-flex; align-items: center; gap: 10px; min-width: 0; }
.person__text { display: flex; flex-direction: column; min-width: 0; line-height: 1.25; }
.person__name { font-weight: 600; }
.person__name a:hover { color: var(--red); }
.person__sub { font-size: 12.5px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }

/* ---------------------------------------------------------------- Stepper */
.stepper { list-style: none; margin: 0; padding: 0; display: grid; grid-auto-columns: minmax(0, 1fr); grid-auto-flow: column; gap: 0; }
.stepper__step { display: flex; gap: 12px; align-items: flex-start; position: relative; padding-right: 16px; }
.stepper__step::after { content: ""; position: absolute; top: 15px; left: 44px; right: 12px; height: 2px; background: var(--line); }
.stepper__step:last-child::after { display: none; }
.stepper__step.is-done::after { background: var(--ink); }
.stepper__dot { width: 32px; height: 32px; border-radius: 50%; border: 2px solid var(--line); background: var(--surface-strong); display: inline-flex; align-items: center; justify-content: center; font-weight: 700; font-size: 14px; flex: none; position: relative; z-index: 1; color: var(--muted); }
.stepper__step.is-done .stepper__dot { background: var(--ink); border-color: var(--ink); color: var(--white); }
.stepper__step.is-current .stepper__dot { border-color: var(--red); color: var(--red); box-shadow: 0 0 0 4px var(--red-soft); }
.stepper__text { display: flex; flex-direction: column; padding-top: 4px; background: var(--surface-strong); position: relative; z-index: 1; padding-right: 10px; }
.card--stage .stepper__text { background: var(--stage); }
.stepper__label { font-weight: 700; font-size: 14.5px; }
.stepper__sub { font-size: 12.5px; color: var(--muted); }
.stepper__step.is-current .stepper__label { color: var(--red); }

/* ---------------------------------------------------------------- Hinweise, Leerzustände */
.notice { display: flex; gap: 12px; padding: 14px 16px; font-size: 14.5px; align-items: flex-start; border-left: 3px solid; }
.notice .icon { margin-top: 1px; }
.notice > div > *:last-child { margin-bottom: 0; }
.notice--info { background: var(--info-soft); border-color: var(--info); color: #173a7a; }
.notice--success { background: var(--success-soft); border-color: var(--success); color: #0b5a2c; }
.notice--warning { background: var(--warning-bg); border-color: var(--warning-line); color: #7a4a00; }
.notice--danger { background: var(--red-soft); border-color: var(--red); color: var(--red-dark); }
.notice--neutral { background: var(--stage); border-color: var(--ink); }

.empty { text-align: center; padding: 36px 20px; color: var(--muted); }
.empty__icon { width: 44px; height: 44px; border-radius: 50%; background: var(--stage); display: inline-flex; align-items: center; justify-content: center; color: var(--ink); margin-bottom: 10px; }
.empty__title { font-weight: 700; color: var(--ink); font-size: 16px; }
.empty__text { margin: 6px auto 14px; max-width: 420px; font-size: 14px; }

/* ---------------------------------------------------------------- To-do-Liste */
.todos { list-style: none; margin: 0; padding: 0; }
.todo { display: grid; grid-template-columns: 36px minmax(0, 1fr) auto; gap: 14px; align-items: center; padding: 14px 22px; border-top: 1px solid var(--line-soft); }
.todo:first-child { border-top: 0; }
.todo__icon { width: 36px; height: 36px; display: inline-flex; align-items: center; justify-content: center; background: var(--stage); }
.todo--urgent .todo__icon { background: var(--red-soft); color: var(--red); }
.todo__title { font-weight: 600; }
.todo__meta { font-size: 13px; color: var(--muted); }
.todo__meta .is-late { color: var(--red); font-weight: 600; }

/* Listen */
.list { list-style: none; margin: 0; padding: 0; }
.list > li { padding: 12px 22px; border-top: 1px solid var(--line-soft); display: flex; gap: 12px; align-items: center; justify-content: space-between; }
.list > li:first-child { border-top: 0; }
.list--plain > li { padding-left: 0; padding-right: 0; }
.dl { display: grid; grid-template-columns: max-content minmax(0, 1fr); gap: 8px 20px; margin: 0; font-size: 14.5px; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 500; }

/* ---------------------------------------------------------------- Modal & Toasts */
.modal { position: fixed; inset: 0; z-index: 100; display: none; }
.modal.is-open { display: block; }
.modal__backdrop { position: absolute; inset: 0; background: rgba(0,0,0,.55); animation: fade .15s; }
.modal__dialog { position: absolute; top: 0; right: 0; bottom: 0; width: min(680px, 100vw); background: var(--surface-strong); overflow-y: auto; animation: slidein .2s ease-out; box-shadow: -10px 0 40px rgba(0,0,0,.2); }
.modal--wide .modal__dialog { width: min(980px, 100vw); }
.modal__close { position: absolute; top: 18px; right: 18px; background: none; border: 0; cursor: pointer; padding: 6px; z-index: 2; }
.modal__close:hover { color: var(--red); }
.modal__body { padding: 36px 36px 40px; }
.modal__body h2 { margin-bottom: 6px; padding-right: 40px; }
.modal__body .modal-lead { color: var(--muted); margin-bottom: 24px; }
@keyframes fade { from { opacity: 0; } }
@keyframes slidein { from { transform: translateX(40px); opacity: 0; } }

.toasts { position: fixed; bottom: 24px; left: 50%; transform: translateX(-50%); z-index: 200; display: flex; flex-direction: column; gap: 8px; align-items: center; pointer-events: none; }
.toast { background: var(--ink); color: var(--white); padding: 12px 18px; font-size: 14.5px; box-shadow: var(--shadow); display: flex; gap: 10px; align-items: center; animation: toastin .2s ease-out; max-width: 90vw; }
.toast--error { background: var(--red); }
.toast .icon { color: #6fdc9a; }
.toast--error .icon { color: var(--white); }
@keyframes toastin { from { transform: translateY(10px); opacity: 0; } }

.confirm-dialog { position: fixed; inset: 0; z-index: 150; display: flex; align-items: center; justify-content: center; background: rgba(0,0,0,.5); padding: 16px; }
.confirm-dialog__box { background: var(--surface-strong); max-width: 440px; width: 100%; padding: 28px; }
.confirm-dialog__box p { font-size: 16px; margin-bottom: 20px; }

/* ---------------------------------------------------------------- Picker (Personensuche) */
.picker { position: relative; }
.picker__list { position: absolute; left: 0; right: 0; top: 100%; background: var(--surface-strong); border: 2px solid var(--ink); border-top: 0; z-index: 20; max-height: 280px; overflow-y: auto; }
.picker__opt { padding: 8px 12px; cursor: pointer; display: flex; align-items: center; gap: 10px; }
.picker__opt:hover, .picker__opt.is-active { background: var(--stage); }
.picker__selected { display: flex; align-items: center; justify-content: space-between; gap: 10px; border: 2px solid var(--line); padding: 6px 6px 6px 10px; min-height: 44px; }

/* ---------------------------------------------------------------- Talent-Matrix (9-Box) */
.ninebox { display: grid; grid-template-columns: 34px repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(150px, auto)) 34px; gap: 6px; }
.ninebox__axis-y { grid-row: 1 / 4; display: flex; align-items: center; justify-content: center; }
.ninebox__axis-y span { transform: rotate(-90deg); white-space: nowrap; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.ninebox__axis-x { grid-column: 2 / 5; text-align: center; font-size: 12px; letter-spacing: .12em; text-transform: uppercase; font-weight: 700; color: var(--muted); align-self: center; }
.nb-cell { background: var(--stage); padding: 10px 10px 12px; position: relative; display: flex; flex-direction: column; gap: 6px; transition: outline .1s, background .1s; min-width: 0; }
.nb-cell[data-score="6"] { background: #1d1d22; color: var(--white); }
.nb-cell[data-score="5"] { background: #e3e3e6; }
.nb-cell[data-score="4"] { background: #ebebed; }
.nb-cell__head { display: flex; justify-content: space-between; align-items: baseline; gap: 6px; }
.nb-cell__title { font-size: 12.5px; font-weight: 700; }
.nb-cell__axes { font-size: 10.5px; color: var(--muted); }
.nb-cell[data-score="6"] .nb-cell__axes { color: var(--soft); }
.nb-cell__count { font-size: 22px; font-weight: 700; line-height: 1; }
.nb-cell__items { display: flex; flex-wrap: wrap; gap: 4px; }
.nb-cell.is-over { outline: 2px dashed var(--red); outline-offset: -2px; background: var(--red-soft); color: var(--ink); }
.nb-person { display: inline-flex; align-items: center; gap: 4px; background: var(--surface-strong); color: var(--ink); border: 1px solid var(--line); padding: 2px 7px 2px 2px; font-size: 12px; font-weight: 600; cursor: pointer; max-width: 100%; }
.nb-person .avatar { --s: 20px !important; }
.nb-person[draggable=true] { cursor: grab; }
.nb-person:hover { border-color: var(--ink); }
.nb-person.is-dragging { opacity: .4; }
.nb-person .mv { font-size: 11px; font-weight: 700; }
.nb-person .mv--up { color: var(--success); }
.nb-person .mv--down { color: var(--red); }
.nb-person .mv--new { color: var(--info); }
.nb-person.is-promo { box-shadow: inset 0 -2px 0 var(--red); }
.nb-person.is-dim { opacity: .25; }
.ninebox__labels-y { display: contents; }
.axislabel { font-size: 11px; color: var(--muted); }

.timeline { display: flex; gap: 0; align-items: stretch; overflow-x: auto; }
.timeline__item { flex: 1; min-width: 120px; padding: 12px; border-left: 1px solid var(--line); }
.timeline__item:first-child { border-left: 0; }
.mini9 { display: grid; grid-template-columns: repeat(3, 14px); grid-template-rows: repeat(3, 14px); gap: 2px; }
.mini9 span { background: var(--line-soft); }
.mini9 span.is-on { background: var(--red); }

/* ---------------------------------------------------------------- Organigramm */
.orgboard { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; align-items: start; }
.orgarea { border: 1px solid var(--line); background: var(--surface-strong); }
.orgarea__head { padding: 14px 16px; background: var(--black); color: var(--white); }
.orgarea__name { font-weight: 700; }
.orgarea__leads { display: flex; flex-wrap: wrap; gap: 6px; margin-top: 8px; min-height: 30px; padding: 4px; border: 1px dashed transparent; }
.orgarea__leads.is-over { border-color: var(--red); background: rgba(213,0,28,.15); }
.orglead { display: inline-flex; align-items: center; gap: 6px; background: #26262c; padding: 3px 8px 3px 3px; font-size: 12.5px; cursor: grab; }
.orglead .avatar { --s: 22px !important; }
.orgpartners { padding: 10px; display: flex; flex-direction: column; gap: 10px; min-height: 60px; }
.orgpartners.is-over, .orgstaff.is-over { outline: 2px dashed var(--red); outline-offset: -2px; background: var(--red-soft); }
.orgpartner { border: 1px solid var(--line); background: var(--stage-2); }
.orgpartner__head { display: flex; align-items: center; gap: 8px; padding: 8px 10px; cursor: grab; background: var(--surface-strong); border-bottom: 1px solid var(--line-soft); }
.orgstaff { padding: 6px; display: flex; flex-direction: column; gap: 4px; min-height: 36px; }
.orgcard { display: flex; align-items: center; gap: 8px; padding: 5px 8px; background: var(--surface-strong); border: 1px solid var(--line-soft); cursor: grab; font-size: 13.5px; }
.orgcard:hover, .orgpartner__head:hover, .orglead:hover { outline: 1px solid var(--ink); }
.orgcard .avatar { --s: 24px !important; }
.orgcard__lvl { margin-left: auto; font-size: 11px; color: var(--muted); font-weight: 600; }
.is-dragging { opacity: .4; }
.dragicon { color: var(--soft); }

.matrix { border-collapse: collapse; width: 100%; font-size: 13.5px; }
.matrix th, .matrix td { border: 1px solid var(--line-soft); padding: 8px 10px; text-align: center; }
.matrix th { font-size: 12px; font-weight: 600; background: var(--surface-strong); }
.matrix th.rowhead { text-align: left; white-space: nowrap; }
.matrix td { font-weight: 700; }
.matrix td.is-0 { color: var(--soft); font-weight: 400; }

/* ---------------------------------------------------------------- Trainings */
.catalog { display: grid; grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); gap: 20px; }
.tcard { border: 1px solid var(--line); display: flex; flex-direction: column; background: var(--surface-strong); transition: border-color .15s, box-shadow .15s; cursor: pointer; text-align: left; font: inherit; color: inherit; padding: 0; }
.tcard:hover { border-color: var(--ink); box-shadow: var(--shadow); }
.tcard__band { height: 4px; background: var(--c, var(--ink)); }
.tcard__body { padding: 18px 20px; flex: 1; display: flex; flex-direction: column; gap: 8px; }
.tcard__cat { font-size: 11.5px; letter-spacing: .1em; text-transform: uppercase; font-weight: 700; color: var(--muted); }
.tcard__title { font-size: 17px; font-weight: 700; line-height: 1.25; }
.tcard__text { font-size: 14px; color: var(--muted); }
.tcard__meta { display: flex; gap: 14px; flex-wrap: wrap; font-size: 13px; color: var(--dark); margin-top: auto; padding-top: 6px; }
.tcard__meta span { display: inline-flex; align-items: center; gap: 4px; }
.tcard__foot { border-top: 1px solid var(--line-soft); padding: 10px 20px; display: flex; justify-content: space-between; align-items: center; font-size: 13px; }
.catdot { display: inline-block; width: 9px; height: 9px; background: var(--c, var(--ink)); margin-right: 6px; }

.session { display: grid; grid-template-columns: 72px minmax(0, 1fr) auto; gap: 16px; align-items: center; padding: 14px 0; border-top: 1px solid var(--line-soft); }
.session:first-child { border-top: 0; }
.datebox { border: 2px solid var(--ink); text-align: center; line-height: 1.1; padding: 6px 4px; }
.datebox__wd { font-size: 11px; text-transform: uppercase; letter-spacing: .08em; color: var(--muted); font-weight: 600; }
.datebox__d { font-size: 22px; font-weight: 700; }
.datebox__m { font-size: 11.5px; text-transform: uppercase; letter-spacing: .06em; }
.datebox--red { border-color: var(--red); }
.datebox--red .datebox__d { color: var(--red); }
.capacity { display: flex; align-items: center; gap: 8px; font-size: 13px; color: var(--muted); }
.capacity .bar { width: 90px; }

.weekgrid { display: grid; grid-template-columns: repeat(5, minmax(200px, 1fr)); gap: 12px; overflow-x: auto; }
.weekgrid__day h4 { padding: 10px 0; border-bottom: 2px solid var(--ink); margin-bottom: 10px; display: flex; justify-content: space-between; }
.slot { border: 1px solid var(--line); padding: 10px 12px; margin-bottom: 8px; background: var(--surface-strong); cursor: pointer; display: block; width: 100%; text-align: left; font: inherit; color: inherit; border-left: 4px solid var(--c, var(--ink)); }
.slot:hover { border-color: var(--ink); border-left-color: var(--c, var(--ink)); }
.slot__time { font-size: 12px; color: var(--muted); }
.slot__title { font-weight: 700; font-size: 14px; line-height: 1.25; margin: 2px 0 6px; }
.slot.is-booked { background: var(--success-soft); }
.slot.is-waitlist { background: var(--warning-bg); }

/* ---------------------------------------------------------------- Ziele */
.corridor { position: relative; height: 26px; min-width: 200px; }
.corridor__track { position: absolute; left: 0; right: 0; top: 11px; height: 4px; background: linear-gradient(90deg, var(--red-soft) 0 16.66%, var(--warning-bg) 16.66% 33.33%, var(--stage) 33.33% 50%, var(--success-soft) 50% 66.66%, #cfe9d9 66.66% 83.33%, #b9dfc8 83.33%); }
.corridor__tick { position: absolute; top: 8px; width: 1px; height: 10px; background: var(--soft); }
.corridor__lbl { position: absolute; top: -2px; font-size: 10px; color: var(--muted); transform: translateX(-50%); white-space: nowrap; }
.corridor__val { position: absolute; top: 6px; width: 14px; height: 14px; border-radius: 50%; background: var(--ink); border: 2px solid var(--white); box-shadow: 0 0 0 1px var(--ink); transform: translateX(-50%); }
.corridor-table { font-size: 12px; border-collapse: collapse; }
.corridor-table td, .corridor-table th { padding: 3px 8px; border: 1px solid var(--line-soft); text-align: center; }
.corridor-table th { background: var(--stage); font-weight: 600; }
.goal-weight { font-size: 22px; font-weight: 700; }
.weight-sum { font-weight: 700; }
.weight-sum.is-bad { color: var(--red); }
.source-tag { font-size: 11px; letter-spacing: .06em; text-transform: uppercase; color: var(--muted); display: inline-flex; gap: 4px; align-items: center; }

/* ---------------------------------------------------------------- Feedback */
.fb-cats { display: flex; flex-direction: column; gap: 18px; }
.fb-cat__name { font-weight: 700; }
.fb-cat__desc { font-size: 13px; color: var(--muted); margin-bottom: 8px; }
.score-row { display: grid; grid-template-columns: minmax(0, 1fr) 160px 60px; gap: 12px; align-items: center; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.score-row:first-child { border-top: 0; }
.anon-meter { display: flex; gap: 4px; }
.anon-meter span { width: 22px; height: 8px; background: var(--line); }
.anon-meter span.is-on { background: var(--ink); }

/* ---------------------------------------------------------------- Profil */
.profilehead { display: flex; gap: 24px; align-items: center; flex-wrap: wrap; padding-bottom: 28px; border-bottom: 1px solid var(--line); margin-bottom: 28px; }
.profilehead .avatar { --s: 88px !important; }
.profilehead h1 { font-size: clamp(26px, 3vw, 36px); }
.criteria { list-style: none; padding: 0; margin: 0; }
.criteria li { display: flex; gap: 10px; align-items: flex-start; padding: 8px 0; border-top: 1px solid var(--line-soft); font-size: 14px; }
.criteria li:first-child { border-top: 0; }
.criteria .ok { color: var(--success); } .criteria .nok { color: var(--red); } .criteria .na { color: var(--soft); }

/* ---------------------------------------------------------------- Responsive */
@media (max-width: 1440px) {
  .toollink__label { display: none; }
  .roleswitch select { max-width: 210px; }
  .roleswitch--period select { max-width: 150px; }
}
@media (max-width: 1180px) {
  .brand__sub { display: none; }
  .roleswitch select { max-width: 200px; }
  .grid--4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 980px) {
  .topbar__inner { flex-wrap: wrap; gap: 0 16px; }
  .navtoggle { display: block; margin-left: auto; order: 2; align-self: center; height: 64px; }
  .mainnav, .topbar__right { display: none; flex: 0 0 100%; width: 100%; }
  .brand { min-height: 64px; }
  .nav-open .mainnav { display: flex; flex-direction: column; order: 3; padding-bottom: 8px; }
  .nav-open .mainnav__item { padding: 12px 0 12px 14px; }
  .nav-open .mainnav__item.is-active::after { left: 0; right: auto; width: 3px; top: 8px; bottom: 8px; height: auto; }
  .nav-open .topbar__right { display: flex; flex-wrap: wrap; order: 4; padding: 8px 0 16px; }
  .roleswitch { width: 100%; } .roleswitch select { max-width: none; flex: 1; }
  .grid--2, .grid--3, .grid--main, .grid--side { grid-template-columns: minmax(0, 1fr); }
  .span-2 { grid-column: auto; }
  .stepper { grid-auto-flow: row; gap: 12px; }
  .stepper__step::after { display: none; }
  .weekgrid { grid-template-columns: repeat(5, 240px); }
}
@media (max-width: 640px) {
  .main { padding-top: 24px; }
  .grid--4 { grid-template-columns: minmax(0, 1fr); }
  .form-grid { grid-template-columns: minmax(0, 1fr); }
  .modal__body { padding: 28px 18px; }
  .scaleinput label small { display: none; }
  .session { grid-template-columns: 60px minmax(0, 1fr); }
  .session > :last-child { grid-column: 1 / -1; }
  .todo { grid-template-columns: 36px minmax(0, 1fr); }
  .todo > :last-child { grid-column: 2; }
  .ninebox { grid-template-columns: 24px repeat(3, minmax(0, 1fr)); grid-template-rows: repeat(3, minmax(110px, auto)) 30px; gap: 3px; }
  .nb-cell { padding: 6px; }
  .table th:first-child, .table td:first-child { padding-left: 12px; }
  .table th:last-child, .table td:last-child { padding-right: 12px; }
}

/* Ausrichtung in Tabellen (überschreibt th { text-align:left }) */
.table th.right, .table td.right { text-align: right; }
.table th.center, .table td.center { text-align: center; }

/* Demo-Periode im Header */
.roleswitch--period select { max-width: 190px; }
.roleswitch--period { border-color: #5a1a22; }

/* Pyramidal: Kernaussage → Tabelle → Details aufklappbar */
.summary-line { font-size: 17px; margin: 0 0 16px; }
.summary-line b { font-weight: 700; }
details.expand { border-top: 1px solid var(--line-soft); }
details.expand > summary { list-style: none; cursor: pointer; display: flex; align-items: center; gap: 10px; padding: 12px 0; font-weight: 600; }
details.expand > summary::-webkit-details-marker { display: none; }
details.expand > summary::before { content: ""; width: 8px; height: 8px; border-right: 2px solid currentColor; border-bottom: 2px solid currentColor; transform: rotate(-45deg); transition: transform .15s; flex: none; margin-right: 2px; }
details.expand[open] > summary::before { transform: rotate(45deg); }
details.expand > summary:hover { color: var(--red); }
details.expand > .expand__body { padding: 0 0 14px 20px; }
tr.expand-row > td { background: var(--stage-2); padding-top: 4px; }
.table tr[data-toggle] { cursor: pointer; }
.table tr[data-toggle] td:first-child::before { content: "▸"; display: inline-block; width: 14px; color: var(--muted); transition: transform .15s; }
.table tr[data-toggle].is-open td:first-child::before { transform: rotate(90deg); }

/* ================================================================ Präsentationsmodus (Deck) */
.deck-body { background: #0b0b0e; overflow: hidden; }
.deck { position: fixed; inset: 0; display: grid; grid-template-columns: minmax(0, 1fr); grid-template-rows: auto 3px minmax(0, 1fr) auto; background: #0b0b0e; color: var(--white); }
.deck__bar { display: flex; align-items: center; gap: 28px; padding: 14px clamp(16px, 3vw, 36px); border-bottom: 1px solid #222; }
.deck__brand { font-weight: 700; font-size: 18px; letter-spacing: -.02em; flex: none; }
.deck__title { display: flex; flex-direction: column; line-height: 1.25; min-width: 0; flex: none; max-width: 30%; }
.deck__title b { font-size: 15px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck__title span { font-size: 12.5px; color: var(--soft); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.deck__steps { list-style: none; margin: 0 0 0 auto; padding: 0; display: flex; gap: 4px; overflow-x: auto; scrollbar-width: none; min-width: 0; }
.deck__steps li button { background: none; border: 0; color: #8d8c93; font: inherit; font-size: 12.5px; font-weight: 600; padding: 6px 10px; cursor: pointer; white-space: nowrap; border-bottom: 2px solid transparent; display: flex; gap: 6px; align-items: center; }
.deck__steps li button i { font-style: normal; font-size: 11px; width: 18px; height: 18px; border-radius: 50%; border: 1px solid #55545b; display: inline-flex; align-items: center; justify-content: center; }
.deck__steps li.is-done button { color: #c9c8ce; }
.deck__steps li.is-done button i { background: #fff; color: #000; border-color: #fff; }
.deck__steps li.is-active button { color: #fff; border-bottom-color: var(--red); }
.deck__steps li.is-active button i { border-color: var(--red); color: var(--red); }
.deck__close { color: #c9c8ce; display: flex; flex: none; }
.deck__close:hover { color: var(--red); }
.deck__progress { background: #222; }
.deck__progress span { display: block; height: 100%; width: 0; background: var(--red); transition: width .35s ease; }
.deck__stage { position: relative; overflow: hidden; }
.slide { position: absolute; inset: 0; overflow-y: auto; padding: clamp(24px, 5vh, 64px) clamp(16px, 6vw, 96px) 40px; opacity: 0; transform: translateX(40px); pointer-events: none; transition: opacity .3s ease, transform .35s ease; background: #0b0b0e; }
.slide.is-prev { transform: translateX(-40px); }
.slide.is-active { opacity: 1; transform: none; pointer-events: auto; }
.slide__inner { max-width: 1120px; margin: 0 auto; }
.slide__kicker { font-size: 12px; letter-spacing: .16em; text-transform: uppercase; color: var(--red); font-weight: 700; margin-bottom: 14px; }
.slide__title { font-size: clamp(30px, 4.2vw, 56px); line-height: 1.05; letter-spacing: -.025em; margin-bottom: 14px; }
.slide__lead { font-size: clamp(16px, 1.5vw, 20px); color: #b6b5ba; max-width: 820px; margin: 0 0 32px; }
.slide__body { color: var(--white); }
/* Inhalte auf dunklen Folien: helle Karten für Formulare/Tabellen */
.slide .panel { background: var(--surface-strong); color: var(--ink); padding: 24px 26px; }
.slide .panel + .panel { margin-top: 16px; }
.slide .panel--dark { background: #17171b; color: var(--white); border: 1px solid #2a2a30; }
.slide .panel--dark .muted { color: #9a99a0; }
.slide textarea.big { min-height: 240px; font-size: 17px; line-height: 1.55; border-color: #d0d0d4; }
.slide .bignum { font-size: clamp(40px, 6vw, 76px); font-weight: 700; letter-spacing: -.03em; line-height: 1; }
.slide .bignum small { font-size: .35em; color: #9a99a0; font-weight: 600; letter-spacing: 0; margin-left: 6px; }
.slide .twocol { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 20px; }
.slide .readonly-text { white-space: pre-line; font-size: 17px; line-height: 1.6; }
.slide .table th { color: #6b6a72; }
.deck__nav { display: flex; align-items: center; gap: 16px; padding: 14px clamp(16px, 3vw, 36px); border-top: 1px solid #222; }
.deck__prev { color: #c9c8ce; }
.deck__prev .icon { transform: rotate(180deg); }
.deck__prev:hover { background: #1c1c21; color: #fff; }
.deck__prev[disabled] { opacity: .25; }
.deck__hint { font-size: 12.5px; color: #77767d; margin-left: auto; }
.deck__counter { font-size: 13px; color: #c9c8ce; font-variant-numeric: tabular-nums; }
.deck__next { min-width: 150px; }
.deck.is-saving .slide.is-active, .deck.is-saving .deck__nav { opacity: .6; pointer-events: none; transition: opacity .15s; }
@media (max-width: 980px) {
  .deck__steps { display: none; }
  .deck__title { max-width: none; flex: 1; }
  .deck__hint { display: none; }
  .deck__counter { margin-left: auto; }
  .slide .twocol { grid-template-columns: minmax(0, 1fr); }
  .slide .panel { padding: 18px; }
}

.pt-0 { padding-top: 0 !important; } .pb-0 { padding-bottom: 0 !important; }

/* ================================================================ Demo-Button & Overlay */
.demobtn { display: flex; align-items: center; gap: 10px; background: transparent; border: 1px solid #3a3a40; color: var(--white); font: inherit; padding: 5px 12px 5px 6px; cursor: pointer; align-self: center; flex: none; max-width: 260px; }
.demobtn:hover { border-color: var(--red); }
.demobtn__tag { background: var(--red); color: var(--white); font-size: 10.5px; font-weight: 700; letter-spacing: .14em; text-transform: uppercase; padding: 4px 7px; }
.demobtn__text { display: flex; flex-direction: column; line-height: 1.2; text-align: left; font-size: 13px; font-weight: 600; min-width: 0; }
.demobtn__text, .demobtn__text small { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demobtn__text small { font-size: 11px; color: var(--soft); font-weight: 400; }
.demo-overlay { position: fixed; inset: 0; z-index: 120; display: flex; align-items: flex-start; justify-content: center; padding: 72px 16px 24px; overflow-y: auto; }
.demo-overlay[hidden] { display: none; }
.demo-overlay__backdrop { position: fixed; inset: 0; background: rgba(0,0,0,.6); animation: fade .15s; }
.demo-overlay__panel { position: relative; background: var(--surface-strong); width: min(880px, 100%); padding: 32px 32px 28px; box-shadow: var(--shadow); animation: toastin .2s ease-out; border-top: 3px solid var(--red); }
.demo-overlay__panel h2 { margin-bottom: 6px; }
.demo-overlay__cols { display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); gap: 28px; margin-top: 20px; }
.demo-overlay__h { font-size: 12px; letter-spacing: .14em; text-transform: uppercase; color: var(--muted); margin-bottom: 8px; }
.demo-list { list-style: none; margin: 0; padding: 0; display: flex; flex-direction: column; gap: 4px; }
.demo-opt { width: 100%; display: flex; align-items: center; gap: 12px; padding: 8px 10px; background: var(--surface-strong); border: 1px solid var(--line-soft); font: inherit; color: inherit; cursor: pointer; text-align: left; }
.demo-opt:hover, .demo-opt:focus-visible { border-color: var(--ink); outline: none; }
.demo-opt > span:not(.avatar):not(.demo-opt__ico) { display: flex; flex-direction: column; min-width: 0; flex: 1; line-height: 1.25; }
.demo-opt b { font-size: 14.5px; }
.demo-opt small { font-size: 12px; color: var(--muted); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.demo-opt.is-active { border-color: var(--ink); background: var(--stage); }
.demo-opt.is-active > .icon { color: var(--red); }
.demo-opt__ico { width: 34px; height: 34px; display: inline-flex; align-items: center; justify-content: center; background: var(--stage); flex: none; }
@media (max-width: 980px) {
  .demobtn { order: 1; margin-left: auto; padding: 4px 8px 4px 4px; max-width: 46vw; }
  .navtoggle { margin-left: 8px; }
}
@media (max-width: 640px) {
  .demobtn__text small { display: none; }
  .demo-overlay { padding-top: 16px; }
  .demo-overlay__panel { padding: 24px 18px; }
  .demo-overlay__cols { grid-template-columns: minmax(0, 1fr); gap: 20px; }
}
@media (min-width: 981px) and (max-width: 1320px) {
  .demobtn { padding: 4px; }
  .demobtn__text { display: none; }
  .mainnav__item { padding: 0 9px; }
  .topbar__inner { gap: 18px; }
}

.table--compact th, .table--compact td { padding: 8px 10px; }
.table--compact th:first-child, .table--compact td:first-child { padding-left: 0; }
.table--compact th:last-child, .table--compact td:last-child { padding-right: 0; }

/* Untertabelle (z.B. Dimensionen je Projektfeedback) – modulübergreifend */
.table .fb-sub { width: 100%; border-collapse: collapse; font-size: 13.5px; margin: 4px 0 6px; }
.table .fb-sub th, .table .fb-sub th:first-child, .table .fb-sub th:last-child {
  padding: 6px 10px 6px 0; font-size: 10.5px; border-bottom: 1px solid var(--line); color: var(--muted); background: none; }
.table .fb-sub td, .table .fb-sub td:first-child, .table .fb-sub td:last-child {
  padding: 8px 10px 8px 0; border-bottom: 1px solid var(--line-soft); background: none; vertical-align: top; }
.table .fb-sub tr:last-child td { border-bottom: 0; }
.table tbody .fb-sub tr:hover td { background: none; }
.table .fb-sub .scale { min-width: 46px; font-size: 12.5px; padding: 2px 6px; }
.table .fb-sub tfoot td { border-top: 1px solid var(--line); border-bottom: 0; font-weight: 700; }


/* ================================================================ Glass-Theme (Overrides) */
body {
  background-color: #dcdce2;
  background-image:
    radial-gradient(760px 560px at 96% 6%, rgba(213,0,28,.30), transparent 64%),
    radial-gradient(900px 700px at 62% 46%, rgba(255,255,255,.75), transparent 60%),
    radial-gradient(1100px 820px at -4% 104%, rgba(34,38,52,.48), transparent 62%),
    radial-gradient(700px 520px at 100% 100%, rgba(110,116,134,.38), transparent 64%),
    radial-gradient(800px 600px at 0% 0%, rgba(255,255,255,.9), transparent 60%),
    linear-gradient(160deg, #f2f2f5 0%, #d6d6dd 100%);
  background-attachment: fixed;
}
.topbar { background: rgba(8, 8, 12, .8); -webkit-backdrop-filter: blur(18px) saturate(140%); backdrop-filter: blur(18px) saturate(140%); border-bottom: 1px solid rgba(255,255,255,.08); }
.footer { border-top-color: rgba(20,20,32,.08); }
.subnav { border-bottom-color: rgba(20,20,32,.12); }

/* Flächen */
.card, .kpi, .tcard, .orgarea, .demo-overlay__panel, .confirm-dialog__box {
  background: var(--surface); border: 1px solid var(--glass-border); border-radius: var(--radius);
  -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); box-shadow: var(--glass-shadow);
}
.card { overflow: hidden; }
.card--stage { background: var(--surface-soft); border-color: rgba(255,255,255,.55); }
.card--dark { background: rgba(10, 10, 14, .82); border-color: rgba(255,255,255,.1); }
.card--accent { border-top: 3px solid var(--red); }
.card__foot { border-top-color: rgba(20,20,32,.07); }
.kpis { background: transparent; border: 0; gap: 12px; }
a.kpi:hover, .tcard:hover { background: var(--surface-strong); border-color: rgba(255,255,255,.95); box-shadow: inset 0 1px 0 rgba(255,255,255,.8), 0 16px 40px rgba(18,18,30,.12); }
.tcard { overflow: hidden; }

/* Tabellen & Listen */
.table tbody tr:hover td { background: rgba(255,255,255,.45); }
.table td { border-bottom-color: rgba(20,20,32,.07); }
tr.expand-row > td { background: rgba(255,255,255,.4); }
.todo, .list > li { border-top-color: rgba(20,20,32,.07); }
.todo__icon, .empty__icon, .demo-opt__ico { border-radius: var(--radius-sm); }

/* Bedienelemente */
.btn { border-radius: var(--radius-sm); border-width: 1.5px; background: rgba(255,255,255,.55); }
.btn--primary { background: var(--ink); }
.btn--red { background: var(--red); }
.btn--ghost { background: transparent; }
.btn--ghost:hover { background: rgba(255,255,255,.55); }
input[type=text], input[type=email], input[type=number], input[type=date], input[type=datetime-local], input[type=search], input[type=tel], select, textarea {
  background-color: rgba(255,255,255,.72); border: 1.5px solid rgba(20,20,32,.14); border-radius: var(--radius-sm);
}
input:focus, select:focus, textarea:focus { border-color: var(--ink); box-shadow: 0 0 0 3px rgba(20,20,32,.07); }
.scaleinput, .choice { border: 1.5px solid rgba(20,20,32,.14); border-radius: var(--radius-sm); overflow: hidden; background: rgba(255,255,255,.55); }
.scaleinput label, .choice label { border-left-color: rgba(20,20,32,.1); }
.chip, .scale { border-radius: var(--radius-sm); }
.chip--outline { background: rgba(255,255,255,.6); }
.notice { border-radius: var(--radius-sm); -webkit-backdrop-filter: blur(10px); backdrop-filter: blur(10px); }
.notice--info { background: rgba(230, 237, 249, .78); }
.notice--success { background: rgba(227, 243, 233, .8); }
.notice--warning { background: rgba(253, 241, 223, .82); }
.notice--danger { background: rgba(251, 229, 232, .82); }
.picker__list { border-radius: 0 0 var(--radius-sm) var(--radius-sm); background: rgba(255,255,255,.94); -webkit-backdrop-filter: var(--glass-blur); backdrop-filter: var(--glass-blur); }
.datebox { border-radius: var(--radius-sm); background: rgba(255,255,255,.55); }
.slot { border-radius: var(--radius-sm); }
.bar { border-radius: 3px; overflow: hidden; background: rgba(20,20,32,.08); }

/* Stepper: Linie auf Höhe der Punkte, Text darunter (funktioniert auf transparenten Flächen) */
.stepper__step { flex-direction: column; gap: 8px; }
.stepper__step::after { left: 40px; right: 8px; }
.stepper__text, .card--stage .stepper__text { background: transparent; padding-top: 0; }
.stepper__dot { background: rgba(255,255,255,.85); }

/* Overlays */
.modal__backdrop, .confirm-dialog, .demo-overlay__backdrop { background: rgba(10, 10, 16, .38); -webkit-backdrop-filter: blur(4px); backdrop-filter: blur(4px); }
.modal__dialog { background: rgba(250, 250, 252, .84); -webkit-backdrop-filter: blur(30px) saturate(170%); backdrop-filter: blur(30px) saturate(170%); border-left: 1px solid rgba(255,255,255,.8); }
.confirm-dialog__box, .demo-overlay__panel { background: rgba(250, 250, 252, .88); }
.demo-overlay__panel { border-top: 3px solid var(--red); }
.demo-opt { background: rgba(255,255,255,.6); border-color: rgba(20,20,32,.08); border-radius: var(--radius-sm); }
.demo-opt.is-active { background: rgba(255,255,255,.95); border-color: var(--ink); }
.toast { background: rgba(10, 10, 14, .86); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-radius: var(--radius-sm); }
.toast--error { background: rgba(213, 0, 28, .92); }
.demobtn { border-radius: var(--radius-sm); background: rgba(255,255,255,.05); }
.demobtn__tag { border-radius: 3px; }

/* Talent-Matrix */
.ninebox { gap: 8px; }
.nb-cell { border-radius: var(--radius-sm); background: rgba(255,255,255,.42); border: 1px solid rgba(255,255,255,.6); -webkit-backdrop-filter: blur(14px); backdrop-filter: blur(14px); }
.nb-cell[data-score="5"] { background: rgba(255,255,255,.62); }
.nb-cell[data-score="4"] { background: rgba(255,255,255,.52); }
.nb-cell[data-score="6"] { background: rgba(12, 12, 16, .84); border-color: rgba(255,255,255,.1); }
.nb-person { border-radius: 3px; background: rgba(255,255,255,.88); border-color: rgba(20,20,32,.1); }

/* Organigramm */
.orgarea { overflow: hidden; }
.orgarea__head { background: rgba(10, 10, 14, .86); }
.orgpartner { background: rgba(255,255,255,.4); border-color: rgba(20,20,32,.08); border-radius: var(--radius-sm); overflow: hidden; }
.orgpartner__head { background: rgba(255,255,255,.7); border-bottom-color: rgba(20,20,32,.06); }
.orgcard { background: rgba(255,255,255,.75); border-color: rgba(20,20,32,.06); border-radius: 3px; }
.matrix th { background: transparent; }
.matrix th, .matrix td { border-color: rgba(20,20,32,.08); }

/* Präsentationsmodus: dunkles Glas */
.deck-body, .deck {
  background-color: #08080b;
  background-image:
    radial-gradient(900px 600px at 105% -10%, rgba(213,0,28,.22), transparent 60%),
    radial-gradient(1000px 700px at -10% 110%, rgba(90,100,140,.18), transparent 60%),
    radial-gradient(700px 500px at 50% 50%, rgba(255,255,255,.03), transparent 70%);
}
.deck__bar { background: rgba(255,255,255,.03); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-bottom-color: rgba(255,255,255,.08); }
.deck__nav { background: rgba(255,255,255,.03); -webkit-backdrop-filter: blur(16px); backdrop-filter: blur(16px); border-top-color: rgba(255,255,255,.08); }
.deck__progress { background: rgba(255,255,255,.08); }
.slide { background: transparent; }
.slide .panel { background: rgba(255,255,255,.9); border: 1px solid rgba(255,255,255,.9); border-radius: var(--radius); -webkit-backdrop-filter: blur(24px); backdrop-filter: blur(24px); box-shadow: 0 20px 50px rgba(0,0,0,.35); }
.slide .panel--dark { background: rgba(255,255,255,.06); border: 1px solid rgba(255,255,255,.12); color: var(--white); box-shadow: inset 0 1px 0 rgba(255,255,255,.08); }
@media (max-width: 980px) {
  .topbar__inner { flex-wrap: wrap; align-items: center; }
  .brand { min-height: 56px; }
}
@media (max-width: 640px) {
  .demobtn { padding: 4px; }
  .demobtn__text { display: none; }
}
