@import url('https://fonts.googleapis.com/css2?family=Manrope:wght@400;500;600;700;800&family=JetBrains+Mono:wght@400;500;600&display=swap');

:root {
  /* Nur noch fuer Datenschutz, Impressum und die Discord-Verknuepfung. Die Farbwerte
     folgen der Richtung "Schwarz" aus landing.css: drei Stufen Schwarz, helle
     Schrift, Rot nur fuer Warnungen. Die Namen bleiben, damit die Stilbloecke der
     drei Seiten weiter passen. --accent ist hier die Farbe von Verweisen und darum
     hell, nicht rot. */
  --bg: #0a0a0b;
  --card: #111113;
  --card-hover: #1c1c1f;
  --bg-elevated: #161618;
  --sidebar: #060607;
  --border: #2b2b30;
  --border-soft: #212125;
  --text: #f2f2f3;
  --text-dim: #a0a0a7;
  --text-faint: #6c6c74;
  --accent: #f2f2f3;
  --accent-fg: #0a0a0b;
  --accent-strong: #ffffff;
  --accent-glow: #f2f2f3;
  --accent-soft: #161618;
  --ring: #6c6c74;
  --green: #45c08f;
  --green-bg: rgba(69, 192, 143, .10);
  --amber: #e3ae3f;
  --amber-bg: rgba(227, 174, 63, .10);
  --red: #ff5a5f;
  --red-bg: rgba(229, 38, 43, .10);
  --radius-sm: 6px;
  --radius: 8px;
  --radius-lg: 12px;
  --shadow-card: none;
  --shadow-pop: 0 18px 44px -24px rgba(0, 0, 0, .9);
  --glow-btn: none;
  --glow-soft: none;
}

* { box-sizing: border-box; }
html { color-scheme: dark; }
body {
  margin: 0;
  background: var(--bg);
  color: var(--text);
  font-family: 'Manrope', -apple-system, 'Segoe UI', sans-serif;
  -webkit-font-smoothing: antialiased;
  min-height: 100vh;
}
::selection { background: #2b2b30; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: #2b2b30; border-radius: 99px; border: 2px solid var(--bg); }
::-webkit-scrollbar-track { background: transparent; }

/* ---------- shell / sidebar ---------- */
.shell { min-height: 100vh; padding-left: 256px; }
.sidebar {
  position: fixed; inset: 0 auto 0 0; width: 256px;
  padding: 20px 16px; display: flex; flex-direction: column;
  background: var(--sidebar); border-right: 1px solid var(--border);
}
.brand { display: flex; align-items: center; gap: 11px; padding: 4px 8px 22px; }
.brand img { width: 32px; height: 32px; border-radius: var(--radius-sm); object-fit: cover; }
.brand span { font-weight: 600; font-size: 15px; letter-spacing: -.01em; }
.brand small { display: block; font-size: 10px; font-weight: 700; letter-spacing: .12em; color: var(--text-faint); margin-top: 1px; }
.nav-group { display: flex; flex-direction: column; gap: 2px; margin-bottom: 4px; }
/* shadcn nav item: subtle accent fill when active, no bar and no glow. */
.nav {
  display: flex; align-items: center; gap: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm);
  color: var(--text-dim); text-decoration: none; font-size: 14px; font-weight: 500;
  border: 1px solid transparent; transition: background .15s ease, color .15s ease;
}
.nav .ic { width: 18px; text-align: center; font-size: 15px; opacity: .85; }
.ic-svg { width: 1em; height: 1em; vertical-align: -2px; }
.logout-btn .ic-svg, .nav .ic .ic-svg { width: 16px; height: 16px; vertical-align: -3px; }
.nav:hover { background: var(--card-hover); color: var(--text); }
.nav.active { background: var(--card-hover); color: var(--text); }
.nav.active .ic { opacity: 1; }
.sidebar-spacer { flex: 1; }
.sidebar-foot { padding: 12px 4px 4px; border-top: 1px solid var(--border-soft); margin-top: 8px; }
.logout-btn {
  width: 100%; display: flex; align-items: center; gap: 10px; margin-top: 10px;
  padding: 8px 12px; border-radius: var(--radius-sm); border: 1px solid transparent;
  background: transparent; color: var(--text-faint); font-weight: 600; font-size: 13px; cursor: pointer;
  transition: background .15s ease, color .15s ease;
}
.logout-btn:hover { background: var(--red-bg); color: var(--red); }
.version-tag { font-size: 11px; color: var(--text-faint); padding: 0 4px; }

