:root {
  --bg: #070f17;
  --bg-accent: #143040;
  --ink: #e9f2f6;
  --ink-soft: #97adbb;
  --card: #0e1a25;
  --tile-opacity: 1;
  --line: #223949;
  --brand: #26b389;
  --brand-deep: #158364;
  --warn: #eb6b3d;
  --critical: #e32c5b;
  --high: #ff8c42;
  --medium: #ffc864;
  --low: #7fc760;
  --info: #44a8d9;
}

* {
  box-sizing: border-box;
}

body {
  margin: 0;
  min-height: 100vh;
  font-family: "Space Grotesk", sans-serif;
  background: radial-gradient(circle at 16% 14%, rgba(38, 179, 137, 0.18) 0, transparent 36%),
    radial-gradient(circle at 83% 11%, rgba(68, 168, 217, 0.15) 0, transparent 33%),
    linear-gradient(155deg, #091622 0%, var(--bg) 58%, #060d14 100%);
  color: var(--ink);
}

.backdrop {
  position: fixed;
  inset: 0;
  background-image: linear-gradient(90deg, transparent 49px, rgba(255, 255, 255, 0.03) 50px),
    linear-gradient(transparent 49px, rgba(255, 255, 255, 0.02) 50px);
  background-size: 50px 50px;
  pointer-events: none;
}

.dashboard-bg-globe {
  position: fixed;
  top: 50%;
  left: 50%;
  width: min(1200px, 96vw);
  height: min(1200px, 96vw);
  transform: translate(-50%, -50%);
  z-index: 0;
  pointer-events: none;
  opacity: 0.42;
}

.entry-loading-overlay {
  position: fixed;
  inset: 0;
  display: flex;
  align-items: center;
  justify-content: center;
  background: radial-gradient(circle at 50% 40%, rgba(30, 77, 106, 0.58) 0%, rgba(7, 15, 23, 0.93) 62%);
  backdrop-filter: blur(3px);
  z-index: 8;
  opacity: 0;
  visibility: hidden;
  transition: opacity 0.45s ease, visibility 0.45s ease;
}

.entry-loading-overlay.visible {
  opacity: 1;
  visibility: visible;
}

.entry-loading-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 10px;
}

.entry-loading-logo {
  width: min(240px, 46vw);
  height: auto;
  filter: drop-shadow(0 14px 28px rgba(0, 0, 0, 0.48));
  animation: entry-logo-pulse 1.9s ease-in-out infinite;
}

.entry-loading-text {
  margin: 0;
  font-family: "IBM Plex Mono", monospace;
  letter-spacing: 0.06em;
  color: #d9edf7;
}

.shell {
  width: min(1200px, 96vw);
  margin: 20px auto 40px;
  position: relative;
  z-index: 1;
}

.hero {
  padding: 28px;
  border-radius: 20px;
  border: 1px solid var(--line);
  background: linear-gradient(
    120deg,
    rgba(16, 31, 43, var(--tile-opacity)) 0%,
    rgba(16, 37, 54, var(--tile-opacity)) 58%,
    rgba(18, 49, 66, var(--tile-opacity)) 100%
  );
  display: flex;
  justify-content: space-between;
  gap: 16px;
  flex-wrap: wrap;
  animation: rise 0.35s ease-out;
}

.eyebrow {
  text-transform: uppercase;
  letter-spacing: 0.08em;
  color: var(--brand);
  margin: 0;
  font-size: 0.75rem;
}

.hero h1 {
  margin: 8px 0 8px;
  font-size: clamp(1.5rem, 4vw, 2.4rem);
}

.hero-title-accent {
  color: #e32c5b;
}

.hero-brand {
  display: flex;
  align-items: center;
  gap: 26px;
}

.hero-brand-text {
  padding-left: 6px;
}

.sev0-logo {
  display: block;
  object-fit: contain;
}

.hero-logo {
  width: 124px;
  height: 124px;
}

