/* ITeasy Security Assessments — Design-System
   Hell-/Dunkelmodus über [data-theme]. Alle Klassennamen bleiben kompatibel
   zur Render-Logik in app.js; verändert wird nur das Erscheinungsbild. */

/* Schriften lokal (CSP erlaubt keine externen Quellen; SIL Open Font License, siehe fonts/) */
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter-latin-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0000-00FF, U+0131, U+0152-0153, U+02BB-02BC, U+02C6, U+02DA, U+02DC, U+0304, U+0308, U+0329, U+2000-206F, U+20AC, U+2122, U+2191, U+2193, U+2212, U+2215, U+FEFF, U+FFFD; }
@font-face { font-family: "Inter Variable"; font-style: normal; font-display: swap; font-weight: 100 900;
  src: url(fonts/inter-latin-ext-wght-normal.woff2) format("woff2-variations");
  unicode-range: U+0100-02BA, U+02BD-02C5, U+02C7-02CC, U+02CE-02D7, U+02DD-02FF, U+0304, U+0308, U+0329, U+1D00-1DBF, U+1E00-1E9F, U+1EF2-1EFF, U+2020, U+20A0-20AB, U+20AD-20C0, U+2113, U+2C60-2C7F, U+A720-A7FF; }
@font-face { font-family: "JetBrains Mono"; font-style: normal; font-display: swap; font-weight: 400;
  src: url(fonts/jetbrains-mono-latin-400-normal.woff2) format("woff2"); }

