/* Self-hosted Inter + IBM Plex Mono. Previously loaded via @import from
   fonts.googleapis.com, which the CSP's style-src/font-src ('self') silently
   blocked — every page was falling back to the OS default sans/mono the
   whole time, which is what actually caused the "inconsistent fonts" look
   (different fallback per OS/browser), not a per-page mismatch. */
@font-face {
  font-family: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400-latin-ext.woff2") format("woff2");
  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: "Inter";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/inter-400-latin.woff2") format("woff2");
  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";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/inter-500-latin-ext.woff2") format("woff2");
  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: "Inter";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/inter-500-latin.woff2") format("woff2");
  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";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-600-latin-ext.woff2") format("woff2");
  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: "Inter";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/inter-600-latin.woff2") format("woff2");
  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";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-700-latin-ext.woff2") format("woff2");
  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: "Inter";
  font-style: normal;
  font-weight: 700;
  font-display: swap;
  src: url("../fonts/inter-700-latin.woff2") format("woff2");
  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";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/inter-800-latin-ext.woff2") format("woff2");
  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: "Inter";
  font-style: normal;
  font-weight: 800;
  font-display: swap;
  src: url("../fonts/inter-800-latin.woff2") format("woff2");
  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";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("../fonts/inter-900-latin-ext.woff2") format("woff2");
  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: "Inter";
  font-style: normal;
  font-weight: 900;
  font-display: swap;
  src: url("../fonts/inter-900-latin.woff2") format("woff2");
  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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-400-latin-ext.woff2") format("woff2");
  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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 400;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-400-latin.woff2") format("woff2");
  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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-500-latin-ext.woff2") format("woff2");
  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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 500;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-500-latin.woff2") format("woff2");
  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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-600-latin-ext.woff2") format("woff2");
  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: "IBM Plex Mono";
  font-style: normal;
  font-weight: 600;
  font-display: swap;
  src: url("../fonts/ibm-plex-mono-600-latin.woff2") format("woff2");
  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;
}

:root {
  /* PMI.AG brand palette (matched to dojo.pmi.ag) */
  --ink: #30383b;
  --ink-soft: #667174;
  --ink-faint: #97a3a6;
  --paper: #eef1f3;
  --paper-raised: #ffffff;
  --paper-line: #dce2e4;
  --blueprint: #101516;
  --blueprint-2: #7ea70e;
  --cyan: #9ccc17;
  --brand: #9ccc17;
  --brand-dark: #7ea70e;
  --brand-soft: #eef8d6;
  --sev-critical: #bf2f18;
  --sev-high: #c2410c;
  --sev-medium: #a16207;
  --sev-low: #2563eb;
  --sev-info: #667174;
  --ok: #247a4d;
  --focus: #7ea70e;
  --shadow: 0 14px 32px rgba(48, 56, 59, 0.08);

  /* One hue per technology_area — a consistent "legend key" across findings,
     checklist groups, and dashboard breakdowns so a category reads the same
     color everywhere in the app. */
  --ta-general: #667174;
  --ta-physical: #92400e;
  --ta-network: #0f766e;
  --ta-active_directory: #4338ca;
  --ta-m365: #2563eb;
  --ta-azure: #0891b2;
  --ta-firewall: #c2410c;
  --ta-backup: #15803d;
  --ta-endpoint: #7e22ce;
  --ta-server: #334155;
  --ta-disaster_recovery: #be123c;
  --ta-awareness: #a16207;
}

* {
  scrollbar-color: var(--ink-faint) transparent;
}

html {
  background: var(--paper);
}

body {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  color: var(--ink);
  background: var(--paper);
}

.font-display {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
  letter-spacing: -0.01em;
}

.font-mono {
  font-family: "IBM Plex Mono", ui-monospace, monospace;
}

.grid-paper {
  background-color: var(--paper);
}

.grid-paper-dark {
  background-color: var(--blueprint);
}

/* Login hero: random "endpoint found" pings over the network schematic */
@keyframes nodeFlash {
  0% {
    r: 3px;
    opacity: 0.5;
    filter: drop-shadow(0 0 0px var(--node-color, var(--brand)));
  }
  25% {
    r: 6px;
    opacity: 1;
    filter: drop-shadow(0 0 6px var(--node-color, var(--brand)));
  }
  100% {
    r: 3px;
    opacity: 0.5;
    filter: drop-shadow(0 0 0px var(--node-color, var(--brand)));
  }
}