.content { max-width: 1280px; margin: auto; padding: 32px 36px 64px; }
.page-head { display: flex; justify-content: space-between; align-items: flex-end; gap: 16px; margin-bottom: 26px; flex-wrap: wrap; }
.page-head h1 { font-size: 30px; font-weight: 600; letter-spacing: -.025em; margin: 0 0 6px; }
.page-head p { margin: 0; color: var(--text-dim); font-size: 14px; }
.eyebrow { text-transform: uppercase; letter-spacing: .08em; font-size: 11px; font-weight: 600; color: var(--text-faint); margin: 0 0 8px; }

/* ---------- cards / grids ---------- */
/* shadcn Card: rounded-xl, border, bg-card (which equals the page background in the
   dark theme), no shadow. The border alone does the separating. */
.card {
  background: var(--card); border: 1px solid var(--border); border-radius: var(--radius-lg);
  padding: 24px;
}
.grid { display: grid; gap: 14px; }
.grid-5 { grid-template-columns: repeat(5, 1fr); }
.grid-4 { grid-template-columns: repeat(4, 1fr); }
.grid-3 { grid-template-columns: repeat(3, 1fr); }
.grid-2-3 { grid-template-columns: 3fr 2fr; }
@media (max-width: 1100px) { .grid-5, .grid-4, .grid-3 { grid-template-columns: repeat(2, 1fr); } .grid-2-3 { grid-template-columns: 1fr; } }
@media (max-width: 620px) { .grid-5, .grid-4, .grid-3, .grid-2 { grid-template-columns: 1fr; } }

.stat-card { display: flex; flex-direction: column; gap: 10px; }
.stat-top { display: flex; align-items: center; gap: 10px; }
.stat-icon { width: 34px; height: 34px; border-radius: var(--radius-sm); display: grid; place-items: center; font-size: 15px; flex-shrink: 0; }
.stat-icon .ic-svg { width: 17px; height: 17px; }
.section-title .ic-svg { width: 16px; height: 16px; vertical-align: -3px; }
.empty .ic .ic-svg { width: 26px; height: 26px; }
.stat-label { font-size: 14px; color: var(--text-dim); font-weight: 500; }
.stat-value { font-size: 30px; font-weight: 600; letter-spacing: -.025em; }
.stat-delta { font-size: 12px; font-weight: 700; display: inline-flex; align-items: center; gap: 3px; }
.up { color: var(--green); } .down { color: var(--red); }

.section-title { font-size: 15px; font-weight: 600; margin: 0 0 5px; display: flex; align-items: center; gap: 8px; letter-spacing: -.01em; }
.section-sub { font-size: 13.5px; color: var(--text-dim); margin: 0 0 18px; }

/* ---------- activity / list rows ---------- */
.row-list { display: flex; flex-direction: column; }
.row-item {
  display: grid; grid-template-columns: auto 1fr auto auto; align-items: center; gap: 14px;
  padding: 13px 4px; border-bottom: 1px solid var(--border-soft);
}
.row-item:last-child { border-bottom: none; }
.row-item .mono-id { font-size: 12px; color: var(--text-faint); }
.row-item .score { font-weight: 800; font-size: 14px; }
.row-item a.link { color: var(--accent); text-decoration: none; font-weight: 600; font-size: 13px; }
.row-item a.link:hover { text-decoration: underline; }

/* ---------- badges ---------- */
/* shadcn Badge: rounded-md, border, px-2.5 py-0.5, text-xs, font-semibold. */
.badge { display: inline-flex; align-items: center; gap: 6px; border-radius: var(--radius-sm); padding: 2px 10px; font-size: 12px; font-weight: 600; border: 1px solid transparent; line-height: 1.5; }
.badge.clean { background: var(--green-bg); color: var(--green); border-color: rgba(74, 222, 128, .25); }
.badge.suspicious { background: var(--amber-bg); color: var(--amber); border-color: rgba(251, 191, 36, .25); }
.badge.flagged { background: var(--red-bg); color: var(--red); border-color: rgba(248, 113, 113, .3); }
.dot { width: 6px; height: 6px; border-radius: 50%; background: currentColor; }

