:root {
  --ink: #0f172a;
  --ink-soft: #475569;
  --ink-faint: #94a3b8;
  --line: #e2e8f0;
  --bg: #f1f5f9;
  --card: #ffffff;
  --brand: #1e3a5f;
  --brand-soft: #eef2f7;
  --gruen: #16a34a;
  --gruen-bg: #f0fdf4;
  --gelb: #d97706;
  --gelb-bg: #fffbeb;
  --rot: #dc2626;
  --rot-bg: #fef2f2;
  --radius: 14px;
  --shadow: 0 1px 2px rgba(15, 23, 42, .04), 0 8px 24px rgba(15, 23, 42, .06);
}

* { box-sizing: border-box; }

body {
  margin: 0;
  font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, Helvetica, Arial, sans-serif;
  color: var(--ink);
  background: var(--bg);
  line-height: 1.55;
  -webkit-font-smoothing: antialiased;
}

a { color: var(--brand); }

.wrap { max-width: 960px; margin: 0 auto; padding: 0 20px; }

/* Header */
.site-header {
  background: var(--brand);
  color: #fff;
  padding: 16px 0;
}
.site-header .wrap { display: flex; align-items: center; justify-content: space-between; }
.brand { display: flex; align-items: center; gap: 10px; font-weight: 700; letter-spacing: -.01em; }
.brand-mark {
  width: 34px; height: 34px; border-radius: 8px;
  background: #fff; color: var(--brand);
  display: grid; place-items: center; font-weight: 800; font-size: 15px;
}
.site-header a { color: #cbd5e1; text-decoration: none; font-size: 14px; }
.site-header a:hover { color: #fff; }
.logout { background: none; border: 0; color: #cbd5e1; cursor: pointer; font: inherit; font-size: 14px; }
.logout:hover { color: #fff; }

/* Page */
main { padding: 40px 0 64px; }
.page-title { font-size: 26px; font-weight: 800; letter-spacing: -.02em; margin: 0 0 4px; }
.page-sub { color: var(--ink-soft); margin: 0 0 28px; }

/* Cards */
.card {
  background: var(--card);
  border: 1px solid var(--line);
  border-radius: var(--radius);
  box-shadow: var(--shadow);
}

/* Audit list */
.audit-list { display: grid; gap: 14px; }
.audit-row {
  display: flex; align-items: center; gap: 18px;
  padding: 18px 20px; text-decoration: none; color: inherit;
  transition: border-color .15s, transform .15s;
}
.audit-row:hover { border-color: var(--brand); transform: translateY(-1px); }
.audit-row .meta { flex: 1; min-width: 0; }
.audit-row .meta h3 { margin: 0 0 2px; font-size: 17px; }
.audit-row .meta p { margin: 0; color: var(--ink-faint); font-size: 13px; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
.audit-row .chev { color: var(--ink-faint); font-size: 20px; }

/* Score badge (Prüfplakette) */
.score-badge {
  flex-shrink: 0;
  width: 62px; height: 62px; border-radius: 50%;
  display: grid; place-items: center;
  font-weight: 800; font-size: 20px;
  border: 3px solid;
}
.score-badge small { display: block; font-size: 9px; font-weight: 600; letter-spacing: .06em; text-transform: uppercase; }
.rating-gruen { color: var(--gruen); border-color: var(--gruen); background: var(--gruen-bg); }
.rating-gelb  { color: var(--gelb);  border-color: var(--gelb);  background: var(--gelb-bg); }
.rating-rot   { color: var(--rot);   border-color: var(--rot);   background: var(--rot-bg); }

/* Report header */
.report-hero {
  padding: 28px 28px 24px;
  display: flex; gap: 28px; align-items: center; flex-wrap: wrap;
  margin-bottom: 24px;
}
.report-hero .plakette {
  width: 128px; height: 128px; border-radius: 50%;
  display: grid; place-items: center; text-align: center;
  border: 5px solid; flex-shrink: 0;
}
.report-hero .plakette .num { font-size: 42px; font-weight: 800; line-height: 1; }
.report-hero .plakette .lbl { font-size: 10px; font-weight: 700; letter-spacing: .08em; text-transform: uppercase; margin-top: 4px; }
.report-hero .info { flex: 1; min-width: 240px; }
.report-hero .info h1 { margin: 0 0 6px; font-size: 24px; letter-spacing: -.02em; }
.report-hero .info .u { color: var(--ink-soft); font-size: 15px; word-break: break-all; }
.grade-badge { display: inline-block; font-size: 13px; font-weight: 700; padding: 5px 12px; border-radius: 999px; border: 1.5px solid; margin-top: 10px; }
.report-hero .info .verdict { font-size: 15px; color: var(--ink); margin: 10px 0 0; line-height: 1.5; }
.report-hero .info .d { color: var(--ink-faint); font-size: 13px; margin-top: 8px; }

/* Category description */
.cat-card .cdesc { font-size: 11px; color: var(--ink-faint); margin-top: 8px; line-height: 1.4; }

/* Positives */
.positives { padding: 18px 22px; display: grid; grid-template-columns: 1fr 1fr; gap: 10px 22px; }
.pos-item { display: flex; align-items: center; gap: 10px; font-size: 14px; color: var(--ink); }
.pos-item .check { display: inline-grid; place-items: center; width: 22px; height: 22px; border-radius: 50%; background: var(--gruen-bg); color: var(--gruen); font-weight: 800; font-size: 13px; flex-shrink: 0; }

/* Topics (plain-language issues) */
.topic { padding: 18px 22px; margin-bottom: 12px; }
.topic-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.topic-head h3 { margin: 0; font-size: 17px; flex: 1; }
.topic p { margin: 0; color: var(--ink-soft); font-size: 14px; line-height: 1.55; }
.topic-meta { margin-top: 8px; font-size: 12px; color: var(--ink-faint); }
.urg { font-size: 11px; font-weight: 700; padding: 4px 11px; border-radius: 999px; text-transform: uppercase; letter-spacing: .04em; white-space: nowrap; }
.urg-rot { background: var(--rot-bg); color: var(--rot); }
.urg-gelb { background: var(--gelb-bg); color: var(--gelb); }
.urg-grau { background: var(--bg); color: var(--ink-soft); }
.hint-note { font-size: 12px; color: var(--ink-faint); margin-top: 14px; font-style: italic; }

/* Einordnung der Gesamtnote gegenüber der schwächsten Kategorie */
.score-explain { font-size: 13px; color: var(--ink-soft); line-height: 1.55; margin: 6px 0 0; }

/* „Diese Punkte zuerst angehen" –
   .card bringt im Portal KEIN padding mit (das liefern erst .topic & Co.),
   deshalb hier selbst setzen, sonst klebt der Inhalt am Rand. */
.prio-box { border-left: 4px solid var(--rot); background: var(--rot-bg); margin-bottom: 18px; padding: 18px 22px; }
.prio-title { font-size: 15px; font-weight: 700; color: var(--ink); margin-bottom: 10px; }
.prio-item { display: flex; gap: 12px; align-items: flex-start; padding: 8px 0; border-bottom: 1px solid rgba(0,0,0,.06); }
.prio-item:last-of-type { border-bottom: 0; }
.prio-no { font-size: 18px; font-weight: 700; color: var(--rot); line-height: 1.2; min-width: 18px; }
.prio-name { font-size: 14px; font-weight: 700; color: var(--ink); margin-right: 8px; }
.prio-effort { font-size: 12px; color: var(--ink-soft); margin-top: 3px; }
.prio-foot { font-size: 12px; color: var(--ink-faint); margin-top: 10px; }

/* Legenden + Aufwands-Kennzeichnung */
.urg-legend { font-size: 12px; color: var(--ink-faint); margin: 4px 0 10px; }
.urg-legend .sep { margin: 0 6px; }
.effort-legend { font-size: 12px; color: var(--ink-soft); background: #f8fafc; border: 1px solid var(--line);
                 border-radius: 10px; padding: 12px 16px; margin-bottom: 14px; }
.effort-legend b { color: var(--ink); }
.effort-legend-row { margin-top: 4px; }
.effort { display: inline-block; font-size: 11px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em;
          background: #eef2f7; color: var(--ink-soft); padding: 2px 8px; border-radius: 5px; margin-right: 6px; }
.topic-count { color: var(--ink-faint); font-size: 12px; }

/* „Was Sie jetzt tun können" (ebenfalls .card ohne eigenes padding) */
.next-steps { padding: 8px 22px; }
.next-steps .step { display: flex; gap: 12px; align-items: flex-start; padding: 12px 0; border-bottom: 1px solid var(--line); font-size: 14px; line-height: 1.55; }
.next-steps .step:last-child { border-bottom: 0; }
.next-steps .step-no { font-size: 16px; font-weight: 700; color: var(--brand); min-width: 18px; }

/* Screenshots */
.shots { display: flex; gap: 20px; align-items: flex-start; margin-bottom: 24px; }
.shot-desktop { flex: 1; min-width: 0; }
.shot-mobile { width: 150px; flex-shrink: 0; }
.shot-frame { border: 1px solid var(--line); border-radius: 10px; overflow: hidden; background: #fff; box-shadow: var(--shadow); }
.shot-mobile .shot-frame { border-radius: 18px; border-width: 4px; }
.shot-frame img { display: block; width: 100%; height: auto; }
.shot-label { text-align: center; font-size: 12px; color: var(--ink-faint); margin-top: 6px; font-weight: 600; }
@media (max-width: 640px) { .shots { flex-direction: column; } .shot-mobile { width: 60%; margin: 0 auto; } }

/* Category score grid */
.cat-grid { display: grid; grid-template-columns: repeat(auto-fit, minmax(150px, 1fr)); gap: 14px; margin-bottom: 32px; }
.cat-card { padding: 20px; text-align: center; }
.cat-card .cscore { font-size: 34px; font-weight: 800; letter-spacing: -.02em; }
.cat-card .clabel { font-size: 14px; font-weight: 600; color: var(--ink-soft); margin-top: 2px; }
.cat-card .cfind { font-size: 12px; color: var(--ink-faint); margin-top: 6px; }
.cat-card .bar { height: 6px; border-radius: 3px; background: var(--line); margin-top: 14px; overflow: hidden; }
.cat-card .bar span { display: block; height: 100%; border-radius: 3px; }
.fill-gruen { background: var(--gruen); }
.fill-gelb  { background: var(--gelb); }
.fill-rot   { background: var(--rot); }
.text-gruen { color: var(--gruen); }
.text-gelb  { color: var(--gelb); }
.text-rot   { color: var(--rot); }

/* Findings */
.section-title { font-size: 15px; font-weight: 700; text-transform: uppercase; letter-spacing: .04em; color: var(--ink-soft); margin: 32px 0 14px; }
.finding { padding: 18px 20px; margin-bottom: 12px; }
.finding-head { display: flex; align-items: center; gap: 12px; margin-bottom: 8px; }
.finding-head h4 { margin: 0; font-size: 16px; flex: 1; }
.badge {
  font-size: 11px; font-weight: 700; padding: 3px 9px; border-radius: 999px;
  text-transform: uppercase; letter-spacing: .03em; white-space: nowrap;
}
.sev-kritisch { background: var(--rot-bg); color: var(--rot); }
.sev-hoch     { background: var(--rot-bg); color: var(--rot); }
.sev-mittel   { background: var(--gelb-bg); color: var(--gelb); }
.sev-niedrig  { background: var(--brand-soft); color: var(--brand); }
.sev-info     { background: var(--bg); color: var(--ink-soft); }
.finding p { margin: 0; color: var(--ink-soft); font-size: 14px; }
.finding .aff { margin-top: 8px; font-size: 12px; color: var(--ink-faint); word-break: break-all; }

.empty { padding: 48px 20px; text-align: center; color: var(--ink-faint); }

/* Login */
.login-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.login-card { width: 100%; max-width: 380px; padding: 32px; }
.login-card .brand { justify-content: center; margin-bottom: 6px; color: var(--brand); }
.login-card h1 { text-align: center; font-size: 20px; margin: 0 0 24px; }
.field { margin-bottom: 16px; }
.field label { display: block; font-size: 13px; font-weight: 600; margin-bottom: 6px; }
.field input[type=email], .field input[type=password] {
  width: 100%; padding: 11px 13px; border: 1px solid var(--line); border-radius: 9px;
  font: inherit; background: #fff;
}
.field input:focus { outline: none; border-color: var(--brand); box-shadow: 0 0 0 3px rgba(30,58,95,.12); }
.btn {
  width: 100%; padding: 12px; border: 0; border-radius: 9px; cursor: pointer;
  background: var(--brand); color: #fff; font: inherit; font-weight: 600;
}
.btn:hover { background: #16304f; }
.alert { background: var(--rot-bg); color: var(--rot); padding: 10px 13px; border-radius: 9px; font-size: 14px; margin-bottom: 16px; }
.remember { display: flex; align-items: center; gap: 8px; font-size: 14px; color: var(--ink-soft); margin-bottom: 18px; }

@media (max-width: 640px) {
  .cat-grid { grid-template-columns: 1fr; }
  .report-hero { justify-content: center; text-align: center; }
}

/* Kategorie-Tabs (Kundenbericht) */
.tabs { display: flex; flex-wrap: wrap; gap: 4px; margin-bottom: 16px; border-bottom: 1px solid var(--line); }
.tab { background: transparent; border: 0; border-bottom: 2px solid transparent; margin-bottom: -1px; padding: 9px 14px; font: inherit; font-size: 14px; font-weight: 600; color: var(--ink-soft); cursor: pointer; display: inline-flex; align-items: center; gap: 8px; border-radius: 8px 8px 0 0; }
.tab:hover { color: var(--ink); background: var(--brand-soft); }
.tab.active { color: var(--brand); border-bottom-color: var(--brand); }
.tab-count { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--line); color: var(--ink-soft); font-size: 11px; font-weight: 700; }
.tab.active .tab-count { background: var(--brand); color: #fff; }
.tab-panel { display: none; }
.tab-panel.active { display: block; }