/* When logged out, auth card covers the entire page */
body:has(.auth-card:not(.hidden)) .hero,
body:has(.auth-card:not(.hidden)) .backdrop,
body:has(.auth-card:not(.hidden)) .dashboard-bg-globe,
body:has(.auth-card:not(.hidden)) .app {
  display: none !important;
}
.auth-card:not(.hidden) {
  position: fixed;
  top: 0;
  left: 0;
  width: 100%;
  height: 100%;
  z-index: 1000;
  display: flex;
  align-items: center;
  justify-content: center;
  background: var(--bg, #0b1a2b);
  margin: 0;
  border: none;
  border-radius: 0;
}

.login-brand {
  display: flex;
  align-items: center;
  gap: 10px;
  margin-bottom: 10px;
}

.login-brand h2 {
  margin: 0;
}

.login-logo {
  width: 76px;
  height: 76px;
}

.oidc-divider {
  display: flex;
  align-items: center;
  gap: 12px;
  margin: 14px 0;
  color: var(--ink-soft);
  font-size: 0.85rem;
}
.oidc-divider::before, .oidc-divider::after {
  content: "";
  flex: 1;
  height: 1px;
  background: var(--border);
}

.oidc-btn {
  width: 100%;
  padding: 10px 16px;
  border: 1px solid var(--border);
  border-radius: 8px;
  background: var(--surface);
  color: var(--ink);
  font-size: 0.95rem;
  cursor: pointer;
  transition: background 0.15s, border-color 0.15s;
}
.oidc-btn:hover {
  background: var(--surface-hover, #f5f5f5);
  border-color: var(--accent, #4a9);
}

.subhead {
  margin: 0;
  color: var(--ink-soft);
}

.hero-meta {
  background: #f0f8f6;
  border: 1px dashed #91bdae;
  border-radius: 14px;
  padding: 12px 14px;
  min-width: 220px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.85rem;
}

.card {
  margin-top: 16px;
  background: rgba(14, 26, 37, var(--tile-opacity));
  border: 1px solid var(--line);
  border-radius: 16px;
  padding: 16px;
  box-shadow: 0 8px 24px rgba(3, 8, 13, 0.45);
}

.preference-toggle-row {
  margin-top: 6px;
  margin-bottom: 4px;
  border: 1px solid #2b4858;
  border-radius: 12px;
  background: #102130;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preference-slider-row {
  margin-top: 6px;
  margin-bottom: 4px;
  border: 1px solid #2b4858;
  border-radius: 12px;
  background: #102130;
  padding: 10px 12px;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.preference-section {
  margin-top: 6px;
  margin-bottom: 4px;
  border: 1px solid #2b4858;
  border-radius: 12px;
  background: #102130;
  padding: 12px;
}

.preference-checkbox-grid {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px 14px;
  margin-top: 12px;
}

.preference-checkbox-grid .checkbox-line {
  margin-bottom: 0;
  color: #d4e6ee;
}

.preference-slider-control {
  display: grid;
  grid-template-columns: minmax(140px, 180px) auto;
  gap: 10px;
  align-items: center;
}

#preferencesTileTransparency {
  width: 100%;
  accent-color: #52d39d;
}

#preferencesTileTransparencyValue {
  min-width: 48px;
  text-align: right;
  font-family: "IBM Plex Mono", monospace;
  color: #a5c4d2;
  font-size: 0.8rem;
}

.preference-toggle-title {
  margin: 0;
  font-weight: 600;
  color: #d4e6ee;
}

.preference-toggle-hint {
  margin: 4px 0 0;
}

.switch {
  position: relative;
  display: inline-flex;
  width: 54px;
  height: 30px;
  flex-shrink: 0;
}

.switch input {
  opacity: 0;
  width: 0;
  height: 0;
}

.switch-slider {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 1px solid #2f566b;
  background: #0f2130;
  transition: background 0.2s ease, border-color 0.2s ease;
}

.switch-slider::before {
  content: "";
  position: absolute;
  width: 22px;
  height: 22px;
  left: 3px;
  top: 3px;
  border-radius: 50%;
  background: #b8ceda;
  transition: transform 0.2s ease, background 0.2s ease;
}

.switch input:checked + .switch-slider {
  background: rgba(38, 179, 137, 0.28);
  border-color: #2aa684;
}

.switch input:checked + .switch-slider::before {
  transform: translateX(24px);
  background: #7ef3c6;
}

.auth-grid,
.grid {
  display: grid;
  gap: 14px;
}

.auth-grid {
  grid-template-columns: repeat(auto-fit, minmax(280px, 1fr));
}

.metrics {
  grid-template-columns: repeat(auto-fit, minmax(170px, 1fr));
}

.columns {
  grid-template-columns: repeat(auto-fit, minmax(350px, 1fr));
}

.stats-grid {
  display: grid;
  gap: 14px;
  grid-template-columns: repeat(2, minmax(0, 1fr));
  margin-top: 16px;
}

.stats-span-2 {
  grid-column: 1 / -1;
}

.stats-grid canvas {
  width: 100%;
  height: auto;
  border: 1px solid #284659;
  border-radius: 12px;
  background: #0f2030;
}

.trend-subhint {
  margin-top: 12px;
}

.metric-card {
  background: rgba(16, 33, 48, var(--tile-opacity));
  border-radius: 14px;
  border: 1px solid #294459;
  padding: 14px;
}

.metric-card p {
  margin: 0;
  color: var(--ink-soft);
  font-size: 0.88rem;
}

.metric-card h3 {
  margin: 8px 0 0;
  font-size: 1.45rem;
}

.sensor-metrics-card {
  display: grid;
  gap: 10px;
}

.sensor-particle-cloud {
  width: 100%;
  height: 210px;
  border: 1px solid #284659;
  border-radius: 12px;
  background:
    radial-gradient(circle at 22% 26%, rgba(227, 44, 91, 0.16), transparent 46%),
    radial-gradient(circle at 78% 74%, rgba(68, 168, 217, 0.18), transparent 48%),
    linear-gradient(155deg, #081521, #102234 64%, #0c1c2a);
}

.sensor-particle-cloud.is-active {
  border-color: #367895;
  box-shadow: inset 0 0 0 1px rgba(87, 205, 255, 0.2), 0 0 24px rgba(45, 147, 191, 0.2);
}

.sensor-metrics-grid {
  margin-top: 0;
}

.sensor-activity-card {
  display: grid;
  gap: 12px;
}

.sensor-activity-controls {
  display: grid;
  grid-template-columns: auto minmax(160px, 260px) minmax(72px, auto);
  align-items: center;
  gap: 10px;
}

.sensor-activity-controls label {
  font-size: 0.78rem;
  color: #87a9ba;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

#sensorActivityStyleSlider {
  width: 100%;
  accent-color: #52d39d;
}

#sensorActivityStyleLabel {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: #9fc0cf;
  min-width: 72px;
  text-align: right;
}

.sensor-activity-chart {
  width: 100%;
  height: 260px;
  border: 1px solid #284659;
  border-radius: 12px;
  background:
    radial-gradient(circle at 18% 20%, rgba(227, 44, 91, 0.12), transparent 38%),
    radial-gradient(circle at 82% 76%, rgba(68, 168, 217, 0.16), transparent 46%),
    linear-gradient(160deg, #091520, #102233 68%, #0b1a28);
}

.status-chip-sensor-capturing {
  border-color: #226f4d;
  background: #123829;
  color: #7ee6b4;
}

.status-chip-sensor-degraded {
  border-color: #6f6a22;
  background: #3b3515;
  color: #f5df87;
}

.status-chip-sensor-pending {
  border-color: #2f5569;
  background: #112a3b;
  color: #bdd6e4;
}

.status-chip-sensor-stopped {
  border-color: #6f5a22;
  background: #3b2f14;
  color: #f2c487;
}

.status-chip-sensor-error {
  border-color: #7a4133;
  background: #3d1f19;
  color: #ffb0a1;
}

.card-title-row {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 12px;
}

.card-title-row h3 {
  margin: 4px 0 12px;
}

.title-count {
  min-width: 32px;
  padding: 3px 10px;
  border-radius: 999px;
  border: 1px solid #2d5165;
  background: #123145;
  color: #b8d7e6;
  font-size: 0.78rem;
  text-align: center;
  font-family: "IBM Plex Mono", monospace;
  font-weight: 600;
}

h2,
h3 {
  margin: 4px 0 12px;
}

label {
  display: block;
  margin-bottom: 10px;
  font-size: 0.92rem;
  color: var(--ink-soft);
}

input,
textarea,
select {
  width: 100%;
  border: 1px solid #2c4b5f;
  border-radius: 10px;
  padding: 10px;
  margin-top: 6px;
  font: inherit;
  background: #091725;
  color: var(--ink);
}

.confidence-control {
  border: 1px solid #2b475a;
  border-radius: 12px;
  padding: 10px;
  margin-bottom: 10px;
  background: #0d1f2e;
}

.confidence-control.is-disabled {
  opacity: 0.78;
  border-color: #233a4a;
}

.confidence-control input[type="range"] {
  margin-top: 8px;
  accent-color: #52d39d;
}

.confidence-label {
  margin: 8px 0 4px;
  font-family: "IBM Plex Mono", monospace;
  color: #b6d2de;
}

.confidence-help {
  margin: 0;
  font-size: 0.8rem;
}

.confidence-control .card-title-row label {
  margin: 0;
  width: auto;
}

.mode-help-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #355f74;
  background: #102b3c;
  color: #a4cadf;
  font-size: 0.78rem;
  font-family: "IBM Plex Mono", monospace;
  padding: 0 8px;
}

.mode-help-btn:hover {
  background: #16384f;
  transform: none;
}

.mode-help-box {
  margin-top: 8px;
  border: 1px solid #2d5368;
  border-radius: 10px;
  background: #0a1926;
  padding: 10px;
}

.mode-help-box p {
  margin: 0 0 6px;
  font-size: 0.8rem;
  color: #a7c2d1;
}

.mode-help-box p:last-child {
  margin-bottom: 0;
}

.internal-edge-preflight {
  border: 1px solid #2d5368;
  border-radius: 12px;
  background: #0a1926;
  padding: 10px;
  margin: 10px 0;
}

.internal-edge-preflight h4 {
  margin: 0;
  font-size: 0.92rem;
}

.internal-edge-checks {
  list-style: none;
  margin: 8px 0 4px;
  padding: 0;
}

.internal-edge-accordion {
  margin-top: 8px;
}

.internal-edge-accordion-summary {
  list-style: none;
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  padding: 8px 10px;
  border-radius: 8px;
  border: 1px solid #224255;
  background: #0f2434;
  cursor: pointer;
  user-select: none;
}

.internal-edge-accordion-summary::-webkit-details-marker {
  display: none;
}

.internal-edge-accordion-summary::after {
  content: "▾";
  color: #9ec0cf;
  font-size: 0.82rem;
  transition: transform 140ms ease;
}

.internal-edge-accordion:not([open]) .internal-edge-accordion-summary::after {
  transform: rotate(-90deg);
}

.internal-edge-accordion-title {
  font-size: 0.82rem;
  font-weight: 600;
  color: #d6e6ee;
}

.internal-edge-accordion[open] .internal-edge-checks {
  margin-top: 8px;
}

.internal-edge-checks li {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  margin-bottom: 6px;
  padding: 6px 8px;
  border-radius: 8px;
  background: #0f2434;
  border: 1px solid #224255;
  font-size: 0.8rem;
  color: #bdd4de;
}

.internal-edge-checks li[data-coverage-key] {
  transition:
    border-color 140ms ease,
    box-shadow 140ms ease,
    background 140ms ease,
    transform 140ms ease;
}

.internal-edge-checks li[data-coverage-key].coverage-hit {
  border-color: #8e3344;
  background:
    linear-gradient(135deg, rgba(84, 18, 28, 0.52), rgba(32, 12, 20, 0.32)),
    #0f2434;
  box-shadow:
    inset 0 0 0 1px rgba(255, 120, 136, 0.22),
    0 0 0 1px rgba(153, 50, 66, 0.18);
  transform: translateY(-1px);
}

.internal-edge-checks li:last-child {
  margin-bottom: 0;
}

.internal-edge-check-label {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.internal-edge-check-state {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
}

.internal-edge-check-state.ok {
  color: #59d69f;
}

.internal-edge-check-state.pending {
  color: #f2c46f;
}

.internal-edge-check-state.fail {
  color: #f27a88;
}

.coverage-state {
  min-width: 84px;
  padding: 4px 10px;
  border-radius: 999px;
  border: 1px solid #27465a;
  background: #102533;
  color: #90aab7;
  text-align: center;
}

.coverage-state.coverage-state-active {
  border-color: #8e3344;
  background: #3d1822;
  color: #ffb4c0;
}

.coverage-state.coverage-state-idle {
  border-color: #27465a;
  background: #102533;
  color: #90aab7;
}

.internal-edge-inventory-list {
  display: grid;
  gap: 10px;
  margin-top: 14px;
}

.internal-edge-inventory-item {
  border: 1px solid #224255;
  border-radius: 12px;
  background: #0f2434;
  padding: 12px;
}

.internal-edge-inventory-head {
  display: flex;
  justify-content: space-between;
  align-items: center;
  gap: 10px;
  flex-wrap: wrap;
}

.internal-edge-inventory-head h4 {
  margin: 0;
  font-size: 0.95rem;
}

.internal-edge-inventory-meta {
  display: grid;
  gap: 4px;
  margin-top: 8px;
  font-size: 0.82rem;
  color: #bdd4de;
}

.status-chip {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  min-width: 82px;
  padding: 4px 10px;
  border-radius: 999px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  border: 1px solid #2f5569;
  background: #112a3b;
  color: #bdd6e4;
}

.status-chip-ok {
  border-color: #226f4d;
  background: #123829;
  color: #7ee6b4;
}

.status-chip-warn {
  border-color: #7a4133;
  background: #3d1f19;
  color: #ffb0a1;
}

textarea {
  resize: vertical;
}

button {
  border: 0;
  border-radius: 12px;
  padding: 10px 14px;
  background: var(--brand);
  color: #fff;
  font-weight: 700;
  cursor: pointer;
  transition: transform 0.15s ease, background 0.15s ease;
}

button:hover {
  transform: translateY(-1px);
  background: var(--brand-deep);
}

button.secondary {
  background: #2f6f88;
}

.link-btn {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  border-radius: 12px;
  padding: 10px 14px;
  background: #2b4452;
  color: #fff;
  font-weight: 700;
  text-decoration: none;
}

.link-btn:hover {
  background: #355667;
}

button.ghost {
  background: #10202d;
  color: var(--ink);
  border: 1px solid #294557;
}

.danger {
  background: #8f233f;
}

.danger:hover {
  background: #7a1d36;
}

.small-export {
  padding: 5px 7px;
  font-size: 0.72rem;
}

.action-row {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
}

.tile-tabs {
  display: inline-flex;
  gap: 8px;
  margin-bottom: 12px;
  padding: 4px;
  border-radius: 14px;
  background: rgba(15, 32, 48, 0.88);
  border: 1px solid #2d4b5f;
}

.tile-tab {
  min-width: 0;
  padding: 8px 12px;
  border-radius: 10px;
  background: transparent;
  color: var(--muted);
  border: 1px solid transparent;
}

.tile-tab:hover {
  background: rgba(43, 68, 82, 0.8);
}

.tile-tab.is-active {
  background: #8f233f;
  border-color: #8f233f;
  color: #fff;
}

.compact-metrics {
  gap: 12px;
}

.compact-metrics .metric-card {
  min-height: 0;
  padding: 14px 16px;
}

.validation-action-btn {
  min-width: 0;
}

.validation-run-finding {
  margin-top: 4px;
}

.validation-evidence-line {
  margin-top: 3px;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.72rem;
  word-break: break-word;
}

.debug-row {
  margin-top: 8px;
}

.toolbar {
  margin-top: 16px;
  display: flex;
  justify-content: space-between;
  gap: 12px;
  align-items: flex-start;
  flex-wrap: wrap;
}

.toolbar-actions {
  display: flex;
  gap: 10px;
  flex-wrap: wrap;
  align-items: center;
}

.profile-menu-wrap {
  position: relative;
}

.profile-menu-btn {
  min-width: 84px;
}

.profile-menu-panel {
  position: absolute;
  right: 0;
  top: calc(100% + 8px);
  z-index: 7;
  min-width: 180px;
  display: grid;
  gap: 6px;
  padding: 8px;
  border-radius: 12px;
  border: 1px solid #2d4b5f;
  background: #0f2030;
  box-shadow: 0 10px 26px rgba(0, 0, 0, 0.34);
}

.profile-menu-item {
  width: 100%;
  text-align: left;
}

.metric-in-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.infinity-running {
  display: inline-flex;
  align-items: center;
  justify-content: center;
  width: 26px;
  height: 26px;
  border-radius: 999px;
  border: 1px solid #2c6178;
  background: rgba(68, 168, 217, 0.12);
  color: #7fd7f3;
  font-size: 1.1rem;
  line-height: 1;
  animation: infinityPulse 1.15s ease-in-out infinite;
}

.infinity-status {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.infinity-status .glyph {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 1px solid #2f6a84;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  color: #7fd7f3;
  font-size: 0.9rem;
  line-height: 1;
  animation: infinityPulse 1.15s ease-in-out infinite;
}

.hint {
  margin-top: 0;
  color: var(--ink-soft);
  font-size: 0.86rem;
}

.severityzero-brand {
  color: #e32c5b;
}

.alert-config-row {
  display: flex;
  justify-content: flex-end;
  gap: 8px;
  margin-bottom: 10px;
}

.alert-config-panel {
  border: 1px solid #2b4759;
  border-radius: 10px;
  background: #102130;
  padding: 10px;
  margin-bottom: 12px;
}

.checkbox-line {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  margin-bottom: 10px;
}

.checkbox-line input[type="checkbox"] {
  width: 16px;
  height: 16px;
  margin: 0;
}

.table-wrap {
  max-height: 380px;
  overflow: auto;
}

table {
  width: 100%;
  border-collapse: collapse;
}

th,
td {
  text-align: left;
  padding: 9px 7px;
  border-bottom: 1px solid #234052;
  font-size: 0.86rem;
}

td a {
  color: #9ee7d4;
}

.clickable-row {
  cursor: pointer;
}

.clickable-row:hover {
  background: rgba(39, 102, 124, 0.22);
}

.scan-row-error {
  background: rgba(143, 35, 63, 0.2);
}

.scan-row-error td {
  color: #f3b3c3;
}

.scan-row-error:hover {
  background: rgba(143, 35, 63, 0.32);
}

.scan-progress {
  display: inline-flex;
  align-items: center;
  gap: 8px;
}

.scan-spinner {
  width: 12px;
  height: 12px;
  border-radius: 999px;
  border: 2px solid rgba(138, 181, 199, 0.35);
  border-top-color: #6dd3b2;
  animation: spin 0.9s linear infinite;
}

.scan-progress-label {
  color: #8cb3c6;
  font-size: 0.8rem;
}

.scan-progress-pill {
  border: 1px solid #2f4f62;
  border-radius: 999px;
  padding: 2px 8px;
  font-size: 0.74rem;
  color: #a7c7d7;
}

.scan-progress.done .scan-progress-pill {
  border-color: #3d735d;
  color: #7bd09f;
}

.scan-progress.failed .scan-progress-pill {
  border-color: #7b3347;
  color: #f08ca3;
}

th {
  font-size: 0.78rem;
  text-transform: uppercase;
  letter-spacing: 0.03em;
  color: #86a7b8;
}

.severity-list {
  display: grid;
  gap: 9px;
}

.severity-row {
  display: grid;
  grid-template-columns: 110px 1fr 45px;
  align-items: center;
  gap: 8px;
}

.severity-bar {
  border-radius: 999px;
  background: #20313c;
  overflow: hidden;
  height: 12px;
}

.severity-bar span {
  display: block;
  height: 100%;
}

.severity-chart-shell {
  display: grid;
  grid-template-columns: minmax(180px, 220px) 1fr;
  gap: 12px;
  align-items: center;
}

.severity-side {
  display: grid;
  gap: 10px;
  align-content: start;
}

.severity-split {
  display: grid;
  gap: 12px;
}

.severity-chart-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
}

.severity-chart-controls label {
  font-size: 0.78rem;
  color: #87a9ba;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

#severityChartStyleSlider {
  width: 100%;
  accent-color: #52d39d;
}

#severityChartStyleLabel {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  color: #9fc0cf;
  min-width: 68px;
  text-align: right;
}

.intelligent-progress-panel {
  margin-top: 10px;
  border-top: 1px solid #264354;
  padding-top: 12px;
}

.intelligent-progress-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 8px;
}

.intelligent-progress-head h4 {
  margin: 0;
  font-size: 0.9rem;
}

#intelligentProgressPct {
  font-family: "IBM Plex Mono", monospace;
  color: #9fc0cf;
  font-size: 0.78rem;
}