@keyframes pingRing {
  0% {
    r: 3px;
    opacity: 0.8;
    stroke-width: 2px;
  }
  100% {
    r: 16px;
    opacity: 0;
    stroke-width: 0.5px;
  }
}

@keyframes dotBlink {
  0%,
  100% {
    opacity: 1;
  }
  50% {
    opacity: 0.25;
  }
}

.scan-node {
  fill: var(--ink-faint);
  opacity: 0.5;
}

.scan-node.is-flashing {
  animation: nodeFlash 1.3s ease-out;
}

.scan-ping {
  fill: none;
  animation: pingRing 1.1s ease-out forwards;
  pointer-events: none;
}

.scan-live {
  display: flex;
  align-items: center;
  gap: 8px;
  font-size: 0.7rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.55);
}

.scan-live-dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--brand);
  display: inline-block;
  animation: dotBlink 1.6s ease-in-out infinite;
}

/* 404 page: same network-schematic language as the login hero, but marking
   a broken node/severed link instead of a live scan */
@keyframes criticalPulse {
  0%,
  100% {
    r: 5px;
    opacity: 0.85;
    filter: drop-shadow(0 0 3px var(--sev-critical));
  }
  50% {
    r: 9px;
    opacity: 1;
    filter: drop-shadow(0 0 12px var(--sev-critical));
  }
}

@keyframes dashFlow {
  to {
    stroke-dashoffset: -24;
  }
}

.scan-node.is-critical {
  fill: var(--sev-critical);
  animation: criticalPulse 1.6s ease-in-out infinite;
}

.cut-line {
  stroke: var(--sev-critical);
  stroke-width: 1.5;
  stroke-dasharray: 6 6;
  opacity: 0.55;
  animation: dashFlow 1.4s linear infinite;
}

.error-console {
  width: 100%;
  max-width: 460px;
  background: rgba(255, 255, 255, 0.04);
  border: 1px solid rgba(255, 255, 255, 0.12);
  border-radius: 8px;
  padding: 18px 20px;
}

.error-console-tag {
  display: inline-flex;
  align-items: center;
  gap: 6px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: rgba(255, 255, 255, 0.75);
  background: color-mix(in srgb, var(--sev-critical) 18%, transparent);
  border-radius: 999px;
  padding: 3px 10px 3px 8px;
}

.error-console-tag::before {
  content: "";
  width: 7px;
  height: 7px;
  border-radius: 999px;
  background: var(--sev-critical);
  flex-shrink: 0;
}

/* Panel: soft-shadow card, PMI.AG's recurring surface */
.panel {
  position: relative;
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  box-shadow: var(--shadow);
}

.panel-tick {
  /* retired drafting-corner device; panel-tick now renders identically to .panel */
}

/* Tab bar: pill switcher for multi-section admin pages */
.tab-bar {
  display: inline-flex;
  gap: 0.25rem;
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  border-radius: 999px;
  padding: 0.25rem;
  margin-bottom: 1.5rem;
}

.tab-btn {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-size: 0.8rem;
  font-weight: 600;
  letter-spacing: 0;
  color: var(--ink-soft);
  background: transparent;
  border: none;
  border-radius: 999px;
  padding: 0.45rem 0.9rem;
  cursor: pointer;
  transition: background 0.15s ease, color 0.15s ease;
}

.tab-btn:hover {
  color: var(--ink);
}

.tab-btn.active {
  background: var(--blueprint);
  color: white;
}

.tab-count {
  font-size: 0.65rem;
  color: var(--ink-faint);
  background: var(--paper);
  border-radius: 999px;
  padding: 0.05rem 0.4rem;
}

.tab-btn.active .tab-count {
  color: rgba(255, 255, 255, 0.65);
  background: rgba(255, 255, 255, 0.12);
}

/* Stat cards: small aggregate-count panels atop admin tables */
.stat-cards {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(120px, 1fr));
  gap: 1rem;
  margin-bottom: 1.5rem;
  max-width: 32rem;
}

.stat-card {
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  border-radius: 8px;
  padding: 0.9rem 1rem;
}

.stat-value {
  font-family: "IBM Plex Mono", monospace;
  font-size: 1.5rem;
  font-weight: 600;
  color: var(--ink);
  margin-top: 0.15rem;
}

