/* clevercentral – Gestaltung. Farben als Variablen, dunkler Modus automatisch. */
:root {
  --bg: #f6f5f3; --surface: #ffffff; --surface-2: #faf9f7; --fg: #1c1917; --muted: #6b645f;
  --line: #e7e3df; --accent: #ea580c; --accent-hover: #c2410c; --accent-soft: #fff1e6;
  --ok: #15803d; --ok-soft: #dcfce7; --warn: #a16207; --warn-soft: #fef3c7;
  --bad: #b91c1c; --bad-soft: #fee2e2; --info: #1d4ed8; --info-soft: #dbeafe;
  --radius: 10px; --shadow: 0 1px 2px rgba(28, 25, 23, .06), 0 2px 8px rgba(28, 25, 23, .04);
}
@media (prefers-color-scheme: dark) {
  :root {
    --bg: #161412; --surface: #211e1b; --surface-2: #29251f; --fg: #f5f3f0; --muted: #a8a19a;
    --line: #3a342e; --accent: #f97316; --accent-hover: #fb923c; --accent-soft: #3a2314;
    --ok: #4ade80; --ok-soft: #12321f; --warn: #facc15; --warn-soft: #3a3010;
    --bad: #f87171; --bad-soft: #3d1717; --info: #93c5fd; --info-soft: #172a4a;
    --shadow: none;
  }
}
* { box-sizing: border-box; }
html { -webkit-text-size-adjust: 100%; }
body { margin: 0; font: 15px/1.5 system-ui, -apple-system, "Segoe UI", Roboto, sans-serif; background: var(--bg); color: var(--fg); }
a { color: var(--accent); text-decoration: none; } a:hover { text-decoration: underline; }
h1 { font-size: 1.55rem; margin: 0 0 .25rem; line-height: 1.25; }
h2 { font-size: 1.1rem; margin: 0 0 .6rem; }
h3 { font-size: 1rem; margin: 0 0 .4rem; }
p { margin: .3rem 0 .7rem; }
small, .muted { color: var(--muted); }
code { background: var(--surface-2); padding: 0 .3em; border-radius: 4px; font-size: .92em; }

/* ---- Kopfzeile ---- */
.topbar { position: sticky; top: 0; z-index: 10; background: var(--surface); border-bottom: 1px solid var(--line); }
.topbar-inner { max-width: 1240px; margin: 0 auto; padding: .55rem 1rem; display: flex; align-items: center; gap: 1rem; }
.brand { display: flex; align-items: center; gap: .5rem; font-weight: 700; color: var(--fg); font-size: 1.05rem; }
.brand img { width: 26px; height: 26px; border-radius: 6px; }
.brand:hover { text-decoration: none; }
.nav { display: flex; gap: .15rem; flex-wrap: wrap; align-items: center; }
.nav a, .nav summary { padding: .4rem .65rem; border-radius: 8px; color: var(--fg); cursor: pointer; list-style: none; white-space: nowrap; }
.nav a:hover, .nav summary:hover { background: var(--surface-2); text-decoration: none; }
.nav a.active { background: var(--accent-soft); color: var(--accent); font-weight: 600; }
.nav summary::-webkit-details-marker { display: none; }
.pill { display: inline-block; min-width: 1.3rem; padding: 0 .4rem; border-radius: 999px; background: var(--bad); color: #fff; font-size: .75rem; text-align: center; margin-left: .2rem; }
.topbar .spacer { flex: 1; }
.project-switch select { font-weight: 600; }
.menu { position: relative; }
.menu > div { position: absolute; right: 0; top: 2.4rem; background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); box-shadow: 0 8px 24px rgba(0,0,0,.12); padding: .35rem; min-width: 220px; display: grid; }
.menu > div a, .menu > div button { text-align: left; padding: .5rem .7rem; border-radius: 6px; color: var(--fg); background: none; border: 0; font: inherit; cursor: pointer; }
.menu > div a:hover, .menu > div button:hover { background: var(--surface-2); text-decoration: none; }
.menu hr { border: 0; border-top: 1px solid var(--line); margin: .3rem 0; }
.btn.burger, .show-mobile { display: none; }

main { max-width: 1240px; margin: 0 auto; padding: 1.25rem 1rem 3rem; }
footer { max-width: 1240px; margin: 0 auto; padding: 1rem; color: var(--muted); font-size: .82rem; border-top: 1px solid var(--line); }

