/* Empfehlungsportal – Stylesheet */
:root {
  --brand: #1f6feb;
  --brand-dark: #1554b8;
  --brand-soft: #e8f0fe;
  --bg: #f4f6fa;
  --surface: #ffffff;
  --surface-2: #f8fafc;
  --border: #e2e8f0;
  --text: #101828;
  --muted: #667085;
  --ok: #067647;
  --ok-bg: #e6f5ec;
  --warn: #b54708;
  --warn-bg: #fdf3e7;
  --info: #175cd3;
  --info-bg: #e8f1fd;
  --danger: #b42318;
  --danger-bg: #fdeceb;
  --radius: 12px;
  --shadow: 0 1px 2px rgba(16,24,40,.06), 0 8px 24px -12px rgba(16,24,40,.18);
  --font: -apple-system, BlinkMacSystemFont, "Segoe UI", Inter, Roboto, "Helvetica Neue", Arial, sans-serif;
}
* { box-sizing: border-box; }
html, body { margin: 0; padding: 0; }
body {
  font-family: var(--font);
  background: var(--bg);
  color: var(--text);
  font-size: 15px;
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}
a { color: var(--brand); text-decoration: none; }
a:hover { text-decoration: underline; }
h1, h2, h3 { line-height: 1.25; margin: 0 0 .4em; letter-spacing: -.015em; }
h1 { font-size: 1.7rem; }
h2 { font-size: 1.22rem; }
h3 { font-size: 1.02rem; }
p { margin: 0 0 1em; }
small, .muted { color: var(--muted); }
.small { font-size: .86rem; }