/* Dashboard hero cards: the two headline numbers (total / running audits) */
.hero-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(240px, 1fr));
  gap: 1rem;
}

.hero-card {
  position: relative;
  overflow: hidden;
  padding: 1.5rem 1.75rem;
}

.hero-card__number {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
  font-size: 3rem;
  line-height: 1;
  color: var(--ink);
  margin-top: 0.35rem;
}

.hero-card__sub {
  font-size: 0.8rem;
  color: var(--ink-soft);
  margin-top: 0.5rem;
}

.hero-card__status {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  margin-top: 0.75rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  text-transform: uppercase;
  letter-spacing: 0.06em;
  color: var(--ink-faint);
}

.status-dot {
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: var(--ink-faint);
  flex-shrink: 0;
}

.status-dot--running {
  background: var(--brand-dark);
  animation: dotBlink 1.6s ease-in-out infinite;
}

.hero-card__lupe {
  position: absolute;
  right: 1.25rem;
  bottom: 1.1rem;
  width: 34px;
  height: 34px;
  color: var(--paper-line);
}

.hero-card__lupe.is-scanning {
  color: var(--brand-dark);
  animation: lupeScan 3.6s ease-in-out infinite;
}

.hero-card__lupe--lg {
  width: 46px;
  height: 46px;
  right: 1.1rem;
  bottom: 0.9rem;
}

@keyframes dotBlink {
  0%, 100% { opacity: 1; }
  50% { opacity: 0.25; }
}

@keyframes lupeScan {
  0% { transform: translate(0, 0); }
  33% { transform: translate(6px, -4px); }
  66% { transform: translate(-5px, 3px); }
  100% { transform: translate(0, 0); }
}

/* Dashboard pipeline: the four audit-lifecycle stages */
.pipeline {
  display: grid;
  grid-template-columns: repeat(4, 1fr);
  gap: 1rem;
}

@media (max-width: 640px) {
  .pipeline {
    grid-template-columns: repeat(2, 1fr);
  }
}

.pipeline-stage {
  padding: 1.1rem 1rem;
  display: flex;
  flex-direction: column;
  gap: 0.6rem;
  border-top: 3px solid var(--paper-line);
}

.pipeline-stage__icon-wrap {
  width: 34px;
  height: 34px;
  border-radius: 999px;
  display: flex;
  align-items: center;
  justify-content: center;
  background: color-mix(in srgb, var(--stage-color, var(--ink-faint)) 14%, var(--paper-raised));
  color: var(--stage-color, var(--ink-faint));
}

.pipeline-stage__count {
  font-family: "Inter", ui-sans-serif, system-ui, sans-serif;
  font-weight: 900;
  font-size: 1.9rem;
  color: var(--ink);
}

.pipeline-stage--planned { border-top-color: var(--ink-faint); --stage-color: var(--ink-faint); }
.pipeline-stage--progress { border-top-color: var(--brand-dark); --stage-color: var(--brand-dark); }
.pipeline-stage--review { border-top-color: var(--sev-medium); --stage-color: var(--sev-medium); }
.pipeline-stage--done { border-top-color: var(--ok); --stage-color: var(--ok); }

.icon-tick-dot {
  animation: iconTick 2.4s ease-in-out infinite;
  transform-origin: center;
}

@keyframes iconTick {
  0%, 100% { opacity: 0.4; transform: scale(1); }
  50% { opacity: 1; transform: scale(1.9); }
}

.icon-gear {
  animation: iconGearSpin 7s linear infinite;
  transform-origin: center;
}

@keyframes iconGearSpin {
  from { transform: rotate(0deg); }
  to { transform: rotate(360deg); }
}

.icon-lupe {
  animation: iconPan 2.4s ease-in-out infinite;
  transform-origin: center;
}

@keyframes iconPan {
  0%, 100% { transform: translate(0, 0) rotate(0deg); }
  50% { transform: translate(3px, -3px) rotate(8deg); }
}

.icon-check-mark {
  stroke-dasharray: 20;
  animation: iconCheckDraw 3.2s ease-in-out infinite;
}

@keyframes iconCheckDraw {
  0%, 15% { stroke-dashoffset: 20; }
  45%, 70% { stroke-dashoffset: 0; }
  100% { stroke-dashoffset: -20; }
}

