/* KlareProzesse Partnerportal – CI: #023055 / #003D6E / #E4FC57 / Weiß, Schrift Exo 2 (lokal eingebunden) */

@font-face {
  font-family: 'Exo 2';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(../assets/fonts/exo2-latin-ext.woff2) format('woff2');
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C4, U+2113, U+2C60-2C7F, U+A720-A7FF;
}
@font-face {
  font-family: 'Exo 2';
  font-style: normal;
  font-weight: 300 800;
  font-display: swap;
  src: url(../assets/fonts/exo2-latin.woff2) format('woff2');
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD;
}

:root {
  --navy: #023055;
  --navy-2: #003D6E;
  --lime: #E4FC57;
  --white: #FFFFFF;
  --bg: #F5F7F9;
  --line: #E1E6EB;
  --line-2: #EEF1F4;
  --text: #13253A;
  --muted: #627181;
  --ok: #1D6E47;
  --ok-bg: #E6F2EB;
  --warn: #7A5200;
  --warn-bg: #FBF1DC;
  --bad: #9B2C2C;
  --bad-bg: #FAE9E9;
  --radius: 8px;
  --font: 'Exo 2', Arial, sans-serif;
}

* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body { font-family: var(--font); color: var(--text); background: var(--bg); font-size: 14px; line-height: 1.5; -webkit-font-smoothing: antialiased; }
h1, h2, h3, h4 { color: var(--navy); margin: 0 0 .4em; line-height: 1.25; font-weight: 600; }
h1 { font-size: 22px; }
h2 { font-size: 16px; }
h3 { font-size: 14px; }
p { margin: 0 0 .8em; }
a { color: var(--navy-2); }
small, .muted { color: var(--muted); }
.hidden { display: none !important; }
code { font-size: 13px; background: var(--line-2); padding: 1px 5px; border-radius: 4px; }