/* ---------- table ---------- */
.table-wrap { overflow: auto; border-radius: var(--radius); }
table { width: 100%; border-collapse: collapse; font-size: 13.5px; }
th { text-align: left; font-size: 13px; color: var(--text-dim); font-weight: 500; padding: 12px 16px; border-bottom: 1px solid var(--border); }
td { padding: 14px 16px; border-bottom: 1px solid var(--border); vertical-align: middle; font-size: 14px; }
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: var(--card-hover); }
tbody tr:last-child td { border-bottom: none; }
.mono { font-family: 'JetBrains Mono', monospace; }

/* ---------- forms / buttons ---------- */
/* shadcn Input: h-9, rounded-md, transparent bg, border, ring on focus. */
.field {
  width: 100%; border: 1px solid var(--border); background: transparent; color: var(--text);
  border-radius: var(--radius-sm); padding: 8px 12px; font-size: 14px; font-family: inherit;
  transition: border-color .15s ease, box-shadow .15s ease;
}
.field:focus { outline: none; border-color: var(--ring); box-shadow: 0 0 0 3px rgba(212,212,216,.16); }
.field::placeholder { color: var(--text-faint); }
label.field-label { display: block; font-size: 14px; font-weight: 500; color: var(--text); margin: 0 0 7px; }

/* shadcn Button: h-9, px-4, text-sm, font-medium, rounded-md. The default variant in
   dark mode is white-on-dark, which is the single most recognisable shadcn detail. */
.btn {
  border: 1px solid transparent; border-radius: var(--radius-sm);
  height: 36px; padding: 0 16px; font-weight: 500; font-size: 14px;
  cursor: pointer; color: var(--accent-fg); text-decoration: none;
  background: var(--accent);
  transition: background-color .15s ease, border-color .15s ease, color .15s ease, opacity .15s ease;
  display: inline-flex; align-items: center; justify-content: center; gap: 8px; white-space: nowrap;
}
.btn:hover { background: var(--accent-strong); }
.btn:focus-visible { outline: 2px solid var(--ring); outline-offset: 2px; }
.btn:active { opacity: .9; }
/* outline */
.btn.secondary { background: transparent; color: var(--text); border-color: var(--border); }
.btn.secondary:hover { background: var(--card-hover); }
/* destructive-outline */
.btn.danger { background: transparent; color: var(--red); border-color: rgba(248,113,113,.4); }
.btn.danger:hover { background: var(--red-bg); }
/* ghost */
.btn.ghost { background: transparent; color: var(--text-dim); padding: 0 12px; }
.btn.ghost:hover { background: var(--card-hover); color: var(--text); }
.btn.sm { height: 32px; padding: 0 12px; font-size: 13px; }
.icon-btn { background: none; border: 0; color: var(--text-dim); cursor: pointer; font-size: 13px; font-weight: 600; padding: 4px 6px; border-radius: 6px; text-decoration: none; }
.icon-btn:hover { color: var(--text); background: var(--border-soft); }
.icon-btn.danger:hover { color: var(--red); background: var(--red-bg); }

/* ---------- modal ---------- */
.modal { position: fixed; inset: 0; background: rgba(0,0,0,.8); display: grid; place-items: center; padding: 20px; z-index: 50; animation: fade .15s ease both; }
.modal > .card {
  width: min(480px, 100%); animation: pop .18s cubic-bezier(.2,.8,.3,1) both;
  background: var(--bg); border: 1px solid var(--border); box-shadow: var(--shadow-pop);
}
.modal h2 { margin: 0 0 18px; font-size: 18px; }
.modal .field { margin-bottom: 12px; }
.modal-actions { display: flex; justify-content: flex-end; gap: 10px; margin-top: 6px; }

/* ---------- login ---------- */
.auth-wrap { min-height: 100vh; display: grid; place-items: center; padding: 20px; }
.auth-card { width: min(420px, 100%); text-align: center; padding: 40px 34px; }
.auth-card img { width: 56px; height: 56px; border-radius: var(--radius); object-fit: cover; margin: 0 auto 20px; }
.auth-card h1 { font-size: 24px; font-weight: 800; margin: 0 0 4px; letter-spacing: -.02em; }
.auth-card p.sub { color: var(--text-dim); margin: 0 0 26px; font-size: 14px; }
.auth-card .field { text-align: center; font-size: 15px; margin-bottom: 14px; }
.auth-card .btn { width: 100%; justify-content: center; padding: 12px; }
.auth-error { color: var(--red); font-size: 13px; margin: 10px 0 0; min-height: 16px; }