/* Dashboard "next step" CTA row */
.next-step-bar {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 1rem;
  flex-wrap: wrap;
  padding: 1rem 1.5rem;
}

/* Legend key: the recurring severity swatch device */
.legend-swatch {
  display: inline-flex;
  align-items: center;
  gap: 0.4rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  color: var(--ink-soft);
}

.legend-swatch__mark {
  width: 9px;
  height: 9px;
  border-radius: 999px;
  flex-shrink: 0;
}

.sev-critical .legend-swatch__mark,
.mark-critical {
  background: var(--sev-critical);
}
.sev-high .legend-swatch__mark,
.mark-high {
  background: var(--sev-high);
}
.sev-medium .legend-swatch__mark,
.mark-medium {
  background: var(--sev-medium);
}
.sev-low .legend-swatch__mark,
.mark-low {
  background: var(--sev-low);
}
.sev-info .legend-swatch__mark,
.mark-info {
  background: var(--sev-info);
}

.text-sev-critical {
  color: var(--sev-critical);
}
.text-sev-high {
  color: var(--sev-high);
}
.text-sev-medium {
  color: var(--sev-medium);
}
.text-sev-low {
  color: var(--sev-low);
}
.text-sev-info {
  color: var(--sev-info);
}

/* Finding rows get a soft tint matching their severity, echoing PMI.AG's
   tinted status-icon convention (see .ticket-kpi-icon on dojo.pmi.ag) */
.sev-critical {
  background: color-mix(in srgb, var(--sev-critical) 6%, var(--paper-raised));
}
.sev-high {
  background: color-mix(in srgb, var(--sev-high) 6%, var(--paper-raised));
}
.sev-medium {
  background: color-mix(in srgb, var(--sev-medium) 6%, var(--paper-raised));
}

/* Technology-area badge: soft tinted chip, one per area */
.ta-badge {
  display: inline-flex;
  align-items: center;
  gap: 0.35rem;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.2rem 0.55rem 0.2rem 0.45rem;
  border-radius: 999px;
  color: var(--ink-soft);
  white-space: nowrap;
}

.ta-badge__dot {
  width: 7px;
  height: 7px;
  border-radius: 999px;
  flex-shrink: 0;
}

.ta-general { background: color-mix(in srgb, var(--ta-general) 12%, white); }
.ta-physical { background: color-mix(in srgb, var(--ta-physical) 12%, white); }
.ta-network { background: color-mix(in srgb, var(--ta-network) 12%, white); }
.ta-active_directory { background: color-mix(in srgb, var(--ta-active_directory) 12%, white); }
.ta-m365 { background: color-mix(in srgb, var(--ta-m365) 12%, white); }
.ta-azure { background: color-mix(in srgb, var(--ta-azure) 12%, white); }
.ta-firewall { background: color-mix(in srgb, var(--ta-firewall) 12%, white); }
.ta-backup { background: color-mix(in srgb, var(--ta-backup) 12%, white); }
.ta-endpoint { background: color-mix(in srgb, var(--ta-endpoint) 12%, white); }
.ta-server { background: color-mix(in srgb, var(--ta-server) 12%, white); }
.ta-disaster_recovery { background: color-mix(in srgb, var(--ta-disaster_recovery) 12%, white); }
.ta-awareness { background: color-mix(in srgb, var(--ta-awareness) 12%, white); }

.ta-general .ta-badge__dot { background: var(--ta-general); }
.ta-physical .ta-badge__dot { background: var(--ta-physical); }
.ta-network .ta-badge__dot { background: var(--ta-network); }
.ta-active_directory .ta-badge__dot { background: var(--ta-active_directory); }
.ta-m365 .ta-badge__dot { background: var(--ta-m365); }
.ta-azure .ta-badge__dot { background: var(--ta-azure); }
.ta-firewall .ta-badge__dot { background: var(--ta-firewall); }
.ta-backup .ta-badge__dot { background: var(--ta-backup); }
.ta-endpoint .ta-badge__dot { background: var(--ta-endpoint); }
.ta-server .ta-badge__dot { background: var(--ta-server); }
.ta-disaster_recovery .ta-badge__dot { background: var(--ta-disaster_recovery); }
.ta-awareness .ta-badge__dot { background: var(--ta-awareness); }