.intelligent-progress-bar {
  margin-top: 8px;
  width: 100%;
  height: 12px;
  border-radius: 999px;
  position: relative;
  background: linear-gradient(180deg, #0d1f2b, #142f40);
  overflow: hidden;
  border: 1px solid #2f566b;
  box-shadow:
    inset 0 1px 0 rgba(255, 255, 255, 0.06),
    inset 0 -8px 14px rgba(0, 0, 0, 0.28);
}

.intelligent-progress-bar::after {
  content: "";
  position: absolute;
  inset: 0;
  background: radial-gradient(circle at 22% 50%, rgba(111, 211, 248, 0.18), transparent 48%);
  opacity: 0;
  pointer-events: none;
}

.intelligent-progress-bar span {
  display: block;
  height: 100%;
  width: 0%;
  position: relative;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f95cb 0%, #4bc5ff 32%, #63e9c7 70%, #9fffdc 100%);
  transition: width 0.45s cubic-bezier(0.22, 0.65, 0.3, 1);
  box-shadow:
    inset 0 0 10px rgba(255, 255, 255, 0.25),
    0 0 16px rgba(81, 198, 235, 0.32);
  overflow: hidden;
}

.intelligent-progress-bar span::before {
  content: "";
  position: absolute;
  inset: 0;
  background:
    repeating-linear-gradient(
      -52deg,
      rgba(255, 255, 255, 0.34) 0 10px,
      rgba(255, 255, 255, 0.06) 10px 20px
    );
  mix-blend-mode: soft-light;
}

.intelligent-progress-bar span::after {
  content: "";
  position: absolute;
  top: 50%;
  right: -9px;
  width: 18px;
  height: 18px;
  transform: translateY(-50%);
  border-radius: 999px;
  background: radial-gradient(circle, rgba(203, 255, 247, 0.95) 0%, rgba(101, 231, 201, 0.55) 42%, rgba(101, 231, 201, 0) 78%);
  filter: blur(0.2px);
}

.intelligent-progress-panel.active .intelligent-progress-bar span {
  transition: width 8.2s linear;
  animation: scan-meter-glow 2.2s ease-in-out infinite;
}

.intelligent-progress-panel.active .intelligent-progress-bar span::before {
  animation: scan-meter-stripe 1.25s linear infinite;
}

.intelligent-progress-panel.active .intelligent-progress-bar::after {
  opacity: 1;
  animation: scan-meter-track 2.8s ease-in-out infinite;
}

.intelligent-progress-panel.completed .intelligent-progress-bar span {
  animation: none;
}

@keyframes scan-meter-stripe {
  0% {
    background-position: 0 0;
  }
  100% {
    background-position: 34px 0;
  }
}

@keyframes scan-meter-glow {
  0%,
  100% {
    box-shadow:
      inset 0 0 10px rgba(255, 255, 255, 0.22),
      0 0 13px rgba(81, 198, 235, 0.25);
  }
  50% {
    box-shadow:
      inset 0 0 12px rgba(255, 255, 255, 0.34),
      0 0 19px rgba(98, 234, 188, 0.38);
  }
}

@keyframes scan-meter-track {
  0%,
  100% {
    background-position: 6% 50%;
  }
  50% {
    background-position: 88% 50%;
  }
}

.intelligent-progress-panel.active #intelligentProgressPct {
  color: #7fd7f3;
}