/* Kopfzeile */
.topbar {
  background: var(--surface);
  border-bottom: 1px solid var(--border);
  position: sticky; top: 0; z-index: 30;
}
.topbar-inner {
  max-width: 1160px; margin: 0 auto; padding: 0 20px;
  display: flex; align-items: center; gap: 22px; min-height: 60px; flex-wrap: wrap;
}
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; color: var(--text); font-size: 1.02rem; }
.brand:hover { text-decoration: none; }
.brand .logo {
  width: 30px; height: 30px; border-radius: 9px; flex: none;
  background: linear-gradient(135deg, var(--brand), #7c5cff);
  color: #fff; display: grid; place-items: center; font-size: 15px; font-weight: 800;
}
.nav { display: flex; gap: 4px; margin-left: auto; align-items: center; flex-wrap: wrap; }
.nav a {
  padding: 7px 12px; border-radius: 8px; color: var(--muted); font-weight: 550; font-size: .92rem;
}
.nav a:hover { background: var(--surface-2); color: var(--text); text-decoration: none; }
.nav a.active { background: var(--brand-soft); color: var(--brand-dark); }
.nav .who { color: var(--muted); font-size: .85rem; padding-left: 8px; border-left: 1px solid var(--border); margin-left: 6px; }

.container { max-width: 1160px; margin: 0 auto; padding: 26px 20px 70px; }
.container.narrow { max-width: 560px; }
.container.mid { max-width: 860px; }

.page-head { display: flex; align-items: flex-start; gap: 16px; flex-wrap: wrap; margin-bottom: 18px; }
.page-head .actions { margin-left: auto; display: flex; gap: 8px; flex-wrap: wrap; }
.page-head p { margin: 0; color: var(--muted); }

/* Karten */
.card {
  background: var(--surface); border: 1px solid var(--border);
  border-radius: var(--radius); box-shadow: var(--shadow); padding: 20px; margin-bottom: 18px;
}
.card.pad0 { padding: 0; overflow: hidden; }
.card-head { padding: 16px 20px; border-bottom: 1px solid var(--border); display: flex; align-items: center; gap: 12px; }
.card-head h2, .card-head h3 { margin: 0; }
.card-head .actions { margin-left: auto; display: flex; gap: 8px; }
.card-body { padding: 20px; }

.grid { display: grid; gap: 16px; }
.grid.c2 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
.grid.c3 { grid-template-columns: repeat(3, minmax(0, 1fr)); }
.grid.c4 { grid-template-columns: repeat(4, minmax(0, 1fr)); }
.grid.side { grid-template-columns: minmax(0, 2fr) minmax(0, 1fr); align-items: start; }
@media (max-width: 860px) { .grid.c3, .grid.c4, .grid.side { grid-template-columns: repeat(2, minmax(0,1fr)); } }
@media (max-width: 620px) { .grid.c2, .grid.c3, .grid.c4, .grid.side { grid-template-columns: 1fr; } }

/* Kennzahlen */
.kpi { background: var(--surface); border: 1px solid var(--border); border-radius: var(--radius); padding: 16px 18px; box-shadow: var(--shadow); }
.kpi .label { color: var(--muted); font-size: .82rem; text-transform: uppercase; letter-spacing: .04em; font-weight: 600; }
.kpi .value { font-size: 1.65rem; font-weight: 700; letter-spacing: -.02em; margin-top: 4px; }
.kpi .hint { color: var(--muted); font-size: .84rem; }
.kpi.accent { background: linear-gradient(135deg, var(--brand), #7c5cff); border: none; color: #fff; }
.kpi.accent .label, .kpi.accent .hint { color: rgba(255,255,255,.85); }

/* Tabellen */
table { width: 100%; border-collapse: collapse; font-size: .92rem; }
th, td { padding: 11px 14px; text-align: left; border-bottom: 1px solid var(--border); vertical-align: middle; }
th { font-size: .78rem; text-transform: uppercase; letter-spacing: .05em; color: var(--muted); background: var(--surface-2); font-weight: 650; }
tbody tr:last-child td { border-bottom: none; }
tbody tr:hover { background: var(--surface-2); }
td.num, th.num { text-align: right; font-variant-numeric: tabular-nums; }
.table-wrap { overflow-x: auto; }
.empty { padding: 42px 20px; text-align: center; color: var(--muted); }

/* Badges */
.badge {
  display: inline-flex; align-items: center; gap: 5px; padding: 3px 9px; border-radius: 999px;
  font-size: .78rem; font-weight: 600; white-space: nowrap;
  background: var(--surface-2); color: var(--muted); border: 1px solid var(--border);
}
.badge.ok { background: var(--ok-bg); color: var(--ok); border-color: transparent; }
.badge.info { background: var(--info-bg); color: var(--info); border-color: transparent; }
.badge.warn { background: var(--warn-bg); color: var(--warn); border-color: transparent; }
.badge.danger { background: var(--danger-bg); color: var(--danger); border-color: transparent; }
.badge.brand { background: var(--brand-soft); color: var(--brand-dark); border-color: transparent; }

/* Buttons */
.btn {
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  padding: 9px 16px; border-radius: 9px; border: 1px solid var(--border);
  background: var(--surface); color: var(--text); font-weight: 600; font-size: .92rem;
  cursor: pointer; font-family: inherit; transition: .12s ease;
}
.btn:hover { background: var(--surface-2); text-decoration: none; }
.btn.primary { background: var(--brand); border-color: var(--brand); color: #fff; }
.btn.primary:hover { background: var(--brand-dark); border-color: var(--brand-dark); }
.btn.danger { background: var(--danger); border-color: var(--danger); color: #fff; }
.btn.ghost { background: transparent; border-color: transparent; color: var(--muted); }
.btn.sm { padding: 6px 11px; font-size: .85rem; }
.btn.block { width: 100%; }
.btn[disabled] { opacity: .5; pointer-events: none; }

/* Formulare */
.field { margin-bottom: 15px; }
.field label { display: block; font-weight: 600; font-size: .88rem; margin-bottom: 5px; }
.field .help { color: var(--muted); font-size: .82rem; margin-top: 4px; }
input[type=text], input[type=email], input[type=password], input[type=number], input[type=date], input[type=tel], input[type=search], input:not([type]), select, textarea {
  width: 100%; padding: 9px 12px; border: 1px solid var(--border); border-radius: 9px;
  background: var(--surface); color: var(--text); font: inherit; font-size: .94rem;
}
input:focus, select:focus, textarea:focus { outline: 2px solid var(--brand); outline-offset: -1px; border-color: var(--brand); }
textarea { min-height: 84px; resize: vertical; }
fieldset { border: none; margin: 0 0 6px; padding: 0; }
fieldset > legend { font-weight: 700; font-size: .95rem; padding: 0 0 10px; color: var(--text); }
.row { display: grid; gap: 14px; grid-template-columns: repeat(2, minmax(0,1fr)); }
.row.c3 { grid-template-columns: repeat(3, minmax(0,1fr)); }
@media (max-width: 620px) { .row, .row.c3 { grid-template-columns: 1fr; } }
.check { display: flex; gap: 9px; align-items: flex-start; font-size: .9rem; }
.check input { margin-top: 3px; flex: none; }
.form-actions { display: flex; gap: 10px; align-items: center; margin-top: 18px; flex-wrap: wrap; }

/* Meldungen */
.alert { padding: 12px 16px; border-radius: 10px; margin-bottom: 16px; font-size: .92rem; border: 1px solid transparent; }
.alert.ok { background: var(--ok-bg); color: var(--ok); }
.alert.err { background: var(--danger-bg); color: var(--danger); }
.alert.info { background: var(--info-bg); color: var(--info); }
.alert.warn { background: var(--warn-bg); color: var(--warn); }

/* Definitionslisten */
.dl { display: grid; grid-template-columns: minmax(120px, 34%) 1fr; gap: 8px 16px; font-size: .93rem; }
.dl dt { color: var(--muted); }
.dl dd { margin: 0; font-weight: 550; }

/* Zeitstrahl */
.timeline { list-style: none; margin: 0; padding: 0; position: relative; }
.timeline li { position: relative; padding: 0 0 18px 26px; border-left: 2px solid var(--border); }
.timeline li:last-child { border-left-color: transparent; padding-bottom: 0; }
.timeline li::before {
  content: ''; position: absolute; left: -7px; top: 3px; width: 12px; height: 12px;
  border-radius: 50%; background: var(--surface); border: 2px solid var(--border);
}
.timeline li.done::before { background: var(--brand); border-color: var(--brand); }
.timeline .t-title { font-weight: 600; font-size: .93rem; }
.timeline .t-meta { color: var(--muted); font-size: .82rem; }

/* Statusschritte */
.steps { display: flex; gap: 6px; flex-wrap: wrap; margin: 0 0 4px; padding: 0; list-style: none; }
.steps li { flex: 1 1 90px; text-align: center; font-size: .74rem; color: var(--muted); }
.steps li .bar { height: 5px; border-radius: 4px; background: var(--border); margin-bottom: 6px; }
.steps li.on .bar { background: var(--brand); }
.steps li.on { color: var(--brand-dark); font-weight: 650; }

/* Landing */
.hero { padding: 56px 0 34px; }
.hero h1 { font-size: 2.5rem; max-width: 15ch; }
.hero p.lead { font-size: 1.1rem; color: var(--muted); max-width: 58ch; }
.hero .cta { display: flex; gap: 12px; margin-top: 24px; flex-wrap: wrap; }
.steps-cards { counter-reset: step; }
.steps-cards .card::before {
  counter-increment: step; content: counter(step);
  display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px;
  background: var(--brand-soft); color: var(--brand-dark); font-weight: 800; margin-bottom: 10px;
}
.tierlist { list-style: none; margin: 0; padding: 0; }
.tierlist li { display: flex; justify-content: space-between; gap: 10px; padding: 9px 0; border-bottom: 1px dashed var(--border); font-size: .93rem; }
.tierlist li:last-child { border-bottom: none; }
.tierlist li.current { color: var(--brand-dark); font-weight: 700; }

.footer { text-align: center; color: var(--muted); font-size: .84rem; padding: 26px 20px 40px; }
.mono { font-family: ui-monospace, SFMono-Regular, Menlo, monospace; font-size: .88em; }
.nowrap { white-space: nowrap; }
.mt0 { margin-top: 0; } .mb0 { margin-bottom: 0; } .mt16 { margin-top: 16px; } .mb8 { margin-bottom: 8px; }
.hr { height: 1px; background: var(--border); margin: 18px 0; border: none; }
.tabs { display: flex; gap: 6px; border-bottom: 1px solid var(--border); margin-bottom: 18px; flex-wrap: wrap; }
.tabs a { padding: 9px 14px; border-radius: 8px 8px 0 0; color: var(--muted); font-weight: 600; font-size: .92rem; }
.tabs a.active { color: var(--brand-dark); background: var(--surface); border: 1px solid var(--border); border-bottom-color: var(--surface); margin-bottom: -1px; }
.filters { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; margin-bottom: 14px; }
.filters input, .filters select { width: auto; min-width: 150px; }

@media (prefers-color-scheme: dark) {
  :root {
    --bg: #0d1117; --surface: #161b22; --surface-2: #1c2230; --border: #2a3140;
    --text: #e6edf3; --muted: #9aa7b8; --brand: #4c8dff; --brand-dark: #6ba1ff; --brand-soft: #1a2a45;
    --ok: #4ade80; --ok-bg: #14301f; --warn: #fbbf24; --warn-bg: #33270d;
    --info: #7fb0ff; --info-bg: #142440; --danger: #f87171; --danger-bg: #38191a;
    --shadow: 0 1px 2px rgba(0,0,0,.4);
  }
  .brand { color: var(--text); }
}
@media print {
  .topbar, .form-actions, .btn, .footer { display: none !important; }
  body { background: #fff; }
  .card { box-shadow: none; border-color: #ccc; }
}

/* Rechtstexte */
.prose { max-width: 74ch; }
.prose h2 { margin: 30px 0 10px; font-size: 1.08rem; }
.prose h2:first-of-type { margin-top: 6px; }
.prose h3 { margin: 20px 0 6px; font-size: .97rem; }
.prose p, .prose li { font-size: .95rem; line-height: 1.7; color: var(--text); }
.prose ul, .prose ol { margin: 0 0 14px; padding-left: 22px; }
.prose li { margin-bottom: 5px; }
.prose .lead { color: var(--muted); }
.prose dl.dl { margin: 0 0 14px; }
.prose table { margin: 6px 0 16px; }
.prose .stand { color: var(--muted); font-size: .85rem; margin-top: 30px; padding-top: 14px; border-top: 1px solid var(--border); }
.footer a { color: var(--muted); text-decoration: none; }
.footer a:hover { color: var(--text); text-decoration: underline; }
.footer .links { margin-top: 6px; display: flex; gap: 14px; justify-content: center; flex-wrap: wrap; }