/* ---------- Layout ---------- */
.app { display: grid; grid-template-columns: 232px minmax(0, 1fr); min-height: 100vh; }
.sidebar { background: var(--navy); color: var(--white); padding: 22px 12px 16px; display: flex; flex-direction: column; position: sticky; top: 0; height: 100vh; }
.sidebar .logo { width: 140px; margin: 2px 10px 26px; display: block; }
.nav { display: flex; flex-direction: column; gap: 1px; }
.nav a { display: flex; align-items: center; gap: 10px; color: rgba(255,255,255,.72); text-decoration: none; padding: 8px 10px; border-radius: 6px; font-weight: 500; position: relative; }
.nav a svg { opacity: .8; }
.nav a:hover { color: var(--white); background: rgba(255,255,255,.05); }
.nav a.active { color: var(--white); background: rgba(255,255,255,.08); }
.nav a.active::before { content: ''; position: absolute; left: -12px; top: 8px; bottom: 8px; width: 3px; border-radius: 0 3px 3px 0; background: var(--lime); }
.nav .count { margin-left: auto; font-size: 12px; font-weight: 600; color: var(--navy); background: var(--lime); border-radius: 10px; padding: 0 7px; line-height: 18px; }
.sidebar .spacer { flex: 1; }
.sidebar .me { border-top: 1px solid rgba(255,255,255,.1); padding: 12px 10px 0; display: flex; align-items: center; gap: 10px; font-size: 13px; }
.sidebar .me a.who { flex: 1; min-width: 0; color: inherit; text-decoration: none; }
.sidebar .me .who strong { display: block; color: var(--white); font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.sidebar .me .who span { color: rgba(255,255,255,.6); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; display: block; font-size: 12px; }
.sidebar .me button { background: transparent; border: none; color: rgba(255,255,255,.7); padding: 6px; border-radius: 6px; cursor: pointer; }
.sidebar .me button:hover { color: var(--white); background: rgba(255,255,255,.08); }

.main { padding: 28px 36px 48px; max-width: 1240px; width: 100%; min-width: 0; }
.topbar { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; margin-bottom: 20px; }
.topbar h1 { margin: 0; }
.topbar .sub { color: var(--muted); margin: 4px 0 0; }
.topbar .actions { display: flex; gap: 8px; align-items: center; flex-wrap: wrap; }
.back { display: inline-block; font-size: 13px; text-decoration: none; color: var(--muted); margin-bottom: 8px; }
.back:hover { color: var(--navy); }

.impersonation { background: var(--white); border: 1px solid var(--line); border-left: 3px solid var(--lime); color: var(--text); padding: 9px 14px; border-radius: 6px; margin-bottom: 20px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-size: 13px; }

/* ---------- Cards & Grid ---------- */
.grid { display: grid; gap: 16px; }
.grid.cols-2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.cols-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.cols-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.side { grid-template-columns: minmax(0, 1.75fr) minmax(0, 1fr); align-items: start; }
.mt { margin-top: 16px; }
.card { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 18px 20px; }
.card.flush { padding: 0; overflow: hidden; }
.card-head { display: flex; align-items: center; justify-content: space-between; gap: 12px; margin-bottom: 12px; }
.card.flush > .card-head { padding: 14px 20px 0; margin-bottom: 10px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .link { font-size: 13px; text-decoration: none; font-weight: 500; }
.card-head .link:hover { text-decoration: underline; }
.stack > * + * { margin-top: 16px; }
.divider { border: 0; border-top: 1px solid var(--line-2); margin: 14px 0; }

/* Kennzahlen-Leiste */
.stats { display: grid; grid-auto-flow: column; grid-auto-columns: minmax(0, 1fr); background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.stats .stat { padding: 14px 18px; border-left: 1px solid var(--line-2); }
.stats .stat:first-child { border-left: none; }
.stat .label { font-size: 12px; color: var(--muted); }
.stat .value { font-size: 22px; font-weight: 600; color: var(--navy); line-height: 1.3; font-variant-numeric: tabular-nums; }
.stat .hint { font-size: 12px; color: var(--muted); }
.stat.accent .value::after { content: ''; display: inline-block; width: 8px; height: 8px; border-radius: 50%; background: var(--lime); border: 1px solid #C9E03A; margin-left: 8px; vertical-align: 4px; }
.stats-wrap { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); }
.stats-wrap .stats { border: none; border-radius: 0; }

/* einfache Kennzahl in einer Karte */
.kpi { display: flex; flex-direction: column; gap: 2px; }
.kpi .label { font-size: 12px; color: var(--muted); }
.kpi .value { font-size: 22px; font-weight: 600; color: var(--navy); }
.kpi .hint { font-size: 12px; color: var(--muted); }

/* Credit-Balken */
.meter { height: 6px; border-radius: 3px; background: var(--line-2); overflow: hidden; display: flex; }
.meter span { display: block; height: 100%; }
.meter .used { background: var(--navy); }
.meter .reserved { background: #8FA8BF; }
.meter .free { background: var(--lime); }
.legend { display: flex; gap: 16px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 8px; }
.legend i { display: inline-block; width: 8px; height: 8px; border-radius: 2px; margin-right: 6px; }
.meter-row { padding: 12px 18px 14px; border-top: 1px solid var(--line-2); }

/* Hinweisleiste */
.notice { display: flex; align-items: center; justify-content: space-between; gap: 16px; background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 12px 18px; }
.notice p { margin: 0; }

/* ---------- Buttons ---------- */
.btn { font-family: var(--font); font-size: 13px; font-weight: 600; display: inline-flex; align-items: center; justify-content: center; gap: 6px; height: 34px; padding: 0 14px; border-radius: 6px; border: 1px solid transparent; cursor: pointer; text-decoration: none; white-space: nowrap; transition: background .12s, border-color .12s; }
.btn-primary, .btn-accent { background: var(--navy); color: var(--white); }
.btn-primary:hover, .btn-accent:hover { background: var(--navy-2); }
.btn-ghost { background: var(--white); color: var(--navy); border-color: var(--line); }
.btn-ghost:hover { border-color: #C3CCD5; background: #FAFBFC; }
.btn-danger { background: var(--white); color: var(--bad); border-color: #EBCFCF; }
.btn-link { background: none; border: none; color: var(--navy-2); padding: 0; height: auto; font-weight: 500; }
.btn-link:hover { text-decoration: underline; }
.btn-sm { height: 28px; padding: 0 10px; font-size: 12px; }
.btn-block { width: 100%; }
.btn[disabled] { opacity: .45; cursor: not-allowed; }

/* ---------- Forms ---------- */
.form { display: grid; gap: 14px; }
.form .row { display: grid; grid-template-columns: 1fr 1fr; gap: 14px; }
label.field, .field-label { display: block; font-size: 13px; font-weight: 500; color: var(--text); }
label.field > input, label.field > select, label.field > textarea { display: block; margin-top: 5px; }
label.field > .copybox { margin-top: 5px; }
label.field .opt { font-weight: 400; color: var(--muted); margin-left: 4px; }
input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=search], select, textarea {
  font-family: var(--font); font-size: 14px; color: var(--text); border: 1px solid #D4DBE2; border-radius: 6px; padding: 7px 10px; background: var(--white); width: 100%; height: 36px;
}
textarea { min-height: 84px; height: auto; resize: vertical; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--navy-2); box-shadow: 0 0 0 3px rgba(0, 61, 110, .12); }
input[disabled] { background: var(--bg); color: var(--muted); }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: 13px; color: var(--text); line-height: 1.45; }
.check input { margin-top: 2px; width: 15px; height: 15px; accent-color: var(--navy); flex: none; }
.form-error { background: var(--bad-bg); color: var(--bad); padding: 9px 12px; border-radius: 6px; font-size: 13px; }
.form-note { background: var(--bg); padding: 9px 12px; border-radius: 6px; font-size: 13px; color: var(--muted); }

/* ---------- Tables ---------- */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; font-size: 13px; }
th { text-align: left; font-weight: 500; color: var(--muted); font-size: 12px; padding: 9px 16px; border-bottom: 1px solid var(--line); background: #FAFBFC; white-space: nowrap; }
td { padding: 11px 16px; border-bottom: 1px solid var(--line-2); vertical-align: middle; }
td > select, td > input { height: 30px; font-size: 13px; padding: 4px 8px; }
tr:last-child td { border-bottom: none; }
tr.clickable { cursor: pointer; }
tr.clickable:hover td { background: #F8FAFB; }
td .strong, .strong { font-weight: 600; color: var(--text); }
td small { display: block; }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
table.plain td { padding: 8px 0; border-bottom: 1px solid var(--line-2); }
table.plain tr:last-child td { border-bottom: none; }
table.plain td:last-child { text-align: right; white-space: nowrap; }

/* Vergleichstabelle */
table.compare th, table.compare td { text-align: center; vertical-align: middle; }
table.compare th:first-child, table.compare td:first-child { text-align: left; color: var(--muted); }
table.compare thead th { font-size: 13px; font-weight: 600; color: var(--navy); padding: 12px 16px; vertical-align: bottom; }
table.compare thead th.featured { background: var(--navy); color: var(--white); }
table.compare thead small { display: block; font-weight: 400; font-size: 11px; color: var(--muted); }
table.compare thead th.featured small { color: rgba(255,255,255,.7); }
table.compare td.featured { background: #FAFBFD; }
table.compare .yes { color: var(--navy); }
table.compare .no { color: #C3CBD3; }

/* ---------- Status ---------- */
.badge { display: inline-block; font-size: 12px; font-weight: 500; padding: 0 8px; border-radius: 4px; white-space: nowrap; background: var(--line-2); color: var(--text); line-height: 22px; flex: none; align-self: flex-start; }
.badge.s-neu, .badge.s-kontakt { background: #EAF0F6; color: var(--navy-2); }
.badge.s-termin { background: var(--warn-bg); color: var(--warn); }
.badge.s-gewonnen { background: var(--ok-bg); color: var(--ok); }
.badge.s-verloren { background: var(--line-2); color: var(--muted); }
.badge.s-doppelt { background: var(--bad-bg); color: var(--bad); }
.badge.lime { background: var(--lime); color: var(--navy); }

.steps { display: grid; grid-template-columns: repeat(5, 1fr); gap: 3px; width: 120px; margin-top: 7px; }
.steps .step { height: 3px; border-radius: 2px; background: var(--line); }
.steps .step.done { background: var(--navy); }
.steps .step.won { background: var(--ok); }
.steps .step.lost { background: #B8C1CA; }

/* Projektplan */
.plan { list-style: none; margin: 0; padding: 0; }
.plan li { display: grid; grid-template-columns: 16px minmax(0, 1fr) auto 44px; gap: 12px; align-items: center; padding: 7px 0; border-bottom: 1px solid var(--line-2); }
.plan li:last-child { border-bottom: none; }
.plan .mark { width: 14px; height: 14px; border-radius: 50%; border: 1.5px solid #B8C4CF; display: grid; place-items: center; }
.plan li.done .mark { background: var(--navy); border-color: var(--navy); color: var(--white); }
.plan li.active .mark { border-color: var(--navy); }
.plan li.active .mark::after { content: ''; width: 6px; height: 6px; border-radius: 50%; background: var(--navy); }
.plan .title { font-weight: 500; }
.plan li.done .title { color: var(--navy); }
.plan .title { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.plan-ideas { display: block; margin-top: 10px; }
.plan li.next .mark { background: var(--lime); border-color: #C9E03A; }
.plan li.next .title { color: var(--navy); font-weight: 600; }
.filter-row { margin-bottom: 14px; }
.plan .meta { font-size: 12px; color: var(--muted); }
.plan .cr { text-align: right; font-size: 12px; color: var(--muted); font-variant-numeric: tabular-nums; }

.funnel { display: grid; gap: 8px; }
.funnel .f-row { display: grid; grid-template-columns: 140px 1fr 32px; gap: 12px; align-items: center; font-size: 13px; }
.funnel .f-bar { height: 8px; background: var(--line-2); border-radius: 4px; overflow: hidden; }
.funnel .f-bar span { display: block; height: 100%; background: var(--navy); border-radius: 4px; min-width: 2px; }
.funnel .f-row.won .f-bar span { background: var(--ok); }
.funnel .f-row.lost .f-bar span { background: #B8C1CA; }
.funnel .f-val { text-align: right; font-weight: 600; font-variant-numeric: tabular-nums; }

/* Sterne */
.stars { display: inline-flex; gap: 4px; }
.stars button { background: none; border: none; cursor: pointer; padding: 1px; color: #D0D8E0; }
.stars button.on { color: var(--navy); }
.stars button svg { width: 24px; height: 24px; }
.stars.small { gap: 1px; color: var(--navy); vertical-align: -2px; }

/* Termine */
.days { display: grid; gap: 8px; }
.day { display: grid; grid-template-columns: 84px 1fr; gap: 10px; align-items: center; }
.day .d { font-size: 13px; color: var(--muted); }
.day .times { display: flex; gap: 6px; flex-wrap: wrap; }
.slot { font-family: var(--font); font-size: 13px; height: 30px; padding: 0 12px; border-radius: 6px; border: 1px solid var(--line); background: var(--white); cursor: pointer; color: var(--text); }
.slot:hover { border-color: var(--navy); }
.slot.selected { background: var(--navy); border-color: var(--navy); color: var(--white); }

.avatar { width: 32px; height: 32px; border-radius: 50%; background: rgba(255,255,255,.14); color: var(--white); display: grid; place-items: center; font-weight: 600; font-size: 12px; flex: none; }
.avatar.light { background: var(--line-2); color: var(--navy); }
.person { display: flex; gap: 12px; align-items: center; }
.person strong { display: block; }

/* Listen */
.feed { list-style: none; margin: 0; padding: 0; }
.feed li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid var(--line-2); font-size: 13px; align-items: flex-start; }
.feed li:last-child { border-bottom: none; }
.feed .when { color: var(--muted); font-size: 12px; white-space: nowrap; margin-left: auto; padding-left: 8px; }
.feed .ic { color: var(--muted); flex: none; margin-top: 1px; }
.feed .dot { width: 6px; height: 6px; border-radius: 50%; flex: none; margin-top: 7px; }
.feed li.unread .dot { background: var(--navy); }
ul.bullets { margin: 0; padding-left: 18px; display: grid; gap: 5px; color: var(--muted); font-size: 13px; }

.copybox { display: flex; gap: 6px; }
.copybox input { color: var(--text); background: var(--bg); font-size: 13px; }

.toolbar { display: flex; gap: 10px; align-items: center; flex-wrap: wrap; padding: 12px 16px; border-bottom: 1px solid var(--line); }
.toolbar input[type=search] { max-width: 240px; }
.toolbar select { width: auto; }
.chips { display: flex; gap: 4px; flex-wrap: wrap; }
.chip { font-family: var(--font); font-size: 12px; height: 28px; padding: 0 10px; border-radius: 6px; border: 1px solid transparent; background: none; color: var(--muted); cursor: pointer; font-weight: 500; display: inline-flex; align-items: center; }
.chip:hover { color: var(--text); background: var(--line-2); }
.chip.active { background: var(--line-2); color: var(--navy); border-color: var(--line); }

.empty { text-align: center; padding: 28px 20px; color: var(--muted); font-size: 13px; }

/* ---------- Modal ---------- */
.modal-backdrop { position: fixed; inset: 0; background: rgba(10, 25, 40, .45); display: grid; place-items: center; z-index: 50; padding: 20px; }
.modal { background: var(--white); border-radius: 10px; width: 100%; max-width: 560px; max-height: 90vh; overflow: auto; box-shadow: 0 12px 40px rgba(0,0,0,.18); }
.modal.wide { max-width: 760px; }
.modal-head { padding: 16px 20px; border-bottom: 1px solid var(--line); display: flex; justify-content: space-between; align-items: center; gap: 12px; }
.modal-head h2 { margin: 0; }
.modal-body { padding: 18px 20px; }
.modal-foot { padding: 12px 20px; border-top: 1px solid var(--line); display: flex; justify-content: flex-end; gap: 8px; }
.icon-btn { background: none; border: none; cursor: pointer; color: var(--muted); padding: 5px; border-radius: 6px; }
.icon-btn:hover { background: var(--line-2); color: var(--navy); }

dl.kv { display: grid; grid-template-columns: 150px 1fr; gap: 7px 14px; margin: 0; font-size: 13px; }
dl.kv dt { color: var(--muted); }
dl.kv dd { margin: 0; }

.toasts { position: fixed; bottom: 20px; right: 20px; display: grid; gap: 8px; z-index: 60; }
.toast { background: var(--text); color: var(--white); padding: 10px 14px; border-radius: 6px; box-shadow: 0 6px 20px rgba(0,0,0,.18); display: flex; gap: 8px; align-items: center; max-width: 360px; font-size: 13px; }

/* ---------- Login / öffentlich ---------- */
.auth { min-height: 100vh; display: grid; grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.auth-brand { background: var(--navy); color: var(--white); padding: 40px 48px; display: flex; flex-direction: column; }
.auth-brand .logo { width: 170px; }
.auth-brand .claim { margin-top: auto; max-width: 420px; }
.auth-brand h1 { color: var(--white); font-size: 26px; font-weight: 600; }
.auth-brand p { color: rgba(255,255,255,.72); font-size: 15px; }
.auth-brand .foot { font-size: 12px; color: rgba(255,255,255,.5); margin-top: 40px; }
.auth-form { display: grid; place-items: center; padding: 40px; background: var(--white); }
.auth-form .inner { width: 100%; max-width: 360px; }
.auth-form h2 { font-size: 20px; }
.auth-links { display: flex; justify-content: space-between; font-size: 13px; }
.demo-box { margin-top: 28px; border-top: 1px solid var(--line); padding-top: 16px; font-size: 13px; color: var(--muted); }
.demo-box .btns { display: flex; flex-wrap: wrap; gap: 6px; margin: 8px 0; }

.public { min-height: 100vh; background: var(--bg); }
.public-head { background: var(--navy); padding: 16px 32px; display: flex; align-items: center; justify-content: space-between; }
.public-head .logo { width: 140px; }
.public-head a { color: rgba(255,255,255,.75); font-size: 13px; text-decoration: none; }
.public-wrap { max-width: 960px; margin: 0 auto; padding: 40px 24px 60px; }
.public-wrap .eyebrow { font-size: 13px; color: var(--muted); margin-bottom: 6px; }
.public-wrap h1 { font-size: 28px; }

/* ---------- Responsive ---------- */
@media (max-width: 1100px) {
  .grid.cols-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.cols-3 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .grid.side { grid-template-columns: 1fr; }
}
@media (max-width: 860px) {
  .app { grid-template-columns: 1fr; }
  .sidebar { position: static; height: auto; }
  .nav { flex-direction: row; flex-wrap: wrap; }
  .nav a.active::before { display: none; }
  .sidebar .spacer { display: none; }
  .main { padding: 18px; }
  .grid.cols-2, .grid.cols-3, .grid.cols-4 { grid-template-columns: 1fr; }
  .stats { grid-auto-flow: row; grid-template-columns: 1fr 1fr; }
  .stats .stat:nth-child(odd) { border-left: none; }
  .form .row { grid-template-columns: 1fr; }
  .auth { grid-template-columns: 1fr; }
  .auth-brand { padding: 28px; }
  .auth-brand .claim { margin-top: 28px; }
  .topbar { flex-direction: column; align-items: flex-start; }
}

/* Microsoft-Anmeldung */
.ms-btn { height: 40px; font-size: 14px; color: var(--text); }
.ms-btn svg { flex: none; }
.or { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12px; margin: 18px 0 14px; }
.or::before, .or::after { content: ''; flex: 1; border-top: 1px solid var(--line); }

/* Schulungen */
.videos { display: grid; gap: 16px; }
.video { display: grid; grid-template-columns: minmax(0, 1fr); }
.video .player { background: #0B1B2B; border-radius: 6px; overflow: hidden; margin-top: 12px; }
.video video { display: block; width: 100%; max-height: 520px; background: #0B1B2B; }
.video .meta-row { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12px; color: var(--muted); margin-top: 2px; }
.video .desc { white-space: pre-line; font-size: 13px; color: var(--text); margin: 10px 0 0; }
.video .actions { display: flex; gap: 8px; flex-wrap: wrap; margin-top: 12px; }
.progress { height: 6px; background: var(--line-2); border-radius: 3px; overflow: hidden; }
.progress span { display: block; height: 100%; width: 0; background: var(--navy); transition: width .2s; }
button, input, select, textarea { font-family: inherit; }
.card .videos { gap: 0; }
.card .videos .card { border: none; border-top: 1px solid var(--line-2); border-radius: 0; padding: 14px 0; }
.card .videos .card:first-child { border-top: none; padding-top: 0; }

/* Upload */
.dropzone { border: 1.5px dashed #C3CDD7; border-radius: 8px; padding: 22px; text-align: center; display: grid; gap: 4px; cursor: pointer; background: #FAFBFC; transition: background .12s, border-color .12s; }
.dropzone strong { color: var(--navy); font-weight: 600; }
.dropzone span { font-size: 13px; }
.dropzone.over { border-color: var(--navy); background: #EEF3F8; }
.dropzone.has-file { border-style: solid; border-color: var(--navy); background: #F3F7FA; }
.dropzone.big { padding: 34px; background: var(--white); }
details.alt summary { cursor: pointer; font-size: 13px; color: var(--navy-2); }

/* Weitere Zusammenarbeit */
.notice-accent { border-left: 3px solid var(--lime); }
.btn-lime { background: var(--lime); color: var(--navy); }
.btn-lime:hover { background: #D8F03E; }
.gap { padding: 22px 24px; }
.gap-head { display: flex; justify-content: space-between; gap: 20px; align-items: flex-start; }
.gap-num { text-align: right; line-height: 1; }
.gap-num strong { display: block; font-size: 40px; font-weight: 700; color: var(--navy); }
.gap-num span { font-size: 12px; color: var(--muted); }
.gap-bar { height: 8px; border-radius: 4px; background: #E9EEF3; margin: 16px 0 6px; overflow: hidden; }
.gap-bar .done { display: block; height: 100%; background: var(--navy); }
.gap-legend { display: flex; justify-content: space-between; font-size: 12px; color: var(--muted); }
.ideas { list-style: none; margin: 16px 0 0; padding: 0; display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 6px 24px; font-size: 13px; }
.ideas li { padding-left: 16px; position: relative; }
.ideas li::before { content: ''; position: absolute; left: 0; top: 7px; width: 7px; height: 7px; border-radius: 50%; border: 1.5px solid #9DB0C2; }

.pkgs { display: grid; grid-template-columns: 1fr 1.12fr 1fr; gap: 16px; align-items: stretch; padding: 8px 0; }
.pkg { background: var(--white); border: 1px solid var(--line); border-radius: var(--radius); padding: 20px; display: flex; flex-direction: column; }
.pkg.current { background: #FAFBFC; }
.pkg.current h3, .pkg.current .pkg-credits strong { color: var(--muted); }
.pkg-top { height: 24px; margin-bottom: 10px; }
.pkg .outline-badge { background: none; }
.pkg h3 { font-size: 15px; margin: 0 0 8px; }
.pkg-credits { font-size: 14px; color: var(--muted); }
.pkg-credits strong { font-size: 32px; font-weight: 700; color: var(--navy); margin-right: 4px; }
.pkg-sub { font-size: 12px; color: var(--muted); margin-top: 2px; }
.pkg-value { margin: 14px 0; padding: 10px 12px; background: var(--bg); border-radius: 6px; font-size: 13px; }
.pkg-value strong { font-weight: 700; color: var(--navy); }
.pkg-value small { display: block; color: var(--ok); font-weight: 500; margin-top: 2px; }
.pkg ul { list-style: none; margin: 0 0 16px; padding: 0; display: grid; gap: 7px; font-size: 13px; flex: 1; }
.pkg li { display: flex; gap: 8px; align-items: flex-start; }
.pkg li svg { flex: none; margin-top: 3px; color: var(--navy); }
.pkg.featured { background: var(--navy); border-color: var(--navy); color: var(--white); box-shadow: 0 8px 24px rgba(2, 48, 85, .18); }
.pkg.featured h3, .pkg.featured .pkg-credits strong { color: var(--white); }
.pkg.featured .pkg-credits, .pkg.featured .pkg-sub { color: rgba(255,255,255,.7); }
.pkg.featured .pkg-value { background: rgba(255,255,255,.08); color: var(--white); }
.pkg.featured .pkg-value strong { color: var(--lime); }
.pkg.featured .pkg-value small { color: var(--lime); }
.pkg.featured li svg { color: var(--lime); }
.pkg-note { font-size: 12px; margin: 10px 0 0; text-align: right; }
.results { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; margin-top: 8px; }
.result { font-size: 13px; display: grid; gap: 4px; }
.result .times { display: flex; align-items: center; gap: 8px; color: var(--muted); }
.result .times .before { text-decoration: line-through; }
.result .times strong { font-size: 18px; color: var(--navy); }
@media (max-width: 1100px) { .pkgs { grid-template-columns: 1fr; } .ideas, .results { grid-template-columns: 1fr; } }
.pkg ul { align-content: start; }

.pkg.featured { margin: -8px 0; padding-top: 28px; padding-bottom: 28px; }
.pkg li.no { color: #A7B3BF; }
.pkg li .dash { width: 14px; flex: none; text-align: center; color: #C3CBD3; }
.pkg.featured li.no { color: rgba(255,255,255,.4); }
.pkg li em { font-style: normal; color: var(--muted); }
.pkg.featured li em { color: rgba(255,255,255,.7); }
.gap { padding: 18px 22px; }
.gap h2 { margin-bottom: 4px; }
.gap-num strong { font-size: 26px; }

/* Vorschläge */
.sugs { display: grid; grid-template-columns: repeat(2, minmax(0, 1fr)); gap: 16px; }
.sug { display: flex; flex-direction: column; gap: 8px; }
.sug-head { display: flex; justify-content: space-between; gap: 10px; align-items: baseline; flex-wrap: wrap; border-bottom: 1px solid var(--line-2); padding-bottom: 8px; }
.sug h3 { margin: 4px 0 2px; }
.sug-actions { display: flex; gap: 8px; margin-top: auto; padding-top: 6px; }
.quote { margin: 6px 0 0; padding: 8px 12px; border-left: 3px solid var(--line); background: var(--bg); font-size: 13px; color: var(--text); border-radius: 0 6px 6px 0; }
@media (max-width: 1100px) { .sugs { grid-template-columns: 1fr; } }

/* Projektstand */
.phases { list-style: none; margin: 4px 0 0; padding: 0; display: grid; grid-template-columns: repeat(6, 1fr); gap: 6px; font-size: 12px; color: var(--muted); }
.phases li { display: grid; gap: 6px; }
.phases li span { height: 4px; border-radius: 2px; background: var(--line); }
.phases li.done span { background: var(--navy); }
.phases li.now span { background: var(--lime); border: 1px solid #C9E03A; }
.phases li.now { color: var(--navy); font-weight: 600; }
.phases li.done { color: var(--navy); }
.phase-form select { width: auto; height: 30px; font-size: 13px; padding: 4px 8px; }
.pkg-form { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.pkg-form select, .pkg-form input { width: auto; height: 32px; font-size: 13px; }
.pkg-form input[type=number] { width: 110px; }
@media (max-width: 860px) { .phases { grid-template-columns: repeat(4, 1fr) !important; } }

/* Projektplan intern: Name und Credits direkt bearbeitbar */
td > input.plan-label { border-color: transparent; background: transparent; font-weight: 600; padding-left: 6px; margin-left: -7px; width: 100%; }
td > input.plan-label:hover { border-color: var(--line); background: var(--white); }
td > input.plan-label:focus { border-color: var(--navy-2); background: var(--white); }
td > input.plan-credits { width: 64px; text-align: right; }

/* Restliche Credits */
.remainder { display: grid; grid-template-columns: minmax(0, 1fr) auto; gap: 16px; align-items: center; border-left: 3px solid var(--lime); }
.remainder-opts { display: flex; gap: 10px; flex-wrap: wrap; }
.remainder-opt { font-family: var(--font); text-align: left; background: var(--white); border: 1px solid var(--line); border-radius: 8px; padding: 10px 14px; cursor: pointer; display: grid; gap: 2px; max-width: 240px; }
.remainder-opt strong { color: var(--navy); font-size: 14px; }
.remainder-opt span { color: var(--muted); font-size: 12px; }
.remainder-opt:hover { border-color: var(--navy); background: #F7FAFC; }
.remainder-opt[disabled] { opacity: .5; cursor: not-allowed; }
@media (max-width: 1100px) { .remainder { grid-template-columns: 1fr; } }

.credit-mini { display: flex; gap: 10px; font-size: 12px; margin-bottom: 5px; white-space: nowrap; }
.credit-mini strong { font-size: 13px; color: var(--navy); }

/* Feedback als Ablauf */
.flow { display: grid; gap: 16px; max-width: 860px; }
.flow-step { display: grid; grid-template-columns: 34px minmax(0, 1fr); gap: 14px; }
.step-no { width: 30px; height: 30px; border-radius: 50%; background: var(--navy); color: var(--white); display: grid; place-items: center; font-weight: 600; font-size: 14px; }
.muted-step .step-no { background: var(--line-2); color: var(--navy); }
.flow-step h2 { margin-bottom: 2px; }
ol.howto { margin: 12px 0 0; padding-left: 18px; display: grid; gap: 4px; font-size: 13px; }

/* Kundenansicht: größer, klarer */
body { font-size: 15px; }
:root { --muted: #52606E; }
.status-card { padding: 20px 22px; }
.status-next small { display: block; font-size: 13px; color: var(--muted); }
.status-next p { font-size: 19px; font-weight: 600; color: var(--navy); margin: 2px 0 14px; }
.quick-card { display: grid; gap: 4px; text-decoration: none; color: var(--text); transition: border-color .12s, box-shadow .12s; }
.quick-card:hover { border-color: var(--navy); box-shadow: 0 4px 14px rgba(2, 48, 85, .08); }
.quick-card small { font-size: 13px; color: var(--muted); display: flex; align-items: center; gap: 6px; }
.quick-card strong { font-size: 20px; color: var(--navy); font-weight: 600; }
.quick-card span { font-size: 14px; color: var(--muted); }
.quick-card em { font-style: normal; font-size: 14px; color: var(--navy-2); font-weight: 500; margin-top: 6px; }
.quick-card .meter { margin-top: 6px; }
.credits-line { font-size: 14px; color: var(--muted); margin: 12px 0 0; border-top: 1px solid var(--line-2); padding-top: 10px; display: flex; align-items: center; gap: 6px; flex-wrap: wrap; }
.glossary dl { display: grid; grid-template-columns: 140px 1fr; gap: 6px 12px; margin: 10px 0 0; font-size: 14px; }
.glossary dt { font-weight: 600; color: var(--navy); }
.glossary dd { margin: 0; color: var(--text); }
.help { display: inline-grid; place-items: center; width: 17px; height: 17px; border-radius: 50%; background: var(--line-2); color: var(--navy); font-size: 11px; font-weight: 700; cursor: help; position: relative; }
.help:hover::after, .help:focus::after { content: attr(data-tip); position: absolute; left: 50%; bottom: 125%; transform: translateX(-50%); width: 260px; background: var(--text); color: var(--white); font-size: 13px; font-weight: 400; line-height: 1.45; padding: 8px 10px; border-radius: 6px; z-index: 20; box-shadow: 0 6px 16px rgba(0,0,0,.2); }
.quiet-note small { font-size: 12px; }
.quiet-note h3 { margin: 2px 0 6px; }
.quiet-note p { margin: 0 0 8px; font-size: 14px; }
.quiet-note ul { margin: 0; padding-left: 16px; font-size: 13px; color: var(--muted); display: grid; gap: 4px; }
.contact .person { margin-bottom: 10px; }
.contact .person small { display: block; font-size: 12px; }
.contact-lines { display: grid; gap: 6px; font-size: 14px; }
.contact-lines a { display: flex; align-items: center; gap: 8px; color: var(--navy-2); text-decoration: none; }
.contact-lines a:hover { text-decoration: underline; }
.contact-strip { margin-top: 28px; padding-top: 14px; border-top: 1px solid var(--line); font-size: 14px; color: var(--muted); }
.tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin: -6px 0 18px; }
.tabs a { padding: 9px 14px; text-decoration: none; color: var(--muted); font-weight: 500; border-bottom: 2px solid transparent; margin-bottom: -1px; }
.tabs a.active { color: var(--navy); border-bottom-color: var(--navy); }
.tabs a:hover { color: var(--navy); }
.team-phone { width: 170px; height: 30px; font-size: 13px; }
.plan .meta, .plan .cr { font-size: 13px; }
.stat .label, .stat .hint { font-size: 13px; }

/* Upsell */
.upsell { display: grid; grid-template-columns: minmax(0, 1.4fr) minmax(0, 1fr); gap: 24px; align-items: center; border-left: 3px solid var(--lime); }
.upsell h3 { font-size: 17px; margin-bottom: 4px; }
.upsell p { margin: 0 0 12px; font-size: 15px; }
.upsell.near-end { background: var(--navy); border-color: var(--navy); color: var(--white); }
.upsell.near-end h3 { color: var(--white); }
.upsell.near-end .btn-ghost { background: transparent; color: var(--white); border-color: rgba(255,255,255,.35); }
.upsell.near-end .btn-primary { background: var(--lime); color: var(--navy); }
.upsell-actions { display: flex; gap: 8px; flex-wrap: wrap; }
.upsell-bars { display: grid; gap: 8px; }
.ub-row { display: grid; grid-template-columns: 80px 1fr 52px; gap: 10px; align-items: center; font-size: 13px; color: var(--muted); }
.ub-row b { text-align: right; color: var(--navy); }
.ub-bar { height: 10px; background: var(--line-2); border-radius: 5px; overflow: hidden; }
.ub-bar i { display: block; height: 100%; background: #8FA8BF; border-radius: 5px; }
.ub-row.strong span { color: var(--navy); font-weight: 600; }
.ub-row.strong .ub-bar i { background: var(--navy); }
.upsell-bars small { font-size: 12px; color: var(--muted); text-align: right; }
.upsell.near-end .ub-row, .upsell.near-end .upsell-bars small { color: rgba(255,255,255,.75); }
.upsell.near-end .ub-row b, .upsell.near-end .ub-row.strong span { color: var(--white); }
.upsell.near-end .ub-bar { background: rgba(255,255,255,.15); }
.upsell.near-end .ub-row.strong .ub-bar i { background: var(--lime); }
.plan-next { margin-top: 6px; border-top: 1px dashed var(--line); padding-top: 10px; }
.plan-next-head { font-size: 12px; text-transform: none; color: var(--muted); font-weight: 600; margin-bottom: 2px; }
.plan.ghost li { opacity: .6; }
.plan.ghost .mark { border-style: dashed; color: var(--muted); }
.plan-next-more { display: inline-block; margin-top: 6px; font-size: 14px; text-decoration: none; font-weight: 500; }
.refer-line { display: flex; justify-content: space-between; align-items: center; gap: 10px; text-decoration: none; color: var(--text); font-size: 14px; padding: 14px 18px; }
.refer-line:hover { border-color: var(--navy); }
@media (max-width: 1100px) { .upsell { grid-template-columns: 1fr; } }

/* ===== Bildschirmgrößen: großer Monitor, Laptop, Tablet, Handy ===== */
.main { margin: 0 auto; max-width: 1320px; }
@media (min-width: 1700px) {
  .main { max-width: 1480px; padding: 36px 48px 56px; }
  body { font-size: 16px; }
}
@media (min-width: 2200px) {
  .main { max-width: 1640px; }
  .app { grid-template-columns: 260px minmax(0, 1fr); }
}

@media (max-width: 860px) {
  .app { grid-template-columns: minmax(0, 1fr); }
  /* Kopfzeile statt Seitenleiste */
  .sidebar { position: sticky; top: 0; z-index: 30; height: auto; padding: 10px 0 0; display: block; }
  .sidebar .logo { width: 118px; margin: 2px 16px 10px; }
  .nav { flex-direction: row; flex-wrap: nowrap; overflow-x: auto; gap: 2px; padding: 0 10px; scrollbar-width: none; -webkit-overflow-scrolling: touch; }
  .nav::-webkit-scrollbar { display: none; }
  .nav a { flex: none; white-space: nowrap; padding: 9px 12px 11px; border-radius: 0; font-size: 14px; }
  .nav a.active { background: transparent; box-shadow: inset 0 -3px 0 var(--lime); }
  .nav a.active::before { display: none; }
  .nav .nav-section { display: none; }
  .sidebar .me { position: absolute; top: 6px; right: 8px; border: none; padding: 0; gap: 4px; }
  .sidebar .me .avatar, .sidebar .me .who { display: none; }
  .main { padding: 16px 14px 32px; max-width: none; }
  .topbar { margin-bottom: 14px; }
  .topbar h1 { font-size: 20px; }
  .topbar .actions { width: 100%; }
  .card { padding: 16px; }
  .card.flush > .card-head { padding: 12px 16px 0; }
  .impersonation { flex-wrap: wrap; }
  /* Projektstand: nur Balken, Bezeichnung nur für die aktuelle Phase */
  .phases { grid-template-columns: repeat(8, 1fr) !important; gap: 4px; }
  .phases li { font-size: 0; }
  .phases li.now { font-size: 13px; grid-column: 1 / -1; order: 99; }
  .phases li.now span { display: none; }
  .status-next p { font-size: 17px; }
  /* Projektplan: Status und Credits in eine zweite Zeile */
  .plan li { grid-template-columns: 16px minmax(0, 1fr) auto; row-gap: 2px; }
  .plan .title { white-space: normal; }
  .plan li > .meta:not(.title + .meta) { grid-column: 2; }
  .plan li > .cr { grid-column: 3; grid-row: 1; }
  .plan li > div:nth-child(3) { grid-column: 2; grid-row: 2; }
  .quick-card strong { font-size: 18px; }
  .upsell { gap: 14px; }
  .ub-row { grid-template-columns: 72px 1fr 46px; }
  .funnel .f-row { grid-template-columns: 110px 1fr 28px; }
  .tabs { overflow-x: auto; white-space: nowrap; }
  .stats { grid-template-columns: 1fr 1fr; }
  .glossary dl { grid-template-columns: 1fr; }
  .glossary dd { margin-bottom: 6px; }
  .credit-mini { flex-wrap: wrap; white-space: normal; }
  .remainder-opts, .upsell-actions { width: 100%; }
  .help:hover::after, .help:focus::after { left: 0; transform: none; width: 220px; }
  .modal-backdrop { padding: 10px; align-items: end; }
  .modal { max-height: 92vh; }
  .auth-brand { padding: 22px 20px; }
  .auth-brand .claim { margin-top: 18px; }
  .auth-brand h1 { font-size: 20px; }
  .auth-brand .foot { display: none; }
  .auth-form { padding: 24px 18px 40px; place-items: start center; }
  .public-head { padding: 12px 16px; }
  .public-wrap { padding: 20px 14px 40px; }
  .public-wrap h1 { font-size: 22px; }
  dl.kv { grid-template-columns: 1fr; gap: 2px 0; }
  dl.kv dd { margin-bottom: 8px; }
}
@media (max-width: 420px) {
  .stats { grid-template-columns: 1fr; }
  .stats .stat { border-left: none; border-top: 1px solid var(--line-2); }
  .stats .stat:first-child { border-top: none; }
}
@media (max-width: 860px) {
  .app { grid-template-rows: auto minmax(0, 1fr); align-content: start; }
}
@media (max-width: 1100px) {
  .grid.side { grid-template-columns: minmax(0, 1fr); }
  .grid > * { min-width: 0; }
}
@media (max-width: 860px) {
  .grid.cols-2, .grid.cols-3, .grid.cols-4, .grid.side, .sugs, .pkgs, .results, .ideas { grid-template-columns: minmax(0, 1fr); }
  .stack > * { min-width: 0; }
}
@media (max-width: 860px) {
  .table-wrap table { min-width: 560px; }
}

/* ===== Burgermenü und Handy-Feinschliff ===== */
.sb-top { display: flex; align-items: center; justify-content: space-between; }
.drawer { display: flex; flex-direction: column; flex: 1; min-height: 0; }
.burger { display: none; }
.drawer-backdrop { display: none; }
.logout-label { display: none; }

@media (max-width: 860px) {
  .sidebar { position: sticky; top: 0; z-index: 40; height: 56px; padding: 0 6px 0 16px; display: block; }
  .sb-top { height: 56px; }
  .sidebar .logo { width: 124px; margin: 0; }
  .burger { display: grid; gap: 5px; align-content: center; justify-items: center; width: 44px; height: 44px; background: none; border: none; cursor: pointer; padding: 0; border-radius: 8px; }
  .burger span { display: block; width: 22px; height: 2px; background: var(--white); border-radius: 2px; transition: transform .2s, opacity .2s; }
  .menu-open .burger span:nth-child(1) { transform: translateY(7px) rotate(45deg); }
  .menu-open .burger span:nth-child(2) { opacity: 0; }
  .menu-open .burger span:nth-child(3) { transform: translateY(-7px) rotate(-45deg); }

  .drawer { position: fixed; top: 56px; left: 0; right: 0; max-height: calc(100vh - 56px); overflow-y: auto; background: var(--navy); padding: 8px 12px 16px;
            transform: translateY(-8px); opacity: 0; visibility: hidden; transition: transform .18s ease, opacity .18s ease, visibility .18s; box-shadow: 0 12px 28px rgba(0,0,0,.25); }
  .menu-open .drawer { transform: none; opacity: 1; visibility: visible; }
  .drawer-backdrop { position: fixed; inset: 56px 0 0 0; background: rgba(5, 20, 35, .45); z-index: 35; }
  .menu-open .drawer-backdrop { display: block; }
  .menu-open { overflow: hidden; }

  .nav { flex-direction: column; flex-wrap: nowrap; overflow: visible; gap: 2px; padding: 0; }
  .nav a { padding: 14px 14px; font-size: 16px; border-radius: 8px; white-space: normal; }
  .nav a.active { background: rgba(255,255,255,.08); box-shadow: inset 3px 0 0 var(--lime); }
  .nav .count { margin-left: auto; }
  .sidebar .spacer { display: none; }
  .sidebar .me { position: static; border-top: 1px solid rgba(255,255,255,.12); margin-top: 10px; padding: 14px 6px 0; gap: 10px; }
  .sidebar .me .avatar, .sidebar .me .who { display: block; }
  .sidebar .me .avatar { display: grid; }
  .sidebar .me button { display: flex; align-items: center; gap: 6px; border: 1px solid rgba(255,255,255,.25); padding: 8px 12px; }
  .logout-label { display: inline; font-size: 14px; }

  /* Bedienung mit dem Finger */
  .btn { min-height: 42px; }
  .btn-sm { min-height: 36px; }
  input[type=text], input[type=email], input[type=password], input[type=tel], input[type=number], input[type=date], input[type=search], select, textarea { font-size: 16px; min-height: 44px; }
  .topbar .actions .btn { flex: 1; }
  .upsell-actions .btn { flex: 1; }
  .main { padding: 18px 14px 36px; }
  .quick-card { padding: 14px 16px; }
  .card-head { flex-wrap: wrap; }
  .modal { border-radius: 14px 14px 0 0; }
  .modal-foot { position: sticky; bottom: 0; background: var(--white); }
  .modal-foot .btn { flex: 1; }
  .slot { min-height: 40px; padding: 0 14px; }

  /* Empfehlungen der Kanzlei als Liste statt Tabelle */
  .table-wrap table.stack-mobile { min-width: 0; }
  table.stack-mobile thead { display: none; }
  table.stack-mobile, table.stack-mobile tbody, table.stack-mobile tr, table.stack-mobile td { display: block; width: 100%; }
  table.stack-mobile tr { padding: 12px 16px; border-bottom: 1px solid var(--line-2); }
  table.stack-mobile tr:last-child { border-bottom: none; }
  table.stack-mobile td { border: none; padding: 3px 0; text-align: left; }
  table.stack-mobile td[data-label]:not(:first-child)::before { content: attr(data-label); display: block; font-size: 12px; color: var(--muted); margin-bottom: 2px; }
  table.stack-mobile td.num { text-align: left; }
}