/* ---------- Design-Tokens ---------- */
:root {
  --brand: #1F6FEB;
  --brand-2: #0FB5A6;
  --grad: linear-gradient(135deg, #1F6FEB 0%, #0FB5A6 100%);

  --bg: #F4F6FB;
  --bg-2: #EAEEF6;
  --surface: #FFFFFF;
  --surface-2: #F7F9FC;
  --surface-3: #EEF2F8;
  --sidebar: #0E1A2B;
  --sidebar-ink: #AEBED4;
  --sidebar-ink-strong: #FFFFFF;

  --ink: #10243A;
  --ink-2: #334B66;
  --muted: #64748B;
  --line: #E2E8F2;
  --line-2: #D4DEEC;

  --red: #C8102E;
  --btn-danger: #C8102E;
  --red-bg: #FCEBED; --red-line: #F3C0C7;
  --amber: #9A6700;
  --amber-bg: #FFF7E6; --amber-line: #F2DCA0;
  --green: #138A4E;
  --green-bg: #E6F6EE; --green-line: #B3E2C8;
  --info: #1E5AA8;
  --info-bg: #E9F1FC; --info-line: #C2D8F3;

  --shadow-sm: 0 1px 2px rgba(16,36,58,.06), 0 1px 3px rgba(16,36,58,.08);
  --shadow: 0 2px 6px rgba(16,36,58,.06), 0 8px 24px rgba(16,36,58,.08);
  --shadow-lg: 0 12px 40px rgba(16,36,58,.16);
  --ring: 0 0 0 3px rgba(31,111,235,.22);

  --r-sm: 8px; --r: 12px; --r-lg: 16px; --r-full: 999px;
  --sidebar-w: 256px;
  --maxw: 1240px;

  --sans: "Inter Variable", "Inter", "Segoe UI", system-ui, -apple-system, sans-serif;
  --mono: "JetBrains Mono", "SF Mono", Consolas, "Courier New", monospace;
}

[data-theme="dark"] {
  --bg: #0A1120;
  --bg-2: #0E1626;
  --surface: #121C2E;
  --surface-2: #16223A;
  --surface-3: #1D2B44;
  --sidebar: #0A101C;
  --sidebar-ink: #9FB0C8;
  --sidebar-ink-strong: #FFFFFF;

  --ink: #E8EEF7;
  --ink-2: #B7C4D6;
  --muted: #8295AD;
  --line: #233247;
  --line-2: #2C3E57;

  --red-bg: #2A1419; --red-line: #5B2530; --red: #FF8A9B;
  --btn-danger: #D8333D;
  --amber-bg: #2A2110; --amber-line: #5A4620; --amber: #F2C25B;
  --green-bg: #0E261A; --green-line: #1F5138; --green: #63D79B;
  --info-bg: #12223A; --info-line: #27456F; --info: #7FB0F0;

  --shadow-sm: 0 1px 2px rgba(0,0,0,.4);
  --shadow: 0 2px 8px rgba(0,0,0,.35), 0 12px 32px rgba(0,0,0,.4);
  --shadow-lg: 0 16px 48px rgba(0,0,0,.55);
  --ring: 0 0 0 3px rgba(31,111,235,.4);
}

* { box-sizing: border-box; }
/* Das hidden-Attribut muss immer gewinnen – auch gegen display-Regeln (z. B. .nav a { display: flex }). */
[hidden] { display: none !important; }

html { -webkit-text-size-adjust: 100%; }

body {
  margin: 0;
  font: 15px/1.6 var(--sans);
  color: var(--ink);
  background: var(--bg);
  min-height: 100vh;
  display: grid;
  grid-template-columns: var(--sidebar-w) 1fr;
  grid-template-rows: auto 1fr;
  grid-template-areas: "sidebar topbar" "sidebar main";
  transition: background .25s ease, color .25s ease;
}

/* Abgemeldet (Login): #nav ist hidden → Sidebar/Topbar ausblenden, Inhalt zentrieren */
body:has(#nav[hidden]) {
  grid-template-columns: 1fr;
  grid-template-areas: "main";
}
body:has(#nav[hidden]) .sidebar,
body:has(#nav[hidden]) .topbar { display: none; }

a { color: var(--brand); text-decoration: none; }
a:hover { color: var(--brand-2); text-decoration: underline; }

/* ---------- Sidebar ---------- */
.sidebar {
  grid-area: sidebar;
  background: var(--sidebar);
  color: var(--sidebar-ink);
  display: flex;
  flex-direction: column;
  gap: 4px;
  padding: 18px 14px;
  position: sticky;
  top: 0;
  height: 100vh;
  overflow-y: auto;
  border-right: 1px solid rgba(255,255,255,.06);
}
.brand {
  display: flex; align-items: center; gap: 11px;
  color: var(--sidebar-ink-strong);
  font-weight: 700; font-size: 16px; letter-spacing: -.01em;
  padding: 6px 8px 16px;
}
.brand:hover { color: var(--sidebar-ink-strong); text-decoration: none; }
.brand .logo {
  width: 34px; height: 34px; border-radius: 9px;
  background: var(--grad);
  display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 17px; flex: none;
  box-shadow: 0 4px 12px rgba(15,181,166,.4);
}
.brand small { display: block; font-weight: 500; font-size: 11px; color: var(--sidebar-ink); letter-spacing: .02em; }

.nav { display: flex; flex-direction: column; gap: 2px; flex: 1 1 auto; }
.nav a, .nav .link {
  display: flex; align-items: center; gap: 11px;
  color: var(--sidebar-ink);
  padding: 9px 11px;
  border-radius: var(--r-sm);
  font-size: 14px; font-weight: 500;
  text-decoration: none;
  transition: background .15s ease, color .15s ease;
  white-space: nowrap;
}
.nav a svg, .nav .link svg { width: 18px; height: 18px; flex: none; opacity: .85; }
.nav a:hover, .nav .link:hover {
  background: rgba(255,255,255,.07);
  color: var(--sidebar-ink-strong);
  text-decoration: none;
}
.nav a[aria-current="page"] {
  background: rgba(31,111,235,.18);
  color: #fff;
  box-shadow: inset 3px 0 0 var(--brand-2);
}
.nav a[aria-current="page"] svg { opacity: 1; }
.nav .nav-sep { height: 1px; background: rgba(255,255,255,.08); margin: 10px 4px; }
.nav .link {
  background: none; border: none; width: 100%;
  text-align: left; cursor: pointer; font-family: inherit;
  margin-top: auto;
}

/* ---------- Topbar ---------- */
.topbar {
  grid-area: topbar;
  display: flex; align-items: center; gap: 14px;
  padding: 0 28px;
  height: 62px;
  background: color-mix(in srgb, var(--surface) 80%, transparent);
  backdrop-filter: saturate(180%) blur(12px);
  border-bottom: 1px solid var(--line);
  position: sticky; top: 0; z-index: 30;
}
.topbar .menu-toggle { display: none; }
.topbar-spacer { flex: 1; }
.topbar .icon-btn {
  display: grid; place-items: center;
  width: 40px; height: 40px; padding: 0;
  border-radius: var(--r-sm);
  background: var(--surface-2); color: var(--ink-2);
  border: 1px solid var(--line);
  cursor: pointer; min-height: 0;
  transition: background .15s, color .15s, border-color .15s;
}
.topbar .icon-btn:hover { background: var(--surface-3); color: var(--ink); border-color: var(--line-2); }
.topbar .icon-btn svg { width: 19px; height: 19px; }
.theme-toggle .moon { display: none; }
.theme-toggle .sun { display: block; }
[data-theme="dark"] .theme-toggle .moon { display: block; }
[data-theme="dark"] .theme-toggle .sun { display: none; }

/* ---------- Main ---------- */
main.container {
  grid-area: main;
  width: 100%;
  max-width: var(--maxw);
  margin: 0 auto;
  padding: 28px 28px 72px;
  animation: fade .3s ease;
}
@keyframes fade { from { opacity: 0; transform: translateY(6px); } to { opacity: 1; transform: none; } }

h1 { font-size: 27px; line-height: 1.2; margin: 0 0 20px; color: var(--ink); font-weight: 700; letter-spacing: -.02em; }
h2 { font-size: 18px; margin: 30px 0 14px; color: var(--ink); font-weight: 650; letter-spacing: -.01em; }
h3 { font-size: 15px; margin: 18px 0 8px; color: var(--ink-2); font-weight: 650; }

/* ---------- Cards ---------- */
.card {
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r);
  padding: 22px 24px;
  margin-bottom: 20px;
  box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease, border-color .2s ease, transform .2s ease;
}
.card:hover { box-shadow: var(--shadow); }
.card > h1:first-child, .card > h2:first-child, .card > h3:first-child { margin-top: 0; }
details.card > summary {
  cursor: pointer; font-weight: 650; font-size: 16px; color: var(--ink);
  list-style: none; display: flex; align-items: center; gap: 8px;
}
details.card > summary::-webkit-details-marker { display: none; }
details.card > summary::before {
  content: "›"; font-size: 20px; color: var(--muted);
  transition: transform .2s ease; display: inline-block;
}
details.card[open] > summary::before { transform: rotate(90deg); }
details.card[open] > summary { margin-bottom: 14px; }

/* ---------- Formulare ---------- */
.row { display: flex; flex-wrap: wrap; gap: 14px; align-items: flex-end; }
.row > * { flex: 1 1 180px; min-width: 0; }
.row > .shrink { flex: 0 0 auto; }
label { display: block; font-size: 12.5px; color: var(--muted); margin-bottom: 5px; font-weight: 550; }
input, select, textarea {
  width: 100%; padding: 9px 12px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font: inherit; color: var(--ink);
  background: var(--surface);
  transition: border-color .15s ease, box-shadow .15s ease;
}
input::placeholder, textarea::placeholder { color: var(--muted); opacity: .7; }
input:focus, select:focus, textarea:focus { outline: none; border-color: var(--brand); box-shadow: var(--ring); }
textarea { min-height: 76px; resize: vertical; }
input[type=checkbox] { width: 17px; height: 17px; accent-color: var(--brand); }
.check { display: flex; gap: 9px; align-items: center; }
.check label { margin: 0; color: var(--ink); font-size: 14.5px; font-weight: 500; }

/* ---------- Buttons ---------- */
button, .btn {
  font: inherit; font-weight: 600;
  padding: 9px 18px; border-radius: var(--r-sm);
  border: 1px solid transparent;
  background: var(--grad); color: #fff;
  cursor: pointer; min-height: 40px;
  display: inline-flex; align-items: center; justify-content: center; gap: 7px;
  text-decoration: none; white-space: nowrap;
  box-shadow: 0 1px 2px rgba(16,36,58,.12);
  transition: filter .15s ease, transform .05s ease, box-shadow .15s ease, background .15s ease;
}
button:hover, .btn:hover { filter: brightness(1.06); color: #fff; text-decoration: none; box-shadow: var(--shadow-sm); }
button:active, .btn:active { transform: translateY(1px); }
button:focus-visible, .btn:focus-visible { outline: none; box-shadow: var(--ring); }
button.secondary {
  background: var(--surface); color: var(--brand);
  border-color: var(--line-2); box-shadow: none;
}
button.secondary:hover { background: var(--surface-3); filter: none; }
button.danger { background: var(--btn-danger); color: #fff; }
button.danger:hover { background: var(--btn-danger); filter: brightness(1.08); }
button.link {
  background: none; border: none; padding: 0; min-height: 0;
  color: var(--brand); box-shadow: none; font-weight: 600;
}
button.link:hover { filter: none; text-decoration: underline; color: var(--brand-2); }
button:disabled, .btn:disabled { opacity: .5; cursor: not-allowed; filter: none; transform: none; }
.actions { display: flex; flex-wrap: wrap; gap: 9px; }

/* ---------- Tabellen ---------- */
.table-wrap {
  overflow-x: auto;
  border: 1px solid var(--line);
  border-radius: var(--r);
  background: var(--surface);
  box-shadow: var(--shadow-sm);
}
table { width: 100%; border-collapse: collapse; background: transparent; }
th, td { text-align: left; padding: 11px 14px; border-bottom: 1px solid var(--line); vertical-align: top; }
thead th {
  background: var(--surface-2);
  font-size: 12px; color: var(--muted); font-weight: 650;
  text-transform: uppercase; letter-spacing: .03em;
  position: sticky; top: 0; z-index: 1;
}
tbody tr { transition: background .12s ease; }
tbody tr:hover { background: var(--surface-2); }
tbody tr:last-child td { border-bottom: none; }
/* Freistehende Tabelle ohne .table-wrap trotzdem gerahmt */
.card > table, .card > h2 + table { border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; }

/* ---------- Text & Badges ---------- */
.muted { color: var(--muted); font-size: 13px; }
.mono { font-family: var(--mono); font-size: 12.5px; word-break: break-all; }
.nowrap { white-space: nowrap; word-break: normal; }

.badge {
  display: inline-flex; align-items: center; gap: 5px;
  padding: 3px 10px; border-radius: var(--r-full);
  font-size: 12px; font-weight: 650; line-height: 1.5;
  border: 1px solid transparent; white-space: nowrap;
}
.badge::before {
  content: ""; width: 6px; height: 6px; border-radius: 50%;
  background: currentColor; flex: none;
}
.alert::before, .chip::before { content: none; }
.sev-Critical, .rating-ROT { background: var(--red-bg); color: var(--red); border-color: var(--red-line); }
.sev-High { background: var(--amber-bg); color: #B45309; border-color: var(--amber-line); }
[data-theme="dark"] .sev-High { color: #F3B45E; }
.sev-Medium, .rating-GELB { background: var(--amber-bg); color: var(--amber); border-color: var(--amber-line); }
.sev-Low { background: var(--info-bg); color: var(--info); border-color: var(--info-line); }
.sev-Info { background: var(--surface-3); color: var(--muted); border-color: var(--line); }
.rating-GRÜN, .ok { background: var(--green-bg); color: var(--green); border-color: var(--green-line); }
.status { background: var(--surface-3); color: var(--ink-2); border-color: var(--line); }
.status::before { background: var(--muted); }

/* ---------- Alerts ---------- */
.alert {
  padding: 13px 16px; border-radius: var(--r-sm);
  margin-bottom: 18px; border: 1px solid; font-size: 14px;
  display: flex; flex-direction: column;
}
.alert.error { background: var(--red-bg); border-color: var(--red-line); color: var(--red); }
.alert.warn { background: var(--amber-bg); border-color: var(--amber-line); color: var(--amber); }
.alert.success { background: var(--green-bg); border-color: var(--green-line); color: var(--green); }
.alert ul { margin: 7px 0 0; padding-left: 20px; }

/* ---------- Findings ---------- */
.finding {
  border: 1px solid var(--line); border-left-width: 4px;
  border-radius: var(--r-sm); padding: 15px 17px; margin-bottom: 13px;
  background: var(--surface); box-shadow: var(--shadow-sm);
  transition: box-shadow .2s ease;
}
.finding:hover { box-shadow: var(--shadow); }
.finding.fp { opacity: .6; }
.finding:has(.sev-Critical) { border-left-color: var(--red); }
.finding:has(.sev-High) { border-left-color: #E8803B; }
.finding:has(.sev-Medium) { border-left-color: var(--amber); }
.finding:has(.sev-Low) { border-left-color: var(--info); }
.finding:has(.sev-Info) { border-left-color: var(--line-2); }
.finding-head { display: flex; flex-wrap: wrap; gap: 9px; align-items: center; margin-bottom: 7px; }
.finding-title { font-weight: 650; color: var(--ink); }

.meta { display: flex; flex-wrap: wrap; gap: 6px; margin: 7px 0; }
.meta a.badge { text-decoration: none; }
.chips { display: flex; flex-wrap: wrap; gap: 5px; align-items: center; margin: 7px 0; }
.chip {
  display: inline-block; padding: 2px 9px;
  border: 1px solid var(--line-2); border-radius: var(--r-sm);
  font-size: 12px; color: var(--muted); background: var(--surface-2);
  white-space: nowrap;
}

/* ---------- Code / pre ---------- */
pre {
  white-space: pre-wrap; word-break: break-word;
  background: #0B1220; color: #D7E3F4;
  padding: 14px 16px; border-radius: var(--r-sm);
  max-height: 380px; overflow: auto;
  font-family: var(--mono); font-size: 12.5px; line-height: 1.6;
  border: 1px solid #1B2740;
}
details summary { cursor: pointer; color: var(--brand); }

/* ---------- Layouts ---------- */
.grid2 { display: grid; grid-template-columns: repeat(auto-fit, minmax(320px, 1fr)); gap: 20px; }
.kv { display: grid; grid-template-columns: 180px 1fr; gap: 8px 14px; }
.kv dt { color: var(--muted); font-size: 13.5px; }
.kv dd { margin: 0; color: var(--ink); }

/* ---------- Login ---------- */
.login {
  max-width: 420px; margin: 9vh auto 0;
  background: var(--surface);
  border: 1px solid var(--line);
  border-radius: var(--r-lg);
  padding: 34px 32px;
  box-shadow: var(--shadow-lg);
}
.login h1 { text-align: center; }
.login .login-logo {
  width: 54px; height: 54px; border-radius: 14px; margin: 0 auto 18px;
  background: var(--grad); display: grid; place-items: center;
  color: #fff; font-weight: 800; font-size: 26px;
  box-shadow: 0 8px 24px rgba(15,181,166,.4);
}
body:has(#nav[hidden]) { background:
  radial-gradient(1200px 600px at 100% -10%, rgba(15,181,166,.10), transparent 60%),
  radial-gradient(900px 500px at -10% 110%, rgba(31,111,235,.12), transparent 60%),
  var(--bg); }

/* ---------- Screenshots ---------- */
.shots { display: grid; grid-template-columns: repeat(auto-fill, minmax(260px, 1fr)); gap: 15px; }
.shots figure { margin: 0; border: 1px solid var(--line); border-radius: var(--r); overflow: hidden; background: var(--surface); box-shadow: var(--shadow-sm); transition: transform .2s ease, box-shadow .2s ease; }
.shots figure:hover { transform: translateY(-2px); box-shadow: var(--shadow); }
.shots img { display: block; width: 100%; height: auto; aspect-ratio: 16 / 10; object-fit: cover; object-position: top; border-bottom: 1px solid var(--line); }
.shots figcaption { padding: 9px 11px; font-size: 13px; color: var(--muted); }

/* ---------- Mobile ---------- */
@media (max-width: 860px) {
  body { grid-template-columns: 1fr; grid-template-areas: "topbar" "main"; }
  .sidebar {
    position: fixed; top: 0; left: 0; z-index: 60;
    width: min(82vw, var(--sidebar-w)); height: 100vh;
    transform: translateX(-100%); transition: transform .25s ease;
    box-shadow: var(--shadow-lg);
  }
  body.nav-open .sidebar { transform: none; }
  body.nav-open::after {
    content: ""; position: fixed; inset: 0; z-index: 50;
    background: rgba(8,15,28,.5); backdrop-filter: blur(1px);
  }
  .topbar .menu-toggle { display: grid; }
  main.container { padding: 20px 16px 64px; }
  h1 { font-size: 23px; }
}
@media (max-width: 600px) {
  .kv { grid-template-columns: 1fr; }
  .kv dd { margin-bottom: 8px; }
  .card { padding: 18px 16px; }
}

/* Weiche Scrollleisten */
* { scrollbar-width: thin; scrollbar-color: var(--line-2) transparent; }
::-webkit-scrollbar { width: 10px; height: 10px; }
::-webkit-scrollbar-thumb { background: var(--line-2); border-radius: 99px; border: 2px solid var(--bg); }

/* ---------- Nachweise je Fund ---------- */
details.evidence { margin: 10px 0; border-top: 1px dashed var(--line); padding-top: 8px; }
details.evidence > summary { font-weight: 600; font-size: 14px; }
.evidence-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(170px, 1fr)); gap: 12px; margin-top: 10px; }
.evidence-grid figure { margin: 0; border: 1px solid var(--line); border-radius: var(--r-sm); overflow: hidden; background: var(--surface-2); }
.evidence-grid img { display: block; width: 100%; height: 120px; object-fit: cover; object-position: top; border-bottom: 1px solid var(--line); }
.evidence-grid .evidence-file { display: grid; place-items: center; height: 120px; font-weight: 700; font-size: 20px; color: var(--muted); text-decoration: none; border-bottom: 1px solid var(--line); }
.evidence-grid figcaption { padding: 7px 9px; font-size: 12.5px; word-break: break-word; }

/* ---------- Portfolio ---------- */
.dist-bar { display: flex; height: 34px; border-radius: var(--r-sm); overflow: hidden; border: 1px solid var(--line); background: var(--surface-2); }
.dist-seg { display: flex; align-items: center; justify-content: center; font-size: 13px; font-weight: 650; min-width: 52px; border: 0; }
.sev-chips { display: flex; gap: 4px; }
.sev-chips .badge { min-width: 34px; justify-content: center; padding: 2px 7px; }
.sev-chips .badge::before { content: none; }
.sev-chips .badge.zero { opacity: .35; }
.risk-num { display: inline-block; min-width: 28px; font-weight: 700; font-variant-numeric: tabular-nums; vertical-align: middle; }
svg.spark { vertical-align: middle; overflow: visible; }
svg.spark polyline { fill: none; stroke-width: 2; stroke-linejoin: round; stroke-linecap: round; }
svg.spark .spark-good { stroke: var(--green); fill: var(--green); }
svg.spark .spark-bad { stroke: var(--red); fill: var(--red); }
svg.spark .spark-flat { stroke: var(--muted); fill: var(--muted); }
svg.spark polyline.spark-good, svg.spark polyline.spark-bad, svg.spark polyline.spark-flat { fill: none; }

/* ---------- Microsoft-Anmeldung ---------- */
.ms-btn { width: 100%; background: var(--surface); color: var(--ink); border: 1px solid var(--line-2); box-shadow: none; gap: 10px; }
.ms-btn:hover { background: var(--surface-3); color: var(--ink); filter: none; }
.ms-logo { display: grid; grid-template-columns: 9px 9px; gap: 2px; }
.ms-logo i { width: 9px; height: 9px; display: block; }
.ms-logo i:nth-child(1) { background: #F25022; } .ms-logo i:nth-child(2) { background: #7FBA00; }
.ms-logo i:nth-child(3) { background: #00A4EF; } .ms-logo i:nth-child(4) { background: #FFB900; }
.login-sep { display: flex; align-items: center; gap: 10px; color: var(--muted); font-size: 12.5px; margin: 16px 0 6px; }
.login-sep::before, .login-sep::after { content: ""; flex: 1; height: 1px; background: var(--line); }

/* Gefahrenzone */
.danger-zone { border-color: var(--red-line); }
.danger-zone h2 { color: var(--red); }

/* Offerte */
.offer-totals{max-width:420px;margin:12px 0 16px auto}
.offer-totals>div{display:flex;justify-content:space-between;gap:16px;padding:4px 0}
.offer-totals .grand{border-top:2px solid var(--brand);margin-top:4px;padding-top:8px;font-size:1.05em}
.offer-totals p{margin-top:8px;text-align:right}

.deck-btn{display:inline-flex;gap:6px;align-items:center}
.deck-btn select{padding:8px 10px}

/* Einrichtung per Knopf */
.device-flow ol{margin:8px 0 8px 20px;line-height:1.9}
.device-code{font-family:ui-monospace,Consolas,monospace;font-size:1.35em;font-weight:700;letter-spacing:.12em;padding:3px 10px;border-radius:8px;background:var(--bg);border:1px solid var(--line)}
.setup-hint{border:1px dashed var(--line);border-radius:12px;padding:12px 14px;margin:6px 0 16px}
.steps{margin:8px 0 8px 18px;line-height:1.6}
button.small{padding:4px 10px;font-size:.85em}
pre.log{max-height:320px;overflow:auto;background:var(--bg);border:1px solid var(--line);border-radius:8px;padding:10px;font-size:12px;white-space:pre-wrap}
.release-box{margin:10px 0}

/* Aufwand Soll/Ist */
.tcompare{margin:8px 0 14px}
.trow{display:grid;grid-template-columns:220px 1fr 120px;gap:10px;align-items:center;padding:3px 0}
.tbars{display:flex;flex-direction:column;gap:3px}
.tbar{height:7px;border-radius:4px;min-width:2px}
.tbar.plan{background:var(--line)}
.tbar.act{background:var(--brand)}
.tbar.over,.over{background:var(--red);color:var(--red)}
strong.over{background:none}

/* Branding */
.brand .logo-img{object-fit:contain;background:#fff;padding:3px}
.login-logo-img{display:block;max-height:64px;max-width:200px;margin:0 auto 14px;object-fit:contain}
.logo-preview{margin:6px 0 10px;min-height:40px}.logo-preview img{max-height:64px;max-width:240px;border:1px solid var(--line);border-radius:8px;padding:6px;background:#fff}

/* Lizenz: Modulauswahl */
.module-grid { display: grid; grid-template-columns: repeat(auto-fill, minmax(240px, 1fr)); gap: 2px 16px; margin: 4px 0 10px; }
pre.code-block { max-height: 320px; overflow: auto; background: var(--bg); border: 1px solid var(--line); border-radius: 8px; padding: 10px; font-size: 12px; }

/* Manueller Penetrationstest */
details.card.pentest > summary { cursor: pointer; list-style: none; }
details.pentest-area { border-top: 1px solid var(--line); padding: 8px 0; }
details.pentest-area > summary { cursor: pointer; padding: 4px 0; }
.pentest-item { padding: 8px 0 8px 14px; border-bottom: 1px dashed var(--line); }
.pentest-item .row { margin-top: 6px; }

/* =====================================================================
   Übersicht (Dashboard)
   ===================================================================== */
.dash { display: flex; flex-direction: column; gap: 18px; }
.dash .dash-ico { width: 18px; height: 18px; flex: none; }

/* Farbpalette für Diagramme (gleiche Bedeutung wie Ampel/Schweregrad) */
.dash { --c-red: #E5484D; --c-orange: #F08C2B; --c-amber: #E5B000; --c-green: #2FA36B; --c-blue: #3B82F6; --c-gray: #CBD5E1; }
[data-theme="dark"] .dash { --c-red: #FF6369; --c-orange: #FF9F4A; --c-amber: #F5C842; --c-green: #3DD68C; --c-blue: #6AA5FF; --c-gray: #3A4A64; }
.c-red { --c: var(--c-red); } .c-orange { --c: var(--c-orange); } .c-amber { --c: var(--c-amber); }
.c-green { --c: var(--c-green); } .c-blue { --c: var(--c-blue); } .c-gray { --c: var(--c-gray); }

/* Kopf */
.dash-head { display: flex; align-items: flex-end; justify-content: space-between; gap: 16px; flex-wrap: wrap; }
.dash-head h1 { margin: 0; }
.dash-date { margin: 4px 0 0; color: var(--muted); font-size: .92rem; }
.dash-date::first-letter { text-transform: uppercase; }
.dash-actions { display: flex; gap: 8px; }
.dash-actions .btn { display: inline-flex; align-items: center; gap: 6px; }

/* Kennzahlen */
.kpis { display: grid; grid-template-columns: repeat(5, minmax(0, 1fr)); gap: 14px; }
.kpi { position: relative; display: flex; gap: 14px; align-items: flex-start; padding: 16px 18px; border-radius: var(--r-lg);
  background: var(--surface); border: 1px solid var(--line); box-shadow: var(--shadow-sm); color: var(--ink); text-decoration: none;
  overflow: hidden; transition: transform .15s ease, box-shadow .15s ease, border-color .15s ease; }
.kpi::before { content: ""; position: absolute; inset: 0 auto 0 0; width: 4px; background: var(--kpi, var(--brand)); }
a.kpi:hover { transform: translateY(-2px); box-shadow: var(--shadow); border-color: var(--line-2); }
.kpi-icon { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 12px; flex: none;
  background: color-mix(in srgb, var(--kpi, var(--brand)) 13%, transparent); color: var(--kpi, var(--brand)); }
.kpi-icon .dash-ico { width: 20px; height: 20px; }
.kpi-value { font-size: 1.9rem; font-weight: 750; line-height: 1.05; letter-spacing: -.02em; font-variant-numeric: tabular-nums; }
.kpi-label { font-weight: 600; font-size: .9rem; margin-top: 3px; }
.kpi-sub { color: var(--muted); font-size: .78rem; margin-top: 2px; }
.kpi-neutral { --kpi: var(--brand); } .kpi-info { --kpi: #6366F1; }
.kpi-good { --kpi: var(--c-green, #2FA36B); } .kpi-warn { --kpi: var(--c-orange, #F08C2B); } .kpi-bad { --kpi: var(--c-red, #E5484D); }
.kpi-bad .kpi-value { color: var(--c-red); }

/* Raster der Karten */
.dash-grid { display: grid; grid-template-columns: repeat(12, minmax(0, 1fr)); gap: 16px; }
.span-4 { grid-column: span 4; } .span-5 { grid-column: span 5; } .span-7 { grid-column: span 7; }
.dash-card { background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); box-shadow: var(--shadow-sm);
  padding: 18px 20px; display: flex; flex-direction: column; gap: 14px; min-width: 0; }
.dash-card-head { display: flex; align-items: center; gap: 10px; }
.dash-card-head h2 { margin: 0; font-size: 1rem; font-weight: 700; }
.dash-card-ico { display: grid; place-items: center; width: 30px; height: 30px; border-radius: 9px; background: var(--surface-3); color: var(--ink-2); }
.dash-card-ico .dash-ico { width: 16px; height: 16px; }
.dash .empty { color: var(--muted); margin: 6px 0; }

/* Ring */
.donut-wrap { display: flex; align-items: center; gap: 18px; }
.donut { width: 132px; height: 132px; flex: none; }
.donut-track { fill: none; stroke: var(--surface-3); stroke-width: 14; }
.donut-seg { fill: none; stroke: var(--c); stroke-width: 14; stroke-linecap: butt; }
.donut-num { font-size: 26px; font-weight: 750; fill: var(--ink); }
.donut-sub { font-size: 10px; fill: var(--muted); }
.legend { list-style: none; margin: 0; padding: 0; display: grid; gap: 8px; flex: 1; }
.legend li { display: flex; align-items: center; gap: 8px; font-size: .9rem; }
.legend-label { flex: 1; color: var(--ink-2); }
.legend-dot { display: inline-block; width: 10px; height: 10px; border-radius: 3px; background: var(--c); flex: none; }

/* Befunde */
.big-line { display: flex; align-items: baseline; gap: 6px; flex-wrap: wrap; font-size: .85rem; }
.big-num { font-size: 1.8rem; font-weight: 750; letter-spacing: -.02em; }
.sevbars { display: grid; gap: 10px; }
.sevbar { display: grid; grid-template-columns: 64px 1fr 40px; align-items: center; gap: 10px; font-size: .88rem; }
.sevbar-label { color: var(--ink-2); }
.sevbar-track { height: 10px; border-radius: var(--r-full); background: var(--surface-3); overflow: hidden; }
.sevbar-fill { display: block; height: 100%; border-radius: var(--r-full); background: var(--c); transition: width .5s ease; }
.sevbar-num { text-align: right; font-variant-numeric: tabular-nums; }

/* Scanbetrieb */
.bars { width: 100%; height: auto; }
.bars-grid { stroke: var(--line); stroke-dasharray: 3 4; }
.bar-ok { fill: var(--c-green); } .bar-fail { fill: var(--c-red); } .bar-empty { fill: var(--line-2); }
.bars-label { font-size: 9px; fill: var(--muted); }
.ops-stats { display: grid; grid-template-columns: repeat(3, 1fr); gap: 8px; }
.ops-stats div { background: var(--surface-2); border-radius: var(--r); padding: 8px 10px; display: flex; flex-direction: column; }
.ops-stats strong { font-size: 1.05rem; font-variant-numeric: tabular-nums; }
.ops-stats span { color: var(--muted); font-size: .74rem; }
.legend-inline { display: flex; gap: 14px; font-size: .78rem; color: var(--muted); }
.legend-inline span { display: inline-flex; align-items: center; gap: 6px; }

/* Handlungsbedarf */
.actions-list { display: grid; gap: 8px; }
.action { display: grid; grid-template-columns: 36px 1fr auto 18px; align-items: center; gap: 12px; padding: 10px 12px;
  border-radius: var(--r); border: 1px solid var(--line); background: var(--surface-2); color: var(--ink); text-decoration: none;
  text-align: left; font: inherit; cursor: pointer; width: 100%; box-shadow: none; transition: background .15s ease, border-color .15s ease; }
.action:hover { border-color: var(--line-2); background: var(--surface-3); }
.action-ico { display: grid; place-items: center; width: 36px; height: 36px; border-radius: 10px; background: color-mix(in srgb, var(--a) 14%, transparent); color: var(--a); }
.action-text { display: flex; flex-direction: column; min-width: 0; }
.action-text span { color: var(--muted); font-size: .8rem; }
.action-count { font-weight: 750; font-size: 1.15rem; color: var(--a); font-variant-numeric: tabular-nums; }
.action-go { color: var(--muted); display: grid; } .action-go .dash-ico { width: 16px; height: 16px; }
.action-bad { --a: var(--c-red); } .action-warn { --a: var(--c-orange); } .action-info { --a: var(--brand); }
.all-good { display: flex; align-items: center; gap: 14px; padding: 16px; border-radius: var(--r); background: var(--green-bg); color: var(--green); }
.all-good div { display: flex; flex-direction: column; }
.all-good-ico { display: grid; place-items: center; width: 40px; height: 40px; border-radius: 50%; background: var(--surface); }

/* Kunden mit Risiko */
.risk-list { display: flex; flex-direction: column; }
.risk-row { display: grid; grid-template-columns: 12px minmax(0, 1fr) auto 100px 40px; align-items: center; gap: 12px; padding: 10px 6px;
  border-bottom: 1px solid var(--line); color: var(--ink); text-decoration: none; border-radius: 8px; }
.risk-row:hover { background: var(--surface-2); }
.risk-row:last-of-type { border-bottom: 0; }
.risk-dot { width: 10px; height: 10px; border-radius: 50%; background: var(--c); box-shadow: 0 0 0 4px color-mix(in srgb, var(--c) 18%, transparent); }
.risk-name { display: flex; flex-direction: column; min-width: 0; }
.risk-name strong { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.risk-name .muted { font-size: .78rem; }
.risk-sev { display: flex; gap: 4px; flex-wrap: wrap; justify-content: flex-end; }
.chip { font-size: .72rem; font-weight: 700; padding: 2px 7px; border-radius: var(--r-full); color: var(--c);
  background: color-mix(in srgb, var(--c) 14%, transparent); white-space: nowrap; }
.chip.outline { background: transparent; box-shadow: inset 0 0 0 1px var(--c); }
.risk-score { font-weight: 750; text-align: right; font-variant-numeric: tabular-nums; }
.more { display: inline-flex; align-items: center; gap: 6px; align-self: flex-end; margin-top: 6px; font-size: .85rem; font-weight: 600; }
.more .dash-ico { width: 14px; height: 14px; }

/* Läufe und Termine */
.run-list, .upcoming { display: flex; flex-direction: column; }
.run-row, .up-row { display: grid; align-items: center; gap: 12px; padding: 9px 6px; border-bottom: 1px solid var(--line);
  color: var(--ink); text-decoration: none; border-radius: 8px; }
.run-row { grid-template-columns: 118px minmax(0, 1fr) 150px 90px 64px; }
.up-row { grid-template-columns: 46px minmax(0, 1fr) auto; }
.run-row:hover, .up-row:hover { background: var(--surface-2); }
.run-row:last-child, .up-row:last-child { border-bottom: 0; }
.run-main { display: flex; flex-direction: column; min-width: 0; }
.run-main strong, .run-main span { white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.run-main .muted { font-size: .8rem; }
.run-meta { display: flex; flex-direction: column; font-size: .82rem; }
.run-meta .muted { font-size: .75rem; }
.run-findings { font-size: .85rem; color: var(--ink-2); text-align: right; }
.run-rating { text-align: right; }
.pill { justify-self: start; font-size: .74rem; font-weight: 700; padding: 3px 9px; border-radius: var(--r-full); white-space: nowrap;
  color: var(--p); background: color-mix(in srgb, var(--p) 14%, transparent); }
.pill::before { content: ""; display: inline-block; width: 6px; height: 6px; border-radius: 50%; background: var(--p); margin-right: 6px; vertical-align: middle; }
.pill-ok { --p: var(--c-green); } .pill-bad { --p: var(--c-red); } .pill-warn { --p: var(--c-orange); } .pill-info { --p: var(--brand); }
.date-chip { display: flex; flex-direction: column; align-items: center; justify-content: center; width: 46px; height: 48px; border-radius: 12px;
  background: color-mix(in srgb, var(--brand) 11%, transparent); color: var(--brand); line-height: 1.05; }
.date-chip strong { font-size: 1.15rem; }
.date-chip span { font-size: .7rem; text-transform: uppercase; letter-spacing: .04em; }

/* Responsiv */
@media (max-width: 1280px) {
  .kpis { grid-template-columns: repeat(3, minmax(0, 1fr)); }
  .span-4 { grid-column: span 6; } .dash-grid > .span-4:nth-child(3) { grid-column: span 12; }
  .span-5, .span-7 { grid-column: span 12; }
}
@media (max-width: 760px) {
  .kpis { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .span-4 { grid-column: span 12; }
  .run-row { grid-template-columns: auto minmax(0, 1fr) auto; }
  .kpi { padding: 14px; gap: 10px; } .kpi-icon { display: none; } .kpi-value { font-size: 1.6rem; }
  .run-row .run-meta, .run-row .run-findings { display: none; }
  .risk-row { grid-template-columns: 12px minmax(0, 1fr) 40px; }
  .risk-row .risk-sev, .risk-row .risk-trend { display: none; }
  .donut-wrap { flex-direction: column; align-items: stretch; }
  .donut { align-self: center; }
}


/* =====================================================================
   Einheitliches Erscheinungsbild aller Seiten
   ===================================================================== */
body { font-feature-settings: "cv11", "ss01"; -webkit-font-smoothing: antialiased; }

/* Seitenleiste: Gruppen, aktive Seite, Benutzer */
.nav .nav-label { font-size: 10.5px; font-weight: 700; letter-spacing: .09em; text-transform: uppercase;
  color: color-mix(in srgb, var(--sidebar-ink) 70%, transparent); padding: 14px 11px 6px; }
.nav .nav-label:first-child { padding-top: 4px; }
.nav .nav-spacer { flex: 1; min-height: 12px; }
.nav a[aria-current="page"] { background: linear-gradient(90deg, rgba(31,111,235,.30), rgba(15,181,166,.12)); box-shadow: inset 3px 0 0 var(--brand-2); font-weight: 600; }
.nav-user { display: flex; align-items: center; gap: 10px; padding: 10px; margin: 6px 0 4px; border-radius: var(--r);
  background: rgba(255,255,255,.05); border: 1px solid rgba(255,255,255,.06); }
.nav-user:empty { display: none; }
.nav-user-text { display: flex; flex-direction: column; min-width: 0; }
.nav-user-text strong { color: #fff; font-size: 13px; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.nav-user-text span { font-size: 11.5px; color: var(--sidebar-ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
.avatar { display: grid; place-items: center; width: 34px; height: 34px; border-radius: 50%; flex: none;
  background: var(--grad); color: #fff; font-weight: 700; font-size: 13px; letter-spacing: .02em; }
.avatar.small { width: 32px; height: 32px; font-size: 12px; }
.avatar.large { width: 56px; height: 56px; font-size: 20px; }

/* Kopfleiste */
.topbar-title { font-weight: 650; color: var(--ink-2); font-size: 14.5px; }

/* Seitenkopf */
.page-head { margin: 0 0 20px; }
.page-back { display: inline-flex; font-size: 13px; font-weight: 600; color: var(--muted); margin-bottom: 10px; }
.page-back:hover { color: var(--brand); text-decoration: none; }
.page-head-row { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; }
.page-icon { display: grid; place-items: center; width: 46px; height: 46px; border-radius: 14px; flex: none;
  background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.page-icon .dash-ico { width: 22px; height: 22px; }
.page-head-text { flex: 1; min-width: 220px; }
.page-head h1 { margin: 0; display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.title-badge { display: inline-flex; font-size: 13px; font-weight: 600; letter-spacing: 0; }
.page-sub { margin: 4px 0 0; color: var(--muted); font-size: 14px; max-width: 900px; }
.page-actions { display: flex; gap: 8px; flex-wrap: wrap; align-items: center; }
.page-actions .dash-ico, button .dash-ico, .btn .dash-ico { width: 16px; height: 16px; }

/* Karten */
.card { border-radius: var(--r-lg); }
.card > h2:first-child, .card > header h2 { font-size: 16px; font-weight: 700; margin: 0 0 16px; padding-bottom: 12px; border-bottom: 1px solid var(--line); }
.card h3 { font-size: 14px; color: var(--ink); margin-top: 22px; }
.card-flush { padding: 0; overflow: hidden; }
.card-flush > .table-wrap { border: 0; border-radius: 0; box-shadow: none; }
.card.create-panel { border-color: color-mix(in srgb, var(--brand) 35%, var(--line)); box-shadow: var(--shadow); animation: fade .2s ease; }
.grid2 { gap: 20px; }

/* Werkzeugleiste mit Suche */
.toolbar { display: flex; align-items: center; gap: 10px; padding: 12px 16px; border-bottom: 1px solid var(--line); background: var(--surface); }
.toolbar-ico { color: var(--muted); display: grid; }
.toolbar-ico .dash-ico { width: 17px; height: 17px; }
.table-search { border: 0; background: transparent; padding: 6px 2px; box-shadow: none !important; font-size: 14px; }
.table-search:focus { outline: none; }

/* Tabellen */
thead th { font-size: 11.5px; letter-spacing: .05em; padding-top: 12px; padding-bottom: 12px; }
td { font-size: 14px; }
tr.row-link { cursor: pointer; }
.strong-link { font-weight: 600; color: var(--ink); }
.strong-link:hover { color: var(--brand); }
.person { display: flex; gap: 12px; align-items: center; }
.pkg { display: inline-block; font-size: 12px; font-weight: 700; padding: 3px 9px; border-radius: 6px; white-space: nowrap;
  background: var(--surface-3); color: var(--ink-2); }
.pkg-2 { background: color-mix(in srgb, var(--brand) 12%, transparent); color: var(--brand); }
.pkg-3 { background: color-mix(in srgb, #8B5CF6 15%, transparent); color: #7C3AED; }
[data-theme="dark"] .pkg-3 { color: #B79BFF; }

/* Status-Pillen auch ausserhalb der Übersicht */
.pill { --p: var(--brand); }
.pill-ok { --p: #2FA36B; } .pill-bad { --p: #E5484D; } .pill-warn { --p: #E08A1E; } .pill-info { --p: var(--brand); } .pill-muted { --p: var(--muted); }
[data-theme="dark"] .pill-ok { --p: #3DD68C; } [data-theme="dark"] .pill-bad { --p: #FF6369; } [data-theme="dark"] .pill-warn { --p: #FF9F4A; }

/* Knöpfe */
.btn.secondary { background: var(--surface); color: var(--brand); border-color: var(--line-2); box-shadow: none; }
.btn.secondary:hover { background: var(--surface-3); color: var(--brand); filter: none; }
button.small, .btn.small { min-height: 32px; padding: 5px 12px; font-size: 13px; }
button.danger { background: var(--surface); color: var(--red); border-color: var(--red-line); box-shadow: none; }
button.danger:hover { background: var(--red); color: #fff; filter: none; }
.save-btn { min-width: 140px; }

/* Formulare */
input, select, textarea { min-height: 40px; border-radius: 10px; background: var(--surface); }
input[type=checkbox], input[type=radio] { min-height: 0; }
select { appearance: none; padding-right: 34px;
  background-image: url("data:image/svg+xml,%3Csvg xmlns='http://www.w3.org/2000/svg' width='12' height='12' viewBox='0 0 24 24' fill='none' stroke='%2364748B' stroke-width='2.5' stroke-linecap='round' stroke-linejoin='round'%3E%3Cpath d='M6 9l6 6 6-6'/%3E%3C/svg%3E");
  background-repeat: no-repeat; background-position: right 12px center; }
label { font-size: 12.5px; color: var(--ink-2); font-weight: 600; }
.card .muted + .row, .card form .row + .row { margin-top: 12px; }
input[type=file] { padding: 7px 10px; }

/* Meldungen mit farbigem Rand */
.alert { border-left-width: 4px; border-radius: 10px; }

/* Register (Untermenü) */
.tabs { margin-top: 4px; }
.tabbar { display: flex; gap: 4px; border-bottom: 1px solid var(--line); margin-bottom: 20px; overflow-x: auto; scrollbar-width: thin; }
.tab { background: none; color: var(--muted); border: 0; border-bottom: 2px solid transparent; border-radius: 0; box-shadow: none;
  padding: 10px 14px; min-height: 0; font-weight: 600; font-size: 14px; display: inline-flex; gap: 8px; align-items: center; }
.tab:hover { color: var(--ink); background: none; filter: none; box-shadow: none; }
.tab[aria-selected="true"] { color: var(--brand); border-bottom-color: var(--brand); }
.tab .dash-ico { width: 16px; height: 16px; }
.tab-count { font-size: 11px; font-weight: 700; padding: 1px 7px; border-radius: var(--r-full); background: var(--surface-3); color: var(--ink-2); }
.tab-count.warn { background: var(--amber-bg); color: var(--amber); }
.tabs-vertical { display: grid; grid-template-columns: 230px minmax(0, 1fr); gap: 24px; align-items: start; }
.tabs-vertical .tabbar { flex-direction: column; border-bottom: 0; margin: 0; gap: 2px; position: sticky; top: 80px;
  background: var(--surface); border: 1px solid var(--line); border-radius: var(--r-lg); padding: 8px; box-shadow: var(--shadow-sm); }
.tabs-vertical .tab { border-bottom: 0; border-radius: 9px; justify-content: flex-start; padding: 9px 12px; width: 100%; text-align: left; }
.tabs-vertical .tab:hover { background: var(--surface-2); }
.tabs-vertical .tab[aria-selected="true"] { background: color-mix(in srgb, var(--brand) 11%, transparent); color: var(--brand); }
.tabpanel > .card:last-child { margin-bottom: 0; }

/* Zusammenfassung im Auftrag */
.summary-strip { display: grid; grid-template-columns: repeat(4, minmax(0, 1fr)); gap: 12px; margin-bottom: 20px; }
.sum-item { display: flex; gap: 12px; align-items: center; padding: 12px 14px; border-radius: var(--r); background: var(--surface);
  border: 1px solid var(--line); box-shadow: var(--shadow-sm); }
.sum-item > .dash-ico { width: 20px; height: 20px; color: var(--brand); flex: none; }
.sum-item.ok > .dash-ico { color: #2FA36B; } .sum-item.warn > .dash-ico { color: #E08A1E; }
.sum-item div { display: flex; flex-direction: column; min-width: 0; }
.sum-item span { font-size: 12px; color: var(--muted); }
.sum-item strong { font-size: 14px; display: flex; gap: 6px; align-items: center; flex-wrap: wrap; }

/* Konto */
.profile-card { display: flex; gap: 18px; align-items: center; }
.profile-card strong { font-size: 17px; }
.profile-pills { display: flex; gap: 6px; margin-top: 8px; }

/* Kennzahlen mit sechs Kacheln */
.kpis.kpis-6 { grid-template-columns: repeat(6, minmax(0, 1fr)); margin-bottom: 20px; }
.kpis.kpis-6 .kpi { padding: 14px; }
.kpis.kpis-6 .kpi-value { font-size: 1.6rem; }
:root { --c-red: #E5484D; --c-orange: #F08C2B; --c-amber: #E5B000; --c-green: #2FA36B; --c-blue: #3B82F6; --c-gray: #CBD5E1; }
[data-theme="dark"] { --c-red: #FF6369; --c-orange: #FF9F4A; --c-amber: #F5C842; --c-green: #3DD68C; --c-blue: #6AA5FF; --c-gray: #3A4A64; }

@media (max-width: 1280px) { .kpis.kpis-6 { grid-template-columns: repeat(3, minmax(0, 1fr)); } }
@media (max-width: 980px) {
  .tabs-vertical { grid-template-columns: 1fr; }
  .tabs-vertical .tabbar { position: static; flex-direction: row; overflow-x: auto; }
  .tabs-vertical .tab { width: auto; white-space: nowrap; }
  .summary-strip { grid-template-columns: repeat(2, minmax(0, 1fr)); }
}
@media (max-width: 600px) {
  .summary-strip { grid-template-columns: 1fr; }
  .page-icon { display: none; }
  .kpis.kpis-6 { grid-template-columns: repeat(2, minmax(0, 1fr)); }
  .topbar-title { display: none; }
}

/* ===== Nachweis, Massnahmenplan, Readiness, Compliance, Inventar, Lieferanten, AD-Grafik ===== */
.kpis.kpis-4 { grid-template-columns: repeat(4, minmax(0, 1fr)); margin-bottom: 20px; }
.small-text { font-size: 12.5px; }
.row-muted td { opacity: .75; }
ul.plain { margin: 0; padding-left: 18px; } ul.plain li { margin: 2px 0; }
.row-links { display: flex; gap: 12px; margin-top: 3px; font-size: 12.5px; font-weight: 500; }

.proof { border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); margin: 10px 0; overflow: hidden; }
.proof-head { display: flex; align-items: center; gap: 8px; padding: 8px 12px; border-bottom: 1px solid var(--line); font-size: 13px; }
.proof-head svg { width: 16px; height: 16px; color: var(--c-green, #2FA36B); }
.proof-head button { margin-left: auto; }
.proof pre { margin: 0; padding: 12px; background: transparent; color: var(--ink); border: 0; border-radius: 0; font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; line-height: 1.55; white-space: pre-wrap; overflow-wrap: anywhere; max-height: 320px; overflow: auto; }

details.comments { margin: 10px 0; border-top: 1px dashed var(--line); padding-top: 10px; }
details.comments > summary { cursor: pointer; font-weight: 600; color: var(--brand); }
.thread { display: flex; flex-direction: column; gap: 8px; margin: 10px 0; }
.msg { padding: 9px 12px; border-radius: 10px; border: 1px solid var(--line); max-width: 760px; background: var(--surface-2); }
.msg-team { align-self: flex-end; background: color-mix(in srgb, var(--brand) 9%, var(--surface)); border-color: color-mix(in srgb, var(--brand) 25%, var(--line)); }
.msg-meta { font-size: 12px; color: var(--muted); margin-bottom: 3px; }
.plan-box { margin: 12px 0; padding: 12px; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); }
.accept-box { margin-top: 10px; }
.plan-progress { display: flex; align-items: center; gap: 14px; margin-bottom: 16px; }
.plan-progress .meter { flex: 1; max-width: 420px; }

.meter { height: 8px; min-width: 90px; border-radius: 99px; background: var(--surface-3); overflow: hidden; }
.meter span { display: block; height: 100%; border-radius: 99px; background: var(--m, var(--brand)); }
.meter-ok { --m: #2FA36B; } .meter-warn { --m: #E08A1E; } .meter-bad { --m: #E5484D; }
.meter-cell { width: 22%; }
.readiness-head { display: flex; align-items: center; gap: 18px; margin-bottom: 14px; }
.readiness-score { font-size: 19px; font-weight: 650; }
.readiness-head p { margin: 4px 0 0; }
.grade { flex: none; width: 58px; height: 58px; border-radius: 16px; display: grid; place-items: center; font-size: 28px; font-weight: 750; color: #fff; background: var(--g, #94A3B8); }
.grade-ok { --g: #2FA36B; } .grade-warn { --g: #E08A1E; } .grade-bad { --g: #E5484D; } .grade-muted { --g: #94A3B8; }

details.framework > summary { cursor: pointer; display: flex; align-items: center; justify-content: space-between; gap: 16px; flex-wrap: wrap; list-style: none; }
details.framework > summary::-webkit-details-marker { display: none; }
.framework-name { font-size: 17px; font-weight: 650; }
.framework-name::before { content: '▸'; display: inline-block; margin-right: 8px; color: var(--muted); transition: transform .15s; }
details.framework[open] .framework-name::before { transform: rotate(90deg); }
.framework-kpi { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.framework-kpi .meter { width: 140px; }
details.framework[open] > summary { margin-bottom: 12px; }

.supplier-head { display: flex; align-items: center; gap: 16px; flex-wrap: wrap; margin-bottom: 8px; }
.supplier-title { flex: 1; min-width: 220px; } .supplier-title h2 { margin: 0 0 2px; border: 0; padding: 0; }
.port-added { color: #C2410C; font-weight: 600; }

.adgraph-wrap { overflow-x: auto; border: 1px solid var(--line); border-radius: 10px; background: var(--surface-2); padding: 4px; }
.adgraph { display: block; max-width: none; }
.adnode rect { fill: var(--surface); stroke: var(--line-2); stroke-width: 1.5; }
.adnode text { font: 600 12.5px var(--sans, sans-serif); fill: var(--ink); }
.adnode-start rect { stroke: #E08A1E; fill: color-mix(in srgb, #E08A1E 12%, var(--surface)); }
.adnode-broad rect { stroke: #E5484D; fill: color-mix(in srgb, #E5484D 14%, var(--surface)); }
.adnode-target rect { stroke: #E5484D; fill: #E5484D; } .adnode-target text { fill: #fff; }
.adgraph-line { stroke: var(--muted); stroke-width: 1.5; } .adgraph-arrow { fill: var(--muted); }
.adgraph-label { font: 500 11px var(--sans, sans-serif); fill: var(--muted); }
.adgraph-legend { display: flex; gap: 14px; flex-wrap: wrap; font-size: 12.5px; margin: 8px 0; }
.adgraph-legend .lg::before { content: ''; display: inline-block; width: 12px; height: 12px; border-radius: 4px; margin-right: 6px; vertical-align: -1px; border: 1.5px solid var(--line-2); background: var(--surface); }
.lg-start::before { border-color: #E08A1E !important; background: color-mix(in srgb, #E08A1E 20%, var(--surface)) !important; }
.lg-broad::before { border-color: #E5484D !important; background: color-mix(in srgb, #E5484D 20%, var(--surface)) !important; }
.lg-target::before { border-color: #E5484D !important; background: #E5484D !important; }
@media (max-width: 900px) { .kpis.kpis-4 { grid-template-columns: repeat(2, minmax(0, 1fr)); } .meter-cell { display: none; } }

/* ===== ISMS-Audit, Patch-Stand ===== */
.control { padding: 14px 0; border-top: 1px solid var(--line); }
.control-head { display: flex; align-items: center; gap: 10px; flex-wrap: wrap; }
.control-id { font-family: var(--mono, ui-monospace, monospace); font-size: 12.5px; padding: 2px 8px; border-radius: 6px; background: var(--surface-3); color: var(--ink-2); }
.control p { margin: 6px 0 8px; }
.control-status { min-width: 210px; }
.control-conflict { border-left: 3px solid #E08A1E; padding-left: 12px; }
.sticky-actions { position: sticky; bottom: 0; background: var(--surface); padding: 10px 0 2px; align-items: center; }
details.sub-details { margin: 6px 0 6px 14px; } details.sub-details > summary { cursor: pointer; font-weight: 600; }

.cve-box { margin-top: 16px; padding-top: 14px; border-top: 1px dashed var(--line); }
.cve-box h3 { margin: 0 0 6px; }

/* Horizontale Balken fuer die Passwort-Kategorien (Muster der schwachen Passwoerter) */
.bar-row { display: flex; align-items: center; gap: 10px; margin: 4px 0; }
.bar-row .bar-label { flex: 0 0 150px; font-size: 13px; color: var(--ink-2); }
.bar-row .bar-track { flex: 1 1 auto; height: 14px; background: var(--surface-3); border-radius: 7px; overflow: hidden; }
.bar-row .bar-fill { display: block; height: 100%; background: var(--grad); border-radius: 7px; }
.bar-row .bar-value { flex: 0 0 auto; font-size: 13px; font-variant-numeric: tabular-nums; color: var(--ink); min-width: 2ch; text-align: right; }

.stat-line { margin: 8px 0; font-size: 14px; }
.stat-line .badge { margin-right: 6px; }