/* ---------- empty state ---------- */
.empty { text-align: center; padding: 40px 20px; color: var(--text-faint); }
.empty .ic { font-size: 30px; margin-bottom: 10px; opacity: .6; }
.hidden { display: none !important; }

/* ---------- report detail ---------- */
.module-item { border: 1px solid var(--border); border-radius: var(--radius); margin-bottom: 8px; overflow: hidden; }
.module-item summary { list-style: none; cursor: pointer; padding: 14px 16px; display: flex; align-items: center; justify-content: space-between; gap: 12px; font-weight: 700; font-size: 13.5px; }
.module-item summary::-webkit-details-marker { display: none; }
.module-item summary .meta { display: flex; align-items: center; gap: 10px; font-weight: 500; color: var(--text-dim); font-size: 12.5px; }
.module-item[open] summary { border-bottom: 1px solid var(--border-soft); }
.module-item pre { margin: 0; padding: 14px 16px; font-size: 12px; overflow: auto; color: var(--text-dim); background: var(--bg-elevated); }
.pts { color: var(--text-faint); font-weight: 600; }

@keyframes rise { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }
@keyframes fade { from { opacity: 0; } to { opacity: 1; } }
@keyframes pop { from { opacity: 0; transform: scale(.96) translateY(4px); } to { opacity: 1; transform: none; } }

@media (max-width: 860px) {
  .shell { padding-left: 0; }
  .sidebar { position: static; width: auto; flex-direction: row; align-items: center; padding: 14px 16px; overflow-x: auto; }
  .brand { padding: 0 14px 0 0; }
  .nav-group { flex-direction: row; }
  .sidebar-spacer { display: none; }
  .sidebar-foot { display: none; }
  .content { padding: 22px 18px 40px; }
}

@media print {
  /* Overriding the tokens (rather than individual classes) means every element using var(--text)/var(--text-dim)/etc.
     automatically gets print-safe colors, instead of needing every text class enumerated and kept in sync by hand. */
  :root {
    --bg: #fff; --bg-elevated: #f8fafc; --card: #fff; --card-hover: #fff;
    --border: #ccc; --border-soft: #ddd;
    --text: #111; --text-dim: #444; --text-faint: #666;
    --green-bg: #dcfce7; --green: #166534;
    --amber-bg: #fef3c7; --amber: #92400e;
    --red-bg: #fee2e2; --red: #991b1b;
    --accent: #18181b; --accent-fg: #fff; --shadow-card: none; --shadow-pop: none;
  }
  .sidebar, .btn, .icon-btn, .logout-btn, .nav { display: none !important; }
  .shell { padding-left: 0 !important; }
  .content { max-width: 100%; padding: 0; }
  .card, .module-item { box-shadow: none !important; }
}

/* Die dunkle Kopfleiste der Unterseiten, dieselbe wie auf Preis- und Download-Seite.
   Ohne sie standen Datenschutz und Impressum als weisse Blaetter ohne Absender da. */
.kopf-leiste {
  height: 64px; display: flex; align-items: center;
  padding: 0 max(24px, calc((100% - 1152px) / 2));
  background: #060607; border-bottom: 1px solid #1a1a1d;
}
.kopf-leiste a { display: flex; align-items: center; gap: 10px; color: #f3f3f4; text-decoration: none; font-size: 15.5px; font-weight: 700; letter-spacing: -.02em; }
.kopf-leiste img { width: 30px; height: 30px; object-fit: contain; }
/* Die Sprachwahl rechts in der Leiste, wie auf den uebrigen Seiten. */
.kopf-leiste .kopf-sprache { margin-left: auto; }

/* Ein Knopf, ueberall gleich: schwarz mit feiner Kante, wie auf der Startseite und im
   Dashboard. Hier stand vorher ein heller Knopf mit dunkler Schrift. */
.btn { background: #000000; color: #f2f2f3; border: 1px solid #2b2b30; }
.btn:hover { background: #161618; border-color: #3b3b41; }
/* Verweise im Fliesstext: hell und unterstrichen, nicht rot. */
.wrap a:not(.back-link), .link-card a:not(.btn) { color: #f2f2f3; text-decoration: underline; text-underline-offset: 3px; }