.intelligent-progress-panel.completed #intelligentProgressPct {
  color: #83dca1;
}

.progress-health {
  margin-top: 6px;
  font-size: 0.76rem;
}

.progress-health.is-healthy {
  color: #8fe3b7;
}

.progress-health.is-watch {
  color: #f4d38e;
}

.progress-health.is-risk {
  color: #ffb0a1;
}

.scan-stage-pipeline {
  display: flex;
  align-items: center;
  gap: 0;
  margin-top: 10px;
  padding: 8px 0 2px;
  overflow-x: auto;
}

.scan-stage-pipeline.hidden {
  display: none;
}

.scan-stage-step {
  display: flex;
  align-items: center;
  gap: 0;
  white-space: nowrap;
}

.scan-stage-node {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 3px;
  min-width: 0;
}

.scan-stage-dot {
  width: 18px;
  height: 18px;
  border-radius: 999px;
  border: 2px solid #2f566b;
  background: #0d1f2b;
  display: flex;
  align-items: center;
  justify-content: center;
  font-size: 0.6rem;
  color: transparent;
  transition: all 0.3s ease;
  flex-shrink: 0;
}

.scan-stage-dot.completed {
  border-color: #63e9c7;
  background: linear-gradient(135deg, #1a6b5a, #2aa88a);
  color: #d0fff2;
  box-shadow: 0 0 8px rgba(99, 233, 199, 0.3);
}

.scan-stage-dot.active {
  border-color: #4bc5ff;
  background: linear-gradient(135deg, #1a4f6b, #2a8ab8);
  color: #d0f0ff;
  box-shadow: 0 0 10px rgba(75, 197, 255, 0.4);
  animation: stage-pulse 1.8s ease-in-out infinite;
}

.scan-stage-dot.pending {
  border-color: #2f566b;
  background: #0d1f2b;
}

.scan-stage-dot.skipped {
  border-color: #1e3040;
  background: #0a1520;
  opacity: 0.4;
}

.scan-stage-label {
  font-size: 0.62rem;
  font-family: "IBM Plex Mono", monospace;
  color: #5a8a9f;
  max-width: 64px;
  text-align: center;
  overflow: hidden;
  text-overflow: ellipsis;
  line-height: 1.2;
}

.scan-stage-dot.completed + .scan-stage-label,
.scan-stage-step .scan-stage-dot.completed ~ .scan-stage-label {
  color: #8fe3b7;
}

.scan-stage-node:has(.scan-stage-dot.completed) .scan-stage-label {
  color: #8fe3b7;
}

.scan-stage-node:has(.scan-stage-dot.active) .scan-stage-label {
  color: #7fd7f3;
}

.scan-stage-node:has(.scan-stage-dot.skipped) .scan-stage-label {
  opacity: 0.4;
}

.scan-stage-connector {
  width: 20px;
  height: 2px;
  background: #2f566b;
  flex-shrink: 0;
  transition: background 0.3s ease;
}

.scan-stage-connector.completed {
  background: linear-gradient(90deg, #63e9c7, #4bc5ff);
  box-shadow: 0 0 4px rgba(99, 233, 199, 0.2);
}

.scan-stage-connector.skipped {
  opacity: 0.4;
}

@keyframes stage-pulse {
  0%, 100% {
    box-shadow: 0 0 6px rgba(75, 197, 255, 0.25);
    transform: scale(1);
    border-color: #4bc5ff;
  }
  50% {
    box-shadow: 0 0 18px rgba(75, 197, 255, 0.7), 0 0 30px rgba(75, 197, 255, 0.2);
    transform: scale(1.18);
    border-color: #7fd7f3;
  }
}

/* --- Ransomware Exposure Index --- */

.rw-score-row {
  grid-template-columns: 1.4fr repeat(4, 1fr);
}

.rw-score-card {
  display: flex;
  flex-direction: column;
  align-items: center;
  gap: 4px;
}

.rw-score-gauge {
  position: relative;
  width: 180px;
  height: 180px;
}

.rw-score-value {
  position: absolute;
  top: 50%;
  left: 50%;
  transform: translate(-50%, -50%);
  font-size: 2.4rem;
  font-weight: 700;
  font-family: "IBM Plex Mono", monospace;
  color: #9fc0cf;
}

.rw-score-label {
  font-size: 0.82rem;
  color: #7a9baa;
  margin-top: -4px;
}

.rw-kb-updated {
  text-align: right;
  font-size: 0.7rem;
  color: #5a7a8a;
  margin-top: -6px;
  margin-bottom: 8px;
}

.rw-grid {
  display: grid;
  grid-template-columns: 1fr;
  gap: 16px;
  margin-top: 16px;
}

.rw-span-full {
  grid-column: 1 / -1;
}

.rw-weight-bars {
  margin: 8px 0 4px;
  display: flex;
  flex-direction: column;
  gap: 5px;
}

.rw-weight-row {
  display: flex;
  align-items: center;
  gap: 8px;
}

.rw-weight-label {
  flex: 0 0 130px;
  font-size: 0.72rem;
  color: #7a9baa;
  text-align: right;
  font-family: "IBM Plex Mono", monospace;
}

.rw-weight-track {
  flex: 1;
  height: 8px;
  border-radius: 999px;
  background: #0d1f2b;
  border: 1px solid #1e3040;
  overflow: hidden;
}

.rw-weight-fill {
  height: 100%;
  border-radius: inherit;
  background: linear-gradient(90deg, #1f95cb, #63e9c7);
  transition: width 0.5s ease;
}

.rw-weight-val {
  flex: 0 0 40px;
  font-size: 0.72rem;
  color: #9fc0cf;
  font-family: "IBM Plex Mono", monospace;
}

.rw-sev-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  text-transform: uppercase;
}
.rw-sev-badge.sev-critical { background: #4a1520; color: #ff6b6b; }
.rw-sev-badge.sev-high { background: #4a2a10; color: #ffaa55; }
.rw-sev-badge.sev-medium { background: #3a3510; color: #f5d060; }
.rw-sev-badge.sev-low { background: #1a3520; color: #7ad480; }
.rw-sev-badge.sev-informational, .rw-sev-badge.sev-info { background: #1a2a35; color: #7ab0c8; }

.rw-kev-yes {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 4px;
  font-size: 0.68rem;
  font-weight: 600;
  background: #4a1520;
  color: #ff6b6b;
}

.rw-kb-filters {
  display: flex;
  gap: 6px;
  margin: 8px 0;
}

.rw-filter-btn {
  padding: 3px 10px;
  border-radius: 6px;
  border: 1px solid #2f566b;
  background: transparent;
  color: #7a9baa;
  font-size: 0.72rem;
  cursor: pointer;
  transition: all 0.2s;
}

.rw-filter-btn:hover {
  border-color: #4bc5ff;
  color: #c0d8e8;
}

.rw-filter-btn.active {
  background: #1a4f6b;
  border-color: #4bc5ff;
  color: #e0f0ff;
}

.rw-kb-table-wrap {
  max-height: 400px;
  overflow-y: auto;
}

.rw-flow-empty {
  text-align: center;
  padding: 40px 0;
  color: #5a7a8a;
}

#propagationCanvas {
  width: 100%;
  height: 320px;
  border-radius: 8px;
  background: linear-gradient(180deg, #0a141d 0%, #0d1a26 100%);
}

/* --- end Ransomware --- */

.severity-canvas-wrap {
  display: flex;
  align-items: center;
  justify-content: center;
}

#severityChart {
  width: 100%;
  max-width: 220px;
  height: auto;
}

.severity-legend {
  display: grid;
  gap: 8px;
}

.severity-open-ports {
  margin: 0;
  color: #9fc0cf;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.82rem;
}

.port-discovery-shell {
  border: 1px solid #274353;
  border-radius: 12px;
  background: #0f2030;
  padding: 10px;
}

.port-discovery-head {
  display: flex;
  align-items: center;
  justify-content: space-between;
  gap: 10px;
  margin-bottom: 6px;
}

.port-discovery-head h4 {
  margin: 0;
  font-size: 0.88rem;
  color: #d3e7f1;
}

#portDiscoveryMeta {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.74rem;
  color: #9fc0cf;
}

.port-discovery-style-controls {
  display: grid;
  grid-template-columns: auto 1fr auto;
  align-items: center;
  gap: 10px;
  margin-bottom: 8px;
}

.port-discovery-style-controls label {
  font-size: 0.72rem;
  color: #87a9ba;
  text-transform: uppercase;
  letter-spacing: 0.03em;
}

#portDiscoveryStyleSlider {
  width: 100%;
  accent-color: #52d39d;
}

#portDiscoveryStyleLabel {
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.76rem;
  color: #9fc0cf;
  min-width: 76px;
  text-align: right;
}

.port-discovery-canvas-wrap {
  width: 100%;
}

#portDiscoveryChart {
  width: 100%;
  height: auto;
  border: 1px solid #284659;
  border-radius: 10px;
  background: #0f2030;
}

.severity-legend-row {
  display: grid;
  grid-template-columns: 12px 1fr auto;
  align-items: center;
  gap: 8px;
  font-size: 0.85rem;
}

.severity-dot {
  width: 10px;
  height: 10px;
  border-radius: 999px;
}

.badge {
  display: inline-block;
  border-radius: 999px;
  padding: 3px 8px;
  font-size: 0.73rem;
  text-transform: uppercase;
  letter-spacing: 0.04em;
  font-weight: 700;
  --badge-pulse: rgba(68, 168, 217, 0.28);
}

.badge.informational {
  color: #fff;
  background: var(--info);
  --badge-pulse: rgba(68, 168, 217, 0.34);
}

.badge.low {
  color: #fff;
  background: var(--low);
  --badge-pulse: rgba(127, 199, 96, 0.32);
}

.badge.medium {
  color: #302000;
  background: #ffd268;
  --badge-pulse: rgba(255, 200, 100, 0.34);
}

.badge.high {
  color: #fff;
  background: var(--high);
  --badge-pulse: rgba(255, 140, 66, 0.34);
}

.badge.critical {
  color: #fff;
  background: var(--critical);
  --badge-pulse: rgba(227, 44, 91, 0.34);
}

.badge.is-pulsing {
  animation: validationBadgePulse 1.4s ease-in-out infinite;
}

.ctem-card {
  margin-top: 16px;
}

.ctem-stages {
  display: grid;
  grid-template-columns: repeat(5, minmax(0, 1fr));
  gap: 10px;
}

.ctem-stage {
  border: 1px solid #294459;
  border-radius: 12px;
  padding: 10px;
  background: #102130;
  min-height: 142px;
  transition: border-color 0.2s ease, box-shadow 0.2s ease, transform 0.2s ease;
}

.ctem-stage-head {
  display: flex;
  align-items: center;
  gap: 8px;
}

.ctem-stage-index {
  width: 22px;
  height: 22px;
  border-radius: 999px;
  border: 1px solid #3a6177;
  background: #153449;
  color: #b9d7e6;
  display: inline-flex;
  align-items: center;
  justify-content: center;
  font-size: 0.76rem;
  font-family: "IBM Plex Mono", monospace;
}

.ctem-stage h4 {
  margin: 0;
  font-size: 0.95rem;
}

.ctem-stage p {
  margin: 8px 0 8px;
  color: var(--ink-soft);
  font-size: 0.8rem;
  line-height: 1.35;
}

.ctem-stage-status {
  display: inline-flex;
  align-items: center;
  gap: 7px;
  font-size: 0.74rem;
  color: #9fc0cf;
  font-family: "IBM Plex Mono", monospace;
}

.ctem-stage-status::before {
  content: "";
  width: 8px;
  height: 8px;
  border-radius: 999px;
  background: #4b6b7c;
}

.ctem-stage-status.ctem-status-working::before {
  display: none;
}

.ctem-working {
  display: inline-flex;
  align-items: center;
  gap: 7px;
}

.ctem-working .scan-spinner {
  width: 11px;
  height: 11px;
}

.ctem-stage.is-active {
  border-color: #2e8bb0;
  box-shadow: 0 0 0 1px rgba(68, 168, 217, 0.2), 0 0 18px rgba(68, 168, 217, 0.18);
  animation: stagePulse 1.4s ease-in-out infinite;
}

.ctem-stage.is-active .ctem-stage-status::before {
  background: var(--info);
  box-shadow: 0 0 0 0 rgba(68, 168, 217, 0.55);
  animation: dotPulse 1.2s ease-out infinite;
}

.ctem-stage.is-complete {
  border-color: #2f7f65;
}

.ctem-stage.is-complete .ctem-stage-status::before {
  background: var(--low);
}

.ctem-stage.is-blocked {
  border-color: #86485a;
}

.ctem-stage.is-blocked .ctem-stage-status::before {
  background: var(--critical);
}

.ctem-stage-interactive {
  cursor: default;
}

.ctem-stage-interactive.is-clickable {
  cursor: pointer;
}

.ctem-stage-interactive.is-clickable:hover {
  transform: translateY(-1px);
  border-color: #52a7c9;
}

.modal-wide {
  width: min(980px, 96vw);
}

.priority-flow-diagram {
  margin-top: 12px;
  display: grid;
  grid-template-columns: minmax(0, 1fr) 26px minmax(0, 1fr) 26px minmax(0, 1fr) 26px minmax(0, 1fr);
  gap: 10px;
  align-items: stretch;
}

.priority-flow-step {
  border: 1px solid #2f5266;
  border-radius: 12px;
  background: #102230;
  padding: 10px;
}

.priority-flow-step h4 {
  margin: 0 0 6px;
  font-size: 0.88rem;
}

.priority-flow-step p {
  margin: 0;
  color: #99b5c3;
  font-size: 0.78rem;
  line-height: 1.35;
}

.priority-flow-arrow {
  display: flex;
  align-items: center;
  justify-content: center;
  color: #7ba9bf;
  font-size: 1.1rem;
  font-weight: 700;
  animation: arrowPulse 1.4s ease-in-out infinite;
}

.attack-path-map {
  display: grid;
  gap: 8px;
  max-height: 58vh;
  overflow: auto;
  padding-right: 2px;
}

.geo-map-shell {
  position: relative;
  height: 380px;
  width: 100%;
  border: 1px solid #294557;
  border-radius: 12px;
  overflow: hidden;
  background:
    radial-gradient(circle at 35% 22%, rgba(72, 140, 187, 0.15), transparent 52%),
    linear-gradient(160deg, #0a1b28, #112433);
}

.geo-map-shell[data-map-theme="light"] {
  border-color: #9db6c7;
  background:
    radial-gradient(circle at 35% 22%, rgba(126, 174, 206, 0.32), transparent 55%),
    linear-gradient(160deg, #edf4f9, #dce8f2);
}

.geo-map-shell[data-map-theme="dark"] .leaflet-tile-pane {
  filter: brightness(0.48) saturate(0.9) hue-rotate(180deg) contrast(1.08);
}

.geo-map-shell[data-map-theme="light"] .leaflet-tile-pane {
  filter: none;
}

.geo-map {
  height: 100%;
  width: 100%;
  background: transparent;
}

.geo-target-marker-wrapper {
  background: transparent;
  border: 0;
}

.geo-target-marker {
  position: relative;
  display: inline-block;
  width: 16px;
  height: 16px;
}

.geo-target-marker-pulse {
  position: absolute;
  inset: 0;
  border-radius: 999px;
  border: 2px solid rgba(227, 44, 91, 0.72);
  background: rgba(227, 44, 91, 0.22);
  animation: geo-target-pulse 1.8s ease-out infinite;
}

.geo-target-marker-core {
  position: absolute;
  left: 50%;
  top: 50%;
  width: 7px;
  height: 7px;
  margin-left: -3.5px;
  margin-top: -3.5px;
  border-radius: 999px;
  background: #f21c53;
  box-shadow: 0 0 9px rgba(242, 28, 83, 0.9);
}

.geo-target-marker.medium .geo-target-marker-pulse {
  border-color: rgba(245, 86, 77, 0.7);
  background: rgba(245, 86, 77, 0.2);
}

.geo-target-marker.medium .geo-target-marker-core {
  background: #f5564d;
  box-shadow: 0 0 9px rgba(245, 86, 77, 0.88);
}

.geo-target-marker.high .geo-target-marker-pulse {
  border-color: rgba(255, 112, 33, 0.74);
  background: rgba(255, 112, 33, 0.22);
}

.geo-target-marker.high .geo-target-marker-core {
  background: #ff7021;
  box-shadow: 0 0 10px rgba(255, 112, 33, 0.92);
}

.geo-globe-canvas {
  position: absolute;
  inset: 0;
  width: 100%;
  height: 100%;
  display: none;
}

.geo-map-shell[data-view-mode="globe"] .geo-map,
.geo-map-shell[data-view-mode="globe"] .geo-flow-overlay {
  display: none;
}

.geo-map-shell[data-view-mode="globe"] .geo-globe-canvas {
  display: block;
}

.geo-title-controls {
  display: inline-flex;
  align-items: center;
  gap: 8px;
  flex-wrap: nowrap;
  white-space: nowrap;
  overflow-x: auto;
  max-width: 100%;
}

.geo-anim-label {
  font-size: 0.76rem;
  color: #94b4c3;
  letter-spacing: 0.02em;
  text-transform: uppercase;
  margin: 0;
  display: inline-flex;
  align-items: center;
}

.geo-anim-select {
  border: 1px solid #2d5064;
  border-radius: 8px;
  background: #132838;
  color: #c7dce8;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.75rem;
  padding: 4px 8px;
  width: auto;
  min-width: 84px;
  margin-top: 0;
}

.geo-flow-overlay {
  position: absolute;
  inset: 0;
  z-index: 1400;
  pointer-events: none;
  mix-blend-mode: screen;
}

.geo-map-shell[data-map-theme="light"] .geo-flow-overlay {
  mix-blend-mode: multiply;
  opacity: 0.78;
}

.geo-map-shell[data-anim-mode="flow"] .geo-flow-overlay {
  opacity: 1;
}

.geo-map-shell[data-anim-mode="mesh"] .geo-flow-overlay {
  opacity: 0.95;
}

.geo-map-shell[data-anim-mode="pulse"] .geo-flow-overlay {
  opacity: 1;
}

.geo-flow-path {
  fill: none;
  stroke: rgba(118, 217, 255, 0.55);
  stroke-width: 1.2;
  stroke-dasharray: 8 10;
  stroke-linecap: round;
  animation: geo-flow-dash var(--flow-duration, 3s) linear infinite;
  animation-delay: var(--flow-delay, 0s);
}

.geo-flow-beam {
  fill: none;
  stroke: rgba(88, 232, 190, 0.45);
  stroke-width: 2;
  stroke-linecap: round;
  opacity: 0.68;
  filter: drop-shadow(0 0 6px rgba(88, 232, 190, 0.4));
  animation: geo-flow-beam var(--beam-duration, 2.6s) ease-in-out infinite;
  animation-delay: var(--beam-delay, 0s);
}

.geo-flow-link {
  fill: none;
  stroke: rgba(255, 141, 73, 0.42);
  stroke-width: 1.1;
  stroke-dasharray: 4 9;
  animation: geo-flow-dash var(--link-duration, 4.2s) linear infinite reverse;
  animation-delay: var(--link-delay, 0s);
}

.geo-flow-node {
  fill: rgba(119, 236, 250, 0.95);
  filter: drop-shadow(0 0 5px rgba(119, 236, 250, 0.75));
  animation: geo-node-pulse 2s ease-in-out infinite;
  animation-delay: var(--pulse-delay, 0s);
  transform-box: fill-box;
  transform-origin: center;
}

.geo-flow-node.hot {
  fill: rgba(255, 140, 66, 0.95);
  filter: drop-shadow(0 0 6px rgba(255, 140, 66, 0.78));
}

.geo-flow-hub {
  fill: rgba(227, 44, 91, 0.98);
  filter: drop-shadow(0 0 8px rgba(227, 44, 91, 0.75));
  animation: geo-hub-pulse 2.6s ease-in-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.geo-flow-hub-ring {
  fill: none;
  stroke: rgba(227, 44, 91, 0.4);
  stroke-width: 1.4;
  animation: geo-hub-ring 2.1s ease-out infinite;
  transform-box: fill-box;
  transform-origin: center;
}

.geo-mesh-link {
  fill: none;
  stroke: rgba(120, 198, 255, 0.26);
  stroke-width: 1;
  stroke-dasharray: 3 6;
  animation: geo-flow-dash var(--mesh-duration, 7.2s) linear infinite;
  animation-delay: var(--mesh-delay, 0s);
}

.geo-mesh-backbone {
  fill: none;
  stroke: rgba(79, 228, 191, 0.36);
  stroke-width: 1.4;
  stroke-dasharray: 8 12;
  animation: geo-flow-dash var(--mesh-backbone-duration, 5.1s) linear infinite reverse;
}

.geo-mesh-node {
  fill: rgba(130, 230, 255, 0.92);
  animation: geo-node-pulse 2.6s ease-in-out infinite;
  animation-delay: var(--mesh-node-delay, 0s);
}

.geo-mesh-hub {
  fill: rgba(95, 245, 193, 0.95);
  filter: drop-shadow(0 0 7px rgba(95, 245, 193, 0.75));
  animation: geo-hub-pulse 3.2s ease-in-out infinite;
}

.geo-pulse-ray {
  fill: none;
  stroke: rgba(103, 240, 255, 0.55);
  stroke-width: 1.8;
  stroke-dasharray: 6 8;
  stroke-linecap: round;
  animation: geo-flow-dash var(--pulse-ray-duration, 2.2s) linear infinite;
  animation-delay: var(--pulse-ray-delay, 0s);
}

.geo-pulse-beam {
  fill: none;
  stroke: rgba(255, 105, 70, 0.35);
  stroke-width: 3;
  stroke-linecap: round;
  opacity: 0.35;
  animation: geo-flow-beam var(--pulse-beam-duration, 1.7s) ease-in-out infinite;
  animation-delay: var(--pulse-beam-delay, 0s);
}

.geo-pulse-node {
  fill: rgba(255, 171, 85, 0.96);
  filter: drop-shadow(0 0 6px rgba(255, 171, 85, 0.75));
  animation: geo-node-pulse 1.8s ease-in-out infinite;
  animation-delay: var(--pulse-node-delay, 0s);
}

.geo-pulse-ripple {
  fill: none;
  stroke: rgba(255, 171, 85, 0.36);
  stroke-width: 1.4;
  animation: geo-hub-ring 1.6s ease-out infinite;
  animation-delay: var(--pulse-ripple-delay, 0s);
}

.geo-pulse-hub {
  fill: rgba(227, 44, 91, 1);
  filter: drop-shadow(0 0 10px rgba(227, 44, 91, 0.9));
  animation: geo-hub-pulse 2.1s ease-in-out infinite;
}

@keyframes geo-flow-dash {
  from {
    stroke-dashoffset: 0;
  }
  to {
    stroke-dashoffset: -110;
  }
}

@keyframes geo-flow-beam {
  0%,
  100% {
    opacity: 0.22;
    stroke-width: 1.5;
  }
  50% {
    opacity: 0.78;
    stroke-width: 2.2;
  }
}

@keyframes geo-node-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.82;
  }
  50% {
    transform: scale(1.22);
    opacity: 1;
  }
}

@keyframes geo-hub-pulse {
  0%,
  100% {
    transform: scale(1);
    opacity: 0.84;
  }
  50% {
    transform: scale(1.18);
    opacity: 1;
  }
}

@keyframes geo-hub-ring {
  0% {
    transform: scale(0.8);
    opacity: 0.62;
  }
  100% {
    transform: scale(1.65);
    opacity: 0;
  }
}

@keyframes geo-target-pulse {
  0% {
    transform: scale(0.85);
    opacity: 0.86;
  }
  70% {
    transform: scale(1.9);
    opacity: 0.04;
  }
  100% {
    transform: scale(2);
    opacity: 0;
  }
}

.geo-popup {
  min-width: 220px;
}

.attack-path-row {
  display: flex;
  align-items: center;
  gap: 8px;
  flex-wrap: wrap;
  border: 1px solid #2b4c60;
  border-radius: 10px;
  background: #0f2030;
  padding: 9px;
}

.attack-node {
  border-radius: 999px;
  border: 1px solid #355f77;
  padding: 4px 10px;
  font-size: 0.74rem;
  font-family: "IBM Plex Mono", monospace;
}

.attack-node.entry {
  background: #113246;
  color: #b6d8e8;
}

.attack-node.host {
  background: #143524;
  border-color: #2f7053;
  color: #abd9bc;
}

.attack-node.vuln.informational {
  background: rgba(68, 168, 217, 0.2);
  border-color: var(--info);
}

.attack-node.vuln.low {
  background: rgba(127, 199, 96, 0.2);
  border-color: var(--low);
}

.attack-node.vuln.medium {
  background: rgba(255, 200, 100, 0.2);
  border-color: var(--medium);
}

.attack-node.vuln.high {
  background: rgba(255, 140, 66, 0.2);
  border-color: var(--high);
}

.attack-node.vuln.critical {
  background: rgba(227, 44, 91, 0.22);
  border-color: var(--critical);
}

.attack-arrow {
  color: #7ea4b8;
  font-size: 1rem;
}

.compliance-badges {
  display: inline-flex;
  gap: 4px;
  margin-left: 6px;
  flex-wrap: wrap;
}
.compliance-badge {
  display: inline-block;
  padding: 1px 6px;
  border-radius: 3px;
  font-size: 0.65rem;
  font-weight: 600;
  letter-spacing: 0.02em;
  white-space: nowrap;
}
.compliance-iec-62443 {
  background: rgba(59, 130, 246, 0.15);
  color: #3b82f6;
  border: 1px solid rgba(59, 130, 246, 0.3);
}
.compliance-nerc-cip {
  background: rgba(245, 158, 11, 0.15);
  color: #d97706;
  border: 1px solid rgba(245, 158, 11, 0.3);
}
.compliance-nist-800-82 {
  background: rgba(16, 185, 129, 0.15);
  color: #059669;
  border: 1px solid rgba(16, 185, 129, 0.3);
}

.toast {
  position: fixed;
  right: 14px;
  bottom: 14px;
  max-width: min(360px, 90vw);
  padding: 10px 12px;
  border-radius: 10px;
  font-size: 0.9rem;
  color: #fff;
  background: #1a4f43;
  box-shadow: 0 12px 20px rgba(0, 0, 0, 0.15);
}

.hidden {
  display: none !important;
}

#scanStatus {
  min-height: 20px;
  color: var(--brand-deep);
  font-size: 0.9rem;
}

#pentestStatus {
  min-height: 20px;
  color: #9ee7d4;
  font-size: 0.9rem;
}

.score-value {
  font-weight: 800;
}

.score-denominator {
  color: var(--ink-soft);
  margin-left: 2px;
}

.score-red {
  color: #ef5b6f;
}

.score-orange {
  color: #f8a95f;
}

.score-green {
  color: #67cf87;
}

.modal {
  position: fixed;
  inset: 0;
  background: rgba(3, 10, 16, 0.7);
  display: flex;
  align-items: center;
  justify-content: center;
  z-index: 5;
  padding: 16px;
}

.modal-card {
  width: min(680px, 96vw);
  max-height: 92vh;
  overflow: auto;
  background: #0d1924;
  border: 1px solid #2f4b5c;
  border-radius: 14px;
  padding: 14px;
}

.evidence-block {
  background: #091523;
  border: 1px solid #27475a;
  border-radius: 10px;
  padding: 10px;
  overflow: auto;
  font-family: "IBM Plex Mono", monospace;
  font-size: 0.78rem;
  line-height: 1.45;
}

.evidence-images {
  display: grid;
  grid-template-columns: repeat(auto-fit, minmax(180px, 1fr));
  gap: 10px;
  margin-bottom: 10px;
}

.evidence-figure {
  margin: 0;
  border: 1px solid #2f4b5c;
  border-radius: 10px;
  overflow: hidden;
  background: #10212f;
}

.evidence-figure img {
  display: block;
  width: 100%;
  height: auto;
  max-height: 220px;
  object-fit: cover;
}

.evidence-figure figcaption {
  padding: 6px 8px;
  font-size: 0.75rem;
  color: #96b2c1;
  font-family: "IBM Plex Mono", monospace;
}

.modal-head {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
}

.modal-head-brand {
  display: inline-flex;
  align-items: center;
  gap: 10px;
}

.profile-logo {
  width: 46px;
  height: 46px;
}

.schedule-list {
  margin-top: 12px;
  margin-bottom: 12px;
  display: grid;
  gap: 10px;
}

.schedule-item {
  display: flex;
  justify-content: space-between;
  gap: 10px;
  align-items: center;
  border: 1px solid #2c4556;
  border-radius: 10px;
  padding: 10px;
  background: #122332;
}

#scanModalStatus {
  min-height: 18px;
  color: #f2a9ba;
  font-size: 0.84rem;
}

#preferencesStatus {
  min-height: 18px;
  color: #9fd4b8;
  font-size: 0.84rem;
}