/* Asset/finding scope badge: internal (LAN-only) vs external (internet-facing) */
.scope-badge {
  display: inline-flex;
  align-items: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.6rem;
  letter-spacing: 0.04em;
  text-transform: uppercase;
  padding: 0.15rem 0.45rem;
  border-radius: 999px;
  white-space: nowrap;
}
.scope-internal {
  color: var(--ink-soft);
  background: color-mix(in srgb, var(--ink-soft) 10%, var(--paper-raised));
}
.scope-external {
  color: var(--sev-high);
  background: color-mix(in srgb, var(--sev-high) 12%, var(--paper-raised));
}

/* Risk register: 5x5 likelihood x impact matrix + score badges, bucketed by score
   1-4 niedrig, 5-9 mittel, 10-15 hoch, 16-25 kritisch */
.risk-bucket-low { color: var(--ok); background: color-mix(in srgb, var(--ok) 14%, var(--paper-raised)); }
.risk-bucket-medium { color: var(--sev-medium); background: color-mix(in srgb, var(--sev-medium) 16%, var(--paper-raised)); }
.risk-bucket-high { color: var(--sev-high); background: color-mix(in srgb, var(--sev-high) 16%, var(--paper-raised)); }
.risk-bucket-critical { color: #fff; background: var(--sev-critical); }

.risk-score-badge {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 2.25rem;
  height: 2.25rem;
  border-radius: 0.5rem;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
  font-size: 0.95rem;
  flex-shrink: 0;
}

.risk-matrix {
  border-collapse: collapse;
}
.risk-matrix__cell {
  width: 2.75rem;
  height: 2.75rem;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.8rem;
  font-weight: 600;
  border: 1px solid var(--paper-raised);
  cursor: pointer;
  transition: filter 0.15s ease;
}
.risk-matrix__cell:hover {
  filter: brightness(1.08);
}
.risk-matrix__cell.is-active-filter {
  outline: 2px solid var(--ink);
  outline-offset: -2px;
}
.risk-matrix__axis {
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.7rem;
  color: var(--ink-faint);
  font-weight: 400;
  padding: 0.25rem;
}

/* Compliance coverage bar */
.coverage-bar {
  width: 100%;
  height: 0.5rem;
  border-radius: 999px;
  background: color-mix(in srgb, var(--ink-faint) 20%, var(--paper-raised));
  overflow: hidden;
}
.coverage-bar__fill {
  height: 100%;
  background: var(--ok);
  border-radius: 999px;
  transition: width 0.2s ease;
}

/* Photo evidence: thumbnail strip + upload affordance, used on findings and checklist items */
.evidence-strip {
  display: flex;
  flex-wrap: wrap;
  gap: 0.5rem;
  margin-top: 0.5rem;
}

.evidence-thumb {
  position: relative;
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  border-radius: 6px;
  overflow: hidden;
  border: 1px solid var(--paper-line);
  background: var(--paper);
}

.evidence-thumb img {
  width: 100%;
  height: 100%;
  object-fit: cover;
  display: block;
}

.evidence-thumb__remove {
  position: absolute;
  top: 2px;
  right: 2px;
  width: 16px;
  height: 16px;
  line-height: 16px;
  text-align: center;
  font-size: 0.65rem;
  border-radius: 999px;
  background: rgba(16, 21, 22, 0.75);
  color: white;
}

.evidence-thumb__remove:hover {
  background: var(--sev-critical);
}

.evidence-upload {
  width: 64px;
  height: 64px;
  flex-shrink: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  border: 1px dashed var(--paper-line);
  border-radius: 6px;
  color: var(--ink-faint);
  font-size: 1.3rem;
  cursor: pointer;
  transition: border-color 120ms ease, color 120ms ease;
}

.evidence-upload:hover {
  border-color: var(--brand-dark);
  color: var(--brand-dark);
}

.evidence-upload input[type="file"] {
  display: none;
}

/* Checklist tri-state status control: I.O. / nicht I.O. / pending (neither pressed) */
.status-toggle {
  display: inline-flex;
  border: 1px solid var(--paper-line);
  border-radius: 6px;
  overflow: hidden;
}

.status-toggle__btn {
  width: 22px;
  height: 22px;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.8rem;
  line-height: 1;
  color: var(--ink-faint);
  background: var(--paper-raised);
  transition: background-color 120ms ease, color 120ms ease;
}

.status-toggle__ok:not(.is-active):hover {
  color: var(--ok);
}

.status-toggle__not-ok:not(.is-active):hover {
  color: var(--sev-critical);
}

.status-toggle__ok.is-active {
  background: var(--ok);
  color: white;
}

.status-toggle__not-ok.is-active {
  background: var(--sev-critical);
  color: white;
}

.checklist-item-flagged {
  border-left: 2px solid var(--sev-critical);
  padding-left: 0.5rem;
  margin-left: -0.5rem;
}

/* Utility field: monospace value with a small caption label — our own
   console-specific data face, layered on top of PMI.AG's Inter-based UI */
.readout-label {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: var(--ink-faint);
}

.readout-value {
  font-family: "Inter", sans-serif;
  font-weight: 900;
  color: var(--ink);
  line-height: 1;
}

/* Buttons */
.btn {
  font-family: "Inter", sans-serif;
  font-weight: 800;
  font-size: 0.875rem;
  border-radius: 6px;
  padding: 0.6rem 1.1rem;
  transition: background-color 120ms ease, border-color 120ms ease, color 120ms ease;
}

.btn-primary {
  background: var(--brand);
  color: #121718;
  border: 1px solid transparent;
}

.btn-primary:hover {
  background: var(--brand-dark);
  color: white;
}

.btn-secondary {
  background: var(--paper-raised);
  border: 1px solid var(--paper-line);
  color: var(--ink);
}

.btn-secondary:hover {
  border-color: var(--brand-dark);
  color: var(--brand-dark);
}

/* Fixed width so toggling label text (e.g. "Kopieren" <-> "Kopiert!") never resizes the button */
.btn-copy {
  min-width: 6.75rem;
  text-align: center;
}

/* Inputs */
.field {
  width: 100%;
  border: 1px solid var(--paper-line);
  border-radius: 6px;
  padding: 0.5rem 0.65rem;
  font-size: 0.875rem;
  background: var(--paper-raised);
  color: var(--ink);
}

.field:focus {
  outline: none;
  border-color: var(--focus);
  box-shadow: 0 0 0 3px color-mix(in srgb, var(--brand) 25%, transparent);
}

/* Accessible focus ring for all interactive elements */
a:focus-visible,
button:focus-visible,
input:focus-visible,
[tabindex]:focus-visible {
  outline: 2px solid var(--focus);
  outline-offset: 2px;
}

/* Sidebar nav */
.nav-group-title {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.65rem;
  letter-spacing: 0.08em;
  text-transform: uppercase;
  color: rgba(241, 245, 249, 0.5);
  padding: 0 0.85rem;
}

.nav-link {
  display: flex;
  align-items: center;
  gap: 0.6rem;
  padding: 0.55rem 0.85rem;
  border-radius: 6px;
  font-size: 0.825rem;
  font-weight: 700;
  letter-spacing: 0.01em;
  color: rgba(255, 255, 255, 0.72);
  transition: color 120ms ease, background-color 120ms ease;
}

.nav-link:hover,
.nav-link.active {
  color: #111617;
  background: var(--brand);
}

/* Global top-of-page loading bar: indeterminate sweep shown while any
   apiFetch/apiDownload/apiUpload/apiImageUrl call is in flight (see
   beginRequest/endRequest in assets/js/api.js). */
#global-loading-bar {
  position: fixed;
  top: 0;
  left: 0;
  right: 0;
  height: 3px;
  z-index: 9999;
  overflow: hidden;
  background: transparent;
  opacity: 0;
  pointer-events: none;
  transition: opacity 150ms ease;
}

#global-loading-bar.is-active {
  opacity: 1;
}

#global-loading-bar::before {
  content: "";
  position: absolute;
  top: 0;
  left: -40%;
  width: 40%;
  height: 100%;
  background: var(--brand);
  box-shadow: 0 0 10px 1px color-mix(in srgb, var(--brand) 70%, transparent);
}

#global-loading-bar.is-active::before {
  animation: loading-bar-sweep 1.1s ease-in-out infinite;
}

@keyframes loading-bar-sweep {
  0% {
    left: -40%;
  }
  100% {
    left: 100%;
  }
}

[x-cloak] {
  display: none !important;
}

@media (prefers-reduced-motion: reduce) {
  * {
    transition-duration: 0.001ms !important;
    animation-duration: 0.001ms !important;
  }
}
