:root {
  --bg: #f4f5f7; --card: #ffffff; --ink: #1a1a1a; --muted: #6b7280;
  --line: #e3e5e8; --brand: #0036fe; --brand-dark: #0029c4;
  --good: #1a7f37; --warn: #bf8700; --bad: #cf222e;
}
* { box-sizing: border-box; }
html, body { max-width: 100%; overflow-x: hidden; }
body { margin: 0; background: var(--bg); color: var(--ink);
  font-family: -apple-system, "Segoe UI", Roboto, Helvetica, Arial, sans-serif; line-height: 1.5;
  -webkit-text-size-adjust: 100%; }
a { color: var(--brand); text-decoration: none; word-break: break-word; }
/* lange Domains/Hashes/IPs umbrechen statt Seite zu sprengen */
.mono { font-family: "SF Mono", Menlo, Consolas, monospace; overflow-wrap: anywhere; word-break: break-word; }
.muted { color: var(--muted); }

.topbar { display: flex; justify-content: space-between; align-items: center; gap: 10px;
  background: #0f172a; color: #fff; padding: 12px 16px; }
.topbar .brand { color: #fff; font-weight: 700; font-size: 17px; display: flex; align-items: center; gap: 9px; }
.brand-logo { height: 22px; width: auto; filter: brightness(0) invert(1); }  /* Logo weiß auf dunklem Header */
.brand-logo-lg { height: 44px; width: auto; margin-bottom: 10px; }             /* Original-Blau auf heller Login-Karte */
.topbar .who { margin-right: 10px; opacity: .85; }
.topbar nav { display: flex; align-items: center; gap: 8px; flex-shrink: 0; }
.container { max-width: 980px; margin: 20px auto; padding: 0 14px; }
.foot { text-align: center; color: var(--muted); font-size: 12px; padding: 26px 12px; }

.card { background: var(--card); border: 1px solid var(--line); border-radius: 12px;
  padding: 18px; margin-bottom: 16px; box-shadow: 0 1px 2px rgba(0,0,0,.04);
  overflow-wrap: anywhere; }
h1 { margin-top: 0; overflow-wrap: anywhere; }
h1, h2, h3 { overflow-wrap: anywhere; }

.btn { display: inline-block; background: #eef1f5; color: var(--ink); border: 1px solid var(--line);
  padding: 10px 16px; border-radius: 8px; font-size: 14px; cursor: pointer; font-weight: 600;
  line-height: 1.2; }
.btn:hover { background: #e4e8ee; }
.btn-primary { background: var(--brand); color: #fff; border-color: var(--brand); }
.btn-primary:hover { background: var(--brand-dark); }
.btn-ghost { background: transparent; color: #fff; border-color: rgba(255,255,255,.3); }
.btn-block { display: block; width: 100%; text-align: center; }

.scan-form .input-row { display: flex; gap: 10px; flex-wrap: wrap; }
.scan-form input[type=text] { flex: 1 1 220px; min-width: 0; }
input[type=text], input[type=password], textarea {
  width: 100%; max-width: 100%; padding: 12px; border: 1px solid var(--line); border-radius: 8px;
  font-size: 16px; font-family: inherit; }   /* 16px: verhindert iOS-Zoom beim Fokus */
textarea { resize: vertical; }
label { display: block; font-size: 14px; font-weight: 600; margin-bottom: 4px; }
.stack label { margin-bottom: 12px; }
.check { display: flex; align-items: flex-start; gap: 8px; font-weight: 500; margin: 10px 0; }
.check input { width: auto; margin-top: 3px; flex-shrink: 0; }
.active-box { margin-top: 14px; }
.active-note { margin-top: 8px; }

.alert { padding: 12px 14px; border-radius: 8px; margin: 12px 0; font-size: 14px; overflow-wrap: anywhere; }
.alert-bad { background: #fdecee; color: #86131e; border: 1px solid #f6c6cc; }
.alert-warn { background: #fdf5e6; color: #7a5600; border: 1px solid #f3dfab; }

/* Tabellen: nur die Tabelle scrollt, nie die ganze Seite */
.table-wrap { width: 100%; overflow-x: auto; -webkit-overflow-scrolling: touch; }
.scans { width: 100%; border-collapse: collapse; }
.scans th, .scans td { text-align: left; padding: 10px 8px; border-bottom: 1px solid var(--line); font-size: 14px; }
.scans td.mono { max-width: 60vw; }
.scans tbody tr { cursor: pointer; }
.scans tbody tr:hover { background: #f8fafc; }

.badge { color: #fff; padding: 3px 9px; border-radius: 20px; font-size: 12px; font-weight: 700; white-space: nowrap; }
.tag { font-size: 11px; padding: 2px 7px; border-radius: 5px; background: #eef1f5; color: #555; white-space: nowrap; }
.tag-active { background: #fdecdc; color: #9a4a00; }

.login-card { max-width: 380px; margin: 6vh auto; background: var(--card);
  border: 1px solid var(--line); border-radius: 14px; padding: 28px; text-align: center; }
.login-card h1 { margin: 0 0 4px; }
.divider { color: var(--muted); font-size: 13px; margin: 16px 0; }
.login-card form { text-align: left; margin-top: 8px; }

.scan-head { margin-bottom: 6px; }
.scan-head .back { font-size: 13px; }
.scan-head h1 { margin: 4px 0; font-size: 22px; }

.overview { display: flex; align-items: center; gap: 20px; flex-wrap: wrap; }
.score-badge { color: #fff; border-radius: 14px; padding: 16px 22px; text-align: center; min-width: 104px; }
.score-num { font-size: 42px; font-weight: 800; line-height: 1; }
.score-max { opacity: .85; font-size: 14px; }
.score-side { flex: 1 1 220px; min-width: 0; }
.counts { margin: 8px 0 14px; display: flex; flex-wrap: wrap; gap: 6px; }
.pill { display: inline-block; padding: 3px 10px; border-radius: 20px; font-size: 13px; color: #fff; white-space: nowrap; }
.pill.bad { background: var(--bad); } .pill.warn { background: var(--warn); } .pill.good { background: var(--good); }
.actions { display: flex; gap: 10px; flex-wrap: wrap; }

.findings, .top-findings { list-style: none; padding: 0; margin: 8px 0 0; }
.findings li, .top-findings li { display: flex; gap: 10px; padding: 9px 0; border-bottom: 1px solid #f0f1f3; }
.findings li > div, .top-findings li > div { min-width: 0; flex: 1; overflow-wrap: anywhere; }  /* min-width:0 = Umbruch in Flex */
.dot { width: 10px; height: 10px; border-radius: 50%; margin-top: 6px; flex-shrink: 0; }
.detail { font-size: 13px; color: #444; overflow-wrap: anywhere; }
.detail code, .evidence { font-family: "SF Mono", Menlo, Consolas, monospace; font-size: 12px; overflow-wrap: anywhere; }
.reco { font-size: 13px; color: var(--brand); margin-top: 2px; overflow-wrap: anywhere; }
.cat-head { display: flex; justify-content: space-between; align-items: center; gap: 10px; flex-wrap: wrap; }
.cat-head h3 { margin: 0; }

.running { text-align: center; padding: 36px 16px; }
.spinner { width: 42px; height: 42px; border: 4px solid #e3e5e8; border-top-color: var(--brand);
  border-radius: 50%; margin: 0 auto 16px; animation: spin 0.9s linear infinite; }
@keyframes spin { to { transform: rotate(360deg); } }

/* CVE-Liste */
.cve { font-weight: 700; }
.sev { display: inline-block; padding: 1px 7px; border-radius: 5px; font-size: 11px; font-weight: 700; color: #fff; white-space: nowrap; margin-left: 4px; }
.sev.crit { background: #7c1420; } .sev.high { background: var(--bad); }
.sev.med { background: var(--warn); } .sev.low { background: #57606a; }

@media (max-width: 680px) {
  .container { padding: 0 10px; margin: 14px auto; }
  .card { padding: 15px; border-radius: 10px; }
  .overview { flex-direction: column; align-items: stretch; text-align: center; }
  .score-side { text-align: center; }
  .counts, .actions { justify-content: center; }
  .actions .btn { flex: 1 1 auto; }
  .scan-head h1 { font-size: 19px; }
  .score-num { font-size: 38px; }
  /* Nebeninfos in der Liste auf kleinen Screens ausblenden */
  .scans .col-hide-sm { display: none; }
  .scans td.mono { max-width: none; }
}