@keyframes rise {
  from {
    opacity: 0;
    transform: translateY(10px);
  }
  to {
    opacity: 1;
    transform: translateY(0);
  }
}

@keyframes entry-logo-pulse {
  0%,
  100% {
    opacity: 0.9;
    transform: scale(1);
  }
  50% {
    opacity: 1;
    transform: scale(1.03);
  }
}

@keyframes spin {
  to {
    transform: rotate(360deg);
  }
}

@keyframes infinityPulse {
  0% {
    opacity: 0.45;
    transform: scale(0.92);
  }
  50% {
    opacity: 1;
    transform: scale(1.08);
  }
  100% {
    opacity: 0.45;
    transform: scale(0.92);
  }
}

@keyframes dotPulse {
  0% {
    box-shadow: 0 0 0 0 rgba(68, 168, 217, 0.45);
  }
  100% {
    box-shadow: 0 0 0 8px rgba(68, 168, 217, 0);
  }
}

@keyframes stagePulse {
  0% {
    box-shadow: 0 0 0 1px rgba(68, 168, 217, 0.15), 0 0 8px rgba(68, 168, 217, 0.12);
  }
  50% {
    box-shadow: 0 0 0 1px rgba(68, 168, 217, 0.3), 0 0 22px rgba(68, 168, 217, 0.24);
  }
  100% {
    box-shadow: 0 0 0 1px rgba(68, 168, 217, 0.15), 0 0 8px rgba(68, 168, 217, 0.12);
  }
}