/* ---- Bausteine ---- */
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 1rem; flex-wrap: wrap; margin-bottom: 1rem; }
.page-head p { margin: 0; color: var(--muted); }
.card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: 1rem 1.1rem; box-shadow: var(--shadow); margin-bottom: 1rem; }
.grid > .card { margin-bottom: 0; }
.card.highlight { border-color: var(--accent); background: linear-gradient(0deg, var(--surface), var(--accent-soft)); }
.card-head { display: flex; justify-content: space-between; align-items: baseline; gap: .5rem; margin-bottom: .6rem; }
.card-head h2 { margin: 0; }
.grid { display: grid; gap: 1rem; align-items: start; margin-bottom: 1rem; }
.grid-2 { grid-template-columns: minmax(0, 1fr) minmax(0, 1fr); }
.grid-3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid-main { grid-template-columns: minmax(0, 1.7fr) minmax(0, 1fr); align-items: start; }
.grid-auto { grid-template-columns: repeat(auto-fill, minmax(300px, 1fr)); }
.stats { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 1rem; margin-bottom: 1rem; }
.stat { background: var(--surface); border: 1px solid var(--line); border-radius: var(--radius); padding: .9rem 1rem; box-shadow: var(--shadow); color: var(--fg); }
.stat:hover { text-decoration: none; border-color: var(--accent); }
.stat b { display: block; font-size: 1.8rem; line-height: 1.1; font-variant-numeric: tabular-nums; }
.stat span { color: var(--muted); font-size: .88rem; }

.btn { display: inline-flex; align-items: center; justify-content: center; gap: .35rem; padding: .5rem .95rem; border-radius: 8px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font: inherit; font-weight: 500; cursor: pointer; white-space: nowrap; }
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--accent); border-color: var(--accent); color: #fff; }
.btn.primary:hover { background: var(--accent-hover); }
.btn.danger { color: var(--bad); }
.btn.small { padding: .25rem .6rem; font-size: .88rem; }
.btn.block { width: 100%; }
.btn:disabled { opacity: .5; cursor: not-allowed; }
.link-btn { background: none; border: 0; padding: 0; color: var(--accent); font: inherit; cursor: pointer; }
.link-btn.muted { color: var(--muted); font-size: .88rem; }
.actions { display: flex; gap: .5rem; flex-wrap: wrap; align-items: center; }

label { display: grid; gap: .25rem; font-weight: 500; font-size: .93rem; }
label .hint, .hint { font-weight: 400; color: var(--muted); font-size: .85rem; }
input, select, textarea { font: inherit; padding: .5rem .65rem; border: 1px solid var(--line); border-radius: 8px; background: var(--surface); color: var(--fg); width: 100%; }
input:focus, select:focus, textarea:focus { outline: 2px solid var(--accent); outline-offset: -1px; border-color: var(--accent); }
input[type=checkbox], input[type=radio] { width: auto; accent-color: var(--accent); }
textarea { resize: vertical; }
.form { display: grid; gap: .85rem; align-content: start; }
.form-row { display: grid; grid-template-columns: repeat(auto-fit, minmax(160px, 1fr)); gap: .75rem; }
.check { display: flex; align-items: center; gap: .5rem; font-weight: 400; }
.checks { display: grid; grid-template-columns: repeat(auto-fill, minmax(190px, 1fr)); gap: .3rem .9rem; }
.inline { display: inline; }
.mono { font-family: ui-monospace, Menlo, Consolas, monospace; font-size: 13px; }

.flash { padding: .7rem 1rem; border-radius: 8px; background: var(--ok-soft); color: var(--ok); margin-bottom: 1rem; font-weight: 500; }
.flash.error { background: var(--bad-soft); color: var(--bad); }
.notice { padding: .7rem 1rem; border-radius: 8px; background: var(--info-soft); color: var(--info); margin: .5rem 0 1rem; }
.notice.warn { background: var(--warn-soft); color: var(--warn); }