@keyframes validationBadgePulse {
  0% {
    box-shadow: 0 0 0 0 var(--badge-pulse);
    transform: scale(1);
  }
  50% {
    box-shadow: 0 0 0 8px rgba(0, 0, 0, 0), 0 0 18px var(--badge-pulse);
    transform: scale(1.03);
  }
  100% {
    box-shadow: 0 0 0 0 rgba(0, 0, 0, 0);
    transform: scale(1);
  }
}

@keyframes arrowPulse {
  0% {
    opacity: 0.45;
  }
  50% {
    opacity: 1;
  }
  100% {
    opacity: 0.45;
  }
}

@media (max-width: 760px) {
  .shell {
    width: 95vw;
    margin-top: 12px;
  }

  .hero,
  .card {
    border-radius: 14px;
  }

  .toolbar-actions {
    width: 100%;
  }

  .toolbar-actions button {
    flex: 1 1 calc(50% - 8px);
  }

  .hero-brand {
    gap: 14px;
  }

  .hero-logo {
    width: 92px;
    height: 92px;
  }

  .login-logo {
    width: 56px;
    height: 56px;
  }

  .profile-menu-wrap {
    width: 100%;
  }

  .profile-menu-btn {
    width: 100%;
  }

  .severity-row {
    grid-template-columns: 95px 1fr 32px;
  }

  .severity-chart-shell {
    grid-template-columns: 1fr;
  }

  .severity-chart-controls {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  #severityChartStyleLabel {
    text-align: left;
  }

  .port-discovery-style-controls {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  #portDiscoveryStyleLabel {
    text-align: left;
  }

  .sensor-activity-controls {
    grid-template-columns: 1fr;
    gap: 6px;
  }

  #sensorActivityStyleLabel {
    text-align: left;
  }

  .preference-slider-row {
    flex-direction: column;
    align-items: stretch;
  }

  .preference-slider-control {
    grid-template-columns: 1fr auto;
  }

  .ctem-stages {
    grid-template-columns: 1fr;
  }

  .stats-grid {
    grid-template-columns: 1fr;
  }

  .stats-span-2 {
    grid-column: auto;
  }

  .priority-flow-diagram {
    grid-template-columns: 1fr;
  }

  .priority-flow-arrow {
    transform: rotate(90deg);
    min-height: 20px;
  }
}