.badge { display: inline-block; padding: .1rem .55rem; border-radius: 999px; font-size: .8rem; font-weight: 600; background: var(--surface-2); color: var(--muted); border: 1px solid var(--line); white-space: nowrap; }
.badge.top { background: var(--accent); color: #fff; border-color: var(--accent); }
.st-neu { background: var(--surface-2); }
.st-qualifiziert { background: var(--info-soft); color: var(--info); border-color: transparent; }
.st-kontaktiert { background: var(--warn-soft); color: var(--warn); border-color: transparent; }
.st-termin, .st-kunde { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
.st-nicht_passend { opacity: .6; }
.job-running { background: var(--warn-soft); color: var(--warn); } .job-done { background: var(--ok-soft); color: var(--ok); }
.job-failed { background: var(--bad-soft); color: var(--bad); }
.tag { display: inline-block; padding: 0 .45rem; border-radius: 5px; background: var(--surface-2); border: 1px solid var(--line); font-size: .82rem; margin: 0 .2rem .2rem 0; }

.chips { display: flex; gap: .35rem; flex-wrap: wrap; }
.chip { padding: .3rem .75rem; border-radius: 999px; border: 1px solid var(--line); background: var(--surface); color: var(--fg); font-size: .9rem; }
.chip:hover { text-decoration: none; border-color: var(--accent); }
.chip.on { background: var(--accent); border-color: var(--accent); color: #fff; }
.chip small { color: inherit; opacity: .75; }

/* Passung als Balken */
.fit { display: flex; align-items: center; gap: .5rem; min-width: 120px; }
.fit .bar { flex: 1; height: 8px; border-radius: 99px; background: var(--surface-2); border: 1px solid var(--line); overflow: hidden; }
.fit .bar i { display: block; height: 100%; background: var(--muted); border-radius: 99px; }
.fit.top .bar i { background: var(--accent); }
.fit b { font-variant-numeric: tabular-nums; min-width: 2ch; text-align: right; }

/* Tabellen */
.table-wrap { overflow-x: auto; }
table { width: 100%; border-collapse: collapse; }
th { text-align: left; font-size: .8rem; text-transform: uppercase; letter-spacing: .03em; color: var(--muted); font-weight: 600; padding: .5rem .6rem; border-bottom: 1px solid var(--line); }
td { padding: .65rem .6rem; border-bottom: 1px solid var(--line); vertical-align: middle; }
tr.clickable { cursor: pointer; } tr.clickable:hover td { background: var(--surface-2); }
td .sub { display: block; color: var(--muted); font-size: .85rem; }
.num { text-align: right; font-variant-numeric: tabular-nums; }

/* Listen */
.list { list-style: none; padding: 0; margin: 0; }
.list li { padding: .55rem 0; border-bottom: 1px solid var(--line); display: flex; gap: .6rem; justify-content: space-between; align-items: flex-start; }
.list li:last-child { border-bottom: 0; }
.reasons li { justify-content: flex-start; padding: .25rem 0; border: 0; }
.reasons .pts { min-width: 2.6rem; color: var(--ok); font-weight: 600; font-variant-numeric: tabular-nums; }
.timeline li { justify-content: flex-start; }
.timeline .when { min-width: 5.5rem; color: var(--muted); font-size: .85rem; }

/* Schritte / Einstieg */
.steps { counter-reset: step; list-style: none; padding: 0; margin: 0; display: grid; gap: .6rem; }
.steps li { counter-increment: step; display: grid; grid-template-columns: 2rem 1fr auto; gap: .75rem; align-items: center; padding: .7rem .8rem; border: 1px solid var(--line); border-radius: var(--radius); background: var(--surface); }
.steps li::before { content: counter(step); width: 2rem; height: 2rem; border-radius: 50%; display: grid; place-items: center; background: var(--surface-2); font-weight: 700; }
.steps li.done::before { content: "✓"; background: var(--ok-soft); color: var(--ok); }
.steps li.done { opacity: .75; }
.steps p { margin: 0; color: var(--muted); font-size: .9rem; }

details.more > summary { cursor: pointer; color: var(--accent); font-weight: 500; list-style: none; padding: .3rem 0; }
details.more > summary::-webkit-details-marker { display: none; }
details.more > summary::before { content: "▸ "; }
details.more[open] > summary::before { content: "▾ "; }
.ai-box { border-left: 3px solid var(--accent); padding: .5rem .8rem; background: var(--surface-2); border-radius: 0 8px 8px 0; margin: .6rem 0; }
.segmented { display: flex; flex-wrap: wrap; gap: .3rem; margin-bottom: .6rem; }
.segmented a { padding: .35rem .75rem; border-radius: 8px; border: 1px solid var(--line); color: var(--fg); font-size: .9rem; }
.segmented a.on { background: var(--accent-soft); border-color: var(--accent); color: var(--accent); font-weight: 600; }
.segmented a:hover { text-decoration: none; border-color: var(--accent); }
.empty { text-align: center; padding: 2.5rem 1rem; color: var(--muted); }
.empty h2 { color: var(--fg); }
.login { max-width: 380px; margin: 12vh auto; }
.login .brand { justify-content: center; font-size: 1.5rem; margin-bottom: 1.2rem; }
.login .brand img { width: 40px; height: 40px; }
.rule { border: 1px solid var(--line); border-radius: var(--radius); padding: .8rem; background: var(--surface-2); }
.rule-head { display: flex; justify-content: space-between; gap: .5rem; align-items: center; margin-bottom: .5rem; }

@media (max-width: 900px) {
  .grid-2, .grid-3, .grid-main { grid-template-columns: 1fr; }
  .stats { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .btn.burger { display: inline-flex; }
  .show-mobile { display: block; }
  .topbar-inner { flex-wrap: wrap; }
  .nav.main { display: none; width: 100%; order: 3; flex-direction: column; align-items: stretch; }
  .topbar.open .nav.main { display: flex; }
  .hide-mobile { display: none; }
  td.hide-mobile, th.hide-mobile { display: none; }
  .fit { min-width: 70px; }
  td, th { padding: .55rem .4rem; }
}

/* Einschätzung je Produkt + LinkedIn-Links */
.mark-buttons { display: inline-flex; gap: .25rem; }
.mark-buttons .btn { padding: .2rem .45rem; filter: grayscale(1); opacity: .55; }
.mark-buttons .btn:hover { filter: none; opacity: 1; }
.mark-buttons .btn.mark-on-good { filter: none; opacity: 1; background: var(--ok-soft); border-color: var(--ok); }
.mark-buttons .btn.mark-on-bad { filter: none; opacity: 1; background: var(--bad-soft); border-color: var(--bad); }
.mark-buttons:not(.big) .btn:not(.small) { padding: .45rem .8rem; }
.li-links { display: flex; flex-wrap: wrap; gap: .35rem; margin: .4rem 0; }
.badge.good { background: var(--ok-soft); color: var(--ok); border-color: transparent; }
